Merge pull request #10451 from kevinz000/mobility_flags
Mobility flags + combat rework stuff refactoring, fixes a few edge cases including the Oh Dreaded Xenomorph Hardstuns, etc etc time to break the game
This commit is contained in:
@@ -47,6 +47,10 @@
|
|||||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting" //just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
#define COMSIG_PARENT_QDELETING "parent_qdeleting" //just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
||||||
|
|
||||||
|
/// Trait signals
|
||||||
|
#define COMPONENT_ADD_TRAIT (1<<0)
|
||||||
|
#define COMPONENT_REMOVE_TRAIT (1<<1)
|
||||||
|
|
||||||
// /atom signals
|
// /atom signals
|
||||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||||
@@ -208,6 +212,16 @@
|
|||||||
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" //sent when a mob/login() finishes: (client)
|
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" //sent when a mob/login() finishes: (client)
|
||||||
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
||||||
|
|
||||||
|
//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS!
|
||||||
|
#define COMSIG_LIVING_STATUS_STUN "living_stun" //from base of mob/living/Stun() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" //from base of mob/living/Knockdown() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze" //from base of mob/living/Paralyze() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" //from base of mob/living/Immobilize() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" //from base of mob/living/Unconscious() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" //from base of mob/living/Sleeping() (amount, update, ignore)
|
||||||
|
#define COMSIG_LIVING_STATUS_DAZE "living_daze" //from base of mob/living/Daze() (amount, update, ignore)
|
||||||
|
#define COMPONENT_NO_STUN 1 //For all of them
|
||||||
|
|
||||||
// /mob/living/carbon signals
|
// /mob/living/carbon signals
|
||||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||||
|
|
||||||
|
|||||||
@@ -92,3 +92,30 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
|||||||
// radiation
|
// radiation
|
||||||
#define RAD_PROTECT_CONTENTS (1<<0)
|
#define RAD_PROTECT_CONTENTS (1<<0)
|
||||||
#define RAD_NO_CONTAMINATE (1<<1)
|
#define RAD_NO_CONTAMINATE (1<<1)
|
||||||
|
|
||||||
|
//Mob mobility var flags
|
||||||
|
/// any flag
|
||||||
|
#define CHECK_MOBILITY(target, flags) CHECK_BITFIELD(target.mobility_flags, flags)
|
||||||
|
#define CHECK_ALL_MOBILITY(target, flags) CHECK_MULTIPLE_BITFIELDS(target.mobility_flags, flags)
|
||||||
|
|
||||||
|
/// can move
|
||||||
|
#define MOBILITY_MOVE (1<<0)
|
||||||
|
/// can, and is, standing up.
|
||||||
|
#define MOBILITY_STAND (1<<1)
|
||||||
|
/// can pickup items
|
||||||
|
#define MOBILITY_PICKUP (1<<2)
|
||||||
|
/// can use items and interact with world objects like opening closets/etc
|
||||||
|
#define MOBILITY_USE (1<<3)
|
||||||
|
/// can use interfaces like consoles
|
||||||
|
#define MOBILITY_UI (1<<4)
|
||||||
|
/// can use storage item
|
||||||
|
#define MOBILITY_STORAGE (1<<5)
|
||||||
|
/// can pull things
|
||||||
|
#define MOBILITY_PULL (1<<6)
|
||||||
|
/// can hold non-nodropped items voluntarily
|
||||||
|
#define MOBILITY_HOLD (1<<7)
|
||||||
|
/// Can resist out of buckling, grabs, cuffs, etc, in the usual order (buckle --> cuffs --> grab)
|
||||||
|
#define MOBILITY_RESIST (1<<8)
|
||||||
|
|
||||||
|
#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL | MOBILITY_RESIST)
|
||||||
|
#define MOBILITY_FLAGS_ANY_INTERACTION (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_UI | MOBILITY_STORAGE)
|
||||||
|
|||||||
@@ -37,10 +37,17 @@
|
|||||||
/////////////
|
/////////////
|
||||||
// DEBUFFS //
|
// DEBUFFS //
|
||||||
/////////////
|
/////////////
|
||||||
|
/// The affected is unable to move, or to use, hold, or pickup items.
|
||||||
|
#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun
|
||||||
|
|
||||||
#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is stunned
|
#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is unable to stand up
|
||||||
|
|
||||||
#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is knocked down
|
#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized //the affected is unable to move
|
||||||
|
|
||||||
|
#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed //the affected is unable to move, use items, or stand up.
|
||||||
|
|
||||||
|
/// The affected is unable to use or pickup items
|
||||||
|
#define STATUS_EFFECT_DAZED /datum/status_effect/incapacitating/dazed
|
||||||
|
|
||||||
#define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious
|
#define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#define SIGNAL_TRAIT(trait_ref) "trait [trait_ref]"
|
||||||
|
|
||||||
// trait accessor defines
|
// trait accessor defines
|
||||||
#define ADD_TRAIT(target, trait, source) \
|
#define ADD_TRAIT(target, trait, source) \
|
||||||
do { \
|
do { \
|
||||||
@@ -6,12 +8,14 @@
|
|||||||
target.status_traits = list(); \
|
target.status_traits = list(); \
|
||||||
_L = target.status_traits; \
|
_L = target.status_traits; \
|
||||||
_L[trait] = list(source); \
|
_L[trait] = list(source); \
|
||||||
|
SEND_SIGNAL(target, SIGNAL_TRAIT(trait), COMPONENT_ADD_TRAIT); \
|
||||||
} else { \
|
} else { \
|
||||||
_L = target.status_traits; \
|
_L = target.status_traits; \
|
||||||
if (_L[trait]) { \
|
if (_L[trait]) { \
|
||||||
_L[trait] |= list(source); \
|
_L[trait] |= list(source); \
|
||||||
} else { \
|
} else { \
|
||||||
_L[trait] = list(source); \
|
_L[trait] = list(source); \
|
||||||
|
SEND_SIGNAL(target, SIGNAL_TRAIT(trait), COMPONENT_ADD_TRAIT); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@@ -31,7 +35,8 @@
|
|||||||
} \
|
} \
|
||||||
};\
|
};\
|
||||||
if (!length(_L[trait])) { \
|
if (!length(_L[trait])) { \
|
||||||
_L -= trait \
|
_L -= trait; \
|
||||||
|
SEND_SIGNAL(target, SIGNAL_TRAIT(trait), COMPONENT_REMOVE_TRAIT); \
|
||||||
}; \
|
}; \
|
||||||
if (!length(_L)) { \
|
if (!length(_L)) { \
|
||||||
target.status_traits = null \
|
target.status_traits = null \
|
||||||
@@ -46,7 +51,8 @@
|
|||||||
for (var/_T in _L) { \
|
for (var/_T in _L) { \
|
||||||
_L[_T] &= _S;\
|
_L[_T] &= _S;\
|
||||||
if (!length(_L[_T])) { \
|
if (!length(_L[_T])) { \
|
||||||
_L -= _T } \
|
_L -= _T ; \
|
||||||
|
SEND_SIGNAL(target, SIGNAL_TRAIT(_T), COMPONENT_REMOVE_TRAIT); } \
|
||||||
};\
|
};\
|
||||||
if (!length(_L)) { \
|
if (!length(_L)) { \
|
||||||
target.status_traits = null\
|
target.status_traits = null\
|
||||||
@@ -137,6 +143,19 @@
|
|||||||
#define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites.
|
#define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites.
|
||||||
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
|
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
|
||||||
#define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events"
|
#define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events"
|
||||||
|
|
||||||
|
// mobility flag traits
|
||||||
|
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
|
||||||
|
// BUT FOR NOW, THESE ARE HOOKED TO DO update_mobility() VIA COMSIG IN living_mobility.dm
|
||||||
|
// SO IF YOU ADD MORE, BESURE TO UPDATE IT THERE.
|
||||||
|
|
||||||
|
/// Disallow movement
|
||||||
|
#define TRAIT_MOBILITY_NOMOVE "mobility_nomove"
|
||||||
|
/// Disallow pickup
|
||||||
|
#define TRAIT_MOBILITY_NOPICKUP "mobility_nopickup"
|
||||||
|
/// Disallow item use
|
||||||
|
#define TRAIT_MOBILITY_NOUSE "mobility_nouse"
|
||||||
|
|
||||||
#define TRAIT_SWIMMING "swimming" //only applied by /datum/element/swimming, for checking
|
#define TRAIT_SWIMMING "swimming" //only applied by /datum/element/swimming, for checking
|
||||||
|
|
||||||
//non-mob traits
|
//non-mob traits
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
|||||||
checked_health["health"] = health
|
checked_health["health"] = health
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null)
|
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null, required_mobility_flags = (MOBILITY_USE|MOBILITY_MOVE))
|
||||||
if(!user)
|
if(!user)
|
||||||
return 0
|
return 0
|
||||||
var/atom/Tloc = null
|
var/atom/Tloc = null
|
||||||
@@ -384,6 +384,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
|||||||
var/endtime = world.time + delay
|
var/endtime = world.time + delay
|
||||||
var/starttime = world.time
|
var/starttime = world.time
|
||||||
. = 1
|
. = 1
|
||||||
|
var/mob/living/L = isliving(user) && user //evals to last thing eval'd
|
||||||
while (world.time < endtime)
|
while (world.time < endtime)
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
if (progress)
|
if (progress)
|
||||||
@@ -393,15 +394,13 @@ GLOBAL_LIST_EMPTY(species_list)
|
|||||||
drifting = 0
|
drifting = 0
|
||||||
Uloc = user.loc
|
Uloc = user.loc
|
||||||
|
|
||||||
if(QDELETED(user) || user.stat || user.IsKnockdown() || user.IsStun() || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
if(L && !CHECK_ALL_MOBILITY(L, required_mobility_flags))
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
|
|
||||||
if(isliving(user))
|
if(QDELETED(user) || user.stat || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
||||||
var/mob/living/L = user
|
. = 0
|
||||||
if(L.recoveringstam)
|
break
|
||||||
. = 0
|
|
||||||
break
|
|
||||||
|
|
||||||
if(!QDELETED(Tloc) && (QDELETED(target) || Tloc != target.loc))
|
if(!QDELETED(Tloc) && (QDELETED(target) || Tloc != target.loc))
|
||||||
if((Uloc != Tloc || Tloc != user) && !drifting)
|
if((Uloc != Tloc || Tloc != user) && !drifting)
|
||||||
|
|||||||
@@ -227,5 +227,16 @@ GLOBAL_LIST_INIT(bitfields, list(
|
|||||||
"MOB_EPIC" = MOB_EPIC,
|
"MOB_EPIC" = MOB_EPIC,
|
||||||
"MOB_REPTILE" = MOB_REPTILE,
|
"MOB_REPTILE" = MOB_REPTILE,
|
||||||
"MOB_SPIRIT" = MOB_SPIRIT
|
"MOB_SPIRIT" = MOB_SPIRIT
|
||||||
|
),
|
||||||
|
"mobility_flags" = list(
|
||||||
|
"MOBILITY_MOVE" = MOBILITY_MOVE,
|
||||||
|
"MOBILITY_STAND" = MOBILITY_STAND,
|
||||||
|
"MOBILITY_PICKUP" = MOBILITY_PICKUP,
|
||||||
|
"MOBILITY_USE" = MOBILITY_USE,
|
||||||
|
"MOBILITY_UI" = MOBILITY_UI,
|
||||||
|
"MOBILITY_STORAGE" = MOBILITY_STORAGE,
|
||||||
|
"MOBILITY_PULL" = MOBILITY_PULL,
|
||||||
|
"MOBILITY_HOLD" = MOBILITY_HOLD,
|
||||||
|
"MOBILITY_RESIST" = MOBILITY_RESIST
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
if(check_click_intercept(params,A))
|
if(check_click_intercept(params,A))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(stat || lockcharge || IsKnockdown() || IsStun() || IsUnconscious())
|
if(stat || locked_down || IsParalyzed() || IsStun() || IsUnconscious())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/modifiers = params2list(params)
|
var/list/modifiers = params2list(params)
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
if(C.user_unbuckle_mob(C.buckled_mobs[1],src))
|
if(C.user_unbuckle_mob(C.buckled_mobs[1],src))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!W && get_dist(src,A) <= interaction_range)
|
if(!W && (get_dist(src,A) <= interaction_range))
|
||||||
A.attack_robot(src)
|
A.attack_robot(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
|||||||
if(!istype(L) || !L.can_resist())
|
if(!istype(L) || !L.can_resist())
|
||||||
return
|
return
|
||||||
L.changeNext_move(CLICK_CD_RESIST)
|
L.changeNext_move(CLICK_CD_RESIST)
|
||||||
if(L.canmove)
|
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
|
||||||
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
|
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
|
||||||
|
|
||||||
|
|
||||||
@@ -601,7 +601,7 @@ so as to remain in compliance with the most up-to-date laws."
|
|||||||
if(!istype(L) || !L.can_resist())
|
if(!istype(L) || !L.can_resist())
|
||||||
return
|
return
|
||||||
L.changeNext_move(CLICK_CD_RESIST)
|
L.changeNext_move(CLICK_CD_RESIST)
|
||||||
if((L.canmove) && (L.last_special <= world.time))
|
if(CHECK_MOBILITY(L, MOBILITY_MOVE) && (L.last_special <= world.time))
|
||||||
return L.resist_restraints()
|
return L.resist_restraints()
|
||||||
|
|
||||||
/obj/screen/alert/restrained/buckled/Click()
|
/obj/screen/alert/restrained/buckled/Click()
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
var/mob/living/carbon/tempcarb = user
|
var/mob/living/carbon/tempcarb = user
|
||||||
if(!tempcarb.combatmode)
|
if(!tempcarb.combatmode)
|
||||||
totitemdamage *= 0.5
|
totitemdamage *= 0.5
|
||||||
if(user.resting)
|
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||||
totitemdamage *= 0.5
|
totitemdamage *= 0.5
|
||||||
//CIT CHANGES END HERE
|
//CIT CHANGES END HERE
|
||||||
if(user != src && check_shields(I, totitemdamage, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
|
if(user != src && check_shields(I, totitemdamage, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
|
||||||
|
|||||||
+14
-9
@@ -8,6 +8,7 @@
|
|||||||
var/desc = null
|
var/desc = null
|
||||||
var/obj/target = null
|
var/obj/target = null
|
||||||
var/check_flags = 0
|
var/check_flags = 0
|
||||||
|
var/required_mobility_flags = MOBILITY_USE
|
||||||
var/processing = FALSE
|
var/processing = FALSE
|
||||||
var/obj/screen/movable/action_button/button = null
|
var/obj/screen/movable/action_button/button = null
|
||||||
var/buttontooltipstyle = ""
|
var/buttontooltipstyle = ""
|
||||||
@@ -96,20 +97,23 @@
|
|||||||
|
|
||||||
/datum/action/proc/IsAvailable()
|
/datum/action/proc/IsAvailable()
|
||||||
if(!owner)
|
if(!owner)
|
||||||
return 0
|
return FALSE
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if(istype(L) && !CHECK_ALL_MOBILITY(L, required_mobility_flags))
|
||||||
|
return FALSE
|
||||||
if(check_flags & AB_CHECK_RESTRAINED)
|
if(check_flags & AB_CHECK_RESTRAINED)
|
||||||
if(owner.restrained())
|
if(owner.restrained())
|
||||||
return 0
|
return FALSE
|
||||||
if(check_flags & AB_CHECK_STUN)
|
if(check_flags & AB_CHECK_STUN)
|
||||||
if(owner.IsKnockdown() || owner.IsStun())
|
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
return 0
|
return FALSE
|
||||||
if(check_flags & AB_CHECK_LYING)
|
if(check_flags & AB_CHECK_LYING)
|
||||||
if(owner.lying)
|
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||||
return 0
|
return FALSE
|
||||||
if(check_flags & AB_CHECK_CONSCIOUS)
|
if(check_flags & AB_CHECK_CONSCIOUS)
|
||||||
if(owner.stat)
|
if(owner.stat)
|
||||||
return 0
|
return FALSE
|
||||||
return 1
|
return TRUE
|
||||||
|
|
||||||
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
|
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
|
||||||
if(button)
|
if(button)
|
||||||
@@ -430,7 +434,8 @@
|
|||||||
name = "Shift Nerves"
|
name = "Shift Nerves"
|
||||||
|
|
||||||
/datum/action/item_action/explosive_implant
|
/datum/action/item_action/explosive_implant
|
||||||
check_flags = 0
|
check_flags = NONE
|
||||||
|
required_mobility_flags = NONE
|
||||||
name = "Activate Explosive Implant"
|
name = "Activate Explosive Implant"
|
||||||
|
|
||||||
/datum/action/item_action/toggle_research_scanner
|
/datum/action/item_action/toggle_research_scanner
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
fall_chance += 2
|
fall_chance += 2
|
||||||
if(prob(fall_chance) && !owner.lying && !owner.buckled)
|
if(prob(fall_chance) && !owner.lying && !owner.buckled)
|
||||||
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
|
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
|
||||||
owner.Knockdown(35)
|
owner.DefaultCombatKnockdown(35)
|
||||||
|
|
||||||
else if(owner.get_active_held_item())
|
else if(owner.get_active_held_item())
|
||||||
var/drop_chance = 1
|
var/drop_chance = 1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
/datum/brain_trauma/special/godwoken/on_life()
|
/datum/brain_trauma/special/godwoken/on_life()
|
||||||
..()
|
..()
|
||||||
if(prob(4))
|
if(prob(4))
|
||||||
if(prob(33) && (owner.IsStun() || owner.IsKnockdown() || owner.IsUnconscious()))
|
if(prob(33) && owner.HighestImmobilityAmount())
|
||||||
speak("unstun", TRUE)
|
speak("unstun", TRUE)
|
||||||
else if(prob(60) && owner.health <= owner.crit_threshold)
|
else if(prob(60) && owner.health <= owner.crit_threshold)
|
||||||
speak("heal", TRUE)
|
speak("heal", TRUE)
|
||||||
|
|||||||
@@ -59,4 +59,4 @@
|
|||||||
"<span class='userdanger'>You slide on [A]!</span>")
|
"<span class='userdanger'>You slide on [A]!</span>")
|
||||||
|
|
||||||
cooldown = world.time
|
cooldown = world.time
|
||||||
H.Knockdown(60)
|
H.DefaultCombatKnockdown(60)
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
AM.forceMove(T)
|
AM.forceMove(T)
|
||||||
if(isliving(AM))
|
if(isliving(AM))
|
||||||
var/mob/living/L = AM
|
var/mob/living/L = AM
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
L.adjustBruteLoss(30)
|
L.adjustBruteLoss(30)
|
||||||
falling_atoms -= AM
|
falling_atoms -= AM
|
||||||
|
|
||||||
@@ -110,8 +110,7 @@
|
|||||||
if (isliving(AM))
|
if (isliving(AM))
|
||||||
var/mob/living/L = AM
|
var/mob/living/L = AM
|
||||||
L.notransform = TRUE
|
L.notransform = TRUE
|
||||||
L.Stun(200)
|
L.Paralyze(200)
|
||||||
L.resting = TRUE
|
|
||||||
|
|
||||||
var/oldtransform = AM.transform
|
var/oldtransform = AM.transform
|
||||||
var/oldcolor = AM.color
|
var/oldcolor = AM.color
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
var/mob/living/LM = parent
|
var/mob/living/LM = parent
|
||||||
var/v = volume
|
var/v = volume
|
||||||
var/e = e_range
|
var/e = e_range
|
||||||
if(!T.footstep || LM.buckled || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
|
if(!T.footstep || LM.buckled || !CHECK_MOBILITY(LM, MOBILITY_STAND) || LM.buckled || LM.throwing || (LM.movement_type & (VENTCRAWLING | FLYING)))
|
||||||
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
|
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
|
||||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]"
|
msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]"
|
||||||
if(target_buckled)
|
if(target_buckled)
|
||||||
target.buckled.unbuckle_mob(target)
|
target.buckled.unbuckle_mob(target)
|
||||||
target.Knockdown(knockdown_time)
|
target.DefaultCombatKnockdown(knockdown_time)
|
||||||
if(length(msg))
|
if(length(msg))
|
||||||
user.visible_message("<span class='danger'>[msg]!</span>")
|
user.visible_message("<span class='danger'>[msg]!</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
/datum/component/riding/human/force_dismount(mob/living/user)
|
/datum/component/riding/human/force_dismount(mob/living/user)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
AM.unbuckle_mob(user)
|
AM.unbuckle_mob(user)
|
||||||
user.Knockdown(60)
|
user.DefaultCombatKnockdown(60)
|
||||||
user.visible_message("<span class='warning'>[AM] pushes [user] off of [AM.p_them()]!</span>")
|
user.visible_message("<span class='warning'>[AM] pushes [user] off of [AM.p_them()]!</span>")
|
||||||
|
|
||||||
/datum/component/riding/cyborg
|
/datum/component/riding/cyborg
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
M.Move(targetm)
|
M.Move(targetm)
|
||||||
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
|
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
|
||||||
M.throw_at(target, 14, 5, AM)
|
M.throw_at(target, 14, 5, AM)
|
||||||
M.Knockdown(60)
|
M.DefaultCombatKnockdown(60)
|
||||||
|
|
||||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, mob/living/riding_target_override)
|
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, mob/living/riding_target_override)
|
||||||
var/list/equipped
|
var/list/equipped
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
return //undeads are unaffected by the spook-pocalypse.
|
return //undeads are unaffected by the spook-pocalypse.
|
||||||
if(istype(H.dna.species, /datum/species/zombie))
|
if(istype(H.dna.species, /datum/species/zombie))
|
||||||
H.adjustStaminaLoss(25)
|
H.adjustStaminaLoss(25)
|
||||||
H.Knockdown(15) //zombies can't resist the doot
|
H.DefaultCombatKnockdown(15) //zombies can't resist the doot
|
||||||
C.Jitter(35)
|
C.Jitter(35)
|
||||||
C.stuttering = 20
|
C.stuttering = 20
|
||||||
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
|
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
|
||||||
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
||||||
H.Knockdown(20)
|
H.DefaultCombatKnockdown(20)
|
||||||
H.set_species(/datum/species/skeleton)
|
H.set_species(/datum/species/skeleton)
|
||||||
H.visible_message("<span class='warning'>[H] has given up on life as a mortal.</span>")
|
H.visible_message("<span class='warning'>[H] has given up on life as a mortal.</span>")
|
||||||
var/T = get_turf(H)
|
var/T = get_turf(H)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
var/turf/loccheck = get_turf(A)
|
var/turf/loccheck = get_turf(A)
|
||||||
if(is_reebe(loccheck.z))
|
if(is_reebe(loccheck.z))
|
||||||
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
|
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
|
||||||
user.Knockdown(60)
|
user.DefaultCombatKnockdown(60)
|
||||||
return
|
return
|
||||||
if(istype(loccheck.loc, /area/fabric_of_reality))
|
if(istype(loccheck.loc, /area/fabric_of_reality))
|
||||||
to_chat(user, "<span class='danger'>You can't do that here!</span>")
|
to_chat(user, "<span class='danger'>You can't do that here!</span>")
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
for(var/mob/living/M in T)
|
for(var/mob/living/M in T)
|
||||||
if(M.movement_type & FLYING)
|
if(M.movement_type & FLYING)
|
||||||
M.visible_message("<span class='danger'>The bluespace collapse crushes the air towards it, pulling [M] towards the ground...</span>")
|
M.visible_message("<span class='danger'>The bluespace collapse crushes the air towards it, pulling [M] towards the ground...</span>")
|
||||||
M.Knockdown(5, TRUE, TRUE) //Overrides stun absorbs.
|
M.DefaultCombatKnockdown(5, TRUE, TRUE) //Overrides stun absorbs.
|
||||||
T.TerraformTurf(/turf/open/chasm/magic, /turf/open/chasm/magic)
|
T.TerraformTurf(/turf/open/chasm/magic, /turf/open/chasm/magic)
|
||||||
for (var/obj/structure/ladder/unbreakable/binary/ladder in GLOB.ladders)
|
for (var/obj/structure/ladder/unbreakable/binary/ladder in GLOB.ladders)
|
||||||
ladder.ActivateAlmonds()
|
ladder.ActivateAlmonds()
|
||||||
|
|||||||
@@ -279,7 +279,7 @@
|
|||||||
M.emote("deathgasp")
|
M.emote("deathgasp")
|
||||||
M.fakedeath("regenerative_coma")
|
M.fakedeath("regenerative_coma")
|
||||||
M.update_stat()
|
M.update_stat()
|
||||||
M.update_canmove()
|
M.update_mobility()
|
||||||
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
|
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
|
||||||
|
|
||||||
/datum/symptom/heal/coma/proc/uncoma(mob/living/M)
|
/datum/symptom/heal/coma/proc/uncoma(mob/living/M)
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
active_coma = FALSE
|
active_coma = FALSE
|
||||||
M.cure_fakedeath("regenerative_coma")
|
M.cure_fakedeath("regenerative_coma")
|
||||||
M.update_stat()
|
M.update_stat()
|
||||||
M.update_canmove()
|
M.update_mobility()
|
||||||
|
|
||||||
/datum/symptom/heal/coma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
|
/datum/symptom/heal/coma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
|
||||||
var/heal_amt = 4 * actual_power
|
var/heal_amt = 4 * actual_power
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
if(prob(25))
|
if(prob(25))
|
||||||
affected_mob.vomit(95)
|
affected_mob.vomit(95)
|
||||||
H.emote("cough")
|
H.emote("cough")
|
||||||
H.Knockdown(40)
|
H.DefaultCombatKnockdown(40)
|
||||||
H.losebreath += 4
|
H.losebreath += 4
|
||||||
if(prob(3))
|
if(prob(3))
|
||||||
to_chat(H, "<span class='danger'>You feel very weak and dizzy...</span>")
|
to_chat(H, "<span class='danger'>You feel very weak and dizzy...</span>")
|
||||||
|
|||||||
@@ -118,7 +118,8 @@
|
|||||||
if(DEAD)
|
if(DEAD)
|
||||||
to_chat(user, "<span class='notice'>You cannot [key] while dead.</span>")
|
to_chat(user, "<span class='notice'>You cannot [key] while dead.</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
if(restraint_check && (user.IsStun() || user.IsKnockdown()))
|
var/mob/living/L = user
|
||||||
|
if(restraint_check && (istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE)))
|
||||||
if(!intentional)
|
if(!intentional)
|
||||||
return FALSE
|
return FALSE
|
||||||
to_chat(user, "<span class='notice'>You cannot [key] while stunned.</span>")
|
to_chat(user, "<span class='notice'>You cannot [key] while stunned.</span>")
|
||||||
|
|||||||
@@ -42,19 +42,19 @@
|
|||||||
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!can_use(A))
|
if(!can_use(A))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(!D.stat || !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
||||||
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
||||||
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
|
||||||
D.apply_damage(10, BRUTE)
|
D.apply_damage(10, BRUTE)
|
||||||
D.Knockdown(120)
|
D.DefaultCombatKnockdown(120)
|
||||||
log_combat(A, D, "slammed (CQC)")
|
log_combat(A, D, "slammed (CQC)")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!can_use(A))
|
if(!can_use(A))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(!D.stat || !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
|
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
|
||||||
"<span class='userdanger'>[A] kicks you back!</span>")
|
"<span class='userdanger'>[A] kicks you back!</span>")
|
||||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
D.throw_at(throw_target, 1, 14, A)
|
D.throw_at(throw_target, 1, 14, A)
|
||||||
D.apply_damage(10, BRUTE)
|
D.apply_damage(10, BRUTE)
|
||||||
log_combat(A, D, "kicked (CQC)")
|
log_combat(A, D, "kicked (CQC)")
|
||||||
if(D.IsKnockdown() && !D.stat)
|
if(!CHECK_MOBILITY(D, MOBILITY_STAND) && CHECK_MOBILITY(D, MOBILITY_USE))
|
||||||
log_combat(A, D, "knocked out (Head kick)(CQC)")
|
log_combat(A, D, "knocked out (Head kick)(CQC)")
|
||||||
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
|
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
|
||||||
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
|
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
||||||
var/bonus_damage = 13
|
var/bonus_damage = 13
|
||||||
if(D.IsKnockdown() || D.resting || D.lying)
|
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
bonus_damage += 5
|
bonus_damage += 5
|
||||||
picked_hit_type = "stomps on"
|
picked_hit_type = "stomps on"
|
||||||
D.apply_damage(bonus_damage, BRUTE)
|
D.apply_damage(bonus_damage, BRUTE)
|
||||||
@@ -147,12 +147,12 @@
|
|||||||
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
||||||
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
||||||
log_combat(A, D, "[picked_hit_type] (CQC)")
|
log_combat(A, D, "[picked_hit_type] (CQC)")
|
||||||
if(A.resting && !D.stat && !D.IsKnockdown())
|
if(!CHECK_MOBILITY(A, MOBILITY_STAND) && !D.stat && CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
|
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
|
||||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||||
D.apply_damage(10, BRUTE)
|
D.apply_damage(10, BRUTE)
|
||||||
D.Knockdown(60)
|
D.DefaultCombatKnockdown(60)
|
||||||
log_combat(A, D, "sweeped (CQC)")
|
log_combat(A, D, "sweeped (CQC)")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
if(check_streak(A,D))
|
if(check_streak(A,D))
|
||||||
return TRUE
|
return TRUE
|
||||||
if(prob(65))
|
if(prob(65))
|
||||||
if(!D.stat || !D.IsKnockdown() || !restraining)
|
if(CHECK_MOBILITY(D, MOBILITY_MOVE) || !restraining)
|
||||||
I = D.get_active_held_item()
|
I = D.get_active_held_item()
|
||||||
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
|
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
|
||||||
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
|
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
|
||||||
|
|||||||
@@ -96,13 +96,13 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(D.lying || D.IsKnockdown())
|
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
return 0
|
return 0
|
||||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
|
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
|
||||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, BRUTE)
|
||||||
D.Knockdown(40, override_hardstun = 0.01, override_stamdmg = 25)
|
D.DefaultCombatKnockdown(40, override_hardstun = 0.01, override_stamdmg = 25)
|
||||||
log_combat(A, D, "leg sweeped")
|
log_combat(A, D, "leg sweeped")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
log_combat(A, D, "punched")
|
log_combat(A, D, "punched")
|
||||||
var/picked_hit_type = pick("punches", "kicks")
|
var/picked_hit_type = pick("punches", "kicks")
|
||||||
var/bonus_damage = 10
|
var/bonus_damage = 10
|
||||||
if(D.IsKnockdown() || D.resting || D.lying)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
bonus_damage += 5
|
bonus_damage += 5
|
||||||
picked_hit_type = "stomps on"
|
picked_hit_type = "stomps on"
|
||||||
D.apply_damage(bonus_damage, BRUTE)
|
D.apply_damage(bonus_damage, BRUTE)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||||
D.Knockdown(20)
|
D.DefaultCombatKnockdown(20)
|
||||||
if(atk_verb)
|
if(atk_verb)
|
||||||
log_combat(A, D, "[atk_verb] (Mushroom Punch)")
|
log_combat(A, D, "[atk_verb] (Mushroom Punch)")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
|
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
|
||||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
|
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
|
||||||
A.Stun(rand(10,45))
|
A.Stun(rand(10,45))
|
||||||
D.Knockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency
|
D.DefaultCombatKnockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency
|
||||||
if(5,6)
|
if(5,6)
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
atk_verb = pick("punches", "kicks", "hits", "slams into")
|
atk_verb = pick("punches", "kicks", "hits", "slams into")
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||||
D.Knockdown(60)
|
D.DefaultCombatKnockdown(60)
|
||||||
if(7,8)
|
if(7,8)
|
||||||
basic_hit(A,D)
|
basic_hit(A,D)
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/martial_art/the_rising_bass/proc/sideKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_rising_bass/proc/sideKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.IsKnockdown() || D.lying == 0)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
var/dir = A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH)
|
var/dir = A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH)
|
||||||
var/oppdir = dir == NORTH ? SOUTH : dir == SOUTH ? NORTH : dir == EAST ? WEST : EAST
|
var/oppdir = dir == NORTH ? SOUTH : dir == SOUTH ? NORTH : dir == EAST ? WEST : EAST
|
||||||
var/turf/H = get_step(D, dir)
|
var/turf/H = get_step(D, dir)
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
"<span class='userdanger'>[A] kicks you in the side, forcing you to step away!</span>")
|
"<span class='userdanger'>[A] kicks you in the side, forcing you to step away!</span>")
|
||||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
|
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
|
||||||
D.Knockdown(60)
|
D.DefaultCombatKnockdown(60)
|
||||||
var/L = !checkfordensity(H,D) ? (!checkfordensity(K,D) ? D.loc : K) : H
|
var/L = !checkfordensity(H,D) ? (!checkfordensity(K,D) ? D.loc : K) : H
|
||||||
D.forceMove(L)
|
D.forceMove(L)
|
||||||
log_combat(A, D, "side kicked (Rising Bass)")
|
log_combat(A, D, "side kicked (Rising Bass)")
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.IsKnockdown() || !D.lying)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
var/turf/H = get_step(A, get_dir(D,A))
|
var/turf/H = get_step(A, get_dir(D,A))
|
||||||
var/L = checkfordensity(H,D) ? H : A.loc
|
var/L = checkfordensity(H,D) ? H : A.loc
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
@@ -108,14 +108,14 @@
|
|||||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||||
D.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
D.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
||||||
D.Sleeping(60)
|
D.Sleeping(60)
|
||||||
D.Knockdown(300)
|
D.DefaultCombatKnockdown(300)
|
||||||
D.forceMove(L)
|
D.forceMove(L)
|
||||||
log_combat(A, D, "shoulder flipped (Rising Bass)")
|
log_combat(A, D, "shoulder flipped (Rising Bass)")
|
||||||
return TRUE
|
return TRUE
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if((!D.IsKnockdown() || !D.lying) && repulsecool > world.time)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND) && repulsecool < world.time)
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
D.visible_message("<span class='warning'>[A] smashes [D] in the chest, throwing them away!</span>", \
|
D.visible_message("<span class='warning'>[A] smashes [D] in the chest, throwing them away!</span>", \
|
||||||
"<span class='userdanger'>[A] smashes you in the chest, repelling you away!</span>")
|
"<span class='userdanger'>[A] smashes you in the chest, repelling you away!</span>")
|
||||||
@@ -123,14 +123,14 @@
|
|||||||
var/atom/F = get_edge_target_turf(D, get_dir(A, get_step_away(D, A)))
|
var/atom/F = get_edge_target_turf(D, get_dir(A, get_step_away(D, A)))
|
||||||
D.throw_at(F, 10, 1)
|
D.throw_at(F, 10, 1)
|
||||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||||
D.Knockdown(90)
|
D.DefaultCombatKnockdown(90)
|
||||||
log_combat(A, D, "repulse punched (Rising Bass)")
|
log_combat(A, D, "repulse punched (Rising Bass)")
|
||||||
repulsecool = world.time + 3 SECONDS
|
repulsecool = world.time + 3 SECONDS
|
||||||
return TRUE
|
return TRUE
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.IsKnockdown() || !D.lying)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||||
D.visible_message("<span class='warning'>[A] smashes their foot down on [D]'s foot!</span>", \
|
D.visible_message("<span class='warning'>[A] smashes their foot down on [D]'s foot!</span>", \
|
||||||
"<span class='userdanger'>[A] smashes your foot!</span>")
|
"<span class='userdanger'>[A] smashes your foot!</span>")
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.IsKnockdown() || !D.lying)
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
if (D.get_active_held_item())
|
if (D.get_active_held_item())
|
||||||
var/obj/item/G = D.get_active_held_item()
|
var/obj/item/G = D.get_active_held_item()
|
||||||
if (G && !(G.item_flags & (ABSTRACT|DROPDEL)) && D.temporarilyRemoveItemFromInventory(G))
|
if (G && !(G.item_flags & (ABSTRACT|DROPDEL)) && D.temporarilyRemoveItemFromInventory(G))
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.stat && !D.IsStun() && !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_USE))
|
||||||
log_combat(A, D, "wrist wrenched (Sleeping Carp)")
|
log_combat(A, D, "wrist wrenched (Sleeping Carp)")
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
||||||
@@ -46,19 +46,19 @@
|
|||||||
D.emote("scream")
|
D.emote("scream")
|
||||||
D.dropItemToGround(D.get_active_held_item())
|
D.dropItemToGround(D.get_active_held_item())
|
||||||
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||||
D.Knockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
D.DefaultCombatKnockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||||
return TRUE
|
return TRUE
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.stat && !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
if(A.dir == D.dir)
|
if(A.dir == D.dir)
|
||||||
log_combat(A, D, "back-kicked (Sleeping Carp)")
|
log_combat(A, D, "back-kicked (Sleeping Carp)")
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
||||||
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
||||||
step_to(D,get_step(D,D.dir),1)
|
step_to(D,get_step(D,D.dir),1)
|
||||||
D.Knockdown(80)
|
D.DefaultCombatKnockdown(80)
|
||||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
@@ -68,20 +68,20 @@
|
|||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.stat && !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
log_combat(A, D, "stomach kneed (Sleeping Carp)")
|
log_combat(A, D, "stomach kneed (Sleeping Carp)")
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||||
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
||||||
"<span class='userdanger'>[A] winds you with a knee in the stomach!</span>")
|
"<span class='userdanger'>[A] winds you with a knee in the stomach!</span>")
|
||||||
D.audible_message("<b>[D]</b> gags!")
|
D.audible_message("<b>[D]</b> gags!")
|
||||||
D.losebreath += 3
|
D.losebreath += 3
|
||||||
D.Knockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
D.DefaultCombatKnockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||||
return TRUE
|
return TRUE
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(!D.stat && !D.IsKnockdown())
|
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
log_combat(A, D, "head kicked (Sleeping Carp)")
|
log_combat(A, D, "head kicked (Sleeping Carp)")
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||||
@@ -89,12 +89,12 @@
|
|||||||
D.apply_damage(20, BRUTE, BODY_ZONE_HEAD)
|
D.apply_damage(20, BRUTE, BODY_ZONE_HEAD)
|
||||||
D.drop_all_held_items()
|
D.drop_all_held_items()
|
||||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||||
D.Knockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
D.DefaultCombatKnockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||||
return TRUE
|
return TRUE
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|
||||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
if(D.IsKnockdown() || D.resting || D.stat)
|
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||||
log_combat(A, D, "elbow dropped (Sleeping Carp)")
|
log_combat(A, D, "elbow dropped (Sleeping Carp)")
|
||||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||||
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||||
if(prob(D.getBruteLoss()) && !D.lying)
|
if(prob(D.getBruteLoss()) && !D.lying)
|
||||||
D.visible_message("<span class='warning'>[D] stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>")
|
D.visible_message("<span class='warning'>[D] stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>")
|
||||||
D.Knockdown(80)
|
D.DefaultCombatKnockdown(80)
|
||||||
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
|
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||||
user.Knockdown(60)
|
user.DefaultCombatKnockdown(60)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
if(prob(10))
|
if(prob(10))
|
||||||
H.visible_message("<span class='warning'>[H] collapses!</span>", \
|
H.visible_message("<span class='warning'>[H] collapses!</span>", \
|
||||||
"<span class='userdanger'>Your legs give out!</span>")
|
"<span class='userdanger'>Your legs give out!</span>")
|
||||||
H.Knockdown(80)
|
H.DefaultCombatKnockdown(80)
|
||||||
if(H.staminaloss && !H.IsSleeping())
|
if(H.staminaloss && !H.IsSleeping())
|
||||||
var/total_health = (H.health - H.staminaloss)
|
var/total_health = (H.health - H.staminaloss)
|
||||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
|
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
if (T && isturf(T))
|
if (T && isturf(T))
|
||||||
if (!D.stat)
|
if (!D.stat)
|
||||||
D.emote("scream")
|
D.emote("scream")
|
||||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Knockdown, 20))
|
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
|
||||||
log_combat(A, D, "has thrown with wrestling")
|
log_combat(A, D, "has thrown with wrestling")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
playsound(A.loc, "swing_hit", 50, 1)
|
playsound(A.loc, "swing_hit", 50, 1)
|
||||||
if (!D.stat)
|
if (!D.stat)
|
||||||
D.emote("scream")
|
D.emote("scream")
|
||||||
D.Knockdown(40)
|
D.DefaultCombatKnockdown(40)
|
||||||
|
|
||||||
switch(rand(1,3))
|
switch(rand(1,3))
|
||||||
if (2)
|
if (2)
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
|
|
||||||
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||||
if (T && isturf(T))
|
if (T && isturf(T))
|
||||||
D.Knockdown(20)
|
D.DefaultCombatKnockdown(20)
|
||||||
D.throw_at(T, 3, 2)
|
D.throw_at(T, 3, 2)
|
||||||
log_combat(A, D, "roundhouse-kicked")
|
log_combat(A, D, "roundhouse-kicked")
|
||||||
|
|
||||||
@@ -400,7 +400,7 @@
|
|||||||
if (falling == 1)
|
if (falling == 1)
|
||||||
A.visible_message("<span class = 'danger'><B>...and dives head-first into the ground, ouch!</b></span>")
|
A.visible_message("<span class = 'danger'><B>...and dives head-first into the ground, ouch!</b></span>")
|
||||||
A.adjustBruteLoss(rand(10,20))
|
A.adjustBruteLoss(rand(10,20))
|
||||||
A.Knockdown(60)
|
A.DefaultCombatKnockdown(60)
|
||||||
to_chat(A, "[D] is too far away!")
|
to_chat(A, "[D] is too far away!")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@
|
|||||||
else
|
else
|
||||||
D.adjustBruteLoss(rand(20,30))
|
D.adjustBruteLoss(rand(20,30))
|
||||||
|
|
||||||
D.Knockdown(40)
|
D.DefaultCombatKnockdown(40)
|
||||||
|
|
||||||
A.pixel_y = 0
|
A.pixel_y = 0
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,7 @@
|
|||||||
owner.log_message("gained Vanguard stun immunity", LOG_ATTACK)
|
owner.log_message("gained Vanguard stun immunity", LOG_ATTACK)
|
||||||
owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
||||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
||||||
owner.SetStun(0, FALSE)
|
owner.SetAllImmobility(0, FALSE)
|
||||||
owner.SetKnockdown(0)
|
|
||||||
owner.setStaminaLoss(0, FALSE)
|
owner.setStaminaLoss(0, FALSE)
|
||||||
progbar = new(owner, duration, owner)
|
progbar = new(owner, duration, owner)
|
||||||
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
|
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
|
||||||
@@ -97,7 +96,7 @@
|
|||||||
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
|
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
|
||||||
otheractiveabsorptions = TRUE
|
otheractiveabsorptions = TRUE
|
||||||
if(!GLOB.ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
|
if(!GLOB.ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
|
||||||
owner.Knockdown(stuns_blocked)
|
owner.DefaultCombatKnockdown(stuns_blocked)
|
||||||
message_to_owner = "<span class='boldwarning'>The weight of the Vanguard's protection crashes down upon you!</span>"
|
message_to_owner = "<span class='boldwarning'>The weight of the Vanguard's protection crashes down upon you!</span>"
|
||||||
if(stuns_blocked >= 300)
|
if(stuns_blocked >= 300)
|
||||||
message_to_owner += "\n<span class='userdanger'>You faint from the exertion!</span>"
|
message_to_owner += "\n<span class='userdanger'>You faint from the exertion!</span>"
|
||||||
@@ -226,9 +225,8 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/status_effect/wish_granters_gift/on_remove()
|
/datum/status_effect/wish_granters_gift/on_remove()
|
||||||
owner.revive(full_heal = 1, admin_revive = 1)
|
owner.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||||
owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>")
|
owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>")
|
||||||
owner.update_canmove()
|
|
||||||
|
|
||||||
/obj/screen/alert/status_effect/wish_granters_gift
|
/obj/screen/alert/status_effect/wish_granters_gift
|
||||||
name = "Wish Granter's Immortality"
|
name = "Wish Granter's Immortality"
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
if(updating_canmove)
|
if(updating_canmove)
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
if(needs_update_stat || issilicon(owner))
|
if(needs_update_stat || issilicon(owner))
|
||||||
owner.update_stat()
|
owner.update_stat()
|
||||||
|
|
||||||
/datum/status_effect/incapacitating/on_remove()
|
/datum/status_effect/incapacitating/on_remove()
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
|
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
|
||||||
owner.update_stat()
|
owner.update_stat()
|
||||||
|
|
||||||
@@ -29,10 +29,22 @@
|
|||||||
/datum/status_effect/incapacitating/knockdown
|
/datum/status_effect/incapacitating/knockdown
|
||||||
id = "knockdown"
|
id = "knockdown"
|
||||||
|
|
||||||
/datum/status_effect/incapacitating/knockdown/tick()
|
//IMMOBILIZED
|
||||||
|
/datum/status_effect/incapacitating/immobilized
|
||||||
|
id = "immobilized"
|
||||||
|
|
||||||
|
//PARALYZED
|
||||||
|
/datum/status_effect/incapacitating/paralyzed
|
||||||
|
id = "paralyzed"
|
||||||
|
|
||||||
|
/datum/status_effect/incapacitating/paralyzed/tick()
|
||||||
if(owner.getStaminaLoss())
|
if(owner.getStaminaLoss())
|
||||||
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
|
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
|
||||||
|
|
||||||
|
//DAZED
|
||||||
|
/datum/status_effect/incapacitating/dazed
|
||||||
|
id = "dazed"
|
||||||
|
|
||||||
//UNCONSCIOUS
|
//UNCONSCIOUS
|
||||||
/datum/status_effect/incapacitating/unconscious
|
/datum/status_effect/incapacitating/unconscious
|
||||||
id = "unconscious"
|
id = "unconscious"
|
||||||
@@ -211,7 +223,7 @@
|
|||||||
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check(chargecost = 0) && number_legs)
|
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check(chargecost = 0) && number_legs)
|
||||||
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
|
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
|
||||||
if(GLOB.ratvar_awakens)
|
if(GLOB.ratvar_awakens)
|
||||||
owner.Knockdown(20)
|
owner.DefaultCombatKnockdown(20)
|
||||||
if(iscultist(owner))
|
if(iscultist(owner))
|
||||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
|
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
|
||||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
|
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
|
||||||
@@ -558,7 +570,7 @@
|
|||||||
var/old_oxyloss
|
var/old_oxyloss
|
||||||
|
|
||||||
/datum/status_effect/kindle/tick()
|
/datum/status_effect/kindle/tick()
|
||||||
owner.Knockdown(15, TRUE, FALSE, 15)
|
owner.DefaultCombatKnockdown(15, TRUE, FALSE, 15)
|
||||||
if(iscarbon(owner))
|
if(iscarbon(owner))
|
||||||
var/mob/living/carbon/C = owner
|
var/mob/living/carbon/C = owner
|
||||||
C.silent = max(2, C.silent)
|
C.silent = max(2, C.silent)
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
||||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||||
owner.add_overlay(cube)
|
owner.add_overlay(cube)
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/status_effect/freon/tick()
|
/datum/status_effect/freon/tick()
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
|
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
if(!QDELETED(src))
|
if(!QDELETED(src))
|
||||||
to_chat(owner, "You break out of the ice cube!")
|
to_chat(owner, "You break out of the ice cube!")
|
||||||
owner.remove_status_effect(/datum/status_effect/freon)
|
owner.remove_status_effect(/datum/status_effect/freon)
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
|
|
||||||
/datum/status_effect/freon/on_remove()
|
/datum/status_effect/freon/on_remove()
|
||||||
if(!owner.stat)
|
if(!owner.stat)
|
||||||
to_chat(owner, "The cube melts!")
|
to_chat(owner, "The cube melts!")
|
||||||
owner.cut_overlay(cube)
|
owner.cut_overlay(cube)
|
||||||
owner.adjust_bodytemperature(100)
|
owner.adjust_bodytemperature(100)
|
||||||
owner.update_canmove()
|
owner.update_mobility()
|
||||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||||
|
|
||||||
/datum/status_effect/freon/watcher
|
/datum/status_effect/freon/watcher
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
|
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
|
||||||
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
|
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
|
||||||
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
|
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
|
||||||
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
|
status += "The lockdown indicator is [R.locked_down ? "on" : "off"]."
|
||||||
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
|
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
|
||||||
return status
|
return status
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
R.lawsync()
|
R.lawsync()
|
||||||
R.show_laws()
|
R.show_laws()
|
||||||
if(WIRE_LOCKDOWN)
|
if(WIRE_LOCKDOWN)
|
||||||
R.SetLockdown(!R.lockcharge) // Toggle
|
R.SetLockdown(!R.locked_down) // Toggle
|
||||||
if(WIRE_RESET_MODULE)
|
if(WIRE_RESET_MODULE)
|
||||||
if(R.has_module())
|
if(R.has_module())
|
||||||
R.visible_message("[R]'s module servos twitch.", "Your module display flickers.")
|
R.visible_message("[R]'s module servos twitch.", "Your module display flickers.")
|
||||||
|
|||||||
@@ -187,3 +187,4 @@
|
|||||||
|
|
||||||
if(!key_valid)
|
if(!key_valid)
|
||||||
GLOB.topic_status_cache = .
|
GLOB.topic_status_cache = .
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -28,7 +28,6 @@
|
|||||||
var/list/managed_overlays
|
var/list/managed_overlays
|
||||||
|
|
||||||
var/datum/proximity_monitor/proximity_monitor
|
var/datum/proximity_monitor/proximity_monitor
|
||||||
var/buckle_message_cooldown = 0
|
|
||||||
var/fingerprintslast
|
var/fingerprintslast
|
||||||
|
|
||||||
var/list/filter_data //For handling persistent filters
|
var/list/filter_data //For handling persistent filters
|
||||||
@@ -361,11 +360,12 @@
|
|||||||
. = list()
|
. = list()
|
||||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
|
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
|
||||||
|
|
||||||
/atom/proc/relaymove(mob/user)
|
/atom/proc/relaymove(mob/living/user)
|
||||||
if(buckle_message_cooldown <= world.time)
|
if(!istype(user))
|
||||||
buckle_message_cooldown = world.time + 50
|
return //why are you buckling nonliving mobs to atoms?
|
||||||
|
if(user.buckle_message_cooldown <= world.time)
|
||||||
|
user.buckle_message_cooldown = world.time + 50
|
||||||
to_chat(user, "<span class='warning'>You can't move while buckled to [src]!</span>")
|
to_chat(user, "<span class='warning'>You can't move while buckled to [src]!</span>")
|
||||||
return
|
|
||||||
|
|
||||||
/atom/proc/contents_explosion(severity, target)
|
/atom/proc/contents_explosion(severity, target)
|
||||||
return //For handling the effects of explosions on contents that would not normally be effected
|
return //For handling the effects of explosions on contents that would not normally be effected
|
||||||
|
|||||||
+2
-304
@@ -158,7 +158,7 @@
|
|||||||
grab_state = 0
|
grab_state = 0
|
||||||
if(isliving(ex_pulled))
|
if(isliving(ex_pulled))
|
||||||
var/mob/living/L = ex_pulled
|
var/mob/living/L = ex_pulled
|
||||||
L.update_canmove()// mob gets up if it was lyng down in a chokehold
|
L.update_mobility()// mob gets up if it was lyng down in a chokehold
|
||||||
|
|
||||||
/atom/movable/proc/Move_Pulled(atom/A)
|
/atom/movable/proc/Move_Pulled(atom/A)
|
||||||
if(!pulling)
|
if(!pulling)
|
||||||
@@ -194,160 +194,6 @@
|
|||||||
stop_pulling()
|
stop_pulling()
|
||||||
return
|
return
|
||||||
|
|
||||||
////////////////////////////////////////
|
|
||||||
// Here's where we rewrite how byond handles movement except slightly different
|
|
||||||
// To be removed on step_ conversion
|
|
||||||
// All this work to prevent a second bump
|
|
||||||
/atom/movable/Move(atom/newloc, direct=0)
|
|
||||||
. = FALSE
|
|
||||||
if(!newloc || newloc == loc)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!direct)
|
|
||||||
direct = get_dir(src, newloc)
|
|
||||||
setDir(direct)
|
|
||||||
|
|
||||||
if(!loc.Exit(src, newloc))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!newloc.Enter(src, src.loc))
|
|
||||||
return
|
|
||||||
|
|
||||||
// Past this is the point of no return
|
|
||||||
var/atom/oldloc = loc
|
|
||||||
var/area/oldarea = get_area(oldloc)
|
|
||||||
var/area/newarea = get_area(newloc)
|
|
||||||
loc = newloc
|
|
||||||
. = TRUE
|
|
||||||
oldloc.Exited(src, newloc)
|
|
||||||
if(oldarea != newarea)
|
|
||||||
oldarea.Exited(src, newloc)
|
|
||||||
|
|
||||||
for(var/i in oldloc)
|
|
||||||
if(i == src) // Multi tile objects
|
|
||||||
continue
|
|
||||||
var/atom/movable/thing = i
|
|
||||||
thing.Uncrossed(src)
|
|
||||||
|
|
||||||
newloc.Entered(src, oldloc)
|
|
||||||
if(oldarea != newarea)
|
|
||||||
newarea.Entered(src, oldloc)
|
|
||||||
|
|
||||||
for(var/i in loc)
|
|
||||||
if(i == src) // Multi tile objects
|
|
||||||
continue
|
|
||||||
var/atom/movable/thing = i
|
|
||||||
thing.Crossed(src)
|
|
||||||
//
|
|
||||||
////////////////////////////////////////
|
|
||||||
|
|
||||||
/atom/movable/Move(atom/newloc, direct)
|
|
||||||
var/atom/movable/pullee = pulling
|
|
||||||
var/turf/T = loc
|
|
||||||
if(pulling)
|
|
||||||
if(pullee && get_dist(src, pullee) > 1)
|
|
||||||
stop_pulling()
|
|
||||||
|
|
||||||
if(pullee && pullee.loc != loc && !isturf(pullee.loc) ) //to be removed once all code that changes an object's loc uses forceMove().
|
|
||||||
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
|
|
||||||
stop_pulling()
|
|
||||||
if(!loc || !newloc)
|
|
||||||
return FALSE
|
|
||||||
var/atom/oldloc = loc
|
|
||||||
|
|
||||||
if(loc != newloc)
|
|
||||||
if (!(direct & (direct - 1))) //Cardinal move
|
|
||||||
. = ..()
|
|
||||||
else //Diagonal move, split it into cardinal moves
|
|
||||||
moving_diagonally = FIRST_DIAG_STEP
|
|
||||||
var/first_step_dir
|
|
||||||
// The `&& moving_diagonally` checks are so that a forceMove taking
|
|
||||||
// place due to a Crossed, Bumped, etc. call will interrupt
|
|
||||||
// the second half of the diagonal movement, or the second attempt
|
|
||||||
// at a first half if step() fails because we hit something.
|
|
||||||
if (direct & NORTH)
|
|
||||||
if (direct & EAST)
|
|
||||||
if (step(src, NORTH) && moving_diagonally)
|
|
||||||
first_step_dir = NORTH
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, EAST)
|
|
||||||
else if (moving_diagonally && step(src, EAST))
|
|
||||||
first_step_dir = EAST
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, NORTH)
|
|
||||||
else if (direct & WEST)
|
|
||||||
if (step(src, NORTH) && moving_diagonally)
|
|
||||||
first_step_dir = NORTH
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, WEST)
|
|
||||||
else if (moving_diagonally && step(src, WEST))
|
|
||||||
first_step_dir = WEST
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, NORTH)
|
|
||||||
else if (direct & SOUTH)
|
|
||||||
if (direct & EAST)
|
|
||||||
if (step(src, SOUTH) && moving_diagonally)
|
|
||||||
first_step_dir = SOUTH
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, EAST)
|
|
||||||
else if (moving_diagonally && step(src, EAST))
|
|
||||||
first_step_dir = EAST
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, SOUTH)
|
|
||||||
else if (direct & WEST)
|
|
||||||
if (step(src, SOUTH) && moving_diagonally)
|
|
||||||
first_step_dir = SOUTH
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, WEST)
|
|
||||||
else if (moving_diagonally && step(src, WEST))
|
|
||||||
first_step_dir = WEST
|
|
||||||
moving_diagonally = SECOND_DIAG_STEP
|
|
||||||
. = step(src, SOUTH)
|
|
||||||
if(moving_diagonally == SECOND_DIAG_STEP)
|
|
||||||
if(!.)
|
|
||||||
setDir(first_step_dir)
|
|
||||||
else if (!inertia_moving)
|
|
||||||
inertia_next_move = world.time + inertia_move_delay
|
|
||||||
newtonian_move(direct)
|
|
||||||
moving_diagonally = 0
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!loc || (loc == oldloc && oldloc != newloc))
|
|
||||||
last_move = 0
|
|
||||||
return
|
|
||||||
|
|
||||||
if(.)
|
|
||||||
Moved(oldloc, direct)
|
|
||||||
if(. && pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move.
|
|
||||||
if(pulling.anchored)
|
|
||||||
stop_pulling()
|
|
||||||
else
|
|
||||||
var/pull_dir = get_dir(src, pulling)
|
|
||||||
//puller and pullee more than one tile away or in diagonal position
|
|
||||||
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
|
|
||||||
pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
|
|
||||||
if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up
|
|
||||||
stop_pulling()
|
|
||||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
|
||||||
pulledby.stop_pulling()
|
|
||||||
|
|
||||||
|
|
||||||
last_move = direct
|
|
||||||
setDir(direct)
|
|
||||||
if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Called after a successful Move(). By this point, we've already moved
|
|
||||||
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
|
|
||||||
if (!inertia_moving)
|
|
||||||
inertia_next_move = world.time + inertia_move_delay
|
|
||||||
newtonian_move(Dir)
|
|
||||||
if (length(client_mobs_in_contents))
|
|
||||||
update_parallax_contents()
|
|
||||||
|
|
||||||
return TRUE
|
|
||||||
|
|
||||||
/atom/movable/Destroy(force)
|
/atom/movable/Destroy(force)
|
||||||
QDEL_NULL(proximity_monitor)
|
QDEL_NULL(proximity_monitor)
|
||||||
QDEL_NULL(language_holder)
|
QDEL_NULL(language_holder)
|
||||||
@@ -372,143 +218,6 @@
|
|||||||
orbiting.end_orbit(src)
|
orbiting.end_orbit(src)
|
||||||
orbiting = null
|
orbiting = null
|
||||||
|
|
||||||
// Make sure you know what you're doing if you call this, this is intended to only be called by byond directly.
|
|
||||||
// You probably want CanPass()
|
|
||||||
/atom/movable/Cross(atom/movable/AM)
|
|
||||||
. = TRUE
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSS, AM)
|
|
||||||
return CanPass(AM, AM.loc, TRUE)
|
|
||||||
|
|
||||||
//oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called!
|
|
||||||
/atom/movable/Crossed(atom/movable/AM, oldloc)
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
|
|
||||||
|
|
||||||
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
|
|
||||||
. = ..()
|
|
||||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSS, AM) & COMPONENT_MOVABLE_BLOCK_UNCROSS)
|
|
||||||
return FALSE
|
|
||||||
if(isturf(newloc) && !CheckExit(AM, newloc))
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
/atom/movable/Uncrossed(atom/movable/AM)
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
|
|
||||||
|
|
||||||
/atom/movable/Bump(atom/A)
|
|
||||||
if(!A)
|
|
||||||
CRASH("Bump was called with no argument.")
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
|
||||||
. = ..()
|
|
||||||
if(!QDELETED(throwing))
|
|
||||||
throwing.hit_atom(A)
|
|
||||||
. = TRUE
|
|
||||||
if(QDELETED(A))
|
|
||||||
return
|
|
||||||
A.Bumped(src)
|
|
||||||
|
|
||||||
/atom/movable/proc/forceMove(atom/destination)
|
|
||||||
. = FALSE
|
|
||||||
if(destination)
|
|
||||||
. = doMove(destination)
|
|
||||||
else
|
|
||||||
CRASH("No valid destination passed into forceMove")
|
|
||||||
|
|
||||||
/atom/movable/proc/moveToNullspace()
|
|
||||||
return doMove(null)
|
|
||||||
|
|
||||||
/atom/movable/proc/doMove(atom/destination)
|
|
||||||
. = FALSE
|
|
||||||
if(destination)
|
|
||||||
if(pulledby)
|
|
||||||
pulledby.stop_pulling()
|
|
||||||
var/atom/oldloc = loc
|
|
||||||
var/same_loc = oldloc == destination
|
|
||||||
var/area/old_area = get_area(oldloc)
|
|
||||||
var/area/destarea = get_area(destination)
|
|
||||||
|
|
||||||
loc = destination
|
|
||||||
moving_diagonally = 0
|
|
||||||
|
|
||||||
if(!same_loc)
|
|
||||||
if(oldloc)
|
|
||||||
oldloc.Exited(src, destination)
|
|
||||||
if(old_area && old_area != destarea)
|
|
||||||
old_area.Exited(src, destination)
|
|
||||||
for(var/atom/movable/AM in oldloc)
|
|
||||||
AM.Uncrossed(src)
|
|
||||||
var/turf/oldturf = get_turf(oldloc)
|
|
||||||
var/turf/destturf = get_turf(destination)
|
|
||||||
var/old_z = (oldturf ? oldturf.z : null)
|
|
||||||
var/dest_z = (destturf ? destturf.z : null)
|
|
||||||
if (old_z != dest_z)
|
|
||||||
onTransitZ(old_z, dest_z)
|
|
||||||
destination.Entered(src, oldloc)
|
|
||||||
if(destarea && old_area != destarea)
|
|
||||||
destarea.Entered(src, oldloc)
|
|
||||||
|
|
||||||
for(var/atom/movable/AM in destination)
|
|
||||||
if(AM == src)
|
|
||||||
continue
|
|
||||||
AM.Crossed(src, oldloc)
|
|
||||||
|
|
||||||
Moved(oldloc, NONE, TRUE)
|
|
||||||
. = TRUE
|
|
||||||
|
|
||||||
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
|
|
||||||
else
|
|
||||||
. = TRUE
|
|
||||||
if (loc)
|
|
||||||
var/atom/oldloc = loc
|
|
||||||
var/area/old_area = get_area(oldloc)
|
|
||||||
oldloc.Exited(src, null)
|
|
||||||
if(old_area)
|
|
||||||
old_area.Exited(src, null)
|
|
||||||
loc = null
|
|
||||||
|
|
||||||
/atom/movable/proc/onTransitZ(old_z,new_z)
|
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
|
||||||
for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
|
||||||
var/atom/movable/AM = item
|
|
||||||
AM.onTransitZ(old_z,new_z)
|
|
||||||
|
|
||||||
/atom/movable/proc/setMovetype(newval)
|
|
||||||
movement_type = newval
|
|
||||||
|
|
||||||
//Called whenever an object moves and by mobs when they attempt to move themselves through space
|
|
||||||
//And when an object or action applies a force on src, see newtonian_move() below
|
|
||||||
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
|
|
||||||
//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
|
|
||||||
//movement_dir == 0 when stopping or any dir when trying to move
|
|
||||||
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
|
||||||
if(has_gravity(src))
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if(pulledby)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if(throwing)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if(!isturf(loc))
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
|
|
||||||
return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity
|
|
||||||
if(!loc || Process_Spacemove(0))
|
|
||||||
inertia_dir = 0
|
|
||||||
return 0
|
|
||||||
|
|
||||||
inertia_dir = direction
|
|
||||||
if(!direction)
|
|
||||||
return 1
|
|
||||||
inertia_last_loc = loc
|
|
||||||
SSspacedrift.processing[src] = src
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||||
set waitfor = 0
|
set waitfor = 0
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
|
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
|
||||||
@@ -610,17 +319,6 @@
|
|||||||
SSthrowing.currentrun[src] = TT
|
SSthrowing.currentrun[src] = TT
|
||||||
TT.tick()
|
TT.tick()
|
||||||
|
|
||||||
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
|
|
||||||
for(var/m in buckled_mobs)
|
|
||||||
var/mob/living/buckled_mob = m
|
|
||||||
if(!buckled_mob.Move(newloc, direct))
|
|
||||||
forceMove(buckled_mob.loc)
|
|
||||||
last_move = buckled_mob.last_move
|
|
||||||
inertia_dir = last_move
|
|
||||||
buckled_mob.inertia_dir = last_move
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/atom/movable/proc/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
/atom/movable/proc/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
@@ -639,7 +337,7 @@
|
|||||||
|
|
||||||
/atom/movable/CanPass(atom/movable/mover, turf/target)
|
/atom/movable/CanPass(atom/movable/mover, turf/target)
|
||||||
if(mover in buckled_mobs)
|
if(mover in buckled_mobs)
|
||||||
return 1
|
return TRUE
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||||
|
|||||||
@@ -0,0 +1,307 @@
|
|||||||
|
// File for movement procs for atom/movable
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////
|
||||||
|
// Here's where we rewrite how byond handles movement except slightly different
|
||||||
|
// To be removed on step_ conversion
|
||||||
|
// All this work to prevent a second bump
|
||||||
|
/atom/movable/Move(atom/newloc, direct=0)
|
||||||
|
. = FALSE
|
||||||
|
if(!newloc || newloc == loc)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!direct)
|
||||||
|
direct = get_dir(src, newloc)
|
||||||
|
setDir(direct)
|
||||||
|
|
||||||
|
if(!loc.Exit(src, newloc))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!newloc.Enter(src, src.loc))
|
||||||
|
return
|
||||||
|
|
||||||
|
// Past this is the point of no return
|
||||||
|
var/atom/oldloc = loc
|
||||||
|
var/area/oldarea = get_area(oldloc)
|
||||||
|
var/area/newarea = get_area(newloc)
|
||||||
|
loc = newloc
|
||||||
|
. = TRUE
|
||||||
|
oldloc.Exited(src, newloc)
|
||||||
|
if(oldarea != newarea)
|
||||||
|
oldarea.Exited(src, newloc)
|
||||||
|
|
||||||
|
for(var/i in oldloc)
|
||||||
|
if(i == src) // Multi tile objects
|
||||||
|
continue
|
||||||
|
var/atom/movable/thing = i
|
||||||
|
thing.Uncrossed(src)
|
||||||
|
|
||||||
|
newloc.Entered(src, oldloc)
|
||||||
|
if(oldarea != newarea)
|
||||||
|
newarea.Entered(src, oldloc)
|
||||||
|
|
||||||
|
for(var/i in loc)
|
||||||
|
if(i == src) // Multi tile objects
|
||||||
|
continue
|
||||||
|
var/atom/movable/thing = i
|
||||||
|
thing.Crossed(src)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////
|
||||||
|
|
||||||
|
/atom/movable/Move(atom/newloc, direct)
|
||||||
|
var/atom/movable/pullee = pulling
|
||||||
|
var/turf/T = loc
|
||||||
|
if(pulling)
|
||||||
|
if(pullee && get_dist(src, pullee) > 1)
|
||||||
|
stop_pulling()
|
||||||
|
|
||||||
|
if(pullee && pullee.loc != loc && !isturf(pullee.loc) ) //to be removed once all code that changes an object's loc uses forceMove().
|
||||||
|
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
|
||||||
|
stop_pulling()
|
||||||
|
if(!loc || !newloc)
|
||||||
|
return FALSE
|
||||||
|
var/atom/oldloc = loc
|
||||||
|
|
||||||
|
if(loc != newloc)
|
||||||
|
if (!(direct & (direct - 1))) //Cardinal move
|
||||||
|
. = ..()
|
||||||
|
else //Diagonal move, split it into cardinal moves
|
||||||
|
moving_diagonally = FIRST_DIAG_STEP
|
||||||
|
var/first_step_dir
|
||||||
|
// The `&& moving_diagonally` checks are so that a forceMove taking
|
||||||
|
// place due to a Crossed, Bumped, etc. call will interrupt
|
||||||
|
// the second half of the diagonal movement, or the second attempt
|
||||||
|
// at a first half if step() fails because we hit something.
|
||||||
|
if (direct & NORTH)
|
||||||
|
if (direct & EAST)
|
||||||
|
if (step(src, NORTH) && moving_diagonally)
|
||||||
|
first_step_dir = NORTH
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, EAST)
|
||||||
|
else if (moving_diagonally && step(src, EAST))
|
||||||
|
first_step_dir = EAST
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, NORTH)
|
||||||
|
else if (direct & WEST)
|
||||||
|
if (step(src, NORTH) && moving_diagonally)
|
||||||
|
first_step_dir = NORTH
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, WEST)
|
||||||
|
else if (moving_diagonally && step(src, WEST))
|
||||||
|
first_step_dir = WEST
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, NORTH)
|
||||||
|
else if (direct & SOUTH)
|
||||||
|
if (direct & EAST)
|
||||||
|
if (step(src, SOUTH) && moving_diagonally)
|
||||||
|
first_step_dir = SOUTH
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, EAST)
|
||||||
|
else if (moving_diagonally && step(src, EAST))
|
||||||
|
first_step_dir = EAST
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, SOUTH)
|
||||||
|
else if (direct & WEST)
|
||||||
|
if (step(src, SOUTH) && moving_diagonally)
|
||||||
|
first_step_dir = SOUTH
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, WEST)
|
||||||
|
else if (moving_diagonally && step(src, WEST))
|
||||||
|
first_step_dir = WEST
|
||||||
|
moving_diagonally = SECOND_DIAG_STEP
|
||||||
|
. = step(src, SOUTH)
|
||||||
|
if(moving_diagonally == SECOND_DIAG_STEP)
|
||||||
|
if(!.)
|
||||||
|
setDir(first_step_dir)
|
||||||
|
else if (!inertia_moving)
|
||||||
|
inertia_next_move = world.time + inertia_move_delay
|
||||||
|
newtonian_move(direct)
|
||||||
|
moving_diagonally = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!loc || (loc == oldloc && oldloc != newloc))
|
||||||
|
last_move = NONE
|
||||||
|
return
|
||||||
|
|
||||||
|
if(.)
|
||||||
|
last_move = direct
|
||||||
|
setDir(direct)
|
||||||
|
|
||||||
|
if(has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if(pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move.
|
||||||
|
if(pulling.anchored)
|
||||||
|
stop_pulling()
|
||||||
|
else
|
||||||
|
var/pull_dir = get_dir(src, pulling)
|
||||||
|
//puller and pullee more than one tile away or in diagonal position
|
||||||
|
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
|
||||||
|
pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
|
||||||
|
if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up
|
||||||
|
stop_pulling()
|
||||||
|
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||||
|
pulledby.stop_pulling()
|
||||||
|
|
||||||
|
Moved(oldloc, direct)
|
||||||
|
|
||||||
|
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
|
||||||
|
for(var/m in buckled_mobs)
|
||||||
|
var/mob/living/buckled_mob = m
|
||||||
|
if(!buckled_mob.Move(newloc, direct))
|
||||||
|
forceMove(buckled_mob.loc)
|
||||||
|
last_move = buckled_mob.last_move
|
||||||
|
inertia_dir = last_move
|
||||||
|
buckled_mob.inertia_dir = last_move
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
//Called after a successful Move(). By this point, we've already moved
|
||||||
|
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
|
||||||
|
if (!inertia_moving)
|
||||||
|
inertia_next_move = world.time + inertia_move_delay
|
||||||
|
newtonian_move(Dir)
|
||||||
|
if (length(client_mobs_in_contents))
|
||||||
|
update_parallax_contents()
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
// Make sure you know what you're doing if you call this, this is intended to only be called by byond directly.
|
||||||
|
// You probably want CanPass()
|
||||||
|
/atom/movable/Cross(atom/movable/AM)
|
||||||
|
. = TRUE
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSS, AM)
|
||||||
|
return CanPass(AM, AM.loc, TRUE)
|
||||||
|
|
||||||
|
//oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called!
|
||||||
|
/atom/movable/Crossed(atom/movable/AM, oldloc)
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
|
||||||
|
|
||||||
|
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
|
||||||
|
. = ..()
|
||||||
|
if(SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSS, AM) & COMPONENT_MOVABLE_BLOCK_UNCROSS)
|
||||||
|
return FALSE
|
||||||
|
if(isturf(newloc) && !CheckExit(AM, newloc))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/atom/movable/Uncrossed(atom/movable/AM)
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
|
||||||
|
|
||||||
|
/atom/movable/Bump(atom/A)
|
||||||
|
if(!A)
|
||||||
|
CRASH("Bump was called with no argument.")
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
||||||
|
. = ..()
|
||||||
|
if(!QDELETED(throwing))
|
||||||
|
throwing.hit_atom(A)
|
||||||
|
. = TRUE
|
||||||
|
if(QDELETED(A))
|
||||||
|
return
|
||||||
|
A.Bumped(src)
|
||||||
|
|
||||||
|
/atom/movable/proc/onTransitZ(old_z,new_z)
|
||||||
|
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
||||||
|
for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||||
|
var/atom/movable/AM = item
|
||||||
|
AM.onTransitZ(old_z,new_z)
|
||||||
|
|
||||||
|
/atom/movable/proc/setMovetype(newval)
|
||||||
|
movement_type = newval
|
||||||
|
|
||||||
|
///////////// FORCED MOVEMENT /////////////
|
||||||
|
|
||||||
|
/atom/movable/proc/forceMove(atom/destination)
|
||||||
|
. = FALSE
|
||||||
|
if(destination)
|
||||||
|
. = doMove(destination)
|
||||||
|
else
|
||||||
|
CRASH("No valid destination passed into forceMove")
|
||||||
|
|
||||||
|
/atom/movable/proc/moveToNullspace()
|
||||||
|
return doMove(null)
|
||||||
|
|
||||||
|
/atom/movable/proc/doMove(atom/destination)
|
||||||
|
. = FALSE
|
||||||
|
if(destination)
|
||||||
|
if(pulledby)
|
||||||
|
pulledby.stop_pulling()
|
||||||
|
var/atom/oldloc = loc
|
||||||
|
var/same_loc = oldloc == destination
|
||||||
|
var/area/old_area = get_area(oldloc)
|
||||||
|
var/area/destarea = get_area(destination)
|
||||||
|
|
||||||
|
loc = destination
|
||||||
|
moving_diagonally = 0
|
||||||
|
|
||||||
|
if(!same_loc)
|
||||||
|
if(oldloc)
|
||||||
|
oldloc.Exited(src, destination)
|
||||||
|
if(old_area && old_area != destarea)
|
||||||
|
old_area.Exited(src, destination)
|
||||||
|
for(var/atom/movable/AM in oldloc)
|
||||||
|
AM.Uncrossed(src)
|
||||||
|
var/turf/oldturf = get_turf(oldloc)
|
||||||
|
var/turf/destturf = get_turf(destination)
|
||||||
|
var/old_z = (oldturf ? oldturf.z : null)
|
||||||
|
var/dest_z = (destturf ? destturf.z : null)
|
||||||
|
if (old_z != dest_z)
|
||||||
|
onTransitZ(old_z, dest_z)
|
||||||
|
destination.Entered(src, oldloc)
|
||||||
|
if(destarea && old_area != destarea)
|
||||||
|
destarea.Entered(src, oldloc)
|
||||||
|
|
||||||
|
for(var/atom/movable/AM in destination)
|
||||||
|
if(AM == src)
|
||||||
|
continue
|
||||||
|
AM.Crossed(src, oldloc)
|
||||||
|
|
||||||
|
Moved(oldloc, NONE, TRUE)
|
||||||
|
. = TRUE
|
||||||
|
|
||||||
|
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
|
||||||
|
else
|
||||||
|
. = TRUE
|
||||||
|
if (loc)
|
||||||
|
var/atom/oldloc = loc
|
||||||
|
var/area/old_area = get_area(oldloc)
|
||||||
|
oldloc.Exited(src, null)
|
||||||
|
if(old_area)
|
||||||
|
old_area.Exited(src, null)
|
||||||
|
loc = null
|
||||||
|
|
||||||
|
//Called whenever an object moves and by mobs when they attempt to move themselves through space
|
||||||
|
//And when an object or action applies a force on src, see newtonian_move() below
|
||||||
|
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
|
||||||
|
//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
|
||||||
|
//movement_dir == 0 when stopping or any dir when trying to move
|
||||||
|
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
||||||
|
if(has_gravity(src))
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(pulledby)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(throwing)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(!isturf(loc))
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
|
||||||
|
return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity
|
||||||
|
if(!loc || Process_Spacemove(0))
|
||||||
|
inertia_dir = 0
|
||||||
|
return 0
|
||||||
|
|
||||||
|
inertia_dir = direction
|
||||||
|
if(!direction)
|
||||||
|
return 1
|
||||||
|
inertia_last_loc = loc
|
||||||
|
SSspacedrift.processing[src] = src
|
||||||
|
return 1
|
||||||
@@ -54,6 +54,6 @@
|
|||||||
return
|
return
|
||||||
var/mob/living/carbon/human/H = gangster_mind.current // we are sure the dude's human cause it's checked in attack()
|
var/mob/living/carbon/human/H = gangster_mind.current // we are sure the dude's human cause it's checked in attack()
|
||||||
H.silent = max(H.silent, 5)
|
H.silent = max(H.silent, 5)
|
||||||
H.Knockdown(100)
|
H.DefaultCombatKnockdown(100)
|
||||||
gangster_mind.add_antag_datum(/datum/antagonist/gang, gang)
|
gangster_mind.add_antag_datum(/datum/antagonist/gang, gang)
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -185,7 +185,7 @@ Class Procs:
|
|||||||
A.forceMove(T)
|
A.forceMove(T)
|
||||||
if(isliving(A))
|
if(isliving(A))
|
||||||
var/mob/living/L = A
|
var/mob/living/L = A
|
||||||
L.update_canmove()
|
L.update_mobility()
|
||||||
if(occupant)
|
if(occupant)
|
||||||
SEND_SIGNAL(src, COMSIG_MACHINE_EJECT_OCCUPANT, occupant)
|
SEND_SIGNAL(src, COMSIG_MACHINE_EJECT_OCCUPANT, occupant)
|
||||||
occupant = null
|
occupant = null
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
M.vomit(10, distance = 5)
|
M.vomit(10, distance = 5)
|
||||||
if(ORION_TRAIL_FLUX)
|
if(ORION_TRAIL_FLUX)
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
M.Knockdown(60)
|
M.DefaultCombatKnockdown(60)
|
||||||
say("A sudden gust of powerful wind slams [M] into the floor!")
|
say("A sudden gust of powerful wind slams [M] into the floor!")
|
||||||
M.take_bodypart_damage(25)
|
M.take_bodypart_damage(25)
|
||||||
playsound(loc, 'sound/weapons/genhit.ogg', 100, 1)
|
playsound(loc, 'sound/weapons/genhit.ogg', 100, 1)
|
||||||
|
|||||||
@@ -37,12 +37,11 @@
|
|||||||
dat += "[R.name] |"
|
dat += "[R.name] |"
|
||||||
if(R.stat)
|
if(R.stat)
|
||||||
dat += " Not Responding |"
|
dat += " Not Responding |"
|
||||||
else if (!R.canmove)
|
else if(R.locked_down)
|
||||||
dat += " Locked Down |"
|
dat += " Locked Down |"
|
||||||
else
|
else
|
||||||
dat += " Operating Normally |"
|
dat += " Operating Normally |"
|
||||||
if (!R.canmove)
|
if(R.cell)
|
||||||
else if(R.cell)
|
|
||||||
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
||||||
else
|
else
|
||||||
dat += " No Cell Installed |"
|
dat += " No Cell Installed |"
|
||||||
@@ -62,7 +61,7 @@
|
|||||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||||
else if(IsAdminGhost(user) && !R.emagged)
|
else if(IsAdminGhost(user) && !R.emagged)
|
||||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||||
dat += "<A href='?src=[REF(src)];stopbot=[REF(R)]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
dat += "<A href='?src=[REF(src)];stopbot=[REF(R)]'>(<font color=green><i>[R.locked_down? "Lockdown" : "Release"]</i></font>)</A> "
|
||||||
dat += "<A href='?src=[REF(src)];killbot=[REF(R)]'>(<font color=red><i>Destroy</i></font>)</A>"
|
dat += "<A href='?src=[REF(src)];killbot=[REF(R)]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||||
dat += "<BR>"
|
dat += "<BR>"
|
||||||
|
|
||||||
@@ -116,14 +115,14 @@
|
|||||||
if(src.allowed(usr))
|
if(src.allowed(usr))
|
||||||
var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) in GLOB.silicon_mobs
|
var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) in GLOB.silicon_mobs
|
||||||
if(can_control(usr, R))
|
if(can_control(usr, R))
|
||||||
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
var/choice = input("Are you certain you wish to [R.locked_down? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||||
if(choice == "Confirm" && can_control(usr, R) && !..())
|
if(choice == "Confirm" && can_control(usr, R) && !..())
|
||||||
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] [R.canmove ? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!</span>")
|
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] [R.locked_down? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!</span>")
|
||||||
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R)]!")
|
log_game("[key_name(usr)] [R.locked_down? "locked down" : "released"] [key_name(R)]!")
|
||||||
R.SetLockdown(!R.lockcharge)
|
R.SetLockdown(!R.locked_down)
|
||||||
to_chat(R, "[!R.lockcharge ? "<span class='notice'>Your lockdown has been lifted!" : "<span class='alert'>You have been locked down!"]</span>")
|
to_chat(R, "[!R.locked_down ? "<span class='notice'>Your lockdown has been lifted!" : "<span class='alert'>You have been locked down!"]</span>")
|
||||||
if(R.connected_ai)
|
if(R.connected_ai)
|
||||||
to_chat(R.connected_ai, "[!R.lockcharge ? "<span class='notice'>NOTICE - Cyborg lockdown lifted" : "<span class='alert'>ALERT - Cyborg lockdown detected"]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a></span><br>")
|
to_chat(R.connected_ai, "[!R.locked_down ? "<span class='notice'>NOTICE - Cyborg lockdown lifted" : "<span class='alert'>ALERT - Cyborg lockdown detected"]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a></span><br>")
|
||||||
|
|
||||||
else
|
else
|
||||||
to_chat(usr, "<span class='danger'>Access Denied.</span>")
|
to_chat(usr, "<span class='danger'>Access Denied.</span>")
|
||||||
|
|||||||
@@ -433,5 +433,5 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(active)
|
if(active)
|
||||||
for(var/mob/living/M in rangers)
|
for(var/mob/living/M in rangers)
|
||||||
if(prob(5+(allowed(M)*4)) && M.canmove)
|
if(prob(5+(allowed(M)*4)) && CHECK_MOBILITY(M, MOBILITY_MOVE))
|
||||||
dance(M)
|
dance(M)
|
||||||
|
|||||||
@@ -769,7 +769,7 @@
|
|||||||
if(!istype(H.head, /obj/item/clothing/head/helmet))
|
if(!istype(H.head, /obj/item/clothing/head/helmet))
|
||||||
H.visible_message("<span class='danger'>[user] headbutts the airlock.</span>", \
|
H.visible_message("<span class='danger'>[user] headbutts the airlock.</span>", \
|
||||||
"<span class='userdanger'>You headbutt the airlock!</span>")
|
"<span class='userdanger'>You headbutt the airlock!</span>")
|
||||||
H.Knockdown(100)
|
H.DefaultCombatKnockdown(100)
|
||||||
H.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
|
H.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
|
||||||
else
|
else
|
||||||
visible_message("<span class='danger'>[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.</span>")
|
visible_message("<span class='danger'>[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.</span>")
|
||||||
@@ -1033,7 +1033,7 @@
|
|||||||
if(!I.use_tool(src, user, 150, volume=50))
|
if(!I.use_tool(src, user, 150, volume=50))
|
||||||
to_chat(user, "<span class='warning'>You slip and [charge] detonates!</span>")
|
to_chat(user, "<span class='warning'>You slip and [charge] detonates!</span>")
|
||||||
charge.ex_act(EXPLODE_DEVASTATE)
|
charge.ex_act(EXPLODE_DEVASTATE)
|
||||||
user.Knockdown(60)
|
user.DefaultCombatKnockdown(60)
|
||||||
return
|
return
|
||||||
user.visible_message("<span class='notice'>[user] removes [charge] from [src].</span>", \
|
user.visible_message("<span class='notice'>[user] removes [charge] from [src].</span>", \
|
||||||
"<span class='notice'>You gently pry out [charge] from [src] and unhook its wires.</span>")
|
"<span class='notice'>You gently pry out [charge] from [src] and unhook its wires.</span>")
|
||||||
|
|||||||
@@ -508,7 +508,7 @@
|
|||||||
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||||
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
||||||
flash_color(L, flash_color="#960000", flash_time=20)
|
flash_color(L, flash_color="#960000", flash_time=20)
|
||||||
L.Knockdown(40)
|
L.DefaultCombatKnockdown(40)
|
||||||
L.throw_at(throwtarget, 5, 1)
|
L.throw_at(throwtarget, 5, 1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -319,10 +319,10 @@
|
|||||||
else if(ishuman(L)) //For humans
|
else if(ishuman(L)) //For humans
|
||||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||||
L.emote("scream")
|
L.emote("scream")
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
else if(ismonkey(L)) //For monkeys
|
else if(ismonkey(L)) //For monkeys
|
||||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
else //for simple_animals & borgs
|
else //for simple_animals & borgs
|
||||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||||
var/turf/location = get_turf(src)
|
var/turf/location = get_turf(src)
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if(L.flash_act(affect_silicon = 1))
|
if(L.flash_act(affect_silicon = 1))
|
||||||
L.Knockdown(strength)
|
L.DefaultCombatKnockdown(strength)
|
||||||
flashed = TRUE
|
flashed = TRUE
|
||||||
|
|
||||||
if(flashed)
|
if(flashed)
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ Buildable meters
|
|||||||
set name = "Flip Pipe"
|
set name = "Flip Pipe"
|
||||||
set src in view(1)
|
set src in view(1)
|
||||||
|
|
||||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
var/mob/living/L = usr
|
||||||
|
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
|
|
||||||
do_a_flip()
|
do_a_flip()
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
/obj/machinery/pipedispenser/Topic(href, href_list)
|
/obj/machinery/pipedispenser/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
return 1
|
return 1
|
||||||
if(!anchored|| !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
var/mob/living/L = usr
|
||||||
|
if(!anchored || !istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
usr << browse(null, "window=pipedispenser")
|
usr << browse(null, "window=pipedispenser")
|
||||||
return 1
|
return 1
|
||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
@@ -93,14 +94,14 @@
|
|||||||
|
|
||||||
|
|
||||||
//Allow you to drag-drop disposal pipes and transit tubes into it
|
//Allow you to drag-drop disposal pipes and transit tubes into it
|
||||||
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/usr)
|
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/living/user)
|
||||||
if(!usr.canmove || usr.stat || usr.restrained())
|
if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
|
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 )
|
if (get_dist(user, src) > 1 || get_dist(src,pipe) > 1 )
|
||||||
return
|
return
|
||||||
|
|
||||||
if (pipe.anchored)
|
if (pipe.anchored)
|
||||||
|
|||||||
@@ -226,8 +226,7 @@
|
|||||||
return
|
return
|
||||||
if(M.health > 0)
|
if(M.health > 0)
|
||||||
M.adjustOxyLoss(-1)
|
M.adjustOxyLoss(-1)
|
||||||
M.AdjustStun(-80)
|
M.AdjustAllImmobility(-80)
|
||||||
M.AdjustKnockdown(-80)
|
|
||||||
M.AdjustUnconscious(-80)
|
M.AdjustUnconscious(-80)
|
||||||
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
|
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
|
||||||
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
|
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
M.SetSleeping(0)
|
M.SetSleeping(0)
|
||||||
M.stuttering += 20
|
M.stuttering += 20
|
||||||
M.adjustEarDamage(0, 30)
|
M.adjustEarDamage(0, 30)
|
||||||
M.Knockdown(60)
|
M.DefaultCombatKnockdown(60)
|
||||||
if(prob(30))
|
if(prob(30))
|
||||||
M.Stun(200)
|
M.Stun(200)
|
||||||
M.Unconscious(80)
|
M.Unconscious(80)
|
||||||
|
|||||||
@@ -755,7 +755,7 @@
|
|||||||
AI.cancel_camera()
|
AI.cancel_camera()
|
||||||
AI.controlled_mech = src
|
AI.controlled_mech = src
|
||||||
AI.remote_control = src
|
AI.remote_control = src
|
||||||
AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
AI.mobility_flags = MOBILITY_FLAGS_DEFAULT //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
||||||
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
|
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
|
||||||
to_chat(AI, AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" :\
|
to_chat(AI, AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" :\
|
||||||
"<span class='notice'>You have been uploaded to a mech's onboard computer.</span>")
|
"<span class='notice'>You have been uploaded to a mech's onboard computer.</span>")
|
||||||
@@ -927,7 +927,7 @@
|
|||||||
brainmob.forceMove(src) //should allow relaymove
|
brainmob.forceMove(src) //should allow relaymove
|
||||||
brainmob.reset_perspective(src)
|
brainmob.reset_perspective(src)
|
||||||
brainmob.remote_control = src
|
brainmob.remote_control = src
|
||||||
brainmob.update_canmove()
|
brainmob.update_mobility()
|
||||||
brainmob.update_mouse_pointer()
|
brainmob.update_mouse_pointer()
|
||||||
icon_state = initial(icon_state)
|
icon_state = initial(icon_state)
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -941,7 +941,6 @@
|
|||||||
/obj/mecha/container_resist(mob/living/user)
|
/obj/mecha/container_resist(mob/living/user)
|
||||||
go_out()
|
go_out()
|
||||||
|
|
||||||
|
|
||||||
/obj/mecha/Exited(atom/movable/M, atom/newloc)
|
/obj/mecha/Exited(atom/movable/M, atom/newloc)
|
||||||
if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
|
if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
|
||||||
go_out(TRUE, newloc)
|
go_out(TRUE, newloc)
|
||||||
@@ -993,7 +992,7 @@
|
|||||||
L.reset_perspective()
|
L.reset_perspective()
|
||||||
mmi.mecha = null
|
mmi.mecha = null
|
||||||
mmi.update_icon()
|
mmi.update_icon()
|
||||||
L.canmove = 0
|
L.mobility_flags = NONE
|
||||||
icon_state = initial(icon_state)+"-open"
|
icon_state = initial(icon_state)+"-open"
|
||||||
setDir(dir_in)
|
setDir(dir_in)
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,7 @@
|
|||||||
|
|
||||||
//procs that handle the actual buckling and unbuckling
|
//procs that handle the actual buckling and unbuckling
|
||||||
/atom/movable/proc/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
/atom/movable/proc/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||||
if(!buckled_mobs)
|
LAZYINITLIST(buckled_mobs)
|
||||||
buckled_mobs = list()
|
|
||||||
|
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -66,7 +65,7 @@
|
|||||||
M.buckled = src
|
M.buckled = src
|
||||||
M.setDir(dir)
|
M.setDir(dir)
|
||||||
buckled_mobs |= M
|
buckled_mobs |= M
|
||||||
M.update_canmove()
|
M.update_mobility()
|
||||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
|
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
|
||||||
post_buckle_mob(M)
|
post_buckle_mob(M)
|
||||||
|
|
||||||
@@ -85,7 +84,7 @@
|
|||||||
. = buckled_mob
|
. = buckled_mob
|
||||||
buckled_mob.buckled = null
|
buckled_mob.buckled = null
|
||||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||||
buckled_mob.update_canmove()
|
buckled_mob.update_mobility()
|
||||||
buckled_mob.clear_alert("buckled")
|
buckled_mob.clear_alert("buckled")
|
||||||
buckled_mobs -= buckled_mob
|
buckled_mobs -= buckled_mob
|
||||||
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
|
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
|
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
|
||||||
if(boing && isliving(A) && !A.stat)
|
if(boing && isliving(A) && !A.stat)
|
||||||
A.Knockdown(40)
|
A.DefaultCombatKnockdown(40)
|
||||||
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
|
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
|
||||||
A.throw_at(target, 5, 1)
|
A.throw_at(target, 5, 1)
|
||||||
boing = 0
|
boing = 0
|
||||||
|
|||||||
@@ -105,3 +105,4 @@
|
|||||||
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
||||||
"<span class='italics'>You hear an explosion!</span>")
|
"<span class='italics'>You hear an explosion!</span>")
|
||||||
dyn_explosion(location, amount, flashing_factor)
|
dyn_explosion(location, amount, flashing_factor)
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
||||||
if(isliving(victim))
|
if(isliving(victim))
|
||||||
victim.Knockdown(stun_time)
|
victim.DefaultCombatKnockdown(stun_time)
|
||||||
|
|
||||||
/obj/effect/mine/kickmine
|
/obj/effect/mine/kickmine
|
||||||
name = "kick mine"
|
name = "kick mine"
|
||||||
|
|||||||
@@ -61,10 +61,11 @@
|
|||||||
if(AM in T.affecting)
|
if(AM in T.affecting)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(ismob(AM))
|
if(isliving(AM))
|
||||||
var/mob/M = AM
|
var/mob/living/M = AM
|
||||||
if(immobilize)
|
if(immobilize)
|
||||||
M.canmove = 0
|
ADD_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
|
||||||
|
M.update_mobility()
|
||||||
|
|
||||||
affecting.Add(AM)
|
affecting.Add(AM)
|
||||||
while(AM && !stopthrow)
|
while(AM && !stopthrow)
|
||||||
@@ -98,10 +99,11 @@
|
|||||||
|
|
||||||
affecting.Remove(AM)
|
affecting.Remove(AM)
|
||||||
|
|
||||||
if(ismob(AM))
|
if(isliving(AM))
|
||||||
var/mob/M = AM
|
var/mob/living/M = AM
|
||||||
if(immobilize)
|
if(immobilize)
|
||||||
M.canmove = 1
|
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
|
||||||
|
M.update_mobility()
|
||||||
|
|
||||||
/* Stops things thrown by a thrower, doesn't do anything */
|
/* Stops things thrown by a thrower, doesn't do anything */
|
||||||
|
|
||||||
|
|||||||
@@ -175,14 +175,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
|
|
||||||
if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
|
var/mob/living/L = usr
|
||||||
|
if(!istype(L) || !isturf(loc) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/turf/T = src.loc
|
var/turf/T = loc
|
||||||
|
loc = null
|
||||||
src.loc = null
|
loc = T
|
||||||
|
|
||||||
src.loc = T
|
|
||||||
|
|
||||||
/obj/item/examine(mob/user) //This might be spammy. Remove?
|
/obj/item/examine(mob/user) //This might be spammy. Remove?
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -544,7 +543,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
|
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
|
||||||
M.adjust_blurriness(10)
|
M.adjust_blurriness(10)
|
||||||
M.Unconscious(20)
|
M.Unconscious(20)
|
||||||
M.Knockdown(40)
|
M.DefaultCombatKnockdown(40)
|
||||||
if (prob(eyes.damage - 10 + 1))
|
if (prob(eyes.damage - 10 + 1))
|
||||||
M.become_blind(EYE_DAMAGE)
|
M.become_blind(EYE_DAMAGE)
|
||||||
to_chat(M, "<span class='danger'>You go blind!</span>")
|
to_chat(M, "<span class='danger'>You go blind!</span>")
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
||||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
||||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||||
M.Knockdown(300, 1, 0)
|
M.DefaultCombatKnockdown(300, 1, 0)
|
||||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||||
sp.set_up(5, 1, src)
|
sp.set_up(5, 1, src)
|
||||||
sp.start()
|
sp.start()
|
||||||
|
|||||||
@@ -694,7 +694,7 @@
|
|||||||
C.blind_eyes(1)
|
C.blind_eyes(1)
|
||||||
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
|
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
|
||||||
C.confused = max(C.confused, 3)
|
C.confused = max(C.confused, 3)
|
||||||
C.Knockdown(60)
|
C.DefaultCombatKnockdown(60)
|
||||||
if(ishuman(C) && actually_paints)
|
if(ishuman(C) && actually_paints)
|
||||||
var/mob/living/carbon/human/H = C
|
var/mob/living/carbon/human/H = C
|
||||||
H.lip_style = "spray_face"
|
H.lip_style = "spray_face"
|
||||||
|
|||||||
@@ -449,7 +449,7 @@
|
|||||||
M.visible_message("<span class='danger'>[user] zaps [M] with [src]!</span>", \
|
M.visible_message("<span class='danger'>[user] zaps [M] with [src]!</span>", \
|
||||||
"<span class='userdanger'>[user] zaps [M] with [src]!</span>")
|
"<span class='userdanger'>[user] zaps [M] with [src]!</span>")
|
||||||
M.adjustStaminaLoss(50)
|
M.adjustStaminaLoss(50)
|
||||||
M.Knockdown(100)
|
M.DefaultCombatKnockdown(100)
|
||||||
M.updatehealth() //forces health update before next life tick
|
M.updatehealth() //forces health update before next life tick
|
||||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||||
M.emote("gasp")
|
M.emote("gasp")
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
H.set_heartattack(TRUE)
|
H.set_heartattack(TRUE)
|
||||||
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
||||||
log_combat(user, H, "overloaded the heart of", defib)
|
log_combat(user, H, "overloaded the heart of", defib)
|
||||||
H.Knockdown(100)
|
H.DefaultCombatKnockdown(100)
|
||||||
H.Jitter(100)
|
H.Jitter(100)
|
||||||
if(req_defib)
|
if(req_defib)
|
||||||
defib.deductcharge(revivecost)
|
defib.deductcharge(revivecost)
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
var/mob/living/U = usr
|
var/mob/living/U = usr
|
||||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||||
|
|
||||||
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !href_list["close"])
|
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE) && !href_list["close"])
|
||||||
add_fingerprint(U)
|
add_fingerprint(U)
|
||||||
U.set_machine(src)
|
U.set_machine(src)
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
var/t = stripped_input(U, "Please enter message", name)
|
var/t = stripped_input(U, "Please enter message", name)
|
||||||
if (!t || toff)
|
if (!t || toff)
|
||||||
return
|
return
|
||||||
if(!U.canUseTopic(src, BE_CLOSE))
|
if(!U.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE))
|
||||||
return
|
return
|
||||||
if(emped)
|
if(emped)
|
||||||
t = Gibberish(t, 100)
|
t = Gibberish(t, 100)
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
//chance to actually hit the eyes depends on internal component
|
//chance to actually hit the eyes depends on internal component
|
||||||
if(prob(effectchance * diode.rating))
|
if(prob(effectchance * diode.rating))
|
||||||
S.flash_act(affect_silicon = 1)
|
S.flash_act(affect_silicon = 1)
|
||||||
S.Knockdown(rand(100,200))
|
S.DefaultCombatKnockdown(rand(100,200))
|
||||||
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
|
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
|
||||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
|
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
|
||||||
else
|
else
|
||||||
@@ -152,8 +152,7 @@
|
|||||||
if(prob(50))
|
if(prob(50))
|
||||||
C.visible_message("<span class='notice'>[C] pounces on the light!</span>","<span class='warning'>LIGHT!</span>")
|
C.visible_message("<span class='notice'>[C] pounces on the light!</span>","<span class='warning'>LIGHT!</span>")
|
||||||
C.Move(targloc)
|
C.Move(targloc)
|
||||||
C.resting = TRUE
|
C.set_resting(TRUE)
|
||||||
C.update_canmove()
|
|
||||||
else
|
else
|
||||||
C.visible_message("<span class='notice'>[C] looks uninterested in your games.</span>","<span class='warning'>You spot [user] shining [src] at you. How insulting!</span>")
|
C.visible_message("<span class='notice'>[C] looks uninterested in your games.</span>","<span class='warning'>You spot [user] shining [src] at you. How insulting!</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
s.set_up(3, 1, L)
|
s.set_up(3, 1, L)
|
||||||
s.start()
|
s.start()
|
||||||
|
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
|
|
||||||
if(master)
|
if(master)
|
||||||
master.receive_signal()
|
master.receive_signal()
|
||||||
@@ -192,7 +192,7 @@ Code:
|
|||||||
s.set_up(3, 1, L)
|
s.set_up(3, 1, L)
|
||||||
s.start()
|
s.start()
|
||||||
|
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
|
|
||||||
if(master)
|
if(master)
|
||||||
master.receive_signal()
|
master.receive_signal()
|
||||||
|
|||||||
@@ -484,7 +484,8 @@ SLIME SCANNER
|
|||||||
set name = "Switch Verbosity"
|
set name = "Switch Verbosity"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
|
|
||||||
if(usr.stat || !usr.canmove || usr.restrained())
|
var/mob/living/L = usr
|
||||||
|
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
|
|
||||||
mode = !mode
|
mode = !mode
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ effective or pretty fucking useless.
|
|||||||
for(var/mob/living/carbon/human/M in urange(10, user, 1))
|
for(var/mob/living/carbon/human/M in urange(10, user, 1))
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
|
|
||||||
M.Knockdown(rand(200,400))
|
M.DefaultCombatKnockdown(rand(200,400))
|
||||||
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -294,7 +294,7 @@
|
|||||||
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
|
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
|
||||||
..()
|
..()
|
||||||
to_chat(user,"<span class='warning'>You're knocked down!</span>")
|
to_chat(user,"<span class='warning'>You're knocked down!</span>")
|
||||||
user.Knockdown(40)
|
user.DefaultCombatKnockdown(40)
|
||||||
|
|
||||||
/obj/item/book/granter/spell/barnyard
|
/obj/item/book/granter/spell/barnyard
|
||||||
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
|
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
M.show_message("<span class='warning'>BANG</span>", MSG_AUDIBLE)
|
M.show_message("<span class='warning'>BANG</span>", MSG_AUDIBLE)
|
||||||
var/distance = get_dist(get_turf(M), source)
|
var/distance = get_dist(get_turf(M), source)
|
||||||
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
|
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
|
||||||
M.Knockdown(200)
|
M.DefaultCombatKnockdown(200)
|
||||||
M.soundbang_act(1, 200, 10, 15)
|
M.soundbang_act(1, 200, 10, 15)
|
||||||
else
|
else
|
||||||
M.soundbang_act(1, max(200/max(1,distance), 60), rand(0, 5))
|
M.soundbang_act(1, max(200/max(1,distance), 60), rand(0, 5))
|
||||||
@@ -41,4 +41,4 @@
|
|||||||
return
|
return
|
||||||
var/distance = get_dist(get_turf(M), source)
|
var/distance = get_dist(get_turf(M), source)
|
||||||
if(M.flash_act(affect_silicon = 1))
|
if(M.flash_act(affect_silicon = 1))
|
||||||
M.Knockdown(max(200/max(1,distance), 60))
|
M.DefaultCombatKnockdown(max(200/max(1,distance), 60))
|
||||||
|
|||||||
@@ -349,7 +349,7 @@
|
|||||||
C.update_inv_legcuffed()
|
C.update_inv_legcuffed()
|
||||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||||
C.Knockdown(knockdown)
|
C.DefaultCombatKnockdown(knockdown)
|
||||||
|
|
||||||
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
|
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
|
||||||
name = "reinforced bola"
|
name = "reinforced bola"
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
master.emote("scream")
|
master.emote("scream")
|
||||||
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
||||||
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||||
master.Knockdown(60)
|
master.DefaultCombatKnockdown(60)
|
||||||
master.adjustBruteLoss(master.maxHealth)
|
master.adjustBruteLoss(master.maxHealth)
|
||||||
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -64,16 +64,16 @@
|
|||||||
else
|
else
|
||||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||||
|
|
||||||
/obj/item/holybeacon/proc/beacon_armor(mob/M)
|
/obj/item/holybeacon/proc/beacon_armor(mob/living/L)
|
||||||
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
|
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
|
||||||
var/list/display_names = list()
|
var/list/display_names = list()
|
||||||
for(var/V in holy_armor_list)
|
for(var/V in holy_armor_list)
|
||||||
var/atom/A = V
|
var/atom/A = V
|
||||||
display_names += list(initial(A.name) = A)
|
display_names += list(initial(A.name) = A)
|
||||||
|
|
||||||
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
|
var/choice = input(L,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
|
||||||
var/turf/T = get_turf(M)
|
var/turf/T = get_turf(src)
|
||||||
if(!T || QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type)
|
if(!T || QDELETED(src) || !choice || !CHECK_MOBILITY(L, MOBILITY_USE) || !in_range(L, src) || GLOB.holy_armor_type)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/index = display_names.Find(choice)
|
var/index = display_names.Find(choice)
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
if(holy_armor_box)
|
if(holy_armor_box)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
M.put_in_hands(holy_armor_box)
|
L.put_in_hands(holy_armor_box)
|
||||||
|
|
||||||
/obj/item/storage/box/holy
|
/obj/item/storage/box/holy
|
||||||
name = "Templar Kit"
|
name = "Templar Kit"
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
if(user.mind && (user.mind.isholy) && !reskinned)
|
if(user.mind && (user.mind.isholy) && !reskinned)
|
||||||
reskin_holy_weapon(user)
|
reskin_holy_weapon(user)
|
||||||
|
|
||||||
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
|
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
|
||||||
if(GLOB.holy_weapon_type)
|
if(GLOB.holy_weapon_type)
|
||||||
return
|
return
|
||||||
var/obj/item/holy_weapon
|
var/obj/item/holy_weapon
|
||||||
@@ -255,8 +255,8 @@
|
|||||||
if (initial(rodtype.chaplain_spawnable))
|
if (initial(rodtype.chaplain_spawnable))
|
||||||
display_names[initial(rodtype.name)] = rodtype
|
display_names[initial(rodtype.name)] = rodtype
|
||||||
|
|
||||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
|
if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
|
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
if(holy_weapon)
|
if(holy_weapon)
|
||||||
holy_weapon.reskinned = TRUE
|
holy_weapon.reskinned = TRUE
|
||||||
qdel(src)
|
qdel(src)
|
||||||
M.put_in_active_hand(holy_weapon)
|
L.put_in_active_hand(holy_weapon)
|
||||||
|
|
||||||
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
|
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
|
||||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||||
@@ -674,7 +674,7 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||||
user.Knockdown(60)
|
user.DefaultCombatKnockdown(60)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||||
|
|||||||
@@ -71,8 +71,7 @@
|
|||||||
if(stimulant)
|
if(stimulant)
|
||||||
if(isliving(loc))
|
if(isliving(loc))
|
||||||
var/mob/living/L = loc
|
var/mob/living/L = loc
|
||||||
L.SetStun(0)
|
L.SetAllImmobility(0)
|
||||||
L.SetKnockdown(0)
|
|
||||||
L.SetSleeping(0)
|
L.SetSleeping(0)
|
||||||
L.SetUnconscious(0)
|
L.SetUnconscious(0)
|
||||||
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
|
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
return
|
return
|
||||||
if(message && imp_in.stat == CONSCIOUS)
|
if(message && imp_in.stat == CONSCIOUS)
|
||||||
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
|
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
|
||||||
imp_in.Knockdown(140)
|
imp_in.DefaultCombatKnockdown(140)
|
||||||
|
|
||||||
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
|
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
|
||||||
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
|
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
|
||||||
|
|||||||
@@ -200,7 +200,7 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||||
user.Knockdown(60 * force)
|
user.DefaultCombatKnockdown(60 * force)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
if(check_martial_counter(H, user))
|
if(check_martial_counter(H, user))
|
||||||
return
|
return
|
||||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||||
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||||
log_combat(user, target, "stunned", src)
|
log_combat(user, target, "stunned", src)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
if(pressureSetting >= 3 && iscarbon(user))
|
if(pressureSetting >= 3 && iscarbon(user))
|
||||||
var/mob/living/carbon/C = user
|
var/mob/living/carbon/C = user
|
||||||
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||||
C.Knockdown(60)
|
C.DefaultCombatKnockdown(60)
|
||||||
|
|
||||||
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||||
if(fire_mode == PCANNON_FIREALL)
|
if(fire_mode == PCANNON_FIREALL)
|
||||||
|
|||||||
@@ -64,8 +64,7 @@
|
|||||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||||
H.adjustBruteLoss(-15)
|
H.adjustBruteLoss(-15)
|
||||||
H.adjustFireLoss(-15)
|
H.adjustFireLoss(-15)
|
||||||
H.AdjustStun(-40)
|
H.AdjustAllImmobility(-40)
|
||||||
H.AdjustKnockdown(-40)
|
|
||||||
H.AdjustUnconscious(-40)
|
H.AdjustUnconscious(-40)
|
||||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
user.do_attack_animation(M)
|
user.do_attack_animation(M)
|
||||||
M.Knockdown(100)
|
M.DefaultCombatKnockdown(100)
|
||||||
M.apply_effect(EFFECT_STUTTER, 5)
|
M.apply_effect(EFFECT_STUTTER, 5)
|
||||||
|
|
||||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||||
@@ -81,8 +81,7 @@
|
|||||||
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
|
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
|
||||||
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
|
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
|
||||||
if(M.resting && !M.recoveringstam)
|
if(M.resting && !M.recoveringstam)
|
||||||
M.resting = FALSE
|
M.set_resting(FALSE, TRUE)
|
||||||
M.update_canmove()
|
|
||||||
else
|
else
|
||||||
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
||||||
"<span class='notice'>You pet [M]!</span>")
|
"<span class='notice'>You pet [M]!</span>")
|
||||||
@@ -100,9 +99,8 @@
|
|||||||
else
|
else
|
||||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||||
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
||||||
if(M.resting && !M.recoveringstam)
|
if(!CHECK_MOBILITY(M, MOBILITY_STAND) && !M.recoveringstam)
|
||||||
M.resting = FALSE
|
M.set_resting(FALSE, TRUE)
|
||||||
M.update_canmove()
|
|
||||||
else
|
else
|
||||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||||
"<span class='warning'>You bop [M] on the head!</span>")
|
"<span class='warning'>You bop [M] on the head!</span>")
|
||||||
@@ -114,7 +112,6 @@
|
|||||||
M.electrocute_act(5, "[user]", safety = 1)
|
M.electrocute_act(5, "[user]", safety = 1)
|
||||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||||
M.update_canmove()
|
|
||||||
else
|
else
|
||||||
if(!iscyborg(M))
|
if(!iscyborg(M))
|
||||||
M.adjustFireLoss(10)
|
M.adjustFireLoss(10)
|
||||||
@@ -326,7 +323,7 @@
|
|||||||
C.stuttering += 10
|
C.stuttering += 10
|
||||||
C.Jitter(10)
|
C.Jitter(10)
|
||||||
if(2)
|
if(2)
|
||||||
C.Knockdown(40)
|
C.DefaultCombatKnockdown(40)
|
||||||
C.confused += 10
|
C.confused += 10
|
||||||
C.stuttering += 15
|
C.stuttering += 15
|
||||||
C.Jitter(25)
|
C.Jitter(25)
|
||||||
|
|||||||
@@ -317,8 +317,7 @@
|
|||||||
O.robot_suit = src
|
O.robot_suit = src
|
||||||
|
|
||||||
if(!locomotion)
|
if(!locomotion)
|
||||||
O.lockcharge = 1
|
O.SetLockdown(TRUE)
|
||||||
O.update_canmove()
|
|
||||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -356,8 +355,7 @@
|
|||||||
forceMove(O)
|
forceMove(O)
|
||||||
O.robot_suit = src
|
O.robot_suit = src
|
||||||
if(!locomotion)
|
if(!locomotion)
|
||||||
O.lockcharge = TRUE
|
O.SetLockdown(TRUE)
|
||||||
O.update_canmove()
|
|
||||||
|
|
||||||
else if(istype(W, /obj/item/pen))
|
else if(istype(W, /obj/item/pen))
|
||||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||||
|
|||||||
@@ -577,7 +577,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
R.notransform = TRUE
|
R.notransform = TRUE
|
||||||
var/prev_lockcharge = R.lockcharge
|
var/prev_locked_down = R.locked_down
|
||||||
R.SetLockdown(1)
|
R.SetLockdown(1)
|
||||||
R.anchored = TRUE
|
R.anchored = TRUE
|
||||||
var/datum/effect_system/smoke_spread/smoke = new
|
var/datum/effect_system/smoke_spread/smoke = new
|
||||||
@@ -587,7 +587,7 @@
|
|||||||
for(var/i in 1 to 4)
|
for(var/i in 1 to 4)
|
||||||
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
||||||
sleep(12)
|
sleep(12)
|
||||||
if(!prev_lockcharge)
|
if(!prev_locked_down)
|
||||||
R.SetLockdown(0)
|
R.SetLockdown(0)
|
||||||
R.anchored = FALSE
|
R.anchored = FALSE
|
||||||
R.notransform = FALSE
|
R.notransform = FALSE
|
||||||
|
|||||||
@@ -246,7 +246,8 @@
|
|||||||
set name = "Activate Seed Extraction"
|
set name = "Activate Seed Extraction"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set desc = "Activate to convert your plants into plantable seeds."
|
set desc = "Activate to convert your plants into plantable seeds."
|
||||||
if(usr.stat || !usr.canmove || usr.restrained())
|
var/mob/living/L = usr
|
||||||
|
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
for(var/obj/item/O in contents)
|
for(var/obj/item/O in contents)
|
||||||
seedify(O, 1)
|
seedify(O, 1)
|
||||||
@@ -353,7 +354,7 @@
|
|||||||
|
|
||||||
if(ishuman(M) || ismonkey(M))
|
if(ishuman(M) || ismonkey(M))
|
||||||
if(prob(10))
|
if(prob(10))
|
||||||
M.Knockdown(40)
|
M.DefaultCombatKnockdown(40)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/item/storage/bag/tray/update_overlays()
|
/obj/item/storage/bag/tray/update_overlays()
|
||||||
|
|||||||
@@ -191,7 +191,7 @@
|
|||||||
|
|
||||||
if(!disarming)
|
if(!disarming)
|
||||||
if(knockdown)
|
if(knockdown)
|
||||||
L.Knockdown(50, override_stamdmg = 0) //knockdown
|
L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown
|
||||||
L.adjustStaminaLoss(stunpwr)
|
L.adjustStaminaLoss(stunpwr)
|
||||||
else
|
else
|
||||||
L.drop_all_held_items() //no knockdown/stamina damage, instead disarm.
|
L.drop_all_held_items() //no knockdown/stamina damage, instead disarm.
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||||
user.Knockdown(stamforce*6)
|
user.DefaultCombatKnockdown(stamforce*6)
|
||||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||||
deductcharge(hitcost)
|
deductcharge(hitcost)
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||||
user.Knockdown(stamforce * 6)
|
user.DefaultCombatKnockdown(stamforce * 6)
|
||||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||||
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
|
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
|
||||||
deductcharge(hitcost)
|
deductcharge(hitcost)
|
||||||
|
|||||||
@@ -1078,8 +1078,13 @@
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/toy/cards/singlecard/attack_self(mob/user)
|
/obj/item/toy/cards/singlecard/attack_self(mob/living/user)
|
||||||
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
|
. = ..()
|
||||||
|
if(.)
|
||||||
|
return
|
||||||
|
if(!ishuman(user))
|
||||||
|
return
|
||||||
|
if(!CHECK_MOBILITY(user, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
Flip()
|
Flip()
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
if(structureclimber && structureclimber != user)
|
if(structureclimber && structureclimber != user)
|
||||||
user.changeNext_move(CLICK_CD_MELEE)
|
user.changeNext_move(CLICK_CD_MELEE)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
structureclimber.Knockdown(40)
|
structureclimber.DefaultCombatKnockdown(40)
|
||||||
structureclimber.visible_message("<span class='warning'>[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].</span>")
|
structureclimber.visible_message("<span class='warning'>[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].</span>")
|
||||||
|
|
||||||
/obj/structure/ui_act(action, params)
|
/obj/structure/ui_act(action, params)
|
||||||
@@ -45,7 +45,8 @@
|
|||||||
if(!climbable)
|
if(!climbable)
|
||||||
return
|
return
|
||||||
if(user == O && iscarbon(O))
|
if(user == O && iscarbon(O))
|
||||||
if(user.canmove)
|
var/mob/living/L = O
|
||||||
|
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
|
||||||
climb_structure(user)
|
climb_structure(user)
|
||||||
return
|
return
|
||||||
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
|
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
|
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
|
||||||
var/C = new item_chair(loc)
|
var/C = new item_chair(loc)
|
||||||
user.put_in_hands(C)
|
user.put_in_hands(C)
|
||||||
poordude.Knockdown(20)//rip in peace
|
poordude.DefaultCombatKnockdown(20)//rip in peace
|
||||||
user.adjustStaminaLoss(5)
|
user.adjustStaminaLoss(5)
|
||||||
unbuckle_all_mobs(TRUE)
|
unbuckle_all_mobs(TRUE)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
if(iscarbon(target))
|
if(iscarbon(target))
|
||||||
var/mob/living/carbon/C = target
|
var/mob/living/carbon/C = target
|
||||||
if(C.health < C.maxHealth*0.5)
|
if(C.health < C.maxHealth*0.5)
|
||||||
C.Knockdown(20)
|
C.DefaultCombatKnockdown(20)
|
||||||
smash(user)
|
smash(user)
|
||||||
|
|
||||||
/obj/item/chair/greyscale
|
/obj/item/chair/greyscale
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
"<span class='italics'>You hear a loud metal bang.</span>")
|
"<span class='italics'>You hear a loud metal bang.</span>")
|
||||||
var/mob/living/L = O
|
var/mob/living/L = O
|
||||||
if(!issilicon(L))
|
if(!issilicon(L))
|
||||||
L.Knockdown(40)
|
L.DefaultCombatKnockdown(40)
|
||||||
O.forceMove(T)
|
O.forceMove(T)
|
||||||
close()
|
close()
|
||||||
else
|
else
|
||||||
@@ -474,8 +474,9 @@
|
|||||||
set category = "Object"
|
set category = "Object"
|
||||||
set name = "Toggle Open"
|
set name = "Toggle Open"
|
||||||
|
|
||||||
if(!usr.canmove || usr.stat || usr.restrained())
|
var/mob/living/L = usr
|
||||||
return
|
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
||||||
return attack_hand(usr)
|
return attack_hand(usr)
|
||||||
@@ -510,7 +511,7 @@
|
|||||||
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
|
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
|
||||||
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
|
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
|
||||||
"<span class='italics'>You hear banging from [src].</span>")
|
"<span class='italics'>You hear banging from [src].</span>")
|
||||||
if(do_after(user,(breakout_time), target = src))
|
if(do_after(user,(breakout_time), target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||||
return
|
return
|
||||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||||
@@ -603,12 +604,12 @@
|
|||||||
step_towards(user, T2)
|
step_towards(user, T2)
|
||||||
T1 = get_turf(user)
|
T1 = get_turf(user)
|
||||||
if(T1 == T2)
|
if(T1 == T2)
|
||||||
user.resting = TRUE //so people can jump into crates without slamming the lid on their head
|
user.set_resting(TRUE, TRUE)
|
||||||
if(!close(user))
|
if(!close(user))
|
||||||
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
|
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
|
||||||
user.resting = FALSE
|
user.set_resting(FALSE, TRUE)
|
||||||
return
|
return
|
||||||
user.resting = FALSE
|
user.set_resting(FALSE, TRUE)
|
||||||
togglelock(user)
|
togglelock(user)
|
||||||
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
|
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
var/egged = 0
|
var/egged = 0
|
||||||
var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling
|
var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling
|
||||||
|
|
||||||
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
|
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
|
||||||
if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
|
if(opened || move_delay || !CHECK_MOBILITY(user, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc))
|
||||||
return
|
return
|
||||||
move_delay = TRUE
|
move_delay = TRUE
|
||||||
var/oldloc = loc
|
var/oldloc = loc
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
||||||
unbuckle_mob(M,force=1)
|
unbuckle_mob(M,force=1)
|
||||||
M.emote("scream")
|
M.emote("scream")
|
||||||
M.AdjustKnockdown(20)
|
M.DefaultCombatKnockdown(20)
|
||||||
|
|
||||||
/obj/structure/kitchenspike/Destroy()
|
/obj/structure/kitchenspike/Destroy()
|
||||||
if(has_buckled_mobs())
|
if(has_buckled_mobs())
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
/datum/song/proc/shouldStopPlaying(mob/user)
|
/datum/song/proc/shouldStopPlaying(mob/user)
|
||||||
if(instrumentObj)
|
if(instrumentObj)
|
||||||
if(!user.canUseTopic(instrumentObj))
|
if(!user.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE))
|
||||||
return TRUE
|
return TRUE
|
||||||
return !instrumentObj.anchored // add special cases to stop in subclasses
|
return !instrumentObj.anchored // add special cases to stop in subclasses
|
||||||
else
|
else
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
updateDialog(usr) // make sure updates when complete
|
updateDialog(usr) // make sure updates when complete
|
||||||
|
|
||||||
/datum/song/Topic(href, href_list)
|
/datum/song/Topic(href, href_list)
|
||||||
if(!usr.canUseTopic(instrumentObj))
|
if(!usr.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE))
|
||||||
usr << browse(null, "window=instrument")
|
usr << browse(null, "window=instrument")
|
||||||
usr.unset_machine()
|
usr.unset_machine()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
if(S.mind)
|
if(S.mind)
|
||||||
if(petrified_mob)
|
if(petrified_mob)
|
||||||
S.mind.transfer_to(petrified_mob)
|
S.mind.transfer_to(petrified_mob)
|
||||||
petrified_mob.Knockdown(100)
|
petrified_mob.DefaultCombatKnockdown(100)
|
||||||
to_chat(petrified_mob, "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>")
|
to_chat(petrified_mob, "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>")
|
||||||
qdel(S)
|
qdel(S)
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,7 @@
|
|||||||
|
|
||||||
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
|
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
|
||||||
pushed_mob.forceMove(src.loc)
|
pushed_mob.forceMove(src.loc)
|
||||||
pushed_mob.resting = TRUE
|
pushed_mob.set_resting(TRUE, FALSE)
|
||||||
pushed_mob.update_canmove()
|
|
||||||
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
|
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
|
||||||
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
|
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
|
||||||
log_combat(user, pushed_mob, "placed")
|
log_combat(user, pushed_mob, "placed")
|
||||||
@@ -128,7 +127,7 @@
|
|||||||
pushed_mob.pass_flags &= ~PASSTABLE
|
pushed_mob.pass_flags &= ~PASSTABLE
|
||||||
if(pushed_mob.loc != loc) //Something prevented the tabling
|
if(pushed_mob.loc != loc) //Something prevented the tabling
|
||||||
return
|
return
|
||||||
pushed_mob.Knockdown(40)
|
pushed_mob.DefaultCombatKnockdown(40)
|
||||||
pushed_mob.visible_message("<span class='danger'>[user] slams [pushed_mob] onto [src]!</span>", \
|
pushed_mob.visible_message("<span class='danger'>[user] slams [pushed_mob] onto [src]!</span>", \
|
||||||
"<span class='userdanger'>[user] slams you onto [src]!</span>")
|
"<span class='userdanger'>[user] slams you onto [src]!</span>")
|
||||||
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
|
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
|
||||||
@@ -138,11 +137,11 @@
|
|||||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
|
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
|
||||||
|
|
||||||
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
|
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
|
||||||
if(!target.resting)
|
if(CHECK_MOBILITY(target, MOBILITY_STAND))
|
||||||
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
|
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_TABLE)
|
||||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
|
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
|
||||||
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||||
target.forceMove(src.loc)
|
target.forceMove(loc)
|
||||||
log_combat(user, target, "shoved", "onto [src] (table)")
|
log_combat(user, target, "shoved", "onto [src] (table)")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -270,7 +269,7 @@
|
|||||||
debris -= AM
|
debris -= AM
|
||||||
if(istype(AM, /obj/item/shard))
|
if(istype(AM, /obj/item/shard))
|
||||||
AM.throw_impact(L)
|
AM.throw_impact(L)
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||||
@@ -568,23 +567,20 @@
|
|||||||
break
|
break
|
||||||
|
|
||||||
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
|
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||||
pushed_mob.forceMove(src.loc)
|
pushed_mob.forceMove(loc)
|
||||||
pushed_mob.resting = 1
|
pushed_mob.set_resting(TRUE, TRUE)
|
||||||
pushed_mob.update_canmove()
|
|
||||||
visible_message("<span class='notice'>[user] has laid [pushed_mob] on [src].</span>")
|
visible_message("<span class='notice'>[user] has laid [pushed_mob] on [src].</span>")
|
||||||
check_patient()
|
check_patient()
|
||||||
|
|
||||||
/obj/structure/table/optable/proc/check_patient()
|
/obj/structure/table/optable/proc/check_patient()
|
||||||
var/mob/M = locate(/mob/living/carbon/human, loc)
|
var/mob/living/carbon/human/H = locate() in loc
|
||||||
if(M)
|
if(H)
|
||||||
if(M.resting)
|
if(!CHECK_MOBILITY(H, MOBILITY_STAND))
|
||||||
patient = M
|
patient = H
|
||||||
return 1
|
return TRUE
|
||||||
else
|
else
|
||||||
patient = null
|
patient = null
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Racks
|
* Racks
|
||||||
@@ -644,7 +640,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
return
|
return
|
||||||
if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
|
if(CHECK_MULTIPLE_BITFIELDS(user.mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) || user.get_num_legs() < 2)
|
||||||
return
|
return
|
||||||
user.changeNext_move(CLICK_CD_MELEE)
|
user.changeNext_move(CLICK_CD_MELEE)
|
||||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||||
|
|||||||
@@ -43,10 +43,10 @@
|
|||||||
|
|
||||||
|
|
||||||
//pod insertion
|
//pod insertion
|
||||||
/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/user)
|
/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/living/user)
|
||||||
if(!user.canmove || user.stat || user.restrained())
|
if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE))
|
||||||
return
|
return
|
||||||
if (!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1)
|
if(!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1)
|
||||||
return
|
return
|
||||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||||
return //no fun allowed
|
return //no fun allowed
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
||||||
if(do_after(user, 15, target = src))
|
if(do_after(user, 15, target = src))
|
||||||
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
|
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
|
||||||
GM.Knockdown(100)
|
GM.DefaultCombatKnockdown(100)
|
||||||
src.Bumped(GM)
|
src.Bumped(GM)
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
/obj/structure/trap/stun/trap_effect(mob/living/L)
|
/obj/structure/trap/stun/trap_effect(mob/living/L)
|
||||||
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
|
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
|
|
||||||
/obj/structure/trap/fire
|
/obj/structure/trap/fire
|
||||||
name = "flame trap"
|
name = "flame trap"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
/obj/structure/trap/fire/trap_effect(mob/living/L)
|
/obj/structure/trap/fire/trap_effect(mob/living/L)
|
||||||
to_chat(L, "<span class='danger'><B>Spontaneous combustion!</B></span>")
|
to_chat(L, "<span class='danger'><B>Spontaneous combustion!</B></span>")
|
||||||
L.Knockdown(20)
|
L.DefaultCombatKnockdown(20)
|
||||||
|
|
||||||
/obj/structure/trap/fire/flare()
|
/obj/structure/trap/fire/flare()
|
||||||
..()
|
..()
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
/obj/structure/trap/chill/trap_effect(mob/living/L)
|
/obj/structure/trap/chill/trap_effect(mob/living/L)
|
||||||
to_chat(L, "<span class='danger'><B>You're frozen solid!</B></span>")
|
to_chat(L, "<span class='danger'><B>You're frozen solid!</B></span>")
|
||||||
L.Knockdown(20)
|
L.DefaultCombatKnockdown(20)
|
||||||
L.adjust_bodytemperature(-300)
|
L.adjust_bodytemperature(-300)
|
||||||
L.apply_status_effect(/datum/status_effect/freon)
|
L.apply_status_effect(/datum/status_effect/freon)
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
/obj/structure/trap/damage/trap_effect(mob/living/L)
|
/obj/structure/trap/damage/trap_effect(mob/living/L)
|
||||||
to_chat(L, "<span class='danger'><B>The ground quakes beneath your feet!</B></span>")
|
to_chat(L, "<span class='danger'><B>The ground quakes beneath your feet!</B></span>")
|
||||||
L.Knockdown(100)
|
L.DefaultCombatKnockdown(100)
|
||||||
L.adjustBruteLoss(35)
|
L.adjustBruteLoss(35)
|
||||||
|
|
||||||
/obj/structure/trap/damage/flare()
|
/obj/structure/trap/damage/flare()
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
/obj/structure/trap/cult/trap_effect(mob/living/L)
|
/obj/structure/trap/cult/trap_effect(mob/living/L)
|
||||||
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
|
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
|
||||||
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
|
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
|
||||||
L.Knockdown(20)
|
L.DefaultCombatKnockdown(20)
|
||||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||||
QDEL_IN(src, 30)
|
QDEL_IN(src, 30)
|
||||||
@@ -529,7 +529,7 @@
|
|||||||
if(B.cell.charge > 0 && B.status == 1)
|
if(B.cell.charge > 0 && B.status == 1)
|
||||||
flick("baton_active", src)
|
flick("baton_active", src)
|
||||||
var/stunforce = B.stamforce
|
var/stunforce = B.stamforce
|
||||||
user.Knockdown(stunforce * 2)
|
user.DefaultCombatKnockdown(stunforce * 2)
|
||||||
user.stuttering = stunforce/20
|
user.stuttering = stunforce/20
|
||||||
B.deductcharge(B.hitcost)
|
B.deductcharge(B.hitcost)
|
||||||
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!</span>", \
|
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!</span>", \
|
||||||
|
|||||||
@@ -343,7 +343,8 @@
|
|||||||
set name = "Flip Windoor Assembly"
|
set name = "Flip Windoor Assembly"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
if(usr.stat || !usr.canmove || usr.restrained())
|
var/mob/living/L = usr
|
||||||
|
if(!CHECK_MOBILITY(L, MOBILITY_PULL))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(facing == "l")
|
if(facing == "l")
|
||||||
@@ -354,4 +355,3 @@
|
|||||||
to_chat(usr, "<span class='notice'>The windoor will now slide to the left.</span>")
|
to_chat(usr, "<span class='notice'>The windoor will now slide to the left.</span>")
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
|
||||||
|
|||||||
@@ -272,7 +272,7 @@
|
|||||||
|
|
||||||
var/olddir = C.dir
|
var/olddir = C.dir
|
||||||
if(!(lube & SLIDE_ICE))
|
if(!(lube & SLIDE_ICE))
|
||||||
C.Knockdown(knockdown_amount)
|
C.DefaultCombatKnockdown(knockdown_amount)
|
||||||
C.stop_pulling()
|
C.stop_pulling()
|
||||||
else
|
else
|
||||||
C.Stun(20)
|
C.Stun(20)
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
target.gib(1, 1)
|
target.gib(1, 1)
|
||||||
else
|
else
|
||||||
target.adjustBruteLoss(min(99,(target.health - 1)))
|
target.adjustBruteLoss(min(99,(target.health - 1)))
|
||||||
target.Knockdown(400)
|
target.DefaultCombatKnockdown(400)
|
||||||
target.stuttering = 20
|
target.stuttering = 20
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
"emagged" = borg.emagged,
|
"emagged" = borg.emagged,
|
||||||
"active_module" = "[borg.module.type]",
|
"active_module" = "[borg.module.type]",
|
||||||
"lawupdate" = borg.lawupdate,
|
"lawupdate" = borg.lawupdate,
|
||||||
"lockdown" = borg.lockcharge,
|
"lockdown" = borg.locked_down,
|
||||||
"scrambledcodes" = borg.scrambledcodes
|
"scrambledcodes" = borg.scrambledcodes
|
||||||
)
|
)
|
||||||
.["upgrades"] = list()
|
.["upgrades"] = list()
|
||||||
@@ -122,8 +122,8 @@
|
|||||||
message_admins("[key_name_admin(user)] disabled lawsync on [ADMIN_LOOKUPFLW(borg)].")
|
message_admins("[key_name_admin(user)] disabled lawsync on [ADMIN_LOOKUPFLW(borg)].")
|
||||||
log_admin("[key_name(user)] disabled lawsync on [key_name(borg)].")
|
log_admin("[key_name(user)] disabled lawsync on [key_name(borg)].")
|
||||||
if ("toggle_lockdown")
|
if ("toggle_lockdown")
|
||||||
borg.SetLockdown(!borg.lockcharge)
|
borg.SetLockdown(!borg.locked_down)
|
||||||
if (borg.lockcharge)
|
if (borg.locked_down)
|
||||||
message_admins("[key_name_admin(user)] locked down [ADMIN_LOOKUPFLW(borg)].")
|
message_admins("[key_name_admin(user)] locked down [ADMIN_LOOKUPFLW(borg)].")
|
||||||
log_admin("[key_name(user)] locked down [key_name(borg)].")
|
log_admin("[key_name(user)] locked down [key_name(borg)].")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -116,14 +116,13 @@
|
|||||||
var/mob/living/carbon/human/M = loc
|
var/mob/living/carbon/human/M = loc
|
||||||
M.adjustStaminaLoss(-75)
|
M.adjustStaminaLoss(-75)
|
||||||
M.SetUnconscious(0)
|
M.SetUnconscious(0)
|
||||||
M.SetStun(0)
|
M.SetAllImmobility(0)
|
||||||
M.SetKnockdown(0)
|
|
||||||
combat_cooldown = 0
|
combat_cooldown = 0
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
|
|
||||||
/obj/item/clothing/suit/armor/abductor/vest/process()
|
/obj/item/clothing/suit/armor/abductor/vest/process()
|
||||||
combat_cooldown++
|
combat_cooldown++
|
||||||
if(combat_cooldown==initial(combat_cooldown))
|
if(combat_cooldown == initial(combat_cooldown))
|
||||||
STOP_PROCESSING(SSobj, src)
|
STOP_PROCESSING(SSobj, src)
|
||||||
|
|
||||||
/obj/item/clothing/suit/armor/abductor/Destroy()
|
/obj/item/clothing/suit/armor/abductor/Destroy()
|
||||||
@@ -512,7 +511,7 @@
|
|||||||
L.lastattackerckey = user.ckey
|
L.lastattackerckey = user.ckey
|
||||||
|
|
||||||
L.adjustStaminaLoss(35) //because previously it took 5-6 hits to actually "incapacitate" someone for the purposes of the sleep inducement
|
L.adjustStaminaLoss(35) //because previously it took 5-6 hits to actually "incapacitate" someone for the purposes of the sleep inducement
|
||||||
L.Knockdown(140)
|
L.DefaultCombatKnockdown(140)
|
||||||
L.apply_effect(EFFECT_STUTTER, 7)
|
L.apply_effect(EFFECT_STUTTER, 7)
|
||||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
// Incap?
|
// Incap?
|
||||||
if(must_be_capacitated)
|
if(must_be_capacitated)
|
||||||
var/mob/living/L = owner
|
var/mob/living/L = owner
|
||||||
if (L.incapacitated(TRUE, TRUE) || L.resting && !can_be_immobilized)
|
if (L.incapacitated(TRUE, TRUE) || !CHECK_MOBILITY(L, MOBILITY_STAND) && !can_be_immobilized)
|
||||||
if(display_error)
|
if(display_error)
|
||||||
to_chat(owner, "<span class='warning'>Not while you're incapacitated!</span>")
|
to_chat(owner, "<span class='warning'>Not while you're incapacitated!</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
// organ_internal.dm -- /obj/item/organ
|
// organ_internal.dm -- /obj/item/organ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Do I have a stake in my heart?
|
// Do I have a stake in my heart?
|
||||||
/mob/living/AmStaked()
|
/mob/living/AmStaked()
|
||||||
var/obj/item/bodypart/BP = get_bodypart("chest")
|
var/obj/item/bodypart/BP = get_bodypart("chest")
|
||||||
@@ -13,16 +9,14 @@
|
|||||||
if (istype(I,/obj/item/stake/))
|
if (istype(I,/obj/item/stake/))
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/mob/proc/AmStaked()
|
/mob/proc/AmStaked()
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
/mob/living/proc/StakeCanKillMe()
|
/mob/living/proc/StakeCanKillMe()
|
||||||
return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you.
|
return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you.
|
||||||
|
|
||||||
|
/obj/item/stake
|
||||||
///obj/item/weapon/melee/stake
|
|
||||||
/obj/item/stake/
|
|
||||||
name = "wooden stake"
|
name = "wooden stake"
|
||||||
desc = "A simple wooden stake carved to a sharp point."
|
desc = "A simple wooden stake carved to a sharp point."
|
||||||
icon = 'icons/obj/items_and_weapons.dmi'
|
icon = 'icons/obj/items_and_weapons.dmi'
|
||||||
@@ -112,8 +106,7 @@
|
|||||||
|
|
||||||
// Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary.
|
// Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary.
|
||||||
/mob/living/carbon/proc/can_be_staked()
|
/mob/living/carbon/proc/can_be_staked()
|
||||||
//return resting || IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH)) || resting || IsStun() || IsFrozen() || (pulledby && pulledby.grab_state >= GRAB_NECK)
|
return !CHECK_MOBILITY(src, MOBILITY_STAND)
|
||||||
return (resting || lying || IsUnconscious() || pulledby && pulledby.grab_state >= GRAB_NECK)
|
|
||||||
// ABOVE: Taken from update_mobility() in living.dm
|
// ABOVE: Taken from update_mobility() in living.dm
|
||||||
|
|
||||||
/obj/item/stake/hardened
|
/obj/item/stake/hardened
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user