Water As A Resource


Turns Water into a non infinite resource. Water bodies get removed and replaced by solid ground. Offshore Drains allow water & oil to be put back into these depleted areas. 0.8.0 - 1.1 Factorio Compatibility, Multiplayer Multiple Forces Update, Krastorio2 Support, Reworked MapMarkers

8 months ago
0.16 - 1.1
1.92K

b [Fixed - 0.8.2] Crash when mining Pump placed by ruins mod

Get this error when trying to pick up a pump placed by the ruins mod:

The mod Water As A Resource (0.8.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event WaterAsAResource::on_player_mined_entity (ID 66)
WaterAsAResource/control.lua:1960: attempt to index field 'last_user' (a nil value)
stack traceback:
WaterAsAResource/control.lua:1960: in function <WaterAsAResource/control.lua:1955>

3 years ago

Hello The_event_horizon,

Thanks for raising the issue.

So looks like that mod adds a large amount of entities at random. Looks as if it doesn't assign a last_user to the entities even if they are claimed, but does assign a force once they have been.

Tricky part with this, is that the ruins mod, just creates the entities but doesn't have any special traits on them, so they appear as vanila entities, which will confuse my mod when its looking for entites to destroy. It does assign a force, but only when the entities have been claimed by the player, and even then its in a different place.

I'll see if I can write in an exception for this mod somewhere, though it may need a bit of thought.

3 years ago

Now fixed in 0.8.2.

You are amazing. That is all. (And thank you!)

Hey I hate to be the bearer of bad news, but I got this error during a game with both mods. I didn't interact with anything, I was just mining and then it appeared:

The mod The Ruins Mod (1.1.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins::on_tick (ID 0)
The mod Water As A Resource (0.8.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event WaterAsAResource::script_raised_built (ID 78)
WaterAsAResource/control.lua:1946: attempt to index field 'last_user' (a nil value)
stack traceback:
WaterAsAResource/control.lua:1946: in function 'BuiltOffShore'
WaterAsAResource/control.lua:1881: in function <WaterAsAResource/control.lua:1878>
stack traceback:
[C]: in function 'create_entity'
AbandonedRuins/spawning.lua:35: in function 'spawn_entity'
AbandonedRuins/spawning.lua:80: in function 'spawn_entities'
AbandonedRuins/spawning.lua:143: in function 'spawn_ruin'
AbandonedRuins/spawning.lua:151: in function 'spawn_random_ruin'
AbandonedRuins/control.lua:51: in function <AbandonedRuins/control.lua:47>

3 years ago

Always another bug right!

Should be sorted now. (0.8.3)

New response