Skip to content

Commit

Permalink
Add standalone file to be included in mods
Browse files Browse the repository at this point in the history
`#include "beatsaber-hook/shared/early-mod-checks.hpp"` at the bottom
will ensure that the functions you have in your mod match on compile
  • Loading branch information
sc2ad committed Oct 15, 2023
1 parent 2e9f382 commit 5008034
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shared/utils/early-mod-checks.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

// Include this file to assert that you have defined the necessary functions with the correct signatures

#include <type_traits>
#include "scotland2/shared/loader.hpp"

static_assert(std::is_same_v<modloader::SetupFunc, &setup>, "Must match the specified signature with setup!");
static_assert(std::is_same_v<modloader::LoadFunc, &load>, "Must match the specified signature with load!");

0 comments on commit 5008034

Please sign in to comment.