ohhhhhhh boy

This commit is contained in:
silicons
2020-07-26 15:10:08 -07:00
parent 7d7f40ce90
commit 49070d732b
4 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
#include "map_files\generic\CentCom.dmm"
+4
View File
@@ -12,6 +12,10 @@
#define NO_AUTO_CLICKDELAY_HANDLING (1<<2)
/// Only used with UnarmedAttack(). Interrupts unarmed attack from progressing.
#define INTERRUPT_UNARMED_ATTACK (1<<3)
/// Attack hand should not set next action even if the atom wants it to be an action
#define ATTACK_HAND_IGNORE_ACTION (1<<4)
/// Attack hand should not at all check last_action/attack_hand_speed even if the atom wants to
#define ATTACK_HAND_IGNORE_CLICKDELAY (1<<5)
// UnarmedAttack() flags
/// Attack is from a parry counterattack
+10 -12
View File
@@ -34,25 +34,25 @@
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)
/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags, clickchain_flags)
SHOULD_NOT_SLEEP(TRUE)
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
add_fingerprint(user)
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
return
if(attack_hand_speed)
if(attack_hand_speed && !(clickchain_flags & ATTACK_HAND_IGNORE_CLICKDELAY))
if(!user.CheckActionCooldown(attack_hand_speed))
return
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
. = _try_interact(user)
on_attack_hand(user, act_intent, unarmed_attack_flags)
if(attack_hand_unwieldlyness)
user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action)
else if(attack_hand_is_action)
user.DelayNextAction()
return attack_hand_is_action
INVOKE_ASYNC(src, .proc/on_attack_hand, user, act_intent, unarmed_attack_flags)
if(!(clickchain_flags & ATTACK_HAND_IGNORE_ACTION))
if(attack_hand_unwieldlyness)
user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action)
else if(attack_hand_is_action)
user.DelayNextAction()
/atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
@@ -62,7 +62,6 @@
return interact(user)
if(can_interact(user))
return interact(user)
return FALSE
/atom/proc/can_interact(mob/user)
if(!user.can_interact_with(src))
@@ -92,8 +91,7 @@
else
add_fingerprint(user)
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
return ui_interact(user)
return FALSE
ui_interact(user)
/*
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this
@@ -109,7 +109,7 @@
if(warcry)
M.say("[warcry]", ignore_spam = TRUE, forced = TRUE)
return NO_AUTO_CLICKDELAY_HANDLING
return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION
/obj/item/clothing/gloves/fingerless/pugilist/rapid/AltClick(mob/user)
var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7)
@@ -137,7 +137,7 @@
else
M.SetNextAction(CLICK_CD_RAPID)
return NO_AUTO_CLICKDELAY_HANDLING
return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION
/obj/item/clothing/gloves/botanic_leather
name = "botanist's leather gloves"