From d1f8bdf8514d1db8e25ca2de80f73040dcf3fb94 Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Wed, 21 Jun 2023 14:04:06 +0200 Subject: [PATCH] feature(tweak): Modifies Climbing Implementation based on feedback - Traits reorganized - No more 0 pt trait for non-custom species, UNLESS: you are a xenochimera - Non-custom, non-xenochim must spend 1 point to be able to climb (climber, amateur) in vein of soft fall - Custom/Xenochim can take (climber, natural) for 0 pts in vein of winged flight - All species may take (climber, master) for 2 pts to halve their climbing speed - Adjusted Tajara to be as fast as Vassilians to. - Implemented Nutrition logic in inspiration of winged flight - Climbing up costs twice as much nutrition as climbing down (50 vs 25) - Climbing while hungry (less than 200 nutrition) introduces a delay of 1 second - Climbing while starving (less than 100 nutrition) introduces 30% fall chance (does not override if higher) - Cannot climb if nutrition is lower than 50 for up, 25 if down. --- .../human/species/station/station_vr.dm | 2 +- .../species/station/traits_vr/positive.dm | 51 +++++++++++-------- code/modules/multiz/movement_vr.dm | 35 +++++++++++-- 3 files changed, 63 insertions(+), 25 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 7cfe689b120..3dfe6da8e77 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -320,7 +320,7 @@ wikilink="https://wiki.vore-station.net/Tajaran" agility = 90 can_climb = TRUE - climbing_delay = 1.25 //No vassilian, but faster than a human who learned to climb! + climbing_delay = 1.00 //Cats are good climbers. /datum/species/skrell spawn_flags = SPECIES_CAN_JOIN 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 d665eb55993..2764e1fce17 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 @@ -222,8 +222,22 @@ /datum/trait/positive/wall_climber - name = "Climber" - desc = "You can climb certain walls without tools!" + name = "Climber, Amateur" + desc = "You can climb certain walls without tools! This is likely a personal skill you developed." + tutorial = "You must approach a wall and right click it and select the \ + 'climb wall' verb to climb it. You suffer from a movement delay of 1.5 with this trait.\n \ + Your total climb time is expected to be 17.5 seconds. Tools may reduce this. \n\n \ + This likewise allows descending walls, provided you're facing an empty space and standing on \ + a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" + cost = 1 + custom_only = FALSE + banned_species = list(SPECIES_TAJ, SPECIES_VASILISSAN) // They got unique climbing delay. + var_changes = list("can_climb" = TRUE) + excludes = list(/datum/trait/positive/wall_climber_pro, /datum/trait/positive/wall_climber_natural) + +/datum/trait/positive/wall_climber_natural + name = "Climber, Natural" + desc = "You can climb certain walls without tools! This is likely due to the unique anatomy of your species. CUSTOM AND XENOCHIM ONLY" tutorial = "You must approach a wall and right click it and select the \ 'climb wall' verb to climb it. You suffer from a movement delay of 1.5 with this trait.\n \ Your total climb time is expected to be 17.5 seconds. Tools may reduce this. \n\n \ @@ -231,31 +245,26 @@ 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) - excludes = list(/datum/trait/positive/wall_climber_pro,/datum/trait/positive/wall_climber_master) + 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) /datum/trait/positive/wall_climber_pro - name = "Climber, Master" - desc = "You can climb certain walls without tools! You are a professional rock climber at this, letting you climb as fast as a tajara!" + name = "Climber, Professional" + desc = "You can climb certain walls without tools! You are a professional rock climber at this, letting you climb almost twice as fast!" tutorial = "You must approach a wall and right click it and select the \ 'climb wall' verb to climb it. Your movement delay is just 1.25 with this trait.\n \ Your climb time is expected to be 9 seconds. Tools may reduce this. \n\n \ This likewise allows descending walls, provided you're facing an empty space and standing on \ a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" - cost = 1 - custom_only = FALSE - var_changes = list("can_climb" = TRUE, "climbing_delay" = 1.25) - excludes = list(/datum/trait/positive/wall_climber,/datum/trait/positive/wall_climber_master) - -/datum/trait/positive/wall_climber_master - name = "Climber, Master" - desc = "You can climb certain walls without tools! You are a true master at this, letting you climb as a vassilian!" - tutorial = "You must approach a wall and right click it and select the \ - 'climb wall' verb to climb it. Your movement delay is just 1.0 with this trait. \n \ - Your climb time is expected to be 5 seconds. \n\n \ - This likewise allows descending walls, provided you're facing an empty space and standing on \ - a climbable wall. To climbe like so, use the verb 'Climb Down Wall' in IC tab!" cost = 2 custom_only = FALSE - var_changes = list("can_climb" = TRUE, "climbing_delay" = 1.0) - excludes = list(/datum/trait/positive/wall_climber_pro,/datum/trait/positive/wall_climber) + var_changes = list("climbing_delay" = 1.25) + varchange_type = TRAIT_VARCHANGE_LESS_BETTER + excludes = list(/datum/trait/positive/wall_climber,/datum/trait/positive/wall_climber_natural) + +// This feels jank, but it's the cleanest way I could do TRAIT_VARCHANGE_LESS_BETTER while having a boolean var change +// Alternate would've been banned_species = list(SPECIES_TAJ, SPECIES_VASSILISIAN) +// Opted for this as it's "future proof" +/datum/trait/positive/wall_climber_pro/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + S.can_climb = TRUE diff --git a/code/modules/multiz/movement_vr.dm b/code/modules/multiz/movement_vr.dm index 8739dca5db8..7e4248e052a 100644 --- a/code/modules/multiz/movement_vr.dm +++ b/code/modules/multiz/movement_vr.dm @@ -94,9 +94,13 @@ var/climbing_delay_min = L.climbing_delay var/fall_chance = 0 var/drop_our_held = FALSE + var/nutrition_cost = 50 //Climbing up is harder! //Checking if there's any point trying to climb var/turf/above_wall = GetAbove(src) + if(L.nutrition <= nutrition_cost) + to_chat(L, SPAN_WARNING("You [L.isSynthetic() ? "lack the energy" : "are too hungry"] for such strenous activities!")) + return if(!above_wall) //No multiZ to_chat(L, SPAN_NOTICE("There's nothing interesting over this cliff!")) return @@ -173,10 +177,19 @@ climb_time += 10 SECONDS if(climbing_delay_min > 1.0) climb_time += 2.5 SECONDS + switch(L.nutrition) //Values are 50 lower than the warning icon appearing + if(100 to 200) + to_chat(L, SPAN_NOTICE("Climbing while [L.isSynthetic() ? "low on power" : "hungry"] slows you down")) + climb_time += 1 SECONDS + if(nutrition_cost to 100) + to_chat(L, SPAN_DANGER("You [L.isSynthetic() ? "lack enough power" : "are too hungry"] to climb safely!")) + climb_time +=3 SECONDS + if(fall_chance < 30) + fall_chance = 30 L.custom_emote(VISIBLE_MESSAGE, "begins to climb up on \The [src]") var/oops_time = world.time var/grace_time = 4 SECONDS - to_chat(L, SPAN_WARNING("If you get interrupted after [grace_time] seconds of climbing, you will fall and hurt yourself, beware!")) + 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!")) @@ -185,6 +198,7 @@ if(drop_our_held) L.drop_item(get_turf(L)) L.forceMove(above_wall) + L.adjust_nutrition(-nutrition_cost) to_chat(L, SPAN_NOTICE("You clambered up successfully!")) else if(world.time > (oops_time + grace_time)) @@ -198,9 +212,13 @@ var/fall_chance = 0 //Increased if we can't actually climb var/turf/our_turf = get_turf(src) //floor we're standing on var/climbing_delay_min = src.climbing_delay //We take the lowest climbing delay between mob, species and gear. + var/nutrition_cost = 25 //Descending is easier! //Check if we can even try to climb + if(nutrition <= nutrition_cost) + to_chat(src, SPAN_WARNING("You [isSynthetic() ? "lack the energy" : "are too hungry"] for such strenous activities!")) + return var/turf/below_wall = GetBelow(our_turf) if(!below_wall) //No multiZ to_chat(src, SPAN_NOTICE("There's nothing interesting below us!")) @@ -271,6 +289,16 @@ climb_time += 10 SECONDS if(climbing_delay_min > 1.0) climb_time += 2.5 SECONDS + switch(nutrition) //Values are 50 lower than the warning icon appearing + if(100 to 200) + to_chat(src, SPAN_NOTICE("Climbing while [isSynthetic() ? "low on power" : "hungry"] slows you down")) + climb_time += 1 SECONDS + if(nutrition_cost to 100) + to_chat(src, SPAN_DANGER("You [isSynthetic() ? "lack enough power" : "are too hungry"] to climb safely!")) + climb_time +=3 SECONDS + if(fall_chance < 30) + fall_chance = 30 + if(!climbing_surface.climbable) 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 ) @@ -278,13 +306,14 @@ src.custom_emote(VISIBLE_MESSAGE, "begins to climb down along \The [below_wall]") var/oops_time = world.time var/grace_time = 3 SECONDS - to_chat(src, SPAN_WARNING("If you get interrupted after [grace_time] seconds of climbing, you will fall and hurt yourself, beware!")) + 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) else src.forceMove(destination) - to_chat(src, SPAN_NOTICE("You descended successfully!")) + to_chat(src, SPAN_NOTICE("You descended successfully!")) + adjust_nutrition(-nutrition_cost) else if(world.time > (oops_time + grace_time)) src.forceMove(front_of_us)