mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
@@ -154,9 +154,10 @@
|
||||
#define SHOVE_KNOCKDOWN_HUMAN 30
|
||||
#define SHOVE_KNOCKDOWN_TABLE 30
|
||||
#define SHOVE_KNOCKDOWN_COLLATERAL 10
|
||||
//for the shove slowdown, see __DEFINES/movespeed_modification.dm
|
||||
#define SHOVE_SLOWDOWN_LENGTH 30
|
||||
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
|
||||
/// how long they're staggered for
|
||||
#define SHOVE_STAGGER_DURATION 35
|
||||
/// how long they're off balance for
|
||||
#define SHOVE_OFFBALANCE_DURATION 30
|
||||
//Shove disarming item list
|
||||
GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
|
||||
/obj/item/gun)))
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#define MOVESPEED_ID_TASED_STATUS "TASED"
|
||||
#define MOVESPEED_ID_ELECTROSTAFF "ELECTROSTAFF"
|
||||
|
||||
#define MOVESPEED_ID_SHOVE "SHOVE"
|
||||
#define MOVESPEED_ID_FAT "FAT"
|
||||
#define MOVESPEED_ID_COLD "COLD"
|
||||
#define MOVESPEED_ID_HUNGRY "HUNGRY"
|
||||
|
||||
@@ -111,6 +111,9 @@
|
||||
|
||||
#define STATUS_EFFECT_LIMP /datum/status_effect/limp //For when you have a busted leg (or two!) and want additional slowdown when walking on that leg
|
||||
|
||||
/// shoves inflict this to indicate the next shove while this is in effect should disarm guns
|
||||
#define STATUS_EFFECT_OFF_BALANCE /datum/status_effect/off_balance
|
||||
|
||||
/////////////
|
||||
// NEUTRAL //
|
||||
/////////////
|
||||
|
||||
@@ -97,6 +97,21 @@
|
||||
duration = set_duration
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance
|
||||
id = "offbalance"
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/off_balance/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance/on_remove()
|
||||
var/active_item = owner.get_active_held_item()
|
||||
if(is_type_in_typecache(active_item, GLOB.shove_disarming_types))
|
||||
owner.visible_message("<span class='warning'>[owner.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/asleep
|
||||
name = "Asleep"
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
|
||||
@@ -257,10 +257,8 @@
|
||||
|
||||
if(14 to 25) // 1.3ish% chance to stumble and be a bit off balance (like being disarmed)
|
||||
to_chat(our_guy, "<span class='danger'>You stumble a bit on your untied shoelaces!</span>")
|
||||
if(!our_guy.has_movespeed_modifier(/datum/movespeed_modifier/shove))
|
||||
our_guy.add_movespeed_modifier(/datum/movespeed_modifier/shove)
|
||||
addtimer(CALLBACK(our_guy, /mob/living/carbon/human/proc/clear_shove_slowdown), SHOVE_SLOWDOWN_LENGTH)
|
||||
|
||||
our_guy.ShoveOffBalance(SHOVE_OFFBALANCE_DURATION)
|
||||
our_guy.Stagger(SHOVE_OFFBALANCE_DURATION) //yes, same.
|
||||
if(26 to 1000)
|
||||
wiser = FALSE
|
||||
if(wiser)
|
||||
|
||||
@@ -1040,12 +1040,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/clear_shove_slowdown()
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/shove)
|
||||
var/active_item = get_active_held_item()
|
||||
if(is_type_in_typecache(active_item, GLOB.shove_disarming_types))
|
||||
visible_message("<span class='warning'>[src.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
/mob/living/carbon/human/updatehealth()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -1942,11 +1942,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
target.visible_message("<span class='danger'>[user.name] shoves [target.name]!</span>",
|
||||
"<span class='danger'>[user.name] shoves you!</span>", null, COMBAT_MESSAGE_RANGE, null,
|
||||
user, "<span class='danger'>You shove [target.name]!</span>")
|
||||
target.Stagger(SHOVE_STAGGER_DURATION)
|
||||
var/obj/item/target_held_item = target.get_active_held_item()
|
||||
if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types))
|
||||
target_held_item = null
|
||||
if(!target.has_movespeed_modifier(/datum/movespeed_modifier/shove))
|
||||
target.add_movespeed_modifier(/datum/movespeed_modifier/shove)
|
||||
if(!target.has_status_effect(STATUS_EFFECT_OFF_BALANCE))
|
||||
if(target_held_item)
|
||||
if(!HAS_TRAIT(target_held_item, TRAIT_NODROP))
|
||||
target.visible_message("<span class='danger'>[target.name]'s grip on \the [target_held_item] loosens!</span>",
|
||||
@@ -1954,12 +1954,12 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
append_message += ", loosening their grip on [target_held_item]"
|
||||
else
|
||||
append_message += ", but couldn't loose their grip on [target_held_item]"
|
||||
addtimer(CALLBACK(target, /mob/living/carbon/human/proc/clear_shove_slowdown), SHOVE_SLOWDOWN_LENGTH)
|
||||
else if(target_held_item)
|
||||
if(target.dropItemToGround(target_held_item))
|
||||
target.visible_message("<span class='danger'>[target.name] drops \the [target_held_item]!!</span>",
|
||||
"<span class='danger'>You drop \the [target_held_item]!!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
append_message += ", causing them to drop [target_held_item]"
|
||||
target.ShoveOffBalance(SHOVE_OFFBALANCE_DURATION)
|
||||
log_combat(user, target, "shoved", append_message)
|
||||
|
||||
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
|
||||
|
||||
@@ -500,6 +500,15 @@
|
||||
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
|
||||
return S
|
||||
|
||||
///////////////////////////////// OFF BALANCE/SHOVIES ////////////////////////
|
||||
/mob/living/proc/ShoveOffBalance(amount)
|
||||
var/datum/status_effect/off_balance/B = has_status_effect(STATUS_EFFECT_OFF_BALANCE)
|
||||
if(B)
|
||||
B.duration = max(world.time + amount, B.duration)
|
||||
else if(amount > 0)
|
||||
B = apply_status_effect(STATUS_EFFECT_OFF_BALANCE, amount)
|
||||
return B
|
||||
|
||||
///////////////////////////////// FROZEN /////////////////////////////////////
|
||||
|
||||
/mob/living/proc/IsFrozen()
|
||||
|
||||
@@ -78,9 +78,6 @@
|
||||
blacklisted_movetypes = FLOATING
|
||||
variable = TRUE
|
||||
|
||||
/datum/movespeed_modifier/shove
|
||||
multiplicative_slowdown = SHOVE_SLOWDOWN_STRENGTH
|
||||
|
||||
/datum/movespeed_modifier/human_carry
|
||||
variable = TRUE
|
||||
|
||||
|
||||
@@ -375,7 +375,6 @@
|
||||
log_combat(user, target, "shoved", "into [src] (disposal bin)")
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/disposal/bin/flush()
|
||||
..()
|
||||
full_pressure = FALSE
|
||||
|
||||
Reference in New Issue
Block a user