This commit is contained in:
silicons
2020-07-18 19:44:12 -07:00
parent b1ccccb322
commit 910869d6bf
13 changed files with 41 additions and 57 deletions
+5 -8
View File
@@ -33,7 +33,7 @@
* item/afterattack(atom,user,adjacent,params) - used both ranged and adjacent
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
*/
/mob/proc/ClickOn( atom/A, params )
/mob/proc/ClickOn( atom/A, params)
if(check_click_intercept(params,A))
return
@@ -83,7 +83,7 @@
return M.click_action(A,src,params)
if(restrained())
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
DelayNextAction(CLICK_CD_HANDCUFFED)
RestrainedClickOn(A)
return
@@ -104,9 +104,7 @@
if(W)
W.melee_attack_chain(src, A, params)
else
if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE))
return
DelayNextAction()
DelayNextAction(ismob(A)? 8 : 0)
UnarmedAttack(A)
return
@@ -119,9 +117,8 @@
if(W)
W.melee_attack_chain(src, A, params)
else
if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE))
return
DelayNextAction()
DelayNextAction(ismob(A)? 8 : 0)
DelayNextAction(ismob(A)? 8 : 0)
UnarmedAttack(A, 1)
else
if(W)
-3
View File
@@ -56,9 +56,6 @@
if(id && usr.client) //try to (un)remember position
usr.client.prefs.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null
return TRUE
if(usr.next_click > world.time)
return
usr.next_click = world.time + 1
linked_action.Trigger()
return TRUE
+1 -11
View File
@@ -47,17 +47,7 @@
name = "swap hand"
/obj/screen/swap_hand/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
if(world.time <= usr.next_move)
return 1
if(usr.incapacitated())
return 1
if(ismob(usr))
var/mob/M = usr
M.swap_hand()
usr.swap_hand()
return 1
/obj/screen/craft
+3 -6
View File
@@ -21,7 +21,6 @@
return
if(QDELETED(src) || QDELETED(target))
return
PostattackClickdelaySet(user, target)
afterattack(target, user, TRUE, params)
/// Like melee_attack_chain but for ranged.
@@ -81,6 +80,7 @@
user.do_attack_animation(M)
M.attacked_by(src, user, attackchain_flags, damage_multiplier)
PostattackClickdelaySet(user, M)
log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
add_fingerprint(user)
@@ -96,8 +96,8 @@
if(item_flags & NOBLUDGEON)
return
user.do_attack_animation(O)
if(!O.attacked_by(src, user))
user.changeNext_move(click_delay)
O.attacked_by(src, user)
PostattackClickdelaySet(user, O)
var/weight = getweight(user, STAM_COST_ATTACK_OBJ_MULT)
if(weight)
user.adjustStaminaLossBuffered(weight)//CIT CHANGE - makes attacking things cause stamina loss
@@ -110,12 +110,9 @@
var/bad_trait
var/stamloss = user.getStaminaLoss()
var/next_move_mult = 1
if(stamloss > STAMINA_NEAR_SOFTCRIT) //The more tired you are, the less damage you do.
var/penalty = (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*STAM_CRIT_ITEM_ATTACK_PENALTY
totitemdamage *= 1 - penalty
next_move_mult += penalty*STAM_CRIT_ITEM_ATTACK_DELAY
user.changeNext_move(I.click_delay*next_move_mult)
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
bad_trait = SKILL_COMBAT_MODE //blacklist combat skills.