Water Turret

by Pi-C

This mod provides an early game Water thrower that does minimal damage but slows down the enemies (use steam for extra damage!) and an advanced turret for extinguishing fires (use "Hardened pipes" to give it extra resistances!).

Content
3 years ago
0.17 - 1.1
5.67K
Combat

b [Fixed] [0.18.5] Crash and some strange targeting of tiles.

3 years ago

Right before the crash the water turret was shooting at some "things" that had a healthbar but that I couldn't see. They disappeared after a while. On the third thing in succession the mod crashed.

The mod Water Turret (0.18.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event WaterTurret::on_tick (ID 0)
WaterTurret/control.lua:1153:

[ER Global Lock] Forbidden global read:
{key = "enemy"}

stack traceback:
[C]: in function 'error'
WaterTurret/control.lua:1153: in function 'index'
__WaterTurret
/control.lua:400: in function 'target_enemy_or_fire'
WaterTurret/control.lua:593: in function <WaterTurret/control.lua:563>

3 years ago

Thanks for the report. I've commented out a lot of code for 0.18.3, and somehow, the definition of "enemy" (which is used in line 400 of control.lua) must have disappeared. The error comes from a code snippet by eradicator which triggers when an undeclared variable is accessed for reading or writing. Commenting out lines 399 and 400 should fix that.

I won't fix this particular bug myself because I'm already working at version 1.0.0 which includes a major rewrite of the code, so this isn't even in my working version anymore. Please fix this locally and wait a bit longer until I can release the next version! :-)

3 years ago

Right before the crash the water turret was shooting at some "things" that had a healthbar but that I couldn't see. They disappeared after a while.

I guess that would be the dummies I use to mark fires. If you want to have a clear look at what happens, you could create a dummy mod with the name "_debug" that contains just info.json. If that mod is active, you will get an insane amount of log spam -- and the fire dummies will be shown as red dots instead of blanks.

3 years ago

Ok, looking forward to 1.0 then :)

3 years ago

Sorry for the delay. Just uploaded!

New response