diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 1b0f0854c78..9b41f549b80 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -24,6 +24,7 @@ CONTENTS:
name = "generic abductor item"
icon = 'icons/obj/abductor.dmi'
desc = ABSTRACT_TYPE_DESC
+ new_attack_chain = TRUE
/obj/item/abductor/proc/AbductorCheck(user)
if(isabductor(user))
@@ -193,17 +194,25 @@ CONTENTS:
icon_state = "silencer"
origin_tech = "materials=4;programming=7;abductor=3"
-/obj/item/abductor/silencer/attack__legacy__attackchain(mob/living/M, mob/user)
+/obj/item/abductor/silencer/interact_with_atom(atom/target, mob/living/user, list/modifiers)
if(!AbductorCheck(user))
- return
- radio_off(M, user)
+ return NONE
+
+ if(!ismob(target))
+ return NONE
-/obj/item/abductor/silencer/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params)
- if(flag)
- return
- if(!AbductorCheck(user))
- return
radio_off(target, user)
+ return ITEM_INTERACT_COMPLETE
+
+/obj/item/abductor/silencer/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(!AbductorCheck(user))
+ return NONE
+
+ if(!ismob(target))
+ return NONE
+
+ radio_off(target, user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/abductor/silencer/proc/radio_off(atom/target, mob/living/user)
if(!(user in (viewers(7, target))))
@@ -250,9 +259,10 @@ CONTENTS:
origin_tech = "materials=4;combat=4;biotech=7;abductor=4"
actions_types = list(/datum/action/item_action/toggle_mode)
var/mode = BATON_STUN
+ new_attack_chain = TRUE
/obj/item/abductor_baton/proc/toggle(mob/living/user = usr)
- mode = (mode+1)%BATON_MODES
+ mode = (mode + 1) % BATON_MODES
var/txt
switch(mode)
if(BATON_STUN)
@@ -279,39 +289,45 @@ CONTENTS:
if(BATON_PROBE)
icon_state = "wonderprodProbe"
-/obj/item/abductor_baton/attack__legacy__attackchain(mob/target, mob/living/user)
- if(!isabductor(user))
- return
+/obj/item/abductor_baton/pre_attack(atom/target, mob/living/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(!isabductor(user))
+ return FINISH_ATTACK
if(!isliving(target))
- return
+ return FINISH_ATTACK
- var/mob/living/L = target
+/obj/item/abductor_baton/attack(mob/living/target, mob/living/carbon/human/user)
+ if(!ismob(target))
+ return ..()
- user.do_attack_animation(L)
+ user.do_attack_animation(target)
- if(isrobot(L))
- L.apply_damage(80, STAMINA) //Force a reboot on two hits for consistency.
- return
+ if(isrobot(target))
+ target.apply_damage(80, STAMINA) // Force a reboot on two hits for consistency.
+ return FINISH_ATTACK
- if(ishuman(L))
- var/mob/living/carbon/human/H = L
- if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
- playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
- return 0
+ if(ishuman(target))
+ var/mob/living/carbon/human/human_target = target
+ if(human_target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
+ playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
+ return NONE
switch(mode)
if(BATON_STUN)
- StunAttack(L,user)
+ StunAttack(target, user)
if(BATON_SLEEP)
- SleepAttack(L,user)
+ SleepAttack(target, user)
if(BATON_CUFF)
- CuffAttack(L,user)
+ CuffAttack(target, user)
if(BATON_PROBE)
- ProbeAttack(L,user)
+ ProbeAttack(target, user)
-/obj/item/abductor_baton/attack_self__legacy__attackchain(mob/living/user)
+/obj/item/abductor_baton/activate_self(mob/living/user)
+ if(!user)
+ return ..()
toggle(user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -325,8 +341,10 @@ CONTENTS:
L.apply_damage(80, STAMINA)
L.Stuttering(14 SECONDS)
- L.visible_message(SPAN_DANGER("[user] has stunned [L] with [src]!"), \
- SPAN_USERDANGER("[user] has stunned you with [src]!"))
+ L.visible_message(
+ SPAN_DANGER("[user] has stunned [L] with [src]!"),
+ SPAN_USERDANGER("[user] has stunned you with [src]!")
+ )
playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
add_attack_logs(user, L, "Stunned with [src]")
@@ -338,12 +356,16 @@ CONTENTS:
if((C.getStaminaLoss() < 100) && !C.IsSleeping())
C.AdjustDrowsy(2 SECONDS)
to_chat(user, SPAN_WARNING("Sleep inducement works fully only on stunned or asleep specimens!"))
- C.visible_message(SPAN_DANGER("[user] tried to induce sleep in [L] with [src]!"), \
- SPAN_USERDANGER("You suddenly feel drowsy!"))
+ C.visible_message(
+ SPAN_DANGER("[user] tried to induce sleep in [L] with [src]!"),
+ SPAN_USERDANGER("You suddenly feel drowsy!")
+ )
return
if(do_mob(user, C, 2.5 SECONDS))
- C.visible_message(SPAN_DANGER("[user] has induced sleep in [L] with [src]!"), \
- SPAN_USERDANGER("You suddenly feel very drowsy!"))
+ C.visible_message(
+ SPAN_DANGER("[user] has induced sleep in [L] with [src]!"),
+ SPAN_USERDANGER("You suddenly feel very drowsy!")
+ )
playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
C.Sleeping(120 SECONDS)
add_attack_logs(user, C, "Put to sleep with [src]")
@@ -354,8 +376,10 @@ CONTENTS:
var/mob/living/carbon/C = L
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, TRUE, -2)
- C.visible_message(SPAN_DANGER("[user] begins restraining [C] with [src]!"), \
- SPAN_USERDANGER("[user] begins shaping an energy field around your hands!"))
+ C.visible_message(
+ SPAN_DANGER("[user] begins restraining [C] with [src]!"),
+ SPAN_USERDANGER("[user] begins shaping an energy field around your hands!")
+ )
if(do_mob(user, C, 3 SECONDS))
if(!C.handcuffed)
C.handcuffed = new /obj/item/restraints/handcuffs/energy(C)
@@ -374,7 +398,7 @@ CONTENTS:
if(ishuman(L))
var/mob/living/carbon/human/H = L
- species = "[H.dna.species.name]"
+ species = SPAN_NOTICE("[H.dna.species.name]")
if(IS_CHANGELING(L))
species = SPAN_WARNING("Changeling lifeform")
var/obj/item/organ/internal/heart/gland/temp = locate() in H.internal_organs
@@ -443,12 +467,12 @@ CONTENTS:
var/mob/living/marked = null
var/obj/machinery/abductor/console/console
-/obj/item/abductor/gizmo/attack_self__legacy__attackchain(mob/user)
+/obj/item/abductor/gizmo/activate_self(mob/user)
if(!ScientistCheck(user))
- return
+ return ..()
if(!console)
to_chat(user, SPAN_WARNING("The device is not linked to a console!"))
- return
+ return ITEM_INTERACT_COMPLETE
if(mode == GIZMO_SCAN)
mode = GIZMO_MARK
@@ -458,33 +482,41 @@ CONTENTS:
icon_state = "gizmo_scan"
to_chat(user, SPAN_NOTICE("You switch the device to [mode==GIZMO_SCAN? "SCAN": "MARK"] MODE"))
-/obj/item/abductor/gizmo/attack__legacy__attackchain(mob/living/M, mob/user)
+/obj/item/abductor/gizmo/interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(!ismob(target))
+ return NONE
+
if(!ScientistCheck(user))
- return
+ return ITEM_INTERACT_COMPLETE
+
if(!console)
to_chat(user, SPAN_WARNING("The device is not linked to console!"))
- return
-
- switch(mode)
- if(GIZMO_SCAN)
- scan(M, user)
- if(GIZMO_MARK)
- mark(M, user)
-
-/obj/item/abductor/gizmo/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params)
- if(flag)
- return
- if(!ScientistCheck(user))
- return
- if(!console)
- to_chat(user, SPAN_WARNING("The device is not linked to console!"))
- return
+ return ITEM_INTERACT_COMPLETE
switch(mode)
if(GIZMO_SCAN)
scan(target, user)
if(GIZMO_MARK)
mark(target, user)
+ return ITEM_INTERACT_COMPLETE
+
+/obj/item/abductor/gizmo/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(!ismob(target))
+ return NONE
+
+ if(!ScientistCheck(user))
+ return ITEM_INTERACT_COMPLETE
+
+ if(!console)
+ to_chat(user, SPAN_WARNING("The device is not linked to console!"))
+ return ITEM_INTERACT_COMPLETE
+
+ switch(mode)
+ if(GIZMO_SCAN)
+ scan(target, user)
+ if(GIZMO_MARK)
+ mark(target, user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/abductor/gizmo/proc/scan(atom/target, mob/living/user)
if(ishuman(target))
@@ -505,7 +537,7 @@ CONTENTS:
prepare(target,user)
/obj/item/abductor/gizmo/proc/prepare(atom/target, mob/living/user)
- if(get_dist(target,user)>1)
+ if(get_dist(target,user) > 1)
to_chat(user, SPAN_WARNING("You need to be next to the specimen to prepare it for transport!"))
return
to_chat(user, SPAN_NOTICE("You begin preparing [target] for transport..."))
@@ -525,7 +557,10 @@ CONTENTS:
inhand_icon_state = "silencer"
var/mode = MIND_DEVICE_MESSAGE
-/obj/item/abductor/mind_device/attack_self__legacy__attackchain(mob/user)
+/obj/item/abductor/mind_device/activate_self(mob/user)
+ if(..())
+ return ITEM_INTERACT_COMPLETE
+
if(!ScientistCheck(user))
return
@@ -537,15 +572,19 @@ CONTENTS:
icon_state = "mind_device_message"
to_chat(user, SPAN_NOTICE("You switch the device to [mode == MIND_DEVICE_MESSAGE ? "TRANSMISSION" : "COMMAND"] MODE"))
-/obj/item/abductor/mind_device/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params)
+/obj/item/abductor/mind_device/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(!ismob(target))
+ return NONE
+
if(!ScientistCheck(user))
- return
+ return ITEM_INTERACT_COMPLETE
switch(mode)
if(MIND_DEVICE_CONTROL)
mind_control(target, user)
if(MIND_DEVICE_MESSAGE)
mind_message(target, user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/abductor/mind_device/proc/mind_control(atom/target, mob/living/user)
if(iscarbon(target))
@@ -583,7 +622,7 @@ CONTENTS:
if(QDELETED(L) || L.stat == DEAD)
return
- to_chat(L, SPAN_ITALICS("You hear a voice in your head saying: [message]"))
+ to_chat(L, "[SPAN_ITALICS("You hear a voice in your head saying:")] [SPAN_ABDUCTOR(message)]")
to_chat(user, SPAN_NOTICE("You send the message to your target."))
log_say("[key_name(user)] sent an abductor mind message to [key_name(L)]: '[message]'", user)