mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
Allow Lua to read VERSION, SUBVERSION, and VERSIONSTRING constants
This commit is contained in:
parent
fc35c8557e
commit
ab288a7d1a
1 changed files with 5 additions and 0 deletions
|
@ -6941,6 +6941,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!)
|
||||
|
@ -8213,6 +8215,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