sigh
This commit is contained in:
+26
-17
@@ -29,11 +29,18 @@
|
||||
return
|
||||
if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON)
|
||||
return
|
||||
. = ClickOn(A, params)
|
||||
if(.)
|
||||
FlushCurrentAction()
|
||||
else
|
||||
DiscardCurrentAction()
|
||||
/*
|
||||
if(ClickOn(A, params))
|
||||
FlushCurrentAction()
|
||||
else
|
||||
DiscardCurrentAction()
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Standard mob ClickOn()
|
||||
Handles exceptions: Buildmode, middle click, modified clicks, mech actions
|
||||
@@ -67,7 +74,7 @@
|
||||
return CtrlClickOn(A)
|
||||
|
||||
if(modifiers["right"]) //CIT CHANGE - allows right clicking to perform actions
|
||||
return RightClickOn(A,params) //CIT CHANGE - ditto
|
||||
return RightClickOn(A, params) //CIT CHANGE - ditto
|
||||
|
||||
if(incapacitated(ignore_restraints = 1))
|
||||
return
|
||||
@@ -82,7 +89,8 @@
|
||||
|
||||
if(ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
return M.click_action(A,src,params)
|
||||
M.click_action(A,src,params)
|
||||
return TRUE
|
||||
|
||||
if(restrained())
|
||||
DelayNextAction(CLICK_CD_HANDCUFFED)
|
||||
@@ -91,26 +99,25 @@
|
||||
|
||||
if(in_throw_mode)
|
||||
throw_item(A)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
update_inv_hands()
|
||||
return
|
||||
return TRUE
|
||||
|
||||
//These are always reachable.
|
||||
//User itself, current loc, and user inventory
|
||||
if(A in DirectAccess())
|
||||
if(W)
|
||||
. = W.melee_attack_chain(src, A, params)
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION)
|
||||
else
|
||||
. = UnarmedAttack(A)
|
||||
. = UnarmedAttack(A, TRUE, a_intent)
|
||||
if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A))
|
||||
DelayNextAction(CLICK_CD_MELEE)
|
||||
return .? TRUE : FALSE
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
|
||||
//Can't reach anything else in lockers or other weirdness
|
||||
if(!loc.AllowClick())
|
||||
@@ -119,18 +126,17 @@
|
||||
//Standard reach turf to turf or reaching inside storage
|
||||
if(CanReach(A,W))
|
||||
if(W)
|
||||
. = W.melee_attack_chain(src, A, params)
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION)
|
||||
else
|
||||
. = UnarmedAttack(A)
|
||||
. = UnarmedAttack(A, TRUE, a_intent)
|
||||
if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A))
|
||||
DelayNextAction(CLICK_CD_MELEE)
|
||||
return .? TRUE : FALSE
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
else
|
||||
if(W)
|
||||
return W.ranged_attack_chain(src, A, params)
|
||||
return !(W.ranged_attack_chain(src, A, params) & DISCARD_LAST_ACTION)
|
||||
else
|
||||
RangedAttack(A,params)
|
||||
return !(RangedAttack(A,params) & DISCARD_LAST_ACTION)
|
||||
|
||||
//Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it
|
||||
/atom/proc/IsObscured()
|
||||
@@ -376,9 +382,11 @@
|
||||
return
|
||||
|
||||
/mob/living/LaserEyes(atom/A, params)
|
||||
DelayNextAction(CLICK_CD_RANGE, flush = TRUE)
|
||||
if(!CheckActionCooldown(CLICK_CD_RANGE))
|
||||
return
|
||||
DelayNextAction()
|
||||
|
||||
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc )
|
||||
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc)
|
||||
LE.icon = 'icons/effects/genetics.dmi'
|
||||
LE.icon_state = "eyelasers"
|
||||
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
|
||||
@@ -387,6 +395,7 @@
|
||||
LE.def_zone = get_organ_target()
|
||||
LE.preparePixelProjectile(A, src, params)
|
||||
LE.fire()
|
||||
return TRUE
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/mob/proc/face_atom(atom/A, ismousemovement = FALSE)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
DelayNextAction(CLICK_CD_MELEE)
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
else
|
||||
return W.afterattack(A, src, 0, params)
|
||||
return !(W.afterattack(A, src, 0, params) & DISCARD_LAST_ACTION)
|
||||
|
||||
//Middle click cycles through selected modules.
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
return A.attack_hand(src, intent, flags)
|
||||
return . | A.attack_hand(src, intent, flags)
|
||||
|
||||
/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
||||
|
||||
@@ -36,14 +36,13 @@
|
||||
//User itself, current loc, and user inventory
|
||||
if(A in DirectAccess())
|
||||
if(W)
|
||||
. = W.melee_attack_chain(src, A, params)
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
return !(W.rightclick__melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION)
|
||||
else
|
||||
if(!AltUnarmedAttack(A))
|
||||
. = UnarmedAttack(A)
|
||||
if(!AltUnarmedAttack(A, TRUE))
|
||||
. = UnarmedAttack(A, TRUE, a_intent)
|
||||
if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A))
|
||||
DelayNextAction(CLICK_CD_MELEE)
|
||||
return .? TRUE : FALSE
|
||||
return (.)? TRUE : FALSE
|
||||
return TRUE
|
||||
|
||||
//Can't reach anything else in lockers or other weirdness
|
||||
@@ -53,23 +52,21 @@
|
||||
//Standard reach turf to turf or reaching inside storage
|
||||
if(CanReach(A,W))
|
||||
if(W)
|
||||
. = W.melee_attack_chain(src, A, params)
|
||||
return !(. & DISCARD_LAST_ACTION)
|
||||
return !(W.rightclick_melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION)
|
||||
else
|
||||
if(!AltUnarmedAttack(A,1))
|
||||
. = UnarmedAttack(A)
|
||||
if(!AltUnarmedAttack(A, TRUE))
|
||||
. = UnarmedAttack(A, TRUE, a_intent)
|
||||
if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A))
|
||||
DelayNextAction(CLICK_CD_MELEE)
|
||||
return .? TRUE : FALSE
|
||||
return (.)? TRUE : FALSE
|
||||
return TRUE
|
||||
else
|
||||
if(W)
|
||||
if(!W.altafterattack(A, src, FALSE, params))
|
||||
W.afterattack(A, src, FALSE, params)
|
||||
else
|
||||
if(!AltRangedAttack(A,params))
|
||||
RangedAttack(A,params)
|
||||
return
|
||||
if(!AltRangedAttack(A, params))
|
||||
return !(RangedAttack(A, params) & DISCARD_LAST_ACTION)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/AltUnarmedAttack(atom/A, proximity_flag)
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
|
||||
/datum/mutation/human/hulk/on_attack_hand(atom/target, proximity, act_intent, unarmed_attack_flags)
|
||||
if(proximity && (act_intent == INTENT_HARM)) //no telekinetic hulk attack
|
||||
return target.attack_hulk(owner)
|
||||
if(!owner.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return INTERRUPT_UNARMED_ATTACK | NO_AUTO_CLICKDELAY_HANDLING
|
||||
owner.DelayNextAction()
|
||||
target.attack_hulk(owner)
|
||||
return INTERRUPT_UNARMED_ATTACK | NO_AUTO_CLICKDELAY_HANDLING
|
||||
|
||||
/datum/mutation/human/hulk/on_life()
|
||||
if(owner.health < 0)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
attack_verb = list("struck", "beaten", "thwacked", "pulped")
|
||||
total_mass = 5 //yeah this is a heavy thing, beating people with it while it's off is not going to do you any favors. (to curb stun-kill rampaging without it being on)
|
||||
block_parry_data = /datum/block_parry_data/electrostaff
|
||||
attack_speed = CLICK_CD_MELEE
|
||||
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
|
||||
var/on = FALSE
|
||||
var/can_block_projectiles = FALSE //can't block guns
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("beaten")
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
attack_speed = CLICK_CD_MELEE
|
||||
|
||||
var/stamforce = 35
|
||||
var/turned_on = FALSE
|
||||
@@ -152,9 +153,6 @@
|
||||
return FALSE
|
||||
if(turned_on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
clowning_around(user)
|
||||
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return TRUE
|
||||
user.DelayNextAction()
|
||||
if(IS_STAMCRIT(user)) //CIT CHANGE - makes it impossible to baton in stamina softcrit
|
||||
to_chat(user, "<span class='danger'>You're too exhausted to use [src] properly.</span>")
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user