diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index fa69a9e5b9b7..028e4ae5c15f 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -92,7 +92,7 @@ //slowdown when in softcrit. Note that crawling slowdown will also apply at the same time! #define SOFTCRIT_ADD_SLOWDOWN 3 //slowdown when crawling -#define CRAWLING_ADD_SLOWDOWN 6 +#define CRAWLING_ADD_SLOWDOWN 8 //Attack types for checking shields/hit reactions #define MELEE_ATTACK 1 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 4d5cfc8b8702..2eca8ae3af2b 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -418,8 +418,6 @@ #define AGE_MINOR 20 //legal age of space drinking and smoking #define WIZARD_AGE_MIN 30 //youngest a wizard can be #define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be -#define SHOES_SLOWDOWN 0 //How much shoes slow you down by default. Negative values speed you up -#define SHOES_SPEED_SLIGHT SHOES_SLOWDOWN - 1 // slightest speed boost to movement #define POCKET_STRIP_DELAY (4 SECONDS) //time taken to search somebody's pockets #define DOOR_CRUSH_DAMAGE 15 //the amount of damage that airlocks deal when they crush you diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index 3a4d9a681c5a..bb715d73a349 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -95,6 +95,14 @@ status_type = STATUS_EFFECT_UNIQUE alert_type = /atom/movable/screen/alert/status_effect/holdup +/datum/status_effect/holdup/on_apply() + . = ..() + owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/holdup) + +/datum/status_effect/holdup/on_remove() + . = ..() + owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/holdup) + /atom/movable/screen/alert/status_effect/holdup name = "Holding Up" desc = "You're currently pointing a gun at someone." diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index acc25f163a50..10aecf9e2b91 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(dye_registry, list( /obj/item/clothing/shoes/sneakers/machine_wash(obj/machinery/washing_machine/washer) if(chained) chained = FALSE - slowdown = SHOES_SLOWDOWN + slowdown = initial(slowdown) new /obj/item/restraints/handcuffs(loc) ..() diff --git a/code/modules/antagonists/clown_ops/clown_weapons.dm b/code/modules/antagonists/clown_ops/clown_weapons.dm index 10847ac67d96..861145d81611 100644 --- a/code/modules/antagonists/clown_ops/clown_weapons.dm +++ b/code/modules/antagonists/clown_ops/clown_weapons.dm @@ -16,7 +16,7 @@ name = "combat clown shoes" desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeak at 100% capacity." clothing_traits = list(TRAIT_NO_SLIP_WATER) - slowdown = SHOES_SLOWDOWN + slowdown = /obj/item/clothing/shoes::slowdown armor = list(BLUNT = 25, PUNCTURE = 25, SLASH = 0, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, FIRE = 70, ACID = 50) strip_delay = 70 resistance_flags = NONE @@ -34,7 +34,7 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat name = "mk-honk combat shoes" desc = "The culmination of years of clown combat research, these shoes leave a trail of chaos in their wake. They will slowly recharge themselves over time, or can be manually charged with bananium." - slowdown = SHOES_SLOWDOWN + slowdown = /obj/item/clothing/shoes::slowdown armor = list(BLUNT = 25, PUNCTURE = 25, SLASH = 0, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, FIRE = 70, ACID = 50) strip_delay = 70 resistance_flags = NONE diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index adf45bf70a55..c17b540fe026 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -12,7 +12,7 @@ supports_variations_flags = CLOTHING_VOX_VARIATION | CLOTHING_DIGITIGRADE_VARIATION permeability_coefficient = 0.5 - slowdown = SHOES_SLOWDOWN + slowdown = 0 equip_delay_self = EQUIP_DELAY_SHOES equip_delay_other = EQUIP_DELAY_SHOES * 1.5 diff --git a/code/modules/clothing/shoes/clown.dm b/code/modules/clothing/shoes/clown.dm index 52fe4d163d9d..1f1dbb26035f 100644 --- a/code/modules/clothing/shoes/clown.dm +++ b/code/modules/clothing/shoes/clown.dm @@ -3,7 +3,7 @@ name = "clown shoes" icon_state = "clown" inhand_icon_state = "clown_shoes" - slowdown = SHOES_SLOWDOWN+1 + slowdown = parent_type::slowdown + 1 // Slower than normal var/enabled_waddle = TRUE lace_time = 20 SECONDS // how the hell do these laces even work?? supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION diff --git a/code/modules/clothing/shoes/galoshes.dm b/code/modules/clothing/shoes/galoshes.dm index 80ddbdf05267..c96d554f2085 100644 --- a/code/modules/clothing/shoes/galoshes.dm +++ b/code/modules/clothing/shoes/galoshes.dm @@ -7,7 +7,7 @@ siemens_coefficient = 0 clothing_traits = list(TRAIT_NO_SLIP_WATER) - slowdown = SHOES_SLOWDOWN+1 + slowdown = parent_type::slowdown + 1 // Slower than normal strip_delay = 30 equip_delay_other = 50 resistance_flags = NONE diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 26dce6c97b5c..72ac94b2624b 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -11,7 +11,6 @@ resistance_flags = FIRE_PROOF supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION - slowdown = SHOES_SLOWDOWN /// Whether the magpulse system is active var/magpulse = FALSE /// Slowdown applied wwhen magpulse is active. This is added onto existing slowdown @@ -66,7 +65,7 @@ name = "advanced magboots" icon_state = "advmag0" base_icon_state = "advmag" - slowdown_active = SHOES_SLOWDOWN // ZERO active slowdown + slowdown_active = parent_type::slowdown // ZERO active slowdown resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/shoes/magboots/syndie diff --git a/code/modules/clothing/shoes/sneakers.dm b/code/modules/clothing/shoes/sneakers.dm index cecd1417513a..1d68cefd2624 100644 --- a/code/modules/clothing/shoes/sneakers.dm +++ b/code/modules/clothing/shoes/sneakers.dm @@ -72,7 +72,7 @@ /obj/item/clothing/shoes/sneakers/orange/attack_self(mob/user) if (chained) chained = FALSE - slowdown = SHOES_SLOWDOWN + slowdown = initial(slowdown) new /obj/item/restraints/handcuffs( user.loc ) icon_state = initial(icon_state) return diff --git a/code/modules/clothing/shoes/wheelys.dm b/code/modules/clothing/shoes/wheelys.dm index cf641fcb6ef2..eb6578a3992c 100644 --- a/code/modules/clothing/shoes/wheelys.dm +++ b/code/modules/clothing/shoes/wheelys.dm @@ -63,7 +63,7 @@ greyscale_colors = null greyscale_config = null worn_icon_state = "rollerskates" - slowdown = SHOES_SLOWDOWN+1 + slowdown = parent_type::slowdown + 1 // Slower than normal wheels = /obj/vehicle/ridden/scooter/skateboard/wheelys/rollerskates custom_premium_price = PAYCHECK_EASY * 5 custom_price = PAYCHECK_EASY * 5 @@ -75,7 +75,7 @@ greyscale_colors = null greyscale_config = null worn_icon_state = "skishoes" - slowdown = SHOES_SLOWDOWN+1 + slowdown = parent_type::slowdown + 1 // Slower than normal wheels = /obj/vehicle/ridden/scooter/skateboard/wheelys/skishoes custom_premium_price = PAYCHECK_EASY * 1.6 custom_price = PAYCHECK_EASY * 1.6 diff --git a/code/modules/mob/living/carbon/pain.dm b/code/modules/mob/living/carbon/pain.dm index 88a961cf2133..1b49b5e86bd9 100644 --- a/code/modules/mob/living/carbon/pain.dm +++ b/code/modules/mob/living/carbon/pain.dm @@ -189,13 +189,13 @@ to_chat(src, result.create_tooltip("Pain is temporary, I will not die on this day! (Shock reduced)")) shock_stage = max(shock_stage - 15, 0) - stats.set_cooldown("shrug_off_pain", 60 SECONDS) + stats.set_cooldown("shrug_off_pain", 180 SECONDS) return if(SUCCESS) shock_stage = max(shock_stage - 5, 0) to_chat(src, result.create_tooltip("Not here, not now. (Pain shrugged off)")) - stats.set_cooldown("shrug_off_pain", 30 SECONDS) + stats.set_cooldown("shrug_off_pain", 180 SECONDS) return if(FAILURE) @@ -205,7 +205,7 @@ if(CRIT_FAILURE) shock_stage = min(shock_stage + 1, SHOCK_MAXIMUM) to_chat(src, result.create_tooltip("I'm going to die here. (Shock increased)")) - stats.set_cooldown("shrug_off_pain", 30 SECONDS) + stats.set_cooldown("shrug_off_pain", 60 SECONDS) // Do not return shock_stage = min(shock_stage + 1, SHOCK_MAXIMUM) diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index fd6b2ea1246b..636ac014af23 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -4,15 +4,21 @@ * Set drowsyness of a mob to passed value */ /mob/proc/set_drowsyness(amount) + . = drowsyness drowsyness = max(amount, 0) + if(!!. != !!drowsyness) + if(drowsyness) + add_movespeed_modifier(/datum/movespeed_modifier/status_effect/drowsy) + else + remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/drowsy) /** * Adds passed value to the drowsyness of a mob */ /mob/proc/adjust_drowsyness(amount, up_to = INFINITY) if(amount + drowsyness > up_to) amount = max(up_to - drowsyness, 0) - drowsyness = max(drowsyness + amount, 0) + set_drowsyness(max(drowsyness + amount, 0)) ///Blind a mobs eyes by amount /mob/proc/blind_eyes(amount) diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm index ea94389740f5..595f7749de63 100644 --- a/code/modules/movespeed/modifiers/mobs.dm +++ b/code/modules/movespeed/modifiers/mobs.dm @@ -25,9 +25,11 @@ /datum/movespeed_modifier/shock slowdown = 3 + blacklisted_movetypes = FLOATING /datum/movespeed_modifier/asystole slowdown = 10 + blacklisted_movetypes = FLOATING /datum/movespeed_modifier/equipment_speedmod variable = TRUE @@ -116,6 +118,7 @@ /datum/movespeed_modifier/living_exhaustion slowdown = STAMINA_EXHAUSTION_MOVESPEED_SLOWDOWN flags = IGNORE_NOSLOW + /datum/movespeed_modifier/carbon_crawling slowdown = CRAWLING_ADD_SLOWDOWN flags = IGNORE_NOSLOW diff --git a/code/modules/movespeed/modifiers/status_effects.dm b/code/modules/movespeed/modifiers/status_effects.dm index 0e3236442898..110d58c661c2 100644 --- a/code/modules/movespeed/modifiers/status_effects.dm +++ b/code/modules/movespeed/modifiers/status_effects.dm @@ -24,3 +24,10 @@ /datum/movespeed_modifier/status_effect/disorient slowdown = 1 + +// technically not a status effect but like, close enough +/datum/movespeed_modifier/status_effect/drowsy + slowdown = 4 + +/datum/movespeed_modifier/status_effect/holdup + slowdown = 5 diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index a4418a35d596..1dc406ea0798 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -56,7 +56,8 @@ C.silent = FALSE C.remove_status_effect(/datum/status_effect/dizziness) C.disgust = 0 - C.drowsyness = 0 + C.set_drowsyness(0) + // Remove all speech related status effects for(var/effect in typesof(/datum/status_effect/speech)) C.remove_status_effect(effect) diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 46d72be2c578..7056bb54d0e9 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -87,6 +87,8 @@ minimum_break_damage = 30 + /// Used for inventory procs + var/hand_side var/fingerprints = "" /obj/item/bodypart/arm/update_limb(dropping_limb, is_creating) @@ -94,6 +96,42 @@ if(is_creating && owner?.has_dna()) fingerprints = md5(owner.dna.unique_identity) +/obj/item/bodypart/arm/on_life(delta_time, times_fired, stam_heal) + . = ..() + // Splinted, exit + if(splint) + return + + // Not broken or dislocated, exit + if(!(bodypart_flags & (BP_BROKEN_BONES|BP_DISLOCATED))) + return + + var/obj/target_item + if(hand_side == LEFT_HANDS) + target_item = owner.get_item_for_held_index(1) + else + target_item = owner.get_item_for_held_index(2) + + if(isnull(target_item) || !owner.canUnequipItem(target_item)) + return + + var/zone_name = parse_zone(aux_zone) + + if(IS_ORGANIC_LIMB(src)) + if(bodypart_flags & BP_NO_PAIN) + owner.visible_message(span_alert("[owner] drops what [owner.p_they()] [p_are()] holding in [owner.p_their()] [zone_name].")) + owner.dropItemToGround(target_item) + return + + owner.apply_pain(30, src, "A sharp pain in your [plaintext_zone] forces you to drop your [target_item]!", TRUE, FALSE) + owner.dropItemToGround(target_item) + return . | BODYPART_LIFE_UPDATE_HEALTH_HUD + + else + owner.visible_message(span_alert("[owner]'s [zone_name] malfunctions, dropping what [owner.p_they()] [p_are()] holding..")) + owner.dropItemToGround(target_item) + return + /obj/item/bodypart/arm/left name = "left arm" desc = "Did you know that the word 'sinister' stems originally from the \ @@ -115,6 +153,8 @@ amputation_point = "left shoulder" joint_name = "left elbow" + hand_side = LEFT_HANDS + /obj/item/bodypart/arm/left/set_owner(new_owner) . = ..() @@ -199,6 +239,8 @@ amputation_point = "right shoulder" joint_name = "right elbow" + hand_side = RIGHT_HANDS + /obj/item/bodypart/arm/right/set_owner(new_owner) . = ..() if(. == FALSE) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index d5bfec45b211..3825f40eb2d1 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -47,6 +47,7 @@ return owner.med_hud_set_health() + update_movespeed() /obj/item/organ/heart/Remove(mob/living/carbon/heartless, special = 0) ..() @@ -59,11 +60,22 @@ pulse = PULSE_NORM update_appearance(UPDATE_ICON_STATE) owner?.med_hud_set_health() + update_movespeed() /obj/item/organ/heart/proc/Stop() pulse = PULSE_NONE update_appearance(UPDATE_ICON_STATE) owner?.med_hud_set_health() + update_movespeed() + +/obj/item/organ/heart/proc/update_movespeed() + if(isnull(owner)) + return + + if(is_working() || !owner.needs_organ(ORGAN_SLOT_HEART)) + owner.remove_movespeed_modifier(/datum/movespeed_modifier/asystole) + else + owner.add_movespeed_modifier(/datum/movespeed_modifier/asystole) /obj/item/organ/heart/proc/stop_if_unowned() if(!owner) diff --git a/config/game_options.txt b/config/game_options.txt index 78bb0d1d4733..c4db35696e05 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -30,9 +30,9 @@ COMMENDATION_PERCENT_POLL 0.05 ## To speed things up make the number negative, to slow things down, make the number positive. ## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. -RUN_DELAY 2.2 -WALK_DELAY 4 -SPRINT_DELAY 1.4 +RUN_DELAY 4 +WALK_DELAY 6 +SPRINT_DELAY 2 ## The variables below affect the movement of specific mob types. THIS AFFECTS ALL SUBTYPES OF THE TYPE YOU CHOOSE! ## Entries completely override all subtypes. Later entries have precedence over earlier entries.