From 1e3eec5549f430d372561e1d5882e81da30c13dc Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Tue, 27 Jun 2023 04:02:11 +1000 Subject: [PATCH] Merge pull request #15080 from Runa-Dacino/hotfixclimbing HOTFIX: Climbing fixes --- .../species/station/traits_vr/positive.dm | 1 + code/modules/multiz/movement_vr.dm | 29 ++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index ea12ea9e02..1e7044bf2a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -261,6 +261,7 @@ a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" cost = 0 custom_only = FALSE + var_changes = list("can_climb" = TRUE) allowed_species = list(SPECIES_XENOCHIMERA, SPECIES_CUSTOM) //So that we avoid needless bloat for xenochim excludes = list(/datum/trait/positive/wall_climber_pro, /datum/trait/positive/wall_climber) diff --git a/code/modules/multiz/movement_vr.dm b/code/modules/multiz/movement_vr.dm index 7e4248e052..db9057d6c0 100644 --- a/code/modules/multiz/movement_vr.dm +++ b/code/modules/multiz/movement_vr.dm @@ -186,23 +186,28 @@ climb_time +=3 SECONDS if(fall_chance < 30) fall_chance = 30 - L.custom_emote(VISIBLE_MESSAGE, "begins to climb up on \The [src]") + L.visible_message(message = "[L] begins to climb up on \The [src]", self_message = "You begin to clumb up on \The [src]", \ + blind_message = "You hear the sounds of climbing!", runemessage = "Tap Tap") var/oops_time = world.time var/grace_time = 4 SECONDS to_chat(L, SPAN_WARNING("If you get interrupted after [(grace_time / (1 SECOND))] seconds of climbing, you will fall and hurt yourself, beware!")) if(do_after(L,climb_time)) if(prob(fall_chance)) - to_chat(L, SPAN_DANGER("You slipped and fell!")) L.forceMove(above_mob) + L.visible_message(message = "[L] falls off \The [src]", self_message = SPAN_DANGER("You slipped off \The [src]"), \ + blind_message = "you hear a loud thud!", runemessage = "CRASH!") else if(drop_our_held) L.drop_item(get_turf(L)) L.forceMove(above_wall) + L.visible_message(message = "[L] climbed up on \The [src]", \ + self_message = SPAN_NOTICE("You successfully scaled \The [src]"), \ + blind_message = "The sounds of climbing cease.", runemessage = "Tap Tap") L.adjust_nutrition(-nutrition_cost) - - to_chat(L, SPAN_NOTICE("You clambered up successfully!")) else if(world.time > (oops_time + grace_time)) L.forceMove(above_mob) + L.visible_message(message = "[L] falls off \The [src]", self_message = SPAN_DANGER("You slipped off \The [src]"), \ + blind_message = "you hear a loud thud!", runemessage = "CRASH!") /mob/living/verb/climb_down() set name = "Climb down wall" @@ -303,17 +308,27 @@ to_chat(src, SPAN_DANGER("\The [climbing_surface] is not suitable for climbing! Even for a master climber, this is risky!")) if(fall_chance < 75 ) fall_chance = 75 - src.custom_emote(VISIBLE_MESSAGE, "begins to climb down along \The [below_wall]") + src.visible_message(message = "[src] climb down \The [below_wall]", \ + self_message = "You begin to descend \The [below_wall]", \ + blind_message = "You hear the sounds of climbing!", runemessage = "Tap Tap") + below_wall.audible_message(message = "You hear something climbing up \The [below_wall]", runemessage= "Tap Tap") var/oops_time = world.time var/grace_time = 3 SECONDS to_chat(src, SPAN_WARNING("If you get interrupted after [(grace_time / (1 SECOND))] seconds of climbing, you will fall and hurt yourself, beware!")) if(do_after(src,climb_time)) if(prob(fall_chance)) - to_chat(src, SPAN_DANGER("You slipped and fell!")) src.forceMove(front_of_us) + src.visible_message(message = "[src] falls off \The [below_wall]", \ + self_message = SPAN_DANGER("You slipped off \The [below_wall]"), \ + blind_message = "you hear a loud thud!", runemessage = "CRASH!") else src.forceMove(destination) - to_chat(src, SPAN_NOTICE("You descended successfully!")) + src.visible_message(message = "[src] climbed down on \The [below_wall]", \ + self_message = SPAN_NOTICE("You successfully descended \The [below_wall]"), \ + blind_message = "The sounds of climbing cease.", runemessage = "Tap Tap") adjust_nutrition(-nutrition_cost) else if(world.time > (oops_time + grace_time)) src.forceMove(front_of_us) + src.visible_message(message = "[src] falls off \The [below_wall]", \ + self_message = SPAN_DANGER("You slipped off \The [below_wall]"), \ + blind_message = "you hear a loud thud!", runemessage = "CRASH!")