Rusting off the elements system. Makes rust appliable to turfs, adds heretic rust to revenants. (#27367)

* puts rust on hold

* fixes overlays

* defines it

* need this

* fuck

* never work on conflicts during a rpg

* continue work

* rust works
This commit is contained in:
Qwertytoforty
2025-01-12 20:58:33 +00:00
committed by GitHub
parent 7f49c57b55
commit bcc794ee3b
15 changed files with 196 additions and 28 deletions
@@ -495,18 +495,18 @@
/turf/simulated/wall/defile()
..()
if(prob(15) && !rusted)
if(prob(15))
new/obj/effect/temp_visual/revenant(loc)
rust()
magic_rust_turf()
/turf/simulated/wall/indestructible/defile()
return
/turf/simulated/wall/r_wall/defile()
..()
if(prob(15) && !rusted)
if(prob(15))
new/obj/effect/temp_visual/revenant(loc)
rust()
magic_rust_turf()
/mob/living/carbon/human/defile()
to_chat(src, "<span class='warning'>You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].</span>")
@@ -531,8 +531,10 @@
broken = FALSE
burnt = FALSE
make_plating(1)
magic_rust_turf()
/turf/simulated/floor/plating/defile()
magic_rust_turf()
if(flags & BLESSED_TILE)
flags &= ~BLESSED_TILE
new /obj/effect/temp_visual/revenant(loc)
@@ -307,3 +307,21 @@
if(prob(50))
break_tile_to_plating()
hotspot_expose(1000,CELL_VOLUME)
/turf/open/floor/plating/rust
//SDMM supports colors, this is simply for easier mapping
//and should be removed on initialize
color = COLOR_BROWN
/turf/simulated/floor/plating/rust/Initialize(mapload)
. = ..()
AddElement(/datum/element/rust)
color = null
/turf/open/floor/plating/heretic_rust
color = COLOR_GREEN_GRAY
/turf/simulated/floor/plating/heretic_rust/Initialize(mapload)
. = ..()
AddElement(/datum/element/rust/heretic)
color = null
+1 -1
View File
@@ -129,7 +129,7 @@
/turf/simulated/floor/plating/welder_act(mob/user, obj/item/I)
if(!broken && !burnt && !unfastened)
return
. = TRUE
. = ..()
if(!I.tool_use_check(user, 0))
return
if(user.a_intent == INTENT_HARM) // no repairing on harm intent, so you can use the welder in a fight near damaged paneling without welding your eyes out
+1 -19
View File
@@ -40,10 +40,6 @@
var/sheet_type = /obj/item/stack/sheet/metal
var/sheet_amount = 2
var/girder_type = /obj/structure/girder
/// Are we a rusty wall or not?
var/rusted = FALSE
/// Have we got a rusty overlay?
var/rusted_overlay
/// Are we a explodable turf?
var/explodable = FALSE
/// Do we have a explodable overlay?
@@ -89,26 +85,12 @@
if(can_dismantle_with_welder)
. += "<span class='notice'>Using a lit welding tool on this item will allow you to slice through it, eventually removing the outer layer.</span>"
/// Apply rust effects to the wall
/turf/simulated/wall/proc/rust()
if(rusted)
return
rusted = TRUE
update_appearance(UPDATE_NAME|UPDATE_OVERLAYS)
/turf/simulated/wall/update_name()
. = ..()
name = "[rusted ? "rusted " : ""][name]"
/turf/simulated/wall/update_overlays()
. = ..()
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
QUEUE_SMOOTH(src)
if(rusted && !rusted_overlay)
rusted_overlay = icon('icons/turf/overlays.dmi', pick("rust", "rust2"), pick(NORTH, SOUTH, EAST, WEST))
. += rusted_overlay
if(explodable && !explodable_overlay)
explodable_overlay = icon('icons/turf/overlays.dmi', pick("explodable"), pick(NORTH, SOUTH, EAST, WEST))
@@ -368,7 +350,7 @@
return CONTINUE_ATTACK
/turf/simulated/wall/welder_act(mob/user, obj/item/I)
. = TRUE
. = ..()
if(reagents?.get_reagent_amount("thermite") && I.use_tool(src, user, volume = I.tool_volume))
thermitemelt(user)
return
+13 -1
View File
@@ -487,7 +487,6 @@
/turf/attack_by(obj/item/attacking, mob/user, params)
if(..())
return TRUE
if(can_lay_cable())
if(istype(attacking, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = attacking
@@ -606,6 +605,19 @@
C.take_organ_damage(damage)
C.KnockDown(3 SECONDS)
/turf/proc/rust_turf()
if(HAS_TRAIT(src, TRAIT_RUSTY))
return
AddElement(/datum/element/rust)
/turf/proc/magic_rust_turf()
if(HAS_TRAIT(src, TRAIT_RUSTY))
return
AddElement(/datum/element/rust/heretic)
new /obj/effect/glowing_rune(src)
/// Returns a list of all attached /datum/element/decal/ for this turf
/turf/proc/get_decals()
var/list/datum/element/decals = list()