Mining wagon

by adamius

Adds a mining wagon with electric drills built in.

Content
4 years ago
0.17 - 0.18
16
Trains

b Error report

3 years ago

Following error message appeared in my game play, and the only thing I can do is going back to start menu.
Could you give some update for this problem?

Error while running event mining-wagon::on_nth_tick(60)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__mining-wagon
/control.lua:17: in function 'add_beam'
mining-wagon/control.lua:330: in function 'func'
mining-wagon/control.lua:391: in function 'tick_wagons'
mining-wagon/control.lua:403: in function <mining-wagon/control.lua:400>

3 years ago

I checked the error is happen when a oil field is destroyed.
and I find out 2 solutions.

First solution is complete beam effect before the oil field destroyed.
I think this effects almost nothing to mod behavior.
In control.lua of this MOD,
move line 330 (add_beam ....) to line 323 (before entity.destroy)

Second solution is don't destroy a oil field, and I think this is better.
To keep minimum 20% instead of destroying, as the default game do.
In control.lua of this MOD and,
Change Line 324 : "if new_value <1 then" to "if new_value<60000 then"
Change Line 325 : "entity.destroy()" to "entity.amount=60000"

3 years ago

Definite bug if you found an error resiliency issue. I'll include a fix.

I'm currently involved in some work that is higher priority so I'll see what I can do. You are still using 0.18 or have you bumped yours to 1.1?

3 years ago

I played factorio in version 1.1.
I upgraded the MOD by changing factorio version in info.jason.

New response