Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file added graphics/tech/electric-locomotive.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions locale/de/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions locale/fr/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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é
2 changes: 2 additions & 0 deletions locale/uk/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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=електрика
2 changes: 1 addition & 1 deletion prototypes/items.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 3 additions & 1 deletion prototypes/rail-pole.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions prototypes/recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down
34 changes: 30 additions & 4 deletions prototypes/techs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
}
})