mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
Merge branch 'version-constants' into 'next'
Version constants for Lua Pretty simple thing. Allows scripters to use VERSION, SUBVERSION, and VERSIONSTRING to check the game's version and potentially futureproof scripts. Have tested and confirmed working on my end. See merge request !55
This commit is contained in:
commit
e6f7b8ab26
1 changed files with 5 additions and 0 deletions
|
@ -6975,6 +6975,8 @@ struct {
|
|||
{"PUSHACCEL",PUSHACCEL},
|
||||
{"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into.
|
||||
{"CODEBASE",CODEBASE}, // or what release of SRB2 this is.
|
||||
{"VERSION",VERSION}, // Grab the game's version!
|
||||
{"SUBVERSION",SUBVERSION}, // more precise version number
|
||||
|
||||
// Special linedef executor tag numbers!
|
||||
{"LE_PINCHPHASE",LE_PINCHPHASE}, // A boss entered pinch phase (and, in most cases, is preparing their pinch phase attack!)
|
||||
|
@ -8272,6 +8274,9 @@ static inline int lib_getenum(lua_State *L)
|
|||
} else if (fastcmp(word,"gravity")) {
|
||||
lua_pushinteger(L, gravity);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"VERSIONSTRING")) {
|
||||
lua_pushstring(L, VERSIONSTRING);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue