fix some script errors in mods that pass in nil objects
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

technically this is the mod's fault, but this is more consistent behavior for a cheap fix
This commit is contained in:
Isaac0-dev 2025-04-01 16:13:56 +10:00
parent a8541f0470
commit c2823c268e
5 changed files with 534 additions and 6 deletions

View file

@ -868,7 +868,9 @@ def build_param(fid, param, i):
else:
s = ' ' + s
return s + '\n'
sanity_check = ' if (lua_isnil(L, %d)) { return 0; }\n' % (i)
return sanity_check + s + '\n'
def build_param_after(param, i):
ptype = param['type']

View file

@ -11219,6 +11219,9 @@ SOUND_TERRAIN_WATER = 2
--- @type integer
SOUND_VIBRATO = 0x2000000
--- @type integer
HAZARD_TYPE_HORIZONTAL_WIND = 4
--- @type integer
HAZARD_TYPE_LAVA_FLOOR = 1
@ -11228,9 +11231,6 @@ HAZARD_TYPE_LAVA_WALL = 2
--- @type integer
HAZARD_TYPE_QUICKSAND = 3
--- @type integer
HAZARD_TYPE_HORIZONTAL_WIND = 4
--- @type integer
HAZARD_TYPE_VERTICAL_WIND = 5

View file

@ -4704,10 +4704,10 @@
<br />
## [surface_terrains.h](#surface_terrains.h)
- HAZARD_TYPE_HORIZONTAL_WIND
- HAZARD_TYPE_LAVA_FLOOR
- HAZARD_TYPE_LAVA_WALL
- HAZARD_TYPE_QUICKSAND
- HAZARD_TYPE_HORIZONTAL_WIND
- HAZARD_TYPE_VERTICAL_WIND
- SURFACE_0004
- SURFACE_BOSS_FIGHT_CAMERA

View file

@ -4741,4 +4741,4 @@ char gSmluaConstants[] = ""
"VERSION_NUMBER=40\n"
"MINOR_VERSION_NUMBER=0\n"
"MAX_VERSION_LENGTH=128\n"
;
;

File diff suppressed because it is too large Load diff