- It is now called the "SpecialExecute" hook, since it can be called from ACS in addition to linedef specials.
- The input arguments are completely different now. Instead of (line_t, mobj_t, sector_t), it's (activator_t, args array, stringargs array). activator_t is userdata containing valid, mo (mobj_t), line (line_t), side (side_t), sector (sector_t), and po (polyobject_t).
Allows for custom weather types.
In SOC:
```Freeslot
PRECIP_GROOVY
Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```
In Lua:
```freeslot("PRECIP_GROOVY")
precipprops[PRECIP_GROOVY] = {
type = MT_PARTICLE,
effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```
Then in level header, simply set `Weather = PRECIP_GROOVY`.
Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
* If desired graphic is not present in resources:
* If required is true, return `missingpat`.
* If false, return NULL as before (font compatibility).
* Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.
Index and take length of tag lists like a table, 1-indexed. There are three
methods which may be used on tag lists:
list:iterate() - returns an iterator over the tags in the list
list:has(tag) - returns a boolean whether the tag is in the list
list.shares(list2) - returns whether two lists share a tag
"find" is also an alias to "has". Each method may be accessed from the global
taglist library too, e.g. taglist.iterate(list)
Tag lists may be compared with an equality operator too. This will tell you if
the two lists are composed of identical tags.
Accessible from sector.taglist, line.taglist and mapthing.taglist.
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)
For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
This is done through the new "registermetatable" function,
in a somewhat similar fashion to "freeslot" but for metatables:
it must be called at script load to tell SRB2 your metatable
can be automatically relinked during the unarchiving process.
* create new file lua_polyobjlib.c
* made a stub LUA_PolyObjLib function
* added META_POLYOBJ to lua_libs.h
* updated makefile, CMake and MSVC project files for lua_polyobjlib.c