diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 34721292017..df5eaa993ca 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -128,16 +128,6 @@
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
#define ATTACK_EFFECT_BOOP "boop" //Honk
-//intent defines
-#define INTENT_HELP "help"
-#define INTENT_GRAB "grab"
-#define INTENT_DISARM "disarm"
-#define INTENT_HARM "harm"
-//NOTE: INTENT_HOTKEY_* defines are not actual intents!
-//they are here to support hotkeys
-#define INTENT_HOTKEY_LEFT "left"
-#define INTENT_HOTKEY_RIGHT "right"
-
//the define for visible message range in combat
#define COMBAT_MESSAGE_RANGE 3
#define DEFAULT_MESSAGE_RANGE 7
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index 9b06a745e91..c211b501fc1 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -982,7 +982,7 @@
#define COMSIG_ITEM_AFTERATTACK "item_afterattack"
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params)
#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted"
-///from base of atom/attack_hand(): (mob/user)
+///from base of atom/attack_hand(): (mob/user, modifiers)
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand"
///from base of /obj/item/attack(): (mob/M, mob/user)
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack"
diff --git a/code/__DEFINES/keybinding.dm b/code/__DEFINES/keybinding.dm
index 7c65fc64ea2..03105c8b48b 100644
--- a/code/__DEFINES/keybinding.dm
+++ b/code/__DEFINES/keybinding.dm
@@ -19,10 +19,6 @@
#define COMSIG_KB_CARBON_HOLDRUNMOVEINTENT_DOWN "keybinding_carbon_holdrunmoveintent_down"
#define COMSIG_KB_CARBON_HOLDRUNMOVEINTENT_UP "keybinding_carbon_holdrunmoveintent_up"
#define COMSIG_KB_CARBON_TOGGLETHROWMODE_DOWN "keybinding_carbon_togglethrowmode_down"
-#define COMSIG_KB_CARBON_SELECTHELPINTENT_DOWN "keybinding_carbon_selecthelpintent_down"
-#define COMSIG_KB_CARBON_SELECTDISARMINTENT_DOWN "keybinding_carbon_selectdisarmintent_down"
-#define COMSIG_KB_CARBON_SELECTGRABINTENT_DOWN "keybinding_carbon_selectgrabintent_down"
-#define COMSIG_KB_CARBON_SELECTHARMINTENT_DOWN "keybinding_carbon_selectharmintent_down"
#define COMSIG_KB_CARBON_GIVEITEM_DOWN "keybinding_carbon_giveitem_down"
//Client
@@ -46,6 +42,7 @@
#define COMSIG_KB_LIVING_LOOKUP_DOWN "keybinding_living_lookup_down"
#define COMSIG_KB_LIVING_LOOKDOWN_DOWN "keybinding_living_lookdown_down"
#define COMSIG_KB_LIVING_REST_DOWN "keybinding_living_rest_down"
+#define COMSIG_KB_LIVING_TOGGLE_COMBAT_DOWN "keybinding_living_toggle_combat_down"
//Mob
#define COMSIG_KB_MOB_FACENORTH_DOWN "keybinding_mob_facenorth_down"
diff --git a/code/__DEFINES/monkeys.dm b/code/__DEFINES/monkeys.dm
index 76b0820da37..c881e5db2cb 100644
--- a/code/__DEFINES/monkeys.dm
+++ b/code/__DEFINES/monkeys.dm
@@ -25,10 +25,8 @@
/// probability that monkey will get recruited when friend is attacked
#define MONKEY_RECRUIT_PROB 25
-/// probability for the monkey to aggro when attacked with harm intent
-#define MONKEY_RETALIATE_HARM_PROB 95
-/// probability for the monkey to aggro when attacked with disarm intent
-#define MONKEY_RETALIATE_DISARM_PROB 20
+/// probability for the monkey to aggro when attacked
+#define MONKEY_RETALIATE_PROB 85
/// amount of aggro to add to an enemy when they attack user
#define MONKEY_HATRED_AMOUNT 4
diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index 00984f23953..d0d5c29fc9e 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -22,8 +22,9 @@
#define DEADMIN_POSITION_SILICON (1<<19)
#define SOUND_ENDOFROUND (1<<20)
#define ADMIN_IGNORE_CULT_GHOST (1<<21)
+#define SOUND_COMBATMODE (1<<22)
-#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_ENDOFROUND|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
+#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_ENDOFROUND|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS|SOUND_COMBATMODE)
//Chat toggles
#define CHAT_OOC (1<<0)
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 24390a3c682..2b084c0d6cf 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -111,7 +111,7 @@
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
- UnarmedAttack(A)
+ UnarmedAttack(A, FALSE, modifiers)
return
if(in_throw_mode)
@@ -134,7 +134,7 @@
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
- UnarmedAttack(A)
+ UnarmedAttack(A, FALSE, modifiers)
return
//Can't reach anything else in lockers or other weirdness
@@ -148,7 +148,7 @@
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
- UnarmedAttack(A,1)
+ UnarmedAttack(A,1,modifiers)
else
if(W)
W.afterattack(A,src,0,params)
@@ -258,8 +258,10 @@
*
* proximity_flag is not currently passed to attack_hand, and is instead used
* in human click code to allow glove touches only at melee range.
+ *
+ * modifiers is the click modifiers this attack had, used for
*/
-/mob/proc/UnarmedAttack(atom/A, proximity_flag)
+/mob/proc/UnarmedAttack(atom/A, proximity_flag, modifiers)
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
return
diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm
index 2a1e2675c75..75ed7b2d614 100644
--- a/code/_onclick/hud/_defines.dm
+++ b/code/_onclick/hud/_defines.dm
@@ -53,6 +53,7 @@
#define ui_above_intent "EAST-3:24, SOUTH+1:7"
#define ui_movi "EAST-2:26,SOUTH:5"
#define ui_acti "EAST-3:24,SOUTH:5"
+#define ui_combat_toggle "EAST-3:24,SOUTH:5"
#define ui_zonesel "EAST-1:28,SOUTH:5"
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_crafting "EAST-4:22,SOUTH:5"
diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm
index d0db2a3c0d9..0c552a3afa7 100644
--- a/code/_onclick/hud/alien.dm
+++ b/code/_onclick/hud/alien.dm
@@ -50,11 +50,11 @@
using.hud = src
static_inventory += using
- using = new /atom/movable/screen/act_intent/alien()
- using.icon_state = mymob.a_intent
- using.hud = src
- static_inventory += using
- action_intent = using
+ action_intent = new /atom/movable/screen/combattoggle/flashy()
+ action_intent.hud = src
+ action_intent.icon = ui_style
+ action_intent.screen_loc = ui_combat_toggle
+ static_inventory += action_intent
if(isalienhunter(mymob))
var/mob/living/carbon/alien/humanoid/hunter/H = mymob
diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm
index 3b7d8249328..d656b57ea4b 100644
--- a/code/_onclick/hud/alien_larva.dm
+++ b/code/_onclick/hud/alien_larva.dm
@@ -5,11 +5,11 @@
..()
var/atom/movable/screen/using
- using = new /atom/movable/screen/act_intent/alien()
- using.icon_state = mymob.a_intent
- using.hud = src
- static_inventory += using
- action_intent = using
+ action_intent = new /atom/movable/screen/combattoggle/flashy()
+ action_intent.hud = src
+ action_intent.icon = ui_style
+ action_intent.screen_loc = ui_combat_toggle
+ static_inventory += action_intent
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm
index beeacbbccb4..ffddafdc610 100644
--- a/code/_onclick/hud/generic_dextrous.dm
+++ b/code/_onclick/hud/generic_dextrous.dm
@@ -32,16 +32,11 @@
using.hud = src
static_inventory += using
- if(mymob.possible_a_intents)
- if(mymob.possible_a_intents.len == 4)
- // All possible intents - full intent selector
- action_intent = new /atom/movable/screen/act_intent/segmented
- else
- action_intent = new /atom/movable/screen/act_intent
- action_intent.icon = ui_style
- action_intent.icon_state = mymob.a_intent
- action_intent.hud = src
- static_inventory += action_intent
+ action_intent = new /atom/movable/screen/combattoggle/flashy()
+ action_intent.hud = src
+ action_intent.icon = ui_style
+ action_intent.screen_loc = ui_combat_toggle
+ static_inventory += action_intent
zone_select = new /atom/movable/screen/zone_sel()
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 7e179cab3e2..c9fa6b39d3f 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -73,11 +73,13 @@
using.hud = src
static_inventory += using
- action_intent = new /atom/movable/screen/act_intent/segmented
- action_intent.icon_state = mymob.a_intent
+ action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
+ action_intent.icon = ui_style
+ action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
+
using = new /atom/movable/screen/mov_intent
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 58fc5611385..132b7634c6c 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -141,10 +141,11 @@
using.hud = src
static_inventory += using
-//Intent
- action_intent = new /atom/movable/screen/act_intent/robot()
- action_intent.icon_state = mymob.a_intent
+ //Combat Mode
+ action_intent = new /atom/movable/screen/combattoggle/robot()
action_intent.hud = src
+ action_intent.icon = ui_style
+ action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
//Health
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 7c2b0f6446d..4ea6b868989 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -145,7 +145,7 @@
if(inv_item)
return inv_item.Click(location, control, params)
- if(usr.attack_ui(slot_id))
+ if(usr.attack_ui(slot_id, params))
usr.update_inv_hands()
return TRUE
@@ -266,38 +266,47 @@
if(usr.stat == CONSCIOUS)
usr.dropItemToGround(usr.get_active_held_item())
-/atom/movable/screen/act_intent
- name = "intent"
- icon_state = "help"
- screen_loc = ui_acti
+/atom/movable/screen/combattoggle
+ name = "toggle combat mode"
+ icon = 'icons/hud/screen_midnight.dmi'
+ icon_state = "combat_off"
+ screen_loc = ui_combat_toggle
-/atom/movable/screen/act_intent/Click(location, control, params)
- usr.a_intent_change(INTENT_HOTKEY_RIGHT)
+/atom/movable/screen/combattoggle/New(loc, ...)
+ . = ..()
+ update_icon()
-/atom/movable/screen/act_intent/segmented/Click(location, control, params)
- if(usr.client.prefs.toggles & INTENT_STYLE)
- var/_x = text2num(params2list(params)["icon-x"])
- var/_y = text2num(params2list(params)["icon-y"])
+/atom/movable/screen/combattoggle/Click()
+ if(isliving(usr))
+ var/mob/living/owner = usr
+ owner.set_combat_mode(!owner.combat_mode, FALSE)
+ update_icon()
- if(_x<=16 && _y<=16)
- usr.a_intent_change(INTENT_HARM)
+/atom/movable/screen/combattoggle/update_icon_state()
+ . = ..()
+ var/mob/living/user = hud?.mymob
+ if(!istype(user) || !user.client)
+ return
+ icon_state = user.combat_mode ? "combat" : "combat_off" //Treats the combat_mode
- else if(_x<=16 && _y>=17)
- usr.a_intent_change(INTENT_HELP)
+//Version of the combat toggle with the flashy overlay
+/atom/movable/screen/combattoggle/flashy
+ ///Mut appearance for flashy border
+ var/mutable_appearance/flashy
- else if(_x>=17 && _y<=16)
- usr.a_intent_change(INTENT_GRAB)
+/atom/movable/screen/combattoggle/flashy/update_overlays()
+ . = ..()
+ var/mob/living/user = hud?.mymob
+ if(!istype(user) || !user.client)
+ return
- else if(_x>=17 && _y>=17)
- usr.a_intent_change(INTENT_DISARM)
- else
- return ..()
+ if(user.combat_mode)
+ if(!flashy)
+ flashy = mutable_appearance('icons/hud/screen_gen.dmi', "togglefull_flash")
+ flashy.color = "#C62727"
+ . += flashy
-/atom/movable/screen/act_intent/alien
- icon = 'icons/hud/screen_alien.dmi'
- screen_loc = ui_movi
-
-/atom/movable/screen/act_intent/robot
+/atom/movable/screen/combattoggle/robot
icon = 'icons/hud/screen_cyborg.dmi'
screen_loc = ui_borg_intents
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index ce901fae129..4b229ddfd1d 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -62,7 +62,7 @@
if(..())
return TRUE
user.changeNext_move(CLICK_CD_MELEE)
- return I.attack(src, user)
+ return I.attack(src, user, params)
/**
* Called from [/mob/living/proc/attackby]
@@ -70,15 +70,16 @@
* Arguments:
* * mob/living/M - The mob being hit by this item
* * mob/living/user - The mob hitting with this item
+ * * params - Click params of this attack
*/
-/obj/item/proc/attack(mob/living/M, mob/living/user)
- var/signal_return = SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user)
+/obj/item/proc/attack(mob/living/M, mob/living/user, params)
+ var/signal_return = SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user, params)
if(signal_return & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
if(signal_return & COMPONENT_SKIP_ATTACK)
return
- SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user)
+ SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user, params)
if(item_flags & NOBLUDGEON)
return
@@ -106,7 +107,7 @@
user.do_attack_animation(M)
M.attacked_by(src, user)
- log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(user, M, "attacked", src.name, "(COMBAT MODE: [uppertext(user.combat_mode)]) (DAMTYPE: [uppertext(damtype)])")
add_fingerprint(user)
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 148fce2c4c7..c02019e9fb7 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -4,7 +4,7 @@
Otherwise pretty standard.
*/
-/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
+/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, modifiers)
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
if(src == A)
check_self_for_injuries()
@@ -25,16 +25,16 @@
if(proximity && istype(G) && G.Touch(A,1))
return
//This signal is needed to prevent gloves of the north star + hulk.
- if(SEND_SIGNAL(src, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, A, proximity) & COMPONENT_CANCEL_ATTACK_CHAIN)
+ if(SEND_SIGNAL(src, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, A, proximity, modifiers) & COMPONENT_CANCEL_ATTACK_CHAIN)
return
- SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A, proximity)
+ SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A, proximity, modifiers)
- if(dna?.species?.spec_unarmedattack(src, A)) //Because species like monkeys dont use attack hand
+ if(dna?.species?.spec_unarmedattack(src, A, modifiers)) //Because species like monkeys dont use attack hand
return
- A.attack_hand(src)
+ A.attack_hand(src, modifiers)
-/// Return TRUE to cancel other attack hand effects that respect it.
-/atom/proc/attack_hand(mob/user)
+/// Return TRUE to cancel other attack hand effects that respect it. Modifiers is the assoc list for click info such as if it was a right click.
+/atom/proc/attack_hand(mob/user, modifiers)
. = FALSE
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
add_fingerprint(user)
@@ -99,16 +99,16 @@
/*
Animals & All Unspecified
*/
-/mob/living/UnarmedAttack(atom/A)
+/mob/living/UnarmedAttack(atom/A, proximity, modifiers)
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
- A.attack_animal(src)
+ A.attack_animal(src, modifiers)
-/atom/proc/attack_animal(mob/user)
+/atom/proc/attack_animal(mob/user, modifiers)
SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ANIMAL, user)
///Attacked by monkey
-/atom/proc/attack_paw(mob/user)
+/atom/proc/attack_paw(mob/user, modifiers)
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
return FALSE
@@ -118,12 +118,12 @@
Aliens
Defaults to same as monkey in most places
*/
-/mob/living/carbon/alien/UnarmedAttack(atom/A)
+/mob/living/carbon/alien/UnarmedAttack(atom/A, proximity, modifiers)
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
- A.attack_alien(src)
+ A.attack_alien(src, modifiers)
-/atom/proc/attack_alien(mob/living/carbon/alien/user)
+/atom/proc/attack_alien(mob/living/carbon/alien/user, modifiers)
attack_paw(user)
return
@@ -185,13 +185,13 @@
Simple animals
*/
-/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
+/mob/living/simple_animal/UnarmedAttack(atom/A, proximity, modifiers)
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
if(!dextrous)
return ..()
if(!ismob(A))
- A.attack_hand(src)
+ A.attack_hand(src, modifiers)
update_inv_hands()
diff --git a/code/datums/ai/monkey/monkey_behaviors.dm b/code/datums/ai/monkey/monkey_behaviors.dm
index 16018f95940..567d7f751e6 100644
--- a/code/datums/ai/monkey/monkey_behaviors.dm
+++ b/code/datums/ai/monkey/monkey_behaviors.dm
@@ -148,11 +148,9 @@
// if the target has a weapon, chance to disarm them
if(W && DT_PROB(MONKEY_ATTACK_DISARM_PROB, delta_time))
- living_pawn.a_intent = INTENT_DISARM
- monkey_attack(controller, target, delta_time)
+ monkey_attack(controller, target, delta_time, TRUE)
else
- living_pawn.a_intent = INTENT_HARM
- monkey_attack(controller, target, delta_time)
+ monkey_attack(controller, target, delta_time, FALSE)
/datum/ai_behavior/monkey_attack_mob/finish_action(datum/ai_controller/controller, succeeded)
@@ -162,7 +160,7 @@
controller.blackboard[BB_MONKEY_CURRENT_ATTACK_TARGET] = null
/// attack using a held weapon otherwise bite the enemy, then if we are angry there is a chance we might calm down a little
-/datum/ai_behavior/monkey_attack_mob/proc/monkey_attack(datum/ai_controller/controller, mob/living/target, delta_time)
+/datum/ai_behavior/monkey_attack_mob/proc/monkey_attack(datum/ai_controller/controller, mob/living/target, delta_time, disarm)
var/mob/living/living_pawn = controller.pawn
@@ -175,11 +173,13 @@
living_pawn.face_atom(target)
+ living_pawn.set_combat_mode(TRUE)
+
// attack with weapon if we have one
if(weapon)
weapon.melee_attack_chain(living_pawn, target)
else
- living_pawn.UnarmedAttack(target)
+ living_pawn.UnarmedAttack(target, null, disarm ? list("right" = TRUE) : null) //Fake a right click if we're disarming
// no de-aggro
if(controller.blackboard[BB_MONKEY_AGRESSIVE])
return
@@ -216,7 +216,6 @@
if(target.pulledby != living_pawn && !HAS_AI_CONTROLLER_TYPE(target.pulledby, /datum/ai_controller/monkey)) //Dont steal from my fellow monkeys.
if(living_pawn.Adjacent(target) && isturf(target.loc))
- living_pawn.a_intent = INTENT_GRAB
target.grabbedby(living_pawn)
return //Do the rest next turn
diff --git a/code/datums/ai/monkey/monkey_controller.dm b/code/datums/ai/monkey/monkey_controller.dm
index 9aab86507e2..833093becc8 100644
--- a/code/datums/ai/monkey/monkey_controller.dm
+++ b/code/datums/ai/monkey/monkey_controller.dm
@@ -160,16 +160,13 @@ have ways of interacting with a specific mob and control it.
/datum/ai_controller/monkey/proc/on_attack_hand(datum/source, mob/living/L)
SIGNAL_HANDLER
- if(L.a_intent == INTENT_HARM && prob(MONKEY_RETALIATE_HARM_PROB))
- retaliate(L)
- else if(L.a_intent == INTENT_DISARM && prob(MONKEY_RETALIATE_DISARM_PROB))
+ if(prob(MONKEY_RETALIATE_PROB))
retaliate(L)
+
/datum/ai_controller/monkey/proc/on_attack_paw(datum/source, mob/living/L)
SIGNAL_HANDLER
- if(L.a_intent == INTENT_HARM && prob(MONKEY_RETALIATE_HARM_PROB))
- retaliate(L)
- else if(L.a_intent == INTENT_DISARM && prob(MONKEY_RETALIATE_DISARM_PROB))
+ if(prob(MONKEY_RETALIATE_PROB))
retaliate(L)
/datum/ai_controller/monkey/proc/on_bullet_act(datum/source, obj/projectile/Proj)
diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm
index c2c644fba41..7d5c9872442 100644
--- a/code/datums/brain_damage/special.dm
+++ b/code/datums/brain_damage/special.dm
@@ -17,7 +17,7 @@
speak("unstun", TRUE)
else if(prob(60) && owner.health <= owner.crit_threshold)
speak("heal", TRUE)
- else if(prob(30) && owner.a_intent == INTENT_HARM)
+ else if(prob(30) && owner.combat_mode)
speak("aggressive")
else
speak("neutral", prob(25))
diff --git a/code/datums/components/bane.dm b/code/datums/components/bane.dm
index 4ac2c77525a..15c4939c1a4 100644
--- a/code/datums/components/bane.dm
+++ b/code/datums/components/bane.dm
@@ -41,8 +41,8 @@
return
activate(source, target, user)
-/datum/component/bane/proc/activate(obj/item/source, mob/living/target, mob/attacker)
- if(attacker.a_intent != INTENT_HARM)
+/datum/component/bane/proc/activate(obj/item/source, mob/living/target, mob/living/attacker)
+ if(!attacker.combat_mode)
return
var/extra_damage = max(0, source.force * damage_multiplier)
diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm
index cddebbab6a1..dc541be6076 100644
--- a/code/datums/components/butchering.dm
+++ b/code/datums/components/butchering.dm
@@ -31,8 +31,6 @@
/datum/component/butchering/proc/onItemAttack(obj/item/source, mob/living/M, mob/living/user)
SIGNAL_HANDLER
- if(user.a_intent != INTENT_HARM)
- return
if(M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it?
if(butchering_enabled && (can_be_blunt || source.get_sharpness()))
INVOKE_ASYNC(src, .proc/startButcher, source, M, user)
diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm
index 4647ce1b039..35fa2228e99 100644
--- a/code/datums/components/food/edible.dm
+++ b/code/datums/components/food/edible.dm
@@ -257,7 +257,7 @@ Behavior that's still missing from this component that original food items had t
var/atom/owner = parent
- if(feeder.a_intent == INTENT_HARM)
+ if(feeder.combat_mode)
return
if(IsFoodGone(owner, feeder))
diff --git a/code/datums/components/gunpoint.dm b/code/datums/components/gunpoint.dm
index 9ae6f8dceb0..be54793eb8f 100644
--- a/code/datums/components/gunpoint.dm
+++ b/code/datums/components/gunpoint.dm
@@ -85,10 +85,10 @@
qdel(src)
///If the shooter shoves or grabs the target, cancel the holdup to avoid cheesing and forcing the charged shot
-/datum/component/gunpoint/proc/check_shove(mob/living/carbon/shooter, mob/shooter_again, mob/living/T)
+/datum/component/gunpoint/proc/check_shove(mob/living/carbon/shooter, mob/shooter_again, mob/living/T, datum/martial_art/attacker_style, modifiers)
SIGNAL_HANDLER
- if(T != target || shooter.a_intent == INTENT_DISARM || shooter.a_intent == INTENT_GRAB)
+ if(T != target || (modifiers && modifiers["right"]))
return
shooter.visible_message("[shooter] bumps into [target] and fumbles [shooter.p_their()] aim!", \
"You bump into [target] and fumble your aim!", ignored_mobs = target)
diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm
index 83ec8d61194..38829b111e8 100644
--- a/code/datums/components/material_container.dm
+++ b/code/datums/components/material_container.dm
@@ -112,7 +112,7 @@
SIGNAL_HANDLER
var/list/tc = allowed_item_typecache
- if(!(mat_container_flags & MATCONTAINER_ANY_INTENT) && user.a_intent != INTENT_HELP)
+ if(!(mat_container_flags & MATCONTAINER_ANY_INTENT) && user.combat_mode)
return
if(I.item_flags & ABSTRACT)
return
diff --git a/code/datums/components/punchcooldown.dm b/code/datums/components/punchcooldown.dm
index dd5ab2fe6c4..386ad61dd57 100644
--- a/code/datums/components/punchcooldown.dm
+++ b/code/datums/components/punchcooldown.dm
@@ -15,7 +15,7 @@
///Called on COMSIG_HUMAN_MELEE_UNARMED_ATTACK. Yells the warcry and and reduces punch cooldown.
/datum/component/wearertargeting/punchcooldown/proc/reducecooldown(mob/living/carbon/M, atom/target)
- if(M.a_intent == INTENT_HARM && isliving(target))
+ if(M.combat_mode && isliving(target))
M.changeNext_move(CLICK_CD_RAPID)
if(warcry)
M.say(warcry, ignore_spam = TRUE, forced = "north star warcry")
diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm
index e6f75c6a58e..861b4cf39e8 100644
--- a/code/datums/components/riding/riding_mob.dm
+++ b/code/datums/components/riding/riding_mob.dm
@@ -116,7 +116,7 @@
return
for(var/mob/yeet_mob in user.buckled_mobs)
- force_dismount(yeet_mob, (user.a_intent == INTENT_HELP)) // gentle on help, byeeee if not
+ force_dismount(yeet_mob, (!user.combat_mode)) // gentle on help, byeeee if not
/// If the ridden creature has abilities, and some var yet to be made is set to TRUE, the rider will be able to control those abilities
/datum/component/riding/creature/proc/setup_abilities(mob/living/M)
@@ -179,10 +179,10 @@
return ..()
/// If the carrier shoves the person they're carrying, force the carried mob off
-/datum/component/riding/creature/human/proc/on_host_unarmed_melee(mob/living/carbon/human/human_parent, atom/target)
+/datum/component/riding/creature/human/proc/on_host_unarmed_melee(mob/living/carbon/human/human_parent, atom/target, proximity, modifiers)
SIGNAL_HANDLER
- if(human_parent.a_intent == INTENT_DISARM && (target in human_parent.buckled_mobs))
+ if(modifiers && modifiers["right"] && (target in human_parent.buckled_mobs))
force_dismount(target)
return COMPONENT_CANCEL_ATTACK_CHAIN
diff --git a/code/datums/components/storage/food_storage.dm b/code/datums/components/storage/food_storage.dm
index 7a1d68cfdb3..ffeb4725459 100644
--- a/code/datums/components/storage/food_storage.dm
+++ b/code/datums/components/storage/food_storage.dm
@@ -19,7 +19,7 @@
/datum/component/food_storage/Initialize(_minimum_weight_class = WEIGHT_CLASS_SMALL, _bad_chance = 0, _good_chance = 100)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/try_inserting_item)
- RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/try_removing_item)
+ RegisterSignal(parent, COMSIG_CLICK_CTRL, .proc/try_removing_item)
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/consume_food_storage)
var/atom/food = parent
@@ -44,7 +44,7 @@
* inserted_item - the item being placed into the food
* user - the person inserting the item
*/
-/datum/component/food_storage/proc/try_inserting_item(datum/source, obj/item/inserted_item, mob/user, params)
+/datum/component/food_storage/proc/try_inserting_item(datum/source, obj/item/inserted_item, mob/living/user, params)
SIGNAL_HANDLER
// No matryoshka-ing food storage
@@ -52,7 +52,7 @@
return
//Harm intent will bypass inserting for injecting food with syringes and such
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return
if(inserted_item.w_class > minimum_weight_class)
@@ -83,12 +83,14 @@
/datum/component/food_storage/proc/try_removing_item(datum/source, mob/user)
SIGNAL_HANDLER
- if(user.a_intent != INTENT_GRAB)
- return
+ var/atom/food = parent
if(QDELETED(stored_item))
return
+ if(!food.can_interact(user))
+ return
+
user.visible_message("[user.name] begins tearing at \the [parent].", \
"You start to rip into \the [parent].")
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 26c7296a9a6..dc94928cf6b 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -69,7 +69,7 @@
if(istype(new_mob))
if(bantype && is_banned_from(affected_mob.ckey, bantype))
replace_banned_player(new_mob)
- new_mob.a_intent = INTENT_HARM
+ new_mob.set_combat_mode(TRUE)
if(affected_mob.mind)
affected_mob.mind.transfer_to(new_mob)
else
diff --git a/code/datums/keybinding/carbon.dm b/code/datums/keybinding/carbon.dm
index abc3734aa1c..97419cf60fb 100644
--- a/code/datums/keybinding/carbon.dm
+++ b/code/datums/keybinding/carbon.dm
@@ -21,70 +21,6 @@
C.toggle_throw_mode()
return TRUE
-
-/datum/keybinding/carbon/select_help_intent
- hotkey_keys = list("1")
- name = "select_help_intent"
- full_name = "Select help intent"
- description = ""
- category = CATEGORY_CARBON
- keybind_signal = COMSIG_KB_CARBON_SELECTHELPINTENT_DOWN
-
-/datum/keybinding/carbon/select_help_intent/down(client/user)
- . = ..()
- if(.)
- return
- user.mob?.a_intent_change(INTENT_HELP)
- return TRUE
-
-
-/datum/keybinding/carbon/select_disarm_intent
- hotkey_keys = list("2")
- name = "select_disarm_intent"
- full_name = "Select disarm intent"
- description = ""
- category = CATEGORY_CARBON
- keybind_signal = COMSIG_KB_CARBON_SELECTDISARMINTENT_DOWN
-
-/datum/keybinding/carbon/select_disarm_intent/down(client/user)
- . = ..()
- if(.)
- return
- user.mob?.a_intent_change(INTENT_DISARM)
- return TRUE
-
-
-/datum/keybinding/carbon/select_grab_intent
- hotkey_keys = list("3")
- name = "select_grab_intent"
- full_name = "Select grab intent"
- description = ""
- category = CATEGORY_CARBON
- keybind_signal = COMSIG_KB_CARBON_SELECTGRABINTENT_DOWN
-
-/datum/keybinding/carbon/select_grab_intent/down(client/user)
- . = ..()
- if(.)
- return
- user.mob?.a_intent_change(INTENT_GRAB)
- return TRUE
-
-
-/datum/keybinding/carbon/select_harm_intent
- hotkey_keys = list("4")
- name = "select_harm_intent"
- full_name = "Select harm intent"
- description = ""
- category = CATEGORY_CARBON
- keybind_signal = COMSIG_KB_CARBON_SELECTHARMINTENT_DOWN
-
-/datum/keybinding/carbon/select_harm_intent/down(client/user)
- . = ..()
- if(.)
- return
- user.mob?.a_intent_change(INTENT_HARM)
- return TRUE
-
/datum/keybinding/carbon/give
hotkey_keys = list("G")
name = "Give_Item"
diff --git a/code/datums/keybinding/living.dm b/code/datums/keybinding/living.dm
index 38e324e9769..9f56cdc9549 100644
--- a/code/datums/keybinding/living.dm
+++ b/code/datums/keybinding/living.dm
@@ -74,3 +74,18 @@
var/mob/living/living_mob = user.mob
living_mob.toggle_resting()
return TRUE
+
+/datum/keybinding/living/toggle_combat_mode
+ hotkey_keys = list("F", "4")
+ name = "toggle_combat_mode"
+ full_name = "Toggle Combat Mode"
+ description = "Toggles combat mode. Like Help/Harm but cooler."
+ keybind_signal = COMSIG_KB_LIVING_TOGGLE_COMBAT_DOWN
+
+
+/datum/keybinding/living/toggle_combat_mode/down(client/user)
+ . = ..()
+ if(.)
+ return
+ var/mob/living/user_mob = user.mob
+ user_mob.set_combat_mode(!user_mob.combat_mode, FALSE)
diff --git a/code/datums/keybinding/mob.dm b/code/datums/keybinding/mob.dm
index 47bad1b1681..58dc6aaa0fa 100644
--- a/code/datums/keybinding/mob.dm
+++ b/code/datums/keybinding/mob.dm
@@ -20,36 +20,6 @@
M.stop_pulling()
return TRUE
-/datum/keybinding/mob/cycle_intent_right
- hotkey_keys = list("Northwest") // HOME
- name = "cycle_intent_right"
- full_name = "cycle intent right"
- description = ""
- keybind_signal = COMSIG_KB_MOB_CYCLEINTENTRIGHT_DOWN
-
-/datum/keybinding/mob/cycle_intent_right/down(client/user)
- . = ..()
- if(.)
- return
- var/mob/M = user.mob
- M.a_intent_change(INTENT_HOTKEY_RIGHT)
- return TRUE
-
-/datum/keybinding/mob/cycle_intent_left
- hotkey_keys = list("Insert")
- name = "cycle_intent_left"
- full_name = "cycle intent left"
- description = ""
- keybind_signal = COMSIG_KB_MOB_CYCLEINTENTLEFT_DOWN
-
-/datum/keybinding/mob/cycle_intent_left/down(client/user)
- . = ..()
- if(.)
- return
- var/mob/M = user.mob
- M.a_intent_change(INTENT_HOTKEY_LEFT)
- return TRUE
-
/datum/keybinding/mob/swap_hands
hotkey_keys = list("X", "Northeast") // PAGEUP
name = "swap_hands"
diff --git a/code/datums/keybinding/robot.dm b/code/datums/keybinding/robot.dm
index 5076a5a1868..2dd5a5806e5 100644
--- a/code/datums/keybinding/robot.dm
+++ b/code/datums/keybinding/robot.dm
@@ -62,7 +62,7 @@
if(.)
return
var/mob/living/silicon/robot/R = user.mob
- R.a_intent_change(INTENT_HOTKEY_LEFT)
+ R.set_combat_mode(!R.combat_mode)
return TRUE
/datum/keybinding/robot/unequip_module
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index 25d741821f9..19380b4e5b7 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -121,7 +121,7 @@
return TRUE
/datum/martial_art/cqc/grab_act(mob/living/A, mob/living/D)
- if(A.a_intent == INTENT_GRAB && A!=D && can_use(A)) // A!=D prevents grabbing yourself
+ if(A!=D && can_use(A)) // A!=D prevents grabbing yourself
add_to_streak("G",D)
if(check_streak(A,D)) //if a combo is made no grab upgrade is done
return TRUE
diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm
index b8b4ebcbaef..8ff39fbb968 100644
--- a/code/datums/martial/psychotic_brawl.dm
+++ b/code/datums/martial/psychotic_brawl.dm
@@ -6,12 +6,12 @@
return psycho_attack(A,D)
/datum/martial_art/psychotic_brawling/grab_act(mob/living/A, mob/living/D)
- return psycho_attack(A,D)
+ return psycho_attack(A,D, TRUE)
/datum/martial_art/psychotic_brawling/harm_act(mob/living/A, mob/living/D)
return psycho_attack(A,D)
-/datum/martial_art/psychotic_brawling/proc/psycho_attack(mob/living/A, mob/living/D)
+/datum/martial_art/psychotic_brawling/proc/psycho_attack(mob/living/A, mob/living/D, grab_attack)
var/atk_verb
switch(rand(1,8))
if(1)
@@ -31,7 +31,7 @@
if(A.pulling)
D.drop_all_held_items()
D.stop_pulling()
- if(A.a_intent == INTENT_GRAB)
+ if(grab_attack)
log_combat(A, D, "grabbed", addition="aggressively")
D.visible_message("[A] violently grabs [D]!", \
"You're violently grabbed by [A]!", "You hear sounds of aggressive fondling!", null, A)
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index 203bef763bf..3d7a2357916 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -192,7 +192,7 @@
/obj/item/staff/bostaff/update_icon_state()
icon_state = "bostaff0"
-/obj/item/staff/bostaff/attack(mob/target, mob/living/user)
+/obj/item/staff/bostaff/attack(mob/target, mob/living/user, params)
add_fingerprint(user)
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, "You club yourself over the head with [src].")
@@ -211,7 +211,8 @@
if(C.stat)
to_chat(user, "It would be dishonorable to attack a foe while they cannot retaliate.")
return
- if(user.a_intent == INTENT_DISARM)
+ var/list/modifiers = params2list(params)
+ if(modifiers && modifiers["right"])
if(!wielded)
return ..()
if(!ishuman(target))
diff --git a/code/datums/mutations/antenna.dm b/code/datums/mutations/antenna.dm
index 894aae70d64..1754772a23d 100644
--- a/code/datums/mutations/antenna.dm
+++ b/code/datums/mutations/antenna.dm
@@ -90,7 +90,7 @@
to_chat(user, "[recent_speech[spoken_memory]]")
if(iscarbon(M))
var/mob/living/carbon/human/H = M
- to_chat(user, "You find that their intent is to [H.a_intent]...")
+ to_chat(user, "You find that their intent is to [H.combat_mode ? "Harm" : "Help"]...")
if(H.mind)
to_chat(user, "You uncover that [H.p_their()] true identity is [H.mind.name].")
else
diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm
index d32df4f0858..33510785dbd 100644
--- a/code/datums/mutations/hulk.dm
+++ b/code/datums/mutations/hulk.dm
@@ -32,7 +32,7 @@
if(!proximity)
return
- if(source.a_intent != INTENT_HARM)
+ if(!source.combat_mode)
return
if(target.attack_hulk(owner))
if(world.time > (last_scream + scream_delay))
diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm
index c97b1211faf..11fef107de3 100644
--- a/code/datums/mutations/sight.dm
+++ b/code/datums/mutations/sight.dm
@@ -101,7 +101,7 @@
/datum/mutation/human/laser_eyes/proc/on_ranged_attack(mob/living/carbon/human/source, atom/target, mouseparams)
SIGNAL_HANDLER
- if(source.a_intent != INTENT_HARM)
+ if(!source.combat_mode)
return
to_chat(source, "You shoot with your laser eyes!")
source.changeNext_move(CLICK_CD_RANGE)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 9107becd670..e41b1b3f78d 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -725,8 +725,7 @@
owner.log_message("used [I] due to a Muscle Spasm", LOG_ATTACK)
I.attack_self(owner)
if(3)
- var/prev_intent = owner.a_intent
- owner.a_intent = INTENT_HARM
+ owner.set_combat_mode(TRUE)
var/range = 1
if(istype(owner.get_active_held_item(), /obj/item/gun)) //get targets to shoot at
@@ -740,14 +739,13 @@
to_chat(owner, "Your arm spasms!")
owner.log_message(" attacked someone due to a Muscle Spasm", LOG_ATTACK) //the following attack will log itself
owner.ClickOn(pick(targets))
- owner.a_intent = prev_intent
+ owner.set_combat_mode(FALSE)
if(4)
- var/prev_intent = owner.a_intent
- owner.a_intent = INTENT_HARM
+ owner.set_combat_mode(TRUE)
to_chat(owner, "Your arm spasms!")
owner.log_message("attacked [owner.p_them()]self to a Muscle Spasm", LOG_ATTACK)
owner.ClickOn(owner)
- owner.a_intent = prev_intent
+ owner.set_combat_mode(FALSE)
if(5)
if(owner.incapacitated())
return
@@ -923,8 +921,8 @@
/datum/status_effect/amok/tick()
. = ..()
- var/prev_intent = owner.a_intent
- owner.a_intent = INTENT_HARM
+ var/prev_combat_mode = owner.combat_mode
+ owner.set_combat_mode(TRUE)
var/list/mob/living/targets = list()
for(var/mob/living/potential_target in oview(owner, 1))
@@ -934,7 +932,7 @@
if(LAZYLEN(targets))
owner.log_message(" attacked someone due to the amok debuff.", LOG_ATTACK) //the following attack will log itself
owner.ClickOn(pick(targets))
- owner.a_intent = prev_intent
+ owner.set_combat_mode(prev_combat_mode)
/datum/status_effect/cloudstruck
id = "cloudstruck"
diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm
index 4a57959c9f2..59a37e2c365 100644
--- a/code/datums/wounds/_wounds.dm
+++ b/code/datums/wounds/_wounds.dm
@@ -258,9 +258,14 @@
*/
/datum/wound/proc/try_treating(obj/item/I, mob/user)
// first we weed out if we're not dealing with our wound's bodypart, or if it might be an attack
- if(QDELETED(I) || limb.body_zone != user.zone_selected || (I.force && user.a_intent != INTENT_HELP))
+ if(!I || limb.body_zone != user.zone_selected)
return FALSE
+ if(isliving(user))
+ var/mob/living/tendee = user
+ if(I.force && tendee.combat_mode)
+ return FALSE
+
var/allowed = FALSE
// check if we have a valid treatable tool
diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm
index 889446a666c..68ae4b61ab8 100644
--- a/code/datums/wounds/bones.dm
+++ b/code/datums/wounds/bones.dm
@@ -96,7 +96,7 @@
/datum/wound/blunt/proc/attack_with_hurt_hand(mob/M, atom/target, proximity)
SIGNAL_HANDLER
- if(victim.get_active_hand() != limb || victim.a_intent == INTENT_HELP || !ismob(target) || severity <= WOUND_SEVERITY_MODERATE)
+ if(victim.get_active_hand() != limb || !victim.combat_mode || !ismob(target) || severity <= WOUND_SEVERITY_MODERATE)
return
// With a severe or critical wound, you have a 15% or 30% chance to proc pain on hit
@@ -227,7 +227,7 @@
remove_wound()
/datum/wound/blunt/moderate/try_handling(mob/living/carbon/human/user)
- if(user.pulling != victim || user.zone_selected != limb.body_zone || user.a_intent == INTENT_GRAB)
+ if(user.pulling != victim || user.zone_selected != limb.body_zone)
return FALSE
if(user.grab_state == GRAB_PASSIVE)
@@ -237,7 +237,7 @@
if(user.grab_state >= GRAB_AGGRESSIVE)
user.visible_message("[user] begins twisting and straining [victim]'s dislocated [limb.name]!", "You begin twisting and straining [victim]'s dislocated [limb.name]...", ignored_mobs=victim)
to_chat(victim, "[user] begins twisting and straining your dislocated [limb.name]!")
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
chiropractice(user)
else
malpractice(user)
diff --git a/code/datums/wounds/slash.dm b/code/datums/wounds/slash.dm
index 417653f7090..35fc9995fd4 100644
--- a/code/datums/wounds/slash.dm
+++ b/code/datums/wounds/slash.dm
@@ -149,7 +149,7 @@
suture(I, user)
/datum/wound/slash/try_handling(mob/living/carbon/human/user)
- if(user.pulling != victim || user.zone_selected != limb.body_zone || user.a_intent == INTENT_GRAB || !isfelinid(user) || !victim.can_inject(user, TRUE))
+ if(user.pulling != victim || user.zone_selected != limb.body_zone || !isfelinid(user) || !victim.can_inject(user, TRUE))
return FALSE
if(DOING_INTERACTION_WITH_TARGET(user, victim))
to_chat(user, "You're already interacting with [victim]!")
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 70cb4f06596..2f8eaf5c00f 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -64,9 +64,9 @@
storedpda = null
update_icon()
-/obj/machinery/pdapainter/attackby(obj/item/O, mob/user, params)
+/obj/machinery/pdapainter/attackby(obj/item/O, mob/living/user, params)
if(machine_stat & BROKEN)
- if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
+ if(O.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(!O.tool_start_check(user, amount=0))
return
user.visible_message("[user] is repairing [src].", \
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index a2d4d64086a..79dbb6818da 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -421,7 +421,7 @@
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_paw(mob/living/user)
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
return attack_hand(user)
else
user.changeNext_move(CLICK_CD_MELEE)
diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm
index 5d5a1787cde..b5907426d70 100644
--- a/code/game/machinery/aug_manipulator.dm
+++ b/code/game/machinery/aug_manipulator.dm
@@ -52,7 +52,7 @@
storedpart = null
update_icon()
-/obj/machinery/aug_manipulator/attackby(obj/item/O, mob/user, params)
+/obj/machinery/aug_manipulator/attackby(obj/item/O, mob/living/user, params)
if(default_unfasten_wrench(user, O))
power_change()
return
@@ -73,7 +73,7 @@
O.add_fingerprint(user)
update_icon()
- else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
+ else if(O.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(obj_integrity < max_integrity)
if(!O.tool_start_check(user, amount=0))
return
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index b9cfadc459a..0de547f6f49 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -85,7 +85,7 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all()
-/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
+/obj/machinery/autolathe/attackby(obj/item/O, mob/living/user, params)
if (busy)
to_chat(user, "The autolathe is busy. Please wait for completion of previous operation.")
return TRUE
@@ -101,7 +101,7 @@
wires.interact(user)
return TRUE
- if(user.a_intent == INTENT_HARM) //so we can hit the machine
+ if(user.combat_mode) //so we can hit the machine
return ..()
if(machine_stat)
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index 916fc9ebbcf..274bca5cbd6 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -60,7 +60,7 @@
if(board)
. += "button-board"
-/obj/machinery/button/attackby(obj/item/W, mob/user, params)
+/obj/machinery/button/attackby(obj/item/W, mob/living/user, params)
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(panel_open || allowed(user))
default_deconstruction_screwdriver(user, "button-open", "[skin]",W)
@@ -101,7 +101,7 @@
update_icon()
return
- if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON))
+ if(!user.combat_mode && !(W.item_flags & NOBLUDGEON))
return attack_hand(user)
else
return ..()
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index c1738f69cab..5236a75201f 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -3,7 +3,7 @@
icon_state = "0"
state = 0
-/obj/structure/frame/computer/attackby(obj/item/P, mob/user, params)
+/obj/structure/frame/computer/attackby(obj/item/P, mob/living/user, params)
add_fingerprint(user)
switch(state)
if(0)
@@ -154,7 +154,7 @@
qdel(src)
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 3dab1884d5b..1f235deaa73 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -71,7 +71,7 @@
amt += req_components[path]
return amt
-/obj/structure/frame/machine/attackby(obj/item/P, mob/user, params)
+/obj/structure/frame/machine/attackby(obj/item/P, mob/living/user, params)
switch(state)
if(1)
if(istype(P, /obj/item/circuitboard/machine))
@@ -286,7 +286,7 @@
return TRUE
to_chat(user, "You cannot add that to the machine!")
return FALSE
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
/obj/structure/frame/machine/deconstruct(disassembled = TRUE)
diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm
index c35b13ef9fe..9e5bd244ace 100644
--- a/code/game/machinery/defibrillator_mount.dm
+++ b/code/game/machinery/defibrillator_mount.dm
@@ -137,7 +137,7 @@
/obj/machinery/defibrillator_mount/wrench_act(mob/living/user, obj/item/wrench/W)
if(!wallframe_type)
return ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(defib)
to_chat(user, "The mount can't be deconstructed while a defibrillator unit is loaded!")
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index fe6f0cb6d20..5ca54d26af1 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -25,8 +25,8 @@
/obj/structure/barricade/proc/make_debris()
return
-/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
- if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM && bar_material == METAL)
+/obj/structure/barricade/attackby(obj/item/I, mob/living/user, params)
+ if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode && bar_material == METAL)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return
diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm
index e6ac2417867..579abcd8c46 100644
--- a/code/game/machinery/dish_drive.dm
+++ b/code/game/machinery/dish_drive.dm
@@ -49,7 +49,7 @@
flick("synthesizer_beam", src)
/obj/machinery/dish_drive/attackby(obj/item/I, mob/living/user, params)
- if(is_type_in_list(I, collectable_items) && user.a_intent != INTENT_HARM)
+ if(is_type_in_list(I, collectable_items) && !user.combat_mode)
if(!user.transferItemToLoc(I, src))
return
LAZYADD(dish_drive_contents, I)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index e0a34cbedeb..7bef7675e5d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -986,12 +986,12 @@
return ..()
-/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/user)
+/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/living/user)
if(!operating && density)
if(seal)
to_chat(user, "[src] is blocked by a seal!")
return
- if(user.a_intent != INTENT_HELP)
+ if(user.combat_mode)
if(!W.tool_start_check(user, amount=0))
return
user.visible_message("[user] begins [welded ? "unwelding":"welding"] the airlock.", \
@@ -1263,7 +1263,7 @@
if(!density) //Already open
return ..()
if(locked || welded || seal) //Extremely generic, as aliens only understand the basics of how airlocks work.
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
to_chat(user, "[src] refuses to budge!")
return
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index cac4e2107b9..7f320605b47 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -216,8 +216,8 @@
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
return
-/obj/machinery/door/attackby(obj/item/I, mob/user, params)
- if(user.a_intent != INTENT_HARM && (I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/fireaxe)))
+/obj/machinery/door/attackby(obj/item/I, mob/living/user, params)
+ if(!user.combat_mode && (I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/fireaxe)))
var/forced_open = FALSE
if(istype(I, /obj/item/crowbar))
var/obj/item/crowbar/C = I
@@ -227,7 +227,7 @@
else if(I.tool_behaviour == TOOL_WELDER)
try_to_weld(I, user)
return TRUE
- else if(!(I.item_flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
+ else if(!(I.item_flags & NOBLUDGEON) && !user.combat_mode)
try_to_activate_door(user)
return TRUE
return ..()
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 88c14af391c..c57114e3997 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -185,7 +185,7 @@
/obj/machinery/firealarm/attack_robot(mob/user)
return attack_hand(user)
-/obj/machinery/firealarm/attackby(obj/item/W, mob/user, params)
+/obj/machinery/firealarm/attackby(obj/item/W, mob/living/user, params)
add_fingerprint(user)
if(W.tool_behaviour == TOOL_SCREWDRIVER && buildstage == 2)
@@ -197,7 +197,7 @@
if(panel_open)
- if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
+ if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(obj_integrity < max_integrity)
if(!W.tool_start_check(user, amount=0))
return
diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm
index 16e16be307f..fe6804ea903 100644
--- a/code/game/machinery/limbgrower.dm
+++ b/code/game/machinery/limbgrower.dm
@@ -61,7 +61,7 @@
reagents.trans_to(G, G.reagents.maximum_volume)
..()
-/obj/machinery/limbgrower/attackby(obj/item/O, mob/user, params)
+/obj/machinery/limbgrower/attackby(obj/item/O, mob/living/user, params)
if (busy)
to_chat(user, "The Limb Grower is busy. Please wait for completion of previous operation.")
return
@@ -73,7 +73,7 @@
if(panel_open && default_deconstruction_crowbar(O))
return
- if(user.a_intent == INTENT_HARM) //so we can hit the machine
+ if(user.combat_mode) //so we can hit the machine
return ..()
/obj/machinery/limbgrower/Topic(href, href_list)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 58698466fc6..395361592e1 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -735,7 +735,7 @@ GLOBAL_LIST_EMPTY(allCasters)
to_chat(user, "You [anchored ? "un" : ""]secure [name].")
new /obj/item/wallframe/newscaster(loc)
qdel(src)
- else if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
+ else if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(machine_stat & BROKEN)
if(!I.tool_start_check(user, amount=0))
return
@@ -778,8 +778,8 @@ GLOBAL_LIST_EMPTY(allCasters)
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
-/obj/machinery/newscaster/attack_paw(mob/user)
- if(user.a_intent != INTENT_HARM)
+/obj/machinery/newscaster/attack_paw(mob/living/user)
+ if(!user.combat_mode)
to_chat(user, "The newscaster controls are far too complicated for your tiny brain!")
else
take_damage(5, BRUTE, MELEE)
diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm
index 9508f0158db..926de47ca7d 100644
--- a/code/game/machinery/porta_turret/portable_turret_cover.dm
+++ b/code/game/machinery/porta_turret/portable_turret_cover.dm
@@ -29,8 +29,8 @@
/obj/machinery/porta_turret_cover/attack_robot(mob/user)
return ..() || parent_turret.attack_robot(user)
-/obj/machinery/porta_turret_cover/attack_hand(mob/user)
- return ..() || parent_turret.attack_hand(user)
+/obj/machinery/porta_turret_cover/attack_hand(mob/user, modifiers)
+ return ..() || parent_turret.attack_hand(user, modifiers)
/obj/machinery/porta_turret_cover/attack_ghost(mob/user)
return ..() || parent_turret.attack_ghost(user)
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 75d9481d48b..1143c68287f 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -76,8 +76,8 @@
///The rune that created the shield itself. Used to delete the rune when the shield is destroyed.
var/obj/effect/rune/parent_rune
-/obj/structure/emergency_shield/cult/barrier/attack_hand(mob/living/user)
- parent_rune.attack_hand(user)
+/obj/structure/emergency_shield/cult/barrier/attack_hand(mob/living/user, modifiers)
+ parent_rune.attack_hand(user, modifiers)
/obj/structure/emergency_shield/cult/barrier/attack_animal(mob/living/simple_animal/user)
if(iscultist(user))
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index e8736c9c546..8f4e4df3c42 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -293,7 +293,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
if(panel_open)
. += "wm_panel"
-/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
+/obj/machinery/washing_machine/attackby(obj/item/W, mob/living/user, params)
if(panel_open && !busy && default_unfasten_wrench(user, W))
return
@@ -301,7 +301,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
update_icon()
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
if (!state_open)
to_chat(user, "Open the door first!")
return TRUE
@@ -324,7 +324,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
else
return ..()
-/obj/machinery/washing_machine/attack_hand(mob/user)
+/obj/machinery/washing_machine/attack_hand(mob/living/user)
. = ..()
if(.)
return
@@ -332,7 +332,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
to_chat(user, "[src] is busy!")
return
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
var/mob/living/L = user.pulling
if(L.buckled || L.has_buckled_mobs())
return
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index d1db20ca797..2beb6327c91 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -342,7 +342,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
add_fingerprint(usr)
return ..()
-/obj/item/attack_hand(mob/user)
+/obj/item/attack_hand(mob/user, modifiers)
. = ..()
if(.)
return
@@ -604,7 +604,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "eye_stab", /datum/mood_event/eye_stab)
- log_combat(user, M, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])")
+ log_combat(user, M, "attacked", "[src.name]", "(Combat mode: [user.combat_mode ? "On" : "Off"])")
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm
index f6e6104c09e..51259e42c73 100644
--- a/code/game/objects/items/cardboard_cutouts.dm
+++ b/code/game/objects/items/cardboard_cutouts.dm
@@ -39,7 +39,7 @@
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
- if(user.a_intent == INTENT_HELP || pushed_over)
+ if(!user.combat_mode || pushed_over)
return ..()
user.visible_message("[user] pushes over [src]!", "You push over [src]!")
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 2bc8e485d47..fb429ae3266 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -82,7 +82,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(M)] on fire with [src] at [AREACOORD(user)]")
log_game("[key_name(user)] set [key_name(M)] on fire with [src] at [AREACOORD(user)]")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
- if(lit && cig && user.a_intent == INTENT_HELP)
+ if(lit && cig && !user.combat_mode)
if(cig.lit)
to_chat(user, "[cig] is already lit!")
if(M == user)
@@ -296,7 +296,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
light("[user] lights [src] with [M]'s burning body. What a cold-blooded badass.")
return
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
- if(lit && cig && user.a_intent == INTENT_HELP)
+ if(lit && cig && !user.combat_mode)
if(cig.lit)
to_chat(user, "The [cig.name] is already lit!")
if(M == user)
@@ -734,7 +734,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(M)] on fire with [src] at [AREACOORD(user)]")
log_game("[key_name(user)] set [key_name(M)] on fire with [src] at [AREACOORD(user)]")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
- if(lit && cig && user.a_intent == INTENT_HELP)
+ if(lit && cig && !user.combat_mode)
if(cig.lit)
to_chat(user, "The [cig.name] is already lit!")
if(M == user)
diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm
index 1ce3e4e492f..cabdcdf449c 100644
--- a/code/game/objects/items/cosmetics.dm
+++ b/code/game/objects/items/cosmetics.dm
@@ -123,7 +123,7 @@
playsound(loc, 'sound/items/welder2.ogg', 20, TRUE)
-/obj/item/razor/attack(mob/M, mob/user)
+/obj/item/razor/attack(mob/M, mob/living/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/location = user.zone_selected
@@ -131,7 +131,7 @@
to_chat(user, "[H] doesn't have a head!")
return
if(location == BODY_ZONE_PRECISE_MOUTH)
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
if(H.gender == MALE)
if (H == user)
to_chat(user, "You need a mirror to properly style your own facial hair!")
@@ -178,7 +178,7 @@
shave(H, location)
else if(location == BODY_ZONE_HEAD)
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
if (H == user)
to_chat(user, "You need a mirror to properly style your own hair!")
return
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 213a3e04e69..38ab2ef8a83 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -410,7 +410,7 @@
forceMove(defib)
defib.update_power()
-/obj/item/shockpaddles/attack(mob/M, mob/user)
+/obj/item/shockpaddles/attack(mob/M, mob/living/user, params)
if(busy)
return
if(req_defib && !defib.powered)
@@ -430,7 +430,8 @@
to_chat(user, "[src] are recharging!")
return
- if(user.a_intent == INTENT_DISARM)
+ var/list/modifiers = params2list(params)
+ if(modifiers && modifiers["right"])
do_disarm(M, user)
return
@@ -446,7 +447,7 @@
to_chat(user, "You need to target your patient's chest with [src]!")
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
do_harm(H, user)
return
diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm
index 0679ff2b5f4..d9358847d4b 100644
--- a/code/game/objects/items/devices/geiger_counter.dm
+++ b/code/game/objects/items/devices/geiger_counter.dm
@@ -123,9 +123,9 @@
update_icon()
to_chat(user, "[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].")
-/obj/item/geiger_counter/afterattack(atom/target, mob/user)
+/obj/item/geiger_counter/afterattack(atom/target, mob/living/user, params)
. = ..()
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
if(!(obj_flags & EMAGGED))
user.visible_message("[user] scans [target] with [src].", "You scan [target]'s radiation levels with [src]...")
addtimer(CALLBACK(src, .proc/scan, target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 3f80d8ce224..3e4ab5466ed 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -276,7 +276,7 @@ effective or pretty fucking useless.
new /obj/item/wirecutters(src)
/obj/item/storage/toolbox/emergency/turret/attackby(obj/item/I, mob/living/user, params)
- if(I.tool_behaviour == TOOL_WRENCH && user.a_intent == INTENT_HARM)
+ if(I.tool_behaviour == TOOL_WRENCH && user.combat_mode)
user.visible_message("[user] bashes [src] with [I]!", \
"You bash [src] with [I]!", null, COMBAT_MESSAGE_RANGE)
playsound(src, "sound/items/drill_use.ogg", 80, TRUE, -1)
diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm
index 5cc08d51e0c..71444e0ea2b 100644
--- a/code/game/objects/items/extinguisher.dm
+++ b/code/game/objects/items/extinguisher.dm
@@ -89,8 +89,8 @@
to_chat(user, "The safety is [safety ? "on" : "off"].")
return
-/obj/item/extinguisher/attack(mob/M, mob/user)
- if(user.a_intent == INTENT_HELP && !safety) //If we're on help intent and going to spray people, don't bash them.
+/obj/item/extinguisher/attack(mob/M, mob/living/user)
+ if(!user.combat_mode && !safety) //If we're on help intent and going to spray people, don't bash them.
return FALSE
else
return ..()
diff --git a/code/game/objects/items/food/pastries.dm b/code/game/objects/items/food/pastries.dm
index 844bf5eb124..45a28642c37 100644
--- a/code/game/objects/items/food/pastries.dm
+++ b/code/game/objects/items/food/pastries.dm
@@ -833,11 +833,11 @@
add_overlay(pancake_visual)
update_icon()
-/obj/item/food/pancakes/attack(mob/M, mob/user, def_zone, stacked = TRUE)
- if(user.a_intent == INTENT_HARM || !contents.len || !stacked)
+/obj/item/food/pancakes/attack(mob/M, mob/living/user, params, stacked = TRUE)
+ if(user.combat_mode || !contents.len || !stacked)
return ..()
var/obj/item/O = contents[contents.len]
- . = O.attack(M, user, def_zone, FALSE)
+ . = O.attack(M, user, params, FALSE)
update_icon()
#undef PANCAKE_MAX_STACK
diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm
index 3b67ce325ff..f5928a3ef61 100644
--- a/code/game/objects/items/inducer.dm
+++ b/code/game/objects/items/inducer.dm
@@ -34,7 +34,7 @@
cell.emp_act(severity)
/obj/item/inducer/attack_obj(obj/O, mob/living/carbon/user)
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(cantbeused(user))
@@ -135,8 +135,8 @@
recharging = FALSE
-/obj/item/inducer/attack(mob/M, mob/user)
- if(user.a_intent == INTENT_HARM)
+/obj/item/inducer/attack(mob/M, mob/living/user)
+ if(user.combat_mode)
return ..()
if(cantbeused(user))
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 7f46f525433..a90379987ae 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -244,7 +244,7 @@
/obj/item/melee/classic_baton/proc/additional_effects_silicon(mob/living/target, mob/living/user)
return
-/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
+/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user, params)
if(!on)
return ..()
@@ -264,7 +264,7 @@
return
if(iscyborg(target))
// We don't stun if we're on harm.
- if (user.a_intent != INTENT_HARM)
+ if (!user.combat_mode)
if (affect_silicon)
var/list/desc = get_silicon_stun_description(target, user)
@@ -284,44 +284,45 @@
return
if(!isliving(target))
return
- if (user.a_intent == INTENT_HARM)
- if(!..())
+ var/list/modifiers = params2list(params)
+
+ if(modifiers && modifiers["right"])
+ ..()
+ return
+ if(cooldown_check > world.time)
+ var/wait_desc = get_wait_description()
+ if (wait_desc)
+ to_chat(user, wait_desc)
+ return
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
return
- if(!iscyborg(target))
+ if(check_martial_counter(H, user))
return
+
+ var/list/desc = get_stun_description(target, user)
+
+ if (stun_animation)
+ user.do_attack_animation(target)
+
+ playsound(get_turf(src), on_stun_sound, 75, TRUE, -1)
+ target.Knockdown(knockdown_time_carbon)
+ target.apply_damage(stamina_damage, STAMINA, BODY_ZONE_CHEST)
+ additional_effects_carbon(target, user)
+
+ log_combat(user, target, "stunned", src)
+ add_fingerprint(user)
+
+ target.visible_message(desc["visible"], desc["local"])
+
+ if(!iscarbon(user))
+ target.LAssailant = null
else
- if(cooldown_check <= world.time)
- if(ishuman(target))
- var/mob/living/carbon/human/H = target
- if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
- return
- if(check_martial_counter(H, user))
- return
+ target.LAssailant = user
+ cooldown_check = world.time + cooldown
+ return
- var/list/desc = get_stun_description(target, user)
-
- if (stun_animation)
- user.do_attack_animation(target)
-
- playsound(get_turf(src), on_stun_sound, 75, TRUE, -1)
- target.Knockdown(knockdown_time_carbon)
- target.apply_damage(stamina_damage, STAMINA, BODY_ZONE_CHEST)
- additional_effects_carbon(target, user)
-
- log_combat(user, target, "stunned", src)
- add_fingerprint(user)
-
- target.visible_message(desc["visible"], desc["local"])
-
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = user
- cooldown_check = world.time + cooldown
- else
- var/wait_desc = get_wait_description()
- if (wait_desc)
- to_chat(user, wait_desc)
/obj/item/conversion_kit
name = "conversion kit"
diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm
index 347fbb97c5e..71d9f806ce5 100644
--- a/code/game/objects/items/pet_carrier.dm
+++ b/code/game/objects/items/pet_carrier.dm
@@ -82,7 +82,7 @@
update_icon()
/obj/item/pet_carrier/attack(mob/living/target, mob/living/user)
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(!open)
to_chat(user, "You need to open [src]'s door!")
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index 2f05b4519db..77afe486d27 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -70,8 +70,8 @@
out += "[icon2html(tank, user)] It has \a [tank] mounted onto it."
. += out.Join("\n")
-/obj/item/pneumatic_cannon/attackby(obj/item/W, mob/user, params)
- if(user.a_intent == INTENT_HARM)
+/obj/item/pneumatic_cannon/attackby(obj/item/W, mob/living/user, params)
+ if(user.combat_mode)
return ..()
if(istype(W, /obj/item/tank/internals))
if(!tank)
@@ -135,7 +135,7 @@
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/user, flag, params)
. = ..()
- if(flag && user.a_intent == INTENT_HARM) //melee attack
+ if(flag && user.combat_mode)//melee attack
return
if(!istype(user))
return
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 351007f9c97..b384adaf4f8 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -30,7 +30,7 @@
playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
- log_combat(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
+ log_combat(user, M, "stunned", src, "(Combat mode: [user.combat_mode ? "On" : "Off"])")
/obj/item/borg/cyborghug
name = "hugging module"
@@ -64,14 +64,15 @@
if(3)
to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.")
-/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user)
+/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user, params)
if(M == user)
return
switch(mode)
if(0)
if(M.health >= 0)
if(isanimal(M))
- M.attack_hand(user) //This enables borgs to get the floating heart icon and mob emote from simple_animal's that have petbonus == true.
+ var/list/modifiers = params2list(params)
+ M.attack_hand(user, modifiers) //This enables borgs to get the floating heart icon and mob emote from simple_animal's that have petbonus == true.
return
if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message("[user] playfully boops [M] on the head!", \
@@ -910,7 +911,7 @@
. += arm
/obj/item/borg/apparatus/beaker/attack_self(mob/living/silicon/robot/user)
- if(stored && !user.client?.keys_held["Alt"] && user.a_intent != "help")
+ if(stored && !user.client?.keys_held["Alt"] && user.combat_mode)
var/obj/item/reagent_containers/C = stored
C.SplashReagents(get_turf(user))
loc.visible_message("[user] spills the contents of the [C] all over the floor.")
diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm
index 07e0fec1ac1..09b3a436880 100644
--- a/code/game/objects/items/singularityhammer.dm
+++ b/code/game/objects/items/singularityhammer.dm
@@ -68,7 +68,7 @@
step_towards(H,pull)
step_towards(H,pull)
-/obj/item/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
+/obj/item/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/living/user, proximity)
. = ..()
if(!proximity)
return
diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm
index a021146bf14..ba157f1bf6f 100644
--- a/code/game/objects/items/storage/book.dm
+++ b/code/game/objects/items/storage/book.dm
@@ -294,7 +294,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
desc += "The name [ownername] is written in blood inside the cover."
/obj/item/storage/book/bible/syndicate/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
- if (user.a_intent == INTENT_HELP)
+ if (!user.combat_mode)
return ..()
else
return ..(M,user,heal_mode = FALSE)
diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm
index 28af846a784..018142bb62c 100644
--- a/code/game/objects/items/stunbaton.dm
+++ b/code/game/objects/items/stunbaton.dm
@@ -1,6 +1,6 @@
/obj/item/melee/baton
name = "stun baton"
- desc = "A stun baton for incapacitating people with."
+ desc = "A stun baton for incapacitating people with. Left click to harm, right click to stun."
icon_state = "stunbaton"
inhand_icon_state = "baton"
@@ -179,7 +179,7 @@
return TRUE
return FALSE
-/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
+/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user, params)
if(clumsy_check(user))
return FALSE
@@ -193,23 +193,25 @@
if(check_martial_counter(L, user))
return
- if(user.a_intent != INTENT_HARM)
- if(turned_on)
- if(attack_cooldown_check <= world.time)
- if(baton_effect(M, user))
- user.do_attack_animation(M)
- return
- else
- to_chat(user, "The baton is still charging!")
- else
- M.visible_message("[user] prods [M] with [src]. Luckily it was off.", \
- "[user] prods you with [src]. Luckily it was off.")
- else
+ var/list/modifiers = params2list(params)
+ if(modifiers && modifiers["right"])
if(turned_on)
if(attack_cooldown_check <= world.time)
baton_effect(M, user)
..()
-
+ return
+ else if(turned_on)
+ if(attack_cooldown_check <= world.time)
+ if(baton_effect(M, user))
+ user.do_attack_animation(M)
+ return
+ else
+ to_chat(user, "The baton is still charging!")
+ return
+ else
+ M.visible_message("[user] prods [M] with [src]. Luckily it was off.", \
+ "[user] prods you with [src]. Luckily it was off.")
+ return
/obj/item/melee/baton/proc/baton_effect(mob/living/L, mob/user)
if(shields_blocked(L, user))
@@ -277,7 +279,7 @@
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/melee/baton/cattleprod
name = "stunprod"
- desc = "An improvised stun baton."
+ desc = "An improvised stun baton. Left click to harm, right click to stun."
icon_state = "stunprod"
inhand_icon_state = "prod"
worn_icon_state = null
diff --git a/code/game/objects/items/tail_pin.dm b/code/game/objects/items/tail_pin.dm
index 5e00e4d1df1..4e8729c5da2 100644
--- a/code/game/objects/items/tail_pin.dm
+++ b/code/game/objects/items/tail_pin.dm
@@ -31,7 +31,7 @@
. = ..()
if(!istype(I,/obj/item/tail_pin))
return
- if(!(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))) //We're using the same trick that tables use for placing objects x and y onto the click location.
+ if(!(I.item_flags & ABSTRACT)) //We're using the same trick that tables use for placing objects x and y onto the click location.
return
if(!user.transferItemToLoc(I, drop_location(), silent = FALSE))
return
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index 8edfca40aa5..f24ef46f4f6 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -113,13 +113,13 @@
dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder
qdel(src)
-/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user)
+/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/living/user)
if(!istype(H))
return ..()
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
- if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
+ if(affecting && affecting.status == BODYPART_ROBOTIC && !user.combat_mode)
if(src.use_tool(H, user, 0, volume=50, amount=1))
if(user == H)
user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].",
diff --git a/code/game/objects/items/toy_mechs.dm b/code/game/objects/items/toy_mechs.dm
index bf28081ba07..c9c89276ee5 100644
--- a/code/game/objects/items/toy_mechs.dm
+++ b/code/game/objects/items/toy_mechs.dm
@@ -156,7 +156,7 @@
if(target == user)
to_chat(user, "Target another toy mech if you want to start a battle with yourself.")
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
if(wants_to_battle) //prevent spamming someone with offers
to_chat(user, "You already are offering battle to someone!")
return
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index d4c341ebc7c..3dcf6d30e7e 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -23,13 +23,13 @@ oranges says: This is a meme relating to the english translation of the ss13 rus
mrdoombringer sez: and remember kids, if you try and PR a fix for this item's grammar, you are admitting that you are, indeed, a newfriend.
for further reading, please see: https://github.com/tgstation/tgstation/pull/30173 and https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%2F%2Flurkmore.to%2FSS13&edit-text=&act=url
*/
-/obj/item/banhammer/attack(mob/M, mob/user)
+/obj/item/banhammer/attack(mob/M, mob/living/user)
if(user.zone_selected == BODY_ZONE_HEAD)
M.visible_message("[user] are stroking the head of [M] with a bangammer.", "[user] are stroking your head with a bangammer.", "You hear a bangammer stroking a head.") // see above comment
else
M.visible_message("[M] has been banned FOR NO REISIN by [user]!", "You have been banned FOR NO REISIN by [user]!", "You hear a banhammer banning someone.")
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
- if(user.a_intent != INTENT_HELP)
+ if(user.combat_mode)
return ..(M, user)
/obj/item/sord
@@ -961,12 +961,13 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
name = "\improper ACME Extendo-Hand"
desc = "A novelty extendo-hand produced by the ACME corporation. Originally designed to knock out roadrunners."
-/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user)
+/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user, params)
var/dist = get_dist(M, user)
if(dist < min_reach)
to_chat(user, "[M] is too close to use [src] on.")
return
- M.attack_hand(user)
+ var/list/modifiers = params2list(params)
+ M.attack_hand(user, modifiers)
/obj/item/gohei
name = "gohei"
diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm
index 5c83faa8b46..4cb788a3b58 100644
--- a/code/game/objects/structures/artstuff.dm
+++ b/code/game/objects/structures/artstuff.dm
@@ -88,7 +88,7 @@
ui.open()
/obj/item/canvas/attackby(obj/item/I, mob/living/user, params)
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
ui_interact(user)
else
return ..()
diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm
index 350804546ed..ea18039b346 100644
--- a/code/game/objects/structures/beds_chairs/alien_nest.dm
+++ b/code/game/objects/structures/beds_chairs/alien_nest.dm
@@ -84,7 +84,7 @@
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
return attack_hand(user)
else
return ..()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index df26a03e182..384795735b4 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -256,7 +256,7 @@
else
return ..()
-/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
+/obj/structure/closet/proc/tool_interact(obj/item/W, mob/living/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(istype(W, cutting_tool))
@@ -303,7 +303,7 @@
user.visible_message("[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \
"You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \
"You hear a ratchet.")
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
var/item_is_id = W.GetID()
if(!item_is_id)
return FALSE
diff --git a/code/game/objects/structures/crates_lockers/crates/large.dm b/code/game/objects/structures/crates_lockers/crates/large.dm
index 655c42a0826..8ec3ef4c94d 100644
--- a/code/game/objects/structures/crates_lockers/crates/large.dm
+++ b/code/game/objects/structures/crates_lockers/crates/large.dm
@@ -22,7 +22,7 @@
else
to_chat(user, "You need a crowbar to pry this open!")
-/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
+/obj/structure/closet/crate/large/attackby(obj/item/W, mob/living/user, params)
if(W.tool_behaviour == TOOL_CROWBAR)
if(manifest)
tear_manifest(user)
@@ -41,7 +41,7 @@
qdel(src)
else
- if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it.
+ if(user.combat_mode) //Only return ..() if intent is harm, otherwise return 0 or just end it.
return ..() //Stops it from opening and turning invisible when items are used on it.
else
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 9fde572f584..198b3bd3ef9 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -113,14 +113,14 @@
else if(!open)
. += "[initial(icon_state)]_closed"
-/obj/structure/displaycase/attackby(obj/item/W, mob/user, params)
+/obj/structure/displaycase/attackby(obj/item/W, mob/living/user, params)
if(W.GetID() && !broken && openable)
if(allowed(user))
to_chat(user, "You [open ? "close":"open"] [src].")
toggle_lock(user)
else
to_chat(user, "Access denied.")
- else if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
+ else if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken)
if(obj_integrity < max_integrity)
if(!W.tool_start_check(user, amount=5))
return
@@ -177,7 +177,7 @@
/obj/structure/displaycase/attack_paw(mob/user)
return attack_hand(user)
-/obj/structure/displaycase/attack_hand(mob/user)
+/obj/structure/displaycase/attack_hand(mob/living/user)
. = ..()
if(.)
return
@@ -192,7 +192,7 @@
//prevents remote "kicks" with TK
if (!Adjacent(user))
return
- if (user.a_intent == INTENT_HELP)
+ if (!user.combat_mode)
if(!user.is_blind())
user.examinate(src)
return
@@ -293,11 +293,11 @@
GLOB.trophy_cases -= src
return ..()
-/obj/structure/displaycase/trophy/attackby(obj/item/W, mob/user, params)
+/obj/structure/displaycase/trophy/attackby(obj/item/W, mob/living/user, params)
if(!user.Adjacent(src)) //no TK museology
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(user.is_holding_item_of_type(/obj/item/key/displaycase))
@@ -539,7 +539,7 @@
/obj/structure/displaycase/forsale/wrench_act(mob/living/user, obj/item/I)
. = ..()
- if(open && user.a_intent == INTENT_HELP )
+ if(open && !user.combat_mode)
if(anchored)
to_chat(user, "You start unsecuring [src]...")
else
@@ -553,7 +553,7 @@
to_chat(user, "You secure [src].")
set_anchored(!anchored)
return
- else if(!open && user.a_intent == INTENT_HELP)
+ else if(!open && !user.combat_mode)
to_chat(user, "[src] must be open to move it.")
return
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 05d9f292556..5fd75a6e75a 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -46,7 +46,7 @@
stored_extinguisher = null
update_icon()
-/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
+/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_WRENCH && !stored_extinguisher)
to_chat(user, "You start unsecuring [name]...")
I.play_tool_sound(src)
@@ -68,7 +68,7 @@
return TRUE
else
toggle_cabinet(user)
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
toggle_cabinet(user)
else
return ..()
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index dbe6be222f2..afee2a03d32 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -22,10 +22,10 @@
QDEL_NULL(fireaxe)
return ..()
-/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
+/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/living/user, params)
if(iscyborg(user) || I.tool_behaviour == TOOL_MULTITOOL)
toggle_lock(user)
- else if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
+ else if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=2))
return
diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm
index 4e4c8a6d6a9..1b4e739f56c 100644
--- a/code/game/objects/structures/guillotine.dm
+++ b/code/game/objects/structures/guillotine.dm
@@ -66,7 +66,7 @@
if (LAZYLEN(buckled_mobs))
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
-/obj/structure/guillotine/attack_hand(mob/user)
+/obj/structure/guillotine/attack_hand(mob/living/user)
add_fingerprint(user)
// Currently being used by something
@@ -83,7 +83,7 @@
return
if (GUILLOTINE_BLADE_RAISED)
if (LAZYLEN(buckled_mobs))
- if (user.a_intent == INTENT_HARM)
+ if (user.combat_mode)
user.visible_message("[user] begins to pull the lever!",
"You begin to the pull the lever.")
current_action = GUILLOTINE_ACTION_INUSE
diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm
index 32bead1b45f..7140288b7cf 100644
--- a/code/game/objects/structures/guncase.dm
+++ b/code/game/objects/structures/guncase.dm
@@ -34,7 +34,7 @@
else
. += "[icon_state]_door"
-/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
+/obj/structure/guncase/attackby(obj/item/I, mob/living/user, params)
if(iscyborg(user) || isalien(user))
return
if(istype(I, gun_category) && open)
@@ -47,7 +47,7 @@
to_chat(user, "[src] is full.")
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
open = !open
update_icon()
else
diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm
index 1df2573c83d..e5f264057e9 100644
--- a/code/game/objects/structures/holosign.dm
+++ b/code/game/objects/structures/holosign.dm
@@ -162,7 +162,7 @@
return TRUE
/obj/structure/holosign/barrier/medical/attack_hand(mob/living/user)
- if(CanPass(user) && user.a_intent == INTENT_HELP)
+ if(CanPass(user) && !user.combat_mode)
force_allaccess = !force_allaccess
to_chat(user, "You [force_allaccess ? "deactivate" : "activate"] the biometric scanners.") //warning spans because you can make the station sick!
else
diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm
index 074c2acf214..bf348b1d260 100644
--- a/code/game/objects/structures/kitchen_spike.dm
+++ b/code/game/objects/structures/kitchen_spike.dm
@@ -61,8 +61,8 @@
return TRUE
//ATTACK HAND IGNORING PARENT RETURN VALUE
-/obj/structure/kitchenspike/attack_hand(mob/user)
- if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
+/obj/structure/kitchenspike/attack_hand(mob/living/user)
+ if(VIABLE_MOB_CHECK(user.pulling) && user.combat_mode && !has_buckled_mobs())
var/mob/living/L = user.pulling
if(do_mob(user, src, 120))
if(has_buckled_mobs()) //to prevent spam/queing up attacks
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index 70112a8f40c..c4db8c84820 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -127,10 +127,10 @@
/obj/structure/mineral_door/update_icon_state()
icon_state = "[initial(icon_state)][door_opened ? "open":""]"
-/obj/structure/mineral_door/attackby(obj/item/I, mob/user)
+/obj/structure/mineral_door/attackby(obj/item/I, mob/living/user)
if(pickaxe_door(user, I))
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
return attack_hand(user)
else
return ..()
@@ -341,7 +341,7 @@
fire_act(I.get_temperature())
return
- if((user.a_intent != INTENT_HARM) && istype(I, /obj/item/paper) && (obj_integrity < max_integrity))
+ if((!user.combat_mode) && istype(I, /obj/item/paper) && (obj_integrity < max_integrity))
user.visible_message("[user] starts to patch the holes in [src].", "You start patching some of the holes in [src]!")
if(do_after(user, 2 SECONDS, src))
obj_integrity = min(obj_integrity+4,max_integrity)
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 44d9c28ec14..efb88a8664e 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -70,7 +70,7 @@
/obj/structure/mirror/welder_act(mob/living/user, obj/item/I)
..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(!broken)
diff --git a/code/game/objects/structures/plaques/_plaques.dm b/code/game/objects/structures/plaques/_plaques.dm
index 272b729ae85..4850057b2df 100644
--- a/code/game/objects/structures/plaques/_plaques.dm
+++ b/code/game/objects/structures/plaques/_plaques.dm
@@ -60,7 +60,7 @@
/obj/structure/plaque/welder_act(mob/living/user, obj/item/I)
. = ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(obj_integrity == max_integrity)
to_chat(user, "This plaque is already in perfect condition.")
@@ -78,7 +78,7 @@
/obj/item/plaque/welder_act(mob/living/user, obj/item/I)
. = ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(obj_integrity == max_integrity)
to_chat(user, "This plaque is already in perfect condition.")
diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm
index b67e5f07a2c..ee4384e5fac 100644
--- a/code/game/objects/structures/railings.dm
+++ b/code/game/objects/structures/railings.dm
@@ -30,7 +30,7 @@
..()
add_fingerprint(user)
- if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
+ if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return
diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm
index 8b2cd278641..bbc2fb33d89 100644
--- a/code/game/objects/structures/signs/_signs.dm
+++ b/code/game/objects/structures/signs/_signs.dm
@@ -93,7 +93,7 @@
/obj/structure/sign/welder_act(mob/living/user, obj/item/I)
. = ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(obj_integrity == max_integrity)
to_chat(user, "This sign is already in perfect condition.")
@@ -111,7 +111,7 @@
/obj/item/sign/welder_act(mob/living/user, obj/item/I)
. = ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(obj_integrity == max_integrity)
to_chat(user, "This sign is already in perfect condition.")
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 34358041ad4..d48182f184e 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -69,15 +69,16 @@
if(pushed_mob.buckled)
to_chat(user, "[pushed_mob] is buckled to [pushed_mob.buckled]!")
return
- if(user.a_intent == INTENT_GRAB)
- if(user.grab_state < GRAB_AGGRESSIVE)
- to_chat(user, "You need a better grip to do that!")
- return
- if(user.grab_state >= GRAB_NECK)
- tablelimbsmash(user, pushed_mob)
- else
- tablepush(user, pushed_mob)
- if(user.a_intent == INTENT_HELP)
+ if(user.combat_mode)
+ switch(user.grab_state)
+ if(GRAB_PASSIVE)
+ to_chat(user, "You need a better grip to do that!")
+ return
+ if(GRAB_AGGRESSIVE)
+ tablepush(user, pushed_mob)
+ if(GRAB_NECK to GRAB_KILL)
+ tablelimbsmash(user, pushed_mob)
+ else
pushed_mob.visible_message("[user] begins to place [pushed_mob] onto [src]...", \
"[user] begins to place [pushed_mob] onto [src]...")
if(do_after(user, 35, target = pushed_mob))
@@ -161,8 +162,9 @@
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table_limbsmash, banged_limb)
-/obj/structure/table/attackby(obj/item/I, mob/user, params)
- if(!(flags_1 & NODECONSTRUCT_1) && user.a_intent != INTENT_HELP)
+/obj/structure/table/attackby(obj/item/I, mob/living/user, params)
+ var/list/modifiers = params2list(params)
+ if(!(flags_1 & NODECONSTRUCT_1) && modifiers && modifiers["right"])
if(I.tool_behaviour == TOOL_SCREWDRIVER && deconstruction_ready)
to_chat(user, "You start disassembling [src]...")
if(I.use_tool(src, user, 20, volume=50))
@@ -192,30 +194,26 @@
var/mob/living/carried_mob = riding_item.rider
if(carried_mob == user) //Piggyback user.
return
- switch(user.a_intent)
- if(INTENT_HARM)
- user.unbuckle_mob(carried_mob)
- tablelimbsmash(user, carried_mob)
- if(INTENT_HELP)
- var/tableplace_delay = 3.5 SECONDS
- var/skills_space = ""
- if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
- tableplace_delay = 2 SECONDS
- skills_space = " expertly"
- else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
- tableplace_delay = 2.75 SECONDS
- skills_space = " quickly"
- carried_mob.visible_message("[user] begins to[skills_space] place [carried_mob] onto [src]...",
- "[user] begins to[skills_space] place [carried_mob] onto [src]...")
- if(do_after(user, tableplace_delay, target = carried_mob))
- user.unbuckle_mob(carried_mob)
- tableplace(user, carried_mob)
- else
+ if(user.combat_mode)
+ user.unbuckle_mob(carried_mob)
+ tablelimbsmash(user, carried_mob)
+ else
+ var/tableplace_delay = 3.5 SECONDS
+ var/skills_space = ""
+ if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
+ tableplace_delay = 2 SECONDS
+ skills_space = " expertly"
+ else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
+ tableplace_delay = 2.75 SECONDS
+ skills_space = " quickly"
+ carried_mob.visible_message("[user] begins to[skills_space] place [carried_mob] onto [src]...",
+ "[user] begins to[skills_space] place [carried_mob] onto [src]...")
+ if(do_after(user, tableplace_delay, target = carried_mob))
user.unbuckle_mob(carried_mob)
tablepush(user, carried_mob)
return TRUE
- if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
+ if(!user.combat_mode && !(I.item_flags & ABSTRACT))
if(user.transferItemToLoc(I, drop_location(), silent = FALSE))
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
@@ -511,8 +509,9 @@
else
return "The top cover is firmly welded on."
-/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
- if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HELP)
+/obj/structure/table/reinforced/attackby(obj/item/W, mob/living/user, params)
+ var/list/modifiers = params2list(params)
+ if(W.tool_behaviour == TOOL_WELDER && modifiers && modifiers["right"])
if(!W.tool_start_check(user, amount=0))
return
@@ -632,12 +631,13 @@
if(O.loc != src.loc)
step(O, get_dir(O, src))
-/obj/structure/rack/attackby(obj/item/W, mob/user, params)
- if (W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1) && user.a_intent != INTENT_HELP)
+/obj/structure/rack/attackby(obj/item/W, mob/living/user, params)
+ var/list/modifiers = params2list(params)
+ if (W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1) && modifiers && modifiers["right"])
W.play_tool_sound(src)
deconstruct(TRUE)
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(user.transferItemToLoc(W, drop_location()))
return 1
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
index 0dcd0655e41..a8cf55105cd 100644
--- a/code/game/objects/structures/tank_dispenser.dm
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -38,7 +38,7 @@
if(5 to TANK_DISPENSER_CAPACITY)
. += "plasma-5"
-/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
+/obj/structure/tank_dispenser/attackby(obj/item/I, mob/living/user, params)
var/full
if(istype(I, /obj/item/tank/internals/plasma))
if(plasmatanks < TANK_DISPENSER_CAPACITY)
@@ -53,7 +53,7 @@
else if(I.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, I, time = 20)
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
to_chat(user, "[I] does not fit into [src].")
return
else
diff --git a/code/game/objects/structures/tank_holder.dm b/code/game/objects/structures/tank_holder.dm
index 9210cb17ae7..09ebafa70a1 100644
--- a/code/game/objects/structures/tank_holder.dm
+++ b/code/game/objects/structures/tank_holder.dm
@@ -37,8 +37,8 @@
. = ..()
. += "It is held together by some screws."
-/obj/structure/tank_holder/attackby(obj/item/W, mob/user, params)
- if(user.a_intent == INTENT_HARM)
+/obj/structure/tank_holder/attackby(obj/item/W, mob/living/user, params)
+ if(user.combat_mode)
return ..()
if(!SEND_SIGNAL(W, COMSIG_CONTAINER_TRY_ATTACH, src, user))
to_chat(user, "[W] does not fit in [src].")
diff --git a/code/game/objects/structures/training_machine.dm b/code/game/objects/structures/training_machine.dm
index ac8a2921df1..1a85c22baa9 100644
--- a/code/game/objects/structures/training_machine.dm
+++ b/code/game/objects/structures/training_machine.dm
@@ -107,8 +107,8 @@
* Meant for attaching an item to the machine, should only be a training toolbox or target. If emagged, the
* machine will gain an auto-attached syndicate toolbox, so in that case we shouldn't be able to swap it out
*/
-/obj/structure/training_machine/attackby(obj/item/target, mob/user)
- if (user.a_intent != INTENT_HELP)
+/obj/structure/training_machine/attackby(obj/item/target, mob/living/user)
+ if (!user.combat_mode)
return ..()
if (!istype(target, /obj/item/training_toolbox) && !istype(target, /obj/item/target))
return ..()
@@ -357,9 +357,9 @@
///Number of hits made since the Lap button (alt-click) was last pushed
var/lap_hits = 0
-/obj/item/training_toolbox/afterattack(atom/target, mob/user, proximity)
+/obj/item/training_toolbox/afterattack(atom/target, mob/living/user, proximity)
. = ..()
- if (!proximity || target == user || user.a_intent == INTENT_HELP)
+ if (!proximity || target == user || !user.combat_mode)
return
if (check_hit(target))
user.changeNext_move(CLICK_CD_MELEE)
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 3bf286696d3..f6f47e7799e 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -64,7 +64,7 @@
if(.)
return
if(!pod_moving)
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
if(open_status == STATION_TUBE_OPEN)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index d0e31829e30..57b908f5e7e 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -29,7 +29,7 @@
log_combat(user, swirlie, "swirlied (brute)")
swirlie.adjustBruteLoss(5)
- else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ else if(user.pulling && isliving(user.pulling))
user.changeNext_move(CLICK_CD_MELEE)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
@@ -103,21 +103,20 @@
else if(I.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
I.play_tool_sound(src)
deconstruct()
- else if(cistern)
- if(user.a_intent != INTENT_HARM)
- if(I.w_class > WEIGHT_CLASS_NORMAL)
- to_chat(user, "[I] does not fit!")
- return
- if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
- to_chat(user, "The cistern is full!")
- return
- if(!user.transferItemToLoc(I, src))
- to_chat(user, "\The [I] is stuck to your hand, you cannot put it in the cistern!")
- return
- w_items += I.w_class
- to_chat(user, "You carefully place [I] into the cistern.")
+ else if(cistern && !user.combat_mode)
+ if(I.w_class > WEIGHT_CLASS_NORMAL)
+ to_chat(user, "[I] does not fit!")
+ return
+ if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
+ to_chat(user, "The cistern is full!")
+ return
+ if(!user.transferItemToLoc(I, src))
+ to_chat(user, "\The [I] is stuck to your hand, you cannot put it in the cistern!")
+ return
+ w_items += I.w_class
+ to_chat(user, "You carefully place [I] into the cistern.")
- else if(istype(I, /obj/item/reagent_containers))
+ else if(istype(I, /obj/item/reagent_containers) && !user.combat_mode)
if (!open)
return
if(istype(I, /obj/item/food/monkeycube))
@@ -160,11 +159,11 @@
. = ..()
hiddenitem = new /obj/item/food/urinalcake
-/obj/structure/urinal/attack_hand(mob/user)
+/obj/structure/urinal/attack_hand(mob/living/user)
. = ..()
if(.)
return
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
@@ -394,7 +393,7 @@
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
return
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
to_chat(user, "You start washing [O]...")
busy = TRUE
if(!do_after(user, 40, target = src))
@@ -577,7 +576,7 @@
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
return
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
to_chat(user, "You start washing [O]...")
busy = TRUE
if(!do_after(user, 4 SECONDS, target = src))
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index c7fc3edf3bb..6d3ef5b40b0 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -138,7 +138,7 @@
return
. = ..()
-/obj/structure/window/attack_hand(mob/user)
+/obj/structure/window/attack_hand(mob/living/user)
. = ..()
if(.)
return
@@ -146,7 +146,7 @@
return
user.changeNext_move(CLICK_CD_MELEE)
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
user.visible_message("[user] knocks on [src].", \
"You knock on [src].")
playsound(src, knocksound, 50, TRUE)
@@ -169,7 +169,7 @@
add_fingerprint(user)
- if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
+ if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return
@@ -384,10 +384,11 @@
//this is shitcode but all of construction is shitcode and needs a refactor, it works for now
//If you find this like 4 years later and construction still hasn't been refactored, I'm so sorry for this //Adding a timestamp, I found this in 2020, I hope it's from this year -Lemon
+//2021 AND STILLLL GOING STRONG
/obj/structure/window/reinforced/attackby(obj/item/I, mob/living/user, params)
switch(state)
if(RWINDOW_SECURE)
- if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HARM)
+ if(I.tool_behaviour == TOOL_WELDER && user.combat_mode)
user.visible_message("[user] holds \the [I] to the security screws on \the [src]...",
"You begin heating the security screws on \the [src]...")
if(I.use_tool(src, user, 150, volume = 100))
@@ -516,7 +517,7 @@
/obj/structure/window/plasma/reinforced/attackby(obj/item/I, mob/living/user, params)
switch(state)
if(RWINDOW_SECURE)
- if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HARM)
+ if(I.tool_behaviour == TOOL_WELDER && user.combat_mode)
user.visible_message("[user] holds \the [I] to the security screws on \the [src]...",
"You begin heating the security screws on \the [src]...")
if(I.use_tool(src, user, 180, volume = 100))
@@ -774,11 +775,11 @@
for (var/i in 1 to rand(1,4))
. += new /obj/item/paper/natural(location)
-/obj/structure/window/paperframe/attack_hand(mob/user)
+/obj/structure/window/paperframe/attack_hand(mob/living/user)
. = ..()
if(.)
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
take_damage(4,BRUTE,MELEE, 0)
if(!QDELETED(src))
update_icon()
@@ -796,11 +797,11 @@
QUEUE_SMOOTH(src)
-/obj/structure/window/paperframe/attackby(obj/item/W, mob/user)
+/obj/structure/window/paperframe/attackby(obj/item/W, mob/living/user)
if(W.get_temperature())
fire_act(W.get_temperature())
return
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
if(istype(W, /obj/item/paper) && obj_integrity < max_integrity)
user.visible_message("[user] starts to patch the holes in \the [src].")
diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm
index 93cf8043ed7..5b95d0acbea 100644
--- a/code/game/turfs/closed/walls.dm
+++ b/code/game/turfs/closed/walls.dm
@@ -196,8 +196,8 @@
return ..()
-/turf/closed/wall/proc/try_clean(obj/item/W, mob/user, turf/T)
- if((user.a_intent != INTENT_HELP) || !LAZYLEN(dent_decals))
+/turf/closed/wall/proc/try_clean(obj/item/W, mob/living/user, turf/T)
+ if((user.combat_mode) || !LAZYLEN(dent_decals))
return FALSE
if(W.tool_behaviour == TOOL_WELDER)
diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm
index 58d440d38e0..95827083d95 100644
--- a/code/game/turfs/open/floor.dm
+++ b/code/game/turfs/open/floor.dm
@@ -151,7 +151,7 @@
W.update_icon()
return W
-/turf/open/floor/attackby(obj/item/object, mob/user, params)
+/turf/open/floor/attackby(obj/item/object, mob/living/user, params)
if(!object || !user)
return TRUE
. = ..()
@@ -160,7 +160,7 @@
if(intact && istype(object, /obj/item/stack/tile))
try_replace_tile(object, user, params)
return TRUE
- if(user.a_intent == INTENT_HARM && istype(object, /obj/item/stack/sheet))
+ if(user.combat_mode && istype(object, /obj/item/stack/sheet))
var/obj/item/stack/sheet/sheets = object
return sheets.on_attack_floor(user, params)
return FALSE
diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm
index 9cb33f38952..1dcdf3f5231 100644
--- a/code/modules/antagonists/blob/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob_mobs.dm
@@ -14,7 +14,7 @@
minbodytemp = 0
maxbodytemp = INFINITY
unique_name = 1
- a_intent = INTENT_HARM
+ combat_mode = TRUE
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
initial_language_holder = /datum/language_holder/empty
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index 28447293d71..df654003ea7 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -266,7 +266,9 @@
/obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "The [name] is not ready yet.")
-/obj/item/gun/magic/tentacle/process_fire()
+/obj/item/gun/magic/tentacle/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
+ var/obj/projectile/tentacle/tentacle_shot = chambered.BB //Gets the actual projectile we will fire
+ tentacle_shot.fire_modifiers = params2list(params)
. = ..()
if(charges == 0)
qdel(src)
@@ -303,6 +305,8 @@
hitsound = 'sound/weapons/thudswoosh.ogg'
var/chain
var/obj/item/ammo_casing/magic/tentacle/source //the item that shot it
+ ///Click params that were used to fire the tentacle shot
+ var/list/fire_modifiers
/obj/projectile/tentacle/Initialize()
source = loc
@@ -354,39 +358,32 @@
if(!L.anchored && !L.throwing)//avoid double hits
if(iscarbon(L))
var/mob/living/carbon/C = L
- var/firer_intent = INTENT_HARM
- var/mob/M = firer
- if(istype(M))
- firer_intent = M.a_intent
- switch(firer_intent)
- if(INTENT_HELP)
- C.visible_message("[L] is pulled by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!")
- C.throw_at(get_step_towards(H,C), 8, 2)
- return BULLET_ACT_HIT
-
- if(INTENT_DISARM)
- var/obj/item/I = C.get_active_held_item()
- if(I)
- if(C.dropItemToGround(I))
- C.visible_message("[I] is yanked off [C]'s hand by [src]!","A tentacle pulls [I] away from you!")
- on_hit(I) //grab the item as if you had hit it directly with the tentacle
- return BULLET_ACT_HIT
- else
- to_chat(firer, "You can't seem to pry [I] off [C]'s hands!")
- return BULLET_ACT_BLOCK
- else
- to_chat(firer, "[C] has nothing in hand to disarm!")
+ var/firer_combat_mode = TRUE
+ var/mob/living/living_shooter = firer
+ if(istype(living_shooter))
+ firer_combat_mode = living_shooter.combat_mode
+ if(fire_modifiers && fire_modifiers["right"])
+ var/obj/item/I = C.get_active_held_item()
+ if(I)
+ if(C.dropItemToGround(I))
+ C.visible_message("[I] is yanked off [C]'s hand by [src]!","A tentacle pulls [I] away from you!")
+ on_hit(I) //grab the item as if you had hit it directly with the tentacle
return BULLET_ACT_HIT
-
- if(INTENT_GRAB)
- C.visible_message("[L] is grabbed by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!")
- C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
+ else
+ to_chat(firer, "You can't seem to pry [I] off [C]'s hands!")
+ return BULLET_ACT_BLOCK
+ else
+ to_chat(firer, "[C] has nothing in hand to disarm!")
return BULLET_ACT_HIT
+ if(firer_combat_mode)
+ C.visible_message("[L] is thrown towards [H] by a tentacle!","A tentacle grabs you and throws you towards [H]!")
+ C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
+ return BULLET_ACT_HIT
+ else
+ C.visible_message("[L] is grabbed by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!")
+ C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
+ return BULLET_ACT_HIT
- if(INTENT_HARM)
- C.visible_message("[L] is thrown towards [H] by a tentacle!","A tentacle grabs you and throws you towards [H]!")
- C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
- return BULLET_ACT_HIT
else
L.visible_message("[L] is pulled by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!")
L.throw_at(get_step_towards(H,L), 8, 2)
diff --git a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm
index 6dfe3d309bd..d4d37d382bc 100644
--- a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm
+++ b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm
@@ -19,7 +19,7 @@
var/static/list/blacklisted_turfs = typecacheof(list(/turf/closed,/turf/open/space,/turf/open/lava,/turf/open/chasm,/turf/open/floor/plating/rust))
route = PATH_RUST
-/datum/eldritch_knowledge/rust_fist/on_mansus_grasp(atom/target, mob/user, proximity_flag, click_parameters)
+/datum/eldritch_knowledge/rust_fist/on_mansus_grasp(atom/target, mob/living/user, proximity_flag, click_parameters)
. = ..()
var/check = FALSE
if(ismob(target))
@@ -28,7 +28,7 @@
return FALSE
else
check = TRUE
- if(user.a_intent == INTENT_HARM || check)
+ if(user.combat_mode || check)
target.rust_heretic_act()
return TRUE
diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm
index ef92118d75e..532a8406547 100644
--- a/code/modules/antagonists/morph/morph.dm
+++ b/code/modules/antagonists/morph/morph.dm
@@ -9,7 +9,7 @@
icon_living = "morph"
icon_dead = "morph_dead"
speed = 2
- a_intent = INTENT_HARM
+ combat_mode = TRUE
stop_automated_movement = 1
status_flags = CANPUSH
pass_flags = PASSTABLE
diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm
index c7309c455c4..0a5a901176a 100644
--- a/code/modules/antagonists/slaughter/slaughter.dm
+++ b/code/modules/antagonists/slaughter/slaughter.dm
@@ -18,7 +18,7 @@
icon_living = "imp"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
speed = 1
- a_intent = INTENT_HARM
+ combat_mode = TRUE
stop_automated_movement = TRUE
status_flags = CANPUSH
attack_sound = 'sound/magic/demon_attack1.ogg'
diff --git a/code/modules/aquarium/aquarium.dm b/code/modules/aquarium/aquarium.dm
index 6a4e48b64c1..502dbcf743e 100644
--- a/code/modules/aquarium/aquarium.dm
+++ b/code/modules/aquarium/aquarium.dm
@@ -134,7 +134,7 @@
return NONE
/obj/structure/aquarium/interact(mob/user)
- if(!broken && user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(!broken && user.pulling && isliving(user.pulling))
var/mob/living/living_pulled = user.pulling
SEND_SIGNAL(living_pulled, COMSIG_AQUARIUM_BEFORE_INSERT_CHECK,src)
var/datum/component/aquarium_content/content_component = living_pulled.GetComponent(/datum/component/aquarium_content)
@@ -147,7 +147,7 @@
/// Tries to put mob pulled by the user in the aquarium after a delay
/obj/structure/aquarium/proc/try_to_put_mob_in(mob/user)
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
var/mob/living/living_pulled = user.pulling
if(living_pulled.buckled || living_pulled.has_buckled_mobs())
to_chat(user, "[living_pulled] is attached to something!")
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 1d9a88de6e0..b029d295ba2 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -93,14 +93,14 @@
if(a_right)
a_right.dropped()
-/obj/item/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
+/obj/item/assembly_holder/attack_hand(mob/living/user, modifiers)//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
. = ..()
if(.)
return
if(a_left)
- a_left.attack_hand()
+ a_left.attack_hand(user, modifiers)
if(a_right)
- a_right.attack_hand()
+ a_right.attack_hand(user, modifiers)
/obj/item/assembly_holder/screwdriver_act(mob/user, obj/item/tool)
if(..())
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index efdba629485..5ab375300cb 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -400,7 +400,7 @@
/obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return FALSE
if(!I.tool_start_check(user, amount=0))
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 69bbd4170ed..7832ecf37b1 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -4,6 +4,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/client/parent
//doohickeys for savefiles
var/path
+ var/save_path
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
var/max_save_slots = 3
@@ -702,6 +703,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Play Admin MIDIs: [(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]
"
dat += "Play Lobby Music: [(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]
"
dat += "Play End of Round Sounds: [(toggles & SOUND_ENDOFROUND) ? "Enabled":"Disabled"]
"
+ dat += "Play Combat Mode Sounds: [(toggles & SOUND_COMBATMODE) ? "Enabled":"Disabled"]
"
dat += "See Pull Requests: [(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]
"
dat += "
"
@@ -1766,6 +1768,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("endofround_sounds")
toggles ^= SOUND_ENDOFROUND
+ if("combat_mode_sound")
+ toggles ^= SOUND_COMBATMODE
+
if("ghost_ears")
chat_toggles ^= CHAT_GHOSTEARS
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index bb99ee0e212..d2ef18a8362 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
-#define SAVEFILE_VERSION_MAX 38
+#define SAVEFILE_VERSION_MAX 39
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -87,6 +87,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if (!found_block_movement)
LAZYADD(key_bindings["Ctrl"], "block_movement")
+ if (current_version < 39)
+ LAZYADD(key_bindings["F"], "toggle_combat_mode")
+ LAZYADD(key_bindings["4"], "toggle_combat_mode")
+
/datum/preferences/proc/update_character(current_version, savefile/S)
return
@@ -133,7 +137,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
return
+ if(fexists("data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"))
+ path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
+ return
path = "data/player_saves/[ckey[1]]/[ckey]/[filename]"
+ save_path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
/datum/preferences/proc/load_preferences()
if(!path)
@@ -273,7 +281,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
/datum/preferences/proc/save_preferences()
if(!path)
return FALSE
- var/savefile/S = new /savefile(path)
+ var/savefile/S = new /savefile()
if(!S)
return FALSE
S.cd = "/"
@@ -495,7 +503,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
/datum/preferences/proc/save_character()
if(!path)
return FALSE
- var/savefile/S = new /savefile(path)
+ var/savefile/S = new /savefile(save_path)
if(!S)
return FALSE
S.cd = "/character[default_slot]"
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index 803c3cda43d..48d08dcfb23 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -178,6 +178,20 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, toggleendofroundsounds)()
/datum/verbs/menu/settings/sound/toggleendofroundsounds/Get_checked(client/C)
return C.prefs.toggles & SOUND_ENDOFROUND
+TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglecombatmodesound)()
+ set name = "Hear/Silence Combat Mode Toggle Sound"
+ set category = "Preferences"
+ set desc = "Hear Combat Mode Toggle Sound"
+ usr.client.prefs.toggles ^= SOUND_COMBATMODE
+ usr.client.prefs.save_preferences()
+ if(usr.client.prefs.toggles & SOUND_COMBATMODE)
+ to_chat(usr, "You will now hear a sound when combat mode is turned on.")
+ else
+ to_chat(usr, "You will no longer hear a sound when combat mode is turned on.")
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Combat Mode Toggle Sounds", "[usr.client.prefs.toggles & SOUND_COMBATMODE ? "Enabled" : "Disabled"]"))
+
+/datum/verbs/menu/settings/sound/togglecombatmodesound/Get_checked(client/C)
+ return C.prefs.toggles & SOUND_COMBATMODE
TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglemidis)()
set name = "Hear/Silence Midis"
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index 62ab5f96a28..9e45ba8d08d 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -81,17 +81,7 @@
var/suicide_message
- if(a_intent == INTENT_DISARM)
- if(prob(25))
- disarm_suicide() // Snowflake suicide for a tired joke.
- return //above proc handles logging and death
- suicide_message = pick("[src] is attempting to push [p_their()] own head off [p_their()] shoulders! It looks like [p_theyre()] trying to commit suicide.", \
- "[src] is pushing [p_their()] thumbs into [p_their()] eye sockets! It looks like [p_theyre()] trying to commit suicide.")
- else if(a_intent == INTENT_GRAB)
- suicide_message = pick("[src] is attempting to pull [p_their()] own head off! It looks like [p_theyre()] trying to commit suicide.", \
- "[src] is aggressively grabbing [p_their()] own neck! It looks like [p_theyre()] trying to commit suicide.", \
- "[src] is pulling [p_their()] eyes out of their sockets! It looks like [p_theyre()] trying to commit suicide.")
- else if(a_intent == INTENT_HELP)
+ if(!combat_mode)
var/obj/item/organ/brain/userbrain = getorgan(/obj/item/organ/brain)
if(userbrain?.damage >= 75)
suicide_message = "[src] pulls both arms outwards in front of [p_their()] chest and pumps them behind [p_their()] back, repeats this motion in a smaller range of motion \
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 2930cf9ca1f..293c730ade4 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -121,13 +121,13 @@
else
qdel(src)
-/obj/item/clothing/attack(mob/attacker, mob/user, def_zone)
- if(user.a_intent != INTENT_HARM && ismoth(attacker))
+/obj/item/clothing/attack(mob/attacker, mob/living/user, params)
+ if(!user.combat_mode && ismoth(attacker))
if (isnull(moth_snack))
moth_snack = new
moth_snack.name = name
moth_snack.clothing = WEAKREF(src)
- moth_snack.attack(attacker, user, def_zone)
+ moth_snack.attack(attacker, user, params)
else
return ..()
diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm
index ec80b053499..b2a1dcb88f1 100644
--- a/code/modules/clothing/neck/_neck.dm
+++ b/code/modules/clothing/neck/_neck.dm
@@ -57,7 +57,7 @@
/obj/item/clothing/neck/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && isliving(user))
- if(user.a_intent == INTENT_HELP)
+ if(!user.combat_mode)
var/body_part = parse_zone(user.zone_selected)
var/heart_strength = "no"
diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm
index 86967a36718..85f4d194f87 100755
--- a/code/modules/clothing/under/accessories.dm
+++ b/code/modules/clothing/under/accessories.dm
@@ -115,7 +115,7 @@
//Pinning medals on people
/obj/item/clothing/accessory/medal/attack(mob/living/carbon/human/M, mob/living/user)
- if(ishuman(M) && (user.a_intent == INTENT_HELP))
+ if(ishuman(M) && !user.combat_mode)
if(M.wear_suit)
if((M.wear_suit.flags_inv & HIDEJUMPSUIT)) //Check if the jumpsuit is covered
diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm
index 1754347b82a..9cd26327c57 100644
--- a/code/modules/detectivework/footprints_and_rag.dm
+++ b/code/modules/detectivework/footprints_and_rag.dm
@@ -20,7 +20,7 @@
user.visible_message("[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!")
return (OXYLOSS)
-/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
+/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/living/user,proximity)
. = ..()
if(!proximity)
return
@@ -28,7 +28,7 @@
var/mob/living/carbon/C = A
var/reagentlist = pretty_string_from_reagent_list(reagents)
var/log_object = "containing [reagentlist]"
- if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
+ if(user.combat_mode && !C.is_mouth_covered())
reagents.trans_to(C, reagents.total_volume, transfered_by = user, methods = INGEST)
C.visible_message("[user] smothers \the [C] with \the [src]!", "[user] smothers you with \the [src]!", "You hear some struggling and muffled cries of surprise.")
log_combat(user, C, "smothered", src, log_object)
diff --git a/code/modules/economy/pay_stand.dm b/code/modules/economy/pay_stand.dm
index 5a55694237c..2ee4fabad88 100644
--- a/code/modules/economy/pay_stand.dm
+++ b/code/modules/economy/pay_stand.dm
@@ -15,13 +15,18 @@
/obj/machinery/paystand/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/card/id))
if(W == my_card)
- if(user.a_intent == INTENT_DISARM)
+ var/list/items = list(
+ "Rename" = image(icon = 'icons/obj/economy.dmi', icon_state = "name"),
+ "Set the fee" = image(icon = 'icons/obj/economy.dmi', icon_state = "fee")
+ )
+ var/choice = show_radial_menu(user, src, items, null, require_near = TRUE, tooltips = TRUE)
+ if(choice == "Rename")
var/rename_msg = stripped_input(user, "Rename the Paystand:", "Paystand Naming", name)
if(!rename_msg || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
name = rename_msg
return
- else if(user.a_intent == INTENT_GRAB)
+ else if(choice == "Set the fee")
var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -136,4 +141,4 @@
if(force_fee)
. += "This paystand forces a payment of [force_fee] credit\s per swipe instead of a variable amount."
if(user.get_active_held_item() == my_card)
- . += "Paystands can be edited through swiping your card with different intents. Disarm allows editing the name while Grab changes payment functionality."
+ . += "Paystands can be edited through swiping your card."
diff --git a/code/modules/events/crystal_event.dm b/code/modules/events/crystal_event.dm
index decc393d610..ae11f529b7b 100644
--- a/code/modules/events/crystal_event.dm
+++ b/code/modules/events/crystal_event.dm
@@ -653,7 +653,7 @@ This section is for the crystal monsters variations
turns_per_move = 1
speak_emote = list("resonates")
emote_see = list("resonates")
- a_intent = INTENT_HARM
+ combat_mode = TRUE
minbodytemp = 0
maxbodytemp = 1500
healable = 0 //they're crystals how would bruise packs help them??
diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm
index 20764d3c590..0ca47c61653 100644
--- a/code/modules/food_and_drinks/drinks/drinks.dm
+++ b/code/modules/food_and_drinks/drinks/drinks.dm
@@ -345,11 +345,11 @@
return FALSE
. = ..()
-/obj/item/reagent_containers/food/drinks/waterbottle/attack(mob/target, mob/user, def_zone)
+/obj/item/reagent_containers/food/drinks/waterbottle/attack(mob/target, mob/living/user, def_zone)
if(!target)
return
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
if(cap_on && reagents.total_volume && istype(target))
to_chat(user, "You must remove the cap before you can do that!")
return
@@ -359,8 +359,8 @@
if(!cap_on)
SplashReagents(target)
-/obj/item/reagent_containers/food/drinks/waterbottle/afterattack(obj/target, mob/user, proximity)
- if(cap_on && (target.is_refillable() || target.is_drainable() || (reagents.total_volume && user.a_intent == INTENT_HARM)))
+/obj/item/reagent_containers/food/drinks/waterbottle/afterattack(obj/target, mob/living/user, proximity)
+ if(cap_on && (target.is_refillable() || target.is_drainable() || (reagents.total_volume && !user.combat_mode)))
to_chat(user, "You must remove the cap before you can do that!")
return
@@ -640,8 +640,8 @@
sleep(20) //dramatic pause
return TOXLOSS
-/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
- if(istype(M, /mob/living/carbon) && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == BODY_ZONE_HEAD)
+/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/living/user)
+ if(istype(M, /mob/living/carbon) && !reagents.total_volume && user.combat_mode && user.zone_selected == BODY_ZONE_HEAD)
if(M == user)
user.visible_message("[user] crushes the can of [src] on [user.p_their()] forehead!", "You crush the can of [src] on your forehead.")
else
diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
index c190e274e2d..c4d252923c9 100644
--- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm
+++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
@@ -68,7 +68,7 @@
if(!target)
return
- if(user.a_intent != INTENT_HARM || !isGlass)
+ if(!user.combat_mode || !isGlass)
return ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm
index 5ecf173cf3c..ff0d5719bca 100644
--- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm
+++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm
@@ -124,8 +124,8 @@
else
..()
-/obj/item/reagent_containers/food/drinks/drinkingglass/attack(obj/target, mob/user)
- if(user.a_intent == INTENT_HARM && ismob(target) && target.reagents && reagents.total_volume)
+/obj/item/reagent_containers/food/drinks/drinkingglass/attack(obj/target, mob/living/user)
+ if(user.combat_mode && ismob(target) && target.reagents && reagents.total_volume)
target.visible_message("[user] splashes the contents of [src] onto [target]!", \
"[user] splashes the contents of [src] onto you!")
log_combat(user, target, "splashed", src)
@@ -134,12 +134,12 @@
return
..()
-/obj/item/reagent_containers/food/drinks/drinkingglass/afterattack(obj/target, mob/user, proximity)
+/obj/item/reagent_containers/food/drinks/drinkingglass/afterattack(obj/target, mob/living/user, proximity)
. = ..()
if((!proximity) || !check_allowed_items(target,target_self=1))
return
- else if(reagents.total_volume && user.a_intent == INTENT_HARM)
+ else if(reagents.total_volume && user.combat_mode)
user.visible_message("[user] splashes the contents of [src] onto [target]!", \
"You splash the contents of [src] onto [target].")
reagents.expose(target, TOUCH)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
index ff55a183a4a..45978644c63 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
@@ -107,7 +107,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
/obj/machinery/deepfryer/attack_ai(mob/user)
return
-/obj/machinery/deepfryer/attack_hand(mob/user)
+/obj/machinery/deepfryer/attack_hand(mob/living/user)
if(frying)
if(frying.loc == src)
to_chat(user, "You eject [frying] from [src].")
@@ -122,7 +122,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
frying_burnt = FALSE
fry_loop.stop()
return
- else if(user.pulling && user.a_intent == "grab" && iscarbon(user.pulling) && reagents.total_volume)
+ else if(user.pulling && iscarbon(user.pulling) && reagents.total_volume)
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "You need a better grip to do that!")
return
diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
index 8a198ca4391..d0fa1145d1d 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
@@ -74,7 +74,7 @@
to_chat(user, "[src] cannot be used unless bolted to the ground!")
return
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
var/mob/living/L = user.pulling
if(!iscarbon(L))
to_chat(user, "This item is not suitable for the gibber!")
diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
index e10e4041409..184ecbcceeb 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
@@ -101,7 +101,7 @@
else
icon_state = "mw"
-/obj/machinery/microwave/attackby(obj/item/O, mob/user, params)
+/obj/machinery/microwave/attackby(obj/item/O, mob/living/user, params)
if(operating)
return
if(default_deconstruction_crowbar(O))
@@ -178,7 +178,7 @@
to_chat(user, "You insert [loaded] items into \the [src].")
return
- if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP)
+ if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && !user.combat_mode)
if(ingredients.len >= max_n_of_items)
to_chat(user, "\The [src] is full, you can't put anything in!")
return TRUE
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 2b6eb0e7342..45f02741e1f 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -50,7 +50,7 @@
continue
return recipe
-/obj/machinery/processor/attackby(obj/item/O, mob/user, params)
+/obj/machinery/processor/attackby(obj/item/O, mob/living/user, params)
if(processing)
to_chat(user, "[src] is in the process of processing!")
return TRUE
@@ -89,18 +89,17 @@
user.transferItemToLoc(O, src, TRUE)
LAZYADD(processor_contents, O)
return 1
+ else if(!user.combat_mode)
+ to_chat(user, "That probably won't blend!")
+ return 1
else
- if(user.a_intent != INTENT_HARM)
- to_chat(user, "That probably won't blend!")
- return 1
- else
- return ..()
+ return ..()
/obj/machinery/processor/interact(mob/user)
if(processing)
to_chat(user, "[src] is in the process of processing!")
return TRUE
- if(user.a_intent == INTENT_GRAB && ismob(user.pulling) && select_recipe(user.pulling))
+ if(ismob(user.pulling) && select_recipe(user.pulling))
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "You need a better grip to do that!")
return
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index 44375a426a3..071d1c089d0 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -65,7 +65,7 @@
* Item Adding
********************/
-/obj/machinery/smartfridge/attackby(obj/item/O, mob/user, params)
+/obj/machinery/smartfridge/attackby(obj/item/O, mob/living/user, params)
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O))
cut_overlays()
if(panel_open)
@@ -125,7 +125,7 @@
to_chat(user, "There is nothing in [O] to put in [src]!")
return FALSE
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
to_chat(user, "\The [src] smartly refuses [O].")
updateUsrDialog()
return FALSE
diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm
index ede30059713..d6a888c7a77 100644
--- a/code/modules/holodeck/items.dm
+++ b/code/modules/holodeck/items.dm
@@ -108,11 +108,11 @@
if(user.transferItemToLoc(W, drop_location()))
visible_message("[user] dunks [W] into \the [src]!")
-/obj/structure/holohoop/attack_hand(mob/user)
+/obj/structure/holohoop/attack_hand(mob/living/user)
. = ..()
if(.)
return
- if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
+ if(user.pulling && isliving(user.pulling))
var/mob/living/L = user.pulling
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "You need a better grip to do that!")
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index fedd36ac1d1..e22091f64b4 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -71,8 +71,8 @@
else
icon_state = "biogen-work"
-/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
- if(user.a_intent == INTENT_HARM)
+/obj/machinery/biogenerator/attackby(obj/item/O, mob/living/user, params)
+ if(user.combat_mode)
return ..()
if(processing)
diff --git a/code/modules/hydroponics/grafts.dm b/code/modules/hydroponics/grafts.dm
index e5e4ddd3e0a..622ac866556 100644
--- a/code/modules/hydroponics/grafts.dm
+++ b/code/modules/hydroponics/grafts.dm
@@ -50,7 +50,7 @@
return ..()
/obj/item/graft/attackby(obj/item/I, mob/living/user, params)
- if(istype(I, /obj/item/plant_analyzer) && user.a_intent == INTENT_HELP)
+ if(istype(I, /obj/item/plant_analyzer) && !user.combat_mode)
to_chat(user, get_graft_text())
return ..()
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index d34bd080bc5..e91bf4cbb50 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -173,7 +173,7 @@
. = ..()
StartBurning()
-/obj/structure/bonfire/attackby(obj/item/W, mob/user, params)
+/obj/structure/bonfire/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
var/obj/item/stack/rods/R = W
var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
@@ -196,7 +196,7 @@
if(W.get_temperature())
StartBurning()
if(grill)
- if(user.a_intent != INTENT_HARM && !(W.item_flags & ABSTRACT))
+ if(!user.combat_mode && !(W.item_flags & ABSTRACT))
if(user.temporarilyRemoveItemFromInventory(W))
W.forceMove(get_turf(src))
var/list/click_params = params2list(params)
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index e568dc15976..ee97e8ca2c7 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -98,8 +98,8 @@
myseed = null
return ..()
-/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params)
- if (user.a_intent != INTENT_HARM)
+/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/living/user, params)
+ if (!user.combat_mode)
// handle opening the panel
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
return
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index 4e634480102..ca3ad1fb1de 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -78,7 +78,7 @@
if(in_range(user, src) || isobserver(user))
. += "The status display reads: Extracting [seed_multiplier] seed(s) per piece of produce.
Machine can store up to [max_seeds]% seeds."
-/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params)
+/obj/machinery/seed_extractor/attackby(obj/item/O, mob/living/user, params)
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
return
@@ -114,7 +114,7 @@
to_chat(user, "You add [O] to [src.name].")
updateUsrDialog()
return
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
to_chat(user, "You can't extract any seeds from \the [O.name]!")
else
return ..()
diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm
index 04e29e4e405..c068f0c8284 100644
--- a/code/modules/mining/laborcamp/laborstacker.dm
+++ b/code/modules/mining/laborcamp/laborstacker.dm
@@ -135,7 +135,7 @@ GLOBAL_LIST(labor_sheet_values)
..()
/obj/machinery/mineral/stacking_machine/laborstacker/attackby(obj/item/I, mob/living/user)
- if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I) && user.a_intent == INTENT_HELP)
+ if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I) && !user.combat_mode)
var/obj/item/stack/sheet/inp = I
points += inp.point_value * inp.amount
return ..()
diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm
index de05a2e612e..4e318f0cce0 100644
--- a/code/modules/mining/machine_silo.dm
+++ b/code/modules/mining/machine_silo.dm
@@ -47,10 +47,10 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
return ..()
-/obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/user, obj/item/stack/I, breakdown_flags=NONE)
+/obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/living/user, obj/item/stack/I, breakdown_flags=NONE)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
// stolen from /datum/component/material_container/proc/OnAttackBy
- if(user.a_intent != INTENT_HELP)
+ if(user.combat_mode)
return
if(I.item_flags & ABSTRACT)
return
diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm
index 7d3f1fcad14..19bd7bd607c 100644
--- a/code/modules/mining/minebot.dm
+++ b/code/modules/mining/minebot.dm
@@ -12,7 +12,7 @@
status_flags = CANSTUN|CANKNOCKDOWN|CANPUSH
mouse_opacity = MOUSE_OPACITY_ICON
faction = list("neutral")
- a_intent = INTENT_HARM
+ combat_mode = TRUE
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
move_to_delay = 10
@@ -126,7 +126,7 @@
. = ..()
if(.)
return
- if(M.a_intent == INTENT_HELP)
+ if(!M.combat_mode)
toggle_mode()
switch(mode)
if(MINEDRONE_COLLECT)
diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm
index 19aa1525057..35c509c6f74 100644
--- a/code/modules/mob/dead/new_player/login.dm
+++ b/code/modules/mob/dead/new_player/login.dm
@@ -20,6 +20,9 @@
if(GLOB.admin_notice)
to_chat(src, "Admin Notice:\n \t [GLOB.admin_notice]")
+ to_chat(src, "Combat Mode Changes\n \t")
+ to_chat(src, "READ THIS PR BEFORE PLAYING TODAY: https://github.com/tgstation/tgstation/pull/56601 \n \t")
+
var/spc = CONFIG_GET(number/soft_popcap)
if(spc && living_player_count() >= spc)
to_chat(src, "Server Notice:\n \t [CONFIG_GET(string/soft_popcap_message)]")
diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm
index 1c777dcf672..8f49ad99421 100644
--- a/code/modules/mob/living/brain/brain.dm
+++ b/code/modules/mob/living/brain/brain.dm
@@ -5,7 +5,6 @@
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
stat = DEAD //we start dead by default
see_invisible = SEE_INVISIBLE_LIVING
- possible_a_intents = list(INTENT_HELP, INTENT_HARM) //for mechas
speech_span = SPAN_ROBOT
/mob/living/brain/Initialize()
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 1e553005bf6..9e0a51ebbb6 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -74,7 +74,7 @@
/mob/living/carbon/alien/get_status_tab_items()
. = ..()
- . += "Intent: [a_intent]"
+ . += "Combat mode: [combat_mode ? "On" : "Off"]"
/mob/living/carbon/alien/getTrail()
if(getBruteLoss() < 200)
diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm
index 55dc90671d4..a4893fd07d2 100644
--- a/code/modules/mob/living/carbon/alien/alien_defense.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defense.dm
@@ -13,63 +13,53 @@
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
-/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
+/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M, modifiers)
if(isturf(loc) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
- switch(M.a_intent)
+ if(M.combat_mode)
+ if(M == src && check_self_for_injuries())
+ return
+ set_resting(FALSE)
+ AdjustStun(-60)
+ AdjustKnockdown(-60)
+ AdjustImmobilized(-60)
+ AdjustParalyzed(-60)
+ AdjustUnconscious(-60)
+ AdjustSleeping(-100)
+ visible_message("[M.name] nuzzles [src] trying to wake [p_them()] up!")
+ else if(health > 0)
+ M.do_attack_animation(src, ATTACK_EFFECT_BITE)
+ playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
+ visible_message("[M.name] bites [src]!", \
+ "[M.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "You bite [src]!")
+ adjustBruteLoss(1)
+ log_combat(M, src, "attacked")
+ updatehealth()
+ else
+ to_chat(M, "[name] is too injured for that.")
- if ("help")
- if(M == src && check_self_for_injuries())
- return
- set_resting(FALSE)
- AdjustStun(-60)
- AdjustKnockdown(-60)
- AdjustImmobilized(-60)
- AdjustParalyzed(-60)
- AdjustUnconscious(-60)
- AdjustSleeping(-100)
- visible_message("[M.name] nuzzles [src] trying to wake [p_them()] up!")
-
- if ("grab")
- grabbedby(M)
-
- else
- if(health > 0)
- M.do_attack_animation(src, ATTACK_EFFECT_BITE)
- playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
- visible_message("[M.name] bites [src]!", \
- "[M.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You bite [src]!")
- adjustBruteLoss(1)
- log_combat(M, src, "attacked")
- updatehealth()
- else
- to_chat(M, "[name] is too injured for that.")
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
return attack_alien(L)
-/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
+/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M, modifiers)
. = ..()
if(.) //to allow surgery to return properly.
return FALSE
- switch(M.a_intent)
- if("help")
- help_shake_act(M)
- if("grab")
- grabbedby(M)
- if ("harm")
- M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
- return TRUE
- if("disarm")
+ if(M.combat_mode)
+ if(modifiers && modifiers["right"])
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
return TRUE
- return FALSE
+ M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
+ return TRUE
+ else
+ help_shake_act(M)
/mob/living/carbon/alien/attack_paw(mob/living/carbon/human/M)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index c3629113fc8..c80c80d88fc 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -3,7 +3,6 @@
icon_state = "alien"
pass_flags = PASSTABLE
butcher_results = list(/obj/item/food/meat/slab/xeno = 5, /obj/item/stack/sheet/animalhide/xeno = 1)
- possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
limb_destroyer = 1
hud_type = /datum/hud/alien
melee_damage_lower = 20 //Refers to unarmed damage, aliens do unarmed attacks.
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
index ca84d8aa729..2677c1a30d2 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
@@ -14,31 +14,10 @@
"[user] [hitverb]s you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, user)
to_chat(user, "You [hitverb] [src]!")
-/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
+/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M, modifiers)
if(..())
- switch(M.a_intent)
- if ("harm")
- var/damage = rand(1, 9)
- if (prob(90))
- playsound(loc, "punch", 25, TRUE, -1)
- visible_message("[M] punches [src]!", \
- "[M] punches you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You punch [src]!")
- if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
- Unconscious(40)
- visible_message("[M] knocks [src] down!", \
- "[M] knocks you down!", "You hear a sickening sound of flesh hitting flesh!", null, M)
- to_chat(M, "You knock [src] down!")
- var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
- apply_damage(damage, BRUTE, affecting)
- log_combat(M, src, "attacked")
- else
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
- visible_message("[M]'s punch misses [src]!", \
- "You avoid [M]'s punch!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "Your punch misses [src]!")
-
- if ("disarm")
+ if(M.combat_mode)
+ if(modifiers && modifiers["right"])
if (body_position == STANDING_UP)
if (prob(5))
Unconscious(40)
@@ -47,19 +26,26 @@
visible_message("[M] pushes [src] down!", \
"[M] pushes you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
to_chat(M, "You push [src] down!")
- else
- if (prob(50))
- dropItemToGround(get_active_held_item())
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
- visible_message("[M] disarms [src]!", \
- "[M] disarms you!", "You hear aggressive shuffling!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You disarm [src]!")
- else
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
- visible_message("[M] fails to disarm [src]!",\
- "[M] fails to disarm you!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You fail to disarm [src]!")
-
+ return TRUE
+ var/damage = rand(1, 9)
+ if (prob(90))
+ playsound(loc, "punch", 25, TRUE, -1)
+ visible_message("[M] punches [src]!", \
+ "[M] punches you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "You punch [src]!")
+ if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
+ Unconscious(40)
+ visible_message("[M] knocks [src] down!", \
+ "[M] knocks you down!", "You hear a sickening sound of flesh hitting flesh!", null, M)
+ to_chat(M, "You knock [src] down!")
+ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
+ apply_damage(damage, BRUTE, affecting)
+ log_combat(M, src, "attacked")
+ else
+ playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
+ visible_message("[M]'s punch misses [src]!", \
+ "You avoid [M]'s punch!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "Your punch misses [src]!")
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index 2874e2dddac..f5fdbf63203 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -57,7 +57,7 @@
..(amount)
//can't equip anything
-/mob/living/carbon/alien/larva/attack_ui(slot_id)
+/mob/living/carbon/alien/larva/attack_ui(slot_id, params)
return
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 8f663711d0c..d3321d572d8 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -65,14 +65,15 @@
else
mode() // Activate held item
-/mob/living/carbon/attackby(obj/item/I, mob/user, params)
+/mob/living/carbon/attackby(obj/item/I, mob/living/user, params)
for(var/datum/surgery/S in surgeries)
if(body_position == LYING_DOWN || !S.lying_required)
- if((S.self_operable || user != src) && (user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM))
- if(S.next_step(user,user.a_intent))
+ var/list/modifiers = params2list(params)
+ if((S.self_operable || user != src) && !user.combat_mode)
+ if(S.next_step(user, modifiers))
return 1
- if(!all_wounds || !(user.a_intent == INTENT_HELP || user == src))
+ if(!all_wounds || !(!user.combat_mode || user == src))
return ..()
for(var/i in shuffle(all_wounds))
@@ -454,7 +455,7 @@
. = ..()
. += add_abilities_to_panel()
-/mob/living/carbon/attack_ui(slot)
+/mob/living/carbon/attack_ui(slot, params)
if(!has_hand_for_held_index(active_hand_index))
return 0
return ..()
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 41096b9d5f5..779dba225f3 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -140,7 +140,7 @@
return //so we don't call the carbon's attack_hand().
//ATTACK HAND IGNORING PARENT RETURN VALUE
-/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
+/mob/living/carbon/attack_hand(mob/living/carbon/human/user, modifiers)
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
. = TRUE
@@ -156,8 +156,8 @@
for(var/datum/surgery/S in surgeries)
if(body_position == LYING_DOWN || !S.lying_required)
- if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
- if(S.next_step(user, user.a_intent))
+ if(!user.combat_mode)
+ if(S.next_step(user, modifiers))
return TRUE
for(var/i in all_wounds)
@@ -165,13 +165,13 @@
if(W.try_handling(user))
return TRUE
- if (user.apply_martial_art(src))
+ if (user.apply_martial_art(src, modifiers))
return TRUE
return FALSE
-/mob/living/carbon/attack_paw(mob/living/carbon/human/M)
+/mob/living/carbon/attack_paw(mob/living/carbon/human/M, modifiers)
if(can_inject(M, TRUE))
for(var/thing in diseases)
@@ -184,7 +184,7 @@
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
ContactContractDisease(D)
- if(M.a_intent == INTENT_HELP)
+ if(!M.combat_mode)
help_shake_act(M)
return FALSE
@@ -246,7 +246,7 @@
*/
/mob/living/carbon/proc/disarm(mob/living/carbon/target)
if(zone_selected == BODY_ZONE_PRECISE_MOUTH)
- var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
+ var/target_on_help_and_unarmed = !target.combat_mode && !target.get_active_held_item()
if(target_on_help_and_unarmed || HAS_TRAIT(target, TRAIT_RESTRAINED))
do_slap_animation(target)
playsound(target.loc, 'sound/weapons/slap.ogg', 50, TRUE, -1)
@@ -450,7 +450,7 @@
null, "You hear a soft patter.", DEFAULT_MESSAGE_RANGE, list(M, src))
to_chat(M, "You give [src] a pat on the head to make [p_them()] feel better!")
to_chat(src, "[M] gives you a pat on the head to make you feel better! ")
-
+
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
to_chat(M, "[src] looks visibly upset as you pat [p_them()] on the head.")
@@ -492,7 +492,7 @@
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
else if (hugger_mood.sanity >= SANITY_DISTURBED)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
-
+
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
to_chat(M, "[src] looks visibly upset as you hug [p_them()].")
diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm
index ada5e1ec9b1..1ea7f1c9c32 100644
--- a/code/modules/mob/living/carbon/carbon_defines.dm
+++ b/code/modules/mob/living/carbon/carbon_defines.dm
@@ -2,7 +2,6 @@
blood_volume = BLOOD_VOLUME_NORMAL
gender = MALE
pressure_resistance = 15
- possible_a_intents = list(INTENT_HELP, INTENT_HARM)
hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD,GLAND_HUD,NANITE_HUD,DIAG_NANITE_FULL_HUD)
has_limbs = 1
held_items = list(null, null)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index f8dcec43784..65d19303adc 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -316,7 +316,7 @@
if(src != user)
if(HAS_TRAIT(user, TRAIT_EMPATH))
- if (a_intent != INTENT_HELP)
+ if (combat_mode)
msg += "[t_He] seem[p_s()] to be on guard.\n"
if (getOxyLoss() >= 10)
msg += "[t_He] seem[p_s()] winded.\n"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index bac132474e6..430b2509a49 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -62,7 +62,7 @@
/mob/living/carbon/human/get_status_tab_items()
. = ..()
- . += "Intent: [a_intent]"
+ . += "Combat mode: [combat_mode ? "On" : "Off"]"
. += "Move Mode: [m_intent]"
if (internal)
if (!internal.air_contents)
@@ -1036,7 +1036,7 @@
return ..()
/mob/living/carbon/human/mouse_buckle_handling(mob/living/M, mob/living/user)
- if(pulling != M || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS || a_intent != INTENT_GRAB)
+ if(pulling != M || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS)
return FALSE
//If they dragged themselves to you and you're currently aggressively grabbing them try to piggyback
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index ef76e7a8190..a710317f099 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -190,7 +190,7 @@
SSblackbox.record_feedback("tally", "zone_targeted", 1, target_area)
// the attacked_by code varies among species
- return dna.species.spec_attacked_by(I, user, affecting, a_intent, src)
+ return dna.species.spec_attacked_by(I, user, affecting, src)
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user)
@@ -206,23 +206,21 @@
to_chat(user, "You [hulk_verb] [src]!")
apply_damage(15, BRUTE, wound_bonus=10)
-/mob/living/carbon/human/attack_hand(mob/user)
+/mob/living/carbon/human/attack_hand(mob/user, modifiers)
if(..()) //to allow surgery to return properly.
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
- dna.species.spec_attack_hand(H, src)
+ dna.species.spec_attack_hand(H, src, null, modifiers)
-/mob/living/carbon/human/attack_paw(mob/living/carbon/human/M)
+/mob/living/carbon/human/attack_paw(mob/living/carbon/human/M, modifiers)
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
- if(M.a_intent == INTENT_HELP)
- ..() //shaking
- return FALSE
- if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
+
+ if(modifiers && modifiers["right"]) //Always drop item in hand, if no item, get stunned instead.
var/obj/item/I = get_active_held_item()
if(I && !(I.item_flags & ABSTRACT) && dropItemToGround(I))
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
@@ -244,6 +242,10 @@
"[M] tackles you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
to_chat(M, "You tackle [src] down!")
+ if(!M.combat_mode)
+ ..() //shaking
+ return FALSE
+
if(M.limb_destroyer)
dismembering_strike(M, affecting.body_zone)
@@ -258,7 +260,7 @@
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
return TRUE
-/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
+/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
if(check_shields(M, 0, "the M.name"))
visible_message("[M] attempts to touch [src]!", \
"[M] attempts to touch you!", "You hear a swoosh!", null, M)
@@ -267,7 +269,23 @@
. = ..()
if(!.)
return
- if(M.a_intent == INTENT_HARM)
+
+ if(modifiers && modifiers["right"]) //Always drop item in hand, if no item, get stun instead.
+ var/obj/item/I = get_active_held_item()
+ if(I && dropItemToGround(I))
+ playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
+ visible_message("[M] disarms [src]!", \
+ "[M] disarms you!", "You hear aggressive shuffling!", null, M)
+ to_chat(M, "You disarm [src]!")
+ else
+ playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
+ Paralyze(100)
+ log_combat(M, src, "tackled")
+ visible_message("[M] tackles [src] down!", \
+ "[M] tackles you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
+ to_chat(M, "You tackle [src] down!")
+
+ if(M.combat_mode)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = prob(90) ? rand(M.melee_damage_lower, M.melee_damage_upper) : 0
@@ -291,20 +309,7 @@
return TRUE
apply_damage(damage, BRUTE, affecting, armor_block)
- if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
- var/obj/item/I = get_active_held_item()
- if(I && dropItemToGround(I))
- playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
- visible_message("[M] disarms [src]!", \
- "[M] disarms you!", "You hear aggressive shuffling!", null, M)
- to_chat(M, "You disarm [src]!")
- else
- playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
- Paralyze(100)
- log_combat(M, src, "tackled")
- visible_message("[M] tackles [src] down!", \
- "[M] tackles you down!", "You hear aggressive shuffling followed by a loud thud!", null, M)
- to_chat(M, "You tackle [src] down!")
+
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L)
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index 2cd30251489..8d351944d42 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -7,7 +7,6 @@
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD,ANTAG_HUD,GLAND_HUD,SENTIENT_DISEASE_HUD,FAN_HUD)
hud_type = /datum/hud/human
- possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
pressure_resistance = 25
can_buckle = TRUE
buckle_lying = 0
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 33171ee4580..50e77b21293 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1418,7 +1418,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
return
-/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
+/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style, modifiers)
if(!istype(M))
return
CHECK_DNA_AND_SPECIES(M)
@@ -1428,27 +1428,24 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return
if(M.mind)
attacker_style = M.mind.martial_art
- if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
+ if((M != H) && M.combat_mode && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
log_combat(M, H, "attempted to touch")
H.visible_message("[M] attempts to touch [H]!", \
"[M] attempts to touch you!", "You hear a swoosh!", COMBAT_MESSAGE_RANGE, M)
to_chat(M, "You attempt to touch [H]!")
return
+
SEND_SIGNAL(M, COMSIG_MOB_ATTACK_HAND, M, H, attacker_style)
- switch(M.a_intent)
- if("help")
- help(M, H, attacker_style)
- if("grab")
- grab(M, H, attacker_style)
+ if(modifiers && modifiers["right"])
+ disarm(M, H, attacker_style)
+ return // dont attack after
+ if(M.combat_mode)
+ harm(M, H, attacker_style)
+ else
+ help(M, H, attacker_style)
- if("harm")
- harm(M, H, attacker_style)
-
- if("disarm")
- disarm(M, H, attacker_style)
-
-/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
// Allows you to put in item-specific reactions based on species
if(user != H)
if(H.check_shields(I, I.force, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
@@ -1470,7 +1467,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/Iwound_bonus = I.wound_bonus
// this way, you can't wound with a surgical tool on help intent if they have a surgery active and are lying down, so a misclick with a circular saw on the wrong limb doesn't bleed them dry (they still get hit tho)
- if((I.item_flags & SURGICAL_TOOL) && user.a_intent == INTENT_HELP && H.body_position == LYING_DOWN && (LAZYLEN(H.surgeries) > 0))
+ if((I.item_flags & SURGICAL_TOOL) && !user.combat_mode && H.body_position == LYING_DOWN && (LAZYLEN(H.surgeries) > 0))
Iwound_bonus = CANT_WOUND
var/weakness = check_species_weakness(I, user)
@@ -2139,7 +2136,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
. |= BIO_JUST_BONE
///Species override for unarmed attacks because the attack_hand proc was made by a mouth-breathing troglodyte on a tricycle. Also to whoever thought it would be a good idea to make it so the original spec_unarmedattack was not actually linked to unarmed attack needs to be checked by a doctor because they clearly have a vast empty space in their head.
-/datum/species/proc/spec_unarmedattack(mob/living/carbon/human/user, atom/target)
+/datum/species/proc/spec_unarmedattack(mob/living/carbon/human/user, atom/target, modifiers)
return FALSE
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index d4e63eec819..a0c7c218519 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -350,10 +350,10 @@
/datum/species/golem/uranium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
- if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.a_intent != INTENT_HELP)
+ if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.combat_mode)
radiation_emission(H)
-/datum/species/golem/uranium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/golem/uranium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
..()
if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && user != H)
radiation_emission(H)
@@ -466,10 +466,10 @@
/datum/species/golem/bluespace/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
- if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != INTENT_HELP)
+ if(world.time > last_teleport + teleport_cooldown && M != H && M.combat_mode)
reactive_teleport(H)
-/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
..()
if(world.time > last_teleport + teleport_cooldown && user != H)
reactive_teleport(H)
@@ -586,11 +586,11 @@
/datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
- if(world.time > last_banana + banana_cooldown && M != H && M.a_intent != INTENT_HELP)
+ if(world.time > last_banana + banana_cooldown && M != H && M.combat_mode)
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
last_banana = world.time
-/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
..()
if(world.time > last_banana + banana_cooldown && user != H)
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
@@ -840,10 +840,10 @@
/datum/species/golem/bronze/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
- if(world.time > last_gong_time + gong_cooldown && M.a_intent != INTENT_HELP)
+ if(world.time > last_gong_time + gong_cooldown && M.combat_mode)
gong(H)
-/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
..()
if(world.time > last_gong_time + gong_cooldown)
gong(H)
@@ -906,7 +906,7 @@
var/last_creation = 0
var/brother_creation_cooldown = 300
-/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
. = ..()
if(user != H)
return FALSE //forced reproduction is rape.
diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm
index 1a5be133150..85ccc73be20 100644
--- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm
+++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm
@@ -60,13 +60,13 @@
C.butcher_results = null
C.dna.remove_mutation(RACEMUT)
-/datum/species/monkey/spec_unarmedattack(mob/living/carbon/human/user, atom/target)
+/datum/species/monkey/spec_unarmedattack(mob/living/carbon/human/user, atom/target, modifiers)
. = ..()
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
if(!iscarbon(target))
return TRUE
var/mob/living/carbon/victim = target
- if(user.a_intent != INTENT_HARM || user.is_muzzled())
+ if(user.is_muzzled())
return TRUE
var/obj/item/bodypart/affecting = null
if(ishuman(victim))
@@ -88,7 +88,7 @@
var/datum/disease/bite_infection = d
victim.ForceContractDisease(bite_infection)
return TRUE
- target.attack_paw(user)
+ target.attack_paw(user, modifiers)
return TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm
index 3af4cb86ff2..fbcf38e52e1 100644
--- a/code/modules/mob/living/carbon/human/species_types/zombies.dm
+++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm
@@ -53,7 +53,7 @@
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
. = ..()
- C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW
+ C.set_combat_mode(TRUE) // THE SUFFERING MUST FLOW
//Zombies never actually die, they just fall down until they regenerate enough to rise back up.
//They must be restrained, beheaded or gibbed to stop being a threat.
diff --git a/code/modules/mob/living/carbon/human/suicides.dm b/code/modules/mob/living/carbon/human/suicides.dm
index bde239a36d4..8aac47d188d 100644
--- a/code/modules/mob/living/carbon/human/suicides.dm
+++ b/code/modules/mob/living/carbon/human/suicides.dm
@@ -3,15 +3,3 @@
adjustBruteLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(FALSE)
ghostize(FALSE) // Disallows reentering body and disassociates mind
-
-/mob/living/carbon/human/proc/disarm_suicide()
- var/suicide_message = "[src] is ripping [p_their()] own arms off! It looks like [p_theyre()] trying to commit suicide." //heheh get it?
- visible_message("[suicide_message]", "[suicide_message]")
-
- var/timer = 15
- for(var/obj/item/bodypart/thing in bodyparts)
- if(thing.body_part == ARM_LEFT || thing.body_part == ARM_RIGHT)
- addtimer(CALLBACK(thing, /obj/item/bodypart/.proc/dismember), timer)
- addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/effects/cartoon_pop.ogg', 70), timer)
- timer += 15
- addtimer(CALLBACK(src, /mob/living/carbon/human/.proc/delayed_suicide, FALSE), timer-10)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c9032074e77..3e749eb5000 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -122,12 +122,12 @@
mob_swap = TRUE
else
//You can swap with the person you are dragging on grab intent, and restrained people in most cases
- if(M.pulledby == src && a_intent == INTENT_GRAB && !too_strong)
+ if(M.pulledby == src && !too_strong)
mob_swap = TRUE
else if(
!(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP))&&\
- ((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || M.a_intent == INTENT_HELP) &&\
- (HAS_TRAIT(src, TRAIT_RESTRAINED) || a_intent == INTENT_HELP)
+ ((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || !combat_mode) &&\
+ (HAS_TRAIT(src, TRAIT_RESTRAINED) || !combat_mode)
)
mob_swap = TRUE
if(mob_swap)
@@ -168,8 +168,10 @@
if(HAS_TRAIT(L, TRAIT_PUSHIMMUNE))
return TRUE
//If they're a human, and they're not in help intent, block pushing
- if(ishuman(M) && (M.a_intent != INTENT_HELP))
- return TRUE
+ if(ishuman(M))
+ var/mob/living/carbon/human/human = M
+ if(human.combat_mode)
+ return TRUE
//anti-riot equipment is also anti-push
for(var/obj/item/I in M.held_items)
if(!istype(M, /obj/item/clothing))
@@ -300,6 +302,7 @@
M.LAssailant = usr
if(isliving(M))
var/mob/living/L = M
+
SEND_SIGNAL(M, COMSIG_LIVING_GET_PULLED, src)
//Share diseases that are spread by touch
for(var/thing in diseases)
@@ -362,7 +365,7 @@
if(istype(AM) && Adjacent(AM))
start_pulling(AM)
- else
+ else if(!combat_mode) //Don;'t cancel pulls if misclicking in combat mode.
stop_pulling()
/mob/living/stop_pulling()
@@ -1900,7 +1903,7 @@
* It is also used to process martial art attacks by nonhumans, even against humans
* Human vs human attacks are handled in species code right now.
*/
-/mob/living/proc/apply_martial_art(mob/living/target)
+/mob/living/proc/apply_martial_art(mob/living/target, modifiers, is_grab)
if(HAS_TRAIT(target, TRAIT_MARTIAL_ARTS_IMMUNE))
return FALSE
if(ishuman(target) && ishuman(src)) //Human vs human are handled in species code
@@ -1908,15 +1911,16 @@
var/datum/martial_art/style = mind?.martial_art
var/attack_result = FALSE
if (style)
- switch (a_intent)
- if (INTENT_GRAB)
- attack_result = style.grab_act(src, target)
- if (INTENT_HARM)
- if (HAS_TRAIT(src, TRAIT_PACIFISM))
- return FALSE
- attack_result = style.harm_act(src, target)
- if (INTENT_DISARM)
- attack_result = style.disarm_act(src, target)
- if (INTENT_HELP)
- attack_result = style.help_act(src, target)
+ if (is_grab)
+ attack_result = style.grab_act(src, target)
+ if(modifiers && modifiers["right"])
+ attack_result = style.disarm_act(src, target)
+ if(combat_mode)
+ if (HAS_TRAIT(src, TRAIT_PACIFISM))
+ return FALSE
+ attack_result = style.harm_act(src, target)
+ else
+ attack_result = style.help_act(src, target)
+
+
return attack_result
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index a45d056ff13..2aafb1ae89b 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -68,6 +68,19 @@
else
return 0
+/mob/living/proc/set_combat_mode(new_mode, silent = TRUE)
+ if(combat_mode == new_mode)
+ return
+ . = combat_mode
+ combat_mode = new_mode
+ if(hud_used?.action_intent)
+ hud_used.action_intent.update_icon()
+ if(silent || !(client?.prefs.toggles & SOUND_COMBATMODE))
+ return
+ if(combat_mode)
+ playsound_local(src, 'sound/misc/ui_togglecombat.ogg', 25, FALSE, pressure_affected = FALSE) //Sound from interbay!
+ else
+ playsound_local(src, 'sound/misc/ui_toggleoffcombat.ogg', 25, FALSE, pressure_affected = FALSE) //Slightly modified version of the above
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(isitem(AM))
@@ -144,9 +157,6 @@
return FALSE
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state)
return FALSE
- if(user.a_intent != INTENT_GRAB)
- to_chat(user, "You must be on grab intent to upgrade your grab further!")
- return FALSE
user.setGrabState(user.grab_state + 1)
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
@@ -223,95 +233,85 @@
log_combat(M, src, "attacked")
return TRUE
-/mob/living/attack_hand(mob/living/carbon/human/user)
+/mob/living/attack_hand(mob/living/carbon/human/user, modifiers)
. = ..()
- if (user.apply_martial_art(src))
+ if (user.apply_martial_art(src, modifiers))
return TRUE
-/mob/living/attack_paw(mob/living/carbon/human/M)
+/mob/living/attack_paw(mob/living/carbon/human/M, modifiers)
if(isturf(loc) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return FALSE
- if (M.apply_martial_art(src))
+ if (M.apply_martial_art(src, modifiers))
return TRUE
-
- switch (M.a_intent)
- if (INTENT_HARM)
- if(HAS_TRAIT(M, TRAIT_PACIFISM))
- to_chat(M, "You don't want to hurt anyone!")
- return FALSE
-
- if(M.is_muzzled() || M.is_mouth_covered(FALSE, TRUE))
- to_chat(M, "You can't bite with your mouth covered!")
- return FALSE
- M.do_attack_animation(src, ATTACK_EFFECT_BITE)
- if (prob(75))
- log_combat(M, src, "attacked")
- playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
- visible_message("[M.name] bites [src]!", \
- "[M.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You bite [src]!")
- return TRUE
- else
- visible_message("[M.name]'s bite misses [src]!", \
- "You avoid [M.name]'s bite!", "You hear the sound of jaws snapping shut!", COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "Your bite misses [src]!")
- if (INTENT_GRAB)
- grabbedby(M)
+ if(modifiers && modifiers["right"])
+ if (M != src)
+ M.disarm(src)
+ return TRUE
+ if (M.combat_mode)
+ if(HAS_TRAIT(M, TRAIT_PACIFISM))
+ to_chat(M, "You don't want to hurt anyone!")
return FALSE
- if (INTENT_DISARM)
- if (M != src)
- M.disarm(src)
- return TRUE
+
+ if(M.is_muzzled() || M.is_mouth_covered(FALSE, TRUE))
+ to_chat(M, "You can't bite with your mouth covered!")
+ return FALSE
+ M.do_attack_animation(src, ATTACK_EFFECT_BITE)
+ if (prob(75))
+ log_combat(M, src, "attacked")
+ playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
+ visible_message("[M.name] bites [src]!", \
+ "[M.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "You bite [src]!")
+ return TRUE
+ else
+ visible_message("[M.name]'s bite misses [src]!", \
+ "You avoid [M.name]'s bite!", "You hear the sound of jaws snapping shut!", COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "Your bite misses [src]!")
+
return FALSE
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
- switch(L.a_intent)
- if("help")
- visible_message("[L.name] rubs its head against [src].", \
- "[L.name] rubs its head against you.", null, null, L)
- to_chat(L, "You rub your head against [src].")
- return FALSE
+ if(L.combat_mode)
+ if(HAS_TRAIT(L, TRAIT_PACIFISM))
+ to_chat(L, "You don't want to hurt anyone!")
+ return
+ L.do_attack_animation(src)
+ if(prob(90))
+ log_combat(L, src, "attacked")
+ visible_message("[L.name] bites [src]!", \
+ "[L.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, L)
+ to_chat(L, "You bite [src]!")
+ playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
+ return TRUE
else
- if(HAS_TRAIT(L, TRAIT_PACIFISM))
- to_chat(L, "You don't want to hurt anyone!")
- return
-
- L.do_attack_animation(src)
- if(prob(90))
- log_combat(L, src, "attacked")
- visible_message("[L.name] bites [src]!", \
- "[L.name] bites you!", "You hear a chomp!", COMBAT_MESSAGE_RANGE, L)
- to_chat(L, "You bite [src]!")
- playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
- return TRUE
- else
- visible_message("[L.name]'s bite misses [src]!", \
- "You avoid [L.name]'s bite!", "You hear the sound of jaws snapping shut!", COMBAT_MESSAGE_RANGE, L)
- to_chat(L, "Your bite misses [src]!")
+ visible_message("[L.name]'s bite misses [src]!", \
+ "You avoid [L.name]'s bite!", "You hear the sound of jaws snapping shut!", COMBAT_MESSAGE_RANGE, L)
+ to_chat(L, "Your bite misses [src]!")
+ else
+ visible_message("[L.name] rubs its head against [src].", \
+ "[L.name] rubs its head against you.", null, null, L)
+ to_chat(L, "You rub your head against [src].")
+ return FALSE
return FALSE
-/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
- switch(M.a_intent)
- if ("help")
- visible_message("[M] caresses [src] with its scythe-like arm.", \
- "[M] caresses you with its scythe-like arm.", null, null, M)
- to_chat(M, "You caress [src] with your scythe-like arm.")
+/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
+ if(modifiers && modifiers["right"])
+ M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
+ return TRUE
+ if(M.combat_mode)
+ if(HAS_TRAIT(M, TRAIT_PACIFISM))
+ to_chat(M, "You don't want to hurt anyone!")
return FALSE
- if ("grab")
- grabbedby(M)
- return FALSE
- if("harm")
- if(HAS_TRAIT(M, TRAIT_PACIFISM))
- to_chat(M, "You don't want to hurt anyone!")
- return FALSE
- M.do_attack_animation(src)
- return TRUE
- if("disarm")
- M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
- return TRUE
+ M.do_attack_animation(src)
+ return TRUE
+ else
+ visible_message("[M] caresses [src] with its scythe-like arm.", \
+ "[M] caresses you with its scythe-like arm.", null, null, M)
+ to_chat(M, "You caress [src] with your scythe-like arm.")
+ return FALSE
/mob/living/attack_hulk(mob/living/carbon/human/user)
..()
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 3d5cf896f5d..3091f3bfc25 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -159,6 +159,9 @@
var/icon/head_icon = 'icons/mob/pets_held.dmi'//what it looks like on your head
var/held_state = ""//icon state for the above
+ ///If combat mode is on or not
+ var/combat_mode = FALSE
+
/// Is this mob allowed to be buckled/unbuckled to/from things?
var/can_buckle_to = TRUE
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index c649a275e6d..40a7f89deb9 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -20,7 +20,7 @@
move_resist = MOVE_FORCE_OVERPOWERING
density = TRUE
status_flags = CANSTUN|CANPUSH
- a_intent = INTENT_HARM //so we always get pushed instead of trying to swap
+ combat_mode = TRUE //so we always get pushed instead of trying to swap
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
see_in_dark = 8
hud_type = /datum/hud/ai
diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm
index c01426ddc73..cfc77011c6b 100644
--- a/code/modules/mob/living/silicon/pai/pai_defense.dm
+++ b/code/modules/mob/living/silicon/pai/pai_defense.dm
@@ -40,23 +40,20 @@
fold_in(force = 1)
Paralyze(200)
-/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user)
- switch(user.a_intent)
- if("help")
- visible_message("[user] gently pats [src] on the head, eliciting an off-putting buzzing from its holographic field.")
- if("disarm")
- visible_message("[user] boops [src] on the head!")
- if("harm")
- user.do_attack_animation(src)
- if (user.name == master)
- visible_message("Responding to its master's touch, [src] disengages its holochassis emitter, rapidly losing coherence.")
- if(do_after(user, 1 SECONDS, src))
- fold_in()
- if(user.put_in_hands(card))
- user.visible_message("[user] promptly scoops up [user.p_their()] pAI's card.")
- else
- visible_message("[user] stomps on [src]!.")
- take_holo_damage(2)
+/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user, modifiers)
+ if(user.combat_mode)
+ user.do_attack_animation(src)
+ if (user.name == master)
+ visible_message("Responding to its master's touch, [src] disengages its holochassis emitter, rapidly losing coherence.")
+ if(do_after(user, 1 SECONDS, TRUE, src))
+ fold_in()
+ if(user.put_in_hands(card))
+ user.visible_message("[user] promptly scoops up [user.p_their()] pAI's card.")
+ else
+ visible_message("[user] stomps on [src]!.")
+ take_holo_damage(2)
+ else
+ visible_message("[user] gently pats [src] on the head, eliciting an off-putting buzzing from its holographic field.")
/mob/living/silicon/pai/bullet_act(obj/projectile/Proj)
if(Proj.stun)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index bfa35ee2c52..a55d7a3ffa5 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -861,7 +861,7 @@
/mob/living/silicon/robot/mouse_buckle_handling(mob/living/M, mob/living/user)
//Don't try buckling on INTENT_HARM so that silicons can search people's inventories without loading them
- if(can_buckle && isliving(user) && isliving(M) && !(M in buckled_mobs) && ((user != src) || (a_intent != INTENT_HARM)))
+ if(can_buckle && isliving(user) && isliving(M) && !(M in buckled_mobs) && ((user != src) || (!combat_mode)))
return user_buckle_mob(M, user, check_loc = FALSE)
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, buckle_mob_flags= RIDER_NEEDS_ARM)
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index c7659e374ce..4f8bd4b14cc 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -4,8 +4,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
/obj/item/clothing/head/chameleon/broken \
)))
-/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
- if(W.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src))
+/mob/living/silicon/robot/attackby(obj/item/W, mob/living/user, params)
+ if(W.tool_behaviour == TOOL_WELDER && (!user.combat_mode || user == src))
user.changeNext_move(CLICK_CD_MELEE)
if (!getBruteLoss())
to_chat(user, "[src] is already in good condition!")
@@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
deconstruct()
return
- if(W.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && user.a_intent == INTENT_HELP && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats))
+ if(W.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && !user.combat_mode && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats))
if(hat && HAS_TRAIT(hat, TRAIT_NODROP))
to_chat(user, "You can't seem to remove [src]'s existing headwear!")
return
@@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if (user.temporarilyRemoveItemFromInventory(W, TRUE))
place_on_head(W)
return
- if(istype(W, /obj/item/defibrillator) && user.a_intent == "help")
+ if(istype(W, /obj/item/defibrillator) && !user.combat_mode)
if(!opened)
to_chat(user, "You must access the cyborg's internals!")
return
@@ -235,8 +235,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
spark_system.start()
return ..()
-/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
- if (M.a_intent == INTENT_DISARM)
+/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
+ if (modifiers && modifiers["right"])
if(body_position == STANDING_UP)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
var/obj/item/I = get_active_held_item()
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index ec2e5b69708..c662d773522 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -9,7 +9,6 @@
see_in_dark = 8
bubble_icon = "machine"
weather_immunities = list("ash")
- possible_a_intents = list(INTENT_HELP, INTENT_HARM)
mob_biotypes = MOB_ROBOTIC
deathsound = 'sound/voice/borg_deathsound.ogg'
speech_span = SPAN_ROBOT
diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm
index 23250aeff0f..52db1f7c58b 100644
--- a/code/modules/mob/living/silicon/silicon_defense.dm
+++ b/code/modules/mob/living/silicon/silicon_defense.dm
@@ -46,7 +46,7 @@
return attack_hand(user)
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
- if(L.a_intent == INTENT_HELP)
+ if(!L.combat_mode)
visible_message("[L.name] rubs its head against [src].")
/mob/living/silicon/attack_hulk(mob/living/carbon/human/user)
@@ -60,27 +60,25 @@
to_chat(user, "You punch [src]!")
//ATTACK HAND IGNORING PARENT RETURN VALUE
-/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
+/mob/living/silicon/attack_hand(mob/living/carbon/human/M, modifiers)
. = FALSE
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, M) & COMPONENT_CANCEL_ATTACK_CHAIN)
. = TRUE
- switch(M.a_intent)
- if ("help")
- visible_message("[M] pets [src].", \
- "[M] pets you.", null, null, M)
- to_chat(M, "You pet [src].")
- SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
- if("grab")
- grabbedby(M)
- else
- M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
- playsound(src.loc, 'sound/effects/bang.ogg', 10, TRUE)
- visible_message("[M] punches [src], but doesn't leave a dent!", \
- "[M] punches you, but doesn't leave a dent!", null, COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You punch [src], but don't leave a dent!")
+ if(M.combat_mode)
+ M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
+ playsound(src.loc, 'sound/effects/bang.ogg', 10, TRUE)
+ visible_message("[M] punches [src], but doesn't leave a dent!", \
+ "[M] punches you, but doesn't leave a dent!", null, COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "You punch [src], but don't leave a dent!")
+ else
+ visible_message("[M] pets [src].", \
+ "[M] pets you.", null, null, M)
+ to_chat(M, "You pet [src].")
+ SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
+
/mob/living/silicon/attack_drone(mob/living/simple_animal/drone/M)
- if(M.a_intent == INTENT_HARM)
+ if(M.combat_mode)
return
return ..()
diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm
index aa72860d725..2f8a956040f 100644
--- a/code/modules/mob/living/simple_animal/animal_defense.dm
+++ b/code/modules/mob/living/simple_animal/animal_defense.dm
@@ -1,52 +1,48 @@
-/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M)
+/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M, modifiers)
// so that martial arts don't double dip
if (..())
return TRUE
- switch(M.a_intent)
- if("help")
- if (stat == DEAD)
- return
- visible_message("[M] [response_help_continuous] [src].", \
- "[M] [response_help_continuous] you.", null, null, M)
- to_chat(M, "You [response_help_simple] [src].")
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
- if(pet_bonus)
- funpet(M)
- if("grab")
- grabbedby(M)
-
- if("disarm")
- M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
- playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
- var/shove_dir = get_dir(M, src)
- if(!Move(get_step(src, shove_dir), shove_dir))
- log_combat(M, src, "shoved", "failing to move it")
- M.visible_message("[M.name] shoves [src]!",
- "You shove [src]!", "You hear aggressive shuffling!", COMBAT_MESSAGE_RANGE, list(src))
- to_chat(src, "You're shoved by [M.name]!")
- return TRUE
- log_combat(M, src, "shoved", "pushing it")
- M.visible_message("[M.name] shoves [src], pushing [p_them()]!",
- "You shove [src], pushing [p_them()]!", "You hear aggressive shuffling!", COMBAT_MESSAGE_RANGE, list(src))
- to_chat(src, "You're pushed by [M.name]!")
+ if(modifiers && modifiers["right"])
+ M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
+ var/shove_dir = get_dir(M, src)
+ if(!Move(get_step(src, shove_dir), shove_dir))
+ log_combat(M, src, "shoved", "failing to move it")
+ M.visible_message("[M.name] shoves [src]!",
+ "You shove [src]!", "You hear aggressive shuffling!", COMBAT_MESSAGE_RANGE, list(src))
+ to_chat(src, "You're shoved by [M.name]!")
return TRUE
+ log_combat(M, src, "shoved", "pushing it")
+ M.visible_message("[M.name] shoves [src], pushing [p_them()]!",
+ "You shove [src], pushing [p_them()]!", "You hear aggressive shuffling!", COMBAT_MESSAGE_RANGE, list(src))
+ to_chat(src, "You're pushed by [M.name]!")
+ return TRUE
- if("harm")
- if(HAS_TRAIT(M, TRAIT_PACIFISM))
- to_chat(M, "You don't want to hurt [src]!")
- return
- M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
- visible_message("[M] [response_harm_continuous] [src]!",\
- "[M] [response_harm_continuous] you!", null, COMBAT_MESSAGE_RANGE, M)
- to_chat(M, "You [response_harm_simple] [src]!")
- playsound(loc, attacked_sound, 25, TRUE, -1)
- attack_threshold_check(harm_intent_damage)
- log_combat(M, src, "attacked")
- updatehealth()
- return TRUE
+ if(!M.combat_mode)
+ if (stat == DEAD)
+ return
+ visible_message("[M] [response_help_continuous] [src].", \
+ "[M] [response_help_continuous] you.", null, null, M)
+ to_chat(M, "You [response_help_simple] [src].")
+ playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
+ if(pet_bonus)
+ funpet(M)
+ else
+ if(HAS_TRAIT(M, TRAIT_PACIFISM))
+ to_chat(M, "You don't want to hurt [src]!")
+ return
+ M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
+ visible_message("[M] [response_harm_continuous] [src]!",\
+ "[M] [response_harm_continuous] you!", null, COMBAT_MESSAGE_RANGE, M)
+ to_chat(M, "You [response_harm_simple] [src]!")
+ playsound(loc, attacked_sound, 25, TRUE, -1)
+ attack_threshold_check(harm_intent_damage)
+ log_combat(M, src, "attacked")
+ updatehealth()
+ return TRUE
/**
*This is used to make certain mobs (pet_bonus == TRUE) emote when pet, make a heart emoji at their location, and give the petter a moodlet.
@@ -74,7 +70,7 @@
var/damage = rand(1, 3)
attack_threshold_check(damage)
return 1
- if (M.a_intent == INTENT_HELP)
+ if (!M.combat_mode)
if (health > 0)
visible_message("[M.name] [response_help_continuous] [src].", \
"[M.name] [response_help_continuous] you.", null, COMBAT_MESSAGE_RANGE, M)
@@ -82,9 +78,9 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
-/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
+/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
if(..()) //if harm or disarm intent.
- if(M.a_intent == INTENT_DISARM)
+ if(modifiers && modifiers["right"])
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
visible_message("[M] [response_disarm_continuous] [name]!", \
"[M] [response_disarm_continuous] you!", null, COMBAT_MESSAGE_RANGE, M)
@@ -122,7 +118,7 @@
return attack_threshold_check(damage)
/mob/living/simple_animal/attack_drone(mob/living/simple_animal/drone/M)
- if(M.a_intent == INTENT_HARM) //No kicking dogs even as a rogue drone. Use a weapon.
+ if(M.combat_mode) //No kicking dogs even as a rogue drone. Use a weapon.
return
return ..()
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 92929243fc2..c3d4b82bbaa 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -292,7 +292,7 @@
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
- if(H.a_intent == INTENT_HELP)
+ if(!H.combat_mode)
interact(H)
else
return ..()
@@ -325,7 +325,7 @@
to_chat(user, "Controls are now [locked ? "locked" : "unlocked"].")
return TRUE
-/mob/living/simple_animal/bot/attackby(obj/item/W, mob/user, params)
+/mob/living/simple_animal/bot/attackby(obj/item/W, mob/living/user, params)
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(!locked)
open = !open
@@ -347,7 +347,7 @@
ejectpai(user)
else
user.changeNext_move(CLICK_CD_MELEE)
- if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
+ if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(health >= maxHealth)
to_chat(user, "[src] does not need a repair!")
return
diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
index 6daf0b49036..539509a116b 100644
--- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
@@ -159,7 +159,7 @@
weapon.attack(C, src)
C.Knockdown(20)
-/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/user, params)
+/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/living/user, params)
if(W.GetID())
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
@@ -171,7 +171,7 @@
to_chat(user, "Please close the access panel before locking it.")
else
to_chat(user, "\The [src] doesn't seem to respect your authority.")
- else if(istype(W, /obj/item/kitchen/knife) && user.a_intent != INTENT_HARM)
+ else if(istype(W, /obj/item/kitchen/knife) && !user.combat_mode)
to_chat(user, "You start attaching \the [W] to \the [src]...")
if(do_after(user, 25, target = src))
deputize(W, user)
diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm
index b83202bb5a5..5b0bcf652a8 100644
--- a/code/modules/mob/living/simple_animal/bot/honkbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm
@@ -113,7 +113,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
mode = BOT_HUNT
/mob/living/simple_animal/bot/honkbot/attack_hand(mob/living/carbon/human/H)
- if(H.a_intent == "harm")
+ if(H.combat_mode)
retaliate(H)
addtimer(CALLBACK(src, .proc/react_buzz), 5)
return ..()
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 77ecbec30fe..dbf2309ec95 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -449,12 +449,12 @@
if(damagetype_healer == "all" && treat_me_for.len)
return TRUE
-/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H)
+/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H, modifiers)
if(DOING_INTERACTION_WITH_TARGET(H, src))
to_chat(H, "You're already interacting with [src].")
return
- if(H.a_intent == INTENT_DISARM && mode != BOT_TIPPED)
+ if(modifiers && modifiers["right"] && mode != BOT_TIPPED)
H.visible_message("[H] begins tipping over [src].", "You begin tipping over [src]...")
if(world.time > last_tipping_action_voice + 15 SECONDS)
@@ -467,7 +467,7 @@
if(do_after(H, 3 SECONDS, target=src))
tip_over(H)
- else if(H.a_intent == INTENT_HELP && mode == BOT_TIPPED)
+ else if(!H.combat_mode && mode == BOT_TIPPED)
H.visible_message("[H] begins righting [src].", "You begin righting [src]...")
if(do_after(H, 3 SECONDS, target=src))
set_right(H)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 99454a745e9..b595e5cf049 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -19,7 +19,7 @@
health = 50
maxHealth = 50
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
- a_intent = INTENT_HARM //No swapping
+ combat_mode = TRUE //No swapping
buckle_lying = 0
mob_size = MOB_SIZE_LARGE
buckle_prevents_pull = TRUE // No pulling loaded shit
@@ -131,7 +131,7 @@
..()
reached_target = FALSE
-/mob/living/simple_animal/bot/mulebot/attackby(obj/item/I, mob/user, params)
+/mob/living/simple_animal/bot/mulebot/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
. = ..()
if(open)
@@ -148,7 +148,7 @@
diag_hud_set_mulebotcell()
visible_message("[user] inserts \a [cell] into [src].",
"You insert [cell] into [src].")
- else if(I.tool_behaviour == TOOL_CROWBAR && open && user.a_intent != INTENT_HARM)
+ else if(I.tool_behaviour == TOOL_CROWBAR && open && !user.combat_mode)
if(!cell)
to_chat(user, "[src] doesn't have a power cell!")
return
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 25e05c3ccb5..e5fc2a71793 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -21,7 +21,7 @@
data_hud_type = DATA_HUD_SECURITY_ADVANCED
path_image_color = "#FF0000"
- a_intent = "harm"
+ combat_mode = TRUE
var/baton_type = /obj/item/melee/baton
var/obj/item/weapon
@@ -197,7 +197,7 @@ Auto Patrol: []"},
return
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
- if((H.a_intent == INTENT_HARM) || (H.a_intent == INTENT_DISARM))
+ if(H.combat_mode)
retaliate(H)
if(special_retaliate_after_attack(H))
return
@@ -213,9 +213,9 @@ Auto Patrol: []"},
return ..()
-/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/user, params)
+/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/living/user, params)
..()
- if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
+ if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode) // Any intent but harm will heal, so we shouldn't get angry.
return
if(W.tool_behaviour != TOOL_SCREWDRIVER && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
retaliate(user)
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index e45e590ac4d..a5f1af571cb 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -14,7 +14,7 @@
speak_chance = 1
icon = 'icons/mob/cult.dmi'
speed = 0
- a_intent = INTENT_HARM
+ combat_mode = TRUE
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm
index 72c03458f01..b2fdc337898 100644
--- a/code/modules/mob/living/simple_animal/eldritch_demons.dm
+++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm
@@ -14,7 +14,7 @@
speak_chance = 1
icon = 'icons/mob/eldritch_mobs.dmi'
speed = 0
- a_intent = INTENT_HARM
+ combat_mode = TRUE
stop_automated_movement = 1
AIStatus = AI_OFF
attack_sound = 'sound/weapons/punch1.ogg'
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 98cbb94d31e..34142870332 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -317,6 +317,6 @@
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L)
..()
- if(L.a_intent == INTENT_HARM && L.reagents && !stat)
+ if(L.combat_mode && L.reagents && !stat)
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 49a7fb61d0f..34c83f2facc 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -45,7 +45,6 @@
icon_state = "drone_maint_grey"
icon_living = "drone_maint_grey"
icon_dead = "drone_maint_dead"
- possible_a_intents = list(INTENT_HELP, INTENT_HARM)
health = 30
maxHealth = 30
unsuitable_atmos_damage = 0
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 6e7e697dbff..18989404203 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -178,8 +178,8 @@
if(stat == CONSCIOUS)
udder.generateMilk()
-/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M)
- if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
+/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M, modifiers)
+ if(!stat && modifiers && modifiers["right"] && icon_state != icon_dead)
M.visible_message("[M] tips over [src].",
"You tip over [src].")
to_chat(src, "You are tipped over by [M]!")
@@ -222,7 +222,7 @@
///Give intense wisdom to the attacker if they're being friendly about it
/mob/living/simple_animal/cow/wisdom/attack_hand(mob/living/carbon/M)
- if(!stat && M.a_intent == INTENT_HELP)
+ if(!stat && !M.combat_mode)
to_chat(M, "[src] whispers you some intense wisdoms and then disappears!")
M.mind?.adjust_experience(pick(GLOB.skill_types), 500)
do_smoke(1, get_turf(src))
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 39c6528e1f4..cf661c43c4d 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -209,8 +209,8 @@
if (reagents?.has_reagent(/datum/reagent/yuck) || reagents?.has_reagent(/datum/reagent/fuel))
. += "It's dripping with fuel and smells terrible."
-/obj/item/food/deadmouse/attackby(obj/item/I, mob/user, params)
- if(I.get_sharpness() && user.a_intent == INTENT_HARM)
+/obj/item/food/deadmouse/attackby(obj/item/I, mob/living/user, params)
+ if(I.get_sharpness() && user.combat_mode)
if(isturf(loc))
new /obj/item/food/meat/slab/mouse(loc)
to_chat(user, "You butcher [src].")
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 43d75e0eb80..fd6f1e52530 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
icon_living = "magicbase"
icon_dead = "magicbase"
speed = 0
- a_intent = INTENT_HARM
+ combat_mode = TRUE
stop_automated_movement = 1
is_flying_animal = TRUE // Immunity to chasms and landmines, etc.
attack_sound = 'sound/weapons/punch1.ogg'
diff --git a/code/modules/mob/living/simple_animal/guardian/types/fire.dm b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
index 8ccdd12e996..5108ceb7e02 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/fire.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
@@ -1,6 +1,6 @@
//Fire
/mob/living/simple_animal/hostile/guardian/fire
- a_intent = INTENT_HELP
+ combat_mode = FALSE
melee_damage_lower = 7
melee_damage_upper = 7
attack_sound = 'sound/items/welder.ogg'
diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
index d959e51bc3d..01724cf0233 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
@@ -7,7 +7,7 @@
armour_penetration = 100
/mob/living/simple_animal/hostile/guardian/ranged
- a_intent = INTENT_HELP
+ combat_mode = FALSE
friendly_verb_continuous = "quietly assesses"
friendly_verb_simple = "quietly assess"
melee_damage_lower = 10
diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm
index c5256950040..0392137aa06 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/support.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm
@@ -1,6 +1,6 @@
//Healer
/mob/living/simple_animal/hostile/guardian/healer
- a_intent = INTENT_HARM
+ combat_mode = TRUE
friendly_verb_continuous = "heals"
friendly_verb_simple = "heal"
speed = 0
@@ -46,7 +46,7 @@
/mob/living/simple_animal/hostile/guardian/healer/ToggleMode()
if(src.loc == summoner)
if(toggle)
- a_intent = INTENT_HARM
+ set_combat_mode(TRUE)
speed = 0
damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7)
melee_damage_lower = 15
@@ -54,7 +54,7 @@
to_chat(src, "You switch to combat mode.")
toggle = FALSE
else
- a_intent = INTENT_HELP
+ set_combat_mode(FALSE)
speed = 1
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
melee_damage_lower = 0
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 12d3fce4d9a..c0d01a722b3 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -20,7 +20,7 @@
attack_verb_simple = "slash"
speak_emote = list("hisses")
bubble_icon = "alien"
- a_intent = INTENT_HARM
+ combat_mode = TRUE
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
faction = list(ROLE_ALIEN)
@@ -151,7 +151,7 @@
name = "lusty xenomorph maid"
melee_damage_lower = 0
melee_damage_upper = 0
- a_intent = INTENT_HELP
+ combat_mode = FALSE
friendly_verb_continuous = "caresses"
friendly_verb_simple = "caress"
obj_damage = 0
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index 7eae53a1044..f7c3b4ce099 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -155,7 +155,7 @@
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/L) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
..()
- if(L.a_intent == INTENT_HARM && L.reagents && !stat)
+ if(L.combat_mode && L.reagents && !stat)
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 1)
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.1)
diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
index 0fc0b43596c..d9f9c65a410 100644
--- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
@@ -4,7 +4,7 @@
robust_searching = 1
stat_attack = HARD_CRIT
status_flags = 0
- a_intent = INTENT_HARM
+ combat_mode = TRUE
sentience_type = SENTIENCE_BOSS
gender = NEUTER
var/list/boss_abilities = list() //list of /datum/action/boss
diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
index 63254b39bfb..b009b0bc3ba 100644
--- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
+++ b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
@@ -19,7 +19,7 @@
attack_verb_continuous = "slashes at"
attack_verb_simple = "slash at"
attack_sound = 'sound/weapons/circsawhit.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
loot = list(/obj/effect/mob_spawn/human/corpse/cat_butcher, /obj/item/circular_saw)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm
index 962bed7e57c..9d6b47640e9 100644
--- a/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm
+++ b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm
@@ -17,7 +17,7 @@
melee_damage_lower = 5
melee_damage_upper = 5
attack_verb_continuous = "staves"
- a_intent = INTENT_HARM
+ combat_mode = TRUE
speak_emote = list("chants")
attack_sound = 'sound/weapons/bladeslice.ogg'
aggro_vision_range = 9
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index 38750ef13b1..2ef13615e55 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -60,7 +60,7 @@
obj_damage = 30
melee_damage_lower = 20
melee_damage_upper = 25
- a_intent = INTENT_HARM
+ combat_mode = TRUE
faction = list("spiders")
pass_flags = PASSTABLE
move_to_delay = 6
diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
index 3554c6ce72e..fb81da5530b 100644
--- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
+++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
@@ -32,7 +32,6 @@
attack_sound = 'sound/weapons/punch1.ogg'
dextrous = TRUE
held_items = list(null, null)
- possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
faction = list("jungle")
robust_searching = TRUE
stat_attack = HARD_CRIT
diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm
index e80b67f7b84..97fc8a72256 100644
--- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm
@@ -24,7 +24,6 @@
faction = list("hivebot")
check_friendly_fire = 1
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
- possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
minbodytemp = 0
verb_say = "states"
verb_ask = "queries"
@@ -44,21 +43,19 @@
/mob/living/simple_animal/hostile/hivebot/Aggro()
. = ..()
- a_intent_change(INTENT_HARM)
+ set_combat_mode(TRUE)
+ update_icons()
if(prob(5))
say(pick("INTRUDER DETECTED!", "CODE 7-34.", "101010!!"), forced = type)
/mob/living/simple_animal/hostile/hivebot/LoseAggro()
. = ..()
- a_intent_change(INTENT_HELP)
-
-/mob/living/simple_animal/hostile/hivebot/a_intent_change(input as text)
- . = ..()
+ set_combat_mode(FALSE)
update_icons()
/mob/living/simple_animal/hostile/hivebot/update_icons()
QDEL_NULL(alert_light)
- if(a_intent != INTENT_HELP)
+ if(combat_mode)
icon_state = "[initial(icon_state)]_attack"
alert_light = mob_light(6, 0.4, COLOR_RED_LIGHT)
else
diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm
index fe410b194f3..ea9216ef0d2 100644
--- a/code/modules/mob/living/simple_animal/hostile/illusion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm
@@ -9,7 +9,7 @@
mob_biotypes = NONE
melee_damage_lower = 5
melee_damage_upper = 5
- a_intent = INTENT_HARM
+ combat_mode = TRUE
attack_verb_continuous = "gores"
attack_verb_simple = "gore"
maxHealth = 100
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/_jungle_mobs.dm b/code/modules/mob/living/simple_animal/hostile/jungle/_jungle_mobs.dm
index 08e1045b3df..e7a9b874522 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/_jungle_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/_jungle_mobs.dm
@@ -10,7 +10,7 @@
response_harm_continuous = "strikes"
response_harm_simple = "strike"
status_flags = NONE
- a_intent = INTENT_HARM
+ combat_mode = TRUE
see_in_dark = 4
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
mob_size = MOB_SIZE_LARGE
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index 609bdf0b122..928ad200f9f 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -3,7 +3,7 @@
desc = "Attack the weak point for massive damage."
health = 1000
maxHealth = 1000
- a_intent = INTENT_HARM
+ combat_mode = TRUE
sentience_type = SENTIENCE_BOSS
environment_smash = ENVIRONMENT_SMASH_RWALLS
mob_biotypes = MOB_ORGANIC|MOB_EPIC
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index 70963e8b0b9..a5618ee83d7 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/xenobio/attack_hand(mob/living/carbon/human/M)
. = ..()
- if(M.a_intent != "help")
+ if(M.combat_mode)
return
toggle_open()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
index 0b8205c6da1..8cf0cc0e234 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
@@ -106,7 +106,7 @@
melee_damage_upper = 15
attack_verb_continuous = "impales"
attack_verb_simple = "impale"
- a_intent = INTENT_HARM
+ combat_mode = TRUE
speak_emote = list("telepathically cries")
attack_sound = 'sound/weapons/bladeslice.ogg'
stat_attack = HARD_CRIT
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm
index 836f3b6842a..994b9f0d340 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goldgrub.dm
@@ -22,7 +22,7 @@
attack_verb_continuous = "barrels into"
attack_verb_simple = "barrel into"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HELP
+ combat_mode = FALSE
speak_emote = list("screeches")
throw_message = "sinks in slowly, before being pushed out of "
deathmessage = "stops moving as green liquid oozes from the carcass!"
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
index 614cf2b350d..7eb185cffd3 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
@@ -26,7 +26,7 @@
response_harm_simple = "squish"
friendly_verb_continuous = "pinches"
friendly_verb_simple = "pinch"
- a_intent = INTENT_HELP
+ combat_mode = FALSE
ventcrawler = VENTCRAWLER_ALWAYS
gold_core_spawnable = FRIENDLY_SPAWN
stat_attack = HARD_CRIT
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm
index a3c143eb815..e3ace991812 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm
@@ -12,7 +12,7 @@
response_harm_continuous = "strikes"
response_harm_simple = "strike"
status_flags = 0
- a_intent = INTENT_HARM
+ combat_mode = TRUE
var/crusher_loot
var/throw_message = "bounces off of"
var/fromtendril = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index b35e733db45..9b38f63ac72 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -171,7 +171,7 @@
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M)
..()
- if(M.a_intent == INTENT_HARM)
+ if(M.combat_mode)
Bruise()
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
diff --git a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
index 4417e68e2ec..c69a5d94082 100644
--- a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
+++ b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
@@ -20,7 +20,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm
index 9c63c946dde..f08a3365ad9 100644
--- a/code/modules/mob/living/simple_animal/hostile/ooze.dm
+++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm
@@ -23,7 +23,7 @@
attack_verb_continuous = "slimes"
attack_verb_simple = "slime"
attack_sound = 'sound/effects/blobattack.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
mob_size = MOB_SIZE_LARGE
initial_language_holder = /datum/language_holder/slime
diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm
index 26833549505..c18567cc855 100644
--- a/code/modules/mob/living/simple_animal/hostile/pirate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm
@@ -19,7 +19,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
speak_emote = list("yarrs")
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index 8b514e44c50..8c265b08ed1 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -16,7 +16,7 @@
speak = list("HONK", "Honk!", "Welcome to clown planet!")
emote_see = list("honks", "squeaks")
speak_chance = 1
- a_intent = INTENT_HARM
+ combat_mode = TRUE
maxHealth = 75
health = 75
speed = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm
index 17301c463f8..10117905227 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm
@@ -9,7 +9,7 @@
turns_per_move = 5
response_help_continuous = "passes through"
response_help_simple = "pass through"
- a_intent = INTENT_HARM
+ combat_mode = TRUE
healable = 0
speed = 0
maxHealth = 40
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
index 5137b82ea2e..dc721f10936 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
@@ -12,7 +12,7 @@
response_disarm_simple = "gently push aside"
response_harm_continuous = "punches"
response_harm_simple = "punch"
- a_intent = INTENT_HARM
+ combat_mode = TRUE
maxHealth = 100
health = 100
speed = 0
@@ -49,7 +49,7 @@
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
faction = list("nanotrasenprivate")
- a_intent = INTENT_HARM
+ combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm
index 597db74bcb1..589d508d50c 100644
--- a/code/modules/mob/living/simple_animal/hostile/russian.dm
+++ b/code/modules/mob/living/simple_animal/hostile/russian.dm
@@ -18,7 +18,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/russian,
/obj/item/kitchen/knife)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
index 477233566f3..5dc96fd65ee 100644
--- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm
+++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
@@ -10,7 +10,7 @@
turns_per_move = 5
speak_emote = list("rattles")
emote_see = list("rattles")
- a_intent = INTENT_HARM
+ combat_mode = TRUE
maxHealth = 40
health = 40
speed = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index 54d7468afe7..d5f60812798 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -30,7 +30,7 @@
desc = "A vile, leviathan-esque creature that flies in the most unnatural way. Looks slightly similar to a space carp."
maxHealth = 400
health = 400
- a_intent = INTENT_HARM
+ combat_mode = TRUE
speed = 0
attack_verb_continuous = "chomps"
attack_verb_simple = "chomp"
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 70f520ca9b3..2abc62b78f1 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -8,7 +8,7 @@
icon_living = "human_male"
icon_dead = "human_male"
gender = NEUTER
- a_intent = INTENT_HARM
+ combat_mode = TRUE
mob_biotypes = MOB_HUMANOID
response_help_continuous = "touches"
diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm
index 1eb03b07650..653cf5c27ce 100644
--- a/code/modules/mob/living/simple_animal/hostile/stickman.dm
+++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm
@@ -22,7 +22,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
faction = list("hostile","stickman")
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 65a9e813b1a..785061cfc8a 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -36,7 +36,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
@@ -288,7 +288,7 @@
icon_state = "viscerator_attack"
icon_living = "viscerator_attack"
pass_flags = PASSTABLE | PASSMOB
- a_intent = INTENT_HARM
+ combat_mode = TRUE
mob_biotypes = MOB_ROBOTIC
health = 25
maxHealth = 25
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 31b558d12a9..2711f41e84a 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -93,7 +93,7 @@
/mob/living/simple_animal/hostile/tree/festivus/attack_hand(mob/living/carbon/human/M)
. = ..()
- if(M.a_intent == "help")
+ if(!M.combat_mode)
visible_message("[src] crackles with static electricity!")
for(var/obj/item/stock_parts/cell/C in range(2, get_turf(src)))
C.give(75)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 6e3b5852ded..48a9158dd90 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -100,7 +100,7 @@
obj_damage = 60
melee_damage_lower = 25
melee_damage_upper = 25
- a_intent = INTENT_HARM
+ combat_mode = TRUE
del_on_death = TRUE
deathmessage = "collapses into bits of plant matter."
attacked_sound = 'sound/creatures/venus_trap_hurt.ogg'
diff --git a/code/modules/mob/living/simple_animal/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm
index 6016ed85044..20ded1a4112 100644
--- a/code/modules/mob/living/simple_animal/hostile/wizard.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm
@@ -17,7 +17,7 @@
attack_verb_continuous = "punches"
attack_verb_simple = "punch"
attack_sound = 'sound/weapons/punch1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
faction = list(ROLE_WIZARD)
diff --git a/code/modules/mob/living/simple_animal/hostile/zombie.dm b/code/modules/mob/living/simple_animal/hostile/zombie.dm
index 6d3e5f1505b..4c98cd4cdde 100644
--- a/code/modules/mob/living/simple_animal/hostile/zombie.dm
+++ b/code/modules/mob/living/simple_animal/hostile/zombie.dm
@@ -15,7 +15,7 @@
attack_verb_continuous = "bites"
attack_verb_simple = "bite"
attack_sound = 'sound/hallucinations/growl1.ogg'
- a_intent = INTENT_HARM
+ combat_mode = TRUE
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index e1c2dcac5ff..e79d902c343 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -57,7 +57,7 @@
response_harm_continuous = "swats"
response_harm_simple = "swat"
stop_automated_movement = 1
- a_intent = INTENT_HARM //parrots now start "aggressive" since only player parrots will nuzzle.
+ combat_mode = TRUE //parrots now start "aggressive" since only player parrots will nuzzle.
attack_verb_continuous = "chomps"
attack_verb_simple = "chomp"
friendly_verb_continuous = "grooms"
@@ -152,7 +152,7 @@
. = ..()
. += ""
. += "Held Item: [held_item]"
- . += "Mode: [a_intent]"
+ . += "Combat mode: [combat_mode ? "On" : "Off"]"
/mob/living/simple_animal/parrot/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, list/message_mods = list())
. = ..()
@@ -286,7 +286,7 @@
..()
if(client)
return
- if(!stat && M.a_intent == INTENT_HARM)
+ if(!stat && M.combat_mode)
icon_state = icon_living //It is going to be flying regardless of whether it flees or attacks
@@ -301,7 +301,7 @@
else
parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell!
drop_held_item(0)
- if(stat != DEAD && M.a_intent == INTENT_HELP)
+ if(stat != DEAD && !M.combat_mode)
handle_automated_speech(1) //assured speak/emote
return
@@ -571,7 +571,7 @@
var/mob/living/L = parrot_interest
if(melee_damage_upper == 0)
melee_damage_upper = parrot_damage_upper
- a_intent = INTENT_HARM
+ set_combat_mode(TRUE)
//If the mob is close enough to interact with
if(Adjacent(parrot_interest))
@@ -865,13 +865,13 @@
if(stat || !client)
return
- if(a_intent != INTENT_HELP)
+ if(combat_mode)
melee_damage_upper = 0
- a_intent = INTENT_HELP
+ set_combat_mode(FALSE)
else
melee_damage_upper = parrot_damage_upper
- a_intent = INTENT_HARM
- to_chat(src, "You will now [a_intent] others.")
+ set_combat_mode(TRUE)
+ to_chat(src, "You will now [combat_mode ? "Harm" : "Help"] others.")
return
/*
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index 2c8fbe447ae..0aad2e96937 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -204,7 +204,7 @@
SEND_SIGNAL(M, COMSIG_NANITE_SYNC, original_nanites, TRUE, TRUE) //The trues are to copy activation as well
var/mob/living/simple_animal/slime/new_slime = pick(babies)
- new_slime.a_intent = INTENT_HARM
+ new_slime.set_combat_mode(TRUE)
if(src.mind)
src.mind.transfer_to(new_slime)
else
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index cdffb7158f3..fc0267c8048 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -269,7 +269,7 @@
/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
return
-/mob/living/simple_animal/slime/attack_ui(slot)
+/mob/living/simple_animal/slime/attack_ui(slot, params)
return
/mob/living/simple_animal/slime/attack_slime(mob/living/simple_animal/slime/M)
@@ -309,7 +309,7 @@
return
discipline_slime(user)
-/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M)
+/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M, modifiers)
if(buckled)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if(buckled == M)
@@ -339,9 +339,9 @@
discipline_slime(M)
else
if(stat == DEAD && surgeries.len)
- if(M.a_intent == INTENT_HELP || M.a_intent == INTENT_DISARM)
+ if(!M.combat_mode || (modifiers && modifiers["right"]))
for(var/datum/surgery/S in surgeries)
- if(S.next_step(M,M.a_intent))
+ if(S.next_step(M, modifiers))
return 1
if(..()) //successful attack
attacked += 10
@@ -354,9 +354,10 @@
/mob/living/simple_animal/slime/attackby(obj/item/W, mob/living/user, params)
if(stat == DEAD && surgeries.len)
- if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
+ var/list/modifiers = params2list(params)
+ if(!user.combat_mode || (modifiers && modifiers["right"]))
for(var/datum/surgery/S in surgeries)
- if(S.next_step(user,user.a_intent))
+ if(S.next_step(user, modifiers))
return 1
if(istype(W, /obj/item/stack/sheet/mineral/plasma) && !stat) //Let's you feed slimes plasma.
if (user in Friends)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index cd5a278d3f9..ca46d0c08d4 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -294,7 +294,7 @@
* Mostly tries to put the item into the slot if possible, or call attack hand
* on the item in the slot if the users active hand is empty
*/
-/mob/proc/attack_ui(slot)
+/mob/proc/attack_ui(slot, params)
var/obj/item/W = get_active_held_item()
if(istype(W))
@@ -305,7 +305,8 @@
// Activate the item
var/obj/item/I = get_item_by_slot(slot)
if(istype(I))
- I.attack_hand(src)
+ var/list/modifiers = params2list(params)
+ I.attack_hand(src, modifiers)
return FALSE
@@ -513,10 +514,10 @@
//now we touch the thing we're examining
/// our current intent, so we can go back to it after touching
- var/previous_intent = a_intent
- a_intent = INTENT_HELP
+ var/previous_combat_mode = combat_mode
+ set_combat_mode(FALSE)
INVOKE_ASYNC(examined_thing, /atom/proc/attack_hand, src)
- a_intent = previous_intent
+ set_combat_mode(previous_combat_mode)
return TRUE
@@ -818,7 +819,11 @@
if(ismob(dropping) && src == user && dropping != user)
var/mob/M = dropping
var/mob/U = user
- if(!iscyborg(U) || U.a_intent == INTENT_HARM)
+ if(iscyborg(U))
+ var/mob/living/silicon/robot/cyborg = U
+ if(cyborg.combat_mode)
+ M.show_inv(cyborg)
+ else
M.show_inv(U)
///Is the mob muzzled (default false)
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 3cd864f05a7..05993942dbc 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -107,10 +107,6 @@
/// How many ticks this mob has been over reating
var/overeatduration = 0 // How long this guy is overeating //Carbon
- /// The current intent of the mob
- var/a_intent = INTENT_HELP//Living
- /// List of possible intents a mob can have
- var/list/possible_a_intents = null//Living
/// The movement intent of the mob (run/wal)
var/m_intent = MOVE_INTENT_RUN//Living
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 1ceafc17745..cbb9484a763 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -248,44 +248,6 @@
firstname.Find(real_name)
return firstname.match
-
-/**
- * change a mob's act-intent.
- *
- * Input the intent as a string such as "help" or use "right"/"left
- */
-/mob/verb/a_intent_change(input as text)
- set name = "a-intent"
- set hidden = TRUE
-
- if(!possible_a_intents || !possible_a_intents.len)
- return
-
- if(input in possible_a_intents)
- a_intent = input
- else
- var/current_intent = possible_a_intents.Find(a_intent)
-
- if(!current_intent)
- // Failsafe. Just in case some badmin was playing with VV.
- current_intent = 1
-
- if(input == INTENT_HOTKEY_RIGHT)
- current_intent += 1
- if(input == INTENT_HOTKEY_LEFT)
- current_intent -= 1
-
- // Handle looping
- if(current_intent < 1)
- current_intent = possible_a_intents.len
- if(current_intent > possible_a_intents.len)
- current_intent = 1
-
- a_intent = possible_a_intents[current_intent]
-
- if(hud_used?.action_intent)
- hud_used.action_intent.icon_state = "[a_intent]"
-
///Returns a mob's real name between brackets. Useful when you want to display a mob's name alongside their real name
/mob/proc/get_realname_string()
if(real_name && real_name != name)
@@ -490,7 +452,7 @@
colored_message = "(ASAY) [colored_message]"
if(LOG_EMOTE)
colored_message = "(EMOTE) [colored_message]"
-
+
var/list/timestamped_message = list("\[[time_stamp()]\] [key_name(src)] [loc_name(src)] (Event #[LAZYLEN(logging[smessage_type])])" = colored_message)
logging[smessage_type] += timestamped_message
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 076e1391b4a..e243a654d00 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -184,7 +184,7 @@
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
- new_xeno.a_intent = INTENT_HARM
+ new_xeno.set_combat_mode(TRUE)
new_xeno.key = key
update_atom_languages()
@@ -218,7 +218,7 @@
new_slime = pick(babies)
else
new_slime = new /mob/living/simple_animal/slime(loc)
- new_slime.a_intent = INTENT_HARM
+ new_slime.set_combat_mode(TRUE)
new_slime.key = key
to_chat(new_slime, "You are now a slime. Skreee!")
@@ -246,7 +246,7 @@
qdel(t)
var/mob/living/simple_animal/pet/dog/corgi/new_corgi = new /mob/living/simple_animal/pet/dog/corgi (loc)
- new_corgi.a_intent = INTENT_HARM
+ new_corgi.set_combat_mode(TRUE)
new_corgi.key = key
to_chat(new_corgi, "You are now a Corgi. Yap Yap!")
@@ -270,7 +270,7 @@
icon = null
invisibility = INVISIBILITY_MAXIMUM
var/mob/living/simple_animal/hostile/gorilla/new_gorilla = new (get_turf(src))
- new_gorilla.a_intent = INTENT_HARM
+ new_gorilla.set_combat_mode(TRUE)
if(mind)
mind.transfer_to(new_gorilla)
else
@@ -303,11 +303,10 @@
for(var/t in bodyparts)
qdel(t)
- var/mob/new_mob = new mobpath(src.loc)
+ var/mob/living/new_mob = new mobpath(src.loc)
new_mob.key = key
- new_mob.a_intent = INTENT_HARM
-
+ new_mob.set_combat_mode(TRUE)
to_chat(new_mob, "You suddenly feel more... animalistic.")
. = new_mob
@@ -322,10 +321,10 @@
to_chat(usr, "Sorry but this mob type is currently unavailable.")
return
- var/mob/new_mob = new mobpath(src.loc)
+ var/mob/living/new_mob = new mobpath(src.loc)
new_mob.key = key
- new_mob.a_intent = INTENT_HARM
+ new_mob.set_combat_mode(TRUE)
to_chat(new_mob, "You feel more... animalistic.")
. = new_mob
diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm
index 1409b208b1a..daabe7b7eb4 100644
--- a/code/modules/modular_computers/computers/machinery/modular_computer.dm
+++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm
@@ -115,8 +115,8 @@
if(cpu)
return cpu.screwdriver_act(user, tool)
-/obj/machinery/modular_computer/attackby(obj/item/W as obj, mob/user)
- if (user.a_intent == INTENT_HELP && cpu && !(flags_1 & NODECONSTRUCT_1))
+/obj/machinery/modular_computer/attackby(obj/item/W as obj, mob/living/user)
+ if (!user.combat_mode && cpu && !(flags_1 & NODECONSTRUCT_1))
return cpu.attackby(W, user)
return ..()
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index f9d01f30fc9..c2cdbbe1172 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -45,8 +45,9 @@
I.forceMove(loc)
qdel(src)
-/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
- if(P.tool_behaviour == TOOL_WRENCH && user.a_intent != INTENT_HELP)
+/obj/structure/filingcabinet/attackby(obj/item/P, mob/living/user, params)
+ var/list/modifiers = params2list(params)
+ if(P.tool_behaviour == TOOL_WRENCH && modifiers && modifiers["right"])
to_chat(user, "You begin to [anchored ? "unwrench" : "wrench"] [src].")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "You successfully [anchored ? "unwrench" : "wrench"] [src].")
@@ -59,7 +60,7 @@
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
to_chat(user, "You can't put [P] in [src]!")
else
return ..()
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 0dd781421b0..d962c9cf1b1 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -799,7 +799,7 @@
// attack with hand - remove cell (if cover open) or interact with the APC
-/obj/machinery/power/apc/attack_hand(mob/user)
+/obj/machinery/power/apc/attack_hand(mob/user, params)
. = ..()
if(.)
return
@@ -808,7 +808,28 @@
var/mob/living/carbon/human/H = user
var/datum/species/ethereal/E = H.dna.species
var/charge_limit = ETHEREAL_CHARGE_DANGEROUS - APC_POWER_GAIN
- if((H.a_intent == INTENT_HARM) && (E.drain_time < world.time))
+ var/list/modifiers = params2list(params)
+ if(H.combat_mode && E.drain_time < world.time)
+ if(modifiers && modifiers["right"]) //Disarm
+ if(cell.charge == cell.maxcharge)
+ to_chat(H, "The APC is full!")
+ return
+ var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
+ if(stomach.crystal_charge < 10)
+ to_chat(H, "Your charge is too low!")
+ return
+ E.drain_time = world.time + 75
+ to_chat(H, "You start channeling power through your body into the APC.")
+ if(do_after(user, 75, target = src))
+ if(cell.charge == cell.maxcharge || (stomach.crystal_charge < 10))
+ return
+ if(istype(stomach))
+ to_chat(H, "You transfer some power to the APC.")
+ stomach.adjust_charge(-10)
+ cell.charge += 10
+ else
+ to_chat(H, "You can't transfer power to the APC!")
+ return
if(cell.charge <= (cell.maxcharge / 2)) // ethereals can't drain APCs under half charge, this is so that they are forced to look to alternative power sources if the station is running low
to_chat(H, "The APC's syphon safeties prevent you from draining power!")
return
@@ -828,26 +849,6 @@
else
to_chat(H, "You can't receive charge from the APC!")
return
- if((H.a_intent == INTENT_GRAB) && (E.drain_time < world.time))
- if(cell.charge >= cell.maxcharge - APC_POWER_GAIN)
- to_chat(H, "The APC is full!")
- return
- var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
- if(stomach.crystal_charge < APC_POWER_GAIN)
- to_chat(H, "Your charge is too low!")
- return
- E.drain_time = world.time + APC_DRAIN_TIME
- to_chat(H, "You start channeling power through your body into the APC.")
- if(do_after(user, APC_DRAIN_TIME, target = src))
- if(cell.charge == cell.maxcharge || (stomach.crystal_charge < APC_POWER_GAIN))
- return
- if(istype(stomach))
- to_chat(H, "You transfer some power to the APC.")
- stomach.adjust_charge(-APC_POWER_GAIN)
- cell.charge += APC_POWER_GAIN
- else
- to_chat(H, "You can't transfer power to the APC!")
- return
if(opened && (!issilicon(user)))
if(cell)
diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm
index 4b3fcfd91bc..ee48b3e4357 100644
--- a/code/modules/power/gravitygenerator.dm
+++ b/code/modules/power/gravitygenerator.dm
@@ -87,8 +87,8 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/part/get_status()
return main_part?.get_status()
-/obj/machinery/gravity_generator/part/attack_hand(mob/user)
- return main_part.attack_hand(user)
+/obj/machinery/gravity_generator/part/attack_hand(mob/user, modifiers)
+ return main_part.attack_hand(user, modifiers)
/obj/machinery/gravity_generator/part/set_broken()
..()
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 81f78112220..b8465b178dc 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -406,7 +406,7 @@
return TRUE
return FALSE
-/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
+/obj/machinery/power/solar_control/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(I.use_tool(src, user, 20, volume=50))
if (src.machine_stat & BROKEN)
@@ -432,7 +432,7 @@
A.icon_state = "4"
A.set_anchored(TRUE)
qdel(src)
- else if(user.a_intent != INTENT_HARM && !(I.item_flags & NOBLUDGEON))
+ else if(!user.combat_mode && !(I.item_flags & NOBLUDGEON))
attack_hand(user)
else
return ..()
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 1c4930f62f0..6af1aeb03c0 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -934,7 +934,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
Consume(dust_arm)
qdel(W)
return
- if(cig.lit || user.a_intent != INTENT_HELP)
+ if(cig.lit || user.combat_mode)
user.visible_message("A hideous sound echoes as [W] is ashed out on contact with \the [src]. That didn't seem like a good idea...")
playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE)
Consume(W)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 3459589525a..ef64587f478 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -193,6 +193,16 @@
for(var/obj/O in contents)
O.emp_act(severity)
+/obj/item/gun/attack(mob/M, mob/living/user, params)
+ var/list/modifiers = params2list(params)
+ if(ismob(M) && modifiers && modifiers["right"]) //Right click to hold someone up
+ if(user.GetComponent(/datum/component/gunpoint))
+ to_chat(user, "You are already holding someone up!")
+ return
+ user.AddComponent(/datum/component/gunpoint, M, src)
+ return TRUE
+ return ..()
+
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
. = ..()
if(QDELETED(target))
@@ -202,16 +212,10 @@
if(flag) //It's adjacent, is the user, or is on the user's person
if(target in user.contents) //can't shoot stuff inside us.
return
- if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
+ if(!ismob(target) || !user.combat_mode) //melee attack
return
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
return
- if(ismob(target) && user.a_intent == INTENT_GRAB)
- if(user.GetComponent(/datum/component/gunpoint))
- to_chat(user, "You are already holding someone up!")
- return
- user.AddComponent(/datum/component/gunpoint, target, src)
- return
if(iscarbon(target))
var/mob/living/carbon/C = target
for(var/i in C.all_wounds)
@@ -243,7 +247,7 @@
//DUAL (or more!) WIELDING
var/bonus_spread = 0
var/loop_counter = 0
- if(ishuman(user) && user.a_intent == INTENT_HARM)
+ if(ishuman(user) && user.combat_mode)
var/mob/living/carbon/human/H = user
for(var/obj/item/gun/G in H.held_items)
if(G == src || G.weapon_weight >= WEAPON_MEDIUM)
@@ -380,8 +384,8 @@
/obj/item/gun/proc/reset_semicd()
semicd = FALSE
-/obj/item/gun/attack(mob/M as mob, mob/user)
- if(user.a_intent == INTENT_HARM) //Flogging
+/obj/item/gun/attack(mob/M, mob/living/user)
+ if(user.combat_mode) //Flogging
if(bayonet)
M.attackby(bayonet, user)
return
@@ -389,15 +393,15 @@
return ..()
return
-/obj/item/gun/attack_obj(obj/O, mob/user)
- if(user.a_intent == INTENT_HARM)
+/obj/item/gun/attack_obj(obj/O, mob/living/user)
+ if(user.combat_mode)
if(bayonet)
O.attackby(bayonet, user)
return
return ..()
-/obj/item/gun/attackby(obj/item/I, mob/user, params)
- if(user.a_intent == INTENT_HARM)
+/obj/item/gun/attackby(obj/item/I, mob/living/user, params)
+ if(user.combat_mode)
return ..()
else if(istype(I, /obj/item/flashlight/seclite))
if(!can_flashlight)
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index 21f08ee3469..756942d7e70 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -158,7 +158,7 @@
if(flag)
if(!(target in user.contents) && ismob(target))
- if(user.a_intent == INTENT_HARM) // Flogging action
+ if(user.combat_mode) // Flogging action
return
if(isliving(user))
diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm
index 9d925540481..f0e9045d435 100644
--- a/code/modules/projectiles/guns/misc/beam_rifle.dm
+++ b/code/modules/projectiles/guns/misc/beam_rifle.dm
@@ -300,7 +300,7 @@
if(flag) //It's adjacent, is the user, or is on the user's person
if(target in user.contents) //can't shoot stuff inside us.
return
- if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
+ if(!ismob(target) || user.combat_mode) //melee attack
return
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
return
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 1a0bbaf0aa2..e271eaecd1a 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -290,7 +290,7 @@
M.log_message("became [new_mob.real_name]", LOG_ATTACK, color="orange")
- new_mob.a_intent = INTENT_HARM
+ new_mob.set_combat_mode(TRUE)
M.wabbajack_act(new_mob)
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 3dd17c2d728..c87a79cb4c7 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -333,7 +333,7 @@
recording_recipe = null
. = TRUE
-/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params)
+/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/living/user, params)
if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
@@ -349,7 +349,7 @@
replace_beaker(user, B)
to_chat(user, "You add [B] to [src].")
updateUsrDialog()
- else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag))
+ else if(!user.combat_mode && !istype(I, /obj/item/card/emag))
to_chat(user, "You can't load [I] into [src]!")
return ..()
else
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index 0ba45939874..daae29cebbd 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -121,7 +121,7 @@
update_icon()
return TRUE
-/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params)
+/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/living/user, params)
//You can only screw open empty grinder
if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
return
@@ -162,7 +162,7 @@
return TRUE
if(!I.grind_results && !I.juice_results)
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return ..()
else
to_chat(user, "You cannot grind [I] into reagents!")
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index e0069554965..d4337140907 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -57,8 +57,8 @@
to_chat(user, "[src]'s transfer amount is now [amount_per_transfer_from_this] units.")
return
-/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
- if(user.a_intent == INTENT_HARM)
+/obj/item/reagent_containers/attack(mob/M, mob/living/user, def_zone)
+ if(user.combat_mode)
return ..()
/obj/item/reagent_containers/proc/canconsume(mob/eater, mob/user)
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 1a460dbf595..4bfb7d2d91f 100755
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -9,7 +9,7 @@
resistance_flags = ACID_PROOF
-/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
+/obj/item/reagent_containers/glass/attack(mob/M, mob/living/user, obj/target)
if(!canconsume(M, user))
return
@@ -21,7 +21,7 @@
return
if(istype(M))
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
var/R
M.visible_message("[user] splashes the contents of [src] onto [M]!", \
"[user] splashes the contents of [src] onto you!")
@@ -63,7 +63,7 @@
if(LAZYLEN(diseases_to_add))
AddComponent(/datum/component/infective, diseases_to_add)
-/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
+/obj/item/reagent_containers/glass/afterattack(obj/target, mob/living/user, proximity)
. = ..()
if((!proximity) || !check_allowed_items(target,target_self=1))
return
@@ -96,7 +96,7 @@
to_chat(user, "You fill [src] with [trans] unit\s of the contents of [target].")
else if(reagents.total_volume)
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
user.visible_message("[user] splashes the contents of [src] onto [target]!", \
"You splash the contents of [src] onto [target].")
reagents.expose(target, TOUCH)
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index a4fb1d63a32..8c74e0a4b9b 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
conveying = FALSE
// attack with item, place item on conveyor
-/obj/machinery/conveyor/attackby(obj/item/I, mob/user, params)
+/obj/machinery/conveyor/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_CROWBAR)
user.visible_message("[user] struggles to pry up \the [src] with \the [I].", \
"You struggle to pry up \the [src] with \the [I].")
@@ -193,7 +193,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
update_move_direction()
to_chat(user, "You reverse [src]'s direction.")
- else if(user.a_intent != INTENT_HARM)
+ else if(!user.combat_mode)
user.transferItemToLoc(I, drop_location())
else
return ..()
diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm
index 396b5bff976..6443a519f92 100644
--- a/code/modules/recycling/disposal/bin.dm
+++ b/code/modules/recycling/disposal/bin.dm
@@ -80,7 +80,7 @@
air_contents.merge(removed)
trunk_check()
-/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
+/obj/machinery/disposal/attackby(obj/item/I, mob/living/user, params)
add_fingerprint(user)
if(!pressure_charging && !full_pressure && !flush)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
@@ -98,7 +98,7 @@
deconstruct()
return
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
if((I.item_flags & ABSTRACT) || !user.temporarilyRemoveItemFromInventory(I))
return
place_item_in_disposal(I, user)
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index d8a228b5f9a..d922edc685b 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -25,8 +25,8 @@ Note: Must be placed within 3 tiles of the R&D Console
temp_list[O] = text2num(temp_list[O])
return temp_list
-/obj/machinery/rnd/destructive_analyzer/Insert_Item(obj/item/O, mob/user)
- if(user.a_intent != INTENT_HARM)
+/obj/machinery/rnd/destructive_analyzer/Insert_Item(obj/item/O, mob/living/user)
+ if(!user.combat_mode)
. = 1
if(!is_insertion_ready(user))
return
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 19f77849f0a..d7ed78da2f5 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -107,8 +107,8 @@
return FALSE
return TRUE
-/obj/machinery/rnd/experimentor/Insert_Item(obj/item/O, mob/user)
- if(user.a_intent != INTENT_HARM)
+/obj/machinery/rnd/experimentor/Insert_Item(obj/item/O, mob/living/user)
+ if(!user.combat_mode)
. = 1
if(!is_insertion_ready(user))
return
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index df10316643e..b154188846a 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -137,7 +137,7 @@
user.visible_message("[user] starts shaking violently!","Your [name] starts pulsing violently...")
if(do_after(user, 50, target = user))
var/mob/living/simple_animal/S = create_random_mob(user.drop_location(), HOSTILE_SPAWN)
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
S.faction |= "neutral"
else
S.faction |= "slime"
diff --git a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm
index 67a1974b37c..d02e61e82a0 100644
--- a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm
+++ b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm
@@ -84,7 +84,7 @@
reagents.expose(M, TOUCH, 20) //Covers target in 20u of oil.
to_chat(M, "You touch the pool of oil, only to get oil all over yourself. It would be wise to wash this off with water.")
-/obj/structure/sink/oil_well/attackby(obj/item/O, mob/user, params)
+/obj/structure/sink/oil_well/attackby(obj/item/O, mob/living/user, params)
flick("puddle-oil-splash",src)
if(O.tool_behaviour == TOOL_SHOVEL && !(flags_1&NODECONSTRUCT_1)) //attempt to deconstruct the puddle with a shovel
to_chat(user, "You fill in the oil well with soil.")
@@ -100,7 +100,7 @@
return TRUE
to_chat(user, "\The [RG] is full.")
return FALSE
- if(user.a_intent != INTENT_HARM)
+ if(!user.combat_mode)
to_chat(user, "You won't have any luck getting \the [O] out if you drop it in the oil.")
return 1
else
@@ -161,7 +161,7 @@
to_chat(user, "The grave has already been dug up.")
/obj/structure/closet/crate/grave/tool_interact(obj/item/S, mob/living/carbon/user)
- if(user.a_intent == INTENT_HELP) //checks to attempt to dig the grave, must be done on help intent only.
+ if(!user.combat_mode) //checks to attempt to dig the grave, must be done with combat mode off only.
if(!opened)
if(istype(S,cutting_tool) && S.tool_behaviour == TOOL_SHOVEL)
to_chat(user, "You start start to dig open \the [src] with \the [S]...")
@@ -184,7 +184,7 @@
to_chat(user, "The grave has already been dug up.")
return 1
- else if((user.a_intent != INTENT_HELP) && opened) //checks to attempt to remove the grave entirely.
+ else if((user.combat_mode) && opened) //checks to attempt to remove the grave entirely.
if(istype(S,cutting_tool) && S.tool_behaviour == TOOL_SHOVEL)
to_chat(user, "You start to remove \the [src] with \the [S].")
if (do_after(user,15, target = src))
diff --git a/code/modules/spells/spell_types/summonitem.dm b/code/modules/spells/spell_types/summonitem.dm
index 8636211941c..f0f2ca68e16 100644
--- a/code/modules/spells/spell_types/summonitem.dm
+++ b/code/modules/spells/spell_types/summonitem.dm
@@ -59,7 +59,7 @@
var/obj/item/organ/organ = item_to_retrieve
if(organ.owner)
// If this code ever runs I will be happy
- log_combat(L, organ.owner, "magically removed [organ.name] from", addition="INTENT: [uppertext(L.a_intent)]")
+ log_combat(L, organ.owner, "magically removed [organ.name] from", addition="COMBAT MODE: [uppertext(L.combat_mode)]")
organ.Remove(organ.owner)
else
while(!isturf(item_to_retrieve.loc) && infinite_recursion < 10) //if it's in something you get the whole thing.
diff --git a/code/modules/surgery/bone_mending.dm b/code/modules/surgery/bone_mending.dm
index 9937226a8a4..8894e6dbd53 100644
--- a/code/modules/surgery/bone_mending.dm
+++ b/code/modules/surgery/bone_mending.dm
@@ -50,7 +50,7 @@
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
-/datum/surgery_step/repair_bone_hairline/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/repair_bone_hairline/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
if(surgery.operated_wound)
if(istype(tool, /obj/item/stack))
var/obj/item/stack/used_stack = tool
@@ -58,7 +58,7 @@
display_results(user, target, "You successfully repair the fracture in [target]'s [parse_zone(target_zone)].",
"[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "repaired a hairline fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "repaired a hairline fracture in", addition="COMBAT_MODE: [uppertext(user.combat_mode)]")
qdel(surgery.operated_wound)
else
to_chat(user, "[target] has no hairline fracture there!")
@@ -86,7 +86,7 @@
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
-/datum/surgery_step/reset_compound_fracture/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/reset_compound_fracture/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
if(surgery.operated_wound)
if(istype(tool, /obj/item/stack))
var/obj/item/stack/used_stack = tool
@@ -94,7 +94,7 @@
display_results(user, target, "You successfully reset the bone in [target]'s [parse_zone(target_zone)].",
"[user] successfully resets the bone in [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully resets the bone in [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "reset a compound fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "reset a compound fracture in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
else
to_chat(user, "[target] has no compound fracture there!")
return ..()
@@ -120,7 +120,7 @@
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
-/datum/surgery_step/repair_bone_compound/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/repair_bone_compound/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
if(surgery.operated_wound)
if(istype(tool, /obj/item/stack))
var/obj/item/stack/used_stack = tool
@@ -128,7 +128,7 @@
display_results(user, target, "You successfully repair the fracture in [target]'s [parse_zone(target_zone)].",
"[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "repaired a compound fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "repaired a compound fracture in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
qdel(surgery.operated_wound)
else
to_chat(user, "[target] has no compound fracture there!")
diff --git a/code/modules/surgery/burn_dressing.dm b/code/modules/surgery/burn_dressing.dm
index aed5432bdfe..8856b5b0e9c 100644
--- a/code/modules/surgery/burn_dressing.dm
+++ b/code/modules/surgery/burn_dressing.dm
@@ -41,13 +41,13 @@
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
-/datum/surgery_step/debride/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/debride/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/datum/wound/burn/burn_wound = surgery.operated_wound
if(burn_wound)
display_results(user, target, "You successfully excise some of the infected flesh from [target]'s [parse_zone(target_zone)].",
"[user] successfully excises some of the infected flesh from [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully excises some of the infected flesh from [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "excised infected flesh in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "excised infected flesh in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
surgery.operated_bodypart.receive_damage(brute=3, wound_bonus=CANT_WOUND)
burn_wound.infestation -= 0.5
burn_wound.sanitization += 0.5
@@ -87,13 +87,13 @@
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
-/datum/surgery_step/dress/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/dress/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/datum/wound/burn/burn_wound = surgery.operated_wound
if(burn_wound)
display_results(user, target, "You successfully wrap [target]'s [parse_zone(target_zone)] with [tool].",
"[user] successfully wraps [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully wraps [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "dressed burns in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "dressed burns in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
burn_wound.sanitization += 3
burn_wound.flesh_healing += 5
var/obj/item/bodypart/the_part = target.get_bodypart(target_zone)
diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm
index 568d2cd45a5..8be3d7d6334 100644
--- a/code/modules/surgery/limb_augmentation.dm
+++ b/code/modules/surgery/limb_augmentation.dm
@@ -44,7 +44,7 @@
//SURGERY STEP SUCCESSES
-/datum/surgery_step/replace_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/replace_limb/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery, default_display_results = FALSE)
if(L)
if(istype(tool, /obj/item/organ_storage))
tool.icon_state = initial(tool.icon_state)
@@ -56,7 +56,7 @@
display_results(user, target, "You successfully augment [target]'s [parse_zone(target_zone)].",
"[user] successfully augments [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully augments [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] COMBAT MODE: [uppertext(user.combat_mode)]")
else
to_chat(user, "[target] has no organic [parse_zone(target_zone)] there!")
return ..()
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index a2def07ad41..9e5af70143f 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -129,7 +129,7 @@
return -1
-/datum/surgery_step/manipulate_organs/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
+/datum/surgery_step/manipulate_organs/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
if(current_type == "insert")
if(istype(tool, /obj/item/organ_storage))
I = tool.contents[1]
@@ -150,7 +150,7 @@
display_results(user, target, "You successfully extract [I] from [target]'s [parse_zone(target_zone)].",
"[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "surgically removed [I.name] from", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
I.Remove(target)
I.forceMove(get_turf(target))
else
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 01ac922758d..d9f02a9bac7 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -413,38 +413,6 @@
if(L.m_intent != MOVE_INTENT_RUN)
L.toggle_move_intent()
- //HELP INTENT
- else if((findtext(message, helpintent_words)))
- cooldown = COOLDOWN_MEME
- for(var/mob/living/carbon/human/H in listeners)
- addtimer(CALLBACK(H, /mob/verb/a_intent_change, INTENT_HELP), i * 2)
- addtimer(CALLBACK(H, /mob/proc/click_random_mob), i * 2)
- i++
-
- //DISARM INTENT
- else if((findtext(message, disarmintent_words)))
- cooldown = COOLDOWN_MEME
- for(var/mob/living/carbon/human/H in listeners)
- addtimer(CALLBACK(H, /mob/verb/a_intent_change, INTENT_DISARM), i * 2)
- addtimer(CALLBACK(H, /mob/proc/click_random_mob), i * 2)
- i++
-
- //GRAB INTENT
- else if((findtext(message, grabintent_words)))
- cooldown = COOLDOWN_MEME
- for(var/mob/living/carbon/human/H in listeners)
- addtimer(CALLBACK(H, /mob/verb/a_intent_change, INTENT_GRAB), i * 2)
- addtimer(CALLBACK(H, /mob/proc/click_random_mob), i * 2)
- i++
-
- //HARM INTENT
- else if((findtext(message, harmintent_words)))
- cooldown = COOLDOWN_MEME
- for(var/mob/living/carbon/human/H in listeners)
- addtimer(CALLBACK(H, /mob/verb/a_intent_change, INTENT_HARM), i * 2)
- addtimer(CALLBACK(H, /mob/proc/click_random_mob), i * 2)
- i++
-
//THROW/CATCH
else if((findtext(message, throwmode_words)))
cooldown = COOLDOWN_MEME
diff --git a/code/modules/surgery/repair_puncture.dm b/code/modules/surgery/repair_puncture.dm
index 7c3e07fba89..bec6c8bc4c3 100644
--- a/code/modules/surgery/repair_puncture.dm
+++ b/code/modules/surgery/repair_puncture.dm
@@ -46,7 +46,7 @@
"[user] begins to realign the torn blood vessels in [target]'s [parse_zone(user.zone_selected)] with [tool].",
"[user] begins to realign the torn blood vessels in [target]'s [parse_zone(user.zone_selected)].")
-/datum/surgery_step/repair_innards/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/repair_innards/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/datum/wound/pierce/pierce_wound = surgery.operated_wound
if(!pierce_wound)
to_chat(user, "[target] has no puncture wound there!")
@@ -55,7 +55,7 @@
display_results(user, target, "You successfully realign some of the blood vessels in [target]'s [parse_zone(target_zone)].",
"[user] successfully realigns some of the blood vessels in [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully realigns some of the blood vessels in [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "excised infected flesh in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "excised infected flesh in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
surgery.operated_bodypart.receive_damage(brute=3, wound_bonus=CANT_WOUND)
pierce_wound.blood_flow -= 0.25
return ..()
@@ -88,7 +88,7 @@
"[user] begins to meld some of the split blood vessels in [target]'s [parse_zone(user.zone_selected)] with [tool].",
"[user] begins to meld some of the split blood vessels in [target]'s [parse_zone(user.zone_selected)].")
-/datum/surgery_step/seal_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+/datum/surgery_step/seal_veins/success(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/datum/wound/pierce/pierce_wound = surgery.operated_wound
if(!pierce_wound)
to_chat(user, "[target] has no puncture there!")
@@ -97,7 +97,7 @@
display_results(user, target, "You successfully meld some of the split blood vessels in [target]'s [parse_zone(target_zone)] with [tool].",
"[user] successfully melds some of the split blood vessels in [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully melds some of the split blood vessels in [target]'s [parse_zone(target_zone)]!")
- log_combat(user, target, "dressed burns in", addition="INTENT: [uppertext(user.a_intent)]")
+ log_combat(user, target, "dressed burns in", addition="COMBAT MODE: [uppertext(user.combat_mode)]")
pierce_wound.blood_flow -= 0.5
if(pierce_wound.blood_flow > 0)
surgery.status = REALIGN_INNARDS
diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm
index 4ab5af6b9e5..5dcacc53252 100644
--- a/code/modules/surgery/surgery.dm
+++ b/code/modules/surgery/surgery.dm
@@ -93,14 +93,14 @@
if(type in opcomputer.advanced_surgeries)
return TRUE
-/datum/surgery/proc/next_step(mob/user, intent)
+/datum/surgery/proc/next_step(mob/living/user, modifiers)
if(location != user.zone_selected)
return FALSE
if(step_in_progress)
return TRUE
var/try_to_fail = FALSE
- if(intent == INTENT_DISARM)
+ if(modifiers && modifiers["right"])
try_to_fail = TRUE
var/datum/surgery_step/S = get_surgery_step()
diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm
index 98039237b44..9524390d158 100644
--- a/code/modules/surgery/tools.dm
+++ b/code/modules/surgery/tools.dm
@@ -192,7 +192,7 @@
/obj/item/circular_saw/augment
desc = "A small but very fast spinning saw. It rips and tears until it is done."
- w_class = WEIGHT_CLASS_SMALL
+ w_class = WEIGHT_CLASS_SMALL
toolspeed = 0.5
@@ -359,8 +359,8 @@
sharpness = SHARP_EDGED
custom_premium_price = PAYCHECK_MEDIUM * 14
-/obj/item/shears/attack(mob/living/M, mob/user)
- if(!iscarbon(M) || user.a_intent != INTENT_HELP)
+/obj/item/shears/attack(mob/living/M, mob/living/user)
+ if(!iscarbon(M) || user.combat_mode)
return ..()
if(user.zone_selected == BODY_ZONE_CHEST)
diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm
index 30bad721751..a2a98ecbd5a 100644
--- a/code/modules/unit_tests/combat.dm
+++ b/code/modules/unit_tests/combat.dm
@@ -5,8 +5,8 @@
// Avoid all randomness in tests
ADD_TRAIT(puncher, TRAIT_PERFECT_ATTACKER, INNATE_TRAIT)
- puncher.a_intent_change(INTENT_HARM)
- victim.attack_hand(puncher)
+ puncher.set_combat_mode(TRUE)
+ victim.attack_hand(puncher, list("right" = FALSE))
TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being punched")
@@ -16,7 +16,7 @@
var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox)
tider.put_in_active_hand(toolbox, forced = TRUE)
- tider.a_intent_change(INTENT_HARM)
+ tider.set_combat_mode(TRUE)
victim.attackby(toolbox, tider)
TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being hit by a toolbox")
@@ -27,7 +27,8 @@
var/obj/item/weldingtool/welding_tool = allocate(/obj/item/weldingtool)
attacker.put_in_active_hand(welding_tool, forced = TRUE)
- attacker.a_intent_change(INTENT_HARM)
+ attacker.set_combat_mode(TRUE)
+
welding_tool.attack_self(attacker) // Turn it on
victim.attackby(welding_tool, attacker)
@@ -58,7 +59,7 @@
RegisterSignal(toolbox, COMSIG_ITEM_AFTERATTACK, .proc/post_attack_hit)
attacker.put_in_active_hand(toolbox, forced = TRUE)
- attacker.a_intent_change(INTENT_HARM)
+ attacker.set_combat_mode(TRUE)
toolbox.melee_attack_chain(attacker, victim)
TEST_ASSERT(pre_attack_hit, "Pre-attack signal was not fired")
@@ -71,7 +72,6 @@
var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox)
victim.put_in_active_hand(toolbox, forced = TRUE)
- attacker.a_intent_change(INTENT_DISARM)
var/obj/structure/barricade/dense_object = allocate(/obj/structure/barricade)
@@ -82,7 +82,7 @@
// First disarm, world should now look like:
// Attacker --> Empty space --> Victim --> Wall
- victim.attack_hand(attacker)
+ victim.attack_hand(attacker, list("right" = TRUE))
TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim wasn't moved back after being pushed")
TEST_ASSERT(!victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was knocked down despite not being against a wall")
@@ -91,7 +91,7 @@
attacker.forceMove(get_step(attacker, EAST))
// Second disarm, victim was against wall and should be down
- victim.attack_hand(attacker)
+ victim.attack_hand(attacker, list("right" = TRUE))
TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim was moved after being pushed against a wall")
TEST_ASSERT(victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was not knocked down after being pushed against a wall")
diff --git a/code/modules/unit_tests/metabolizing.dm b/code/modules/unit_tests/metabolizing.dm
index 3040d3bacda..f7b689574c6 100644
--- a/code/modules/unit_tests/metabolizing.dm
+++ b/code/modules/unit_tests/metabolizing.dm
@@ -74,7 +74,7 @@
syringe.reagents.add_reagent(meth.type, meth.addiction_threshold)
syringe.mode = SYRINGE_INJECT
- syringe_user.a_intent = INTENT_HARM
+ syringe_user.set_combat_mode(TRUE)
syringe.afterattack(syringe_user, syringe_user, TRUE)
syringe_user.Life()
@@ -91,7 +91,7 @@
pill_two.reagents.add_reagent(meth.type, (meth.addiction_threshold * 0.5) + 1)
pill_two.attack(pill_syringe_user, pill_syringe_user)
- pill_syringe_user.a_intent = INTENT_HARM
+ pill_syringe_user.set_combat_mode(TRUE)
syringe.mode = SYRINGE_INJECT
syringe.afterattack(pill_syringe_user, pill_syringe_user, TRUE)
diff --git a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
index 3de1c41c0e8..9e382dd7bc3 100644
--- a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm
@@ -122,10 +122,10 @@
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = FALSE
-/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user)
+/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/living/user)
target.visible_message("[chassis] is drilling [target] with [src]!", \
"[chassis] is drilling you with [src]!")
- log_combat(user, target, "drilled", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(user, target, "drilled", "[name]", "Combat mode: [user.combat_mode ? "On" : "Off"])(DAMTYPE: [uppertext(damtype)])")
if(target.stat == DEAD && target.getBruteLoss() >= (target.maxHealth * 2))
log_combat(user, target, "gibbed", name)
if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results))
diff --git a/code/modules/vehicles/mecha/equipment/tools/work_tools.dm b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm
index dd8ef9423ef..fe9936ac830 100644
--- a/code/modules/vehicles/mecha/equipment/tools/work_tools.dm
+++ b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm
@@ -37,7 +37,7 @@
. = ..()
cargo_holder = null
-/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(mob/source, atom/target, params)
+/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(mob/living/source, atom/target, params)
if(!action_checks(target))
return
if(!cargo_holder)
@@ -91,7 +91,10 @@
var/mob/living/M = target
if(M.stat == DEAD)
return
- if(source.a_intent == INTENT_HELP)
+
+ var/list/modifiers = params2list(params)
+
+ if(!source.combat_mode)
step_away(M,chassis)
if(killer_clamp)
target.visible_message("[chassis] tosses [target] like a piece of paper!", \
@@ -101,7 +104,7 @@
chassis.visible_message("[chassis] pushes [target] out of the way.", \
"[chassis] pushes you aside.")
return ..()
- else if(source.a_intent == INTENT_DISARM && iscarbon(M))//meme clamp here
+ else if(modifiers && modifiers["right"] && iscarbon(M))//meme clamp here
if(!killer_clamp)
to_chat(source, "You longingly wish to tear [M]'s arms off.")
return
@@ -121,7 +124,7 @@
playsound(src, get_dismember_sound(), 80, TRUE)
target.visible_message("[chassis] rips [target]'s arms off!", \
"[chassis] rips your arms off!")
- log_combat(source, M, "removed both arms with a real clamp,", "[name]", "(INTENT: [uppertext(source.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(source, M, "removed both arms with a real clamp,", "[name]", "(COMBAT MODE: [uppertext(source.combat_mode)] (DAMTYPE: [uppertext(damtype)])")
return ..()
M.take_overall_damage(clamp_damage)
@@ -132,7 +135,7 @@
target.visible_message("[chassis] squeezes [target]!", \
"[chassis] squeezes you!",\
"You hear something crack.")
- log_combat(source, M, "attacked", "[name]", "(INTENT: [uppertext(source.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
+ log_combat(source, M, "attacked", "[name]", "(Combat mode: [source.combat_mode ? "On" : "Off"]) (DAMTYPE: [uppertext(damtype)])")
return ..()
diff --git a/code/modules/vehicles/mecha/mech_melee_attack.dm b/code/modules/vehicles/mecha/mech_melee_attack.dm
index fbbe472a9c2..cdd3d78abac 100644
--- a/code/modules/vehicles/mecha/mech_melee_attack.dm
+++ b/code/modules/vehicles/mecha/mech_melee_attack.dm
@@ -46,8 +46,8 @@
return
return ..()
-/mob/living/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/user)
- if(user.a_intent == INTENT_HARM)
+/mob/living/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/living/user)
+ if(user.combat_mode)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "You don't want to harm other living beings!")
return
@@ -70,7 +70,7 @@
visible_message("[mecha_attacker.name] hits [src]!", \
"[mecha_attacker.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, mecha_attacker)
to_chat(mecha_attacker, "You hit [src]!")
- log_combat(user, src, "attacked", mecha_attacker, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
+ log_combat(user, src, "attacked", mecha_attacker, "(COMBAT MODE: [uppertext(user.combat_mode)]) (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
else
step_away(src, mecha_attacker)
log_combat(user, src, "pushed", mecha_attacker)
@@ -78,8 +78,11 @@
"[mecha_attacker] pushes you out of the way.", "You hear aggressive shuffling!", 5, list(mecha_attacker))
to_chat(mecha_attacker, "You push [src] out of the way.")
-/mob/living/carbon/human/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/user)
- if(user.a_intent == INTENT_HARM)
+/mob/living/carbon/human/mech_melee_attack(obj/vehicle/sealed/mecha/mecha_attacker, mob/living/user)
+ if(!isliving(user))
+ return ..()
+ var/mob/living/attacker = user
+ if(attacker.combat_mode)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "You don't want to harm other living beings!")
return
@@ -112,6 +115,6 @@
visible_message("[mecha_attacker.name] hits [src]!", \
"[mecha_attacker.name] hits you!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, list(mecha_attacker))
to_chat(mecha_attacker, "You hit [src]!")
- log_combat(user, src, "attacked", mecha_attacker, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
+ log_combat(user, src, "attacked", mecha_attacker, "(COMBAT MODE: [uppertext(user.combat_mode)] (DAMTYPE: [uppertext(mecha_attacker.damtype)])")
else
return ..()
diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm
index efbf0292574..164ae41f594 100644
--- a/code/modules/vehicles/mecha/mecha_defense.dm
+++ b/code/modules/vehicles/mecha/mecha_defense.dm
@@ -300,7 +300,7 @@
/obj/vehicle/sealed/mecha/welder_act(mob/living/user, obj/item/W)
. = ..()
- if(user.a_intent == INTENT_HARM)
+ if(user.combat_mode)
return
. = TRUE
if(internal_damage & MECHA_INT_TANK_BREACH)
@@ -328,12 +328,12 @@
target.reagents.add_reagent(/datum/reagent/toxin, force/2.5)
-/obj/vehicle/sealed/mecha/mech_melee_attack(obj/vehicle/sealed/mecha/M, mob/user)
+/obj/vehicle/sealed/mecha/mech_melee_attack(obj/vehicle/sealed/mecha/M, mob/living/user)
if(!has_charge(melee_energy_drain))
return NONE
use_power(melee_energy_drain)
if(M.damtype == BRUTE || M.damtype == BURN)
- log_combat(user, src, "attacked", M, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
+ log_combat(user, src, "attacked", M, "(COMBAT MODE: [uppertext(user.combat_mode)] (DAMTYPE: [uppertext(M.damtype)])")
. = ..()
/obj/vehicle/sealed/mecha/proc/full_repair(charge_cell)
diff --git a/code/modules/vehicles/secway.dm b/code/modules/vehicles/secway.dm
index 65bd9857c07..5c8808c0b8d 100644
--- a/code/modules/vehicles/secway.dm
+++ b/code/modules/vehicles/secway.dm
@@ -28,8 +28,8 @@
smoke.set_up(0, src)
smoke.start()
-/obj/vehicle/ridden/secway/attackby(obj/item/W, mob/user, params)
- if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
+/obj/vehicle/ridden/secway/attackby(obj/item/W, mob/living/user, params)
+ if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode)
if(obj_integrity < max_integrity)
if(W.use_tool(src, user, 0, volume = 50, amount = 1))
user.visible_message("[user] repairs some damage to [name].", "You repair some damage to \the [src].")
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index 404eacb89b5..efb7944ad7c 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -435,7 +435,7 @@ GLOBAL_LIST_EMPTY(vending_products)
to_chat(user, "You must first secure [src].")
return TRUE
-/obj/machinery/vending/attackby(obj/item/I, mob/user, params)
+/obj/machinery/vending/attackby(obj/item/I, mob/living/user, params)
if(panel_open && is_wire_tool(I))
wires.interact(user)
return
@@ -458,7 +458,7 @@ GLOBAL_LIST_EMPTY(vending_products)
else
to_chat(user, "There's nothing to restock!")
return
- if(compartmentLoadAccessCheck(user) && user.a_intent != INTENT_HARM)
+ if(compartmentLoadAccessCheck(user) && !user.combat_mode)
if(canLoadItem(I))
loadingAttempt(I,user)
updateUsrDialog() //can't put this on the proc above because we spam it below
diff --git a/icons/hud/screen_alien.dmi b/icons/hud/screen_alien.dmi
index 0a2c525b998..307c41075ef 100644
Binary files a/icons/hud/screen_alien.dmi and b/icons/hud/screen_alien.dmi differ
diff --git a/icons/hud/screen_clockwork.dmi b/icons/hud/screen_clockwork.dmi
index aae63f92d54..896bf43b662 100644
Binary files a/icons/hud/screen_clockwork.dmi and b/icons/hud/screen_clockwork.dmi differ
diff --git a/icons/hud/screen_cyborg.dmi b/icons/hud/screen_cyborg.dmi
index 04de1b140ea..dd288e6950a 100644
Binary files a/icons/hud/screen_cyborg.dmi and b/icons/hud/screen_cyborg.dmi differ
diff --git a/icons/hud/screen_gen.dmi b/icons/hud/screen_gen.dmi
index 5fdfbdaceef..59eb7c39780 100644
Binary files a/icons/hud/screen_gen.dmi and b/icons/hud/screen_gen.dmi differ
diff --git a/icons/hud/screen_glass.dmi b/icons/hud/screen_glass.dmi
index 6a306f80fc6..2012716ba89 100644
Binary files a/icons/hud/screen_glass.dmi and b/icons/hud/screen_glass.dmi differ
diff --git a/icons/hud/screen_midnight.dmi b/icons/hud/screen_midnight.dmi
index 37d76643718..605b845efc2 100644
Binary files a/icons/hud/screen_midnight.dmi and b/icons/hud/screen_midnight.dmi differ
diff --git a/icons/hud/screen_operative.dmi b/icons/hud/screen_operative.dmi
index a55bed3c75a..88fcb5b98ea 100644
Binary files a/icons/hud/screen_operative.dmi and b/icons/hud/screen_operative.dmi differ
diff --git a/icons/hud/screen_plasmafire.dmi b/icons/hud/screen_plasmafire.dmi
index 7cd72b6a634..61a99bab974 100644
Binary files a/icons/hud/screen_plasmafire.dmi and b/icons/hud/screen_plasmafire.dmi differ
diff --git a/icons/hud/screen_retro.dmi b/icons/hud/screen_retro.dmi
index 6bd82f31efe..d3574b8824f 100644
Binary files a/icons/hud/screen_retro.dmi and b/icons/hud/screen_retro.dmi differ
diff --git a/icons/hud/screen_slimecore.dmi b/icons/hud/screen_slimecore.dmi
index b73b5248515..96185ed3cf6 100644
Binary files a/icons/hud/screen_slimecore.dmi and b/icons/hud/screen_slimecore.dmi differ
diff --git a/icons/obj/economy.dmi b/icons/obj/economy.dmi
index b0eaa8c0e23..f2f32eb580c 100644
Binary files a/icons/obj/economy.dmi and b/icons/obj/economy.dmi differ
diff --git a/interface/skin.dmf b/interface/skin.dmf
index 653d2ed7f5d..31f94eb0662 100644
--- a/interface/skin.dmf
+++ b/interface/skin.dmf
@@ -1,4 +1,12 @@
macro "default"
+ elem ".winset :map.right-click=false"
+ name = "SHIFT+Shift"
+ elem "Shift"
+ name = "SHIFT"
+ command = ".winset :map.right-click=false"
+ elem "ShiftUp"
+ name = "SHIFT+UP"
+ command = ".winset :map.right-click=true"
menu "menu"
@@ -50,21 +58,25 @@ menu "menu"
window "mainwindow"
elem "mainwindow"
type = MAIN
- pos = 0,0
+ pos = 281,0
size = 640x440
anchor1 = none
anchor2 = none
+ background-color = none
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
icon = 'icons\\tg_32.png'
macro = "default"
menu = "menu"
+ outer-size = 656x518
+ inner-size = 640x459
elem "split"
type = CHILD
pos = 3,0
size = 634x417
anchor1 = 0,0
anchor2 = 100,100
+ background-color = none
saved-params = "splitter"
left = "mapwindow"
right = "infowindow"
@@ -85,6 +97,7 @@ window "mainwindow"
size = 40x20
anchor1 = 100,100
anchor2 = none
+ background-color = none
saved-params = "is-checked"
text = "Chat"
command = ".winset \"saybutton.is-checked=true ? input.command=\"!say \\\"\" : input.command=\"\"saybutton.is-checked=true ? mebutton.is-checked=false\"\"saybutton.is-checked=true ? oocbutton.is-checked=false\""
@@ -95,6 +108,7 @@ window "mainwindow"
size = 40x20
anchor1 = 100,100
anchor2 = none
+ background-color = none
saved-params = "is-checked"
text = "OOC"
command = ".winset \"oocbutton.is-checked=true ? input.command=\"!ooc \\\"\" : input.command=\"\"oocbutton.is-checked=true ? mebutton.is-checked=false\"\"oocbutton.is-checked=true ? saybutton.is-checked=false\""
@@ -105,6 +119,7 @@ window "mainwindow"
size = 40x20
anchor1 = 100,100
anchor2 = none
+ background-color = none
saved-params = "is-checked"
text = "Me"
command = ".winset \"mebutton.is-checked=true ? input.command=\"!me \\\"\" : input.command=\"\"mebutton.is-checked=true ? saybutton.is-checked=false\"\"mebutton.is-checked=true ? oocbutton.is-checked=false\""
@@ -115,6 +130,7 @@ window "mainwindow"
size = 200x200
anchor1 = none
anchor2 = none
+ background-color = none
is-visible = false
saved-params = ""
elem "tooltip"
@@ -123,18 +139,22 @@ window "mainwindow"
size = 999x999
anchor1 = none
anchor2 = none
+ background-color = none
is-visible = false
saved-params = ""
window "mapwindow"
elem "mapwindow"
type = MAIN
- pos = 0,0
+ pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
+ background-color = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
+ outer-size = 656x538
+ inner-size = 640x499
elem "map"
type = MAP
pos = 0,0
@@ -143,26 +163,30 @@ window "mapwindow"
anchor2 = 100,100
font-family = "Arial"
font-size = 7
- text-color = none
is-default = true
+ right-click = true
saved-params = "zoom;letterbox;zoom-mode"
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
window "infowindow"
elem "infowindow"
type = MAIN
- pos = 0,0
+ pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
+ background-color = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
+ outer-size = 656x538
+ inner-size = 640x499
elem "info"
type = CHILD
pos = 0,30
size = 640x445
anchor1 = 0,0
anchor2 = 100,100
+ background-color = none
saved-params = "splitter"
left = "statwindow"
right = "outputwindow"
@@ -173,6 +197,7 @@ window "infowindow"
size = 104x20
anchor1 = 3,0
anchor2 = 19,0
+ background-color = none
saved-params = "is-checked"
text = "Changelog"
command = "changelog"
@@ -182,6 +207,7 @@ window "infowindow"
size = 100x20
anchor1 = 19,0
anchor2 = 34,0
+ background-color = none
saved-params = "is-checked"
text = "Rules"
command = "rules"
@@ -191,6 +217,7 @@ window "infowindow"
size = 100x20
anchor1 = 34,0
anchor2 = 50,0
+ background-color = none
saved-params = "is-checked"
text = "Wiki"
command = "wiki"
@@ -200,6 +227,7 @@ window "infowindow"
size = 100x20
anchor1 = 50,0
anchor2 = 66,0
+ background-color = none
saved-params = "is-checked"
text = "Forum"
command = "forum"
@@ -209,6 +237,7 @@ window "infowindow"
size = 100x20
anchor1 = 66,0
anchor2 = 81,0
+ background-color = none
saved-params = "is-checked"
text = "Github"
command = "github"
@@ -218,6 +247,7 @@ window "infowindow"
size = 100x20
anchor1 = 81,0
anchor2 = 97,0
+ background-color = none
saved-params = "is-checked"
text = "Report Issue"
command = "report-issue"
@@ -225,12 +255,15 @@ window "infowindow"
window "outputwindow"
elem "outputwindow"
type = MAIN
- pos = 0,0
+ pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
+ background-color = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
+ outer-size = 656x538
+ inner-size = 640x499
elem "browseroutput"
type = BROWSER
pos = 0,0
@@ -257,10 +290,13 @@ window "popupwindow"
size = 120x120
anchor1 = none
anchor2 = none
+ background-color = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
can-resize = false
+ outer-size = 136x159
+ inner-size = 120x120
window "preferences_window"
elem "preferences_window"
@@ -291,18 +327,22 @@ window "preferences_window"
window "statwindow"
elem "statwindow"
type = MAIN
- pos = 372,0
+ pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
+ background-color = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
+ outer-size = 656x538
+ inner-size = 640x499
elem "statbrowser"
type = BROWSER
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
+ background-color = none
is-visible = false
saved-params = ""
diff --git a/sound/misc/ui_togglecombat.ogg b/sound/misc/ui_togglecombat.ogg
new file mode 100644
index 00000000000..7336b9cf0e1
Binary files /dev/null and b/sound/misc/ui_togglecombat.ogg differ
diff --git a/sound/misc/ui_toggleoffcombat.ogg b/sound/misc/ui_toggleoffcombat.ogg
new file mode 100644
index 00000000000..98df1726e98
Binary files /dev/null and b/sound/misc/ui_toggleoffcombat.ogg differ
diff --git a/tgstation.dme b/tgstation.dme
index 147e5a2431b..042d46d3a6f 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2063,9 +2063,9 @@
#include "code\modules\holiday\holidays.dm"
#include "code\modules\holiday\nth_week.dm"
#include "code\modules\holodeck\area_copy.dm"
-#include "code\modules\holodeck\holodeck_map_templates.dm"
#include "code\modules\holodeck\computer.dm"
#include "code\modules\holodeck\holo_effect.dm"
+#include "code\modules\holodeck\holodeck_map_templates.dm"
#include "code\modules\holodeck\items.dm"
#include "code\modules\holodeck\mobs.dm"
#include "code\modules\holodeck\turfs.dm"