diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e110a110584e3..20ca21d4a9005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,7 @@ jobs: python tools/ci/no_duplicate_definitions.py python -m tools.ci.check_icon_conflicts python -m tools.ci.check_icon_dupenames + python -m tools.ci.check_legacy_attack_chain python -m tools.maplint.source --github - name: Run DreamChecker @@ -95,7 +96,14 @@ jobs: strategy: fail-fast: false # Let all map tests run to completion matrix: - maptype: ['/datum/map/boxstation', '/datum/map/deltastation', '/datum/map/metastation', '/datum/map/cerestation', '/datum/map/emeraldstation'] + maptype: + [ + '/datum/map/boxstation', + '/datum/map/deltastation', + '/datum/map/metastation', + '/datum/map/cerestation', + '/datum/map/emeraldstation', + ] byondtype: ['STABLE'] services: mariadb: diff --git a/.github/workflows/devdocs.yml b/.github/workflows/devdocs.yml index 7819a3690e24f..4baa9e38f51aa 100644 --- a/.github/workflows/devdocs.yml +++ b/.github/workflows/devdocs.yml @@ -15,7 +15,7 @@ jobs: - name: Build docs run: | - python -m pip install mkdocs==1.6.0 mkdocs-material[imaging]==9.5.31 mkdocs-github-admonitions-plugin==0.0.2 + python -m pip install mkdocs==1.6.0 mkdocs-material[imaging]==9.5.31 mkdocs-github-admonitions-plugin==0.0.2 mkdocs-glightbox==0.4.0 python -m mkdocs build - name: Deploy docs diff --git a/code/__DEFINES/dcs/atom_signals.dm b/code/__DEFINES/dcs/atom_signals.dm index 9c358c6854f8e..d1dbbf2ee1ab7 100644 --- a/code/__DEFINES/dcs/atom_signals.dm +++ b/code/__DEFINES/dcs/atom_signals.dm @@ -8,10 +8,6 @@ // from SSatoms InitAtom - Only if the atom was not deleted or failed initialization #define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success" -///from base of atom/attackby(): (/obj/item, /mob/living, params) -#define COMSIG_PARENT_ATTACKBY "atom_attackby" -///Return this in response if you don't want afterattack to be called - #define COMPONENT_NO_AFTERATTACK (1<<0) ///from base of atom/attack_hulk(): (/mob/living/carbon/human) #define COMSIG_ATOM_HULK_ATTACK "hulk_attack" ///from base of atom/examine(): (examining_user, examine_list) @@ -99,13 +95,6 @@ #define ATOM_PREHIT_SUCCESS (1<<0) #define ATOM_PREHIT_FAILURE (1<<1) -// Attack signals. These should share the returned flags, to standardize the attack chain. -// The chain currently works like: -// tool_act -> pre_attack -> target.attackby (item.attack) -> afterattack -// You can use these signal responses to cancel the attack chain at a certain point from most attack signal types. - /// This response cancels the attack chain entirely. If sent early, it might cause some later effects to be skipped. - #define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0) - /// Called from atom/Initialize() of target: (atom/target) #define COMSIG_ATOM_INITIALIZED_ON "atom_initialized_on" diff --git a/code/__DEFINES/dcs/attack_chain_signals.dm b/code/__DEFINES/dcs/attack_chain_signals.dm new file mode 100644 index 0000000000000..f0d6f716b0953 --- /dev/null +++ b/code/__DEFINES/dcs/attack_chain_signals.dm @@ -0,0 +1,67 @@ +// MARK: Item Interactions + +// Return values for non-attack interactions. +#define ITEM_INTERACT_SUCCESS (1<<0) //! Cancel the rest of the attack chain, indicating success. +#define ITEM_INTERACT_BLOCKING (1<<1) //! Cancel the rest of the attack chain, without indicating success. +#define ITEM_INTERACT_SKIP_TO_ATTACK (1<<2) //! Skip the rest of the interaction chain, going straight to the attack phase. + +/// Combination return value for any item interaction that cancels the rest of the attack chain. +#define ITEM_INTERACT_ANY_BLOCKER (ITEM_INTERACT_SUCCESS | ITEM_INTERACT_BLOCKING) + +/// Sent when this atom is clicked on by a mob with an item. +/// +/// [/atom/proc/item_interaction] -> mob/living/user, obj/item/tool, list/modifiers +#define COMSIG_INTERACT_TARGET "interact_target" + +/// Sent to a mob clicking on an atom with an item. +/// +/// [/atom/proc/item_interaction] -> atom/target, obj/item/tool, list/modifiers +#define COMSIG_INTERACT_USER "interact_user" + +/// Sent to an item clicking on an atom. +/// +/// [/atom/proc/item_interaction] -> mob/living/user, atom/target, list/modifiers +#define COMSIG_INTERACTING "interacting" + +#define COMSIG_INTERACT_RANGED "interact_ranged" //! [/atom/proc/ranged_item_interaction] +#define COMSIG_INTERACTING_RANGED "interacting_ranged" //! [/atom/proc/ranged_item_interaction] + +#define COMSIG_ACTIVATE_SELF "activate_self" //! [/obj/item/proc/activate_self] -> mob/user + +// Attack signals. These should share the returned flags, to standardize the attack chain. +// The chain currently works like: +// tool_act -> pre_attack -> target.attackby (item.attack) -> afterattack +// You can use these signal responses to cancel the attack chain at a certain point from most attack signal types. + +// MARK: Attack Chain + +// Signal interceptors for short-circuiting parts of the attack chain. + +#define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0) //! Cancel the attack chain entirely. +#define COMPONENT_SKIP_ATTACK (1<<1) //! Skip this attack step, continuing for the next one to happen. +#define COMPONENT_SKIP_AFTERATTACK (1<<2) //! Skip after_attacks (while allowing for e.g. attack_by). + +#define COMSIG_PRE_ATTACK "pre_attack" //! [/obj/item/proc/pre_attack] -> atom/target, mob/user, params + +#define COMSIG_ATTACK "attack" //! [/obj/item/proc/attack] -> mob/living/target, mob/living/user +#define COMSIG_ATTACK_OBJ "attack_obj" //! [/obj/item/proc/attack_obj] -> obj/attacked, mob/user +#define COMSIG_ATTACK_OBJ_LIVING "attack_obj_living" //! [/obj/item/proc/attack_obj] -> obj/attacked +#define COMSIG_ATTACK_BY "attack_by" //! [/atom/proc/attackby] -> obj/item/weapon, mob/living/user, params + +#define COMSIG_AFTER_ATTACK "item_after_attack" //! [/obj/item/proc/afterattack] -> atom/target, mob/user, params +#define COMSIG_AFTER_ATTACKED_BY "after_attacked_by" //! [/obj/item/proc/afterattack] -> obj/item/weapon, mob/user, proximity_flag, params + +// Return values for directing the control of the attack chain. Distinct from +// signal interceptors because they're not meant to be combined, and to mesh better with +// historical use of return values in attack chain procs. + +#define CONTINUE_ATTACK 0 //! Continue the attack chain, i.e. allow other signals to respond. +#define FINISH_ATTACK 1 //! Do not continue the attack chain. + +// Legacy-only, do not use in new code + +#define COMSIG_TOOL_ATTACK "tool_attack" //! [/obj/item/proc/tool_attack_chain] -> atom/tool, mob/user +#define COMPONENT_NO_ATTACK (1<<0) +#define COMPONENT_NO_INTERACT (1<<0) +#define COMPONENT_NO_ATTACK_OBJ (1<<0) +#define COMPONENT_CANCEL_TOOLACT (1<<0) diff --git a/code/__DEFINES/dcs/item_signals.dm b/code/__DEFINES/dcs/item_signals.dm index 475c33a538c45..922682352c742 100644 --- a/code/__DEFINES/dcs/item_signals.dm +++ b/code/__DEFINES/dcs/item_signals.dm @@ -6,21 +6,7 @@ // /obj/item -///from base of obj/item/attack(): (/mob/living/target, /mob/living/user) -#define COMSIG_ITEM_ATTACK "item_attack" -///from base of obj/item/attack_self(): (/mob) -#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" - #define COMPONENT_NO_INTERACT (1<<0) -///from base of obj/item/attack_obj(): (/obj, /mob) -#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" - #define COMPONENT_NO_ATTACK_OBJ (1<<0) -///from base of obj/item/pre_attack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" - #define COMPONENT_NO_ATTACK (1<<0) -///from base of obj/item/pre_attack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_BEING_ATTACKED "item_being_attacked" -///from base of obj/item/afterattack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_AFTERATTACK "item_afterattack" + ///called on [/obj/item] before unequip from base of [/mob/proc/unEquip]: (force, atom/newloc, no_move, invdrop, silent) #define COMSIG_ITEM_PRE_UNEQUIP "item_pre_unequip" ///only the pre unequip can be cancelled @@ -41,9 +27,6 @@ #define COMPONENT_BLOCK_SHARPEN_BLOCKED (1<<1) #define COMPONENT_BLOCK_SHARPEN_ALREADY (1<<2) #define COMPONENT_BLOCK_SHARPEN_MAXED (1<<3) -///from base of [/obj/item/proc/tool_attack_chain]: (atom/tool, mob/user) -#define COMSIG_TOOL_ATTACK "tool_attack" - #define COMPONENT_CANCEL_TOOLACT (1<<0) /// Called by [/obj/item/assembly/proc/pulse] #define COMSIG_ASSEMBLY_PULSED "item_assembly_pulsed" ///from [/mob/living/carbon/human/proc/Move]: () @@ -129,7 +112,7 @@ // other items -/// from base of /obj/item/slimepotion/speed/afterattack(): (obj/target, /obj/src, mob/user) +/// from base of /obj/item/slimepotion/speed/afterattack__legacy__attackchain(): (obj/target, /obj/src, mob/user) #define COMSIG_SPEED_POTION_APPLIED "speed_potion" #define SPEED_POTION_STOP (1<<0) diff --git a/code/__DEFINES/dcs/mob_signals.dm b/code/__DEFINES/dcs/mob_signals.dm index 2922c06f9f9a9..3d0406f583ead 100644 --- a/code/__DEFINES/dcs/mob_signals.dm +++ b/code/__DEFINES/dcs/mob_signals.dm @@ -36,7 +36,7 @@ #define COMPONENT_ITEM_NO_ATTACK (1<<0) ///from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone) #define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage" -///from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters) +///from base of obj/item/afterattack__legacy__attackchain(): (atom/target, mob/user, proximity_flag, click_parameters) #define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" ///from base of mob/RangedAttack(): (atom/A, params) #define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 0c1bda08b3ae4..c108b54e38cf5 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -44,7 +44,7 @@ The most common are: * mob/UnarmedAttack(atom,adjacent) - used here only when adjacent, with no item in hand; in the case of humans, checks gloves * atom/attackby(item,user) - used only when adjacent - * item/afterattack(atom,user,adjacent,params) - used both ranged and adjacent + * item/afterattack__legacy__attackchain(atom,user,adjacent,params) - used both ranged and adjacent * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ /mob/proc/ClickOn(atom/A, params) @@ -123,7 +123,10 @@ var/obj/item/W = get_active_hand() if(W == A) - W.attack_self(src) + if(W.new_attack_chain) + W.activate_self(src) + else + W.attack_self__legacy__attackchain(src) if(hand) update_inv_l_hand() else @@ -150,10 +153,12 @@ if(ismob(A)) changeNext_move(CLICK_CD_MELEE) UnarmedAttack(A, 1) - else if(W) - W.afterattack(A, src, 0, params) // 0: not Adjacent + if(W.new_attack_chain) + A.base_ranged_item_interaction(src, W, params) + else + W.afterattack__legacy__attackchain(A, src, 0, params) // 0: not Adjacent else RangedAttack(A, params) diff --git a/code/_onclick/click_override.dm b/code/_onclick/click_override.dm index 36674ed70987c..c59506c654e1a 100644 --- a/code/_onclick/click_override.dm +++ b/code/_onclick/click_override.dm @@ -25,7 +25,7 @@ icon_state = "book" var/datum/middle_click_override/clickBehavior = new /datum/middle_click_override/badmin_clicker -/obj/item/badmin_book/attack_self(mob/living/user as mob) +/obj/item/badmin_book/attack_self__legacy__attackchain(mob/living/user as mob) if(user.middleClickOverride) to_chat(user, "You try to draw power from [src], but you cannot hold the power at this time!") return diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 39e0b5138ab22..7e5da141d5a10 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -83,7 +83,11 @@ return if(W == A) - W.attack_self(src) + if(W.new_attack_chain) + W.activate_self(src) + else + W.attack_self__legacy__attackchain(src) + return // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) @@ -98,7 +102,7 @@ if(can_reach(A, W)) W.melee_attack_chain(src, A, params) return - W.afterattack(A, src, 0, params) + W.afterattack__legacy__attackchain(A, src, 0, params) return /mob/living/silicon/robot/MiddleShiftControlClickOn(atom/A) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 4b0dbab47b08f..16a7a09b9ba9f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -76,7 +76,7 @@ /atom/movable/screen/grab/attack_hand() return -/atom/movable/screen/grab/attackby() +/atom/movable/screen/grab/attackby__legacy__attackchain() return /atom/movable/screen/act_intent name = "intent" @@ -170,7 +170,7 @@ if(master) var/obj/item/I = usr.get_active_hand() if(I) - master.attackby(I, usr, params) + master.attackby__legacy__attackchain(I, usr, params) return TRUE /atom/movable/screen/storage/proc/is_item_accessible(obj/item/I, mob/user) @@ -226,7 +226,7 @@ S.orient2hud(user) S.show_to(user) else // If it's not in the storage, try putting it inside - S.attackby(I, user) + S.attackby__legacy__attackchain(I, user) return TRUE /atom/movable/screen/zone_sel diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 02b314ad6140c..94836bb8663e6 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -1,35 +1,71 @@ -/obj/item/proc/melee_attack_chain(mob/user, atom/target, params) - if(!tool_attack_chain(user, target) && pre_attack(target, user, params)) - // Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example) - var/resolved = target.attackby(src, user, params) - if(!resolved && target && !QDELETED(src)) - afterattack(target, user, 1, params) // 1: clicking something Adjacent - -//Checks if the item can work as a tool, calling the appropriate tool behavior on the target -//Note that if tool_act returns TRUE, then the tool won't call attack_by. -/obj/item/proc/tool_attack_chain(mob/user, atom/target) - if(!tool_behaviour) - return FALSE - if(SEND_SIGNAL(target, COMSIG_TOOL_ATTACK, src, user) & COMPONENT_CANCEL_TOOLACT) - return FALSE +/** + * This is the proc that handles the order of an item_attack. + * + * The order of procs called is: + * * [/atom/proc/base_item_interaction] on the target. If it returns ITEM_INTERACT_SUCCESS or ITEM_INTERACT_BLOCKING, the chain will be stopped. + * * [/obj/item/proc/pre_attack] on `src`. If this returns FINISH_ATTACK, the chain will be stopped. + * * [/atom/proc/attack_by] on the target. If it returns FINISH_ATTACK, the chain will be stopped. + * * [/obj/item/proc/after_attack]. The return value does not matter. + * + * Currently the return value of this proc is not checked anywhere, and is only used when short-circuiting the rest of the item attack. + */ +/obj/item/proc/melee_attack_chain(mob/user, atom/target, params, proximity_flag = 1) + // TODO: Look into whether proxy attackers are worth porting from /tg/: https://github.com/tgstation/tgstation/pull/83860 + var/list/modifiers = params2list(params) + + var/item_interact_result = target.base_item_interaction(user, src, modifiers) + if(item_interact_result & ITEM_INTERACT_SUCCESS) + return + if(item_interact_result & ITEM_INTERACT_BLOCKING) + return - return target.tool_act(user, src, tool_behaviour) + // Attack phase -// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown. -/obj/item/proc/attack_self(mob/user) - var/signal_ret = SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) - if(signal_ret & COMPONENT_NO_INTERACT) + if(pre_attack(target, user, params)) return - if(signal_ret & COMPONENT_CANCEL_ATTACK_CHAIN) - return TRUE -/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby! - if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_CANCEL_ATTACK_CHAIN) - return TRUE + var/resolved = target.new_attack_chain \ + ? target.attack_by(src, user, params) \ + : target.attackby__legacy__attackchain(src, user, params) + + // We were asked to cancel the rest of the attack chain. + if(resolved) + return + + // At this point it means the attack was "successful", or at least + // handled, in some way. This can mean nothing happened, this can mean the + // target took damage, etc. + if(target.new_attack_chain) + target.attacked_by(src, user) + after_attack(target, user, proximity_flag, params) + else + afterattack__legacy__attackchain(target, user, proximity_flag, params) - if(SEND_SIGNAL(A, COMSIG_ITEM_BEING_ATTACKED, src, user, params) & COMPONENT_CANCEL_ATTACK_CHAIN) +/// Called when the item is in the active hand, and clicked; alternately, there +/// is an 'activate held object' verb or you can hit pagedown. +/obj/item/proc/activate_self(mob/user) + SHOULD_CALL_PARENT(TRUE) + + if(SEND_SIGNAL(src, COMSIG_ACTIVATE_SELF, user) & COMPONENT_CANCEL_ATTACK_CHAIN) + return FINISH_ATTACK + +/** + * Called on ourselves before we hit something. Return TRUE to cancel the remainder of the attack chain. + * + * Arguments: + * * atom/A - The atom about to be hit + * * mob/living/user - The mob doing the htting + * * params - click params such as alt/shift etc + * + * See: [/obj/item/proc/melee_attack_chain] + */ +/obj/item/proc/pre_attack(atom/A, mob/living/user, params) + SHOULD_CALL_PARENT(TRUE) + + if(SEND_SIGNAL(src, COMSIG_PRE_ATTACK, A, user, params) & COMPONENT_CANCEL_ATTACK_CHAIN) return TRUE + // TODO: Turn this into a component and have a sane implementation instead of extra-specific behavior in a core proc var/temperature = get_heat() if(temperature && A.reagents && !ismob(A) && !istype(A, /obj/item/clothing/mask/cigarette)) var/reagent_temp = A.reagents.chem_temp @@ -37,119 +73,179 @@ if(do_after_once(user, time, TRUE, user, TRUE, attempt_cancel_message = "You stop heating up [A].")) to_chat(user, "You heat [A] with [src].") A.reagents.temperature_reagents(temperature) - return TRUE //return FALSE to avoid calling attackby after this proc does stuff -// No comment -/atom/proc/attackby(obj/item/W, mob/user, params) - if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK) - return TRUE - return FALSE +/** + * Called when mob `user` is hitting us with an item `attacking`. + * Part of the [/obj/item/proc/melee_attack_chain]. + * + * Handles calling [/atom/proc/attack] or [/obj/item/proc/attack_obj] as necessary. + * + * Arguments: + * * obj/item/attacking_item - The item hitting this atom + * * mob/user - The wielder of this item + * * params - click params such as alt/shift etc + * + * Handles [COMSIG_ATTACK_BY] returning [COMPONENT_SKIP_AFTERATTACK]. + * Returns [FINISH_ATTACK] if the attack chain should stop here. + */ +/atom/proc/attack_by(obj/item/attacking, mob/user, params) + SHOULD_CALL_PARENT(TRUE) -/obj/attackby(obj/item/I, mob/living/user, params) - return ..() || (can_be_hit && I.attack_obj(src, user, params)) + if(SEND_SIGNAL(src, COMSIG_ATTACK_BY, attacking, user, params) & COMPONENT_SKIP_AFTERATTACK) + return FINISH_ATTACK -/mob/living/attackby(obj/item/I, mob/living/user, params) - user.changeNext_move(CLICK_CD_MELEE) - if(attempt_harvest(I, user)) - return TRUE - return I.attack(src, user) +/obj/attack_by(obj/item/attacking, mob/user, params) + . = ..() -/obj/item/proc/attack(mob/living/M, mob/living/user, def_zone) - if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_CANCEL_ATTACK_CHAIN) + if(.) + return FINISH_ATTACK + + if(!can_be_hit) + return FINISH_ATTACK + + return attacking.attack_obj(src, user, params) + +/mob/living/attack_by(obj/item/attacking, mob/living/user, params) + if(..()) return TRUE - SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user) + user.changeNext_move(CLICK_CD_MELEE) + return attacking.attack(src, user, params) + +/** + * Called when we are used by `user` to attack the living `target`. + * + * Returns `TRUE` if the rest of the attack chain should be cancelled. This may occur if the attack failed for some reason. + * Returns `FALSE` if the attack was "successful" or "handled" in some way, and the rest of the attack chain should still fire. + */ +/obj/item/proc/attack(mob/living/target, mob/living/user, params) + SHOULD_CALL_PARENT(TRUE) + + var/signal_return = SEND_SIGNAL(src, COMSIG_ATTACK, target, user, params) \ + || SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, target, user, params) + + if(signal_return & COMPONENT_CANCEL_ATTACK_CHAIN) + return FINISH_ATTACK + + if(signal_return & COMPONENT_SKIP_ATTACK) + return FALSE + + . = __attack_core(target, user) + + if(!target.new_attack_chain) + return target.attacked_by__legacy__attackchain(src, user, /* def_zone */ null) + +/obj/item/proc/__attack_core(mob/living/target, mob/living/user) + PRIVATE_PROC(TRUE) + if(flags & (NOBLUDGEON)) return FALSE - if((is_surgery_tool_by_behavior(src) || is_organ(src) || tool_behaviour) && user.a_intent == INTENT_HELP && on_operable_surface(M) && M != user) + // TODO: Migrate all of this to the proper objects so it's not clogging up a core proc and called at irrelevant times + if((is_surgery_tool_by_behavior(src) || is_organ(src) || tool_behaviour) && user.a_intent == INTENT_HELP && on_operable_surface(target) && target != user) to_chat(user, "You don't want to harm the person you're trying to help!") - return + return FALSE if(force && HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm other living beings!") - return + return FALSE if(!force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), TRUE, -1) else - SEND_SIGNAL(M, COMSIG_ITEM_ATTACK) - add_attack_logs(user, M, "Attacked with [name] ([uppertext(user.a_intent)]) ([uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL) + SEND_SIGNAL(target, COMSIG_ATTACK) + add_attack_logs(user, target, "Attacked with [name] ([uppertext(user.a_intent)]) ([uppertext(damtype)])", (target.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL) if(hitsound) playsound(loc, hitsound, get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0) - M.lastattacker = user.real_name - M.lastattackerckey = user.ckey - - user.do_attack_animation(M) - . = M.attacked_by(src, user, def_zone) + target.lastattacker = user.real_name + target.lastattackerckey = user.ckey + user.do_attack_animation(target) add_fingerprint(user) -//the equivalent of the standard version of attack() but for object targets. -/obj/item/proc/attack_obj(obj/O, mob/living/user, params) - if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) - return - if(flags & (NOBLUDGEON)) - return - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(O) - O.attacked_by(src, user) +/// The equivalent of the standard version of [/obj/item/proc/attack] but for non mob targets. +/obj/item/proc/attack_obj(obj/attacked_obj, mob/living/user, params) + var/signal_return = SEND_SIGNAL(src, COMSIG_ATTACK_OBJ, attacked_obj, user) | SEND_SIGNAL(user, COMSIG_ATTACK_OBJ_LIVING, attacked_obj) + if(signal_return & COMPONENT_SKIP_ATTACK) + return TRUE + if(signal_return & COMPONENT_CANCEL_ATTACK_CHAIN) + return FALSE + if(flags & NOBLUDGEON) + return FALSE -/atom/movable/proc/attacked_by() + if(!attacked_obj.new_attack_chain) + attacked_obj.attacked_by__legacy__attackchain(src, user) + +/** + * Called *after* we have been attacked with the item `attacker` by `user`. + * + * Return value is ignored for purposes of the attack chain. + */ +/atom/proc/attacked_by(obj/item/attacker, mob/living/user) return -/obj/attacked_by(obj/item/I, mob/living/user) - var/damage = I.force - if(I.force) +/obj/attacked_by(obj/item/attacker, mob/living/user) + var/damage = attacker.force + if(attacker.force) user.visible_message( - "[user] has hit [src] with [I]!", - "You hit [src] with [I]!", + "[user] has hit [src] with [attacker]!", + "You hit [src] with [attacker]!", "You hear something being struck by a weapon!" ) if(ishuman(user)) var/mob/living/carbon/human/H = user damage += H.physiology.melee_bonus - take_damage(damage, I.damtype, MELEE, 1) + take_damage(damage, attacker.damtype, MELEE, 1) -/mob/living/attacked_by(obj/item/I, mob/living/user, def_zone) - send_item_attack_message(I, user) - if(I.force) +/mob/living/attacked_by(obj/item/attacker, mob/living/user, def_zone) + send_item_attack_message(attacker, user) + if(attacker.force) var/bonus_damage = 0 if(ishuman(user)) var/mob/living/carbon/human/H = user bonus_damage = H.physiology.melee_bonus - apply_damage(I.force + bonus_damage, I.damtype, def_zone) - if(I.damtype == BRUTE) + apply_damage(attacker.force + bonus_damage, attacker.damtype, def_zone) + if(attacker.damtype == BRUTE) if(prob(33)) - I.add_mob_blood(src) + attacker.add_mob_blood(src) var/turf/location = get_turf(src) add_splatter_floor(location) if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood user.add_mob_blood(src) -/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user) - if(!I.force) +/mob/living/simple_animal/attacked_by(obj/item/attacker, mob/living/user) + if(!attacker.force) user.visible_message( - "[user] gently taps [src] with [I].", + "[user] gently taps [src] with [attacker].", "This weapon is ineffective, it does no damage!", "You hear a gentle tapping." ) - else if(I.force < force_threshold || I.damtype == STAMINA) + else if(attacker.force < force_threshold || attacker.damtype == STAMINA) visible_message( - "[I] bounces harmlessly off of [src].", - "[I] bounces harmlessly off of [src]!", + "[attacker] bounces harmlessly off of [src].", + "[attacker] bounces harmlessly off of [src]!", "You hear something being struck by a weapon!" ) else return ..() -// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person. -// Click parameters is the params string from byond Click() code, see that documentation. -/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters) - SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters) +/** + * Last proc in the [/obj/item/proc/melee_attack_chain]. + * + * Arguments: + * * atom/target - The thing that was hit + * * mob/user - The mob doing the hitting + * * proximity_flag - is 1 if this afterattack was called on something adjacent, in your square, or on your person. + * * click_parameters - is the params string from byond [/atom/proc/Click] code, see that documentation. + */ +/obj/item/proc/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + SHOULD_CALL_PARENT(TRUE) + + SEND_SIGNAL(src, COMSIG_AFTER_ATTACK, target, user, proximity_flag, click_parameters) + SEND_SIGNAL(target, COMSIG_AFTER_ATTACKED_BY, src, user, proximity_flag, click_parameters) /obj/item/proc/get_clamped_volume() if(w_class) diff --git a/code/_onclick/item_attack_legacy.dm b/code/_onclick/item_attack_legacy.dm new file mode 100644 index 0000000000000..828925008da28 --- /dev/null +++ b/code/_onclick/item_attack_legacy.dm @@ -0,0 +1,115 @@ +/** + * Called after `user` has attacked us with item `W`. + * + * New uses of this proc are prohibited! Used [/atom/proc/attacked_by]. + * If you are modifiying an existing implementation of this proc, it is expected that you replace it with the proper alternative! + */ +/atom/proc/attacked_by__legacy__attackchain(obj/item/W, mob/living/user) + return + +/atom/movable/attacked_by__legacy__attackchain() + return + +/obj/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) + return attacked_by(I, user) + +/mob/living/attacked_by__legacy__attackchain(obj/item/I, mob/living/user, def_zone) + return attacked_by(I, user, def_zone) + +/mob/living/simple_animal/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) + return attacked_by(I, user) + +/obj/item/proc/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) + if(SEND_SIGNAL(src, COMSIG_ATTACK, M, user) & COMPONENT_CANCEL_ATTACK_CHAIN) + return TRUE + + SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user) + + . = __attack_core(M, user) + + if(!M.new_attack_chain) + M.attacked_by__legacy__attackchain(src, user, def_zone) + +/** + * Called when `user` attacks us with item `W`. + * + * Handles [COMSIG_ATTACK_BY] returning [COMPONENT_SKIP_AFTERATTACK]. + * Returns TRUE if afterattack should not be called, FALSE otherwise. + * + * New uses of this proc are prohibited! Use [/atom/proc/attackby] or [/atom/proc/base_item_interaction] instead! + * If you are modifiying an existing implementation of this proc, it is expected that you replace it with the proper alternative! + */ +/atom/proc/attackby__legacy__attackchain(obj/item/W, mob/user, params) + if(SEND_SIGNAL(src, COMSIG_ATTACK_BY, W, user, params) & COMPONENT_SKIP_AFTERATTACK) + return TRUE + return FALSE + +/obj/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) + return ..() || (can_be_hit && I.new_attack_chain \ + ? I.attack_obj(src, user, params) \ + : I.attack_obj__legacy__attackchain(src, user, params)) + +/mob/living/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) + user.changeNext_move(CLICK_CD_MELEE) + if(attempt_harvest(I, user)) + return TRUE + + if(I.new_attack_chain) + return I.attack(src, user, params) + + return I.attack__legacy__attackchain(src, user) + +/** + * Called when `user` attacks us with object `O`. + * + * Handles [COMSIG_ATTACK_OBJ] returning [COMPONENT_NO_ATTACK_OBJ]. + * Returns FALSE if the attack isn't valid. + * + * New uses of this proc are prohibited! Use [/obj/item/proc/interact_with_atom] + * or [/atom/proc/base_item_interaction] if this is not meant to be an attack, and + * [/obj/item/proc/attack_obj] if it is. If you are modifiying an existing + * implementation of this proc, it is expected that you replace it with the proper + * alternative! + */ +/obj/item/proc/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) + if(SEND_SIGNAL(src, COMSIG_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) + return FALSE + if(flags & (NOBLUDGEON)) + return FALSE + user.changeNext_move(CLICK_CD_MELEE) + user.do_attack_animation(O) + + if(!O.new_attack_chain) + O.attacked_by__legacy__attackchain(src, user) + +/** + * Called when `user` has us in the active hand, and has clicked on us. + * + * Handles [COMSIG_ACTIVATE_SELF] returning [COMPONENT_NO_INTERACT]. + * Returns TRUE if a listener has requested the attack chain be cancelled. + * + * New uses of this proc are prohibited! Use [/obj/item/proc/activate_self]. + * If you are modifiying an existing implementation of this proc, it is expected that you replace it with the proper alternative! + */ +/obj/item/proc/attack_self__legacy__attackchain(mob/user) + var/signal_ret = SEND_SIGNAL(src, COMSIG_ACTIVATE_SELF, user) + if(signal_ret & COMPONENT_NO_INTERACT) + return + if(signal_ret & COMPONENT_CANCEL_ATTACK_CHAIN) + return TRUE + +/** + * Last proc in the [/obj/item/proc/melee_attack_chain]. + * + * Sends [COMSIG_AFTER_ATTACK] and [COMSIG_AFTER_ATTACKED_BY], handling no responses. + * New uses of this proc are prohibited! attack() calls on mobs and objects handle sending these signals. + * + * Arguments: + * * atom/target - The thing that was hit + * * mob/user - The mob doing the hitting + * * proximity_flag - is 1 if this afterattack was called on something adjacent, in your square, or on your person. + * * click_parameters - is the params string from byond [/atom/proc/Click] code, see that documentation. + */ +/obj/item/proc/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, params) + SEND_SIGNAL(src, COMSIG_AFTER_ATTACK, target, user, proximity_flag, params) + SEND_SIGNAL(target, COMSIG_AFTER_ATTACKED_BY, src, user, proximity_flag, params) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 6963ca58801cc..4bd96084e7871 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -100,15 +100,15 @@ qdel(src) -/obj/item/tk_grab/attack_self(mob/user) +/obj/item/tk_grab/attack_self__legacy__attackchain(mob/user) if(focus) focus.attack_self_tk(user) /obj/item/tk_grab/override_throw(mob/user, atom/target) - afterattack(target, user) + afterattack__legacy__attackchain(target, user) return TRUE -/obj/item/tk_grab/afterattack(atom/target , mob/living/user, proximity, params) +/obj/item/tk_grab/afterattack__legacy__attackchain(atom/target , mob/living/user, proximity, params) if(!target || !user) return if(last_throw + TK_COOLDOWN > world.time) @@ -140,9 +140,9 @@ if(isitem(focus) && target.Adjacent(focus) && !user.in_throw_mode) var/obj/item/I = focus - var/resolved = target.attackby(I, user, params) + var/resolved = target.attackby__legacy__attackchain(I, user, params) if(!resolved && target && I) - I.afterattack(target,user,1) // for splashing with beakers + I.afterattack__legacy__attackchain(target,user,1) // for splashing with beakers else @@ -156,7 +156,7 @@ focus.throw_at(target, 10, 1, user) last_throw = world.time -/obj/item/tk_grab/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/tk_grab/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) return /obj/item/tk_grab/is_equivalent(obj/item/I) diff --git a/code/datums/components/defibrillator.dm b/code/datums/components/defibrillator.dm index fa734c62f90d1..a33c4f0a36fb5 100644 --- a/code/datums/components/defibrillator.dm +++ b/code/datums/components/defibrillator.dm @@ -72,7 +72,7 @@ var/effect_target = isnull(actual_unit) ? parent : actual_unit - RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(trigger_defib)) + RegisterSignal(parent, COMSIG_ATTACK, PROC_REF(trigger_defib)) RegisterSignal(effect_target, COMSIG_ATOM_EMAG_ACT, PROC_REF(on_emag)) RegisterSignal(effect_target, COMSIG_ATOM_EMP_ACT, PROC_REF(on_emp)) @@ -119,7 +119,7 @@ * Start the defibrillation process when triggered by a signal. */ /datum/component/defib/proc/trigger_defib(obj/item/paddles, mob/living/carbon/human/target, mob/living/user) - SIGNAL_HANDLER // COMSIG_ITEM_ATTACK + SIGNAL_HANDLER // COMSIG_ATTACK // This includes some do-afters, so we have to pass it off asynchronously INVOKE_ASYNC(src, PROC_REF(defibrillate), user, target) return TRUE diff --git a/code/datums/components/ducttape.dm b/code/datums/components/ducttape.dm index 516b34e347b64..fa749cbbc50eb 100644 --- a/code/datums/components/ducttape.dm +++ b/code/datums/components/ducttape.dm @@ -12,7 +12,7 @@ RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(add_tape_text)) x_offset = x y_offset = y - RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, PROC_REF(afterattack)) + RegisterSignal(parent, COMSIG_AFTER_ATTACK, PROC_REF(afterattack__legacy__attackchain)) RegisterSignal(parent, COMSIG_ITEM_PICKUP, PROC_REF(pick_up)) I.update_icon() //Do this first so the action button properly shows the icon if(!hide_tape) //the tape can no longer be removed if TRUE @@ -44,7 +44,7 @@ I.remove_tape() qdel(src) -/datum/component/ducttape/proc/afterattack(obj/item/I, atom/target, mob/user, proximity, params) +/datum/component/ducttape/proc/afterattack__legacy__attackchain(obj/item/I, atom/target, mob/user, proximity, params) if(!proximity) return if(!isturf(target)) diff --git a/code/datums/components/label.dm b/code/datums/components/label.dm index c76e2ca97210e..dcc7a3fc73bbf 100644 --- a/code/datums/components/label.dm +++ b/code/datums/components/label.dm @@ -22,12 +22,12 @@ apply_label() /datum/component/label/RegisterWithParent() - RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attack_by)) + RegisterSignal(parent, COMSIG_ATTACK_BY, PROC_REF(on_attack_by)) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) RegisterSignal(parent, COMSIG_ATOM_UPDATE_NAME, PROC_REF(on_update_name)) /datum/component/label/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_NAME)) + UnregisterSignal(parent, list(COMSIG_ATTACK_BY, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_NAME)) /** This proc will fire after the parent is hit by a hand labeler which is trying to apply another label. @@ -53,7 +53,7 @@ * user: The mob who is wielding the attacking object. */ /datum/component/label/proc/on_attack_by(datum/source, obj/item/attacker, mob/user) - SIGNAL_HANDLER // COMSIG_PARENT_ATTACKBY + SIGNAL_HANDLER // COMSIG_ATTACK_BY // If the attacking object is not a hand labeler or it's not off (has a label ready to apply), return. // The hand labeler should be off in order to remove a label. var/obj/item/hand_labeler/labeler = attacker diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 6041460d068c8..e35d9379578b8 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -37,7 +37,7 @@ precondition = _precondition after_insert = _after_insert - RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(OnAttackBy)) + RegisterSignal(parent, COMSIG_ATTACK_BY, PROC_REF(OnAttackBy)) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(OnExamine)) var/list/possible_mats = list() @@ -74,7 +74,7 @@ if((I.flags_2 & (HOLOGRAM_2 | NO_MAT_REDEMPTION_2)) || (tc && !is_type_in_typecache(I, tc))) to_chat(user, "[parent] won't accept [I]!") return - . = COMPONENT_NO_AFTERATTACK + . = COMPONENT_SKIP_AFTERATTACK var/datum/callback/pc = precondition if(pc && !pc.Invoke(user)) return diff --git a/code/datums/components/paintable.dm b/code/datums/components/paintable.dm index e77e05147190f..f0a7187149a8e 100644 --- a/code/datums/components/paintable.dm +++ b/code/datums/components/paintable.dm @@ -2,7 +2,7 @@ var/current_paint /datum/component/spraycan_paintable/Initialize() - RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(Repaint)) + RegisterSignal(parent, COMSIG_ATTACK_BY, PROC_REF(Repaint)) /datum/component/spraycan_paintable/Destroy() RemoveCurrentCoat() @@ -15,7 +15,7 @@ /datum/component/spraycan_paintable/proc/Repaint(datum/source, obj/item/toy/crayon/spraycan/spraycan, mob/living/user) if(!istype(spraycan) || user.a_intent == INTENT_HARM) return - . = COMPONENT_NO_AFTERATTACK + . = COMPONENT_SKIP_AFTERATTACK if(spraycan.capped) to_chat(user, "Take the cap off first!") return diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm index ba240898e34fb..6652b4ed6460f 100644 --- a/code/datums/components/radioactive.dm +++ b/code/datums/components/radioactive.dm @@ -22,8 +22,8 @@ RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(rad_examine)) RegisterSignal(parent, COMSIG_ADMIN_DECONTAMINATE, PROC_REF(admin_decontaminate)) if(isitem(parent)) - RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(rad_attack)) - RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, PROC_REF(rad_attack)) + RegisterSignal(parent, COMSIG_ATTACK, PROC_REF(rad_attack)) + RegisterSignal(parent, COMSIG_ATTACK_OBJ, PROC_REF(rad_attack)) if(strength > RAD_MINIMUM_CONTAMINATION) SSradiation.warn(src) //Let's make er glow diff --git a/code/datums/components/scope.dm b/code/datums/components/scope.dm index 1506d2851a688..4ad8faa83d656 100644 --- a/code/datums/components/scope.dm +++ b/code/datums/components/scope.dm @@ -101,7 +101,7 @@ SIGNAL_HANDLER // COMSIG_GUN_TRY_FIRE if(!tracker?.given_turf || target == get_target(tracker.given_turf)) return NONE - INVOKE_ASYNC(source, TYPE_PROC_REF(/obj/item, afterattack), get_target(tracker.given_turf), user) + INVOKE_ASYNC(source, TYPE_PROC_REF(/obj/item, afterattack__legacy__attackchain), get_target(tracker.given_turf), user) return COMPONENT_CANCEL_GUN_FIRE /datum/component/scope/proc/on_examine(datum/source, mob/user, list/examine_list) diff --git a/code/datums/components/shelved.dm b/code/datums/components/shelved.dm index 29ba697d01bb3..3aa678d2efed7 100644 --- a/code/datums/components/shelved.dm +++ b/code/datums/components/shelved.dm @@ -25,7 +25,7 @@ /datum/component/shelver/RegisterWithParent() RegisterSignal(parent, COMSIG_SHELF_ATTEMPT_PICKUP, PROC_REF(on_shelf_attempt_pickup)) - RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attackby)) + RegisterSignal(parent, COMSIG_ATTACK_BY, PROC_REF(on_attackby)) RegisterSignal(parent, COMSIG_SHELF_ITEM_REMOVED, PROC_REF(on_shelf_item_removed)) RegisterSignal(parent, COMSIG_SHELF_ADDED_ON_MAPLOAD, PROC_REF(prepare_autoshelf)) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) @@ -117,18 +117,18 @@ O.update_appearance(UPDATE_ICON) /datum/component/shelver/proc/on_attackby(datum/source, obj/item/attacker, mob/user, params) - SIGNAL_HANDLER // COMSIG_PARENT_ATTACKBY + SIGNAL_HANDLER // COMSIG_ATTACK_BY if(isrobot(user)) - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK if(attacker.flags & ABSTRACT) - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK if(user.a_intent == INTENT_HARM) return if(length(allowed_types) && !(attacker.type in allowed_types)) to_chat(user, "[attacker] won't fit on [parent]!") - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK var/list/PL = params2list(params) var/icon_x = text2num(PL["icon-x"]) @@ -140,7 +140,7 @@ if(icon_x >= coords[1] && icon_x <= coords[3] && icon_y >= coords[2] && icon_y <= coords[4]) if(used_places[i]) to_chat(user, "There's already something there on [parent].") - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK var/position_details = placement_zones[coords] if(user.drop_item()) @@ -149,7 +149,7 @@ "[user] places [attacker] on [parent].", "You place [attacker] on [parent].", ) - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK /** * Add an item to the shelf. diff --git a/code/datums/components/spooky.dm b/code/datums/components/spooky.dm index 99f7ba0581162..3ec7ab5bbe68e 100644 --- a/code/datums/components/spooky.dm +++ b/code/datums/components/spooky.dm @@ -2,7 +2,7 @@ var/too_spooky = TRUE //will it spawn a new instrument? /datum/component/spooky/Initialize() - RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(spectral_attack)) + RegisterSignal(parent, COMSIG_ATTACK, PROC_REF(spectral_attack)) /datum/component/spooky/proc/spectral_attack(datum/source, mob/living/carbon/C, mob/user) if(ishuman(user)) //this weapon wasn't meant for mortals. diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index 47a94d7e69d2f..bfb939ed10362 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -22,7 +22,7 @@ /datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move, extrarange, falloff_exponent, fallof_distance) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE - RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), PROC_REF(play_squeak)) + RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATTACK_BY), PROC_REF(play_squeak)) if(ismovable(parent)) RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), PROC_REF(play_squeak)) RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(play_squeak_crossed)) @@ -30,8 +30,8 @@ if(squeak_on_move) RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_squeak)) if(isitem(parent)) - RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(play_squeak)) - RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(use_squeak)) + RegisterSignal(parent, list(COMSIG_ATTACK, COMSIG_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(play_squeak)) + RegisterSignal(parent, COMSIG_ACTIVATE_SELF, PROC_REF(use_squeak)) RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) if(istype(parent, /obj/item/clothing/shoes)) diff --git a/code/datums/components/sticky.dm b/code/datums/components/sticky.dm index 83b2d7544f961..9b1c625903f5b 100644 --- a/code/datums/components/sticky.dm +++ b/code/datums/components/sticky.dm @@ -25,11 +25,11 @@ return ..() /datum/component/sticky/RegisterWithParent() - RegisterSignal(parent, COMSIG_ITEM_PRE_ATTACK, PROC_REF(stick_to_it)) + RegisterSignal(parent, COMSIG_PRE_ATTACK, PROC_REF(stick_to_it)) RegisterSignal(parent, COMSIG_MOVABLE_IMPACT, PROC_REF(stick_to_it_throwing)) /datum/component/sticky/UnregisterFromParent() - UnregisterSignal(parent, COMSIG_ITEM_PRE_ATTACK) + UnregisterSignal(parent, COMSIG_PRE_ATTACK) UnregisterSignal(parent, COMSIG_MOVABLE_IMPACT) /datum/component/sticky/proc/stick_to_it(obj/item/I, atom/target, mob/user, params) diff --git a/code/datums/components/surgery_initiator.dm b/code/datums/components/surgery_initiator.dm index 9f476ba089da8..7a7f5966c8975 100644 --- a/code/datums/components/surgery_initiator.dm +++ b/code/datums/components/surgery_initiator.dm @@ -48,12 +48,12 @@ src.forced_surgery = forced_surgery /datum/component/surgery_initiator/RegisterWithParent() - RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(initiate_surgery_moment)) + RegisterSignal(parent, COMSIG_ATTACK, PROC_REF(initiate_surgery_moment)) RegisterSignal(parent, COMSIG_ATOM_UPDATE_SHARPNESS, PROC_REF(on_parent_sharpness_change)) RegisterSignal(parent, COMSIG_PARENT_EXAMINE_MORE, PROC_REF(on_parent_examine_more)) /datum/component/surgery_initiator/UnregisterFromParent() - UnregisterSignal(parent, COMSIG_ITEM_ATTACK) + UnregisterSignal(parent, COMSIG_ATTACK) UnregisterSignal(parent, COMSIG_ATOM_UPDATE_SHARPNESS) UnregisterSignal(parent, COMSIG_PARENT_EXAMINE_MORE) @@ -72,7 +72,7 @@ /// Does the surgery initiation. /datum/component/surgery_initiator/proc/initiate_surgery_moment(datum/source, atom/target, mob/user) - SIGNAL_HANDLER // COMSIG_ITEM_ATTACK + SIGNAL_HANDLER // COMSIG_ATTACK if(!isliving(user)) return var/mob/living/L = target diff --git a/code/datums/components/two_handed.dm b/code/datums/components/two_handed.dm index 63c3108efe3e2..c5d8143341a49 100644 --- a/code/datums/components/two_handed.dm +++ b/code/datums/components/two_handed.dm @@ -104,8 +104,8 @@ /datum/component/two_handed/RegisterWithParent() RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) - RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_attack_self)) - RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(on_attack)) + RegisterSignal(parent, COMSIG_ACTIVATE_SELF, PROC_REF(on_attack_self)) + RegisterSignal(parent, COMSIG_ATTACK, PROC_REF(on_attack)) RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON, PROC_REF(on_update_icon)) RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved)) RegisterSignal(parent, COMSIG_ITEM_SHARPEN_ACT, PROC_REF(on_sharpen)) @@ -116,8 +116,8 @@ /datum/component/two_handed/UnregisterFromParent() UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, - COMSIG_ITEM_ATTACK_SELF, - COMSIG_ITEM_ATTACK, + COMSIG_ACTIVATE_SELF, + COMSIG_ATTACK, COMSIG_ATOM_UPDATE_ICON, COMSIG_MOVABLE_MOVED, COMSIG_ITEM_SHARPEN_ACT)) @@ -151,7 +151,7 @@ /// Triggered on attack self of the item containing the component /datum/component/two_handed/proc/on_attack_self(datum/source, mob/user) - SIGNAL_HANDLER // COMSIG_ITEM_ATTACK_SELF + SIGNAL_HANDLER // COMSIG_ACTIVATE_SELF if(require_twohands) return @@ -311,7 +311,7 @@ * on_attack triggers on attack with the parent item */ /datum/component/two_handed/proc/on_attack(obj/item/source, mob/living/target, mob/living/user) - SIGNAL_HANDLER // COMSIG_ITEM_ATTACK + SIGNAL_HANDLER // COMSIG_ATTACK if(wielded && attacksound) var/obj/item/parent_item = parent playsound(parent_item.loc, attacksound, 50, TRUE) diff --git a/code/datums/ores.dm b/code/datums/ores.dm index 7774a485cff32..07e7ae6090038 100644 --- a/code/datums/ores.dm +++ b/code/datums/ores.dm @@ -136,7 +136,7 @@ else log_game("An explosion has triggered a gibtonite deposit reaction at [AREACOORD(source)].") - RegisterSignal(source, COMSIG_PARENT_ATTACKBY, PROC_REF(on_parent_attackby)) + RegisterSignal(source, COMSIG_ATTACK_BY, PROC_REF(on_attackby)) detonate_start_time = world.time explosion_callback = addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/ore/gibtonite, detonate), source), detonate_time, TIMER_STOPPABLE) @@ -164,13 +164,13 @@ return MINERAL_PREVENT_DIG -/datum/ore/gibtonite/proc/on_parent_attackby(turf/source, obj/item/attacker, mob/user) - SIGNAL_HANDLER // COMSIG_PARENT_ATTACKBY +/datum/ore/gibtonite/proc/on_attackby(turf/source, obj/item/attacker, mob/user) + SIGNAL_HANDLER // COMSIG_ATTACK_BY if(istype(attacker, /obj/item/mining_scanner) || istype(attacker, /obj/item/t_scanner/adv_mining_scanner) && stage == GIBTONITE_ACTIVE) user.visible_message("[user] holds [attacker] to [src]...", "You use [attacker] to locate where to cut off the chain reaction and attempt to stop it...") defuse(source) - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK /datum/ore/gibtonite/proc/detonate(turf/simulated/mineral/source) if(stage == GIBTONITE_STABLE) diff --git a/code/datums/outfits/outfit_debug.dm b/code/datums/outfits/outfit_debug.dm index ccce96c4c0cfd..559c9b8b9a21e 100644 --- a/code/datums/outfits/outfit_debug.dm +++ b/code/datums/outfits/outfit_debug.dm @@ -63,7 +63,7 @@ for(var/channel in SSradio.radiochannels) channels[channel] = 1 // yeah, all channels, sure, probably fine -/obj/item/encryptionkey/syndicate/all_channels/attack_self(mob/user, pickupfireoverride) +/obj/item/encryptionkey/syndicate/all_channels/attack_self__legacy__attackchain(mob/user, pickupfireoverride) change_voice = !change_voice to_chat(user, "You switch [src] to [change_voice ? "" : "not "]change your voice on syndicate communications.") @@ -157,7 +157,7 @@ . = ..() . += "Alt-Click to toggle mind-activation on spawning." -/obj/item/debug/human_spawner/afterattack(atom/target, mob/user, proximity) +/obj/item/debug/human_spawner/afterattack__legacy__attackchain(atom/target, mob/user, proximity) ..() if(!isturf(target)) return @@ -167,7 +167,7 @@ if(activate_mind) H.mind_initialize() -/obj/item/debug/human_spawner/attack_self(mob/user) +/obj/item/debug/human_spawner/attack_self__legacy__attackchain(mob/user) ..() var/choice = input("Select a species", "Human Spawner", null) in GLOB.all_species selected_species = GLOB.all_species[choice] @@ -199,7 +199,7 @@ desc = "A wonder of modern medicine. This tool functions as any other sort of surgery tool, and finishes in only a fraction of the time. Hey, how'd you get your hands on this, anyway?" toolspeed = 0.01 -/obj/item/scalpel/laser/manager/debug/attack_self(mob/user) +/obj/item/scalpel/laser/manager/debug/attack_self__legacy__attackchain(mob/user) . = ..() toolspeed = toolspeed == 0.5 ? 0.01 : 0.5 to_chat(user, "[src] is now set to toolspeed [toolspeed]") diff --git a/code/datums/spells/alien_spells/build_resin_structure.dm b/code/datums/spells/alien_spells/build_resin_structure.dm index c38dcceec66d5..b64925e0b2638 100644 --- a/code/datums/spells/alien_spells/build_resin_structure.dm +++ b/code/datums/spells/alien_spells/build_resin_structure.dm @@ -58,7 +58,7 @@ desc = "The hunger..." icon_state = "alien_acid" -/obj/item/melee/touch_attack/alien/consume_resin/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/alien/consume_resin/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(target == user) to_chat(user, "You stop trying to consume resin.") ..() diff --git a/code/datums/spells/alien_spells/corrosive_acid_spit.dm b/code/datums/spells/alien_spells/corrosive_acid_spit.dm index 2f32c2dcb0499..20593bdd37569 100644 --- a/code/datums/spells/alien_spells/corrosive_acid_spit.dm +++ b/code/datums/spells/alien_spells/corrosive_acid_spit.dm @@ -11,7 +11,7 @@ desc = "A fistfull of death." icon_state = "alien_acid" -/obj/item/melee/touch_attack/alien/corrosive_acid/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/alien/corrosive_acid/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(target == user) to_chat(user, "You withdraw your readied acid.") ..() @@ -45,7 +45,7 @@ desc = "The air warps around your hand, somehow the heat doesn't hurt." icon_state = "alien_acid" -/obj/item/melee/touch_attack/alien/burning_touch/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/alien/burning_touch/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(target == user) to_chat(user, "You cool down your boiled aid.") ..() diff --git a/code/datums/spells/banana_touch.dm b/code/datums/spells/banana_touch.dm index 2c289884a91cd..052e657e807d7 100644 --- a/code/datums/spells/banana_touch.dm +++ b/code/datums/spells/banana_touch.dm @@ -24,13 +24,13 @@ /obj/item/melee/touch_attack/banana/apprentice -/obj/item/melee/touch_attack/banana/apprentice/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/banana/apprentice/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(iswizard(target) && target != user) to_chat(user, "Seriously?! Honk THEM, not me!") return ..() -/obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/banana/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) return diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm index e1229dbcc1612..cb8c1a4c182fe 100644 --- a/code/datums/spells/mime.dm +++ b/code/datums/spells/mime.dm @@ -134,7 +134,7 @@ desc = "It contains various pictures of mimes mid-performance, aswell as some illustrated tutorials." icon_state = "bookmime" -/obj/item/spellbook/oneuse/mime/attack_self(mob/user) +/obj/item/spellbook/oneuse/mime/attack_self__legacy__attackchain(mob/user) var/datum/spell/S = new spell for(var/datum/spell/knownspell in user.mind.spell_list) if(knownspell.type == S.type) diff --git a/code/datums/spells/mime_malaise.dm b/code/datums/spells/mime_malaise.dm index 209863ada380f..8ce906e055a71 100644 --- a/code/datums/spells/mime_malaise.dm +++ b/code/datums/spells/mime_malaise.dm @@ -19,7 +19,7 @@ icon_state = "fleshtostone" item_state = "fleshtostone" -/obj/item/melee/touch_attack/mime_malaise/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/mime_malaise/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) return diff --git a/code/datums/spells/spacetime_dist.dm b/code/datums/spells/spacetime_dist.dm index e487936fe03fe..e7cee2a416a0d 100644 --- a/code/datums/spells/spacetime_dist.dm +++ b/code/datums/spells/spacetime_dist.dm @@ -110,7 +110,7 @@ if(!cant_teleport) walk_link(AM) -/obj/effect/cross_action/spacetime_dist/attackby(obj/item/W, mob/user, params) +/obj/effect/cross_action/spacetime_dist/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(user.drop_item(W)) walk_link(W) else diff --git a/code/game/atom/atom_tool_acts.dm b/code/game/atom/atom_tool_acts.dm new file mode 100644 index 0000000000000..6c56e5972da84 --- /dev/null +++ b/code/game/atom/atom_tool_acts.dm @@ -0,0 +1,166 @@ +/** + * ## Item interaction + * + * Handles non-combat iteractions of a tool on this atom, + * such as using a tool on a wall to deconstruct it, + * or scanning someone with a health analyzer + */ +/atom/proc/base_item_interaction(mob/living/user, obj/item/tool, list/modifiers) + SHOULD_CALL_PARENT(TRUE) + PROTECTED_PROC(TRUE) + + // We do not have a combat mode or secondary actions like /tg/, so instead + // I'm unilaterally deciding it here: If you are not on harm intent, tool + // interactions are not attacks. Shit like the autolathe accepting + // screwdrivers on harm intent is unintuitive and needs to go away, and there + // are dozens of ${TOOL}_act procs that do constant harm intent checks. + var/tool_return = tool_act(user, tool, modifiers) + if(tool_return) + return tool_return + + var/early_sig_return = NONE + /* + * This is intentionally using `||` instead of `|` to short-circuit the signal calls + * This is because we want to return early if ANY of these signals return a value + * + * This puts priority on the atom's signals, then the tool's signals, then the user's signals + */ + early_sig_return = SEND_SIGNAL(src, COMSIG_INTERACT_TARGET, user, tool, modifiers) \ + || SEND_SIGNAL(tool, COMSIG_INTERACTING, user, src, modifiers) \ + || SEND_SIGNAL(user, COMSIG_INTERACT_USER, src, tool, modifiers) + + if(early_sig_return) + return early_sig_return + + if(new_attack_chain) + var/self_interaction = item_interaction(user, tool, modifiers) + if(self_interaction) + return self_interaction + + if(tool.new_attack_chain) + var/interact_return = tool.interact_with_atom(src, user, modifiers) + if(interact_return) + return interact_return + + return NONE + +/** + * + * ## Tool Act + * + * Handles using specific tools on this atom directly. + * + * Handles the tool_acts in particular, such as wrenches and screwdrivers. + * + * This can be overriden to handle unique "tool interactions" + * IE using an item like a tool (when it's not actually one) + * but otherwise does nothing that [item_interaction] doesn't already do. + * + * In other words, use sparingly. It's harder to use (correctly) than [item_interaction]. + */ +/atom/proc/tool_act(mob/living/user, obj/item/tool, list/modifiers) + SHOULD_CALL_PARENT(TRUE) + PROTECTED_PROC(TRUE) + + if(SEND_SIGNAL(src, COMSIG_TOOL_ATTACK, tool, user) & COMPONENT_CANCEL_TOOLACT) + return FALSE + + var/tool_type = tool.tool_behaviour + if(!tool_type) + return NONE + + var/act_result = NONE // or FALSE, or null, as some things may return + + switch(tool_type) + if(TOOL_CROWBAR) + act_result = crowbar_act(user, tool) + if(TOOL_MULTITOOL) + act_result = multitool_act(user, tool) + if(TOOL_SCREWDRIVER) + act_result = screwdriver_act(user, tool) + if(TOOL_WRENCH) + act_result = wrench_act(user, tool) + if(TOOL_WIRECUTTER) + act_result = wirecutter_act(user, tool) + if(TOOL_WELDER) + act_result = welder_act(user, tool) + + if(!act_result) + return NONE + + return act_result + +/** + * Called when this atom has an item used on it. + * IE, a mob is clicking on this atom with an item. + * + * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. + * Return NONE to allow default interaction / tool handling. + */ +/atom/proc/item_interaction(mob/living/user, obj/item/used, list/modifiers) + return NONE + +/** + * Called when this item is being used to interact with an atom, + * IE, a mob is clicking on an atom with this item. + * + * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. + * Return NONE to allow default interaction / tool handling. + */ +/obj/item/proc/interact_with_atom(atom/target, mob/living/user, list/modifiers) + return NONE + +/** + * ## Ranged item interaction + * + * Handles non-combat ranged interactions of a tool on this atom, + * such as shooting a gun in the direction of someone*, + * having a scanner you can point at someone to scan them at any distance, + * or pointing a laser pointer at something. + * + * *While this intuitively sounds combat related, it is not, + * because a "combat use" of a gun is gun-butting. + */ +/atom/proc/base_ranged_item_interaction(mob/living/user, obj/item/tool, list/modifiers) + SHOULD_CALL_PARENT(TRUE) + PROTECTED_PROC(TRUE) + + // See [base_item_interaction] for defails on why this is using `||` (TL;DR it's short circuiting) + var/early_sig_return = SEND_SIGNAL(src, COMSIG_INTERACT_RANGED, user, tool, modifiers) \ + || SEND_SIGNAL(tool, COMSIG_INTERACTING_RANGED, user, src, modifiers) + + if(early_sig_return) + return early_sig_return + + var/self_interaction = ranged_item_interaction(user, tool, modifiers) + if(self_interaction) + return self_interaction + + var/interact_return = tool.ranged_interact_with_atom(src, user, modifiers) + if(interact_return) + return interact_return + + return NONE + +/** + * Called when this atom has an item used on it from a distance. + * IE, a mob is clicking on this atom with an item and is not adjacent. + * + * Does NOT include Telekinesis users, they are considered adjacent generally. + * + * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. + */ +/atom/proc/ranged_item_interaction(mob/living/user, obj/item/tool, list/modifiers) + return NONE + +/** + * Called when this item is being used to interact with an atom from a distance, + * IE, a mob is clicking on an atom with this item and is not adjacent. + * + * Does NOT include Telekinesis users, they are considered adjacent generally + * (so long as this item is adjacent to the atom). + * + * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code. + */ +/obj/item/proc/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) + return NONE diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 838de5d24408d..0f77644ea66c1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -129,6 +129,9 @@ ///When a projectile ricochets off this atom, it deals the normal damage * this modifier to this atom var/receive_ricochet_damage_coeff = 0.33 + /// Whether this atom is using the new attack chain. + var/new_attack_chain = FALSE + /atom/New(loc, ...) SHOULD_CALL_PARENT(TRUE) if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() @@ -549,23 +552,6 @@ if(reagents) reagents.temperature_reagents(exposed_temperature) -/// If it returns TRUE, attack chain stops -/atom/proc/tool_act(mob/living/user, obj/item/I, tool_type) - switch(tool_type) - if(TOOL_CROWBAR) - return crowbar_act(user, I) - if(TOOL_MULTITOOL) - return multitool_act(user, I) - if(TOOL_SCREWDRIVER) - return screwdriver_act(user, I) - if(TOOL_WRENCH) - return wrench_act(user, I) - if(TOOL_WIRECUTTER) - return wirecutter_act(user, I) - if(TOOL_WELDER) - return welder_act(user, I) - - // Tool-specific behavior procs. To be overridden in subtypes. /atom/proc/crowbar_act(mob/living/user, obj/item/I) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ba00d87662230..0af9086620762 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -504,9 +504,9 @@ verbs.Cut() return -/atom/movable/overlay/attackby(a, b, c) +/atom/movable/overlay/attackby__legacy__attackchain(a, b, c) if(master) - return master.attackby(a, b, c) + return master.attackby__legacy__attackchain(a, b, c) /atom/movable/overlay/attack_hand(a, b, c) if(master) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 3e140fca048e2..c85ff6a05c3b1 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -190,7 +190,7 @@ QDEL_LIST_CONTENTS(L.grabbed_by) return TRUE -/obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params) +/obj/machinery/dna_scannernew/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") @@ -327,7 +327,7 @@ idle_power_consumption = 10 active_power_consumption = 400 -/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params) +/obj/machinery/computer/scan_consolenew/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/disk/data)) //INSERT SOME diskS if(!disk) user.drop_item() diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index 348345a6aee57..6f97e380e15eb 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -410,10 +410,10 @@ /obj/item/melee/blood_magic/customised_abstract_text(mob/living/carbon/owner) return "[owner.p_their(TRUE)] [owner.l_hand == src ? "left hand" : "right hand"] is burning in blood-red fire." -/obj/item/melee/blood_magic/attack_self(mob/living/user) - afterattack(user, user, TRUE) +/obj/item/melee/blood_magic/attack_self__legacy__attackchain(mob/living/user) + attackby__legacy__attackchain(user, user, TRUE) -/obj/item/melee/blood_magic/attack(mob/living/M, mob/living/carbon/user) +/obj/item/melee/blood_magic/attack__legacy__attackchain(mob/living/M, mob/living/carbon/user) if(!iscarbon(user) || !IS_CULTIST(user)) uses = 0 qdel(src) @@ -421,7 +421,7 @@ add_attack_logs(user, M, "used a cult spell ([src]) on") M.lastattacker = user.real_name -/obj/item/melee/blood_magic/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/blood_magic/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) . = ..() if(invocation) user.whisper(invocation) @@ -443,7 +443,7 @@ color = RUNE_COLOR_RED invocation = "Fuu ma'jin!" -/obj/item/melee/blood_magic/stun/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/blood_magic/stun/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!isliving(target) || !proximity) return var/mob/living/L = target @@ -489,7 +489,7 @@ desc = "Will teleport a cultist to a teleport rune on contact." invocation = "Sas'so c'arta forbici!" -/obj/item/melee/blood_magic/teleport/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/blood_magic/teleport/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(user.holy_check()) return var/list/potential_runes = list() @@ -563,7 +563,7 @@ invocation = "In'totum Lig'abis!" color = "#000000" // black -/obj/item/melee/blood_magic/shackles/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/blood_magic/shackles/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(user.holy_check()) return if(iscarbon(target) && proximity) @@ -626,7 +626,7 @@ [METAL_TO_CONSTRUCT_SHELL_CONVERSION] metal into a construct shell\n Airlocks into brittle runed airlocks after a delay (harm intent)"} -/obj/item/melee/blood_magic/construction/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/melee/blood_magic/construction/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) if(user.holy_check()) return if(proximity_flag) @@ -682,7 +682,7 @@ desc = "Will equipt cult combat gear onto a cultist on contact." color = "#33cc33" // green -/obj/item/melee/blood_magic/armor/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/blood_magic/armor/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(user.holy_check()) return if(iscarbon(target) && proximity) @@ -707,7 +707,7 @@ color = "#9c0651" has_source = FALSE //special, only availible for a blood cost. -/obj/item/melee/blood_magic/empower/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/melee/blood_magic/empower/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) if(user.holy_check()) return if(proximity_flag) @@ -857,7 +857,7 @@ new /obj/effect/temp_visual/cult/sparks(get_turf(H)) // This should really be split into multiple procs -/obj/item/melee/blood_magic/manipulator/afterattack(atom/target, mob/living/carbon/human/user, proximity) +/obj/item/melee/blood_magic/manipulator/afterattack__legacy__attackchain(atom/target, mob/living/carbon/human/user, proximity) if(user.holy_check()) return if(!proximity) @@ -912,7 +912,7 @@ to_chat(user, "Your blood rite has gained [temp] charge\s from blood sources around you!") uses += max(1, temp) -/obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user) +/obj/item/melee/blood_magic/manipulator/attack_self__legacy__attackchain(mob/living/user) if(user.holy_check()) return var/list/options = list("Blood Orb (50)" = image(icon = 'icons/obj/cult.dmi', icon_state = "summoning_orb"), diff --git a/code/game/gamemodes/cult/cult_actions.dm b/code/game/gamemodes/cult/cult_actions.dm index 315350410ebb7..83c1b3155bbbe 100644 --- a/code/game/gamemodes/cult/cult_actions.dm +++ b/code/game/gamemodes/cult/cult_actions.dm @@ -123,6 +123,6 @@ if(D) owner.remove_from_mob(D) owner.put_in_hands(D) - D.attack_self(owner) + D.activate_self(owner) else to_chat(usr, "You do not seem to carry a ritual dagger to draw a rune with. If you need a new one, prepare and use the Summon Dagger spell.") diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index f05682e9d1b17..053ecf814bff2 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -23,6 +23,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sprite_sheets_inhand = list("Skrell" = 'icons/mob/clothing/species/skrell/held.dmi') // To stop skrell stabbing themselves in the head + new_attack_chain = TRUE /obj/item/melee/cultblade/Initialize(mapload) . = ..() @@ -33,7 +34,10 @@ . = ..() . += "This blade is a powerful weapon, capable of severing limbs easily. Nonbelievers are unable to use this weapon. Striking a nonbeliever after downing them with your cult magic will stun them completely." -/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user) +/obj/item/melee/cultblade/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + if(!IS_CULTIST(user)) user.Weaken(10 SECONDS) user.unEquip(src, 1) @@ -44,12 +48,17 @@ H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) else user.adjustBruteLoss(rand(force/2, force)) - return + + return FINISH_ATTACK + +/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user) + if(..()) + return FINISH_ATTACK + if(!IS_CULTIST(target)) var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN) if(S) S.trigger() - ..() /obj/item/melee/cultblade/pickup(mob/living/user) . = ..() @@ -241,7 +250,7 @@ /obj/item/whetstone/cult/update_icon_state() icon_state = "cult_sharpener[used ? "_used" : ""]" -/obj/item/whetstone/cult/attackby(obj/item/I, mob/user, params) +/obj/item/whetstone/cult/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(used) to_chat(user, "[src] crumbles to ashes.") @@ -281,7 +290,7 @@ icon_state ="shuttlecurse" var/global/curselimit = 0 -/obj/item/shuttle_curse/attack_self(mob/living/user) +/obj/item/shuttle_curse/attack_self__legacy__attackchain(mob/living/user) if(!IS_CULTIST(user)) user.unEquip(src, 1) user.Weaken(10 SECONDS) @@ -330,7 +339,7 @@ pulled.forceMove(turf_behind) . = pulled -/obj/item/cult_shift/attack_self(mob/user) +/obj/item/cult_shift/attack_self__legacy__attackchain(mob/user) if(!uses || !iscarbon(user)) to_chat(user, "[src] is dull and unmoving in your hands.") @@ -625,7 +634,7 @@ playsound(T, 'sound/effects/glassbr3.ogg', 100) qdel(src) -/obj/item/cult_spear/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/cult_spear/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) . = ..() var/datum/status_effect/cult_stun_mark/S = M.has_status_effect(STATUS_EFFECT_CULT_STUN) if(S && HAS_TRAIT(src, TRAIT_WIELDED)) @@ -671,7 +680,7 @@ fire_sound = 'sound/magic/wand_teleport.ogg' flags = NOBLUDGEON | DROPDEL -/obj/item/gun/projectile/shotgun/boltaction/enchanted/arcane_barrage/blood/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/projectile/shotgun/boltaction/enchanted/arcane_barrage/blood/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(user.holy_check()) return ..() @@ -722,7 +731,7 @@ w_class = WEIGHT_CLASS_SMALL -/obj/item/portal_amulet/afterattack(atom/O, mob/user, proximity) +/obj/item/portal_amulet/afterattack__legacy__attackchain(atom/O, mob/user, proximity) . = ..() if(!IS_CULTIST(user)) if(!iscarbon(user)) @@ -802,7 +811,7 @@ if(target) exit = new /obj/effect/cult_portal_exit(target) -/obj/effect/portal/cult/attackby(obj/I, mob/user, params) +/obj/effect/portal/cult/attackby__legacy__attackchain(obj/I, mob/user, params) if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user) || istype(I, /obj/item/nullrod) && HAS_MIND_TRAIT(user, TRAIT_HOLY)) to_chat(user, "You close the portal with your [I].") playsound(src, 'sound/magic/magic_missile.ogg', 100, TRUE) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index eea528a729b45..b948bad9da635 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -52,7 +52,7 @@ . += "The magic in [src] is weak, it will be ready to use again in [get_ETA()]." . += "[src] is [anchored ? "":"not "]secured to the floor." -/obj/structure/cult/functional/attackby(obj/item/I, mob/user, params) +/obj/structure/cult/functional/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user)) if(user.holy_check()) return @@ -180,7 +180,7 @@ . = ..() icon_state = GET_CULT_DATA(forge_icon_state, "forge") -/obj/structure/cult/functional/forge/attackby(obj/item/I, mob/user, params) +/obj/structure/cult/functional/forge/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I if(!iscarbon(G.affecting)) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index e20ec8dba5e33..fd1e6f3f1438b 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -32,28 +32,31 @@ . += "Striking another cultist with it will purge holy water from them." . += "Striking a noncultist will tear their flesh, additionally, if you recently downed them with cult magic it will stun them completely." -/obj/item/melee/cultblade/dagger/attack(mob/living/M, mob/living/user) - if(IS_CULTIST(M)) - if(M.reagents && M.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion - if(M == user) // Targeting yourself +/obj/item/melee/cultblade/dagger/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + + if(IS_CULTIST(target)) + if(target.reagents && target.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion + if(target == user) // Targeting yourself to_chat(user, "You can't remove holy water from yourself!") + else // Targeting someone else - to_chat(user, "You remove the taint from [M].") - to_chat(M, "[user] removes the taint from your body.") - M.reagents.del_reagent("holywater") - add_attack_logs(user, M, "Hit with [src], removing the holy water from them") - return FALSE - else - var/datum/status_effect/cult_stun_mark/S = M.has_status_effect(STATUS_EFFECT_CULT_STUN) - if(S) - S.trigger() - . = ..() + to_chat(user, "You remove the taint from [target].") + to_chat(target, "[user] removes the taint from your body.") + target.reagents.del_reagent("holywater") + add_attack_logs(user, target, "Hit with [src], removing the holy water from them") -/obj/item/melee/cultblade/dagger/attack_self(mob/user) - if(!IS_CULTIST(user)) - to_chat(user, "[src] is covered in unintelligible shapes and markings.") + return FINISH_ATTACK + +/obj/item/melee/cultblade/dagger/activate_self(mob/user) + if(..()) return - scribe_rune(user) + + if(IS_CULTIST(user)) + scribe_rune(user) + else + to_chat(user, "[src] is covered in unintelligible shapes and markings.") /obj/item/melee/cultblade/dagger/proc/narsie_rune_check(mob/living/user, area/A) var/datum/game_mode/gamemode = SSticker.mode @@ -97,7 +100,6 @@ return FALSE return TRUE - /obj/item/melee/cultblade/dagger/proc/scribe_rune(mob/living/user) var/list/shields = list() var/list/possible_runes = list() diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 55674d5770570..ebe886ff10c6e 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -75,7 +75,7 @@ To draw a rune, use a ritual dagger. if(req_keyword && keyword) . += "Keyword: [keyword]" -/obj/effect/rune/attackby(obj/I, mob/user, params) +/obj/effect/rune/attackby__legacy__attackchain(obj/I, mob/user, params) if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user)) if(!can_dagger_erase_rune(user)) return @@ -1098,7 +1098,7 @@ structure_check() searches for nearby cultist structures required for the invoca sleep(40) new /obj/singularity/narsie/large(T) //Causes Nar'Sie to spawn even if the rune has been removed -/obj/effect/rune/narsie/attackby(obj/I, mob/user, params) //Since the narsie rune takes a long time to make, add logging to removal. +/obj/effect/rune/narsie/attackby__legacy__attackchain(obj/I, mob/user, params) //Since the narsie rune takes a long time to make, add logging to removal. if((istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user))) log_game("Summon Narsie rune erased by [key_name(user)] with a cult dagger") message_admins("[key_name_admin(user)] erased a Narsie rune with a cult dagger") diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 235cab74862eb..02bc96a04065a 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -191,12 +191,12 @@ CONTENTS: item_state = "silencer" origin_tech = "materials=4;programming=7;abductor=3" -/obj/item/abductor/silencer/attack(mob/living/M, mob/user) +/obj/item/abductor/silencer/attack__legacy__attackchain(mob/living/M, mob/user) if(!AbductorCheck(user)) return radio_off(M, user) -/obj/item/abductor/silencer/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/abductor/silencer/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(flag) return if(!AbductorCheck(user)) @@ -284,7 +284,7 @@ CONTENTS: icon_state = "wonderprodProbe" item_state = "wonderprodProbe" -/obj/item/abductor_baton/attack(mob/target, mob/living/user) +/obj/item/abductor_baton/attack__legacy__attackchain(mob/target, mob/living/user) if(!isabductor(user)) return @@ -316,7 +316,7 @@ CONTENTS: if(BATON_PROBE) ProbeAttack(L,user) -/obj/item/abductor_baton/attack_self(mob/living/user) +/obj/item/abductor_baton/attack_self__legacy__attackchain(mob/living/user) toggle(user) if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -449,7 +449,7 @@ CONTENTS: var/mob/living/marked = null var/obj/machinery/abductor/console/console -/obj/item/abductor/gizmo/attack_self(mob/user) +/obj/item/abductor/gizmo/attack_self__legacy__attackchain(mob/user) if(!ScientistCheck(user)) return if(!console) @@ -464,7 +464,7 @@ CONTENTS: icon_state = "gizmo_scan" to_chat(user, "You switch the device to [mode==GIZMO_SCAN? "SCAN": "MARK"] MODE") -/obj/item/abductor/gizmo/attack(mob/living/M, mob/user) +/obj/item/abductor/gizmo/attack__legacy__attackchain(mob/living/M, mob/user) if(!ScientistCheck(user)) return if(!console) @@ -477,7 +477,7 @@ CONTENTS: if(GIZMO_MARK) mark(M, user) -/obj/item/abductor/gizmo/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/abductor/gizmo/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(flag) return if(!ScientistCheck(user)) @@ -531,7 +531,7 @@ CONTENTS: item_state = "silencer" var/mode = MIND_DEVICE_MESSAGE -/obj/item/abductor/mind_device/attack_self(mob/user) +/obj/item/abductor/mind_device/attack_self__legacy__attackchain(mob/user) if(!ScientistCheck(user)) return @@ -543,7 +543,7 @@ CONTENTS: icon_state = "mind_device_message" to_chat(user, "You switch the device to [mode == MIND_DEVICE_MESSAGE ? "TRANSMISSION" : "COMMAND"] MODE") -/obj/item/abductor/mind_device/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/abductor/mind_device/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(!ScientistCheck(user)) return diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm index db6453bcb7f9d..f1539a9929176 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/console.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/console.dm @@ -218,7 +218,7 @@ vest = V return TRUE -/obj/machinery/abductor/console/attackby(obj/O, mob/user, params) +/obj/machinery/abductor/console/attackby__legacy__attackchain(obj/O, mob/user, params) if(istype(O, /obj/item/abductor/gizmo) && AddGizmo(O)) to_chat(user, "You link the tool to the console.") else if(istype(O, /obj/item/clothing/suit/armor/abductor/vest) && AddVest(O)) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm b/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm index 9d13aa35d047a..9d70325835a9f 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm @@ -82,7 +82,7 @@ return ui_interact(user) -/obj/machinery/abductor/gland_dispenser/attackby(obj/item/W, mob/user, params) +/obj/machinery/abductor/gland_dispenser/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/organ/internal/heart/gland)) if(!user.drop_item()) return diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 1ee6822d206bd..339d4f4e77372 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -174,7 +174,7 @@ H.clear_restraints() return -/obj/machinery/abductor/experiment/attackby(obj/item/G, mob/user) +/obj/machinery/abductor/experiment/attackby__legacy__attackchain(obj/item/G, mob/user) if(istype(G, /obj/item/grab)) var/obj/item/grab/grabbed = G if(!ishuman(grabbed.affecting)) diff --git a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm index df69ab5e4d211..df5df3aae74a1 100644 --- a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm +++ b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm @@ -230,7 +230,7 @@ desc = "It still beats furiously, emitting an aura of fear." color = COLOR_BLACK -/obj/item/organ/internal/heart/demon/shadow/attack_self(mob/living/user) +/obj/item/organ/internal/heart/demon/shadow/attack_self__legacy__attackchain(mob/living/user) . = ..() user.drop_item() insert(user) diff --git a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm index beb1b7ae99c84..67e9eca6a599a 100644 --- a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm +++ b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm @@ -220,7 +220,7 @@ /obj/item/organ/internal/heart/demon/prepare_eat() return // Just so people don't accidentally waste it -/obj/item/organ/internal/heart/demon/attack_self(mob/living/user) +/obj/item/organ/internal/heart/demon/attack_self__legacy__attackchain(mob/living/user) user.visible_message("[user] raises [src] to [user.p_their()] mouth and tears into it with [user.p_their()] teeth!", \ "An unnatural hunger consumes you. You raise [src] to your mouth and devour it!") playsound(user, 'sound/misc/demon_consume.ogg', 50, 1) @@ -230,7 +230,7 @@ //The loot from killing a slaughter demon - can be consumed to allow the user to blood crawl /// SLAUGHTER DEMON HEART -/obj/item/organ/internal/heart/demon/slaughter/attack_self(mob/living/user) +/obj/item/organ/internal/heart/demon/slaughter/attack_self__legacy__attackchain(mob/living/user) ..() // Eating the heart for the first time. Gives basic bloodcrawling. This is the only time we need to insert the heart. diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 77eb510f82d27..83e47bff1c163 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -279,7 +279,7 @@ "Blue" = "#0000FF") var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") -/obj/item/guardiancreator/attack_self(mob/living/user) +/obj/item/guardiancreator/attack_self__legacy__attackchain(mob/living/user) if(has_guardian(user)) to_chat(user, "You already have a [mob_name]!") return diff --git a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm index cd90466c93f15..8ed033b7f9cbb 100644 --- a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm @@ -90,7 +90,7 @@ user.Stun(3 SECONDS)//A bomb went off in your hands. Actually lets people follow up with it if they bait someone, right now it is unreliable. qdel(src) -/obj/item/guardian_bomb/attackby(obj/item/W, mob/living/user) +/obj/item/guardian_bomb/attackby__legacy__attackchain(obj/item/W, mob/living/user) detonate(user) /obj/item/guardian_bomb/attack_hand(mob/user) diff --git a/code/game/gamemodes/miniantags/guardian/types/protector.dm b/code/game/gamemodes/miniantags/guardian/types/protector.dm index 2be939f8cff59..e385fd1e329d4 100644 --- a/code/game/gamemodes/miniantags/guardian/types/protector.dm +++ b/code/game/gamemodes/miniantags/guardian/types/protector.dm @@ -137,7 +137,7 @@ P.on_hit(src, 0) return FALSE -/obj/effect/guardianshield/attacked_by(obj/item/I, mob/living/user) +/obj/effect/guardianshield/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) if(I.force) user.visible_message("[user] has hit [src] with [I]!", "You hit [src] with [I]!") linked_guardian.apply_damage(I.force, I.damtype) diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 1379ec4abfec9..8e05021c240ce 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -220,7 +220,7 @@ #define MORPH_ATTACKED if((. = ..()) && morphed) mimic_spell.restore_form(src) -/mob/living/simple_animal/hostile/morph/attackby(obj/item/O, mob/living/user) +/mob/living/simple_animal/hostile/morph/attackby__legacy__attackchain(obj/item/O, mob/living/user) if(user.a_intent == INTENT_HELP && ambush_prepared) to_chat(user, "You try to use [O] on [src]... it seems different than no-") ambush_attack(user, TRUE) diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm index 6a768f9d6bacc..c8ef3b159adbc 100644 --- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm +++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm @@ -745,7 +745,7 @@ visible_message("[M] [response_harm] [src].") try_attack_mob(M) -/mob/living/simple_animal/demon/pulse_demon/attackby(obj/item/O, mob/living/user) +/mob/living/simple_animal/demon/pulse_demon/attackby__legacy__attackchain(obj/item/O, mob/living/user) if(is_under_tile()) to_chat(user, "You can't interact with something that's under the floor!") return @@ -821,7 +821,7 @@ . = ..() set_light(13, 2, "#bbbb00") -/obj/item/organ/internal/heart/demon/pulse/attack_self(mob/living/user) +/obj/item/organ/internal/heart/demon/pulse/attack_self__legacy__attackchain(mob/living/user) . = ..() user.drop_item() insert(user) diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 1bf8400c4142c..3719b54a9881f 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -228,7 +228,7 @@ ghostize() qdel(src) -/mob/living/simple_animal/revenant/attackby(obj/item/W, mob/living/user, params) +/mob/living/simple_animal/revenant/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/nullrod)) visible_message("[src] violently flinches!", \ "As \the [W] passes through you, you feel your essence draining away!") diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index b170895fd6f36..0a167ec7724c4 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -378,12 +378,12 @@ possessed_object.escape_chance = 100 // We cannot be contained ADD_TRAIT(possessed_object, TRAIT_DODGE_ALL_OBJECTS, "Revenant") - addtimer(CALLBACK(src, PROC_REF(attack), possessed_object, user), 1 SECONDS, TIMER_UNIQUE) // Short warm-up for floaty ambience - attack_timers.Add(addtimer(CALLBACK(src, PROC_REF(attack), possessed_object, user), 4 SECONDS, TIMER_UNIQUE|TIMER_LOOP|TIMER_STOPPABLE)) // 5 second looping attacks + addtimer(CALLBACK(src, PROC_REF(attack__legacy__attackchain), possessed_object, user), 1 SECONDS, TIMER_UNIQUE) // Short warm-up for floaty ambience + attack_timers.Add(addtimer(CALLBACK(src, PROC_REF(attack__legacy__attackchain), possessed_object, user), 4 SECONDS, TIMER_UNIQUE|TIMER_LOOP|TIMER_STOPPABLE)) // 5 second looping attacks addtimer(CALLBACK(possessed_object, TYPE_PROC_REF(/mob/living/simple_animal/possessed_object, death)), 70 SECONDS, TIMER_UNIQUE) // De-haunt the object /// Handles finding a valid target and throwing us at it -/datum/spell/aoe/revenant/haunt_object/proc/attack(mob/living/simple_animal/possessed_object/possessed_object, mob/living/simple_animal/revenant/user) +/datum/spell/aoe/revenant/haunt_object/proc/attack__legacy__attackchain(mob/living/simple_animal/possessed_object/possessed_object, mob/living/simple_animal/revenant/user) var/list/potential_victims = list() for(var/turf/turf_to_search in spiral_range_turfs(aoe_range, get_turf(possessed_object))) for(var/mob/living/carbon/potential_victim in turf_to_search) diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 59906b7316587..e0ce8b2b03864 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -16,7 +16,7 @@ var/declaring_war = FALSE var/total_tc = 0 //Total amount of telecrystals shared between nuke ops -/obj/item/nuclear_challenge/attack_self(mob/living/user) +/obj/item/nuclear_challenge/attack_self__legacy__attackchain(mob/living/user) if(!check_allowed(user)) return diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 39456a29c8cc4..62423bd03a4c2 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -168,7 +168,7 @@ GLOBAL_VAR(bomb_set) if(NUKE_CORE_FULLY_EXPOSED) . += core ? "nukecore3" : "nukecore4" -/obj/machinery/nuclearbomb/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/machinery/nuclearbomb/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/disk/nuclear)) if(extended) if(auth) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index a8106a2d21076..c316b9a78cd66 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -55,7 +55,7 @@ else if(mode == MODE_NUKE) workbomb() -/obj/item/pinpointer/attack_self(mob/user) +/obj/item/pinpointer/attack_self__legacy__attackchain(mob/user) if(mode == PINPOINTER_MODE_DET) return cycle(user) @@ -396,7 +396,7 @@ ///Var to track the linked detective gun var/linked_gun_UID -/obj/item/pinpointer/crew/attackby(obj/item/I, mob/living/user) +/obj/item/pinpointer/crew/attackby__legacy__attackchain(obj/item/I, mob/living/user) . = ..() if(istype(I, /obj/item/gun/energy/detective)) link_gun(I.UID()) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index cd7d2b48e911f..d9162487b06fa 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -59,7 +59,7 @@ dust_if_respawnable(C) -/obj/item/contract/attack_self(mob/user as mob) +/obj/item/contract/attack_self__legacy__attackchain(mob/user as mob) if(..()) return @@ -88,7 +88,7 @@ var/activate_descriptor = "reality" var/rend_desc = "You should run now." -/obj/item/veilrender/attack_self(mob/user as mob) +/obj/item/veilrender/attack_self__legacy__attackchain(mob/user as mob) if(charged) new /obj/effect/rend(get_turf(user), spawn_type, spawn_amt, rend_desc) charged = 0 @@ -128,7 +128,7 @@ if(spawn_amt_left <= 0) qdel(src) -/obj/effect/rend/attackby(obj/item/I as obj, mob/user as mob) +/obj/effect/rend/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/nullrod)) user.visible_message("[user] seals \the [src] with \the [I].") qdel(src) @@ -213,7 +213,7 @@ current_owner.update_sight() current_owner.update_icons() -/obj/item/scrying/attack_self(mob/user as mob) +/obj/item/scrying/attack_self__legacy__attackchain(mob/user as mob) if(in_use) return in_use = TRUE @@ -286,13 +286,13 @@ GLOBAL_LIST_EMPTY(multiverse) GLOB.multiverse.Remove(src) return ..() -/obj/item/multisword/attack(mob/living/M as mob, mob/living/user as mob) //to prevent accidental friendly fire or out and out grief. +/obj/item/multisword/attack__legacy__attackchain(mob/living/M as mob, mob/living/user as mob) //to prevent accidental friendly fire or out and out grief. if(M.real_name == user.real_name) to_chat(user, "[src] detects benevolent energies in your target and redirects your attack!") return ..() -/obj/item/multisword/attack_self(mob/user) +/obj/item/multisword/attack_self__legacy__attackchain(mob/user) if(user.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE) to_chat(user, "You know better than to touch your teacher's stuff.") return @@ -689,7 +689,7 @@ GLOBAL_LIST_EMPTY(multiverse) if(cooldown_time_left) . += "[src] is being strained by the amount of risen skeletons thralls. It cannot be used to rise another skeleton thrall for [cooldown_time_left / 10] seconds." -/obj/item/necromantic_stone/attack(mob/living/carbon/human/victim, mob/living/carbon/human/necromancer) +/obj/item/necromantic_stone/attack__legacy__attackchain(mob/living/carbon/human/victim, mob/living/carbon/human/necromancer) if(!istype(victim) || !istype(necromancer)) return ..() @@ -855,7 +855,7 @@ GLOBAL_LIST_EMPTY(multiverse) desc = "An enchanted mug which can be filled with any of various liquids on command." icon_state = "evermug" -/obj/item/reagent_containers/drinks/everfull/attack_self(mob/user) +/obj/item/reagent_containers/drinks/everfull/attack_self__legacy__attackchain(mob/user) var/static/list/options = list("Omnizine" = image(icon = 'icons/obj/storage.dmi', icon_state = "firstaid"), "Ale" = image(icon = 'icons/obj/drinks.dmi', icon_state = "alebottle"), "Wine" = image(icon = 'icons/obj/drinks.dmi', icon_state = "wineglass"), diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 592de13f2b91e..7481db80dc9e9 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -29,7 +29,7 @@ /obj/item/melee/touch_attack/customised_abstract_text(mob/living/carbon/owner) return "[owner.p_their(TRUE)] [owner.l_hand == src ? "left hand" : "right hand"] is burning in magic fire." -/obj/item/melee/touch_attack/attack(mob/target, mob/living/carbon/user) +/obj/item/melee/touch_attack/attack__legacy__attackchain(mob/target, mob/living/carbon/user) if(!iscarbon(user)) //Look ma, no hands return if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) @@ -37,7 +37,7 @@ return ..() -/obj/item/melee/touch_attack/afterattack(atom/target, mob/user, proximity) +/obj/item/melee/touch_attack/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(catchphrase) user.say(catchphrase) playsound(get_turf(user), on_use_sound, 50, 1) @@ -53,7 +53,7 @@ icon_state = "disintegrate" item_state = "disintegrate" -/obj/item/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad return var/mob/M = target @@ -69,7 +69,7 @@ icon_state = "fleshtostone" item_state = "fleshtostone" -/obj/item/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/fleshtostone/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad return var/mob/living/L = target @@ -86,7 +86,7 @@ item_state = "disintegrate" needs_permit = FALSE -/obj/item/melee/touch_attack/fake_disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/fake_disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad return do_sparks(4, 0, target.loc) @@ -101,7 +101,7 @@ icon_state = "cluwnecurse" item_state = "cluwnecurse" -/obj/item/melee/touch_attack/cluwne/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/melee/touch_attack/cluwne/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //clowning around after touching yourself would unsurprisingly, be bad return diff --git a/code/game/gamemodes/wizard/magic_tarot.dm b/code/game/gamemodes/wizard/magic_tarot.dm index 9eed402337ce6..5f7eed073e965 100644 --- a/code/game/gamemodes/wizard/magic_tarot.dm +++ b/code/game/gamemodes/wizard/magic_tarot.dm @@ -16,7 +16,7 @@ maximum_cards = 5 our_card_cooldown_time = 12 SECONDS // A minute for a full hand of 5 cards -/obj/item/tarot_generator/attack_self(mob/user) +/obj/item/tarot_generator/attack_self__legacy__attackchain(mob/user) if(!COOLDOWN_FINISHED(src, card_cooldown)) to_chat(user, "[src]'s magic is still recovering from the last card, wait [round(COOLDOWN_TIMELEFT(src, card_cooldown) / 10)] more second\s!") return @@ -50,7 +50,7 @@ ///How many cards in a pack. 3 in base, 5 in jumbo, 7 in mega var/cards = 3 -/obj/item/tarot_card_pack/attack_self(mob/user) +/obj/item/tarot_card_pack/attack_self__legacy__attackchain(mob/user) user.visible_message("[user] tears open [src].", \ "You tear open [src]!") playsound(loc, 'sound/items/poster_ripped.ogg', 50, TRUE) @@ -92,7 +92,7 @@ else . += "We have the Ink... Could you provide your Vision instead?" -/obj/item/blank_tarot_card/attack_self(mob/user) +/obj/item/blank_tarot_card/attack_self__legacy__attackchain(mob/user) if(!ishuman(user)) return if(!let_people_choose) @@ -181,7 +181,7 @@ if(!face_down) . += "[src] [our_tarot.extended_desc]" -/obj/item/magic_tarot_card/attack_self(mob/user) +/obj/item/magic_tarot_card/attack_self__legacy__attackchain(mob/user) poof() if(has_been_activated) return diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 7e3c863c14817..3d45da2bab258 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -87,7 +87,7 @@ animate(offset = 0, time = 10 SECONDS) //////////////////////////////Capturing//////////////////////////////////////////////////////// -/obj/item/soulstone/attack(mob/living/carbon/human/M, mob/living/user) +/obj/item/soulstone/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user) if(M == user) return @@ -169,7 +169,7 @@ transfer_soul("VICTIM", M, user) return -/obj/item/soulstone/attackby(obj/item/O, mob/user) +/obj/item/soulstone/attackby__legacy__attackchain(obj/item/O, mob/user) if(istype(O, /obj/item/storage/bible) && !IS_CULTIST(user) && HAS_MIND_TRAIT(user, TRAIT_HOLY)) if(purified) return @@ -221,7 +221,7 @@ else ..() -/obj/item/soulstone/attack_self(mob/living/user) +/obj/item/soulstone/attack_self__legacy__attackchain(mob/living/user) var/mob/living/simple_animal/shade/S = locate(/mob/living/simple_animal/shade) in contents if(!in_range(src, user) || !S) return @@ -287,7 +287,7 @@ . += "A Wraith, which does high damage and can jaunt through walls, though it is quite fragile." . += "A Juggernaut, which is very hard to kill and can produce temporary walls, but is slow." -/obj/structure/constructshell/attackby(obj/item/I, mob/living/user, params) +/obj/structure/constructshell/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/soulstone)) var/obj/item/soulstone/SS = I if(!SS.can_use(user)) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 4df54ff12eef7..60b8ac422dd8b 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -734,7 +734,7 @@ ..() initialize() -/obj/item/spellbook/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/item/spellbook/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/contract)) var/obj/item/contract/contract = O if(contract.used) @@ -850,7 +850,7 @@ dat += {"[content]"} return dat -/obj/item/spellbook/attack_self(mob/user as mob) +/obj/item/spellbook/attack_self__legacy__attackchain(mob/user as mob) if(!owner) to_chat(user, "You bind the spellbook to yourself.") owner = user @@ -953,7 +953,7 @@ tab = loadout_categories[1] else if(href_list["page"]) tab = sanitize(href_list["page"]) - attack_self(H) + attack_self__legacy__attackchain(H) return 1 //Single Use Spellbooks @@ -972,7 +972,7 @@ /obj/item/spellbook/oneuse/initialize() //No need to init return -/obj/item/spellbook/oneuse/attack_self(mob/user) +/obj/item/spellbook/oneuse/attack_self__legacy__attackchain(mob/user) var/datum/spell/S = new spell for(var/datum/spell/knownspell in user.mind.spell_list) if(knownspell.type == S.type) @@ -998,7 +998,7 @@ used = TRUE user.visible_message("[src] glows dark for a second!") -/obj/item/spellbook/oneuse/attackby() +/obj/item/spellbook/oneuse/attackby__legacy__attackchain() return /obj/item/spellbook/oneuse/fireball diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 5e5edfdcefb3e..b2dfdb8679ccd 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -71,7 +71,7 @@ storedpda = null update_icon() -/obj/machinery/pdapainter/attackby(obj/item/I, mob/user, params) +/obj/machinery/pdapainter/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_unfasten_wrench(user, I)) power_change() return diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index f43731f4d041d..2028a84ea9961 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -300,7 +300,7 @@ return FALSE add_fingerprint(usr) -/obj/machinery/sleeper/attackby(obj/item/I, mob/user, params) +/obj/machinery/sleeper/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) if(!beaker) if(!user.drop_item()) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index b8e25d463c863..ab53feea9596e 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -64,7 +64,7 @@ else icon_state = "bodyscanner-open" -/obj/machinery/bodyscanner/attackby(obj/item/I, mob/user) +/obj/machinery/bodyscanner/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/grab)) var/obj/item/grab/TYPECAST_YOUR_SHIT = I if(panel_open) diff --git a/code/game/machinery/airlock_control/airlock_button.dm b/code/game/machinery/airlock_control/airlock_button.dm index a4821d5269bca..a4f9ed2c77e7b 100644 --- a/code/game/machinery/airlock_control/airlock_button.dm +++ b/code/game/machinery/airlock_control/airlock_button.dm @@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(all_airlock_access_buttons) else icon_state = "access_button_off" -/obj/machinery/access_button/attackby(obj/item/I, mob/user, params) +/obj/machinery/access_button/attackby__legacy__attackchain(obj/item/I, mob/user, params) //Swiping ID on the access button if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) attack_hand(user) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 94a342c7c0f8e..a5c08d677de46 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -50,7 +50,7 @@ component_parts += new /obj/item/stack/sheet/glass(null) RefreshParts() - RegisterSignal(src, COMSIG_TOOL_ATTACK, PROC_REF(on_tool_attack)) + RegisterSignal(src, COMSIG_ATTACK_BY, PROC_REF(on_attack_by)) wires = new(src) files = new /datum/research/autolathe(src) @@ -79,14 +79,15 @@ materials.retrieve_all() return ..() -/obj/machinery/autolathe/proc/on_tool_attack(datum/source, atom/tool, mob/user) - SIGNAL_HANDLER - var/obj/item/I = tool - if(!istype(I)) +/obj/machinery/autolathe/proc/on_attack_by(datum/source, obj/item/attacking, mob/user) + SIGNAL_HANDLER // COMSIG_ATTACK_BY + + if(!istype(attacking)) return + // Allows screwdrivers to be recycled on harm intent - if(I.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent == INTENT_HARM) - return COMPONENT_CANCEL_TOOLACT + if(attacking.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent == INTENT_HARM) + return COMPONENT_SKIP_AFTERATTACK /obj/machinery/autolathe/interact(mob/user) if(shocked && !(stat & NOPOWER)) @@ -262,7 +263,7 @@ data["queue"] = null return data -/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params) +/obj/machinery/autolathe/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(busy) to_chat(user, "The autolathe is busy. Please wait for completion of previous operation.") return TRUE diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ccfe7b5ee88f1..24bd6f3a7c024 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -130,7 +130,7 @@ toggle_cam(null, 0) ..() -/obj/machinery/camera/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/camera/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) var/msg = "You attach [I] into the assembly inner circuits." var/msg2 = "The camera already has that upgrade!" diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 0844f892ac640..9bdd6811c3639 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -36,7 +36,7 @@ . += "The camera assembly is wired, but the maintenence panel needs to be screwed shut." . += "Upgrades can be added to the camera assembly, and removed with a crowbar." -/obj/item/camera_assembly/attackby(obj/item/I, mob/living/user, params) +/obj/item/camera_assembly/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(state == ASSEMBLY_WELDED && iscoil(I)) var/obj/item/stack/cable_coil/C = I if(C.use(2)) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 6904c345779a9..3b1f8c9084380 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -60,7 +60,7 @@ if(charging) . += "Current charge: [round(charging.percent(), 1)]%" -/obj/machinery/cell_charger/attackby(obj/item/I, mob/user, params) +/obj/machinery/cell_charger/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stock_parts/cell) && !panel_open) if(stat & BROKEN) to_chat(user, "[src] is broken!") diff --git a/code/game/machinery/clonepod.dm b/code/game/machinery/clonepod.dm index 9dbbc05c98405..de0a0af13a8b2 100644 --- a/code/game/machinery/clonepod.dm +++ b/code/game/machinery/clonepod.dm @@ -561,7 +561,7 @@ return FALSE //Attackby and x_acts -/obj/machinery/clonepod/attackby(obj/item/I, mob/user, params) +/obj/machinery/clonepod/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.is_open_container()) return diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 3033aa18da7fb..42175880711cd 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -43,7 +43,7 @@ /obj/machinery/computer/holodeck_control/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/computer/holodeck_control/attackby(obj/item/D, mob/user) +/obj/machinery/computer/holodeck_control/attackby__legacy__attackchain(obj/item/D, mob/user) return /obj/machinery/computer/holodeck_control/attack_ghost(mob/user) @@ -265,7 +265,7 @@ pixel_y = -9 layer = ABOVE_OPEN_TURF_LAYER -/turf/simulated/floor/holofloor/attackby(obj/item/W as obj, mob/user as mob, params) +/turf/simulated/floor/holofloor/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) return // HOLOFLOOR DOES NOT GIVE A FUCK @@ -396,7 +396,7 @@ ..() item_color = pick("red","blue","green","purple") -/obj/item/holo/esword/attack_self(mob/living/user as mob) +/obj/item/holo/esword/attack_self__legacy__attackchain(mob/living/user as mob) active = !active if(active) force = 30 @@ -437,7 +437,7 @@ to_chat(user, "The station AI is not to interact with these devices.") return -/obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/machinery/readybutton/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) to_chat(user, "The device is a solid button, there's nothing you can do with it!") /obj/machinery/readybutton/attack_hand(mob/user) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 039962f2145e3..1378b797a8af4 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -16,7 +16,7 @@ QDEL_NULL(brain) return ..() -/obj/structure/ai_core/attackby(obj/item/P, mob/user, params) +/obj/structure/ai_core/attackby__legacy__attackchain(obj/item/P, mob/user, params) switch(state) if(EMPTY_CORE) if(istype(P, /obj/item/circuitboard/aicore)) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 25e4a9d8b6dbc..76fa090b1e1c6 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -992,7 +992,7 @@ else . += "There's a little switch on the bottom. It's flipped up." -/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse +/obj/item/orion_ship/attack_self__legacy__attackchain(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse if(active) return diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index e54c72ea263b1..f8a16c6f5cf87 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -529,7 +529,7 @@ contraband_enabled = !contraband_enabled playsound(src, 'sound/effects/pop.ogg', 50) -/obj/item/circuitboard/rdconsole/attackby(obj/item/I, mob/user, params) +/obj/item/circuitboard/rdconsole/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) if(allowed(user)) user.visible_message("[user] waves [user.p_their()] ID past [src]'s access protocol scanner.", "You swipe your ID past [src]'s access protocol scanner.") @@ -698,7 +698,7 @@ I.play_tool_sound(src) update_icon() -/obj/structure/computerframe/attackby(obj/item/I, mob/user, params) +/obj/structure/computerframe/attackby__legacy__attackchain(obj/item/I, mob/user, params) switch(state) if(STATE_EMPTY) if(!istype(I, /obj/item/circuitboard)) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 0f3b2aee844f0..67247f5aa4759 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -151,7 +151,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) else to_chat(user, "There is nothing to remove from the console.") -/obj/machinery/computer/card/attackby(obj/item/card/id/id_card, mob/user, params) +/obj/machinery/computer/card/attackby__legacy__attackchain(obj/item/card/id/id_card, mob/user, params) if(!istype(id_card)) return ..() diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 063db8a2a9f5b..c858e7668e523 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -47,7 +47,7 @@ P.console = null return ..() -/obj/machinery/computer/cloning/attackby(obj/item/I, mob/user, params) +/obj/machinery/computer/cloning/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!ismultitool(I)) return ..() diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 75817f02ee6b2..b21fa7102b0b8 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -28,7 +28,7 @@ circuit = /obj/item/circuitboard/aiupload_broken return TRUE -/obj/machinery/computer/aiupload/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/aiupload/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(!istype(O, /obj/item/ai_module)) return ..() if(!check_valid_selection(user)) @@ -127,7 +127,7 @@ circuit = /obj/item/circuitboard/borgupload var/mob/living/silicon/robot/current = null -/obj/machinery/computer/borgupload/attackby(obj/item/ai_module/module, mob/user, params) +/obj/machinery/computer/borgupload/attackby__legacy__attackchain(obj/item/ai_module/module, mob/user, params) if(istype(module, /obj/item/ai_module)) if(!current)//no borg selected to_chat(user, "No borg selected. Please chose a target before proceeding with upload.") diff --git a/code/game/machinery/computer/medical_records.dm b/code/game/machinery/computer/medical_records.dm index e3772b0a7910e..377765d49950d 100644 --- a/code/game/machinery/computer/medical_records.dm +++ b/code/game/machinery/computer/medical_records.dm @@ -63,7 +63,7 @@ active2 = null return ..() -/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/med_data/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(ui_login_attackby(O, user)) return return ..() diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index e5f1aeaed1d03..5df576b11705d 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -21,7 +21,7 @@ GLOB.prisoncomputer_list -= src return ..() -/obj/machinery/computer/prisoner/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/prisoner/attackby__legacy__attackchain(obj/item/O, mob/user, params) var/datum/ui_login/state = ui_login_get() if(state.logged_in) var/obj/item/card/id/prisoner/I = O diff --git a/code/game/machinery/computer/security_records.dm b/code/game/machinery/computer/security_records.dm index c983a2212194e..bbcb1ad3a71c7 100644 --- a/code/game/machinery/computer/security_records.dm +++ b/code/game/machinery/computer/security_records.dm @@ -57,7 +57,7 @@ record_security = null return ..() -/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/secure_data/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(ui_login_attackby(O, user)) return return ..() diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9d6613c0c5513..22d9025dc691e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -451,7 +451,7 @@ name = initial(name) -/obj/machinery/cryopod/attackby(obj/item/I, mob/user, params) +/obj/machinery/cryopod/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I diff --git a/code/game/machinery/defib_mount.dm b/code/game/machinery/defib_mount.dm index 96a244da0abef..ea7e911c2f39f 100644 --- a/code/game/machinery/defib_mount.dm +++ b/code/game/machinery/defib_mount.dm @@ -85,7 +85,7 @@ defib.paddles_on_defib = FALSE user.put_in_hands(defib.paddles) -/obj/machinery/defibrillator_mount/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/defibrillator_mount/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/defibrillator)) if(defib) to_chat(user, "There's already a defibrillator in [src]!") diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index ad88ec4a177cb..057eeaa7ce90d 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -94,7 +94,7 @@ stacktype = /obj/item/stack/sheet/wood -/obj/structure/barricade/wooden/attackby(obj/item/I, mob/user) +/obj/structure/barricade/wooden/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I,/obj/item/stack/sheet/wood)) var/obj/item/stack/sheet/wood/W = I if(W.get_amount() < 5) @@ -313,7 +313,7 @@ to_chat(user, "[src] is now in [mode == AUTO ? mode : dir2text(mode)] mode.") -/obj/item/grenade/barrier/dropwall/attack_self(mob/user) +/obj/item/grenade/barrier/dropwall/attack_self__legacy__attackchain(mob/user) . = ..() armer = user @@ -376,7 +376,7 @@ connected_shields += new barricade_type(target_turf2, src, FALSE, direction, dir_right) -/obj/structure/dropwall_generator/attacked_by(obj/item/I, mob/living/user) //No, you can not just go up to the generator and whack it. Central shield needs to go down first. +/obj/structure/dropwall_generator/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) //No, you can not just go up to the generator and whack it. Central shield needs to go down first. if(protected) visible_message("[src]'s shield absorbs the blow!") core_shield.take_damage(I.force, I.damtype, MELEE, TRUE) @@ -466,7 +466,7 @@ item_state = "flashbang" var/owner_uid -/obj/item/grenade/turret/attack_self(mob/user) +/obj/item/grenade/turret/attack_self__legacy__attackchain(mob/user) owner_uid = user.UID() return ..() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index f09c7b56e698f..427dc4585a6c5 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -35,7 +35,7 @@ else to_chat(user, "Error, no route to host.") -/obj/machinery/door_control/attackby(obj/item/W, mob/user as mob, params) +/obj/machinery/door_control/attackby__legacy__attackchain(obj/item/W, mob/user as mob, params) if(istype(W, /obj/item/detective_scanner)) return return ..() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 06d2270ef8a50..a00ac74e8d223 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -971,7 +971,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) else to_chat(user, "The door is now in fast mode.") -/obj/machinery/door/airlock/attackby(obj/item/C, mob/user, params) +/obj/machinery/door/airlock/attackby__legacy__attackchain(obj/item/C, mob/user, params) add_fingerprint(user) if(!headbutt_shock_check(user)) return diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 3b9da5c1be534..1cac4728de0dc 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -29,9 +29,9 @@ "name" = get_access_desc(access), "id" = access)) -/obj/item/airlock_electronics/attack_self(mob/user) - if(!ishuman(user) && !isrobot(user)) - return ..() +/obj/item/airlock_electronics/activate_self(mob/user) + if(..() || (!ishuman(user) && !isrobot(user))) + return if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -108,7 +108,7 @@ name = "burned-out airlock electronics" icon_state = "door_electronics_smoked" -/obj/item/airlock_electronics/destroyed/attack_self(mob/user) +/obj/item/airlock_electronics/destroyed/attack_self__legacy__attackchain(mob/user) return /obj/item/airlock_electronics/destroyed/decompile_act(obj/item/matter_decompiler/C, mob/user) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index f27d0283bb92b..81bbc3a57818e 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -200,7 +200,7 @@ DA.update_appearance(UPDATE_NAME|UPDATE_ICON) qdel(src) -/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params) +/obj/machinery/door/airlock/plasma/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(C.get_heat() > 300) message_admins("Plasma airlock ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)") log_game("Plasma airlock ignited by [key_name(user)] in ([x],[y],[z])") @@ -447,7 +447,7 @@ else lock(TRUE) -/obj/machinery/door/airlock/highsecurity/red/attackby(obj/C, mob/user, params) +/obj/machinery/door/airlock/highsecurity/red/attackby__legacy__attackchain(obj/C, mob/user, params) if(!issilicon(user)) if(isElectrified()) if(shock(user, 75)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 2b7553f0f8698..7307e20e5d2fe 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -256,7 +256,7 @@ /obj/machinery/door/proc/try_to_crowbar(mob/user, obj/item/I) return -/obj/machinery/door/attackby(obj/item/I, mob/user, params) +/obj/machinery/door/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(HAS_TRAIT(src, TRAIT_CMAGGED) && I.can_clean()) //If the cmagged door is being hit with cleaning supplies, don't open it, it's being cleaned! return diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 604cd02766fc7..efc341602041e 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -124,7 +124,7 @@ "You open [src].") open(auto_close = FALSE) -/obj/machinery/door/firedoor/attackby(obj/item/C, mob/user, params) +/obj/machinery/door/firedoor/attackby__legacy__attackchain(obj/item/C, mob/user, params) add_fingerprint(user) if(operating) @@ -387,7 +387,7 @@ /obj/structure/firelock_frame/update_icon_state() icon_state = "frame[constructionStep]" -/obj/structure/firelock_frame/attackby(obj/item/C, mob/user) +/obj/structure/firelock_frame/attackby__legacy__attackchain(obj/item/C, mob/user) switch(constructionStep) if(CONSTRUCTION_PANEL_OPEN) if(istype(C, /obj/item/stack/sheet/plasteel)) diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm index c2330d3633ad7..49a6343e8ee1f 100644 --- a/code/game/machinery/doors/unpowered.dm +++ b/code/game/machinery/doors/unpowered.dm @@ -6,7 +6,7 @@ return ..() -/obj/machinery/door/unpowered/attackby(obj/item/I, mob/user, params) +/obj/machinery/door/unpowered/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(locked) return else diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index ec1a666d415f2..c0f7bac9d8f03 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -304,7 +304,7 @@ operating = NONE return TRUE -/obj/machinery/door/window/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/door/window/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) //If it's in the process of opening/closing, ignore the click if(operating) return diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index f98f27756622c..3c3c9998ee99a 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -35,7 +35,7 @@ UnregisterSignal(SSdcs, COMSIG_GLOB_EXPLOSION) return ..() -/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params) +/obj/machinery/doppler_array/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/disk/tech_disk)) var/obj/item/disk/tech_disk/disk = I disk.load_tech(toxins_tech) diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index a1207bac1c759..32891a83821d5 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -50,7 +50,7 @@ dye_color = temp set_light(2, l_color = temp) -/obj/machinery/dye_generator/attackby(obj/item/I, mob/user, params) +/obj/machinery/dye_generator/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_unfasten_wrench(user, I, time = 60)) return @@ -92,7 +92,7 @@ I.color = dye_color . += I -/obj/item/hair_dye_bottle/attack(mob/living/carbon/M, mob/user) +/obj/item/hair_dye_bottle/attack__legacy__attackchain(mob/living/carbon/M, mob/user) if(user.a_intent != INTENT_HELP) ..() return diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 27e34b3a3903f..e943b88119ed4 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -125,7 +125,7 @@ FIRE ALARM alarm(rand(30/severity, 60/severity)) ..() -/obj/machinery/firealarm/attackby(obj/item/I, mob/user, params) +/obj/machinery/firealarm/attackby__legacy__attackchain(obj/item/I, mob/user, params) add_fingerprint(user) if(wiresexposed) if(buildstage == FIRE_ALARM_UNWIRED) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index e0c6d035b556a..122dc3f8a6252 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -90,7 +90,7 @@ set_light(brightness_on) update_icon(UPDATE_ICON_STATE) -/obj/machinery/floodlight/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/machinery/floodlight/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/stock_parts/cell)) if(open) if(cell) diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 45bf5a158a761..52f90c600d64c 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -60,7 +60,7 @@ . = ..() my_terminal_id = ++global_terminal_id -/obj/machinery/computer/guestpass/attackby(obj/item/I, mob/user, params) +/obj/machinery/computer/guestpass/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id)) if(!scan) if(user.drop_item()) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 431e78e175a53..de84be7ef08cb 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -50,7 +50,7 @@ if(!bag) to_chat(user, "There's no IV bag connected to [src]!") return - bag.afterattack(target, usr, TRUE) + bag.afterattack__legacy__attackchain(target, usr, TRUE) START_PROCESSING(SSmachines, src) /obj/machinery/iv_drip/attack_hand(mob/user) @@ -60,7 +60,7 @@ bag = null update_icon(UPDATE_OVERLAYS) -/obj/machinery/iv_drip/attackby(obj/item/I, mob/user, params) +/obj/machinery/iv_drip/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/iv_bag)) if(bag) to_chat(user, "[src] already has an IV bag!") @@ -74,8 +74,8 @@ update_icon(UPDATE_OVERLAYS) START_PROCESSING(SSmachines, src) else if(bag && istype(I, /obj/item/reagent_containers)) - bag.attackby(I) - I.afterattack(bag, usr, TRUE) + bag.attackby__legacy__attackchain(I) + I.afterattack__legacy__attackchain(bag, usr, TRUE) update_icon(UPDATE_OVERLAYS) else return ..() diff --git a/code/game/machinery/machine_frame.dm b/code/game/machinery/machine_frame.dm index 7c2d80469a574..b5033498d1158 100644 --- a/code/game/machinery/machine_frame.dm +++ b/code/game/machinery/machine_frame.dm @@ -90,7 +90,7 @@ else icon_state = "box_0" -/obj/structure/machine_frame/attackby(obj/item/P, mob/user, params) +/obj/structure/machine_frame/attackby__legacy__attackchain(obj/item/P, mob/living/user, params) switch(state) if(MACHINE_FRAME_EMPTY) if(istype(P, /obj/item/stack/cable_coil)) @@ -788,7 +788,7 @@ to destroy them and players will be able to make replacements. . += "Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch." . += "Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch." -/obj/item/circuitboard/dish_drive/attack_self(mob/living/user) +/obj/item/circuitboard/dish_drive/attack_self__legacy__attackchain(mob/living/user) suction = !suction to_chat(user, "You [suction ? "enable" : "disable"] the board's suction function.") @@ -944,7 +944,7 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/matter_bin = 1) var/target -/obj/item/circuitboard/teleporter_perma/attackby(obj/item/I, mob/living/user, params) +/obj/item/circuitboard/teleporter_perma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/gps)) var/obj/item/gps/L = I if(L.locked_location) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index b325cf00d0fac..00fc7a172ce92 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -354,7 +354,7 @@ reregister_machine() power_change() -/obj/machinery/attackby(obj/item/O, mob/user, params) +/obj/machinery/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(exchange_parts(user, O)) return diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 377050f7902db..c14d22c3cad9e 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -83,7 +83,7 @@ anchored = FALSE var/build = 0 -/obj/machinery/mass_driver_frame/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/mass_driver_frame/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob) switch(build) if(0) // Loose frame if(iswrench(W)) diff --git a/code/game/machinery/merch_vendor.dm b/code/game/machinery/merch_vendor.dm index a96878428da83..17333ba48f366 100644 --- a/code/game/machinery/merch_vendor.dm +++ b/code/game/machinery/merch_vendor.dm @@ -34,7 +34,7 @@ var/pp = replacetext(replacetext("[merch.typepath]", "/obj/item/", ""), "/", "-") imagelist[pp] = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]" -/obj/machinery/economy/merch/attackby(obj/item/I, mob/user) +/obj/machinery/economy/merch/attackby__legacy__attackchain(obj/item/I, mob/user) if(isspacecash(I)) insert_cash(I, user) return TRUE diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index f8d8a0561953e..5568b941a78fa 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -82,7 +82,7 @@ icon_state = "navbeacon[open][invisibility ? "-f" : ""]" // if invisible, set icon to faded version // in case revealed by T-scanner -/obj/machinery/navbeacon/attackby(obj/item/I, mob/user, params) +/obj/machinery/navbeacon/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/turf/T = loc if(T.intact) return // prevent intraction when T-scanner revealed diff --git a/code/game/machinery/pipe/pipe_construction.dm b/code/game/machinery/pipe/pipe_construction.dm index 9f43313f67794..9d549b50a6c51 100644 --- a/code/game/machinery/pipe/pipe_construction.dm +++ b/code/game/machinery/pipe/pipe_construction.dm @@ -336,7 +336,7 @@ else if(pipe_type in list(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W)) dir = 2 -/obj/item/pipe/attack_self(mob/user as mob) +/obj/item/pipe/attack_self__legacy__attackchain(mob/user as mob) return rotate() /obj/item/pipe/wrench_act(mob/user, obj/item/I) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 20abc3eaf8145..77fec4620b94f 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -393,7 +393,7 @@ GLOBAL_LIST_EMPTY(turret_icons) to_chat(user, "You remove the turret but did not manage to salvage anything.") qdel(src) // qdel -/obj/machinery/porta_turret/attackby(obj/item/I, mob/user) +/obj/machinery/porta_turret/attackby__legacy__attackchain(obj/item/I, mob/user) if((stat & BROKEN) && !syndicate) return @@ -874,7 +874,7 @@ GLOBAL_LIST_EMPTY(turret_icons) var/gun_charge = 0 //the gun charge of the gun type installed -/obj/machinery/porta_turret_construct/attackby(obj/item/I, mob/user) +/obj/machinery/porta_turret_construct/attackby__legacy__attackchain(obj/item/I, mob/user) //this is a bit unwieldy but self-explanatory switch(build_step) if(0) //first step diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 27d6fae25cf78..0022fbcf0bc4f 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -30,7 +30,7 @@ for(var/obj/item/stock_parts/capacitor/C in component_parts) recharge_coeff = C.rating -/obj/machinery/recharger/attackby(obj/item/G, mob/user, params) +/obj/machinery/recharger/attackby__legacy__attackchain(obj/item/G, mob/user, params) var/allowed = is_type_in_list(G, allowed_devices) if(!allowed) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index ad2e22fb8c752..4dfa173b2a72f 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -293,7 +293,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) silent = !silent -/obj/machinery/requests_console/attackby(obj/item/I, mob/user) +/obj/machinery/requests_console/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/card/id)) if(inoperable(MAINT)) return diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index c38b77c6fb7d6..5f5723b4d2bcf 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -232,7 +232,7 @@ else to_chat(user, "The device must first be secured to the floor.") -/obj/machinery/shieldgen/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/machinery/shieldgen/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/card/emag)) malfunction = TRUE update_icon(UPDATE_ICON_STATE) @@ -427,7 +427,7 @@ var/list/L = active_shields["[direction]"] L -= SW -/obj/machinery/shieldwallgen/attackby(obj/item/I, mob/user, params) +/obj/machinery/shieldwallgen/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id)||istype(I, /obj/item/pda)) if(allowed(user)) locked = !locked @@ -583,7 +583,7 @@ phaseout() return ..() -/obj/machinery/shieldwall/syndicate/attackby(obj/item/W, mob/user, params) +/obj/machinery/shieldwall/syndicate/attackby__legacy__attackchain(obj/item/W, mob/user, params) phaseout() return ..() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index d02de4a386309..ac81b6e71d365 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -50,7 +50,7 @@ cell.emp_act(severity) ..(severity) -/obj/machinery/space_heater/attackby(obj/item/I, mob/user, params) +/obj/machinery/space_heater/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stock_parts/cell)) if(open) if(cell) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 907c897f1dd36..630da09c7843c 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -317,7 +317,7 @@ . += "[base_icon_state]_[occupant ? "body" : "ready"]" -/obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params) +/obj/machinery/suit_storage_unit/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(shocked) if(shock(user, 100)) return diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index f6158b34e3630..0324d2e41d272 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -114,7 +114,7 @@ else . = timer_set -/obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params) +/obj/machinery/syndicatebomb/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/assembly/signaler)) if(open_panel) wires.Interact(user) @@ -528,7 +528,7 @@ qdel(loc) qdel(src) -/obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params) +/obj/item/bombcore/chemical/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass/beaker) || istype(I, /obj/item/reagent_containers/glass/bottle)) if(length(beakers) < max_beakers) if(!user.drop_item()) @@ -599,7 +599,7 @@ icon_state = "chemcore" var/obj/item/transfer_valve/ttv = null -/obj/item/bombcore/toxins/attackby(obj/item/I, mob/user) +/obj/item/bombcore/toxins/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/transfer_valve)) if(!ttv && !check_attached(I)) if(!user.drop_item()) @@ -655,7 +655,7 @@ var/detonated = 0 var/existant = 0 -/obj/item/syndicatedetonator/attack_self(mob/user) +/obj/item/syndicatedetonator/attack_self__legacy__attackchain(mob/user) if(timer >= world.time) to_chat(user, "Nothing happens.") return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 8665ecad0fdff..57c8e61d66e77 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -47,7 +47,7 @@ power_station = locate(/obj/machinery/teleport/station, orange(1, src)) return power_station -/obj/machinery/computer/teleporter/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/computer/teleporter/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/gps)) var/obj/item/gps/L = I if(L.locked_location && !(stat & (NOPOWER|BROKEN))) @@ -625,7 +625,7 @@ teleporter_console = null return ..() -/obj/machinery/teleport/station/attackby(obj/item/I, mob/user, params) +/obj/machinery/teleport/station/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(panel_open && istype(I, /obj/item/circuitboard/teleporter_perma)) if(!teleporter_console) to_chat(user, "[src] is not linked to a teleporter console.") diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 1b84d8faef3b0..cbd4bc6bc3f5b 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -313,7 +313,7 @@ domutcheck(H, MUTCHK_FORCED) H.update_mutations() -/obj/machinery/transformer/gene_applier/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/transformer/gene_applier/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/disk/data)) if(locked) to_chat(user, "Access Denied.") diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index c299244991ea6..ea9bf1271819c 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -106,7 +106,7 @@ return FALSE -/obj/machinery/turretid/attackby(obj/item/W, mob/user) +/obj/machinery/turretid/attackby__legacy__attackchain(obj/item/W, mob/user) if(stat & BROKEN) return diff --git a/code/game/machinery/vendors/vending.dm b/code/game/machinery/vendors/vending.dm index 76090845a8f5a..f8f509441d177 100644 --- a/code/game/machinery/vendors/vending.dm +++ b/code/game/machinery/vendors/vending.dm @@ -336,7 +336,7 @@ if(user && (!Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))) return COMPONENT_BLOCK_UNTILT -/obj/machinery/economy/vending/attackby(obj/item/I, mob/user, params) +/obj/machinery/economy/vending/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(tilted) if(user.a_intent == INTENT_HELP) to_chat(user, "[src] is tipped over and non-functional! You'll need to right it first.") diff --git a/code/game/machinery/wall_holosign.dm b/code/game/machinery/wall_holosign.dm index 02c5de4cb1ded..a66a4f98a2744 100644 --- a/code/game/machinery/wall_holosign.dm +++ b/code/game/machinery/wall_holosign.dm @@ -49,7 +49,7 @@ /obj/machinery/holosign_switch/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/holosign_switch/attackby(obj/item/W, mob/user as mob, params) +/obj/machinery/holosign_switch/attackby__legacy__attackchain(obj/item/W, mob/user as mob, params) if(istype(W, /obj/item/detective_scanner)) return return ..() diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index b30d3fc114937..61ebcb67676d0 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -84,7 +84,7 @@ toggle_door() -/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params) +/obj/machinery/washing_machine/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() if(default_unfasten_wrench(user, W)) diff --git a/code/game/mecha/equipment/tools/janitor_tools.dm b/code/game/mecha/equipment/tools/janitor_tools.dm index 5980499582d37..62f424914ca32 100644 --- a/code/game/mecha/equipment/tools/janitor_tools.dm +++ b/code/game/mecha/equipment/tools/janitor_tools.dm @@ -71,7 +71,7 @@ current_target_turf.cleaning_act(chassis.occupant, src, mop_speed, "mop", ".", skip_do_after = TRUE) chassis.occupant_message("You mop \the [target].") if(holosign_enabled) - holosign_controller.afterattack(target_turf, chassis.occupant, TRUE) + holosign_controller.afterattack__legacy__attackchain(target_turf, chassis.occupant, TRUE) /obj/item/mecha_parts/mecha_equipment/janitor/mega_mop/post_clean(atom/target, mob/user) var/turf/T = get_turf(target) @@ -109,7 +109,7 @@ if(afilter.get("toggle_holosign")) holosign_enabled = !holosign_enabled if(!holosign_enabled) - holosign_controller.attack_self(chassis.occupant) + holosign_controller.attack_self__legacy__attackchain(chassis.occupant) update_equip_info() return diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index d03fb828be0d6..6f9641454e28a 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -395,7 +395,7 @@ occupant_message("[fuel_name] traces in target minimal! [I] cannot be used as fuel.") return 0 -/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params) +/obj/item/mecha_parts/mecha_equipment/generator/attackby__legacy__attackchain(weapon,mob/user, params) load_fuel(weapon) /obj/item/mecha_parts/mecha_equipment/generator/process() diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 2a438536c195d..49e958586f67c 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -503,8 +503,8 @@ chassis.occupant.changeNext_click(equip_cooldown) var/proximate = chassis.Adjacent(target) if(proximate) - target.attackby(internal_crusher, chassis.occupant) - internal_crusher.afterattack(target, chassis.occupant, proximate, null) + target.attackby__legacy__attackchain(internal_crusher, chassis.occupant) + internal_crusher.afterattack__legacy__attackchain(target, chassis.occupant, proximate, null) #undef MECH_RCD_MODE_DECONSTRUCT #undef MECH_RCD_MODE_WALL_OR_FLOOR diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index efcbd0ff3bfa8..9ace87b742295 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -311,7 +311,7 @@ return TRUE // Interaction code -/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params) +/obj/machinery/mecha_part_fabricator/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W)) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 898df99b800bf..7590801455ad3 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -711,7 +711,7 @@ ////// MARK: AttackBy ////////////////////// -/obj/mecha/attackby(obj/item/W, mob/user, params) +/obj/mecha/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/mmi)) if(mmi_move_inside(W,user)) to_chat(user, "[src]-MMI interface initialized successfuly") diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index f21c8c9157317..d713a74995a88 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -27,7 +27,7 @@ QDEL_NULL(construct) return ..() -/obj/item/mecha_parts/chassis/attackby(obj/item/W, mob/user, params) +/obj/item/mecha_parts/chassis/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!construct || !construct.action(W, user)) return ..() @@ -265,7 +265,7 @@ ..() construct = new /datum/construction/mecha/phazon_chassis(src) -/obj/item/mecha_parts/chassis/phazon/attackby(obj/item/I, mob/user, params) +/obj/item/mecha_parts/chassis/phazon/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(istype(I, /obj/item/assembly/signaler/anomaly) && !istype(I, /obj/item/assembly/signaler/anomaly/bluespace)) to_chat(user, "The anomaly core socket only accepts bluespace anomaly cores!") diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 0474b8e0f6060..fad65dc1bb658 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -94,7 +94,7 @@ // Else, anomaly core gets deleted by qdel(src). qdel(src) -/obj/effect/anomaly/attackby(obj/item/I, mob/user, params) +/obj/effect/anomaly/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/analyzer)) to_chat(user, "Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].") diff --git a/code/game/objects/effects/decals/Cleanable/tar.dm b/code/game/objects/effects/decals/Cleanable/tar.dm index 3b6092c7a0147..5cc09a4619cf3 100644 --- a/code/game/objects/effects/decals/Cleanable/tar.dm +++ b/code/game/objects/effects/decals/Cleanable/tar.dm @@ -33,7 +33,7 @@ playsound(L, 'sound/effects/attackblob.ogg', 50, TRUE) to_chat(L, "[src] sticks to you!") -/obj/effect/decal/cleanable/tar/attackby(obj/item/welder, mob/living/user, params) +/obj/effect/decal/cleanable/tar/attackby__legacy__attackchain(obj/item/welder, mob/living/user, params) if(!welder.get_heat() || !Adjacent(user)) return playsound(welder, 'sound/items/welder.ogg', 50, TRUE) diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index 924c49f6fc474..369f892c511ff 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -103,7 +103,7 @@ if(desc) . += desc -/obj/effect/decal/attackby(obj/item/I, mob/user) +/obj/effect/decal/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks)) scoop(I, user) else if(issimulatedturf(loc)) diff --git a/code/game/objects/effects/meteors.dm b/code/game/objects/effects/meteors.dm index 0c516e6015266..d82db43ca5ff6 100644 --- a/code/game/objects/effects/meteors.dm +++ b/code/game/objects/effects/meteors.dm @@ -159,7 +159,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me /obj/effect/meteor/ex_act() return -/obj/effect/meteor/attackby(obj/item/I, mob/user, params) +/obj/effect/meteor/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/pickaxe)) make_debris() qdel(src) diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index af4bd5f1e324d..573fe8030f172 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -139,7 +139,7 @@ victim.drop_l_hand() victim.drop_r_hand() victim.put_in_hands(chainsaw) - chainsaw.attack_self(victim) + chainsaw.attack_self__legacy__attackchain(victim) victim.reagents.add_reagent("adminordrazine", 25) victim.flash_screen_color(red_splash, 10) diff --git a/code/game/objects/effects/snowcloud.dm b/code/game/objects/effects/snowcloud.dm index 7446474ea0afd..e4ab02c781b64 100644 --- a/code/game/objects/effects/snowcloud.dm +++ b/code/game/objects/effects/snowcloud.dm @@ -96,7 +96,7 @@ user.put_in_hands(SB) to_chat(user, "You scoop up some snow and make \a [SB]!") -/obj/effect/snow/attackby(obj/item/I, mob/user) +/obj/effect/snow/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/shovel)) var/obj/item/shovel/S = I user.visible_message("[user] is clearing away [src]...", "You begin clearing away [src]...", "You hear a wettish digging sound.") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c1177671c773d..9c49a9e595ba0 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -400,7 +400,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons // Due to storage type consolidation this should get used more now. // I have cleaned it up a little, but it could probably use more. -Sayu -/obj/item/attackby(obj/item/I, mob/user, params) +/obj/item/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(isstorage(I)) var/obj/item/storage/S = I if(S.use_to_pickup) @@ -593,7 +593,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons // The default action is attack_self(). // Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. /obj/item/proc/ui_action_click(mob/user, actiontype) - attack_self(user) + attack_self__legacy__attackchain(user) /obj/item/proc/IsReflect(def_zone) // This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit return FALSE diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 037709e2c00ba..951f3f1098af8 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -5,7 +5,7 @@ var/icon_full = "" var/material = /obj/item/stack/sheet/metal -/obj/item/ashtray/attackby(obj/item/I, mob/user, params) +/obj/item/ashtray/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/cigbutt) || istype(I, /obj/item/clothing/mask/cigarette) || istype(I, /obj/item/match)) if(length(contents) >= max_butts) to_chat(user, "This ashtray is full.") diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 0b315a200c28a..b9b496eb8a977 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -22,7 +22,7 @@ var/const/ROOM_ERR_TOOLARGE = -2 -/obj/item/areaeditor/attack_self(mob/user as mob) +/obj/item/areaeditor/attack_self__legacy__attackchain(mob/user as mob) add_fingerprint(user) var/text = "[src] \

[station_name()] [src.name]

\ @@ -54,7 +54,7 @@ By submitting this form, you accept any fines, fees, or personal injury/death that may occur during construction." w_class = WEIGHT_CLASS_TINY -/obj/item/areaeditor/permit/attack_self(mob/user) +/obj/item/areaeditor/permit/attack_self__legacy__attackchain(mob/user) . = ..() var/area/our_area = get_area(src) if(get_area_type() == AREA_STATION) @@ -76,7 +76,7 @@ desc = "Used to define new areas in space." fluffnotice = "Praise the Liberator!" -/obj/item/areaeditor/golem/attack_self(mob/user) +/obj/item/areaeditor/golem/attack_self__legacy__attackchain(mob/user) . = ..() var/area/our_area = get_area(src) if(get_area_type() == AREA_STATION) @@ -103,7 +103,7 @@ return ..() -/obj/item/areaeditor/blueprints/attack_self(mob/user) +/obj/item/areaeditor/blueprints/attack_self__legacy__attackchain(mob/user) . = ..() var/area/our_area = get_area(src) if(get_area_type() == AREA_STATION) @@ -134,7 +134,7 @@ clear_viewer(usr) set_viewer(usr) - attack_self(usr) + attack_self__legacy__attackchain(usr) /obj/item/areaeditor/blueprints/proc/get_images(turf/central_turf, viewsize) . = list() diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 68bb083c199d9..ac69cde165bd3 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -7,7 +7,7 @@ icon_state = "bodybag_folded" w_class = WEIGHT_CLASS_SMALL -/obj/item/bodybag/attack_self(mob/user) +/obj/item/bodybag/attack_self__legacy__attackchain(mob/user) var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc) R.add_fingerprint(user) qdel(src) @@ -27,7 +27,7 @@ close_sound_volume = 15 var/item_path = /obj/item/bodybag -/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params) +/obj/structure/closet/body_bag/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) var/t = rename_interactive(user, I) if(isnull(t)) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 00ae37bb2b2a0..9c13bf05c3dcb 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -41,7 +41,7 @@ else return TRUE -/obj/item/candle/attackby(obj/item/W, mob/user, params) +/obj/item/candle/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.get_heat()) light("[user] lights [src] with [W].") return @@ -113,7 +113,7 @@ set_light(0) -/obj/item/candle/attack_self(mob/user) +/obj/item/candle/attack_self__legacy__attackchain(mob/user) if(lit) user.visible_message("[user] snuffs out [src].") unlight() @@ -134,7 +134,7 @@ desc = "A candle. It smells like magic, so that would explain why it burns brighter." start_lit = TRUE -/obj/item/candle/eternal/wizard/attack_self(mob/user) +/obj/item/candle/eternal/wizard/attack_self__legacy__attackchain(mob/user) return /obj/item/candle/eternal/wizard/process() diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 8c197a503cc81..25264a60be777 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -33,7 +33,7 @@ alpha = initial(alpha) pushed_over = TRUE -/obj/item/cardboard_cutout/attack_self(mob/living/user) +/obj/item/cardboard_cutout/attack_self__legacy__attackchain(mob/living/user) if(!pushed_over) return to_chat(user, "You right [src].") @@ -42,7 +42,7 @@ icon_state = initial(icon_state) //This resets a cutout to its blank state - this is intentional to allow for resetting pushed_over = FALSE -/obj/item/cardboard_cutout/attackby(obj/item/I, mob/living/user, params) +/obj/item/cardboard_cutout/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/toy/crayon)) change_appearance(I, user) return diff --git a/code/game/objects/items/collar.dm b/code/game/objects/items/collar.dm index 1a1a40a6cb35f..9bb839442c820 100644 --- a/code/game/objects/items/collar.dm +++ b/code/game/objects/items/collar.dm @@ -11,7 +11,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/petcollar/attack_self(mob/user) +/obj/item/petcollar/attack_self__legacy__attackchain(mob/user) var/option = "Change Name" if(access_id) option = tgui_input_list(user, "What do you want to do?", "[src]", list("Change Name", "Remove ID")) @@ -32,7 +32,7 @@ user.put_in_hands(access_id) access_id = null -/obj/item/petcollar/attackby(obj/item/card/id/W, mob/user, params) +/obj/item/petcollar/attackby__legacy__attackchain(obj/item/card/id/W, mob/user, params) if(!istype(W)) return ..() if(access_id) diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 126a38a0cbe81..d3905586c9ab0 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -28,7 +28,7 @@ QDEL_NULL(ID) return ..() -/obj/item/door_remote/attack_self(mob/user) +/obj/item/door_remote/attack_self__legacy__attackchain(mob/user) var/list/options = list(WAND_OPEN = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_open"), WAND_BOLT = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_bolt"), WAND_EMERGENCY = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_ea"), @@ -49,7 +49,7 @@ . = ..() . += "It's current mode is: [mode]" -/obj/item/door_remote/afterattack(obj/target, mob/user) +/obj/item/door_remote/afterattack__legacy__attackchain(obj/target, mob/user) if(istype(target, /obj/machinery/door/airlock)) access_airlock(target, user) if(istype(target, /obj/machinery/door/window)) @@ -184,7 +184,7 @@ /// How far can we use this. Leave `null` for infinite range var/range -/obj/item/door_remote/omni/access_tuner/afterattack(obj/machinery/door/D, mob/user) +/obj/item/door_remote/omni/access_tuner/afterattack__legacy__attackchain(obj/machinery/door/D, mob/user) if(!istype(D, /obj/machinery/door/airlock) && !istype(D, /obj/machinery/door/window)) return if(!isnull(range) && get_dist(src, D) > range) @@ -228,14 +228,14 @@ . = ..() . += "This keyring has access to Medbay, Science, Engineering, Cargo, the Bar and the Kitchen!" -/obj/item/door_remote/janikeyring/attack_self(mob/user) +/obj/item/door_remote/janikeyring/attack_self__legacy__attackchain(mob/user) if(cooldown > world.time) return to_chat(user, "You shake [src]!") playsound(src, 'sound/items/keyring_shake.ogg', 50) cooldown = world.time + JANGLE_COOLDOWN -/obj/item/door_remote/janikeyring/afterattack(obj/machinery/door/D, mob/user, proximity) +/obj/item/door_remote/janikeyring/afterattack__legacy__attackchain(obj/machinery/door/D, mob/user, proximity) if(!proximity) return if(!istype(D, /obj/machinery/door/airlock) && !istype(D, /obj/machinery/door/window)) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index cf87fa47a1813..5dda16a4f6ce0 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -42,7 +42,7 @@ ..() drawtype = pick(pick(graffiti), pick(letters), "rune[rand(1, 8)]") -/obj/item/toy/crayon/attack_self(mob/living/user as mob) +/obj/item/toy/crayon/attack_self__legacy__attackchain(mob/living/user as mob) update_window(user) /obj/item/toy/crayon/proc/update_window(mob/living/user as mob) @@ -105,7 +105,7 @@ drawtype = temp update_window(usr) -/obj/item/toy/crayon/afterattack(atom/target, mob/user, proximity) +/obj/item/toy/crayon/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(busy) return if(is_type_in_list(target,validSurfaces)) @@ -137,7 +137,7 @@ qdel(src) busy = FALSE -/obj/item/toy/crayon/attack(mob/M, mob/user) +/obj/item/toy/crayon/attack__legacy__attackchain(mob/M, mob/user) if(M == user) if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -255,7 +255,7 @@ dye_color = DYE_MIME uses = 0 -/obj/item/toy/crayon/mime/attack_self(mob/living/user as mob) +/obj/item/toy/crayon/mime/attack_self__legacy__attackchain(mob/living/user as mob) update_window(user) /obj/item/toy/crayon/mime/update_window(mob/living/user as mob) @@ -281,7 +281,7 @@ dye_color = DYE_RAINBOW uses = 0 -/obj/item/toy/crayon/rainbow/attack_self(mob/living/user as mob) +/obj/item/toy/crayon/rainbow/attack_self__legacy__attackchain(mob/living/user as mob) update_window(user) /obj/item/toy/crayon/rainbow/update_window(mob/living/user as mob) @@ -317,10 +317,10 @@ ..() update_icon() -/obj/item/toy/crayon/spraycan/attack(mob/M, mob/user) +/obj/item/toy/crayon/spraycan/attack__legacy__attackchain(mob/M, mob/user) return // To stop you from eating spraycans. It's TOO SILLY! -/obj/item/toy/crayon/spraycan/attack_self(mob/living/user) +/obj/item/toy/crayon/spraycan/attack_self__legacy__attackchain(mob/living/user) var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color")) switch(choice) if("Toggle Cap") @@ -335,7 +335,7 @@ return update_icon() -/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user as mob, proximity) +/obj/item/toy/crayon/spraycan/afterattack__legacy__attackchain(atom/target, mob/user as mob, proximity) . = ..() if(!proximity) return diff --git a/code/game/objects/items/dehy_carp.dm b/code/game/objects/items/dehy_carp.dm index 99f97b5e032b1..35c1a5082d6b0 100644 --- a/code/game/objects/items/dehy_carp.dm +++ b/code/game/objects/items/dehy_carp.dm @@ -14,7 +14,7 @@ return ..() // Attack self -/obj/item/toy/plushie/carpplushie/dehy_carp/attack_self(mob/user as mob) +/obj/item/toy/plushie/carpplushie/dehy_carp/attack_self__legacy__attackchain(mob/user as mob) src.add_fingerprint(user) // Anyone can add their fingerprints to it with this if(owned) to_chat(user, "[src] stares up at you with friendly eyes.") @@ -27,7 +27,7 @@ if(volume >= 1) Swell() -/obj/item/toy/plushie/carpplushie/dehy_carp/afterattack(obj/O, mob/user,proximity) +/obj/item/toy/plushie/carpplushie/dehy_carp/afterattack__legacy__attackchain(obj/O, mob/user,proximity) if(!proximity) return if(istype(O,/obj/structure/sink)) to_chat(user, "You place [src] under a stream of water...") diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 78067b05071ba..6f66fa335ef76 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -10,7 +10,7 @@ var/flush = null origin_tech = "programming=3;materials=3" -/obj/item/aicard/afterattack(atom/target, mob/user, proximity) +/obj/item/aicard/afterattack__legacy__attackchain(atom/target, mob/user, proximity) ..() if(!proximity || !target) return @@ -45,7 +45,7 @@ else . += "ai" -/obj/item/aicard/attack_self(mob/user) +/obj/item/aicard/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/aicard/ui_state(mob/user) diff --git a/code/game/objects/items/devices/autopsy.dm b/code/game/objects/items/devices/autopsy.dm index 3a0036f02f9ce..95103656f6154 100644 --- a/code/game/objects/items/devices/autopsy.dm +++ b/code/game/objects/items/devices/autopsy.dm @@ -72,7 +72,7 @@ if(Adjacent(user)) . += "You can use a pen on it to quickly write a coroner's report." -/obj/item/autopsy_scanner/attackby(obj/item/P, mob/user) +/obj/item/autopsy_scanner/attackby__legacy__attackchain(obj/item/P, mob/user) if(!is_pen(P)) return ..() @@ -88,7 +88,7 @@ playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, TRUE) user.put_in_hands(R) -/obj/item/autopsy_scanner/attack_self(mob/user) +/obj/item/autopsy_scanner/attack_self__legacy__attackchain(mob/user) var/scan_data = "" if(timeofdeath) @@ -156,7 +156,7 @@ user.put_in_hands(P) -/obj/item/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user) +/obj/item/autopsy_scanner/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/carbon/user) if(!istype(M)) return diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 6d11a2387407a..3663889b2e77a 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -31,7 +31,7 @@ QDEL_NULL(integrated_console) return ..() -/obj/item/camera_bug/attack_self(mob/user as mob) +/obj/item/camera_bug/attack_self__legacy__attackchain(mob/user as mob) ui_interact(user) /obj/item/camera_bug/ui_state(mob/user) diff --git a/code/game/objects/items/devices/chameleon_counter.dm b/code/game/objects/items/devices/chameleon_counter.dm index 8bb7f7b25b5ba..e374cbd5eb13a 100644 --- a/code/game/objects/items/devices/chameleon_counter.dm +++ b/code/game/objects/items/devices/chameleon_counter.dm @@ -22,7 +22,7 @@ if(dummy_active) . += "It doesn't look quite right..." -/obj/item/chameleon_counterfeiter/afterattack(obj/item/target, mob/user, proximity) +/obj/item/chameleon_counterfeiter/afterattack__legacy__attackchain(obj/item/target, mob/user, proximity) if(!proximity || !check_sprite(target) || target.alpha < 255 || target.invisibility != 0) return if(dummy_active || !isitem(target)) @@ -73,5 +73,5 @@ can_use = FALSE addtimer(VARSET_CALLBACK(src, can_use, TRUE), 3 SECONDS) -/obj/item/chameleon_counterfeiter/attack_self(mob/living/user) +/obj/item/chameleon_counterfeiter/attack_self__legacy__attackchain(mob/living/user) matter_toggle(user) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 660f7720affc3..e10e4ed94a34c 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -25,10 +25,10 @@ /obj/item/chameleon/equipped() disrupt() -/obj/item/chameleon/attack_self() +/obj/item/chameleon/attack_self__legacy__attackchain() toggle() -/obj/item/chameleon/afterattack(atom/target, mob/user, proximity) +/obj/item/chameleon/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(!check_sprite(target)) @@ -117,7 +117,7 @@ master = C master.active_dummy = src -/obj/effect/dummy/chameleon/attackby() +/obj/effect/dummy/chameleon/attackby__legacy__attackchain() for(var/mob/M in src) to_chat(M, "Your [src] deactivates.") master.disrupt() @@ -204,7 +204,7 @@ . = ..() disrupt(user) -/obj/item/borg_chameleon/attack_self(mob/living/silicon/robot/syndicate/saboteur/user) +/obj/item/borg_chameleon/attack_self__legacy__attackchain(mob/living/silicon/robot/syndicate/saboteur/user) if(user && user.cell && user.cell.charge > activationCost) if(isturf(user.loc)) toggle(user) diff --git a/code/game/objects/items/devices/enginepicker.dm b/code/game/objects/items/devices/enginepicker.dm index 7a728c4637b60..2541d7991843a 100644 --- a/code/game/objects/items/devices/enginepicker.dm +++ b/code/game/objects/items/devices/enginepicker.dm @@ -18,7 +18,7 @@ list_enginebeacons.Cut() return ..() -/obj/item/enginepicker/attack_self(mob/living/carbon/user) +/obj/item/enginepicker/attack_self__legacy__attackchain(mob/living/carbon/user) if(user.incapacitated()) return diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 4d5166a3ed226..047c61dcb9a65 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -33,7 +33,7 @@ var/use_sound = 'sound/weapons/flash.ogg' COOLDOWN_DECLARE(flash_cooldown) -/obj/item/flash/attackby(obj/item/I, mob/user, params) +/obj/item/flash/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!can_overcharge || !istype(I, /obj/item/stock_parts/cell)) return @@ -126,7 +126,7 @@ if(M.flash_eyes()) M.AdjustConfused(power) -/obj/item/flash/attack(mob/living/M, mob/user) +/obj/item/flash/attack__legacy__attackchain(mob/living/M, mob/user) if(!try_use_flash(user)) return FALSE if(iscarbon(M)) @@ -143,7 +143,7 @@ return TRUE user.visible_message("[user] fails to blind [M] with [src]!", "You fail to blind [M] with [src]!") -/obj/item/flash/afterattack(atom/target, mob/living/user, proximity, params) +/obj/item/flash/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity, params) if(!proximity) return if(!istype(target, /obj/machinery/camera)) @@ -157,7 +157,7 @@ user.create_attack_log("[key_name(user)] EMPd a camera with a flash") add_attack_logs(user, C, "EMPd with [src]", ATKLOG_ALL) -/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0) +/obj/item/flash/attack_self__legacy__attackchain(mob/living/carbon/user, flag = 0, emp = 0) if(!try_use_flash(user)) return FALSE user.visible_message("[user]'s [name] emits a blinding light!", "Your [name] emits a blinding light!") @@ -207,11 +207,11 @@ origin_tech = null can_overcharge = FALSE -/obj/item/flash/cyborg/attack(mob/living/M, mob/user) +/obj/item/flash/cyborg/attack__legacy__attackchain(mob/living/M, mob/user) ..() new /obj/effect/temp_visual/borgflash(get_turf(src)) -/obj/item/flash/cyborg/attack_self(mob/user) +/obj/item/flash/cyborg/attack_self__legacy__attackchain(mob/user) ..() new /obj/effect/temp_visual/borgflash(get_turf(src)) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 81776dc836cda..06efea7d556be 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -30,7 +30,7 @@ set_light(0) update_icon() -/obj/item/flashlight/attack_self(mob/user) +/obj/item/flashlight/attack_self__legacy__attackchain(mob/user) if(!isturf(user.loc)) to_chat(user, "You cannot turn the light on while in this [user.loc].")//To prevent some lighting anomalities. return FALSE @@ -42,7 +42,7 @@ A.UpdateButtons() return TRUE -/obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/flashlight/attack__legacy__attackchain(mob/living/M as mob, mob/living/user as mob) add_fingerprint(user) if(on && user.zone_selected == "eyes") @@ -145,7 +145,7 @@ if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user)) return - attack_self(user) + attack_self__legacy__attackchain(user) //Bananalamp /obj/item/flashlight/lamp/bananalamp @@ -206,7 +206,7 @@ attack_verb = list() update_brightness() -/obj/item/flashlight/flare/attack_self(mob/user) +/obj/item/flashlight/flare/attack_self__legacy__attackchain(mob/user) // Usual checks if(!fuel) to_chat(user, "[src] is out of fuel.") @@ -360,7 +360,7 @@ update_brightness() icon_state = initial(icon_state) -/obj/item/flashlight/slime/attack_self(mob/user) +/obj/item/flashlight/slime/attack_self__legacy__attackchain(mob/user) return //Bio-luminescence does not toggle. /obj/item/flashlight/slime/extinguish_light(force = FALSE) @@ -394,12 +394,12 @@ emp_cur_charges = min(emp_cur_charges+1, emp_max_charges) return TRUE -/obj/item/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/flashlight/emp/attack__legacy__attackchain(mob/living/M as mob, mob/living/user as mob) if(on && user.zone_selected == "eyes") // call original attack proc only if aiming at the eyes ..() return -/obj/item/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity) +/obj/item/flashlight/emp/afterattack__legacy__attackchain(atom/A as mob|obj, mob/user, proximity) if(!proximity) return if(emp_cur_charges > 0) emp_cur_charges -= 1 diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 2db44252dc320..b4237bb1b88c6 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -116,12 +116,12 @@ current_tick_amount += amount update_icon(UPDATE_ICON_STATE) -/obj/item/geiger_counter/attack_self(mob/user) +/obj/item/geiger_counter/attack_self__legacy__attackchain(mob/user) scanning = !scanning update_icon(UPDATE_ICON_STATE) to_chat(user, "[bicon(src)] You switch [scanning ? "on" : "off"] [src].") -/obj/item/geiger_counter/afterattack(atom/target, mob/user) +/obj/item/geiger_counter/afterattack__legacy__attackchain(atom/target, mob/user) . = ..() if(user.a_intent == INTENT_HELP) if(!emagged) @@ -148,7 +148,7 @@ else to_chat(user, "[bicon(src)] Target is free of radioactive contamination.") -/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params) +/obj/item/geiger_counter/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.tool_behaviour == TOOL_SCREWDRIVER && emagged) if(scanning) to_chat(user, "Turn off [src] before you perform this action!") diff --git a/code/game/objects/items/devices/handheld_defib.dm b/code/game/objects/items/devices/handheld_defib.dm index d80d23f11a296..09ea14d04689a 100644 --- a/code/game/objects/items/devices/handheld_defib.dm +++ b/code/game/objects/items/devices/handheld_defib.dm @@ -32,7 +32,7 @@ to_chat(user, "You restore the safeties on [src]") return TRUE -/obj/item/handheld_defibrillator/attack(mob/living/carbon/human/H, mob/user) +/obj/item/handheld_defibrillator/attack__legacy__attackchain(mob/living/carbon/human/H, mob/user) if(!istype(H)) return ..() diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 3658d32a68764..8f4329b13cc0e 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -43,10 +43,10 @@ -/obj/item/laser_pointer/attack(mob/living/M, mob/user) +/obj/item/laser_pointer/attack__legacy__attackchain(mob/living/M, mob/user) laser_act(M, user) -/obj/item/laser_pointer/attackby(obj/item/W, mob/user, params) +/obj/item/laser_pointer/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stock_parts/micro_laser)) if(!diode) user.drop_item() @@ -65,7 +65,7 @@ diode = null return TRUE -/obj/item/laser_pointer/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/laser_pointer/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(flag) //we're placing the object on a table or in backpack return laser_act(target, user, params) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 2cdeb55648725..29ec73f15e1d9 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -61,7 +61,7 @@ . = ..() . += status_string() -/obj/item/lightreplacer/attackby(obj/item/I, mob/user) +/obj/item/lightreplacer/attackby__legacy__attackchain(obj/item/I, mob/user) if(uses >= max_uses) to_chat(user, "[src] is full.") return @@ -142,7 +142,7 @@ update_appearance(UPDATE_NAME|UPDATE_ICON_STATE) return TRUE -/obj/item/lightreplacer/attack_self(mob/user) +/obj/item/lightreplacer/attack_self__legacy__attackchain(mob/user) for(var/obj/machinery/light/target in user.loc) ReplaceLight(target, user) to_chat(user, status_string()) @@ -210,10 +210,10 @@ else return 0 -/obj/item/lightreplacer/afterattack(atom/target, mob/U, proximity) +/obj/item/lightreplacer/afterattack__legacy__attackchain(atom/target, mob/U, proximity) . = ..() if(isitem(target)) - attackby(target, U) + attackby__legacy__attackchain(target, U) return if(!proximity && !bluespace_toggle) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 3aa54e27af63e..99c3143a414d5 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -30,7 +30,7 @@ if(HAS_TRAIT(src, TRAIT_CMAGGED)) . += "Yellow ooze seems to be seeping from the speaker..." -/obj/item/megaphone/attack_self(mob/living/user) +/obj/item/megaphone/attack_self__legacy__attackchain(mob/living/user) if(check_mute(user.ckey, MUTE_IC)) to_chat(src, "You cannot speak in IC (muted).") return diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index fe601c9f7d72f..a329fc7ce7ae2 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -31,7 +31,7 @@ QDEL_NULL(radio) return ..() -/obj/item/paicard/attack_self(mob/user) +/obj/item/paicard/attack_self__legacy__attackchain(mob/user) if(!in_range(src, user)) return user.set_machine(src) @@ -288,7 +288,7 @@ to_chat(pai, "Your supplemental directives have been updated. Your new directives are:") to_chat(pai, "Prime Directive:
[pai.pai_law0]") to_chat(pai, "Supplemental Directives:
[pai.pai_laws]") - attack_self(usr) + attack_self__legacy__attackchain(usr) // WIRE_SIGNAL = 1 // WIRE_RECEIVE = 2 diff --git a/code/game/objects/items/devices/painter/painter.dm b/code/game/objects/items/devices/painter/painter.dm index c953381cf8808..1ea7a9588da4d 100644 --- a/code/game/objects/items/devices/painter/painter.dm +++ b/code/game/objects/items/devices/painter/painter.dm @@ -82,13 +82,13 @@ /** * Calls `pick_color()` on the `selected_module`. */ -/obj/item/painter/attack_self(mob/user) +/obj/item/painter/attack_self__legacy__attackchain(mob/user) selected_module.pick_color(user) /** * If adjacent, calls `paint_atom()` on the `selected_module`, then plays the `usesound`. */ -/obj/item/painter/afterattack(atom/target, mob/user, proximity, params) +/obj/item/painter/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) if(!proximity) return if(selected_module.paint_atom(target, user)) diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index 7affcb8c1bab1..d63301a424dc4 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -56,7 +56,7 @@ mycomputer.mybeacon = null return ..() -/obj/item/beacon/syndicate/attack_self(mob/user) +/obj/item/beacon/syndicate/attack_self__legacy__attackchain(mob/user) if(user) to_chat(user, "Locked In") new /obj/machinery/power/singularity_beacon/syndicate( user.loc ) @@ -87,7 +87,7 @@ var/list/selected = list() var/list/unselected = list() -/obj/item/beacon/syndicate/bundle/attack_self(mob/user) +/obj/item/beacon/syndicate/bundle/attack_self__legacy__attackchain(mob/user) if(!user) return @@ -115,7 +115,7 @@ name = "suspicious beacon" desc = "A label on it reads: Warning: Activating this device will send a power sink to your location." -/obj/item/beacon/syndicate/power_sink/attack_self(mob/user) +/obj/item/beacon/syndicate/power_sink/attack_self__legacy__attackchain(mob/user) if(user) to_chat(user, "Locked In") new /obj/item/powersink(user.loc) @@ -129,7 +129,7 @@ origin_tech = "bluespace=5;syndicate=5" var/bomb = /obj/machinery/syndicatebomb -/obj/item/beacon/syndicate/bomb/attack_self(mob/user) +/obj/item/beacon/syndicate/bomb/attack_self__legacy__attackchain(mob/user) if(user) to_chat(user, "Locked In") new bomb(user.loc) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 309d1ee12eec5..0594ba7774cf7 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -38,10 +38,10 @@ ..() -/obj/item/electropack/attack_self(mob/user) +/obj/item/electropack/attack_self__legacy__attackchain(mob/user) ui_interact(user) -/obj/item/electropack/attackby(obj/item/W, mob/user, params) +/obj/item/electropack/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/clothing/head/helmet)) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index cd0946c341135..201ceb11fcfe8 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -395,7 +395,7 @@ return FALSE return ..() -/obj/item/radio/headset/attackby(obj/item/key, mob/user) +/obj/item/radio/headset/attackby__legacy__attackchain(obj/item/key, mob/user) if(istype(key, /obj/item/encryptionkey/)) if(keyslot1 && keyslot2) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 4479fe1d71e02..e9811960327fa 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -121,11 +121,11 @@ /obj/item/radio/intercom/attack_ai(mob/user) add_hiddenprint(user) add_fingerprint(user) - attack_self(user) + attack_self__legacy__attackchain(user) /obj/item/radio/intercom/attack_hand(mob/user) add_fingerprint(user) - attack_self(user) + attack_self__legacy__attackchain(user) /obj/item/radio/intercom/receive_range(freq, level) if(!is_listening()) @@ -151,7 +151,7 @@ if(2) . += "The intercom is wired, and the maintenance panel is unscrewed." -/obj/item/radio/intercom/attackby(obj/item/W, mob/user) +/obj/item/radio/intercom/attackby__legacy__attackchain(obj/item/W, mob/user) if(istype(W, /obj/item/stack/tape_roll)) //eww return else if(iscoil(W) && buildstage == 1) diff --git a/code/game/objects/items/devices/radio/radio_objects.dm b/code/game/objects/items/devices/radio/radio_objects.dm index 3b01d9989c71e..d505e3aa64d0f 100644 --- a/code/game/objects/items/devices/radio/radio_objects.dm +++ b/code/game/objects/items/devices/radio/radio_objects.dm @@ -121,7 +121,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems) /obj/item/radio/attack_ghost(mob/user) return interact(user) -/obj/item/radio/attack_self(mob/user) +/obj/item/radio/attack_self__legacy__attackchain(mob/user) interact(user) /obj/item/radio/interact(mob/user) @@ -672,7 +672,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems) /obj/item/radio/borg/ert/specops keyslot = new /obj/item/encryptionkey/centcom -/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/radio/borg/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/encryptionkey/)) if(keyslot) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 1802076b2ba89..f164e8283d0cd 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -37,7 +37,7 @@ SLIME SCANNER else STOP_PROCESSING(SSobj, src) -/obj/item/t_scanner/attack_self(mob/user) +/obj/item/t_scanner/attack_self__legacy__attackchain(mob/user) toggle_on() /obj/item/t_scanner/process() @@ -125,7 +125,7 @@ SLIME SCANNER . = ..() . += "Use [src] in hand to toggle showing localised damage." -/obj/item/healthanalyzer/attack_self(mob/user) +/obj/item/healthanalyzer/attack_self__legacy__attackchain(mob/user) mode = !mode switch(mode) if(DETAILED_HEALTH_SCAN) @@ -133,7 +133,7 @@ SLIME SCANNER if(SIMPLE_HEALTH_SCAN) to_chat(user, "The scanner is no longer showing localised limb damage.") -/obj/item/healthanalyzer/attack(mob/living/M, mob/living/user) +/obj/item/healthanalyzer/attack__legacy__attackchain(mob/living/M, mob/living/user) if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) var/list/msgs = list() user.visible_message("[user] analyzes the floor's vitals!", "You stupidly try to analyze the floor's vitals!") @@ -324,7 +324,7 @@ SLIME SCANNER to_chat(user, chat_box_healthscan(msgs.Join("
"))) -/obj/item/healthanalyzer/attackby(obj/item/I, mob/user, params) +/obj/item/healthanalyzer/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/healthupgrade)) return ..() @@ -389,7 +389,7 @@ SLIME SCANNER msgs += "Chassis Temperature: ???" to_chat(user, chat_box_healthscan(msgs.Join("
"))) -/obj/item/robotanalyzer/attack_obj(obj/machinery/M, mob/living/user) // Scanning a machine object +/obj/item/robotanalyzer/attack_obj__legacy__attackchain(obj/machinery/M, mob/living/user) // Scanning a machine object if(!ismachinery(M)) return if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) @@ -407,7 +407,7 @@ SLIME SCANNER if(M.stat & BROKEN) // Displays alongside above message. Machines with a "broken" state do not become broken at 0% HP - anything that reaches that point is destroyed to_chat(user, "Further analysis: Catastrophic component failure detected! [M] requires reconstruction to fully repair.") -/obj/item/robotanalyzer/attack(mob/living/M, mob/living/user) // Scanning borgs, IPCs/augmented crew, and AIs +/obj/item/robotanalyzer/attack__legacy__attackchain(mob/living/M, mob/living/user) // Scanning borgs, IPCs/augmented crew, and AIs if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) handle_clumsy(user) return @@ -536,7 +536,7 @@ SLIME SCANNER . = ..() . += "Alt-click [src] to activate the barometer function." -/obj/item/analyzer/attack_self(mob/user as mob) +/obj/item/analyzer/attack_self__legacy__attackchain(mob/user as mob) if(user.stat) return @@ -611,7 +611,7 @@ SLIME SCANNER amount += inaccurate return DisplayTimeText(max(1, amount)) -/obj/item/analyzer/afterattack(atom/target, mob/user, proximity, params) +/obj/item/analyzer/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) . = ..() if(!can_see(user, target, 1)) return @@ -730,7 +730,7 @@ SLIME SCANNER var/scanning = TRUE actions_types = list(/datum/action/item_action/print_report) -/obj/item/reagent_scanner/afterattack(obj/O, mob/user as mob) +/obj/item/reagent_scanner/afterattack__legacy__attackchain(obj/O, mob/user as mob) if(user.stat) return if(!user.IsAdvancedToolUser()) @@ -805,7 +805,7 @@ SLIME SCANNER throw_range = 7 materials = list(MAT_METAL=30, MAT_GLASS=20) -/obj/item/slime_scanner/attack(mob/living/M, mob/living/user) +/obj/item/slime_scanner/attack__legacy__attackchain(mob/living/M, mob/living/user) if(user.incapacitated() || user.AmountBlinded()) return if(!isslime(M)) @@ -911,7 +911,7 @@ SLIME SCANNER if(printing) . += "bodyanalyzer_printing" -/obj/item/bodyanalyzer/attack(mob/living/M, mob/living/carbon/human/user) +/obj/item/bodyanalyzer/attack__legacy__attackchain(mob/living/M, mob/living/carbon/human/user) if(user.incapacitated() || !user.Adjacent(M)) return @@ -926,7 +926,7 @@ SLIME SCANNER to_chat(user, "The scanner beeps angrily at you! It's out of charge!") playsound(user.loc, 'sound/machines/buzz-sigh.ogg', 50, 1) -/obj/item/bodyanalyzer/borg/attack(mob/living/M, mob/living/silicon/robot/user) +/obj/item/bodyanalyzer/borg/attack__legacy__attackchain(mob/living/M, mob/living/silicon/robot/user) if(user.incapacitated() || !user.Adjacent(M)) return diff --git a/code/game/objects/items/devices/sensor_device.dm b/code/game/objects/items/devices/sensor_device.dm index bd5932287ac21..de6c40b98821c 100644 --- a/code/game/objects/items/devices/sensor_device.dm +++ b/code/game/objects/items/devices/sensor_device.dm @@ -16,7 +16,7 @@ QDEL_NULL(crew_monitor) return ..() -/obj/item/sensor_device/attack_self(mob/user as mob) +/obj/item/sensor_device/attack_self__legacy__attackchain(mob/user as mob) ui_interact(user) /obj/item/sensor_device/ui_state(mob/user) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 5e20328ce2b21..ef64e9412ac47 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -59,7 +59,7 @@ else soundloop.start() -/obj/item/taperecorder/attackby(obj/item/I, mob/user) +/obj/item/taperecorder/attackby__legacy__attackchain(obj/item/I, mob/user) if(!mytape && istype(I, /obj/item/tape)) if(user.drop_item()) I.forceMove(src) @@ -106,7 +106,7 @@ mytape.timestamp += mytape.used_capacity mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] [msg]" -/obj/item/taperecorder/attack_self(mob/user) +/obj/item/taperecorder/attack_self__legacy__attackchain(mob/user) if(!mytape || mytape.ruined) return if(recording) @@ -303,7 +303,7 @@ ..() ruin() -/obj/item/tape/attack_self(mob/user) +/obj/item/tape/attack_self__legacy__attackchain(mob/user) if(!ruined) ruin(user) @@ -336,7 +336,7 @@ ruined = TRUE update_icon(UPDATE_OVERLAYS) -/obj/item/tape/attackby(obj/item/I, mob/user) +/obj/item/tape/attackby__legacy__attackchain(obj/item/I, mob/user) if(is_pen(I)) rename_interactive(user, I) diff --git a/code/game/objects/items/devices/thermal_drill.dm b/code/game/objects/items/devices/thermal_drill.dm index 884c60db5aadb..203b54bd04605 100644 --- a/code/game/objects/items/devices/thermal_drill.dm +++ b/code/game/objects/items/devices/thermal_drill.dm @@ -26,7 +26,7 @@ QDEL_NULL(song) return ..() -/obj/item/thermal_drill/attack_self(mob/user) +/obj/item/thermal_drill/attack_self__legacy__attackchain(mob/user) add_fingerprint(user) ui_interact(user) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 4df719f93d9dd..724f9d9bf94ae 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -19,7 +19,7 @@ else icon_state = "[initial(icon_state)]" -/obj/item/jammer/attack_self(mob/user) +/obj/item/jammer/attack_self__legacy__attackchain(mob/user) to_chat(user, "You [active ? "deactivate [src]. It goes quiet with a small click." : "activate [src]. It starts to hum softly."]") active = !active update_icon(UPDATE_ICON_STATE) @@ -68,7 +68,7 @@ . = ..() . += "[src] has [charges] out of [max_charges] charges left." -/obj/item/teleporter/attack_self(mob/user) +/obj/item/teleporter/attack_self__legacy__attackchain(mob/user) attempt_teleport(user, FALSE) /obj/item/teleporter/process() @@ -274,7 +274,7 @@ icon_state = "combat_hypo" var/used = FALSE -/obj/item/fireproofing_injector/attack_self(mob/living/user) +/obj/item/fireproofing_injector/attack_self__legacy__attackchain(mob/living/user) if(HAS_TRAIT(user, TRAIT_RESISTHEAT)) to_chat(user, "You are already fireproof!") return @@ -306,7 +306,7 @@ . += "" . += "Clinical trials have shown a four times increase in the rate of healing compared to a placebo. Whilst the product is technically not yet available to the public, the right connections with the right people allow interested parties to obtain samples early..." -/obj/item/cryoregenerative_enhancer/attack_self(mob/living/user) +/obj/item/cryoregenerative_enhancer/attack_self__legacy__attackchain(mob/living/user) if(HAS_TRAIT(user, TRAIT_DRASK_SUPERCOOL)) to_chat(user, "Your regeneration is already enhanced!") return @@ -368,7 +368,7 @@ times_used-- icon_state = "batterer" -/obj/item/batterer/attack_self(mob/living/carbon/user) +/obj/item/batterer/attack_self__legacy__attackchain(mob/living/carbon/user) activate_batterer(user) /obj/item/batterer/proc/activate_batterer(mob/user) @@ -458,7 +458,7 @@ /obj/item/handheld_mirror/ui_interact(mob/user, datum/tgui/ui = null) appearance_changer_holder.ui_interact(user, ui) -/obj/item/handheld_mirror/attack_self(mob/user) +/obj/item/handheld_mirror/attack_self__legacy__attackchain(mob/user) if(ishuman(user)) appearance_changer_holder = new(src, user) appearance_changer_holder.flags = APPEARANCE_ALL_BODY @@ -498,7 +498,7 @@ COOLDOWN_DECLARE(scan_cooldown) var/on_hit_sound = 'sound/effects/ping_hit.ogg' -/obj/item/syndi_scanner/attack_self(mob/user) +/obj/item/syndi_scanner/attack_self__legacy__attackchain(mob/user) if(!COOLDOWN_FINISHED(src, scan_cooldown)) to_chat(user, "[src] is recharging!") return diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index f13c7847f476f..58b20eb669f2e 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -25,7 +25,7 @@ /obj/item/transfer_valve/IsAssemblyHolder() return 1 -/obj/item/transfer_valve/attackby(obj/item/I, mob/user, params) +/obj/item/transfer_valve/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank)) if(tank_one && tank_two) to_chat(user, "There are already two tanks attached, remove one first.") @@ -88,7 +88,7 @@ for(var/obj/O in contents) O.hear_message(M, msg) -/obj/item/transfer_valve/attack_self(mob/user) +/obj/item/transfer_valve/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/transfer_valve/ui_state(mob/user) @@ -137,7 +137,7 @@ toggle_valve(usr) if("device") if(attached_device) - attached_device.attack_self(usr) + attached_device.attack_self__legacy__attackchain(usr) if("remove_device") if(attached_device) attached_device.forceMove(get_turf(src)) diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index ffaa3372ff81e..32256602c3ee9 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -427,7 +427,7 @@ GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/radio/uplink/show_examine_hotkeys() return list() -/obj/item/radio/uplink/attack_self(mob/user as mob) +/obj/item/radio/uplink/attack_self__legacy__attackchain(mob/user as mob) if(hidden_uplink) hidden_uplink.trigger(user) @@ -456,7 +456,7 @@ GLOBAL_LIST_EMPTY(world_uplinks) ..() hidden_uplink = new(src) -/obj/item/multitool/uplink/attack_self(mob/user as mob) +/obj/item/multitool/uplink/attack_self__legacy__attackchain(mob/user as mob) if(hidden_uplink) hidden_uplink.trigger(user) diff --git a/code/game/objects/items/devices/voice_changer.dm b/code/game/objects/items/devices/voice_changer.dm index 26cd3ad6ff12d..25f3d56447595 100644 --- a/code/game/objects/items/devices/voice_changer.dm +++ b/code/game/objects/items/devices/voice_changer.dm @@ -24,7 +24,7 @@ return ..() -/obj/item/voice_changer/attack_self(mob/user) +/obj/item/voice_changer/attack_self__legacy__attackchain(mob/user) active = !active icon_state = "voice_changer_[active ? "on" : "off"]" to_chat(user, "You toggle [src] [active ? "on" : "off"].") diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index 7a4dfbd41e0ab..92c81ecbbcb55 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -12,7 +12,7 @@ var/next_use_time var/spamcheck = FALSE -/obj/item/hailer/attack_self(mob/living/carbon/user as mob) +/obj/item/hailer/attack_self__legacy__attackchain(mob/living/carbon/user as mob) if(world.time < next_use_time) return @@ -51,7 +51,7 @@ "Grey" = 'icons/mob/clothing/species/grey/mask.dmi' ) -/obj/item/clothing/mask/whistle/attack_self(mob/user) +/obj/item/clothing/mask/whistle/attack_self__legacy__attackchain(mob/user) if(!COOLDOWN_FINISHED(src, whistle_cooldown)) return diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index c949612017f17..cc04d4e708029 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -11,13 +11,13 @@ custom_fire_overlay = "fire" var/rolled = FALSE -/obj/item/flag/attackby(obj/item/W, mob/user, params) +/obj/item/flag/attackby__legacy__attackchain(obj/item/W, mob/user, params) . = ..() if(W.get_heat() && !(resistance_flags & ON_FIRE)) user.visible_message("[user] lights [src] with [W].", "You light [src] with [W].", "You hear a low whoosh.") fire_act() -/obj/item/flag/attack_self(mob/user) +/obj/item/flag/attack_self__legacy__attackchain(mob/user) rolled = !rolled user.visible_message("[user] [rolled ? "rolls up" : "unfurls"] [src].", "You [rolled ? "roll up" : "unfurl"] [src].", "You hear fabric rustling.") update_icon() @@ -221,7 +221,7 @@ updated_icon_state = icon_state ..() -/obj/item/flag/chameleon/attack_self(mob/user) +/obj/item/flag/chameleon/attack_self__legacy__attackchain(mob/user) if(used) return ..() @@ -248,7 +248,7 @@ desc = chosen_flag.desc used = TRUE -/obj/item/flag/chameleon/attackby(obj/item/I, mob/user, params) +/obj/item/flag/chameleon/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grenade) && !boobytrap) if(user.drop_item()) boobytrap = I diff --git a/code/game/objects/items/granters/_granters.dm b/code/game/objects/items/granters/_granters.dm index 6978f29064c8f..a3954dcf40d90 100644 --- a/code/game/objects/items/granters/_granters.dm +++ b/code/game/objects/items/granters/_granters.dm @@ -21,7 +21,7 @@ 'sound/effects/pageturn3.ogg' ) -/obj/item/book/granter/attack_self(mob/living/user) +/obj/item/book/granter/attack_self__legacy__attackchain(mob/living/user) if(reading) to_chat(user, "You're already reading this!") return FALSE diff --git a/code/game/objects/items/hand_item.dm b/code/game/objects/items/hand_item.dm index 51519d827237c..8bfcc9c0ebc26 100644 --- a/code/game/objects/items/hand_item.dm +++ b/code/game/objects/items/hand_item.dm @@ -11,7 +11,7 @@ /// How many smaller table smacks we can do before we're out var/table_smacks_left = 3 -/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user) +/obj/item/slapper/attack__legacy__attackchain(mob/M, mob/living/carbon/human/user) user.do_attack_animation(M) playsound(M, hitsound, 50, TRUE, -1) user.visible_message("[user] slaps [M]!", "You slap [M]!", "You hear a slap.") @@ -22,14 +22,14 @@ if(force) return ..() -/obj/item/slapper/attack_self(mob/user) +/obj/item/slapper/attack_self__legacy__attackchain(mob/user) . = ..() if(!isliving(user)) return var/mob/living/L = user L.emote("highfive", intentional = TRUE) -/obj/item/slapper/attack_obj(obj/O, mob/living/user, params) +/obj/item/slapper/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) if(!istype(O, /obj/structure/table)) return ..() @@ -81,7 +81,7 @@ UnregisterSignal(owner, COMSIG_MOB_WEAPON_APPEARS) return ..() -/obj/item/slapper/parry/attack(mob/M, mob/living/carbon/human/user) +/obj/item/slapper/parry/attack__legacy__attackchain(mob/M, mob/living/carbon/human/user) if(isliving(M)) var/mob/living/creature = M SEND_SOUND(creature, sound('sound/weapons/flash_ring.ogg')) diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index bfbab38847822..388dfc7f60203 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -61,11 +61,11 @@ else . += "single_latch" -/obj/item/his_grace/attack_self(mob/living/user) +/obj/item/his_grace/attack_self__legacy__attackchain(mob/living/user) if(!awakened) INVOKE_ASYNC(src, PROC_REF(awaken), user) -/obj/item/his_grace/attack(mob/living/M, mob/user) +/obj/item/his_grace/attack__legacy__attackchain(mob/living/M, mob/user) if(awakened && M.stat) consume(M) else diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index c3eb9ee2e0644..0501b49aa7b8e 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -57,7 +57,7 @@ if(temperature > T0C+100) burst() -/obj/item/latexballon/attackby(obj/item/W, mob/user, params) +/obj/item/latexballon/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/tank)) var/obj/item/tank/T = W blow(T, user) diff --git a/code/game/objects/items/mixing_bowl.dm b/code/game/objects/items/mixing_bowl.dm index f7c7b9c9697eb..665bbb3cb3fb3 100644 --- a/code/game/objects/items/mixing_bowl.dm +++ b/code/game/objects/items/mixing_bowl.dm @@ -14,7 +14,7 @@ ..() create_reagents(100) -/obj/item/mixing_bowl/attackby(obj/item/I, mob/user, params) +/obj/item/mixing_bowl/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(dirty) if(istype(I, /obj/item/soap)) user.visible_message("[user] starts to scrub [src].", "You start to scrub [src].") @@ -58,7 +58,7 @@ I.forceMove(src) user.visible_message("[user] adds [I] to [src].", "You add [I] to [src].") -/obj/item/mixing_bowl/attack_self(mob/user) +/obj/item/mixing_bowl/attack_self__legacy__attackchain(mob/user) var/dat = "" if(dirty) dat = {"This [src] is dirty!
Please clean it before use!
"} diff --git a/code/game/objects/items/mountable_frames/mountables.dm b/code/game/objects/items/mountable_frames/mountables.dm index 31fa665a51b56..99b2a7f55d8bf 100644 --- a/code/game/objects/items/mountable_frames/mountables.dm +++ b/code/game/objects/items/mountable_frames/mountables.dm @@ -6,7 +6,7 @@ var/allow_floor_mounting = FALSE -/obj/item/mounted/afterattack(atom/A, mob/user, proximity_flag) +/obj/item/mounted/afterattack__legacy__attackchain(atom/A, mob/user, proximity_flag) if(is_type_in_list(A, buildon_types)) if(try_build(A, user, proximity_flag)) return do_build(A, user) diff --git a/code/game/objects/items/robot/ai_upgrades.dm b/code/game/objects/items/robot/ai_upgrades.dm index a91516d141907..db0e5955e3ade 100644 --- a/code/game/objects/items/robot/ai_upgrades.dm +++ b/code/game/objects/items/robot/ai_upgrades.dm @@ -9,7 +9,7 @@ icon_state = "datadisk3" -/obj/item/malf_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user) +/obj/item/malf_upgrade/afterattack__legacy__attackchain(mob/living/silicon/ai/AI, mob/user) if(!istype(AI)) return if(AI.malf_picker) @@ -29,7 +29,7 @@ icon = 'icons/obj/module.dmi' icon_state = "datadisk3" -/obj/item/surveillance_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user) +/obj/item/surveillance_upgrade/afterattack__legacy__attackchain(mob/living/silicon/ai/AI, mob/user) if(!istype(AI)) return if(AI.eyeobj) diff --git a/code/game/objects/items/robot/cyborg_gripper.dm b/code/game/objects/items/robot/cyborg_gripper.dm index ed07f4c4a92a3..4f81cdc5f9774 100644 --- a/code/game/objects/items/robot/cyborg_gripper.dm +++ b/code/game/objects/items/robot/cyborg_gripper.dm @@ -58,17 +58,17 @@ gripped_item = null return TRUE -/obj/item/gripper/attack_self(mob/user) +/obj/item/gripper/attack_self__legacy__attackchain(mob/user) if(!gripped_item) to_chat(user, "[src] is empty.") return - gripped_item.attack_self(user) + gripped_item.attack_self__legacy__attackchain(user) // This is required to ensure that the forceMove checks on some objects don't rip the gripper out of the borg's inventory and toss it on the floor. That would hurt, a lot! /obj/item/gripper/forceMove(atom/destination) return -/obj/item/gripper/afterattack(atom/target, mob/living/user, proximity, params) +/obj/item/gripper/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity, params) // Target is invalid or we are not adjacent. if(!target || !proximity) return @@ -76,8 +76,8 @@ // Does the gripper already have an item? if(gripped_item) // Pass the attack on to the target. This might delete/relocate gripped_item. If the attackby doesn't resolve or delete the target or gripped_item, afterattack. - if(!target.attackby(gripped_item, user, params)) - gripped_item?.afterattack(target, user, 1, params) + if(!target.attackby__legacy__attackchain(gripped_item, user, params)) + gripped_item?.afterattack__legacy__attackchain(target, user, 1, params) // Check to see if there is still an item in the gripper (stackable items trigger this). if(!gripped_item && length(contents)) gripped_item = contents[1] @@ -157,7 +157,7 @@ ..() return TRUE -/obj/item/gripper/attack(mob/living/M, mob/living/silicon/robot/user, params) +/obj/item/gripper/attack__legacy__attackchain(mob/living/M, mob/living/silicon/robot/user, params) if(gripped_item) return @@ -194,7 +194,7 @@ if(isanimal(M) && !M.holder_type) var/list/modifiers = params2list(params) // This enables borgs to get the floating heart icon and mob emote from simple_animals that have petbonus == TRUE. - M.attack_hand(user, modifiers) + M.attack_hand(user, modifiers) if(user.zone_selected == BODY_ZONE_HEAD) user.visible_message( @@ -279,10 +279,10 @@ // MARK: Gripper Types -/* +/* * Universal Gripper -* Not supplied to any cyborg by default. -* Can be varedited onto a borg for event stuff. +* Not supplied to any cyborg by default. +* Can be varedited onto a borg for event stuff. * Functions almost like a real hand! */ /obj/item/gripper/universal diff --git a/code/game/objects/items/robot/items/inflatable_tool.dm b/code/game/objects/items/robot/items/inflatable_tool.dm index 105a029d7a7df..0bf7cd77f68d2 100644 --- a/code/game/objects/items/robot/items/inflatable_tool.dm +++ b/code/game/objects/items/robot/items/inflatable_tool.dm @@ -17,7 +17,7 @@ . = ..() . += "As a synthetic, you can restore them at a cyborg recharger." -/obj/item/inflatable/cyborg/attack_self(mob/user) +/obj/item/inflatable/cyborg/attack_self__legacy__attackchain(mob/user) if(locate(/obj/structure/inflatable) in get_turf(user)) to_chat(user, "There's already an inflatable structure!") return FALSE diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5c0a6ba3fa652..538183524332d 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -14,7 +14,7 @@ Keeping it in for adminabuse but the malf one is /obj/item/melee/baton/borg_stun icon_state = "elecarm" var/charge_cost = 30 -/obj/item/borg/stun/attack(mob/living/M, mob/living/silicon/robot/user) +/obj/item/borg/stun/attack__legacy__attackchain(mob/living/M, mob/living/silicon/robot/user) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.check_shields(src, 0, "[M]'s [name]", MELEE_ATTACK)) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index ff7db9b09eca2..49353ed07ec97 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -24,7 +24,7 @@ AddComponent(/datum/component/surgery_initiator/limb, forced_surgery = /datum/surgery/attach_robotic_limb) -/obj/item/robot_parts/attack_self(mob/user) +/obj/item/robot_parts/attack_self__legacy__attackchain(mob/user) var/choice = tgui_input_list(user, "Select the company appearance for this limb", "Limb Company Selection", GLOB.selectable_robolimbs) if(!choice) return @@ -116,7 +116,7 @@ forced_ai = null return ..() -/obj/item/robot_parts/robot_suit/attack_self(mob/user) +/obj/item/robot_parts/robot_suit/attack_self__legacy__attackchain(mob/user) return /obj/item/robot_parts/robot_suit/update_overlays() @@ -142,7 +142,7 @@ return 1 return 0 -/obj/item/robot_parts/robot_suit/attackby(obj/item/W, mob/user, params) +/obj/item/robot_parts/robot_suit/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head) var/obj/item/stack/sheet/metal/M = W @@ -367,7 +367,7 @@ Interact(usr) return -/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/robot_parts/chest/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() if(istype(W, /obj/item/stock_parts/cell)) if(cell) @@ -389,7 +389,7 @@ to_chat(user, "You insert the wire!") return -/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/robot_parts/head/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() if(istype(W, /obj/item/flash)) if(isrobot(user)) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index f695c93b61355..ce79de34f6b52 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -120,7 +120,7 @@ delete_after_install = TRUE var/heldname = "default name" -/obj/item/borg/upgrade/rename/attack_self(mob/user) +/obj/item/borg/upgrade/rename/attack_self__legacy__attackchain(mob/user) var/new_heldname = tgui_input_text(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN) if(!new_heldname) return diff --git a/code/game/objects/items/scratch_card.dm b/code/game/objects/items/scratch_card.dm index 5864b207e7eed..f498a080acae9 100644 --- a/code/game/objects/items/scratch_card.dm +++ b/code/game/objects/items/scratch_card.dm @@ -11,7 +11,7 @@ /// Is this the winner card? var/winner = FALSE -/obj/item/scratch/attackby(obj/item/I, mob/user, params) +/obj/item/scratch/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(scratched) return @@ -29,7 +29,7 @@ scratched = TRUE update_icon(UPDATE_ICON_STATE) -/obj/item/scratch/attack_obj(obj/O, mob/living/user, params) +/obj/item/scratch/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) if(winner && istype(O, /obj/machinery/economy/atm)) playsound(user, 'sound/machines/ping.ogg', 50, TRUE) O.atom_say("Congratulations for winning the lottery!") diff --git a/code/game/objects/items/sport.dm b/code/game/objects/items/sport.dm index 01e75aaa2d54d..7f40b5b2cc2ab 100644 --- a/code/game/objects/items/sport.dm +++ b/code/game/objects/items/sport.dm @@ -15,7 +15,7 @@ /// Whether `attack_self` will move ("dribble") it to the other hand var/dribbleable = FALSE // Most balls do not have a dribble animation -/obj/item/beach_ball/attack_self(mob/user) +/obj/item/beach_ball/attack_self__legacy__attackchain(mob/user) if(!dribbleable) return @@ -69,7 +69,7 @@ density = TRUE pass_flags_self = LETPASSTHROW | PASSTAKE -/obj/structure/holohoop/attackby(obj/item/W, mob/user, params) +/obj/structure/holohoop/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/grab) && get_dist(src, user) <= 1) var/obj/item/grab/G = W if(G.state < GRAB_AGGRESSIVE) diff --git a/code/game/objects/items/stacks/medical_packs.dm b/code/game/objects/items/stacks/medical_packs.dm index 71fe2f71701c1..c6f92f52d3a06 100644 --- a/code/game/objects/items/stacks/medical_packs.dm +++ b/code/game/objects/items/stacks/medical_packs.dm @@ -77,10 +77,10 @@ "You apply [src] on [M].") use(1) -/obj/item/stack/medical/attack(mob/living/M, mob/user) +/obj/item/stack/medical/attack__legacy__attackchain(mob/living/M, mob/user) return apply(M, user) -/obj/item/stack/medical/attack_self(mob/user) +/obj/item/stack/medical/attack_self__legacy__attackchain(mob/user) return apply(user, user) /obj/item/stack/medical/proc/heal(mob/living/M, mob/user) @@ -135,7 +135,7 @@ stop_bleeding = 1800 dynamic_icon_state = TRUE -/obj/item/stack/medical/bruise_pack/attackby(obj/item/I, mob/user, params) +/obj/item/stack/medical/bruise_pack/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.sharp) if(get_amount() < 2) to_chat(user, "You need at least two gauzes to do this!") diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 1035b0f70188f..4c244f375d4b2 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -11,7 +11,7 @@ toolspeed = 1 merge_type = /obj/item/stack/nanopaste -/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob) +/obj/item/stack/nanopaste/attack__legacy__attackchain(mob/living/M as mob, mob/user as mob) if(!istype(M) || !istype(user)) return 0 if(isrobot(M)) //Repairing cyborgs @@ -33,7 +33,7 @@ else to_chat(user, "[src] won't work on that.") -/obj/item/stack/nanopaste/afterattack(atom/A, mob/user, proximity_flag) +/obj/item/stack/nanopaste/afterattack__legacy__attackchain(atom/A, mob/user, proximity_flag) if(!ismecha(A) || user.a_intent == INTENT_HARM || !proximity_flag) return var/obj/mecha/mecha = A @@ -93,7 +93,7 @@ energy_type = /datum/robot_storage/energy/medical/nanopaste is_cyborg = TRUE -/obj/item/stack/nanopaste/cyborg/attack(mob/living/M, mob/user) +/obj/item/stack/nanopaste/cyborg/attack__legacy__attackchain(mob/living/M, mob/user) if(get_amount() <= 0) to_chat(user, "You don't have enough energy to dispense more [name]!") else diff --git a/code/game/objects/items/stacks/seaweed.dm b/code/game/objects/items/stacks/seaweed.dm index 90a8a9c7da431..6d277dfb23f86 100644 --- a/code/game/objects/items/stacks/seaweed.dm +++ b/code/game/objects/items/stacks/seaweed.dm @@ -11,7 +11,7 @@ usesound = 'sound/items/deconstruct.ogg' merge_type = /obj/item/stack/seaweed -/obj/item/stack/seaweed/attack_self(mob/user) +/obj/item/stack/seaweed/attack_self__legacy__attackchain(mob/user) return /obj/item/stack/seaweed/attack_self_tk() diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 6c815fb7bb8d1..edc0dd43ba748 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( recipes = GLOB.glass_recipes ..() -/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params) +/obj/item/stack/sheet/glass/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/CC = W if(CC.get_amount() < 5) @@ -187,7 +187,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( recipes = GLOB.pglass_recipes ..() -/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params) +/obj/item/stack/sheet/plasmaglass/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/stack/rods)) var/obj/item/stack/rods/V = W diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index c2a9bcf0b689d..de7987e35c920 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -192,7 +192,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( /obj/item/clothing/head/hooded/explorer, /obj/item/clothing/head/helmet/space/plasmaman/mining)) -/obj/item/stack/sheet/animalhide/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/stack/sheet/animalhide/goliath_hide/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) if(!proximity_flag) return if(is_type_in_typecache(target, goliath_platable_armor_typecache)) @@ -246,7 +246,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER -/obj/item/stack/sheet/animalhide/armor_plate/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/stack/sheet/animalhide/armor_plate/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) if(!proximity_flag) return if(istype(target, /obj/mecha/working/ripley)) @@ -264,7 +264,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( else to_chat(user, "You can't improve [D] any further!") -/obj/item/stack/sheet/animalhide/armor_plate/attackby(obj/item/W, mob/user, params) +/obj/item/stack/sheet/animalhide/armor_plate/attackby__legacy__attackchain(obj/item/W, mob/user, params) return // no steel leather for ya /obj/item/stack/sheet/animalhide/ashdrake @@ -279,7 +279,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( layer = MOB_LAYER dynamic_icon_state = TRUE -/obj/item/stack/sheet/animalhide/ashdrake/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/stack/sheet/animalhide/ashdrake/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) if(!proximity_flag) return if(istype(target, /obj/mecha/working/ripley)) @@ -301,7 +301,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( //Step one - dehairing. -/obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params) +/obj/item/stack/sheet/animalhide/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.sharp) user.visible_message("[user] starts cutting hair off \the [src].", "You start cutting the hair off \the [src]...", "You hear the sound of a knife rubbing against flesh.") if(do_after(user, 50 * W.toolspeed, target = src)) diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index ddbe453a32408..d0a3c536124d9 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -13,7 +13,7 @@ flags = CONDUCT max_amount = 60 -/obj/item/stack/light_w/attackby(obj/item/I, mob/user, params) +/obj/item/stack/light_w/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(istype(I, /obj/item/wirecutters)) var/obj/item/stack/cable_coil/CC = new(user.loc) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 386eca38fe640..2e53e687d1e9d 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -199,7 +199,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( icon_state = "empty-sandbags" w_class = WEIGHT_CLASS_TINY -/obj/item/emptysandbag/attackby(obj/item/I, mob/user, params) +/obj/item/emptysandbag/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/ore/glass)) var/obj/item/stack/ore/glass/G = I to_chat(user, "You fill the sandbag.") @@ -300,7 +300,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( log_and_set_aflame(user, I) return TRUE -/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/I, mob/living/user, params) +/obj/item/stack/sheet/mineral/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(I.get_heat()) log_and_set_aflame(user, I) else diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 87f861c4caa31..313caa58c9b2d 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -490,7 +490,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( )), )) -/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params) +/obj/item/stack/sheet/cardboard/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stamp/clown) && !isstorage(loc)) var/atom/droploc = drop_location() if(use(1)) @@ -572,7 +572,7 @@ GLOBAL_LIST_INIT(cult_recipes, list ( item_state = GET_CULT_DATA(runed_metal_item_state, initial(item_state)) recipes = GLOB.cult_recipes -/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user) +/obj/item/stack/sheet/runed_metal/attack_self__legacy__attackchain(mob/living/user) if(!IS_CULTIST(user)) to_chat(user, "Only one with forbidden knowledge could hope to work this metal...") return diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index a24d5121619bc..4066e3702c7b3 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -135,7 +135,7 @@ return FALSE return TRUE -/obj/item/stack/attack_self(mob/user) +/obj/item/stack/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/stack/attack_self_tk(mob/user) @@ -164,7 +164,7 @@ if(src && user.machine == src) ui_interact(user) -/obj/item/stack/attackby(obj/item/thing, mob/user, params) +/obj/item/stack/attackby__legacy__attackchain(obj/item/thing, mob/user, params) if(!can_merge(thing, TRUE)) return ..() diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 865f45bc27126..8b05fb164e9fb 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -11,7 +11,7 @@ origin_tech = "materials=6;syndicate=1" dynamic_icon_state = TRUE -/obj/item/stack/telecrystal/attack(mob/target, mob/user) +/obj/item/stack/telecrystal/attack__legacy__attackchain(mob/target, mob/user) if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. for(var/obj/item/bio_chip/uplink/I in target) if(I && I.imp_in) @@ -19,7 +19,7 @@ use(amount) to_chat(user, "You press [src] onto yourself and charge your hidden uplink.") -/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity) +/obj/item/stack/telecrystal/afterattack__legacy__attackchain(obj/item/I, mob/user, proximity) if(!proximity) return if(istype(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up. diff --git a/code/game/objects/items/theft_items.dm b/code/game/objects/items/theft_items.dm index 213f59ff20f11..3c5a1424f3bf1 100644 --- a/code/game/objects/items/theft_items.dm +++ b/code/game/objects/items/theft_items.dm @@ -23,7 +23,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/nuke_core/attackby(obj/item/nuke_core_container/container, mob/user) +/obj/item/nuke_core/attackby__legacy__attackchain(obj/item/nuke_core_container/container, mob/user) if(istype(container)) container.load(src, user) else @@ -106,7 +106,7 @@ if(ismob(loc)) to_chat(loc, "[src] is permanently sealed, [core]'s radiation is contained.") -/obj/item/nuke_core_container/attackby(obj/item/nuke_core/plutonium/core, mob/user) +/obj/item/nuke_core_container/attackby__legacy__attackchain(obj/item/nuke_core/plutonium/core, mob/user) if(!istype(core) || cracked) return ..() @@ -177,7 +177,7 @@ return TRUE return FALSE -/obj/item/nuke_core/supermatter_sliver/attackby(obj/item/I, mob/living/user, params) +/obj/item/nuke_core/supermatter_sliver/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/retractor/supermatter)) var/obj/item/retractor/supermatter/tongs = I if(tongs.sliver) @@ -279,7 +279,7 @@ icon_state = "core_container_cracked_empty" to_chat(user, "You carefully pick up [I.sliver] with [I].") -/obj/item/nuke_core_container/supermatter/attackby(obj/item/retractor/supermatter/tongs, mob/user) +/obj/item/nuke_core_container/supermatter/attackby__legacy__attackchain(obj/item/retractor/supermatter/tongs, mob/user) if(istype(tongs)) if(cracked) //lets take that shard out @@ -348,7 +348,7 @@ QDEL_NULL(sliver) return ..() -/obj/item/retractor/supermatter/afterattack(atom/O, mob/user, proximity) +/obj/item/retractor/supermatter/afterattack__legacy__attackchain(atom/O, mob/user, proximity) . = ..() if(!sliver) return diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 70795a2d89ac0..8f1b1fdb27424 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -131,7 +131,7 @@ playsound(loc, 'sound/items/jaws_pry.ogg', 50, TRUE, -1) return BRUTELOSS -/obj/item/crowbar/power/attack_self(mob/user) +/obj/item/crowbar/power/attack_self__legacy__attackchain(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power to_chat(user, "You attach the cutting jaws to [src].") diff --git a/code/game/objects/items/tools/multitool.dm b/code/game/objects/items/tools/multitool.dm index 51437649a0cd8..6e824e6ccf7ee 100644 --- a/code/game/objects/items/tools/multitool.dm +++ b/code/game/objects/items/tools/multitool.dm @@ -47,7 +47,7 @@ buffer = null return ..() -/obj/item/multitool/attack_self(mob/user) +/obj/item/multitool/attack_self__legacy__attackchain(mob/user) if(!COOLDOWN_FINISHED(src, cd_apc_scan)) return COOLDOWN_START(src, cd_apc_scan, 1.5 SECONDS) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 9cedc192c75b3..dce3f64054ca5 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -50,7 +50,7 @@ if(prob(75)) src.pixel_y = rand(0, 16) -/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) +/obj/item/screwdriver/attack__legacy__attackchain(mob/living/carbon/M, mob/living/carbon/user) if(!istype(M) || user.a_intent == INTENT_HELP) return ..() if(user.zone_selected != "eyes" && user.zone_selected != "head") @@ -117,7 +117,7 @@ user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") return BRUTELOSS -/obj/item/screwdriver/power/attack_self(mob/user) +/obj/item/screwdriver/power/attack_self__legacy__attackchain(mob/user) playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1) var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power to_chat(user, "You attach the bolt driver bit to [src].") diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm index 0a645a62b7b3e..9208ae62090b4 100644 --- a/code/game/objects/items/tools/welder.dm +++ b/code/game/objects/items/tools/welder.dm @@ -86,7 +86,7 @@ return remove_fuel(maximum_fuel) -/obj/item/weldingtool/attack_self(mob/user) +/obj/item/weldingtool/attack_self__legacy__attackchain(mob/user) if(tool_enabled) //Turn off the welder if it's on to_chat(user, "You switch off [src].") toggle_welder() @@ -145,7 +145,7 @@ remove_fuel(amount) return TRUE -/obj/item/weldingtool/afterattack(atom/target, mob/user, proximity, params) +/obj/item/weldingtool/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) . = ..() if(!tool_enabled) return @@ -153,7 +153,7 @@ return remove_fuel(0.5) -/obj/item/weldingtool/attack(mob/living/target, mob/living/user) +/obj/item/weldingtool/attack__legacy__attackchain(mob/living/target, mob/living/user, def_zone) if(cigarette_lighter_act(user, target)) return if(tool_enabled && target.IgniteMob()) diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index ff1ee43e3ffa5..9ddf4fe8ffc66 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -31,7 +31,7 @@ belt_icon = "wirecutters_[param_color]" icon_state = "cutters_[param_color]" -/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user) +/obj/item/wirecutters/attack__legacy__attackchain(mob/living/carbon/C, mob/user) if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) user.visible_message("[user] cuts [C]'s restraints with [src]!") QDEL_NULL(C.handcuffed) @@ -145,7 +145,7 @@ return OXYLOSS -/obj/item/wirecutters/power/attack_self(mob/user) +/obj/item/wirecutters/power/attack_self__legacy__attackchain(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power to_chat(user, "You attach the pry jaws to [src].") diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index c63fb0bb23033..0601ca4d473ae 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -69,7 +69,7 @@ toolspeed = 0.25 w_class = WEIGHT_CLASS_NORMAL -/obj/item/wrench/power/attack_self(mob/user) +/obj/item/wrench/power/attack_self__legacy__attackchain(mob/user) playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1) var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power to_chat(user, "You attach the screwdriver bit to [src].") diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 120303459ab52..d45c130ae91bb 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -40,10 +40,10 @@ ..() create_reagents(10) -/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob) +/obj/item/toy/balloon/attack__legacy__attackchain(mob/living/carbon/human/M as mob, mob/user as mob) return -/obj/item/toy/balloon/afterattack(atom/A, mob/user, proximity) +/obj/item/toy/balloon/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(istype(A, /obj/structure/reagent_dispensers)) @@ -66,7 +66,7 @@ update_icon() return -/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob, params) +/obj/item/toy/balloon/attackby__legacy__attackchain(obj/O as obj, mob/user as mob, params) if(istype(O, /obj/item/reagent_containers/glass) || istype(O, /obj/item/reagent_containers/drinks/drinkingglass)) if(O.reagents) if(O.reagents.total_volume < 1) @@ -115,7 +115,7 @@ w_class = WEIGHT_CLASS_BULKY var/lastused = null -/obj/item/toy/syndicateballoon/attack_self(mob/user) +/obj/item/toy/syndicateballoon/attack_self__legacy__attackchain(mob/user) if(world.time - lastused < CLICK_CD_MELEE) return var/playverb = pick("bat [src]", "tug on [src]'s string", "play with [src]") @@ -184,7 +184,7 @@ w_class = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "struck", "hit") -/obj/item/toy/sword/attack_self(mob/user) +/obj/item/toy/sword/attack_self__legacy__attackchain(mob/user) active = !active if(active) to_chat(user, "You extend the plastic blade with a quick flick of your wrist.") @@ -207,7 +207,7 @@ return // Copied from /obj/item/melee/energy/sword/attackby -/obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params) +/obj/item/toy/sword/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) ..() if(istype(W, /obj/item/toy/sword)) if(W == src) @@ -229,7 +229,7 @@ /// Sets to TRUE once the character using it hits something and realises it's not a real energy sword var/pranked = FALSE -/obj/item/toy/sword/attack(mob/target, mob/living/user) +/obj/item/toy/sword/attack__legacy__attackchain(mob/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() @@ -283,7 +283,7 @@ target.unEquip(cig, TRUE) return TRUE -/obj/item/toy/sword/chaosprank/afterattack(mob/living/target, mob/living/user, proximity) +/obj/item/toy/sword/chaosprank/afterattack__legacy__attackchain(mob/living/target, mob/living/user, proximity) ..() if(!pranked) to_chat(user, "Oh... It's a fake.") @@ -423,7 +423,7 @@ w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 -/obj/item/toy/nuke/attack_self(mob/user) +/obj/item/toy/nuke/attack_self__legacy__attackchain(mob/user) if(cooldown < world.time) cooldown = world.time + 1800 //3 minutes user.visible_message("[user] presses a button on [src]", "You activate [src], it plays a loud noise!", "You hear the click of a button.") @@ -455,7 +455,7 @@ desc += " This one is [item_color]." icon_state = "therapy[item_color]" -/obj/item/toy/therapy/attack_self(mob/user) +/obj/item/toy/therapy/attack_self__legacy__attackchain(mob/user) if(cooldown < world.time - 8) to_chat(user, "You relieve some stress with \the [src].") playsound(user, 'sound/items/squeaktoy.ogg', 20, 1) @@ -580,14 +580,14 @@ var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses* -/obj/item/toy/plushie/attack(mob/M as mob, mob/user as mob) +/obj/item/toy/plushie/attack__legacy__attackchain(mob/M as mob, mob/user as mob) playsound(loc, pickweight(poof_sound), 20, 1) // Play the whoosh sound in local area if(iscarbon(M)) if(prob(10)) M.reagents.add_reagent("hugs", 10) return ..() -/obj/item/toy/plushie/attack_self(mob/user as mob) +/obj/item/toy/plushie/attack_self__legacy__attackchain(mob/user as mob) if(has_stuffing || grenade) var/cuddle_verb = pick("hugs", "cuddles", "snugs") user.visible_message("[user] [cuddle_verb] [src].") @@ -609,7 +609,7 @@ QDEL_NULL(grenade) return ..() -/obj/item/toy/plushie/attackby(obj/item/I, mob/living/user, params) +/obj/item/toy/plushie/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(I.sharp) if(!grenade) if(!has_stuffing) @@ -796,7 +796,7 @@ /obj/item/toy/plushie/greyplushie/proc/reset_hugdown() hug_cooldown = FALSE //Resets the hug interaction cooldown. -/obj/item/toy/plushie/greyplushie/attack_self(mob/user)//code for talking when hugged. +/obj/item/toy/plushie/greyplushie/attack_self__legacy__attackchain(mob/user)//code for talking when hugged. . = ..() if(hug_cooldown) return @@ -814,7 +814,7 @@ item_state = "plushie_vox" var/cooldown = 0 -/obj/item/toy/plushie/voxplushie/attack_self(mob/user) +/obj/item/toy/plushie/voxplushie/attack_self__legacy__attackchain(mob/user) if(!cooldown) playsound(user, 'sound/voice/shriek1.ogg', 10, 0) visible_message("Skreee!") @@ -829,7 +829,7 @@ icon_state = "plushie_ipc" item_state = "plushie_ipc" -/obj/item/toy/plushie/ipcplushie/attackby(obj/item/B, mob/user, params) +/obj/item/toy/plushie/ipcplushie/attackby__legacy__attackchain(obj/item/B, mob/user, params) if(istype(B, /obj/item/food/breadslice)) new /obj/item/food/toast(get_turf(loc)) to_chat(user, "You insert bread into the toaster.") @@ -871,7 +871,7 @@ item_state = "plushie_nian" var/cooldown = FALSE -/obj/item/toy/plushie/nianplushie/attack_self(mob/user) +/obj/item/toy/plushie/nianplushie/attack_self__legacy__attackchain(mob/user) if(cooldown) return ..() @@ -945,7 +945,7 @@ else . += "single_latch" -/obj/item/toy/windup_toolbox/attack_self(mob/user) +/obj/item/toy/windup_toolbox/attack_self__legacy__attackchain(mob/user) if(!active) to_chat(user, "You wind up [src], it begins to rumble.") active = TRUE @@ -974,7 +974,7 @@ item_state = "flashtool" w_class = WEIGHT_CLASS_TINY -/obj/item/toy/flash/attack(mob/living/M, mob/user) +/obj/item/toy/flash/attack__legacy__attackchain(mob/living/M, mob/user) playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) flick("[initial(icon_state)]2", src) user.visible_message("[user] blinds [M] with the flash!") @@ -991,7 +991,7 @@ w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 -/obj/item/toy/redbutton/attack_self(mob/user) +/obj/item/toy/redbutton/attack_self__legacy__attackchain(mob/user) if(cooldown >= world.time) to_chat(user, "Nothing happens.") return @@ -1016,7 +1016,7 @@ w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 -/obj/item/toy/ai/attack_self(mob/user) +/obj/item/toy/ai/attack_self__legacy__attackchain(mob/user) if(!cooldown) //for the sanity of everyone var/message = generate_ion_law() to_chat(user, "You press the button on [src].") @@ -1036,7 +1036,7 @@ var/list/messages = list("You must challenge the devil to a dance-off!", "The devils true name is Ian", "The devil hates salt!", "Would you like infinite power?", "Would you like infinite wisdom?", " Would you like infinite healing?") var/cooldown = FALSE -/obj/item/toy/codex_gigas/attack_self(mob/user) +/obj/item/toy/codex_gigas/attack_self__legacy__attackchain(mob/user) if(!cooldown) user.visible_message( "[user] presses the button on \the [src].", @@ -1096,7 +1096,7 @@ attack_verb = list("attacked", "bashed", "smashed", "stoned") hitsound = "swing_hit" -/obj/item/toy/pet_rock/attack_self(mob/user) +/obj/item/toy/pet_rock/attack_self__legacy__attackchain(mob/user) var/cuddle_verb = pick("admires", "respects", "cherises", "appreciates") user.visible_message("[user] [cuddle_verb] [src].") @@ -1121,7 +1121,7 @@ var/cooldown = 0 var/obj/stored_minature = null -/obj/item/toy/minigibber/attack_self(mob/user) +/obj/item/toy/minigibber/attack_self__legacy__attackchain(mob/user) if(stored_minature) to_chat(user, "\The [src] makes a violent grinding noise as it tears apart the miniature figure inside!") @@ -1134,7 +1134,7 @@ playsound(user, 'sound/goonstation/effects/gib.ogg', 20, 1) cooldown = world.time -/obj/item/toy/minigibber/attackby(obj/O, mob/user, params) +/obj/item/toy/minigibber/attackby__legacy__attackchain(obj/O, mob/user, params) if(istype(O,/obj/item/toy/character) && O.loc == user) to_chat(user, "You start feeding \the [O] [bicon(O)] into \the [src]'s mini-input.") if(do_after(user, 10, target = src)) @@ -1180,7 +1180,7 @@ ..() spin_cylinder() -/obj/item/toy/russian_revolver/attack_self(mob/user) +/obj/item/toy/russian_revolver/attack_self__legacy__attackchain(mob/user) if(!bullets_left) user.visible_message("[user] loads a bullet into [src]'s cylinder before spinning it.") spin_cylinder() @@ -1188,10 +1188,10 @@ user.visible_message("[user] spins the cylinder on [src]!") spin_cylinder() -/obj/item/toy/russian_revolver/attack(mob/M, mob/living/user) +/obj/item/toy/russian_revolver/attack__legacy__attackchain(mob/M, mob/living/user) return -/obj/item/toy/russian_revolver/afterattack(atom/target, mob/user, flag, params) +/obj/item/toy/russian_revolver/afterattack__legacy__attackchain(atom/target, mob/user, flag, params) if(flag) if(target in user.contents) return @@ -1259,7 +1259,7 @@ to_chat(user, "You go to spin the chamber... and it goes off in your face!") shoot_gun(user) -/obj/item/toy/russian_revolver/trick_revolver/attack_self(mob/user) +/obj/item/toy/russian_revolver/trick_revolver/attack_self__legacy__attackchain(mob/user) if(!bullets_left) //You can re-arm the trap... user.visible_message("[user] loads a bullet into [src]'s cylinder before spinning it.") spin_cylinder() @@ -1267,7 +1267,7 @@ user.visible_message("[user] tries to empty [src], but it goes off in their face!") shoot_gun(user) -/obj/item/toy/russian_revolver/trick_revolver/attackby(obj/item/I, mob/user, params) +/obj/item/toy/russian_revolver/trick_revolver/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) to_chat(user, "You go to write on [src].. and it goes off in your face!") shoot_gun(user) @@ -1347,7 +1347,7 @@ var/cooldown = 0 var/cooldown_time = 3 SECONDS -/obj/item/toy/figure/attack_self(mob/user) +/obj/item/toy/figure/attack_self__legacy__attackchain(mob/user) ..() if(cooldown < world.time) cooldown = world.time + cooldown_time @@ -1730,7 +1730,7 @@ var/cooldown = 0 var/list/possible_answers = list("Definitely", "All signs point to yes.", "Most likely.", "Yes.", "Ask again later.", "Better not tell you now.", "Future Unclear.", "Maybe.", "Doubtful.", "No.", "Don't count on it.", "Never.") -/obj/item/toy/eight_ball/attack_self(mob/user as mob) +/obj/item/toy/eight_ball/attack_self__legacy__attackchain(mob/user as mob) if(!cooldown) var/answer = pick(possible_answers) user.visible_message("[user] focuses on [user.p_their()] question and [use_action]...") diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 42635506edb81..3fcc330ad135e 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -17,7 +17,7 @@ return TRUE return ..() -/obj/item/trash/attack(mob/M as mob, mob/living/user as mob) +/obj/item/trash/attack__legacy__attackchain(mob/M as mob, mob/living/user as mob) return /obj/item/trash/raisins diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 4748342592bb1..91e8d09040451 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -116,7 +116,7 @@ AI MODULES icon_state = "light_blue_medium" origin_tech = "programming=3;materials=3" -/obj/item/ai_module/safeguard/attack_self(mob/user as mob) +/obj/item/ai_module/safeguard/attack_self__legacy__attackchain(mob/user as mob) ..() var/new_targetName = tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name) if(!new_targetName) @@ -145,7 +145,7 @@ AI MODULES icon_state = "green_high" origin_tech = "programming=4;materials=4" -/obj/item/ai_module/one_crew_member/attack_self(mob/user as mob) +/obj/item/ai_module/one_crew_member/attack_self__legacy__attackchain(mob/user as mob) ..() var/new_targetName = tgui_input_text(usr, "Please enter the name of the person who is the only crew.", "Who?", user.real_name) if(!new_targetName) @@ -178,7 +178,7 @@ AI MODULES icon_state = "red_high" origin_tech = "programming=4;materials=4" //made of gold -/obj/item/ai_module/protect_station/attack_self(mob/user as mob) +/obj/item/ai_module/protect_station/attack_self__legacy__attackchain(mob/user as mob) ..() /obj/item/ai_module/protect_station/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender) @@ -194,7 +194,7 @@ AI MODULES icon_state = "light_blue_high" origin_tech = "programming=4;biotech=2;materials=4" -/obj/item/ai_module/oxygen/attack_self(mob/user as mob) +/obj/item/ai_module/oxygen/attack_self__legacy__attackchain(mob/user as mob) ..() /obj/item/ai_module/oxygen/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender) @@ -213,7 +213,7 @@ AI MODULES icon_state = "standard_high" origin_tech = "programming=4;materials=4" -/obj/item/ai_module/freeform/attack_self(mob/user as mob) +/obj/item/ai_module/freeform/attack_self__legacy__attackchain(mob/user as mob) ..() var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority", lawpos, MAX_SUPPLIED_LAW_NUMBER, MIN_SUPPLIED_LAW_NUMBER) if(isnull(new_lawpos)) @@ -423,7 +423,7 @@ AI MODULES icon_state = "standard_high" origin_tech = "programming=5;materials=4" -/obj/item/ai_module/freeformcore/attack_self(mob/user as mob) +/obj/item/ai_module/freeformcore/attack_self__legacy__attackchain(mob/user as mob) ..() var/new_targetName = tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry") if(!new_targetName) @@ -452,7 +452,7 @@ AI MODULES icon_state = "syndicate" origin_tech = "programming=5;materials=5;syndicate=2" -/obj/item/ai_module/syndicate/attack_self(mob/user as mob) +/obj/item/ai_module/syndicate/attack_self__legacy__attackchain(mob/user as mob) ..() var/new_targetName = tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", max_length = MAX_MESSAGE_LEN) if(!new_targetName) @@ -492,7 +492,7 @@ AI MODULES target.add_ion_law(ion_law) return ion_law -/obj/item/ai_module/toy_ai/attack_self(mob/user) +/obj/item/ai_module/toy_ai/attack_self__legacy__attackchain(mob/user) ion_law = generate_ion_law() to_chat(user, "You press the button on [src].") playsound(user, 'sound/machines/click.ogg', 20, TRUE) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index d7ea80dd794bf..07fa4649fd5e2 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -357,7 +357,7 @@ return OBLITERATION user.visible_message("[user] puts the barrel of [src] into [user.p_their()] mouth and pulls the trigger. It looks like [user.p_theyre()] trying to commit suicide!") - if(!afterattack(suicide_tile, user, TRUE)) + if(!afterattack__legacy__attackchain(suicide_tile, user, TRUE)) flags &= ~NODROP return SHAME user.visible_message("[user] explodes as [src] builds a structure inside [user.p_them()]!") @@ -413,7 +413,7 @@ update_icon(UPDATE_OVERLAYS) SStgui.update_uis(src) -/obj/item/rcd/attackby(obj/item/W, mob/user, params) +/obj/item/rcd/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!istype(W, /obj/item/rcd_ammo)) return ..() var/obj/item/rcd_ammo/R = W @@ -465,7 +465,7 @@ to_chat(user, "You change [src]'s mode to '[choice]'.") -/obj/item/rcd/attack_self(mob/user) +/obj/item/rcd/attack_self__legacy__attackchain(mob/user) //Change the mode // Oh I thought the UI was just for fucking staring at radial_menu(user) @@ -598,7 +598,7 @@ else return FALSE -/obj/item/rcd/afterattack(atom/A, mob/user, proximity) +/obj/item/rcd/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return FALSE if(istype(A, /turf/space/transit)) @@ -716,7 +716,7 @@ materials = list(MAT_METAL=16000, MAT_GLASS=8000) var/ammoamt = 20 -/obj/item/rcd_ammo/attackby(obj/item/I, mob/user) +/obj/item/rcd_ammo/attackby__legacy__attackchain(obj/item/I, mob/user) if(!istype(I, /obj/item/rcd) || issilicon(user)) return ..() var/obj/item/rcd/R = I diff --git a/code/game/objects/items/weapons/RCL.dm b/code/game/objects/items/weapons/RCL.dm index ca9494174125a..d97ec8f6ceab1 100644 --- a/code/game/objects/items/weapons/RCL.dm +++ b/code/game/objects/items/weapons/RCL.dm @@ -20,7 +20,7 @@ . = ..() AddComponent(/datum/component/two_handed) -/obj/item/rcl/attackby(obj/item/W, mob/user) +/obj/item/rcl/attackby__legacy__attackchain(obj/item/W, mob/user) if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W if(!loaded) @@ -110,7 +110,7 @@ active = FALSE last = null -/obj/item/rcl/attack_self(mob/user) +/obj/item/rcl/attack_self__legacy__attackchain(mob/user) ..() active = HAS_TRAIT(src, TRAIT_WIELDED) if(!active) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 8c5895727298f..a9ca00fa7ffed 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -16,7 +16,7 @@ var/atom/currently_dispensing var/power_mode = POWER_NONE -/obj/item/rsf/attack_self(mob/user) +/obj/item/rsf/attack_self__legacy__attackchain(mob/user) playsound(loc, 'sound/effects/pop.ogg', 50, 0) if(!currently_dispensing) to_chat(user, "Choose an item to dispense!") @@ -68,7 +68,7 @@ return TRUE -/obj/item/rsf/afterattack(atom/A, mob/user, proximity) +/obj/item/rsf/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!currently_dispensing) return if(!proximity) diff --git a/code/game/objects/items/weapons/agent_id.dm b/code/game/objects/items/weapons/agent_id.dm index c3c48a09e02ca..da0f82d9a475d 100644 --- a/code/game/objects/items/weapons/agent_id.dm +++ b/code/game/objects/items/weapons/agent_id.dm @@ -52,7 +52,7 @@ untrackable = TRUE access = list(ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER, ACCESS_SYNDICATE_COMMAND, ACCESS_EXTERNAL_AIRLOCKS) -/obj/item/card/id/syndicate/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/card/id/syndicate/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, params) if(!proximity_flag) return if(istype(target, /obj/item/card/id)) @@ -127,7 +127,7 @@ ui = new(user, src, "AgentCard", name) ui.open() -/obj/item/card/id/syndicate/attack_self(mob/user) +/obj/item/card/id/syndicate/attack_self__legacy__attackchain(mob/user) if(!ishuman(user)) return if(!registered_human) @@ -289,8 +289,8 @@ if(isAntag(user)) . += "Similar to an agent ID, this ID card can be used to copy accesses, but it lacks the customization and anti-tracking capabilities of an agent ID." -/obj/item/card/id/syndi_scan_only/afterattack(obj/item/O, mob/user, proximity) - if(!proximity) +/obj/item/card/id/syndi_scan_only/afterattack__legacy__attackchain(atom/O, mob/user, proximity_flag, params) + if(!proximity_flag) return if(istype(O, /obj/item/card/id)) var/obj/item/card/id/I = O diff --git a/code/game/objects/items/weapons/alien_specific.dm b/code/game/objects/items/weapons/alien_specific.dm index ed58a1f0a5f56..a5780bc2f34f7 100644 --- a/code/game/objects/items/weapons/alien_specific.dm +++ b/code/game/objects/items/weapons/alien_specific.dm @@ -31,7 +31,7 @@ icon_state = "borg-spray-smoke" list_reagents = list("water" = 50) -/obj/item/reagent_containers/spray/alien/smoke/afterattack(atom/A as mob|obj, mob/user as mob) +/obj/item/reagent_containers/spray/alien/smoke/afterattack__legacy__attackchain(atom/A as mob|obj, mob/user as mob) if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) if(!A.reagents.total_volume && A.reagents) to_chat(user, "\The [A] is empty.") diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm index 9430adcb21c61..2e905ae25409c 100644 --- a/code/game/objects/items/weapons/batons.dm +++ b/code/game/objects/items/weapons/batons.dm @@ -35,7 +35,7 @@ /// Whether the baton is toggled on (to allow attacking) var/on = TRUE -/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user) +/obj/item/melee/classic_baton/attack__legacy__attackchain(mob/living/target, mob/living/user) if(!on) return ..() @@ -184,7 +184,7 @@ force = force_off attack_verb = on ? attack_verb_on : attack_verb_off -/obj/item/melee/classic_baton/telescopic/attack_self(mob/user) +/obj/item/melee/classic_baton/telescopic/attack_self__legacy__attackchain(mob/user) on = !on icon_state = on ? icon_state_on : icon_state_off if(on) diff --git a/code/game/objects/items/weapons/bee_briefcase.dm b/code/game/objects/items/weapons/bee_briefcase.dm index 8575e710b4527..6f34ff42983f9 100644 --- a/code/game/objects/items/weapons/bee_briefcase.dm +++ b/code/game/objects/items/weapons/bee_briefcase.dm @@ -30,7 +30,7 @@ . += "A briefcase filled with deadly bees, you should inject this with a syringe of your own blood before opening it. Exotic blood cannot be used." -/obj/item/bee_briefcase/attackby(obj/item/I, mob/user, params) +/obj/item/bee_briefcase/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = I if(!bees_left) @@ -55,7 +55,7 @@ to_chat(user, "You spray [I] into [src].") playsound(loc, 'sound/effects/spray3.ogg', 50, TRUE, -6) -/obj/item/bee_briefcase/attack_self(mob/user) +/obj/item/bee_briefcase/attack_self__legacy__attackchain(mob/user) var/bees_released if(!bees_left) to_chat(user, "The lack of all and any bees at this event has been somewhat of a let-down...") diff --git a/code/game/objects/items/weapons/bio_chips/bio_chip_case.dm b/code/game/objects/items/weapons/bio_chips/bio_chip_case.dm index 96ff2a4a15ebb..1a9e927f57d53 100644 --- a/code/game/objects/items/weapons/bio_chips/bio_chip_case.dm +++ b/code/game/objects/items/weapons/bio_chips/bio_chip_case.dm @@ -43,7 +43,7 @@ var/image/implant_overlay = image('icons/obj/bio_chips.dmi', imp.implant_state) . += implant_overlay -/obj/item/bio_chip_case/attackby(obj/item/W, mob/user) +/obj/item/bio_chip_case/attackby__legacy__attackchain(obj/item/W, mob/user) ..() if(is_pen(W)) diff --git a/code/game/objects/items/weapons/bio_chips/bio_chip_pad.dm b/code/game/objects/items/weapons/bio_chips/bio_chip_pad.dm index 195d8e8364cd1..6aca8065875d3 100644 --- a/code/game/objects/items/weapons/bio_chips/bio_chip_pad.dm +++ b/code/game/objects/items/weapons/bio_chips/bio_chip_pad.dm @@ -26,10 +26,10 @@ else icon_state = "implantpad-off" -/obj/item/bio_chip_pad/attack_self(mob/user) +/obj/item/bio_chip_pad/attack_self__legacy__attackchain(mob/user) ui_interact(user) -/obj/item/bio_chip_pad/attackby(obj/item/bio_chip_case/C, mob/user) +/obj/item/bio_chip_pad/attackby__legacy__attackchain(obj/item/bio_chip_case/C, mob/user) if(istype(C)) addcase(user, C) else diff --git a/code/game/objects/items/weapons/bio_chips/bio_chipper.dm b/code/game/objects/items/weapons/bio_chips/bio_chipper.dm index cc39c68ae3834..25d0b9d7cc39b 100644 --- a/code/game/objects/items/weapons/bio_chips/bio_chipper.dm +++ b/code/game/objects/items/weapons/bio_chips/bio_chipper.dm @@ -21,7 +21,7 @@ icon_state = "implanter0" origin_tech = initial(origin_tech) -/obj/item/bio_chip_implanter/attack(mob/living/carbon/M, mob/user) +/obj/item/bio_chip_implanter/attack__legacy__attackchain(mob/living/carbon/M, mob/user) if(!iscarbon(M)) return if(user && imp) @@ -39,7 +39,7 @@ imp = null update_icon(UPDATE_ICON_STATE) -/obj/item/bio_chip_implanter/attackby(obj/item/W, mob/user, params) +/obj/item/bio_chip_implanter/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(is_pen(W)) rename_interactive(user, W) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index c8558c182c56a..716ed73ca8350 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -38,10 +38,10 @@ flags = NOBLUDGEON flags_2 = NO_MAT_REDEMPTION_2 -/obj/item/card/emag/attack() +/obj/item/card/emag/attack__legacy__attackchain() return -/obj/item/card/emag/afterattack(atom/target, mob/user, proximity) +/obj/item/card/emag/afterattack__legacy__attackchain(atom/target, mob/user, proximity) var/atom/A = target if(!proximity) return @@ -53,7 +53,7 @@ icon_state = "magic_key" origin_tech = "magnets=2" -/obj/item/card/emag/magic_key/afterattack(atom/target, mob/user, proximity) +/obj/item/card/emag/magic_key/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!isairlock(target)) return var/obj/machinery/door/D = target @@ -75,10 +75,10 @@ . = ..() AddComponent(/datum/component/slippery, src, 16 SECONDS, 100) -/obj/item/card/cmag/attack() +/obj/item/card/cmag/attack__legacy__attackchain() return -/obj/item/card/cmag/afterattack(atom/target, mob/user, proximity) +/obj/item/card/cmag/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return target.cmag_act(user) @@ -151,7 +151,7 @@ popup.set_content(dat) popup.open() -/obj/item/card/id/attack_self(mob/user as mob) +/obj/item/card/id/attack_self__legacy__attackchain(mob/user as mob) user.visible_message("[user] shows you: [bicon(src)] [name]. The assignment on the card: [assignment]",\ "You flash your ID card: [bicon(src)] [name]. The assignment on the card: [assignment]") if(mining_points) @@ -251,7 +251,7 @@ /obj/item/card/id/proc/get_departments() return get_departments_from_job(rank) -/obj/item/card/id/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/card/id/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() if(istype(W, /obj/item/id_decal/)) @@ -751,7 +751,7 @@ access = list(ACCESS_FREE_GOLEMS, ACCESS_ROBOTICS, ACCESS_CLOWN, ACCESS_MIME, ACCESS_XENOBIOLOGY) //access to robots/mechs var/registered = FALSE -/obj/item/card/id/golem/attack_self(mob/user as mob) +/obj/item/card/id/golem/attack_self__legacy__attackchain(mob/user as mob) if(!registered && ishuman(user)) registered_name = user.real_name SetOwnerInfo(user) diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm index 883dc8def006a..4ff358a88272a 100644 --- a/code/game/objects/items/weapons/caution.dm +++ b/code/game/objects/items/weapons/caution.dm @@ -21,7 +21,7 @@ . = ..() AddComponent(/datum/component/proximity_monitor) -/obj/item/caution/proximity_sign/attack_self(mob/user as mob) +/obj/item/caution/proximity_sign/attack_self__legacy__attackchain(mob/user as mob) if(ishuman(user)) var/mob/living/carbon/human/H = user if(!H.mind.has_antag_datum(/datum/antagonist/traitor) && !IS_MINDSLAVE(H)) @@ -74,7 +74,7 @@ energy_type = /datum/robot_storage/energy/jani_landmine is_cyborg = TRUE -/obj/item/stack/caution/proximity_sign/malf/afterattack(atom/target, mob/user, proximity) +/obj/item/stack/caution/proximity_sign/malf/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!check_allowed_items(target, 1)) return if(!proximity) diff --git a/code/game/objects/items/weapons/chemical_flamethrower/chemical_flamethrower.dm b/code/game/objects/items/weapons/chemical_flamethrower/chemical_flamethrower.dm index 32ef36bb8a6a4..a5205aae1e42a 100644 --- a/code/game/objects/items/weapons/chemical_flamethrower/chemical_flamethrower.dm +++ b/code/game/objects/items/weapons/chemical_flamethrower/chemical_flamethrower.dm @@ -56,7 +56,7 @@ . += mutable_appearance('icons/obj/chemical_flamethrower.dmi', "[chemical_canister.icon_state]_[iterator]") iterator++ -/obj/item/chemical_flamethrower/attack_self(mob/user) +/obj/item/chemical_flamethrower/attack_self__legacy__attackchain(mob/user) . = ..() if(length(canisters)) unequip_canisters(user) @@ -71,7 +71,7 @@ canisters -= canister_to_remove update_icon(UPDATE_OVERLAYS) -/obj/item/chemical_flamethrower/attackby(obj/item/I, mob/user, params) +/obj/item/chemical_flamethrower/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(!istype(I, /obj/item/chemical_canister)) to_chat(user, "You can't fit [I] in there!") @@ -112,7 +112,7 @@ canister_fire_applications = round(fire_applications / how_many_canisters, 1) update_icon(UPDATE_OVERLAYS) -/obj/item/chemical_flamethrower/afterattack(atom/target, mob/user, flag) +/obj/item/chemical_flamethrower/afterattack__legacy__attackchain(atom/target, mob/user, flag) . = ..() if(flag || !user) return diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 35efab9e071a7..bdaaceb28fe90 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -72,7 +72,7 @@ LIGHTERS ARE IN LIGHTERS.DM return TRUE return ..() -/obj/item/clothing/mask/cigarette/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/clothing/mask/cigarette/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) if(istype(M) && M.on_fire) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(M) @@ -90,7 +90,7 @@ LIGHTERS ARE IN LIGHTERS.DM light(user, user) return TRUE -/obj/item/clothing/mask/cigarette/afterattack(atom/target, mob/living/user, proximity) +/obj/item/clothing/mask/cigarette/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity) if(!proximity) return @@ -129,7 +129,7 @@ LIGHTERS ARE IN LIGHTERS.DM return ..() -/obj/item/clothing/mask/cigarette/attack_self(mob/user) +/obj/item/clothing/mask/cigarette/attack_self__legacy__attackchain(mob/user) if(lit) user.visible_message( "[user] calmly drops and treads on [src], putting it out instantly.", @@ -176,7 +176,7 @@ LIGHTERS ARE IN LIGHTERS.DM cig.light(user, target) return TRUE -/obj/item/clothing/mask/cigarette/attackby(obj/item/I, mob/living/user, params) +/obj/item/clothing/mask/cigarette/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(I.cigarette_lighter_act(user, user, src)) return @@ -380,7 +380,7 @@ LIGHTERS ARE IN LIGHTERS.DM icon_state = "cig_paper" w_class = WEIGHT_CLASS_TINY -/obj/item/rollingpaper/afterattack(atom/target, mob/user, proximity) +/obj/item/rollingpaper/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return @@ -500,7 +500,7 @@ LIGHTERS ARE IN LIGHTERS.DM REMOVE_TRAIT(user, TRAIT_BADASS, HOLO_CIGAR) to_chat(user, "You feel less badass.") -/obj/item/clothing/mask/holo_cigar/attack_self(mob/user) +/obj/item/clothing/mask/holo_cigar/attack_self__legacy__attackchain(mob/user) . = ..() if(enabled) enabled = FALSE @@ -555,7 +555,7 @@ LIGHTERS ARE IN LIGHTERS.DM return smoke() -/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user) // Extinguishes the pipe. +/obj/item/clothing/mask/cigarette/pipe/attack_self__legacy__attackchain(mob/user) // Extinguishes the pipe. if(lit) user.visible_message( "[user] puts out [src].", @@ -569,7 +569,7 @@ LIGHTERS ARE IN LIGHTERS.DM return // Refill the pipe -/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/mask/cigarette/pipe/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/food/grown)) var/obj/item/food/grown/O = I if(O.dry) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 7a818cc6f47b2..1aa6d6ba99017 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -41,11 +41,11 @@ item_state = "gold_horn" var/cooldown = 0 -/obj/item/bikehorn/golden/attack(mob/M, mob/user) +/obj/item/bikehorn/golden/attack__legacy__attackchain(mob/M, mob/user) flip_mobs(user) return ..() -/obj/item/bikehorn/golden/attack_self(mob/user) +/obj/item/bikehorn/golden/attack_self__legacy__attackchain(mob/user) flip_mobs(user) ..() @@ -81,7 +81,7 @@ actions_types = list(/datum/action/item_action/laugh_track) var/cooldown = 0 -/obj/item/clown_recorder/attack_self(mob/user) +/obj/item/clown_recorder/attack_self__legacy__attackchain(mob/user) if(cooldown > world.time) to_chat(user, "The tape is still winding back.") return diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 90dd8b77f83c0..4b15f6244e5c5 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -58,7 +58,7 @@ colour = pick(lipstick_colors) name = "[colour] lipstick" -/obj/item/lipstick/attack_self(mob/user) +/obj/item/lipstick/attack_self__legacy__attackchain(mob/user) cut_overlays() to_chat(user, "You twist \the [src] [open ? "closed" : "open"].") open = !open @@ -70,7 +70,7 @@ else icon_state = "lipstick" -/obj/item/lipstick/attack(mob/M, mob/user) +/obj/item/lipstick/attack__legacy__attackchain(mob/M, mob/user) if(!open || !istype(M)) return @@ -107,7 +107,7 @@ usesound = 'sound/items/welder2.ogg' toolspeed = 1 -/obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob) +/obj/item/razor/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/user as mob) if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/head/C = H.get_organ("head") diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index fada7d9a400f8..07ba7116a9d9f 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -29,7 +29,7 @@ resistance_flags = FLAMMABLE var/next_gavel_hit -/obj/item/gavelblock/attackby(obj/item/I, mob/user, params) +/obj/item/gavelblock/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/gavelhammer)) return if(world.time > next_gavel_hit) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 688f302d01b95..8ac8075cb39a5 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -97,7 +97,7 @@ if(ishuman(user) && Adjacent(user)) toggle_paddles(user) -/obj/item/defibrillator/attackby(obj/item/W, mob/user, params) +/obj/item/defibrillator/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stock_parts/cell)) var/obj/item/stock_parts/cell/C = W if(cell) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 79ba850f4fe3d..14ca7c6fb5074 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -339,7 +339,7 @@ /obj/item/dice/d20/e20 var/triggered = FALSE -/obj/item/dice/attack_self(mob/user) +/obj/item/dice/attack_self__legacy__attackchain(mob/user) diceroll(user) /obj/item/dice/throw_impact(atom/target) diff --git a/code/game/objects/items/weapons/disks.dm b/code/game/objects/items/weapons/disks.dm index 99629843d98dc..e40c18bbe1b7d 100644 --- a/code/game/objects/items/weapons/disks.dm +++ b/code/game/objects/items/weapons/disks.dm @@ -57,7 +57,7 @@ var/diskcolor = pick(0, 1, 2) icon_state = "datadisk[diskcolor]" -/obj/item/disk/data/attack_self(mob/user) +/obj/item/disk/data/attack_self__legacy__attackchain(mob/user) read_only = !read_only to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].") diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index b976673864bef..e4c09eff7eb4c 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -118,7 +118,7 @@ if(H) H.sync_organ_dna(assimilate = 0, old_ue = prev_ue) -/obj/item/dnainjector/attack(mob/M, mob/user) +/obj/item/dnainjector/attack__legacy__attackchain(mob/M, mob/user) if(used) to_chat(user, "This injector is used up!") return diff --git a/code/game/objects/items/weapons/dnascrambler.dm b/code/game/objects/items/weapons/dnascrambler.dm index 3fb6d3d812203..ba362a3a4a235 100644 --- a/code/game/objects/items/weapons/dnascrambler.dm +++ b/code/game/objects/items/weapons/dnascrambler.dm @@ -12,7 +12,7 @@ else icon_state = "lepopen" -/obj/item/dnascrambler/attack(mob/M as mob, mob/user as mob) +/obj/item/dnascrambler/attack__legacy__attackchain(mob/M as mob, mob/user as mob) if(!M || !user) return diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 9ad6b1cc5a3b1..be4d87fd36eb5 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -28,7 +28,7 @@ plastic_overlay_target = null return ..() -/obj/item/grenade/plastic/attackby(obj/item/I, mob/user, params) +/obj/item/grenade/plastic/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!nadeassembly && istype(I, /obj/item/assembly)) var/obj/item/assembly/A = I if(!user.unEquip(I)) @@ -58,9 +58,9 @@ if(nadeassembly) nadeassembly.on_found(finder) -/obj/item/grenade/plastic/attack_self(mob/user) +/obj/item/grenade/plastic/attack_self__legacy__attackchain(mob/user) if(nadeassembly) - nadeassembly.attack_self(user) + nadeassembly.attack_self__legacy__attackchain(user) return var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num if(user.is_in_active_hand(src)) @@ -68,7 +68,7 @@ det_time = newtime to_chat(user, "Timer set for [det_time] seconds.") -/obj/item/grenade/plastic/afterattack(mob/AM, mob/user, flag) +/obj/item/grenade/plastic/afterattack__legacy__attackchain(mob/AM, mob/user, flag) if(!flag) return if(ismob(AM) && AM.stat == CONSCIOUS) @@ -166,7 +166,7 @@ /// Will the explosion cause a breach. C4 placed on floors will always cause a breach, regardless of this value. var/ex_breach = FALSE -/obj/item/grenade/plastic/c4/afterattack(atom/movable/AM, mob/user, flag) +/obj/item/grenade/plastic/c4/afterattack__legacy__attackchain(atom/movable/AM, mob/user, flag) aim_dir = get_dir(user, AM) ..() diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 5fff7b07f6c67..88ffb6d244701 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -52,12 +52,12 @@ reagents.add_reagent("water", max_water) ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) -/obj/item/extinguisher/attack_self(mob/user as mob) +/obj/item/extinguisher/attack_self__legacy__attackchain(mob/user as mob) safety = !safety icon_state = "[base_icon_state][!safety]" to_chat(user, "You [safety ? "enable" : "disable"] [src]'s safety.") -/obj/item/extinguisher/attack_obj(obj/O, mob/living/user, params) +/obj/item/extinguisher/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) if(AttemptRefill(O, user)) refilling = TRUE return FALSE @@ -85,7 +85,7 @@ safety = old_safety return TRUE -/obj/item/extinguisher/afterattack(atom/target, mob/user, flag) +/obj/item/extinguisher/afterattack__legacy__attackchain(atom/target, mob/user, flag) . = ..() //TODO; Add support for reagents in water. if(target.loc == user)//No more spraying yourself when putting your extinguisher away diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index f496e5fdb3d71..b1f9f9557cf94 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -74,7 +74,7 @@ else return TRUE -/obj/item/flamethrower/attack(mob/living/target, mob/living/user) +/obj/item/flamethrower/attack__legacy__attackchain(mob/living/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() @@ -121,7 +121,7 @@ cig.light(user, target) return TRUE -/obj/item/flamethrower/afterattack(atom/target, mob/user, flag) +/obj/item/flamethrower/afterattack__legacy__attackchain(atom/target, mob/user, flag) . = ..() if(flag) return // too close @@ -140,7 +140,7 @@ add_attack_logs(user, target, "Flamethrowered at [target.x],[target.y],[target.z]") flame_turf(turflist) -/obj/item/flamethrower/attackby(obj/item/I, mob/user, params) +/obj/item/flamethrower/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(isigniter(I)) var/obj/item/assembly/igniter/IG = I if(IG.secured) @@ -206,7 +206,7 @@ return ptank.return_analyzable_air() return null -/obj/item/flamethrower/attack_self(mob/user) +/obj/item/flamethrower/attack_self__legacy__attackchain(mob/user) toggle_igniter(user) /obj/item/flamethrower/AltClick(mob/user) @@ -269,7 +269,7 @@ operating = FALSE for(var/mob/M in viewers(1, loc)) if(M.client && M.machine == src) - attack_self(M) + attack_self__legacy__attackchain(M) /obj/item/flamethrower/proc/default_ignite(turf/target, release_amount = 0.05) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index cc70eb9816af3..a36a2be9779ac 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -52,7 +52,7 @@ STOP_PROCESSING(SSobj, src) -/obj/item/garrote/attack(mob/living/carbon/M as mob, mob/user as mob) +/obj/item/garrote/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/user as mob) if(garrote_time > world.time) // Cooldown return @@ -84,7 +84,7 @@ to_chat(user, "You cannot use [src] on two people at once!") return - attack_self(user) + attack_self__legacy__attackchain(user) U.swap_hand() // For whatever reason the grab will not properly work if we don't have the free hand active. var/obj/item/grab/G = M.grabbedby(U, 1) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index c43c9cf486325..a8f28a7eab7e6 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -25,7 +25,7 @@ icon_state = "gift[pick(1, 2, 3)]" return -/obj/item/gift/attack_self(mob/user as mob) +/obj/item/gift/attack_self__legacy__attackchain(mob/user as mob) user.drop_item() if(src.gift) user.put_in_active_hand(gift) @@ -39,7 +39,7 @@ return to_chat(user, "You can't move.") -/obj/effect/spresent/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/effect/spresent/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() if(!istype(W, /obj/item/wirecutters)) @@ -53,7 +53,7 @@ qdel(src) -/obj/item/a_gift/attack_self(mob/M as mob) +/obj/item/a_gift/attack_self__legacy__attackchain(mob/M as mob) var/gift_type = pick(/obj/item/sord, /obj/item/storage/wallet, /obj/item/storage/photo_album, @@ -138,5 +138,5 @@ max_amount = 25 resistance_flags = FLAMMABLE -/obj/item/stack/wrapping_paper/attack_self(mob/user) +/obj/item/stack/wrapping_paper/attack_self__legacy__attackchain(mob/user) to_chat(user, "You need to use it on a package that has already been wrapped!") diff --git a/code/game/objects/items/weapons/grenades/bananade.dm b/code/game/objects/items/weapons/grenades/bananade.dm index 11504ffde14f0..4d404ac862c88 100644 --- a/code/game/objects/items/weapons/grenades/bananade.dm +++ b/code/game/objects/items/weapons/grenades/bananade.dm @@ -37,13 +37,13 @@ /obj/item/grenade/bananade/casing/attack_hand() return // No activating an empty grenade -/obj/item/grenade/bananade/casing/attack_self() +/obj/item/grenade/bananade/casing/attack_self__legacy__attackchain() return // Stop trying to break stuff /obj/item/grenade/bananade/casing/prime() return // The grenade isnt completed yet, dont even try to blow it up -/obj/item/grenade/bananade/casing/attackby(obj/item/I, mob/user, params) +/obj/item/grenade/bananade/casing/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grown/bananapeel)) if(deliveryamt < 9) to_chat(user, "You add another banana peel to the assembly.") diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 9f468b673fd1f..82acfec372359 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -89,12 +89,12 @@ underlays += "[O]_r" -/obj/item/grenade/chem_grenade/attack_self(mob/user) +/obj/item/grenade/chem_grenade/attack_self__legacy__attackchain(mob/user) if(stage == READY && !active) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) if(nadeassembly) - nadeassembly.attack_self(user) + nadeassembly.attack_self__legacy__attackchain(user) update_icon(UPDATE_ICON_STATE) else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. @@ -124,7 +124,7 @@ return TRUE return ..() -/obj/item/grenade/chem_grenade/attackby(obj/item/I, mob/user, params) +/obj/item/grenade/chem_grenade/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I,/obj/item/hand_labeler)) var/obj/item/hand_labeler/HL = I if(length(HL.label)) @@ -360,7 +360,7 @@ //I tried to just put it in the allowed_containers list but //if you do that it must have reagents. If you're going to //make a special case you might as well do it explicitly. -Sayu -/obj/item/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params) +/obj/item/grenade/chem_grenade/large/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/slime_extract) && stage == WIRED) to_chat(user, "You add [I] to the assembly.") user.drop_item() diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index 462a9b722356a..2fa8456663865 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -42,7 +42,7 @@ underlays += can_underlay -/obj/item/grenade/iedcasing/attack_self(mob/user) // +/obj/item/grenade/iedcasing/attack_self__legacy__attackchain(mob/user) // if(!active) if(clown_check(user)) to_chat(user, "You light [src]!") diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index b51fb00bfd49e..eb6015b3835ad 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -55,7 +55,7 @@ return FALSE return TRUE -/obj/item/grenade/attack_self(mob/user as mob) +/obj/item/grenade/attack_self__legacy__attackchain(mob/user as mob) if(active) return if(!clown_check(user)) diff --git a/code/game/objects/items/weapons/grenades/syndieminibomb.dm b/code/game/objects/items/weapons/grenades/syndieminibomb.dm index cf3629985c3dd..4bd01c7f8838d 100644 --- a/code/game/objects/items/weapons/grenades/syndieminibomb.dm +++ b/code/game/objects/items/weapons/grenades/syndieminibomb.dm @@ -19,7 +19,7 @@ if(HAS_TRAIT(user, TRAIT_CLUMSY)) . += "There are small glue ejectors all over the bomb." -/obj/item/grenade/syndieminibomb/fake/attack_self(mob/user) +/obj/item/grenade/syndieminibomb/fake/attack_self__legacy__attackchain(mob/user) if(!active) flags |= NODROP to_chat(user, "As you activate the bomb, it emits a substance that sticks to your hand! It won't come off!") @@ -33,7 +33,7 @@ icon_state = "pen" item_state = "pen" -/obj/item/grenade/syndieminibomb/pen/attack_self(mob/user) +/obj/item/grenade/syndieminibomb/pen/attack_self__legacy__attackchain(mob/user) if(!active) visible_message("[user] fumbles with [src]!") . = ..() diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index cc6288bb74c52..6f53ae837093d 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -58,7 +58,7 @@ /// If set to TRUE, people with the TRAIT_CLUMSY won't cuff themselves when trying to cuff others. var/ignoresClumsy = FALSE -/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/user) +/obj/item/restraints/handcuffs/attack__legacy__attackchain(mob/living/carbon/C, mob/user) if(!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return @@ -214,8 +214,6 @@ materials = list() trashtype = /obj/item/restraints/handcuffs/cable/zipties/used - - /obj/item/restraints/handcuffs/cable/zipties/used desc = "A pair of broken zipties." icon_state = "cablecuff_used" @@ -227,7 +225,7 @@ return TRUE return ..() -/obj/item/restraints/handcuffs/cable/zipties/used/attack() +/obj/item/restraints/handcuffs/cable/zipties/used/attack__legacy__attackchain() return ////////////////////////////// @@ -264,7 +262,7 @@ ////////////////////////////// // MARK: CRAFTING ////////////////////////////// -/obj/item/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params) +/obj/item/restraints/handcuffs/cable/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() handle_attack_construction(I, user) @@ -305,7 +303,7 @@ var/obj/item/toy/crayon/C = I cable_color(C.dye_color) -/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) +/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack__legacy__attackchain(mob/living/carbon/C, mob/user) if(isrobot(user)) cuff(C, user, FALSE) diff --git a/code/game/objects/items/weapons/holosign_projector.dm b/code/game/objects/items/weapons/holosign_projector.dm index 5d30939ad2e93..a105715320ae1 100644 --- a/code/game/objects/items/weapons/holosign_projector.dm +++ b/code/game/objects/items/weapons/holosign_projector.dm @@ -18,7 +18,7 @@ var/holosign_type = null var/holocreator_busy = FALSE //to prevent placing multiple holo barriers at once -/obj/item/holosign_creator/afterattack(atom/target, mob/user, flag) +/obj/item/holosign_creator/afterattack__legacy__attackchain(atom/target, mob/user, flag) if(flag) if(!check_allowed_items(target, 1)) return @@ -50,10 +50,10 @@ else to_chat(user, "[src] is projecting at max capacity!") -/obj/item/holosign_creator/attack(mob/living/carbon/human/M, mob/user) +/obj/item/holosign_creator/attack__legacy__attackchain(mob/living/carbon/human/M, mob/user) return -/obj/item/holosign_creator/attack_self(mob/user) +/obj/item/holosign_creator/attack_self__legacy__attackchain(mob/user) if(length(signs)) for(var/H in signs) qdel(H) @@ -80,7 +80,7 @@ . += "Alt Click to [wet_enabled ? "deactivate" : "activate"] its built-in wet evaporation timer." -/obj/item/holosign_creator/janitor/afterattack(atom/target, mob/user, flag) +/obj/item/holosign_creator/janitor/afterattack__legacy__attackchain(atom/target, mob/user, flag) var/obj/structure/holosign/wetsign/WS = ..() if(WS && wet_enabled) WS.wet_timer_start(src) @@ -127,7 +127,7 @@ holosign_type = /obj/structure/holosign/barrier/cyborg var/shock = 0 -/obj/item/holosign_creator/cyborg/attack_self(mob/user) +/obj/item/holosign_creator/cyborg/attack_self__legacy__attackchain(mob/user) if(isrobot(user)) var/mob/living/silicon/robot/R = user diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 12333965c90ac..a1179c681676c 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -35,7 +35,7 @@ user.visible_message("[user] is killing [user.p_themselves()] with \the [src.name]! It looks like [user.p_theyre()] trying to get closer to god!") return BRUTELOSS|FIRELOSS -/obj/item/nullrod/attack(mob/M, mob/living/carbon/user) +/obj/item/nullrod/attack__legacy__attackchain(mob/M, mob/living/carbon/user) ..() var/datum/antagonist/vampire/V = M.mind?.has_antag_datum(/datum/antagonist/vampire) if(ishuman(M) && V && HAS_MIND_TRAIT(M, TRAIT_HOLY)) @@ -62,7 +62,7 @@ throw_at(get_edge_target_turf(user, pick(GLOB.alldirs)), rand(1, 3), 5) -/obj/item/nullrod/attack_self(mob/user) +/obj/item/nullrod/attack_self__legacy__attackchain(mob/user) if(HAS_MIND_TRAIT(user, TRAIT_HOLY) && !reskinned) reskin_holy_weapon(user) @@ -293,7 +293,7 @@ obj_integrity = 100 var/possessed = FALSE -/obj/item/nullrod/scythe/talking/attack_self(mob/living/user) +/obj/item/nullrod/scythe/talking/attack_self__legacy__attackchain(mob/living/user) if(possessed) return @@ -329,7 +329,7 @@ qdel(S) return ..() -/obj/item/nullrod/scythe/talking/attackby(obj/item/I, mob/user, params) +/obj/item/nullrod/scythe/talking/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/soulstone) || !possessed) return ..() if(obj_integrity >= max_integrity) @@ -473,7 +473,7 @@ hitsound = 'sound/weapons/bite.ogg' var/used_blessing = FALSE -/obj/item/nullrod/carp/attack_self(mob/living/user) +/obj/item/nullrod/carp/attack_self__legacy__attackchain(mob/living/user) if(used_blessing) return if(user.mind && !HAS_MIND_TRAIT(user, TRAIT_HOLY)) @@ -546,7 +546,7 @@ throwforce = 0 var/praying = FALSE -/obj/item/nullrod/rosary/attack(mob/living/carbon/M, mob/living/carbon/user) +/obj/item/nullrod/rosary/attack__legacy__attackchain(mob/living/carbon/M, mob/living/carbon/user) if(!iscarbon(M)) return ..() @@ -603,7 +603,7 @@ var/ghostcall_CD = 0 -/obj/item/nullrod/salt/attack_self(mob/user) +/obj/item/nullrod/salt/attack_self__legacy__attackchain(mob/user) if(!user.mind || !HAS_MIND_TRAIT(user, TRAIT_HOLY)) to_chat(user, "You are not close enough with [SSticker.Bible_deity_name] to use [src].") @@ -699,7 +699,7 @@ robes = null return ..() -/obj/item/nullrod/missionary_staff/attack_self(mob/user) +/obj/item/nullrod/missionary_staff/attack_self__legacy__attackchain(mob/user) if(robes) //as long as it is linked, sec can't try to meta by stealing your staff and seeing if they get the link error message return FALSE if(!ishuman(user)) //prevents the horror (runtimes) of missionary xenos and other non-human mobs that might be able to activate the item @@ -719,7 +719,7 @@ to_chat(missionary, "You must be wearing the missionary robes you wish to link with this staff.") return FALSE -/obj/item/nullrod/missionary_staff/afterattack(mob/living/carbon/human/target, mob/living/carbon/human/missionary, flag, params) +/obj/item/nullrod/missionary_staff/afterattack__legacy__attackchain(mob/living/carbon/human/target, mob/living/carbon/human/missionary, flag, params) if(!ishuman(target) || !ishuman(missionary)) //ishuman checks return if(target == missionary) //you can't convert yourself, that would raise too many questions about your own dedication to the cause diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 69066ea45d37a..c176eea3c8d0e 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -44,7 +44,7 @@ create_reagents(5) -/obj/item/kitchen/utensil/attack(mob/living/carbon/C, mob/living/carbon/user) +/obj/item/kitchen/utensil/attack__legacy__attackchain(mob/living/carbon/C, mob/living/carbon/user) if(!istype(C)) return ..() diff --git a/code/game/objects/items/weapons/knuckledusters.dm b/code/game/objects/items/weapons/knuckledusters.dm index e8981aa5e67ea..b9af92f84a816 100644 --- a/code/game/objects/items/weapons/knuckledusters.dm +++ b/code/game/objects/items/weapons/knuckledusters.dm @@ -19,7 +19,7 @@ /// How much organ damage can the weapon do? var/trauma = 5 -/obj/item/melee/knuckleduster/attack_self(mob/user) +/obj/item/melee/knuckleduster/attack_self__legacy__attackchain(mob/user) if(!gripped) gripped = TRUE to_chat(user, "You tighten your grip on [src], ensuring you won't drop it.") @@ -34,7 +34,7 @@ gripped = FALSE flags &= ~(NODROP | ABSTRACT) -/obj/item/melee/knuckleduster/attack(mob/living/target, mob/living/user) +/obj/item/melee/knuckleduster/attack__legacy__attackchain(mob/living/target, mob/living/user) . = ..() hitsound = pick('sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg') if(!ishuman(target) || QDELETED(target)) diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index c6ce59d40b29a..146695a515a77 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -39,7 +39,7 @@ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, TRUE, -1) return BRUTELOSS -/obj/item/restraints/legcuffs/beartrap/attack_self(mob/user) +/obj/item/restraints/legcuffs/beartrap/attack_self__legacy__attackchain(mob/user) ..() if(!ishuman(user) || user.restrained()) @@ -50,7 +50,7 @@ update_icon(UPDATE_ICON_STATE) to_chat(user, "[src] is now [armed ? "armed" : "disarmed"]") -/obj/item/restraints/legcuffs/beartrap/attackby(obj/item/I, mob/user) //Let's get explosive. +/obj/item/restraints/legcuffs/beartrap/attackby__legacy__attackchain(obj/item/I, mob/user) //Let's get explosive. if(istype(I, /obj/item/grenade/iedcasing)) if(IED) to_chat(user, "This beartrap already has an IED hooked up to it!") diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 4c295e6bf2b31..1f1d539a9edbc 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -30,7 +30,7 @@ lighter_color = pick("r","c","y","g") update_icon() -/obj/item/lighter/attack_self(mob/living/user) +/obj/item/lighter/attack_self__legacy__attackchain(mob/living/user) . = ..() if(!lit) turn_on_lighter(user) @@ -96,7 +96,7 @@ playsound(src, 'sound/items/lighter/plastic_close.ogg', 25, TRUE) next_off_message = world.time + 5 SECONDS -/obj/item/lighter/attack(mob/living/target, mob/living/user) +/obj/item/lighter/attack__legacy__attackchain(mob/living/target, mob/living/user) if(cigarette_lighter_act(user, target)) return @@ -315,7 +315,7 @@ else return TRUE -/obj/item/match/attack(mob/living/target, mob/living/user) +/obj/item/match/attack__legacy__attackchain(mob/living/target, mob/living/user) if(cigarette_lighter_act(user, target)) return diff --git a/code/game/objects/items/weapons/melee/energy_melee_weapons.dm b/code/game/objects/items/weapons/melee/energy_melee_weapons.dm index 8391118d92bc1..de97b9b90c56f 100644 --- a/code/game/objects/items/weapons/melee/energy_melee_weapons.dm +++ b/code/game/objects/items/weapons/melee/energy_melee_weapons.dm @@ -57,7 +57,7 @@ UnregisterSignal(src, COMSIG_ITEM_SHARPEN_ACT) return ..() -/obj/item/melee/energy/attack(mob/living/target, mob/living/user) +/obj/item/melee/energy/attack__legacy__attackchain(mob/living/target, mob/living/user) if(cigarette_lighter_act(user, target)) return @@ -109,7 +109,7 @@ "[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!")) return BRUTELOSS|FIRELOSS -/obj/item/melee/energy/attack_self(mob/living/carbon/user) +/obj/item/melee/energy/attack_self__legacy__attackchain(mob/living/carbon/user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_organ_damage(5,5) @@ -234,11 +234,11 @@ /obj/item/melee/energy/sword/cyborg var/hitcost = 50 -/obj/item/melee/energy/sword/cyborg/attack(mob/M, mob/living/silicon/robot/R) +/obj/item/melee/energy/sword/cyborg/attack__legacy__attackchain(mob/M, mob/living/silicon/robot/R) if(R.cell) var/obj/item/stock_parts/cell/C = R.cell if(HAS_TRAIT(src, TRAIT_ITEM_ACTIVE) && !(C.use(hitcost))) - attack_self(R) + attack_self__legacy__attackchain(R) to_chat(R, "It's out of charge!") return ..() @@ -266,7 +266,7 @@ /obj/item/melee/energy/sword/saber/red item_color = "red" -/obj/item/melee/energy/sword/saber/attackby(obj/item/W, mob/living/user, params) +/obj/item/melee/energy/sword/saber/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) ..() if(istype(W, /obj/item/melee/energy/sword/saber)) if(W == src) @@ -377,7 +377,7 @@ . = ..() ADD_TRAIT(src, TRAIT_ITEM_ACTIVE, ROUNDSTART_TRAIT) -/obj/item/melee/energy/blade/attack_self(mob/user) +/obj/item/melee/energy/blade/attack_self__legacy__attackchain(mob/user) return /obj/item/melee/energy/blade/hardlight @@ -428,7 +428,7 @@ else B.add_bleed(B.bleed_buildup) -/obj/item/melee/energy/cleaving_saw/attack_self(mob/living/carbon/user) +/obj/item/melee/energy/cleaving_saw/attack_self__legacy__attackchain(mob/living/carbon/user) transform_weapon(user) /obj/item/melee/energy/cleaving_saw/proc/transform_weapon(mob/living/user, supress_message_text) @@ -498,7 +498,7 @@ if(!HAS_TRAIT(src, TRAIT_ITEM_ACTIVE)) user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly -/obj/item/melee/energy/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user) +/obj/item/melee/energy/cleaving_saw/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user) if(!HAS_TRAIT(src, TRAIT_ITEM_ACTIVE) || swiping || !target.density || get_turf(target) == get_turf(user)) if(!HAS_TRAIT(src, TRAIT_ITEM_ACTIVE)) faction_bonus_force = 0 diff --git a/code/game/objects/items/weapons/melee/melee_misc.dm b/code/game/objects/items/weapons/melee/melee_misc.dm index c051715815d76..8c8f6851c40cd 100644 --- a/code/game/objects/items/weapons/melee/melee_misc.dm +++ b/code/game/objects/items/weapons/melee/melee_misc.dm @@ -180,12 +180,12 @@ user.remove_status_effect(STATUS_EFFECT_BREACH_AND_CLEAVE) update_icon(UPDATE_ICON_STATE) -/obj/item/melee/breach_cleaver/attack_obj(obj/O, mob/living/user, params) +/obj/item/melee/breach_cleaver/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) if(!HAS_TRAIT(src, TRAIT_WIELDED)) // Only works good when wielded return ..() if(!ismachinery(O) && !isstructure(O)) // This sword hates doors return ..() - if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) + if(SEND_SIGNAL(src, COMSIG_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) return if(flags & (NOBLUDGEON)) return @@ -197,7 +197,7 @@ damage += H.physiology.melee_bonus O.take_damage(damage * 3, BRUTE, MELEE, TRUE, get_dir(src, H), 30) // Multiplied to do big damage to doors, closets, windows, and machines, but normal damage to mobs. -/obj/item/melee/breach_cleaver/attack(mob/target, mob/living/user) +/obj/item/melee/breach_cleaver/attack__legacy__attackchain(mob/target, mob/living/user) if(!HAS_TRAIT(src, TRAIT_WIELDED) || !ishuman(target)) return ..() @@ -286,7 +286,7 @@ /obj/item/queen_bee)) strong_against -= /mob/living/simple_animal/hostile/poison/bees/syndi // Syndi-bees have special anti-flyswatter tech installed -/obj/item/melee/flyswatter/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/melee/flyswatter/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) . = ..() if(is_type_in_typecache(M, strong_against)) new /obj/effect/decal/cleanable/insectguts(M.drop_location()) @@ -324,11 +324,11 @@ QDEL_NULL(enchant) return ..() -/obj/item/melee/spellblade/afterattack(atom/target, mob/user, proximity, params) +/obj/item/melee/spellblade/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) . = ..() enchant?.on_hit(target, user, proximity, src) -/obj/item/melee/spellblade/attack_self(mob/user) +/obj/item/melee/spellblade/attack_self__legacy__attackchain(mob/user) if(enchant) return diff --git a/code/game/objects/items/weapons/misc_items.dm b/code/game/objects/items/weapons/misc_items.dm index d579201359620..90905dcdbb8d8 100644 --- a/code/game/objects/items/weapons/misc_items.dm +++ b/code/game/objects/items/weapons/misc_items.dm @@ -71,7 +71,7 @@ icon_state = "crutches0" return ..() -/obj/item/crutches/attackby(obj/item/I, mob/user, params) +/obj/item/crutches/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(!is_open) return @@ -160,7 +160,7 @@ ..() icon_state = "1" -/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) +/obj/item/lightning/afterattack__legacy__attackchain(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) var/angle = get_angle(A, user) //to_chat(world, angle) angle = round(angle) + 45 @@ -204,7 +204,7 @@ hitsound = 'sound/weapons/ring.ogg' var/cooldown = 0 -/obj/item/phone/attack_self(mob/user) +/obj/item/phone/attack_self__legacy__attackchain(mob/user) if(cooldown < world.time - 20) playsound(user.loc, 'sound/weapons/ring.ogg', 50, 1) cooldown = world.time diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index fc49d051a0472..82fce2da025a2 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -45,7 +45,7 @@ to_chat(user, "You wet [src] in [O].") playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE) -/obj/item/mop/afterattack(atom/A, mob/user, proximity) +/obj/item/mop/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/structure/mopbucket)) @@ -70,7 +70,7 @@ reagents.reaction(T, REAGENT_TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. reagents.remove_any(1) //reaction() doesn't use up the reagents -/obj/effect/attackby(obj/item/I, mob/user, params) +/obj/effect/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap)) return else @@ -100,7 +100,7 @@ ..() START_PROCESSING(SSobj, src) -/obj/item/mop/advanced/attack_self(mob/user) +/obj/item/mop/advanced/attack_self__legacy__attackchain(mob/user) refill_enabled = !refill_enabled if(refill_enabled) START_PROCESSING(SSobj, src) diff --git a/code/game/objects/items/weapons/paint_bucket.dm b/code/game/objects/items/weapons/paint_bucket.dm index 85435b23f1440..4dc67b6b783bc 100644 --- a/code/game/objects/items/weapons/paint_bucket.dm +++ b/code/game/objects/items/weapons/paint_bucket.dm @@ -16,7 +16,7 @@ container_type = OPENCONTAINER blocks_emissive = EMISSIVE_BLOCK_GENERIC -/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity) +/obj/item/reagent_containers/glass/paint/afterattack__legacy__attackchain(turf/simulated/target, mob/user, proximity) if(!proximity) return if(!is_open_container()) diff --git a/code/game/objects/items/weapons/paiwire.dm b/code/game/objects/items/weapons/paiwire.dm index 5206005e089da..05f2ea5dc9f45 100644 --- a/code/game/objects/items/weapons/paiwire.dm +++ b/code/game/objects/items/weapons/paiwire.dm @@ -7,5 +7,5 @@ else user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].") -/obj/item/pai_cable/attack(obj/machinery/M as obj, mob/user as mob) +/obj/item/pai_cable/attack__legacy__attackchain(obj/machinery/M as obj, mob/user as mob) src.plugin(M, user) diff --git a/code/game/objects/items/weapons/picket_signs.dm b/code/game/objects/items/weapons/picket_signs.dm index aa928f6c7fd17..53dcfb45e4f28 100644 --- a/code/game/objects/items/weapons/picket_signs.dm +++ b/code/game/objects/items/weapons/picket_signs.dm @@ -12,7 +12,7 @@ var/label = "" -/obj/item/picket_sign/attackby(obj/item/W, mob/user, params) +/obj/item/picket_sign/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W) || istype(W, /obj/item/toy/crayon)) var/txt = tgui_input_text(user, "What would you like to write on the sign?", "Sign Label", max_length = 30) if(isnull(txt)) @@ -22,7 +22,7 @@ desc = "It reads: [label]" ..() -/obj/item/picket_sign/attack_self(mob/living/carbon/human/user) +/obj/item/picket_sign/attack_self__legacy__attackchain(mob/living/carbon/human/user) if(delayed) user.show_message("Your arm is too tired to do that again so soon!") return diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index 75b9ee1294395..b82481a841bd3 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -75,7 +75,7 @@ pressure_setting++ to_chat(user, "You tweak [src]'s pressure output to [pressure_setting].") -/obj/item/pneumatic_cannon/attackby(obj/item/W, mob/user, params) +/obj/item/pneumatic_cannon/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/tank/internals) && !tank) if(istype(W, /obj/item/tank/internals/emergency_oxygen)) @@ -92,7 +92,7 @@ remove_tank(user) return TRUE -/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params) +/obj/item/pneumatic_cannon/afterattack__legacy__attackchain(atom/target, mob/living/carbon/human/user, flag, params) if(isstorage(target)) //So you can store it in backpacks return ..() if(istype(target, /obj/structure/rack)) //So you can store it on racks diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm index 5e86f27a5d081..f7cec8da4f0fc 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -30,7 +30,7 @@ else if(tank) . += "[bicon(tank)] It has [tank] mounted onto it." -/obj/item/melee/powerfist/attackby(obj/item/W, mob/user, params) +/obj/item/melee/powerfist/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/tank/internals)) if(!user.is_holding(src)) to_chat(user, "You have to hold [src] in your hand!") @@ -87,7 +87,7 @@ flags |= NODROP -/obj/item/melee/powerfist/attack(mob/living/target, mob/living/user) +/obj/item/melee/powerfist/attack__legacy__attackchain(mob/living/target, mob/living/user) if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm other living beings!") return diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index bc55bdcf4c6f7..a7795aff20a3e 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -211,7 +211,7 @@ return // TGUI stuff -/obj/item/rpd/attack_self(mob/user) +/obj/item/rpd/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/rpd/ui_state(mob/user) @@ -304,7 +304,7 @@ return //Either nothing was selected, or an invalid mode was selected to_chat(user, "You set [src]'s mode.") -/obj/item/rpd/afterattack(atom/target, mob/user, proximity) +/obj/item/rpd/afterattack__legacy__attackchain(atom/target, mob/user, proximity) ..() if(isstorage(target)) var/obj/item/storage/S = target @@ -355,7 +355,7 @@ user.Beam(T, icon_state = "rped_upgrade", icon = 'icons/effects/effects.dmi', time = 0.5 SECONDS) T.rpd_act(user, src) -/obj/item/rpd/attack_obj(obj/O, mob/living/user) +/obj/item/rpd/attack_obj__legacy__attackchain(obj/O, mob/living/user) if(user.a_intent != INTENT_HARM) if(istype(O, /obj/machinery/atmospherics/pipe)) return diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index fc6ccffb4606f..b4fdb6b0ea2e4 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -18,7 +18,7 @@ attack_verb = list("beautifully sliced", "artistically cut", "smoothly stabbed", "quickly jabbed") toolspeed = 0.75 -/obj/item/scissors/attack(mob/living/carbon/M as mob, mob/user as mob) +/obj/item/scissors/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/user as mob) if(user.a_intent != INTENT_HELP) ..() return diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 4da6b3284ac03..375f4d3acdd25 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -21,7 +21,7 @@ . += "Number of uses: [uses]. This scroll will vanish after the final use." . += "P.S. Don't forget to bring your gear, you'll need it to cast most spells." -/obj/item/teleportation_scroll/attack_self(mob/living/user) +/obj/item/teleportation_scroll/attack_self__legacy__attackchain(mob/living/user) if(!uses) //somehow? to_chat(user, "You attempt to read the scroll but it disintegrates in your hand, it appears that is has run out of charges!") qdel(src) diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index de8e2279f08a0..fa2ec1c9fdea4 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -45,7 +45,7 @@ AddComponent(/datum/component/caltrop, force) set_initial_icon_state() -/obj/item/shard/afterattack(atom/movable/AM, mob/user, proximity) +/obj/item/shard/afterattack__legacy__attackchain(atom/movable/AM, mob/user, proximity) if(!proximity || !(src in user)) return if(isturf(AM)) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index f5c0ccbcb1f08..87e84330eab45 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -33,7 +33,7 @@ var/cooldown = 0 //shield bash cooldown. based on world.time var/list/allowed_bashers = list(/obj/item/melee/baton, /obj/item/kitchen/knife/combat) -/obj/item/shield/riot/attackby(obj/item/W, mob/user, params) +/obj/item/shield/riot/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_type_in_list(W, allowed_bashers)) if(cooldown < world.time - 2.5 SECONDS) user.visible_message("[user] bashes [src] with [W]!") @@ -96,7 +96,7 @@ /obj/item/shield/energy/IsReflect() return (active) -/obj/item/shield/energy/attack_self(mob/living/carbon/human/user) +/obj/item/shield/energy/attack_self__legacy__attackchain(mob/living/carbon/human/user) toggle(user, FALSE) /obj/item/shield/energy/proc/toggle(mob/living/carbon/human/user, forced) @@ -148,7 +148,7 @@ return ..() return FALSE // by not calling the parent the hit_reaction signal is never sent -/obj/item/shield/riot/tele/attack_self(mob/living/user) +/obj/item/shield/riot/tele/attack_self__legacy__attackchain(mob/living/user) if(HAS_TRAIT(src, TRAIT_ITEM_ACTIVE)) REMOVE_TRAIT(src,TRAIT_ITEM_ACTIVE, TRAIT_GENERIC) force = 3 diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index 7b7cf35ccc35c..b0f9180a6812e 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -19,7 +19,7 @@ . = ..() AddComponent(/datum/component/slippery, src, 8 SECONDS, 100, 0, FALSE) -/obj/item/soap/afterattack(atom/target, mob/user, proximity) +/obj/item/soap/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(user.zone_selected == "mouth" && ishuman(target)) // cleaning out someone's mouth is a different act @@ -58,7 +58,7 @@ else . += "[src] has been eaten down to a sliver!" -/obj/item/soap/attack(mob/target as mob, mob/user as mob) +/obj/item/soap/attack__legacy__attackchain(mob/target as mob, mob/user as mob) if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_selected == "mouth") user.visible_message("[user] starts washing [target]'s mouth out with [name]!") if(do_after(user, cleanspeed, target = target)) @@ -83,7 +83,7 @@ desc = "A homemade bar of soap. It seems to be gibs and tape..Will this clean anything?" icon_state = "soapgibs" -/obj/item/soap/ducttape/afterattack(atom/target, mob/user as mob, proximity) +/obj/item/soap/ducttape/afterattack__legacy__attackchain(atom/target, mob/user as mob, proximity) if(!proximity) return if(user.client && (target in user.client.screen)) diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm index f64fdee6ca744..4f1f9ed227602 100644 --- a/code/game/objects/items/weapons/staff.dm +++ b/code/game/objects/items/weapons/staff.dm @@ -49,7 +49,7 @@ animate(user, pixel_y = pixel_y, time = 10, loop = 1, easing = SINE_EASING) animate(user) -/obj/item/staff/broom/attackby(obj/O, mob/user) +/obj/item/staff/broom/attackby__legacy__attackchain(obj/O, mob/user) if(istype(O, /obj/item/clothing/mask/horsehead)) new/obj/item/staff/broom/horsebroom(get_turf(src)) user.unEquip(O) @@ -69,7 +69,7 @@ icon_state = "horsebroom" item_state = "horsebroom0" -/obj/item/staff/broom/horsebroom/attack_self(mob/user as mob) +/obj/item/staff/broom/horsebroom/attack_self__legacy__attackchain(mob/user as mob) ..() item_state = "horsebroom[HAS_TRAIT(src, TRAIT_WIELDED) ? 1 : 0]" diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm index d93f0f1f9667f..359802da3d5c7 100644 --- a/code/game/objects/items/weapons/stock_parts.dm +++ b/code/game/objects/items/weapons/stock_parts.dm @@ -43,7 +43,7 @@ return FALSE return ..() -/obj/item/storage/part_replacer/afterattack(obj/machinery/M, mob/user, proximity_flag, params) +/obj/item/storage/part_replacer/afterattack__legacy__attackchain(obj/machinery/M, mob/user, proximity_flag, params) if(!istype(M)) return ..() diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 7a1752b514d2c..3a767524ad78b 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -22,7 +22,7 @@ "Grey" = 'icons/mob/clothing/species/grey/back.dmi' ) -/obj/item/storage/backpack/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/storage/backpack/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(Adjacent(user)) playsound(src.loc, "rustle", 50, TRUE, -5) return ..() @@ -63,7 +63,7 @@ armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 60, ACID = 50) allow_same_size = TRUE -/obj/item/storage/backpack/holding/attackby(obj/item/W, mob/user, params) +/obj/item/storage/backpack/holding/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/storage/backpack/holding)) var/response = tgui_alert(user, "This creates a singularity, destroying you and much of the station. Are you SURE?", "IMMINENT DEATH!", list("No", "Yes")) if(response == "Yes") diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 132f478a121cf..a9fc87d9fdd8a 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -244,7 +244,7 @@ /obj/item/seeds, /obj/item/unsorted_seeds) -/obj/item/storage/bag/plants/seed_sorting_tray/attack_self(mob/user) +/obj/item/storage/bag/plants/seed_sorting_tray/attack_self__legacy__attackchain(mob/user) var/depth = 0 for(var/obj/item/unsorted_seeds/unsorted in src) if(!do_after(user, 1 SECONDS, TRUE, src, must_be_held = TRUE)) @@ -303,7 +303,7 @@ materials = list(MAT_METAL=3000) cant_hold = list(/obj/item/disk/nuclear) // Prevents some cheesing -/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) +/obj/item/storage/bag/tray/attack__legacy__attackchain(mob/living/M, mob/living/user) ..() // Drop all the things. All of them. var/list/obj/item/oldContents = contents.Copy() @@ -340,7 +340,7 @@ /obj/item/storage/bag/tray/cyborg -/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/storage/bag/tray/cyborg/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) // We cannot reach the target. if(!proximity_flag) return diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 4c47548dfe33a..bb1605fae8e38 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -484,7 +484,7 @@ /obj/item/detective_scanner ) -/obj/item/storage/belt/military/assault/attackby(obj/item/I, mob/user) +/obj/item/storage/belt/military/assault/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.w_class > WEIGHT_CLASS_NORMAL) to_chat(user, "[I] is too big for [src].") return @@ -585,7 +585,7 @@ /obj/item/storage/belt/lazarus/update_icon_state() icon_state = "[base_icon_state]_[length(contents)]" -/obj/item/storage/belt/lazarus/attackby(obj/item/I, mob/user) +/obj/item/storage/belt/lazarus/attackby__legacy__attackchain(obj/item/I, mob/user) var/amount = length(contents) . = ..() if(amount != length(contents)) @@ -618,7 +618,7 @@ /obj/item/storage/belt/bandolier/update_icon_state() icon_state = "bandolier_[min(length(contents), 8)]" -/obj/item/storage/belt/bandolier/attackby(obj/item/I, mob/user) +/obj/item/storage/belt/bandolier/attackby__legacy__attackchain(obj/item/I, mob/user) var/amount = length(contents) ..() if(amount != length(contents)) @@ -904,7 +904,7 @@ if(H.s_active && H.s_active == src) H.s_active.show_to(H) -/obj/item/storage/belt/bluespace/attack(mob/M, mob/user, def_zone) +/obj/item/storage/belt/bluespace/attack__legacy__attackchain(mob/M, mob/user, def_zone) return /obj/item/storage/belt/bluespace/admin diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 86fcbcffa0934..44fa4b8a701b4 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -71,7 +71,7 @@ H.heal_overall_damage(10, 10) return -/obj/item/storage/bible/attack(mob/living/M, mob/living/user) +/obj/item/storage/bible/attack__legacy__attackchain(mob/living/M, mob/living/user) add_attack_logs(user, M, "Hit with [src]") if(!iscarbon(user)) M.LAssailant = null @@ -109,7 +109,7 @@ playsound(src.loc, "punch", 25, TRUE, -1) -/obj/item/storage/bible/afterattack(atom/target, mob/user, proximity, params) +/obj/item/storage/bible/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) if(!proximity) return @@ -137,7 +137,7 @@ target.reagents.del_reagent("unholywater") target.reagents.add_reagent("holywater", unholy2clean) -/obj/item/storage/bible/attack_self(mob/user) +/obj/item/storage/bible/attack_self__legacy__attackchain(mob/user) . = ..() if(!customisable || !HAS_MIND_TRAIT(user, TRAIT_HOLY)) return diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index ef61b6a35ada0..b6e25d9c2f97c 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -1016,7 +1016,7 @@ else icon_state = "[item_state]_closed" -/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params) +/obj/item/storage/box/papersack/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) //if a pen is used on the sack, dialogue to change its design appears if(length(contents)) @@ -1185,7 +1185,7 @@ user.visible_message("[user] clamps the box of hugs on [user.p_their()] jugular! Guess it wasn't such a hugbox after all..") return (BRUTELOSS) -/obj/item/storage/box/hug/attack_self(mob/user) +/obj/item/storage/box/hug/attack_self__legacy__attackchain(mob/user) ..() user.changeNext_move(CLICK_CD_MELEE) playsound(loc, "rustle", 50, TRUE, -5) diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 7d03cf3a78406..ab0409a715299 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -41,13 +41,13 @@ QDEL_NULL(stored_item) return ..() -/obj/item/storage/briefcase/false_bottomed/afterattack(atom/A, mob/user, flag, params) +/obj/item/storage/briefcase/false_bottomed/afterattack__legacy__attackchain(atom/A, mob/user, flag, params) ..() if(stored_item && isgun(stored_item)) var/obj/item/gun/stored_gun = stored_item - stored_gun.afterattack(A, user, flag, params) + stored_gun.afterattack__legacy__attackchain(A, user, flag, params) -/obj/item/storage/briefcase/false_bottomed/attackby(obj/item/I, mob/user) +/obj/item/storage/briefcase/false_bottomed/attackby__legacy__attackchain(obj/item/I, mob/user) if(bottom_open) if(stored_item) to_chat(user, "There's already something in the false bottom!") diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 1dad0fb1fb655..f05629c1d3dd6 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -163,7 +163,7 @@ for(var/obj/item/toy/crayon/crayon in contents) . += image('icons/obj/crayons.dmi', crayon.dye_color) -/obj/item/storage/fancy/crayons/attackby(obj/item/I, mob/user, params) +/obj/item/storage/fancy/crayons/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/toy/crayon)) var/obj/item/toy/crayon/C = I switch(C.dye_color) @@ -198,7 +198,7 @@ for(var/I in 1 to storage_slots) new /obj/item/match(src) -/obj/item/storage/fancy/matches/attackby(obj/item/match/W, mob/user, params) +/obj/item/storage/fancy/matches/attackby__legacy__attackchain(obj/item/match/W, mob/user, params) if(istype(W, /obj/item/match) && !W.lit) W.matchignite() playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, TRUE) @@ -247,7 +247,7 @@ /obj/item/storage/fancy/cigarettes/update_icon_state() icon_state = "[initial(icon_state)][length(contents)]" -/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M, mob/living/user) +/obj/item/storage/fancy/cigarettes/attack__legacy__attackchain(mob/living/carbon/M, mob/living/user) if(!ismob(M)) return @@ -447,7 +447,7 @@ else . += "ledb" -/obj/item/storage/lockbox/vials/attackby(obj/item/I, mob/user, params) +/obj/item/storage/lockbox/vials/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() update_icon() diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index d458698437394..9fcdfeb583989 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -301,7 +301,7 @@ I.color = wrapper_color overlays += I -/obj/item/storage/pill_bottle/attack(mob/M, mob/user) +/obj/item/storage/pill_bottle/attack__legacy__attackchain(mob/M, mob/user) if(iscarbon(M) && length(contents)) if(applying_meds) to_chat(user, "You are already applying meds.") @@ -363,7 +363,7 @@ return ..() -/obj/item/storage/pill_bottle/attackby(obj/item/I, mob/user, params) +/obj/item/storage/pill_bottle/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) rename_interactive(user, I) else diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 923ce4866378e..8641af62486c7 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -22,7 +22,7 @@ //Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items. //These procs are completely optional, it is up to the master item to decide when it's storage get's opened by calling open() //However they are helpful for allowing the master item to pretend it is a storage item itself. -//If you are using these you will probably want to override attackby() as well. +//If you are using these you will probably want to override attackby__legacy__attackchain() as well. //See /obj/item/clothing/suit/storage for an example. //items that use internal storage have the option of calling this to emulate default storage MouseDrop behaviour. diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index cd6c8d7a49dfc..6bc41f4a8c3b1 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -14,7 +14,7 @@ var/icon_closed = "lockbox" var/icon_broken = "lockbox+b" -/obj/item/storage/lockbox/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/storage/lockbox/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) if(broken) to_chat(user, "It appears to be broken.") @@ -173,7 +173,7 @@ /obj/item/storage/lockbox/medal/hardmode_box/populate_contents() return -/obj/item/storage/lockbox/medal/hardmode_box/attackby(obj/item/W, mob/user, params) +/obj/item/storage/lockbox/medal/hardmode_box/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/disk/fauna_research)) var/obj/item/disk/fauna_research/disky = W var/obj/item/pride = new disky.output(get_turf(src)) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index e66bc988adee5..0656ef5e203b3 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -39,7 +39,7 @@ new /obj/item/paper(src) new /obj/item/pen(src) -/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/storage/secure/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(locked) if((istype(W, /obj/item/melee/energy/blade)) && (!emagged)) emag_act(user, W) @@ -126,7 +126,7 @@ /obj/item/storage/secure/hear_message(mob/living/M as mob, msg) return -/obj/item/storage/secure/attack_self(mob/user) +/obj/item/storage/secure/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/storage/secure/ui_state(mob/user) diff --git a/code/game/objects/items/weapons/storage/storage_base.dm b/code/game/objects/items/weapons/storage/storage_base.dm index 4335e8a213ac2..6581136461d56 100644 --- a/code/game/objects/items/weapons/storage/storage_base.dm +++ b/code/game/objects/items/weapons/storage/storage_base.dm @@ -543,7 +543,7 @@ qdel(src) //This proc is called when you want to place an item into the storage item. -/obj/item/storage/attackby(obj/item/I, mob/user, params) +/obj/item/storage/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(istype(I, /obj/item/hand_labeler)) var/obj/item/hand_labeler/labeler = I @@ -634,7 +634,7 @@ for(var/obj/O in contents) O.hear_message(M, msg) -/obj/item/storage/attack_self(mob/user) +/obj/item/storage/attack_self__legacy__attackchain(mob/user) //Clicking on itself will empty it, if allow_quick_empty is TRUE if(allow_quick_empty && user.is_in_active_hand(src)) drop_inventory(user) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 4358bd0f724fa..518650657322f 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -121,7 +121,7 @@ update_icon() playsound(src, "sparks", 75, TRUE, -1) -/obj/item/melee/baton/attackby(obj/item/I, mob/user, params) +/obj/item/melee/baton/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stock_parts/cell)) var/obj/item/stock_parts/cell/C = I if(cell) @@ -151,7 +151,7 @@ turned_on = FALSE update_icon(UPDATE_ICON_STATE) -/obj/item/melee/baton/attack_self(mob/user) +/obj/item/melee/baton/attack_self__legacy__attackchain(mob/user) if(cell?.charge >= hitcost) turned_on = !turned_on to_chat(user, "[src] is now [turned_on ? "on" : "off"].") @@ -171,7 +171,7 @@ if(!. && turned_on && istype(hit_mob)) thrown_baton_stun(hit_mob) -/obj/item/melee/baton/attack(mob/M, mob/living/user) +/obj/item/melee/baton/attack__legacy__attackchain(mob/M, mob/living/user) if(turned_on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) if(baton_stun(user, user, skip_cooldown = TRUE)) // for those super edge cases where you clumsy baton yourself in quick succession user.visible_message("[user] accidentally hits [user.p_themselves()] with [src]!", @@ -361,13 +361,13 @@ /obj/item/melee/baton/flayerprod/update_icon_state() return -/obj/item/melee/baton/flayerprod/attackby(obj/item/I, mob/user, params) +/obj/item/melee/baton/flayerprod/attackby__legacy__attackchain(obj/item/I, mob/user, params) return /obj/item/melee/baton/flayerprod/screwdriver_act(mob/living/user, obj/item/I) return -/obj/item/melee/baton/flayerprod/attack_self(mob/user) +/obj/item/melee/baton/flayerprod/attack_self__legacy__attackchain(mob/user) return /obj/item/melee/baton/flayerprod/play_hit_sound() diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 0ddddced09222..3d8052094ceb0 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -168,7 +168,7 @@ STOP_PROCESSING(SSobj, src) temp_air_contents = air_contents -/obj/item/tank/jetpack/suit/attack_self() +/obj/item/tank/jetpack/suit/attack_self__legacy__attackchain() return /obj/item/tank/jetpack/suit/cycle(mob/user) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 83eb5a4c03b71..5edd367f1ef69 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -63,7 +63,7 @@ /obj/item/tank/internals/plasma/populate_gas() air_contents.set_toxins((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)) -/obj/item/tank/internals/plasma/attackby(obj/item/I, mob/user, params) +/obj/item/tank/internals/plasma/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/flamethrower)) var/obj/item/flamethrower/F = I if((!F.status)||(F.ptank)) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 4b73b7f3342e7..fcfb23970f517 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -137,7 +137,7 @@ playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) qdel(src) -/obj/item/tank/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/tank/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() add_fingerprint(user) @@ -147,7 +147,7 @@ if(istype(W, /obj/item/assembly_holder)) bomb_assemble(W,user) -/obj/item/tank/attack_self(mob/user as mob) +/obj/item/tank/attack_self__legacy__attackchain(mob/user as mob) if(!(air_contents)) return diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 0c0a8c237d14b..01ad9ed3764a1 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -95,7 +95,7 @@ H.put_in_l_hand(src) return -/obj/item/watertank/attackby(obj/item/W, mob/user, params) +/obj/item/watertank/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W == noz) remove_noz() return @@ -138,7 +138,7 @@ tank.on = FALSE loc = tank -/obj/item/reagent_containers/spray/mister/attack_self() +/obj/item/reagent_containers/spray/mister/attack_self__legacy__attackchain() return /proc/check_tank_exists(parent_tank, mob/living/carbon/human/M, obj/O) @@ -152,7 +152,7 @@ if(loc != tank.loc) loc = tank.loc -/obj/item/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity) +/obj/item/reagent_containers/spray/mister/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if(target.loc == loc || target == tank) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it putting it away return ..() @@ -182,7 +182,7 @@ /obj/item/watertank/janitor/make_noz() return new /obj/item/reagent_containers/spray/mister/janitor(src) -/obj/item/reagent_containers/spray/mister/janitor/attack_self(mob/user) +/obj/item/reagent_containers/spray/mister/janitor/attack_self__legacy__attackchain(mob/user) amount_per_transfer_from_this = (amount_per_transfer_from_this == 5 ? 10 : 5) spray_currentrange = (spray_currentrange == 2 ? spray_maxrange : 2) to_chat(user, "You [amount_per_transfer_from_this == 5 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.") @@ -255,7 +255,7 @@ if(tank && loc != tank.loc) forceMove(tank) -/obj/item/extinguisher/mini/nozzle/attack_self(mob/user) +/obj/item/extinguisher/mini/nozzle/attack_self__legacy__attackchain(mob/user) switch(nozzle_mode) if(EXTINGUISHER) nozzle_mode = NANOFROST @@ -276,7 +276,7 @@ tank.on = FALSE loc = tank -/obj/item/extinguisher/mini/nozzle/afterattack(atom/target, mob/user) +/obj/item/extinguisher/mini/nozzle/afterattack__legacy__attackchain(atom/target, mob/user) if(nozzle_mode == EXTINGUISHER) ..() return diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 6390fe821df94..13a6ab38e09a3 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -12,7 +12,7 @@ ..() update_icon(UPDATE_ICON_STATE) -/obj/item/stack/tape_roll/attack(mob/living/carbon/human/M, mob/living/user) +/obj/item/stack/tape_roll/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user) if(!istype(M)) //What good is a duct tape mask if you are unable to speak? return if(M.wear_mask) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index e33a4d681fcac..8d027e4ff3363 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -42,7 +42,7 @@ . = ..() RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) -/obj/item/hand_tele/attack_self(mob/user) +/obj/item/hand_tele/attack_self__legacy__attackchain(mob/user) // The turf the user is currently located in. var/turf/current_location = get_turf(user) if(emp_timer > world.time) diff --git a/code/game/objects/items/weapons/teleprod.dm b/code/game/objects/items/weapons/teleprod.dm index c659c3e3d5974..690387428000e 100644 --- a/code/game/objects/items/weapons/teleprod.dm +++ b/code/game/objects/items/weapons/teleprod.dm @@ -7,7 +7,7 @@ base_icon = "teleprod" origin_tech = "combat=2;bluespace=4;materials=3" -/obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit +/obj/item/melee/baton/cattleprod/teleprod/attack__legacy__attackchain(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit ..() if(!turned_on) return diff --git a/code/game/objects/items/weapons/thurible.dm b/code/game/objects/items/weapons/thurible.dm index 8c79b2cd0dcf8..63f0cbc4e305c 100644 --- a/code/game/objects/items/weapons/thurible.dm +++ b/code/game/objects/items/weapons/thurible.dm @@ -57,7 +57,7 @@ H.update_inv_r_hand() return ..() -/obj/item/thurible/attackby(obj/item/fire_source, mob/user, params) +/obj/item/thurible/attackby__legacy__attackchain(obj/item/fire_source, mob/user, params) . = ..() if(fire_source.get_heat()) user.visible_message( @@ -67,7 +67,7 @@ ) light(user) -/obj/item/thurible/attack_self(mob/user) +/obj/item/thurible/attack_self__legacy__attackchain(mob/user) if(lit) to_chat(user, "You extinguish [src].") put_out(user) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index d782b59f3e5d1..80136bc5cb581 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -36,7 +36,7 @@ icon_state = "[base_icon_state]0" return ..() -/obj/item/fireaxe/afterattack(atom/A, mob/user, proximity) +/obj/item/fireaxe/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(HAS_TRAIT(src, TRAIT_WIELDED)) //destroys windows and grilles in one hit @@ -77,7 +77,7 @@ /obj/item/fireaxe/energized/process() charge = min(charge + 1, max_charge) -/obj/item/fireaxe/energized/attack(mob/M, mob/user) +/obj/item/fireaxe/energized/attack__legacy__attackchain(mob/M, mob/user) . = ..() if(HAS_TRAIT(src, TRAIT_WIELDED) && charge == max_charge) if(isliving(M)) @@ -139,7 +139,7 @@ icon_state = "dualsaber0" set_light(0) -/obj/item/dualsaber/attack(mob/target, mob/living/user) +/obj/item/dualsaber/attack__legacy__attackchain(mob/target, mob/living/user) if(cigarette_lighter_act(user, target)) return @@ -318,7 +318,7 @@ ..() -/obj/item/spear/afterattack(atom/movable/AM, mob/user, proximity) +/obj/item/spear/afterattack__legacy__attackchain(atom/movable/AM, mob/user, proximity) if(!proximity) return if(isturf(AM)) //So you can actually melee with it @@ -366,7 +366,7 @@ throw_speed = 4 attack_verb = list("gored") -/obj/item/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity) +/obj/item/spear/grey_tide/afterattack__legacy__attackchain(atom/movable/AM, mob/living/user, proximity) ..() if(!proximity) return @@ -383,7 +383,7 @@ M.GiveTarget(L) //Putting heads on spears -/obj/item/spear/attackby(obj/item/I, mob/living/user) +/obj/item/spear/attackby__legacy__attackchain(obj/item/I, mob/living/user) if(istype(I, /obj/item/organ/external/head)) if(user.unEquip(src) && user.drop_item()) to_chat(user, "You stick [I] onto the spear and stand it upright on the ground.") @@ -454,7 +454,7 @@ AddComponent(/datum/component/two_handed, require_twohands = TRUE) -/obj/item/chainsaw/attack_self(mob/user) +/obj/item/chainsaw/attack_self__legacy__attackchain(mob/user) on = !on to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]") if(on) @@ -535,14 +535,14 @@ /obj/item/butcher_chainsaw/update_icon_state() icon_state = "[base_icon_state]0" -/obj/item/butcher_chainsaw/attack(mob/living/target, mob/living/user) +/obj/item/butcher_chainsaw/attack__legacy__attackchain(mob/living/target, mob/living/user) . = ..() if(HAS_TRAIT(src, TRAIT_WIELDED)) playsound(loc, 'sound/weapons/chainsaw.ogg', 100, TRUE, -1) //incredibly loud; you ain't goin' for stealth with this thing. Credit to Lonemonk of Freesound for this sound. if(isnull(.)) //necessary check, successful attacks return null, without it target will drop any shields they may have before they get a chance to block target.KnockDown(8 SECONDS) -/obj/item/butcher_chainsaw/afterattack(mob/living/target, mob/living/user, proximity) +/obj/item/butcher_chainsaw/afterattack__legacy__attackchain(mob/living/target, mob/living/user, proximity) if(!proximity) //only works on adjacent targets, no telekinetic chainsaws return if(!HAS_TRAIT(src, TRAIT_WIELDED)) @@ -628,7 +628,7 @@ step_towards(H, pull) step_towards(H, pull) -/obj/item/singularityhammer/afterattack(atom/A, mob/user, proximity) +/obj/item/singularityhammer/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(HAS_TRAIT(src, TRAIT_WIELDED)) @@ -673,7 +673,7 @@ var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src))) target.throw_at(throw_target, 200, 4) -/obj/item/mjollnir/attack(mob/living/M, mob/user) +/obj/item/mjollnir/attack__legacy__attackchain(mob/living/M, mob/user) ..() if(HAS_TRAIT(src, TRAIT_WIELDED)) playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) @@ -727,7 +727,7 @@ /obj/item/knighthammer/update_icon_state() //Currently only here to fuck with the on-mob icons. icon_state = "knighthammer0" -/obj/item/knighthammer/afterattack(atom/A, mob/user, proximity) +/obj/item/knighthammer/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(charged == 5) @@ -803,7 +803,7 @@ if(prob(15)) do_sparks(rand(1,6), 1, loc) -/obj/item/pyro_claws/afterattack(atom/target, mob/user, proximity) +/obj/item/pyro_claws/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(prob(60) && world.time > next_spark_time) @@ -877,7 +877,7 @@ do_sparks(rand(1,6), 1, loc) next_spark_time = world.time + 0.8 SECONDS -/obj/item/clothing/gloves/color/black/pyro_claws/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/gloves/color/black/pyro_claws/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/assembly/signaler/anomaly/pyro)) if(core) to_chat(user, "[src] already has a [I]!") @@ -935,7 +935,7 @@ /obj/item/push_broom/proc/unwield(obj/item/source, mob/user) UnregisterSignal(user, COMSIG_MOVABLE_MOVED) -/obj/item/push_broom/afterattack(atom/A, mob/user, proximity) +/obj/item/push_broom/afterattack__legacy__attackchain(atom/A, mob/user, proximity) . = ..() if(!proximity) return @@ -995,7 +995,7 @@ Help intent will sweep foes away from you, disarm intent sweeps their legs from under them, grab intent confuses \ and minorly fatigues them, and harm intent hits them normally." -/obj/item/push_broom/traitor/attack(mob/target, mob/living/user) +/obj/item/push_broom/traitor/attack__legacy__attackchain(mob/target, mob/living/user) if(!HAS_TRAIT(src, TRAIT_WIELDED) || !ishuman(target)) return ..() @@ -1079,7 +1079,7 @@ icon_state = "[base_icon_state]0" return ..() -/obj/item/supermatter_halberd/afterattack(atom/A, mob/user, proximity) +/obj/item/supermatter_halberd/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index c0fbf6766a740..2deabb7505025 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -20,7 +20,7 @@ visible_message("[user] is hitting [user.p_themselves()] with [src]! It looks like [user.p_theyre()] trying to ban [user.p_themselves()] from life.") return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS -/obj/item/banhammer/attack(mob/M, mob/user) +/obj/item/banhammer/attack__legacy__attackchain(mob/M, mob/user) to_chat(M, " You have been banned FOR NO REISIN by [user]") to_chat(user, " You have BANNED [M]") playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much @@ -134,7 +134,7 @@ materials = list(MAT_METAL=1150, MAT_GLASS=75) attack_verb = list("hit", "bludgeoned", "whacked", "bonked") -/obj/item/wirerod/attackby(obj/item/I, mob/user, params) +/obj/item/wirerod/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(istype(I, /obj/item/shard)) var/obj/item/spear/S = new /obj/item/spear @@ -242,7 +242,7 @@ lastdeflect = world.time + 3000 return TRUE -/obj/item/melee/baseball_bat/attack_self(mob/user) +/obj/item/melee/baseball_bat/attack_self__legacy__attackchain(mob/user) if(!homerun_able) if(!deflectmode && world.time >= lastdeflect) to_chat(user, "You prepare to deflect objects thrown at you. You cannot attack during this time.") @@ -263,7 +263,7 @@ homerun_ready = 1 ..() -/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user) +/obj/item/melee/baseball_bat/attack__legacy__attackchain(mob/living/target, mob/living/user) if(deflectmode) to_chat(user, "You cannot attack in deflect mode!") return diff --git a/code/game/objects/items/weapons/whetstone.dm b/code/game/objects/items/weapons/whetstone.dm index 7c21ddda9c8c7..8c908965e13ae 100644 --- a/code/game/objects/items/weapons/whetstone.dm +++ b/code/game/objects/items/weapons/whetstone.dm @@ -13,7 +13,7 @@ var/claw_damage_increase = 2 -/obj/item/whetstone/attackby(obj/item/I, mob/user, params) +/obj/item/whetstone/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(used) to_chat(user, "The whetstone is too worn to use again!") return @@ -46,7 +46,7 @@ used = TRUE update_icon() -/obj/item/whetstone/attack_self(mob/user) +/obj/item/whetstone/attack_self__legacy__attackchain(mob/user) if(used) to_chat(user, "The whetstone is too worn to use again!") return diff --git a/code/game/objects/mail.dm b/code/game/objects/mail.dm index 27ed8bbb4a943..d8aa461b729f6 100644 --- a/code/game/objects/mail.dm +++ b/code/game/objects/mail.dm @@ -24,7 +24,7 @@ playsound(loc, 'sound/effects/-adminhelp.ogg', 50, TRUE, -1) return BRUTELOSS -/obj/item/envelope/attack_self(mob/user) +/obj/item/envelope/attack_self__legacy__attackchain(mob/user) if(!user?.mind) return if(user.real_name != recipient) @@ -251,10 +251,10 @@ . = ..() . += "Scan a letter to log it into the active database, then scan the person you wish to hand the letter to. Correctly scanning the recipient of the letter logged into the active database will add credits to the Supply budget." -/obj/item/mail_scanner/attack() +/obj/item/mail_scanner/attack__legacy__attackchain() return -/obj/item/mail_scanner/afterattack(atom/A, mob/user) +/obj/item/mail_scanner/afterattack__legacy__attackchain(atom/A, mob/user) if(get_dist(A, user) > scanner_range) to_chat(user, "The scanner doesn't reach that far!") return diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 05f3bbb5d02f4..80f1ee8c36e22 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -163,7 +163,7 @@ /obj/item/proc/updateSelfDialog() var/mob/M = src.loc if(istype(M) && M.client && M.machine == src) - src.attack_self(M) + src.attack_self__legacy__attackchain(M) /obj/proc/hide(h) return diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index f8e7d994cd1c8..d68b48bb0a72f 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -178,7 +178,7 @@ return attack_hand(user) -/obj/machinery/barsign/attackby(obj/item/I, mob/user, params) +/obj/machinery/barsign/attackby__legacy__attackchain(obj/item/I, mob/user, params) switch(build_stage) // Inserting the electronics/circuit if(BARSIGN_FRAME) @@ -483,7 +483,7 @@ . = ..() . += "Use it while in your active hand to toggle the access restrictions." -/obj/item/barsign_electronics/attack_self(mob/user) +/obj/item/barsign_electronics/attack_self__legacy__attackchain(mob/user) . = ..() if(destroyed) return diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 19aca13808141..443e92b8dfe75 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -35,7 +35,7 @@ LINEN BINS return return ..() -/obj/item/bedsheet/attack_self(mob/user as mob) +/obj/item/bedsheet/attack_self__legacy__attackchain(mob/user as mob) user.drop_item() if(layer == initial(layer)) layer = 5 @@ -44,7 +44,7 @@ LINEN BINS add_fingerprint(user) return -/obj/item/bedsheet/attackby(obj/item/I, mob/user, params) +/obj/item/bedsheet/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.sharp) var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3) transfer_fingerprints_to(C) @@ -316,7 +316,7 @@ LINEN BINS default_unfasten_wrench(user, I, time = 20) return TRUE -/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params) +/obj/structure/bedsheetbin/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/bedsheet)) if(!user.drop_item()) to_chat(user, "[I] is stuck to your hand!") diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm index 40fa5b0ab3674..b6f30a05c181d 100644 --- a/code/game/objects/structures/coathanger.dm +++ b/code/game/objects/structures/coathanger.dm @@ -15,7 +15,7 @@ coat = null update_icon(UPDATE_OVERLAYS) -/obj/structure/coatrack/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/coatrack/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) var/can_hang = FALSE for(var/T in allowed) if(istype(W,T)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 98e360a997ae6..b3b6ef724e986 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -280,7 +280,7 @@ if(!broken && !(flags & NODECONSTRUCT)) bust_open() -/obj/structure/closet/attackby(obj/item/W, mob/user, params) +/obj/structure/closet/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/rcs) && !opened) var/obj/item/rcs/E = W E.try_send_container(user, src) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 0e0a292418b9f..15b57e1df1f8d 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -69,7 +69,7 @@ /obj/structure/closet/cardboard/welder_act() return -/obj/structure/closet/cardboard/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/closet/cardboard/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(src.opened) if(istype(W, /obj/item/wirecutters)) var/obj/item/wirecutters/WC = W diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index 1bde25e8c79ea..bec34e3f23bc7 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -29,7 +29,7 @@ else . += "It is damaged beyond repair." -/obj/structure/closet/fireaxecabinet/attackby(obj/item/O as obj, mob/living/user as mob) //Marker -Agouri +/obj/structure/closet/fireaxecabinet/attackby__legacy__attackchain(obj/item/O as obj, mob/living/user as mob) //Marker -Agouri if(isrobot(user) || locked) if(istype(O, /obj/item/multitool)) to_chat(user, "Resetting circuitry...") diff --git a/code/game/objects/structures/crates_lockers/closets/secure/depot_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/depot_closets.dm index 78139592e790e..d334f3233f45f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/depot_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/depot_closets.dm @@ -36,7 +36,7 @@ return return ..() -/obj/structure/closet/secure_closet/depot/attackby(obj/item/W, mob/user, params) +/obj/structure/closet/secure_closet/depot/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/rcs)) to_chat(user, "Bluespace interference prevents [W] from locking onto [src]!") return diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index c8074cd4f6295..c7056037507ee 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -35,7 +35,7 @@ new /obj/item/storage/backpack/satchel/withwallet( src ) new /obj/item/radio/headset( src ) -/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params) +/obj/structure/closet/secure_closet/personal/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(opened || !istype(W, /obj/item/card/id)) return ..() diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 2145818d6f811..40e729f30e3bd 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -86,7 +86,7 @@ opened = FALSE return TRUE -/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params) +/obj/structure/closet/crate/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!opened && try_rig(W, user)) return return ..() @@ -306,7 +306,7 @@ return FALSE return TRUE -/obj/structure/closet/crate/secure/personal/attackby(obj/item/I, mob/user, params) +/obj/structure/closet/crate/secure/personal/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(opened || !istype(I, /obj/item/card/id)) return ..() diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index f5e0e0dbb4dc2..d9642b8788660 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -29,7 +29,7 @@ to_chat(user, "You need a crowbar to pry this open!") return -/obj/structure/largecrate/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/largecrate/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(user.a_intent != INTENT_HARM) attack_hand(user) else diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index c569526f0b631..a9032998a5146 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -9,6 +9,7 @@ layer = SHOWER_CLOSED_LAYER opacity = TRUE density = FALSE + new_attack_chain = TRUE /obj/structure/curtain/open icon_state = "open" @@ -39,11 +40,10 @@ icon_state = "open" layer = SHOWER_OPEN_LAYER -/obj/structure/curtain/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/toy/crayon)) +/obj/structure/curtain/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/toy/crayon)) color = tgui_input_color(user,"Please choose a color.", "Curtain Color") - return - return ..() + return ITEM_INTERACT_SUCCESS /obj/structure/curtain/screwdriver_act(mob/user, obj/item/I) . = TRUE diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index b708793ac85bf..94953b6f8ba9f 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -130,7 +130,7 @@ if(!open && !broken) . += "glassbox_closed" -/obj/structure/displaycase/attackby(obj/item/I, mob/user, params) +/obj/structure/displaycase/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.GetID()) if(!openable) to_chat(user, "There is no ID scanner, looks like this one is sealed shut.") @@ -232,7 +232,7 @@ icon_state = "glassbox_chassis" var/obj/item/airlock_electronics/electronics -/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params) +/obj/structure/displaycase_chassis/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/airlock_electronics)) to_chat(user, "You start installing the electronics into [src]...") playsound(loc, I.usesound, 50, TRUE) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 3511f2bb5e479..4566e9bbfc26e 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -55,7 +55,7 @@ else . += "There is a small paper placard on the assembly[doorname]." -/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params) +/obj/structure/door_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) // The door assembly gets renamed to "Assembly - Foobar", // but the `t` returned from the proc is just "Foobar" without the prefix. diff --git a/code/game/objects/structures/engicart.dm b/code/game/objects/structures/engicart.dm index 37b69f505c160..7d5ec19c99bb0 100644 --- a/code/game/objects/structures/engicart.dm +++ b/code/game/objects/structures/engicart.dm @@ -30,7 +30,7 @@ to_chat(user, "You put [I] into [src].") return -/obj/structure/engineeringcart/attackby(obj/item/I, mob/user, params) +/obj/structure/engineeringcart/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/fail_msg = "There is already one of those in [src]." if(!I.is_robot_module()) if(istype(I, /obj/item/stack/sheet/glass)) diff --git a/code/game/objects/structures/extinguisher_cabinet.dm b/code/game/objects/structures/extinguisher_cabinet.dm index 77b53eb0e21b5..f25520be1e0cb 100644 --- a/code/game/objects/structures/extinguisher_cabinet.dm +++ b/code/game/objects/structures/extinguisher_cabinet.dm @@ -62,7 +62,7 @@ has_extinguisher = null update_icon(UPDATE_ICON_STATE) -/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params) +/obj/structure/extinguisher_cabinet/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(isrobot(user) || isalien(user)) return if(istype(O, /obj/item/extinguisher)) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 7c7f95f3e8d90..27df94912bdf0 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -112,7 +112,7 @@ qdel(src) return T -/obj/structure/falsewall/attackby(obj/item/W, mob/user, params) +/obj/structure/falsewall/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(opening) to_chat(user, "You must wait until the door has stopped moving.") return @@ -217,7 +217,7 @@ smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS) -/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/falsewall/uranium/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) radiate() ..() @@ -288,7 +288,7 @@ smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS) canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS) -/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params) +/obj/structure/falsewall/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.get_heat() > 300) var/turf/T = locate(user) message_admins("Plasma falsewall ignited by [key_name_admin(user)] in [ADMIN_VERBOSEJMP(T)]") diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 65e5e07a211b7..351d42a6b6751 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -121,7 +121,7 @@ return update_cut_status() -/obj/structure/fence/attackby(obj/item/C, mob/user) +/obj/structure/fence/attackby__legacy__attackchain(obj/item/C, mob/user) if(shock(user, 90)) return if(istype(C, /obj/item/stack/rods)) diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 09cf587e2e8b1..522881d1a453d 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -515,7 +515,7 @@ A.loc = get_turf(src) */ -/obj/structure/bush/attackby(obj/I as obj, mob/user as mob, params) +/obj/structure/bush/attackby__legacy__attackchain(obj/I as obj, mob/user as mob, params) //hatchets can clear away undergrowth if(istype(I, /obj/item/hatchet) && !stump) if(indestructable) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index d1f47ae9ac88e..a7f2125a0a713 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -46,7 +46,7 @@ if(temp_check >= GIRDER_MELTING_TEMP) take_damage(10) -/obj/structure/girder/attackby(obj/item/W, mob/user, params) +/obj/structure/girder/attackby__legacy__attackchain(obj/item/W, mob/user, params) add_fingerprint(user) if(istype(W, /obj/item/gun/energy/plasmacutter)) to_chat(user, "You start slicing apart the girder...") @@ -463,7 +463,7 @@ . = ..() icon_state = GET_CULT_DATA(cult_girder_icon_state, initial(icon_state)) -/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params) +/obj/structure/girder/cult/attackby__legacy__attackchain(obj/item/W, mob/user, params) add_fingerprint(user) if(istype(W, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user)) //Cultists can demolish cult girders instantly with their dagger user.visible_message("[user] strikes [src] with [W]!", "You demolish [src].") diff --git a/code/game/objects/structures/grey_autocloner.dm b/code/game/objects/structures/grey_autocloner.dm index 7afed5b66b3b7..d11afe9a220cc 100644 --- a/code/game/objects/structures/grey_autocloner.dm +++ b/code/game/objects/structures/grey_autocloner.dm @@ -24,7 +24,7 @@ clonemind = null return ..() -/obj/machinery/grey_autocloner/attackby(obj/item/bio_chip_implanter/implant, mob/user, params) +/obj/machinery/grey_autocloner/attackby__legacy__attackchain(obj/item/bio_chip_implanter/implant, mob/user, params) if(!istype(implant) || !(istype(implant.imp, /obj/item/bio_chip/grey_autocloner))) return ..() var/obj/item/bio_chip/grey_autocloner/autoclone = implant.imp diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 81aa7972720c3..e0aa89bca9b1e 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -102,7 +102,7 @@ if(pass_info.is_movable) . = . || pass_info.pass_flags & PASSGRILLE -/obj/structure/grille/attackby(obj/item/I, mob/user, params) +/obj/structure/grille/attackby__legacy__attackchain(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) add_fingerprint(user) if(istype(I, /obj/item/stack/rods) && broken) diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index 3061e4dbbac38..692510e8cecaf 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -155,7 +155,7 @@ blade_status = GUILLOTINE_BLADE_DROPPED icon_state = "guillotine" -/obj/structure/guillotine/attackby(obj/item/W, mob/user, params) +/obj/structure/guillotine/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/whetstone)) add_fingerprint(user) if(blade_status == GUILLOTINE_BLADE_SHARPENING) diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 0f25600855176..0c1267ff89185 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -9,7 +9,7 @@ . = ..() . += "Use this item in hand to create an inflatable wall." -/obj/item/inflatable/attack_self(mob/user) +/obj/item/inflatable/attack_self__legacy__attackchain(mob/user) playsound(loc, 'sound/items/zip.ogg', 75, 1) to_chat(user, "You inflate [src].") var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc) @@ -51,7 +51,7 @@ /obj/structure/inflatable/attack_hand(mob/user) add_fingerprint(user) -/obj/structure/inflatable/attackby(obj/item/I, mob/living/user, params) +/obj/structure/inflatable/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(I.sharp || is_type_in_typecache(I, GLOB.pointed_types)) user.do_attack_animation(src, used_item = I) deconstruct(FALSE) @@ -88,7 +88,7 @@ icon = 'icons/obj/inflatable.dmi' icon_state = "folded_door" -/obj/item/inflatable/door/attack_self(mob/user) +/obj/item/inflatable/door/attack_self__legacy__attackchain(mob/user) playsound(loc, 'sound/items/zip.ogg', 75, 1) to_chat(user, "You inflate [src].") var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc) @@ -165,7 +165,7 @@ icon = 'icons/obj/inflatable.dmi' icon_state = "folded_wall_torn" -/obj/item/inflatable/torn/attack_self(mob/user) +/obj/item/inflatable/torn/attack_self__legacy__attackchain(mob/user) to_chat(user, "The inflatable wall is too torn to be inflated!") add_fingerprint(user) @@ -175,7 +175,7 @@ icon = 'icons/obj/inflatable.dmi' icon_state = "folded_door_torn" -/obj/item/inflatable/door/torn/attack_self(mob/user) +/obj/item/inflatable/door/torn/attack_self__legacy__attackchain(mob/user) to_chat(user, "The inflatable door is too torn to be inflated!") add_fingerprint(user) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index be9c4a1df4713..e9e02ff2e8bd6 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -47,7 +47,7 @@ /obj/structure/janitorialcart/on_reagent_change() update_icon(UPDATE_OVERLAYS) -/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params) +/obj/structure/janitorialcart/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.is_robot_module()) to_chat(user, "You cannot interface your modules with [src]!") return @@ -89,7 +89,7 @@ to_chat(user, "There is already one of those in [src].") else if(mybag) - mybag.attackby(I, user, params) + mybag.attackby__legacy__attackchain(I, user, params) else to_chat(user, "There is already one of those in [src].") diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 5ff8c68f188d9..4ab47a636f323 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -20,7 +20,7 @@ deconstruct(TRUE) return TRUE -/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params) +/obj/structure/kitchenspike_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params) add_fingerprint(user) if(istype(I, /obj/item/stack/rods)) var/obj/item/stack/rods/R = I @@ -69,7 +69,7 @@ else ..() -/obj/structure/kitchenspike/attackby(obj/item/I, mob/user) +/obj/structure/kitchenspike/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I if(G.affecting && isliving(G.affecting)) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 79842217c312b..b92d65247add6 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -29,7 +29,7 @@ /obj/structure/lattice/proc/deconstruction_hints(mob/user) return "The rods look like they could be cut. There's space for more rods or a tile." -/obj/structure/lattice/attackby(obj/item/C, mob/user, params) +/obj/structure/lattice/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(resistance_flags & INDESTRUCTIBLE) return if(istype(C, /obj/item/wirecutters)) @@ -39,7 +39,7 @@ deconstruct() else var/turf/T = get_turf(src) - return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc) + return T.attackby__legacy__attackchain(C, user) //hand this off to the turf instead (for building plating, catwalks, etc) /obj/structure/lattice/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) diff --git a/code/game/objects/structures/lavaland/necropolis_tendril.dm b/code/game/objects/structures/lavaland/necropolis_tendril.dm index 4b05102f57314..8550806b07213 100644 --- a/code/game/objects/structures/lavaland/necropolis_tendril.dm +++ b/code/game/objects/structures/lavaland/necropolis_tendril.dm @@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(tendrils) new /obj/structure/closet/crate/necropolis/tendril(loc) return ..() -/obj/structure/spawner/lavaland/attacked_by(obj/item/I, mob/living/user) +/obj/structure/spawner/lavaland/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) . = ..() SEND_SIGNAL(src, COMSIG_SPAWNER_SET_TARGET, user) diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm index 1687478e6b40c..fd0e30d1144cb 100644 --- a/code/game/objects/structures/loom.dm +++ b/code/game/objects/structures/loom.dm @@ -10,7 +10,7 @@ density = TRUE anchored = TRUE -/obj/structure/loom/attackby(obj/item/I, mob/user) +/obj/structure/loom/attackby__legacy__attackchain(obj/item/I, mob/user) if(weave(I, user)) return return ..() diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index dca1467ea517e..c17308c90af69 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -115,7 +115,7 @@ else icon_state = initial_state -/obj/structure/mineral_door/attackby(obj/item/W, mob/user, params) +/obj/structure/mineral_door/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/pickaxe)) var/obj/item/pickaxe/digTool = W to_chat(user, "You start digging \the [src].") @@ -181,7 +181,7 @@ icon_state = "plasma" sheetType = /obj/item/stack/sheet/mineral/plasma -/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user) +/obj/structure/mineral_door/transparent/plasma/attackby__legacy__attackchain(obj/item/W, mob/user) if(W.get_heat()) message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x], [y], [z] - JMP)", 0, 1) log_game("Plasma mineral door ignited by [key_name(user)] in ([x], [y], [z])") diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index eabccdf939a5a..c7c9923cab485 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -166,7 +166,7 @@ /obj/structure/mirror/magic/ui_close(mob/user) curse(user) -/obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params) +/obj/structure/mirror/magic/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) return /obj/structure/mirror/magic/proc/curse(mob/living/user) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index eae1f93757431..d727e7062389f 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -23,7 +23,7 @@ GLOB.janitorial_equipment -= src return ..() -/obj/structure/mopbucket/attackby(obj/item/W, mob/user, params) +/obj/structure/mopbucket/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.is_robot_module()) to_chat(user, "You cannot interface your modules with [src]!") return diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 2be0a5f1ff08b..9ed6bfc1750b5 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -172,7 +172,7 @@ return ..() attack_hand(user) -/obj/structure/morgue/attackby(P as obj, mob/user as mob, params) +/obj/structure/morgue/attackby__legacy__attackchain(P as obj, mob/user as mob, params) if(is_pen(P)) var/t = rename_interactive(user, P) @@ -419,7 +419,7 @@ GLOBAL_LIST_EMPTY(crematoriums) GLOB.crematoriums += src return TRUE -/obj/structure/crematorium/attackby(obj/item/P, mob/user, params) +/obj/structure/crematorium/attackby__legacy__attackchain(obj/item/P, mob/user, params) if(is_pen(P)) rename_interactive(user, P) add_fingerprint(user) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 99858b3ef2601..3100a070ebff0 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -89,7 +89,7 @@ return var/obj/item/held_item = usr.get_active_hand() if(is_pen(held_item)) - paper.attackby(held_item, usr) + paper.attackby__legacy__attackchain(held_item, usr) return else usr.put_in_hands(paper) @@ -104,7 +104,7 @@ paper.show_content(usr) return -/obj/structure/noticeboard/attackby(obj/item/I, mob/user, params) +/obj/structure/noticeboard/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/paper)) if(notices >= MAX_NOTICES) to_chat(user, "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.") diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index 4be0439ea3d3d..ebe2e672006d5 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -33,7 +33,7 @@ /obj/structure/railing/cap/reversed icon_state = "railing_cap_reversed" -/obj/structure/railing/attackby(obj/item/I, mob/living/user, params) +/obj/structure/railing/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) ..() add_fingerprint(user) diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index a0582bb533285..80d4e69828234 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -42,7 +42,7 @@ return -1 -/obj/structure/reflector/attackby(obj/item/W, mob/user, params) +/obj/structure/reflector/attackby__legacy__attackchain(obj/item/W, mob/user, params) //Finishing the frame if(istype(W,/obj/item/stack/sheet)) if(finished) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 435763c9908c6..ee476c27cbdc5 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -188,7 +188,7 @@ GLOBAL_LIST_EMPTY(safes) else ui_interact(user) -/obj/structure/safe/attackby(obj/item/I, mob/user, params) +/obj/structure/safe/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(open) if(I.flags && ABSTRACT) return diff --git a/code/game/objects/structures/shelves.dm b/code/game/objects/structures/shelves.dm index 71d8f84fd9dd6..f6585a6720cda 100644 --- a/code/game/objects/structures/shelves.dm +++ b/code/game/objects/structures/shelves.dm @@ -26,7 +26,7 @@ GLOBAL_LIST_INIT(shelf_colors, list("basic", "sci", "sup", "serv", "med", "sec", if(mapload) SEND_SIGNAL(src, COMSIG_SHELF_ADDED_ON_MAPLOAD) -/obj/structure/shelf/attackby(obj/item/I, mob/living/user, params) +/obj/structure/shelf/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) var/obj/item/toy/crayon/spraycan/spraycan = I if(!istype(spraycan)) return ..() diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 14fa44bc785a4..8eadb12fe09ae 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -9,7 +9,7 @@ var/oreAmount = 5 var/material_drop_type = /obj/item/stack/sheet/metal -/obj/structure/statue/attackby(obj/item/W, mob/living/user, params) +/obj/structure/statue/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) add_fingerprint(user) if(!(flags & NODECONSTRUCT)) if(default_unfasten_wrench(user, W)) @@ -71,7 +71,7 @@ desc = "This statue has a sickening green colour." icon_state = "eng" -/obj/structure/statue/uranium/attackby(obj/item/W, mob/user, params) +/obj/structure/statue/uranium/attackby__legacy__attackchain(obj/item/W, mob/user, params) radiate() return ..() @@ -122,7 +122,7 @@ PlasmaBurn() ..() -/obj/structure/statue/plasma/attackby(obj/item/W, mob/user, params) +/obj/structure/statue/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.get_heat() > 300)//If the temperature of the object is over 300, then ignite message_admins("[key_name_admin(user)] ignited a plasma statue at [COORD(loc)]") log_game("[key_name(user)] ignited plasma a statue at [COORD(loc)]") @@ -240,7 +240,7 @@ honk() ..() -/obj/structure/statue/bananium/attackby(obj/item/W, mob/user, params) +/obj/structure/statue/bananium/attackby__legacy__attackchain(obj/item/W, mob/user, params) honk() return ..() @@ -336,7 +336,7 @@ new /obj/item/grown/log(drop_location()) return ..() -/obj/structure/snowman/built/attackby(obj/item/I, mob/user) +/obj/structure/snowman/built/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/snowball) && obj_integrity < max_integrity) to_chat(user, "You patch some of the damage on [src] with [I].") obj_integrity = max_integrity diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 9ec32313a45a4..1a774e177914f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -145,7 +145,7 @@ var/icon_down = "down" var/folded = /obj/item/roller -/obj/structure/bed/roller/attackby(obj/item/W, mob/user, params) +/obj/structure/bed/roller/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/roller_holder)) if(has_buckled_mobs()) if(length(buckled_mobs) > 1) @@ -185,12 +185,12 @@ w_class = WEIGHT_CLASS_BULKY var/extended = /obj/structure/bed/roller -/obj/item/roller/attack_self(mob/user) +/obj/item/roller/attack_self__legacy__attackchain(mob/user) var/obj/structure/bed/roller/R = new extended(user.loc) R.add_fingerprint(user) qdel(src) -/obj/item/roller/afterattack(atom/target, mob/user, proximity, params) +/obj/item/roller/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) if(!proximity) return if(isturf(target)) @@ -200,7 +200,7 @@ R.add_fingerprint(user) qdel(src) -/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/roller/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/roller_holder)) var/obj/item/roller_holder/RH = W if(!RH.held) @@ -216,7 +216,7 @@ origin_tech = "magnets=3;biotech=4;powerstorage=3" extended = /obj/structure/bed/roller/holo -/obj/item/roller/holo/attackby(obj/item/W, mob/user, params) +/obj/item/roller/holo/attackby__legacy__attackchain(obj/item/W, mob/user, params) return /obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location) @@ -242,7 +242,7 @@ ..() held = new /obj/item/roller(src) -/obj/item/roller_holder/attack_self(mob/user as mob) +/obj/item/roller_holder/attack_self__legacy__attackchain(mob/user as mob) if(!held) to_chat(user, "The rack is empty.") return diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index b9c9d10163f77..68acdf87b6178 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -36,7 +36,7 @@ . = ..() handle_rotation() -/obj/structure/chair/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/chair/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/assembly/shock_kit)) var/obj/item/assembly/shock_kit/SK = W if(!SK.status) @@ -294,7 +294,7 @@ armrest.layer = ABOVE_MOB_LAYER return ..() -/obj/structure/chair/sofa/attacked_by(obj/item/I, mob/living/user) +/obj/structure/chair/sofa/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) . = ..() if(!colorable) return @@ -399,7 +399,7 @@ /obj/structure/chair/sofa/bench/handle_layer() return -/obj/structure/chair/sofa/bench/attacked_by(obj/item/I, mob/living/user) +/obj/structure/chair/sofa/bench/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) . = ..() if(istype(I, /obj/item/toy/crayon)) var/obj/item/toy/crayon/C = I @@ -557,7 +557,7 @@ return 1 return 0 -/obj/item/chair/afterattack(atom/target, mob/living/carbon/user, proximity) +/obj/item/chair/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity) ..() if(!proximity) return @@ -571,7 +571,7 @@ playsound(src.loc, 'sound/weapons/punch1.ogg', 50, TRUE, -1) smash(user) -/obj/item/chair/stool/attack(mob/M as mob, mob/user as mob) +/obj/item/chair/stool/attack__legacy__attackchain(mob/M as mob, mob/user as mob) if(prob(5) && isliving(M)) user.visible_message("[user] breaks [src] over [M]'s back!.") user.unEquip(src) diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index a2ac6103dfb97..160e74bbad323 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -27,7 +27,7 @@ ///What stacks can be used to make the table, and if it will result in a unique table var/list/restrict_table_types = list() //ex: list(/obj/item/stack/tile/carpet = /obj/structure/table/wood/poker, /obj/item/stack/sheet/wood = /obj/item/stack/sheet/wood::table_type), carpet will make poker table, wood will result in standard table_type. If the list is empty, any material can be used for its default table_type. -/obj/structure/table_frame/attackby(obj/item/I, mob/user, params) +/obj/structure/table_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!try_make_table(I, user)) return ..() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 22287c20f7bc6..23f533f22967b 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -223,7 +223,7 @@ return TRUE qdel(G) -/obj/structure/table/attackby(obj/item/I, mob/user, params) +/obj/structure/table/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grab)) tablepush(I, user) return @@ -935,7 +935,7 @@ step(O, get_dir(O, src)) return TRUE -/obj/structure/rack/attackby(obj/item/W, mob/user, params) +/obj/structure/rack/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(isrobot(user)) return if(user.a_intent == INTENT_HARM) @@ -1016,7 +1016,7 @@ new /obj/item/stack/sheet/metal(user.loc) qdel(src) -/obj/item/rack_parts/attack_self(mob/user) +/obj/item/rack_parts/attack_self__legacy__attackchain(mob/user) if(building) return building = TRUE diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index b5e20b076c962..e86d23a5d356d 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -95,7 +95,7 @@ add_fingerprint(usr) return TRUE -/obj/structure/dispenser/attackby(obj/item/I, mob/user, params) +/obj/structure/dispenser/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank/internals/oxygen) || istype(I, /obj/item/tank/internals/air) || istype(I, /obj/item/tank/internals/anesthetic)) try_insert_tank(user, stored_oxygen_tanks, I) return diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 503101e02b7de..625a8a8ba919f 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -22,7 +22,7 @@ pinned_target = null density = TRUE -/obj/structure/target_stake/attackby(obj/item/W, mob/user, params) +/obj/structure/target_stake/attackby__legacy__attackchain(obj/item/W, mob/user, params) // Putting objects on the stake. Most importantly, targets if(istype(W, /obj/item/target) && !pinned_target) density = FALSE diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index aa3e6163f755e..70df8bf037cc6 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -104,7 +104,7 @@ L.Weaken(10 SECONDS) -/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params) +/obj/structure/transit_tube/station/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/grab) && hatch_state == TRANSIT_TUBE_OPEN) var/obj/item/grab/G = W if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 06631ce17fdbc..e882da691101a 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -62,7 +62,7 @@ pixel_y = -8 layer = FLY_LAYER -/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params) +/obj/structure/toilet/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/reagent_containers)) if(!open) return @@ -230,7 +230,7 @@ anchored = TRUE -/obj/structure/urinal/attackby(obj/item/I, mob/user, params) +/obj/structure/urinal/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I if(!G.confirm()) @@ -339,7 +339,7 @@ if(istype(T) && !T.density) T.MakeSlippery(TURF_WET_WATER, 5 SECONDS) -/obj/machinery/shower/attackby(obj/item/I, mob/user, params) +/obj/machinery/shower/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.type == /obj/item/analyzer) to_chat(user, "The water temperature seems to be [current_temperature].") return ..() @@ -540,7 +540,7 @@ user.clean_blood() -/obj/structure/sink/attackby(obj/item/O, mob/user, params) +/obj/structure/sink/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(busy) to_chat(user, "Someone's already washing here!") return @@ -650,7 +650,7 @@ ..() icon_state = "puddle" -/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/structure/sink/puddle/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) icon_state = "puddle-splash" ..() icon_state = "puddle" @@ -711,7 +711,7 @@ ..() desc = "An entire [result_name] in a box, straight from Space Sweden. It has an [pick("unpronounceable", "overly accented", "entirely gibberish", "oddly normal-sounding")] name." -/obj/item/bathroom_parts/attack_self(mob/user) +/obj/item/bathroom_parts/attack_self__legacy__attackchain(mob/user) var/turf/T = get_turf(user) if(!T) to_chat(user, "You can't build that here!") diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index a5db59da8af93..4a12a0132f01e 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -103,7 +103,7 @@ else return 1 -/obj/structure/windoor_assembly/attackby(obj/item/W, mob/user, params) +/obj/structure/windoor_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) //I really should have spread this out across more states but thin little windoors are hard to sprite. add_fingerprint(user) switch(state) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index b90246baa5b51..0727ea69e34d8 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -186,7 +186,7 @@ deconstruct(FALSE) M.visible_message("[M] smashes through [src]!", "You smash through [src].", "You hear glass breaking.") -/obj/structure/window/attackby(obj/item/I, mob/living/user, params) +/obj/structure/window/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(!can_be_reached(user)) return 1 //skip the afterattack diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 748bcdaab3981..c863cde3f8f6b 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -152,7 +152,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama W.update_icon() return W -/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob, params) +/turf/simulated/floor/attackby__legacy__attackchain(obj/item/C as obj, mob/user as mob, params) if(!C || !user) return TRUE @@ -207,7 +207,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama var/turf/simulated/floor/plating/P = pry_tile(thing, user, TRUE) if(!istype(P)) return - P.attackby(T, user, params) + P.attackby__legacy__attackchain(T, user, params) /turf/simulated/floor/proc/pry_tile(obj/item/C, mob/user, silent = FALSE) if(!silent) diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm index cd0bf4891085e..d9802a666ff64 100644 --- a/code/game/turfs/simulated/floor/asteroid_floors.dm +++ b/code/game/turfs/simulated/floor/asteroid_floors.dm @@ -63,10 +63,10 @@ if(S.pickup_all_on_tile) for(var/obj/item/stack/ore/O in contents) - O.attackby(S, user) + O.attackby__legacy__attackchain(S, user) return -/turf/simulated/floor/plating/asteroid/attackby(obj/item/I, mob/user, params) +/turf/simulated/floor/plating/asteroid/attackby__legacy__attackchain(obj/item/I, mob/user, params) //note that this proc does not call ..() if(!I|| !user) return FALSE diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index 4a819fd6385a5..2ad987572d183 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -62,7 +62,7 @@ underlay_appearance.icon_state = "basalt" return TRUE -/turf/simulated/floor/chasm/attackby(obj/item/C, mob/user, params, area/area_restriction) +/turf/simulated/floor/chasm/attackby__legacy__attackchain(obj/item/C, mob/user, params, area/area_restriction) ..() if(istype(C, /obj/item/stack/rods)) var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 78586e5bb78b1..a13082aaca882 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -83,7 +83,7 @@ /turf/simulated/floor/grass/get_broken_states() return list("damaged") -/turf/simulated/floor/grass/attackby(obj/item/C, mob/user, params) +/turf/simulated/floor/grass/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(..()) return if(istype(C, /obj/item/shovel)) diff --git a/code/game/turfs/simulated/floor/indestructible.dm b/code/game/turfs/simulated/floor/indestructible.dm index 5eaf1b65af3f6..02d7a526c2363 100644 --- a/code/game/turfs/simulated/floor/indestructible.dm +++ b/code/game/turfs/simulated/floor/indestructible.dm @@ -18,7 +18,7 @@ /turf/simulated/floor/indestructible/burn_down() return -/turf/simulated/floor/indestructible/attackby(obj/item/I, mob/user, params) +/turf/simulated/floor/indestructible/attackby__legacy__attackchain(obj/item/I, mob/user, params) return /turf/simulated/floor/indestructible/attack_hand(mob/user) diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index 2eab0b2fb0d60..880cde958178c 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -119,7 +119,7 @@ L.IgniteMob() -/turf/simulated/floor/lava/attackby(obj/item/C, mob/user, params) //Lava isn't a good foundation to build on +/turf/simulated/floor/lava/attackby__legacy__attackchain(obj/item/C, mob/user, params) //Lava isn't a good foundation to build on if(istype(C, /obj/item/stack/rods/lava)) var/obj/item/stack/rods/lava/R = C var/obj/structure/lattice/lava/H = locate(/obj/structure/lattice/lava, src) @@ -183,7 +183,7 @@ . = ..() . += "Some liquid plasma could probably be scooped up with a container." -/turf/simulated/floor/lava/lava_land_surface/plasma/attackby(obj/item/I, mob/user, params) +/turf/simulated/floor/lava/lava_land_surface/plasma/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!I.is_open_container()) return ..() if(!I.reagents.add_reagent("plasma", 10)) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 5d3e3982e24e6..e592923681296 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -50,7 +50,7 @@ return toggle_light(!on) -/turf/simulated/floor/light/attackby(obj/item/C, mob/user, params) +/turf/simulated/floor/light/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(istype(C, /obj/item/light/bulb)) //only for light tiles if(!light_broken) qdel(C) diff --git a/code/game/turfs/simulated/floor/mineral_floors.dm b/code/game/turfs/simulated/floor/mineral_floors.dm index 6eed3f080b3d0..d3ffe5a854c28 100644 --- a/code/game/turfs/simulated/floor/mineral_floors.dm +++ b/code/game/turfs/simulated/floor/mineral_floors.dm @@ -34,7 +34,7 @@ if(exposed_temperature > 300) PlasmaBurn() -/turf/simulated/floor/mineral/plasma/attackby(obj/item/W, mob/user, params) +/turf/simulated/floor/mineral/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.get_heat() > 300)//If the temperature of the object is over 300, then ignite message_admins("Plasma flooring was ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma flooring was ignited by [key_name(user)] in ([x],[y],[z])") @@ -174,7 +174,7 @@ if(istype(M)) squeek() -/turf/simulated/floor/mineral/bananium/attackby(obj/item/W, mob/user, params) +/turf/simulated/floor/mineral/bananium/attackby__legacy__attackchain(obj/item/W, mob/user, params) .=..() if(!.) honk() @@ -250,7 +250,7 @@ if(istype(AM)) radiate() -/turf/simulated/floor/mineral/uranium/attackby(obj/item/W, mob/user, params) +/turf/simulated/floor/mineral/uranium/attackby__legacy__attackchain(obj/item/W, mob/user, params) .=..() if(!.) radiate() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 82e34dd3f79d6..820d5bc0eb71c 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -48,7 +48,7 @@ if(unfastened) . += "It has been unfastened." -/turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params) +/turf/simulated/floor/plating/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(..()) return TRUE @@ -393,7 +393,7 @@ if(METAL_FOAM_IRON) icon_state = "ironfoam" -/turf/simulated/floor/plating/metalfoam/attackby(obj/item/C, mob/user, params) +/turf/simulated/floor/plating/metalfoam/attackby__legacy__attackchain(obj/item/C, mob/user, params) if(..()) return TRUE diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index fdba192ee8599..48ce133374eee 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -62,10 +62,10 @@ /turf/simulated/mineral/shuttleRotate(rotation) QUEUE_SMOOTH(src) -/turf/simulated/mineral/attackby(obj/item/I, mob/user, params) +/turf/simulated/mineral/attackby__legacy__attackchain(obj/item/I, mob/user, params) // TODO: Just sticking this here for now because attack chain refactor is coming later // No point in threading this through everything right now - if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, I, user, params) & COMPONENT_NO_AFTERATTACK) + if(SEND_SIGNAL(src, COMSIG_ATTACK_BY, I, user, params) & COMPONENT_SKIP_AFTERATTACK) return if(!user.IsAdvancedToolUser()) @@ -126,15 +126,15 @@ if(ishuman(AM)) var/mob/living/carbon/human/H = AM if((istype(H.l_hand,/obj/item/pickaxe)) && (!H.hand)) - attackby(H.l_hand,H) + attackby__legacy__attackchain(H.l_hand,H) else if((istype(H.r_hand,/obj/item/pickaxe)) && H.hand) - attackby(H.r_hand,H) + attackby__legacy__attackchain(H.r_hand,H) return else if(isrobot(AM)) var/mob/living/silicon/robot/R = AM if(istype(R.module_active, /obj/item/pickaxe)) - attackby(R.module_active, R) + attackby__legacy__attackchain(R.module_active, R) else if(ismecha(AM)) var/obj/mecha/M = AM @@ -192,7 +192,7 @@ should_reset_color = FALSE baseturf = /turf/simulated/floor/plating/asteroid/ancient -/turf/simulated/mineral/ancient/attackby(obj/item/I, mob/user, params) +/turf/simulated/mineral/ancient/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!user.IsAdvancedToolUser()) to_chat(usr, "You don't have the dexterity to do this!") return @@ -250,7 +250,7 @@ /obj/item/pickaxe/drill/diamonddrill, )) -/turf/simulated/mineral/ancient/outer/attackby(obj/item/I, mob/user, params) +/turf/simulated/mineral/ancient/outer/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/pickaxe) && !(is_type_in_typecache(I, allowed_picks_typecache))) to_chat(user, "Only a diamond tools or a sonic jackhammer can break this rock.") return @@ -278,7 +278,7 @@ /obj/item/pickaxe/drill/diamonddrill, )) -/turf/simulated/mineral/ancient/lava_land_surface_hard/attackby(obj/item/I, mob/user, params) +/turf/simulated/mineral/ancient/lava_land_surface_hard/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/pickaxe) && !(is_type_in_typecache(I, allowed_picks_typecache))) to_chat(user, "Only a diamond tools or a sonic jackhammer can break this rock.") return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 251151d413423..c59f8e5220f92 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -342,7 +342,7 @@ add_fingerprint(user) return ..() -/turf/simulated/wall/attackby(obj/item/I, mob/user, params) +/turf/simulated/wall/attackby__legacy__attackchain(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) if(!isturf(user.loc)) diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 9b8af3672dfff..b4d822bb10e67 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -34,7 +34,7 @@ /turf/simulated/wall/indestructible/burn_down() return -/turf/simulated/wall/indestructible/attackby(obj/item/I, mob/user, params) +/turf/simulated/wall/indestructible/attackby__legacy__attackchain(obj/item/I, mob/user, params) return /turf/simulated/wall/indestructible/attack_hand(mob/user) diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 7dc6f13e138c5..97a2c674a16aa 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -87,7 +87,7 @@ radiate() ..() -/turf/simulated/wall/mineral/uranium/attackby(obj/item/W as obj, mob/user as mob, params) +/turf/simulated/wall/mineral/uranium/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) radiate() ..() @@ -106,7 +106,7 @@ smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS) canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS) -/turf/simulated/wall/mineral/plasma/attackby(obj/item/W, mob/user) +/turf/simulated/wall/mineral/plasma/attackby__legacy__attackchain(obj/item/W, mob/user) if(W.get_heat() > 300)//If the temperature of the object is over 300, then ignite message_admins("Plasma wall ignited by [key_name_admin(user)] in ([x], [y], [z] - JMP)",0,1) log_game("Plasma wall ignited by [key_name(user)] in ([x], [y], [z])") @@ -171,7 +171,7 @@ smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS) canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS) -/turf/simulated/wall/mineral/wood/attackby(obj/item/W, mob/user) +/turf/simulated/wall/mineral/wood/attackby__legacy__attackchain(obj/item/W, mob/user) if(W.sharp && W.force) var/duration = (48 / W.force) * 2 //In seconds, for now. if(istype(W, /obj/item/hatchet) || istype(W, /obj/item/fireaxe)) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 8c31d3d415885..a922b664583d3 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -40,7 +40,7 @@ if(RWALL_SHEATH) . += "The support rods have been sliced through, and the outer sheath is connected loosely to the girder." -/turf/simulated/wall/r_wall/attackby(obj/item/I, mob/user, params) +/turf/simulated/wall/r_wall/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(d_state == RWALL_COVER && istype(I, /obj/item/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the metal cover...") if(I.use_tool(src, user, 40, volume = I.tool_volume) && d_state == RWALL_COVER) diff --git a/code/game/turfs/space/space_turf.dm b/code/game/turfs/space/space_turf.dm index 21d4a3f4b7d73..712aed9a41caa 100644 --- a/code/game/turfs/space/space_turf.dm +++ b/code/game/turfs/space/space_turf.dm @@ -74,7 +74,7 @@ return set_light(0) -/turf/space/attackby(obj/item/C as obj, mob/user as mob, params) +/turf/space/attackby__legacy__attackchain(obj/item/C as obj, mob/user as mob, params) ..() if(istype(C, /obj/item/stack/rods)) var/obj/item/stack/rods/R = C diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index e2f7bc5e67ade..07fc46f73f9e5 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -5,7 +5,7 @@ dir = SOUTH //Overwrite because we dont want people building rods in space. -/turf/space/transit/attackby(obj/O as obj, mob/user as mob, params) +/turf/space/transit/attackby__legacy__attackchain(obj/O as obj, mob/user as mob, params) return /// moving to the north diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 85f6c09c388d0..eef62cd46f4c9 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -482,13 +482,13 @@ if(SSticker) GLOB.cameranet.updateVisibility(src) -/turf/attackby(obj/item/I, mob/user, params) +/turf/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(can_lay_cable()) if(istype(I, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = I for(var/obj/structure/cable/LC in src) if(LC.d1 == 0 || LC.d2 == 0) - LC.attackby(C, user) + LC.attackby__legacy__attackchain(C, user) return C.place_turf(src, user) return TRUE @@ -497,7 +497,7 @@ if(R.loaded) for(var/obj/structure/cable/LC in src) if(LC.d1 == 0 || LC.d2 == 0) - LC.attackby(R, user) + LC.attackby__legacy__attackchain(R, user) return R.loaded.place_turf(src, user) R.is_empty(user) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b4c26706babab..c10a2b406fa99 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2011,7 +2011,7 @@ possible_guardians -= "Random" scarab.possible_guardians = list() scarab.possible_guardians += typechoice - scarab.attack_self(H) + scarab.attack_self__legacy__attackchain(H) spawn(700) qdel(scarab) logmsg = "scarab guardian." diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index c6793185540cd..e594fd2f32bd4 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -40,7 +40,7 @@ return FALSE return TRUE -/obj/item/antag_spawner/nuke_ops/attack_self(mob/user) +/obj/item/antag_spawner/nuke_ops/attack_self__legacy__attackchain(mob/user) if(!(check_usability(user))) return @@ -187,7 +187,7 @@ var/objective_verb = "Kill" var/mob/living/demon_type = /mob/living/simple_animal/demon/slaughter -/obj/item/antag_spawner/slaughter_demon/attack_self(mob/user) +/obj/item/antag_spawner/slaughter_demon/attack_self__legacy__attackchain(mob/user) if(level_blocks_magic(user.z)) //this is to make sure the wizard does NOT summon a demon from the Den.. to_chat(user, "You should probably wait until you reach the station.") return @@ -279,7 +279,7 @@ var/objective_verb = "Eat" var/mob/living/morph_type = /mob/living/simple_animal/hostile/morph -/obj/item/antag_spawner/morph/attack_self(mob/user) +/obj/item/antag_spawner/morph/attack_self__legacy__attackchain(mob/user) if(level_blocks_magic(user.z))//this is to make sure the wizard does NOT summon a morph from the Den.. to_chat(user, "You should probably wait until you reach the station.") return @@ -349,7 +349,7 @@ var/objective_verb = "Harvest" var/mob/living/revenant = /mob/living/simple_animal/revenant -/obj/item/antag_spawner/revenant/attack_self(mob/user) +/obj/item/antag_spawner/revenant/attack_self__legacy__attackchain(mob/user) if(level_blocks_magic(user.z)) //this is to make sure the wizard does NOT summon a revenant from the Den.. to_chat(user, "You should probably wait until you reach the station.") return @@ -406,7 +406,7 @@ var/objective_verb = "Electrocute" var/mob/living/demon_type = /mob/living/simple_animal/demon/pulse_demon -/obj/item/antag_spawner/pulse_demon/attack_self(mob/user) +/obj/item/antag_spawner/pulse_demon/attack_self__legacy__attackchain(mob/user) if(level_blocks_magic(user.z)) to_chat(user, "You should probably wait until you reach the station.") return diff --git a/code/modules/antagonists/changeling/powers/biodegrade.dm b/code/modules/antagonists/changeling/powers/biodegrade.dm index 7a94fbf46e467..2982058152b42 100644 --- a/code/modules/antagonists/changeling/powers/biodegrade.dm +++ b/code/modules/antagonists/changeling/powers/biodegrade.dm @@ -145,7 +145,7 @@ parent_action.UnregisterSignal(parent_action.owner, COMSIG_MOB_WILLINGLY_DROP) return ..() -/obj/item/melee/changeling_corrosive_acid/afterattack(atom/target, mob/user, proximity, params) +/obj/item/melee/changeling_corrosive_acid/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) if(target == user) to_chat(user, "You withdraw your readied acid.") parent_action.remove_hand_spell(user) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 3f9c2481dd05f..62d63bb3dec99 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -159,7 +159,7 @@ parent_action = null return ..() -/obj/item/melee/arm_blade/afterattack(atom/target, mob/user, proximity) +/obj/item/melee/arm_blade/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(istype(target, /obj/structure/table)) diff --git a/code/modules/antagonists/changeling/powers/summon_spiders.dm b/code/modules/antagonists/changeling/powers/summon_spiders.dm index 3233b307958c2..e535b7319f1dc 100644 --- a/code/modules/antagonists/changeling/powers/summon_spiders.dm +++ b/code/modules/antagonists/changeling/powers/summon_spiders.dm @@ -159,7 +159,7 @@ if(!faction_check_mob(M)) enemies |= M -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/infestation_spider/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/hostile/poison/giant_spider/hunter/infestation_spider/attackby__legacy__attackchain(obj/item/W, mob/user, params) . = ..() if(W.force == 0) return diff --git a/code/modules/antagonists/mind_flayer/powers/flayer_stealth_powers.dm b/code/modules/antagonists/mind_flayer/powers/flayer_stealth_powers.dm index f06e4850bed32..22152269a6a5e 100644 --- a/code/modules/antagonists/mind_flayer/powers/flayer_stealth_powers.dm +++ b/code/modules/antagonists/mind_flayer/powers/flayer_stealth_powers.dm @@ -189,7 +189,7 @@ w_class = WEIGHT_CLASS_HUGE var/conversion_time = 7 SECONDS -/obj/item/melee/swarm_hand/afterattack(atom/target, mob/living/user, proximity_flag, click_parameters) +/obj/item/melee/swarm_hand/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity_flag, click_parameters) . = ..() if(!isrobot(target)) return diff --git a/code/modules/antagonists/mind_flayer/powers/flayer_weapon_powers.dm b/code/modules/antagonists/mind_flayer/powers/flayer_weapon_powers.dm index 81d20456fd991..a38584f0e7c9c 100644 --- a/code/modules/antagonists/mind_flayer/powers/flayer_weapon_powers.dm +++ b/code/modules/antagonists/mind_flayer/powers/flayer_weapon_powers.dm @@ -283,10 +283,10 @@ var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing. chambered = AC -/obj/item/gun/projectile/revolver/doublebarrel/flayer/attack_self(mob/living/user) +/obj/item/gun/projectile/revolver/doublebarrel/flayer/attack_self__legacy__attackchain(mob/living/user) return FALSE // Not getting those shrapnel rounds out of there. -/obj/item/gun/projectile/revolver/doublebarrel/flayer/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/doublebarrel/flayer/attackby__legacy__attackchain(obj/item/A, mob/user, params) return FALSE // No loading your gun /obj/item/gun/projectile/revolver/doublebarrel/flayer/sleight_of_handling(mob/living/carbon/human/user) diff --git a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm index 119e868abe8f9..dc3472cd3afe1 100644 --- a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm +++ b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm @@ -37,7 +37,7 @@ var/turf/there = get_turf(H) return here && there && there.z == here.z -/obj/item/pinpointer/crew/contractor/attack_self(mob/living/user) +/obj/item/pinpointer/crew/contractor/attack_self__legacy__attackchain(mob/living/user) if(owner) if(owner != user.mind.current) to_chat(user, "[src] refuses to do anything.") diff --git a/code/modules/antagonists/traitor/contractor/items/contractor_uplink.dm b/code/modules/antagonists/traitor/contractor/items/contractor_uplink.dm index 2edeadfd98a16..8a34bf9a23a88 100644 --- a/code/modules/antagonists/traitor/contractor/items/contractor_uplink.dm +++ b/code/modules/antagonists/traitor/contractor/items/contractor_uplink.dm @@ -19,7 +19,7 @@ QDEL_NULL(hub) return ..() -/obj/item/contractor_uplink/attack_self(mob/user) +/obj/item/contractor_uplink/attack_self__legacy__attackchain(mob/user) hub.ui_interact(user) /** diff --git a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm index a25a691e3a866..d4a54300dbb63 100644 --- a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm @@ -73,7 +73,7 @@ /obj/item/vamp_claws/customised_abstract_text(mob/living/carbon/owner) return "[owner.p_they(TRUE)] [owner.p_have(FALSE)] bloodied claws extending from [owner.p_their(FALSE)] wrists." -/obj/item/vamp_claws/afterattack(atom/target, mob/user, proximity) +/obj/item/vamp_claws/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return @@ -120,7 +120,7 @@ if(HAS_TRAIT(src, TRAIT_WIELDED)) user.changeNext_move(CLICK_CD_MELEE * 0.5) -/obj/item/vamp_claws/attack_self(mob/user) +/obj/item/vamp_claws/attack_self__legacy__attackchain(mob/user) qdel(src) to_chat(user, "You dispel your claws!") diff --git a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm index fcbd61fd752fd..7750d4f69b9ff 100644 --- a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm @@ -84,7 +84,7 @@ to_chat(user, "The snare sends a psychic backlash!") C.EyeBlind(20 SECONDS) -/obj/item/restraints/legcuffs/beartrap/shadow_snare/attackby(obj/item/I, mob/user) +/obj/item/restraints/legcuffs/beartrap/shadow_snare/attackby__legacy__attackchain(obj/item/I, mob/user) var/obj/item/flash/flash = I if(!istype(flash) || !flash.try_use_flash(user)) return ..() diff --git a/code/modules/antagonists/zombie/zombie_spells.dm b/code/modules/antagonists/zombie/zombie_spells.dm index 391b46c58b346..3739a953438c7 100644 --- a/code/modules/antagonists/zombie/zombie_spells.dm +++ b/code/modules/antagonists/zombie/zombie_spells.dm @@ -88,7 +88,7 @@ else force = initial(force) -/obj/item/zombie_claw/afterattack(atom/atom_target, mob/user, proximity_flag, click_parameters) +/obj/item/zombie_claw/afterattack__legacy__attackchain(atom/atom_target, mob/user, proximity_flag, click_parameters) . = ..() if(!proximity_flag) return @@ -150,6 +150,6 @@ for(var/datum/disease/zombie/zomb in target.viruses) zomb.stage = max(zomb.stage, infection_stage) -/obj/item/zombie_claw/attack_self(mob/user) +/obj/item/zombie_claw/attack_self__legacy__attackchain(mob/user) . = ..() qdel(src) diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index 7c1d4b913eee4..dbf3db54bf488 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -56,7 +56,7 @@ to_chat(user, "Someone else is already playing this machine, please wait your turn!") return -/obj/machinery/economy/arcade/attackby(obj/item/O, mob/user, params) +/obj/machinery/economy/arcade/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(!freeplay) if(isspacecash(O)) insert_cash(O, user, token_price) diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm index 85d2b65785219..992f8be598701 100644 --- a/code/modules/arcade/arcade_prize.dm +++ b/code/modules/arcade/arcade_prize.dm @@ -14,7 +14,7 @@ . = ..() icon_state = pick("prizeball_1","prizeball_2","prizeball_3") -/obj/item/toy/prizeball/attack_self(mob/user as mob) +/obj/item/toy/prizeball/attack_self__legacy__attackchain(mob/user as mob) if(opening) return opening = 1 @@ -73,7 +73,7 @@ ..() update_icon(UPDATE_ICON_STATE) -/obj/item/stack/tickets/attack_self(mob/user as mob) +/obj/item/stack/tickets/attack_self__legacy__attackchain(mob/user as mob) return /obj/item/stack/tickets/update_icon_state() diff --git a/code/modules/arcade/prize_counter.dm b/code/modules/arcade/prize_counter.dm index 2170898307596..bbfb26aa84d7c 100644 --- a/code/modules/arcade/prize_counter.dm +++ b/code/modules/arcade/prize_counter.dm @@ -79,7 +79,7 @@ else icon_state = "prize_counter-on" -/obj/machinery/prize_counter/attackby(obj/item/O, mob/user, params) +/obj/machinery/prize_counter/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/stack/tickets)) var/obj/item/stack/tickets/T = O if(user.unEquip(T)) //Because if you can't drop it for some reason, you shouldn't be increasing the tickets var diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 4b35f44324303..ee47d325f737c 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -99,7 +99,7 @@ return TRUE return FALSE -/obj/item/assembly/attackby(obj/item/W, mob/user, params) +/obj/item/assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(isassembly(W)) var/obj/item/assembly/A = W if(!A.secured && !secured) @@ -128,7 +128,7 @@ else . += "[src] can be attached!" -/obj/item/assembly/attack_self(mob/user) +/obj/item/assembly/attack_self__legacy__attackchain(mob/user) if(!user) return user.set_machine(src) diff --git a/code/modules/assembly/assembly_holder.dm b/code/modules/assembly/assembly_holder.dm index 2b6db0074412d..151ce67aa7e9c 100644 --- a/code/modules/assembly/assembly_holder.dm +++ b/code/modules/assembly/assembly_holder.dm @@ -153,7 +153,7 @@ to_chat(user, "[src] can now be taken apart!") update_icon() -/obj/item/assembly_holder/attack_self(mob/user) +/obj/item/assembly_holder/attack_self__legacy__attackchain(mob/user) add_fingerprint(user) if(secured) if(!a_left || !a_right) @@ -162,13 +162,13 @@ if(istype(a_left, a_right.type)) // If they are the same type it causes issues due to window code switch(tgui_alert(user, "Which side would you like to use?", "Choose", list("Left", "Right"))) if("Left") - a_left.attack_self(user) + a_left.attack_self__legacy__attackchain(user) if("Right") - a_right.attack_self(user) + a_right.attack_self__legacy__attackchain(user) return else - a_left.attack_self(user) - a_right.attack_self(user) + a_left.attack_self__legacy__attackchain(user) + a_right.attack_self__legacy__attackchain(user) else var/turf/T = get_turf(src) if(!T) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 6cd315d4ded9f..38c60e7167f34 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -27,9 +27,9 @@ . += bombassembly.overlays . += "bomb_assembly" -/obj/item/onetankbomb/attackby(obj/item/W, mob/user, params) +/obj/item/onetankbomb/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/analyzer)) - bombtank.attackby(W, user, params) + bombtank.attackby__legacy__attackchain(W, user, params) return return ..() @@ -65,8 +65,8 @@ to_chat(user, "The hole has been closed.") -/obj/item/onetankbomb/attack_self(mob/user) //pressing the bomb accesses its assembly - bombassembly.attack_self(user, 1) +/obj/item/onetankbomb/attack_self__legacy__attackchain(mob/user) //pressing the bomb accesses its assembly + bombassembly.attack_self__legacy__attackchain(user, 1) add_fingerprint(user) return diff --git a/code/modules/assembly/health.dm b/code/modules/assembly/health.dm index b85d0037687f0..a7ac581dc3fa5 100644 --- a/code/modules/assembly/health.dm +++ b/code/modules/assembly/health.dm @@ -70,7 +70,7 @@ user_health = null // Clear out the user data, we're no longer scanning STOP_PROCESSING(SSobj, src) -/obj/item/assembly/health/attack_self(mob/user) +/obj/item/assembly/health/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/assembly/health/ui_state(mob/user) diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 0f09929b83a1f..f3433f5b208f7 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -57,7 +57,7 @@ return TRUE -/obj/item/assembly/igniter/attack(mob/living/target, mob/living/user) +/obj/item/assembly/igniter/attack__legacy__attackchain(mob/living/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() @@ -82,7 +82,7 @@ cig.light(user, target) return TRUE -/obj/item/assembly/igniter/attack_self(mob/user) +/obj/item/assembly/igniter/attack_self__legacy__attackchain(mob/user) if(!istype(loc, /obj/item/assembly_holder)) activate() add_fingerprint(user) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index f11cccdefc3b4..ee9df746b436e 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -166,7 +166,7 @@ usr << browse(null, "window=infra") return if(usr) - attack_self(usr) + attack_self__legacy__attackchain(usr) /obj/item/assembly/infra/AltClick(mob/user) rotate(user) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 5284fc3fdc8ed..734e9a7f4248e 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -77,7 +77,7 @@ update_icon() pulse(0) -/obj/item/assembly/mousetrap/attack_self(mob/living/user) +/obj/item/assembly/mousetrap/attack_self__legacy__attackchain(mob/living/user) if(!armed) to_chat(user, "You arm [src].") else diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index a9fb8b088f36c..a3163d7141b51 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -137,4 +137,4 @@ return if(usr) - attack_self(usr) + attack_self__legacy__attackchain(usr) diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 02a5f9d9739ea..8ecfa9d1d231d 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -35,9 +35,9 @@ add_fingerprint(user) return TRUE -/obj/item/assembly/shock_kit/attack_self(mob/user as mob) - part1.attack_self(user, status) - part2.attack_self(user, status) +/obj/item/assembly/shock_kit/attack_self__legacy__attackchain(mob/user as mob) + part1.attack_self__legacy__attackchain(user, status) + part2.attack_self__legacy__attackchain(user, status) add_fingerprint(user) return diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 7bc513cd2fc0c..d8f874ac6ed46 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(remote_signalers) to_chat(user, "You activate [src].") activate() -/obj/item/assembly/signaler/attackby(obj/item/W, mob/user, params) +/obj/item/assembly/signaler/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(issignaler(W)) var/obj/item/assembly/signaler/signaler2 = W if(secured && signaler2.secured) @@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(remote_signalers) // UI STUFF // -/obj/item/assembly/signaler/attack_self(mob/user) +/obj/item/assembly/signaler/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/assembly/signaler/ui_state(mob/user) diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index de4e4ee85b526..ae87e8534b04f 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -126,4 +126,4 @@ return if(usr) - attack_self(usr) + attack_self__legacy__attackchain(usr) diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index f367dea9c49a7..5db23c7c7e948 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -46,7 +46,7 @@ return ..() // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way. -/obj/item/assembly/voice/attack_self(mob/user) +/obj/item/assembly/voice/attack_self__legacy__attackchain(mob/user) if(!user || !secured) return FALSE @@ -68,7 +68,7 @@ origin_tech = "magnets=1;engineering=1" bomb_name = "noise-activated bomb" -/obj/item/assembly/voice/noise/attack_self(mob/user) +/obj/item/assembly/voice/noise/attack_self__legacy__attackchain(mob/user) return /obj/item/assembly/voice/noise/examine(mob/user) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 202817bf443cf..164d81a608156 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -994,7 +994,7 @@ playsound(src.loc, 'sound/effects/sparks4.ogg', 50, TRUE) return TRUE -/obj/machinery/alarm/attackby(obj/item/I, mob/user, params) +/obj/machinery/alarm/attackby__legacy__attackchain(obj/item/I, mob/user, params) add_fingerprint(user) switch(buildstage) diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 22f8ba3ec196e..945b1a6c4daff 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -256,7 +256,7 @@ Pipelines + Other Objects -> Pipe network return FALSE //(De)construction -/obj/machinery/atmospherics/attackby(obj/item/W, mob/user) +/obj/machinery/atmospherics/attackby__legacy__attackchain(obj/item/W, mob/user) var/turf/T = get_turf(src) if(T.transparent_floor) to_chat(user, "You can't interact with something that's under the floor!") diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 25c0758b0ae29..16f7ff116e735 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -157,7 +157,7 @@ Thus, the two variables affect pump operation are set in New(): return update_icon() -/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/binary/pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) rename_interactive(user, W) return TRUE diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 63ec6859eaa7e..a39e69c387328 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -153,7 +153,7 @@ Thus, the two variables affect pump operation are set in New(): return update_icon() -/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/binary/volume_pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) rename_interactive(user, W) return TRUE diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index f4bac4ae3882a..8ac8021ead3ec 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -227,7 +227,7 @@ if(.) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") -/obj/machinery/atmospherics/trinary/filter/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/trinary/filter/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) rename_interactive(user, W) return diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 677df08ea0665..977ce8e4d18ab 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -201,7 +201,7 @@ if(.) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") -/obj/machinery/atmospherics/trinary/mixer/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/trinary/mixer/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) rename_interactive(user, W) return diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index eea8d55505f11..6ed09eda30bc8 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -298,7 +298,7 @@ add_fingerprint(usr) -/obj/machinery/atmospherics/unary/cryo_cell/attackby(obj/item/G, mob/user, params) +/obj/machinery/atmospherics/unary/cryo_cell/attackby__legacy__attackchain(obj/item/G, mob/user, params) if(istype(G, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) var/obj/item/reagent_containers/B = G if(beaker) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 12e3d2bf01a4d..e59f55d0b45a2 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -182,7 +182,7 @@ pipe_image.plane = ABOVE_HUD_PLANE playsound(loc, 'sound/weapons/bladeslice.ogg', 100, TRUE) -/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/unary/vent_pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/paper)) if(!welded) if(open) diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index c9ee9fd5c0258..2cf3b4d5935b9 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -118,7 +118,7 @@ update_icon() return TRUE -/obj/machinery/atmospherics/portable/attackby(obj/item/W, mob/user, params) +/obj/machinery/atmospherics/portable/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/tank)) if(!(stat & BROKEN)) if(!user.drop_item()) @@ -155,7 +155,7 @@ else to_chat(user, "Nothing happens.") -/obj/machinery/atmospherics/portable/attacked_by(obj/item/I, mob/user) +/obj/machinery/atmospherics/portable/attacked_by__legacy__attackchain(obj/item/I, mob/user) if(I.force < 10 && !(stat & BROKEN)) take_damage(0) else diff --git a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm index f8d301fa93c8e..7d69d469a3aae 100644 --- a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm +++ b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm @@ -13,7 +13,7 @@ name = "incomplete servant golem shell" shell_type = /obj/effect/mob_spawn/human/alive/golem/servant -/obj/item/golem_shell/attackby(obj/item/I, mob/user, params) +/obj/item/golem_shell/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() var/static/list/golem_shell_species_types = list( /obj/item/stack/sheet/metal = /datum/species/golem, @@ -166,7 +166,7 @@ create(ckey = user.ckey, name = user.real_name) user.death() -/obj/effect/mob_spawn/human/alive/golem/attackby(obj/item/I, mob/living/carbon/user, params) +/obj/effect/mob_spawn/human/alive/golem/attackby__legacy__attackchain(obj/item/I, mob/living/carbon/user, params) if(!istype(I, /obj/item/slimepotion/transference)) return ..() if(iscarbon(user) && can_transfer) diff --git a/code/modules/awaymissions/mission_code/ruins/gps_ruin.dm b/code/modules/awaymissions/mission_code/ruins/gps_ruin.dm index fa26eea5d0d69..51fa397574098 100644 --- a/code/modules/awaymissions/mission_code/ruins/gps_ruin.dm +++ b/code/modules/awaymissions/mission_code/ruins/gps_ruin.dm @@ -10,4 +10,4 @@ gpstag = "Unknown Signal" /obj/item/gps/ruin/attack_hand(mob/user) - attack_self(user) + attack_self__legacy__attackchain(user) diff --git a/code/modules/awaymissions/mission_code/ruins/telecomns.dm b/code/modules/awaymissions/mission_code/ruins/telecomns.dm index d485817cf1930..2d24fe5e65f3d 100644 --- a/code/modules/awaymissions/mission_code/ruins/telecomns.dm +++ b/code/modules/awaymissions/mission_code/ruins/telecomns.dm @@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank) /obj/machinery/autolathe/trapped/Initialize(mapload) . = ..() - RegisterSignal(src, COMSIG_PARENT_ATTACKBY, PROC_REF(material_container_shenanigins)) + RegisterSignal(src, COMSIG_ATTACK_BY, PROC_REF(material_container_shenanigins)) /obj/machinery/autolathe/trapped/proc/material_container_shenanigins(datum/source, obj/item/attacker, mob/user) if(!disguise_broken) @@ -393,14 +393,14 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank) QDEL_NULL(integrated_console) return ..() -/obj/item/remote_ai_upload/attack_self(mob/user as mob) +/obj/item/remote_ai_upload/attack_self__legacy__attackchain(mob/user as mob) integrated_console.attack_hand(user) -/obj/item/remote_ai_upload/attackby(obj/item/O, mob/user, params) +/obj/item/remote_ai_upload/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/card/emag)) to_chat(user, "You are more likely to damage this with an emag, than achieve something useful.") return - var/time_to_die = integrated_console.attackby(O, user, params) + var/time_to_die = integrated_console.attackby__legacy__attackchain(O, user, params) if(time_to_die) to_chat(user, "[src]'s relay begins to overheat...") playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) diff --git a/code/modules/awaymissions/mission_code/ruins/watcher_grave.dm b/code/modules/awaymissions/mission_code/ruins/watcher_grave.dm index 715f78f424914..398eda18c0952 100644 --- a/code/modules/awaymissions/mission_code/ruins/watcher_grave.dm +++ b/code/modules/awaymissions/mission_code/ruins/watcher_grave.dm @@ -100,7 +100,7 @@ /// Who are we orbiting? var/mob/living/owner -/obj/item/watcher_hatchling/attack_self(mob/user, modifiers) +/obj/item/watcher_hatchling/attack_self__legacy__attackchain(mob/user, modifiers) . = ..() if(!isnull(orbiter)) watcher_return() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 90f4024708777..553179b84eaae 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -274,7 +274,7 @@ /obj/item/clothing/gloves/proc/Touch(atom/A, proximity) return // return TRUE to cancel attack_hand() -/obj/item/clothing/gloves/attackby(obj/item/W, mob/user, params) +/obj/item/clothing/gloves/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/wirecutters)) if(!clipped) playsound(src.loc, W.usesound, 100, 1) @@ -525,7 +525,7 @@ return FALSE -/obj/item/clothing/head/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/head/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/clothing/head) && can_have_hats) attach_hat(I, user, TRUE) @@ -665,7 +665,7 @@ if(H.get_item_by_slot(ITEM_SLOT_SHOES) == src) REMOVE_TRAIT(H, TRAIT_NOSLIP, UID()) -/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/shoes/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/match) && src.loc == user) var/obj/item/match/M = I if(!M.lit && !M.burnt) // Match isn't lit, but isn't burnt. @@ -1032,13 +1032,13 @@ return FALSE return TRUE -/obj/item/clothing/under/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/under/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/clothing/accessory)) attach_accessory(I, user, TRUE) if(length(accessories)) for(var/obj/item/clothing/accessory/A in accessories) - A.attackby(I, user, params) + A.attackby__legacy__attackchain(I, user, params) return TRUE . = ..() diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index d6189f7615874..97b535890a1a5 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -67,7 +67,7 @@ var/datum/action/A = X A.UpdateButtons() -/obj/item/clothing/glasses/meson/engine/attack_self(mob/user) +/obj/item/clothing/glasses/meson/engine/attack_self__legacy__attackchain(mob/user) toggle_mode(user, TRUE) /obj/item/clothing/glasses/meson/engine/process() diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 420c2888feed3..5874362d7f179 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -3,7 +3,7 @@ if(prescription_upgradable && prescription) upgrade_prescription() -/obj/item/clothing/glasses/attackby(obj/item/I, mob/user) +/obj/item/clothing/glasses/attackby__legacy__attackchain(obj/item/I, mob/user) if(!prescription_upgradable || user.stat || user.restrained() || !ishuman(user)) return ..() var/mob/living/carbon/human/H = user @@ -366,7 +366,7 @@ desc = "Somehow these seem even more out-of-date than normal sunglasses." actions_types = list(/datum/action/item_action/noir) -/obj/item/clothing/glasses/sunglasses/noir/attack_self(mob/user) +/obj/item/clothing/glasses/sunglasses/noir/attack_self__legacy__attackchain(mob/user) toggle_noir(user) /obj/item/clothing/glasses/sunglasses/noir/item_action_slot_check(slot) @@ -383,7 +383,7 @@ var/punused = FALSE actions_types = list(/datum/action/item_action/yeeeaaaaahhhhhhhhhhhhh) -/obj/item/clothing/glasses/sunglasses/yeah/attack_self(mob/user) +/obj/item/clothing/glasses/sunglasses/yeah/attack_self__legacy__attackchain(mob/user) pun(user) /obj/item/clothing/glasses/sunglasses/yeah/proc/pun(mob/user) @@ -451,7 +451,7 @@ "Kidan" = 'icons/mob/clothing/species/kidan/eyes.dmi' ) -/obj/item/clothing/glasses/welding/attack_self(mob/user) +/obj/item/clothing/glasses/welding/attack_self__legacy__attackchain(mob/user) weldingvisortoggle(user) /obj/item/clothing/glasses/welding/superior diff --git a/code/modules/clothing/glasses/tajblind.dm b/code/modules/clothing/glasses/tajblind.dm index 00ec29e529651..c336b9c23a936 100644 --- a/code/modules/clothing/glasses/tajblind.dm +++ b/code/modules/clothing/glasses/tajblind.dm @@ -19,7 +19,7 @@ "Grey" = 'icons/mob/clothing/species/grey/eyes.dmi' ) -/obj/item/clothing/glasses/hud/tajblind/attack_self(mob/user) +/obj/item/clothing/glasses/hud/tajblind/attack_self__legacy__attackchain(mob/user) toggle_veil(user, TRUE) /obj/item/clothing/glasses/hud/tajblind/proc/toggle_veil(mob/user, voluntary) diff --git a/code/modules/clothing/gloves/colored_gloves.dm b/code/modules/clothing/gloves/colored_gloves.dm index 0493b1ac1c25f..a4426893cceeb 100644 --- a/code/modules/clothing/gloves/colored_gloves.dm +++ b/code/modules/clothing/gloves/colored_gloves.dm @@ -60,7 +60,7 @@ /obj/item/clothing/gloves/color/black/thief pickpocket = 1 -/obj/item/clothing/gloves/color/black/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/gloves/color/black/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/wirecutters)) if(can_be_cut && icon_state == initial(icon_state))//only if not dyed var/confirm = tgui_alert(user, "Do you want to cut off the gloves fingertips? Warning: It might destroy their functionality.", "Cut tips?", list("Yes","No")) diff --git a/code/modules/clothing/gloves/misc_gloves.dm b/code/modules/clothing/gloves/misc_gloves.dm index 3cc42d2328400..956d8254e7d37 100644 --- a/code/modules/clothing/gloves/misc_gloves.dm +++ b/code/modules/clothing/gloves/misc_gloves.dm @@ -162,7 +162,7 @@ if(cell) . += "gloves_cell" -/obj/item/clothing/gloves/color/yellow/stun/attackby(obj/item/W, mob/living/user, params) +/obj/item/clothing/gloves/color/yellow/stun/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/stock_parts/cell)) if(!cell) if(!user.drop_item()) diff --git a/code/modules/clothing/gloves/rings.dm b/code/modules/clothing/gloves/rings.dm index aa64d1ca9f378..c0d6e4e1b9b70 100644 --- a/code/modules/clothing/gloves/rings.dm +++ b/code/modules/clothing/gloves/rings.dm @@ -25,7 +25,7 @@ if(stud) . += "It is adorned with a single gem." -/obj/item/clothing/gloves/ring/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/clothing/gloves/ring/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/stack/sheet/mineral/diamond)) var/obj/item/stack/sheet/mineral/diamond/D = I if(stud) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 40ba093a9f3be..59cb22ee07143 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -17,7 +17,7 @@ "Vox" = 'icons/mob/clothing/species/vox/head.dmi' ) -/obj/item/clothing/head/hardhat/attack_self(mob/living/user) +/obj/item/clothing/head/hardhat/attack_self__legacy__attackchain(mob/living/user) toggle_helmet_light(user) /obj/item/clothing/head/hardhat/proc/toggle_helmet_light(mob/living/user) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 848651f2b1b6d..c676e14ed77e0 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -21,7 +21,7 @@ "Grey" = 'icons/mob/clothing/species/grey/helmet.dmi' ) -/obj/item/clothing/head/helmet/attack_self(mob/user) +/obj/item/clothing/head/helmet/attack_self__legacy__attackchain(mob/user) if(can_toggle && !user.incapacitated()) if(world.time > cooldown + toggle_cooldown) cooldown = world.time diff --git a/code/modules/clothing/head/misc_hats.dm b/code/modules/clothing/head/misc_hats.dm index d8cb0d72d0244..82ed36e1a68e0 100644 --- a/code/modules/clothing/head/misc_hats.dm +++ b/code/modules/clothing/head/misc_hats.dm @@ -277,7 +277,7 @@ "Grey" = 'icons/mob/clothing/species/grey/head.dmi' ) -/obj/item/clothing/head/fedora/attack_self(mob/user) +/obj/item/clothing/head/fedora/attack_self__legacy__attackchain(mob/user) tip_fedora(user) /obj/item/clothing/head/fedora/item_action_slot_check(slot) @@ -488,7 +488,7 @@ ) actions_types = list(/datum/action/item_action/caw) -/obj/item/clothing/head/griffin/attack_self() +/obj/item/clothing/head/griffin/attack_self__legacy__attackchain() caw() /obj/item/clothing/head/griffin/proc/caw() diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 35c40863d2519..1c0f9e83ea2be 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -35,7 +35,7 @@ "Grey" = 'icons/mob/clothing/species/grey/helmet.dmi' ) -/obj/item/clothing/head/welding/attack_self(mob/user) +/obj/item/clothing/head/welding/attack_self__legacy__attackchain(mob/user) weldingvisortoggle(user) /obj/item/clothing/head/welding/flamedecal @@ -80,7 +80,7 @@ if(isturf(location)) location.hotspot_expose(700, 1) -/obj/item/clothing/head/cakehat/attack_self(mob/user) +/obj/item/clothing/head/cakehat/attack_self__legacy__attackchain(mob/user) if(status > 1) return onfire = !onfire @@ -112,7 +112,7 @@ "Vox" = 'icons/mob/clothing/species/vox/head.dmi' ) -/obj/item/clothing/head/ushanka/attack_self(mob/user as mob) +/obj/item/clothing/head/ushanka/attack_self__legacy__attackchain(mob/user as mob) if(icon_state == "ushankadown") icon_state = "ushankaup" item_state = "ushankaup" diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index d995941c91c1e..216a793b30494 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -19,7 +19,7 @@ flipped = FALSE ..() -/obj/item/clothing/head/soft/attack_self(mob/user) +/obj/item/clothing/head/soft/attack_self__legacy__attackchain(mob/user) flip(user) /obj/item/clothing/head/soft/proc/flip(mob/user) diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index cab34dd939f12..14c5b20e33c81 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -19,7 +19,7 @@ "Drask" = 'icons/mob/clothing/species/drask/mask.dmi' ) -/obj/item/clothing/mask/balaclava/attack_self(mob/user) +/obj/item/clothing/mask/balaclava/attack_self__legacy__attackchain(mob/user) adjustmask(user) /obj/item/clothing/mask/luchador diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index b3dbe8df3f804..1c0f6a910ebb4 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -21,7 +21,7 @@ "Plasmaman" = 'icons/mob/clothing/species/plasmaman/mask.dmi' ) -/obj/item/clothing/mask/breath/attack_self(mob/user) +/obj/item/clothing/mask/breath/attack_self__legacy__attackchain(mob/user) adjustmask(user) /obj/item/clothing/mask/breath/AltClick(mob/user) @@ -53,7 +53,7 @@ icon_state = "voxmask2" item_state = "voxmask2" -/obj/item/clothing/mask/breath/vox/attack_self(mob/user) +/obj/item/clothing/mask/breath/vox/attack_self__legacy__attackchain(mob/user) return /obj/item/clothing/mask/breath/vox/AltClick(mob/user) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index db44cb387f9cb..1e3b00c3fea8c 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -48,7 +48,7 @@ "Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/mask.dmi' ) -/obj/item/clothing/mask/gas/welding/attack_self(mob/user) +/obj/item/clothing/mask/gas/welding/attack_self__legacy__attackchain(mob/user) weldingvisortoggle(user) /obj/item/clothing/mask/gas/explorer @@ -73,7 +73,7 @@ /obj/item/clothing/mask/gas/explorer/marines name = "military gas mask" -/obj/item/clothing/mask/gas/explorer/attack_self(mob/user) +/obj/item/clothing/mask/gas/explorer/attack_self__legacy__attackchain(mob/user) adjustmask(user) /obj/item/clothing/mask/gas/explorer/adjustmask(user) @@ -136,7 +136,7 @@ resistance_flags = FLAMMABLE dog_fashion = /datum/dog_fashion/head/clown -/obj/item/clothing/mask/gas/clown_hat/attack_self(mob/living/user) +/obj/item/clothing/mask/gas/clown_hat/attack_self__legacy__attackchain(mob/living/user) var/list/mask_type = list("True Form" = /obj/item/clothing/mask/gas/clown_hat, "The Feminist" = /obj/item/clothing/mask/gas/clown_hat/sexy, "The Madman" = /obj/item/clothing/mask/gas/clown_hat/joker, @@ -234,7 +234,7 @@ /obj/item/clothing/mask/gas/owl_mask/super_hero flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | NODROP -/obj/item/clothing/mask/gas/owl_mask/attack_self() +/obj/item/clothing/mask/gas/owl_mask/attack_self__legacy__attackchain() hoot() /obj/item/clothing/mask/gas/owl_mask/proc/hoot() @@ -364,7 +364,7 @@ else to_chat(user, "It's broken.") -/obj/item/clothing/mask/gas/sechailer/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/mask/gas/sechailer/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/wirecutters)) if(aggressiveness != 5) to_chat(user, "You broke it!") @@ -394,7 +394,7 @@ to_chat(user, "You adjust the restrictor but nothing happens, probably because its broken.") return TRUE -/obj/item/clothing/mask/gas/sechailer/attack_self() +/obj/item/clothing/mask/gas/sechailer/attack_self__legacy__attackchain() halt() /obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob) diff --git a/code/modules/clothing/masks/misc_masks.dm b/code/modules/clothing/masks/misc_masks.dm index b2915e0090cab..b26f2dc893f63 100644 --- a/code/modules/clothing/masks/misc_masks.dm +++ b/code/modules/clothing/masks/misc_masks.dm @@ -113,7 +113,7 @@ origin_tech = "materials=1;engineering=1" materials = list(MAT_METAL=500, MAT_GLASS=50) -/obj/item/clothing/mask/muzzle/safety/shock/attackby(obj/item/W, mob/user, params) +/obj/item/clothing/mask/muzzle/safety/shock/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/assembly/signaler) || istype(W, /obj/item/assembly/voice)) if(istype(trigger, /obj/item/assembly/signaler) || istype(trigger, /obj/item/assembly/voice)) to_chat(user, "Something is already attached to [src].") @@ -198,7 +198,7 @@ ) -/obj/item/clothing/mask/surgical/attack_self(mob/user) +/obj/item/clothing/mask/surgical/attack_self__legacy__attackchain(mob/user) adjustmask(user) /obj/item/clothing/mask/fakemoustache @@ -218,7 +218,7 @@ "Drask" = 'icons/mob/clothing/species/drask/mask.dmi' ) -/obj/item/clothing/mask/fakemoustache/attack_self(mob/user) +/obj/item/clothing/mask/fakemoustache/attack_self__legacy__attackchain(mob/user) pontificate(user) /obj/item/clothing/mask/fakemoustache/item_action_slot_check(slot) @@ -377,7 +377,7 @@ ) actions_types = list(/datum/action/item_action/adjust) -/obj/item/clothing/mask/bandana/attack_self(mob/user) +/obj/item/clothing/mask/bandana/attack_self__legacy__attackchain(mob/user) adjustmask(user) /obj/item/clothing/mask/bandana/red diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index 60f6998a72914..30641f6403dc5 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -73,14 +73,14 @@ QDEL_NULL(shackles) return ..() -/obj/item/clothing/shoes/orange/attack_self(mob/user) +/obj/item/clothing/shoes/orange/attack_self__legacy__attackchain(mob/user) if(shackles) user.put_in_hands(shackles) shackles = null slowdown = SHOES_SLOWDOWN icon_state = "orange" -/obj/item/clothing/shoes/orange/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/shoes/orange/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/restraints/handcuffs) && !shackles) if(user.drop_item()) I.forceMove(src) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 6e36ba0d104f6..c7b38f8995eb9 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -34,7 +34,7 @@ return check_mag_pulse(user, removing = TRUE) -/obj/item/clothing/shoes/magboots/attack_self(mob/user) +/obj/item/clothing/shoes/magboots/attack_self__legacy__attackchain(mob/user) toggle_magpulse(user) /obj/item/clothing/shoes/magboots/proc/toggle_magpulse(mob/user, no_message) @@ -272,7 +272,7 @@ cell = null update_icon() -/obj/item/clothing/shoes/magboots/gravity/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/shoes/magboots/gravity/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stock_parts/cell)) if(cell) to_chat(user, "[src] already has a cell!") diff --git a/code/modules/clothing/spacesuits/alien_suits.dm b/code/modules/clothing/spacesuits/alien_suits.dm index 159b011cc96a6..972b98a5b3ad6 100644 --- a/code/modules/clothing/spacesuits/alien_suits.dm +++ b/code/modules/clothing/spacesuits/alien_suits.dm @@ -214,7 +214,7 @@ "Vox" = 'icons/mob/clothing/species/vox/feet.dmi') multiple_icons = FALSE -/obj/item/clothing/shoes/magboots/vox/attack_self(mob/user) +/obj/item/clothing/shoes/magboots/vox/attack_self__legacy__attackchain(mob/user) if(magpulse) flags &= ~NODROP to_chat(user, "You relax your deathgrip on the flooring.") diff --git a/code/modules/clothing/spacesuits/ert_hardsuits.dm b/code/modules/clothing/spacesuits/ert_hardsuits.dm index db21c8f4efbd9..6a41c7d413753 100644 --- a/code/modules/clothing/spacesuits/ert_hardsuits.dm +++ b/code/modules/clothing/spacesuits/ert_hardsuits.dm @@ -28,7 +28,7 @@ register_camera(wearer) return ..() -/obj/item/clothing/head/helmet/space/hardsuit/ert/attack_self(mob/user) +/obj/item/clothing/head/helmet/space/hardsuit/ert/attack_self__legacy__attackchain(mob/user) if(camera || !has_camera) ..(user) else diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 2043bdd69e061..ac6af273e4eae 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -50,7 +50,7 @@ suit = null return ..() -/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user) +/obj/item/clothing/head/helmet/space/hardsuit/attack_self__legacy__attackchain(mob/user) toggle_light(user) /obj/item/clothing/head/helmet/space/hardsuit/proc/toggle_light(mob/user) @@ -192,11 +192,11 @@ W.suit = src helmet = W -/obj/item/clothing/suit/space/hardsuit/attack_self(mob/user) +/obj/item/clothing/suit/space/hardsuit/attack_self__legacy__attackchain(mob/user) user.changeNext_move(CLICK_CD_MELEE) ..() -/obj/item/clothing/suit/space/hardsuit/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/suit/space/hardsuit/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank/jetpack/suit)) if(jetpack) to_chat(user, "[src] already has a jetpack installed.") @@ -280,7 +280,7 @@ linkedsuit = null return ..() -/obj/item/clothing/head/helmet/space/hardsuit/syndi/attack_self(mob/user) //Toggle Helmet +/obj/item/clothing/head/helmet/space/hardsuit/syndi/attack_self__legacy__attackchain(mob/user) //Toggle Helmet if(!isturf(user.loc)) to_chat(user, "You cannot toggle your helmet while in this [user.loc]!" ) return diff --git a/code/modules/clothing/spacesuits/misc_spacesuits.dm b/code/modules/clothing/spacesuits/misc_spacesuits.dm index c07d9b4729116..c918e52c86321 100644 --- a/code/modules/clothing/spacesuits/misc_spacesuits.dm +++ b/code/modules/clothing/spacesuits/misc_spacesuits.dm @@ -124,7 +124,7 @@ flags_cover = HEADCOVERSEYES dog_fashion = /datum/dog_fashion/head/santa -/obj/item/clothing/head/helmet/space/santahat/attack_self(mob/user as mob) +/obj/item/clothing/head/helmet/space/santahat/attack_self__legacy__attackchain(mob/user as mob) if(src.icon_state == "santahat") src.icon_state = "santahat_beard" src.item_state = "santahat_beard" diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 26b09df981fa2..91cfe6e8e4cd6 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -66,7 +66,7 @@ if(!up) . += visor_icon -/obj/item/clothing/head/helmet/space/plasmaman/attack_self(mob/user) +/obj/item/clothing/head/helmet/space/plasmaman/attack_self__legacy__attackchain(mob/user) toggle_light(user) /obj/item/clothing/head/helmet/space/plasmaman/proc/toggle_light(mob/user, update_light) diff --git a/code/modules/clothing/suits/armor_suits.dm b/code/modules/clothing/suits/armor_suits.dm index 1657f320aa6a1..4cc5f9e29376f 100644 --- a/code/modules/clothing/suits/armor_suits.dm +++ b/code/modules/clothing/suits/armor_suits.dm @@ -52,7 +52,7 @@ item_state = "armor" var/obj/item/clothing/accessory/holobadge/attached_badge -/obj/item/clothing/suit/armor/vest/security/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/suit/armor/vest/security/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/clothing/accessory/holobadge)) if(user.unEquip(I)) add_fingerprint(user) @@ -67,7 +67,7 @@ return ..() -/obj/item/clothing/suit/armor/vest/security/attack_self(mob/user) +/obj/item/clothing/suit/armor/vest/security/attack_self__legacy__attackchain(mob/user) if(attached_badge) add_fingerprint(user) user.put_in_hands(attached_badge) @@ -436,7 +436,7 @@ . += "Outside of the strange effects caused by the anomaly core, the armour provides no protection against conventional attacks. \ Nanotrasen cannot be held liable for injury and/or death due to misuse or proper operation of the reactive armour." -/obj/item/clothing/suit/armor/reactive/attack_self(mob/user) +/obj/item/clothing/suit/armor/reactive/attack_self__legacy__attackchain(mob/user) active = !(active) if(disabled) to_chat(user, "[src] is disabled and rebooting!") diff --git a/code/modules/clothing/suits/misc_suits.dm b/code/modules/clothing/suits/misc_suits.dm index 1701f6dde2c72..09a6e5f11df44 100644 --- a/code/modules/clothing/suits/misc_suits.dm +++ b/code/modules/clothing/suits/misc_suits.dm @@ -1151,7 +1151,7 @@ icon_state = "griffin_wings" item_state = "griffin_wings" -/obj/item/clothing/suit/toggle/attack_self() +/obj/item/clothing/suit/toggle/attack_self__legacy__attackchain() if(icon_state == initial(icon_state)) icon_state = icon_state + "_t" item_state = icon_state + "_t" @@ -1385,7 +1385,7 @@ to_chat(L, "You are now wearing \a [choice]. Allahu Akbar!") qdel(src) -/obj/item/clothing/suit/hooded/abaya/attack_self(mob/user) +/obj/item/clothing/suit/hooded/abaya/attack_self__legacy__attackchain(mob/user) . = ..() reskin_abaya(user) diff --git a/code/modules/clothing/suits/suit_storage.dm b/code/modules/clothing/suits/suit_storage.dm index b932d45d69331..2e1839c32b760 100644 --- a/code/modules/clothing/suits/suit_storage.dm +++ b/code/modules/clothing/suits/suit_storage.dm @@ -44,9 +44,9 @@ pockets.show_to(user) return ..() -/obj/item/clothing/suit/storage/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/suit/storage/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() - return pockets?.attackby(W, user, params) + return pockets?.attackby__legacy__attackchain(W, user, params) /obj/item/clothing/suit/storage/emp_act(severity) ..() diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 0e55e6ae647cb..e5e8813818d18 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -12,7 +12,7 @@ if(ishuman(helmet.loc)) var/mob/living/carbon/H = helmet.loc if(helmet.on) - helmet.attack_self(H) + helmet.attack_self__legacy__attackchain(H) H.unEquip(helmet, TRUE) helmet.forceMove(src) H.update_inv_wear_suit() diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index b99ea6d18af9c..6a4511534f1d8 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -222,7 +222,7 @@ resistance_flags = FIRE_PROOF | ACID_PROOF magical = TRUE -/obj/item/clothing/head/helmet/space/hardsuit/wizard/attack_self(mob/user) +/obj/item/clothing/head/helmet/space/hardsuit/wizard/attack_self__legacy__attackchain(mob/user) return /obj/item/clothing/head/helmet/space/hardsuit/wizard/arch diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index b1a6cf91d0403..e13a51c287b2a 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -72,7 +72,7 @@ user.put_in_hands(src) add_fingerprint(user) -/obj/item/clothing/accessory/attack(mob/living/carbon/human/H, mob/living/user) +/obj/item/clothing/accessory/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user) // This code lets you put accessories on other people by attacking their sprite with the accessory if(istype(H) && !ismonkeybasic(H)) //Monkeys are a snowflake because you can't remove accessories once added if(H.wear_suit && H.wear_suit.flags_inv & HIDEJUMPSUIT) @@ -97,7 +97,7 @@ return //default attackby behaviour -/obj/item/clothing/accessory/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/accessory/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() //default attack_hand behaviour @@ -151,7 +151,7 @@ icon_state = "stethoscope" item_color = "stethoscope" -/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) +/obj/item/clothing/accessory/stethoscope/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user) if(!ishuman(M) || !isliving(user)) return ..(M, user) @@ -220,7 +220,7 @@ if(channel) . += "The tiny radio inside seems to be [try_announce ? "active" : "inactive"]." -/obj/item/clothing/accessory/medal/attack_self(mob/user) +/obj/item/clothing/accessory/medal/attack_self__legacy__attackchain(mob/user) . = ..() if(channel) try_announce = !try_announce @@ -421,7 +421,7 @@ icon_state = "holobadge-cord" item_color = "holobadge-cord" -/obj/item/clothing/accessory/holobadge/attack_self(mob/user) +/obj/item/clothing/accessory/holobadge/attack_self__legacy__attackchain(mob/user) if(!stored_name) to_chat(user, "Waving around a badge before swiping an ID would be pretty pointless.") return @@ -429,7 +429,7 @@ user.visible_message("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.", "You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") -/obj/item/clothing/accessory/holobadge/attackby(obj/item/I, mob/user, params) +/obj/item/clothing/accessory/holobadge/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) var/obj/item/card/id/id_card = null @@ -458,7 +458,7 @@ to_chat(user, "You swipe the card and crack the holobadge security checks.") return TRUE -/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/H, mob/living/user) +/obj/item/clothing/accessory/holobadge/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user) if(H != user) user.visible_message("[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently.", "You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are THE LAW!") @@ -478,12 +478,12 @@ var/cached_bubble_icon = null var/what_you_are = "THE LAW" -/obj/item/clothing/accessory/legal_badge/attack_self(mob/user) +/obj/item/clothing/accessory/legal_badge/attack_self__legacy__attackchain(mob/user) if(prob(1)) user.say("The testimony contradicts the evidence!") user.visible_message("[user] shows [user.p_their()] [name].", "You show your [name].") -/obj/item/clothing/accessory/legal_badge/attack(mob/living/carbon/human/H, mob/living/user) +/obj/item/clothing/accessory/legal_badge/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user) if(H != user) user.visible_message("[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently.", "You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are [what_you_are]!") @@ -652,7 +652,7 @@ return ..() -/obj/item/clothing/accessory/necklace/locket/attack_self(mob/user as mob) +/obj/item/clothing/accessory/necklace/locket/attack_self__legacy__attackchain(mob/user as mob) if(!base_icon) base_icon = icon_state @@ -671,7 +671,7 @@ else icon_state = "[base_icon]" -/obj/item/clothing/accessory/necklace/locket/attackby(obj/item/O as obj, mob/user as mob) +/obj/item/clothing/accessory/necklace/locket/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob) if(!open) to_chat(user, "You have to open it first.") return @@ -865,7 +865,7 @@ var/image/pin_icon = image(icon, icon_state = flag_types[current_pin]) flag_icons[current_pin] = pin_icon -/obj/item/clothing/accessory/pin/pride/attack_self(mob/user) +/obj/item/clothing/accessory/pin/pride/attack_self__legacy__attackchain(mob/user) . = ..() var/chosen_pin = show_radial_menu(user, src, flag_icons, require_near = TRUE) if(!chosen_pin) diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index cde430b1edc97..0c6b5722a9831 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -24,7 +24,7 @@ else return TRUE -/obj/item/clothing/accessory/holster/attack_self() +/obj/item/clothing/accessory/holster/attack_self__legacy__attackchain() var/holsteritem = usr.get_active_hand() if(!holstered) holster(holsteritem, usr) @@ -80,7 +80,7 @@ ..(user) -/obj/item/clothing/accessory/holster/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/accessory/holster/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) holster(W, user) /obj/item/clothing/accessory/holster/emp_act(severity) diff --git a/code/modules/clothing/under/accessories/storage_accessories.dm b/code/modules/clothing/under/accessories/storage_accessories.dm index d295056c5b8ba..aa8e75f392e79 100644 --- a/code/modules/clothing/under/accessories/storage_accessories.dm +++ b/code/modules/clothing/under/accessories/storage_accessories.dm @@ -33,8 +33,8 @@ if(hold.handle_mousedrop(usr, over_object)) ..(over_object) -/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob, params) - return hold.attackby(W, user, params) +/obj/item/clothing/accessory/storage/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) + return hold.attackby__legacy__attackchain(W, user, params) /obj/item/clothing/accessory/storage/emp_act(severity) ..() @@ -62,7 +62,7 @@ L += G.gift:return_inv() return L -/obj/item/clothing/accessory/storage/attack_self(mob/user as mob) +/obj/item/clothing/accessory/storage/attack_self__legacy__attackchain(mob/user as mob) if(has_suit) //if we are part of a suit hold.open(user) else diff --git a/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm b/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm index 1669a3afcbcee..57126c15280d7 100644 --- a/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm +++ b/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm @@ -39,7 +39,7 @@ new /obj/effect/particle_effect/water(get_turf(H)) return FALSE -/obj/item/clothing/under/plasmaman/attackby(obj/item/E, mob/user, params) +/obj/item/clothing/under/plasmaman/attackby__legacy__attackchain(obj/item/E, mob/user, params) if(istype(E, /obj/item/extinguisher_refill)) if(extinguishes_left == 5) to_chat(user, "The inbuilt extinguisher is full.") diff --git a/code/modules/crafting/guncrafting.dm b/code/modules/crafting/guncrafting.dm index d1ce20522c76a..ed1748695ad04 100644 --- a/code/modules/crafting/guncrafting.dm +++ b/code/modules/crafting/guncrafting.dm @@ -120,7 +120,7 @@ name = "sol gov universal self assembling gun parts kit" icon_state = "solcase" //Ikea reference pending. -/obj/item/weaponcrafting/gunkit/universal_gun_kit/afterattack(obj/item/weaponcrafting/gunkit/gunkit_to_use, mob/user, flag) +/obj/item/weaponcrafting/gunkit/universal_gun_kit/afterattack__legacy__attackchain(obj/item/weaponcrafting/gunkit/gunkit_to_use, mob/user, flag) if(!istype(gunkit_to_use)) return if(!gunkit_to_use.outcome) @@ -146,7 +146,7 @@ // CRAFTING // -/obj/item/weaponcrafting/receiver/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weaponcrafting/receiver/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W,/obj/item/pipe)) to_chat(user, "You attach the shotgun barrel to the receiver. The pins seem loose.") var/obj/item/weaponcrafting/ishotgunconstruction/I = new /obj/item/weaponcrafting/ishotgunconstruction @@ -178,7 +178,7 @@ icon = 'icons/obj/improvised.dmi' icon_state = "ishotgunstep1" -/obj/item/weaponcrafting/ishotgunconstruction2/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weaponcrafting/ishotgunconstruction2/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W,/obj/item/weaponcrafting/stock)) to_chat(user, "You attach the stock to the receiver-barrel assembly.") var/obj/item/weaponcrafting/ishotgunconstruction3/I = new /obj/item/weaponcrafting/ishotgunconstruction3 @@ -194,7 +194,7 @@ icon = 'icons/obj/improvised.dmi' icon_state = "ishotgunstep2" -/obj/item/weaponcrafting/ishotgunconstruction3/attackby(obj/item/I, mob/user as mob, params) +/obj/item/weaponcrafting/ishotgunconstruction3/attackby__legacy__attackchain(obj/item/I, mob/user as mob, params) ..() if(istype(I, /obj/item/stack/package_wrap)) var/obj/item/stack/package_wrap/C = I diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 1f31b1d41170b..d3e4b0bd5b19f 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -33,7 +33,7 @@ toolspeed = 1 usesound = 'sound/items/welder2.ogg' -/obj/item/fluff/tattoo_gun/attack(mob/living/carbon/M as mob, mob/user as mob) +/obj/item/fluff/tattoo_gun/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/user as mob) if(user.a_intent == INTENT_HARM) user.visible_message("[user] stabs [M] with [src]!", "You stab [M] with [src]!") to_chat(M, "[user] stabs you with [src]!
You feel a tiny prick!") @@ -98,7 +98,7 @@ tattoo_g = 138 tattoo_b = 176 -/obj/item/fluff/tattoo_gun/elliot_cybernetic_tat/attack_self(mob/user as mob) +/obj/item/fluff/tattoo_gun/elliot_cybernetic_tat/attack_self__legacy__attackchain(mob/user as mob) if(!used) var/ink_color = tgui_input_color(user, "Please select an ink color.", "Tattoo Ink Color", rgb(tattoo_r, tattoo_g, tattoo_b)) if(!isnull(ink_color) && !(user.incapacitated() || used)) @@ -120,7 +120,7 @@ icon_state = "bird_orb" icon = 'icons/obj/custom_items.dmi' -/obj/item/fluff/bird_painter/attack_self(mob/user) +/obj/item/fluff/bird_painter/attack_self__legacy__attackchain(mob/user) if(ishuman(user)) var/mob/living/carbon/human/H = user H.s_tone = -115 @@ -194,7 +194,7 @@ desc = "An assorted set of exchangable parts for a wheelchair." icon_state = "modkit" -/obj/item/fluff/rapid_wheelchair_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/rapid_wheelchair_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -255,7 +255,7 @@ item_state = "dogwhistle" force = 2 -/obj/item/fluff/dogwhistle/attack_self(mob/user) +/obj/item/fluff/dogwhistle/attack_self__legacy__attackchain(mob/user) user.visible_message("[user] blows on the whistle, but no sound comes out.", "You blow on the whistle, but don't hear anything.") addtimer(CALLBACK(src, PROC_REF(summon_sax), user), 20) @@ -300,7 +300,7 @@ throwforce = 0 w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/wingler_comb/attack_self(mob/user) +/obj/item/fluff/wingler_comb/attack_self__legacy__attackchain(mob/user) if(used) return @@ -319,7 +319,7 @@ icon_state = "modkit" w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/desolate_coat_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/desolate_coat_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -351,7 +351,7 @@ icon_state = "modkit" w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/fei_gasmask_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/fei_gasmask_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -379,7 +379,7 @@ icon_state = "scifikit" w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/desolate_baton_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/desolate_baton_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -407,7 +407,7 @@ force = 0 throwforce = 0 -/obj/item/fluff/cardgage_helmet_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/cardgage_helmet_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -430,7 +430,7 @@ force = 0 throwforce = 0 -/obj/item/fluff/merchant_sallet_modkit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/merchant_sallet_modkit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -474,7 +474,7 @@ force = 0 throwforce = 0 -/obj/item/fluff/k3_webbing_modkit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/k3_webbing_modkit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return @@ -498,7 +498,7 @@ icon_state = "modkit" w_class = WEIGHT_CLASS_SMALL /* -/obj/item/fluff/pyro_wintersec_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/pyro_wintersec_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return var/mob/living/carbon/human/H = user @@ -552,7 +552,7 @@ icon_state = "modkit" w_class = WEIGHT_CLASS_SMALL /* -/obj/item/fluff/sylus_conversion_kit/afterattack(atom/target, mob/user, proximity) +/obj/item/fluff/sylus_conversion_kit/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) return var/mob/living/carbon/human/H = user @@ -707,7 +707,7 @@ flags_inv = HIDEEYES|HIDEMASK|HIDEFACE|HIDEEARS var/state = "Soldier Up" -/obj/item/clothing/head/helmet/fluff/merchant_sallet/attack_self(mob/user) +/obj/item/clothing/head/helmet/fluff/merchant_sallet/attack_self__legacy__attackchain(mob/user) if(!user.incapacitated() && (world.time > cooldown + toggle_cooldown) && Adjacent(user)) var/list/options = list() options["Soldier Up"] = list( @@ -778,7 +778,7 @@ actions_types = list(/datum/action/item_action/openclose) adjust_flavour = "unbutton" -/obj/item/clothing/suit/jacket/miljacket/patch/attack_self(mob/user) +/obj/item/clothing/suit/jacket/miljacket/patch/attack_self__legacy__attackchain(mob/user) var/list/options = list() options["purple"] = "shazjacket_purple" options["purple light"] = "shazjacket_purple_light" @@ -1067,7 +1067,7 @@ throwforce = 0 w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/pinapplehairgel/attack_self(mob/user) +/obj/item/fluff/pinapplehairgel/attack_self__legacy__attackchain(mob/user) var/mob/living/carbon/human/target = user if(!istype(target) || !isslimeperson(target)) return @@ -1502,7 +1502,7 @@ icon_state = "classic_witch" item_state = "classic_witch" -/obj/item/clothing/head/wizard/fake/fluff/dreamy/attack_self(mob/user) +/obj/item/clothing/head/wizard/fake/fluff/dreamy/attack_self__legacy__attackchain(mob/user) var/list/options = list() options["Classic"] = "classic_witch" options["Good"] = "good_witch" @@ -1539,7 +1539,7 @@ throwforce = 0 w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/zekemirror/attack_self(mob/user) +/obj/item/fluff/zekemirror/attack_self__legacy__attackchain(mob/user) var/mob/living/carbon/human/target = user if(!istype(target) || !isskrell(target)) // It'd be strange to see other races with head tendrils. return @@ -1597,7 +1597,7 @@ icon_state = "modkit" w_class = WEIGHT_CLASS_SMALL -/obj/item/fluff/lighty_plasman_modkit/afterattack(atom/target, mob/user, proximity, params) +/obj/item/fluff/lighty_plasman_modkit/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params) if(!proximity || !ishuman(user) || user.incapacitated() || !isitem(target)) return var/mob/living/carbon/human/H = user @@ -1777,7 +1777,7 @@ /obj/item/clothing/gloves/ring/fluff/update_icon_state() return -/obj/item/clothing/gloves/ring/fluff/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/clothing/gloves/ring/fluff/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) return diff --git a/code/modules/detective_work/evidence.dm b/code/modules/detective_work/evidence.dm index a8b7d04782514..d8840f8cdfd19 100644 --- a/code/modules/detective_work/evidence.dm +++ b/code/modules/detective_work/evidence.dm @@ -8,12 +8,12 @@ item_state = "" w_class = WEIGHT_CLASS_TINY -/obj/item/evidencebag/afterattack(obj/item/I, mob/user,proximity) +/obj/item/evidencebag/afterattack__legacy__attackchain(obj/item/I, mob/user,proximity) if(!proximity || loc == I) return evidencebagEquip(I, user) -/obj/item/evidencebag/attackby(obj/item/I, mob/user, params) +/obj/item/evidencebag/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(evidencebagEquip(I, user)) return 1 @@ -65,7 +65,7 @@ w_class = I.w_class return 1 -/obj/item/evidencebag/attack_self(mob/user) +/obj/item/evidencebag/attack_self__legacy__attackchain(mob/user) if(length(contents)) var/obj/item/I = contents[1] user.visible_message("[user] takes [I] out of [src].", "You take [I] out of [src].",\ diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index 468eb94e3221a..66afdc8379653 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -13,7 +13,7 @@ blocks_emissive = EMISSIVE_BLOCK_GENERIC var/wipespeed = 30 -/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) +/obj/item/reagent_containers/glass/rag/attack__legacy__attackchain(atom/target as obj|turf|area, mob/user as mob , flag) if(ismob(target) && target.reagents && reagents.total_volume) user.visible_message("[user] has smothered [target] with [src]!", "You smother [target] with [src]!", "You hear some struggling and muffled cries of surprise") src.reagents.reaction(target, REAGENT_TOUCH) @@ -22,7 +22,7 @@ else ..() -/obj/item/reagent_containers/glass/rag/afterattack(atom/target, mob/user, proximity) +/obj/item/reagent_containers/glass/rag/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity || ishuman(target)) //Human check so we don't clean the person we're trying to ether return target.cleaning_act(user, src, wipespeed) diff --git a/code/modules/detective_work/scanner.dm b/code/modules/detective_work/scanner.dm index 6bb25918fee25..a79a11bdcd5ad 100644 --- a/code/modules/detective_work/scanner.dm +++ b/code/modules/detective_work/scanner.dm @@ -16,7 +16,7 @@ var/list/log = list() actions_types = list(/datum/action/item_action/print_forensic_report, /datum/action/item_action/clear_records) -/obj/item/detective_scanner/attack_self(mob/user) +/obj/item/detective_scanner/attack_self__legacy__attackchain(mob/user) var/search = tgui_input_text(user, "Enter name, fingerprint or blood DNA.", "Find record") if(!search || user.stat || user.incapacitated()) @@ -100,10 +100,10 @@ to_chat(usr, "The scanner has no logs or is in use.") -/obj/item/detective_scanner/attack() +/obj/item/detective_scanner/attack__legacy__attackchain() return -/obj/item/detective_scanner/afterattack(atom/A, mob/user) +/obj/item/detective_scanner/afterattack__legacy__attackchain(atom/A, mob/user) scan(A, user) /obj/item/detective_scanner/proc/scan(atom/A, mob/user) diff --git a/code/modules/economy/economy_machinery/account_terminal.dm b/code/modules/economy/economy_machinery/account_terminal.dm index 631b3abdb0556..f3576f42edff2 100644 --- a/code/modules/economy/economy_machinery/account_terminal.dm +++ b/code/modules/economy/economy_machinery/account_terminal.dm @@ -24,7 +24,7 @@ /obj/machinery/computer/account_database/proc/reconnect_database() account_db = GLOB.station_money_database -/obj/machinery/computer/account_database/attackby(obj/O, mob/user, params) +/obj/machinery/computer/account_database/attackby__legacy__attackchain(obj/O, mob/user, params) if(ui_login_attackby(O, user)) return return ..() diff --git a/code/modules/economy/economy_machinery/atm.dm b/code/modules/economy/economy_machinery/atm.dm index 87b551ec2d54d..3481fe0289534 100644 --- a/code/modules/economy/economy_machinery/atm.dm +++ b/code/modules/economy/economy_machinery/atm.dm @@ -77,7 +77,7 @@ /obj/machinery/economy/atm/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/economy/atm/attackby(obj/item/I, mob/user) +/obj/machinery/economy/atm/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/card/id)) if(has_power()) handle_id_insert(I, user) diff --git a/code/modules/economy/economy_machinery/eftpos.dm b/code/modules/economy/economy_machinery/eftpos.dm index 2ff07deab52a3..c28cda4a1e97f 100644 --- a/code/modules/economy/economy_machinery/eftpos.dm +++ b/code/modules/economy/economy_machinery/eftpos.dm @@ -36,10 +36,10 @@ /obj/item/eftpos/proc/reconnect_database() account_database = GLOB.station_money_database -/obj/item/eftpos/attack_self(mob/user) +/obj/item/eftpos/attack_self__legacy__attackchain(mob/user) ui_interact(user) -/obj/item/eftpos/attackby(obj/O, mob/user, params) +/obj/item/eftpos/attackby__legacy__attackchain(obj/O, mob/user, params) if(istype(O, /obj/item/card/id)) //attempt to connect to a new db, and if that doesn't work then fail if(!account_database) @@ -264,7 +264,7 @@ /obj/item/eftpos/register/ui_state(mob/user) return GLOB.human_adjacent_state -/obj/item/eftpos/register/attack_self(mob/user) +/obj/item/eftpos/register/attack_self__legacy__attackchain(mob/user) to_chat(user, "[src] has to be set down and secured to be used.") /obj/item/eftpos/register/check_user_position(mob/user) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 95f6203b20562..6d0d6ec1c19e7 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -87,7 +87,7 @@ //All of this shit is useless for vines -/turf/simulated/floor/vines/attackby() +/turf/simulated/floor/vines/attackby__legacy__attackchain() return /turf/simulated/floor/vines/burn_tile() @@ -477,7 +477,7 @@ eater.say("Nom") wither() -/obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user) +/obj/structure/spacevine/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) var/damage_dealt = I.force if(istype(I, /obj/item/scythe)) var/obj/item/scythe/S = I diff --git a/code/modules/fish/fish_items.dm b/code/modules/fish/fish_items.dm index fe31a78edeb67..ad47d59cf3d36 100644 --- a/code/modules/fish/fish_items.dm +++ b/code/modules/fish/fish_items.dm @@ -133,7 +133,7 @@ hitsound = 'sound/weapons/bite.ogg' force = 3 -/obj/item/fish/shark/attackby(obj/item/O, mob/user as mob) +/obj/item/fish/shark/attackby__legacy__attackchain(obj/item/O, mob/user as mob) if(istype(O, /obj/item/wirecutters)) to_chat(user, "You rip out the teeth of \the [src.name]!") new /obj/item/fish/toothless_shark(get_turf(src)) @@ -167,7 +167,7 @@ desc = "Apparently, catfish don't purr like you might have expected them to. Such a confusing name!" icon_state = "catfish" -/obj/item/fish/catfish/attackby(obj/item/O, mob/user as mob) +/obj/item/fish/catfish/attackby__legacy__attackchain(obj/item/O, mob/user as mob) if(O.sharp) to_chat(user, "You carefully clean and gut \the [src.name].") new /obj/item/food/catfishmeat(get_turf(src)) @@ -186,7 +186,7 @@ desc = "The second-favorite food of Space Bears, right behind crew members." icon_state = "salmon" -/obj/item/fish/salmon/attackby(obj/item/O, mob/user as mob) +/obj/item/fish/salmon/attackby__legacy__attackchain(obj/item/O, mob/user as mob) if(O.sharp) to_chat(user, "You carefully clean and gut \the [src.name].") new /obj/item/food/salmonmeat(get_turf(src)) @@ -202,7 +202,7 @@ hitsound = 'sound/weapons/bite.ogg' force = 3 -/obj/item/fish/babycarp/attackby(obj/item/O, mob/user as mob) +/obj/item/fish/babycarp/attackby__legacy__attackchain(obj/item/O, mob/user as mob) if(O.sharp) to_chat(user, "You carefully clean and gut \the [src.name].") new /obj/item/food/carpmeat(get_turf(src)) //just one fillet; this is a baby, afterall. diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 7f83edf497c96..a5fb9ffed0d92 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -604,7 +604,7 @@ new /obj/item/stack/sheet/glass(get_turf(src), shard_count + 1) //Produce the appropriate number of glass sheets, in a single stack qdel(src) -/obj/machinery/fishtank/attackby(obj/item/O, mob/user) +/obj/machinery/fishtank/attackby__legacy__attackchain(obj/item/O, mob/user) //Open reagent containers add and remove water if(O.is_drainable()) //Containers with any reagents will get dumped in diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index c4b6911633abd..9d8b4b8fd394e 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -40,7 +40,7 @@ else qdel(recipe) -/obj/machinery/bottler/attackby(obj/item/O, mob/user, params) +/obj/machinery/bottler/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(!user.canUnEquip(O, 0)) to_chat(user, "[O] is stuck to your hand, you can't seem to put it down!") return 0 diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index cb932b6880c00..ea49443bbc96c 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -42,7 +42,7 @@ qdel(src) -/obj/item/reagent_containers/drinks/bottle/attack(mob/living/target, mob/living/user) +/obj/item/reagent_containers/drinks/bottle/attack__legacy__attackchain(mob/living/target, mob/living/user) if(!target) return @@ -378,7 +378,7 @@ hotspot.temperature = 1000 hotspot.recolor() -/obj/item/reagent_containers/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/drinks/bottle/molotov/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.get_heat() && !active) active = TRUE var/turf/bombturf = get_turf(src) @@ -402,7 +402,7 @@ A.fire_act() qdel(src) -/obj/item/reagent_containers/drinks/bottle/molotov/attack_self(mob/user) +/obj/item/reagent_containers/drinks/bottle/molotov/attack_self__legacy__attackchain(mob/user) if(active) if(!is_glass) to_chat(user, "The flame's spread too far on it!") diff --git a/code/modules/food_and_drinks/drinks/drinks/cans.dm b/code/modules/food_and_drinks/drinks/drinks/cans.dm index 8119ee9ee2584..a3d535519dce9 100644 --- a/code/modules/food_and_drinks/drinks/drinks/cans.dm +++ b/code/modules/food_and_drinks/drinks/drinks/cans.dm @@ -15,7 +15,7 @@ else . += "Ctrl-click to shake it up!" -/obj/item/reagent_containers/drinks/cans/attack_self(mob/user) +/obj/item/reagent_containers/drinks/cans/attack_self__legacy__attackchain(mob/user) if(can_opened) return ..() if(times_shaken) @@ -67,7 +67,7 @@ else return ..() -/obj/item/reagent_containers/drinks/cans/attack(mob/M, mob/user, proximity) +/obj/item/reagent_containers/drinks/cans/attack__legacy__attackchain(mob/M, mob/user, proximity) if(!can_opened) to_chat(user, "You need to open the drink!") return @@ -77,15 +77,15 @@ return return ..() -/obj/item/reagent_containers/drinks/cans/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/drinks/cans/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag/trash/cyborg)) user.visible_message("[user] crushes [src] in [user.p_their()] trash compactor.", "You crush [src] in your trash compactor.") var/obj/can = crush(user) - can.attackby(I, user, params) + can.attackby__legacy__attackchain(I, user, params) return TRUE ..() -/obj/item/reagent_containers/drinks/cans/afterattack(obj/target, mob/user, proximity) +/obj/item/reagent_containers/drinks/cans/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if(!proximity) return if(istype(target, /obj/structure/reagent_dispensers) && !can_opened) diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 3b56fbaae3d6d..c94e7b27f18e5 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -15,7 +15,7 @@ drop_sound = 'sound/items/handling/drinkglass_drop.ogg' pickup_sound = 'sound/items/handling/drinkglass_pickup.ogg' -/obj/item/reagent_containers/drinks/drinkingglass/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/drinks/drinkingglass/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/food/egg)) //breaking eggs var/obj/item/food/egg/E = I if(reagents) diff --git a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm index 5947abb4a5271..47e131a6552d3 100644 --- a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm @@ -90,13 +90,13 @@ /obj/item/reagent_containers/drinks/drinkingglass/shotglass/burn() //Let's override fire deleting the reagents inside the shot return -/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attack(mob/living/carbon/human/user) +/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attack__legacy__attackchain(mob/living/carbon/human/user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50) && (resistance_flags & ON_FIRE)) clumsilyDrink(user) else ..() -/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attackby(obj/item/W) +/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attackby__legacy__attackchain(obj/item/W) ..() if(W.get_heat()) fire_act() @@ -104,7 +104,7 @@ /obj/item/reagent_containers/drinks/drinkingglass/shotglass/attack_hand(mob/user, pickupfireoverride = TRUE) ..() -/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attack_self(mob/living/carbon/human/user) +/obj/item/reagent_containers/drinks/drinkingglass/shotglass/attack_self__legacy__attackchain(mob/living/carbon/human/user) ..() if(!(resistance_flags & ON_FIRE)) return diff --git a/code/modules/food_and_drinks/drinks/drinks_base.dm b/code/modules/food_and_drinks/drinks/drinks_base.dm index 4574e56c98406..161865a7fcd2c 100644 --- a/code/modules/food_and_drinks/drinks/drinks_base.dm +++ b/code/modules/food_and_drinks/drinks/drinks_base.dm @@ -14,10 +14,10 @@ var/consume_sound = 'sound/items/drink.ogg' var/chugging = FALSE -/obj/item/reagent_containers/drinks/attack_self(mob/user) +/obj/item/reagent_containers/drinks/attack_self__legacy__attackchain(mob/user) return -/obj/item/reagent_containers/drinks/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/drinks/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(!reagents || !reagents.total_volume) to_chat(user, "None of [src] left, oh no!") return FALSE @@ -54,7 +54,7 @@ break chugging = FALSE -/obj/item/reagent_containers/drinks/afterattack(obj/target, mob/user, proximity) +/obj/item/reagent_containers/drinks/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if(!proximity) return if(chugging) @@ -277,7 +277,7 @@ . = ..() reagents.set_reacting(FALSE) -/obj/item/reagent_containers/drinks/shaker/attack_self(mob/user) +/obj/item/reagent_containers/drinks/shaker/attack_self__legacy__attackchain(mob/user) if(!reagents.total_volume) to_chat(user, "You won't shake an empty shaker now, will you?") return diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index bb86363c0b290..b0371fbacd55d 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -39,10 +39,10 @@ "rice" = list("rice", "rice sack", "A big bag of rice. Good for cooking!")) var/originalname = "condiment" //Can't use initial(name) for this. This stores the name set by condimasters. -/obj/item/reagent_containers/condiment/attack_self(mob/user) +/obj/item/reagent_containers/condiment/attack_self__legacy__attackchain(mob/user) return -/obj/item/reagent_containers/condiment/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/condiment/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(!reagents || !reagents.total_volume) to_chat(user, "None of [src] left, oh no!") @@ -69,7 +69,7 @@ playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) return 1 -/obj/item/reagent_containers/condiment/afterattack(obj/target, mob/user , proximity) +/obj/item/reagent_containers/condiment/afterattack__legacy__attackchain(obj/target, mob/user , proximity) if(!proximity) return if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. @@ -319,10 +319,10 @@ "sugar" = list("condi_sugar", "Sugar", "Tasty spacey sugar!"), "vinegar" =list("condi_mixed", "vinegar", "Perfect for chips, if you're feeling Space British.")) -/obj/item/reagent_containers/condiment/pack/attack(mob/M, mob/user, def_zone) //Can't feed these to people directly. +/obj/item/reagent_containers/condiment/pack/attack__legacy__attackchain(mob/M, mob/user, def_zone) //Can't feed these to people directly. return -/obj/item/reagent_containers/condiment/pack/afterattack(obj/target, mob/user , proximity) +/obj/item/reagent_containers/condiment/pack/afterattack__legacy__attackchain(obj/target, mob/user , proximity) if(!proximity) return //You can tear the bag open above food to put the condiments on it, obviously. diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 8546d186f4b74..d667e8827d587 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -6,33 +6,33 @@ do {\ qdel(src);\ } while(FALSE) -/obj/item/food/breadslice/attackby(obj/item/W, mob/user, params) +/obj/item/food/breadslice/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/sandwich) return ..() -/obj/item/food/bun/attackby(obj/item/W, mob/user, params) +/obj/item/food/bun/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/burger) return ..() -/obj/item/food/sliceable/flatdough/attackby(obj/item/W, mob/user, params) +/obj/item/food/sliceable/flatdough/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/pizza) return ..() -/obj/item/food/boiledspaghetti/attackby(obj/item/W, mob/user, params) +/obj/item/food/boiledspaghetti/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/pasta) return ..() -/obj/item/trash/plate/attackby(obj/item/W, mob/user, params) +/obj/item/trash/plate/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/fullycustom) return @@ -46,10 +46,10 @@ do {\ icon = 'icons/obj/food/custom.dmi' icon_state = "soup" -/obj/item/trash/bowl/attackby(obj/item/I, mob/user, params) +/obj/item/trash/bowl/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/food) && !(I.flags & NODROP)) var/obj/item/food/customizable/soup/S = new(get_turf(user)) - S.attackby(I, user, params) + S.attackby__legacy__attackchain(I, user, params) qdel(src) else ..() @@ -326,7 +326,7 @@ do {\ tastes = list("bun" = 4) -/obj/item/food/customizable/attackby(obj/item/I, mob/user, params) +/obj/item/food/customizable/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(istype(I, /obj/item/kitchen/utensil) || is_pen(I)) diff --git a/code/modules/food_and_drinks/food/foods/ingredients.dm b/code/modules/food_and_drinks/food/foods/ingredients.dm index fda18eae17b72..c30770175fc34 100644 --- a/code/modules/food_and_drinks/food/foods/ingredients.dm +++ b/code/modules/food_and_drinks/food/foods/ingredients.dm @@ -125,7 +125,7 @@ tastes = list("dough" = 1) // Dough + rolling pin = flat dough -/obj/item/food/dough/attackby(obj/item/I, mob/user, params) +/obj/item/food/dough/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/kitchen/rollingpin)) if(isturf(loc)) new /obj/item/food/sliceable/flatdough(loc) @@ -180,7 +180,7 @@ icon_state = "cookiedough" // Dough + rolling pin = flat cookie dough // Flat dough + circular cutter = unbaked cookies -/obj/item/food/cookiedough/attackby(obj/item/I, mob/user, params) +/obj/item/food/cookiedough/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/kitchen/rollingpin) && !flat) if(isturf(loc)) to_chat(user, "You flatten [src].") @@ -206,7 +206,7 @@ icon_state = "unbaked_cookies" list_reagents = list("nutriment" = 5, "sugar" = 5) -/obj/item/food/rawcookies/attackby(obj/item/I, mob/user, params) +/obj/item/food/rawcookies/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/food/choc_pile)) if(isturf(loc)) new /obj/item/food/rawcookies/chocochips(loc) @@ -240,7 +240,7 @@ goal_difficulty = FOOD_GOAL_EASY ///Chocolate crumbles/pile -/obj/item/food/chocolatebar/attackby(obj/item/I, mob/user, params) +/obj/item/food/chocolatebar/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/kitchen/knife)) if(isturf(loc)) new /obj/item/food/choc_pile(loc) diff --git a/code/modules/food_and_drinks/food/foods/junkfood.dm b/code/modules/food_and_drinks/food/foods/junkfood.dm index e988c416c177a..981abacca5e52 100644 --- a/code/modules/food_and_drinks/food/foods/junkfood.dm +++ b/code/modules/food_and_drinks/food/foods/junkfood.dm @@ -111,7 +111,7 @@ list_reagents = list("nutriment" = 2, "sugar" = 10) tastes = list("sweetness" = 3, "liquorice" = 2) -/obj/item/food/twimsts/attack_self(mob/user) +/obj/item/food/twimsts/attack_self__legacy__attackchain(mob/user) var/obj/item/restraints/handcuffs/twimsts/L = new /obj/item/restraints/handcuffs/twimsts L.create_reagents(100) reagents.copy_to(L, reagents.total_volume) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 1e423c119df44..022d0dc6fa097 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -15,7 +15,7 @@ ingredient_name = "slab of meat" ingredient_name_plural = "slabs of meat" -/obj/item/food/meat/attackby(obj/item/W, mob/user, params) +/obj/item/food/meat/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/kitchen/knife) || istype(W, /obj/item/scalpel)) new /obj/item/food/rawcutlet(src) new /obj/item/food/rawcutlet(src) @@ -99,7 +99,7 @@ bitesize = 1 list_reagents = list("protein" = 1) -/obj/item/food/rawcutlet/attackby(obj/item/W, mob/user, params) +/obj/item/food/rawcutlet/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/kitchen/knife) || istype(W, /obj/item/scalpel)) user.visible_message( \ "[user] cuts the raw cutlet with [W]!", \ @@ -426,7 +426,7 @@ reagents.reaction(hit_atom, REAGENT_TOUCH) qdel(src) -/obj/item/food/egg/attackby(obj/item/W, mob/user, params) +/obj/item/food/egg/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/toy/crayon)) var/obj/item/toy/crayon/C = W var/clr = C.dye_color diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index 09ce56ee91bbc..a6dc899d7445a 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -356,7 +356,7 @@ open = !open update_appearance(UPDATE_DESC|UPDATE_ICON) -/obj/item/pizzabox/attack_self(mob/user) +/obj/item/pizzabox/attack_self__legacy__attackchain(mob/user) if(length(boxes) > 0) return open = !open @@ -364,7 +364,7 @@ is_messy = TRUE update_appearance(UPDATE_DESC|UPDATE_ICON) -/obj/item/pizzabox/attackby(obj/item/I, mob/user, params) +/obj/item/pizzabox/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/pizzabox/)) var/obj/item/pizzabox/box = I if(!box.open && !open) @@ -506,9 +506,9 @@ icon_state = "pizzabox_bomb" /obj/item/pizzabox/pizza_bomb/AltClick(mob/user) - attack_self(user) + attack_self__legacy__attackchain(user) -/obj/item/pizzabox/pizza_bomb/attack_self(mob/user) +/obj/item/pizzabox/pizza_bomb/attack_self__legacy__attackchain(mob/user) if(pizza_bomb_status == PIZZA_BOMB_NOT_ARMED) open = TRUE update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON) @@ -576,7 +576,7 @@ to_chat(user, "You smear the bananium ooze all over the pizza bomb's internals! You think you smell a bit of tomato sauce.") ADD_TRAIT(src, TRAIT_CMAGGED, CLOWN_EMAG) -/obj/item/pizzabox/pizza_bomb/wirecutter_act(mob/living/user, obj/item/I) +/obj/item/pizzabox/pizza_bomb/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!open) return . = TRUE diff --git a/code/modules/food_and_drinks/food/foods/side_dishes.dm b/code/modules/food_and_drinks/food/foods/side_dishes.dm index eedcbc833495c..a0232062623ac 100644 --- a/code/modules/food_and_drinks/food/foods/side_dishes.dm +++ b/code/modules/food_and_drinks/food/foods/side_dishes.dm @@ -117,7 +117,7 @@ tastes = list("rice" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/boiledrice/attackby(obj/item/I, mob/user, params) +/obj/item/food/boiledrice/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/stack/seaweed)) return ..() var/obj/item/stack/seaweed/S = I diff --git a/code/modules/food_and_drinks/food_base.dm b/code/modules/food_and_drinks/food_base.dm index 6e9b7d07e2df0..d7674e34464bb 100644 --- a/code/modules/food_and_drinks/food_base.dm +++ b/code/modules/food_and_drinks/food_base.dm @@ -159,10 +159,10 @@ /obj/item/food/proc/Post_Consume(mob/living/M) return -/obj/item/food/attack_self(mob/user) +/obj/item/food/attack_self__legacy__attackchain(mob/user) return -/obj/item/food/attack(mob/M, mob/user, def_zone) +/obj/item/food/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(user.a_intent == INTENT_HARM && force) return ..() if(reagents && !reagents.total_volume) // Shouldn't be needed but it checks to see if it has anything left in it. @@ -179,10 +179,10 @@ return TRUE return FALSE -/obj/item/food/afterattack(obj/target, mob/user, proximity) +/obj/item/food/afterattack__legacy__attackchain(obj/target, mob/user, proximity) return -/obj/item/food/attackby(obj/item/W, mob/user, params) +/obj/item/food/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) rename_interactive(user, W, use_prefix = FALSE, prompt = "What would you like to name this dish?") return @@ -305,7 +305,7 @@ add_fingerprint(user) I.forceMove(src) -/obj/item/food/sliceable/attackby(obj/item/I, mob/user, params) +/obj/item/food/sliceable/attackby__legacy__attackchain(obj/item/I, mob/user, params) if((slices_num <= 0 || !slices_num) || !slice_path) return FALSE diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 9dad856f762fb..0ae75aedd439a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -180,7 +180,7 @@ var/obj/item/food/type = new(get_turf(src)) return type -/obj/machinery/cooker/attackby(obj/item/I, mob/user, params) +/obj/machinery/cooker/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(upgradeable) //Not all cooker types currently support build/upgrade stuff, so not all of it will work well with this //Until we decide whether or not we want to bring back the cereal maker or old grill/oven in some form, this initial check will have to suffice 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 dec5fcbe1303e..f070d09d29057 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -43,7 +43,7 @@ var/obj/item/food/deepfryholder/type = new(get_turf(src)) return type -/obj/machinery/cooker/deepfryer/attackby(obj/item/I, mob/user, params) +/obj/machinery/cooker/deepfryer/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks/ice)) var/ice_amount = I.reagents.get_reagent_amount("ice") if(ice_amount) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 11c571388bf1f..ee5c23ac0fb1e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -93,7 +93,7 @@ startgibbing(user) -/obj/machinery/gibber/attackby(obj/item/P, mob/user, params) +/obj/machinery/gibber/attackby__legacy__attackchain(obj/item/P, mob/user, params) if(istype(P, /obj/item/grab)) var/obj/item/grab/G = P if(G.state < 2) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index b57424f48bd15..672781e46dcc6 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -29,7 +29,7 @@ . = ..() create_reagents(500) -/obj/machinery/icemachine/attackby(obj/item/I, mob/user, params) +/obj/machinery/icemachine/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) if(beaker) to_chat(user, "A container is already inside [src].") diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 90274d1ac1594..8ac8d7562f9ed 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -71,7 +71,7 @@ * Item Adding ********************/ -/obj/machinery/kitchen_machine/attackby(obj/item/O, mob/user, params) +/obj/machinery/kitchen_machine/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(operating) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index e007796c9df84..a5079e4ffde81 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) cube_production = cubes_made required_grind = req_grind -/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params) +/obj/machinery/monkey_recycler/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index fee84b57b2b43..63608f5fe3945 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -188,7 +188,7 @@ return P return 0 -/obj/machinery/processor/attackby(obj/item/O, mob/user, params) +/obj/machinery/processor/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(processing) to_chat(user, "\the [src] is already processing something!") return TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index a74227a5fef34..085113c3884e4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -177,7 +177,7 @@ return TRUE return ..() -/obj/machinery/smartfridge/attackby(obj/item/O, mob/user) +/obj/machinery/smartfridge/attackby__legacy__attackchain(obj/item/O, mob/user) if(istype(O, /obj/item/storage/part_replacer)) . = ..() SStgui.update_uis(src) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index ef51b912bf8f0..b9e36a34aef6c 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -124,7 +124,7 @@ INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, attack_hand), attacker) return COMPONENT_CANCEL_ATTACK_CHAIN -/obj/item/deck/attackby(obj/O, mob/user) +/obj/item/deck/attackby__legacy__attackchain(obj/O, mob/user) // clicking is for drawing if(istype(O, /obj/item/deck)) var/obj/item/deck/other_deck = O @@ -450,7 +450,7 @@ ) H.throw_at(get_step(target, target.dir), 3, 1, null) -/obj/item/deck/attack_self(mob/user) +/obj/item/deck/attack_self__legacy__attackchain(mob/user) deckshuffle(user) /obj/item/deck/proc/deckshuffle(mob/user) @@ -510,7 +510,7 @@ var/parentdeck = null // For future card pack that need to be compatible with eachother i.e. cardemon -/obj/item/pack/attack_self(mob/user as mob) +/obj/item/pack/attack_self__legacy__attackchain(mob/user as mob) user.visible_message( "[name] rips open [src]!", "You rip open [src]!", @@ -570,7 +570,7 @@ /obj/item/cardhand/proc/single() return length(cards) == 1 -/obj/item/cardhand/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/cardhand/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) // this is how we handle our ranged attacks. . = ..() if(!istype(target, /obj/item/deck) || proximity_flag) @@ -579,7 +579,7 @@ var/obj/item/deck/D = target if(D.in_play_range(user)) - return D.attackby(src, user) + return D.attackby__legacy__attackchain(src, user) /obj/item/deck/hitby(atom/movable/thrown, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) @@ -674,7 +674,7 @@ attack_verb = source.attack_verb resistance_flags = source.resistance_flags -/obj/item/cardhand/attackby(obj/O, mob/user) +/obj/item/cardhand/attackby__legacy__attackchain(obj/O, mob/user) // Augh I really don't like this if(length(cards) == 1 && is_pen(O)) var/datum/playingcard/P = cards[1] @@ -709,7 +709,7 @@ return return ..() -/obj/item/cardhand/attack_self(mob/user) +/obj/item/cardhand/attack_self__legacy__attackchain(mob/user) if(length(cards) == 1) turn_hand(user) return diff --git a/code/modules/hallucinations/effects/common.dm b/code/modules/hallucinations/effects/common.dm index 827ab482b19a2..cecbe2c1686e5 100644 --- a/code/modules/hallucinations/effects/common.dm +++ b/code/modules/hallucinations/effects/common.dm @@ -101,7 +101,7 @@ if(was_weakened && !should_attack_weakened) return - attack(was_weakened) + attack__legacy__attackchain(was_weakened) /** * Called every Think when we are attacking the target. @@ -109,7 +109,7 @@ * Arguments: * * was_weakened - Whether the target was already knocked down prior to this attack. */ -/obj/effect/hallucination/chaser/attacker/proc/attack(was_weakened) +/obj/effect/hallucination/chaser/attacker/proc/attack__legacy__attackchain(was_weakened) dir = get_dir(src, target) attack_effects() target.apply_damage(damage, STAMINA) diff --git a/code/modules/hallucinations/effects/major.dm b/code/modules/hallucinations/effects/major.dm index 012da9f55ad52..0b5f4a45ba553 100644 --- a/code/modules/hallucinations/effects/major.dm +++ b/code/modules/hallucinations/effects/major.dm @@ -68,7 +68,7 @@ target.visible_message("[target] trips over nothing.", "You get stuck in [src]!") -/obj/effect/hallucination/tripper/spider_web/attackby(obj/item/I, mob/user, params) +/obj/effect/hallucination/tripper/spider_web/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(user != target) return diff --git a/code/modules/holiday/christmas.dm b/code/modules/holiday/christmas.dm index 26c2d35b5c4fc..34e6972bada4f 100644 --- a/code/modules/holiday/christmas.dm +++ b/code/modules/holiday/christmas.dm @@ -33,7 +33,7 @@ desc = "Directions for use: Requires two people, one to pull each end." var/cracked = 0 -/obj/item/toy/xmas_cracker/attack(mob/target, mob/user) +/obj/item/toy/xmas_cracker/attack__legacy__attackchain(mob/target, mob/user) if(!cracked && ishuman(target) && (target.stat == CONSCIOUS) && !target.get_active_hand()) target.visible_message("[user] and [target] pop \an [src]! *pop*", "You pull \an [src] with [target]! *pop*", "You hear a *pop*.") var/obj/item/paper/Joke = new /obj/item/paper(user.loc) diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 9debfe1aa6a36..391429b8ec244 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -146,7 +146,7 @@ . += "there's no room for more honeycomb!" -/obj/structure/beebox/attackby(obj/item/I, mob/user, params) +/obj/structure/beebox/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/honey_frame)) var/obj/item/honey_frame/HF = I if(length(honey_frames) < BEEBOX_MAX_FRAMES) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index c7a49fc28d436..e348785359551 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -102,7 +102,7 @@ /obj/machinery/biogenerator/crowbar_act(mob/living/user, obj/item/I) return default_deconstruction_crowbar(user, I) -/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params) +/obj/machinery/biogenerator/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/modules/hydroponics/compost_bin.dm b/code/modules/hydroponics/compost_bin.dm index d42c6f74b9567..1badb7576b228 100644 --- a/code/modules/hydroponics/compost_bin.dm +++ b/code/modules/hydroponics/compost_bin.dm @@ -66,7 +66,7 @@ qdel(O) // takes care of plant insertion and conversion to biomass, and start composting what was inserted -/obj/machinery/compost_bin/attackby(obj/item/O, mob/user, params) +/obj/machinery/compost_bin/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 3236f0b59fec9..21e3c917560dd 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -39,7 +39,7 @@ qdel(G) playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE) -/obj/structure/fermenting_barrel/attackby(obj/item/I, mob/user, params) +/obj/structure/fermenting_barrel/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/obj/item/food/grown/G = I if(istype(G)) if(!G.can_distill) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 24521ccb0f85d..1993e781e175c 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -130,7 +130,7 @@ if(panel_open) . += "dnamod-open" -/obj/machinery/plantgenes/attackby(obj/item/I, mob/user, params) +/obj/machinery/plantgenes/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) update_icon(UPDATE_OVERLAYS) return @@ -589,7 +589,7 @@ QDEL_NULL(gene) return ..() -/obj/item/disk/plantgene/attackby(obj/item/W, mob/user, params) +/obj/item/disk/plantgene/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(is_pen(W)) rename_interactive(user, W) @@ -657,7 +657,7 @@ . += "datadisk_gene" -/obj/item/disk/plantgene/attack_self(mob/user) +/obj/item/disk/plantgene/attack_self__legacy__attackchain(mob/user) if(HAS_TRAIT(src, TRAIT_CMAGGED)) return read_only = !read_only diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 6991995dcc2bc..ad72da94e3575 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -69,7 +69,7 @@ if(T.examine_line) . += T.examine_line -/obj/item/food/grown/attackby(obj/item/O, mob/user, params) +/obj/item/food/grown/attackby__legacy__attackchain(obj/item/O, mob/user, params) ..() if(slices_num && slice_path) var/inaccurate = TRUE @@ -106,7 +106,7 @@ // Various gene procs -/obj/item/food/grown/attack_self(mob/user) +/obj/item/food/grown/attack_self__legacy__attackchain(mob/user) if(seed && seed.get_gene(/datum/plant_gene/trait/squash)) squash(user) ..() @@ -174,7 +174,7 @@ return ..() // For item-containing growns such as eggy or gatfruit -/obj/item/food/grown/shell/attack_self(mob/user) +/obj/item/food/grown/shell/attack_self__legacy__attackchain(mob/user) if(!do_after(user, 1.5 SECONDS, target = user)) return user.unEquip(src) diff --git a/code/modules/hydroponics/grown/cereals.dm b/code/modules/hydroponics/grown/cereals.dm index 0d57acbdd9a6c..87f882bfe872e 100644 --- a/code/modules/hydroponics/grown/cereals.dm +++ b/code/modules/hydroponics/grown/cereals.dm @@ -89,7 +89,7 @@ tastes = list("meatwheat" = 1) can_distill = FALSE -/obj/item/food/grown/meatwheat/attack_self(mob/living/user) +/obj/item/food/grown/meatwheat/attack_self__legacy__attackchain(mob/living/user) user.visible_message("[user] crushes [src] into meat.", "You crush [src] into something that resembles meat.") playsound(user, 'sound/effects/blobattack.ogg', 50, 1) var/obj/item/food/meat/meatwheat/M = new(get_turf(user)) diff --git a/code/modules/hydroponics/grown/citrus.dm b/code/modules/hydroponics/grown/citrus.dm index 1ee7a1d9f1550..71db76937f775 100644 --- a/code/modules/hydroponics/grown/citrus.dm +++ b/code/modules/hydroponics/grown/citrus.dm @@ -114,7 +114,7 @@ tastes = list("burning lemon" = 1) wine_flavor = "fire" -/obj/item/food/grown/firelemon/attack_self(mob/living/user) +/obj/item/food/grown/firelemon/attack_self__legacy__attackchain(mob/living/user) var/area/A = get_area(user) user.visible_message("[user] primes [src]!", "You prime [src]!") investigate_log("[key_name(user)] primed a combustible lemon for detonation at [A] [COORD(user)].", INVESTIGATE_BOMB) diff --git a/code/modules/hydroponics/grown/corn.dm b/code/modules/hydroponics/grown/corn.dm index 90b7bd8d7d04c..e9767333eab55 100644 --- a/code/modules/hydroponics/grown/corn.dm +++ b/code/modules/hydroponics/grown/corn.dm @@ -38,7 +38,7 @@ throw_speed = 3 throw_range = 7 -/obj/item/grown/corncob/attackby(obj/item/grown/W, mob/user, params) +/obj/item/grown/corncob/attackby__legacy__attackchain(obj/item/grown/W, mob/user, params) if(W.sharp) to_chat(user, "You use [W] to fashion a pipe out of the corn cob!") new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc) @@ -75,7 +75,7 @@ ..() snap_pops = max(round(seed.potency/8), 1) -/obj/item/grown/snapcorn/attack_self(mob/user) +/obj/item/grown/snapcorn/attack_self__legacy__attackchain(mob/user) ..() to_chat(user, "You pick a snap pop from the cob.") var/obj/item/toy/snappop/S = new /obj/item/toy/snappop(user.loc) diff --git a/code/modules/hydroponics/grown/cotton.dm b/code/modules/hydroponics/grown/cotton.dm index 9a5863d1f1610..4f1df4e85a492 100644 --- a/code/modules/hydroponics/grown/cotton.dm +++ b/code/modules/hydroponics/grown/cotton.dm @@ -31,7 +31,7 @@ var/cotton_type = /obj/item/stack/sheet/cotton var/cotton_name = "raw cotton" -/obj/item/grown/cotton/attack_self(mob/user) +/obj/item/grown/cotton/attack_self__legacy__attackchain(mob/user) user.show_message("You pull some [cotton_name] out of [src]!", 1) var/seed_modifier = 0 if(seed) @@ -40,7 +40,7 @@ var/old_cotton_amount = cotton.amount for(var/obj/item/stack/ST in user.loc) if(ST != cotton && istype(ST, cotton_type) && ST.amount < ST.max_amount) - ST.attackby(cotton, user) + ST.attackby__legacy__attackchain(cotton, user) if(cotton.amount > old_cotton_amount) to_chat(user, "You add the newly-formed [cotton_name] to the stack. It now contains [cotton.amount] [cotton_name].") qdel(src) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index fce7e54527005..9cac51031a67d 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -167,7 +167,7 @@ throw_speed = 1 throw_range = 3 -/obj/item/grown/sunflower/attack(mob/M, mob/user) +/obj/item/grown/sunflower/attack__legacy__attackchain(mob/M, mob/user) to_chat(M, "[user] smacks you with a sunflower!FLOWER POWER") to_chat(user, "Your sunflower's FLOWER POWER strikes [M]") @@ -228,7 +228,7 @@ ..() force = round((5 + seed.potency / 5), 1) -/obj/item/grown/novaflower/attack(mob/living/carbon/M, mob/user) +/obj/item/grown/novaflower/attack__legacy__attackchain(mob/living/carbon/M, mob/user) ..() if(isliving(M)) to_chat(M, "You are lit on fire from the intense heat of [src]!") @@ -237,7 +237,7 @@ message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") log_game("[key_name(user)] set [key_name(M)] on fire") -/obj/item/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity) +/obj/item/grown/novaflower/afterattack__legacy__attackchain(atom/A as mob|obj, mob/user,proximity) if(!proximity) return if(force > 0) diff --git a/code/modules/hydroponics/grown/grass_carpet.dm b/code/modules/hydroponics/grown/grass_carpet.dm index 2a78f12fddae5..b28e0555d1409 100644 --- a/code/modules/hydroponics/grown/grass_carpet.dm +++ b/code/modules/hydroponics/grown/grass_carpet.dm @@ -30,7 +30,7 @@ tastes = list("grass" = 1) wine_power = 0.15 -/obj/item/food/grown/grass/attack_self(mob/user) +/obj/item/food/grown/grass/attack_self__legacy__attackchain(mob/user) to_chat(user, "You prepare the astroturf.") var/grassAmt = 1 + round(seed.potency * tile_coefficient) // The grass we're holding for(var/obj/item/food/grown/grass/G in user.loc) // The grass on the floor diff --git a/code/modules/hydroponics/grown/herbals.dm b/code/modules/hydroponics/grown/herbals.dm index 3c4c1735d1e3e..d1d0421cf8e7f 100644 --- a/code/modules/hydroponics/grown/herbals.dm +++ b/code/modules/hydroponics/grown/herbals.dm @@ -20,7 +20,7 @@ tastes = list("comfrey" = 1) bitesize_mod = 2 -/obj/item/food/grown/comfrey/attack_self(mob/user) +/obj/item/food/grown/comfrey/attack_self__legacy__attackchain(mob/user) var/obj/item/stack/medical/bruise_pack/comfrey/C = new(get_turf(user)) C.heal_brute = seed.potency to_chat(user, "You mash [src] into a poultice.") @@ -47,7 +47,7 @@ tastes = list("aloe" = 1) bitesize_mod = 2 -/obj/item/food/grown/aloe/attack_self(mob/user) +/obj/item/food/grown/aloe/attack_self__legacy__attackchain(mob/user) var/obj/item/stack/medical/ointment/aloe/A = new(get_turf(user)) A.heal_burn = seed.potency to_chat(user, "You mash [src] into a poultice.") diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 950971fb591e9..586c42115a428 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -36,7 +36,7 @@ user.drop_item() qdel(src) -/obj/item/seeds/kudzu/attack_self(mob/user) +/obj/item/seeds/kudzu/attack_self__legacy__attackchain(mob/user) plant(user) to_chat(user, "You plant the kudzu. You monster.") diff --git a/code/modules/hydroponics/grown/misc_seeds.dm b/code/modules/hydroponics/grown/misc_seeds.dm index c1639a4558113..b3779e1d0cc5c 100644 --- a/code/modules/hydroponics/grown/misc_seeds.dm +++ b/code/modules/hydroponics/grown/misc_seeds.dm @@ -191,7 +191,7 @@ max_integrity = 40 wine_power = 0.8 -/obj/item/food/grown/cherry_bomb/attack_self(mob/living/user) +/obj/item/food/grown/cherry_bomb/attack_self__legacy__attackchain(mob/living/user) var/area/A = get_area(user) user.visible_message("[user] plucks the stem from [src]!", "You pluck the stem from [src], which begins to hiss loudly!") message_admins("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x], [user.y], [user.z]) (JMP)") diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index a3bb028724de0..cc7df22619cc6 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -174,7 +174,7 @@ tastes = list("walking mushroom" = 1, "motion" = 1) can_distill = FALSE -/obj/item/food/grown/mushroom/walkingmushroom/attack_self(mob/user) +/obj/item/food/grown/mushroom/walkingmushroom/attack_self__legacy__attackchain(mob/user) if(isspaceturf(user.loc)) return var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc) @@ -248,7 +248,7 @@ tastes = list("warmth" = 1, "light" = 1, "glowshroom" = 1) wine_power = 0.5 -/obj/item/food/grown/mushroom/glowshroom/attack_self(mob/user) +/obj/item/food/grown/mushroom/glowshroom/attack_self__legacy__attackchain(mob/user) if(isspaceturf(user.loc)) return FALSE if(!isturf(user.loc)) diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index d9c4adbd991d8..ffc4ce7a4c7ed 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -69,7 +69,7 @@ -/obj/item/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity) +/obj/item/grown/nettle/afterattack__legacy__attackchain(atom/A as mob|obj, mob/user,proximity) if(!proximity) return if(force > 0) @@ -105,7 +105,7 @@ user.Weaken(10 SECONDS) to_chat(user, "You are stunned by the Deathnettle when you try picking it up!") -/obj/item/grown/nettle/death/attack(mob/living/carbon/M, mob/user) +/obj/item/grown/nettle/death/attack__legacy__attackchain(mob/living/carbon/M, mob/user) ..() if(!isliving(M)) return diff --git a/code/modules/hydroponics/grown/nymph.dm b/code/modules/hydroponics/grown/nymph.dm index 8c8c9e70fd5bc..674ac06110cde 100644 --- a/code/modules/hydroponics/grown/nymph.dm +++ b/code/modules/hydroponics/grown/nymph.dm @@ -19,7 +19,7 @@ icon_state = "mushy" bitesize_mod = 2 -/obj/item/food/grown/nymph_pod/attack_self(mob/user) +/obj/item/food/grown/nymph_pod/attack_self__legacy__attackchain(mob/user) new /mob/living/simple_animal/diona(get_turf(user)) to_chat(user, "You crack open [src] letting the nymph out.") user.drop_item() diff --git a/code/modules/hydroponics/grown/potato.dm b/code/modules/hydroponics/grown/potato.dm index 09c7e5f6fe739..dd9dbc59d7e95 100644 --- a/code/modules/hydroponics/grown/potato.dm +++ b/code/modules/hydroponics/grown/potato.dm @@ -38,7 +38,7 @@ distill_reagent = "sbiten" -/obj/item/food/grown/potato/attackby(obj/item/W, mob/user, params) +/obj/item/food/grown/potato/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.sharp) to_chat(user, "You cut the potato into wedges with [W].") var/obj/item/food/grown/potato/wedges/Wedges = new /obj/item/food/grown/potato/wedges diff --git a/code/modules/hydroponics/grown/pumpkin.dm b/code/modules/hydroponics/grown/pumpkin.dm index 4a3668acc052b..5f6592da81f95 100644 --- a/code/modules/hydroponics/grown/pumpkin.dm +++ b/code/modules/hydroponics/grown/pumpkin.dm @@ -28,7 +28,7 @@ wine_power = 0.2 var/carved_type = /obj/item/clothing/head/hardhat/pumpkinhead -/obj/item/food/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/food/grown/pumpkin/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(W.sharp) user.show_message("You carve a face into [src]!", 1) new carved_type(user.loc) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 68a5da7883c47..784dabc6bd300 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -25,7 +25,7 @@ mind = null return ..() -/obj/item/seeds/replicapod/attackby(obj/item/W, mob/user, params) +/obj/item/seeds/replicapod/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W,/obj/item/reagent_containers/syringe)) if(!contains_sample) for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list) diff --git a/code/modules/hydroponics/grown/root.dm b/code/modules/hydroponics/grown/root.dm index 9a52dc6b88ca3..c45ca2e22d107 100644 --- a/code/modules/hydroponics/grown/root.dm +++ b/code/modules/hydroponics/grown/root.dm @@ -31,7 +31,7 @@ filling_color = "#FFA500" bitesize_mod = 2 -/obj/item/food/grown/carrot/attackby(obj/item/I, mob/user, params) +/obj/item/food/grown/carrot/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.sharp) to_chat(user, "You sharpen the carrot into a shiv with [I].") var/obj/item/kitchen/knife/shiv/carrot/Shiv = new () diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index 4f26bf4f6fe54..355e0bce240c5 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -129,13 +129,13 @@ origin_tech = "biotech=4;combat=5" distill_reagent = "demonsblood" -/obj/item/food/grown/tomato/killer/attack(mob/M, mob/user, def_zone) +/obj/item/food/grown/tomato/killer/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(awakening) to_chat(user, "The tomato is twitching and shaking, preventing you from eating it.") return ..() -/obj/item/food/grown/tomato/killer/attack_self(mob/user) +/obj/item/food/grown/tomato/killer/attack_self__legacy__attackchain(mob/user) if(awakening || isspaceturf(user.loc)) return to_chat(user, "You begin to awaken the Killer Tomato...") diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 484afa4f43fc8..d9536cbb57363 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -52,7 +52,7 @@ /obj/item/food/grown/ambrosia/deus, /obj/item/food/grown/wheat)) -/obj/item/grown/log/attackby(obj/item/W, mob/user, params) +/obj/item/grown/log/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(W.sharp) if(in_inventory) to_chat(user, "You need to place [src] on a flat surface to make [plank_name].") @@ -146,7 +146,7 @@ . = ..() StartBurning() -/obj/structure/bonfire/attackby(obj/item/W, mob/user, params) +/obj/structure/bonfire/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/rods) && !can_buckle) var/obj/item/stack/rods/R = W R.use(1) diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 8e84ace5abcca..7b754316f6059 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -42,7 +42,7 @@ QDEL_NULL(seed) return ..() -/obj/item/grown/attackby(obj/item/O, mob/user, params) +/obj/item/grown/attackby__legacy__attackchain(obj/item/O, mob/user, params) ..() if(istype(O, /obj/item/plant_analyzer)) send_plant_details(user) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 543e1f026a227..f99b0dfa202e3 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -204,7 +204,7 @@ attack_verb = list("hit", "poked") hitsound = "swing_hit" -/obj/item/scythe/tele/attack_self(mob/user) +/obj/item/scythe/tele/attack_self__legacy__attackchain(mob/user) extend = !extend if(extend) to_chat(user, "With a flick of your wrist, you extend the scythe. It's reaping time!") diff --git a/code/modules/hydroponics/hydroponics_tray.dm b/code/modules/hydroponics/hydroponics_tray.dm index 538094feb4794..3b7b0f3477cfc 100644 --- a/code/modules/hydroponics/hydroponics_tray.dm +++ b/code/modules/hydroponics/hydroponics_tray.dm @@ -123,7 +123,7 @@ QDEL_NULL(myseed) return ..() -/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params) +/obj/machinery/hydroponics/constructable/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I)) return return ..() @@ -770,7 +770,7 @@ to_chat(user, message.Join("")) doping_chem = new_chem -/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params) +/obj/machinery/hydroponics/attackby__legacy__attackchain(obj/item/O, mob/user, params) //Called when mob user "attacks" it with object O if(istype(O, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too) var/obj/item/reagent_containers/reagent_source = O @@ -1029,7 +1029,7 @@ /obj/machinery/hydroponics/soil/update_icon_lights() return // Has no lights -/obj/machinery/hydroponics/soil/attackby(obj/item/O, mob/user, params) +/obj/machinery/hydroponics/soil/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/shovel) && !istype(O, /obj/item/shovel/spade)) //Doesn't include spades because of uprooting plants to_chat(user, "You clear up [src]!") qdel(src) diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 32f0f2d2ab72d..b3b91a5831358 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -74,7 +74,7 @@ for(var/obj/item/stock_parts/manipulator/M in component_parts) seed_multiplier = M.rating -/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params) +/obj/machinery/seed_extractor/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O)) return diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index e98fd98a52b8f..4132930cae0ee 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -391,7 +391,7 @@ /obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) // In case seeds have some special interaction with special chems return -/obj/item/seeds/attackby(obj/item/O, mob/user, params) +/obj/item/seeds/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/plant_analyzer)) to_chat(user, "This is \a [src].") var/text = get_analyzer_text() @@ -640,12 +640,12 @@ /obj/item/unsorted_seeds/proc/sort(depth = 1) seed_data.transform(src, depth) -/obj/item/unsorted_seeds/attack_self(mob/user) +/obj/item/unsorted_seeds/attack_self__legacy__attackchain(mob/user) user.visible_message("[user] crudely sorts through [src] by hand.", "You crudely sort through [src] by hand. This would be easier and more effective with some sort of tool.") if(do_after(user, 3 SECONDS, TRUE, src, must_be_held = TRUE)) sort() -/obj/item/unsorted_seeds/attackby(obj/item/O, mob/user, params) +/obj/item/unsorted_seeds/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/plant_analyzer)) to_chat(user, "This is \a [src].") var/text = get_analyzer_text() diff --git a/code/modules/instruments/objs/items/_instrument.dm b/code/modules/instruments/objs/items/_instrument.dm index e189757286389..5155b6fe23d61 100644 --- a/code/modules/instruments/objs/items/_instrument.dm +++ b/code/modules/instruments/objs/items/_instrument.dm @@ -27,7 +27,7 @@ user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!") return BRUTELOSS -/obj/item/instrument/attack_self(mob/user) +/obj/item/instrument/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/instrument/ui_data(mob/user) diff --git a/code/modules/instruments/objs/items/instrument_items.dm b/code/modules/instruments/objs/items/instrument_items.dm index 6ed3fe637c086..4c8477c4d4725 100644 --- a/code/modules/instruments/objs/items/instrument_items.dm +++ b/code/modules/instruments/objs/items/instrument_items.dm @@ -91,7 +91,7 @@ . = ..() AddComponent(/datum/component/spooky) -/obj/item/instrument/trumpet/spectral/attack(mob/living/carbon/C, mob/user) +/obj/item/instrument/trumpet/spectral/attack__legacy__attackchain(mob/living/carbon/C, mob/user) playsound(src, 'sound/instruments/trombone/En4.mid', 100, TRUE, -1) ..() @@ -114,7 +114,7 @@ . = ..() AddComponent(/datum/component/spooky) -/obj/item/instrument/saxophone/spectral/attack(mob/living/carbon/C, mob/user) +/obj/item/instrument/saxophone/spectral/attack__legacy__attackchain(mob/living/carbon/C, mob/user) playsound(src, 'sound/instruments/saxophone/En4.mid', 100, TRUE,-1) ..() @@ -137,7 +137,7 @@ . = ..() AddComponent(/datum/component/spooky) -/obj/item/instrument/trombone/spectral/attack(mob/living/carbon/C, mob/user) +/obj/item/instrument/trombone/spectral/attack__legacy__attackchain(mob/living/carbon/C, mob/user) playsound (src, 'sound/instruments/trombone/Cn4.mid', 100,1,-1) ..() @@ -147,7 +147,7 @@ force = 0 attack_verb = list("Wahed", "Waahed", "Waaahed", "Honked") -/obj/item/instrument/trombone/sad/attack(mob/living/carbon/C, mob/user) +/obj/item/instrument/trombone/sad/attack__legacy__attackchain(mob/living/carbon/C, mob/user) playsound(loc, 'sound/misc/sadtrombone.ogg', 50, TRUE, -1) ..() diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm index ae7a964ed720b..016a5fb8136a4 100644 --- a/code/modules/library/book.dm +++ b/code/modules/library/book.dm @@ -74,7 +74,7 @@ icon_state = "book[rand(1,8)]" -/obj/item/book/attack(mob/M, mob/living/user) +/obj/item/book/attack__legacy__attackchain(mob/M, mob/living/user) if(user.a_intent == INTENT_HELP) force = 0 attack_verb = list("educated") @@ -83,7 +83,7 @@ attack_verb = list("bashed", "whacked") ..() -/obj/item/book/attack_self(mob/user) +/obj/item/book/attack_self__legacy__attackchain(mob/user) if(carved) //Attempt to remove inserted object, if none found, remind user that someone vandalized their book (Bastards)! if(!remove_stored_item(user, TRUE)) @@ -92,7 +92,7 @@ user.visible_message("[user] opens a book titled \"[title]\" and begins reading intently.") read_book(user) -/obj/item/book/attackby(obj/item/I, mob/user, params) +/obj/item/book/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) edit_book(user) else if(istype(I, /obj/item/barcodescanner)) diff --git a/code/modules/library/library_computer.dm b/code/modules/library/library_computer.dm index a98a441fca9dc..56cbb2c9539b0 100644 --- a/code/modules/library/library_computer.dm +++ b/code/modules/library/library_computer.dm @@ -65,7 +65,7 @@ /obj/machinery/computer/library/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/computer/library/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/library/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/book)) select_book(O) return diff --git a/code/modules/library/library_equipment.dm b/code/modules/library/library_equipment.dm index 66f23e72f1a07..38b9038220e4a 100644 --- a/code/modules/library/library_equipment.dm +++ b/code/modules/library/library_equipment.dm @@ -31,7 +31,7 @@ I.forceMove(src) update_icon(UPDATE_ICON_STATE) -/obj/structure/bookcase/attackby(obj/item/O, mob/user) +/obj/structure/bookcase/attackby__legacy__attackchain(obj/item/O, mob/user) if(is_type_in_list(O, allowed_books)) if(!user.drop_item()) return @@ -183,7 +183,7 @@ ui_interact(user) -/obj/machinery/bookbinder/attackby(obj/item/I, mob/user) +/obj/machinery/bookbinder/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/paper)) select_paper(I) if(istype(I, /obj/item/paper_bundle)) @@ -337,7 +337,7 @@ var/obj/machinery/computer/library/computer var/mode = BARCODE_MODE_SCAN_SELECT -/obj/item/barcodescanner/attack_self(mob/user) +/obj/item/barcodescanner/attack_self__legacy__attackchain(mob/user) if(!check_connection(user)) return mode++ diff --git a/code/modules/martial_arts/adminfu.dm b/code/modules/martial_arts/adminfu.dm index c8ae841ffb5b8..dbda7fe374156 100644 --- a/code/modules/martial_arts/adminfu.dm +++ b/code/modules/martial_arts/adminfu.dm @@ -40,7 +40,7 @@ icon_state ="scroll2" var/used = FALSE -/obj/item/adminfu_scroll/attack_self(mob/user as mob) +/obj/item/adminfu_scroll/attack_self__legacy__attackchain(mob/user as mob) if(!ishuman(user)) return if(!used) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 5a17d897145e3..fa82a4f47eee2 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -293,7 +293,7 @@ icon_state ="scroll2" var/used = FALSE -/obj/item/plasma_fist_scroll/attack_self(mob/user as mob) +/obj/item/plasma_fist_scroll/attack_self__legacy__attackchain(mob/user as mob) if(!ishuman(user)) return @@ -313,7 +313,7 @@ icon = 'icons/obj/wizard.dmi' icon_state = "scroll2" -/obj/item/sleeping_carp_scroll/attack_self(mob/living/carbon/human/user as mob) +/obj/item/sleeping_carp_scroll/attack_self__legacy__attackchain(mob/living/carbon/human/user as mob) if(!istype(user) || !user) return if(user.mind) //Prevents changelings and vampires from being able to learn it @@ -337,7 +337,7 @@ icon = 'icons/obj/library.dmi' icon_state = "cqcmanual" -/obj/item/cqc_manual/attack_self(mob/living/carbon/human/user) +/obj/item/cqc_manual/attack_self__legacy__attackchain(mob/living/carbon/human/user) if(!istype(user) || !user) return if(user.mind) //Prevents changelings and vampires from being able to learn it @@ -382,7 +382,7 @@ /obj/item/bostaff/update_icon_state() icon_state = "[base_icon_state]0" -/obj/item/bostaff/attack(mob/target, mob/living/user) +/obj/item/bostaff/attack__legacy__attackchain(mob/target, mob/living/user) add_fingerprint(user) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You club yourself over the head with [src].") diff --git a/code/modules/martial_arts/mimejutsu.dm b/code/modules/martial_arts/mimejutsu.dm index 3cda37e39e53a..8a1f1e693fb11 100644 --- a/code/modules/martial_arts/mimejutsu.dm +++ b/code/modules/martial_arts/mimejutsu.dm @@ -20,7 +20,7 @@ icon_state = "beret" var/used = FALSE -/obj/item/mimejutsu_scroll/attack_self(mob/user as mob) +/obj/item/mimejutsu_scroll/attack_self__legacy__attackchain(mob/user as mob) if(!ishuman(user)) return if(!used) diff --git a/code/modules/maze_generation/maze_helper_atoms.dm b/code/modules/maze_generation/maze_helper_atoms.dm index 4ea9777bd76e2..b3eecbd3fffe5 100644 --- a/code/modules/maze_generation/maze_helper_atoms.dm +++ b/code/modules/maze_generation/maze_helper_atoms.dm @@ -11,6 +11,10 @@ desc = "You can't take this down. Looks like you have to solve the maze." resistance_flags = INDESTRUCTIBLE +/obj/structure/window/reinforced/mazeglass/Initialize(mapload, direct) + . = ..() + RegisterSignal(src, COMSIG_TOOL_ATTACK, PROC_REF(do_nothing)) + // No taking apart -/obj/structure/window/reinforced/mazeglass/tool_act(mob/living/user, obj/item/I, tool_type) - return FALSE +/obj/structure/window/reinforced/mazeglass/proc/do_nothing(mob/living/user, obj/item/I, tool_type) + return COMPONENT_CANCEL_TOOLACT diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index e8c49f5d821a3..d5b9394871f2f 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -165,7 +165,7 @@ else return ..() -/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user) +/obj/structure/closet/crate/secure/loot/attackby__legacy__attackchain(obj/item/W, mob/user) if(locked) if(istype(W, /obj/item/card/emag)) boom(user) diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 6e8241f6dd1b5..6b68ea56f4d14 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -53,7 +53,7 @@ var/obj/item/crusher_trophy/T = t . += "It has \a [T] attached, which causes [T.effect_desc()]." -/obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user) +/obj/item/kinetic_crusher/attackby__legacy__attackchain(obj/item/I, mob/living/user) if(istype(I, /obj/item/crusher_trophy)) var/obj/item/crusher_trophy/T = I T.add_to(src, user) @@ -72,7 +72,7 @@ else to_chat(user, "There are no trophies on [src].") -/obj/item/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user) +/obj/item/kinetic_crusher/attack__legacy__attackchain(mob/living/target, mob/living/carbon/user) if(!HAS_TRAIT(src, TRAIT_WIELDED)) to_chat(user, "[src] is too heavy to use with one hand. You fumble and drop everything.") user.drop_r_hand() @@ -103,7 +103,7 @@ if(ismob(user) && isturf(user.loc)) return user.loc -/obj/item/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams) +/obj/item/kinetic_crusher/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity_flag, clickparams) . = ..() if(!HAS_TRAIT(src, TRAIT_WIELDED)) return @@ -245,7 +245,7 @@ /obj/item/crusher_trophy/proc/effect_desc() return "errors" -/obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user) +/obj/item/crusher_trophy/attackby__legacy__attackchain(obj/item/A, mob/living/user) if(istype(A, /obj/item/kinetic_crusher)) add_to(A, user) else diff --git a/code/modules/mining/equipment/lazarus_injector.dm b/code/modules/mining/equipment/lazarus_injector.dm index fa5b0b657f726..0156ba9fc58be 100644 --- a/code/modules/mining/equipment/lazarus_injector.dm +++ b/code/modules/mining/equipment/lazarus_injector.dm @@ -14,7 +14,7 @@ var/malfunctioning = 0 var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it -/obj/item/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/lazarus_injector/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) if(!loaded) return if(isliving(target) && proximity_flag) @@ -91,7 +91,7 @@ QDEL_NULL(captured) return ..() -/obj/item/mobcapsule/attack(mob/living/simple_animal/S, mob/user, prox_flag) +/obj/item/mobcapsule/attack__legacy__attackchain(mob/living/simple_animal/S, mob/user, prox_flag) if(istype(S) && S.sentience_type == capture_type) capture(S, user) return TRUE @@ -121,7 +121,7 @@ captured.forceMove(get_turf(src)) captured = null -/obj/item/mobcapsule/attack_self(mob/user) +/obj/item/mobcapsule/attack_self__legacy__attackchain(mob/user) colorindex += 1 if(colorindex >= 6) colorindex = 0 diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index f0acc21cc5352..e482243b6e904 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -47,7 +47,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/item/stack/marker_beacon/update_icon_state() icon_state = "[base_icon_state][lowertext(picked_color)]" -/obj/item/stack/marker_beacon/attack_self(mob/user) +/obj/item/stack/marker_beacon/attack_self__legacy__attackchain(mob/user) if(!isturf(user.loc)) to_chat(user, "You need more space to place a [singular_name] here.") return @@ -125,7 +125,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE) qdel(src) -/obj/structure/marker_beacon/attackby(obj/item/I, mob/user, params) +/obj/structure/marker_beacon/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/marker_beacon)) var/obj/item/stack/marker_beacon/M = I to_chat(user, "You start picking [src] up...") @@ -157,7 +157,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( /obj/structure/marker_beacon/dock_marker/update_icon_state() set_light(light_range, light_power, LIGHT_COLOR_BLUE) -/obj/structure/marker_beacon/dock_marker/attackby() +/obj/structure/marker_beacon/dock_marker/attackby__legacy__attackchain() return /obj/structure/marker_beacon/dock_marker/attack_hand() diff --git a/code/modules/mining/equipment/mineral_scanner.dm b/code/modules/mining/equipment/mineral_scanner.dm index fe0fd5b0a7854..24d0bca968c85 100644 --- a/code/modules/mining/equipment/mineral_scanner.dm +++ b/code/modules/mining/equipment/mineral_scanner.dm @@ -13,7 +13,7 @@ origin_tech = "engineering=1;magnets=1" -/obj/item/mining_scanner/attack_self(mob/user) +/obj/item/mining_scanner/attack_self__legacy__attackchain(mob/user) if(!user.client) return if(current_cooldown <= world.time) @@ -24,7 +24,7 @@ //Debug item to identify all ore spread quickly /obj/item/mining_scanner/admin -/obj/item/mining_scanner/admin/attack_self(mob/user) +/obj/item/mining_scanner/admin/attack_self__legacy__attackchain(mob/user) for(var/turf/simulated/mineral/M in world) if(M.ore?.scan_icon_state) M.icon_state = M.ore.scan_icon_state diff --git a/code/modules/mining/equipment/mining_charges.dm b/code/modules/mining/equipment/mining_charges.dm index 74454a4b4ab8d..fa3996820e9e9 100644 --- a/code/modules/mining/equipment/mining_charges.dm +++ b/code/modules/mining/equipment/mining_charges.dm @@ -26,11 +26,11 @@ if(timer_off) . += "The mining charge is connected to a detonator." -/obj/item/grenade/plastic/miningcharge/attack_self(mob/user) +/obj/item/grenade/plastic/miningcharge/attack_self__legacy__attackchain(mob/user) if(nadeassembly) - nadeassembly.attack_self(user) + nadeassembly.attack_self__legacy__attackchain(user) -/obj/item/grenade/plastic/miningcharge/afterattack(atom/movable/AM, mob/user, flag) +/obj/item/grenade/plastic/miningcharge/afterattack__legacy__attackchain(atom/movable/AM, mob/user, flag) if(!ismineralturf(AM) && !hacked) return if(is_ancient_rock(AM) && !hacked) @@ -55,7 +55,7 @@ installed = TRUE target.overlays += image_overlay -/obj/item/grenade/plastic/miningcharge/attackby(obj/item/I, mob/user, params) +/obj/item/grenade/plastic/miningcharge/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/detonator)) return var/obj/item/detonator/detonator = I @@ -157,7 +157,7 @@ . = ..() . += "This scanner has an extra port for overriding mining charge safeties." -/obj/item/t_scanner/adv_mining_scanner/syndicate/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/t_scanner/adv_mining_scanner/syndicate/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) if(!istype(target, /obj/item/grenade/plastic/miningcharge)) return var/obj/item/grenade/plastic/miningcharge/charge = target @@ -200,7 +200,7 @@ else icon_state = initial(icon_state) -/obj/item/detonator/attack_self(mob/user) +/obj/item/detonator/attack_self__legacy__attackchain(mob/user) playsound(src, 'sound/items/detonator.ogg', 40) if(length(bombs)) to_chat(user, "Activating explosives...") diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index b592a93b3bc65..24c6808384a0d 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -7,7 +7,7 @@ w_class = WEIGHT_CLASS_TINY origin_tech = "biotech=3" -/obj/item/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user) +/obj/item/hivelordstabilizer/afterattack__legacy__attackchain(obj/item/organ/internal/M, mob/user) . = ..() var/obj/item/organ/internal/regenerative_core/C = M if(!istype(C, /obj/item/organ/internal/regenerative_core)) @@ -90,12 +90,12 @@ user.drop_item() qdel(src) -/obj/item/organ/internal/regenerative_core/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/organ/internal/regenerative_core/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) . = ..() if(proximity_flag) applyto(target, user) -/obj/item/organ/internal/regenerative_core/attack_self(mob/user) +/obj/item/organ/internal/regenerative_core/attack_self__legacy__attackchain(mob/user) applyto(user, user) /obj/item/organ/internal/regenerative_core/insert(mob/living/carbon/M, special = 0) diff --git a/code/modules/mining/equipment/resonator.dm b/code/modules/mining/equipment/resonator.dm index ba80370b2617d..f9d9ad373c61b 100644 --- a/code/modules/mining/equipment/resonator.dm +++ b/code/modules/mining/equipment/resonator.dm @@ -21,7 +21,7 @@ /// the number that is added to the failure_prob, which is the probability of whether it will spread or not var/adding_failure = 50 -/obj/item/resonator/attack_self(mob/user) +/obj/item/resonator/attack_self__legacy__attackchain(mob/user) if(mode == RESONATOR_MODE_AUTO) to_chat(user, "You set the [name]'s fields to detonate only after you hit it with [src].") mode = RESONATOR_MODE_MANUAL @@ -37,7 +37,7 @@ fieldlimit = 6 quick_burst_mod = 1 -/obj/item/resonator/upgraded/attack_self(mob/user) +/obj/item/resonator/upgraded/attack_self__legacy__attackchain(mob/user) if(mode == RESONATOR_MODE_AUTO) to_chat(user, "You set [src]'s fields to detonate only after being attacked by [src].") mode = RESONATOR_MODE_MANUAL diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 03b66feb01185..d8488322eab27 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -38,7 +38,7 @@ . += "This capsule has the [template.name] stored." . += template.description -/obj/item/survivalcapsule/attack_self() +/obj/item/survivalcapsule/attack_self__legacy__attackchain() // Can't grab when capsule is New() because templates aren't loaded then get_template() if(!used) @@ -217,7 +217,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/economy/vending/wallmed/survival_pod, qdel(src) /obj/item/gps/computer/attack_hand(mob/user) - attack_self(user) + attack_self__legacy__attackchain(user) //Bed /obj/structure/bed/pod diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index 17cf4e80bd8f7..5195a1fdb39fe 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect) origin_tech = "bluespace=2" slot_flags = ITEM_SLOT_BELT -/obj/item/wormhole_jaunter/attack_self(mob/user) +/obj/item/wormhole_jaunter/attack_self__legacy__attackchain(mob/user) user.visible_message("[user.name] activates the [name]!") activate(user, TRUE) @@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect) return destination = L[desc] -/obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down +/obj/item/wormhole_jaunter/contractor/attack_self__legacy__attackchain(mob/user) // message is later down activate(user, TRUE) /obj/item/wormhole_jaunter/contractor/activate(mob/user) @@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect) thrower = null return ..() -/obj/item/grenade/jaunter_grenade/attack_self(mob/user) +/obj/item/grenade/jaunter_grenade/attack_self__legacy__attackchain(mob/user) . = ..() thrower = user @@ -261,7 +261,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect) /// The turf where we activated the wormwhole. var/wormhole_loc -/obj/item/wormhole_jaunter/wormhole_weaver/attack_self(mob/user) +/obj/item/wormhole_jaunter/wormhole_weaver/attack_self__legacy__attackchain(mob/user) activate(user, TRUE) /obj/item/wormhole_jaunter/wormhole_weaver/emp_act(severity) diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index f05c780505a4e..1b6a0a2f1a670 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) . = ..() . += "It has [uses_left] use\s remaining." -/obj/item/extraction_pack/attack_self(mob/user) +/obj/item/extraction_pack/attack_self__legacy__attackchain(mob/user) var/list/possible_beacons = list() for(var/B in GLOB.total_extraction_beacons) var/obj/structure/extraction_point/EP = B @@ -38,7 +38,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) beacon = A to_chat(user, "You link the extraction pack to the beacon system.") -/obj/item/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params) +/obj/item/extraction_pack/afterattack__legacy__attackchain(atom/movable/A, mob/living/carbon/human/user, flag, params) . = ..() if(!beacon) to_chat(user, "[src] is not linked to a beacon, and cannot be used!") @@ -151,7 +151,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) icon = 'icons/obj/fulton.dmi' icon_state = "folded_extraction" -/obj/item/fulton_core/attack_self(mob/user) +/obj/item/fulton_core/attack_self__legacy__attackchain(mob/user) if(do_after(user, 15, target = user) && !QDELETED(src)) new /obj/structure/extraction_point(get_turf(user)) playsound(loc, 'sound/items/deconstruct.ogg', 50, 1) diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm index 837b6b5f8b88b..abb5d60094235 100644 --- a/code/modules/mining/laborcamp/laborshuttle.dm +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -46,7 +46,7 @@ QDEL_NULL(announcer) return ..() -/obj/machinery/mineral/labor_prisoner_shuttle_console/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/labor_prisoner_shuttle_console/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id/prisoner)) if(inserted_id_uid) to_chat(user, "There's an ID inserted already.") @@ -172,7 +172,7 @@ return user.examinate(src) -/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/labor_points_checker/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id/prisoner)) var/obj/item/card/id/prisoner/prisoner_id = I if(!prisoner_id.goal) diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 9780ef5a7c846..494596b6202a5 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -60,7 +60,7 @@ desc = initial(desc) harvested = FALSE -/obj/structure/flora/ash/attackby(obj/item/W, mob/user, params) +/obj/structure/flora/ash/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!harvested && needs_sharp_harvest && W.sharp) user.visible_message("[user] starts to harvest from [src] with [W].","You begin to harvest from [src] with [W].") if(do_after(user, harvest_time, target = src)) diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 94fc152dab4ec..9ef9c6de45e71 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -71,7 +71,7 @@ else . += "It glows weakly." -/obj/item/melee/ghost_sword/attack_self(mob/user) +/obj/item/melee/ghost_sword/attack_self__legacy__attackchain(mob/user) if(summon_cooldown > world.time) to_chat(user, "You just recently called out for aid. You don't want to annoy the spirits.") return @@ -163,7 +163,7 @@ break -/obj/item/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user) +/obj/item/melee/ghost_sword/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user) force = 0 var/ghost_counter = length(orbs) @@ -203,7 +203,7 @@ icon = 'icons/obj/wizard.dmi' icon_state = "vial" -/obj/item/dragons_blood/attack_self(mob/living/carbon/human/user) +/obj/item/dragons_blood/attack_self__legacy__attackchain(mob/living/carbon/human/user) if(!istype(user)) return @@ -273,7 +273,7 @@ . = ..() banned_turfs = typecacheof(list(/turf/space/transit, /turf/simulated/wall, /turf/simulated/mineral)) -/obj/item/lava_staff/attack(mob/target, mob/living/user) +/obj/item/lava_staff/attack__legacy__attackchain(mob/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() @@ -295,7 +295,7 @@ cig.light(user, target) return TRUE -/obj/item/lava_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/lava_staff/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) ..() if(timer > world.time) return diff --git a/code/modules/mining/lavaland/loot/bubblegum_loot.dm b/code/modules/mining/lavaland/loot/bubblegum_loot.dm index 6bd2a3e7ac03b..19d6bf7fff3b9 100644 --- a/code/modules/mining/lavaland/loot/bubblegum_loot.dm +++ b/code/modules/mining/lavaland/loot/bubblegum_loot.dm @@ -85,7 +85,7 @@ icon = 'icons/obj/wizard.dmi' icon_state = "vial" -/obj/item/mayhem/attack_self(mob/user) +/obj/item/mayhem/attack_self__legacy__attackchain(mob/user) for(var/mob/living/carbon/human/H in range(7,user)) spawn() var/obj/effect/mine/pickup/bloodbath/B = new(H) @@ -104,7 +104,7 @@ desc = "Mark your target for death." var/used = FALSE -/obj/item/blood_contract/attack_self(mob/user) +/obj/item/blood_contract/attack_self__legacy__attackchain(mob/user) if(used) return diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index a4786aa23cfdd..740a502eab196 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -49,7 +49,7 @@ ..() ActivationReaction(user,"touch") -/obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params) +/obj/machinery/anomalous_crystal/attackby__legacy__attackchain(obj/item/I, mob/user, params) ActivationReaction(user,"weapon") return ..() diff --git a/code/modules/mining/lavaland/loot/hierophant_loot.dm b/code/modules/mining/lavaland/loot/hierophant_loot.dm index eaa7ecc93184c..940a929eb114e 100644 --- a/code/modules/mining/lavaland/loot/hierophant_loot.dm +++ b/code/modules/mining/lavaland/loot/hierophant_loot.dm @@ -48,7 +48,7 @@ return OBLITERATION -/obj/item/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/hierophant_club/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) ..() if(world.time < timer) return diff --git a/code/modules/mining/lavaland/loot/legion_loot.dm b/code/modules/mining/lavaland/loot/legion_loot.dm index 4153ea14f90fc..afbbc627a4718 100644 --- a/code/modules/mining/lavaland/loot/legion_loot.dm +++ b/code/modules/mining/lavaland/loot/legion_loot.dm @@ -30,7 +30,7 @@ . += "Use it on targets to summon thunderbolts from the sky." . += "The thunderbolts are boosted if in an area with weather effects." -/obj/item/storm_staff/attack(mob/living/target, mob/living/user) +/obj/item/storm_staff/attack__legacy__attackchain(mob/living/target, mob/living/user) if(cigarette_lighter_act(user, target)) return TRUE @@ -62,7 +62,7 @@ thunder_charges-- return TRUE -/obj/item/storm_staff/attack_self(mob/user) +/obj/item/storm_staff/attack_self__legacy__attackchain(mob/user) var/area/user_area = get_area(user) var/turf/user_turf = get_turf(user) if(!user_area || !user_turf) @@ -92,7 +92,7 @@ user.transform *= 1.2 animate(user, color = old_color, transform = old_transform, time = 1 SECONDS) -/obj/item/storm_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/storm_staff/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) // This early return stops the staff from shooting lightning at someone when being used as a lighter. if(iscarbon(target)) var/mob/living/carbon/cig_haver = target diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 956f6ab9c3d12..d0329bf4fcbce 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -45,8 +45,8 @@ . = ..() ADD_TRAIT(src, TRAIT_ADJACENCY_TRANSPARENT, ROUNDSTART_TRAIT) -/obj/item/shared_storage/attackby(obj/item/W, mob/user, params) - bag?.attackby(W, user, params) +/obj/item/shared_storage/attackby__legacy__attackchain(obj/item/W, mob/user, params) + bag?.attackby__legacy__attackchain(W, user, params) /obj/item/shared_storage/attack_ghost(mob/user) if(isobserver(user)) @@ -54,7 +54,7 @@ bag?.show_to(user) return ..() -/obj/item/shared_storage/attack_self(mob/living/carbon/user) +/obj/item/shared_storage/attack_self__legacy__attackchain(mob/living/carbon/user) if(!iscarbon(user)) return if(user.is_holding(src)) @@ -108,7 +108,7 @@ icon_state = "book1" w_class = 2 -/obj/item/book_of_babel/attack_self(mob/user) +/obj/item/book_of_babel/attack_self__legacy__attackchain(mob/user) to_chat(user, "You flip through the pages of the book, quickly and conveniently learning every language in existence. Somewhat less conveniently, the aging book crumbles to dust in the process. Whoops.") user.grant_all_babel_languages() new /obj/effect/decal/cleanable/ash(get_turf(user)) @@ -183,7 +183,7 @@ icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "ship_bottle" -/obj/item/ship_in_a_bottle/attack_self(mob/user) +/obj/item/ship_in_a_bottle/attack_self__legacy__attackchain(mob/user) to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.") playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1) new /obj/vehicle/lavaboat/dragon(get_turf(src)) @@ -210,7 +210,7 @@ var/sight_flags = SEE_MOBS var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE -/obj/item/wisp_lantern/attack_self(mob/user) +/obj/item/wisp_lantern/attack_self__legacy__attackchain(mob/user) if(!wisp) to_chat(user, "The wisp has gone missing!") icon_state = "lantern" @@ -282,7 +282,7 @@ linked = null return ..() -/obj/item/warp_cube/attack_self(mob/user) +/obj/item/warp_cube/attack_self__legacy__attackchain(mob/user) if(!linked) to_chat(user, "[src] fizzles uselessly.") return @@ -402,7 +402,7 @@ else return QDEL_HINT_LETMELIVE -/obj/item/immortality_talisman/attack_self(mob/user) +/obj/item/immortality_talisman/attack_self__legacy__attackchain(mob/user) if(cooldown < world.time) SSblackbox.record_feedback("amount", "immortality_talisman_uses", 1) // usage cooldown = world.time + 600 @@ -433,7 +433,7 @@ . = ..() ADD_TRAIT(src, TRAIT_EFFECT_CAN_TELEPORT, ROUNDSTART_TRAIT) -/obj/effect/immortality_talisman/attackby() +/obj/effect/immortality_talisman/attackby__legacy__attackchain() return /obj/effect/immortality_talisman/ex_act() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 2f9ee2df6cc14..e4b1f52529dbd 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -321,7 +321,7 @@ var/usedHand var/mob/living/carbon/owner -/obj/item/rod_of_asclepius/attack_self(mob/user) +/obj/item/rod_of_asclepius/attack_self__legacy__attackchain(mob/user) if(activated) return if(!iscarbon(user)) @@ -435,7 +435,7 @@ return // It's a shard -/obj/item/organ/internal/cyberimp/arm/katana/attack_self(mob/living/carbon/user, modifiers) +/obj/item/organ/internal/cyberimp/arm/katana/attack_self__legacy__attackchain(mob/living/carbon/user, modifiers) . = ..() to_chat(user,"The mass goes up your arm and inside it!") playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE) @@ -546,11 +546,11 @@ . = ..() reset_inputs(null, TRUE) -/obj/item/cursed_katana/attack_self(mob/user) +/obj/item/cursed_katana/attack_self__legacy__attackchain(mob/user) . = ..() reset_inputs(user, TRUE) -/obj/item/cursed_katana/attack(mob/living/target, mob/user, click_parameters) +/obj/item/cursed_katana/attack__legacy__attackchain(mob/living/target, mob/user, click_parameters) if(target.stat == DEAD || target == user) //No, you can not stab yourself to cloak / not take the penalty for not drawing blood return ..() if(HAS_TRAIT(user, TRAIT_PACIFISM)) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 4c0231627ee32..dbb770a72c7d3 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -180,7 +180,7 @@ message_sent = TRUE // Interactions -/obj/machinery/mineral/ore_redemption/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/ore_redemption/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index bc3a2f957d9a7..660934f55a128 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -220,7 +220,7 @@ return FALSE add_fingerprint() -/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/equipment_vendor/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(panel_open) return TRUE if(istype(I, /obj/item/mining_voucher)) @@ -446,7 +446,7 @@ EQUIPMENT("Point Transfer Card", /obj/item/card/mining_point_card, 500), ) -/obj/machinery/mineral/equipment_vendor/explorer/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/equipment_vendor/explorer/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "explorer-open", "explorer", I)) return if(panel_open) @@ -501,7 +501,7 @@ icon_state = "data" var/points = 500 -/obj/item/card/mining_point_card/attackby(obj/item/I, mob/user, params) +/obj/item/card/mining_point_card/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id)) if(points) var/obj/item/card/id/C = I diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 09508bde00d14..6e4e3bd5f4fa1 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -88,7 +88,7 @@ . += "There is \a [M] installed, using [M.cost]% capacity." -/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params) +/mob/living/simple_animal/hostile/mining_drone/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner)) to_chat(user, "You instruct [src] to drop any collected ore.") DropOre() @@ -188,7 +188,7 @@ /mob/living/simple_animal/hostile/mining_drone/OpenFire(atom/A) if(CheckFriendlyFire(A)) return - stored_gun.afterattack(A, src) //of the possible options to allow minebots to have KA mods, would you believe this is the best? + stored_gun.afterattack__legacy__attackchain(A, src) //of the possible options to allow minebots to have KA mods, would you believe this is the best? /mob/living/simple_animal/hostile/mining_drone/proc/CollectOre() for(var/obj/item/stack/ore/O in range(1, src)) @@ -287,7 +287,7 @@ icon_state = "door_electronics" icon = 'icons/obj/doors/door_assembly.dmi' -/obj/item/mine_bot_upgrade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity) +/obj/item/mine_bot_upgrade/afterattack__legacy__attackchain(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity) if(!istype(M) || !proximity) return upgrade_bot(M, user) @@ -350,7 +350,7 @@ icon_state = "minedronecube" item_state = "electronic" -/obj/item/mining_drone_cube/attack_self(mob/user) +/obj/item/mining_drone_cube/attack_self__legacy__attackchain(mob/user) user.visible_message("\The [src] suddenly expands into a fully functional mining drone!", \ "You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!") new /mob/living/simple_animal/hostile/mining_drone(get_turf(src)) diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 5ff52401effa8..099d937ccd460 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -122,7 +122,7 @@ if("ejectBag") eject_bag(usr) -/obj/machinery/mineral/mint/attackby(obj/item/I, mob/user, params) +/obj/machinery/mineral/mint/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag/money)) if(money_bag) to_chat(user, "There is already a [money_bag.name] inside!") diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index f4f0ed7cae9bf..6c0b366586fa1 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -58,7 +58,7 @@ var/mob/living/L = AM if(istype(L.pulling, /obj/structure/ore_box)) var/obj/structure/ore_box/box = L.pulling - box.attackby(OB, AM) + box.attackby__legacy__attackchain(OB, AM) return ..() /obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) @@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ QDEL_NULL(wires) return ..() -/obj/item/gibtonite/attackby(obj/item/I, mob/user, params) +/obj/item/gibtonite/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!wires && istype(I, /obj/item/assembly/igniter)) user.visible_message("[user] attaches [I] to [src].", "You attach [I] to [src].") wires = new(src) @@ -305,7 +305,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(wires) wires.Interact(user) -/obj/item/gibtonite/attack_self(mob/user) +/obj/item/gibtonite/attack_self__legacy__attackchain(mob/user) if(wires) wires.Interact(user) else @@ -422,7 +422,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(!QDELETED(src) && !P.nodamage && (P.damage_type == BURN)) log_and_set_aflame(P.firer, P) -/obj/item/coin/plasma/attackby(obj/item/I, mob/living/user, params) +/obj/item/coin/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(!I.get_heat()) return ..() log_and_set_aflame(user, I) @@ -448,7 +448,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ credits = 160 COOLDOWN_DECLARE(radiation_cooldown) -/obj/item/coin/uranium/attack_self(mob/user) +/obj/item/coin/uranium/attack_self__legacy__attackchain(mob/user) ..() if(!COOLDOWN_FINISHED(src, radiation_cooldown)) return @@ -501,7 +501,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ name = "syndicate coin" credits = 160 -/obj/item/coin/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/coin/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/CC = W if(string_attached) @@ -548,7 +548,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ user.put_in_hands(ring) -/obj/item/coin/attack_self(mob/user as mob) +/obj/item/coin/attack_self__legacy__attackchain(mob/user as mob) if(cooldown < world.time - 15) var/coinflip = pick(sideslist) cooldown = world.time diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 3ff5be8c1a188..3d5aa45f685fc 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -9,7 +9,7 @@ density = TRUE pressure_resistance = 5 * ONE_ATMOSPHERE -/obj/structure/ore_box/attackby(obj/item/W, mob/user, params) +/obj/structure/ore_box/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/ore)) if(!user.drop_item()) return diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 7c5dd49937b43..49d30828cfa56 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -38,7 +38,7 @@ . = ..() . += extended_desc -/obj/item/mmi/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/item/mmi/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/organ/internal/brain/golem)) to_chat(user, "You can't find a way to plug [O] into [src].") return @@ -126,7 +126,7 @@ "You uninstall the radio from [src].") -/obj/item/mmi/attack_self(mob/user as mob) +/obj/item/mmi/attack_self__legacy__attackchain(mob/user as mob) if(!brainmob) to_chat(user, "You upend the MMI, but there's nothing in it.") else @@ -307,7 +307,7 @@ Whilst these specialty MMIs are rarely used owing to the far greater applicability and convenience of the mindslave implant, they do see occasional employment by undercover agents that wish to stealthily convert the AI-slaved cyborgs of Nanotrasen. \ Just like the mindslave implant, these are extremely illegal in most regions of space. Simple possession (to say nothing of actual use) generally warrants a very long prison sentence." -/obj/item/mmi/syndie/attackby(obj/item/O, mob/user, params) +/obj/item/mmi/syndie/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(!master_uid && ishuman(user) && user.mind && istype(O,/obj/item/organ/internal/brain)) to_chat(user, "You press your thumb on [src] and imprint your user information.") master_uid = user.mind.UID() diff --git a/code/modules/mob/living/brain/robotic_brain.dm b/code/modules/mob/living/brain/robotic_brain.dm index fbaa53320c670..870adf823a289 100644 --- a/code/modules/mob/living/brain/robotic_brain.dm +++ b/code/modules/mob/living/brain/robotic_brain.dm @@ -24,7 +24,7 @@ imprinted_master = null return ..() -/obj/item/mmi/robotic_brain/attack_self(mob/user) +/obj/item/mmi/robotic_brain/attack_self__legacy__attackchain(mob/user) if(isgolem(user)) to_chat(user, "Your golem fingers are too large to press the switch on [src].") return diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 39920b0cacef9..4e11337826aff 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -34,8 +34,8 @@ if(obj_integrity < 90) Die() -/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params) - return O.attack_obj(src, user, params) +/obj/item/clothing/mask/facehugger/attackby__legacy__attackchain(obj/item/O, mob/user, params) + return O.attack_obj__legacy__attackchain(src, user, params) /obj/item/clothing/mask/facehugger/attack_hand(mob/user) if((stat != DEAD && !sterile) && !isalien(user)) @@ -43,7 +43,7 @@ return ..() -/obj/item/clothing/mask/facehugger/attack(mob/living/M, mob/user) +/obj/item/clothing/mask/facehugger/attack__legacy__attackchain(mob/living/M, mob/user) ..() user.unEquip(src) Attach(M) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 681856dc6833f..7e48f88904048 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -21,7 +21,7 @@ if(volume > 10) // Anything over 10 volume will make the mob wetter. wetlevel = min(wetlevel + 1,5) -/mob/living/carbon/attackby(obj/item/I, mob/user, params) +/mob/living/carbon/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(length(surgeries)) if(user.a_intent == INTENT_HELP) for(var/datum/surgery/S in surgeries) diff --git a/code/modules/mob/living/carbon/human/human_deadchat_control.dm b/code/modules/mob/living/carbon/human/human_deadchat_control.dm index fdb6db4f5b6de..2c1092efbaced 100644 --- a/code/modules/mob/living/carbon/human/human_deadchat_control.dm +++ b/code/modules/mob/living/carbon/human/human_deadchat_control.dm @@ -118,7 +118,7 @@ visible_message("[src] points [held_gun] towards [possible_target]!") return // for his neutral special, he wields a Gun - held_gun.afterattack(possible_target, src) + held_gun.afterattack__legacy__attackchain(possible_target, src) visible_message("[src] fires [held_gun][isturf(possible_target) ? "" : " towards [possible_target]!"]") /mob/living/carbon/human/proc/dchat_step(dir) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dc716c7d532f0..f44685b03377c 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -466,7 +466,7 @@ emp_act return ..() //Returns TRUE if the attack hit, FALSE if it missed. -/mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user, def_zone) +/mob/living/carbon/human/attacked_by__legacy__attackchain(obj/item/I, mob/living/user, def_zone) if(!I || !user) return FALSE @@ -819,7 +819,7 @@ emp_act -/mob/living/carbon/human/attackby(obj/item/I, mob/user, params) +/mob/living/carbon/human/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(SEND_SIGNAL(src, COMSIG_HUMAN_ATTACKED, user) & COMPONENT_CANCEL_ATTACK_CHAIN) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/human_inventory.dm b/code/modules/mob/living/carbon/human/human_inventory.dm index f845177919589..4f87fe4ff7abe 100644 --- a/code/modules/mob/living/carbon/human/human_inventory.dm +++ b/code/modules/mob/living/carbon/human/human_inventory.dm @@ -335,7 +335,7 @@ I.forceMove(back) if(ITEM_SLOT_ACCESSORY) var/obj/item/clothing/under/uniform = src.w_uniform - uniform.attackby(I, src) + uniform.attackby__legacy__attackchain(I, src) else to_chat(src, "You are trying to equip this item to an unsupported inventory slot. Report this to a coder!") diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index c5ebf064008c3..086d8272ac533 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -575,7 +575,7 @@ target.visible_message("[user] has knocked down [target]!", \ "[user] has knocked down [target]!") target.KnockDown(4 SECONDS) - SEND_SIGNAL(target, COMSIG_PARENT_ATTACKBY) + SEND_SIGNAL(target, COMSIG_ATTACK_BY) /datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(user == target) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index abb29f946ebed..c38a25432fecb 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -758,7 +758,7 @@ cloth_golem = null qdel(src) -/obj/structure/cloth_pile/attackby(obj/item/P, mob/living/carbon/human/user, params) +/obj/structure/cloth_pile/attackby__legacy__attackchain(obj/item/P, mob/living/carbon/human/user, params) . = ..() if(resistance_flags & ON_FIRE) diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm index 93700276264d2..9e589873c6e76 100644 --- a/code/modules/mob/living/silicon/decoy/decoy.dm +++ b/code/modules/mob/living/silicon/decoy/decoy.dm @@ -6,7 +6,7 @@ mobility_flags = 0 a_intent = INTENT_HARM // This is apparently the only thing that stops other mobs walking through them as if they were thin air. -/mob/living/silicon/decoy/attackby(obj/item/W, mob/user, params) +/mob/living/silicon/decoy/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/aicard)) to_chat(user, "You cannot find an intellicard slot on [src].") return TRUE diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 356cddbb192dd..dd136add437d8 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -288,7 +288,7 @@ update_icons() //Overriding this will stop a number of headaches down the track. -/mob/living/silicon/pai/attackby(obj/item/W as obj, mob/user as mob, params) +/mob/living/silicon/pai/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/stack/nanopaste)) var/obj/item/stack/nanopaste/N = W if(stat == DEAD) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index af23670492094..ef250a010f358 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -10,10 +10,10 @@ "wood" = 0 ) -/obj/item/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) +/obj/item/matter_decompiler/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/living/carbon/user as mob) return -/obj/item/matter_decompiler/afterattack(atom/target, mob/living/user, proximity, params) +/obj/item/matter_decompiler/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity, params) if(!proximity) return // Not adjacent. diff --git a/code/modules/mob/living/silicon/robot/drone/maint_drone.dm b/code/modules/mob/living/silicon/robot/drone/maint_drone.dm index 2f15d921bc370..1e5b4e52b887f 100644 --- a/code/modules/mob/living/silicon/robot/drone/maint_drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/maint_drone.dm @@ -155,7 +155,7 @@ . += "The ever-loyal workers of Nanotrasen facilities. Known for their small and cute look, these drones seek only to repair damaged parts of the station, being lawed against hurting even a spiderling. These fine drones are programmed against interfering with any business of anyone, so they won't do anything you don't want them to." //Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..(). -/mob/living/silicon/robot/drone/attackby(obj/item/I, mob/user, params) +/mob/living/silicon/robot/drone/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/borg/upgrade)) to_chat(user, "The maintenance drone chassis is not compatible with [I].") return diff --git a/code/modules/mob/living/silicon/robot/misc_robot_items.dm b/code/modules/mob/living/silicon/robot/misc_robot_items.dm index 22b21a4104c3d..a0410be25c944 100644 --- a/code/modules/mob/living/silicon/robot/misc_robot_items.dm +++ b/code/modules/mob/living/silicon/robot/misc_robot_items.dm @@ -6,7 +6,7 @@ name = "Printing Pen" var/mode = 1 -/obj/item/pen/multi/robopen/attack_self(mob/user as mob) +/obj/item/pen/multi/robopen/attack_self__legacy__attackchain(mob/user as mob) var/choice = tgui_input_list(user, "Would you like to change colour or mode?", name, list("Colour","Mode")) if(!choice) return @@ -45,10 +45,10 @@ icon_state = "paper_bin1" item_state = "sheet-metal" -/obj/item/form_printer/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) +/obj/item/form_printer/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/living/carbon/user as mob) return -/obj/item/form_printer/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) +/obj/item/form_printer/afterattack__legacy__attackchain(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) if(!target || !flag) return @@ -56,7 +56,7 @@ if(istype(target,/obj/structure/table)) deploy_paper(get_turf(target)) -/obj/item/form_printer/attack_self(mob/user as mob) +/obj/item/form_printer/attack_self__legacy__attackchain(mob/user as mob) deploy_paper(get_turf(src)) /obj/item/form_printer/proc/deploy_paper(turf/T) diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index d05a6284a755b..3e1b5940227c1 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -920,7 +920,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( return 2 -/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params) +/mob/living/silicon/robot/attackby__legacy__attackchain(obj/item/W, mob/user, params) // Check if the user is trying to insert another component like a radio, actuator, armor etc. if(istype(W, /obj/item/robot_parts/robot_component) && opened) for(var/V in components) @@ -978,7 +978,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( else if(istype(W, /obj/item/encryptionkey/) && opened) if(radio)//sanityyyyyy - radio.attackby(W,user)//GTFO, you have your own procs + radio.attackby__legacy__attackchain(W,user)//GTFO, you have your own procs else to_chat(user, "Unable to locate a radio.") @@ -1132,7 +1132,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( -/mob/living/silicon/robot/attacked_by(obj/item/I, mob/living/user, def_zone) +/mob/living/silicon/robot/attacked_by__legacy__attackchain(obj/item/I, mob/living/user, def_zone) if(I.force && I.damtype != STAMINA && stat != DEAD) //only sparks if real damage is dealt. spark_system.start() ..() @@ -1303,7 +1303,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(href_list["mod"]) var/obj/item/O = locate(href_list["mod"]) if(istype(O) && (O.loc == src)) - O.attack_self(src) + O.attack_self__legacy__attackchain(src) return 1 if(href_list["act"]) @@ -1456,7 +1456,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/obj/item/W = get_active_hand() if(W) - W.attack_self(src) + W.attack_self__legacy__attackchain(src) /mob/living/silicon/robot/proc/SetLockdown(state = TRUE) // They stay locked down if their wire is cut. diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 922bc893b0d47..4387f96dabd6f 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -415,7 +415,7 @@ process_chamber() //Cannot manually remove syringes -/obj/item/gun/syringemalf/attack_self(mob/living/user) +/obj/item/gun/syringemalf/attack_self__legacy__attackchain(mob/living/user) return //Load syringe into the chamber @@ -601,7 +601,7 @@ attack_verb = list("smashed", "slammed", "whacked", "thwacked", "swept") force = 20 -/obj/item/malfbroom/attack(mob/target, mob/user) +/obj/item/malfbroom/attack__legacy__attackchain(mob/target, mob/user) if(!ishuman(target)) return ..() var/mob/living/carbon/human/H = target diff --git a/code/modules/mob/living/silicon/robot/syndicate_robot.dm b/code/modules/mob/living/silicon/robot/syndicate_robot.dm index d88415375b6e4..35215d7f23621 100644 --- a/code/modules/mob/living/silicon/robot/syndicate_robot.dm +++ b/code/modules/mob/living/silicon/robot/syndicate_robot.dm @@ -111,9 +111,9 @@ if(!cham_proj) to_chat(src, "Error : No chameleon projector system found.") return - cham_proj.attack_self(src) + cham_proj.attack_self__legacy__attackchain(src) -/mob/living/silicon/robot/syndicate/saboteur/attackby() +/mob/living/silicon/robot/syndicate/saboteur/attackby__legacy__attackchain() if(cham_proj) cham_proj.disrupt(src) ..() diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index 157e2fea9dd4a..feb6cc0a63848 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -280,7 +280,7 @@ return 2 -/mob/living/silicon/attacked_by(obj/item/I, mob/living/user, def_zone) +/mob/living/silicon/attacked_by__legacy__attackchain(obj/item/I, mob/living/user, def_zone) if(istype(I, /obj/item/clothing/head) && user.a_intent == INTENT_HELP) place_on_head(user.get_active_hand(), user) return TRUE diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 9df8ebb79c92d..d99ec190c8339 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -1,4 +1,4 @@ -/mob/living/simple_animal/attackby(obj/item/O, mob/living/user) +/mob/living/simple_animal/attackby__legacy__attackchain(obj/item/O, mob/living/user) if(can_collar && istype(O, /obj/item/petcollar) && !pcollar) add_collar(O, user) return diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index f3c2996519022..f110db49ec455 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -395,7 +395,7 @@ /mob/living/simple_animal/bot/proc/interact(mob/user) show_controls(user) -/mob/living/simple_animal/bot/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) if(allowed(user) && !open && !emagged) locked = !locked diff --git a/code/modules/mob/living/simple_animal/bot/bot_construction.dm b/code/modules/mob/living/simple_animal/bot/bot_construction.dm index 3974ef55abedf..d7c307eb3301b 100644 --- a/code/modules/mob/living/simple_animal/bot/bot_construction.dm +++ b/code/modules/mob/living/simple_animal/bot/bot_construction.dm @@ -14,7 +14,7 @@ var/created_name = "Cleanbot" var/robot_arm = /obj/item/robot_parts/l_arm -/obj/item/bucket_sensor/attackby(obj/item/W, mob/user as mob, params) +/obj/item/bucket_sensor/attackby__legacy__attackchain(obj/item/W, mob/user as mob, params) ..() if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm)) if(!user.unEquip(W)) @@ -49,7 +49,7 @@ var/lasercolor = "" var/new_name = "" -/obj/item/ed209_assembly/attackby(obj/item/W, mob/user, params) +/obj/item/ed209_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(is_pen(W)) @@ -248,7 +248,7 @@ desc = "It's a toolbox with tiles sticking out the top and a sensor attached." icon_state = "toolbox_tiles_sensor" -/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) +/obj/item/storage/toolbox/attackby__legacy__attackchain(obj/item/stack/tile/plasteel/T, mob/user, params) if(!istype(T, /obj/item/stack/tile/plasteel)) ..() return @@ -289,7 +289,7 @@ /obj/item/toolbox_tiles/update_icon_state() icon_state = "[toolbox_color]toolbox_tiles" -/obj/item/toolbox_tiles/attackby(obj/item/W, mob/user, params) +/obj/item/toolbox_tiles/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(isprox(W)) qdel(W) @@ -313,7 +313,7 @@ /obj/item/toolbox_tiles/sensor/update_icon_state() icon_state = "[toolbox_color]toolbox_tiles_sensor" -/obj/item/toolbox_tiles/sensor/attackby(obj/item/W, mob/user, params) +/obj/item/toolbox_tiles/sensor/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm)) qdel(W) @@ -325,7 +325,7 @@ qdel(src) //Medbot Assembly -/obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params) +/obj/item/storage/firstaid/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm)) return ..() else @@ -383,7 +383,7 @@ if(build_step > 0) . += "na_scanner" -/obj/item/firstaid_arm_assembly/attackby(obj/item/I, mob/user, params) +/obj/item/firstaid_arm_assembly/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(is_pen(I)) var/t = rename_interactive(user, I, prompt = "Enter new robot name") @@ -442,7 +442,7 @@ var/build_step = 0 var/robot_arm = /obj/item/robot_parts/l_arm -/obj/item/clothing/head/helmet/attackby(obj/item/assembly/signaler/S, mob/user, params) +/obj/item/clothing/head/helmet/attackby__legacy__attackchain(obj/item/assembly/signaler/S, mob/user, params) ..() if(!issignaler(S)) ..() @@ -459,7 +459,7 @@ qdel(src) -/obj/item/secbot_assembly/attackby(obj/item/I, mob/user, params) +/obj/item/secbot_assembly/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(I.tool_behaviour == TOOL_WELDER && I.use_tool(src, user, volume = I.tool_volume)) if(!build_step) @@ -564,7 +564,7 @@ var/build_step = 0 var/toy_step = 0 -/obj/item/griefsky_assembly/attackby(obj/item/I, mob/user, params) +/obj/item/griefsky_assembly/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if((istype(I, /obj/item/melee/energy/sword)) && (build_step < 3)) if(!user.unEquip(I)) @@ -612,7 +612,7 @@ return TRUE //Honkbot Assembly -/obj/item/storage/box/clown/attackby(obj/item/W, mob/user, params) +/obj/item/storage/box/clown/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!istype(W, /obj/item/robot_parts/l_arm) && !istype(W, /obj/item/robot_parts/r_arm)) return ..() else @@ -640,7 +640,7 @@ var/created_name = "Honkbot" //To preserve the name if it's a unique medbot I guess var/robot_arm = /obj/item/robot_parts/l_arm -/obj/item/honkbot_arm_assembly/attackby(obj/item/W, mob/user, params) +/obj/item/honkbot_arm_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(build_step == 0) if(istype(W, /obj/item/assembly/prox_sensor)) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 5c44404782ee5..f9ed81612f1e7 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -88,7 +88,7 @@ text_dehack = "[name]'s software has been reset!" text_dehack_fail = "[name] does not seem to respond to your repair code!" -/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/cleanbot/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) if(allowed(user) && !open && !emagged) locked = !locked diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 105fe7d83944c..ec63bdb27f426 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -184,7 +184,7 @@ retaliate(H) return ..() -/mob/living/simple_animal/bot/ed209/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/ed209/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(W.force && !target && W.damtype != STAMINA) retaliate(user) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index d1deee6abc414..20b1ec93929f3 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -133,7 +133,7 @@ if("ejectpai") ejectpai() -/mob/living/simple_animal/bot/floorbot/attackby(obj/item/W , mob/user, params) +/mob/living/simple_animal/bot/floorbot/attackby__legacy__attackchain(obj/item/W , mob/user, params) if(istype(W, /obj/item/stack/tile/plasteel)) var/obj/item/stack/tile/plasteel/T = W if(amount >= MAX_AMOUNT) diff --git a/code/modules/mob/living/simple_animal/bot/griefsky.dm b/code/modules/mob/living/simple_animal/bot/griefsky.dm index f91168748fead..e2e0296b7f80c 100644 --- a/code/modules/mob/living/simple_animal/bot/griefsky.dm +++ b/code/modules/mob/living/simple_animal/bot/griefsky.dm @@ -222,7 +222,7 @@ return return ..() -/mob/living/simple_animal/bot/secbot/griefsky/attackby(obj/item/W, mob/user, params) //cant touch or attack him while spinning +/mob/living/simple_animal/bot/secbot/griefsky/attackby__legacy__attackchain(obj/item/W, mob/user, params) //cant touch or attack him while spinning if(src.icon_state == spin_icon) if(prob(block_chance_melee)) user.changeNext_move(CLICK_CD_MELEE) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 5112d7e626814..d7736b24c2081 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -112,7 +112,7 @@ addtimer(CALLBACK(src, PROC_REF(react_buzz)), 5) return ..() -/mob/living/simple_animal/bot/honkbot/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/honkbot/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry. return diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index d3245101d07c5..91d39972eeb4a 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -236,7 +236,7 @@ reagent_glass.forceMove(get_turf(src)) reagent_glass = null -/mob/living/simple_animal/bot/medbot/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/medbot/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/reagent_containers/glass)) . = TRUE //no afterattack if(locked) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 80904841ab2eb..ad9eca0a77871 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -100,7 +100,7 @@ ..() reached_target = 0 -/mob/living/simple_animal/bot/mulebot/attackby(obj/item/I, mob/user, params) +/mob/living/simple_animal/bot/mulebot/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I,/obj/item/stock_parts/cell) && open && !cell) if(!user.drop_item()) return diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 0a9f94f34f3f0..e0c34eb5c94f7 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -192,7 +192,7 @@ retaliate(H) return ..() -/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/user, params) +/mob/living/simple_animal/bot/secbot/attackby__legacy__attackchain(obj/item/W, mob/user, params) ..() if(W.force && !target && W.damtype != STAMINA) retaliate(user) diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index a5f8d3deab569..bbd7799283489 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -115,7 +115,7 @@ /mob/living/simple_animal/pet/dog/corgi/RangedAttack(atom/A, params) if(inventory_back) - inventory_back.afterattack(A, src) + inventory_back.afterattack__legacy__attackchain(A, src) /mob/living/simple_animal/pet/dog/corgi/UnarmedAttack(atom/A) if(istype(inventory_back, /obj/item/extinguisher)) @@ -184,7 +184,7 @@ armorval += inventory_back.armor.getRating(type) return armorval * 0.5 -/mob/living/simple_animal/pet/dog/corgi/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/pet/dog/corgi/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/razor)) if(shaved) to_chat(user, "You can't shave this corgi, it's already been shaved!") 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 32aace078b5a4..e981995f26dc0 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -73,7 +73,7 @@ if(stat == CONSCIOUS) eat_plants() -/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O as obj, mob/user as mob, params) +/mob/living/simple_animal/hostile/retaliate/goat/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass)) udder.milkAnimal(O, user) else @@ -146,7 +146,7 @@ QDEL_NULL(udder) return ..() -/mob/living/simple_animal/cow/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/cow/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass)) udder.milkAnimal(O, user) return TRUE @@ -314,7 +314,7 @@ GLOBAL_VAR_INIT(chicken_count, 0) return GLOB.chicken_count -= 1 -/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/chicken/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, food_type)) //feedin' dem chickens if(stat == CONSCIOUS && eggsleft < 8) var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]" diff --git a/code/modules/mob/living/simple_animal/friendly/nian_caterpillar.dm b/code/modules/mob/living/simple_animal/friendly/nian_caterpillar.dm index 31cc4310a2384..ebffde91bd8db 100644 --- a/code/modules/mob/living/simple_animal/friendly/nian_caterpillar.dm +++ b/code/modules/mob/living/simple_animal/friendly/nian_caterpillar.dm @@ -124,7 +124,7 @@ else get_scooped(M) -/mob/living/simple_animal/nian_caterpillar/attacked_by(obj/item/I, mob/living/user, def_zone) +/mob/living/simple_animal/nian_caterpillar/attacked_by__legacy__attackchain(obj/item/I, mob/living/user, def_zone) if(istype(I, /obj/item/melee/flyswatter) && I.force) gib() // Commit die. else diff --git a/code/modules/mob/living/simple_animal/friendly/pet.dm b/code/modules/mob/living/simple_animal/friendly/pet.dm index 3454ff0468017..3fe1738f7f2a5 100644 --- a/code/modules/mob/living/simple_animal/friendly/pet.dm +++ b/code/modules/mob/living/simple_animal/friendly/pet.dm @@ -7,7 +7,7 @@ speed = 0 // same speed as a person. hud_type = /datum/hud/corgi -/mob/living/simple_animal/pet/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/pet/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(!istype(O, /obj/item/newspaper)) return ..() var/obj/item/newspaper/paper = O diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 863b98e530c97..2b1c3ecc76c42 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -46,7 +46,7 @@ eject_brain() return ..() -/mob/living/simple_animal/spiderbot/attackby(obj/item/O, mob/living/user, params) +/mob/living/simple_animal/spiderbot/attackby__legacy__attackchain(obj/item/O, mob/living/user, params) if(istype(O, /obj/item/mmi)) var/obj/item/mmi/B = O if(mmi) //There's already a brain in it. diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index dcbcc16ba39c8..db719c53f01bb 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -286,7 +286,7 @@ var/mob/living/simple_animal/hostile/poison/bees/queen/queen -/obj/item/queen_bee/attackby(obj/item/I, mob/user, params) +/obj/item/queen_bee/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/reagent_containers/syringe)) return ..() var/obj/item/reagent_containers/syringe/S = I diff --git a/code/modules/mob/living/simple_animal/hostile/hellhound.dm b/code/modules/mob/living/simple_animal/hostile/hellhound.dm index 559e9f7fd5bba..d87fbc58aa057 100644 --- a/code/modules/mob/living/simple_animal/hostile/hellhound.dm +++ b/code/modules/mob/living/simple_animal/hostile/hellhound.dm @@ -92,7 +92,7 @@ return TRUE return FALSE -/mob/living/simple_animal/hostile/hellhound/attackby(obj/item/C, mob/user, params) +/mob/living/simple_animal/hostile/hellhound/attackby__legacy__attackchain(obj/item/C, mob/user, params) . = ..() if(target && isliving(target)) var/mob/living/L = target diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index ecf791c723cbb..04cce099cb2fc 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -115,7 +115,7 @@ Move(get_step(src, chosen_dir)) face_atom(target) //Looks better if they keep looking at you when dodging -/mob/living/simple_animal/hostile/attacked_by(obj/item/I, mob/living/user) +/mob/living/simple_animal/hostile/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client && user) FindTarget(list(user), 1) return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm index 07def89e33008..9dbac40967d7d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm @@ -344,7 +344,7 @@ Difficulty: Hard if(P.damage) disable_shield() -/mob/living/simple_animal/hostile/megafauna/ancient_robot/attacked_by(obj/item/I, mob/living/user) +/mob/living/simple_animal/hostile/megafauna/ancient_robot/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) if(!body_shield_enabled) return ..() do_sparks(2, 1, src) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 400e87cc01d0f..3ef8d70604be0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -116,7 +116,7 @@ Difficulty: Medium force = 6 force_on = 10 -/obj/item/melee/energy/cleaving_saw/miner/attack(mob/living/target, mob/living/carbon/human/user) +/obj/item/melee/energy/cleaving_saw/miner/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user) target.add_stun_absorption("miner", 10, INFINITY) ..() target.remove_stun_absorption("miner") diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 943b86921906e..59d2e4b3e86ec 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -784,7 +784,7 @@ Difficulty: Hard /obj/effect/hierophant/ex_act() return -/obj/effect/hierophant/attackby(obj/item/I, mob/user, params) +/obj/effect/hierophant/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/hierophant_club)) var/obj/item/hierophant_club/H = I if(H.timer > world.time) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm index 7f780f02737c1..229d8c8e0a69f 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm @@ -297,7 +297,7 @@ While using this makes the system rely on OnFire, it still gives options for tim var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(mychild)) H.color = "#FF0000" -/obj/structure/elite_tumor/attackby(obj/item/attacking_item, mob/user, params) +/obj/structure/elite_tumor/attackby__legacy__attackchain(obj/item/attacking_item, mob/user, params) . = ..() if(istype(attacking_item, /obj/item/organ/internal/regenerative_core) && activity == TUMOR_INACTIVE && !boosted) var/obj/item/organ/internal/regenerative_core/core = attacking_item @@ -425,7 +425,7 @@ While using this makes the system rely on OnFire, it still gives options for tim throw_speed = 3 throw_range = 5 -/obj/item/tumor_shard/afterattack(atom/target, mob/user, proximity_flag) +/obj/item/tumor_shard/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag) . = ..() if(istype(target, /mob/living/simple_animal/hostile/asteroid/elite) && proximity_flag) var/mob/living/simple_animal/hostile/asteroid/elite/E = target diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/goliath_broodmother.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/goliath_broodmother.dm index c2bfa29476cbd..204e21a3c66cf 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/goliath_broodmother.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/goliath_broodmother.dm @@ -263,7 +263,7 @@ if(prob(bonus_value) && target.stat != DEAD) new /obj/effect/temp_visual/goliath_tentacle/broodmother/patch(get_turf(target), user) -/obj/item/crusher_trophy/broodmother_tongue/attack_self(mob/user) +/obj/item/crusher_trophy/broodmother_tongue/attack_self__legacy__attackchain(mob/user) if(!isliving(user)) return var/mob/living/living_user = user diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm index cf8b65a09d9c1..037ab6c2551f8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm @@ -337,7 +337,7 @@ A.friends += user A.faction = user.faction.Copy() -/obj/item/crusher_trophy/legionnaire_spine/attack_self(mob/user) +/obj/item/crusher_trophy/legionnaire_spine/attack_self__legacy__attackchain(mob/user) if(!isliving(user)) return var/mob/living/LivingUser = user diff --git a/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm index a4283dd927aaa..8152bc5e4fd65 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm @@ -39,9 +39,9 @@ animal_species = /mob/living/simple_animal/hostile/asteroid/gutlunch childtype = list(/mob/living/simple_animal/hostile/asteroid/gutlunch/grublunch = 100) - wanted_objects = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/organ/internal/eyes, - /obj/item/organ/internal/heart, /obj/item/organ/internal/lungs, - /obj/item/organ/internal/liver, /obj/item/organ/internal/kidneys, + wanted_objects = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/organ/internal/eyes, + /obj/item/organ/internal/heart, /obj/item/organ/internal/lungs, + /obj/item/organ/internal/liver, /obj/item/organ/internal/kidneys, /obj/item/organ/internal/appendix) var/obj/item/udder/gutlunch/udder = null @@ -58,7 +58,7 @@ if(udder.reagents.total_volume == udder.reagents.maximum_volume) add_overlay("gl_full") -/mob/living/simple_animal/hostile/asteroid/gutlunch/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/hostile/asteroid/gutlunch/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass)) udder.milkAnimal(O, user) regenerate_icons() diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 5a49fc3311436..2bb2f7ece42f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -151,7 +151,7 @@ src.visible_message("[src] was bruised!") bruised = 1 -/mob/living/simple_animal/hostile/mushroom/attackby(obj/item/I as obj, mob/user as mob, params) +/mob/living/simple_animal/hostile/mushroom/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/food/grown/mushroom)) if(stat == DEAD && !recovery_cooldown) Recover() diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm b/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm index 3021c468cbd6a..b982c5168b522 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm @@ -60,7 +60,7 @@ var/melee_block_chance = 20 var/ranged_block_chance = 35 -/mob/living/simple_animal/hostile/syndicate/melee/attackby(obj/item/O as obj, mob/user as mob, params) +/mob/living/simple_animal/hostile/syndicate/melee/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) if(O.force) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index edc9434b2e920..1d4cd2ecaf82d 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -167,7 +167,7 @@ return //Mobs with objects -/mob/living/simple_animal/parrot/attackby(obj/item/O, mob/user, params) +/mob/living/simple_animal/parrot/attackby__legacy__attackchain(obj/item/O, mob/user, params) ..() if(stat == CONSCIOUS && !client && !istype(O, /obj/item/stack/medical)) if(O.force) diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm index 7505d6ec02e2d..e0680fdc37d3c 100644 --- a/code/modules/mob/living/simple_animal/posessed_object.dm +++ b/code/modules/mob/living/simple_animal/posessed_object.dm @@ -144,7 +144,7 @@ name = spirit_name if(A == src) // If we're clicking ourself we should not attack ourself. - possessed_item.attack_self(src) + possessed_item.attack_self__legacy__attackchain(src) else ..() @@ -173,7 +173,7 @@ set_opacity(possessed_item.opacity) return ..(NONE) -/mob/living/simple_animal/possessed_object/attackby(obj/item/O, mob/living/user) +/mob/living/simple_animal/possessed_object/attackby__legacy__attackchain(obj/item/O, mob/living/user) . = ..() if(istype(O, /obj/item/nullrod)) visible_message("[O] dispels the spooky aura!") diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 61cd634b258c6..7bc00e3cf489f 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -33,7 +33,7 @@ initial_traits = list(TRAIT_FLYING, TRAIT_SHOCKIMMUNE) var/holy = FALSE -/mob/living/simple_animal/shade/attackby(obj/item/O, mob/user) //Marker -Agouri +/mob/living/simple_animal/shade/attackby__legacy__attackchain(obj/item/O, mob/user) //Marker -Agouri if(istype(O, /obj/item/soulstone)) var/obj/item/soulstone/SS = O SS.transfer_soul("SHADE", src, user) diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm index 08682a4717ad2..ce0a5d3087ace 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm @@ -353,7 +353,7 @@ -/mob/living/simple_animal/slime/attackby(obj/item/I, mob/living/user, params) +/mob/living/simple_animal/slime/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(stat == DEAD && length(surgeries)) if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM) for(var/datum/surgery/S in surgeries) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 64d4aad8058ac..b1a145c43906f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -701,12 +701,18 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(hand) var/obj/item/W = l_hand if(W) - W.attack_self(src) + if(W.new_attack_chain) + W.activate_self(src) + else + W.attack_self__legacy__attackchain(src) update_inv_l_hand() else var/obj/item/W = r_hand if(W) - W.attack_self(src) + if(W.new_attack_chain) + W.activate_self(src) + else + W.attack_self__legacy__attackchain(src) update_inv_r_hand() return diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 793850891d852..99cf29d37794d 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -247,7 +247,7 @@ adjust_position() -/obj/item/grab/attack_self(mob/user) +/obj/item/grab/attack_self__legacy__attackchain(mob/user) s_click(hud) //Updating pixelshift, position and direction @@ -370,7 +370,7 @@ return 1 -/obj/item/grab/attack(mob/living/M, mob/living/carbon/user) +/obj/item/grab/attack__legacy__attackchain(mob/living/M, mob/living/carbon/user) if(!affecting) return diff --git a/code/modules/mob/mob_holder.dm b/code/modules/mob/mob_holder.dm index f99b8229166eb..18290c6cecb02 100644 --- a/code/modules/mob/mob_holder.dm +++ b/code/modules/mob/mob_holder.dm @@ -25,9 +25,9 @@ qdel(src) -/obj/item/holder/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/holder/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) for(var/mob/M in src.contents) - M.attackby(W,user, params) + M.attackby__legacy__attackchain(W,user, params) /obj/item/holder/proc/show_message(message, m_type, chat_message_type) for(var/mob/living/M in contents) diff --git a/code/modules/mod/mod_construction.dm b/code/modules/mod/mod_construction.dm index e74d76e3a35da..059495b3c001c 100644 --- a/code/modules/mod/mod_construction.dm +++ b/code/modules/mod/mod_construction.dm @@ -126,7 +126,7 @@ display_text = "All it's missing is external plating..." . += "[display_text]" -/obj/item/mod/construction/shell/attackby(obj/item/part, mob/user, params) +/obj/item/mod/construction/shell/attackby__legacy__attackchain(obj/item/part, mob/user, params) . = ..() switch(construction_step) if(START_STEP) diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index d0da24d5ac154..21b9618c2d48c 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -352,7 +352,7 @@ playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) return FALSE -/obj/item/mod/control/attackby(obj/item/attacking_item, mob/living/user, params) +/obj/item/mod/control/attackby__legacy__attackchain(obj/item/attacking_item, mob/living/user, params) if(istype(attacking_item, /obj/item/mod/module)) if(!open) to_chat(user, "Open the cover first!") @@ -399,7 +399,7 @@ else if(istype(attacking_item, /obj/item/mod/skin_applier)) return ..() else if(bag && istype(attacking_item)) - bag.attackby(attacking_item, user, params) + bag.attackby__legacy__attackchain(attacking_item, user, params) return ..() diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm index 40d9abe1a3a4e..be25414c8afce 100644 --- a/code/modules/mod/mod_core.dm +++ b/code/modules/mod/mod_core.dm @@ -213,13 +213,13 @@ if(cell) to_chat(user, "Cell already installed!") playsound(mod, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK user.drop_item() install_cell(attacking_item) to_chat(user, "You install the cell.") playsound(mod, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) mod.update_charge_alert() - return COMPONENT_NO_AFTERATTACK + return COMPONENT_SKIP_AFTERATTACK return NONE /obj/item/mod/core/standard/proc/on_wearer_set(datum/source, mob/user) @@ -252,7 +252,7 @@ /// Associated list of charge sources, only stacks allowed. var/list/charger_list = list(/obj/item/stack/ore/plasma, /obj/item/stack/sheet/mineral/plasma) -/obj/item/mod/core/plasma/attackby(obj/item/attacking_item, mob/user, params) +/obj/item/mod/core/plasma/attackby__legacy__attackchain(obj/item/attacking_item, mob/user, params) if(charge_plasma(attacking_item, user)) return TRUE return ..() diff --git a/code/modules/mod/modules/_modules.dm b/code/modules/mod/modules/_modules.dm index 1d9bb25290d0c..20384feb6d857 100644 --- a/code/modules/mod/modules/_modules.dm +++ b/code/modules/mod/modules/_modules.dm @@ -398,7 +398,7 @@ return FALSE return TRUE -/obj/item/mod/module/anomaly_locked/attackby(obj/item/item, mob/living/user, params) +/obj/item/mod/module/anomaly_locked/attackby__legacy__attackchain(obj/item/item, mob/living/user, params) if(item.type in accepted_anomalies) if(core) to_chat(user, "A core is already installed!") diff --git a/code/modules/mod/modules/module_pathfinder.dm b/code/modules/mod/modules/module_pathfinder.dm index c99b4989b09d5..020e048bf0353 100644 --- a/code/modules/mod/modules/module_pathfinder.dm +++ b/code/modules/mod/modules/module_pathfinder.dm @@ -31,7 +31,7 @@ else . += "The implant is missing." -/obj/item/mod/module/pathfinder/attack(mob/living/target, mob/living/user, params) +/obj/item/mod/module/pathfinder/attack__legacy__attackchain(mob/living/target, mob/living/user, params) if(!ishuman(target) || !implant) return if(!do_after(user, 1.5 SECONDS, target = target)) diff --git a/code/modules/mod/modules/modules_antag.dm b/code/modules/mod/modules/modules_antag.dm index 909cb209e5048..f33db48aa27f2 100644 --- a/code/modules/mod/modules/modules_antag.dm +++ b/code/modules/mod/modules/modules_antag.dm @@ -287,7 +287,7 @@ RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, PROC_REF(unstealth)) RegisterSignal(mod.wearer, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, PROC_REF(on_unarmed_attack)) RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act)) - RegisterSignals(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW), PROC_REF(unstealth)) + RegisterSignals(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_ATTACK_BY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW), PROC_REF(unstealth)) mod.wearer.set_alpha_tracking(stealth_alpha, src, update_alpha = FALSE) animate(mod.wearer, alpha = mod.wearer.get_alpha(), time = 1.5 SECONDS) drain_power(use_power_cost) @@ -298,7 +298,7 @@ return if(bumpoff) UnregisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP) - UnregisterSignal(mod.wearer, list(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, COMSIG_MOB_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_BULLET_ACT, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW)) + UnregisterSignal(mod.wearer, list(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, COMSIG_MOB_ITEM_ATTACK, COMSIG_ATTACK_BY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_BULLET_ACT, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW)) mod.wearer.set_alpha_tracking(ALPHA_VISIBLE, src, update_alpha = FALSE) animate(mod.wearer, alpha = mod.wearer.get_alpha(), time = 1.5 SECONDS) diff --git a/code/modules/mod/modules/modules_engineering.dm b/code/modules/mod/modules/modules_engineering.dm index e5abb7c873a29..230f9d1634114 100644 --- a/code/modules/mod/modules/modules_engineering.dm +++ b/code/modules/mod/modules/modules_engineering.dm @@ -188,7 +188,7 @@ var/metal_synthesis_charge = 5 COOLDOWN_DECLARE(nanofrost_cooldown) -/obj/item/extinguisher/mini/mod/attack_self(mob/user) +/obj/item/extinguisher/mini/mod/attack_self__legacy__attackchain(mob/user) switch(nozzle_mode) if(EXTINGUISHER) nozzle_mode = NANOFROST @@ -220,7 +220,7 @@ if(METAL_FOAM) . += "[src] is currently set to metal foam mode." -/obj/item/extinguisher/mini/mod/afterattack(atom/target, mob/user) +/obj/item/extinguisher/mini/mod/afterattack__legacy__attackchain(atom/target, mob/user) var/is_adjacent = user.Adjacent(target) if(is_adjacent && AttemptRefill(target, user)) return diff --git a/code/modules/mod/modules/modules_maint.dm b/code/modules/mod/modules/modules_maint.dm index 75a43d02571ba..c15c5ccf9ad2e 100644 --- a/code/modules/mod/modules/modules_maint.dm +++ b/code/modules/mod/modules/modules_maint.dm @@ -122,7 +122,7 @@ desc = "A high-power stamp, able to switch between accept and deny mode when used." flags = NODROP -/obj/item/stamp/mod/attack_self(mob/user, modifiers) +/obj/item/stamp/mod/attack_self__legacy__attackchain(mob/user, modifiers) . = ..() if(icon_state == "stamp-ok") icon_state = "stamp-deny" diff --git a/code/modules/mod/modules/modules_security.dm b/code/modules/mod/modules/modules_security.dm index 865cf356faa80..b8e627f434a15 100644 --- a/code/modules/mod/modules/modules_security.dm +++ b/code/modules/mod/modules/modules_security.dm @@ -66,7 +66,7 @@ if(!.) return var/obj/item/grenade/mirage/grenade = . - grenade.attack_self(mod.wearer) + grenade.attack_self__legacy__attackchain(mod.wearer) /obj/item/grenade/mirage name = "mirage grenade" @@ -81,7 +81,7 @@ thrower = null return ..() -/obj/item/grenade/mirage/attack_self(mob/user) +/obj/item/grenade/mirage/attack_self__legacy__attackchain(mob/user) . = ..() thrower = user @@ -191,7 +191,7 @@ playsound(src, 'sound/machines/click.ogg', 100, TRUE) drain_power(use_power_cost) var/obj/item/grenade/grenade = dispensed - grenade.attack_self(mod.wearer) + grenade.attack_self__legacy__attackchain(mod.wearer) return grenade /obj/item/mod/module/anomaly_locked/firewall/prebuilt @@ -245,7 +245,7 @@ playsound(src, 'sound/machines/click.ogg', 100, TRUE) drain_power(use_power_cost) var/obj/item/grenade/grenade = dispensed - grenade.attack_self(mod.wearer) + grenade.attack_self__legacy__attackchain(mod.wearer) return grenade /obj/item/mod/module/anomaly_locked/cryogrenade/prebuilt @@ -270,7 +270,7 @@ thrower = null return ..() -/obj/item/grenade/cryogrenade_mod/attack_self(mob/user) +/obj/item/grenade/cryogrenade_mod/attack_self__legacy__attackchain(mob/user) . = ..() thrower = user @@ -304,4 +304,4 @@ var/obj/item/grenade/smokebomb/grenade = ..() if(!grenade) return - grenade.attack_self(mod.wearer) + grenade.attack_self__legacy__attackchain(mod.wearer) diff --git a/code/modules/newscaster/obj/newspaper.dm b/code/modules/newscaster/obj/newspaper.dm index 16bf3a4538ea8..bc142f6cb63cf 100644 --- a/code/modules/newscaster/obj/newspaper.dm +++ b/code/modules/newscaster/obj/newspaper.dm @@ -37,7 +37,7 @@ if(!news_content) news_content = list() -/obj/item/newspaper/attack_self(mob/user) +/obj/item/newspaper/attack_self__legacy__attackchain(mob/user) if(rolled) to_chat(user, "Unroll it first!") return @@ -153,9 +153,9 @@ curr_page-- playsound(loc, "pageturn", 50, TRUE) if(loc == M) - attack_self(M) + attack_self__legacy__attackchain(M) -/obj/item/newspaper/attackby(obj/item/W, mob/user, params) +/obj/item/newspaper/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(is_pen(W)) if(rolled) to_chat(user, "Unroll it first!") @@ -170,7 +170,7 @@ scribble = s user.visible_message("[user] scribbles something on [src].",\ "You scribble on page number [curr_page] of [src].") - attack_self(user) + attack_self__legacy__attackchain(user) return return ..() diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index e160887fe6ff1..a6b64a4c73b7c 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -12,11 +12,11 @@ var/datum/effect_system/spark_spread/spark_system -/obj/item/katana/energy/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) +/obj/item/katana/energy/attack__legacy__attackchain(mob/living/carbon/M as mob, mob/living/carbon/user as mob) playsound(user, 'sound/weapons/blade1.ogg', 50, TRUE, -1) return ..() -/obj/item/katana/energy/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/katana/energy/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) if(!user || !target) return diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 620fb395ddf35..e40303fdc711b 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -94,7 +94,7 @@ break . += "clipboard_over" -/obj/item/clipboard/attackby(obj/item/W, mob/user) +/obj/item/clipboard/attackby__legacy__attackchain(obj/item/W, mob/user) if(isPaperwork(W)) //If it's a photo, paper bundle, or piece of paper, place it on the clipboard. user.unEquip(W) W.forceMove(src) @@ -109,14 +109,14 @@ return if(!Adjacent(user) || user.incapacitated()) return - toppaper.attackby(W, user) + toppaper.attackby__legacy__attackchain(W, user) else if(istype(W, /obj/item/stamp) && toppaper) //We can stamp the topmost piece of paper - toppaper.attackby(W, user) + toppaper.attackby__legacy__attackchain(W, user) update_icon() else return ..() -/obj/item/clipboard/attack_self(mob/user) +/obj/item/clipboard/attack_self__legacy__attackchain(mob/user) showClipboard(user) /obj/item/clipboard/Topic(href, href_list) @@ -142,7 +142,7 @@ if(!isPaperwork(P)) return if(is_pen(I) && isPaperwork(P) != PHOTO) //Because you can't write on photos that aren't in your hand - P.attackby(I, usr) + P.attackby__legacy__attackchain(I, usr) else if(isPaperwork(P) == PAPERWORK) //Why can't these be subtypes of paper P.examine(usr) else if(isPaperwork(P) == PHOTO) diff --git a/code/modules/paperwork/desk_bell.dm b/code/modules/paperwork/desk_bell.dm index 65a7d075eb455..485d36f6bce2b 100644 --- a/code/modules/paperwork/desk_bell.dm +++ b/code/modules/paperwork/desk_bell.dm @@ -34,7 +34,7 @@ attached_signaler = null return ..() -/obj/item/desk_bell/attackby(obj/item/I, mob/user, params) +/obj/item/desk_bell/attackby__legacy__attackchain(obj/item/I, mob/user, params) // can only attach its on your person if(istype(I, /obj/item/assembly/signaler)) if(!in_inventory) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 0188fcbb5b602..bcf5c8118a811 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -90,7 +90,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist) /obj/machinery/photocopier/faxmachine/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/photocopier/faxmachine/attackby(obj/item/item, mob/user, params) +/obj/machinery/photocopier/faxmachine/attackby__legacy__attackchain(obj/item/item, mob/user, params) if(istype(item,/obj/item/card/id) && !scan) scan(item) else if(istype(item, /obj/item/paper) || istype(item, /obj/item/photo) || istype(item, /obj/item/paper_bundle)) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 215803c13d019..0579fa3a8e32f 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -44,7 +44,7 @@ I.loc = src -/obj/structure/filingcabinet/attackby(obj/item/O, mob/user, params) +/obj/structure/filingcabinet/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(insert(O, user)) return if(user.a_intent != INTENT_HARM) diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 556208bbc3fe7..62a244fe57374 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -34,7 +34,7 @@ if(length(contents)) . += "folder_paper" -/obj/item/folder/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/folder/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo) || istype(W, /obj/item/paper_bundle) || istype(W, /obj/item/documents)) user.drop_item() W.loc = src @@ -45,7 +45,7 @@ else return ..() -/obj/item/folder/attack_self(mob/user as mob) +/obj/item/folder/attack_self__legacy__attackchain(mob/user as mob) var/dat = {"[name]"} for(var/obj/item/paper/P in src) @@ -85,11 +85,11 @@ else if(href_list["browse"]) var/obj/item/paper_bundle/P = locate(href_list["browse"]) if(P && (P.loc == src) && istype(P)) - P.attack_self(usr) + P.attack_self__legacy__attackchain(usr) onclose(usr, "[P.name]") //Update everything - attack_self(usr) + attack_self__legacy__attackchain(usr) update_icon(UPDATE_OVERLAYS) return diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 72fae016821bd..6e6a50806b3db 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -12,7 +12,7 @@ var/labels_left = 30 var/mode = LABEL_MODE_OFF -/obj/item/hand_labeler/afterattack(atom/A, mob/user, proximity) +/obj/item/hand_labeler/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return if(mode == LABEL_MODE_OFF) //if it's off, give up. @@ -48,7 +48,7 @@ playsound(A, 'sound/items/handling/component_pickup.ogg', 20, TRUE) labels_left-- -/obj/item/hand_labeler/attack_self(mob/user as mob) +/obj/item/hand_labeler/attack_self__legacy__attackchain(mob/user as mob) // off -> normal // normal or goal -> off mode = !mode @@ -65,7 +65,7 @@ else to_chat(user, "You turn off \the [src].") -/obj/item/hand_labeler/attackby(obj/item/I, mob/user, params) +/obj/item/hand_labeler/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/hand_labeler_refill)) to_chat(user, "You insert [I] into [src].") user.drop_item() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 8a66a3b1f4911..69252548e7d09 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -127,7 +127,7 @@ desc = initial(desc) add_fingerprint(user) -/obj/item/paper/attack_self(mob/living/user as mob) +/obj/item/paper/attack_self__legacy__attackchain(mob/living/user as mob) user.examinate(src) if(rigged && (SSholiday.holidays && SSholiday.holidays[APRIL_FOOLS])) if(!spam_flag) @@ -149,7 +149,7 @@ else show_content(user, forcestars = 1) -/obj/item/paper/attack(mob/living/carbon/M, mob/living/carbon/user, def_zone) +/obj/item/paper/attack__legacy__attackchain(mob/living/carbon/M, mob/living/carbon/user, def_zone) if(!ishuman(M)) return ..() var/mob/living/carbon/human/H = M @@ -391,7 +391,7 @@ var/input_element = input("Enter what you want to write:", "Write") as message topic_href_write(id, input_element) -/obj/item/paper/attackby(obj/item/P, mob/living/user, params) +/obj/item/paper/attackby__legacy__attackchain(obj/item/P, mob/living/user, params) ..() if(resistance_flags & ON_FIRE) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 4bd0eef2f6a25..188b50fbaa395 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -23,7 +23,7 @@ new /obj/item/paper(src) amount += 1 -/obj/item/paper_bundle/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/paper_bundle/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) ..() var/obj/item/paper/P if(istype(W, /obj/item/paper)) @@ -73,7 +73,7 @@ if(is_pen(W) || istype(W, /obj/item/toy/crayon)) usr << browse("", "window=PaperBundle[UID()]") //Closes the dialog P = get_page() - P.attackby(W, user, params) + P.attackby__legacy__attackchain(W, user, params) update_icon() @@ -133,7 +133,7 @@ + "[P.scribble ? "

Written on the back:
[P.scribble]" : ""]"\ + "", "window=PaperBundle[UID()]") -/obj/item/paper_bundle/attack_self(mob/user as mob) +/obj/item/paper_bundle/attack_self__legacy__attackchain(mob/user as mob) show_content(user) add_fingerprint(usr) @@ -189,7 +189,7 @@ else to_chat(usr, "You need to hold it in your hands to change pages.") if(ismob(loc)) - attack_self(loc) + attack_self__legacy__attackchain(loc) /obj/item/paper_bundle/AltClick(mob/user) if(in_range(user, src) && !user.incapacitated()) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 9da49f25804af..d24d85240dcb0 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -106,7 +106,7 @@ return -/obj/item/paper_bin/attackby(obj/item/paper/i as obj, mob/user as mob, params) +/obj/item/paper_bin/attackby__legacy__attackchain(obj/item/paper/i as obj, mob/user as mob, params) if(istype(i)) user.drop_item() i.loc = src diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index e894c699d41fe..b401745e5883c 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -51,7 +51,7 @@ var/obj/item/stamp = S . += "paperplane_[initial(stamp.icon_state)]" -/obj/item/paperplane/attack_self(mob/user) // Unfold the paper plane +/obj/item/paperplane/attack_self__legacy__attackchain(mob/user) // Unfold the paper plane to_chat(user, "You unfold [src].") if(internal_paper) internal_paper.forceMove(get_turf(src)) @@ -59,7 +59,7 @@ internal_paper = null qdel(src) -/obj/item/paperplane/attackby(obj/item/P, mob/living/carbon/human/user, params) +/obj/item/paperplane/attackby__legacy__attackchain(obj/item/P, mob/living/carbon/human/user, params) ..() if(is_pen(P) || istype(P, /obj/item/toy/crayon)) @@ -67,7 +67,7 @@ return else if(istype(P, /obj/item/stamp)) //we don't randomize stamps on a paperplane - internal_paper.attackby(P, user) //spoofed attack to update internal paper. + internal_paper.attackby__legacy__attackchain(P, user) //spoofed attack to update internal paper. update_icon() else if(P.get_heat()) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 0021507a6f148..a02cdf3c4eb25 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -74,7 +74,7 @@ playsound(loc, 'sound/effects/pop.ogg', 50, 1) update_icon() -/obj/item/pen/multi/attack_self(mob/living/user as mob) +/obj/item/pen/multi/attack_self__legacy__attackchain(mob/living/user as mob) select_colour(user) /obj/item/pen/multi/update_overlays() @@ -146,7 +146,7 @@ origin_tech = "engineering=4;syndicate=2" var/transfer_amount = 50 -/obj/item/pen/sleepy/attack(mob/living/M, mob/user) +/obj/item/pen/sleepy/attack__legacy__attackchain(mob/living/M, mob/user) if(!istype(M)) return @@ -216,7 +216,7 @@ armour_penetration_flat = 20 throw_speed = 4 -/obj/item/pen/edagger/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/pen/edagger/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) if(cigarette_lighter_act(user, M)) return @@ -270,7 +270,7 @@ /obj/item/pen/edagger/get_clamped_volume() //So the parent proc of attack isn't the loudest sound known to man return FALSE -/obj/item/pen/edagger/attack_self(mob/living/user) +/obj/item/pen/edagger/attack_self__legacy__attackchain(mob/living/user) if(active) active = FALSE force = initial(force) @@ -314,7 +314,7 @@ /obj/item/pen/multi/poison var/current_poison = null -/obj/item/pen/multi/poison/attack_self(mob/living/user) +/obj/item/pen/multi/poison/attack_self__legacy__attackchain(mob/living/user) . = ..() switch(colour) if("black") @@ -343,7 +343,7 @@ /obj/item/pen/chameleon var/forge_name -/obj/item/pen/chameleon/attack_self(mob/living/user) +/obj/item/pen/chameleon/attack_self__legacy__attackchain(mob/user) if(!iscarbon(user)) return diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index a13b8c3d12df4..e27d43b7b0fb8 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -477,7 +477,7 @@ use_power(active_power_consumption) COOLDOWN_START(src, copying_cooldown, PHOTOCOPIER_DELAY) -/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params) +/obj/machinery/photocopier/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo) || istype(O, /obj/item/paper_bundle)) if(!copyitem) user.drop_item() diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 42a3cb531e71e..2d20a77d90374 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -36,10 +36,10 @@ var/icon/tiny var/photo_size = 3 -/obj/item/photo/attack_self(mob/user as mob) +/obj/item/photo/attack_self__legacy__attackchain(mob/user as mob) user.examinate(src) -/obj/item/photo/attackby(obj/item/P as obj, mob/user as mob, params) +/obj/item/photo/attackby__legacy__attackchain(obj/item/P as obj, mob/user as mob, params) if(is_pen(P) || istype(P, /obj/item/toy/crayon)) var/txt = tgui_input_text(user, "What would you like to write on the back?", "Photo Writing") if(!txt) @@ -230,10 +230,10 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor size = nsize to_chat(user, "Camera will now take [size]x[size] photos.") -/obj/item/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob) +/obj/item/camera/attack__legacy__attackchain(mob/living/carbon/human/M as mob, mob/user as mob) return -/obj/item/camera/attack_self(mob/user) +/obj/item/camera/attack_self__legacy__attackchain(mob/user) if(on_cooldown) to_chat(user, "[src] is still on cooldown!") return @@ -244,7 +244,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor icon_state = icon_off to_chat(user, "You switch the camera [on ? "on" : "off"].") -/obj/item/camera/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/camera/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/camera_film)) if(pictures_left) to_chat(user, "[src] still has some film in it!") @@ -364,7 +364,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor mob_detail += "You can also see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]." return mob_detail -/obj/item/camera/afterattack(atom/target, mob/user, flag) +/obj/item/camera/afterattack__legacy__attackchain(atom/target, mob/user, flag) if(!on || !pictures_left || ismob(target.loc)) return captureimage(target, user, flag) @@ -495,7 +495,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor . += "Alt-Shift-Click [src] to print a specific photo." . += "Ctrl-Shift-Click [src] to delete a specific photo." -/obj/item/camera/digital/afterattack(atom/target, mob/user, flag) +/obj/item/camera/digital/afterattack__legacy__attackchain(atom/target, mob/user, flag) if(!on || !pictures_left || ismob(target.loc)) return @@ -598,7 +598,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor TV.update_icon(UPDATE_OVERLAYS) video_cooldown = world.time + CAMERA_STATE_COOLDOWN -/obj/item/videocam/attack_self(mob/user) +/obj/item/videocam/attack_self__legacy__attackchain(mob/user) if(world.time < video_cooldown) to_chat(user, "[src] is overheating, give it some time.") return diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 83ecda42f0881..b6b3fd5cf404f 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -118,7 +118,7 @@ maptext_x = 8 maptext = "[ticket_number]" -/obj/machinery/ticket_machine/attackby(obj/item/I, mob/user, params) +/obj/machinery/ticket_machine/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/hand_labeler_refill)) if(!(ticket_number >= max_number)) to_chat(user, "[src] refuses [I]! There [max_number-ticket_number==1 ? "is" : "are"] still [max_number-ticket_number] ticket\s left!") @@ -213,7 +213,7 @@ . = ..() maptext = saved_maptext //For some reason, storage code removes all maptext off objs, this stops its number from being wiped off when taken out of storage. -/obj/item/ticket_machine_ticket/attackby(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode +/obj/item/ticket_machine_ticket/attackby__legacy__attackchain(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode ..() if(P.get_heat()) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10)) diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index e3f2c06cb397f..01594e14e3699 100644 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -108,9 +108,9 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/MouseDrop(obj/over_object as obj, src_location, over_location) var/mob/M = usr if((!is_screen_atom(over_object)) && can_use()) - return attack_self(M) + return attack_self__legacy__attackchain(M) -/obj/item/pda/attack_self(mob/user as mob) +/obj/item/pda/attack_self__legacy__attackchain(mob/user as mob) if(active_uplink_check(user)) return ui_interact(user) @@ -244,7 +244,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(wearing_human.wear_id == src) wearing_human.sec_hud_set_ID() -/obj/item/pda/attackby(obj/item/C, mob/user, params) +/obj/item/pda/attackby__legacy__attackchain(obj/item/C, mob/user, params) ..() if(istype(C, /obj/item/cartridge) && !cartridge) cartridge = C @@ -309,11 +309,11 @@ GLOBAL_LIST_EMPTY(PDAs) UnregisterSignal(held_pen, COMSIG_PARENT_QDELETING) held_pen = null -/obj/item/pda/attack(mob/living/C as mob, mob/living/user as mob) +/obj/item/pda/attack__legacy__attackchain(mob/living/C as mob, mob/living/user as mob) if(iscarbon(C) && scanmode) scanmode.scan_mob(C, user) -/obj/item/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) +/obj/item/pda/afterattack__legacy__attackchain(atom/A as mob|obj|turf|area, mob/user as mob, proximity) if(proximity && scanmode) scanmode.scan_atom(A, user) diff --git a/code/modules/pda/ai_pda.dm b/code/modules/pda/ai_pda.dm index e6c603aa18780..d93fa0e1b8e52 100644 --- a/code/modules/pda/ai_pda.dm +++ b/code/modules/pda/ai_pda.dm @@ -68,7 +68,7 @@ silent = !silent to_chat(usr, "PDA ringer toggled [(silent ? "Off" : "On")]!") -/obj/item/pda/silicon/attack_self(mob/user as mob) +/obj/item/pda/silicon/attack_self__legacy__attackchain(mob/user as mob) if((honkamt > 0) && (prob(60)))//For clown virus. honkamt-- playsound(loc, 'sound/items/bikehorn.ogg', 30, 1) diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm index a45c9653c4588..fabff30eac985 100644 --- a/code/modules/pda/core_apps.dm +++ b/code/modules/pda/core_apps.dm @@ -39,7 +39,7 @@ else switch(text2num(params["option"])) if(1) // Configure pAI device - pda.pai.attack_self(usr) + pda.pai.attack_self__legacy__attackchain(usr) if(2) // Eject pAI device var/turf/T = get_turf(pda.loc) if(T) diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index f818ad845c98a..6552d232ce6b9 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -238,7 +238,7 @@ . += "An APC can be emagged to unlock it, this will keep it in it's refresh state, making very obvious something is wrong." //attack with an item - open/close cover, insert cell, or (un)lock interface -/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) +/obj/machinery/power/apc/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) if(issilicon(user) && get_dist(src, user) > 1) return attack_hand(user) diff --git a/code/modules/power/cables/cable.dm b/code/modules/power/cables/cable.dm index eff1525f01b84..e46b052f0a3fe 100644 --- a/code/modules/power/cables/cable.dm +++ b/code/modules/power/cables/cable.dm @@ -83,7 +83,7 @@ By design, d1 is the smallest direction and d2 is the highest // - Cable coil : merge cables // - Multitool : get the power currently passing through the cable // -/obj/structure/cable/attackby(obj/item/W, mob/user) +/obj/structure/cable/attackby__legacy__attackchain(obj/item/W, mob/user) var/turf/T = get_turf(src) if(T.transparent_floor || T.intact) to_chat(user, "You can't interact with something that's under the floor!") diff --git a/code/modules/power/cables/cable_coil.dm b/code/modules/power/cables/cable_coil.dm index 9b651bb913353..9f5ec33fc4e5c 100644 --- a/code/modules/power/cables/cable_coil.dm +++ b/code/modules/power/cables/cable_coil.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain . += "A coil of power cables." //you can use wires to heal robotics -/obj/item/stack/cable_coil/attack(mob/M, mob/user) +/obj/item/stack/cable_coil/attack__legacy__attackchain(mob/M, mob/user) if(!ishuman(M)) return ..() var/mob/living/carbon/human/H = M @@ -134,7 +134,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain // Items usable on a cable coil : // - Wirecutters : cut them duh ! // - Cable coil : merge cables -/obj/item/stack/cable_coil/attackby(obj/item/W, mob/user) +/obj/item/stack/cable_coil/attackby__legacy__attackchain(obj/item/W, mob/user) . = ..() if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W @@ -398,7 +398,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain /obj/item/stack/cable_coil/cyborg/update_icon_state() return // icon_state should always be a full cable -/obj/item/stack/cable_coil/cyborg/attack_self(mob/user) +/obj/item/stack/cable_coil/cyborg/attack_self__legacy__attackchain(mob/user) var/cablecolor = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white") color = cablecolor update_icon() diff --git a/code/modules/power/cables/terminal.dm b/code/modules/power/cables/terminal.dm index b48bd9362c2b8..c459f7864ead6 100644 --- a/code/modules/power/cables/terminal.dm +++ b/code/modules/power/cables/terminal.dm @@ -77,7 +77,7 @@ qdel(src) -/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params) +/obj/machinery/power/terminal/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/wirecutters)) dismantle(user, W) else diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index c9f94b1663b17..d9f9b545fc6c1 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -105,7 +105,7 @@ to_chat(viewers(user), "[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!") return FIRELOSS -/obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params) +/obj/item/stock_parts/cell/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = W diff --git a/code/modules/power/engines/singularity/collector.dm b/code/modules/power/engines/singularity/collector.dm index 4631406508cb5..4dd7d9110cbe0 100644 --- a/code/modules/power/engines/singularity/collector.dm +++ b/code/modules/power/engines/singularity/collector.dm @@ -66,7 +66,7 @@ disconnect_from_network() -/obj/machinery/power/rad_collector/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/rad_collector/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank/internals/plasma)) if(!anchored) to_chat(user, "[src] needs to be secured to the floor first.") diff --git a/code/modules/power/engines/singularity/containment_field.dm b/code/modules/power/engines/singularity/containment_field.dm index 0c8f67e9c62c3..f1af0eeb29145 100644 --- a/code/modules/power/engines/singularity/containment_field.dm +++ b/code/modules/power/engines/singularity/containment_field.dm @@ -28,7 +28,7 @@ shock_field(user) return 1 -/obj/machinery/field/containment/attackby(obj/item/W, mob/user, params) +/obj/machinery/field/containment/attackby__legacy__attackchain(obj/item/W, mob/user, params) shock(user) return TRUE diff --git a/code/modules/power/engines/singularity/emitter.dm b/code/modules/power/engines/singularity/emitter.dm index cac7fa7fa89a8..1e1af0ed3ecb3 100644 --- a/code/modules/power/engines/singularity/emitter.dm +++ b/code/modules/power/engines/singularity/emitter.dm @@ -146,7 +146,7 @@ if(!anchored) step(src, get_dir(M, src)) -/obj/machinery/power/emitter/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/emitter/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/card/id) && !istype(I, /obj/item/pda)) return ..() diff --git a/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm index 3269f4f87d820..a64c70fd53623 100644 --- a/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm @@ -164,7 +164,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 1 return 0 -/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params) +/obj/structure/particle_accelerator/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!iscoil(W)) return ..() if(construction_state == ACCELERATOR_WRENCHED) @@ -241,7 +241,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return dir = turn(dir, 270) -/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user, params) +/obj/machinery/particle_accelerator/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(!iscoil(W)) return ..() if(construction_state == ACCELERATOR_WRENCHED) diff --git a/code/modules/power/engines/singularity/singularity.dm b/code/modules/power/engines/singularity/singularity.dm index a043f9999fb6a..7dd13a29701d3 100644 --- a/code/modules/power/engines/singularity/singularity.dm +++ b/code/modules/power/engines/singularity/singularity.dm @@ -82,7 +82,7 @@ /obj/singularity/attack_animal(mob/user) consume(user) -/obj/singularity/attackby(obj/item/W, mob/user, params) +/obj/singularity/attackby__legacy__attackchain(obj/item/W, mob/user, params) consume(user) return 1 diff --git a/code/modules/power/engines/supermatter/supermatter.dm b/code/modules/power/engines/supermatter/supermatter.dm index 8e2c20709c0ae..f9a4c20c9fc85 100644 --- a/code/modules/power/engines/supermatter/supermatter.dm +++ b/code/modules/power/engines/supermatter/supermatter.dm @@ -776,7 +776,7 @@ playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) Consume(nom) -/obj/machinery/atmospherics/supermatter_crystal/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/atmospherics/supermatter_crystal/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) if(!istype(I) || (I.flags & ABSTRACT) || !istype(user)) return if(moveable && default_unfasten_wrench(user, I, time = 20)) diff --git a/code/modules/power/engines/tesla/coil.dm b/code/modules/power/engines/tesla/coil.dm index 15b5120a33ab1..93078385b0bcc 100644 --- a/code/modules/power/engines/tesla/coil.dm +++ b/code/modules/power/engines/tesla/coil.dm @@ -43,7 +43,7 @@ if(in_range(user, src) || isobserver(user)) . += "The status display reads: Power generation at [input_power_multiplier*100]%.
Shock interval at [zap_cooldown*0.1] seconds.
" -/obj/machinery/power/tesla_coil/attackby(obj/item/W, mob/user, params) +/obj/machinery/power/tesla_coil/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/assembly/signaler) && panel_open) wires.Interact(user) else @@ -129,7 +129,7 @@ component_parts += new /obj/item/stock_parts/capacitor(null) RefreshParts() -/obj/machinery/power/grounding_rod/attackby(obj/item/W, mob/user, params) +/obj/machinery/power/grounding_rod/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(exchange_parts(user, W)) return diff --git a/code/modules/power/generators/portable generators/pacman.dm b/code/modules/power/generators/portable generators/pacman.dm index 8111f4dd2702e..f350c7bf8a118 100644 --- a/code/modules/power/generators/portable generators/pacman.dm +++ b/code/modules/power/generators/portable generators/pacman.dm @@ -191,7 +191,7 @@ emagged = TRUE return TRUE -/obj/machinery/power/port_gen/pacman/attackby(obj/item/O as obj, mob/user as mob) +/obj/machinery/power/port_gen/pacman/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob) if(istype(O, sheet_path)) var/obj/item/stack/addstack = O var/amount = min((max_sheets - sheets), addstack.amount) diff --git a/code/modules/power/generators/solar.dm b/code/modules/power/generators/solar.dm index 0c29dfbcec4e4..3f68c097ab96d 100644 --- a/code/modules/power/generators/solar.dm +++ b/code/modules/power/generators/solar.dm @@ -209,7 +209,7 @@ if(anchored) .+= "The solar assembly needs glass to be completed." -/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params) +/obj/item/solar_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(anchored || !isturf(loc)) if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass)) diff --git a/code/modules/power/generators/treadmill.dm b/code/modules/power/generators/treadmill.dm index efaf83b4af245..6a6f68b8b5bd5 100644 --- a/code/modules/power/generators/treadmill.dm +++ b/code/modules/power/generators/treadmill.dm @@ -96,7 +96,7 @@ spawn(100) stat &= ~BROKEN -/obj/machinery/power/treadmill/attackby(obj/item/W, mob/user) +/obj/machinery/power/treadmill/attackby__legacy__attackchain(obj/item/W, mob/user) if(default_unfasten_wrench(user, W, time = 60)) if(anchored) connect_to_network() diff --git a/code/modules/power/generators/turbine.dm b/code/modules/power/generators/turbine.dm index 57bf68eed7388..0b15beb5fbc6e 100644 --- a/code/modules/power/generators/turbine.dm +++ b/code/modules/power/generators/turbine.dm @@ -126,7 +126,7 @@ E += M.rating efficiency = E / 6 -/obj/machinery/power/compressor/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/compressor/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_change_direction_wrench(user, I)) turbine = null inturf = get_step(src, dir) @@ -328,7 +328,7 @@ return . += image(icon, "turb-o", FLY_LAYER) -/obj/machinery/power/turbine/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/turbine/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I)) return diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index b56a3151cdcac..7a21e52a42b78 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -152,7 +152,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) update_icon() // Step 2 -/obj/machinery/gravity_generator/main/attackby(obj/item/I, mob/user, params) +/obj/machinery/gravity_generator/main/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(construction_state != GRAV_NEEDS_PLASTEEL) return ..() if(istype(I, /obj/item/stack/sheet/plasteel)) diff --git a/code/modules/power/lights.dm b/code/modules/power/lights.dm index efbb8c1c7cb77..eae1c664e1c4c 100644 --- a/code/modules/power/lights.dm +++ b/code/modules/power/lights.dm @@ -96,7 +96,7 @@ transfer_fingerprints_to(newlight) qdel(src) -/obj/machinery/light_construct/attackby(obj/item/W, mob/living/user, params) +/obj/machinery/light_construct/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) add_fingerprint(user) if(istype(W, /obj/item/stack/cable_coil)) if(stage != LIGHT_CONSTRUCT_EMPTY_FRAME) @@ -591,7 +591,7 @@ // attack with item - insert light (if right type), otherwise try to break the light -/obj/machinery/light/attackby(obj/item/W, mob/living/user, params) +/obj/machinery/light/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) user.changeNext_move(CLICK_CD_MELEE) // This is an ugly hack and I hate it forever //Light replacer code if(istype(W, /obj/item/lightreplacer)) @@ -710,7 +710,7 @@ transfer_fingerprints_to(newlight) qdel(src) -/obj/machinery/light/attacked_by(obj/item/I, mob/living/user) +/obj/machinery/light/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) ..() if(status == LIGHT_BROKEN || status == LIGHT_EMPTY) if(on && (I.flags & CONDUCT)) @@ -1075,7 +1075,7 @@ // attack bulb/tube with object // if a syringe, can inject plasma to make it explode. Light replacers eat them. -/obj/item/light/attackby(obj/item/I, mob/user, params) +/obj/item/light/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = I @@ -1096,11 +1096,11 @@ else // If it's not a syringe return ..() -/obj/item/light/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/light/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) ..() shatter() -/obj/item/light/attack_obj(obj/O, mob/living/user, params) +/obj/item/light/attack_obj__legacy__attackchain(obj/O, mob/living/user, params) ..() shatter() diff --git a/code/modules/power/power_machine.dm b/code/modules/power/power_machine.dm index a4a329b833eb0..4f3903da067af 100644 --- a/code/modules/power/power_machine.dm +++ b/code/modules/power/power_machine.dm @@ -76,7 +76,7 @@ // attach a wire to a power machine - leads from the turf you are standing on //almost never called, overwritten by all power machines but terminal and generator -/obj/machinery/power/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/coil = I var/turf/T = user.loc diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index decfac1f1a0d5..fd247fe44eafc 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -102,7 +102,7 @@ if(charge_level > 0) . += "smes-og[charge_level]" -/obj/machinery/power/smes/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/smes/attackby__legacy__attackchain(obj/item/I, mob/user, params) // Opening using screwdriver if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I)) update_icon() diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 18435e4dd15b1..5d04ea7009c68 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -49,7 +49,7 @@ BB = new projectile_type(src, params) return -/obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/ammo_casing/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/ammo_box)) var/obj/item/ammo_box/box = I if(box.slow_loading) @@ -192,7 +192,7 @@ /obj/item/ammo_box/proc/can_load(mob/user) return 1 -/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = 0, replace_spent = 0) +/obj/item/ammo_box/attackby__legacy__attackchain(obj/item/A, mob/user, params, silent = 0, replace_spent = 0) var/num_loaded = 0 if(!can_load(user)) return @@ -220,7 +220,7 @@ return num_loaded -/obj/item/ammo_box/attack_self(mob/user as mob) +/obj/item/ammo_box/attack_self__legacy__attackchain(mob/user as mob) var/obj/item/ammo_casing/A = get_round() if(A) user.put_in_hands(A) diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index f8b17ff619688..3ff42fbc314e1 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -282,7 +282,7 @@ ..() create_reagents(30) -/obj/item/ammo_casing/shotgun/dart/attackby() +/obj/item/ammo_casing/shotgun/dart/attackby__legacy__attackchain() return /obj/item/ammo_casing/shotgun/dart/bioterror @@ -411,7 +411,7 @@ if(BB) BB.icon_state = initial(BB.icon_state) -/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params) +/obj/item/ammo_casing/caseless/foam_dart/attackby__legacy__attackchain(obj/item/A, mob/user, params) ..() var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB if((is_pen(A)) && modified && !FD.pen) @@ -440,7 +440,7 @@ FD.damage = 5 FD.nodamage = FALSE -/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user) +/obj/item/ammo_casing/caseless/foam_dart/attack_self__legacy__attackchain(mob/living/user) var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB if(FD.pen) FD.damage = initial(FD.damage) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 0b4aa1d82842e..1a02c79f3552c 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -281,7 +281,7 @@ /// There are two reloading processes ongoing so cancel them var/double_loaded = FALSE -/obj/item/ammo_box/magazine/wt550m9/attackby(obj/item/A, mob/user, params) +/obj/item/ammo_box/magazine/wt550m9/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_casing)) var/obj/item/ammo_casing/AC = A if(give_round(AC)) @@ -625,10 +625,10 @@ . = ..() . += "There is [charge_percent()]% charge left!" -/obj/item/ammo_box/magazine/detective/speedcharger/attack_self() +/obj/item/ammo_box/magazine/detective/speedcharger/attack_self__legacy__attackchain() return -/obj/item/ammo_box/magazine/detective/speedcharger/attackby() +/obj/item/ammo_box/magazine/detective/speedcharger/attackby__legacy__attackchain() return /obj/item/ammo_box/magazine/c_foam @@ -638,5 +638,5 @@ ammo_type = /obj/item/ammo_casing/caseless/c_foam max_ammo = 12 -/obj/item/ammo_box/magazine/c_foam/attack_self(mob/user) +/obj/item/ammo_box/magazine/c_foam/attack_self__legacy__attackchain(mob/user) return diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index c0d5882cc8153..af858679316be 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -174,7 +174,7 @@ for(var/obj/O in contents) O.emp_act(severity) -/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(firing_burst) return if(SEND_SIGNAL(src, COMSIG_GUN_TRY_FIRE, user, target, flag, params) & COMPONENT_CANCEL_GUN_FIRE) @@ -330,21 +330,21 @@ user.update_inv_r_hand() SSblackbox.record_feedback("tally", "gun_fired", 1, type) -/obj/item/gun/attack(mob/M, mob/user) +/obj/item/gun/attack__legacy__attackchain(mob/M, mob/user) if(user.a_intent == INTENT_HARM) //Flogging if(bayonet) - M.attackby(bayonet, user) + M.attackby__legacy__attackchain(bayonet, user) else return ..() -/obj/item/gun/attack_obj(obj/O, mob/user, params) +/obj/item/gun/attack_obj__legacy__attackchain(obj/O, mob/user, params) if(user.a_intent == INTENT_HARM) if(bayonet) - O.attackby(bayonet, user) + O.attackby__legacy__attackchain(bayonet, user) return return ..() -/obj/item/gun/attackby(obj/item/I, mob/user, params) +/obj/item/gun/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/flashlight/seclite)) var/obj/item/flashlight/seclite/S = I if(can_flashlight) diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index a5a8f66f95374..c00fbdaa20427 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -36,7 +36,7 @@ . += "There is a [M.name] mod installed, using [M.cost]% capacity." . += "You can use a crowbar on it to remove it's installed mod kits." -/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user) +/obj/item/gun/energy/kinetic_accelerator/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/borg/upgrade/modkit) && max_mod_capacity) var/obj/item/borg/upgrade/modkit/MK = I MK.install(src, user) @@ -305,7 +305,7 @@ if(in_range(user, src)) . += "Occupies [cost]% of mod capacity." -/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user) +/obj/item/borg/upgrade/modkit/attackby__legacy__attackchain(obj/item/A, mob/user) if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user)) var/obj/item/gun/energy/kinetic_accelerator/KA = A if(KA.max_mod_capacity) @@ -657,5 +657,5 @@ name = "adjustable tracer bolts" desc = "Causes kinetic accelerator bolts to have an adjustable-colored tracer trail and explosion. Use in-hand to change color." -/obj/item/borg/upgrade/modkit/tracer/adjustable/attack_self(mob/user) +/obj/item/borg/upgrade/modkit/tracer/adjustable/attack_self__legacy__attackchain(mob/user) bolt_color = tgui_input_color(user, "Please select a tracer color", "PKA Tracer Color", bolt_color) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index f65ba7ddba880..07d38c92ee764 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -248,7 +248,7 @@ select_fire(user) user.remove_status_effect(STATUS_EFFECT_LWAPSCOPE) -/obj/item/gun/energy/lwap/attack_self() +/obj/item/gun/energy/lwap/attack_self__legacy__attackchain() return //no manual ammo changing. /obj/item/ammo_casing/energy/laser/sniper diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 557a23fd42598..bf5c510f9cd78 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -115,7 +115,7 @@ cell_type = /obj/item/stock_parts/cell/infinite ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse) -/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user) +/obj/item/gun/energy/pulse/destroyer/attack_self__legacy__attackchain(mob/living/user) to_chat(user, "[src] is now set to DESTROY.") ////////////////////////////// @@ -126,7 +126,7 @@ desc = "A pulse rifle fitted with a heavy duty prism, spreading a cone of destruction in front of the user. The fire selector has three settings, and they are all 'ANNIHILATE'." ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/pulse) -/obj/item/gun/energy/pulse/destroyer/annihilator/attack_self(mob/living/user) +/obj/item/gun/energy/pulse/destroyer/annihilator/attack_self__legacy__attackchain(mob/living/user) to_chat(user, "[src] is now set to ANNIHILATE.") ////////////////////////////// diff --git a/code/modules/projectiles/guns/energy/special_eguns.dm b/code/modules/projectiles/guns/energy/special_eguns.dm index f36a39eafedb0..27032627abeda 100644 --- a/code/modules/projectiles/guns/energy/special_eguns.dm +++ b/code/modules/projectiles/guns/energy/special_eguns.dm @@ -139,7 +139,7 @@ /obj/item/gun/energy/floragun/pre_attack(atom/A, mob/living/user, params) if(istype(A, /obj/machinery/hydroponics)) // Calling afterattack from pre_attack looks stupid, but afterattack with proximity FALSE is what makes the gun fire, and we're returning FALSE to cancel the melee attack. - afterattack(A, user, FALSE, params) + afterattack__legacy__attackchain(A, user, FALSE, params) return FALSE return ..() @@ -269,7 +269,7 @@ . += "It can be reloaded using refined plasma sheets, or plasma ore obtained in the field (although the latter is less efficient). \ Plasma cutters such as these can be found in use at plasma mining operations throughout known space." -/obj/item/gun/energy/plasmacutter/attackby(obj/item/A, mob/user) +/obj/item/gun/energy/plasmacutter/attackby__legacy__attackchain(obj/item/A, mob/user) if(istype(A, /obj/item/stack/sheet/mineral/plasma)) if(cell.charge >= cell.maxcharge) to_chat(user,"[src] is already fully charged.") @@ -510,7 +510,7 @@ if(cell.charge <= PLASMA_DISCHARGE_LIMIT) discharge() -/obj/item/gun/energy/plasma_pistol/attack_self(mob/living/user) +/obj/item/gun/energy/plasma_pistol/attack_self__legacy__attackchain(mob/living/user) if(overloaded) to_chat(user, "[src] is already overloaded!") return @@ -656,7 +656,7 @@ it will create a finely-tuned neutralising bluespace field that protects the user from the blast wave generated by the weapon's projectile. \ However, this field will not protect the user from a second BSG, as it is tied to the energy signature of an individual gun's flux anomaly core." -/obj/item/gun/energy/bsg/attackby(obj/item/O, mob/user, params) +/obj/item/gun/energy/bsg/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/stack/ore/bluespace_crystal)) if(has_bluespace_crystal) to_chat(user, "[src] already has a bluespace crystal installed.") @@ -767,7 +767,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/gun/energy/temperature/attack_self(mob/user) +/obj/item/gun/energy/temperature/attack_self__legacy__attackchain(mob/user) add_fingerprint(user) ui_interact(user) @@ -1001,7 +1001,7 @@ user.visible_message("[user] [overcharged ? "removes" : "restores"] the safety limits on [src].", "You [overcharged ? "remove" : "restore" ] the safety limits on [src]") update_icon() -/obj/item/gun/energy/detective/attackby(obj/item/I, mob/user, params) +/obj/item/gun/energy/detective/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(!istype(I, /obj/item/ammo_box/magazine/detective/speedcharger)) return diff --git a/code/modules/projectiles/guns/energy/telegun.dm b/code/modules/projectiles/guns/energy/telegun.dm index 16078734d849b..e0f6359abfd55 100644 --- a/code/modules/projectiles/guns/energy/telegun.dm +++ b/code/modules/projectiles/guns/energy/telegun.dm @@ -14,7 +14,7 @@ teleport_target = null return ..() -/obj/item/gun/energy/telegun/attack_self(mob/living/user) +/obj/item/gun/energy/telegun/attack_self__legacy__attackchain(mob/living/user) var/list/L = list() var/list/areaindex = list() diff --git a/code/modules/projectiles/guns/energy_guns.dm b/code/modules/projectiles/guns/energy_guns.dm index 63f5852da1faf..d51cce88a8b64 100644 --- a/code/modules/projectiles/guns/energy_guns.dm +++ b/code/modules/projectiles/guns/energy_guns.dm @@ -98,7 +98,7 @@ /obj/item/gun/energy/proc/on_recharge() newshot() -/obj/item/gun/energy/attack_self(mob/living/user as mob) +/obj/item/gun/energy/attack_self__legacy__attackchain(mob/living/user as mob) if(length(ammo_type) > 1) select_fire(user) update_icon() diff --git a/code/modules/projectiles/guns/grenade_launcher.dm b/code/modules/projectiles/guns/grenade_launcher.dm index 26e5ed6ae1870..d4e589948b2ea 100644 --- a/code/modules/projectiles/guns/grenade_launcher.dm +++ b/code/modules/projectiles/guns/grenade_launcher.dm @@ -18,7 +18,7 @@ if(get_dist(user, src) <= 2) . += "[length(grenades)] / [max_grenades] grenades." -/obj/item/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/gun/grenadelauncher/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) if((istype(I, /obj/item/grenade))) if(length(grenades) < max_grenades) if(!user.unEquip(I)) @@ -32,7 +32,7 @@ else return ..() -/obj/item/gun/grenadelauncher/afterattack(obj/target, mob/user , flag) +/obj/item/gun/grenadelauncher/afterattack__legacy__attackchain(obj/target, mob/user , flag) if(target == user) return diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 227ea6264d402..c542ffa00417d 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -23,7 +23,7 @@ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands righthand_file = 'icons/mob/inhands/items_righthand.dmi' -/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag) +/obj/item/gun/magic/afterattack__legacy__attackchain(atom/target, mob/living/user, flag) if(no_den_usage) var/area/A = get_area(user) if(istype(A, /area/wizard_station)) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 709370ec588f3..3e3d488741da8 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -44,12 +44,12 @@ CONTENTS: icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" -/obj/item/gun/magic/wand/attack(atom/target, mob/living/user) +/obj/item/gun/magic/wand/attack__legacy__attackchain(atom/target, mob/living/user) if(target == user) return ..() -/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user) +/obj/item/gun/magic/wand/afterattack__legacy__attackchain(atom/target, mob/living/user) if(!charges) shoot_with_empty_chamber(user) return @@ -192,7 +192,7 @@ CONTENTS: charges-- ..() -/obj/item/gun/magic/wand/fireball/attack(atom/target, mob/living/user) +/obj/item/gun/magic/wand/fireball/attack__legacy__attackchain(atom/target, mob/living/user) if(!iscarbon(target)) return ..() diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index 1c19cb35602c2..eb1ab9d1702a4 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -225,7 +225,7 @@ current_heat = min(current_heat + 1, max_heat) -/obj/item/gun/medbeam/damaged/attackby(obj/item/attacking_item, mob/user, params) +/obj/item/gun/medbeam/damaged/attackby__legacy__attackchain(obj/item/attacking_item, mob/user, params) . = ..() if(broken == INSTALL_CELL) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index 44a6ca8aa933b..5dcf9c661ea7f 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -16,7 +16,7 @@ QDEL_NULL(bomb) return ..() -/obj/item/gun/blastcannon/attack_self(mob/user) +/obj/item/gun/blastcannon/attack_self__legacy__attackchain(mob/user) if(bomb) bomb.forceMove(user.loc) user.put_in_hands(bomb) @@ -45,7 +45,7 @@ else icon_state = initial(icon_state) -/obj/item/gun/blastcannon/attackby(obj/O, mob/user) +/obj/item/gun/blastcannon/attackby__legacy__attackchain(obj/O, mob/user) if(istype(O, /obj/item/transfer_valve)) var/obj/item/transfer_valve/T = O if(!T.tank_one || !T.tank_two) @@ -76,7 +76,7 @@ return 0 return (pressure / TANK_FRAGMENT_SCALE) -/obj/item/gun/blastcannon/afterattack(atom/target, mob/user, flag, params) +/obj/item/gun/blastcannon/afterattack__legacy__attackchain(atom/target, mob/user, flag, params) if((!bomb) || (!target) || (get_dist(get_turf(target), get_turf(user)) <= 2)) return ..() var/power = calculate_bomb() diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index a07ed3c001978..e02773310a259 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -32,7 +32,7 @@ if(select == 1) . += "[initial(icon_state)]burst" -/obj/item/gun/projectile/automatic/attackby(obj/item/A as obj, mob/user as mob, params) +/obj/item/gun/projectile/automatic/attackby__legacy__attackchain(obj/item/A as obj, mob/user as mob, params) . = ..() if(.) if(alarmed) // Did the empty clip alarm go off already? @@ -121,7 +121,7 @@ . = ..() update_icon() -/obj/item/gun/projectile/automatic/c20r/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) +/obj/item/gun/projectile/automatic/c20r/afterattack__legacy__attackchain(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) ..() empty_alarm() @@ -193,18 +193,18 @@ qdel(underbarrel) return ..() -/obj/item/gun/projectile/automatic/m90/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/projectile/automatic/m90/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(select == 2) - underbarrel.afterattack(target, user, flag, params) + underbarrel.afterattack__legacy__attackchain(target, user, flag, params) else ..() return -/obj/item/gun/projectile/automatic/m90/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/automatic/m90/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_casing)) if(istype(A, underbarrel.magazine.ammo_type)) - underbarrel.attack_self(user) - underbarrel.attackby(A, user, params) + underbarrel.attack_self__legacy__attackchain(user) + underbarrel.attackby__legacy__attackchain(A, user, params) else return ..() @@ -339,7 +339,7 @@ /obj/item/gun/projectile/automatic/shotgun/bulldog/update_icon_state() icon_state = "bulldog[chambered ? "" : "-e"]" -/obj/item/gun/projectile/automatic/shotgun/bulldog/attackby(obj/item/A as obj, mob/user as mob, params) +/obj/item/gun/projectile/automatic/shotgun/bulldog/attackby__legacy__attackchain(obj/item/A as obj, mob/user as mob, params) if(istype(A, /obj/item/ammo_box/magazine/m12g/xtr_lrg)) if(isstorage(loc)) // To prevent inventory exploits var/obj/item/storage/Strg = loc @@ -348,7 +348,7 @@ return return ..() -/obj/item/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) +/obj/item/gun/projectile/automatic/shotgun/bulldog/afterattack__legacy__attackchain(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) ..() empty_alarm() diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm index b6e572c87691a..b65b06a202f4b 100644 --- a/code/modules/projectiles/guns/projectile/bow.dm +++ b/code/modules/projectiles/guns/projectile/bow.dm @@ -28,7 +28,7 @@ ready_to_fire = FALSE update_icon() -/obj/item/gun/projectile/bow/attack_self(mob/living/user) +/obj/item/gun/projectile/bow/attack_self__legacy__attackchain(mob/living/user) if(!ready_to_fire && magazine.ammo_count()) ready_to_fire = TRUE playsound(user, draw_sound, 100, 1) @@ -37,8 +37,8 @@ ready_to_fire = FALSE update_icon() -/obj/item/gun/projectile/bow/attackby(obj/item/A, mob/user, params) - var/num_loaded = magazine.attackby(A, user, params, 1) +/obj/item/gun/projectile/bow/attackby__legacy__attackchain(obj/item/A, mob/user, params) + var/num_loaded = magazine.attackby__legacy__attackchain(A, user, params, 1) if(num_loaded) to_chat(user, "You ready \the [A] into \the [src].") update_icon() diff --git a/code/modules/projectiles/guns/projectile/launchers.dm b/code/modules/projectiles/guns/projectile/launchers.dm index 470ff0b0c861c..6ff760fc0b925 100644 --- a/code/modules/projectiles/guns/projectile/launchers.dm +++ b/code/modules/projectiles/guns/projectile/launchers.dm @@ -11,7 +11,7 @@ w_class = WEIGHT_CLASS_NORMAL can_holster = FALSE // Not your normal revolver -/obj/item/gun/projectile/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/grenadelauncher/attackby__legacy__attackchain(obj/item/A, mob/user, params) ..() if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing)) chamber_round() @@ -29,7 +29,7 @@ icon_state = "mecha_grenadelnchr" mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi/fifteen -/obj/item/gun/projectile/revolver/grenadelauncher/multi/cyborg/attack_self() +/obj/item/gun/projectile/revolver/grenadelauncher/multi/cyborg/attack_self__legacy__attackchain() return /obj/item/gun/projectile/automatic/gyropistol @@ -72,14 +72,14 @@ /obj/item/gun/projectile/automatic/speargun/update_icon_state() return -/obj/item/gun/projectile/automatic/speargun/attack_self() +/obj/item/gun/projectile/automatic/speargun/attack_self__legacy__attackchain() return /obj/item/gun/projectile/automatic/speargun/process_chamber(eject_casing = 0, empty_chamber = 1) ..() -/obj/item/gun/projectile/automatic/speargun/attackby(obj/item/A, mob/user, params) - var/num_loaded = magazine.attackby(A, user, params, 1) +/obj/item/gun/projectile/automatic/speargun/attackby__legacy__attackchain(obj/item/A, mob/user, params) + var/num_loaded = magazine.attackby__legacy__attackchain(A, user, params, 1) if(num_loaded) to_chat(user, "You load [num_loaded] spear\s into \the [src].") update_icon() diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 8d3d20861eb03..8a82da356006c 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -28,20 +28,20 @@ /obj/item/gun/projectile/revolver/process_chamber() return ..(0, 1) -/obj/item/gun/projectile/revolver/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/attackby__legacy__attackchain(obj/item/A, mob/user, params) . = ..() if(istype(A, /obj/item/ammo_box/b357)) return if(.) return - var/num_loaded = magazine.attackby(A, user, params, 1) + var/num_loaded = magazine.attackby__legacy__attackchain(A, user, params, 1) if(num_loaded) to_chat(user, "You load [num_loaded] shell\s into \the [src].") A.update_icon() update_icon() chamber_round(0) -/obj/item/gun/projectile/revolver/attack_self(mob/living/user) +/obj/item/gun/projectile/revolver/attack_self__legacy__attackchain(mob/living/user) var/num_unloaded = 0 chambered = null while(get_ammo() > 0) @@ -152,16 +152,16 @@ qdel(src) return -/obj/item/gun/projectile/revolver/fingergun/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/projectile/revolver/fingergun/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(!user.mind.miming) to_chat(usr, "You must dedicate yourself to silence first. Use your fingers if you wish to holster them.") return ..() -/obj/item/gun/projectile/revolver/fingergun/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/fingergun/attackby__legacy__attackchain(obj/item/A, mob/user, params) return -/obj/item/gun/projectile/revolver/fingergun/attack_self(mob/living/user) +/obj/item/gun/projectile/revolver/fingergun/attack_self__legacy__attackchain(mob/living/user) to_chat(usr, "You holster your fingers. Another time.") qdel(src) return @@ -221,7 +221,7 @@ chamber_round() spun = 1 -/obj/item/gun/projectile/revolver/russian/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/russian/attackby__legacy__attackchain(obj/item/A, mob/user, params) var/num_loaded = ..() if(num_loaded) user.visible_message("[user] loads a single bullet into the revolver and spins the chamber.", "You load a single bullet into the chamber and spin it.") @@ -233,7 +233,7 @@ A.update_icon() return -/obj/item/gun/projectile/revolver/russian/attack_self(mob/user) +/obj/item/gun/projectile/revolver/russian/attack_self__legacy__attackchain(mob/user) if(!spun && can_shoot()) user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber.") Spin() @@ -252,7 +252,7 @@ else to_chat(user, "[src] is empty.") -/obj/item/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) +/obj/item/gun/projectile/revolver/russian/afterattack__legacy__attackchain(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) if(flag) if(!(target in user.contents) && ismob(target)) if(user.a_intent == INTENT_HARM) // Flogging action @@ -350,7 +350,7 @@ options["Maple"] = "dbshotgun_l" options["Rosewood"] = "dbshotgun_p" -/obj/item/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/doublebarrel/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing)) chamber_round() if(!can_sawoff) @@ -370,7 +370,7 @@ . = ..() weapon_weight = WEAPON_MEDIUM -/obj/item/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user) +/obj/item/gun/projectile/revolver/doublebarrel/attack_self__legacy__attackchain(mob/living/user) var/num_unloaded = 0 while(get_ammo() > 0) @@ -435,7 +435,7 @@ unique_reskin = FALSE var/sling = FALSE -/obj/item/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/doublebarrel/improvised/attackby__legacy__attackchain(obj/item/A, mob/user, params) ..() if(istype(A, /obj/item/stack/cable_coil) && !sawn_state) var/obj/item/stack/cable_coil/C = A @@ -494,7 +494,7 @@ /obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/update_overlays() return list() -/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/stack/cable_coil)) return else diff --git a/code/modules/projectiles/guns/projectile/saw.dm b/code/modules/projectiles/guns/projectile/saw.dm index 4c113421fdeb2..c8ddc466f2dac 100644 --- a/code/modules/projectiles/guns/projectile/saw.dm +++ b/code/modules/projectiles/guns/projectile/saw.dm @@ -22,7 +22,7 @@ . = ..() AddComponent(/datum/component/automatic_fire, 0.2 SECONDS) -/obj/item/gun/projectile/automatic/l6_saw/attack_self(mob/user) +/obj/item/gun/projectile/automatic/l6_saw/attack_self__legacy__attackchain(mob/user) cover_open = !cover_open to_chat(user, "You [cover_open ? "open" : "close"] [src]'s cover.") playsound(src, cover_open ? 'sound/weapons/gun_interactions/sawopen.ogg' : 'sound/weapons/gun_interactions/sawclose.ogg', 50, 1) @@ -32,7 +32,7 @@ icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]" item_state = "l6[cover_open ? "openmag" : "closedmag"]" -/obj/item/gun/projectile/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays +/obj/item/gun/projectile/automatic/l6_saw/afterattack__legacy__attackchain(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays if(cover_open) to_chat(user, "[src]'s cover is open! Close it before firing!") else @@ -56,7 +56,7 @@ to_chat(user, "You remove the magazine from [src].") -/obj/item/gun/projectile/automatic/l6_saw/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/automatic/l6_saw/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_box/magazine)) var/obj/item/ammo_box/magazine/AM = A if(istype(AM, mag_type)) diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index e7c537fcd0404..9e259be181b01 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -28,11 +28,11 @@ /obj/item/gun/projectile/shotgun/proc/get_shotgun_info() return "After firing a shot, use this item in hand to remove the spent shell." -/obj/item/gun/projectile/shotgun/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/shotgun/attackby__legacy__attackchain(obj/item/A, mob/user, params) . = ..() if(.) return - var/num_loaded = magazine.attackby(A, user, params, 1) + var/num_loaded = magazine.attackby__legacy__attackchain(A, user, params, 1) if(num_loaded) to_chat(user, "You load [num_loaded] shell\s into \the [src]!") A.update_icon() @@ -50,7 +50,7 @@ return FALSE return chambered.BB -/obj/item/gun/projectile/shotgun/attack_self(mob/living/user) +/obj/item/gun/projectile/shotgun/attack_self__legacy__attackchain(mob/living/user) if(!COOLDOWN_FINISHED(src, pump_cooldown)) return pump(user) @@ -91,7 +91,7 @@ sawn_desc = "Come with me if you want to live." sawn_state = SAWN_INTACT -/obj/item/gun/projectile/shotgun/riot/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/shotgun/riot/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter)) sawoff(user) if(istype(A, /obj/item/melee/energy)) @@ -116,7 +116,7 @@ user.visible_message("\The [src] goes off!", "\The [src] goes off in your face!") return else - afterattack(user, user) + afterattack__legacy__attackchain(user, user) user.visible_message("[src] goes click!", "[src] you are holding goes click.") if(magazine.ammo_count()) //Spill the mag onto the floor user.visible_message("[user.name] opens [src] up and the shells go goes flying around!", "You open [src] up and the shells go goes flying everywhere!!") @@ -153,11 +153,11 @@ return if(chambered) //if the gun is chambering live ammo, shoot self, if chambering empty ammo, 'click' if(chambered.BB) - afterattack(user, user) + afterattack__legacy__attackchain(user, user) user.visible_message("\The [src] goes off!", "\The [src] goes off in your face!") return else - afterattack(user, user) + afterattack__legacy__attackchain(user, user) user.visible_message("[src] goes click!", "[src] you are holding goes click.") if(magazine.ammo_count()) //Spill the mag onto the floor user.visible_message("[user.name] opens [src] up and the shells go goes flying around!", "You open [src] up and the shells go goes flying everywhere!!") @@ -237,7 +237,7 @@ process_fire(user, user,0) . = 1 -/obj/item/gun/projectile/shotgun/boltaction/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/shotgun/boltaction/attackby__legacy__attackchain(obj/item/A, mob/user, params) if(!bolt_open) to_chat(user, "The bolt is closed!") return @@ -263,7 +263,7 @@ ..() guns_left = 0 -/obj/item/gun/projectile/shotgun/boltaction/enchanted/attack_self() +/obj/item/gun/projectile/shotgun/boltaction/enchanted/attack_self__legacy__attackchain() return /obj/item/gun/projectile/shotgun/boltaction/enchanted/shoot_live_shot(mob/living/user, atom/target, pointblank = FALSE, message = TRUE) @@ -355,7 +355,7 @@ QDEL_NULL(alternate_magazine) return ..() -/obj/item/gun/projectile/shotgun/automatic/dual_tube/attack_self(mob/living/user) +/obj/item/gun/projectile/shotgun/automatic/dual_tube/attack_self__legacy__attackchain(mob/living/user) if(!chambered && length(magazine.contents)) pump() else diff --git a/code/modules/projectiles/guns/projectile_gun.dm b/code/modules/projectiles/guns/projectile_gun.dm index e3797a2c35b2b..db7d318597fd4 100644 --- a/code/modules/projectiles/guns/projectile_gun.dm +++ b/code/modules/projectiles/guns/projectile_gun.dm @@ -98,7 +98,7 @@ user.update_inv_l_hand() return -/obj/item/gun/projectile/attackby(obj/item/A as obj, mob/user as mob, params) +/obj/item/gun/projectile/attackby__legacy__attackchain(obj/item/A as obj, mob/user as mob, params) if(istype(A, /obj/item/ammo_box/magazine)) var/obj/item/ammo_box/magazine/AM = A if(istype(AM, mag_type)) @@ -161,7 +161,7 @@ return ..() -/obj/item/gun/projectile/attack_self(mob/living/user as mob) +/obj/item/gun/projectile/attack_self__legacy__attackchain(mob/living/user as mob) var/obj/item/ammo_casing/AC = chambered //Find chambered round if(magazine) magazine.loc = get_turf(loc) diff --git a/code/modules/projectiles/guns/rocket.dm b/code/modules/projectiles/guns/rocket.dm index 0cb19b33b8560..b67fbe18eecef 100644 --- a/code/modules/projectiles/guns/rocket.dm +++ b/code/modules/projectiles/guns/rocket.dm @@ -26,7 +26,7 @@ . += "It is currently [chambered ? "" : "un"]loaded." -/obj/item/gun/rocketlauncher/attackby(obj/item/I, mob/user, params) +/obj/item/gun/rocketlauncher/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/ammo_casing/rocket)) return ..() if(!chambered) diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index d9a21e04070f6..7f44b91ae15c2 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -34,7 +34,7 @@ syringes.Remove(S) qdel(S) -/obj/item/gun/syringe/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/syringe/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(target == loc) return ..() @@ -44,7 +44,7 @@ var/num_syringes = length(syringes) + (chambered.BB ? 1 : 0) . += "Can hold [max_syringes] syringe\s. Has [num_syringes] syringe\s remaining." -/obj/item/gun/syringe/attack_self(mob/living/user) +/obj/item/gun/syringe/attack_self__legacy__attackchain(mob/living/user) if(!length(syringes) && !chambered.BB) to_chat(user, "[src] is empty.") return FALSE @@ -66,7 +66,7 @@ to_chat(user, "You unload [S] from [src]!") return TRUE -/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE) +/obj/item/gun/syringe/attackby__legacy__attackchain(obj/item/A, mob/user, params, show_msg = TRUE) if(istype(A, /obj/item/reagent_containers/syringe)) if(istype(A, /obj/item/reagent_containers/syringe/lethal)) to_chat(user, "[A] is too big to fit into [src].") @@ -180,7 +180,7 @@ process_chamber() // Chamber the syringe if none is already return TRUE -/obj/item/gun/syringe/rapidsyringe/attackby(obj/item/A, mob/user, params, show_msg) +/obj/item/gun/syringe/rapidsyringe/attackby__legacy__attackchain(obj/item/A, mob/user, params, show_msg) if(isstorage(A)) // Boxes can be dumped in. @@ -244,7 +244,7 @@ return ..() // Allow for emptying your deathmix, or for sec to find out what you were dumping into people -/obj/item/gun/syringe/rapidsyringe/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/gun/syringe/rapidsyringe/afterattack__legacy__attackchain(atom/target, mob/living/user, flag, params) if(istype(target, /obj/item/reagent_containers)) var/obj/item/reagent_containers/destination = target @@ -328,7 +328,7 @@ qdel(S) // Unload an empty syringe, making sure its existing contents get returned to the reservoir -/obj/item/gun/syringe/rapidsyringe/attack_self(mob/living/user) +/obj/item/gun/syringe/rapidsyringe/attack_self__legacy__attackchain(mob/living/user) if(!length(syringes) && !chambered.BB) to_chat(user, "[src] is empty.") return FALSE @@ -396,7 +396,7 @@ // add a new syringe so it's technically infinite insert_single_syringe(new /obj/item/reagent_containers/syringe) -/obj/item/gun/syringe/rapidsyringe/preloaded/beaker_blaster/attack_self(mob/living/user) +/obj/item/gun/syringe/rapidsyringe/preloaded/beaker_blaster/attack_self__legacy__attackchain(mob/living/user) // no printing infinite syringes. return diff --git a/code/modules/projectiles/guns/throw.dm b/code/modules/projectiles/guns/throw.dm index 0a7a246b16bdf..61deb59015ef2 100644 --- a/code/modules/projectiles/guns/throw.dm +++ b/code/modules/projectiles/guns/throw.dm @@ -47,7 +47,7 @@ /obj/item/gun/throw/update_overlays() return list() -/obj/item/gun/throw/attackby(obj/item/I, mob/user, params) +/obj/item/gun/throw/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, valid_projectile_type) && !(I.flags & NODROP)) if(get_ammocount() < max_capacity) user.drop_item() diff --git a/code/modules/projectiles/guns/throw/crossbow.dm b/code/modules/projectiles/guns/throw/crossbow.dm index e2b679ff6cbb7..d2e3093fe6075 100644 --- a/code/modules/projectiles/guns/throw/crossbow.dm +++ b/code/modules/projectiles/guns/throw/crossbow.dm @@ -68,7 +68,7 @@ modify_projectile(to_launch, 1) update_icon(UPDATE_ICON_STATE) -/obj/item/gun/throw/crossbow/attack_self(mob/living/user) +/obj/item/gun/throw/crossbow/attack_self__legacy__attackchain(mob/living/user) if(tension) if(to_launch) user.visible_message("[user] relaxes the tension on [src]'s string and removes [to_launch].","You relax the tension on [src]'s string and remove [to_launch].") @@ -97,7 +97,7 @@ user.visible_message("[usr] draws back the string of [src]!","[src] clunks as you draw the string to its maximum tension!!") update_icon(UPDATE_ICON_STATE) -/obj/item/gun/throw/crossbow/attackby(obj/item/I, mob/user, params) +/obj/item/gun/throw/crossbow/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/stock_parts/cell)) return ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 948e667d2f87a..f23b282bfb776 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -234,7 +234,7 @@ add_fingerprint(usr) -/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params) +/obj/machinery/chem_dispenser/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/part_replacer)) . = ..() SStgui.update_uis(src) @@ -446,7 +446,7 @@ /obj/item/handheld_chem_dispenser/get_cell() return cell -/obj/item/handheld_chem_dispenser/afterattack(obj/target, mob/user, proximity) +/obj/item/handheld_chem_dispenser/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if(!proximity || !current_reagent || !amount) return @@ -470,7 +470,7 @@ if(!target.reagents.isolate_reagent(current_reagent)) to_chat(user, "You remove all but [current_reagent] from [target].") -/obj/item/handheld_chem_dispenser/attack_self(mob/user) +/obj/item/handheld_chem_dispenser/attack_self__legacy__attackchain(mob/user) if(cell) ui_interact(user) else @@ -570,7 +570,7 @@ update_icon(UPDATE_OVERLAYS) return TRUE -/obj/item/handheld_chem_dispenser/attackby(obj/item/W, mob/user, params) +/obj/item/handheld_chem_dispenser/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stock_parts/cell)) var/obj/item/stock_parts/cell/C = W if(cell) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index bdbad39598cbc..ecfb026025bf0 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -62,7 +62,7 @@ else stat |= NOPOWER -/obj/machinery/chem_heater/attackby(obj/item/I, mob/user) +/obj/machinery/chem_heater/attackby__legacy__attackchain(obj/item/I, mob/user) if(istype(I, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 23f2dcacdb910..45f09791651af 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -114,7 +114,7 @@ return update_icon() -/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params) +/obj/machinery/chem_master/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index bf48302233965..eb622e874c4b7 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -384,7 +384,7 @@ /obj/machinery/computer/pandemic/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params) +/obj/machinery/computer/pandemic/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(default_unfasten_wrench(user, I, time = 4 SECONDS)) power_change() return diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 45eae9706d47f..77cbb7b361122 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -157,7 +157,7 @@ return default_unfasten_wrench(user, I) -/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) +/obj/machinery/reagentgrinder/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/part_replacer)) ..() SStgui.update_uis(src) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 0a4f38c15c233..51733f92f80eb 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -88,7 +88,7 @@ container_type |= REFILLABLE | DRAINABLE update_icon(UPDATE_OVERLAYS) -/obj/item/reagent_containers/attack_self(mob/user) +/obj/item/reagent_containers/attack_self__legacy__attackchain(mob/user) if(has_lid) if(is_open_container()) to_chat(usr, "You put the lid on [src].") @@ -97,7 +97,7 @@ to_chat(usr, "You take the lid off [src].") remove_lid() -/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/modules/reagents/reagent_containers/applicator.dm b/code/modules/reagents/reagent_containers/applicator.dm index b8b3eca0eb7ae..ade44dc8a67b5 100644 --- a/code/modules/reagents/reagent_containers/applicator.dm +++ b/code/modules/reagents/reagent_containers/applicator.dm @@ -96,10 +96,10 @@ update_icon() user.changeNext_move(CLICK_CD_MELEE) -/obj/item/reagent_containers/applicator/attack(mob/living/M, mob/user) +/obj/item/reagent_containers/applicator/attack__legacy__attackchain(mob/living/M, mob/user) return apply(M, user) -/obj/item/reagent_containers/applicator/attack_self(mob/user) +/obj/item/reagent_containers/applicator/attack_self__legacy__attackchain(mob/user) return apply(user, user) /obj/item/reagent_containers/applicator/proc/apply_to(mob/living/carbon/M, mob/user, multiplier = 1, show_message = TRUE) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 7a2e25eb4796c..11c8af8fa0cb2 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -88,7 +88,7 @@ robot.cell.use(charge_cost) total_reagents = min((total_reagents + BORGHYPO_REFILL_VALUE), maximum_reagents) -/obj/item/reagent_containers/borghypo/attack(mob/living/carbon/human/M, mob/user) +/obj/item/reagent_containers/borghypo/attack__legacy__attackchain(mob/living/carbon/human/M, mob/user) if(!total_reagents) to_chat(user, "The injector is empty.") return @@ -109,7 +109,7 @@ /obj/item/reagent_containers/borghypo/proc/get_radial_contents() return reagent_icons & reagent_ids -/obj/item/reagent_containers/borghypo/attack_self(mob/user) +/obj/item/reagent_containers/borghypo/attack_self__legacy__attackchain(mob/user) playsound(loc, 'sound/effects/pop.ogg', 50, 0) var/selected_reagent = show_radial_menu(user, src, get_radial_contents(), radius = 48) if(!selected_reagent) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index c8a02d8f7975b..798098070611b 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -18,10 +18,10 @@ else icon_state = "[initial(icon_state)]1" -/obj/item/reagent_containers/dropper/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/reagent_containers/dropper/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) return -/obj/item/reagent_containers/dropper/afterattack(atom/target, mob/user, proximity) +/obj/item/reagent_containers/dropper/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return var/to_transfer = 0 @@ -113,7 +113,7 @@ //Syndicate item. Virus transmitting mini hypospray /obj/item/reagent_containers/dropper/precision/viral_injector -/obj/item/reagent_containers/dropper/precision/viral_injector/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/reagent_containers/dropper/precision/viral_injector/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) if(M.can_inject(user, TRUE)) to_chat(user, "You stealthily stab [M] with [src].") if(reagents.total_volume && M.reagents) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 9c7b309cc61ed..496f385e4dbff 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -27,7 +27,7 @@ . += "[src] can hold up to [reagents.maximum_volume] units." -/obj/item/reagent_containers/glass/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/glass/attack__legacy__attackchain(mob/M, mob/user, def_zone) if(!is_open_container()) return ..() @@ -69,7 +69,7 @@ addtimer(CALLBACK(reagents, TYPE_PROC_REF(/datum/reagents, trans_to), M, 5), 5) playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) -/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity) +/obj/item/reagent_containers/glass/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if((!proximity) || !check_allowed_items(target, target_self = TRUE)) return @@ -110,7 +110,7 @@ reagents.reaction(target, REAGENT_TOUCH) reagents.clear_reagents() -/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/glass/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) var/t = rename_interactive(user, I) if(!isnull(t)) @@ -171,7 +171,7 @@ if(reagents) reagents.temperature_reagents(4000) -/obj/item/reagent_containers/glass/beaker/attackby(obj/item/W, mob/user, params) +/obj/item/reagent_containers/glass/beaker/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/assembly_holder) && can_assembly) if(assembly) to_chat(usr, "[src] already has an assembly.") @@ -324,7 +324,7 @@ reagents.reaction(user, REAGENT_TOUCH) reagents.clear_reagents() -/obj/item/reagent_containers/glass/bucket/attackby(obj/D, mob/user, params) +/obj/item/reagent_containers/glass/bucket/attackby__legacy__attackchain(obj/D, mob/user, params) if(istype(D, /obj/item/mop)) var/obj/item/mop/m = D m.wet_mop(src, user) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 269a092459ee9..ff53f822daa6b 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -69,13 +69,13 @@ reagents.reaction(M, REAGENT_INGEST, 0.1) return TRUE -/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user) +/obj/item/reagent_containers/hypospray/attack__legacy__attackchain(mob/living/M, mob/user) return apply(M, user) -/obj/item/reagent_containers/hypospray/attack_self(mob/user) +/obj/item/reagent_containers/hypospray/attack_self__legacy__attackchain(mob/user) return apply(user, user) -/obj/item/reagent_containers/hypospray/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/hypospray/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) rename_interactive(user, I, use_prefix = TRUE, prompt = "Give [src] a title.") return TRUE @@ -189,7 +189,7 @@ container_type = DRAWABLE flags = null -/obj/item/reagent_containers/hypospray/autoinjector/attack(mob/M, mob/user) +/obj/item/reagent_containers/hypospray/autoinjector/attack__legacy__attackchain(mob/M, mob/user) if(!reagents.total_volume) to_chat(user, "[src] is empty!") return @@ -197,7 +197,7 @@ update_icon(UPDATE_ICON_STATE) return TRUE -/obj/item/reagent_containers/hypospray/autoinjector/attack_self(mob/user) +/obj/item/reagent_containers/hypospray/autoinjector/attack_self__legacy__attackchain(mob/user) ..() update_icon(UPDATE_ICON_STATE) return TRUE @@ -268,7 +268,7 @@ volume = 40 list_reagents = list("nanocalcium" = 30, "epinephrine" = 10) -/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user) +/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack__legacy__attackchain(mob/living/M, mob/user) if(..()) playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1) @@ -281,7 +281,7 @@ container_type = null //No sucking out the reagent list_reagents = list("zombiecure1" = 15) -/obj/item/reagent_containers/hypospray/autoinjector/zombiecure/attack(mob/living/M, mob/user) +/obj/item/reagent_containers/hypospray/autoinjector/zombiecure/attack__legacy__attackchain(mob/living/M, mob/user) if(..()) playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, TRUE) //Sucker for sounds, also gets zombies attention. diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm index ade28979dab48..30bfa515a700d 100644 --- a/code/modules/reagents/reagent_containers/iv_bag.dm +++ b/code/modules/reagents/reagent_containers/iv_bag.dm @@ -32,7 +32,7 @@ ..() update_icon(UPDATE_OVERLAYS) -/obj/item/reagent_containers/iv_bag/attack_self(mob/user) +/obj/item/reagent_containers/iv_bag/attack_self__legacy__attackchain(mob/user) ..() mode = !mode update_icon(UPDATE_OVERLAYS) @@ -87,10 +87,10 @@ injection_target.reagents.trans_id_to(src, reagent.id, amount_per_transfer_from_this / 10) update_icon(UPDATE_OVERLAYS) -/obj/item/reagent_containers/iv_bag/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/reagent_containers/iv_bag/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) return -/obj/item/reagent_containers/iv_bag/afterattack(atom/target, mob/user, proximity) +/obj/item/reagent_containers/iv_bag/afterattack__legacy__attackchain(atom/target, mob/user, proximity) if(!proximity) return if(!target.reagents) @@ -157,7 +157,7 @@ if(IV_INJECT) . += "inject" -/obj/item/reagent_containers/iv_bag/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/iv_bag/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_pen(I)) rename_interactive(user, I) diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index 70686bfa61713..fb1cbc239ef3d 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -12,10 +12,10 @@ var/instant_application = FALSE var/needs_to_apply_reagents = TRUE -/obj/item/reagent_containers/patch/attack(mob/living/carbon/C, mob/user) +/obj/item/reagent_containers/patch/attack__legacy__attackchain(mob/living/carbon/C, mob/user) return apply(C, user) -/obj/item/reagent_containers/patch/attack_self(mob/user) +/obj/item/reagent_containers/patch/attack_self__legacy__attackchain(mob/user) return apply(user, user) /obj/item/reagent_containers/patch/proc/apply(mob/living/carbon/C, mob/user) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 20bed70015674..dfbb26ab892d2 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -47,13 +47,13 @@ qdel(src) return TRUE -/obj/item/reagent_containers/pill/attack(mob/living/carbon/C, mob/user) +/obj/item/reagent_containers/pill/attack__legacy__attackchain(mob/living/carbon/C, mob/user) return apply(C, user) -/obj/item/reagent_containers/pill/attack_self(mob/user) +/obj/item/reagent_containers/pill/attack_self__legacy__attackchain(mob/user) return apply(user, user) -/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user, proximity) +/obj/item/reagent_containers/pill/afterattack__legacy__attackchain(obj/target, mob/user, proximity) if(!proximity || !target.is_refillable()) return if(target.reagents.holder_full()) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index de67f8769c5ad..b639acd9ad154 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -23,7 +23,7 @@ . = ..() ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT) -/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user) +/obj/item/reagent_containers/spray/afterattack__legacy__attackchain(atom/A, mob/user) if(isstorage(A) || ismodcontrol(A) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ || istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics)) return @@ -95,7 +95,7 @@ qdel(D) -/obj/item/reagent_containers/spray/attack_self(mob/user) +/obj/item/reagent_containers/spray/attack_self__legacy__attackchain(mob/user) amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10) spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1) @@ -135,7 +135,7 @@ amount_per_transfer_from_this = 10 list_reagents = list("cleaner" = 250) -/obj/item/reagent_containers/spray/cleaner/attack_self(mob/user) +/obj/item/reagent_containers/spray/cleaner/attack_self__legacy__attackchain(mob/user) amount_per_transfer_from_this = (amount_per_transfer_from_this == 5 ? 10 : 5) spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1) to_chat(user, "You [amount_per_transfer_from_this == 5 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.") @@ -215,7 +215,7 @@ volume = 10 list_reagents = list("water" = 10) -/obj/item/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays +/obj/item/reagent_containers/spray/waterflower/attack_self__legacy__attackchain(mob/user) //Don't allow changing how much the flower sprays return //chemsprayer @@ -271,7 +271,7 @@ -/obj/item/reagent_containers/spray/chemsprayer/attack_self(mob/user) +/obj/item/reagent_containers/spray/chemsprayer/attack_self__legacy__attackchain(mob/user) amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10) to_chat(user, "You adjust the output switch. You'll now use [amount_per_transfer_from_this] units per spray.") diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 73b400127950c..dc79be44db93c 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -33,7 +33,7 @@ ..() update_icon() -/obj/item/reagent_containers/syringe/attack_self(mob/user) +/obj/item/reagent_containers/syringe/attack_self__legacy__attackchain(mob/user) mode = !mode update_icon() @@ -41,14 +41,14 @@ ..() update_icon() -/obj/item/reagent_containers/syringe/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/reagent_containers/syringe/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) return -/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params) +/obj/item/reagent_containers/syringe/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag)) ..() -/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity) +/obj/item/reagent_containers/syringe/afterattack__legacy__attackchain(atom/target, mob/user , proximity) if(!proximity) return if(!target.reagents) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 8137f1f545952..67f4a1ae1beb6 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -24,7 +24,7 @@ if(tank_volume && (damage_flag == BULLET || damage_flag == LASER)) boom(FALSE, TRUE) -/obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params) +/obj/structure/reagent_dispensers/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.is_refillable()) return FALSE //so we can refill them via their afterattack. return ..() @@ -158,7 +158,7 @@ lastrigger = null overlays.Cut() -/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/user, params) +/obj/structure/reagent_dispensers/fueltank/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/assembly_holder) && accepts_rig) if(rig) to_chat(user, "There is another device in the way.") @@ -282,7 +282,7 @@ /// If TRUE, prevents the player from inserting the disk again while it is currently exploding. var/exploding = FALSE -/obj/structure/reagent_dispensers/beerkeg/nuke/attackby(obj/item/O, mob/user, params) +/obj/structure/reagent_dispensers/beerkeg/nuke/attackby__legacy__attackchain(obj/item/O, mob/user, params) . = ..() if(exploding) return diff --git a/code/modules/recycling/belt-placer.dm b/code/modules/recycling/belt-placer.dm index 8e1db8b15fced..739ff0274d54f 100644 --- a/code/modules/recycling/belt-placer.dm +++ b/code/modules/recycling/belt-placer.dm @@ -25,7 +25,7 @@ max_combined_w_class = 200 //50 belts origin_tech = "engineering=2;bluespace=1" -/obj/item/storage/conveyor/attackby(obj/item/I, mob/user, params) //So we can link belts en masse +/obj/item/storage/conveyor/attackby__legacy__attackchain(obj/item/I, mob/user, params) //So we can link belts en masse if(istype(I, /obj/item/conveyor_switch_construct)) var/obj/item/conveyor_switch_construct/S = I var/linked = FALSE //For nice message @@ -37,11 +37,11 @@ else return ..() -/obj/item/storage/conveyor/afterattack(atom/A, mob/user, proximity) +/obj/item/storage/conveyor/afterattack__legacy__attackchain(atom/A, mob/user, proximity) if(!proximity) return var/obj/item/conveyor_construct/C = locate() in src if(!C) to_chat(user, "There are no belts in [src].") else - C.afterattack(A, user, proximity) + C.afterattack__legacy__attackchain(A, user, proximity) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 3f3b9fba58f8b..61f1f912f0808 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -52,7 +52,7 @@ GLOBAL_LIST_EMPTY(conveyor_switches) update_move_direction() // attack with item, place item on conveyor -/obj/machinery/conveyor/attackby(obj/item/I, mob/user) +/obj/machinery/conveyor/attackby__legacy__attackchain(obj/item/I, mob/user) if(stat & BROKEN) return ..() @@ -425,7 +425,7 @@ GLOBAL_LIST_EMPTY(conveyor_switches) w_class = WEIGHT_CLASS_BULKY var/id -/obj/item/conveyor_construct/attackby(obj/item/I, mob/user, params) +/obj/item/conveyor_construct/attackby__legacy__attackchain(obj/item/I, mob/user, params) ..() if(!istype(I, /obj/item/conveyor_switch_construct)) return @@ -433,7 +433,7 @@ GLOBAL_LIST_EMPTY(conveyor_switches) to_chat(user, "You link [src] to [C].") id = C.id -/obj/item/conveyor_construct/afterattack(turf/T, mob/user, proximity) +/obj/item/conveyor_construct/afterattack__legacy__attackchain(turf/T, mob/user, proximity) if(!proximity) return if(user.incapacitated()) @@ -468,7 +468,7 @@ GLOBAL_LIST_EMPTY(conveyor_switches) id = world.time + rand() //this couldn't possibly go wrong -/obj/item/conveyor_switch_construct/afterattack(turf/T, mob/user, proximity) +/obj/item/conveyor_switch_construct/afterattack__legacy__attackchain(turf/T, mob/user, proximity) if(!proximity) return if(user.incapacitated()) @@ -487,7 +487,7 @@ GLOBAL_LIST_EMPTY(conveyor_switches) transfer_fingerprints_to(NC) qdel(src) -/obj/item/conveyor_switch_construct/attackby(obj/item/I, mob/user) +/obj/item/conveyor_switch_construct/attackby__legacy__attackchain(obj/item/I, mob/user) if(!istype(I, /obj/item/conveyor_switch_construct)) return ..() var/obj/item/conveyor_switch_construct/S = I diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 87fade596f100..81882d2d730be 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -187,7 +187,7 @@ nicetype = "sorting pipe" return nicetype -/obj/structure/disposalconstruct/attackby(obj/item/I, mob/user, params) +/obj/structure/disposalconstruct/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/nicetype = get_nice_name() var/ispipe = is_pipe() // Indicates if we should change the level of this pipe var/turf/T = get_turf(src) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 071e5d5d90aad..6c478825d6bc6 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -123,7 +123,7 @@ disposal.update() // attack by item places it in to disposal -/obj/machinery/disposal/attackby(obj/item/I, mob/user, params) +/obj/machinery/disposal/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(stat & BROKEN || !user || I.flags & ABSTRACT) return @@ -1050,7 +1050,7 @@ //attack by item //weldingtool: unfasten and convert to obj/disposalconstruct -/obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params) +/obj/structure/disposalpipe/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/turf/T = get_turf(src) if(T.intact || T.transparent_floor) to_chat(user, "You can't interact with something that's under the floor!") @@ -1228,7 +1228,7 @@ if(mapping_fail) stack_trace("[src] mapped incorrectly at [x],[y],[z] - [mapping_fail]") -/obj/structure/disposalpipe/sortjunction/attackby(obj/item/I, mob/user, params) +/obj/structure/disposalpipe/sortjunction/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(..()) return @@ -1426,7 +1426,7 @@ D.linkedtrunk = src // Override attackby so we disallow trunkremoval when somethings ontop -/obj/structure/disposalpipe/trunk/attackby(obj/item/I, mob/user, params) +/obj/structure/disposalpipe/trunk/attackby__legacy__attackchain(obj/item/I, mob/user, params) //Disposal bins or chutes //Disposal constructors diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index d0440121847d1..d1fa9d14eb55b 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -35,7 +35,7 @@ qdel(src) -/obj/structure/big_delivery/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/structure/big_delivery/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/dest_tagger)) var/obj/item/dest_tagger/O = W @@ -95,7 +95,7 @@ var/atom/A = i A.emp_act(severity) -/obj/item/small_delivery/attack_self(mob/user) +/obj/item/small_delivery/attack_self__legacy__attackchain(mob/user) if(wrapped?.loc == src) //sometimes items can disappear. For example, bombs. --rastaf0 wrapped.forceMove(get_turf(src)) if(ishuman(user)) @@ -103,7 +103,7 @@ playsound(src, 'sound/items/poster_ripped.ogg', 50, TRUE) qdel(src) -/obj/item/small_delivery/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/small_delivery/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/dest_tagger)) var/obj/item/dest_tagger/O = W @@ -262,7 +262,7 @@ QDEL_NULL(destination_tagger) return ..() -/obj/item/dest_tagger/attack_self(mob/user) +/obj/item/dest_tagger/attack_self__legacy__attackchain(mob/user) add_fingerprint(user) ui_interact(user) @@ -405,7 +405,7 @@ var/sortTag = 1 var/sealed = 0 -/obj/item/shipping_package/attackby(obj/item/O, mob/user, params) +/obj/item/shipping_package/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(sealed) if(is_pen(O)) var/str = tgui_input_text(user, "Intended recipient?", "Address", max_length = MAX_NAME_LEN) @@ -432,7 +432,7 @@ add_fingerprint(usr) to_chat(user, "You put [O] in [src].") -/obj/item/shipping_package/attack_self(mob/user) +/obj/item/shipping_package/attack_self__legacy__attackchain(mob/user) if(sealed) to_chat(user, "You tear open [src], dropping the contents onto the floor.") playsound(loc, 'sound/items/poster_ripped.ogg', 50, 1) diff --git a/code/modules/research/anomaly/anomaly.dm b/code/modules/research/anomaly/anomaly.dm index b895540988ea6..d4564b3e2f2fb 100644 --- a/code/modules/research/anomaly/anomaly.dm +++ b/code/modules/research/anomaly/anomaly.dm @@ -13,7 +13,7 @@ var/obj/effect/anomaly/A = loc A.anomalyNeutralize() -/obj/item/assembly/signaler/anomaly/attack_self() +/obj/item/assembly/signaler/anomaly/attack_self__legacy__attackchain() return //Anomaly cores @@ -76,7 +76,7 @@ icon = 'icons/obj/clothing/suits.dmi' w_class = WEIGHT_CLASS_NORMAL -/obj/item/reactive_armour_shell/attackby(obj/item/I, mob/user, params) +/obj/item/reactive_armour_shell/attackby__legacy__attackchain(obj/item/I, mob/user, params) var/static/list/anomaly_armour_types = list( /obj/item/assembly/signaler/anomaly/grav = /obj/item/clothing/suit/armor/reactive/repulse, /obj/item/assembly/signaler/anomaly/flux = /obj/item/clothing/suit/armor/reactive/tesla, diff --git a/code/modules/research/backup_console.dm b/code/modules/research/backup_console.dm index 2bdb661519c3d..2f3412d97503f 100644 --- a/code/modules/research/backup_console.dm +++ b/code/modules/research/backup_console.dm @@ -38,7 +38,7 @@ SStgui.update_uis(src) -/obj/machinery/computer/rnd_backup/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/rnd_backup/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/disk/rnd_backup_disk) && istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user if(!H.unEquip(O)) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 4728e195f6958..1b07264d9e9f4 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -74,7 +74,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). return round(A / max(1, (all_materials[M] * efficiency_coeff))) -/obj/machinery/r_n_d/circuit_imprinter/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/machinery/r_n_d/circuit_imprinter/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 0401476f4e81f..a84bb3b4f0735 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -48,7 +48,7 @@ Note: Must be placed within 3 tiles of the R&D Console return temp_list -/obj/machinery/r_n_d/destructive_analyzer/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/machinery/r_n_d/destructive_analyzer/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 4cac5ee49c70d..7061b494e48d3 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -98,7 +98,7 @@ return FALSE return TRUE -/obj/machinery/r_n_d/experimentor/attackby(obj/item/O, mob/user, params) +/obj/machinery/r_n_d/experimentor/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index eb0e7f7c2c9a3..ad5848af12574 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -76,7 +76,7 @@ Note: Must be placed west/left of and R&D console to function. A = A / max(1, (being_built.materials[M] * efficiency_coeff)) return A -/obj/machinery/r_n_d/protolathe/attackby(obj/item/O as obj, mob/user as mob, params) +/obj/machinery/r_n_d/protolathe/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/storage/part_replacer)) return ..() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 28b410b9d373e..d0c6f0ccd87ac 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -179,7 +179,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, wait_message_timer = 0 return ..() -/obj/machinery/computer/rdconsole/attackby(obj/item/D as obj, mob/user as mob, params) +/obj/machinery/computer/rdconsole/attackby__legacy__attackchain(obj/item/D as obj, mob/user as mob, params) //Loading a disk into it. if(istype(D, /obj/item/disk)) diff --git a/code/modules/research/strange_objects.dm b/code/modules/research/strange_objects.dm index 9b33060c59c8a..2be7bdc81ee87 100644 --- a/code/modules/research/strange_objects.dm +++ b/code/modules/research/strange_objects.dm @@ -85,7 +85,7 @@ ) -/obj/item/relic/attack_self(mob/user) +/obj/item/relic/attack_self__legacy__attackchain(mob/user) if(revealed) if((last_use_time + cooldown_duration) > world.time) to_chat(user, "[src] does not react!") diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 6546a8dda9c0f..83510e1318705 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -176,7 +176,7 @@ return return ..() -/obj/machinery/computer/camera_advanced/xenobio/attackby(obj/item/O, mob/user, params) +/obj/machinery/computer/camera_advanced/xenobio/attackby__legacy__attackchain(obj/item/O, mob/user, params) if(istype(O, /obj/item/food/monkeycube)) if(user.drop_item()) monkeys++ diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index cf08aa8ea0255..0a99b1ec1ac20 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -18,7 +18,7 @@ /// The mob who last injected the extract with plasma, water or blood. Used for logging. var/mob/living/injector_mob -/obj/item/slime_extract/attackby(obj/item/O, mob/user) +/obj/item/slime_extract/attackby__legacy__attackchain(obj/item/O, mob/user) if(istype(O, /obj/item/slimepotion/enhancer)) if(Uses >= 5) to_chat(user, "You cannot enhance this extract further!") @@ -133,7 +133,7 @@ origin_tech = "biotech=4" var/being_used = FALSE -/obj/item/slimepotion/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) if(!isslime(M)) to_chat(user, "[src] only works on slimes!") return FALSE @@ -145,7 +145,7 @@ return FALSE return TRUE -/obj/item/slimepotion/afterattack(obj/item/reagent_containers/target, mob/user, proximity_flag) +/obj/item/slimepotion/afterattack__legacy__attackchain(obj/item/reagent_containers/target, mob/user, proximity_flag) if(!proximity_flag) return if(istype(target)) @@ -157,7 +157,7 @@ desc = "A potent chemical mix that nullifies a slime's hunger, causing it to become docile and tame." icon_state = "bottle19" -/obj/item/slimepotion/slime/docility/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/slime/docility/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) . = ..() if(!.) return @@ -200,10 +200,10 @@ if(2) . += "The vial is scalding hot! Is it really a good idea to use this..?" -/obj/item/slimepotion/sentience/attack() +/obj/item/slimepotion/sentience/attack__legacy__attackchain() return -/obj/item/slimepotion/sentience/afterattack(mob/living/M, mob/user, proximity_flag) +/obj/item/slimepotion/sentience/afterattack__legacy__attackchain(mob/living/M, mob/user, proximity_flag) if(!proximity_flag) return if(being_used || !ismob(M)) @@ -285,7 +285,7 @@ var/prompted = FALSE var/animal_type = SENTIENCE_ORGANIC -/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user, proximity_flag) +/obj/item/slimepotion/transference/afterattack__legacy__attackchain(mob/living/M, mob/user, proximity_flag) if(!proximity_flag) return if(prompted || !ismob(M)) @@ -326,7 +326,7 @@ desc = "A potent chemical mix that will cause a baby slime to generate more extract." icon_state = "bottle16" -/obj/item/slimepotion/slime/steroid/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/slime/steroid/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) . = ..() if(!.) return @@ -352,7 +352,7 @@ desc = "A potent chemical mix that will reduce the chance of a slime mutating." icon_state = "bottle15" -/obj/item/slimepotion/slime/stabilizer/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/slime/stabilizer/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) . = ..() if(!.) return @@ -370,7 +370,7 @@ desc = "A potent chemical mix that will increase the chance of a slime mutating." icon_state = "bottle3" -/obj/item/slimepotion/slime/mutator/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/slime/mutator/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) . = ..() if(!.) return @@ -394,7 +394,7 @@ desc = "A monkey-shaped treat that heats up your little slime friend!" icon_state = "slime_treat" -/obj/item/slimepotion/speed/attack(mob/living/simple_animal/slime/M, mob/user) +/obj/item/slimepotion/speed/attack__legacy__attackchain(mob/living/simple_animal/slime/M, mob/user) . = ..() if(!.) return @@ -421,7 +421,7 @@ resistance_flags = FIRE_PROOF var/uses = 3 -/obj/item/slimepotion/fireproof/afterattack(obj/item/clothing/C, mob/user, proximity_flag) +/obj/item/slimepotion/fireproof/afterattack__legacy__attackchain(obj/item/clothing/C, mob/user, proximity_flag) ..() if(!proximity_flag) return @@ -448,7 +448,7 @@ if(usr.incapacitated()) return if(loc == usr && loc.Adjacent(over_object)) - afterattack(over_object, usr, TRUE) + afterattack__legacy__attackchain(over_object, usr, TRUE) /obj/item/slimepotion/oil_slick name = "slime oil potion" @@ -457,7 +457,7 @@ icon_state = "bottle4" origin_tech = "biotech=5" -/obj/item/slimepotion/oil_slick/afterattack(obj/O, mob/user, proximity_flag) +/obj/item/slimepotion/oil_slick/afterattack__legacy__attackchain(obj/O, mob/user, proximity_flag) if(!proximity_flag) return ..() @@ -501,7 +501,7 @@ if(usr.incapacitated()) return if(loc == usr && loc.Adjacent(over_object)) - afterattack(over_object, usr, TRUE) + afterattack__legacy__attackchain(over_object, usr, TRUE) /obj/effect/timestop anchored = TRUE diff --git a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm index 3f32048e4dda6..04740d501b8f7 100644 --- a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm +++ b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm @@ -93,7 +93,7 @@ return default_unfasten_wrench(user, I, 10) -/obj/structure/clockwork/wall_gear/attackby(obj/item/I, mob/user, params) +/obj/structure/clockwork/wall_gear/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/tile/brass)) var/obj/item/stack/tile/brass/W = I if(W.get_amount() < 1) diff --git a/code/modules/ruins/lavalandruin_code/puzzle.dm b/code/modules/ruins/lavalandruin_code/puzzle.dm index 5ee35c7fa259e..0905ee6975dfe 100644 --- a/code/modules/ruins/lavalandruin_code/puzzle.dm +++ b/code/modules/ruins/lavalandruin_code/puzzle.dm @@ -303,7 +303,7 @@ icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "prison_cube" -/obj/item/prisoncube/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/prisoncube/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) . = ..() if(!proximity_flag || !isliving(target)) return diff --git a/code/modules/ruins/lavalandruin_code/sin_ruins.dm b/code/modules/ruins/lavalandruin_code/sin_ruins.dm index cc6719c595511..b6281e66fa3b7 100644 --- a/code/modules/ruins/lavalandruin_code/sin_ruins.dm +++ b/code/modules/ruins/lavalandruin_code/sin_ruins.dm @@ -194,7 +194,7 @@ w_class = WEIGHT_CLASS_NORMAL hitsound = 'sound/weapons/bladeslice.ogg' -/obj/item/kitchen/knife/envy/afterattack(atom/movable/AM, mob/living/carbon/human/user, proximity) +/obj/item/kitchen/knife/envy/afterattack__legacy__attackchain(atom/movable/AM, mob/living/carbon/human/user, proximity) . = ..() if(!proximity) return diff --git a/code/modules/ruins/objects_and_mobs/id_upgrader.dm b/code/modules/ruins/objects_and_mobs/id_upgrader.dm index c9d8d684dc48c..af4fa2906ba86 100644 --- a/code/modules/ruins/objects_and_mobs/id_upgrader.dm +++ b/code/modules/ruins/objects_and_mobs/id_upgrader.dm @@ -8,7 +8,7 @@ /// Have we been used? var/used = FALSE -/obj/machinery/computer/id_upgrader/attackby(obj/item/I, mob/user, params) +/obj/machinery/computer/id_upgrader/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/card/id)) var/obj/item/card/id/D = I if(!length(access_to_give)) diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 9ae9a8a0da4b9..2a761a0ea1f50 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -43,7 +43,7 @@ to_chat(user, "The station AI is not to interact with these devices.") return -/obj/machinery/keycard_auth/attackby(obj/item/W, mob/user, params) +/obj/machinery/keycard_auth/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") return diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 68336212acd9f..f1a50126fe7f8 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -31,7 +31,7 @@ var/lz_dir = 1 -/obj/item/assault_pod/attack_self(mob/living/user) +/obj/item/assault_pod/attack_self__legacy__attackchain(mob/living/user) var/target_area target_area = tgui_input_list(user, "Area to land", "Select a Landing Zone", SSmapping.teleportlocs) if(!target_area) diff --git a/code/modules/shuttle/dock_generator.dm b/code/modules/shuttle/dock_generator.dm index e6841aa9db1e0..d6769dfeca335 100644 --- a/code/modules/shuttle/dock_generator.dm +++ b/code/modules/shuttle/dock_generator.dm @@ -13,7 +13,7 @@ var/plural = count > 1 . += "There [plural ? "are" : "is"] [count] use[plural ? "s" : ""] left." -/obj/item/whiteship_port_generator/attack_self(mob/living/user) +/obj/item/whiteship_port_generator/attack_self__legacy__attackchain(mob/living/user) if(is_station_level(user.z)) log_admin("[key_name(user)] attempted to create a whiteship dock in the station's sector at [COORD(user)].") to_chat(user, "New docking areas cannot be designated within the station's sector!") diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 3bd7321a74a51..762fba8ab68aa 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -36,7 +36,7 @@ if(hijack_announce) . += "It is probably best to fortify your position as to be uninterrupted during the attempt, given the automatic announcements..." -/obj/machinery/computer/emergency_shuttle/attackby(obj/item/card/id/W, mob/user, params) +/obj/machinery/computer/emergency_shuttle/attackby__legacy__attackchain(obj/item/card/id/W, mob/user, params) if(stat & (BROKEN|NOPOWER)) return if(!istype(W, /obj/item/card/id)) diff --git a/code/modules/shuttle/lance_docking_targeter.dm b/code/modules/shuttle/lance_docking_targeter.dm index dcdda66d5f998..78b237dc433f6 100644 --- a/code/modules/shuttle/lance_docking_targeter.dm +++ b/code/modules/shuttle/lance_docking_targeter.dm @@ -22,7 +22,7 @@ playsound(T, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) return TRUE -/obj/item/lance_docking_generator/attack_self(mob/living/user) +/obj/item/lance_docking_generator/attack_self__legacy__attackchain(mob/living/user) if(!is_station_level(user.z)) to_chat(user, "You'll want this to dock on the station.") return diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 04d85784bd037..5e6477acf1d19 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -75,7 +75,7 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/monkey,/mob/living/carbon/alien))) -/obj/item/dna_probe/afterattack(atom/target, mob/user, proximity) +/obj/item/dna_probe/afterattack__legacy__attackchain(atom/target, mob/user, proximity) ..() if(!proximity || !target) return @@ -252,7 +252,7 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m if(length(plants) >= plants_max && length(animals) >= animals_max && length(dna) >= dna_max) completed = TRUE -/obj/machinery/dna_vault/attackby(obj/item/I, mob/user, params) +/obj/machinery/dna_vault/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/dna_probe)) var/obj/item/dna_probe/P = I var/uploaded = 0 diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 8cadd0fb23d7b..57871cd10cfc5 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -143,7 +143,7 @@ /obj/machinery/satellite/update_icon_state() icon_state = active ? "sat_active" : "sat_inactive" -/obj/machinery/satellite/attackby(obj/item/I, mob/user, params) +/obj/machinery/satellite/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/multitool)) to_chat(user, "// NTSAT-[id] // Mode : [active ? "PRIMARY" : "STANDBY"] //[emagged ? "DEBUG_MODE //" : ""]") else diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index eb8ded652b435..ede59565f2b58 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -416,7 +416,7 @@ flags = NOBLUDGEON var/drawing_power = FALSE -/obj/item/apc_powercord/afterattack(atom/target, mob/user, proximity_flag, click_parameters) +/obj/item/apc_powercord/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters) if(!istype(target, /obj/machinery/power/apc) || !ishuman(user) || !proximity_flag) return ..() if(drawing_power) @@ -801,7 +801,7 @@ desc = "An implant awaiting installation of a vortex anomaly core." icon_state = "v1_arm" -/obj/item/v1_arm_shell/attackby(obj/item/I, mob/user, params) +/obj/item/v1_arm_shell/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, /obj/item/assembly/signaler/anomaly/vortex)) to_chat(user, "You insert [I] into the back of the hand, and the implant begins to boot up.") new /obj/item/organ/internal/cyberimp/arm/v1_arm(get_turf(src)) diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index 8ca45f7e023a9..92ee6f5ebfc19 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -29,7 +29,7 @@ I.forceMove(src) name = "[initial(name)] ([storedorgan.name])" -/obj/item/autosurgeon/organ/attack_self(mob/user) //when the object it used... +/obj/item/autosurgeon/organ/attack_self__legacy__attackchain(mob/user) //when the object it used... if(!uses) to_chat(user, "[src] has already been used. The tools are dull and won't reactivate.") return @@ -46,7 +46,7 @@ if(!uses) desc = "[initial(desc)] Looks like it's been used up." -/obj/item/autosurgeon/organ/attackby(obj/item/I, mob/user, params) +/obj/item/autosurgeon/organ/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(istype(I, organ_type)) if(storedorgan) to_chat(user, "[src] already has an implant stored.") diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index c35fca1463d5a..d2c5426fc3dd5 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -16,7 +16,7 @@ else icon_state = "[base_icon_state]-off" -/obj/item/organ/internal/heart/attack_self(mob/user) +/obj/item/organ/internal/heart/attack_self__legacy__attackchain(mob/user) ..() if(status & ORGAN_DEAD) to_chat(user, "You can't restart a dead heart.") @@ -56,7 +56,7 @@ var/heal_burn = 0 var/heal_oxy = 0 -/obj/item/organ/internal/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target) +/obj/item/organ/internal/heart/cursed/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target) if(H == user && istype(H)) if(NO_BLOOD in H.dna.species.species_traits) to_chat(H, "[src] is not compatible with your form!") diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 4111e112cf9b2..3cbb358b23a19 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -71,7 +71,7 @@ if(species_override) dna.species = new species_override -/obj/item/organ/attackby(obj/item/I, mob/user, params) +/obj/item/organ/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(is_robotic() && istype(I, /obj/item/stack/nanopaste)) var/obj/item/stack/nanopaste/nano = I nano.use(1) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 623ce326cb2ba..0cdb6f6ce4e69 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -166,7 +166,7 @@ if(!HAS_TRAIT(owner, TRAIT_IB_IMMUNE)) limb_flags &= ~CANNOT_INT_BLEED -/obj/item/organ/external/attack(mob/M, mob/living/user) +/obj/item/organ/external/attack__legacy__attackchain(mob/M, mob/living/user) if(!ishuman(M)) return ..() var/mob/living/carbon/human/C = M @@ -713,7 +713,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(disembowel("groin")) return TRUE -/obj/item/organ/external/attackby(obj/item/I, mob/user, params) +/obj/item/organ/external/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(I.sharp) add_fingerprint(user) if(!length(contents)) diff --git a/code/modules/surgery/organs/organ_extractor.dm b/code/modules/surgery/organs/organ_extractor.dm index 16ee7fe6f11b4..4d8229d2fc548 100644 --- a/code/modules/surgery/organs/organ_extractor.dm +++ b/code/modules/surgery/organs/organ_extractor.dm @@ -39,10 +39,10 @@ if(storedorgan) storedorgan.emp_act(severity) -/obj/item/organ_extractor/attack_self(mob/user) +/obj/item/organ_extractor/attack_self__legacy__attackchain(mob/user) insert_organ(user, user) -/obj/item/organ_extractor/attack(mob/living/M, mob/living/user, def_zone) +/obj/item/organ_extractor/attack__legacy__attackchain(mob/living/M, mob/living/user, def_zone) if(in_use) to_chat(user, "[src] is already busy!") return @@ -179,7 +179,7 @@ self_insert_time = 1 SECONDS advanced = TRUE -/obj/item/organ_extractor/abductor/attackby(obj/item/I, mob/user, params) +/obj/item/organ_extractor/abductor/attackby__legacy__attackchain(obj/item/I, mob/user, params) . = ..() if(istype(I, /obj/item/organ/internal) && !storedorgan) user.unEquip(I) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 594cef1864705..2175c825bfea0 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -204,7 +204,7 @@ /obj/item/organ/internal/proc/render() return -/obj/item/organ/internal/attack(mob/living/carbon/M, mob/user) +/obj/item/organ/internal/attack__legacy__attackchain(mob/living/carbon/M, mob/user) if(M == user && ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/food/S = prepare_eat() diff --git a/code/modules/surgery/organs/subtypes/xenos.dm b/code/modules/surgery/organs/subtypes/xenos.dm index 606c15cf96133..efa105e358f59 100644 --- a/code/modules/surgery/organs/subtypes/xenos.dm +++ b/code/modules/surgery/organs/subtypes/xenos.dm @@ -37,7 +37,7 @@ else . += "You can hijack the latent functions of this organ by using a Hemostat on it." -/obj/item/organ/internal/alien/attackby(obj/item/hemostat/item, mob/user, params) +/obj/item/organ/internal/alien/attackby__legacy__attackchain(obj/item/hemostat/item, mob/user, params) if(istype(item)) if(!hijacked) to_chat(user, "You slice off the control node of this organ. This organ will now be effective against aliens.") diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 8dcf71a6f2cfd..a4e35b9bec99f 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -500,7 +500,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) desc = "They carry the voice of an ancient god. This one is enchanted to implant it into yourself when used in hand." var/has_implanted = FALSE -/obj/item/organ/internal/vocal_cords/colossus/wizard/attack_self(mob/living/user) +/obj/item/organ/internal/vocal_cords/colossus/wizard/attack_self__legacy__attackchain(mob/living/user) if(has_implanted) return user.drop_item() diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index f98fe6eea4327..49d3ebd3e0e9e 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -56,7 +56,7 @@ attack_verb = list("burnt") tool_behaviour = TOOL_CAUTERY -/obj/item/cautery/attack(mob/living/target, mob/living/user) +/obj/item/cautery/attack__legacy__attackchain(mob/living/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() @@ -168,7 +168,7 @@ damtype = "fire" hitsound = 'sound/weapons/sear.ogg' -/obj/item/scalpel/laser/attack(mob/living/carbon/target, mob/living/user) +/obj/item/scalpel/laser/attack__legacy__attackchain(mob/living/carbon/target, mob/living/user) if(!cigarette_lighter_act(user, target)) return ..() diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index d09edc18b7411..65782477e2eaa 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -34,7 +34,7 @@ pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) -/obj/item/stack/ore/bluespace_crystal/attack_self(mob/user) +/obj/item/stack/ore/bluespace_crystal/attack_self__legacy__attackchain(mob/user) if(use(1)) blink_mob(user) user.visible_message("[user] crushes a [singular_name]!") diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index 9bcba4f51b0ab..e057f73527641 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -118,7 +118,7 @@ GLOBAL_LIST_EMPTY(GPS_list) return data -/obj/item/gps/attack_self(mob/user) +/obj/item/gps/attack_self__legacy__attackchain(mob/user) ui_interact(user) /obj/item/gps/ui_state(mob/user) diff --git a/code/modules/telesci/rcs.dm b/code/modules/telesci/rcs.dm index 109d1b09bc7fb..92f7a1109fef1 100644 --- a/code/modules/telesci/rcs.dm +++ b/code/modules/telesci/rcs.dm @@ -46,7 +46,7 @@ /** * Used to select telepad location. */ -/obj/item/rcs/attack_self(mob/user) +/obj/item/rcs/attack_self__legacy__attackchain(mob/user) if(teleporting) to_chat(user, "Error: Unable to change destination while in use.") return diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index e6975d8b19518..fdd2770d7c270 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -99,7 +99,7 @@ item_state = "signaler" origin_tech = "bluespace=3" -/obj/item/telepad_beacon/attack_self(mob/user as mob) +/obj/item/telepad_beacon/attack_self__legacy__attackchain(mob/user as mob) if(user) to_chat(user, " Locked In") new /obj/machinery/telepad_cargo(user.loc) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 76d5faa083d79..8e3d33310f7a1 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -60,7 +60,7 @@ . = ..() . += "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots." -/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params) +/obj/machinery/computer/telescience/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/ore/bluespace_crystal)) var/obj/item/stack/ore/bluespace_crystal/B = W if(crystals >= MAX_CRYSTALS) diff --git a/code/modules/tgui/plugins/tgui_login.dm b/code/modules/tgui/plugins/tgui_login.dm index e558cc118bebe..0f80f0a13fe48 100644 --- a/code/modules/tgui/plugins/tgui_login.dm +++ b/code/modules/tgui/plugins/tgui_login.dm @@ -11,7 +11,7 @@ * 1. Call [/obj/proc/ui_login_act] at the start of your ui_act() proc * 2. Call [/obj/proc/ui_login_data] in your ui_data() proc while passing the data list * 3. In your object, call [/obj/proc/ui_login_get] to get the current login state. - * 4. Optional: call [/obj/proc/ui_login_attackby] in your attackby() to make the login process easier. + * 4. Optional: call [/obj/proc/ui_login_attackby] in your attackby__legacy__attackchain() to make the login process easier. * * How to use (JS side): Use the and interfaces. */ diff --git a/code/modules/vehicle/janivehicle.dm b/code/modules/vehicle/janivehicle.dm index 3082551c672aa..a116fad9de308 100644 --- a/code/modules/vehicle/janivehicle.dm +++ b/code/modules/vehicle/janivehicle.dm @@ -90,37 +90,43 @@ if(buffer_installed) . += "It has been upgraded with a floor buffer." -/obj/vehicle/janicart/attackby(obj/item/I, mob/user, params) +/obj/vehicle/janicart/attack_by(obj/item/attacking, mob/user, params) + if(..()) + return FINISH_ATTACK + var/fail_msg = "There is already one of those in [src]." - if(istype(I, /obj/item/storage/bag/trash)) + if(istype(attacking, /obj/item/storage/bag/trash)) if(mybag) to_chat(user, fail_msg) - return + return FINISH_ATTACK if(!user.drop_item()) - return - to_chat(user, "You hook [I] onto [src].") - I.forceMove(src) - mybag = I + return FINISH_ATTACK + to_chat(user, "You hook [attacking] onto [src].") + attacking.forceMove(src) + mybag = attacking update_icon(UPDATE_OVERLAYS) - return - if(istype(I, /obj/item/borg/upgrade/floorbuffer)) + return FINISH_ATTACK + if(istype(attacking, /obj/item/borg/upgrade/floorbuffer)) if(buffer_installed) to_chat(user, fail_msg) - return + return FINISH_ATTACK buffer_installed = TRUE - qdel(I) - to_chat(user,"You upgrade [src] with [I].") + qdel(attacking) + to_chat(user,"You upgrade [src] with [attacking].") update_icon(UPDATE_OVERLAYS) - return - if(istype(I, /obj/item/borg/upgrade/vtec) && floorbuffer) + return FINISH_ATTACK + if(mybag && user.a_intent == INTENT_HELP && !is_key(attacking)) + mybag.attackby__legacy__attackchain(attacking, user) + else + return FINISH_ATTACK + +/obj/vehicle/janicart/install_vtec(obj/item/borg/upgrade/vtec/vtec, mob/user) + if(..() && floorbuffer) floorbuffer = FALSE vehicle_move_delay -= buffer_delay - return ..() //VTEC installation is handled in parent attackby, so we're returning to it early - if(mybag && user.a_intent == INTENT_HELP && !is_key(I)) - mybag.attackby(I, user) - else - return ..() + + return TRUE /obj/vehicle/janicart/update_overlays() . = ..() diff --git a/code/modules/vehicle/tg_vehicles/scooter.dm b/code/modules/vehicle/tg_vehicles/scooter.dm index 1a751677edb8e..6ff3e1b4a1682 100644 --- a/code/modules/vehicle/tg_vehicles/scooter.dm +++ b/code/modules/vehicle/tg_vehicles/scooter.dm @@ -275,7 +275,7 @@ icon_state = "scooter_frame" w_class = WEIGHT_CLASS_NORMAL -/obj/item/scooter_frame/attackby(obj/item/I, mob/user, params) +/obj/item/scooter_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/stack/sheet/metal)) return ..() var/obj/item/stack/S = I @@ -301,7 +301,7 @@ /obj/tgvehicle/scooter/skateboard/wrench_act(mob/living/user, obj/item/I) return -/obj/tgvehicle/scooter/skateboard/improvised/attackby(obj/item/I, mob/user, params) +/obj/tgvehicle/scooter/skateboard/improvised/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!istype(I, /obj/item/stack/rods)) return ..() var/obj/item/stack/S = I @@ -351,7 +351,7 @@ ///The vehicle counterpart for the board var/board_item_type = /obj/tgvehicle/scooter/skateboard -/obj/item/melee/skateboard/attack_self(mob/user) +/obj/item/melee/skateboard/attack_self__legacy__attackchain(mob/user) var/obj/tgvehicle/scooter/skateboard/S = new board_item_type(get_turf(user))//this probably has fucky interactions with telekinesis but for the record it wasn't my fault S.buckle_mob(user) qdel(src) diff --git a/code/modules/vehicle/tg_vehicles/tg_vehicles.dm b/code/modules/vehicle/tg_vehicles/tg_vehicles.dm index b0bf2f2f39d18..57c52ad3bae18 100644 --- a/code/modules/vehicle/tg_vehicles/tg_vehicles.dm +++ b/code/modules/vehicle/tg_vehicles/tg_vehicles.dm @@ -192,7 +192,7 @@ add_occupant(M) return ..() -/obj/tgvehicle/attackby(obj/item/I, mob/user, params) +/obj/tgvehicle/attackby__legacy__attackchain(obj/item/I, mob/user, params) if(!key_type || is_key(inserted_key) || !is_key(I)) return ..() if(user.drop_item()) diff --git a/code/modules/vehicle/vehicle.dm b/code/modules/vehicle/vehicle.dm index 117b5a11148c7..4b0c49da3c1ff 100644 --- a/code/modules/vehicle/vehicle.dm +++ b/code/modules/vehicle/vehicle.dm @@ -24,6 +24,8 @@ var/generic_pixel_y = 0 //All dirs shwo this pixel_y for the driver var/spaceworthy = FALSE + new_attack_chain = TRUE + /obj/vehicle/Initialize(mapload) . = ..() @@ -58,23 +60,30 @@ if(0 to 25) . += "It's falling apart!" -/obj/vehicle/attackby(obj/item/I, mob/user, params) - if(key_type && !is_key(inserted_key) && is_key(I)) +/obj/vehicle/proc/install_vtec(obj/item/borg/upgrade/vtec/vtec, mob/user) + if(vehicle_move_delay > 1) + vehicle_move_delay = 1 + qdel(vtec) + to_chat(user, "You upgrade [src] with [vtec].") + + return TRUE + +/obj/vehicle/attack_by(obj/item/attacking, mob/user, params) + if(..()) + return FINISH_ATTACK + + if(key_type && !is_key(inserted_key) && is_key(attacking)) if(user.drop_item()) - I.forceMove(src) - to_chat(user, "You insert [I] into [src].") + attacking.forceMove(src) + to_chat(user, "You insert [attacking] into [src].") if(inserted_key) //just in case there's an invalid key inserted_key.forceMove(drop_location()) - inserted_key = I + inserted_key = attacking else - to_chat(user, "[I] seems to be stuck to your hand!") - return - if(istype(I, /obj/item/borg/upgrade/vtec) && vehicle_move_delay > 1) - vehicle_move_delay = 1 - qdel(I) - to_chat(user, "You upgrade [src] with [I].") - return - return ..() + to_chat(user, "[attacking] seems to be stuck to your hand!") + return FINISH_ATTACK + if(istype(attacking, /obj/item/borg/upgrade/vtec) && install_vtec(attacking, user)) + return FINISH_ATTACK /obj/vehicle/AltClick(mob/user) if(inserted_key && user.Adjacent(user)) diff --git a/docs/references/attack_chain.md b/docs/references/attack_chain.md new file mode 100644 index 0000000000000..2132b5c25f009 --- /dev/null +++ b/docs/references/attack_chain.md @@ -0,0 +1,751 @@ +# The Attack Chain + +The vast majority of things that happen when a player performs an action on an +object or another player occurs within the _attack chain_. The attack chain is +the set of procs and signals that determine what should happen when an action is +performed, if an attack should occur, and what to do afterwards. + +## Overview + +The attack chain is made up of multiple procs and signals which are expected to +respect each other's responses as to how the attack chain should be executed. +For most mobs, this begins in [`/mob/proc/ClickOn`][clickon]. + +First, any click performed with a modifier key such as `SHIFT` or `ALT` is +handled first in separate procs. A handful of global use cases are handled next, +such as if the user is in a mech, if they are restrained, if they are throwing +an item, or if the thing they're interacting with is an SSD player. + +The core of the attack chain commences: + +1. If the user is holding the item and clicking on it, + `/obj/item/activate_self()` is called. This sends `COMSIG_ACTIVATE_SELF` and + cancels the rest of the attack chain if `COMPONENT_CANCEL_ATTACK_CHAIN` is + returned by any listeners. +2. If the user can reach the item or it is in relatively accessible inventory + (three levels deep), the melee attack chain is called via + `/obj/item/melee_attack_chain()`. +3. If the user is on HELP intent and the item is a tool, the various + `multitool_act()`/`welder_act()`/`screwdriver_act()`/etc. methods are called + depending on the tool type. This typically causes the attack chain to end. +4. Several signals are sent: `COMSIG_INTERACT_TARGET`, `COMSIG_INTERACTING`, and + `COMSIG_INTERACT_USER`. If any listeners request it (usually by returning a + non-null value), the attack chain may end here. +5. If the target implements `item_interaction()`, it is called here, and can + return one of the `ITEM_INTERACT_` flags to end the attack chain. +6. If the item being used on the target implements `interact_with_atom()`, it is + called here, and can return one of the `ITEM_INTERACT_` flags to end the + attack chain. + +The above steps can generally be considered the "item interaction phase", when +the action is not meant to cause in-game harm to the target. If the attack chain +has not been ended, this means we are in the "attack phase": + +1. `pre_attack()` is called on the used item, which sends `COMSIG_PRE_ATTACK`, + and cancels the rest of the attack chain if any listeners return + `COMPONENT_CANCEL_ATTACK_CHAIN`. +2. `attack_by()` is called on the target. This sends `COMSIG_ATTACKBY`, and + cancels the rest of the attack chain if any listeners return + `COMPONENT_SKIP_AFTERATTACK`. +3. `attacked_by()` is called on the target. +4. `COMSIG_AFTER_ATTACK` is sent on the used item, and + `COMSIG_AFTER_ATTACKED_BY` is sent on the target. + +The benefits of this approach is that it allows an enormous amount of +flexibility when it comes to dealing with attacks, while ensuring that behaviors +that are always expected occur consistently. + +For a high-level flowchart of the attack chain, see below. Note that this +flowchart may not be 100% accurate/up-to-date. When in doubt, check the +implementation. + + + + + +![](./images/attack_chain_flowchart.png) + +[clickon]: https://codedocs.paradisestation.org/mob.html#proc/ClickOn + +## Why? + +A reasonable question to ask would be, why do we need all of these procs and +signals? + +A good way to think of the attack chain is as a series of suggestions, rather +than a series of instructions. If a player attacks a mob with an object, there +are many things in the game world that may want to have a say in whether that +will happen, and how it will happen. + +For example, there may be a component attached to the player that wants to +intercept whenever an attack is attempted in order to cancel it or substitute +its own action. The item being used to attack may want to cancel the attack +based on its own internal state. The mob or object being attacked may have +specific ways to react to the attack. + +By having as many procs and signals as we do, we're allowing all involved +objects and any attached components or elements to contribute their own behavior +into the attack chain. + +### ITEM_INTERACT flags + +One may also ask why there are several `ITEM_INTERACT_` flags if returning any +of them always results in the end of the attack chain. This is for two reasons: + +1. To make it clear at the call site what the intent of the code is, and +2. So that in the future, if we do wish to separate the behavior of these flags, + we do not need to refactor all of the call sites. + +## Attack Chain Refactor + +The attack chain was overhauled in [#26834][]. This overhaul introduced several +safeties, renamed many procs and signals, and helped to ensure consistent +handling of signals in order to help make the attack chain more reliable. + +[#26834]: https://github.com/ParadiseSS13/Paradise/pull/26834 + +Prior to the attack chain refactoring, this system was disorganized and its +behavior was not unified. Some procs would call their parent procs, some +wouldn't. Some would send out signals at the right time, some wouldn't. The +attack chain refactor unified all this behavior, but it did not do it across the +entire codebase, all at once. + +Instead, a separate codepath was introduced, and all existing uses of the attack +chain were placed in separate procs. These are easily identified by procs which +contain `legacy__attackchain` in the name. The goal is to move all uses of the +legacy attack chain onto the new one, but it would be infeasible to attempt to +do this all at once. + +Anyone can choose to migrate attack chains if they so desire to help complete +the migration. + +> [!NOTE] +> +> If you are working in code that touches the legacy attack chain, it is +> expected that you migrate the code to the new attack chain first. + +## Performing Migrations + +Procs with the `__legacy__attackchain` suffix must be carefully understood in +order to migrate them properly. This is not just a matter of renaming procs; it +is expected that a migration preserve all existing behavior while fixing any +potential bugs that were a result of the original implementation. + +There are several important points: + +1. Any subtype which is being migrated must have all of its parent types (up to + but not including `/obj/item`) migrated as well. If you are migrating + `/obj/item/foo/bar/baz/proc/attacked_by__legacy__attackchain()`, then you + must also migrate `/obj/item/foo/bar/proc/attacked_by__legacy__attackchain()` + and `/obj/item/foo/proc/attacked_by__legacy__attackchain()`. +2. Once a tree of items has been updated to the new attack chain, its + `new_attack_chain` var must be set to `TRUE`. +3. All legacy attack chain procs in an object tree must be migrated at once. + +While this may seem overwhelming, the good news is that most migrations are +straightforward, and because you are only migrating a small part of the codebase +at a time, it is easy to test the results. + +In order to make this process easier, we'll examine some sample migrations that +have already been performed. + +### `attackby` + +`attackby` is used in cases when an item needs to respond to another item being +used on it. These can be fairly straightforward if the type tree is shallow and +the number of interactions is small. + +Our example migration is `/obj/vehicle`. This type tree only requires migrating: + +- `/obj/vehicle/proc/attackby__legacy__attackchain` +- `/obj/vehicle/janicart/proc/attackby__legacy__attackchain` + +First, let's look at `/obj/vehicle/attackby__legacy__attackchain`: + +```dm +/obj/vehicle/attackby__legacy__attackchain(obj/item/I, mob/user, params) + if(key_type && !is_key(inserted_key) && is_key(I)) + if(user.drop_item()) + I.forceMove(src) + to_chat(user, "You insert [I] into [src].") + if(inserted_key) //just in case there's an invalid key + inserted_key.forceMove(drop_location()) + inserted_key = I + else + to_chat(user, "[I] seems to be stuck to your hand!") + return + if(istype(I, /obj/item/borg/upgrade/vtec) && vehicle_move_delay > 1) + vehicle_move_delay = 1 + qdel(I) + to_chat(user, "You upgrade [src] with [I].") + return + return ..() +``` + +The logic here is pretty straightforward. We check to see if the user is +attempting to insert a key, if there's already one in the vehicle, and if the +key can be dropped by the user. We also check to see if the user is attempting +to install the VTEC upgrade. Otherwise we return control to the parent. + +Now let's look at `/obj/vehicle/janicart/attackby__legacy__attackchain`: + +```dm +/obj/vehicle/janicart/attackby(obj/item/I, mob/user, params) + var/fail_msg = "There is already one of those in [src]." + + if(istype(I, /obj/item/storage/bag/trash)) + if(mybag) + to_chat(user, fail_msg) + return + if(!user.drop_item()) + return + to_chat(user, "You hook [I] onto [src].") + I.forceMove(src) + mybag = I + update_icon(UPDATE_OVERLAYS) + return + if(istype(I, /obj/item/borg/upgrade/floorbuffer)) + if(buffer_installed) + to_chat(user, fail_msg) + return + buffer_installed = TRUE + qdel(I) + to_chat(user,"You upgrade [src] with [I].") + update_icon(UPDATE_OVERLAYS) + return + if(istype(I, /obj/item/borg/upgrade/vtec) && floorbuffer) + floorbuffer = FALSE + vehicle_move_delay -= buffer_delay + return ..() //VTEC installation is handled in parent attackby, so we're returning to it early + if(mybag && user.a_intent == INTENT_HELP && !is_key(I)) + mybag.attackby(I, user) + else + return ..() +``` + +Here the logic is a bit more complex, but has a basic structure: we check to see +what kind of thing the janicart is being attacked with. If it's a trash bag or +floor buffer, we attach it. If it's VTEC upgrade we remove the floorbuffer and +return control to the parent for installing the VTEC. If there's a bag and the +user is clicking on it with anything else with help intent, attempt to put it in +the bag. Otherwise, return control to the parent. + +Most of this logic will work just fine as is, with the exception that we will +need to return `FINISH_ATTACK` in the appropriate places when we want the attack +chain to stop. + +We also need to refactor the code regarding VTEC installation: because one +subtype does something different in reaction to the installation, we will pull +that into its own proc, rather than try to rely on a back-and-forth between +parent and child `attack_by`. + +At the end of `/obj/vehicle/attack_by`: + +```diff + to_chat(user, "[I] seems to be stuck to your hand!") + return +- if(istype(I, /obj/item/borg/upgrade/vtec) && vehicle_move_delay > 1) +- vehicle_move_delay = 1 +- qdel(I) +- to_chat(user, "You upgrade [src] with [I].") +- return +- return ..() ++ if(istype(I, /obj/item/borg/upgrade/vtec) && install_vtec(I, user)) ++ return FINISH_ATTACK +``` + +And then: + +```diff ++/obj/vehicle/proc/install_vtec(obj/item/borg/upgrade/vtec/vtec, mob/user) ++ if(vehicle_move_delay > 1) ++ vehicle_move_delay = 1 ++ qdel(vtec) ++ to_chat(user, "You upgrade [src] with [vtec].") ++ ++ return TRUE +``` + +Now, since we know the parent `attack_by` will get called first, we don't need +to check for an attempted VTEC installation in the janicart at all. We just need +to react to it properly: + +```diff ++/obj/vehicle/janicart/install_vtec(obj/item/borg/upgrade/vtec/vtec, mob/user) ++ if(..() && floorbuffer) ++ floorbuffer = FALSE ++ vehicle_move_delay -= buffer_delay ++ ++ return TRUE +``` + +That is: if the VTEC installation was successful, we remove the floorbuffer and +its delay. We want to return `TRUE` at the end no matter what, because this is +the indication not that the VTEC installation was succesful, but that it was +attempted, and thus the rest of the attack chain is not necessary. + +We make sure to include: + +```diff ++ if(..()) ++ return FINISH_ATTACK +``` + +At the top of each `attack_by` proc, and set `new_attack_chain = TRUE` on +`/obj/vehicle.` + +> [!NOTE] +> +> An advantage of migrating the attack chain procs piecemeal is that each PR +> requires less testing relative to the whole, but this testing must still +> occur. +> +> It is important to come up with a comprehensive list of things to test for +> each migration PR. For the above migration, an example set of tasks might +> include: +> +> - Testing that bags can be attached to janicarts +> - Testing that players can get on and off all vehicles +> - Testing that keys can be inserted into vehicles +> - Testing that only the correct keys can be inserted into vehicles +> - Testing attacking vehicles with other objects +> - Testing adding the floor buffer to janicarts +> - Testing adding VTEC to vehicles +> - Come up with your own test cases! +> +> The valuable thing about keys and attacks with other objects is because +> they're not part of the new attack chain yet. This helps to ensure the legacy +> and new attack chains are interacting with each other properly, as well. + +### `attack_self` + +`attack_self` is, typically, not part of the chain's attack phase at all. In the +new attack chain, the proc is called `activate_self` to reflect this. + +Let's examine the case of airlock electronics, `/obj/item/airlock_electronics`. +This is a good example because it has no parent types we need to migrate. Here +is the proc before the migration: + +```dm +/obj/item/airlock_electronics/attack_self__legacy__attackchain(mob/user) + if(!ishuman(user) && !isrobot(user)) + return ..() + + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.getBrainLoss() >= max_brain_damage) + to_chat(user, "You forget how to use [src].") + return + ui_interact(user) +``` + +There's a couple things to note here: + +1. Currently, the parent proc is only called if the player is in a mob that + isn't meant to interact with the electronics; which means the signal + `COMSIG_ACTIVATE_SELF` is only sent if the electronics _aren't_ activated by + the user! +2. The behavior regarding brain damage and being unable to use the electronics + seems like it would be much more useful if generalized into a component, but + we can ignore that for now. + +The first thing we do is ensure that the parent proc is called at the correct +time, and correctly respond to its requests if the interaction should be cancelled: + +```diff +/obj/item/airlock_electronics/attack_self__legacy__attackchain(mob/user) ++ if(..()) ++ return + + if(!ishuman(user) && !isrobot(user)) + return ..() +``` + +Secondly, we can pull the other guard clause into the conditional, since it +returns in the same manner: + +```diff +/obj/item/airlock_electronics/attack_self__legacy__attackchain(mob/user) +- if(..()) ++ if(..() || (!ishuman(user) && !isrobot(user))) + return + +- if(!ishuman(user) && !isrobot(user)) +- return ..() +``` + +Then, we rename the proc: + +```diff +-/obj/item/airlock_electronics/attack_self__legacy__attackchain(mob/user) ++/obj/item/airlock_electronics/activate_self(mob/user) +``` + +And, importantly, we change the value of `var/new_attack_chain` in the +object declaration to let the attack chain know to use the new proc: + +```diff +/obj/item/airlock_electronics + name = "airlock electronics" + icon = 'icons/obj/doors/door_assembly.dmi' + // ... + ++ new_attack_chain = TRUE +``` + +The migration is complete. The proc now looks like this: + +```dm +/obj/item/airlock_electronics/activate_self(mob/user) + if(..() || (!ishuman(user) && !isrobot(user))) + return + + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.getBrainLoss() >= max_brain_damage) + to_chat(user, "You forget how to use [src].") + return + ui_interact(user) +``` + +### `attack` + +Let's now look at a more complex example, the cult dagger, +`/obj/item/melee/cultblade/dagger`. This is the code as it exists before the +migration: + +```dm +/obj/item/melee/cultblade/dagger/attack__legacy__attackchain(mob/living/M, mob/living/user) + if(IS_CULTIST(M)) + if(M.reagents && M.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion + if(M == user) // Targeting yourself + to_chat(user, "You can't remove holy water from yourself!") + else // Targeting someone else + to_chat(user, "You remove the taint from [M].") + to_chat(M, "[user] removes the taint from your body.") + M.reagents.del_reagent("holywater") + add_attack_logs(user, M, "Hit with [src], removing the holy water from them") + return FALSE + else + var/datum/status_effect/cult_stun_mark/S = M.has_status_effect(STATUS_EFFECT_CULT_STUN) + if(S) + S.trigger() + . = ..() +``` + +Because the dagger has a parent proc, let's also examine that: + +```dm +/obj/item/melee/cultblade/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user) + if(!IS_CULTIST(user)) + user.Weaken(10 SECONDS) + user.unEquip(src, 1) + user.visible_message("A powerful force shoves [user] away from [target]!", + "\"You shouldn't play with sharp things. You'll poke someone's eye out.\"") + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) + else + user.adjustBruteLoss(rand(force/2, force)) + return + if(!IS_CULTIST(target)) + var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN) + if(S) + S.trigger() + ..() +``` + +There are several codepaths happening here: + +1. If a non-cultist attacks with the dagger, they are forced to drop it, gain + several status effects, and receive brute damage. +2. If a cultist attacks another cultist, it removes holy water from the target. + If the target has no holy water in them, it does nothing. +3. If a cultist attacks a non-cultist, and the non-cultist has a cult-stun + status effect, it is prolonged. + +Several issues should become apparent while reading through this. First let's +determine when the root `attack()` proc is actually called: + +1. In `cultblade/dagger/attack()`, there is an early return if the target is a cultist. +2. In `cultblade/attack()`, there is an early return if the user is _not_ a cultist. + +This means that we only wish to follow through with an attack if the user is a +cultist and the target is not. This suggests to us that the code for the first +two codepaths above should come before the `attack()`, logically, the +`pre_attack()`. + +(You may also notice a bug in the code. We'll point it out below but see if you +can spot it yourself.) + +The first thing we'll do is handle the first codepath, in the dagger's parent +type: + +```diff +-/obj/item/melee/cultblade/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user) ++/obj/item/melee/cultblade/pre_attack(atom/target, mob/living/user, params) ++ if(..()) ++ return FINISH_ATTACK + + if(!IS_CULTIST(user)) + // ... + ++ return FINISH_ATTACK +``` + +We return early if our parent proc asks us to, and we return early if the user +isn't a cultist, because the user can't perform an attack. + +We adjust the attack proc itself to check its parent, and perform the cult-stun +trigger. We return nothing to let the attack chain know to continue: + +```diff ++/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user) ++ if(..()) ++ return FINISH_ATTACK ++ + if(!IS_CULTIST(target)) + var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN) + if(S) + S.trigger() +- ..() +``` + +Then we'll handle the dagger itself. Again, we want to cancel the attack chain +if a cultist user is attacking a cultist target, one way or another: + +```diff +-/obj/item/melee/cultblade/dagger/attack(mob/living/M, mob/living/user) +- if(IS_CULTIST(M)) +- if(M.reagents && M.reagents.has_reagent("holywater")) +- if(M == user) // Targeting yourself ++/obj/item/melee/cultblade/dagger/pre_attack(atom/target, mob/living/user, params) ++ if(..()) ++ return FINISH_ATTACK ++ ++ if(IS_CULTIST(target)) ++ if(target.reagents && target.reagents.has_reagent("holywater")) ++ if(target == user) // Targeting yourself + + // ... + ++ return FINISH_ATTACK +``` + +By regularly calling the parent proc first, it's easier to think through the +process of what's happening. It's much easier to tell that the parent proc +handles failed attacks by non-cultists first, and only if that's not the case +does the holy-water removal behavior run. Since we know we're not a non-cultist +at this point, we don't need to perform a second check for that, either. + +This also fixes a bug in the original code. Because the code to re-trigger +cult-stuns on targets was duplicated in both attack procs, it was being called +twice. It's now much easier to tell when that is happening. + +The resultant code looks like this: + +```dm +/obj/item/melee/cultblade/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + + if(!IS_CULTIST(user)) + user.Weaken(10 SECONDS) + user.unEquip(src, 1) + user.visible_message("A powerful force shoves [user] away from [target]!", + "\"You shouldn't play with sharp things. You'll poke someone's eye out.\"") + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) + else + user.adjustBruteLoss(rand(force/2, force)) + + return FINISH_ATTACK + +/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user) + if(..()) + return FINISH_ATTACK + + if(!IS_CULTIST(target)) + var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN) + if(S) + S.trigger() + +/obj/item/melee/cultblade/dagger/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + + if(IS_CULTIST(target)) + if(target.reagents && target.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion + if(target == user) // Targeting yourself + to_chat(user, "You can't remove holy water from yourself!") + + else // Targeting someone else + to_chat(user, "You remove the taint from [target].") + to_chat(target, "[user] removes the taint from your body.") + target.reagents.del_reagent("holywater") + add_attack_logs(user, target, "Hit with [src], removing the holy water from them") + + return FINISH_ATTACK +``` + +Not only is it much easier to read and understand what is happening, it is also +divided up into smaller, more manageable procs with clear names to explain the +sequence of events. Finally, because we constantly check the parent proc, all +signals that are expected to be sent, are, so any other components or listeners +can take appropriate action and cancel the attack chain themselves, if requested. + +## Migration Helpers + +There are two important tools which can help make the migration process easier: +the _migration plan checker_ and the _attack chain CI checks_. + +### Migration Plan Checker + +If you are making a code change and need to update the attack chain on an +object, the migration plan checker will tell you what other types will need to +be migrated in the same PR. For example, if I wanted to migrate `/turf/simulated/wall/cult`, I could rune the migration plan checker at the command line: + +``` +$ python .\tools\migrate_attack_chain.py /turf/simulated/wall/cult +Migration Plan for Path /turf/simulated/wall/cult +Required Additional Migrations: + /turf + /turf/simulated/floor + /turf/simulated/floor/chasm + /turf/simulated/floor/grass + /turf/simulated/floor/holofloor + /turf/simulated/floor/indestructible + /turf/simulated/floor/lava + /turf/simulated/floor/lava/lava_land_surface/plasma + /turf/simulated/floor/light + /turf/simulated/floor/mineral/bananium + /turf/simulated/floor/mineral/plasma + /turf/simulated/floor/mineral/uranium + /turf/simulated/floor/plating + /turf/simulated/floor/plating/asteroid + /turf/simulated/floor/plating/metalfoam + /turf/simulated/floor/vines + /turf/simulated/mineral + /turf/simulated/mineral/ancient + /turf/simulated/mineral/ancient/lava_land_surface_hard + /turf/simulated/mineral/ancient/outer + /turf/simulated/wall + /turf/simulated/wall/indestructible + /turf/simulated/wall/mineral/plasma + /turf/simulated/wall/mineral/uranium + /turf/simulated/wall/mineral/wood + /turf/simulated/wall/r_wall + /turf/space + /turf/space/transit +Toggle `new_attack_chain = TRUE` on: + /turf +``` + +You can see the output shows two things: + +1. The list of other types that will need to be migrated at the same time, and +2. The type that `new_attack_chain` should be set to TRUE after the migration is + complete. + +This means that instead of just migrating `/turf/simulated/wall/cult`, we will +be migrating 28 types. This is a lot! A migration of this size is not recommended +for new contributors. On the other hand, let us examine migrating wirecutters: + +``` +$ python .\tools\migrate_attack_chain.py /obj/item/wirecutters +Migration Plan for Path /obj/item/wirecutters +Required Additional Migrations: + /obj/item/wirecutters + /obj/item/wirecutters/power +Toggle `new_attack_chain = TRUE` on: + /obj/item/wirecutters +``` + +If we wanted to migrate `/obj/item/wirecutters`, we only need to migrate that +type and one other, the power wirecutters. This is a much more manageable +migration for novice contributors. + +### Attack Chain CI Checks + +The attack chain CI checks are run when a pull request is opened or modified. It +provides a high-level overview of how complete a migration is. These checks will: + +- Ensure that anything marked with `new_attack_chain = TRUE` does not override + any legacy attack chain procs +- Ensure that all of the objects required in a specific type migration have been + migrated +- Ensure that any other types that call attack chain methods on migrated types + no longer call legacy attack chain procs. + +Let's look at our wirecutters example again. If we were simply to set +`new_attack_chain = TRUE` on `/obj/item/wirecutters` without making any other +code changes, the CI check will return something like this: + +``` +check_legacy_attack_chain started +new_attack_chain on /obj/item/wirecutters still has legacy procs: + attack__legacy__attackchain +new_attack_chain on /obj/item/wirecutters/power still has legacy procs: + attack_self__legacy__attackchain +check_legacy_attack_chain tests completed in 5.06s +``` + +This makes it clear that both types in the type chain marked as new still have +legacy procs that need to be migrated. + +Let's return to our `/turf` example. You can see in the output from the +Migration Plan Checker that if we were to migrate `/turf/simulated/wall/cult` +that `new_attack_chain` should be set to `TRUE` on `/turf` itself. What if we +were to ignore that, and not make any other changes but to set +`new_attack_chain` to `TRUE` on `/turf/simulated/wall`? + +The CI check will return something like this: + +``` +check_legacy_attack_chain started +new_attack_chain on /turf/simulated/mineral still has legacy procs: + attackby__legacy__attackchain +new_attack_chain on /turf/simulated/mineral but related type /turf is not +Call sites requiring migration: +code\game\turfs\simulated\minerals.dm:139: /turf/simulated/mineral/Bumped(...) calls attackby__legacy__attackchain(...) on var /turf/simulated/mineral/src +code\game\turfs\simulated\minerals.dm:133: /turf/simulated/mineral/Bumped(...) calls attackby__legacy__attackchain(...) on var /turf/simulated/mineral/src +code\game\turfs\simulated\minerals.dm:131: /turf/simulated/mineral/Bumped(...) calls attackby__legacy__attackchain(...) on var /turf/simulated/mineral/src +new_attack_chain on /turf/simulated/mineral/ancient still has legacy procs: + attackby__legacy__attackchain +new_attack_chain on /turf/simulated/mineral/ancient but related type /turf is not +new_attack_chain on /turf/simulated/mineral/ancient/lava_land_surface_hard still has legacy procs: + attackby__legacy__attackchain +new_attack_chain on /turf/simulated/mineral/ancient/lava_land_surface_hard but related type /turf is not +new_attack_chain on /turf/simulated/mineral/ancient/outer still has legacy procs: + attackby__legacy__attackchain +new_attack_chain on /turf/simulated/mineral/ancient/outer but related type /turf is not +new_attack_chain on /turf/simulated/mineral/clown but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/high_chance but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/high_chance/clown but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/high_chance/volcanic but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/labormineral but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/low_chance but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/volcanic but related type /turf is not +new_attack_chain on /turf/simulated/mineral/random/volcanic/labormineral but related type /turf is not +new_attack_chain on /turf/simulated/mineral/volcanic but related type /turf is not +new_attack_chain on /turf/simulated/mineral/volcanic/clown but related type /turf is not +new_attack_chain on /turf/simulated/mineral/volcanic/lava_land_surface but related type /turf is not +check_legacy_attack_chain tests completed in 5.51s +``` + +There is a lot of output here, but it should be straightforward to understand: + +1. First, it tells you that `/turf/simulated/wall` (the type we changed to + `new_attack_chain`) still has legacy procs. That check is straightforward. +2. Then, it tells you that a parent type, `/turf`, is not on the new attack + chain, despite one of its subtypes being so. +3. There is a set of "call sites requiring migration": these let you know that + there are procs that make calls to legacy attack chain procs on a type that + we've marked as migrated. In this case, they are all on turf instances, but + they may be anywhere in the codebase. +4. Finally, it performs the same checks as above to other related types. + +This makes it clear that there are many more steps that must be performed before +the migration is complete. diff --git a/docs/references/images/attack_chain_flowchart.drawio b/docs/references/images/attack_chain_flowchart.drawio new file mode 100644 index 0000000000000..385bc4e9ba4ee --- /dev/null +++ b/docs/references/images/attack_chain_flowchart.drawio @@ -0,0 +1,909 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/references/images/attack_chain_flowchart.png b/docs/references/images/attack_chain_flowchart.png new file mode 100644 index 0000000000000..1339bd8fef051 Binary files /dev/null and b/docs/references/images/attack_chain_flowchart.png differ diff --git a/mkdocs.yml b/mkdocs.yml index abe447dda8b0b..8d2160d6a3d9d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -36,6 +36,7 @@ plugins: - social: cards_layout_options: background_color: '#861f41' + - glightbox markdown_extensions: - admonition @@ -97,3 +98,4 @@ nav: - 'Advanced Bitflags': './references/adv_bitflags.md' - 'Using Feedback Data': './references/feedback_data.md' - 'Tick Order': './references/tick_order.md' + - 'Attack Chain': './references/attack_chain.md' diff --git a/paradise.dme b/paradise.dme index d544ef151278e..2028cf966b98f 100644 --- a/paradise.dme +++ b/paradise.dme @@ -146,6 +146,7 @@ #include "code\__DEFINES\zlevel_defines.dm" #include "code\__DEFINES\zoom.dm" #include "code\__DEFINES\dcs\atom_signals.dm" +#include "code\__DEFINES\dcs\attack_chain_signals.dm" #include "code\__DEFINES\dcs\basetype_signals.dm" #include "code\__DEFINES\dcs\carbon_signals.dm" #include "code\__DEFINES\dcs\datum_signals.dm" @@ -232,6 +233,7 @@ #include "code\_onclick\cyborg.dm" #include "code\_onclick\drag_drop.dm" #include "code\_onclick\item_attack.dm" +#include "code\_onclick\item_attack_legacy.dm" #include "code\_onclick\observer_onclick.dm" #include "code\_onclick\other_mobs.dm" #include "code\_onclick\overmind_onclick.dm" @@ -714,6 +716,7 @@ #include "code\game\area\ss13_areas\service_areas.dm" #include "code\game\area\ss13_areas\station_area.dm" #include "code\game\area\ss13_areas\supply_areas.dm" +#include "code\game\atom\atom_tool_acts.dm" #include "code\game\dna\dna2.dm" #include "code\game\dna\dna2_domutcheck.dm" #include "code\game\dna\dna2_helpers.dm" diff --git a/tools/ci/check_legacy_attack_chain.py b/tools/ci/check_legacy_attack_chain.py new file mode 100644 index 0000000000000..5804a0235a052 --- /dev/null +++ b/tools/ci/check_legacy_attack_chain.py @@ -0,0 +1,182 @@ +import os +import sys +import time +from dataclasses import dataclass +from collections import namedtuple, defaultdict + +from avulto import DMM, DME, DMI, Dir, Path as p, paths, ProcDecl, TypeDecl +from avulto.ast import NodeKind +from avulto import exceptions + + +RED = "\033[0;31m" +GREEN = "\033[0;32m" +BLUE = "\033[0;34m" +NC = "\033[0m" # No Color + + +@dataclass(frozen=True) +class AttackChainCall: + proc_decl: ProcDecl + var_name: str + var_type: p | None + call_name: str + source_info: any + + def make_error_message(self): + return f"{self.proc_decl.type_path}/{self.proc_decl.name}(...) calls {self.call_name}(...) on var {self.var_type}/{self.var_name}" + + def format_error(self): + if os.getenv("GITHUB_ACTIONS") == "true": + return f"::error file={self.source_info.file_path},line={self.source_info.line},title=Attack Chain::{self.source_info.file_path}:{self.source_info.line}: {RED}{self.make_error_message()}{NC}" + + else: + return f"{self.source_info.file_path}:{self.source_info.line}: {RED}{self.make_error_message()}{NC}" + + +# Walker for determining if a proc contains any calls to a legacy attack chain +# proc on an object that is in the type tree of our migrating type. +# +# We check local, proc-argument, and type-declaration scope to find variables of +# matching names for when an attack chain proc is called, and attempt to find +# that variable's matching type. If the type matches, then the call site is +# calling a legacy proc on that type. +class AttackChainCallWalker: + def __init__(self, type_decl: TypeDecl, proc_decl: ProcDecl): + self.type_decl = type_decl + self.proc_decl = proc_decl + self.local_vars = dict() + self.attack_chain_calls = list() + + def get_var_type(self, name): + if name == "src": + return self.type_decl.path + if name in self.local_vars: + return self.local_vars[name] + for arg in self.proc_decl.args: + if arg.arg_name == name: + return arg.arg_type + + try: + vd = self.type_decl.var_decl(name, parents=True) + if vd.declared_type: + return vd.declared_type + except: + pass + + return None + + def add_attack_call(self, var_name, chain_call, source_info): + var_type = self.get_var_type(var_name) + CALLS[var_type].add( + AttackChainCall( + self.proc_decl, + var_name, + self.get_var_type(var_name), + chain_call, + source_info, + ) + ) + + def visit_Var(self, node, source_info): + self.local_vars[str(node.name)] = node.declared_type + + def visit_Expr(self, node, source_info): + if node.kind == NodeKind.CALL: + if "__legacy__attackchain" in node.name.name: + if node.expr: + if node.expr.kind == NodeKind.IDENTIFIER: + self.add_attack_call( + str(node.expr), node.name.name, source_info + ) + elif node.expr.kind == NodeKind.CONSTANT: + if not node.expr.constant.val: + self.add_attack_call("src", node.name.name, source_info) + + +# Ignored types will never be part of the attack chain. +IGNORED_TYPES = [ + p("/area"), + p("/client"), + p("/database"), + p("/datum"), + p("/dm_filter"), + p("/exception"), + p("/generator"), + p("/icon"), + p("/image"), + p("/matrix"), + p("/mutable_appearance"), + p("/particles"), + p("/regex"), + p("/sound"), +] + +# Assisted types are the ones which actually perform negotiation between old/new +# attack chains, and will not be migrated until everything else is. +ASSISTED_TYPES = [ + p("/atom"), + p("/mob"), + p("/obj"), + p("/obj/item"), +] + + +if __name__ == "__main__": + print("check_legacy_attack_chain started") + + exit_code = 0 + start = time.time() + + CALLS = defaultdict(set) + SETTING_CACHE = dict() + LEGACY_PROCS = dict() + BAD_TREES = dict() + PROCS = dict() + + dme = DME.from_file("paradise.dme", parse_procs=True) + + for pth in dme.subtypesof("/"): + td = dme.types[pth] + if any( + [ + pth.child_of(assisted_type, strict=True) + for assisted_type in ASSISTED_TYPES + ] + ): + try: + SETTING_CACHE[pth] = bool( + td.var_decl("new_attack_chain", parents=True).const_val + ) + except: + SETTING_CACHE[pth] = False + LEGACY_PROCS[pth] = { + x for x in td.proc_names(modified=True) if "__legacy__attackchain" in x + } + for proc_decl in td.proc_decls(): + walker = AttackChainCallWalker(td, proc_decl) + proc_decl.walk(walker) + + for pth, new_attack_chain in SETTING_CACHE.items(): + cursor = pth + if new_attack_chain: + if LEGACY_PROCS[pth]: + exit_code = 1 + print(f"new_attack_chain on {pth} still has legacy procs:") + for proc in sorted(LEGACY_PROCS[pth]): + print(f"\t{proc}") + while cursor not in ASSISTED_TYPES and not cursor.is_root: + if LEGACY_PROCS[cursor] and not SETTING_CACHE[cursor]: + exit_code = 1 + print(f"new_attack_chain on {pth} but related type {cursor} is not") + cursor = cursor.parent + if pth in CALLS: + exit_code = 1 + print("Call sites requiring migration:") + for call in CALLS[pth]: + print(call.format_error()) + + end = time.time() + print(f"check_legacy_attack_chain tests completed in {end - start:.2f}s\n") + + sys.exit(exit_code) diff --git a/tools/migrate_attack_chain.py b/tools/migrate_attack_chain.py new file mode 100644 index 0000000000000..0e80d383f139d --- /dev/null +++ b/tools/migrate_attack_chain.py @@ -0,0 +1,100 @@ +from dataclasses import dataclass, field +import sys + +from avulto import DME, Path as p + + +@dataclass(frozen=True) +class MigrationPlan: + target_path: p + toggle_on: p + additional_paths: list[p] = field(default_factory=list) + + +ASSISTED_PATHS = [ + p("/obj"), + p("/obj/item"), + p("/mob"), + p("/mob/living"), + p("/atom"), +] + + +def has_legacy_procs(dme: DME, pth: p) -> bool: + td = dme.type_decl(pth) + proc_names = td.proc_names(modified=True) + return any([x for x in proc_names if "legacy__attackchain" in x]) + + +def get_migration_plan( + dme: DME, target_path: p, checked_types: set | None = None +) -> None | MigrationPlan: + if checked_types is None: + checked_types = set() + td = dme.type_decl(target_path) + new_attack_chain = td.var_decl("new_attack_chain", parents=True) + if new_attack_chain.const_val: + print( + f"Type {target_path} appears to be migrated already. Run CI tests to confirm valid migration." + ) + return + + additional_paths = set() + for subtype in dme.subtypesof(target_path): + if has_legacy_procs(dme, subtype): + additional_paths.add(subtype) + if subtype not in checked_types: + checked_types.add(subtype) + migration_plan = get_migration_plan(dme, subtype, checked_types) + if migration_plan: + additional_paths.update(migration_plan.additional_paths) + + toggle_on = target_path + parent = target_path + while not any([parent == x for x in ASSISTED_PATHS]): + parent = parent.parent + if not has_legacy_procs(dme, parent): + continue + if parent in ASSISTED_PATHS: + continue + + toggle_on = parent + if parent not in checked_types: + checked_types.add(parent) + migration_plan = get_migration_plan(dme, parent, checked_types) + if migration_plan: + additional_paths.update(migration_plan.additional_paths) + + additional_paths.add(parent) + + return MigrationPlan( + target_path=target_path, + toggle_on=toggle_on, + additional_paths=additional_paths, + ) + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("usage: migrate_attack_chain.py /target/path") + sys.exit(1) + dme = DME.from_file("paradise.dme") + target_path = p(sys.argv[1]) + + if not target_path.child_of("/atom"): + print(f"Type {target_path} is not an atom.") + sys.exit(1) + if target_path in ASSISTED_PATHS: + print(f"Type {target_path} should not be migrated.") + sys.exit(1) + + migration_plan = get_migration_plan(dme, target_path) + if migration_plan: + print(f"Migration Plan for Path {target_path}") + if migration_plan.additional_paths: + print("Required Additional Migrations:") + for addl_path in sorted(migration_plan.additional_paths): + print(f"\t{addl_path}") + else: + print("No Additional Migrations Required") + print(f"Toggle `new_attack_chain = TRUE` on:\n\t{migration_plan.toggle_on}") diff --git a/tools/requirements.txt b/tools/requirements.txt index 98e5e48cab09d..751e8771deeb3 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -6,3 +6,6 @@ json5==0.9.14 # changelogs PyYaml==6.0.1 # maplint also beautifulsoup4==4.12.2 + +# various CI checks +avulto==0.1.4