From de394bd79ccea37adbbaed7b9c5a3f5d7b86e18f Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 20:27:01 +0900 Subject: [PATCH 1/8] del: dies_at_threshold --- code/modules/mob/living/carbon/human/species/_species.dm | 1 - code/modules/mob/living/carbon/human/species/abductor.dm | 1 - code/modules/mob/living/carbon/human/species/golem.dm | 1 - code/modules/mob/living/carbon/human/species/machine.dm | 1 - code/modules/mob/living/carbon/human/species/nucleation.dm | 1 - code/modules/mob/living/carbon/human/species/shadow.dm | 1 - code/modules/mob/living/carbon/human/species/skeleton.dm | 1 - code/modules/mob/living/carbon/human/species/vox.dm | 1 - code/modules/mob/living/carbon/human/species/wryn.dm | 2 -- code/modules/mob/living/carbon/human/update_stat.dm | 2 +- 10 files changed, 1 insertion(+), 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 74496f6bea2..3958ace7f14 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -103,7 +103,6 @@ var/is_small var/show_ssd = 1 var/forced_heartattack = FALSE //Some species have blood, but we still want them to have heart attacks - var/dies_at_threshold = FALSE // Do they die or get knocked out at specific thresholds, or do they go through complex crit? var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them var/has_gender = TRUE var/blacklisted = FALSE diff --git a/code/modules/mob/living/carbon/human/species/abductor.dm b/code/modules/mob/living/carbon/human/species/abductor.dm index 1a82450d3ef..14ac03e1028 100644 --- a/code/modules/mob/living/carbon/human/species/abductor.dm +++ b/code/modules/mob/living/carbon/human/species/abductor.dm @@ -17,7 +17,6 @@ species_traits = list(NO_BLOOD, NO_BREATHE, VIRUSIMMUNE, NOGUNS, NO_HUNGER, NO_EXAMINE) - dies_at_threshold = TRUE taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index ac1e702e08f..fc23fa4daaa 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -6,7 +6,6 @@ deform = 'icons/mob/human_races/r_golem.dmi' species_traits = list(NO_BREATHE, NO_BLOOD, NO_PAIN, RADIMMUNE, NOGUNS, PIERCEIMMUNE) - dies_at_threshold = TRUE speed_mod = 2 brute_mod = 0.45 //55% damage reduction burn_mod = 0.45 diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index eddaa719ffb..158c011f86b 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -31,7 +31,6 @@ //Default styles for created mobs. default_hair = "Blue IPC Screen" - dies_at_threshold = TRUE can_revive_by_healing = 1 has_gender = FALSE reagent_tag = PROCESS_SYN diff --git a/code/modules/mob/living/carbon/human/species/nucleation.dm b/code/modules/mob/living/carbon/human/species/nucleation.dm index f756cdb19aa..7ba3c786dee 100644 --- a/code/modules/mob/living/carbon/human/species/nucleation.dm +++ b/code/modules/mob/living/carbon/human/species/nucleation.dm @@ -14,7 +14,6 @@ burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores brute_mod = 2 // damn, double wham, double dam species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_BLOOD, NO_PAIN, NO_SCAN, RADIMMUNE, VIRUSIMMUNE, NO_GERMS) - dies_at_threshold = TRUE //Default styles for created mobs. default_hair = "Nucleation Crystals" diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 75c758e7bdc..0561409dad3 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -17,7 +17,6 @@ ) species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE) - dies_at_threshold = TRUE reagent_tag = PROCESS_ORG suicide_messages = list( diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 0cd31bd36d0..f2b86af7aac 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -11,7 +11,6 @@ flesh_color = "#E6E6C6" species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE, NO_HUNGER, PIERCEIMMUNE, NO_DNA, RUNIC_MIND) - dies_at_threshold = TRUE skinned_type = /obj/item/stack/sheet/bone taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE //skeletons can't taste anything diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index af63d413acc..cb6dfc824d6 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -199,7 +199,6 @@ species_traits = list(NO_SCAN, NO_GERMS, NO_DECAY, NO_BLOOD, NO_PAIN) clothing_flags = 0 //IDK if you've ever seen underwear on an Armalis, but it ain't pretty. bodyflags = HAS_TAIL - dies_at_threshold = TRUE blood_color = "#2299FC" flesh_color = "#808D11" diff --git a/code/modules/mob/living/carbon/human/species/wryn.dm b/code/modules/mob/living/carbon/human/species/wryn.dm index 5fd628a152e..6824d47407e 100644 --- a/code/modules/mob/living/carbon/human/species/wryn.dm +++ b/code/modules/mob/living/carbon/human/species/wryn.dm @@ -54,8 +54,6 @@ clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR - dies_at_threshold = TRUE - reagent_tag = PROCESS_ORG base_color = "#704300" flesh_color = "#704300" diff --git a/code/modules/mob/living/carbon/human/update_stat.dm b/code/modules/mob/living/carbon/human/update_stat.dm index 8d53ca00da0..bf4fcdf71d5 100644 --- a/code/modules/mob/living/carbon/human/update_stat.dm +++ b/code/modules/mob/living/carbon/human/update_stat.dm @@ -23,4 +23,4 @@ . = dna.species.can_hear(src) /mob/living/carbon/human/check_death_method() - return dna.species.dies_at_threshold + return FALSE From d61e938e3763822be3930a0156139656d3e95f3b Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:24:17 +0900 Subject: [PATCH 2/8] feat: Crawling --- code/controllers/configuration.dm | 9 ++++++--- code/modules/mob/living/carbon/human/life.dm | 2 ++ code/modules/mob/living/life.dm | 2 ++ code/modules/mob/living/living.dm | 2 ++ code/modules/mob/living/update_status.dm | 6 +++--- code/modules/mob/mob_helpers.dm | 1 - config/example/game_options.txt | 1 + 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 0c752eeb088..b9fabeab4d7 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -140,6 +140,7 @@ //Unversal modifiers var/run_speed = 0 var/walk_speed = 0 + var/crawl_speed = 0 //Mob specific modifiers. NOTE: These will affect different mob types in different ways var/human_delay = 0 @@ -320,7 +321,7 @@ var/modify_pull_push_speed = FALSE var/pixel_shift = FALSE - + var/ignore_obscured_mouth = FALSE var/ai_heat = FALSE @@ -912,13 +913,13 @@ if("override_map") config.override_map = value - + if("modify_pull_push_speed") config.modify_pull_push_speed = TRUE if("pixel_shift") config.pixel_shift = TRUE - + if("ignore_obscured_mouth") config.ignore_obscured_mouth = TRUE @@ -953,6 +954,8 @@ config.run_speed = value if("walk_speed") config.walk_speed = value + if("crawl_speed") + config.crawl_speed = value if("human_delay") config.human_delay = value if("robot_delay") diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b21d8642197..95c36c79a4b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -822,6 +822,8 @@ return if(health <= HEALTH_THRESHOLD_CRIT) + if(!lying) + update_canmove() if(prob(5)) emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver")) AdjustStuttering(5, bound_lower = 0, bound_upper = 5) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 14146c599be..029899a2df2 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -69,6 +69,8 @@ if(stat != DEAD) handle_critical_condition() + if(lying && !resting) + update_canmove() if(stat != DEAD) // Status & health update, are we dead or alive etc. handle_disabilities() // eye, ear, brain damages diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1500b54e291..7788a29c726 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1073,6 +1073,8 @@ . += 10 if(forced_look) . += 3 + if(lying) + . += config.crawl_speed if(ignorewalk) . += config.run_speed else diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index 763c9e4962e..7769c227779 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -86,7 +86,7 @@ /mob/living/update_canmove(delay_action_updates = 0) var/fall_over = !can_stand() var/buckle_lying = !(buckled && !buckled.buckle_lying) - if(fall_over || resting || stunned) + if(fall_over || resting || stunned || health <= HEALTH_THRESHOLD_CRIT) drop_r_hand() drop_l_hand() else @@ -94,10 +94,10 @@ canmove = 1 if(buckled) lying = 90 * buckle_lying - else if((fall_over || resting) && !lying) + else if((fall_over || resting || health <= HEALTH_THRESHOLD_CRIT) && !lying) fall(fall_over) - canmove = !(fall_over || resting || stunned || IsFrozen() || buckled) + canmove = !(fall_over || stunned || IsFrozen() || buckled) density = !lying if(lying) if(layer == initial(layer)) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 53091f7f872..ade255aa1cf 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -424,7 +424,6 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM set category = "IC" if(!resting) - client.move_delay = world.time + 20 to_chat(src, "Вы отдыхаете.") StartResting() else if(resting) diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 62ed700d1ac..2fe860189d4 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -24,6 +24,7 @@ REVIVAL_BRAIN_LIFE -1 ## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. RUN_SPEED 1 WALK_SPEED 4 +CRAWL_SPEED 4 ## The variables below affect the movement of specific mob types. HUMAN_DELAY 1.5 From 9b8d7fc659435b82622950846fd9cde26cd51e1d Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:56:06 +0900 Subject: [PATCH 3/8] feat: Crawling == can't interact --- code/_onclick/click.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index cc5c95fbc5b..7c8cfb9e553 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -104,6 +104,10 @@ if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1)) return + if(lying) + to_chat(src, span_warning("Вы не можете взаимодействовать с миром в лежачей позиции!")) + return + face_atom(A) if(next_move > world.time) // in the year 2000... From 3f10bf5f5e8c940ad2c3406e6f27a7e8b35bf4de Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 22:13:43 +0900 Subject: [PATCH 4/8] feat: Can only whisper in Crit --- code/modules/mob/living/carbon/human/say.dm | 5 ++++- code/modules/mob/living/say.dm | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 6a258c3319c..cfc219cd264 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -207,6 +207,9 @@ return list("verb" = verb) /mob/living/carbon/human/handle_message_mode(var/message_mode, list/message_pieces, var/verb, var/used_radios) + if(health <= HEALTH_THRESHOLD_CRIT) + whisper_say(message_pieces) + return TRUE switch(message_mode) if("intercom") for(var/obj/item/radio/intercom/I in view(1, src)) @@ -250,7 +253,7 @@ if("whisper") whisper_say(message_pieces) - return 1 + return TRUE else if(message_mode) if(isradio(l_ear)) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 9f1464ce874..c2836a6a069 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -169,10 +169,13 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) return list("verb" = verb) /mob/living/proc/handle_message_mode(message_mode, list/message_pieces, verb, used_radios) + if(health <= HEALTH_THRESHOLD_CRIT) + whisper_say(message_pieces) + return TRUE switch(message_mode) if("whisper") //all mobs can whisper by default whisper_say(message_pieces) - return 1 + return TRUE return 0 /mob/living/proc/handle_speech_sound() From fd0fc5b8ce20a5230bfe9a744078143cd86156b6 Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:20:15 +0900 Subject: [PATCH 5/8] feat: Crawlers can't bump --- code/modules/mob/living/living.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7788a29c726..b12727e7161 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -81,10 +81,12 @@ //Generic Bump(). Override MobBump() and ObjBump() instead of this. /mob/living/Bump(atom/A, yes) - if(..()) //we are thrown onto something + if(throwing) //we are thrown onto something + ..() return - if(buckled || !yes || now_pushing) + if(buckled || !yes || now_pushing || lying) return + ..() if(ismob(A)) if(MobBump(A)) return @@ -1075,6 +1077,8 @@ . += 3 if(lying) . += config.crawl_speed + . += config.walk_speed + return if(ignorewalk) . += config.run_speed else From beb864d1b8ea962b503950904e50a7ad363835aa Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:32:04 +0900 Subject: [PATCH 6/8] fix: move move_delay to stop resting instead of start --- code/modules/mob/mob_helpers.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ade255aa1cf..e32f9c55b1b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -424,11 +424,13 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM set category = "IC" if(!resting) - to_chat(src, "Вы отдыхаете.") + to_chat(src, span_notice("Вы отдыхаете.")) StartResting() else if(resting) - to_chat(src, "Вы встаёте.") - StopResting() + client.move_delay = world.time + 1 SECONDS + to_chat(src, span_notice("Вы встаёте.")) + if(do_mob(src, src, 1 SECONDS, TRUE, TRUE)) + StopResting() /proc/get_multitool(mob/user as mob) // Get tool From 135e82d29a5d2e1d1c0951e253073a6c1b8b3d24 Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:41:42 +0900 Subject: [PATCH 7/8] feat: Crawling sound --- code/datums/components/footstep.dm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm index 23c14adc9c4..d6529900249 100644 --- a/code/datums/components/footstep.dm +++ b/code/datums/components/footstep.dm @@ -53,15 +53,9 @@ return var/mob/living/LM = parent - if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics)) + if(!T.footstep || !LM.canmove || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics)) return - if(ishuman(LM)) - var/mob/living/carbon/human/H = LM - if(!H.get_organ(BODY_ZONE_L_LEG) && !H.get_organ(BODY_ZONE_R_LEG)) - return - if(H.m_intent == MOVE_INTENT_WALK) - return// stealth steps++ if(steps >= 6) @@ -72,6 +66,18 @@ if(steps != 0 && !has_gravity(LM, T)) // don't need to step as often when you hop around return + + if(LM.lying) + playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1, vary = sound_vary) + return + + if(ishuman(LM)) + var/mob/living/carbon/human/H = LM + if(!H.get_organ(BODY_ZONE_L_LEG) && !H.get_organ(BODY_ZONE_R_LEG)) + return + if(H.m_intent == MOVE_INTENT_WALK) + return// stealth + return T /datum/component/footstep/proc/play_simplestep() From 961b518c54d770bcd2e377b7ab6a83ac8a6c35b2 Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Thu, 13 Jul 2023 01:05:09 +0900 Subject: [PATCH 8/8] fix: Martial art master can do anything while prone --- code/_onclick/click.dm | 4 ---- code/_onclick/other_mobs.dm | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 7c8cfb9e553..cc5c95fbc5b 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -104,10 +104,6 @@ if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1)) return - if(lying) - to_chat(src, span_warning("Вы не можете взаимодействовать с миром в лежачей позиции!")) - return - face_atom(A) if(next_move > world.time) // in the year 2000... diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index efb68df1269..79b8e9a79e8 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -5,6 +5,9 @@ Otherwise pretty standard. */ /mob/living/carbon/human/UnarmedAttack(atom/A, proximity) + if(lying && (!ishuman(A) || (ishuman(A) && !mind?.martial_art))) + to_chat(src, span_warning("Вы не можете взаимодействовать в лежачей позиции!")) + return FALSE // Special glove functions: // If the gloves do anything, have them return 1 to stop // normal attack_hand() here.