diff --git a/.vscode/settings.json b/.vscode/settings.json index aabcdf6..a8e7a72 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -92,7 +92,6 @@ } ], "Lua.workspace.userThirdParty": [ - "c:\\Users\\Nicolas Blexmann\\AppData\\Roaming\\Code\\User\\workspaceStorage\\7390b60636ee43413dfaf7fa7606ac7b\\justarandomgeek.factoriomod-debug\\sumneko-3rd", "c:\\Users\\Nicolas Blexmann\\AppData\\Roaming\\Code\\User\\workspaceStorage\\f28b69d7c82c1d180d5302f8a990beb4\\justarandomgeek.factoriomod-debug\\sumneko-3rd" ], "Lua.workspace.checkThirdParty": "ApplyInMemory" diff --git a/graphics/tech/electric-locomotive.jpg b/graphics/tech/electric-locomotive.jpg new file mode 100644 index 0000000..b1ffbba Binary files /dev/null and b/graphics/tech/electric-locomotive.jpg differ diff --git a/locale/de/locale.cfg b/locale/de/locale.cfg index d1bfe48..db072ae 100644 --- a/locale/de/locale.cfg +++ b/locale/de/locale.cfg @@ -19,9 +19,11 @@ rail-accu=Rail Power System [technology-name] rail-power-system=Strömungsschiene System +electric-locomotive=elektrische Lokomotive [technology-description] rail-power-system=Lass, elektrische Züge zu benutzen +electric-locomotive=elektrische Lokomotive um mit electrische Schienen zu benutzen [fuel-category-name] electrical=Strom \ No newline at end of file diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index 62a4569..cd5175a 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -19,9 +19,11 @@ rail-accu=Rail Power System [technology-name] rail-power-system=Rail Power System +electric-locomotive=electric locomotive [technology-description] rail-power-system=Allow to use electric trains +electric-locomotive=electric locomotive to use with rails electrified [fuel-category-name] electrical=electricity \ No newline at end of file diff --git a/locale/fr/locale.cfg b/locale/fr/locale.cfg index d9ce960..f328f46 100644 --- a/locale/fr/locale.cfg +++ b/locale/fr/locale.cfg @@ -19,9 +19,11 @@ rail-accu=Rail Power System [technology-name] rail-power-system=Système de trains électriques +electric-locomotive=locomotive électrique [technology-description] rail-power-system=Permet l'utilisation des trains électriques +electric-locomotive=Locomotive électrique à utiliser sur les rails électrifiés [fuel-category-name] electrical=électricité \ No newline at end of file diff --git a/locale/uk/locale.cfg b/locale/uk/locale.cfg index a000534..7163568 100644 --- a/locale/uk/locale.cfg +++ b/locale/uk/locale.cfg @@ -19,9 +19,11 @@ rail-accu=Rail Power System [technology-name] rail-power-system=Електрифікація залізниць +electric-locomotive=електричний локомотив [technology-description] rail-power-system=Дозволяє використовувати поїзди на електротязі +electric-locomotive=Електричний локомотив для використання на електрифікованих рейках [fuel-category-name] electrical=електрика \ No newline at end of file diff --git a/prototypes/items.lua b/prototypes/items.lua index f20b456..311b3a3 100644 --- a/prototypes/items.lua +++ b/prototypes/items.lua @@ -1,7 +1,7 @@ --electrical fuel createdata("item","solid-fuel",electricfuel,{ fuel_category="electrical", - fuel_value="20KJ", + fuel_value="40MJ", stack_size=1, icon="__"..modname.."__/graphics/icons/"..electricfuel..".png" },true) diff --git a/prototypes/rail-pole.lua b/prototypes/rail-pole.lua index 392b106..22e08cb 100644 --- a/prototypes/rail-pole.lua +++ b/prototypes/rail-pole.lua @@ -66,7 +66,9 @@ end function railpoleconnector_prototype:on_removed() for _,rail in pairs(self.rails or {}) do - rail:connect() + if rail and rail.connect then + rail:connect() + end end destroyed_railpoles[self.entity.unit_number]={ position=self.entity.position, diff --git a/prototypes/recipes.lua b/prototypes/recipes.lua index 6e473aa..c4f70f1 100644 --- a/prototypes/recipes.lua +++ b/prototypes/recipes.lua @@ -3,7 +3,7 @@ data:extend({ type = "recipe", name = electric_rail, enabled = false, - ingredients = { { "copper-cable", 3 }, { "rail", 1 } }, + ingredients = { { "copper-cable", 3 }, { "rail", 1 },{ "electronic-circuit", 2 } }, result = electric_rail, result_count = 1, }, @@ -19,7 +19,7 @@ data:extend({ type = "recipe", name = electric_locomotive, enabled = false, - ingredients = { { "locomotive", 1 }, { "battery", 10 }, { "electric-engine-unit", 20 } }, + ingredients = { { "locomotive", 1 }, { "battery-equipment", 10 }, { "electric-engine-unit", 20 } }, result = electric_locomotive, result_count = 1, }, diff --git a/prototypes/techs.lua b/prototypes/techs.lua index 1d254b6..1cd0058 100644 --- a/prototypes/techs.lua +++ b/prototypes/techs.lua @@ -6,10 +6,6 @@ data:extend( icon = "__"..modname.."__/graphics/tech/tech.png", effects = { - { - type = "unlock-recipe", - recipe = electric_locomotive - }, { type = "unlock-recipe", recipe = railpole_prototype @@ -33,4 +29,34 @@ data:extend( }, order = "a-d-d", } +}) + +data:extend( +{ + { + type = "technology", + name = "electric-locomotive", + icon = "__"..modname.."__/graphics/tech/electric-locomotive.jpg", + effects = + { + { + type = "unlock-recipe", + recipe = electric_locomotive + } + }, + icon_size=128, + prerequisites = {"rail-power-system","electric-engine","battery"}, + unit = + { + count = 75, + ingredients = + { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1} + }, + time = 15 + }, + order = "a-d-d", + } }) \ No newline at end of file