diff --git a/.gitignore b/.gitignore index 0108928..a404d80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ deploy.sh -DESIGN_DOCUMENT_FACTORIO_MOD.md \ No newline at end of file +DESIGN_DOCUMENT_FACTORIO_MOD.md +.claude \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bdf40e..696741a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [1.1.1] - 2026-04-19 + +### Opraveno +- Diesel Engine: opravena cesta ke zvukům otevření/zavření GUI (`machine-open/close.ogg`) + +## [1.1.0] - 2026-04-19 + +### Přidáno +- Diesel Engine — spaluje heavy oil a generuje 1,8 MW elektřiny, nevyžaduje kotel +- Patch `heavy-oil.fuel_value = "2MJ"` přes `data-updates.lua` + ## [1.0.1] - 2026-04-19 ### Opraveno diff --git a/MoreMachineryMod/data-updates.lua b/MoreMachineryMod/data-updates.lua new file mode 100644 index 0000000..35e3fed --- /dev/null +++ b/MoreMachineryMod/data-updates.lua @@ -0,0 +1,8 @@ +-- data-updates.lua runs after all mods' data.lua, correct phase for patching base/other-mod prototypes + +-- Add fuel_value to heavy oil so diesel-engine can burn it (burns_fluid = true) +-- Power output: fluid_usage_per_tick * 60 * fuel_value = 0.015 * 60 * 2MJ = 1.8MW +-- Only patch if not already set by another mod to avoid conflict +if data.raw["fluid"]["heavy-oil"].fuel_value == nil or data.raw["fluid"]["heavy-oil"].fuel_value == "0J" then + data.raw["fluid"]["heavy-oil"].fuel_value = "2MJ" +end diff --git a/MoreMachineryMod/data.lua b/MoreMachineryMod/data.lua index d191c11..1ff3faa 100644 --- a/MoreMachineryMod/data.lua +++ b/MoreMachineryMod/data.lua @@ -170,3 +170,125 @@ if mods["space-age"] then data:extend({make_fluid_recipe(fluid, #base_fluids + i)}) end end + +local orange_tint = {r = 1.0, g = 0.6, b = 0.15, a = 1.0} + +data:extend({ + { + type = "generator", + name = "diesel-engine", + icon = "__base__/graphics/icons/steam-engine.png", + flags = {"placeable-neutral", "player-creation"}, + minable = {mining_time = 0.3, result = "diesel-engine"}, + max_health = 400, + corpse = "steam-engine-remnants", + dying_explosion = "steam-engine-explosion", + effectivity = 1, + fluid_usage_per_tick = 0.015, + maximum_temperature = 165, + burns_fluid = true, + collision_box = {{-1.25, -2.35}, {1.25, 2.35}}, + selection_box = {{-1.5, -2.5}, {1.5, 2.5}}, + fluid_box = { + volume = 200, + pipe_covers = pipecoverspictures(), + pipe_connections = { + {flow_direction = "input-output", direction = defines.direction.south, position = {0, 2}}, + {flow_direction = "input-output", direction = defines.direction.north, position = {0, -2}} + }, + production_type = "input", + filter = "heavy-oil" + }, + energy_source = { + type = "electric", + usage_priority = "secondary-output" + }, + horizontal_animation = { + layers = { + { + filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png", + width = 352, + height = 257, + frame_count = 32, + line_length = 8, + shift = util.by_pixel(1, -4.75), + scale = 0.5, + tint = orange_tint + }, + { + filename = "__base__/graphics/entity/steam-engine/steam-engine-H-shadow.png", + width = 508, + height = 160, + frame_count = 32, + line_length = 8, + draw_as_shadow = true, + shift = util.by_pixel(48, 24), + scale = 0.5 + } + } + }, + vertical_animation = { + layers = { + { + filename = "__base__/graphics/entity/steam-engine/steam-engine-V.png", + width = 225, + height = 391, + frame_count = 32, + line_length = 8, + shift = util.by_pixel(4.75, -6.25), + scale = 0.5, + tint = orange_tint + }, + { + filename = "__base__/graphics/entity/steam-engine/steam-engine-V-shadow.png", + width = 330, + height = 307, + frame_count = 32, + line_length = 8, + draw_as_shadow = true, + shift = util.by_pixel(40.5, 9.25), + scale = 0.5 + } + } + }, + smoke = { + { + name = "light-smoke", + north_position = {0.9, 0.0}, + east_position = {-2.0, -2.0}, + frequency = 10 / 32, + starting_vertical_speed = 0.08, + starting_frame_deviation = 60 + } + }, + open_sound = {filename = "__base__/sound/machine-open.ogg", volume = 0.5}, + close_sound = {filename = "__base__/sound/machine-close.ogg", volume = 0.5}, + working_sound = { + sound = {filename = "__base__/sound/steam-engine-90bpm.ogg", volume = 0.6, audible_distance_modifier = 0.8}, + match_speed_to_activity = true, + fade_in_ticks = 4, + fade_out_ticks = 20 + } + }, + { + type = "item", + name = "diesel-engine", + icon = "__base__/graphics/icons/steam-engine.png", + subgroup = "energy", + order = "b[steam-engine]-b[diesel-engine]", + place_result = "diesel-engine", + stack_size = 5 + }, + { + type = "recipe", + name = "diesel-engine", + enabled = true, + ingredients = { + {type = "item", name = "steam-engine", amount = 1}, + {type = "item", name = "steel-plate", amount = 10}, + {type = "item", name = "advanced-circuit", amount = 5}, + {type = "item", name = "pipe", amount = 10} + }, + results = {{type = "item", name = "diesel-engine", amount = 1}} + } +}) diff --git a/MoreMachineryMod/info.json b/MoreMachineryMod/info.json index 53b816c..4ce3f3b 100644 --- a/MoreMachineryMod/info.json +++ b/MoreMachineryMod/info.json @@ -1,6 +1,6 @@ { "name": "MoreMachineryMod", - "version": "1.0.1", + "version": "1.1.1", "title": "More Machinery Mod", "author": "player", "description": "Adds configurable machines to Factorio. Currently includes a Fluid Pumpjack that can produce any fluid via recipe selection.", diff --git a/MoreMachineryMod/locale/cs/locale.cfg b/MoreMachineryMod/locale/cs/locale.cfg index d3739a3..55dd11b 100644 --- a/MoreMachineryMod/locale/cs/locale.cfg +++ b/MoreMachineryMod/locale/cs/locale.cfg @@ -1,14 +1,18 @@ [entity-name] fluid-pumpjack=Konfigurovatelná ropná pumpa +diesel-engine=Naftový motor [entity-description] fluid-pumpjack=Konfigurovatelná ropná pumpa. Vyber recept pro volbu produkované kapaliny (10 jednotek/sec). +diesel-engine=Spaluje těžký olej a generuje 1,8 MW elektřiny. Nevyžaduje kotel — přímá náhrada parního stroje. [item-name] fluid-pumpjack=Konfigurovatelná ropná pumpa +diesel-engine=Naftový motor [recipe-name] fluid-pumpjack=Konfigurovatelná ropná pumpa +diesel-engine=Naftový motor fluid-pumpjack-produce-water=Produkovat vodu fluid-pumpjack-produce-steam=Produkovat páru fluid-pumpjack-produce-sulfuric-acid=Produkovat kyselinu sírovou diff --git a/MoreMachineryMod/locale/en/locale.cfg b/MoreMachineryMod/locale/en/locale.cfg index 2003074..d083949 100644 --- a/MoreMachineryMod/locale/en/locale.cfg +++ b/MoreMachineryMod/locale/en/locale.cfg @@ -1,14 +1,18 @@ [entity-name] fluid-pumpjack=Fluid Pumpjack +diesel-engine=Diesel Engine [entity-description] fluid-pumpjack=A configurable pumpjack. Select a recipe to choose which fluid it produces (10 units/sec). +diesel-engine=Burns heavy oil to generate 1.8 MW of electricity. An upgrade over the steam engine that requires no boiler. [item-name] fluid-pumpjack=Fluid Pumpjack +diesel-engine=Diesel Engine [recipe-name] fluid-pumpjack=Fluid Pumpjack +diesel-engine=Diesel Engine fluid-pumpjack-produce-water=Produce Water fluid-pumpjack-produce-steam=Produce Steam fluid-pumpjack-produce-sulfuric-acid=Produce Sulfuric Acid diff --git a/README.md b/README.md index c648cfe..16c893d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,18 @@ Factorio mod přidávající konfigurovatelné stroje. Kompatibilní s Factorio ## Obsah modu +### Diesel Engine +Spalovací motor na těžký olej — generuje 1,8 MW elektřiny bez potřeby kotle. Vizuálně vychází ze steam engine, ale je zabarven do oranžova. + +- Produkuje 1,8 MW elektřiny +- Spotřebuje ~0,9 jednotek heavy oil za sekundu +- Nevyžaduje kotel ani vodu +- Podporuje rotaci (výstupní potrubí na obou koncích) + +**Recept:** 1× Steam Engine + 10× Steel Plate + 5× Advanced Circuit + 10× Pipe + +--- + ### Fluid Pumpjack Konfigurovatelná ropná pumpa — vypadá jako vanilkový pumpjack, ale hráč si může vybrat jakou kapalinu bude produkovat výběrem receptu v GUI stroje. @@ -23,5 +35,7 @@ Zkopíruj složku `MoreMachineryMod` do: ## Verze -- `1.0.1` — Opravena rotace výstupního potrubí +- `1.1.1` — Opraveny zvuky Diesel Engine +- `1.1.0` — Přidán Diesel Engine +- `1.0.1` — Opravena rotace výstupního potrubí Fluid Pumpjack - `1.0.0` — Fluid Pumpjack