diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index a07cb542e91..ad4ad4341ee 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -42015,7 +42015,7 @@ /obj/effect/turf_decal/trimline/purple/filled/corner{ dir = 1 }, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "dyu" = ( /obj/structure/flora/grass/jungle{ @@ -69101,7 +69101,7 @@ "pqf" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/trimline/purple/filled/line, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "pqg" = ( /obj/effect/turf_decal/tile/neutral{ @@ -72095,7 +72095,7 @@ /obj/item/toy/plush/plasmamanplushie{ name = "Lithium II" }, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "qCn" = ( /obj/effect/turf_decal/tile/neutral{ @@ -83661,7 +83661,7 @@ /obj/effect/turf_decal/trimline/purple/filled/line{ dir = 1 }, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "vzr" = ( /obj/effect/turf_decal/stripes/line{ @@ -85185,7 +85185,7 @@ }, /obj/effect/turf_decal/trimline/purple/filled/corner, /obj/item/flashlight/lamp, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "wje" = ( /obj/structure/table/glass, @@ -89394,7 +89394,7 @@ /obj/item/toy/plush/plasmamanplushie{ name = "Dianion XV" }, -/turf/open/floor/plating/rust/plasma, +/turf/open/floor/plating/plasma/rust, /area/maintenance/space_hut/plasmaman) "xUW" = ( /obj/effect/turf_decal/tile/neutral{ diff --git a/code/datums/components/rust.dm b/code/datums/components/rust.dm index 92833de3d80..54fe02ae807 100644 --- a/code/datums/components/rust.dm +++ b/code/datums/components/rust.dm @@ -1,6 +1,6 @@ /** * Adding this component to an Atom will have it automatically render an overlay. - * The overlay can be specified in new as the first and only parameter; it defaults to "rust" if not included. + * The overlay can be specified in new as the first paramter; if not set it defaults to rust_overlay's rust_default */ /datum/component/rust dupe_mode = COMPONENT_DUPE_UNIQUE @@ -19,22 +19,21 @@ var/atom/wall_new = new /turf/open/floor/plating(src) wall_new.AddComponent(/datum/component/rust) -/datum/component/rust/Initialize(rust_iconstate = "rust") +/datum/component/rust/Initialize(mutable_appearance/overlay) . = ..() if(!isatom(parent)) return COMPONENT_INCOMPATIBLE + rust_overlay = overlay || mutable_appearance('icons/effects/rust_overlay.dmi', "rust_default") + // Unfortunately registering with parent sometimes doesn't cause an overlay update + ADD_TRAIT(parent, TRAIT_RUSTY, src) var/atom/parent_atom = parent - if(!(rust_iconstate in icon_states(parent_atom.icon))) - return COMPONENT_INCOMPATIBLE - - rust_overlay = mutable_appearance(parent_atom.icon, rust_iconstate) + parent_atom.update_icon(UPDATE_OVERLAYS) /datum/component/rust/RegisterWithParent() RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_rust_overlay) RegisterSignal(parent, list(COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_WELDER), COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_RUSTSCRAPER)), .proc/secondary_tool_act) RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/parent_del) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/handle_examine) - ADD_TRAIT(parent, TRAIT_RUSTY, src) /datum/component/rust/UnregisterFromParent() UnregisterSignal(parent,\ diff --git a/code/game/turfs/open/floor/iron_floor.dm b/code/game/turfs/open/floor/iron_floor.dm index 2d208217ec2..f430fe48186 100644 --- a/code/game/turfs/open/floor/iron_floor.dm +++ b/code/game/turfs/open/floor/iron_floor.dm @@ -17,7 +17,8 @@ /turf/open/floor/iron/rust_heretic_act() if(prob(70)) new /obj/effect/temp_visual/glowing_rune(src) - ChangeTurf(/turf/open/floor/plating) + var/atom/changed_turf = ChangeTurf(/turf/open/floor/plating) + changed_turf.AddComponent(/datum/component/rust) return ..() diff --git a/code/game/turfs/open/floor/misc_floor.dm b/code/game/turfs/open/floor/misc_floor.dm index 692550c8590..eaeb50000a4 100644 --- a/code/game/turfs/open/floor/misc_floor.dm +++ b/code/game/turfs/open/floor/misc_floor.dm @@ -204,8 +204,13 @@ desc = "Corrupted steel." icon_state = "plating_rust" -/turf/open/floor/plating/rust/plasma - initial_gas_mix = "plasma=104;TEMP=293.15" +/turf/open/floor/plating/plasma + initial_gas_mix = ATMOS_TANK_PLASMA +/turf/open/floor/plating/plasma/rust/Initialize(mapload) + . = ..() + // Because this is a fluff turf explicitly for KiloStation it doesn't make sense to ChangeTurf like usual + // Especially since it looks like we don't even change the default icon/iconstate??? + AddComponent(/datum/component/rust) /turf/open/floor/stone name = "stone brick floor" diff --git a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm index 63ef9d195fb..b3b7dbd59c2 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm @@ -21,7 +21,6 @@ /turf/open/space, /turf/open/lava, /turf/open/chasm, - /turf/open/floor/plating/rust )) route = PATH_RUST @@ -68,7 +67,7 @@ next_knowledge = list( /datum/eldritch_knowledge/rust_mark, /datum/eldritch_knowledge/armor, - /datum/eldritch_knowledge/essence + /datum/eldritch_knowledge/essence, ) route = PATH_RUST @@ -79,16 +78,15 @@ /datum/eldritch_knowledge/rust_regen/proc/on_move(mob/mover) SIGNAL_HANDLER - if(istype(get_turf(mover),/turf/open/floor/plating/rust)) + var/atom/mover_turf = get_turf(mover) + if(HAS_TRAIT(mover_turf, TRAIT_RUSTY)) ADD_TRAIT(mover,TRAIT_STUNRESISTANCE,type) - else - REMOVE_TRAIT(mover,TRAIT_STUNRESISTANCE,type) + return + + REMOVE_TRAIT(mover,TRAIT_STUNRESISTANCE,type) /datum/eldritch_knowledge/rust_regen/on_life(mob/user) . = ..() - var/turf/user_loc_turf = get_turf(user) - if(!istype(user_loc_turf, /turf/open/floor/plating/rust) || !isliving(user)) - return var/mob/living/living_user = user living_user.adjustBruteLoss(-2, FALSE) living_user.adjustFireLoss(-2, FALSE) @@ -178,7 +176,8 @@ /datum/eldritch_knowledge/final/rust_final/proc/on_move(mob/mover) SIGNAL_HANDLER - var/mover_on_rust = istype(get_turf(mover),/turf/open/floor/plating/rust) + var/atom/mover_turf = get_turf(mover) + var/mover_on_rust = HAS_TRAIT(mover_turf, TRAIT_RUSTY) //We check if we are currently standing on a rust tile, but the immunities are not active, if so apply immunities, set immunities_active to TRUE if(mover_on_rust && !immunities_active) @@ -197,7 +196,7 @@ /datum/eldritch_knowledge/final/rust_final/on_life(mob/user) . = ..() var/turf/user_loc_turf = get_turf(user) - if(!istype(user_loc_turf, /turf/open/floor/plating/rust) || !isliving(user) || !finished) + if(!HAS_TRAIT(user_loc_turf, TRAIT_RUSTY) || !isliving(user) || !finished) return var/mob/living/carbon/human/human_user = user human_user.adjustBruteLoss(-4, FALSE) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 94d2e9491c0..13b77f00038 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -262,12 +262,12 @@ floor.broken = 0 floor.burnt = 0 floor.make_plating(TRUE) - if(T.type == /turf/closed/wall && prob(15)) + if(T.type == /turf/closed/wall && prob(15) && !HAS_TRAIT(T, TRAIT_RUSTY)) new /obj/effect/temp_visual/revenant(T) - T.ChangeTurf(/turf/closed/wall/rust) - if(T.type == /turf/closed/wall/r_wall && prob(10)) + T.AddComponent(/datum/component/rust) + if(T.type == /turf/closed/wall/r_wall && prob(10) && !HAS_TRAIT(T, TRAIT_RUSTY)) new /obj/effect/temp_visual/revenant(T) - T.ChangeTurf(/turf/closed/wall/r_wall/rust) + T.AddComponent(/datum/component/rust) for(var/obj/effect/decal/cleanable/food/salt/salt in T) new /obj/effect/temp_visual/revenant(T) qdel(salt) diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index 53ccecb9d46..b140b6d24ed 100644 --- a/code/modules/mob/living/simple_animal/eldritch_demons.dm +++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm @@ -332,7 +332,7 @@ if(stat == DEAD) return ..() var/turf/T = get_turf(src) - if(istype(T,/turf/open/floor/plating/rust)) + if(HAS_TRAIT(T, TRAIT_RUSTY)) adjustBruteLoss(-1.5 * delta_time, FALSE) adjustFireLoss(-1.5 * delta_time, FALSE) return ..() diff --git a/icons/effects/rust_overlay.dmi b/icons/effects/rust_overlay.dmi new file mode 100644 index 00000000000..02f745d07fe Binary files /dev/null and b/icons/effects/rust_overlay.dmi differ diff --git a/icons/turf/walls/wall.dmi b/icons/turf/walls/wall.dmi index 4e7efd1e23e..651227fe8de 100644 Binary files a/icons/turf/walls/wall.dmi and b/icons/turf/walls/wall.dmi differ