Cerys


Fulgora's moon of puzzles. Ancient wrecks embedded in thick ice can seemingly be repaired, including a colossal nuclear reactor that could transform the possibilities on the surface... if you can get it working. Cerys is a complete and polished mod that does not modify the vanilla game in any way, so is easy to include in existing saves.

Content
9 hours ago
2.0
36.6K
Factorio: Space Age Icon Space Age Mod
Planets Logistics Environment Mining Fluids Manufacturing Power

b Crash with 2.9.5 - entity.lua accesses moved ten_pressure_condition

4 months ago
(updated 4 months ago)

Hi there!


17.905 Loading mod Cerys-Moon-of-Fulgora 2.9.5 (data-final-fixes.lua)
17.908 Error ModManager.cpp:1758: Failed to load mod "Cerys-Moon-of-Fulgora": PlanetsLib/lib/surface_conditions.lua:13: attempt to index local 'condition' (a nil value)
stack traceback:
PlanetsLib/lib/surface_conditions.lua:13: in function 'restrict_surface_conditions'
...s-Moon-of-Fulgora__/prototypes/override-final/entity.lua:162: in main chunk
[C]: in function 'require'
Cerys-Moon-of-Fulgora/data-final-fixes.lua:1: in main chunk
17.959 Loading mod core 0.0.0 (data.lua)
18.126 Checksum for core: 3768947881
18.168 Error ModManager.cpp:1758: Error in assignID: recipe-category with name 'recycling' does not exist.
Source: default (utility-constants).


that's because in https://github.com/danielmartin0/Cerys-Moon-of-Fulgora/commit/2fe4263cef682b862610e2a49efa4d2796f005ad, you moved ten_pressure_condition from prototypes/override-final/entity.lua to prototypes/override/entity.lua, while override-final/entity.lua still accesses ten_pressure_condition in https://github.com/danielmartin0/Cerys-Moon-of-Fulgora/blob/2fe4263cef682b862610e2a49efa4d2796f005ad/prototypes/override-final/entity.lua#L162C50-L162C72.

Thus, ten_pressure_condition is nil which is passed as argument to PlanetLib's Public.restrict_surface_conditions which accesses the nil value here: https://github.com/danielmartin0/PlanetsLib/blob/2a2fb05dbe8c6ef789da8827f06d22bbd1c1dac9/lib/surface_conditions.lua#L13 and crashes Factorio.

When reverting to 2.9.4, the error isn't raised.

Thanks for a fix! :-)

4 months ago

Thank-you for the quick and detailed report, fixed in 2.9.6.

4 months ago

great, it works! thanks a lot for your quick response!

New response