mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user