[FUCK][NO CI] Rust Component Fixes (#60252)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
Matthew J
2021-07-27 01:43:17 -07:00
committed by GitHub
co-authored by Mothblocks MrMelbert
parent 418e94f551
commit b19e1785dc
9 changed files with 35 additions and 31 deletions
@@ -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)
@@ -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)