From 8f350896cf78011286e7604bec5afb11d2fc4d23 Mon Sep 17 00:00:00 2001 From: Factoriac9 <> Date: Thu, 30 Oct 2025 14:52:32 +1100 Subject: [PATCH] mk02 trains now tilt on rail ramps --- changelog.txt | 1 + data.lua | 1 + prototypes/buildings/mk02-train-sloped.lua | 113 +++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 prototypes/buildings/mk02-train-sloped.lua diff --git a/changelog.txt b/changelog.txt index 10dab91..005082f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Version: 3.0.20 Date: ???? Changes: + - MK02 trains now tilt on rail ramps - Fixed some techs having a too-fast cycle time - Fixed all techs added by "enable all feature flags" not being seen by autotech. --------------------------------------------------------------------------------------------------- diff --git a/data.lua b/data.lua index ba21889..a5076eb 100644 --- a/data.lua +++ b/data.lua @@ -84,6 +84,7 @@ if mods["pycoalprocessing"] then require "prototypes/buildings/mk02-locomotive" require "prototypes/buildings/mk02-cargo-wagon" require "prototypes/buildings/mk02-fluid-wagon" + require "prototypes/buildings/mk02-train-sloped" end --Voiding diff --git a/prototypes/buildings/mk02-train-sloped.lua b/prototypes/buildings/mk02-train-sloped.lua new file mode 100644 index 0000000..c2ee1a9 --- /dev/null +++ b/prototypes/buildings/mk02-train-sloped.lua @@ -0,0 +1,113 @@ +if not mods["elevated-rails"] then return end +local meld = require("__core__.lualib.meld") + +local updates = {} + +updates.locomotive = +{ + pictures = + { + slope_angle_between_frames = 1.25, + sloped = + { + layers = + { + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/locomotive/sloped/loco-sloped", + { + dice = 4, + priority = "very-low", + direction_count = 160, + scale = 0.5, + usage = "train" + } + ), + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/locomotive/sloped/loco-mask-sloped", + { + dice = 4, + priority = "very-low", + flags = {"mask"}, + direction_count = 160, + apply_runtime_tint = true, + draw_as_glow = true, + blend_mode = "normal", + scale = 0.5, + usage = "train" + } + ) + } + } + } +} + +updates.fluid_wagon = +{ + pictures = + { + slope_angle_between_frames = 1.25, + sloped = + { + layers = + { + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/fluid-wagon/sloped/fluid-sloped", + { + priority = "very-low", + direction_count = 160, + scale = 0.5, + usage = "train" + } + ), + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/fluid-wagon/sloped/fluid-mask-sloped", + { + priority = "very-low", + flags = {"mask"}, + direction_count = 160, + apply_runtime_tint = true, + draw_as_glow = true, + blend_mode = "additive", + scale = 0.5, + usage = "train" + } + ) + } + } + } +} + +updates.cargo_wagon = +{ + pictures = + { + slope_angle_between_frames = 1.25, + sloped = + { + layers = + { + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/cargo-wagon/sloped/wagon-sloped", + { + priority = "very-low", + direction_count = 160, + scale = 0.5, + usage = "train" + } + ), + util.sprite_load("__pyindustrygraphics__/graphics/entity/mk02-train/cargo-wagon/sloped/wagon-mask-sloped", + { + priority = "very-low", + flags = {"mask"}, + direction_count = 160, + apply_runtime_tint = true, + draw_as_glow = true, + blend_mode = "additive", + scale = 0.5, + usage = "train" + } + ) + } + } + } +} + + +meld(data.raw["locomotive"]["mk02-locomotive"], updates.locomotive) +meld(data.raw["fluid-wagon"]["mk02-fluid-wagon"], updates.fluid_wagon) +meld(data.raw["cargo-wagon"]["mk02-wagon"], updates.cargo_wagon) \ No newline at end of file