This commit is contained in:
silicons
2020-07-18 18:29:09 -07:00
parent 7c5d4f863d
commit 0b98b0409b
10 changed files with 60 additions and 33 deletions
+7 -5
View File
@@ -76,7 +76,7 @@
face_atom(A)
if(next_move > world.time) // in the year 2000...
if(!CheckActionCooldown())
return
if(!modifiers["catcher"] && A.IsObscured())
@@ -108,8 +108,9 @@
if(W)
W.melee_attack_chain(src, A, params)
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE))
return
DelayNextAction()
UnarmedAttack(A)
return
@@ -122,8 +123,9 @@
if(W)
W.melee_attack_chain(src, A, params)
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE))
return
DelayNextAction()
UnarmedAttack(A, 1)
else
if(W)
+3 -3
View File
@@ -272,7 +272,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
L.last_resist = world.time
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
@@ -600,7 +600,7 @@ so as to remain in compliance with the most up-to-date laws."
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
L.last_resist = world.time
if(CHECK_MOBILITY(L, MOBILITY_MOVE) && (L.last_special <= world.time))
return L.resist_restraints()
@@ -608,7 +608,7 @@ so as to remain in compliance with the most up-to-date laws."
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
L.last_resist = world.time
if(L.last_special <= world.time)
return L.resist_buckle()
+4 -3
View File
@@ -21,6 +21,7 @@
return
if(QDELETED(src) || QDELETED(target))
return
PostattackClickdelaySet(user, target))
afterattack(target, user, TRUE, params)
/// Like melee_attack_chain but for ranged.
@@ -41,6 +42,9 @@
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
return TRUE
if(!PreatackClickdelayCheck(user, A))
return TRUE
PreattackClickdelaySet(user, A)
return FALSE //return TRUE to avoid calling attackby after this proc does stuff
// No comment
@@ -55,10 +59,7 @@
/mob/living/attackby(obj/item/I, mob/living/user, params, attackchain_flags, damage_multiplier)
if(..())
return TRUE
I.attack_delay_done = FALSE //Should be set TRUE in pre_attacked_by()
. = I.attack(src, user, attackchain_flags, damage_multiplier)
if(!I.attack_delay_done) //Otherwise, pre_attacked_by() should handle it.
user.changeNext_move(I.click_delay)
/obj/item/proc/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK)