mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-15 21:49:56 -04:00
DUSK_REQUIRE_API_VERSION
This commit is contained in:
@@ -75,6 +75,8 @@ All fields are optional but recommended. `name` falls back to the filename, `ver
|
||||
```cpp
|
||||
#include "dusk/mod_api.h"
|
||||
|
||||
DUSK_REQUIRE_API_VERSION // declares mod_api_version; loader rejects the mod if the engine is older
|
||||
|
||||
extern "C" {
|
||||
|
||||
void mod_init (DuskModAPI* api); // required, called once at startup
|
||||
@@ -84,6 +86,8 @@ void mod_cleanup(DuskModAPI* api); // optional, called on shutdown
|
||||
}
|
||||
```
|
||||
|
||||
`DUSK_REQUIRE_API_VERSION` is optional but recommended. When present, the loader will refuse to initialize the mod if its API version doesn't exactly match the engine's.
|
||||
|
||||
---
|
||||
|
||||
## DuskModAPI Reference
|
||||
|
||||
Reference in New Issue
Block a user