Nuclear Cars

by MrDayne

Nuclear cars with gears, nitro and an advanced steering control for high speed turning.

Content
1 year, 6 months ago
1.1
185
Transportation

b Crash because of non-existant item

1 year, 4 months ago

Hi! It is possible to use Nuclear Cars although Space Exploration is not active. However, this will result in this crash on loading:

   3.803 Mods to disable:Failed to load mods: Error in assignID: item with name 'se-rtg-equipment' does not exist.

Source: car3 (recipe).

Mods to be disabled:
• Nuclear_Car (0.0.4)

The error is in prototypes/car3.lua, lines 46-64:

if mods["Space Exploration (Experimental)"] then
  car3recipe.ingredients =
  {
  {"car2", 1},
  {"electric-engine-unit", 100},
  {"fusion-reactor-equipment", 4},
  {"low-density-structure", 200},
  {"processing-unit", 100}
  }
else
  car3recipe.ingredients =
  {
  {"car2", 1},
  {"electric-engine-unit", 100},
  {"se-rtg-equipment", 4},
  {"low-density-structure", 200},
  {"processing-unit", 100}
  }
end

You could fix that by adding another branch, e.g.

if mods["Space Exploration (Experimental)"] then
  car3recipe.ingredients =
  {
  {"car2", 1},
  {"electric-engine-unit", 100},
  {"fusion-reactor-equipment", 4},
  {"low-density-structure", 200},
  {"processing-unit", 100}
  }
elseif mods["space-exploration"] then
  car3recipe.ingredients =
  {
  {"car2", 1},
  {"electric-engine-unit", 100},
  {"se-rtg-equipment", 4},
  {"low-density-structure", 200},
  {"processing-unit", 100}
  }
else
  car3recipe.ingredients =
  {
  -- Ingredients without se-rtg-equipment
  }
end

But it would be easier to just add a dependency on "space-exploration" to make sure that the item exists.

New response