Production hubs


Create a network of small bases connected with rail

Overhaul
1 year, 12 days ago
1.1
287
Trains Environment

b Crash On Mining Entity

1 year, 5 days ago
(updated 1 year, 5 days ago)

Reported error:

The mod Production hubs (1.0.1) caused a non-recoverable error. Please report this error to the mod author.

Error while running event ProductionHubs::on_player_mined_entity (ID 67)
ProductionHubs_ /control/prodHubsLib.lua:62: attempt to index local
'patch' (a nil value)
stack traceback:
__ProductionHubs
/control/prodHubsLib.lua:62: in function
'entitvRemoved'
__ProductionHubs
_/control.lua:112: in function
<__ProductionHubs
/control.lua:110>

For additional context, this was trying to remove a filter inserter, set to whitelist coal only, sitting on stone paths - on top of grass. I'm guessing this is the root of the problem - the spot did not belong to a patch, and building is permitted on top of any non-grass ground, rather than just dirt. Is the stone path flooring allowing building anywhere intended, similar to expanding asteroid bases in Space Exploration? Or is this a bug as well?

EDIT: I realized that the machines still don't work on stone on grass, so guessing this is a workaround?

1 year, 5 days ago
(updated 1 year, 5 days ago)

Additional information:
- An identical error does occur on replacing the filter inserter with another type.
- The error does NOT occur when marking it for deconstruction and having a bot mine it and bring it back.
- The error does NOT occur when removing medium power poles or conveyor belts. (I'm guessing because the problem is related to the workers.)
- The error does occur when a boiler is mined.

Side question: how does one send fighters back into the vault?

1 year, 5 days ago

Another bug that may be related. I'm not sure what led to this one, but it seemed to happen inconsistently - there might've been something happening in the distance. Apologies for any typos.

The mod Production hubs (1.0.1) caused a non-recoverable error.
Please report this error to the mod author,
Error while running event ProductionHubs::on_ tick (ID O)
LuaEntity API call when LuaEntity was invalid,
stack traceback:
in function '__newindex' _ ProductionHubs /control/ in function
'setStatusFromWorkers• _
ProductionHubs_ /control/ in function
'removeEntitvWorkers' _
ProductionHubs_ /control/ in function
'removeWorkersFromAllUnits'
ProductionHubs
/control/ population,lua: 1 17: in function
ProductionHubs
_/control/globals.lua:86: in function 'callEvent'
ProductionHubs
/control.lua:11: in function
ProductionHubs

1 year, 4 days ago

Thanks for the report. I have not considered landfill or concrete. I did not intend to enable expansion of bases, so I will have to think of a way to ignore concrete, and landfill should generate unbuildable terrain. The errors accures when trying to assign workers (or remove workers) from buildings that are not placed on a patch.

1 year, 3 days ago

That sounds right.

I spent some time poking around the code. It might be worth simply removing landfill as an item. Can you add stone paths and concrete to the collisions masks you used in entities.lua, or do they not act as terrain in the same way?

Related, I edited a local copy of the mod down to purely the generation of land and blocking of building, though it's rather buggy (for example, steam engines are not placeable on grass in your mod but appear to be placeable in my edit, despite "generator" still existing in the layer) and the generation of ores still occurs on sand (so I removed sand generation from my version). Is a version of your mod without the vault mechanics (or with them togglable via an option) something you are considering?

1 year, 3 days ago

The vault mechanics is a pretty big part of the mod, not so easy to separate from the patches mechanics. So no, I´m not currently planning on adding a toggle option. There is currently no way to send fighters back into the vault, I guess I should add a button for that. For now they fight until death :)

New response