WoF: fix Lua type error with cast to number (#8773)

Lua was getting this variable without being told it is a number rather than a string. On some systems it is interpreted as a string which breaks this monster spawner code and throws Lua error messages onto the player's screen.
This commit is contained in:
Jonathan-Kelly 2024-05-24 13:30:01 -04:00 committed by GitHub
parent a8194ee764
commit b3a8d02774
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,7 +122,7 @@
[if]
[lua]
code=<< local t = ...
return (mathx.random() < t.rate) >>
return (mathx.random() < tonumber(t.rate)) >>
[args]
rate={RATE}
[/args]