diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm index b6c53a05768..f3e1f47a1ac 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm @@ -37,7 +37,7 @@ ////#define COMPONENT_SKIP_ATTACK (1<<1) /// From base of atom/attack_ghost(): (mob/observer/dead/ghost) #define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" -/// From base of atom/attack_hand(): (mob/user, list/modifiers) +/// From base of atom/attack_hand(mob/user, list/params): (mob/user, list/modifiers) ////#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" /// From base of atom/attack_paw(): (mob/user) ////#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm index 0e2a14cad25..c7b7573a9f3 100644 --- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm @@ -129,7 +129,7 @@ ////#define COMSIG_MOB_CLUMSY_SHOOT_FOOT "mob_clumsy_shoot_foot" /// From /obj/item/hand_item/slapper/attack_atom(): (source=obj/structure/table/slammed_table, mob/living/slammer) ////#define COMSIG_TABLE_SLAMMED "table_slammed" -/// From base of atom/attack_hand(): (mob/user, modifiers) +/// From base of atom/attack_hand(mob/user, list/params): (mob/user, modifiers) ////#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" /// From base of /obj/item/attack(): (mob/M, mob/user) ////#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" diff --git a/code/__DEFINES/procs/clickcode.dm b/code/__DEFINES/procs/clickcode.dm index 52f2a7051f4..a38481ee73b 100644 --- a/code/__DEFINES/procs/clickcode.dm +++ b/code/__DEFINES/procs/clickcode.dm @@ -6,10 +6,16 @@ * ranged_attack_chain * attackby * pre_attack + * standard_melee_attack and related + * attack_mob and related + * attack_obj and related * afterattack * MouseDrop * OnMouseDrop * MouseDroppedOn + * + * These are *not* used for attack_hand, attack_robot, attack_xeno, and similar clicked-by-specific-mob attack procs. + * These are also not used for attack_self, as that isn't even a true clickcode proc. */ /// stop the click chain from proceeding past this point; usually used if we're deleting or being inserted diff --git a/code/_onclick/hud/_screen_object.dm b/code/_onclick/hud/_screen_object.dm index 6b5ec91c645..a5741baed86 100644 --- a/code/_onclick/hud/_screen_object.dm +++ b/code/_onclick/hud/_screen_object.dm @@ -68,7 +68,7 @@ G.s_click(src) return 1 -/atom/movable/screen/grab/attack_hand() +/atom/movable/screen/grab/attack_hand(mob/user, list/params) return /atom/movable/screen/grab/attackby() diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index d5e0608bf32..229c539e45d 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -22,37 +22,22 @@ item/apply_hit_effect() can be overriden to do whatever you want. However "stand avoid code duplication. This includes items that may sometimes act as a standard weapon in addition to having other effects (e.g. stunbatons on harm intent). */ -// 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) - // todo: on most subtypes, . = ..() and true/false check, not clickchain do not propagate, as - // attack_self isn't really part of the item attack chain. - // todo: move this to items.dm as it has not much to actually do with click attacks - SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) - if(interaction_flags_item & INTERACT_ITEM_ATTACK_SELF) - interact(user) - //I would prefer to rename this to attack(), but that would involve touching hundreds of files. -/obj/item/proc/resolve_attackby(atom/A, mob/user, params, attack_modifier = 1) +/obj/item/proc/resolve_attackby(atom/A, mob/user, params, attack_modifier = 1, clickchain_flags) if(!(atom_flags & NOPRINT)) add_fingerprint(user) - return A.attackby(src, user, params, NONE, attack_modifier) + return A.attackby(src, user, params, clickchain_flags, attack_modifier) // No comment -/atom/proc/attackby(obj/item/I, mob/living/user, params, clickchain_flags, damage_multiplier) - I.standard_melee_attack(src, user, clickchain_flags, params) // damage_multiplier on attackby is being removed, don't. +/atom/proc/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) + return I.standard_melee_attack(src, user, clickchain_flags, params, damage_multiplier, user.zone_sel?.selecting, user.a_intent) -/mob/living/attackby(obj/item/I, mob/living/user, params, clickchain_flags, damage_multiplier) +/mob/living/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) if(can_operate(src) && user.a_intent != INTENT_HARM && I.do_surgery(src,user)) -/* - if(I.can_do_surgery(src,user)) - return NONE - else - return NONE -*/ return NONE if(attempt_vr(src,"vore_attackby",args)) return - return I.standard_melee_attack(src, user, clickchain_flags, params2list(params), damage_multiplier, user.zone_sel?.selecting, user.a_intent) + return I.standard_melee_attack(src, user, clickchain_flags, params, damage_multiplier, user.zone_sel?.selecting, user.a_intent) // Used to get how fast a mob should attack, and influences click delay. // This is just for inheritence. diff --git a/code/_onclick/items.dm b/code/_onclick/items.dm index 277710f77f7..f9755815fbb 100644 --- a/code/_onclick/items.dm +++ b/code/_onclick/items.dm @@ -1,7 +1,9 @@ -//? If you change any of these procs, you better find/replace *every single* proc signature to match -//? Obviously you don't need to do this for default arguments, because that'd insert a lot of compiled in isnull()'s -//? But the whole point of this refactor is to standardize. -//? All PRs that breach convention will be held until in compliance. +//* If you change any of these procs, you better find/replace *every single* proc signature to match +//* Obviously you don't need to do this for default arguments, because that'd insert a lot of compiled in isnull()'s +//* But the whole point of this refactor is to standardize. +//* All PRs that breach convention will be held until in compliance. + +//? Click-Chain system - using an item in hand to "attack", whether in melee or ranged. /** * Called when trying to click something that the user can Reachability() to. @@ -28,7 +30,7 @@ var/stupid_fucking_shim = list2params(params) // todo: refactor - if(resolve_attackby(target, user, stupid_fucking_shim)) + if(resolve_attackby(target, user, params, null, clickchain_flags)) return CLICKCHAIN_DO_NOT_PROPAGATE // todo: signal for afterattack here & anywhere that calls afterattack diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 94449455f61..d54b5226b34 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -31,7 +31,7 @@ A.attack_hand(src) /// Return TRUE to cancel other attack hand effects that respect it. -/atom/proc/attack_hand(mob/user) +/atom/proc/attack_hand(mob/user, list/params) . = _try_interact(user) //Return a non FALSE value to cancel whatever called this from propagating, if it respects it. diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 5d431ed7cfe..21fa555b918 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -80,7 +80,10 @@ var/const/tk_maxrange = 15 if(slot != SLOT_ID_HANDS) qdel(src) -/obj/item/tk_grab/attack_self(mob/user as mob) +/obj/item/tk_grab/attack_self(mob/user) + . = ..() + if(.) + return if(focus) focus.attack_self_tk(user) diff --git a/code/game/atoms/buckling.dm b/code/game/atoms/buckling.dm index e3882ee4bcc..287afaced4a 100644 --- a/code/game/atoms/buckling.dm +++ b/code/game/atoms/buckling.dm @@ -3,15 +3,19 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return ..() -/atom/movable/attack_hand(mob/living/user) +/atom/movable/attack_hand(mob/user, list/params) + . = ..() + if(.) + return if(click_unbuckle_interaction(user)) - return CLICKCHAIN_DO_NOT_PROPAGATE - return ..() + return TRUE /atom/movable/attack_robot(mob/user) + . = ..() + if(.) + return if(click_unbuckle_interaction(user)) - return CLICKCHAIN_DO_NOT_PROPAGATE - return ..() + return TRUE //! movable stuff /** diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index ac946b89b06..601460a18d1 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -335,7 +335,7 @@ src.add_hiddenprint(user) nano_ui_interact(user) -/obj/machinery/computer/scan_consolenew/attack_hand(mob/user) +/obj/machinery/computer/scan_consolenew/attack_hand(mob/user, list/params) if(!..()) nano_ui_interact(user) diff --git a/code/game/gamemodes/changeling/powers/armor.dm b/code/game/gamemodes/changeling/powers/armor.dm index 15dbc87cd55..65bc5e9b7c7 100644 --- a/code/game/gamemodes/changeling/powers/armor.dm +++ b/code/game/gamemodes/changeling/powers/armor.dm @@ -71,6 +71,9 @@ slowdown += 1 //It's already tied to a slowdown suit, 6 slowdown is huge. /obj/item/clothing/shoes/magboots/changeling/attack_self(mob/user) + . = ..() + if(.) + return if(magpulse) clothing_flags &= ~NOSLIP magpulse = 0 diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 628b53694f4..461715d9975 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -37,8 +37,8 @@ . = ..() START_PROCESSING(SSobj, src) -/obj/structure/cult/pylon/attack_hand(mob/M as mob) - attackpylon(M, 5) +/obj/structure/cult/pylon/attack_hand(mob/user, list/params) + attackpylon(user, 5) /obj/structure/cult/pylon/attack_generic(var/mob/user, var/damage) attackpylon(user, damage) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 78b3caab031..acd457153ad 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -101,7 +101,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," return -/obj/effect/rune/attack_hand(mob/user) +/obj/effect/rune/attack_hand(mob/user, list/params) if(!ishuman(user)) return var/mob/living/carbon/human/H = user @@ -309,6 +309,9 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," to_chat(target, "You feel searing heat inside!") /obj/item/book/tome/attack_self(mob/user) + . = ..() + if(.) + return if(!ishuman(user)) return var/mob/living/carbon/human/H = user @@ -423,7 +426,10 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," w_class = ITEMSIZE_SMALL var/cultistsonly = 1 -/obj/item/book/tome/imbued/attack_self(mob/user as mob) +/obj/item/book/tome/imbued/attack_self(mob/user) + . = ..() + if(.) + return if(src.cultistsonly && !iscultist(usr)) return if(!cultwords["travel"]) diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm index bd310a4f93a..3a1ea713b4c 100644 --- a/code/game/gamemodes/cult/soulstone.dm +++ b/code/game/gamemodes/cult/soulstone.dm @@ -37,6 +37,9 @@ ///////////////////Options for using captured souls/////////////////////////////////////// /obj/item/soulstone/attack_self(mob/user) + . = ..() + if(.) + return if (!in_range(src, user)) return user.set_machine(src) diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index e8417a774ec..eb148366e60 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -5,7 +5,10 @@ var/uses = 0 info = "


" -/obj/item/paper/talisman/attack_self(mob/living/user as mob) +/obj/item/paper/talisman/attack_self(mob/user) + . = ..() + if(.) + return if(iscultist(user)) var/delete = 1 // who the hell thought this was a good idea :( @@ -34,7 +37,8 @@ return if("supply") supply() - user.take_organ_damage(5, 0) + var/mob/living/carbon/human/H = ishuman(user)? user : null + H?.take_organ_damage(5, 0) if(src && src.imbue!="supply" && src.imbue!="runestun") if(delete) qdel(src) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index 07825a31c7e..bf31926e922 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -78,7 +78,7 @@ /turf/unsimulated/wall/supermatter/attack_ai(mob/user as mob) return user.examinate(src) -/turf/unsimulated/wall/supermatter/attack_hand(mob/user as mob) +/turf/unsimulated/wall/supermatter/attack_hand(mob/user, list/params) user.visible_message("\The [user] reaches out and touches \the [src]... And then blinks out of existance.",\ "You reach out and touch \the [src]. Everything immediately goes quiet. Your last thought is \"That was not a wise decision.\"",\ "You hear an unearthly noise.") diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index d5850951d76..1367cdd06bb 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -13,7 +13,10 @@ var/active = 0 -/obj/item/pinpointer/attack_self() +/obj/item/pinpointer/attack_self(mob/user) + . = ..() + if(.) + return if(!active) active = 1 workdisk() @@ -61,7 +64,10 @@ var/turf/location = null var/obj/target = null -/obj/item/pinpointer/advpinpointer/attack_self() +/obj/item/pinpointer/advpinpointer/attack_self(mob/user) + . = ..() + if(.) + return if(!active) active = 1 if(mode == 0) @@ -183,7 +189,10 @@ var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle var/obj/machinery/computer/shuttle_control/multi/syndicate/home = null -/obj/item/pinpointer/nukeop/attack_self(mob/user as mob) +/obj/item/pinpointer/nukeop/attack_self(mob/user) + . = ..() + if(.) + return if(!active) active = 1 if(!mode) @@ -269,7 +278,10 @@ var/shuttle_comp_id = null var/obj/machinery/computer/shuttle_control/our_shuttle = null -/obj/item/pinpointer/shuttle/attack_self(mob/user as mob) +/obj/item/pinpointer/shuttle/attack_self(mob/user) + . = ..() + if(.) + return if(!active) active = TRUE find_shuttle() diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm index d6f19b5f692..de748fc6854 100644 --- a/code/game/gamemodes/technomancer/catalog.dm +++ b/code/game/gamemodes/technomancer/catalog.dm @@ -103,6 +103,9 @@ var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - // Parameters: 1 (user - the mob clicking on the catalog) // Description: Shows an HTML window, to buy equipment and spells, if the user is the legitimate owner. Otherwise it cannot be used. /obj/item/technomancer_catalog/attack_self(mob/user) + . = ..() + if(.) + return if(!user) return 0 if(owner && user != owner) diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index 0b3bef6b65c..d13b590c6bb 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -26,7 +26,10 @@ . = ..() . += "There are [uses] uses remaining." -/obj/item/disposable_teleporter/attack_self(mob/user as mob) +/obj/item/disposable_teleporter/attack_self(mob/user) + . = ..() + if(.) + return if(!uses) to_chat(user, "\The [src] has ran out of uses, and is now useless to you!") return diff --git a/code/game/gamemodes/technomancer/devices/shield_armor.dm b/code/game/gamemodes/technomancer/devices/shield_armor.dm index 2e1cbe34e67..68e4b2c6c28 100644 --- a/code/game/gamemodes/technomancer/devices/shield_armor.dm +++ b/code/game/gamemodes/technomancer/devices/shield_armor.dm @@ -74,6 +74,9 @@ return 0 // This shield does not block all damage, so returning 0 is needed to tell the game to apply the new damage. /obj/item/clothing/suit/armor/shield/attack_self(mob/user) + . = ..() + if(.) + return active = !active to_chat(user, "You [active ? "" : "de"]activate \the [src].") update_icon() diff --git a/code/game/gamemodes/technomancer/devices/tesla_armor.dm b/code/game/gamemodes/technomancer/devices/tesla_armor.dm index ebb49bb2242..a49594e707d 100644 --- a/code/game/gamemodes/technomancer/devices/tesla_armor.dm +++ b/code/game/gamemodes/technomancer/devices/tesla_armor.dm @@ -53,6 +53,9 @@ return 0 /obj/item/clothing/suit/armor/tesla/attack_self(mob/user) + . = ..() + if(.) + return active = !active to_chat(user, "You [active ? "" : "de"]activate \the [src].") update_icon() diff --git a/code/game/gamemodes/technomancer/equipment.dm b/code/game/gamemodes/technomancer/equipment.dm index 5eae9101a0f..95099b4714a 100644 --- a/code/game/gamemodes/technomancer/equipment.dm +++ b/code/game/gamemodes/technomancer/equipment.dm @@ -192,8 +192,14 @@ slot_flags = SLOT_BELT attack_verb = list("beaten", "smashed", "struck", "whacked") -/obj/item/scepter/attack_self(mob/living/carbon/human/user) - var/obj/item/item_to_test = user.get_other_hand(src) +/obj/item/scepter/attack_self(mob/user) + . = ..() + if(.) + return + var/mob/living/carbon/human/H = user + if(!istype(H)) + return + var/obj/item/item_to_test = H.get_other_hand(src) if(istype(item_to_test, /obj/item/spell)) var/obj/item/spell/S = item_to_test S.on_scepter_use_cast(user) diff --git a/code/game/gamemodes/technomancer/spell_objs.dm b/code/game/gamemodes/technomancer/spell_objs.dm index 98eca6c04b9..67b72d59f65 100644 --- a/code/game/gamemodes/technomancer/spell_objs.dm +++ b/code/game/gamemodes/technomancer/spell_objs.dm @@ -198,9 +198,11 @@ // Parameters: 1 (user - the Technomancer that invoked this proc) // Description: Tries to call on_use_cast() if it is allowed to do so. Don't override this, override on_use_cast() instead. /obj/item/spell/attack_self(mob/user) + . = ..() + if(.) + return if(run_checks() && (cast_methods & CAST_USE)) on_use_cast(user) - ..() // Proc: attackby() // Parameters: 2 (W - the item this spell object is hitting, user - the technomancer who clicked the other object) diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index 5d657f82ee8..4ea56928b0a 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -17,7 +17,7 @@ . = ..() layCable(new_turf,M_Dir) -/obj/machinery/cablelayer/attack_hand(mob/user) +/obj/machinery/cablelayer/attack_hand(mob/user, list/params) if(!cable&&!on) to_chat(user, SPAN_WARNING("\The [src] doesn't have any cable loaded.")) return diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 73443740e40..6826953537d 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -45,7 +45,7 @@ if(prob(25)) density = 0 -/obj/machinery/optable/attack_hand(mob/user) +/obj/machinery/optable/attack_hand(mob/user, list/params) if(MUTATION_HULK in usr.mutations) visible_message(SPAN_DANGER("\The [usr] destroys \the [src]!")) density = FALSE diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 118a36d9047..0668e89e52e 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -37,7 +37,7 @@ /obj/machinery/sleep_console/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/sleep_console/attack_hand(mob/user) +/obj/machinery/sleep_console/attack_hand(mob/user, list/params) if(..()) return 1 diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index c63827c2a11..18efb2ccb86 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -266,7 +266,7 @@ else return attack_hand(user) -/obj/machinery/attack_hand(mob/user) +/obj/machinery/attack_hand(mob/user, list/params) if(IsAdminGhost(user)) return FALSE if(inoperable(MAINT)) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index cfb4a64ef62..40b8308c7d2 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -244,7 +244,7 @@ . = ..() return attack_hand(user) -/obj/machinery/body_scanconsole/attack_hand(user as mob) +/obj/machinery/body_scanconsole/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 6be21abe3fb..d78f1e63eef 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -57,7 +57,7 @@ /obj/machinery/ai_slipper/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/ai_slipper/attack_hand(mob/user as mob) +/obj/machinery/ai_slipper/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return if((get_dist(src, user) > 1)) diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm index b72d267fc99..17e95076ed4 100644 --- a/code/game/machinery/air_alarm.dm +++ b/code/game/machinery/air_alarm.dm @@ -505,7 +505,7 @@ GLOBAL_LIST_EMPTY(air_alarms) /obj/machinery/alarm/attack_ai(mob/user) ui_interact(user) -/obj/machinery/alarm/attack_hand(mob/user) +/obj/machinery/alarm/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm index 6f4f3756a10..bdeb68ae661 100644 --- a/code/game/machinery/atm_ret_field.dm +++ b/code/game/machinery/atm_ret_field.dm @@ -218,7 +218,7 @@ update_nearby_tiles() //Force ZAS update . = ..() -/obj/structure/atmospheric_retention_field/attack_hand(mob/user as mob) +/obj/structure/atmospheric_retention_field/attack_hand(mob/user, list/params) if(density) visible_message("You touch the retention field, and it crackles faintly. Tingly!") else diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 18ff150b90c..d6231dd100b 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -86,7 +86,7 @@ radio_controller.remove_object(src, frequency) ..() -/obj/machinery/computer/general_air_control/attack_hand(mob/user) +/obj/machinery/computer/general_air_control/attack_hand(mob/user, list/params) if(..(user)) return diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index d0c19f74a7a..a143483bd49 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -21,7 +21,7 @@ /obj/machinery/computer/area_atmos/attack_ai(mob/user) return src.attack_hand(user) -/obj/machinery/computer/area_atmos/attack_hand(mob/user) +/obj/machinery/computer/area_atmos/attack_hand(mob/user, list/params) if(..(user)) return ui_interact(user) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index c61c9de43d9..ff229296951 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -317,7 +317,7 @@ update_flag /obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob) +/obj/machinery/portable_atmospherics/canister/attack_hand(mob/user, list/params) return src.ui_interact(user) /obj/machinery/portable_atmospherics/canister/ui_state(mob/user, datum/tgui_module/module) diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 71cd33c0a46..4b1f0faca85 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -110,7 +110,7 @@ . = ..() return src.attack_hand(user) -/obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user) +/obj/machinery/portable_atmospherics/powered/pump/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/portable_atmospherics/powered/pump/ui_interact(mob/user, datum/tgui/ui) @@ -208,7 +208,7 @@ name = "[name] (ID [id])" -/obj/machinery/portable_atmospherics/powered/pump/huge/attack_hand(var/mob/user) +/obj/machinery/portable_atmospherics/powered/pump/huge/attack_hand(mob/user, list/params) to_chat(user, "You can't directly interact with this machine. Use the pump control console.") /obj/machinery/portable_atmospherics/powered/pump/huge/update_icon() diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index d0fcb34881f..16dd175f9c6 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -105,7 +105,7 @@ . = ..() return src.attack_hand(user) -/obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(var/mob/user) +/obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/portable_atmospherics/powered/scrubber/ui_interact(mob/user, datum/tgui/ui) @@ -181,7 +181,7 @@ name = "[name] (ID [id])" -/obj/machinery/portable_atmospherics/powered/scrubber/huge/attack_hand(var/mob/user as mob) +/obj/machinery/portable_atmospherics/powered/scrubber/huge/attack_hand(mob/user, list/params) to_chat(user, "You can't directly interact with this machine. Use the scrubber control console.") /obj/machinery/portable_atmospherics/powered/scrubber/huge/update_icon() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 764e589f456..ab6ca90d674 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -204,7 +204,7 @@ updateUsrDialog() return -/obj/machinery/autolathe/attack_hand(mob/user as mob) +/obj/machinery/autolathe/attack_hand(mob/user, list/params) user.set_machine(src) interact(user) diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index ae846b74151..e5e498d1215 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -129,7 +129,7 @@ . = ..() -/obj/machinery/organ_printer/attack_hand(mob/user) +/obj/machinery/organ_printer/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/game/machinery/bomb_tester.dm b/code/game/machinery/bomb_tester.dm index e2580dbede6..8d9dbd58a2b 100644 --- a/code/game/machinery/bomb_tester.dm +++ b/code/game/machinery/bomb_tester.dm @@ -110,7 +110,7 @@ return ..() -/obj/machinery/bomb_tester/attack_hand(mob/user) +/obj/machinery/bomb_tester/attack_hand(mob/user, list/params) add_fingerprint(user) ui_interact(user) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 55c158645f7..e210a2bcab4 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -128,17 +128,18 @@ src.view_range = num GLOB.cameranet.updateVisibility(src, 0) -/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob) - if(!istype(user)) +/obj/machinery/camera/attack_hand(mob/user, list/params) + var/mob/living/carbon/human/L = user + if(!istype(L)) return - if(user.species.can_shred(user)) + if(L.species.can_shred(L)) set_status(0) - user.do_attack_animation(src) - user.setClickCooldown(user.get_attack_speed()) - visible_message("\The [user] slashes at [src]!") + L.do_attack_animation(src) + L.setClickCooldown(L.get_attack_speed()) + visible_message("\The [L] slashes at [src]!") playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) - add_hiddenprint(user) + add_hiddenprint(L) destroy() /obj/machinery/camera/attack_generic(mob/user as mob) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 01771103502..1a628c1d1f1 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -149,7 +149,7 @@ else icon_state = "cameracase" -/obj/item/camera_assembly/attack_hand(mob/user as mob) +/obj/item/camera_assembly/attack_hand(mob/user, list/params) if(!anchored) ..() diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 5fc63267cc0..eecab2e25ff 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -85,7 +85,7 @@ else if(default_part_replacement(user, W)) return -/obj/machinery/cell_charger/attack_hand(mob/user) +/obj/machinery/cell_charger/attack_hand(mob/user, list/params) add_fingerprint(user) if(charging) @@ -150,8 +150,11 @@ matter = list(MAT_STEEL = 4000, MAT_GLASS = 1000) /obj/item/cell_charger_kit/attack_self(mob/user) - to_chat(user, SPAN_NOTICE("You assemble and deploy the cell charger in place.")) - playsound(user, 'sound/machines/click.ogg', 50, TRUE) - var/obj/machinery/cell_charger/C = new(user.loc) - C.add_fingerprint(user) - qdel(src) + . = ..() + if(.) + return + to_chat(user, SPAN_NOTICE("You assemble and deploy the cell charger in place.")) + playsound(user, 'sound/machines/click.ogg', 50, TRUE) + var/obj/machinery/cell_charger/C = new(user.loc) + C.add_fingerprint(user) + qdel(src) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d2728c55b8d..0a51789ea33 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -61,7 +61,7 @@ add_hiddenprint(user) return attack_hand(user) -/obj/machinery/clonepod/attack_hand(mob/user) +/obj/machinery/clonepod/attack_hand(mob/user, list/params) if((isnull(occupant)) || (machine_stat & NOPOWER)) return if((!isnull(occupant)) && (occupant.stat != 2)) @@ -526,7 +526,10 @@ var/diskcolor = pick(0,1,2) icon_state = "datadisk[diskcolor]" -/obj/item/disk/data/attack_self(mob/user as mob) +/obj/item/disk/data/attack_self(mob/user) + . = ..() + if(.) + return read_only = !read_only to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].") diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 680cc9b03a1..d74d698e305 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -48,7 +48,7 @@ return ui_interact(user) -/obj/machinery/computer/operating/attack_hand(mob/user) +/obj/machinery/computer/operating/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return ui_interact(user) diff --git a/code/game/machinery/computer/RCON_Console.dm b/code/game/machinery/computer/RCON_Console.dm index 4e578964175..6dae0a2772e 100644 --- a/code/game/machinery/computer/RCON_Console.dm +++ b/code/game/machinery/computer/RCON_Console.dm @@ -26,7 +26,7 @@ // Proc: attack_hand() // Parameters: 1 (user - Person which clicked this computer) // Description: Opens UI of this machine. -/obj/machinery/computer/rcon/attack_hand(mob/user) +/obj/machinery/computer/rcon/attack_hand(mob/user, list/params) ..() ui_interact(user) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index e83cb25abb5..123ea620066 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -48,7 +48,7 @@ to_chat(user, SPAN_NOTICE("There is no AI loaded onto this computer, and no AI loaded onto [I]. What exactly are you trying to do here?")) return ..() -/obj/machinery/computer/aifixer/attack_hand(mob/user) +/obj/machinery/computer/aifixer/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return ui_interact(user) diff --git a/code/game/machinery/computer/arcade/claw_machine.dm b/code/game/machinery/computer/arcade/claw_machine.dm index cacc654b897..1ea2dcc61fa 100644 --- a/code/game/machinery/computer/arcade/claw_machine.dm +++ b/code/game/machinery/computer/arcade/claw_machine.dm @@ -160,7 +160,7 @@ /obj/machinery/computer/arcade/clawmachine/Initialize(mapload) . = ..() -/obj/machinery/computer/arcade/clawmachine/attack_hand(mob/living/user) +/obj/machinery/computer/arcade/clawmachine/attack_hand(mob/user, list/params) if(..()) return ui_interact(user) diff --git a/code/game/machinery/computer/arcade/orion.dm b/code/game/machinery/computer/arcade/orion.dm index e704e112bd6..b05b582b938 100644 --- a/code/game/machinery/computer/arcade/orion.dm +++ b/code/game/machinery/computer/arcade/orion.dm @@ -507,6 +507,9 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events()) . += SPAN_NOTICE("There's a little switch on the bottom. It's flipped up.") /obj/item/orion_ship/attack_self(mob/user) + . = ..() + if(.) + return if(active) return diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index f148137b6af..3cd803d3e7a 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -19,7 +19,7 @@ var/global/list/minor_air_alarms = list() atmosphere_alarm.unregister_alarm(src) return ..() -/obj/machinery/computer/atmos_alert/attack_hand(mob/user) +/obj/machinery/computer/atmos_alert/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/computer/atmos_alert/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index c82df1754dc..7351b5d8be4 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -30,7 +30,7 @@ /obj/machinery/computer/atmoscontrol/attack_ai(mob/user) ui_interact(user) -/obj/machinery/computer/atmoscontrol/attack_hand(mob/user) +/obj/machinery/computer/atmoscontrol/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index ed297804c11..ea488475f0a 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -29,7 +29,7 @@ /obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/ui = null) camera.ui_interact(user, ui) -/obj/machinery/computer/security/attack_hand(mob/user) +/obj/machinery/computer/security/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index fdf03a95f14..cc7b57599f9 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -94,7 +94,7 @@ /obj/machinery/computer/cloning/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/cloning/attack_hand(mob/user as mob) +/obj/machinery/computer/cloning/attack_hand(mob/user, list/params) user.set_machine(src) add_fingerprint(user) diff --git a/code/game/machinery/computer/command/card.dm b/code/game/machinery/computer/command/card.dm index 55382f93976..a11d4dca3e0 100644 --- a/code/game/machinery/computer/command/card.dm +++ b/code/game/machinery/computer/command/card.dm @@ -105,7 +105,7 @@ /obj/machinery/computer/card/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/card/attack_hand(mob/user as mob) +/obj/machinery/computer/card/attack_hand(mob/user, list/params) if(..()) return if(machine_stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 4858f07030a..01ab3e9a08b 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -296,7 +296,7 @@ /obj/machinery/computer/communications/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/communications/attack_hand(var/mob/user as mob) +/obj/machinery/computer/communications/attack_hand(mob/user, list/params) if(..()) return if (GLOB.using_map && !(src.z in GLOB.using_map.contact_levels)) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index ade32b09206..72bdbcf6831 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -23,7 +23,7 @@ /obj/machinery/computer/crew/attack_ai(mob/user) attack_hand(user) -/obj/machinery/computer/crew/attack_hand(mob/user) +/obj/machinery/computer/crew/attack_hand(mob/user, list/params) ..() if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 629dab4c24a..5265ae450fb 100755 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -39,7 +39,10 @@ to_chat(usr, "Issuing reason: [reason].") return -/obj/item/card/id/guest/attack_self(mob/living/user as mob) +/obj/item/card/id/guest/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HARM) if(icon_state == "guest_invalid") to_chat(user, "This guest pass is already deactivated!") @@ -52,7 +55,6 @@ icon_state = "guest_invalid" expiration_time = world.time expired = 1 - return ..() /obj/item/card/id/guest/Initialize(mapload) . = ..() @@ -113,7 +115,7 @@ /obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob) +/obj/machinery/computer/guestpass/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/computer/id_restorer_vr.dm b/code/game/machinery/computer/id_restorer_vr.dm index 6f6905e506b..e2489e6c129 100644 --- a/code/game/machinery/computer/id_restorer_vr.dm +++ b/code/game/machinery/computer/id_restorer_vr.dm @@ -27,7 +27,7 @@ return ..() -/obj/machinery/computer/id_restorer/attack_hand(mob/user) +/obj/machinery/computer/id_restorer/attack_hand(mob/user, list/params) if(..()) return if(machine_stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 76106208d7e..fd4b2dd94c8 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -35,7 +35,7 @@ ..() -/obj/machinery/computer/aiupload/attack_hand(mob/user) +/obj/machinery/computer/aiupload/attack_hand(mob/user, list/params) if(machine_stat & NOPOWER) to_chat(user, "The upload computer has no power!") return @@ -71,7 +71,7 @@ return ..() -/obj/machinery/computer/borgupload/attack_hand(mob/user) +/obj/machinery/computer/borgupload/attack_hand(mob/user, list/params) if(machine_stat& NOPOWER) to_chat(user, "The upload computer has no power!") return diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index f4c100855c2..734cc897362 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -101,7 +101,7 @@ /obj/machinery/computer/med_data/attack_ai(user as mob) return attack_hand(user) -/obj/machinery/computer/med_data/attack_hand(mob/user as mob) +/obj/machinery/computer/med_data/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index d64dba105ab..d237215ad18 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -78,7 +78,7 @@ linkedServer = message_servers[1] return ..() -/obj/machinery/computer/message_monitor/attack_hand(mob/living/user) +/obj/machinery/computer/message_monitor/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return if(!istype(user)) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index dc6cb096401..ebeb9a38300 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -46,7 +46,7 @@ /obj/machinery/computer/pod/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/pod/attack_hand(var/mob/user as mob) +/obj/machinery/computer/pod/attack_hand(mob/user, list/params) if(..()) return @@ -142,7 +142,7 @@ title = "External Airlock Controls" req_access = list(ACCESS_FACTION_SYNDICATE) -/obj/machinery/computer/pod/old/syndicate/attack_hand(var/mob/user as mob) +/obj/machinery/computer/pod/old/syndicate/attack_hand(mob/user, list/params) if(!allowed(user)) to_chat(user, "Access Denied") return diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 3335c68a10c..59e7de23bb1 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -16,7 +16,7 @@ /obj/machinery/computer/prisoner/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/prisoner/attack_hand(mob/user) +/obj/machinery/computer/prisoner/attack_hand(mob/user, list/params) if(..()) return ui_interact(user) diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index bd4a91a04e6..30c59df929a 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -27,7 +27,7 @@ var/prison_shuttle_timeleft = 0 /obj/machinery/computer/prison_shuttle/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/prison_shuttle/attack_hand(var/mob/user as mob) +/obj/machinery/computer/prison_shuttle/attack_hand(mob/user, list/params) if(!src.allowed(user) && (!hacked)) to_chat(user, "Access Denied.") return diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 92cdb4a927b..818dd977ac3 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -11,7 +11,7 @@ /obj/machinery/computer/robotics/attack_ai(var/mob/user as mob) ui_interact(user) -/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob) +/obj/machinery/computer/robotics/attack_hand(mob/user, list/params) if(..()) return if(machine_stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 9a48bf12a2d..d382b15af54 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -87,7 +87,7 @@ /obj/machinery/computer/secure_data/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/secure_data/attack_hand(mob/user as mob) +/obj/machinery/computer/secure_data/attack_hand(mob/user, list/params) if(..()) return add_fingerprint(user) diff --git a/code/game/machinery/computer/shutoff_monitor.dm b/code/game/machinery/computer/shutoff_monitor.dm index f47a798b05c..aca1c498852 100644 --- a/code/game/machinery/computer/shutoff_monitor.dm +++ b/code/game/machinery/computer/shutoff_monitor.dm @@ -15,7 +15,7 @@ QDEL_NULL(monitor) ..() -/obj/machinery/computer/shutoff_monitor/attack_hand(mob/user) +/obj/machinery/computer/shutoff_monitor/attack_hand(mob/user, list/params) ..() monitor.ui_interact(user) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index b5cccdec252..e7284a10258 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -62,7 +62,7 @@ return attack_hand(user) //Someone needs to break down the dat += into chunks instead of long ass lines. -/obj/machinery/computer/skills/attack_hand(mob/user as mob) +/obj/machinery/computer/skills/attack_hand(mob/user, list/params) if(..()) return if (GLOB.using_map && !(src.z in GLOB.using_map.contact_levels)) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index 49945a67ddc..fafcd76ac4b 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -255,7 +255,7 @@ var/specops_shuttle_timeleft = 0 /obj/machinery/computer/specops_shuttle/emag_act(var/remaining_charges, var/mob/user) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") -/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob) +/obj/machinery/computer/specops_shuttle/attack_hand(mob/user, list/params) if(!allowed(user)) to_chat(user, "Access Denied.") return diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index ccd259be251..18dda5c9048 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -34,7 +34,7 @@ ui_interact(user) return -/obj/machinery/computer/station_alert/attack_hand(mob/user) +/obj/machinery/computer/station_alert/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/game/machinery/computer/supermatter_monitor_tgui.dm b/code/game/machinery/computer/supermatter_monitor_tgui.dm index e9c8091004c..c033af58241 100644 --- a/code/game/machinery/computer/supermatter_monitor_tgui.dm +++ b/code/game/machinery/computer/supermatter_monitor_tgui.dm @@ -17,7 +17,7 @@ /obj/machinery/computer/sm_monitor/attack_ai(mob/user) ui_interact(user) -/obj/machinery/computer/sm_monitor/attack_hand(mob/user) +/obj/machinery/computer/sm_monitor/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index fd418997a0e..b8465c5db69 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -35,7 +35,7 @@ /obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob) +/obj/machinery/computer/supplycomp/attack_hand(mob/user, list/params) if(..()) return if(!allowed(user)) diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 894efb1c209..e040c54f181 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -191,7 +191,7 @@ var/syndicate_elite_shuttle_timeleft = 0 /obj/machinery/computer/syndicate_elite_shuttle/emag_act(var/remaining_charges, var/mob/user) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") -/obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob) +/obj/machinery/computer/syndicate_elite_shuttle/attack_hand(mob/user, list/params) if(!allowed(user)) to_chat(user, "Access Denied.") return diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index f6594fe42bf..30f27715b68 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -63,7 +63,7 @@ return . = ..() -/obj/machinery/computer/timeclock/attack_hand(var/mob/user as mob) +/obj/machinery/computer/timeclock/attack_hand(mob/user, list/params) if(..()) return user.set_machine(src) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 5d4500ee404..ab1976aa188 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -79,7 +79,7 @@ if(occupant == user && !user.stat) go_out() -/obj/machinery/atmospherics/component/unary/cryo_cell/attack_hand(mob/user) +/obj/machinery/atmospherics/component/unary/cryo_cell/attack_hand(mob/user, list/params) nano_ui_interact(user) /** diff --git a/code/game/machinery/deployable_vr.dm b/code/game/machinery/deployable_vr.dm index 27b4faefac2..35918a4e142 100644 --- a/code/game/machinery/deployable_vr.dm +++ b/code/game/machinery/deployable_vr.dm @@ -56,7 +56,7 @@ topple() ..() -/obj/structure/barricade/cutout/attack_hand(mob/user) +/obj/structure/barricade/cutout/attack_hand(mob/user, list/params) if((. = ..())) return diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index de0515da06a..56d88ba9ca4 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -34,7 +34,7 @@ playsound(src.loc, "sparks", 100, TRUE) return 1 -/obj/machinery/button/remote/attack_hand(mob/user as mob) +/obj/machinery/button/remote/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm index a1ffe2c4e98..6a2568451a9 100644 --- a/code/game/machinery/doorbell_vr.dm +++ b/code/game/machinery/doorbell_vr.dm @@ -111,7 +111,7 @@ else icon_state = "doorbell-standby" -/obj/machinery/button/doorbell/attack_hand(mob/user) +/obj/machinery/button/doorbell/attack_hand(mob/user, list/params) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(..()) return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1d5cddaab2b..21fe6bca5de 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -972,7 +972,7 @@ About the new airlock wires panel: last_spark = world.time return ..() -/obj/machinery/door/airlock/attack_hand(mob/user as mob) +/obj/machinery/door/airlock/attack_hand(mob/user, list/params) if(!istype(usr, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 100)) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 5248837bb57..90960165da3 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -174,7 +174,7 @@ else icon_state = "airlock_sensor_off" -/obj/machinery/airlock_sensor/attack_hand(mob/user) +/obj/machinery/airlock_sensor/attack_hand(mob/user, list/params) var/datum/signal/signal = new signal.transmission_method = TRANSMISSION_RADIO //radio signal signal.data["tag"] = master_tag @@ -260,7 +260,7 @@ return ..() -/obj/machinery/access_button/attack_hand(mob/user) +/obj/machinery/access_button/attack_hand(mob/user, list/params) ..() if(!allowed(user)) to_chat(user, "Access Denied") diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 25729897643..84cd785d5f9 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -115,7 +115,7 @@ //Proc: attack_hand //Description: Attacked with empty hand. Only to allow special attack_bys. -/obj/machinery/door/blast/attack_hand(mob/user as mob) +/obj/machinery/door/blast/attack_hand(mob/user, list/params) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/X = user if(istype(X.species, /datum/species/xenos)) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 23d1828a558..7852955f99d 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -158,7 +158,7 @@ /obj/machinery/door_timer/attack_ai(mob/user) return src.attack_hand(user) -/obj/machinery/door_timer/attack_hand(mob/user) +/obj/machinery/door_timer/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index d3aec6d5f0c..993537da35f 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -200,7 +200,7 @@ /obj/machinery/door/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/door/attack_hand(mob/user as mob) +/obj/machinery/door/attack_hand(mob/user, list/params) return src.attackby(user, user) /obj/machinery/door/attack_tk(mob/user as mob) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index ed0850b5019..286a483645e 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -130,7 +130,7 @@ attack_hand(M) return 0 -/obj/machinery/door/firedoor/attack_hand(mob/user as mob) +/obj/machinery/door/firedoor/attack_hand(mob/user, list/params) add_fingerprint(user) if(operating) return//Already doing something. diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 2cf239c15b8..3960817880f 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -147,7 +147,7 @@ /obj/machinery/door/window/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/door/window/attack_hand(mob/user as mob) +/obj/machinery/door/window/attack_hand(mob/user, list/params) src.add_fingerprint(user) if(istype(user,/mob/living/carbon/human)) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 3c0c3effe03..968b162ddfe 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -48,7 +48,7 @@ /obj/machinery/embedded_controller/attack_ai(mob/user as mob) ui_interact(user) -/obj/machinery/embedded_controller/attack_hand(mob/user as mob) +/obj/machinery/embedded_controller/attack_hand(mob/user, list/params) if(!user.IsAdvancedToolUser()) return 0 diff --git a/code/game/machinery/event.dm b/code/game/machinery/event.dm index 06e51d10684..aabe77a9a12 100644 --- a/code/game/machinery/event.dm +++ b/code/game/machinery/event.dm @@ -65,7 +65,7 @@ The goal here is to create esoteric or niche, specialized machines that follow t else return -/obj/machinery/magma_pump/attack_hand(mob/user) +/obj/machinery/magma_pump/attack_hand(mob/user, list/params) interact(user) /obj/machinery/magma_pump/interact(mob/user) @@ -211,7 +211,7 @@ The goal here is to create esoteric or niche, specialized machines that follow t else return -/obj/machinery/magma_reservoir/attack_hand(mob/user) +/obj/machinery/magma_reservoir/attack_hand(mob/user, list/params) interact(user) /obj/machinery/magma_reservoir/interact(mob/user) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 068daaf5b40..af8ea1c7f25 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -95,7 +95,7 @@ // Proc: attack_hand() // Parameters: 1 (user - the person clicking on the machine) // Description: Opens the TGUI interface with ui_interact() -/obj/machinery/exonet_node/attack_hand(mob/user) +/obj/machinery/exonet_node/attack_hand(mob/user, list/params) ui_interact(user) // Proc: ui_interact() diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index da91776f840..723df61af70 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -128,7 +128,7 @@ FIRE ALARM spawn(rand(0,15)) update_icon() -/obj/machinery/firealarm/attack_hand(mob/user) +/obj/machinery/firealarm/attack_hand(mob/user, list/params) if(user.stat || machine_stat & (NOPOWER | BROKEN)) return @@ -247,7 +247,7 @@ Just a object used in constructing fire alarms idle_power_usage = 2 active_power_usage = 6 -/obj/machinery/partyalarm/attack_hand(mob/user) +/obj/machinery/partyalarm/attack_hand(mob/user, list/params) if(user.stat || machine_stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index eedb47d6d0b..6f84e1239fc 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -127,7 +127,7 @@ name = "flasher button" desc = "A remote control switch for a mounted flasher." -/obj/machinery/button/flasher/attack_hand(mob/user) +/obj/machinery/button/flasher/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 169be8c134d..1b5cbbc7b4e 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -66,7 +66,7 @@ if(!turn_on(TRUE)) to_chat(user, "You try to turn on \the [src] but it does not work.") -/obj/machinery/floodlight/attack_hand(mob/user) +/obj/machinery/floodlight/attack_hand(mob/user, list/params) if(open && cell) user.grab_item_from_interacted_with(cell, src) diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 6105ffc5e6a..ec0c969f773 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -60,7 +60,7 @@ var/list/floor_light_cache = list() attack_hand(user) return -/obj/machinery/floor_light/attack_hand(mob/user) +/obj/machinery/floor_light/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_HARM && !issmall(user)) if(!isnull(damaged) && !(machine_stat & BROKEN)) diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 0859e80691e..8641a0b16a0 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -32,7 +32,7 @@ old_turf = isturf(loc)? loc : null -/obj/machinery/floorlayer/attack_hand(mob/user) +/obj/machinery/floorlayer/attack_hand(mob/user, list/params) on=!on user.visible_message( \ SPAN_NOTICE("[user] has [!on?"de":""]activated \the [src]."), \ diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index c814bfedfde..cc91c32fe20 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -51,7 +51,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED attack_hand(user) return -/obj/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user) //Carn: Hologram requests. +/obj/machinery/hologram/holopad/attack_hand(mob/user, list/params) //Carn: Hologram requests. if(!istype(user)) return if(tgui_alert(user, "Would you like to request an AI's presence?", "Request AI", list("Yes", "No")) == "Yes") diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index dfb42dca937..4208e497330 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -59,7 +59,7 @@ icon = 'icons/obj/power.dmi' icon_state = "crema_switch" -/obj/machinery/button/holosign/attack_hand(mob/user) +/obj/machinery/button/holosign/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 5962623fb81..cf7438660f4 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -13,7 +13,7 @@ /obj/machinery/igniter/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/igniter/attack_hand(mob/user) +/obj/machinery/igniter/attack_hand(mob/user, list/params) if(..()) return @@ -121,7 +121,7 @@ name = "ignition switch" desc = "A remote control switch for a mounted igniter." -/obj/machinery/button/ignition/attack_hand(mob/user) +/obj/machinery/button/ignition/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 2ae05a83b23..aa68329b3a8 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -166,7 +166,7 @@ else return ..() -/obj/machinery/iv_drip/attack_hand(mob/user) +/obj/machinery/iv_drip/attack_hand(mob/user, list/params) if(reagent_container) reagent_container.loc = get_turf(src) reagent_container = null diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 6d861b18af8..9b69dd593d8 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -303,7 +303,7 @@ /obj/machinery/media/jukebox/attack_ai(mob/user) return src.attack_hand(user) -/obj/machinery/media/jukebox/attack_hand(mob/user) +/obj/machinery/media/jukebox/attack_hand(mob/user, list/params) interact(user) /obj/machinery/media/jukebox/proc/explode() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 8c8ffe748f2..bc16f267e84 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -52,7 +52,7 @@ /obj/machinery/light_switch/examine(mob/user) . += SPAN_NOTICE("A light switch. It is [on? "on" : "off"].") -/obj/machinery/light_switch/attack_hand(mob/user) +/obj/machinery/light_switch/attack_hand(mob/user, list/params) on = !on diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 1812f595d57..43ceb5a8490 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -251,7 +251,7 @@ /obj/machinery/magnetic_controller/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/magnetic_controller/attack_hand(mob/user) +/obj/machinery/magnetic_controller/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return user.set_machine(src) diff --git a/code/game/machinery/misc/bioscan_antenna.dm b/code/game/machinery/misc/bioscan_antenna.dm index 4bde23f4809..6fed4842936 100644 --- a/code/game/machinery/misc/bioscan_antenna.dm +++ b/code/game/machinery/misc/bioscan_antenna.dm @@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(bioscan_antenna_list) return panel_open? dyntool_image_forward(TOOL_SCREWDRIVER) : dyntool_image_backward(TOOL_SCREWDRIVER) return ..() -/obj/machinery/bioscan_antenna/attack_hand(mob/user) +/obj/machinery/bioscan_antenna/attack_hand(mob/user, list/params) // todo: better xenomorphs if(ishuman(user)) var/mob/living/carbon/human/H = user diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 05534c59042..4d181a2c78d 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -100,7 +100,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w /obj/machinery/navbeacon/attack_ai(var/mob/user) interact(user, 1) -/obj/machinery/navbeacon/attack_hand(var/mob/user) +/obj/machinery/navbeacon/attack_hand(mob/user, list/params) if(!user.IsAdvancedToolUser()) return FALSE diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 4a82589010f..5a340c24676 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -250,7 +250,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co /obj/machinery/newscaster/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/newscaster/attack_hand(mob/user) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ +/obj/machinery/newscaster/attack_hand(mob/user, list/params) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ if(!ispowered || isbroken) return @@ -813,6 +813,9 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co pickup_sound = 'sound/items/pickup/wrapper.ogg' /obj/item/newspaper/attack_self(mob/user) + . = ..() + if(.) + return if(ishuman(user)) var/mob/living/carbon/human/human_user = user var/dat diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 988a6ded286..7b33f104326 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -162,7 +162,7 @@ var/bomb_set return ..() -/obj/machinery/nuclearbomb/attack_hand(mob/user) +/obj/machinery/nuclearbomb/attack_hand(mob/user, list/params) if(extended) if(!ishuman(user)) to_chat(user, "You don't have the dexterity to do this!") diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 8176adabd38..f1d19ed625b 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -51,7 +51,7 @@ attach_mask(target) src.add_fingerprint(usr) -/obj/machinery/oxygen_pump/attack_hand(mob/user) +/obj/machinery/oxygen_pump/attack_hand(mob/user, list/params) if((machine_stat & MAINT) && tank) user.visible_message( \ SPAN_NOTICE("\The [user] removes \the [tank] from \the [src]."), \ diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 8d8c837ce63..7d5f0d51a52 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -212,7 +212,7 @@ /obj/machinery/partslathe/attack_ai(mob/user) src.attack_hand(user) -/obj/machinery/partslathe/attack_hand(mob/user) +/obj/machinery/partslathe/attack_hand(mob/user, list/params) if(..()) return ui_interact(user) diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm index e991634ad51..9d148f1f5d9 100644 --- a/code/game/machinery/pda_multicaster.dm +++ b/code/game/machinery/pda_multicaster.dm @@ -50,7 +50,7 @@ /obj/machinery/pda_multicaster/attack_ai(mob/user) attack_hand(user) -/obj/machinery/pda_multicaster/attack_hand(mob/user) +/obj/machinery/pda_multicaster/attack_hand(mob/user, list/params) toggle_power(user) /obj/machinery/pda_multicaster/proc/toggle_power(mob/user) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 24e24576dd2..80a9fc51d51 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -160,6 +160,9 @@ Buildable meters setDir(turn(dir, 45)) /obj/item/pipe/attack_self(mob/user) + . = ..() + if(.) + return setDir(turn(dir,-90)) fixdir() diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 665ccaaf783..06d2d3cbb1f 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -11,7 +11,7 @@ var/disposals = FALSE -/obj/machinery/pipedispenser/attack_hand(var/mob/user as mob) +/obj/machinery/pipedispenser/attack_hand(mob/user, list/params) if((. = ..())) return ui_interact(user) diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 1b41f63be68..d79559e975b 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -52,7 +52,7 @@ old_turf = new_turf old_dir = turn(M_Dir, 180) -/obj/machinery/pipelayer/attack_hand(mob/user as mob) +/obj/machinery/pipelayer/attack_hand(mob/user, list/params) if(..()) return if(panel_open) diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm index 4f6026589e1..1ffe17214cf 100644 --- a/code/game/machinery/pointdefense.dm +++ b/code/game/machinery/pointdefense.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense) ui = new(user, src, "PointDefenseControl") // 400, 600 ui.open() -/obj/machinery/pointdefense_control/attack_hand(mob/user) +/obj/machinery/pointdefense_control/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index e4a8c5f73bc..f3dec7dcd83 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -452,7 +452,7 @@ nano_ui_interact(user) -/obj/machinery/porta_turret/attack_hand(mob/user) +/obj/machinery/porta_turret/attack_hand(mob/user, list/params) if(isLocked(user)) return @@ -1145,7 +1145,7 @@ ..() -/obj/machinery/porta_turret_construct/attack_hand(mob/user) +/obj/machinery/porta_turret_construct/attack_hand(mob/user, list/params) switch(build_step) if(4) if(!installation) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 9b7c1c31673..20229c70ea4 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -104,7 +104,7 @@ else if(default_part_replacement(user, G)) return -/obj/machinery/recharger/attack_hand(mob/user) +/obj/machinery/recharger/attack_hand(mob/user, list/params) if(istype(user,/mob/living/silicon)) return diff --git a/code/game/machinery/records_scanner.dm b/code/game/machinery/records_scanner.dm index 23ff07d2835..90377abd130 100644 --- a/code/game/machinery/records_scanner.dm +++ b/code/game/machinery/records_scanner.dm @@ -36,7 +36,7 @@ obj/machinery/scanner else icon_state = "scanner_idle" -obj/machinery/scanner/attack_hand(mob/living/carbon/human/user) +obj/machinery/scanner/attack_hand(mob/user, list/params) if(stat & NOPOWER) return if(!ishuman(user) || lastuser == user.real_name) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index a7be0a7b282..62c67139301 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -119,7 +119,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() req_console_information -= department return ..() -/obj/machinery/requests_console/attack_hand(user as mob) +/obj/machinery/requests_console/attack_hand(mob/user, list/params) if(..(user)) return nano_ui_interact(user) diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm index 2a194dde2a7..4e04d13fabe 100644 --- a/code/game/machinery/robot_fabricator.dm +++ b/code/game/machinery/robot_fabricator.dm @@ -32,7 +32,7 @@ else to_chat(user, "The robot part maker is full. Please remove metal from the robot part maker in order to insert more.") -/obj/machinery/robotic_fabricator/attack_hand(user as mob) +/obj/machinery/robotic_fabricator/attack_hand(mob/user, list/params) var/dat if(..()) return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 9590f04bbe1..734bf13ef2d 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -74,7 +74,7 @@ ..() return -/obj/machinery/space_heater/attack_hand(mob/user as mob) +/obj/machinery/space_heater/attack_hand(mob/user, list/params) interact(user) /obj/machinery/space_heater/interact(mob/user as mob) @@ -234,7 +234,7 @@ return ..() -/obj/machinery/power/thermoregulator/attack_hand(mob/user) +/obj/machinery/power/thermoregulator/attack_hand(mob/user, list/params) add_fingerprint(user) interact(user) diff --git a/code/game/machinery/suit_storage/suit_cycler.dm b/code/game/machinery/suit_storage/suit_cycler.dm index 7d00ce1d2b1..05e1139ffba 100644 --- a/code/game/machinery/suit_storage/suit_cycler.dm +++ b/code/game/machinery/suit_storage/suit_cycler.dm @@ -260,7 +260,7 @@ updateUsrDialog() return 1 -/obj/machinery/suit_cycler/attack_hand(mob/user as mob) +/obj/machinery/suit_cycler/attack_hand(mob/user, list/params) add_fingerprint(user) diff --git a/code/game/machinery/suit_storage/suit_storage_massive.dm b/code/game/machinery/suit_storage/suit_storage_massive.dm index 950a825f1ab..dd5dc3cf21c 100644 --- a/code/game/machinery/suit_storage/suit_storage_massive.dm +++ b/code/game/machinery/suit_storage/suit_storage_massive.dm @@ -65,7 +65,7 @@ dump_everything() qdel(src) -/obj/machinery/suit_storage_closet/attack_hand(mob/user as mob) +/obj/machinery/suit_storage_closet/attack_hand(mob/user, list/params) if(..()) return if(machine_stat & NOPOWER) diff --git a/code/game/machinery/suit_storage/suit_storage_unit.dm b/code/game/machinery/suit_storage/suit_storage_unit.dm index a31f31466cb..0307d745725 100644 --- a/code/game/machinery/suit_storage/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage/suit_storage_unit.dm @@ -78,7 +78,7 @@ dump_everything() qdel(src) -/obj/machinery/suit_storage_unit/attack_hand(mob/user as mob) +/obj/machinery/suit_storage_unit/attack_hand(mob/user, list/params) if(..()) return if(machine_stat & NOPOWER) diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index ec7268d2fab..6502e04ea56 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -11,7 +11,10 @@ name = "inactive supermatter supply beacon" deploy_path = /obj/machinery/power/supply_beacon/supermatter -/obj/item/supply_beacon/attack_self(var/mob/user) +/obj/item/supply_beacon/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("\The [user] begins setting up \the [src].") if(!do_after(user, deploy_time)) return @@ -54,7 +57,7 @@ return return ..() -/obj/machinery/power/supply_beacon/attack_hand(mob/user) +/obj/machinery/power/supply_beacon/attack_hand(mob/user, list/params) if(expended) update_use_power(USE_POWER_OFF) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index e49367f94ad..6148d58e068 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -15,7 +15,7 @@ var/selfdestructing = FALSE var/charges = 1 -/obj/machinery/syndicate_beacon/attack_hand(mob/user) +/obj/machinery/syndicate_beacon/attack_hand(mob/user, list/params) usr.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) @@ -108,7 +108,7 @@ /obj/machinery/power/singularity_beacon/attack_ai(mob/user) return -/obj/machinery/power/singularity_beacon/attack_hand(mob/user) +/obj/machinery/power/singularity_beacon/attack_hand(mob/user, list/params) if(anchored) return active ? Deactivate(user) : Activate(user) else @@ -159,7 +159,7 @@ //! ## VR FILE MERGE ## !// // Virgo modified syndie beacon, does not give objectives -/obj/machinery/syndicate_beacon/virgo/attack_hand(mob/user ) +/obj/machinery/syndicate_beacon/virgo/attack_hand(mob/user, list/params) usr.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) diff --git a/code/game/machinery/telecomms/_telecomms.dm b/code/game/machinery/telecomms/_telecomms.dm index 626f5cf9a50..6b5dedd04b6 100644 --- a/code/game/machinery/telecomms/_telecomms.dm +++ b/code/game/machinery/telecomms/_telecomms.dm @@ -363,7 +363,7 @@ return UI_CLOSE . = ..() -/obj/machinery/telecomms/attack_hand(var/mob/user as mob) +/obj/machinery/telecomms/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/telecomms/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 126a2ea2c57..deb1bc024ec 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -62,7 +62,7 @@ return data -/obj/machinery/computer/telecomms/server/attack_hand(mob/user) +/obj/machinery/computer/telecomms/server/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return ui_interact(user) diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 2f6dd61f411..f23e06aab2a 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -50,7 +50,7 @@ return data -/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user) +/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return ui_interact(user) diff --git a/code/game/machinery/teleporter/console.dm b/code/game/machinery/teleporter/console.dm index bce516667f7..bb0a19b4cc6 100644 --- a/code/game/machinery/teleporter/console.dm +++ b/code/game/machinery/teleporter/console.dm @@ -84,7 +84,7 @@ return -/obj/machinery/computer/teleporter/attack_hand(mob/user) +/obj/machinery/computer/teleporter/attack_hand(mob/user, list/params) if(..()) return /* Ghosts can't use this one because it's a direct selection */ diff --git a/code/game/machinery/teleporter/projector.dm b/code/game/machinery/teleporter/projector.dm index c7aa06e5b77..540c02c33f4 100644 --- a/code/game/machinery/teleporter/projector.dm +++ b/code/game/machinery/teleporter/projector.dm @@ -50,7 +50,7 @@ /obj/machinery/tele_projector/attack_ai() attack_hand() -/obj/machinery/tele_projector/attack_hand() +/obj/machinery/tele_projector/attack_hand(mob/user, list/params) if(engaged) disengage() else diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 9d589a9dc1f..e01425d540a 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -118,7 +118,7 @@ nano_ui_interact(user) -/obj/machinery/turretid/attack_hand(mob/user) +/obj/machinery/turretid/attack_hand(mob/user, list/params) if(isLocked(user)) return diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 38c60712317..d2f49c67b30 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -281,7 +281,7 @@ /obj/machinery/vending/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/vending/attack_hand(mob/user as mob) +/obj/machinery/vending/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index bdfb619b2f2..8d70cbc0d2e 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -23,8 +23,10 @@ return ..() -/obj/item/frame/attack_self(mob/user as mob) - ..() +/obj/item/frame/attack_self(mob/user) + . = ..() + if(.) + return update_type_list() var/datum/frame/frame_types/frame_type if(!build_machine_type) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index f15ed999489..6657fa5fd9f 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -124,7 +124,7 @@ ..() update_icon() -/obj/machinery/washing_machine/attack_hand(mob/user as mob) +/obj/machinery/washing_machine/attack_hand(mob/user, list/params) switch(state) if(1) state = 2 diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index c5b87ee072d..cd2ffb6a64d 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -9,7 +9,7 @@ var/charges = 1 var/insisting = 0 -/obj/machinery/wish_granter/attack_hand(mob/user) +/obj/machinery/wish_granter/attack_hand(mob/user, list/params) usr.set_machine(src) if(charges <= 0) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index e5c04624589..789ced6e2b3 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -475,7 +475,7 @@ get_asset_datum(/datum/asset/spritesheet/sheetmaterials) ) -/obj/machinery/mecha_part_fabricator/attack_hand(var/mob/user) +/obj/machinery/mecha_part_fabricator/attack_hand(mob/user, list/params) if(..()) return if(!allowed(user)) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index be8a4edceba..f51452f72de 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1012,7 +1012,7 @@ qdel(src) return -/obj/mecha/attack_hand(mob/user as mob) +/obj/mecha/attack_hand(mob/user, list/params) if(user == occupant) show_radial_occupant(user) return diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 6c3bb875152..2e39b429c4b 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -13,7 +13,7 @@ /obj/machinery/computer/mecha/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/computer/mecha/attack_hand(mob/user) +/obj/machinery/computer/mecha/attack_hand(mob/user, list/params) if(..()) return ui_interact(user) diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 5f12f17dfea..76b79ac824d 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -22,7 +22,7 @@ ..() return -/obj/item/mecha_parts/chassis/attack_hand() +/obj/item/mecha_parts/chassis/attack_hand(mob/user, list/params) return //! Ripley diff --git a/code/game/mecha/micro/mecha_parts_vr.dm b/code/game/mecha/micro/mecha_parts_vr.dm index 0cc9b1dc298..0966e84fa28 100644 --- a/code/game/mecha/micro/mecha_parts_vr.dm +++ b/code/game/mecha/micro/mecha_parts_vr.dm @@ -17,7 +17,7 @@ ..() return -/obj/item/mecha_parts/micro/chassis/attack_hand() +/obj/item/mecha_parts/micro/chassis/attack_hand(mob/user, list/params) return //Gopher diff --git a/code/game/objects/attacks.dm b/code/game/objects/attacks.dm index aa0dddd77a5..b89a4810518 100644 --- a/code/game/objects/attacks.dm +++ b/code/game/objects/attacks.dm @@ -18,8 +18,8 @@ continue if(!SM.Adjacent(user) || !SM.Adjacent(target)) // Cleaving only hits mobs near the target mob and user. continue - if(resolve_attackby(SM, user, attack_modifier = 0.5)) // Hit them with the weapon. This won't cause recursive cleaving due to the cleaving variable being set to true. - hit_mobs++ + standard_melee_attack(SM, user, mult = 0.5) + hit_mobs++ cleave_visual(user, target) diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 1eed773db7f..0a6188bc1a1 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -104,7 +104,7 @@ health = max(0, health - tforce) healthcheck() -/obj/effect/alien/resin/attack_hand() +/obj/effect/alien/resin/attack_hand(mob/user, list/params) usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if (MUTATION_HULK in usr.mutations) to_chat(usr, "You easily destroy the [name].") @@ -454,7 +454,7 @@ Alien plants should do something if theres a lot of poison if((status == GROWING) && (BURST == 0)) Grow() -/obj/effect/alien/egg/attack_hand(user as mob) +/obj/effect/alien/egg/attack_hand(mob/user, list/params) var/mob/living/carbon/M = user if(!istype(M) || !(locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs)) diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index f6ad1972c95..31b6dc07961 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -171,7 +171,7 @@ else if(metal == 1 || prob(50)) qdel(src) -/obj/structure/foamedmetal/attack_hand(var/mob/user) +/obj/structure/foamedmetal/attack_hand(mob/user, list/params) if ((MUTATION_HULK in user.mutations) || (prob(75 - metal * 25))) user.visible_message("[user] smashes through the foamed metal.", "You smash through the metal foam wall.") qdel(src) diff --git a/code/game/objects/effects/debris/cleanable/humans.dm b/code/game/objects/effects/debris/cleanable/humans.dm index d05f58925a1..84a86772c8a 100644 --- a/code/game/objects/effects/debris/cleanable/humans.dm +++ b/code/game/objects/effects/debris/cleanable/humans.dm @@ -121,21 +121,26 @@ var/global/list/image/splatter_cache=list() add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) amount = 0 -/obj/effect/debris/cleanable/blood/attack_hand(mob/living/carbon/human/user) - ..() - if (amount && istype(user)) - if (user.gloves) +/obj/effect/debris/cleanable/blood/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/carbon/human/l = user + if(!istype(l)) + return + if (amount && istype(l)) + if (l.gloves) return var/taken = rand(1,amount) amount -= taken - to_chat(user, SPAN_NOTICE("You get some of \the [src] on your hands.")) - if (!user.blood_DNA) - user.blood_DNA = list() - user.blood_DNA |= blood_DNA.Copy() - user.bloody_hands += taken - user.hand_blood_color = basecolor - user.update_inv_gloves(1) - add_verb(user, /mob/living/carbon/human/proc/bloody_doodle) + to_chat(l, SPAN_NOTICE("You get some of \the [src] on your hands.")) + if (!l.blood_DNA) + l.blood_DNA = list() + l.blood_DNA |= blood_DNA.Copy() + l.bloody_hands += taken + l.hand_blood_color = basecolor + l.update_inv_gloves(1) + add_verb(l, /mob/living/carbon/human/proc/bloody_doodle) /obj/effect/debris/cleanable/blood/splatter random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5") diff --git a/code/game/objects/effects/debris/cleanable/misc.dm b/code/game/objects/effects/debris/cleanable/misc.dm index 8b81117be88..a33652a0bce 100644 --- a/code/game/objects/effects/debris/cleanable/misc.dm +++ b/code/game/objects/effects/debris/cleanable/misc.dm @@ -15,7 +15,7 @@ icon_state = "ash" anchored = 1 -/obj/effect/debris/cleanable/ash/attack_hand(mob/user as mob) +/obj/effect/debris/cleanable/ash/attack_hand(mob/user, list/params) to_chat(user, "[src] sifts through your fingers.") var/turf/simulated/floor/F = get_turf(src) if (istype(F)) diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 05026780317..88af3eb4d65 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -158,7 +158,7 @@ roll_and_drop(user.loc) return -/obj/structure/sign/poster/attack_hand(mob/user as mob) +/obj/structure/sign/poster/attack_hand(mob/user, list/params) if(ruined) return diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm index 9f69f2bf943..60db68d1e00 100644 --- a/code/game/objects/effects/decals/remains.dm +++ b/code/game/objects/effects/decals/remains.dm @@ -55,12 +55,12 @@ desc = "They look like human remains. They've been here a long time." icon_state = "mummified2" -/obj/effect/decal/remains/attack_hand(mob/user as mob) +/obj/effect/decal/remains/attack_hand(mob/user, list/params) to_chat(user, "[src] sinks together into a pile of ash.") var/turf/simulated/floor/F = get_turf(src) if (istype(F)) new /obj/effect/debris/cleanable/ash(F) qdel(src) -/obj/effect/decal/remains/robot/attack_hand(mob/user as mob) +/obj/effect/decal/remains/robot/attack_hand(mob/user, list/params) return diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 3f42dcd0ffc..259475ea8c0 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -223,7 +223,10 @@ var/countdown = 10 var/minetype = /obj/effect/mine //This MUST be an /obj/effect/mine type, or it'll runtime. -/obj/item/mine/attack_self(mob/user as mob) // You do not want to move or throw a land mine while priming it... Explosives + Sudden Movement = Bad Times +/obj/item/mine/attack_self(mob/user) + . = ..() + if(.) + return // You do not want to move or throw a land mine while priming it... Explosives + Sudden Movement = Bad Times add_fingerprint(user) msg_admin_attack("[key_name_admin(user)] primed \a [src]") user.visible_message("[user] starts priming \the [src.name].", "You start priming \the [src.name]. Hold still!") @@ -233,7 +236,6 @@ else visible_message("[user] triggers \the [src.name]!", "You accidentally trigger \the [src.name]!") prime(user, TRUE) - return /obj/item/mine/proc/prime(mob/user as mob, var/explode_now = FALSE) visible_message("\The [src.name] beeps as the priming sequence completes.") diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 4829b6efc83..3fb190cfdea 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -21,7 +21,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal) . = ..() teleport(AM) -/obj/effect/portal/attack_hand(mob/user as mob) +/obj/effect/portal/attack_hand(mob/user, list/params) if(istype(user) && !(istype(user,/mob/living))) return //do not send ghosts, zshadows, ai eyes, etc spawn(0) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 96d6159ce8e..22a70e81e5f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -262,7 +262,7 @@ else . = "" -/obj/item/attack_hand(mob/living/user as mob) +/obj/item/attack_hand(mob/user, list/params) attempt_pickup(user) /obj/item/proc/attempt_pickup(mob/user) @@ -736,3 +736,22 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. */ /obj/item/proc/get_attack_verb(atom/target, mob/user) return length(attack_verb)? pick(attack_verb) : attack_verb + +//? Interaction + +/** + * Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown. + * + * You should do . = ..() and check ., if it's TRUE, it means a parent proc requested the call chain to stop. + * + * @params + * * user - The person using us in hand + * + * @return TRUE to signal to overrides to stop the chain and do nothing. + */ +/obj/item/proc/attack_self(mob/user) + // SHOULD_CALL_PARENT(TRUE) + // attack_self isn't really part of the item attack chain. + SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) + if(interaction_flags_item & INTERACT_ITEM_ATTACK_SELF) + interact(user) diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm index 1bbf55d7974..9cd10e387e7 100644 --- a/code/game/objects/items/antag_spawners.dm +++ b/code/game/objects/items/antag_spawners.dm @@ -49,6 +49,9 @@ ghost_query_type = /datum/ghost_query/apprentice /obj/item/antag_spawner/technomancer_apprentice/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "Teleporter attempting to lock on to your apprentice.") request_player() @@ -95,6 +98,9 @@ var/drone_type = null /obj/item/antag_spawner/syndicate_drone/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "Teleporter attempting to lock on to an available unit.") request_player() diff --git a/code/game/objects/items/balls.dm b/code/game/objects/items/balls.dm index cf9aa5e99c3..5c2fa1ba591 100644 --- a/code/game/objects/items/balls.dm +++ b/code/game/objects/items/balls.dm @@ -27,7 +27,10 @@ 'sound/items/toysqueak3.ogg' ) -/obj/item/toy/tennis/rainbow/attack_self(mob/user as mob) +/obj/item/toy/tennis/rainbow/attack_self(mob/user) + . = ..() + if(.) + return playsound(src.loc, pick(squeak_sounds), 50, 1,) /obj/item/toy/tennis/red diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm index ca4c9a0c61d..6e155d8f9f7 100644 --- a/code/game/objects/items/bells.dm +++ b/code/game/objects/items/bells.dm @@ -18,7 +18,7 @@ if(broken) . += "It looks damaged, the ringer is stuck firmly inside." -/obj/item/deskbell/attack_hand(mob/user) +/obj/item/deskbell/attack_hand(mob/user, list/params) //This defines the radials and what call we're assiging to them. var/list/options = list() diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 25fece8e0d3..9276014bd6d 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -46,12 +46,14 @@ var/can_expand_areas_into = AREA_SPACE // Can expand station areas only into space. var/can_rename_areas_in = AREA_STATION // Only station areas can be reanamed -/obj/item/blueprints/attack_self(mob/M as mob) - if (!istype(M,/mob/living/carbon/human)) - to_chat(M, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting +/obj/item/blueprints/attack_self(mob/user) + . = ..() + if(.) + return + if (!istype(user, /mob/living/carbon/human)) + to_chat(user, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting return interact() - return /obj/item/blueprints/Topic(href, href_list) ..() diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 8f322e4bf08..064f7785957 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -8,6 +8,9 @@ w_class = ITEMSIZE_SMALL /obj/item/bodybag/attack_self(mob/user) + . = ..() + if(.) + return var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc) R.add_fingerprint(user) qdel(src) @@ -125,6 +128,9 @@ var/obj/item/reagent_containers/syringe/syringe /obj/item/bodybag/cryobag/attack_self(mob/user) + . = ..() + if(.) + return var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc) R.add_fingerprint(user) if(syringe) @@ -155,7 +161,7 @@ QDEL_NULL(tank) return ..() -/obj/structure/closet/body_bag/cryobag/attack_hand(mob/living/user) +/obj/structure/closet/body_bag/cryobag/attack_hand(mob/user, list/params) if(used) var/confirm = tgui_alert(user, "Are you sure you want to open \the [src]? \The [src] will expire upon opening it.", "Confirm Opening", list("No", "Yes")) if(confirm == "Yes") diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm index 8c305d3177a..eb29987bf64 100644 --- a/code/game/objects/items/contraband.dm +++ b/code/game/objects/items/contraband.dm @@ -50,94 +50,99 @@ w_class = ITEMSIZE_HUGE /obj/item/stolenpackage/attack_self(mob/user) - // Another way of doing this. Commented out because the other method is better for this application. - /*var/spawn_chance = rand(1,100) - switch(spawn_chance) - if(0 to 49) - new /obj/random/gun/guarenteed(usr.loc) - to_chat(usr, "You got a thing!") - if(50 to 99) - new /obj/item/bikehorn/rubberducky(usr.loc) - new /obj/item/bikehorn(usr.loc) - to_chat(usr, "You got two things!") - if(100) - to_chat(usr, "The box contained nothing!") - return - */ - var/loot = pick(/obj/landmark/costume, - /obj/item/clothing/glasses/thermal, - /obj/item/clothing/gloves/combat, - /obj/item/clothing/gloves/combat/advanced, - /obj/item/clothing/accessory/holster/machete/occupied, - /obj/item/clothing/accessory/holster/machete/occupied/deluxe, - /obj/item/clothing/accessory/holster/machete/occupied/durasteel, - /obj/item/clothing/head/bearpelt, - /obj/item/clothing/mask/balaclava, - /obj/item/clothing/mask/horsehead, - /obj/item/clothing/mask/muzzle, - /obj/item/clothing/suit/armor/heavy, - /obj/item/clothing/suit/armor/laserproof, - /obj/item/clothing/suit/armor/vest, - /obj/item/chameleon, - /obj/item/pda/clown, - /obj/item/pda/mime, - /obj/item/pda/syndicate, - /obj/item/mecha_parts/chassis/phazon, - /obj/item/mecha_parts/part/phazon_head, - /obj/item/mecha_parts/part/phazon_left_arm, - /obj/item/mecha_parts/part/phazon_left_leg, - /obj/item/mecha_parts/part/phazon_right_arm, - /obj/item/mecha_parts/part/phazon_right_leg, - /obj/item/mecha_parts/part/phazon_torso, - // /obj/item/bodysnatcher, - /obj/item/bluespace_harpoon, - /obj/item/clothing/accessory/permit/gun, - /obj/item/perfect_tele, - // /obj/item/sleevemate, - /obj/item/disk/nifsoft/compliance, - /obj/item/seeds/ambrosiadeusseed, - /obj/item/seeds/ambrosiavulgarisseed, - /obj/item/seeds/libertymycelium, - /obj/fiftyspawner/platinum, - /obj/item/toy/nanotrasenballoon, - /obj/item/toy/syndicateballoon, - /obj/item/aiModule/syndicate, - /obj/item/book/manual/engineering_hacking, - /obj/item/card/emag, - /obj/item/card/emag_broken, - /obj/item/card/id/syndicate, - /obj/item/contraband/poster, - /obj/item/disposable_teleporter, - /obj/item/grenade/flashbang/clusterbang, - /obj/item/grenade/flashbang/clusterbang, - /obj/item/grenade/spawnergrenade/spesscarp, - /obj/item/melee/energy/sword, - /obj/item/melee/telebaton, - /obj/item/pen/reagent/paralysis, - /obj/item/pickaxe/diamonddrill, - /obj/item/reagent_containers/food/drinks/bottle/pwine, - /obj/item/reagent_containers/food/snacks/carpmeat, - /obj/item/reagent_containers/food/snacks/clownstears, - /obj/item/reagent_containers/food/snacks/xenomeat, - /obj/item/reagent_containers/glass/beaker/neurotoxin, - /obj/item/rig/combat, - /obj/item/shield/energy, - /obj/item/stamp/centcomm, - /obj/item/stamp/oricon, - /obj/item/storage/fancy/cigar/havana, - /obj/item/storage/fancy/cigar/cohiba, - /obj/item/storage/fancy/cigar/taj, - /obj/item/storage/fancy/cigar/taj/premium, - /obj/item/xenos_claw, - /obj/random/contraband, - /obj/random/contraband, - /obj/random/contraband, - /obj/random/contraband, - /obj/item/storage/belt/spike_bandolier, - /obj/random/weapon/guarenteed) - new loot(user.drop_location()) - to_chat(user, "You unwrap the package.") - qdel(src) + . = ..() + if(.) + return + // Another way of doing this. Commented out because the other method is better for this application. + /*var/spawn_chance = rand(1,100) + switch(spawn_chance) + if(0 to 49) + new /obj/random/gun/guarenteed(usr.loc) + to_chat(usr, "You got a thing!") + if(50 to 99) + new /obj/item/bikehorn/rubberducky(usr.loc) + new /obj/item/bikehorn(usr.loc) + to_chat(usr, "You got two things!") + if(100) + to_chat(usr, "The box contained nothing!") + return + */ + var/loot = pick( + /obj/landmark/costume, + /obj/item/clothing/glasses/thermal, + /obj/item/clothing/gloves/combat, + /obj/item/clothing/gloves/combat/advanced, + /obj/item/clothing/accessory/holster/machete/occupied, + /obj/item/clothing/accessory/holster/machete/occupied/deluxe, + /obj/item/clothing/accessory/holster/machete/occupied/durasteel, + /obj/item/clothing/head/bearpelt, + /obj/item/clothing/mask/balaclava, + /obj/item/clothing/mask/horsehead, + /obj/item/clothing/mask/muzzle, + /obj/item/clothing/suit/armor/heavy, + /obj/item/clothing/suit/armor/laserproof, + /obj/item/clothing/suit/armor/vest, + /obj/item/chameleon, + /obj/item/pda/clown, + /obj/item/pda/mime, + /obj/item/pda/syndicate, + /obj/item/mecha_parts/chassis/phazon, + /obj/item/mecha_parts/part/phazon_head, + /obj/item/mecha_parts/part/phazon_left_arm, + /obj/item/mecha_parts/part/phazon_left_leg, + /obj/item/mecha_parts/part/phazon_right_arm, + /obj/item/mecha_parts/part/phazon_right_leg, + /obj/item/mecha_parts/part/phazon_torso, + // /obj/item/bodysnatcher, + /obj/item/bluespace_harpoon, + /obj/item/clothing/accessory/permit/gun, + /obj/item/perfect_tele, + // /obj/item/sleevemate, + /obj/item/disk/nifsoft/compliance, + /obj/item/seeds/ambrosiadeusseed, + /obj/item/seeds/ambrosiavulgarisseed, + /obj/item/seeds/libertymycelium, + /obj/fiftyspawner/platinum, + /obj/item/toy/nanotrasenballoon, + /obj/item/toy/syndicateballoon, + /obj/item/aiModule/syndicate, + /obj/item/book/manual/engineering_hacking, + /obj/item/card/emag, + /obj/item/card/emag_broken, + /obj/item/card/id/syndicate, + /obj/item/contraband/poster, + /obj/item/disposable_teleporter, + /obj/item/grenade/flashbang/clusterbang, + /obj/item/grenade/flashbang/clusterbang, + /obj/item/grenade/spawnergrenade/spesscarp, + /obj/item/melee/energy/sword, + /obj/item/melee/telebaton, + /obj/item/pen/reagent/paralysis, + /obj/item/pickaxe/diamonddrill, + /obj/item/reagent_containers/food/drinks/bottle/pwine, + /obj/item/reagent_containers/food/snacks/carpmeat, + /obj/item/reagent_containers/food/snacks/clownstears, + /obj/item/reagent_containers/food/snacks/xenomeat, + /obj/item/reagent_containers/glass/beaker/neurotoxin, + /obj/item/rig/combat, + /obj/item/shield/energy, + /obj/item/stamp/centcomm, + /obj/item/stamp/oricon, + /obj/item/storage/fancy/cigar/havana, + /obj/item/storage/fancy/cigar/cohiba, + /obj/item/storage/fancy/cigar/taj, + /obj/item/storage/fancy/cigar/taj/premium, + /obj/item/xenos_claw, + /obj/random/contraband, + /obj/random/contraband, + /obj/random/contraband, + /obj/random/contraband, + /obj/item/storage/belt/spike_bandolier, + /obj/random/weapon/guarenteed, + ) + new loot(user.drop_location()) + to_chat(user, "You unwrap the package.") + qdel(src) /obj/item/storage/fancy/cigar/havana name = "\improper Havana cigar case" @@ -175,59 +180,62 @@ w_class = ITEMSIZE_HUGE /obj/item/stolenpackageplus/attack_self(mob/user) - var/loot = pick(/obj/item/clothing/glasses/thermal, - /obj/item/clothing/gloves/combat/advanced, - /obj/item/clothing/gloves/combat/advanced, - /obj/item/clothing/accessory/holster/machete/occupied/deluxe, - /obj/item/clothing/accessory/holster/machete/occupied/deluxe, - /obj/item/clothing/accessory/holster/machete/occupied/durasteel, - /obj/item/clothing/suit/armor/heavy, - /obj/item/clothing/suit/armor/laserproof, - /obj/item/chameleon, - /obj/item/pda/syndicate, - /obj/item/mecha_parts/chassis/phazon, - /obj/item/mecha_parts/part/phazon_head, - /obj/item/mecha_parts/part/phazon_left_arm, - /obj/item/mecha_parts/part/phazon_left_leg, - /obj/item/mecha_parts/part/phazon_right_arm, - /obj/item/mecha_parts/part/phazon_right_leg, - /obj/item/mecha_parts/part/phazon_torso, - // /obj/item/bodysnatcher, - /obj/item/bluespace_harpoon, - /obj/item/clothing/accessory/permit/gun, - /obj/item/perfect_tele, - /obj/item/storage/belt/spike_bandolier, - /obj/item/seeds/ambrosiadeusseed, - /obj/item/seeds/ambrosiavulgarisseed, - /obj/item/seeds/libertymycelium, - /obj/fiftyspawner/platinum, - /obj/item/toy/nanotrasenballoon, - /obj/item/toy/syndicateballoon, - /obj/item/aiModule/syndicate, - /obj/item/card/emag, - /obj/item/card/id/syndicate, - /obj/item/disposable_teleporter, - /obj/item/grenade/flashbang/clusterbang, - /obj/item/grenade/flashbang/clusterbang, - /obj/item/grenade/spawnergrenade/spesscarp, - /obj/item/melee/energy/sword, - /obj/item/melee/telebaton, - /obj/item/pen/reagent/paralysis, - /obj/item/pickaxe/diamonddrill, - /obj/item/reagent_containers/glass/beaker/neurotoxin, - /obj/item/rig/combat, - /obj/item/shield/energy, - /obj/item/stamp/centcomm, - /obj/item/stamp/oricon, - /obj/item/storage/fancy/cigar/havana, - /obj/item/storage/fancy/cigar/cohiba, - /obj/item/storage/fancy/cigar/taj, - /obj/item/storage/fancy/cigar/taj/premium, - /obj/item/storage/belt/spike_bandolier, - /obj/random/weapon/guarenteed) - new loot(usr.drop_location()) - to_chat(user, "You unwrap the package.") - qdel(src) + . = ..() + if(.) + return + var/loot = pick(/obj/item/clothing/glasses/thermal, + /obj/item/clothing/gloves/combat/advanced, + /obj/item/clothing/gloves/combat/advanced, + /obj/item/clothing/accessory/holster/machete/occupied/deluxe, + /obj/item/clothing/accessory/holster/machete/occupied/deluxe, + /obj/item/clothing/accessory/holster/machete/occupied/durasteel, + /obj/item/clothing/suit/armor/heavy, + /obj/item/clothing/suit/armor/laserproof, + /obj/item/chameleon, + /obj/item/pda/syndicate, + /obj/item/mecha_parts/chassis/phazon, + /obj/item/mecha_parts/part/phazon_head, + /obj/item/mecha_parts/part/phazon_left_arm, + /obj/item/mecha_parts/part/phazon_left_leg, + /obj/item/mecha_parts/part/phazon_right_arm, + /obj/item/mecha_parts/part/phazon_right_leg, + /obj/item/mecha_parts/part/phazon_torso, + // /obj/item/bodysnatcher, + /obj/item/bluespace_harpoon, + /obj/item/clothing/accessory/permit/gun, + /obj/item/perfect_tele, + /obj/item/storage/belt/spike_bandolier, + /obj/item/seeds/ambrosiadeusseed, + /obj/item/seeds/ambrosiavulgarisseed, + /obj/item/seeds/libertymycelium, + /obj/fiftyspawner/platinum, + /obj/item/toy/nanotrasenballoon, + /obj/item/toy/syndicateballoon, + /obj/item/aiModule/syndicate, + /obj/item/card/emag, + /obj/item/card/id/syndicate, + /obj/item/disposable_teleporter, + /obj/item/grenade/flashbang/clusterbang, + /obj/item/grenade/flashbang/clusterbang, + /obj/item/grenade/spawnergrenade/spesscarp, + /obj/item/melee/energy/sword, + /obj/item/melee/telebaton, + /obj/item/pen/reagent/paralysis, + /obj/item/pickaxe/diamonddrill, + /obj/item/reagent_containers/glass/beaker/neurotoxin, + /obj/item/rig/combat, + /obj/item/shield/energy, + /obj/item/stamp/centcomm, + /obj/item/stamp/oricon, + /obj/item/storage/fancy/cigar/havana, + /obj/item/storage/fancy/cigar/cohiba, + /obj/item/storage/fancy/cigar/taj, + /obj/item/storage/fancy/cigar/taj/premium, + /obj/item/storage/belt/spike_bandolier, + /obj/random/weapon/guarenteed) + new loot(usr.drop_location()) + to_chat(user, "You unwrap the package.") + qdel(src) //Ported from Main. diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 088cbfd8365..3124120e25d 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -42,7 +42,10 @@ colourName = "mime" uses = 0 -/obj/item/pen/crayon/mime/attack_self(mob/living/user as mob) //inversion +/obj/item/pen/crayon/mime/attack_self(mob/user) + . = ..() + if(.) + return //inversion if(colour != "#FFFFFF" && shadeColour != "#000000") colour = "#FFFFFF" shadeColour = "#000000" @@ -60,7 +63,10 @@ colourName = "rainbow" uses = 0 -/obj/item/pen/crayon/rainbow/attack_self(mob/living/user as mob) +/obj/item/pen/crayon/rainbow/attack_self(mob/user) + . = ..() + if(.) + return colour = input(user, "Please select the main colour.", "Crayon colour") as color shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color return @@ -159,7 +165,10 @@ colourName = "mime" uses = 0 -/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user as mob) //inversion +/obj/item/pen/crayon/marker/mime/attack_self(mob/user) + . = ..() + if(.) + return //inversion if(colour != "#FFFFFF" && shadeColour != "#000000") colour = "#FFFFFF" shadeColour = "#000000" @@ -177,7 +186,10 @@ colourName = "rainbow" uses = 0 -/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user as mob) +/obj/item/pen/crayon/marker/rainbow/attack_self(mob/user) + . = ..() + if(.) + return colour = input(user, "Please select the main colour.", "Marker colour") as color shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color return diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 63beaaf9816..ac6b86e2899 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -318,7 +318,10 @@ GLOBAL_LIST_EMPTY(PDAs) return 1 -/obj/item/pda/ai/attack_self(mob/user as mob) +/obj/item/pda/ai/attack_self(mob/user) + . = ..() + if(.) + return if ((honkamt > 0) && (prob(60)))//For clown virus. honkamt-- playsound(loc, 'sound/items/bikehorn.ogg', 30, 1) @@ -666,7 +669,10 @@ GLOBAL_LIST_EMPTY(PDAs) ui.set_auto_update(auto_update) //NOTE: graphic resources are loaded on client login -/obj/item/pda/attack_self(mob/user as mob) +/obj/item/pda/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 9b510ef8931..959f702afb5 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -22,6 +22,9 @@ return CLICKCHAIN_DO_NOT_PROPAGATE /obj/item/aicard/attack_self(mob/user) + . = ..() + if(.) + return nano_ui_interact(user) diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm index 3596091e8df..3476e1fc91d 100644 --- a/code/game/objects/items/devices/binoculars.dm +++ b/code/game/objects/items/devices/binoculars.dm @@ -13,4 +13,7 @@ /obj/item/binoculars/attack_self(mob/user) + . = ..() + if(.) + return zoom() diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm index 5e651ff953d..f2c7651e870 100644 --- a/code/game/objects/items/devices/body_snatcher_vr.dm +++ b/code/game/objects/items/devices/body_snatcher_vr.dm @@ -67,5 +67,8 @@ else to_chat(user," A warning pops up on the LED display on the side of the device, informing you that the target is not able to have their mind swapped with!") -/obj/item/bodysnatcher/attack_self(mob/living/user) +/obj/item/bodysnatcher/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user," A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?") diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 511fbda7171..32f67e286f0 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -24,7 +24,10 @@ . = ..() disrupt() -/obj/item/chameleon/attack_self() +/obj/item/chameleon/attack_self(mob/user) + . = ..() + if(.) + return toggle() /obj/item/chameleon/afterattack(atom/target, mob/user , proximity) @@ -107,7 +110,7 @@ to_chat(M, "Your chameleon-projector deactivates.") master.disrupt() -/obj/effect/dummy/chameleon/attack_hand() +/obj/effect/dummy/chameleon/attack_hand(mob/user, list/params) for(var/mob/M in src) to_chat(M, "Your chameleon-projector deactivates.") master.disrupt() diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 082727b847c..0353dd9e100 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -219,6 +219,9 @@ var/global/list/obj/item/communicator/all_communicators = list() // Description: Makes an exonet datum if one does not exist, allocates an address for it, maintains the lists of all devies, clears the alert icon, and // finally makes NanoUI appear. /obj/item/communicator/attack_self(mob/user) + . = ..() + if(.) + return initialize_exonet(user) alert_called = 0 update_icon() diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 74c32af4238..7e3b555893e 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -66,7 +66,7 @@ /obj/item/defib_kit/ui_action_click() toggle_paddles() -/obj/item/defib_kit/attack_hand(mob/user) +/obj/item/defib_kit/attack_hand(mob/user, list/params) if(loc == user) toggle_paddles() else diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 0a126df2be1..69ead62cf35 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -192,7 +192,7 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return ..() -/obj/item/flashlight/attack_hand(mob/user as mob) +/obj/item/flashlight/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(cell) cell.update_appearance() diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index 23d994df7aa..7d8c3b096a1 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -100,7 +100,10 @@ new painting_decal(F, painting_dir, painting_colour) -/obj/item/floor_painter/attack_self(var/mob/user) +/obj/item/floor_painter/attack_self(mob/user) + . = ..() + if(.) + return var/choice = input("Do you wish to change the decal type, paint direction, or paint colour?") as null|anything in list("Decal","Direction", "Colour") if(choice == "Decal") choose_decal() diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index d6bc2c80d1d..cc37ab55e62 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -131,6 +131,9 @@ update_appearance() /obj/item/geiger_counter/attack_self(mob/user) + . = ..() + if(.) + return scanning = !scanning if(scanning) START_PROCESSING(SSobj, src) diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index c62d5c08763..72fd953d851 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -163,6 +163,8 @@ /obj/item/gps/attack_self(mob/user) . = ..() + if(.) + return // TODO: ATTACK_SELF REFACTOR ui_interact(user) diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index b3b02d00c64..1d37537a183 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -22,7 +22,10 @@ to_chat(user, "You have to go closer if you want to read it.") //hit yourself with it -/obj/item/holowarrant/attack_self(mob/living/user as mob) +/obj/item/holowarrant/attack_self(mob/user) + . = ..() + if(.) + return active = null var/list/warrants = list() if(!isnull(data_core.general)) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 563fd4d9932..7ead65e387e 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -135,6 +135,9 @@ /obj/item/lightreplacer/attack_self(mob/user) + . = ..() + if(.) + return /* // This would probably be a bit OP. If you want it though, uncomment the code. if(isrobot(user)) var/mob/living/silicon/robot/R = user diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm index 93505ef5314..b92070123a7 100644 --- a/code/game/objects/items/devices/locker_painter.dm +++ b/code/game/objects/items/devices/locker_painter.dm @@ -117,7 +117,10 @@ to_chat(user, "\The [src] flashes an error light. You might need to reconfigure it.") return -/obj/item/closet_painter/attack_self(var/mob/user) +/obj/item/closet_painter/attack_self(mob/user) + . = ..() + if(.) + return var/choice = input("Do you wish to change the regular closet colour or the secure closet colour?") as null|anything in list("Regular Closet Colour","Secure Closet Colour") if(choice == "Regular Closet Colour") choose_colour() diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index efbbdd26bc0..00b0516fd38 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -41,7 +41,10 @@ spamcheck = 0 return -/obj/item/megaphone/attack_self(mob/living/user as mob) +/obj/item/megaphone/attack_self(mob/user) + . = ..() + if(.) + return if(!can_broadcast(user)) return diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 399c096b2bd..c38d6c2476d 100755 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -46,7 +46,10 @@ return update_icon() -/obj/item/multitool/attack_self(mob/living/user) +/obj/item/multitool/attack_self(mob/user) + . = ..() + if(.) + return var/choice = alert("What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel") switch(choice) if("Cancel") @@ -66,8 +69,6 @@ update_icon() - return ..() - /obj/item/multitool/is_multitool() return TRUE diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 5c916ac4187..7b48f2930ac 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -34,6 +34,9 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) return ..() /obj/item/paicard/attack_self(mob/user) + . = ..() + if(.) + return if (!in_range(src, user)) return user.set_machine(src) @@ -227,7 +230,6 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) "} user << browse(dat, "window=paicard") onclose(user, "paicard") - return /obj/item/paicard/Topic(href, href_list) diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index 683a46afe36..cd1eea1d0d4 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -22,7 +22,10 @@ P.change_color(pipe_colors[mode]) -/obj/item/pipe_painter/attack_self(mob/user as mob) +/obj/item/pipe_painter/attack_self(mob/user) + . = ..() + if(.) + return mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes /obj/item/pipe_painter/examine(mob/user) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 1af86131741..c43ef7b6895 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -70,7 +70,7 @@ /obj/item/powersink/attack_ai() return -/obj/item/powersink/attack_hand(var/mob/user) +/obj/item/powersink/attack_hand(mob/user, list/params) switch(mode) if(0) ..() diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index db591f658d5..fcafa8c09be 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -87,7 +87,10 @@ GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/radio/beacon) desc = "A label on it reads: Activate to have a singularity beacon teleported to your location." origin_tech = list(TECH_BLUESPACE = 1, TECH_ILLEGAL = 7) -/obj/item/radio/beacon/syndicate/attack_self(mob/user as mob) +/obj/item/radio/beacon/syndicate/attack_self(mob/user) + . = ..() + if(.) + return if(user) to_chat(user, SPAN_NOTICE("Locked In")) new /obj/machinery/power/singularity_beacon/syndicate(user.loc) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 53831c01cb4..f1adebdb640 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -15,8 +15,8 @@ var/code = 2 -/obj/item/radio/electropack/attack_hand(mob/living/user as mob) - if(src == user.back) +/obj/item/radio/electropack/attack_hand(mob/user, list/params) + if(src == user.item_by_slot(SLOT_ID_BACK)) to_chat(user, "You need help taking this off!") return ..() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 8319bdbe3b3..cc90f74aee4 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -124,7 +124,7 @@ spawn (0) attack_self(user) -/obj/item/radio/intercom/attack_hand(mob/user as mob) +/obj/item/radio/intercom/attack_hand(mob/user, list/params) src.add_fingerprint(user) spawn (0) attack_self(user) diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm index 0690793db07..24453693e9c 100644 --- a/code/game/objects/items/devices/radio/jammer.dm +++ b/code/game/objects/items/devices/radio/jammer.dm @@ -69,7 +69,7 @@ var/global/list/active_radio_jammers = list() update_icon() -/obj/item/radio_jammer/attack_hand(mob/user) +/obj/item/radio_jammer/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src && power_source) to_chat(user,"You eject \the [power_source] from \the [src].") user.put_in_hands(power_source) @@ -79,6 +79,9 @@ var/global/list/active_radio_jammers = list() return ..() /obj/item/radio_jammer/attack_self(mob/user) + . = ..() + if(.) + return if(on) turn_off(user) else diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index fc6ca98d050..13eea26f6bf 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -138,7 +138,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( radio_controller.remove_object(src, radiochannels[ch_name]) return ..() -/obj/item/radio/attack_self(mob/user as mob) +/obj/item/radio/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) interact(user) @@ -805,7 +808,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( /obj/item/bluespace_radio/ui_action_click() toggle_handset() -/obj/item/bluespace_radio/attack_hand(mob/user) +/obj/item/bluespace_radio/attack_hand(mob/user, list/params) if(loc == user) toggle_handset() else diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index c26dbf59404..2cde4bad668 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -377,7 +377,10 @@ HALOGEN COUNTER - Radcount on mobs return atmosanalyzer_scan(src, air, user) -/obj/item/analyzer/attack_self(mob/user as mob) +/obj/item/analyzer/attack_self(mob/user) + . = ..() + if(.) + return if (user.stat) return if (!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey") @@ -430,7 +433,10 @@ HALOGEN COUNTER - Radcount on mobs else icon_state = initial(icon_state) -/obj/item/mass_spectrometer/attack_self(mob/user as mob) +/obj/item/mass_spectrometer/attack_self(mob/user) + . = ..() + if(.) + return if (user.stat) return if (!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey") diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm index 6ceb8bd08d9..d2263dae4b8 100644 --- a/code/game/objects/items/devices/scanners_vr.dm +++ b/code/game/objects/items/devices/scanners_vr.dm @@ -23,7 +23,10 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob scan_mob(target, user) to_chat(user,"Not a compatible subject to work with!") -/obj/item/sleevemate/attack_self(mob/living/user) +/obj/item/sleevemate/attack_self(mob/user) + . = ..() + if(.) + return if(!stored_mind) to_chat(user,"No stored mind in \the [src].") return diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 0f3d5be8337..635b1b81623 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -21,6 +21,9 @@ camera = new camtype(src) /obj/item/camerabug/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HARM) to_chat(user, "You crush the [src] under your foot, breaking it.") visible_message("[user.name] crushes the [src] under their foot, breaking it!") @@ -135,6 +138,9 @@ var/list/obj/machinery/camera/bug/cameras = new() /obj/item/bug_monitor/attack_self(mob/user) + . = ..() + if(.) + return if(operating) return diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index c68859f2929..70be2e5f645 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -120,7 +120,10 @@ STOP_PROCESSING(SSobj, src) updateicon() -/obj/item/suit_cooling_unit/attack_self(var/mob/user) +/obj/item/suit_cooling_unit/attack_self(mob/user) + . = ..() + if(.) + return if(cover_open && cell) if(ishuman(user)) user.put_in_hands(cell) diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index c3fce502d75..83bf17212eb 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -27,6 +27,9 @@ set_active(!on) /obj/item/t_scanner/attack_self(mob/user) + . = ..() + if(.) + return set_active(!on) /obj/item/t_scanner/proc/set_active(var/active) diff --git a/code/game/objects/items/devices/tape_recorder/cassette_tape.dm b/code/game/objects/items/devices/tape_recorder/cassette_tape.dm index a14009fef18..6368accce6a 100644 --- a/code/game/objects/items/devices/tape_recorder/cassette_tape.dm +++ b/code/game/objects/items/devices/tape_recorder/cassette_tape.dm @@ -99,6 +99,9 @@ /obj/item/cassette_tape/attack_self(mob/user) . = ..() + if(.) + return + . = ..() if(user.a_intent != INTENT_HARM) return if(!ruined) diff --git a/code/game/objects/items/devices/tape_recorder/tape_recorder.dm b/code/game/objects/items/devices/tape_recorder/tape_recorder.dm index d49a4efb150..195dd873c7e 100644 --- a/code/game/objects/items/devices/tape_recorder/tape_recorder.dm +++ b/code/game/objects/items/devices/tape_recorder/tape_recorder.dm @@ -62,7 +62,7 @@ tape.ruin() //Fires destroy the tape return ..() -/obj/item/tape_recorder/attack_hand(mob/user) +/obj/item/tape_recorder/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(tape) eject() @@ -439,6 +439,9 @@ TIMER_COOLDOWN_START(src, CD_INDEX_TAPE_PRINT, 30 SECONDS) /obj/item/tape_recorder/attack_self(mob/user) + . = ..() + if(.) + return if(is_playing()) stop_playing(user) else if(is_recording()) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index dfb0da8817f..9e038af7387 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -57,7 +57,7 @@ return ..() -/obj/item/tape_recorder/attack_hand(mob/user) +/obj/item/tape_recorder/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(mytape) eject() @@ -342,6 +342,9 @@ /obj/item/tape_recorder/attack_self(mob/user) + . = ..() + if(.) + return if(recording || playing) stop() else @@ -387,6 +390,9 @@ ruin() /obj/item/cassette_tape/attack_self(mob/user) + . = ..() + if(.) + return if(!ruined) to_chat(user, "You pull out all the tape!") ruin() diff --git a/code/game/objects/items/devices/text_to_speech.dm b/code/game/objects/items/devices/text_to_speech.dm index 0d8988d6fef..e2b96dd4462 100644 --- a/code/game/objects/items/devices/text_to_speech.dm +++ b/code/game/objects/items/devices/text_to_speech.dm @@ -6,7 +6,10 @@ w_class = ITEMSIZE_SMALL var/named -/obj/item/text_to_speech/attack_self(mob/user as mob) +/obj/item/text_to_speech/attack_self(mob/user) + . = ..() + if(.) + return if(user.incapacitated(INCAPACITATION_KNOCKDOWN) || user.incapacitated(INCAPACITATION_DISABLED)) // EDIT: We can use the device only if we are not in certain types of incapacitation. We don't want chairs stopping us from texting!! to_chat(user, "You cannot activate the device in your state.") return diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 681e1b22f1d..47b3a19302c 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -71,6 +71,9 @@ return ..() /obj/item/transfer_valve/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/transfer_valve/ui_state(mob/user, datum/tgui_module/module) diff --git a/code/game/objects/items/devices/translator.dm b/code/game/objects/items/devices/translator.dm index 09af59a5f91..9f1820ddb5c 100644 --- a/code/game/objects/items/devices/translator.dm +++ b/code/game/objects/items/devices/translator.dm @@ -89,6 +89,9 @@ ours.copy_knowledge(theirs) /obj/item/universal_translator/attack_self(mob/user) + . = ..() + if(.) + return if(!listening) //Turning ON var/list/allowed = list() for(var/datum/language/L in user.languages) diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm index 0a3428e0f4b..1301e9265e2 100644 --- a/code/game/objects/items/devices/tvcamera.dm +++ b/code/game/objects/items/devices/tvcamera.dm @@ -44,6 +44,9 @@ ..() /obj/item/tvcamera/attack_self(mob/user) + . = ..() + if(.) + return add_fingerprint(user) user.set_machine(src) var/dat = list() diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index 681cf74714b..67c2d29cc97 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -224,7 +224,10 @@ hidden_uplink = new(src, target_mind, telecrystals) icon_state = "radio" -/obj/item/radio/uplink/attack_self(mob/user as mob) +/obj/item/radio/uplink/attack_self(mob/user) + . = ..() + if(.) + return if(hidden_uplink) hidden_uplink.trigger(user) @@ -232,7 +235,10 @@ . = ..() hidden_uplink = new(src) -/obj/item/multitool/uplink/attack_self(mob/user as mob) +/obj/item/multitool/uplink/attack_self(mob/user) + . = ..() + if(.) + return if(hidden_uplink) hidden_uplink.trigger(user) diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index cab48691d0b..662185d6905 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -28,7 +28,10 @@ to_chat(usr, "You configure the hailer to shout \"[use_message]\".") -/obj/item/hailer/attack_self(mob/living/carbon/user as mob) +/obj/item/hailer/attack_self(mob/user) + . = ..() + if(.) + return if (spamcheck) return diff --git a/code/game/objects/items/gifts.dm b/code/game/objects/items/gifts.dm index 532043df5bb..3e21d1d4721 100644 --- a/code/game/objects/items/gifts.dm +++ b/code/game/objects/items/gifts.dm @@ -32,18 +32,21 @@ GLOBAL_LIST_EMPTY(possible_gifts) . = ..() . += SPAN_NOTICE("It contains \a [initial(contains_type.name)].") -/obj/item/a_gift/attack_self(mob/M) +/obj/item/a_gift/attack_self(mob/user) + . = ..() + if(.) + return qdel(src) - var/obj/item/I = new contains_type(get_turf(M)) + var/obj/item/I = new contains_type(get_turf(user)) if (!QDELETED(I)) //might contain something like metal rods that might merge with a stack on the ground - M.visible_message(SPAN_NOTICE("[M] unwraps \the [src], finding \a [I] inside!")) - I.investigate_log("([I.type]) was found in a present by [key_name(M)].", INVESTIGATE_PRESENTS) - M.put_in_hands(I) - I.add_fingerprint(M) + user.visible_message(SPAN_NOTICE("[user] unwraps \the [src], finding \a [I] inside!")) + I.investigate_log("([I.type]) was found in a present by [key_name(user)].", INVESTIGATE_PRESENTS) + user.put_in_hands(I) + I.add_fingerprint(user) else - M.visible_message(SPAN_DANGER("Oh no! The present that [M] opened had nothing inside it!")) + user.visible_message(SPAN_DANGER("Oh no! The present that [user] opened had nothing inside it!")) /obj/item/a_gift/proc/get_gift_type() var/gift_type_list = list( diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index 51de7f8a0b4..5dc2fcd51fc 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -41,7 +41,10 @@ update_icon() return -/obj/item/glass_jar/attack_self(var/mob/user) +/obj/item/glass_jar/attack_self(mob/user) + . = ..() + if(.) + return switch(contains) if(1) for(var/obj/O in src) diff --git a/code/game/objects/items/godfigures.dm b/code/game/objects/items/godfigures.dm index ed829a16506..8bbba95bf48 100644 --- a/code/game/objects/items/godfigures.dm +++ b/code/game/objects/items/godfigures.dm @@ -11,6 +11,9 @@ w_class = ITEMSIZE_SMALL /obj/item/godfig/attack_self(mob/user) + . = ..() + if(.) + return resprite_figure(user) /obj/item/godfig/proc/resprite_figure(mob/living/L) diff --git a/code/game/objects/items/gunbox.dm b/code/game/objects/items/gunbox.dm index f386c5cfe15..67205d72831 100644 --- a/code/game/objects/items/gunbox.dm +++ b/code/game/objects/items/gunbox.dm @@ -4,7 +4,10 @@ icon = 'icons/obj/storage.dmi' icon_state = "gunbox" -/obj/item/gunbox/attack_self(mob/living/user) +/obj/item/gunbox/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["NT Mk58 (.45)"] = list(/obj/item/gun/ballistic/sec, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/flash) options["SW 625 Revolver (.45)"] = list(/obj/item/gun/ballistic/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber) @@ -24,7 +27,10 @@ icon = 'icons/obj/storage.dmi' icon_state = "gunbox" -/obj/item/gunbox/lethal/attack_self(mob/living/user) +/obj/item/gunbox/lethal/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["M1911 Dynamic (.45)"] = list(/obj/item/gun/ballistic/colt, /obj/item/ammo_magazine/m45, /obj/item/ammo_magazine/m45) options["SW 625 Revolver (.45)"] = list(/obj/item/gun/ballistic/revolver/detective45, /obj/item/ammo_magazine/s45, /obj/item/ammo_magazine/s45) @@ -46,7 +52,10 @@ icon_state = "gunbox" w_class = ITEMSIZE_HUGE -/obj/item/gunbox/attack_self(mob/living/user) +/obj/item/gunbox/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options[".45 Pistol"] = list(/obj/item/gun/ballistic/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber) options[".45 Revolver"] = list(/obj/item/gun/ballistic/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber) @@ -67,7 +76,10 @@ icon_state = "gunbox" w_class = ITEMSIZE_HUGE -/obj/item/gunbox/marksman/attack_self(mob/living/user) +/obj/item/gunbox/marksman/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["Marksman Energy Rifle"] = list(/obj/item/gun/energy/sniperrifle/locked) options["M1A Garand"] = list(/obj/item/gun/ballistic/garand/sniper, /obj/item/storage/belt/security/tactical/bandolier, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter, /obj/item/ammo_magazine/m762garand/sniperhunter) // 7 clips, 56 rounds @@ -87,7 +99,10 @@ icon = 'icons/obj/storage.dmi' icon_state = "donkbox" -/obj/item/gunbox/donksoft/attack_self(mob/living/user) +/obj/item/gunbox/donksoft/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["Classic DONKsoft Pistol"] = list(/obj/item/gun/ballistic/pistol/foam, /obj/item/ammo_magazine/mfoam/pistol, /obj/item/ammo_magazine/mfoam/pistol) options["Blue DONKsoft Pistol"] = list(/obj/item/gun/ballistic/pistol/foam/blue, /obj/item/ammo_magazine/mfoam/pistol, /obj/item/ammo_magazine/mfoam/pistol) @@ -107,7 +122,10 @@ icon = 'icons/obj/storage.dmi' icon_state = "donkbox2" -/obj/item/gunbox/donksoft/shotgun/attack_self(mob/living/user) +/obj/item/gunbox/donksoft/shotgun/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["Classic DONKsoft Shotgun"] = list(/obj/item/gun/ballistic/shotgun/pump/foam, /obj/item/storage/box/foamdart, /obj/item/storage/box/foamdart) options["Blue DONKsoft Shotgun"] = list(/obj/item/gun/ballistic/shotgun/pump/foam/blue, /obj/item/storage/box/foamdart, /obj/item/storage/box/foamdart) @@ -126,7 +144,10 @@ icon = 'icons/obj/storage.dmi' icon_state = "donkbox3" -/obj/item/gunbox/donksoft/smg/attack_self(mob/living/user) +/obj/item/gunbox/donksoft/smg/attack_self(mob/user) + . = ..() + if(.) + return var/list/options = list() options["Classic DONKsoft SMG"] = list(/obj/item/gun/ballistic/automatic/advanced_smg/foam, /obj/item/ammo_magazine/mfoam/smg, /obj/item/ammo_magazine/mfoam/smg) options["Blue DONKsoft SMG"] = list(/obj/item/gun/ballistic/automatic/advanced_smg/foam/blue, /obj/item/ammo_magazine/mfoam/smg, /obj/item/ammo_magazine/mfoam/smg) diff --git a/code/game/objects/items/holosign_creator.dm b/code/game/objects/items/holosign_creator.dm index 12110fda5dd..59ec0e9625d 100644 --- a/code/game/objects/items/holosign_creator.dm +++ b/code/game/objects/items/holosign_creator.dm @@ -49,6 +49,9 @@ to_chat(user, "[src] is projecting at max capacity!") /obj/item/holosign_creator/attack_self(mob/user) + . = ..() + if(.) + return if(signs.len) for(var/H in signs) qdel(H) @@ -112,6 +115,9 @@ var/shock = 0 /obj/item/holosign_creator/cyborg/attack_self(mob/user) + . = ..() + if(.) + return if(iscyborg(user)) var/mob/living/silicon/robot/R = user diff --git a/code/game/objects/items/id_cards/station_ids.dm b/code/game/objects/items/id_cards/station_ids.dm index fab32c7f688..ee8c223f138 100644 --- a/code/game/objects/items/id_cards/station_ids.dm +++ b/code/game/objects/items/id_cards/station_ids.dm @@ -124,7 +124,10 @@ dat += "" return dat -/obj/item/card/id/attack_self(mob/user as mob) +/obj/item/card/id/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("\The [user] shows you: [icon2html(thing = src, target = world)] [src.name]. The assignment on the card: [src.assignment]",\ "You flash your ID card: [icon2html(thing = src, target = user)] [src.name]. The assignment on the card: [src.assignment]") diff --git a/code/game/objects/items/id_cards/syndicate_ids.dm b/code/game/objects/items/id_cards/syndicate_ids.dm index e27430746fc..05c19d50b87 100644 --- a/code/game/objects/items/id_cards/syndicate_ids.dm +++ b/code/game/objects/items/id_cards/syndicate_ids.dm @@ -29,7 +29,10 @@ if(player_is_antag(user.mind)) to_chat(user, "The microscanner activates as you pass it over the ID, copying its access.") -/obj/item/card/id/syndicate/attack_self(mob/user as mob) +/obj/item/card/id/syndicate/attack_self(mob/user) + . = ..() + if(.) + return // We use the fact that registered_name is not unset should the owner be vaporized, to ensure the id doesn't magically become unlocked. if(!registered_user && register_user(user)) to_chat(user, "The microscanner marks you as its owner, preventing others from accessing its internals.") diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index 318a44541b0..e1da4ef77d4 100644 --- a/code/game/objects/items/inducer.dm +++ b/code/game/objects/items/inducer.dm @@ -162,6 +162,9 @@ user.visible_message(SPAN_NOTICE("[user] recharged [A]."), SPAN_NOTICE("Rechraged [A] with [used] units of power.")) /obj/item/inducer/attack_self(mob/user) + . = ..() + if(.) + return if(opened && cell) user.visible_message("[user] removes [cell] from [src]!", "You remove [cell].") cell.update_icon() diff --git a/code/game/objects/items/pizza_voucher.dm b/code/game/objects/items/pizza_voucher.dm index 7df97b4076f..060e9f4c5f1 100644 --- a/code/game/objects/items/pizza_voucher.dm +++ b/code/game/objects/items/pizza_voucher.dm @@ -21,6 +21,9 @@ desc = "A pocket-sized plastic slip with a button in the middle. \"[pick(descstrings)]\" is written on the back." /obj/item/pizzavoucher/attack_self(mob/user) + . = ..() + if(.) + return add_fingerprint(user) if(!spent) user.visible_message("[user] presses a button on [src]!") diff --git a/code/game/objects/items/robobag.dm b/code/game/objects/items/robobag.dm index c56366ee000..25d222a4111 100644 --- a/code/game/objects/items/robobag.dm +++ b/code/game/objects/items/robobag.dm @@ -9,6 +9,9 @@ origin_tech = list(TECH_ENGINEERING = 3) /obj/item/bodybag/cryobag/robobag/attack_self(mob/user) + . = ..() + if(.) + return var/obj/structure/closet/body_bag/cryobag/robobag/R = new /obj/structure/closet/body_bag/cryobag/robobag(user.loc) R.add_fingerprint(user) if(syringe) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 9122cef6648..4890a265d6b 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -39,7 +39,10 @@ item_state = "cyborg_upgrade" var/heldname = "default name" -/obj/item/borg/upgrade/rename/attack_self(mob/user as mob) +/obj/item/borg/upgrade/rename/attack_self(mob/user) + . = ..() + if(.) + return heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN) /obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index fde2d5cf42a..1da059064eb 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -29,7 +29,7 @@ return ..() -/obj/item/target/attack_hand(mob/user as mob) +/obj/item/target/attack_hand(mob/user, list/params) // taking pinned targets off! var/obj/structure/target_stake/stake for(var/obj/structure/target_stake/T in view(3,src)) diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index 81fffd54ec3..814607251a4 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -27,7 +27,10 @@ else return ..() -/obj/item/picket_sign/attack_self(mob/living/carbon/human/user) +/obj/item/picket_sign/attack_self(mob/user) + . = ..() + if(.) + return if( last_wave + 20 < world.time ) last_wave = world.time if(label) diff --git a/code/game/objects/items/spritechanger.dm b/code/game/objects/items/spritechanger.dm index b224564e281..62a031f1510 100644 --- a/code/game/objects/items/spritechanger.dm +++ b/code/game/objects/items/spritechanger.dm @@ -14,6 +14,9 @@ after the sprite has been set you can use it again to remove overlays that may h var/state /obj/item/spritechanger/attack_self(mob/user) + . = ..() + if(.) + return if(user) if(path && state) user.icon = icon(path) diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm index 9990592b95e..84b0cd1552a 100644 --- a/code/game/objects/items/stacks/marker_beacons.dm +++ b/code/game/objects/items/stacks/marker_beacons.dm @@ -51,6 +51,9 @@ var/list/marker_beacon_colors = list( icon_state = "[initial(icon_state)][lowertext(picked_color)]" /obj/item/stack/marker_beacon/attack_self(mob/user) + . = ..() + if(.) + return if(!isturf(user.loc)) to_chat(user, "You need more space to place a [singular_name] here.") return @@ -103,7 +106,7 @@ var/list/marker_beacon_colors = list( icon_state = "[initial(icon_state)][lowertext(picked_color)]-on" set_light(light_range, light_power, marker_beacon_colors[picked_color]) -/obj/structure/marker_beacon/attack_hand(mob/living/user) +/obj/structure/marker_beacon/attack_hand(mob/user, list/params) to_chat(user, "You start picking [src] up...") if(do_after(user, remove_speed, target = src)) var/obj/item/stack/marker_beacon/M = new(loc) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index afd3810bca1..bf4cb8a6e43 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -73,7 +73,10 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ ..() /* -/obj/item/stack/rods/attack_self(mob/user as mob) +/obj/item/stack/rods/attack_self(mob/user) + . = ..() + if(.) + return src.add_fingerprint(user) if(!istype(user.loc,/turf)) return 0 diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 05552c30e18..4b9f7f8203c 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -19,7 +19,10 @@ drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' -/obj/item/stack/material/glass/attack_self(mob/user as mob) +/obj/item/stack/material/glass/attack_self(mob/user) + . = ..() + if(.) + return construct_window(user) /obj/item/stack/material/glass/attackby(obj/item/W, mob/user) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index b325513b8e6..bc21e936ed6 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -85,6 +85,9 @@ . += "There is enough charge for [get_amount()]." /obj/item/stack/attack_self(mob/user) + . = ..() + if(.) + return if(safety_check()) return list_recipes(user) @@ -361,7 +364,7 @@ if(!amount) break -/obj/item/stack/attack_hand(mob/user) +/obj/item/stack/attack_hand(mob/user, list/params) if(safety_check()) return if(user.get_inactive_held_item() == src) diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index df198d4972e..ec4577d8694 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -23,7 +23,10 @@ to_chat(user, "There are not enough telecrystals to do that.") return NONE -/obj/item/stack/telecrystal/attack_self(mob/user as mob) +/obj/item/stack/telecrystal/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals to_chat(user, "You use \the [src], adding [src.amount] to your balance.") user.mind.tcrystals += amount diff --git a/code/game/objects/items/storage/_storage.dm b/code/game/objects/items/storage/_storage.dm index ea539f4bb35..b059c0ab34f 100644 --- a/code/game/objects/items/storage/_storage.dm +++ b/code/game/objects/items/storage/_storage.dm @@ -448,7 +448,7 @@ W.add_fingerprint(user) return handle_item_insertion(W, user) -/obj/item/storage/attack_hand(mob/user as mob) +/obj/item/storage/attack_hand(mob/user, list/params) if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.l_store == src && !H.get_active_held_item()) //Prevents opening if it's in a pocket. @@ -598,7 +598,10 @@ O.emp_act(severity) ..() -/obj/item/storage/attack_self(mob/user as mob) +/obj/item/storage/attack_self(mob/user) + . = ..() + if(.) + return if((user.get_active_held_item() == src) || (isrobot(user)) && allow_quick_empty) if(src.verbs.Find(/obj/item/storage/verb/quick_empty)) src.quick_empty() @@ -720,7 +723,10 @@ closed_state = "[initial(icon_state)]" . = ..() -/obj/item/storage/trinketbox/attack_self() +/obj/item/storage/trinketbox/attack_self(mob/user) + . = ..() + if(.) + return open = !open update_icon() ..() diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 13af7efa2c1..b0af1f1d363 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -31,7 +31,10 @@ pickup_sound = 'sound/items/pickup/cardboardbox.ogg' // BubbleWrap - A box can be folded up to make card -/obj/item/storage/box/attack_self(mob/user as mob) +/obj/item/storage/box/attack_self(mob/user) + . = ..() + if(.) + return if(..()) return //try to fold it. diff --git a/code/game/objects/items/storage/laundry_basket.dm b/code/game/objects/items/storage/laundry_basket.dm index 9faf1db375d..2d0c83027fc 100644 --- a/code/game/objects/items/storage/laundry_basket.dm +++ b/code/game/objects/items/storage/laundry_basket.dm @@ -20,11 +20,11 @@ collection_mode = 1 var/linked -/obj/item/storage/laundry_basket/attack_hand(mob/living/user as mob) +/obj/item/storage/laundry_basket/attack_hand(mob/user, list/params) if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.get_organ("r_hand") - if (user.hand) + if (H.hand) temp = H.get_organ("l_hand") if(!temp) to_chat(user, "You need two hands to pick this up!") @@ -35,7 +35,10 @@ return return ..() -/obj/item/storage/laundry_basket/attack_self(mob/user as mob) +/obj/item/storage/laundry_basket/attack_self(mob/user) + . = ..() + if(.) + return var/turf/T = get_turf(user) to_chat(user, "You dump the [src]'s contents onto \the [T].") return ..() diff --git a/code/game/objects/items/storage/quickdraw.dm b/code/game/objects/items/storage/quickdraw.dm index 7860d2152e4..eee338ea566 100644 --- a/code/game/objects/items/storage/quickdraw.dm +++ b/code/game/objects/items/storage/quickdraw.dm @@ -14,7 +14,7 @@ //When set to 1, a click while it is equipped will instead move the first item inside it to your hand var/quickmode = 0 -/obj/item/storage/quickdraw/attack_hand(mob/user as mob) +/obj/item/storage/quickdraw/attack_hand(mob/user, list/params) if(src.loc == user) //If they aren't holding us, we do nothing special if(ishuman(user)) var/mob/living/carbon/human/H = user diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index d98fd8a8121..72639a3ec41 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -77,7 +77,10 @@ ..() -/obj/item/storage/secure/attack_self(mob/user as mob) +/obj/item/storage/secure/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) var/dat = text("[]
\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED")) var/message = "Code" @@ -152,7 +155,7 @@ w_class = ITEMSIZE_LARGE max_storage_space = ITEMSIZE_COST_NORMAL * 4 -/obj/item/storage/secure/briefcase/attack_hand(mob/user) +/obj/item/storage/secure/briefcase/attack_hand(mob/user, list/params) if ((src.loc == user) && (src.locked == 1)) to_chat(user, "[src] is locked and cannot be opened!") else if ((src.loc == user) && (!src.locked)) @@ -213,5 +216,5 @@ /obj/item/pen ) -/obj/item/storage/secure/safe/attack_hand(mob/user as mob) +/obj/item/storage/secure/safe/attack_hand(mob/user, list/params) return attack_self(user) diff --git a/code/game/objects/items/storage/single_use/_single_use.dm b/code/game/objects/items/storage/single_use/_single_use.dm index 6aadffde0b2..7825fead571 100644 --- a/code/game/objects/items/storage/single_use/_single_use.dm +++ b/code/game/objects/items/storage/single_use/_single_use.dm @@ -22,6 +22,9 @@ return ..(user, TRUE) /obj/item/storage/single_use/attack_self(mob/user) + . = ..() + if(.) + return open(user) /obj/item/storage/single_use/update_icon() diff --git a/code/game/objects/items/storage/single_use/med_pouch.dm b/code/game/objects/items/storage/single_use/med_pouch.dm index 76ea8aeb2a8..af622b90447 100644 --- a/code/game/objects/items/storage/single_use/med_pouch.dm +++ b/code/game/objects/items/storage/single_use/med_pouch.dm @@ -51,6 +51,9 @@ desc += instructions /obj/item/storage/single_use/med_pouch/attack_self(mob/user) + . = ..() + if(.) + return open(user) /*handled by single_use diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 79982ff6ccb..997ffe8f4a0 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -113,6 +113,9 @@ return ..() /obj/item/tool/crowbar/power/attack_self(mob/user) + . = ..() + if(.) + return playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(!user.put_in_active_hand(counterpart)) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index d1274405568..fbe17d5533f 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -167,6 +167,9 @@ return ..() /obj/item/tool/screwdriver/power/attack_self(mob/user) + . = ..() + if(.) + return playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(!user.put_in_active_hand(counterpart)) diff --git a/code/game/objects/items/tools/switchtool.dm b/code/game/objects/items/tools/switchtool.dm index 06015a1da7e..c1ffe547a66 100644 --- a/code/game/objects/items/tools/switchtool.dm +++ b/code/game/objects/items/tools/switchtool.dm @@ -105,6 +105,9 @@ return module_string /obj/item/switchtool/attack_self(mob/user) + . = ..() + if(.) + return if(!user) return if(deployed) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 3babfb23eaa..a42ff17351f 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -150,6 +150,9 @@ location.hotspot_expose(700, 50, 1) /obj/item/weldingtool/attack_self(mob/user) + . = ..() + if(.) + return setWelding(!welding, user) //Returns the amount of fuel in the welder @@ -618,7 +621,7 @@ update_icon() return 0 -/obj/item/weldingtool/electric/attack_hand(mob/user as mob) +/obj/item/weldingtool/electric/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(power_supply) power_supply.update_icon() diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index b28effc9482..a508c4d3c88 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -141,6 +141,9 @@ return ..() /obj/item/tool/wirecutters/power/attack_self(mob/user) + . = ..() + if(.) + return playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(!user.put_in_active_hand(counterpart)) diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 5be1584d901..571829630ab 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -144,6 +144,9 @@ return ..() /obj/item/tool/wrench/power/attack_self(mob/user) + . = ..() + if(.) + return playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(!user.put_in_active_hand(counterpart)) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index afd158b8f62..01363333912 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -266,6 +266,9 @@ attack_verb = list("attacked", "struck", "hit") /obj/item/toy/sword/attack_self(mob/user) + . = ..() + if(.) + return src.active = !( src.active ) if (src.active) to_chat(user, SPAN_NOTICE("You extend the plastic blade with a quick flick of your wrist.")) @@ -422,7 +425,10 @@ w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS | SLOT_HOLSTER -/obj/item/toy/bosunwhistle/attack_self(mob/user as mob) +/obj/item/toy/bosunwhistle/attack_self(mob/user) + . = ..() + if(.) + return if(cooldown < world.time - 35) to_chat(user, "You blow on [src], creating an ear-splitting noise!") playsound(user, 'sound/misc/boatswain.ogg', 20, 1) @@ -437,13 +443,16 @@ var/cooldown = 0 //all credit to skasi for toy mech fun ideas -/obj/item/toy/prize/attack_self(mob/user as mob) +/obj/item/toy/prize/attack_self(mob/user) + . = ..() + if(.) + return if(cooldown < world.time - 8) to_chat(user, "You play with [src].") playsound(user, 'sound/mecha/mechstep.ogg', 20, 1) cooldown = world.time -/obj/item/toy/prize/attack_hand(mob/user as mob) +/obj/item/toy/prize/attack_hand(mob/user, list/params) if(loc == user) if(cooldown < world.time - 8) to_chat(user, "You play with [src].") @@ -521,7 +530,10 @@ . = ..() desc = "A \"Space Life\" brand [name]" -/obj/item/toy/figure/attack_self(mob/user as mob) +/obj/item/toy/figure/attack_self(mob/user) + . = ..() + if(.) + return if(cooldown < world.time) cooldown = (world.time + 30) //3 second cooldown user.visible_message("The [src] says \"[toysay]\".") @@ -783,9 +795,11 @@ playsound(src, bitesound, 20, 1) // Play bite sound in local area // Attack self -/obj/item/toy/plushie/carp/attack_self(mob/user as mob) +/obj/item/toy/plushie/carp/attack_self(mob/user) + . = ..() + if(.) + return playsound(src, bitesound, 20, 1) - return ..() /obj/random/carp_plushie name = "Random Carp Plushie" @@ -846,7 +860,7 @@ density = 1 var/phrase = "I don't want to exist anymore!" -/obj/structure/plushie/attack_hand(mob/user) +/obj/structure/plushie/attack_hand(mob/user, list/params) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(user.a_intent == INTENT_HELP) user.visible_message("\The [user] hugs [src]!","You hug [src]!") @@ -893,7 +907,10 @@ var/last_message = 0 var/pokephrase = "Uww!" -/obj/item/toy/plushie/attack_self(mob/user as mob) +/obj/item/toy/plushie/attack_self(mob/user) + . = ..() + if(.) + return if(world.time - last_message <= 1 SECOND) return if(user.a_intent == INTENT_HELP) @@ -1342,7 +1359,10 @@ 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(mob/user) + . = ..() + if(.) + return if(!cooldown) var/answer = pick(possible_answers) user.visible_message("[user] focuses on their question and [use_action]...") @@ -1415,6 +1435,9 @@ var/cooldown = 0 /* /obj/item/toy/AI/attack_self(mob/user) + . = ..() + if(.) + return if(!cooldown) //for the sanity of everyone var/message = generate_ion_law() to_chat(user, "You press the button on [src].") @@ -1434,6 +1457,9 @@ var/cooldown = 0 /obj/item/toy/owl/attack_self(mob/user) + . = ..() + if(.) + return if(!cooldown) //for the sanity of everyone var/message = pick("You won't get away this time, Griffin!", "Stop right there, criminal!", "Hoot! Hoot!", "I am the night!") to_chat(user, "You pull the string on the [src].") @@ -1442,7 +1468,6 @@ cooldown = 1 spawn(30) cooldown = 0 return - ..() /obj/item/toy/griffin name = "griffin action figure" @@ -1453,6 +1478,9 @@ var/cooldown = 0 /obj/item/toy/griffin/attack_self(mob/user) + . = ..() + if(.) + return if(!cooldown) //for the sanity of everyone var/message = pick("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!") to_chat(user, "You pull the string on the [src].") @@ -1461,7 +1489,6 @@ cooldown = 1 spawn(30) cooldown = 0 return - ..() /obj/item/toy/cowgirlprize name = "cyan cowgirl action figure" @@ -1472,6 +1499,9 @@ var/cooldown = 0 /obj/item/toy/cowgirlprize/attack_self(mob/user) + . = ..() + if(.) + return if(!cooldown) //for the sanity of everyone var/message = pick("Yee haw!", "Enjoy my signature CC Root Beer, y'all!", "Shuck 'em up!", "What in tarnation?") to_chat(user, "You pull the string on the [src].") @@ -1480,7 +1510,6 @@ cooldown = 1 spawn(30) cooldown = 0 return - ..() /obj/item/toy/snakeoilprize name = "snake oil salesman action figure" @@ -1491,6 +1520,9 @@ var/cooldown = 0 /obj/item/toy/snakeoilprize/attack_self(mob/user) + . = ..() + if(.) + return if(!cooldown) //for the sanity of everyone var/message = pick("Mwahahaha!", "Try my snake oil! Guaranteed to solve all problems!", "Time to skedaddle.", "Money money money!") to_chat(user, "You pull the string on the [src].") @@ -1499,17 +1531,6 @@ cooldown = 1 spawn(30) cooldown = 0 return - ..() - -/* NYET. -/obj/item/toddler - icon_state = "toddler" - name = "toddler" - desc = "This baby looks almost real. Wait, did it just burp?" - force = 5 - w_class = ITEMSIZE_LARGE - slot_flags = SLOT_BACK -*/ //This should really be somewhere else but I don't know where. w/e @@ -1544,7 +1565,10 @@ max_w_class = ITEMSIZE_SMALL max_storage_space = INVENTORY_BOX_SPACE -/obj/item/storage/daki/attack_self(mob/living/user) +/obj/item/storage/daki/attack_self(mob/user) + . = ..() + if(.) + return var/body_choice var/custom_name diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm index 4e2be5d503f..47b10a81b77 100644 --- a/code/game/objects/items/uav.dm +++ b/code/game/objects/items/uav.dm @@ -64,7 +64,7 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/uav/attack_hand(var/mob/user) +/obj/item/uav/attack_hand(mob/user, list/params) //Has to be on the ground to work with it properly if(!isturf(loc)) return ..() diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index d440e385fa3..2c1c8523ec1 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -130,7 +130,10 @@ AI MODULES desc = "A 'safeguard' AI module: 'Safeguard . Anyone threatening or attempting to harm is no longer to be considered a crew member, and is a threat which must be neutralized.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) -/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob) +/obj/item/aiModule/safeguard/attack_self(mob/user) + . = ..() + if(.) + return ..() var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) targetName = targName @@ -156,7 +159,10 @@ AI MODULES desc = "A 'one crew member' AI module: 'Only is a crew member.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) //made with diamonds! -/obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob) +/obj/item/aiModule/oneHuman/attack_self(mob/user) + . = ..() + if(.) + return ..() var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name)) targetName = targName @@ -237,7 +243,10 @@ AI MODULES desc = "A 'freeform' AI module: ''" origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) -/obj/item/aiModule/freeform/attack_self(var/mob/user as mob) +/obj/item/aiModule/freeform/attack_self(mob/user) + . = ..() + if(.) + return ..() var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return @@ -353,7 +362,10 @@ AI MODULES desc = "A 'freeform' Core AI module: ''" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) -/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob) +/obj/item/aiModule/freeformcore/attack_self(mob/user) + . = ..() + if(.) + return ..() var/newlaw = "" var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) @@ -377,7 +389,10 @@ AI MODULES desc = "A hacked AI law module: ''" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6, TECH_ILLEGAL = 7) -/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob) +/obj/item/aiModule/syndicate/attack_self(mob/user) + . = ..() + if(.) + return ..() var/newlaw = "" var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index c18b8720d73..87db9ae6413 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -103,7 +103,10 @@ return TRUE // Changes which mode it is on. -/obj/item/rcd/attack_self(mob/living/user) +/obj/item/rcd/attack_self(mob/user) + . = ..() + if(.) + return ..() var/list/choices = list( "Airlock" = radial_image_airlock, @@ -360,7 +363,10 @@ /obj/item/rcd/electric/mounted/rig // Old method for swapping modes as there is no way to bring up the radial. -/obj/item/rcd/electric/mounted/rig/attack_self(mob/living/user) +/obj/item/rcd/electric/mounted/rig/attack_self(mob/user) + . = ..() + if(.) + return if(mode_index >= modes.len) // Shouldn't overflow unless someone messes with it in VV poorly but better safe than sorry. mode_index = 1 else diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index ce70c83ad27..efbe021f5c6 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -108,6 +108,9 @@ // return ..() /obj/item/pipe_dispenser/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/pipe_dispenser/ui_assets(mob/user) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index b0dd15c4c23..e72f788111f 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -62,7 +62,10 @@ RSF else glasstype = /obj/item/reagent_containers/food/drinks/metaglass -/obj/item/rsf/attack_self(mob/user as mob) +/obj/item/rsf/attack_self(mob/user) + . = ..() + if(.) + return playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) if (mode == 1) mode = 2 diff --git a/code/game/objects/items/weapons/barrier_tape.dm b/code/game/objects/items/weapons/barrier_tape.dm index bad98b5ec4a..5e8c33f9366 100644 --- a/code/game/objects/items/weapons/barrier_tape.dm +++ b/code/game/objects/items/weapons/barrier_tape.dm @@ -133,11 +133,14 @@ var/list/tape_roll_applications = list() update_icon() return ..() -/obj/item/barrier_tape_roll/attack_hand() +/obj/item/barrier_tape_roll/attack_hand(mob/user, list/params) update_icon() return ..() -/obj/item/barrier_tape_roll/attack_self(mob/user as mob) +/obj/item/barrier_tape_roll/attack_self(mob/user) + . = ..() + if(.) + return if(!start) start = get_turf(src) to_chat(user, "You place the first end of \the [src].") @@ -331,7 +334,7 @@ var/list/tape_roll_applications = list() /obj/item/barrier_tape_segment/attackby(obj/item/W as obj, mob/user as mob) breaktape(user) -/obj/item/barrier_tape_segment/attack_hand(mob/user as mob) +/obj/item/barrier_tape_segment/attack_hand(mob/user, list/params) if (user.a_intent == INTENT_HELP && src.allowed(user)) user.show_viewers("\The [user] lifts \the [src], allowing passage.") for(var/obj/item/barrier_tape_segment/T in gettapeline()) diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm index 12eaeae2671..d902d74c9c4 100644 --- a/code/game/objects/items/weapons/candle.dm +++ b/code/game/objects/items/weapons/candle.dm @@ -61,7 +61,10 @@ var/turf/T = loc T.hotspot_expose(700, 5) -/obj/item/flame/candle/attack_self(mob/user as mob) +/obj/item/flame/candle/attack_self(mob/user) + . = ..() + if(.) + return if(lit) lit = 0 update_icon() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 369a69cc4b9..d196c973116 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -310,7 +310,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM else to_chat(user, "[src] is full.") -/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob) +/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user) + . = ..() + if(.) + return if(lit == 1) if(user.a_intent == INTENT_HARM) user.visible_message("[user] drops and treads on the lit [src], putting it out instantly.") @@ -444,7 +447,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM . = ..() name = "empty [initial(name)]" -/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob) +/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user) + . = ..() + if(.) + return if(lit == 1) if(user.a_intent == INTENT_HARM) user.visible_message("[user] empties the lit [src] on the floor!.") @@ -594,7 +600,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = icon_state base_state = icon_state -/obj/item/flame/lighter/attack_self(mob/living/user) +/obj/item/flame/lighter/attack_self(mob/user) + . = ..() + if(.) + return if(!base_state) base_state = icon_state if(!lit) @@ -609,10 +618,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM user.visible_message("After a few attempts, [user] manages to light the [src].") else to_chat(user, "You burn yourself while lighting the lighter.") + var/mob/living/carbon/human/H = ishuman(user)? user : null if (user.get_held_item_of_index(1) == src) - user.apply_damage(2,BURN,"l_hand") + H?.apply_damage(2,BURN,"l_hand") else - user.apply_damage(2,BURN,"r_hand") + H?.apply_damage(2,BURN,"r_hand") user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.") set_light(2) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index d79e0a7388a..a2f72b9f9f9 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -69,7 +69,10 @@ /* * Bike Horns */ -/obj/item/bikehorn/attack_self(mob/user as mob) +/obj/item/bikehorn/attack_self(mob/user) + . = ..() + if(.) + return if (spam_flag == 0) spam_flag = 1 playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 7c771e57e25..dccb4fdb702 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -56,7 +56,10 @@ colour = pick("red","orange","yellow","jade","cyan","purple","pink","maroon","black","white") name = "[colour] lipstick" -/obj/item/lipstick/attack_self(mob/user as mob) +/obj/item/lipstick/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You twist \the [src] [open ? "closed" : "open"].") open = !open if(open) @@ -99,7 +102,10 @@ icon = 'icons/obj/items.dmi' icon_state = "purplecomb" -/obj/item/haircomb/attack_self(mob/living/user) +/obj/item/haircomb/attack_self(mob/user) + . = ..() + if(.) + return var/text = "person" if(ishuman(user)) var/mob/living/carbon/human/U = user @@ -124,7 +130,10 @@ icon_state = "trinketbox" var/list/ui_users = list() -/obj/item/makeover/attack_self(mob/living/carbon/user as mob) +/obj/item/makeover/attack_self(mob/user) + . = ..() + if(.) + return if(ishuman(user)) to_chat(user, "You flip open \the [src] and begin to adjust your appearance.") var/datum/nano_module/appearance_changer/AC = ui_users[user] diff --git a/code/game/objects/items/weapons/duct_tape.dm b/code/game/objects/items/weapons/duct_tape.dm index 8f17218fac9..e45c97503d4 100644 --- a/code/game/objects/items/weapons/duct_tape.dm +++ b/code/game/objects/items/weapons/duct_tape.dm @@ -130,6 +130,9 @@ return ..() /obj/item/duct_tape_roll/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You remove a piece of tape from the roll.") var/obj/item/duct_tape_piece/tape = new(get_turf(src)) user.put_in_hands(tape) @@ -178,6 +181,9 @@ copy_overlays(W) /obj/item/duct_tape_piece/attack_self(mob/user) + . = ..() + if(.) + return if(!stuck) return @@ -196,7 +202,7 @@ qdel(I) to_chat(user, "You place \the [I] back into \the [src].") -/obj/item/duct_tape_piece/attack_hand(mob/living/L) +/obj/item/duct_tape_piece/attack_hand(mob/user, list/params) anchored = FALSE return ..() // Pick it up now that it's unanchored. diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 603739e4ba5..24631abbbcf 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -38,7 +38,10 @@ else ..() -/obj/item/plastique/attack_self(mob/user as mob) +/obj/item/plastique/attack_self(mob/user) + . = ..() + if(.) + return var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num if(user.get_active_held_item() == src) newtime = clamp(newtime, 10, 60000) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 35a5b4c030c..0089701bd68 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -49,7 +49,10 @@ . = ..() . += "[icon2html(thing = src, target = user)] [src.name] contains [src.reagents.total_volume] units of water left!" -/obj/item/extinguisher/attack_self(mob/user as mob) +/obj/item/extinguisher/attack_self(mob/user) + . = ..() + if(.) + return safety = !safety icon_state = "[sprite_name][!safety]" desc = "The safety is [safety ? "on" : "off"]." diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index ccc1cef0e0f..b8f8e7ea816 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -123,7 +123,10 @@ return -/obj/item/flamethrower/attack_self(mob/user as mob) +/obj/item/flamethrower/attack_self(mob/user) + . = ..() + if(.) + return if(user.stat || user.restrained() || user.lying) return user.set_machine(src) if(!ptank) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index b87f5d02558..bd908e95b44 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -25,7 +25,10 @@ else icon_state = "gift[pick(1, 2, 3)]" -/obj/item/gift/attack_self(mob/user as mob) +/obj/item/gift/attack_self(mob/user) + . = ..() + if(.) + return user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(src.gift) user.put_in_active_hand(gift) @@ -56,7 +59,10 @@ qdel(src) -/obj/item/a_gift/attack_self(mob/M as mob) +/obj/item/a_gift/attack_self(mob/user) + . = ..() + if(.) + return var/gift_type = pick( /obj/item/storage/wallet, /obj/item/storage/photo_album, @@ -103,10 +109,10 @@ if(!ispath(gift_type,/obj/item)) return - M.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) - var/obj/item/I = new gift_type(M) - M.put_in_hands(I) - I.add_fingerprint(M) + user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) + var/obj/item/I = new gift_type(user) + user.put_in_hands(I) + I.add_fingerprint(user) qdel(src) /obj/item/b_gift @@ -122,7 +128,10 @@ pixel_x = rand(-10,10) pixel_y = rand(-10,10) -/obj/item/gift/attack_self(mob/user as mob) +/obj/item/gift/attack_self(mob/user) + . = ..() + if(.) + return user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) if(gift) user.put_in_active_hand(gift) @@ -134,7 +143,10 @@ /obj/item/b_gift/legacy_ex_act() qdel(src) -/obj/item/b_gift/attack_self(mob/M as mob) +/obj/item/b_gift/attack_self(mob/user) + . = ..() + if(.) + return var/gift_type = pick( /obj/item/reagent_containers/hard_candy/lollipop, /obj/item/reagent_containers/hard_candy/lollipop/bicard, @@ -186,10 +198,10 @@ if(!ispath(gift_type,/obj/item)) return - var/obj/item/I = new gift_type(M) - M.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) - M.put_in_hands(I) - I.add_fingerprint(M) + var/obj/item/I = new gift_type(user) + user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) + user.put_in_hands(I) + I.add_fingerprint(user) qdel(src) /* diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index b89c1e56f9b..b193a18e2c7 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -25,7 +25,10 @@ QDEL_LIST_NULL(beakers) return ..() -/obj/item/grenade/chem_grenade/attack_self(mob/user as mob) +/obj/item/grenade/chem_grenade/attack_self(mob/user) + . = ..() + if(.) + return if(!stage || stage==1) if(detonator) // detonator.loc=src.loc diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index cb80b50667d..6c238721f5f 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -53,7 +53,10 @@ . += "The [src] is set for instant detonation." -/obj/item/grenade/attack_self(mob/user as mob) +/obj/item/grenade/attack_self(mob/user) + . = ..() + if(.) + return if(!active) if(clown_check(user)) to_chat(user, "You prime \the [name]! [det_time/10] seconds!") @@ -108,7 +111,7 @@ ..() return -/obj/item/grenade/attack_hand() +/obj/item/grenade/attack_hand(mob/user, list/params) walk(src, null, null) ..() return diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 7378f6e44b9..0ce4b552f41 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -14,7 +14,10 @@ w_class = ITEMSIZE_TINY var/list/item_quants = list() -/obj/item/seedbag/attack_self(mob/user as mob) +/obj/item/seedbag/attack_self(mob/user) + . = ..() + if(.) + return user.machine = src interact(user) diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index dbd2c7bea64..fdf177025f0 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -24,7 +24,7 @@ ..() add_implants() -/obj/machinery/implantchair/attack_hand(mob/user as mob) +/obj/machinery/implantchair/attack_hand(mob/user, list/params) user.set_machine(src) var/health_text = "" if(src.occupant) diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 507c12057a7..717d2dd3467 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -45,4 +45,7 @@ ..() /obj/item/implant/integrated_circuit/attack_self(mob/user) + . = ..() + if(.) + return IC.attack_self(user) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 3f5054c6cfd..63e2431d592 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -10,7 +10,10 @@ var/obj/item/implant/imp = null var/active = 1 -/obj/item/implanter/attack_self(var/mob/user) +/obj/item/implanter/attack_self(mob/user) + . = ..() + if(.) + return active = !active to_chat(user, "You [active ? "" : "de"]activate \the [src].") update() diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index b9770bfaf4a..ef48e75c3aa 100644 --- a/code/game/objects/items/weapons/implants/implantpad.dm +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -21,7 +21,7 @@ return -/obj/item/implantpad/attack_hand(mob/living/user as mob) +/obj/item/implantpad/attack_hand(mob/user, list/params) if ((src.case && user.is_holding(src))) user.put_in_active_hand(case) @@ -48,7 +48,10 @@ return -/obj/item/implantpad/attack_self(mob/user as mob) +/obj/item/implantpad/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) var/dat = "Implant Mini-Computer:
" if (src.case) diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index 5db37dd2eb9..81fe6755c21 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -58,7 +58,10 @@ on = 0 update_icon() -/obj/item/chainsaw/attack_self(mob/user as mob) +/obj/item/chainsaw/attack_self(mob/user) + . = ..() + if(.) + return if(!on) turnOn(user) else diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index 9ceca9e05a7..46d4f71a240 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -58,6 +58,9 @@ ..() /obj/item/material/gravemarker/attack_self(mob/user) + . = ..() + if(.) + return src.add_fingerprint(user) if(!isturf(user.loc)) diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index 3023437aead..c86441fc091 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -56,6 +56,9 @@ thrown_force_divisor = 0.2 // 4 when thrown with weight 20 (steel) /obj/item/material/butterfly/attack_self(mob/user) + . = ..() + if(.) + return active = !active if(active) to_chat(user, "You flip out \the [src].") diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index 4ccd2265609..159a045266b 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -100,7 +100,10 @@ w_class = ITEMSIZE_SMALL attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist. -/obj/item/material/snow/snowball/attack_self(mob/user as mob) +/obj/item/material/snow/snowball/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HARM) visible_message("[user] has smashed the snowball in their hand!", "You smash the snowball in your hand.") var/atom/S = new /obj/item/stack/material/snow(user.loc) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 2dd3f573063..7f7a628b98c 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -75,7 +75,10 @@ if(!bcell) . += "The blade does not have a power source installed." -/obj/item/melee/energy/attack_self(mob/living/user as mob) +/obj/item/melee/energy/attack_self(mob/user) + . = ..() + if(.) + return if(use_cell) if((!bcell || bcell.charge < hitcost) && !active) to_chat(user, "\The [src] does not seem to have power.") @@ -86,7 +89,8 @@ if ((MUTATION_CLUMSY in user.mutations) && prob(50)) user.visible_message("\The [user] accidentally cuts [TU.himself] with \the [src].",\ "You accidentally cut yourself with \the [src].") - user.take_organ_damage(5,5) + var/mob/living/carbon/human/H = ishuman(user)? user : null + H.take_organ_damage(5,5) deactivate(user) else activate(user) @@ -514,7 +518,10 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/melee/energy/blade/attack_self(mob/user as mob) +/obj/item/melee/energy/blade/attack_self(mob/user) + . = ..() + if(.) + return qdel(src) /obj/item/melee/energy/blade/dropped(mob/user, atom_flags, atom/newLoc) @@ -636,7 +643,10 @@ /obj/item/melee/energy/hfmachete/update_icon() icon_state = "[base_state][active]" -/obj/item/melee/energy/hfmachete/attack_self(mob/living/user) +/obj/item/melee/energy/hfmachete/attack_self(mob/user) + . = ..() + if(.) + return toggleActive(user) add_fingerprint(user) diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 39067034ab4..fd580541285 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -48,7 +48,10 @@ . = ..() update_icon() -/obj/item/melee/umbrella/attack_self() +/obj/item/melee/umbrella/attack_self(mob/user) + . = ..() + if(.) + return src.toggle_umbrella() /obj/item/melee/umbrella/proc/toggle_umbrella() @@ -268,6 +271,9 @@ tm.apply_damage(SA_bonus_damage) // fuck em /obj/item/melee/ashlander/elder/attack_self(mob/user) + . = ..() + if(.) + return if(!active) activate() else if(active) @@ -350,6 +356,9 @@ /obj/item/melee/twohanded/attack_self(mob/user) . = ..() + if(.) + return + . = ..() if(!wielded) wielded = 1 else if(wielded) @@ -482,6 +491,9 @@ location.hotspot_expose(700, 50, 1) /obj/item/melee/thermalcutter/attack_self(mob/user) + . = ..() + if(.) + return activate() //Returns the amount of fuel in the welder diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index bfdf4e0df8f..d1684c42244 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -26,7 +26,10 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop) create_reagents(30) -/obj/item/mop/attack_self(var/mob/user) +/obj/item/mop/attack_self(mob/user) + . = ..() + if(.) + return .=..() if (mopmode == MOPMODE_TILE) mopmode = MOPMODE_SWEEP diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index 59794a14667..8d855866eb1 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -52,7 +52,10 @@ STOP_PROCESSING(SSobj, src) . = ..() -/obj/item/mop_deploy/attack_self(mob/user as mob) +/obj/item/mop_deploy/attack_self(mob/user) + . = ..() + if(.) + return qdel(src) /obj/item/mop_deploy/dropped(mob/user, flags, atom/newLoc) diff --git a/code/game/objects/items/weapons/nullrod.dm b/code/game/objects/items/weapons/nullrod.dm index ed642cc3f6a..6a615b2e55d 100644 --- a/code/game/objects/items/weapons/nullrod.dm +++ b/code/game/objects/items/weapons/nullrod.dm @@ -41,6 +41,9 @@ tm.apply_damage(SA_bonus_damage) // fuck em /obj/item/nullrod/attack_self(mob/user) + . = ..() + if(.) + return if(user && (user.mind.isholy) && !reskinned) reskin_holy_weapon(user) @@ -353,7 +356,10 @@ hitsound = 'sound/weapons/bite.ogg' var/used_blessing = FALSE -/obj/item/nullrod/carp/attack_self(mob/living/user) +/obj/item/nullrod/carp/attack_self(mob/user) + . = ..() + if(.) + return if(used_blessing) else if(user.mind && (user.mind.isholy)) to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.") diff --git a/code/game/objects/items/weapons/other.dm b/code/game/objects/items/weapons/other.dm index eff11c54c35..a1548fcb157 100644 --- a/code/game/objects/items/weapons/other.dm +++ b/code/game/objects/items/weapons/other.dm @@ -85,6 +85,9 @@ return ..() /obj/item/bikehorn/golden/attack_self(mob/user) + . = ..() + if(.) + return if(flip_cooldown < world.time) flip_mobs() ..() @@ -136,6 +139,9 @@ temp_blade.attack_self() /obj/item/cane/concealed/attack_self(mob/user) + . = ..() + if(.) + return var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()] if(concealed_blade) user.visible_message( @@ -149,8 +155,6 @@ user.put_in_hands(concealed_blade) user.put_in_hands(src) concealed_blade = null - else - ..() /obj/item/cane/concealed/attackby(obj/item/material/butterfly/W, mob/user) if(!src.concealed_blade && istype(W)) @@ -203,7 +207,10 @@ force = 3 var/on = 0 -/obj/item/cane/whitecane/collapsible/attack_self(mob/user as mob) +/obj/item/cane/whitecane/collapsible/attack_self(mob/user) + . = ..() + if(.) + return on = !on if(on) user.visible_message( diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 8fcbc122833..244c885ee6b 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -10,7 +10,10 @@ throw_range = 20 origin_tech = list(TECH_BLUESPACE = 4) -/obj/item/teleportation_scroll/attack_self(mob/user as mob) +/obj/item/teleportation_scroll/attack_self(mob/user) + . = ..() + if(.) + return if((user.mind && !wizards.is_antagonist(user.mind))) to_chat(usr, "You stare at the scroll but cannot make sense of the markings!") return diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 07c8197d40f..72992c19c1d 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -124,7 +124,10 @@ return ..() return embedded_flash.attack_mob(arglist(args)) -/obj/item/shield/riot/flash/attack_self(mob/living/carbon/user) +/obj/item/shield/riot/flash/attack_self(mob/user) + . = ..() + if(.) + return . = embedded_flash.attack_self(user) update_icon() @@ -325,10 +328,14 @@ return (base_block_chance - round(damage / 3)) //block bullets and beams using the old block chance return base_block_chance -/obj/item/shield/energy/attack_self(mob/living/user as mob) +/obj/item/shield/energy/attack_self(mob/user) + . = ..() + if(.) + return if ((MUTATION_CLUMSY in user.mutations) && prob(50)) to_chat(user, "You beat yourself in the head with [src].") - user.take_organ_damage(5) + var/mob/living/carbon/human/H = ishuman(user)? user : null + H?.take_organ_damage(5) active = !active if (active) force = 10 @@ -402,7 +409,10 @@ else return 0 */ -/obj/item/shield/riot/tele/attack_self(mob/living/user) +/obj/item/shield/riot/tele/attack_self(mob/user) + . = ..() + if(.) + return active = !active icon_state = "teleriot[active]" playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index cf217aa6b8c..455019ec849 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -94,7 +94,7 @@ else to_chat(user, "This cell is not fitted for [src].") -/obj/item/melee/baton/attack_hand(mob/user as mob) +/obj/item/melee/baton/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(bcell && !integrated_cell) bcell.update_icon() @@ -109,6 +109,9 @@ return ..() /obj/item/melee/baton/attack_self(mob/user) + . = ..() + if(.) + return if(use_external_power) //try to find our power cell var/mob/living/silicon/robot/R = loc diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 8bf3a8753b6..d1225cb5f10 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -56,7 +56,10 @@ drop_sound = 'sound/items/drop/crowbar.ogg' pickup_sound = 'sound/items/pickup/crowbar.ogg' -/obj/item/melee/telebaton/attack_self(mob/user as mob) +/obj/item/melee/telebaton/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) on = 1 user.visible_message("With a flick of their wrist, [user] extends their telescopic baton.",\ @@ -189,7 +192,10 @@ force = 0 hitsound = "sound/items/bikehorn.ogg" -/obj/item/melee/stool/faiza/attack_self(mob/user as mob) +/obj/item/melee/stool/faiza/attack_self(mob/user) + . = ..() + if(.) + return if(on == 0) user.visible_message("In a quick motion, [user] extends their collapsible stool.") diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 7ceb7fa83f5..461a3c4b78b 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -78,7 +78,10 @@ var/detonator_mode = 0 var/obj/item/syndie/c4explosive/bomb -/obj/item/flame/lighter/zippo/c4detonator/attack_self(mob/user as mob) +/obj/item/flame/lighter/zippo/c4detonator/attack_self(mob/user) + . = ..() + if(.) + return if(!detonator_mode) ..() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index ac3a72f2455..0359ae6cb39 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -209,7 +209,10 @@ var/list/global/tank_gauge_cache = list() -/obj/item/tank/attack_self(mob/user as mob) +/obj/item/tank/attack_self(mob/user) + . = ..() + if(.) + return add_fingerprint(user) if (!(src.air_contents)) return diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index fa40737bc56..8271dec01f7 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -23,7 +23,10 @@ origin_tech = list(TECH_MAGNET = 1) matter = list(MAT_STEEL = 400) -/obj/item/locator/attack_self(mob/user as mob) +/obj/item/locator/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) var/dat if (src.temp) @@ -130,7 +133,10 @@ Frequency: matter = list(MAT_STEEL = 10000) preserve_item = 1 -/obj/item/hand_tele/attack_self(mob/user as mob) +/obj/item/hand_tele/attack_self(mob/user) + . = ..() + if(.) + return var/turf/current_location = get_turf(user)//What turf is the user on? if(!current_location || (current_location.z in GLOB.using_map.admin_levels) || current_location.block_tele)//If turf was not found or they're on z level 2 or >7 which does not currently exist. to_chat(user, "\The [src] is malfunctioning.") diff --git a/code/game/objects/items/weapons/towels.dm b/code/game/objects/items/weapons/towels.dm index 79eca5bb98f..fa6e27b5820 100644 --- a/code/game/objects/items/weapons/towels.dm +++ b/code/game/objects/items/weapons/towels.dm @@ -22,13 +22,19 @@ if(SLOT_ID_BELT) sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/clothing/species/teshari/belt.dmi') -/obj/item/towel/attack_self(mob/living/user as mob) +/obj/item/towel/attack_self(mob/user) + . = ..() + if(.) + return + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user user.visible_message(text("[] uses [] to towel themselves off.", user, src)) playsound(user, 'sound/weapons/towelwipe.ogg', 25, 1) - if(user.fire_stacks > 0) - user.fire_stacks = (max(0, user.fire_stacks - 1.5)) - else if(user.fire_stacks < 0) - user.fire_stacks = (min(0, user.fire_stacks + 1.5)) + if(H.fire_stacks > 0) + H.fire_stacks = (max(0, H.fire_stacks - 1.5)) + else if(H.fire_stacks < 0) + H.fire_stacks = (min(0, H.fire_stacks + 1.5)) /obj/item/towel/random/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 5d1762bd592..008e0a2bbdf 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -39,7 +39,10 @@ user.visible_message("[user] is putting the [src.name] on [T.his] head! It looks like [T.hes] trying to commit suicide.") return (BRUTELOSS) -/obj/item/beartrap/attack_self(mob/user as mob) +/obj/item/beartrap/attack_self(mob/user) + . = ..() + if(.) + return ..() if(!deployed) user.visible_message( @@ -82,7 +85,7 @@ if(!has_buckled_mobs()) anchored = FALSE -/obj/item/beartrap/attack_hand(mob/user) +/obj/item/beartrap/attack_hand(mob/user, list/params) // check unbuckle first if(click_unbuckle_interaction(user)) return CLICKCHAIN_DO_NOT_PROPAGATE diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index 52496c4eed7..c3524ed7fed 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -84,7 +84,7 @@ to_chat(user,"The tank scoffs at your insolence. It only provides services to welders.") return -/obj/item/weldpack/attack_hand(mob/user as mob) +/obj/item/weldpack/attack_hand(mob/user, list/params) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/wearer = user if(wearer.back == src) diff --git a/code/game/objects/misc.dm b/code/game/objects/misc.dm index 2feb76d80e9..d63dc3978f6 100644 --- a/code/game/objects/misc.dm +++ b/code/game/objects/misc.dm @@ -7,7 +7,7 @@ /obj/structure/signpost/attackby(obj/item/W, mob/user) return attack_hand(user) -/obj/structure/signpost/attack_hand(mob/user) +/obj/structure/signpost/attack_hand(mob/user, list/params) switch(tgui_alert(user, "Do you want to go to SS13?", "Travel", list("Yes", "No"))) if("Yes") user.forceMove(SSjob.get_latejoin_spawnpoint(faction = JOB_FACTION_STATION)) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index c70ec4c321f..3e8cd9bf12a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -209,7 +209,7 @@ /obj/proc/plunger_act(obj/item/plunger/P, mob/living/user, reinforced) return -/obj/attack_hand(mob/living/user) +/obj/attack_hand(mob/user, list/params) if(Adjacent(user)) add_fingerprint(user) ..() diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index fa274f81bc7..b9908fb8d6b 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -35,7 +35,7 @@ return ..() -/obj/structure/attack_hand(mob/user) +/obj/structure/attack_hand(mob/user, list/params) if(breakable) if(MUTATION_HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) diff --git a/code/game/objects/structures/ashlander.dm b/code/game/objects/structures/ashlander.dm index d9522615914..c2f733fc757 100644 --- a/code/game/objects/structures/ashlander.dm +++ b/code/game/objects/structures/ashlander.dm @@ -249,7 +249,7 @@ src.updateUsrDialog() return 0 -/obj/structure/ashlander/calcinator/attack_hand(mob/user as mob) +/obj/structure/ashlander/calcinator/attack_hand(mob/user, list/params) interact(user) /obj/structure/ashlander/calcinator/AltClick(mob/user) @@ -337,7 +337,7 @@ . = ..() set_light(3, 2, "#9463bb") -/obj/structure/ashlander/statue/attack_hand(mob/user) +/obj/structure/ashlander/statue/attack_hand(mob/user, list/params) var/choice = tgui_alert(user, "Do you wish to pray to the statue?", "Interact With the Statue", list("Yes", "No")) if(choice != "Yes") return diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 32f4c4b0387..a2809f709cf 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -20,6 +20,9 @@ LINEN BINS pickup_sound = 'sound/items/pickup/backpack.ogg' /obj/item/bedsheet/attack_self(mob/user) + . = ..() + if(.) + return if(!user.drop_item_to_ground(src)) return if(layer == initial(layer)) @@ -213,7 +216,7 @@ LINEN BINS hidden = I to_chat(user, "You hide [I] among the sheets.") -/obj/structure/bedsheetbin/attack_hand(mob/user as mob) +/obj/structure/bedsheetbin/attack_hand(mob/user, list/params) if(amount >= 1) amount-- diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index 6232e595ee3..7e7348d8d3c 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -81,7 +81,7 @@ else return ..() -/obj/structure/bonfire/attack_hand(mob/user) +/obj/structure/bonfire/attack_hand(mob/user, list/params) if(has_buckled_mobs()) return ..() @@ -288,7 +288,7 @@ else return ..() -/obj/structure/fireplace/attack_hand(mob/user) +/obj/structure/fireplace/attack_hand(mob/user, list/params) if(get_fuel_amount()) remove_fuel(user) diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index e960f154cd4..8d0f6a51ca7 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -143,7 +143,7 @@ . = ..() activate() -/obj/effect/catwalk_plated/attack_hand() +/obj/effect/catwalk_plated/attack_hand(mob/user, list/params) attack_generic() /obj/effect/catwalk_plated/attack_ghost() diff --git a/code/game/objects/structures/charge_pylon.dm b/code/game/objects/structures/charge_pylon.dm index ff239b23892..6a86d5b85f8 100644 --- a/code/game/objects/structures/charge_pylon.dm +++ b/code/game/objects/structures/charge_pylon.dm @@ -12,7 +12,7 @@ if(Adjacent(user)) attack_hand(user) -/obj/structure/adherent_pylon/attack_hand(var/mob/living/user) +/obj/structure/adherent_pylon/attack_hand(mob/user, list/params) charge_user(user) /obj/structure/adherent_pylon/proc/charge_user(var/mob/living/user) diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm index e02d1ab2c70..0b2e643c2f9 100644 --- a/code/game/objects/structures/coathanger.dm +++ b/code/game/objects/structures/coathanger.dm @@ -6,7 +6,7 @@ var/obj/item/clothing/suit/coat var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_trench) -/obj/structure/coatrack/attack_hand(mob/user as mob) +/obj/structure/coatrack/attack_hand(mob/user, list/params) user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]") if(!user.put_in_active_hand(coat)) coat.loc = get_turf(user) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 89f0a32d2c9..7d94049c9d6 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -363,7 +363,7 @@ if(!src.open()) to_chat(user, "It won't budge!") -/obj/structure/closet/attack_hand(mob/user as mob) +/obj/structure/closet/attack_hand(mob/user, list/params) src.add_fingerprint(user) src.toggle(user) diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index d8504a584c9..86aa5b615b3 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -30,7 +30,7 @@ max_closets = 1 opened = 1 -/obj/structure/closet/grave/attack_hand(mob/user as mob) +/obj/structure/closet/grave/attack_hand(mob/user, list/params) if(opened) visible_message("[user] starts to climb into \the [src.name].", \ "You start to lower yourself into \the [src.name].") diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index 4152336a47b..7828532b0c1 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -107,7 +107,7 @@ spawn(10) update_icon() -/obj/structure/closet/fireaxecabinet/attack_hand(mob/user as mob) +/obj/structure/closet/fireaxecabinet/attack_hand(mob/user, list/params) var/hasaxe = 0 if(fireaxe) hasaxe = 1 diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index b14dbf504cd..6527e2b06b2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -118,7 +118,7 @@ visible_message("\The [src] sparks and breaks open!", "You hear a faint electrical spark.") return 1 -/obj/structure/closet/secure_closet/attack_hand(mob/user as mob) +/obj/structure/closet/secure_closet/attack_hand(mob/user, list/params) src.add_fingerprint(user) if(src.locked) src.togglelock(user) diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index f7a6cb4ea25..3ac2d338936 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -110,7 +110,7 @@ /obj/structure/closet/statue/relaymove() return -/obj/structure/closet/statue/attack_hand() +/obj/structure/closet/statue/attack_hand(mob/user, list/params) return /obj/structure/closet/statue/verb_toggleopen() diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index 479c6a4dd0e..77fe13df639 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -27,7 +27,7 @@ /obj/structure/closet/walllocker/emerglocker/attackby(obj/item/W as obj, mob/user as mob) return -/obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob) +/obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user, list/params) if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) if(!amount) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 51a73bf0584..7142ccc54a2 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -193,7 +193,7 @@ else to_chat(usr, "This mob type can't use this verb.") -/obj/structure/closet/crate/secure/attack_hand(mob/user as mob) +/obj/structure/closet/crate/secure/attack_hand(mob/user, list/params) src.add_fingerprint(user) if(locked) src.togglelock(user) diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 3ff5b26a3b4..a11f4c4b6b6 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -61,7 +61,7 @@ */ -/obj/structure/largecrate/attack_hand(mob/user as mob) +/obj/structure/largecrate/attack_hand(mob/user, list/params) to_chat(user, "You need a crowbar to pry this open!") return diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm index 5c0dd93c591..3e243f9c1e5 100644 --- a/code/game/objects/structures/crates_lockers/vehiclecage.dm +++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm @@ -23,7 +23,7 @@ load_vehicle(I) update_icon() -/obj/structure/vehiclecage/attack_hand(mob/user as mob) +/obj/structure/vehiclecage/attack_hand(mob/user, list/params) to_chat(user, "You need a wrench to take this apart!") return diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index 572fa887af4..e47d9cd2b8e 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -20,7 +20,7 @@ else ..(P, def_zone) -/obj/structure/curtain/attack_hand(mob/user) +/obj/structure/curtain/attack_hand(mob/user, list/params) playsound(get_turf(loc), "rustle", 15, 1, -5) toggle() ..() diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index ee5262f9c38..1491b7a4259 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -63,7 +63,7 @@ ..() return -/obj/structure/displaycase/attack_hand(mob/user as mob) +/obj/structure/displaycase/attack_hand(mob/user, list/params) if (src.destroyed && src.occupied) new /obj/item/gun/energy/captain( src.loc ) to_chat(user, "You deactivate the hover field built into the case.") diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index f3db596537c..c1897ea9bca 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -45,13 +45,13 @@ update_icon() -/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user) +/obj/structure/extinguisher_cabinet/attack_hand(mob/user, list/params) if(isrobot(user)) return if (ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] - if (user.hand) + if (H.hand) temp = H.organs_by_name["l_hand"] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 838f837f11e..009c4df4b9a 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -139,7 +139,7 @@ desc = "It looks like it has a strong padlock attached." locked = TRUE -/obj/structure/fence/door/attack_hand(mob/user) +/obj/structure/fence/door/attack_hand(mob/user, list/params) if(can_open(user)) toggle(user) else diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 4b50af60a29..d6724055711 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -92,7 +92,7 @@ toggle_close_open() -/obj/structure/fireaxecabinet/attack_hand(mob/user as mob) +/obj/structure/fireaxecabinet/attack_hand(mob/user, list/params) //var/hasaxe = 0 //Fuck this. Fuck everything about this. Who wrote this. Why. //if(fireaxe) // hasaxe = 1 diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm index d80604b6f2b..355d2f9f1db 100644 --- a/code/game/objects/structures/fitness.dm +++ b/code/game/objects/structures/fitness.dm @@ -10,7 +10,7 @@ density = 1 var/list/hit_message = list("hit", "punch", "kick", "robust") -/obj/structure/fitness/punchingbag/attack_hand(var/mob/living/carbon/human/user) +/obj/structure/fitness/punchingbag/attack_hand(mob/user, list/params) if(!istype(user)) ..() return @@ -38,7 +38,7 @@ weight = ((weight) % qualifiers.len) + 1 to_chat(user, "You set the machine's weight level to [weight].") -/obj/structure/fitness/weightlifter/attack_hand(var/mob/living/carbon/human/user) +/obj/structure/fitness/weightlifter/attack_hand(mob/user, list/params) if(!istype(user)) return if(user.loc != src.loc) diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 6ebe193c6dd..ce0fda86184 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -394,7 +394,7 @@ /obj/structure/flora/sif icon = 'icons/obj/flora/sifflora.dmi' -/obj/structure/flora/sif/attack_hand(mob/user) +/obj/structure/flora/sif/attack_hand(mob/user, list/params) if (user.a_intent == INTENT_HARM) if(do_after(user, 5 SECONDS)) user.visible_message("\The [user] digs up \the [src.name].", "You dig up \the [src.name].") @@ -515,7 +515,7 @@ var/gift_type = /obj/item/b_gift var/list/ckeys_that_took = list() -/obj/structure/flora/pumpkin/pumpkin_patch/presents/attack_hand(mob/living/user) +/obj/structure/flora/pumpkin/pumpkin_patch/presents/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm index 43b6bd1ce49..6fe2eecc55b 100644 --- a/code/game/objects/structures/flora/trees.dm +++ b/code/game/objects/structures/flora/trees.dm @@ -170,7 +170,7 @@ /obj/structure/flora/tree/pine/xmas/presents/choose_icon_state() return "pinepresents" -/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user) +/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm index 1fa6abcc77f..ebfc4daa2af 100644 --- a/code/game/objects/structures/ghost_pods/ghost_pods.dm +++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm @@ -43,7 +43,7 @@ /obj/structure/ghost_pod/manual var/confirm_before_open = FALSE // Recommended to be TRUE if the pod contains a surprise. -/obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user) +/obj/structure/ghost_pod/manual/attack_hand(mob/user, list/params) if(!used) if(confirm_before_open) if(alert(user, "Are you sure you want to touch \the [src]?", "Confirm", "No", "Yes") == "No") diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 5a3d8ac3188..183009d3366 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -293,7 +293,7 @@ girder_material.place_dismantled_product(get_turf(src), 2) qdel(src) -/obj/structure/girder/attack_hand(mob/user as mob) +/obj/structure/girder/attack_hand(mob/user, list/params) if (MUTATION_HULK in user.mutations) visible_message("[user] smashes [src] apart!") dismantle() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c6e80db897a..a07ba2865cf 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -31,7 +31,7 @@ /obj/structure/grille/Bumped(atom/user) if(ismob(user)) shock(user, 70) -/obj/structure/grille/attack_hand(mob/user as mob) +/obj/structure/grille/attack_hand(mob/user, list/params) user.setClickCooldown(user.get_attack_speed()) playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) diff --git a/code/game/objects/structures/holoplant.dm b/code/game/objects/structures/holoplant.dm index b89b51d35a5..d239087db65 100644 --- a/code/game/objects/structures/holoplant.dm +++ b/code/game/objects/structures/holoplant.dm @@ -21,7 +21,7 @@ . = ..() activate() -/obj/machinery/holoplant/attack_hand(var/mob/living/user) +/obj/machinery/holoplant/attack_hand(mob/user, list/params) if(!istype(user) || interference) return diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 7119a366857..374d6f388f8 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -24,7 +24,7 @@ projector = null return ..() -/obj/structure/holosign/attack_hand(mob/living/user) +/obj/structure/holosign/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index ec51f830796..709c63eb032 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -7,6 +7,9 @@ var/deploy_path = /obj/structure/inflatable /obj/item/inflatable/attack_self(mob/user) + . = ..() + if(.) + return inflate(user,user.loc) /obj/item/inflatable/afterattack(var/atom/A, var/mob/user) @@ -69,7 +72,7 @@ /obj/structure/inflatable/blob_act() puncture() -/obj/structure/inflatable/attack_hand(mob/user as mob) +/obj/structure/inflatable/attack_hand(mob/user, list/params) add_fingerprint(user) return @@ -172,7 +175,7 @@ if(get_dist(user,src) <= 1) //not remotely though return TryToSwitchState(user) -/obj/structure/inflatable/door/attack_hand(mob/user as mob) +/obj/structure/inflatable/door/attack_hand(mob/user, list/params) return TryToSwitchState(user) /obj/structure/inflatable/door/CanAllowThrough(atom/movable/mover, turf/target) @@ -250,6 +253,9 @@ icon_state = "folded_wall_torn" /obj/item/inflatable/torn/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "The inflatable wall is too torn to be inflated!") add_fingerprint(user) @@ -260,6 +266,9 @@ icon_state = "folded_door_torn" /obj/item/inflatable/door/torn/attack_self(mob/user) + . = ..() + if(.) + return 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 26546ea798b..fe08d81c02b 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -87,7 +87,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) mybag.attackby(I, user) -/obj/structure/janitorialcart/attack_hand(mob/user) +/obj/structure/janitorialcart/attack_hand(mob/user, list/params) nano_ui_interact(user) return @@ -208,7 +208,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) to_chat(user, "You hook the trashbag onto the [callme].") mybag = I -/obj/structure/bed/chair/janicart/attack_hand(mob/user) +/obj/structure/bed/chair/janicart/attack_hand(mob/user, list/params) if(mybag) user.grab_item_from_interacted_with(mybag, src) mybag = null diff --git a/code/game/objects/structures/kitchen_foodcart.dm b/code/game/objects/structures/kitchen_foodcart.dm index fae7754267b..a059777a286 100644 --- a/code/game/objects/structures/kitchen_foodcart.dm +++ b/code/game/objects/structures/kitchen_foodcart.dm @@ -22,7 +22,7 @@ return return ..() -/obj/structure/foodcart/attack_hand(var/mob/user as mob) +/obj/structure/foodcart/attack_hand(mob/user, list/params) if(contents.len) var/obj/item/reagent_containers/food/choice = input("What would you like to grab from the cart?") as null|obj in contents if(choice) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 3a050bad952..ecc3dffbb52 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -50,7 +50,7 @@ meat = 5 return 1 -/obj/structure/kitchenspike/attack_hand(mob/user as mob) +/obj/structure/kitchenspike/attack_hand(mob/user, list/params) if(..() || !occupied) return meat-- diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index 281d23aacd7..a974fd96190 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -42,7 +42,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh var/list/rare_loot = list() // Rare is powerful, or somewhat unique items. var/list/very_rare_loot = list()// Very Rare really powerful, or at least unique items. -/obj/structure/loot_pile/attack_hand(mob/user) +/obj/structure/loot_pile/attack_hand(mob/user, list/params) //Human mob if(isliving(user)) var/mob/living/L = user diff --git a/code/game/objects/structures/medical_stand_vr.dm b/code/game/objects/structures/medical_stand_vr.dm index 7c0248536b3..8e7d87d4180 100644 --- a/code/game/objects/structures/medical_stand_vr.dm +++ b/code/game/objects/structures/medical_stand_vr.dm @@ -164,7 +164,7 @@ update_icon() -/obj/structure/medical_stand/attack_hand(mob/user as mob) +/obj/structure/medical_stand/attack_hand(mob/user, list/params) var/list/available_options = list() if (tank) available_options += "Toggle valve" diff --git a/code/game/objects/structures/mineral_bath.dm b/code/game/objects/structures/mineral_bath.dm index 5669ea270db..d144f338c42 100644 --- a/code/game/objects/structures/mineral_bath.dm +++ b/code/game/objects/structures/mineral_bath.dm @@ -66,7 +66,7 @@ START_PROCESSING(SSobj, src) return TRUE -/obj/structure/adherent_bath/attack_hand(var/mob/user) +/obj/structure/adherent_bath/attack_hand(mob/user, list/params) eject_occupant() /obj/structure/adherent_bath/proc/eject_occupant() diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 08f3cda3c2c..4dee12fca20 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -18,7 +18,7 @@ pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28) pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0 -/obj/structure/mirror/attack_hand(mob/user as mob) +/obj/structure/mirror/attack_hand(mob/user, list/params) if(!glass) return if(shattered) return diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 1de2607f9e6..8abd5673acb 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -82,7 +82,7 @@ if(Adjacent(user)) attack_hand(user) -/obj/structure/morgue/attack_hand(mob/user as mob) +/obj/structure/morgue/attack_hand(mob/user, list/params) if (src.connected) close() else @@ -173,7 +173,7 @@ if(Adjacent(user)) attack_hand(user) -/obj/structure/m_tray/attack_hand(mob/user as mob) +/obj/structure/m_tray/attack_hand(mob/user, list/params) if (src.connected) for(var/atom/movable/A as mob|obj in src.loc) if (!( A.anchored )) @@ -227,7 +227,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) src.icon_state = "crema1" return -/obj/structure/morgue/crematorium/attack_hand(mob/user as mob) +/obj/structure/morgue/crematorium/attack_hand(mob/user, list/params) if (cremating) to_chat(usr, "It's locked.") return @@ -350,7 +350,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) req_access = list(ACCESS_GENERAL_CREMATOR) id = 1 -/obj/machinery/button/crematorium/attack_hand(mob/user as mob) +/obj/machinery/button/crematorium/attack_hand(mob/user, list/params) if(..()) return if(src.allowed(user)) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index e1a77b24411..24b50d6649f 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -43,7 +43,7 @@ new /obj/item/frame/noticeboard( src.loc ) qdel(src) -/obj/structure/noticeboard/attack_hand(var/mob/user) +/obj/structure/noticeboard/attack_hand(mob/user, list/params) user.do_examinate(src) // Since Topic() never seems to interact with usr on more than a superficial diff --git a/code/game/objects/structures/props/beam_prism.dm b/code/game/objects/structures/props/beam_prism.dm index 76732705dfc..4850a49b322 100644 --- a/code/game/objects/structures/props/beam_prism.dm +++ b/code/game/objects/structures/props/beam_prism.dm @@ -41,7 +41,7 @@ var/degrees_to_rotate = -1 * degrees_from_north animate(src, transform = turn(src.transform, degrees_to_rotate), time = 2) -/obj/structure/prop/prism/attack_hand(mob/living/user) +/obj/structure/prop/prism/attack_hand(mob/user, list/params) ..() if(rotation_lock) @@ -154,7 +154,7 @@ var/list/my_turrets = list() var/dialID = null -/obj/structure/prop/prismcontrol/attack_hand(mob/living/user) +/obj/structure/prop/prismcontrol/attack_hand(mob/user, list/params) ..() var/confirm = input("Do you want to try to rotate \the [src]?", "[name]") in list("Yes", "No") diff --git a/code/game/objects/structures/props/nest.dm b/code/game/objects/structures/props/nest.dm index 5073fb79abc..2d968a94671 100644 --- a/code/game/objects/structures/props/nest.dm +++ b/code/game/objects/structures/props/nest.dm @@ -34,7 +34,7 @@ STOP_PROCESSING(SSobj, src) ..() -/obj/structure/prop/nest/attack_hand(mob/living/user) // Used to tell the player that this isn't useful for anything. +/obj/structure/prop/nest/attack_hand(mob/user, list/params) // Used to tell the player that this isn't useful for anything. ..() if(user && prob(disturbance_spawn_chance)) spawn_creature(get_turf(src)) diff --git a/code/game/objects/structures/props/prop.dm b/code/game/objects/structures/props/prop.dm index fea5815674d..c82b4b4dcde 100644 --- a/code/game/objects/structures/props/prop.dm +++ b/code/game/objects/structures/props/prop.dm @@ -9,7 +9,7 @@ anchored = TRUE var/interaction_message = null -/obj/structure/prop/attack_hand(mob/living/user) // Used to tell the player that this isn't useful for anything. +/obj/structure/prop/attack_hand(mob/user, list/params) // Used to tell the player that this isn't useful for anything. if(!istype(user)) return FALSE if(!interaction_message) diff --git a/code/game/objects/structures/props/puzzledoor.dm b/code/game/objects/structures/props/puzzledoor.dm index ded0f86d7b4..8e6064aea4e 100644 --- a/code/game/objects/structures/props/puzzledoor.dm +++ b/code/game/objects/structures/props/puzzledoor.dm @@ -53,7 +53,7 @@ locks -= L ..() -/obj/machinery/door/blast/puzzle/attack_hand(mob/user as mob) +/obj/machinery/door/blast/puzzle/attack_hand(mob/user, list/params) if(check_locks()) force_toggle(1, user) else diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 0cb1488430b..8b1d00b6e75 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -70,7 +70,7 @@ FLOOR SAFES icon_state = initial(icon_state) -/obj/structure/safe/attack_hand(mob/user as mob) +/obj/structure/safe/attack_hand(mob/user, list/params) user.set_machine(src) var/dat = "
" dat += "[open ? "Close" : "Open"] [src] | - [dial * 5] +" diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index eda59021f47..f0ab370ec1c 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -61,7 +61,7 @@ if(get_dist(user,src) <= 1) //not remotely though return TryToSwitchState(user) -/obj/structure/simple_door/attack_hand(mob/user as mob) +/obj/structure/simple_door/attack_hand(mob/user, list/params) return TryToSwitchState(user) /obj/structure/simple_door/CanAllowThrough(atom/movable/mover, turf/target) diff --git a/code/game/objects/structures/snowman.dm b/code/game/objects/structures/snowman.dm index f2481beda7c..702d870a15a 100644 --- a/code/game/objects/structures/snowman.dm +++ b/code/game/objects/structures/snowman.dm @@ -5,7 +5,7 @@ desc = "A happy little snowman smiles back at you!" anchored = 1 -/obj/structure/snowman/attack_hand(mob/user as mob) +/obj/structure/snowman/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_HARM) to_chat(user, "In one hit, [src] easily crumples into a pile of snow. You monster.") var/turf/simulated/floor/F = get_turf(src) diff --git a/code/game/objects/structures/stasis_cage.dm b/code/game/objects/structures/stasis_cage.dm index e074304d0ff..e61d3795654 100644 --- a/code/game/objects/structures/stasis_cage.dm +++ b/code/game/objects/structures/stasis_cage.dm @@ -14,7 +14,7 @@ if(A) contain(A) -/obj/structure/stasis_cage/attack_hand(var/mob/user) +/obj/structure/stasis_cage/attack_hand(mob/user, list/params) release() /obj/structure/stasis_cage/attack_robot(var/mob/user) @@ -69,9 +69,9 @@ /mob/living/simple_mob/proc/can_be_involuntarily_caged(obj/structure/stasis_cage/over_object, mob/living/user) if(istype(buckled, /obj/effect/energy_net)) return TRUE - + var/obj/item/grab/G = user.get_active_held_item() if(istype(G) && G.affecting == src && G.state >= GRAB_AGGRESSIVE) return TRUE - + return FALSE diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index b9bf0b8df22..1b76dd5654f 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -82,7 +82,7 @@ ..() CheckHardness() -/obj/structure/statue/attack_hand(mob/living/user) +/obj/structure/statue/attack_hand(mob/user, list/params) add_fingerprint(user) user.visible_message("[user] rubs some dust off from the [name]'s surface.", \ "You rub some dust off from the [name]'s surface.") 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 615ca51f35c..748eed6c7a7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -279,6 +279,9 @@ pickup_sound = 'sound/items/pickup/axe.ogg' /obj/item/roller/attack_self(mob/user) + . = ..() + if(.) + return var/obj/structure/bed/roller/R = new bedtype(user.loc) R.add_fingerprint(user) qdel(src) @@ -314,7 +317,10 @@ . = ..() held = new /obj/item/roller(src) -/obj/item/roller_holder/attack_self(mob/user as mob) +/obj/item/roller_holder/attack_self(mob/user) + . = ..() + if(.) + return if(!held) to_chat(user, "The rack is empty.") diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 84f2dffc6ae..97b6d872b2b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -96,7 +96,7 @@ create_track() driving = 0 -/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob) +/obj/structure/bed/chair/wheelchair/attack_hand(mob/user, list/params) if (pulling_along) MouseDrop(usr) return ..() @@ -195,6 +195,9 @@ var/unfolded_type = /obj/structure/bed/chair/wheelchair /obj/item/wheelchair/attack_self(mob/user) + . = ..() + if(.) + return var/obj/structure/bed/chair/wheelchair/R = new /obj/structure/bed/chair/wheelchair(user.loc) R.add_fingerprint(user) R.name = src.name diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index d307c34caa9..9e8778ce764 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -44,7 +44,7 @@ return attack_hand(user) ..() -/obj/structure/dispenser/attack_hand(mob/user as mob) +/obj/structure/dispenser/attack_hand(mob/user, list/params) user.set_machine(src) var/dat = "[src]

" dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "Dispense" : "empty"]
" diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 2c250c71222..34fc442d987 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -29,7 +29,7 @@ else return ..() -/obj/structure/target_stake/attack_hand(mob/user as mob) +/obj/structure/target_stake/attack_hand(mob/user, list/params) // taking pinned targets off! if(pinned_target) pinned_target.layer = OBJ_LAYER diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index c9beee0e6d0..f224e710a44 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -119,7 +119,7 @@ return -/obj/structure/transit_tube/station/attack_hand(mob/user as mob) +/obj/structure/transit_tube/station/attack_hand(mob/user, list/params) if(!pod_moving) for(var/obj/structure/transit_tube_pod/pod in loc) if(!pod.moving && (pod.dir in directions())) diff --git a/code/game/objects/structures/trash_pile.dm b/code/game/objects/structures/trash_pile.dm index b49a19478ac..95853120c0f 100644 --- a/code/game/objects/structures/trash_pile.dm +++ b/code/game/objects/structures/trash_pile.dm @@ -82,7 +82,7 @@ else return ..() -/obj/structure/trash_pile/attack_hand(mob/user) +/obj/structure/trash_pile/attack_hand(mob/user, list/params) //Human mob if(ishuman(user)) var/mob/living/carbon/human/H = user diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm index 214e103e9a7..dfd2a0dbd63 100644 --- a/code/game/objects/structures/under_wardrobe.dm +++ b/code/game/objects/structures/under_wardrobe.dm @@ -5,7 +5,7 @@ icon_state = "cabinet_closed" density = 1 -/obj/structure/undies_wardrobe/attack_hand(var/mob/user) +/obj/structure/undies_wardrobe/attack_hand(mob/user, list/params) if(!human_who_can_use_underwear(user)) to_chat(user, "Sadly there's nothing in here for you to wear.") return diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index a4de458decb..fca42427453 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -17,7 +17,7 @@ open = round(rand(0, 1)) update_icon() -/obj/structure/toilet/attack_hand(mob/living/user as mob) +/obj/structure/toilet/attack_hand(mob/user, list/params) if(swirlie) usr.setClickCooldown(user.get_attack_speed()) usr.visible_message("[user] slams the toilet seat onto [swirlie.name]'s head!", "You slam the toilet seat onto [swirlie.name]'s head!", "You hear reverberating porcelain.") @@ -155,7 +155,10 @@ anchored = 1 mouse_opacity = 0 -/obj/machinery/shower/attack_hand(mob/M as mob) +/obj/machinery/shower/attack_hand(mob/user, list/params) + var/mob/living/M = user + if(!istype(M)) + return on = !on update_icon() if(on) @@ -368,7 +371,7 @@ thing.reagents.clear_reagents() thing.update_icon() -/obj/structure/sink/attack_hand(mob/user as mob) +/obj/structure/sink/attack_hand(mob/user, list/params) if (ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -477,7 +480,7 @@ icon_state = "puddle" desc = "A small pool of some liquid, ostensibly water." -/obj/structure/sink/puddle/attack_hand(mob/M as mob) +/obj/structure/sink/puddle/attack_hand(mob/user, list/params) icon_state = "puddle-splash" ..() icon_state = "puddle" @@ -501,7 +504,7 @@ reagents.add_reagent(dispensedreagent, 20) /* Okay, just straight up, I tried to code this like blood overlays, but I just do NOT understand the system. If someone wants to sort it, enable this too. -/obj/structure/sink/oil_well/attack_hand(mob/M) +/obj/structure/sink/oil_well/attack_hand(mob/user, list/params) flick("puddle-oil-splash",src) reagents.reaction(M, 20) //Covers target in 20u of oil. to_chat(M, "You touch the pool of oil, only to get oil all over yourself. It would be wise to wash this off with water.") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 857dfa31577..ae92701ab9b 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -237,7 +237,7 @@ user.visible_message("Something knocks on [src].") playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1) -/obj/structure/window/attack_hand(mob/user as mob) +/obj/structure/window/attack_hand(mob/user, list/params) user.setClickCooldown(user.get_attack_speed()) if(MUTATION_HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) @@ -733,7 +733,7 @@ desc = "A remote control switch for polarized windows." var/range = 7 -/obj/machinery/button/windowtint/attack_hand(mob/user as mob) +/obj/machinery/button/windowtint/attack_hand(mob/user, list/params) if(..()) return 1 diff --git a/code/game/objects/structures/window_spawner.dm b/code/game/objects/structures/window_spawner.dm index 2de98b550fe..bbf959e2a24 100644 --- a/code/game/objects/structures/window_spawner.dm +++ b/code/game/objects/structures/window_spawner.dm @@ -14,7 +14,7 @@ var/win_path = /obj/structure/window/basic var/activated -/obj/effect/wingrille_spawn/attack_hand() +/obj/effect/wingrille_spawn/attack_hand(mob/user, list/params) attack_generic() /obj/effect/wingrille_spawn/attack_ghost() diff --git a/code/game/turfs/simulated/flooring/flooring_traps.dm b/code/game/turfs/simulated/flooring/flooring_traps.dm index 2563c4bb0ac..659166ce710 100644 --- a/code/game/turfs/simulated/flooring/flooring_traps.dm +++ b/code/game/turfs/simulated/flooring/flooring_traps.dm @@ -31,7 +31,7 @@ else if (tripped) icon_state = "[initial(icon_state)]_tripped" -/turf/simulated/floor/trap/attack_hand() +/turf/simulated/floor/trap/attack_hand(mob/user, list/params) if(tripped) to_chat(usr, "You reset the triggered mechanism.") tripped = 0 diff --git a/code/game/turfs/simulated/floors/snow.dm b/code/game/turfs/simulated/floors/snow.dm index 1781ced74f2..9b1abe7ef08 100644 --- a/code/game/turfs/simulated/floors/snow.dm +++ b/code/game/turfs/simulated/floors/snow.dm @@ -33,7 +33,7 @@ else ..() -/turf/simulated/floor/outdoors/snow/attack_hand(mob/user as mob) +/turf/simulated/floor/outdoors/snow/attack_hand(mob/user, list/params) visible_message("[user] starts scooping up some snow.", "You start scooping up some snow.") if(do_after(user, 1 SECOND)) user.put_in_hands_or_drop(new /obj/item/stack/material/snow) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index f7c774adec2..806e2d19c04 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -106,7 +106,7 @@ return 0 -/turf/simulated/wall/attack_hand(var/mob/user) +/turf/simulated/wall/attack_hand(mob/user, list/params) radiate() add_fingerprint(user) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 7fe02899233..ac88fe5301f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -229,7 +229,7 @@ /turf/proc/is_solid_structure() return TRUE -/turf/attack_hand(mob/user) +/turf/attack_hand(mob/user, list/params) . = ..() //QOL feature, clicking on turf can toggle doors, unless pulling something if(!user.pulling) diff --git a/code/modules/artifice/deadringer.dm b/code/modules/artifice/deadringer.dm index 7ce819132c1..a6baaf731c9 100644 --- a/code/modules/artifice/deadringer.dm +++ b/code/modules/artifice/deadringer.dm @@ -28,7 +28,10 @@ reveal() watchowner = null -/obj/item/deadringer/attack_self(var/mob/living/user as mob) +/obj/item/deadringer/attack_self(mob/user) + . = ..() + if(.) + return var/mob/living/H = src.loc if (!istype(H, /mob/living/carbon/human)) to_chat(H,"You have no clue what to do with this thing.") diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 781b4f640eb..ce4d77244bc 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -97,7 +97,10 @@ return -/obj/item/assembly/attack_self(mob/user as mob) +/obj/item/assembly/attack_self(mob/user) + . = ..() + if(.) + return if(!user) return FALSE user.set_machine(src) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 83adb3449c2..708848583bf 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -86,7 +86,7 @@ a_right.holder_movement() -/obj/item/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess +/obj/item/assembly_holder/attack_hand(mob/user, list/params)//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess if(a_left && a_right) a_left.holder_movement() a_right.holder_movement() @@ -109,7 +109,10 @@ else ..() -/obj/item/assembly_holder/attack_self(var/mob/user) +/obj/item/assembly_holder/attack_self(mob/user) + . = ..() + if(.) + return src.add_fingerprint(user) if(src.secured) if(!a_left || !a_right) diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index eefd324da15..234e9465994 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -32,7 +32,10 @@ return TRUE -/obj/item/assembly/igniter/attack_self(var/mob/user) +/obj/item/assembly/igniter/attack_self(mob/user) + . = ..() + if(.) + return activate() add_fingerprint(user) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 9857033a211..28323d6b5cd 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -49,13 +49,17 @@ update_icon() pulse(0) -/obj/item/assembly/mousetrap/attack_self(var/mob/living/user) +/obj/item/assembly/mousetrap/attack_self(mob/user) + . = ..() + if(.) + return if(!armed) to_chat(user, "You arm [src].") else if((MUTATION_CLUMSY in user.mutations) && prob(50)) var/which_hand = "l_hand" - if(!user.hand) + var/mob/living/carbon/human/H = ishuman(user)? user : null + if(!H?.hand) which_hand = "r_hand" triggered(user, which_hand) user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ @@ -68,11 +72,14 @@ playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) -/obj/item/assembly/mousetrap/attack_hand(var/mob/living/user) +/obj/item/assembly/mousetrap/attack_hand(mob/user, list/params) + var/mob/living/L = user + if(!istype(L)) + return if(armed) if((MUTATION_CLUMSY in user.mutations) && prob(50)) var/which_hand = "l_hand" - if(!user.hand) + if(!L.hand) which_hand = "r_hand" triggered(user, which_hand) user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 6f69188a431..faa1c5842ee 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -33,7 +33,10 @@ add_fingerprint(user) return -/obj/item/assembly/shock_kit/attack_self(mob/user as mob) +/obj/item/assembly/shock_kit/attack_self(mob/user) + . = ..() + if(.) + return part1.attack_self(user, status) part2.attack_self(user, status) add_fingerprint(user) diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index 2810193b42b..1a59e56aed1 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -26,6 +26,9 @@ /obj/item/assembly/voice/attack_self(mob/user) + . = ..() + if(.) + return if(!user) return FALSE activate() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/algae_generator_vr.dm b/code/modules/atmospherics/machinery/components/binary_devices/algae_generator_vr.dm index 045d16c71d8..373250abc3a 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/algae_generator_vr.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/algae_generator_vr.dm @@ -140,7 +140,7 @@ to_chat(user, SPAN_NOTICE("You cannot insert this item into \the [src]!")) return -/obj/machinery/atmospherics/component/binary/algae_farm/attack_hand(mob/user) +/obj/machinery/atmospherics/component/binary/algae_farm/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/heat_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/heat_pump.dm index 5710c55cbc3..6a9c0646d4d 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/heat_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/heat_pump.dm @@ -117,7 +117,7 @@ "You hear ratchet.") deconstruct() -/obj/machinery/atmospherics/component/binary/heat_pump/attack_hand(user as mob) +/obj/machinery/atmospherics/component/binary/heat_pump/attack_hand(mob/user, list/params) if(..()) return src.add_fingerprint(usr) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/massive_gas_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/massive_gas_pump.dm index 020f33c52e4..def925098af 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/massive_gas_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/massive_gas_pump.dm @@ -148,7 +148,7 @@ return data -/obj/machinery/atmospherics/component/binary/massive_gas_pump/attack_hand(mob/user) +/obj/machinery/atmospherics/component/binary/massive_gas_pump/attack_hand(mob/user, list/params) if(..()) return add_fingerprint(usr) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/massive_heat_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/massive_heat_pump.dm index 25863bb5a4b..ee6f928cc44 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/massive_heat_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/massive_heat_pump.dm @@ -185,7 +185,7 @@ return data -/obj/machinery/atmospherics/component/binary/massive_heat_pump/attack_hand(mob/user) +/obj/machinery/atmospherics/component/binary/massive_heat_pump/attack_hand(mob/user, list/params) if(..()) return add_fingerprint(usr) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index a2d3b0f2cbe..f4f88bd898c 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -168,7 +168,7 @@ update_icon() return -/obj/machinery/atmospherics/component/binary/passive_gate/attack_hand(user as mob) +/obj/machinery/atmospherics/component/binary/passive_gate/attack_hand(mob/user, list/params) if(..()) return add_fingerprint(usr) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index e6d24dff03f..930198c712f 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -231,7 +231,7 @@ Thus, the two variables affect pump operation are set in New(): . = ..() ui_interact(user) -/obj/machinery/atmospherics/component/binary/pump/attack_hand(mob/user) +/obj/machinery/atmospherics/component/binary/pump/attack_hand(mob/user, list/params) if(..()) return add_fingerprint(usr) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/valve.dm index 0cad40e5c06..356454f17ea 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/valve.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/valve.dm @@ -130,7 +130,7 @@ /obj/machinery/atmospherics/valve/attack_ai(mob/user as mob) return -/obj/machinery/atmospherics/valve/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/valve/attack_hand(mob/user, list/params) src.add_fingerprint(usr) update_icon() sleep(10) @@ -234,7 +234,7 @@ /obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/atmospherics/valve/digital/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/valve/digital/attack_hand(mob/user, list/params) if(!powered()) return if(!src.allowed(user)) diff --git a/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm b/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm index f3df2d64384..3d61ae0adf2 100644 --- a/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm +++ b/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm @@ -102,7 +102,7 @@ return TRUE return FALSE -/obj/machinery/atmospherics/component/quaternary/attack_hand(user as mob) +/obj/machinery/atmospherics/component/quaternary/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index d198c70dd56..049bdbbf189 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -111,7 +111,7 @@ if(frequency) set_frequency(frequency) -/obj/machinery/atmospherics/component/trinary/atmos_filter/attack_hand(user) +/obj/machinery/atmospherics/component/trinary/atmos_filter/attack_hand(mob/user, list/params) if(..()) return if(!src.allowed(user)) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 6c369048fe7..c535d6d7789 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -95,7 +95,7 @@ data["node2_dir"] = dir_name(node_connects[2],TRUE) return data -/obj/machinery/atmospherics/component/trinary/mixer/attack_hand(user as mob) +/obj/machinery/atmospherics/component/trinary/mixer/attack_hand(mob/user, list/params) if(..()) return ui_interact(user) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm b/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm index b75a1c4fe63..7ff6f13fe17 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm @@ -160,7 +160,7 @@ /obj/machinery/atmospherics/tvalve/attack_ai(mob/user as mob) return -/obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/tvalve/attack_hand(mob/user, list/params) src.add_fingerprint(usr) animation() sleep(10) @@ -284,7 +284,7 @@ /obj/machinery/atmospherics/tvalve/digital/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/atmospherics/tvalve/digital/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/tvalve/digital/attack_hand(mob/user, list/params) if(!powered()) return if(!src.allowed(user)) diff --git a/code/modules/atmospherics/machinery/components/unary/cold_sink.dm b/code/modules/atmospherics/machinery/components/unary/cold_sink.dm index 7337e94a39a..35d93ee399a 100644 --- a/code/modules/atmospherics/machinery/components/unary/cold_sink.dm +++ b/code/modules/atmospherics/machinery/components/unary/cold_sink.dm @@ -59,7 +59,7 @@ /obj/machinery/atmospherics/component/unary/freezer/attack_ai(mob/user as mob) ui_interact(user) -/obj/machinery/atmospherics/component/unary/freezer/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/component/unary/freezer/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/atmospherics/component/unary/freezer/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/atmospherics/machinery/components/unary/heat_source.dm b/code/modules/atmospherics/machinery/components/unary/heat_source.dm index ebcb7c9c12f..6071bd5a89a 100644 --- a/code/modules/atmospherics/machinery/components/unary/heat_source.dm +++ b/code/modules/atmospherics/machinery/components/unary/heat_source.dm @@ -77,7 +77,7 @@ /obj/machinery/atmospherics/component/unary/heater/attack_ai(mob/user as mob) ui_interact(user) -/obj/machinery/atmospherics/component/unary/heater/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/component/unary/heater/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/atmospherics/component/unary/heater/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm index a7e40040ca2..0773434506f 100644 --- a/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm @@ -197,7 +197,7 @@ /obj/machinery/atmospherics/component/unary/outlet_injector/hide(var/i) update_underlays() -/obj/machinery/atmospherics/component/unary/outlet_injector/attack_hand(mob/user as mob) +/obj/machinery/atmospherics/component/unary/outlet_injector/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/atmospherics/component/unary/outlet_injector/proc/toggle_injecting() diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index a228885cedc..9fdebbfa44a 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -20,7 +20,7 @@ /obj/structure/artilleryplaceholder/decorative density = 0 -/obj/machinery/artillerycontrol/attack_hand(mob/user as mob) +/obj/machinery/artillerycontrol/attack_hand(mob/user, list/params) user.set_machine(src) var/dat = "Bluespace Artillery Control:
" dat += "Locked on
" diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index e5e5f0ec376..3456f19e394 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -105,7 +105,7 @@ update_icon() -/obj/machinery/gateway/centerstation/attack_hand(mob/user as mob) +/obj/machinery/gateway/centerstation/attack_hand(mob/user, list/params) if(!ready) detect() return @@ -215,7 +215,7 @@ update_icon() -/obj/machinery/gateway/centeraway/attack_hand(mob/user as mob) +/obj/machinery/gateway/centeraway/attack_hand(mob/user, list/params) if(!ready) detect() return diff --git a/code/modules/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm index 3aafb57ea61..511e70d3aa7 100644 --- a/code/modules/catalogue/cataloguer.dm +++ b/code/modules/catalogue/cataloguer.dm @@ -246,7 +246,10 @@ GLOBAL_LIST_EMPTY(all_cataloguers) /obj/item/cataloguer/proc/adjust_points(amount) points_stored = max(0, points_stored += amount) -/obj/item/cataloguer/attack_self(mob/living/user) +/obj/item/cataloguer/attack_self(mob/user) + . = ..() + if(.) + return interact(user) /obj/item/cataloguer/interact(mob/user) diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index 578e814e8b5..b9257dcd403 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -73,7 +73,7 @@ ..() -/obj/item/clothing/attack_hand(var/mob/user) +/obj/item/clothing/attack_hand(mob/user, list/params) //only forward to the attached accessory if the clothing is equipped (not in a storage) if(LAZYLEN(accessories) && src.loc == user) for(var/obj/item/clothing/accessory/A in accessories) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index cf53073c824..063164c8705 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -31,6 +31,9 @@ BLIND // can't see anything pickup_sound = 'sound/items/pickup/accessory.ogg' /obj/item/clothing/glasses/attack_self(mob/user) + . = ..() + if(.) + return if(toggleable) if(active) active = 0 @@ -447,7 +450,10 @@ BLIND // can't see anything flash_protection = FLASH_PROTECTION_MAJOR tint = TINT_HEAVY -/obj/item/clothing/glasses/welding/attack_self() +/obj/item/clothing/glasses/welding/attack_self(mob/user) + . = ..() + if(.) + return toggle() /obj/item/clothing/glasses/welding/verb/toggle() @@ -549,6 +555,9 @@ BLIND // can't see anything activation_sound = 'sound/effects/pop.ogg' /obj/item/clothing/glasses/sunglasses/sechud/aviator/attack_self(mob/user) + . = ..() + if(.) + return if(toggleable && !user.incapacitated()) on = !on if(on) @@ -666,7 +675,10 @@ BLIND // can't see anything body_cover_flags = EYES species_restricted = list(SPECIES_TESHARI) -/obj/item/clothing/glasses/aerogelgoggles/attack_self() +/obj/item/clothing/glasses/aerogelgoggles/attack_self(mob/user) + . = ..() + if(.) + return toggle() /obj/item/clothing/glasses/aerogelgoggles/verb/toggle() diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 3f0aa153f00..718f5575990 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -113,6 +113,9 @@ user.visible_message("[user] deletes the prescription data on the [src.name].") /obj/item/clothing/glasses/omnihud/attack_self(mob/user) + . = ..() + if(.) + return if(!ishuman(user)) return @@ -209,6 +212,9 @@ /obj/item/clothing/glasses/omnihud/eng/meson/attack_self(mob/user) + . = ..() + if(.) + return if(!active) toggleprojector() ..() @@ -293,6 +299,9 @@ vision_flags = SEE_TURFS //but they can spot breaches. Due to the way HUDs work, they don't provide darkvision up-close the way mesons do. /obj/item/clothing/glasses/omnihud/eng/meson/attack_self(mob/user) + . = ..() + if(.) + return if(!active) toggleprojector() ..() diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 6539827bfd8..93675580417 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -183,7 +183,10 @@ var/blessed = FALSE -/obj/item/clothing/gloves/swat/para/attack_self(mob/user as mob) +/obj/item/clothing/gloves/swat/para/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.isholy && !blessed) blessed = TRUE siemens_coefficient = 0 diff --git a/code/modules/clothing/gloves/rings/rings.dm b/code/modules/clothing/gloves/rings/rings.dm index 274314aab1a..99df5ffa840 100644 --- a/code/modules/clothing/gloves/rings/rings.dm +++ b/code/modules/clothing/gloves/rings/rings.dm @@ -7,6 +7,9 @@ item_state = "diamond_s" /obj/item/clothing/gloves/ring/engagement/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("\The [user] gets down on one knee, presenting \the [src].","You get down on one knee, presenting \the [src].") /obj/item/clothing/gloves/ring/cti @@ -98,6 +101,9 @@ var/nameset = FALSE /obj/item/clothing/gloves/ring/seal/signet/attack_self(mob/user) + . = ..() + if(.) + return if(nameset) to_chat(user, "The [src] has already been claimed!") return @@ -119,6 +125,9 @@ var/partnername = "" /obj/item/clothing/gloves/ring/wedding/attack_self(mob/user) + . = ..() + if(.) + return partnername = copytext(sanitize(input(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae") as null|text),1,MAX_NAME_LEN) name = "[initial(name)] - [partnername]" diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 5ce1b199ae0..0f6a2ef76dc 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -23,6 +23,9 @@ pickup_sound = 'sound/items/pickup/hat.ogg' /obj/item/clothing/head/attack_self(mob/user) + . = ..() + if(.) + return if(brightness_on) if(!isturf(user.loc)) to_chat(user, "You cannot turn the light on while in this [user.loc]") diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 45faa6ffd28..df88a06dc9e 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -68,7 +68,10 @@ valid_accessory_slots = null action_button_name = "Toggle Visor" -/obj/item/clothing/head/helmet/riot/attack_self(mob/user as mob) +/obj/item/clothing/head/helmet/riot/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]up" to_chat(user, "You raise the visor on the riot helmet.") @@ -269,7 +272,10 @@ var/blessed = TRUE -/obj/item/clothing/head/helmet/para/attack_self(mob/user as mob) +/obj/item/clothing/head/helmet/para/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state) && user.mind.isholy && blessed) blessed = FALSE flash_protection = FLASH_PROTECTION_NONE @@ -295,7 +301,10 @@ armor = list(melee = 40, bullet = 30, laser = 30,energy = 10, bomb = 10, bio = 0, rad = 0) action_button_name = "Enable Wards" -/obj/item/clothing/head/helmet/para/inquisitor/attack_self(mob/user as mob) +/obj/item/clothing/head/helmet/para/inquisitor/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.isholy && blessed) blessed = FALSE flash_protection = FLASH_PROTECTION_NONE diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 9844a855da2..27235f0b760 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -558,7 +558,10 @@ icon_state = "reindeer0" action_button_name = "Toggle Nose" -/obj/item/clothing/head/reindeer/attack_self(mob/user as mob) +/obj/item/clothing/head/reindeer/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]_on" to_chat(user, "You turn the glowing nose on.") diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 2ac2a7396ee..5af72040eff 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -31,7 +31,10 @@ drop_sound = 'sound/items/drop/helm.ogg' pickup_sound = 'sound/items/pickup/helm.ogg' -/obj/item/clothing/head/welding/attack_self() +/obj/item/clothing/head/welding/attack_self(mob/user) + . = ..() + if(.) + return toggle() @@ -127,7 +130,10 @@ if (istype(location, /turf)) location.hotspot_expose(700, 1) -/obj/item/clothing/head/cakehat/attack_self(mob/user as mob) +/obj/item/clothing/head/cakehat/attack_self(mob/user) + . = ..() + if(.) + return onfire = !(onfire) if (onfire) force = 3 @@ -151,7 +157,10 @@ inv_hide_flags = HIDEEARS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE -/obj/item/clothing/head/ushanka/attack_self(mob/user as mob) +/obj/item/clothing/head/ushanka/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == "ushankadown") src.icon_state = "ushankaup" to_chat(user, "You raise the ear flaps on the ushanka.") diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm index a641e405595..bc442789188 100644 --- a/code/modules/clothing/head/pilot_helmet.dm +++ b/code/modules/clothing/head/pilot_helmet.dm @@ -188,7 +188,10 @@ icon_state = "pilot_helmet2" action_button_name = "Toggle Visor" -/obj/item/clothing/head/pilot/alt/attack_self(mob/user as mob) +/obj/item/clothing/head/pilot/alt/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]up" to_chat(user, "You raise the visor on the pilot helmet.") diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index efd85dddc9a..bd8df09b34e 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -13,6 +13,9 @@ ..() /obj/item/clothing/head/soft/attack_self(mob/user) + . = ..() + if(.) + return flipped = !flipped if(flipped) icon_state = "[icon_state]_flipped" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 561fc5f2f62..52b25ed41fd 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -30,6 +30,9 @@ update_worn_icon() /obj/item/clothing/mask/breath/attack_self(mob/user) + . = ..() + if(.) + return adjust_mask(user) /obj/item/clothing/mask/breath/verb/toggle() diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 66a300b56c7..d5fded56465 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -81,6 +81,9 @@ adjust_mask(usr) /obj/item/clothing/mask/gas/half/attack_self(mob/user) + . = ..() + if(.) + return adjust_mask(user) //Plague Dr suit can be found in clothing/suits/bio.dm @@ -122,6 +125,9 @@ return /obj/item/clothing/mask/gas/swat/vox/attack_self(mob/user) + . = ..() + if(.) + return feeding_port(user) ..() diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 02c4835ab9e..50174a3cf6f 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -21,8 +21,8 @@ say_verbs = list("mumbles", "says") // Clumsy folks can't take the mask off themselves. -/obj/item/clothing/mask/muzzle/attack_hand(mob/living/user as mob) - if(user.wear_mask == src && !user.IsAdvancedToolUser()) +/obj/item/clothing/mask/muzzle/attack_hand(mob/user, list/params) + if(user.item_by_slot(SLOT_ID_MASK) == src && !user.IsAdvancedToolUser()) return 0 ..() /obj/item/clothing/mask/surgical @@ -260,6 +260,9 @@ inv_hide_flags = HIDEEARS|HIDEEYES|HIDEFACE /obj/item/clothing/mask/paper/attack_self(mob/user) + . = ..() + if(.) + return reskin_paper_mask(user) /obj/item/clothing/mask/paper/proc/reskin_paper_mask(mob/living/L) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 04ceb70ed5a..a9598aae315 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -67,8 +67,8 @@ update_icon() -/obj/item/clothing/shoes/attack_hand(var/mob/living/M) - if(can_hold_knife == 1 && holding && src.loc == M) +/obj/item/clothing/shoes/attack_hand(mob/user, list/params) + if(can_hold_knife == 1 && holding && src.loc == user) draw_knife() return ..() @@ -104,7 +104,10 @@ else return ..() -/obj/item/clothing/shoes/attack_self(var/mob/user) //gtfo my shoe +/obj/item/clothing/shoes/attack_self(mob/user) + . = ..() + if(.) + return //gtfo my shoe for(var/mob/M in src) M.forceMove(get_turf(user)) to_chat(M,"[user] shakes you out of \the [src]!") diff --git a/code/modules/clothing/shoes/boots.dm b/code/modules/clothing/shoes/boots.dm index fa09f2e9edb..29fdcf2e6ea 100644 --- a/code/modules/clothing/shoes/boots.dm +++ b/code/modules/clothing/shoes/boots.dm @@ -212,7 +212,10 @@ var/blessed = FALSE -/obj/item/clothing/shoes/boots/swat/para/attack_self(mob/user as mob) +/obj/item/clothing/shoes/boots/swat/para/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.isholy && !blessed) blessed = TRUE clothing_flags |= NOSLIP diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index dff40e81d4a..2ae6d1db50b 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -111,7 +111,10 @@ icon_state = "orange" chained = null -/obj/item/clothing/shoes/orange/attack_self(mob/user as mob) +/obj/item/clothing/shoes/orange/attack_self(mob/user) + . = ..() + if(.) + return ..() remove_cuffs(user) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index c3c93b7c86e..de3ae363ce6 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -23,6 +23,9 @@ slowdown += slowdown_on /obj/item/clothing/shoes/magboots/attack_self(mob/user) + . = ..() + if(.) + return if(magpulse) clothing_flags &= ~NOSLIP magpulse = 0 @@ -77,6 +80,9 @@ action_button_name = "Toggle the magclaws" /obj/item/clothing/shoes/magboots/vox/attack_self(mob/user) + . = ..() + if(.) + return if(src.magpulse) clothing_flags &= ~NOSLIP magpulse = 0 diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index c3b97b7d6d5..00cff8c7a15 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -224,6 +224,9 @@ // below is code for the action button method. im dumb. but it works? if you figure out a way to make it better tell me // hey peesh i made it better -hatter /obj/item/clothing/suit/space/void/attack_self(mob/user) + . = ..() + if(.) + return toggle_helmet() /obj/item/clothing/suit/space/void/verb/eject_tank() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 6de830d2a85..687a4fcfd1c 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -213,7 +213,10 @@ return PROJECTILE_FORCE_MISS return 0 -/obj/item/clothing/suit/armor/reactive/attack_self(mob/user as mob) +/obj/item/clothing/suit/armor/reactive/attack_self(mob/user) + . = ..() + if(.) + return active = !( active ) if (active) to_chat(user, "The reactive armor is now active.") @@ -697,7 +700,10 @@ var/anti_magic = FALSE var/blessed = FALSE -/obj/item/clothing/suit/armor/vest/para/attack_self(mob/user as mob) +/obj/item/clothing/suit/armor/vest/para/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.isholy && !anti_magic && !blessed) anti_magic = TRUE blessed = TRUE diff --git a/code/modules/clothing/suits/medieval_armor.dm b/code/modules/clothing/suits/medieval_armor.dm index 81a87842360..bc48e2a4327 100644 --- a/code/modules/clothing/suits/medieval_armor.dm +++ b/code/modules/clothing/suits/medieval_armor.dm @@ -31,7 +31,10 @@ icon_state = "paladinhelm" action_button_name = "Toggle Visor" -/obj/item/clothing/head/helmet/medieval/paladin/attack_self(mob/user as mob) +/obj/item/clothing/head/helmet/medieval/paladin/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]1" to_chat(user, "You raise the helmet's visor.") @@ -170,7 +173,10 @@ icon_state = "paladinhelm" action_button_name = "Toggle Visor" -/obj/item/clothing/head/medievalfake/paladin/attack_self(mob/user as mob) +/obj/item/clothing/head/medievalfake/paladin/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]1" to_chat(user, "You raise the helmet's visor.") diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 7a579c9eb3d..fc036f2f676 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -16,7 +16,7 @@ ..() ToggleButtons() -/obj/item/clothing/suit/storage/attack_hand(mob/user as mob) +/obj/item/clothing/suit/storage/attack_hand(mob/user, list/params) if (pockets.handle_attack_hand(user)) ..(user) diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 2ddcd8cea83..5a98ae84753 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -63,7 +63,7 @@ var/icon/rolled_down_sleeves_icon = 'icons/mob/clothing/uniform_sleeves_rolled.dmi' // todo kick to item flag for auto-unequip-without-clickdrag -/obj/item/clothing/under/attack_hand(var/mob/user) +/obj/item/clothing/under/attack_hand(mob/user, list/params) if(LAZYLEN(accessories)) ..() if ((ishuman(usr) || issmall(usr)) && src.loc == user) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 6a325487000..1dafc5eedfc 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -130,7 +130,7 @@ ..() //default attack_hand behaviour -/obj/item/clothing/accessory/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/attack_hand(mob/user, list/params) if(has_suit) return //we aren't an object on the ground so don't call parent ..() @@ -383,7 +383,10 @@ slot = ACCESSORY_SLOT_DECOR action_button_name = "Adjust Gaiter" -/obj/item/clothing/accessory/gaiter/attack_self(mob/user as mob) +/obj/item/clothing/accessory/gaiter/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]_up" to_chat(user, "You pull the gaiter up over your nose.") @@ -542,7 +545,10 @@ overlay_state = "choker_cst_overlay" var/customized = 0 -/obj/item/clothing/accessory/choker/attack_self(mob/user as mob) +/obj/item/clothing/accessory/choker/attack_self(mob/user) + . = ..() + if(.) + return if(!customized) var/design = input(user,"Descriptor?","Pick descriptor","") in list("plain","simple","ornate","elegant","opulent") var/material = input(user,"Material?","Pick material","") in list("leather","velvet","lace","fabric","latex","plastic","metal","chain","silver","gold","platinum","steel","bead","ruby","sapphire","emerald","diamond") @@ -793,7 +799,10 @@ /obj/item/clothing/accessory/collar/holo/indigestible/digest_act(var/atom/movable/item_storage = null) return FALSE -/obj/item/clothing/accessory/collar/attack_self(mob/user as mob) +/obj/item/clothing/accessory/collar/attack_self(mob/user) + . = ..() + if(.) + return if(istype(src,/obj/item/clothing/accessory/collar/holo)) to_chat(user,"[name]'s interface is projected onto your hand.") else diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm index 0fc022c71cf..48f3d897f39 100644 --- a/code/modules/clothing/under/accessories/badges.dm +++ b/code/modules/clothing/under/accessories/badges.dm @@ -28,7 +28,10 @@ /obj/item/clothing/accessory/badge/proc/set_desc(var/mob/living/carbon/human/H) -/obj/item/clothing/accessory/badge/attack_self(mob/user as mob) +/obj/item/clothing/accessory/badge/attack_self(mob/user) + . = ..() + if(.) + return if(!stored_name) to_chat(user, "You polish your old badge fondly, shining up the surface.") @@ -53,7 +56,10 @@ icon_state = "sheriff" item_state = "goldbadge" -/obj/item/clothing/accessory/badge/sheriff/attack_self(mob/user as mob) +/obj/item/clothing/accessory/badge/sheriff/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("[user] shows their sheriff badge. There's a new sheriff in town!",\ "You flash the sheriff badge to everyone around you!") @@ -73,7 +79,10 @@ icon_state = "holobadge-cord" slot_flags = SLOT_MASK | SLOT_TIE | SLOT_BELT -/obj/item/clothing/accessory/badge/holo/attack_self(mob/user as mob) +/obj/item/clothing/accessory/badge/holo/attack_self(mob/user) + . = ..() + if(.) + return if(!stored_name) to_chat(user, "Waving around a holobadge before swiping an ID would be pretty pointless.") return diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/under/accessories/clothing.dm index b3c49b816b8..7ecd620a033 100644 --- a/code/modules/clothing/under/accessories/clothing.dm +++ b/code/modules/clothing/under/accessories/clothing.dm @@ -135,7 +135,10 @@ /obj/item/gun/ballistic, /obj/item/ammo_magazine, /obj/item/melee/baton) action_button_name = "Adjust Cloak" -/obj/item/clothing/accessory/poncho/rough_cloak/attack_self(mob/user as mob) +/obj/item/clothing/accessory/poncho/rough_cloak/attack_self(mob/user) + . = ..() + if(.) + return if(src.icon_state == initial(icon_state)) src.icon_state = "[icon_state]_open" src.item_state = "[item_state]_open" diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index caa8431cbb0..7cdf3bb8e98 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -66,7 +66,7 @@ w_class = initial(w_class) clear_holster() -/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/holster/attack_hand(mob/user, list/params) if (has_suit && (slot & ACCESSORY_SLOT_UTILITY)) if(holstered) unholster(user) diff --git a/code/modules/clothing/under/accessories/lockets.dm b/code/modules/clothing/under/accessories/lockets.dm index 0923aff9677..d2c97417ee2 100644 --- a/code/modules/clothing/under/accessories/lockets.dm +++ b/code/modules/clothing/under/accessories/lockets.dm @@ -11,7 +11,10 @@ var/open var/obj/item/held //Item inside locket. -/obj/item/clothing/accessory/locket/attack_self(mob/user as mob) +/obj/item/clothing/accessory/locket/attack_self(mob/user) + . = ..() + if(.) + return if(!base_icon) base_icon = icon_state diff --git a/code/modules/clothing/under/accessories/permits.dm b/code/modules/clothing/under/accessories/permits.dm index bbd42a10fd4..428cf460fbb 100755 --- a/code/modules/clothing/under/accessories/permits.dm +++ b/code/modules/clothing/under/accessories/permits.dm @@ -9,7 +9,10 @@ slot = ACCESSORY_SLOT_MEDAL var/owner = 0 //To prevent people from just renaming the thing if they steal it -/obj/item/clothing/accessory/permit/attack_self(mob/user as mob) +/obj/item/clothing/accessory/permit/attack_self(mob/user) + . = ..() + if(.) + return if(isliving(user)) if(!owner) set_name(user.name) diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index f6eb4b34aec..d3c23349dbd 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -19,7 +19,7 @@ if (!hide_on_roll) on_rolled["down"] = icon_state -/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/storage/attack_hand(mob/user, list/params) if (has_suit) //if we are part of a suit hold.open(user) return @@ -41,7 +41,10 @@ hold.emp_act(severity) ..() -/obj/item/clothing/accessory/storage/attack_self(mob/user as mob) +/obj/item/clothing/accessory/storage/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You empty [src].") var/turf/T = get_turf(src) hold.hide_from(usr) diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index c7e9ec40c2e..23106071b3f 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -142,7 +142,7 @@ /obj/machinery/dnaforensics/attack_ai(mob/user) ui_interact(user) -/obj/machinery/dnaforensics/attack_hand(mob/user) +/obj/machinery/dnaforensics/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/dnaforensics/update_icon() diff --git a/code/modules/detectivework/microscope/microscope.dm b/code/modules/detectivework/microscope/microscope.dm index dcf202519b5..5be88931cf1 100644 --- a/code/modules/detectivework/microscope/microscope.dm +++ b/code/modules/detectivework/microscope/microscope.dm @@ -25,7 +25,7 @@ return return ..() -/obj/machinery/microscope/attack_hand(mob/user) +/obj/machinery/microscope/attack_hand(mob/user, list/params) if(!sample) to_chat(user, "The microscope has no sample to examine.") diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index 4c66ba858e9..0a9207ae603 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -71,7 +71,10 @@ return -/obj/item/evidencebag/attack_self(mob/user as mob) +/obj/item/evidencebag/attack_self(mob/user) + . = ..() + if(.) + return if(contents.len) 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/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index 2348dd12bf4..406c24ef05f 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -41,7 +41,10 @@ STOP_PROCESSING(SSobj, src) //so we don't continue turning to ash while gc'd return ..() -/obj/item/reagent_containers/glass/rag/attack_self(mob/user as mob) +/obj/item/reagent_containers/glass/rag/attack_self(mob/user) + . = ..() + if(.) + return if(on_fire) user.visible_message("\The [user] stamps out [src].", "You stamp out [src].") user.drop_item_to_ground(src) diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index da441657d95..543e2f1b949 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -60,7 +60,10 @@ icon_state = "fingerprint0" item_state = "paper" -/obj/item/sample/print/attack_self(var/mob/user) +/obj/item/sample/print/attack_self(mob/user) + . = ..() + if(.) + return if(evidence && evidence.len) return if(!ishuman(user)) diff --git a/code/modules/detectivework/tools/uvlight.dm b/code/modules/detectivework/tools/uvlight.dm index f582a9e8971..e30a914c3db 100644 --- a/code/modules/detectivework/tools/uvlight.dm +++ b/code/modules/detectivework/tools/uvlight.dm @@ -18,7 +18,10 @@ var/on = 0 var/step_alpha = 50 -/obj/item/uv_light/attack_self(var/mob/user) +/obj/item/uv_light/attack_self(mob/user) + . = ..() + if(.) + return on = !on if(on) set_light(range, 2, "#007fff") diff --git a/code/modules/donatorreskins/donatorclothing.dm b/code/modules/donatorreskins/donatorclothing.dm index 4cc997b737e..88926762828 100644 --- a/code/modules/donatorreskins/donatorclothing.dm +++ b/code/modules/donatorreskins/donatorclothing.dm @@ -226,6 +226,9 @@ update_worn_icon() /obj/item/clothing/mask/donator/dancer/attack_self(mob/user) + . = ..() + if(.) + return adjust_mask(user) /obj/item/clothing/mask/donator/dancer/verb/toggle() diff --git a/code/modules/economy/items/EFTPOS.dm b/code/modules/economy/items/EFTPOS.dm index 233121fdc6c..df2c0ffdd6b 100644 --- a/code/modules/economy/items/EFTPOS.dm +++ b/code/modules/economy/items/EFTPOS.dm @@ -84,7 +84,10 @@ D.wrapped = R D.name = "small parcel - 'EFTPOS access code'" -/obj/item/eftpos/attack_self(mob/user as mob) +/obj/item/eftpos/attack_self(mob/user) + . = ..() + if(.) + return if(get_dist(src,user) <= 1) var/dat = "[eftpos_name]
" dat += "This terminal is [machine_id]. Report this code when contacting IT Support
" diff --git a/code/modules/economy/items/cash.dm b/code/modules/economy/items/cash.dm index 06f2830ab0f..3c78952085c 100644 --- a/code/modules/economy/items/cash.dm +++ b/code/modules/economy/items/cash.dm @@ -85,7 +85,10 @@ update_icon() return worth -/obj/item/spacecash/attack_self() +/obj/item/spacecash/attack_self(mob/user) + . = ..() + if(.) + return var/amount = input(usr, "How many Thalers do you want to take? (0 to [src.worth])", "Take Money", 20) as num if(!src || QDELETED(src)) return @@ -184,7 +187,10 @@ pickup_sound = 'sound/items/pickup/card.ogg' var/owner_name = "" //So the ATM can set it so the EFTPOS can put a valid name on transactions. -/obj/item/spacecash/ewallet/attack_self() +/obj/item/spacecash/ewallet/attack_self(mob/user) + . = ..() + if(.) + return return //Don't act /obj/item/spacecash/ewallet/attackby() diff --git a/code/modules/economy/items/coins.dm b/code/modules/economy/items/coins.dm index 87c898deba4..8d16f861662 100644 --- a/code/modules/economy/items/coins.dm +++ b/code/modules/economy/items/coins.dm @@ -103,7 +103,10 @@ to_chat(user, "You detach the string from the coin.") else ..() -/obj/item/coin/attack_self(mob/user as mob) +/obj/item/coin/attack_self(mob/user) + . = ..() + if(.) + return var/result = rand(1, sides) var/comment = "" if(result == 1) diff --git a/code/modules/economy/items/retail_scanner.dm b/code/modules/economy/items/retail_scanner.dm index c29d5265c8e..1510211b5f1 100644 --- a/code/modules/economy/items/retail_scanner.dm +++ b/code/modules/economy/items/retail_scanner.dm @@ -46,7 +46,10 @@ setDir(SOUTH) pixel_y = 0 -/obj/item/retail_scanner/attack_self(mob/user as mob) +/obj/item/retail_scanner/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) interact(user) diff --git a/code/modules/economy/machines/ATM.dm b/code/modules/economy/machines/ATM.dm index 030eb204c30..97f8c7e1ddd 100644 --- a/code/modules/economy/machines/ATM.dm +++ b/code/modules/economy/machines/ATM.dm @@ -127,7 +127,7 @@ log transactions else ..() -/obj/machinery/atm/attack_hand(mob/user as mob) +/obj/machinery/atm/attack_hand(mob/user, list/params) if(istype(user, /mob/living/silicon)) to_chat (user, SPAN_WARNING("A firewall prevents you from interfacing with this device!")) return diff --git a/code/modules/economy/machines/Accounts_DB.dm b/code/modules/economy/machines/Accounts_DB.dm index 94d3131ccdb..42219e47647 100644 --- a/code/modules/economy/machines/Accounts_DB.dm +++ b/code/modules/economy/machines/Accounts_DB.dm @@ -57,7 +57,7 @@ attack_hand(user) -/obj/machinery/account_database/attack_hand(mob/user as mob) +/obj/machinery/account_database/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return nano_ui_interact(user) diff --git a/code/modules/economy/machines/cash_register.dm b/code/modules/economy/machines/cash_register.dm index 11415c8fa3f..7f13b3d22e9 100644 --- a/code/modules/economy/machines/cash_register.dm +++ b/code/modules/economy/machines/cash_register.dm @@ -39,7 +39,7 @@ . += "It's completely empty." -/obj/machinery/cash_register/attack_hand(mob/user as mob) +/obj/machinery/cash_register/attack_hand(mob/user, list/params) // Don't be accessible from the wrong side of the machine if(get_dir(src, user) & GLOB.reverse_dir[src.dir]) return diff --git a/code/modules/economy/machines/mint.dm b/code/modules/economy/machines/mint.dm index 5f7d00886bb..eafcb45d8de 100644 --- a/code/modules/economy/machines/mint.dm +++ b/code/modules/economy/machines/mint.dm @@ -81,7 +81,7 @@ if(processed) qdel(O) -/obj/machinery/mineral/mint/attack_hand(user as mob) +/obj/machinery/mineral/mint/attack_hand(mob/user, list/params) var/dat = "Coin Press
" @@ -474,7 +474,7 @@ /obj/machinery/coinbank/attack_ai(mob/user as mob) attack_hand(user) -/obj/machinery/coinbank/attack_hand(mob/user as mob) +/obj/machinery/coinbank/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return wires.Interact(user) diff --git a/code/modules/economy/money_bag.dm b/code/modules/economy/money_bag.dm index 780e7177235..b518a688d38 100644 --- a/code/modules/economy/money_bag.dm +++ b/code/modules/economy/money_bag.dm @@ -8,7 +8,7 @@ throw_force = 2.0 w_class = ITEMSIZE_LARGE -/obj/item/moneybag/attack_hand(user as mob) +/obj/item/moneybag/attack_hand(mob/user, list/params) var/amt_supermatter = 0 var/amt_bananium = 0 var/amt_mhydrogen = 0 diff --git a/code/modules/fishing/fishing_net.dm b/code/modules/fishing/fishing_net.dm index f232eccfe0a..9306b9d22c9 100644 --- a/code/modules/fishing/fishing_net.dm +++ b/code/modules/fishing/fishing_net.dm @@ -58,7 +58,10 @@ return return ..() -/obj/item/material/fishing_net/attack_self(var/mob/user) +/obj/item/material/fishing_net/attack_self(mob/user) + . = ..() + if(.) + return for(var/mob/M in src) M.forceMove(get_turf(src)) user.visible_message("[user] releases [M] from \the [src].", "You release [M] from \the [src].") diff --git a/code/modules/food/drinkingglass/extras.dm b/code/modules/food/drinkingglass/extras.dm index 155e7dbee0f..726728eea8a 100644 --- a/code/modules/food/drinkingglass/extras.dm +++ b/code/modules/food/drinkingglass/extras.dm @@ -26,7 +26,7 @@ else return ..() -/obj/item/reagent_containers/food/drinks/glass2/attack_hand(mob/user as mob) +/obj/item/reagent_containers/food/drinks/glass2/attack_hand(mob/user, list/params) if(src != user.get_inactive_held_item()) return ..() diff --git a/code/modules/food/food/condiment.dm b/code/modules/food/food/condiment.dm index 7f56a2840de..bfc0f25c0c2 100644 --- a/code/modules/food/food/condiment.dm +++ b/code/modules/food/food/condiment.dm @@ -18,7 +18,10 @@ /obj/item/reagent_containers/food/condiment/attackby(var/obj/item/W as obj, var/mob/user as mob) return -/obj/item/reagent_containers/food/condiment/attack_self(var/mob/user as mob) +/obj/item/reagent_containers/food/condiment/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/reagent_containers/food/condiment/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index 3f528a13ec1..91ca4fc5835 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -25,7 +25,10 @@ price_tag = null return -/obj/item/reagent_containers/food/drinks/attack_self(mob/user as mob) +/obj/item/reagent_containers/food/drinks/attack_self(mob/user) + . = ..() + if(.) + return if(!is_open_container()) open(user) diff --git a/code/modules/food/food/drinks/bottle.dm b/code/modules/food/food/drinks/bottle.dm index f47e2fe4d7f..60e0f95b6e2 100644 --- a/code/modules/food/food/drinks/bottle.dm +++ b/code/modules/food/food/drinks/bottle.dm @@ -107,6 +107,9 @@ ..() /obj/item/reagent_containers/food/drinks/bottle/attack_self(mob/user) + . = ..() + if(.) + return if(rag) remove_rag(user) else diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index dc16279811f..0d6f24bc8b9 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -44,7 +44,10 @@ M.put_in_hands(trash) qdel(src) -/obj/item/reagent_containers/food/snacks/attack_self(mob/user as mob) +/obj/item/reagent_containers/food/snacks/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/reagent_containers/food/snacks/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) @@ -920,6 +923,9 @@ var/has_been_heated = 0 /obj/item/reagent_containers/food/snacks/donkpocket/sinpocket/attack_self(mob/user) + . = ..() + if(.) + return if(has_been_heated) to_chat(user, "The heating chemicals have already been spent.") return @@ -1835,7 +1841,10 @@ . = ..() reagents.add_reagent("protein", 10) -/obj/item/reagent_containers/food/snacks/monkeycube/attack_self(mob/user as mob) +/obj/item/reagent_containers/food/snacks/monkeycube/attack_self(mob/user) + . = ..() + if(.) + return if(wrapped) Unwrap(user) @@ -3231,7 +3240,7 @@ icon_state = "pizzabox[boxes.len+1]" add_overlay(overlays_to_add) -/obj/item/pizzabox/attack_hand( mob/user as mob ) +/obj/item/pizzabox/attack_hand(mob/user, list/params) if( open && pizza ) user.put_in_hands( pizza ) @@ -3256,7 +3265,10 @@ return . = ..() -/obj/item/pizzabox/attack_self( mob/user as mob ) +/obj/item/pizzabox/attack_self(mob/user) + . = ..() + if(.) + return if( boxes.len > 0 ) return @@ -4796,7 +4808,7 @@ END CITADEL CHANGE */ bitesize = 1 nutriment_amt = 10 -/obj/item/reagent_containers/food/snacks/chipplate/attack_hand(mob/user) +/obj/item/reagent_containers/food/snacks/chipplate/attack_hand(mob/user, list/params) . = ..() var/obj/item/reagent_containers/food/snacks/returningitem = new vendingobject(loc) returningitem.reagents.clear_reagents() diff --git a/code/modules/food/glass/bottle.dm b/code/modules/food/glass/bottle.dm index dc25d244f39..2077cff92c7 100644 --- a/code/modules/food/glass/bottle.dm +++ b/code/modules/food/glass/bottle.dm @@ -25,7 +25,7 @@ ..() update_icon() -/obj/item/reagent_containers/glass/bottle/attack_hand() +/obj/item/reagent_containers/glass/bottle/attack_hand(mob/user, list/params) ..() update_icon() diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 0b02b550462..31d2f096967 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -543,7 +543,7 @@ smoke.set_up(10, 0, get_turf(src), 300) smoke.start() -/obj/machinery/appliance/attack_hand(var/mob/user) +/obj/machinery/appliance/attack_hand(mob/user, list/params) if (cooking_objs.len) if (removal_menu(user)) return diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm index 6b20587ac0e..eaabee39ceb 100644 --- a/code/modules/food/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -74,7 +74,7 @@ src.go_out() return -/obj/machinery/gibber/attack_hand(mob/user as mob) +/obj/machinery/gibber/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return if(operating) diff --git a/code/modules/food/kitchen/icecream.dm b/code/modules/food/kitchen/icecream.dm index 3fa456faf14..ff4876c4d23 100644 --- a/code/modules/food/kitchen/icecream.dm +++ b/code/modules/food/kitchen/icecream.dm @@ -61,7 +61,7 @@ reagents.add_reagent("sugar", 5) reagents.add_reagent("ice", 5) -/obj/machinery/icecream_vat/attack_hand(mob/user as mob) +/obj/machinery/icecream_vat/attack_hand(mob/user, list/params) user.set_machine(src) interact(user) diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index b11f425bb09..b8d12647b6a 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -160,7 +160,7 @@ if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) attack_hand(user) -/obj/machinery/microwave/attack_hand(mob/user as mob) +/obj/machinery/microwave/attack_hand(mob/user, list/params) user.set_machine(src) interact(user) diff --git a/code/modules/food/kitchen/smartfridge.dm b/code/modules/food/kitchen/smartfridge.dm index 39c1094d642..94a3599924a 100644 --- a/code/modules/food/kitchen/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge.dm @@ -333,7 +333,7 @@ /obj/machinery/smartfridge/attack_ai(mob/user as mob) attack_hand(user) -/obj/machinery/smartfridge/attack_hand(mob/user as mob) +/obj/machinery/smartfridge/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return wires.Interact(user) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index d7842749ddc..4d296607dfe 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -67,7 +67,7 @@ return ..() -/obj/item/deck/attack_hand(mob/user as mob) +/obj/item/deck/attack_hand(mob/user, list/params) var/mob/living/carbon/human/H = user if(istype(src.loc, /obj/item/storage) || src == H.r_store || src == H.l_store || src.loc == user) // so objects can be removed from storage containers or pockets. also added a catch-all, so if it's in the mob you'll pick it up. ..() @@ -212,7 +212,10 @@ ..() -/obj/item/deck/attack_self() +/obj/item/deck/attack_self(mob/user) + . = ..() + if(.) + return shuffle() @@ -284,7 +287,10 @@ pickup_sound = 'sound/items/pickup/paper.ogg' -/obj/item/pack/attack_self(var/mob/user as mob) +/obj/item/pack/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("[user] rips open \the [src]!") var/obj/item/hand/H = new() @@ -343,7 +349,10 @@ if(!cards.len) qdel(src) -/obj/item/hand/attack_self(var/mob/user as mob) +/obj/item/hand/attack_self(mob/user) + . = ..() + if(.) + return concealed = !concealed update_icon() user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.") diff --git a/code/modules/games/dice.dm b/code/modules/games/dice.dm index 073f941f4dc..1f2bce18295 100644 --- a/code/modules/games/dice.dm +++ b/code/modules/games/dice.dm @@ -55,7 +55,10 @@ sides = 10 result = 10 -/obj/item/dice/attack_self(mob/user as mob) +/obj/item/dice/attack_self(mob/user) + . = ..() + if(.) + return rollDice(user, 0) /obj/item/dice/AltClick(mob/user) @@ -145,7 +148,10 @@ /obj/item/dice, ) -/obj/item/storage/dicecup/attack_self(mob/user as mob) +/obj/item/storage/dicecup/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("[user] shakes [src].", \ "You shake [src].", \ "You hear dice rolling.") diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 2808c559173..fa59b6d0e26 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -75,7 +75,7 @@ /obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) +/obj/machinery/computer/HolodeckControl/attack_hand(mob/user, list/params) if(..()) return user.set_machine(src) diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index bd199a3848b..4a211d951b2 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -303,7 +303,10 @@ return TRUE return FALSE -/obj/item/holo/esword/attack_self(mob/living/user as mob) +/obj/item/holo/esword/attack_self(mob/user) + . = ..() + if(.) + return active = !active if (active) force = 30 @@ -417,7 +420,7 @@ /obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob) to_chat(user, "The device is a solid button, there's nothing you can do with it!") -/obj/machinery/readybutton/attack_hand(mob/user as mob) +/obj/machinery/readybutton/attack_hand(mob/user, list/params) if(user.stat || machine_stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index 66a351a8c85..c8a013e7aa4 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -68,7 +68,7 @@ // floor_markings.layer = FLOOR_DECAL_LAYER update_icon() -/obj/machinery/station_map/attack_hand(var/mob/user) +/obj/machinery/station_map/attack_hand(mob/user, list/params) if(watching_mob && (watching_mob != user)) to_chat(user, "Someone else is currently watching the holomap.") return diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 64b2c00a41c..dccba24f9aa 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -122,7 +122,7 @@ qdel(src) return -/obj/machinery/beehive/attack_hand(var/mob/user) +/obj/machinery/beehive/attack_hand(mob/user, list/params) if(!closed) if(honeycombs < 100) to_chat(user, "There are no filled honeycombs.") @@ -228,7 +228,10 @@ icon = 'icons/obj/apiary_bees_etc.dmi' icon_state = "apiary" -/obj/item/beehive_assembly/attack_self(var/mob/user) +/obj/item/beehive_assembly/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You start assembling \the [src]...") if(do_after(user, 30)) user.visible_message("[user] constructs a beehive.", "You construct a beehive.") diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 7c9697131b0..d65650cb3f3 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -258,7 +258,10 @@ to_chat(user, "\The [src] has fallen to bits.") qdel(src) -/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user as mob) +/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user) + . = ..() + if(.) + return if(!seed) return diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index f4797b875ec..4d8fd05a68a 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -13,7 +13,10 @@ pixel_x = rand(-5,5) pixel_y = rand(-5,5) -/obj/item/disk/botany/attack_self(var/mob/user as mob) +/obj/item/disk/botany/attack_self(mob/user) + . = ..() + if(.) + return if(genes.len) var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", "No", "Yes") if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) @@ -60,7 +63,7 @@ /obj/machinery/botany/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/botany/attack_hand(mob/user as mob) +/obj/machinery/botany/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/botany/proc/finished_task() diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 59e31bf4703..dc0846e4ebb 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -204,7 +204,7 @@ /obj/item/seeds/whitebeetseed = 3 ) -/obj/machinery/seed_storage/attack_hand(mob/user as mob) +/obj/machinery/seed_storage/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index c59935217b9..af0a31b1928 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -34,7 +34,7 @@ density = 0 color = DEAD_PLANT_COLOUR -/obj/effect/dead_plant/attack_hand() +/obj/effect/dead_plant/attack_hand(mob/user, list/params) qdel(src) /obj/effect/dead_plant/attackby() diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 5ebd057ac11..ce0c8586f53 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -34,7 +34,7 @@ if(!M.apply_damage(base_damage, BRUTE, target_zone, blocked, soaked, used_weapon=src)) return 0 -/obj/effect/plant/attack_hand(var/mob/user) +/obj/effect/plant/attack_hand(mob/user, list/params) manual_unbuckle(user) /obj/effect/plant/attack_generic(var/mob/user) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index af03f1ce86b..ab52ac003e2 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -580,7 +580,7 @@ else if(harvest) harvest(user) -/obj/machinery/portable_atmospherics/hydroponics/attack_hand(mob/user as mob) +/obj/machinery/portable_atmospherics/hydroponics/attack_hand(mob/user, list/params) if(istype(usr,/mob/living/silicon)) return diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 5f5d59c7a53..86de480d08d 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -26,6 +26,9 @@ var/list/last_reagents /obj/item/analyzer/plant_analyzer/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/analyzer/plant_analyzer/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/instruments/instruments/item.dm b/code/modules/instruments/instruments/item.dm index 86cf6a60e1e..beb9b92f93f 100644 --- a/code/modules/instruments/instruments/item.dm +++ b/code/modules/instruments/instruments/item.dm @@ -51,6 +51,9 @@ return (BRUTELOSS) /obj/item/instrument/attack_self(mob/user) + . = ..() + if(.) + return if(!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return TRUE diff --git a/code/modules/instruments/instruments/stationary.dm b/code/modules/instruments/instruments/stationary.dm index d0665a71fff..390f10f10f1 100644 --- a/code/modules/instruments/instruments/stationary.dm +++ b/code/modules/instruments/instruments/stationary.dm @@ -23,7 +23,7 @@ return (usr.default_can_use_topic(src) < UI_UPDATE) //can play with MUTATION_TELEKINESIS and while resting because fun. /// CITRP EDIT UNTIL INTERACTION REFACTOR PORT! -/obj/structure/musician/attack_hand(mob/user) +/obj/structure/musician/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index e109d48d63c..78b5e81b07e 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -514,6 +514,9 @@ return ..() /obj/item/electronic_assembly/attack_self(mob/user) + . = ..() + if(.) + return if(!check_interactivity(user)) return ui_interact(user) diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm index f00e975bc3f..075e575188f 100644 --- a/code/modules/integrated_electronics/core/assemblies/clothing.dm +++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm @@ -69,6 +69,9 @@ ..() /obj/item/clothing/attack_self(mob/user) + . = ..() + if(.) + return if(EA && EA.opened) EA.attack_self(user) else diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index 6c11aaf69c9..7ff1ae9ea06 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -39,7 +39,10 @@ if(opened) icon_state = icon_state + "-open" -/obj/item/assembly/electronic_assembly/attack_self(mob/user as mob) +/obj/item/assembly/electronic_assembly/attack_self(mob/user) + . = ..() + if(.) + return if(EA) EA.attack_self(user) diff --git a/code/modules/integrated_electronics/core/detailer.dm b/code/modules/integrated_electronics/core/detailer.dm index 066a67ae771..e61b6cf9620 100644 --- a/code/modules/integrated_electronics/core/detailer.dm +++ b/code/modules/integrated_electronics/core/detailer.dm @@ -63,6 +63,9 @@ return TRUE /obj/item/integrated_electronics/detailer/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) // Leaving this commented out in case someone decides that this would be better as an "any color" selection system // Just uncomment this and get rid of all of the TGUI bullshit lol diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index 81745211cb6..0173b3eec56 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -170,7 +170,10 @@ dirty_items = TRUE return ..() -/obj/item/integrated_circuit_printer/attack_self(var/mob/user) +/obj/item/integrated_circuit_printer/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/integrated_circuit_printer/ui_state(mob/user, datum/tgui_module/module) diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index a12f68e1c83..9996b1b2b55 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -78,6 +78,9 @@ return /obj/item/integrated_electronics/wirer/attack_self(mob/user) + . = ..() + if(.) + return switch(mode) if(WIRE) mode = UNWIRE @@ -113,6 +116,9 @@ var/copy_values = FALSE /obj/item/integrated_electronics/debugger/attack_self(mob/user) + . = ..() + if(.) + return var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "copy", "list", "null")) if(!CanInteract(user, GLOB.physical_state)) return @@ -198,6 +204,9 @@ var/mode = 0 /obj/item/multitool/attack_self(mob/user) + . = ..() + if(.) + return if(selected_io) selected_io = null to_chat(user, "You clear the wired connection from the multitool.") diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index cd8bcb34045..3571166ea0b 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -291,7 +291,10 @@ set_pin_data(IC_OUTPUT, 4, contents) push_data() -/obj/item/integrated_circuit/manipulation/grabber/attack_self(var/mob/user) +/obj/item/integrated_circuit/manipulation/grabber/attack_self(mob/user) + . = ..() + if(.) + return drop_all() update_outputs() push_data() @@ -851,7 +854,10 @@ else ..() -/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user) +/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(mob/user) + . = ..() + if(.) + return if(installed_gun) user.put_in_hands_or_drop(installed_gun) to_chat(user, "You slide \the [installed_gun] out of the firing mechanism.") @@ -958,7 +964,10 @@ else return ..() -/obj/item/integrated_circuit/manipulation/grenade/attack_self(var/mob/user) +/obj/item/integrated_circuit/manipulation/grenade/attack_self(mob/user) + . = ..() + if(.) + return if(attached_grenade) user.visible_message("\The [user] removes \an [attached_grenade] from \the [src]!", "You remove \the [attached_grenade] from \the [src].") user.put_in_hands(attached_grenade) || attached_grenade.dropInto(loc) diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 5a4a2e1bfc1..279b164cf2c 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -87,6 +87,9 @@ O.push_data() /obj/item/integrated_circuit/memory/constant/attack_self(mob/user) + . = ..() + if(.) + return var/datum/integrated_io/O = outputs[1] var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) if(!CanInteract(user, GLOB.physical_state)) diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 6c5cd5b758e..0273315cd91 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -310,6 +310,9 @@ /obj/item/integrated_circuit/input/beaker_connector/attack_self(mob/user) + . = ..() + if(.) + return //Check if no beaker attached if(!current_beaker) to_chat(user, "There is currently no beaker attached.") diff --git a/code/modules/integrated_electronics/subtypes/smart.dm b/code/modules/integrated_electronics/subtypes/smart.dm index abb1dbdb9c7..c1bfe041fbf 100644 --- a/code/modules/integrated_electronics/subtypes/smart.dm +++ b/code/modules/integrated_electronics/subtypes/smart.dm @@ -168,7 +168,10 @@ O.brainmob.remote_control=src set_pin_data(IC_OUTPUT, 1, O) -/obj/item/integrated_circuit/input/mmi_tank/attack_self(var/mob/user) +/obj/item/integrated_circuit/input/mmi_tank/attack_self(mob/user) + . = ..() + if(.) + return if(installed_brain) RemoveBrain() to_chat(user, "You slowly lift [installed_brain] out of the MMI tank.") @@ -292,7 +295,10 @@ O.pai.remote_control=src set_pin_data(IC_OUTPUT, 1, O) -/obj/item/integrated_circuit/input/pAI_connector/attack_self(var/mob/user) +/obj/item/integrated_circuit/input/pAI_connector/attack_self(mob/user) + . = ..() + if(.) + return if(installed_pai) RemovepAI() to_chat(user, "You slowly disconnect the circuit's pins from the [installed_pai].") diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index d00fccbf267..400ccc5fb87 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -54,7 +54,7 @@ else ..() -/obj/structure/bookcase/attack_hand(var/mob/user as mob) +/obj/structure/bookcase/attack_hand(mob/user, list/params) if(contents.len) var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents if(choice) @@ -218,7 +218,10 @@ pickup_sound = 'sound/items/pickup/book.ogg' -/obj/item/book/attack_self(var/mob/user as mob) +/obj/item/book/attack_self(mob/user) + . = ..() + if(.) + return if(carved) if(store) to_chat(user, "[store] falls out of [title]!") @@ -373,7 +376,10 @@ dat += "Page [page][pages[page]]" user << browse(dat, "window=[name]") -/obj/item/book/bundle/attack_self(mob/user as mob) +/obj/item/book/bundle/attack_self(mob/user) + . = ..() + if(.) + return src.show_content(user) add_fingerprint(usr) update_icon() @@ -411,7 +417,10 @@ var/obj/item/book/book // Currently scanned book var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory -/obj/item/barcodescanner/attack_self(mob/user as mob) +/obj/item/barcodescanner/attack_self(mob/user) + . = ..() + if(.) + return mode += 1 if(mode > 3) mode = 0 diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 57e1a5d8051..6598b3e8abe 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -31,7 +31,7 @@ var/category = "Any" var/author -/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob) +/obj/machinery/librarypubliccomp/attack_hand(mob/user, list/params) usr.set_machine(src) var/dat = "Library Visitor\n" // switch(screenstate) @@ -160,7 +160,7 @@ var/obj/item/book/M = new path(null) all_books[M.title] = M -/obj/machinery/librarycomp/attack_hand(var/mob/user as mob) +/obj/machinery/librarycomp/attack_hand(mob/user, list/params) usr.set_machine(src) var/dat = "Book Inventory Management\n" // switch(screenstate) @@ -476,7 +476,7 @@ if(!user.attempt_insert_item_for_installation(I, src)) return -/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob) +/obj/machinery/libraryscanner/attack_hand(mob/user, list/params) usr.set_machine(src) var/dat = "Scanner Control Interface\n" // if(cache) diff --git a/code/modules/looking_glass/lg_console.dm b/code/modules/looking_glass/lg_console.dm index aea4baa5da2..ee858a813d3 100644 --- a/code/modules/looking_glass/lg_console.dm +++ b/code/modules/looking_glass/lg_console.dm @@ -52,7 +52,7 @@ /obj/machinery/computer/looking_glass/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/looking_glass/attack_hand(var/mob/user as mob) +/obj/machinery/computer/looking_glass/attack_hand(mob/user, list/params) if(..()) return diff --git a/code/modules/lore_codex/codex.dm b/code/modules/lore_codex/codex.dm index 52fd5636d09..813841217fd 100644 --- a/code/modules/lore_codex/codex.dm +++ b/code/modules/lore_codex/codex.dm @@ -13,6 +13,9 @@ . = ..() /obj/item/book/codex/attack_self(mob/user) + . = ..() + if(.) + return if(!tree) tree = new(src, root_type) icon_state = "[initial(icon_state)]-open" diff --git a/code/modules/maps/away_missions/archive/wildwest.dm b/code/modules/maps/away_missions/archive/wildwest.dm index 393fb5ab77c..1f3e1437a5e 100644 --- a/code/modules/maps/away_missions/archive/wildwest.dm +++ b/code/modules/maps/away_missions/archive/wildwest.dm @@ -20,7 +20,7 @@ var/chargesa = 1 var/insistinga = 0 -/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user as mob) +/obj/machinery/wish_granter_dark/attack_hand(mob/user, list/params) usr.set_machine(src) if(chargesa <= 0) diff --git a/code/modules/maps/misc_maps/lavaland/_lavaland.dm b/code/modules/maps/misc_maps/lavaland/_lavaland.dm index d1bcd242b98..7850f86af41 100644 --- a/code/modules/maps/misc_maps/lavaland/_lavaland.dm +++ b/code/modules/maps/misc_maps/lavaland/_lavaland.dm @@ -22,7 +22,7 @@ use_power = USE_POWER_IDLE interact_offline = 0 -/obj/machinery/lavaland_entryportal/attack_hand(mob/living/user) +/obj/machinery/lavaland_entryportal/attack_hand(mob/user, list/params) if(istype(user, /mob/living/silicon/ai)) // lets not teleport AI cores return if(inoperable(MAINT)) @@ -58,7 +58,7 @@ anchored = 1 -/obj/effect/lavaland_exitportal/attack_hand(mob/living/user) +/obj/effect/lavaland_exitportal/attack_hand(mob/user, list/params) if(istype(usr, /mob/living/silicon/ai)) return if(do_after(user, 10)) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 6e439a3e269..494893deb77 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -77,7 +77,10 @@ if(M) M.update_strings() return transfer -/obj/item/stack/material/attack_self(var/mob/user) +/obj/item/stack/material/attack_self(mob/user) + . = ..() + if(.) + return if(!allow_window_autobuild || !material.build_windows(user, src)) ..() @@ -284,7 +287,7 @@ update_mass() return -/obj/item/stack/material/supermatter/attack_hand(mob/user) +/obj/item/stack/material/supermatter/attack_hand(mob/user, list/params) . = ..() update_mass() diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 89ab9cef858..d11c3d2d897 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -183,7 +183,7 @@ return ..() -/obj/machinery/mining/drill/attack_hand(mob/user as mob) +/obj/machinery/mining/drill/attack_hand(mob/user, list/params) check_supports() if (panel_open && cell && user.Adjacent(src)) diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 5255a3cc9a0..aa811b2bea8 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -28,6 +28,9 @@ . = ..() /obj/item/mining_scanner/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You begin sweeping \the [src] about, scanning for metal deposits.") playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6) @@ -71,7 +74,7 @@ if(length(metals)) for(var/ore_type in metals) var/result = "no sign" - + if(exact_amount) result = "- [metals[ore_type]] of [ore_type]" else diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index be4aee97cdd..65dffe3c1dd 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -30,6 +30,9 @@ var/global/list/total_extraction_beacons = list() . +="It has [uses_left] use\s remaining." /obj/item/extraction_pack/attack_self(mob/user) + . = ..() + if(.) + return var/list/possible_beacons = list() for(var/B in global.total_extraction_beacons) var/obj/structure/extraction_point/EP = B @@ -163,6 +166,9 @@ var/global/list/total_extraction_beacons = list() icon_state = "subspace_amplifier" /obj/item/fulton_core/attack_self(mob/user) + . = ..() + if(.) + return if(do_after(user,15,target = user) && !QDELETED(src)) new /obj/structure/extraction_point(get_turf(user)) qdel(src) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index f6bb14d8e60..153fd2e743b 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -30,7 +30,7 @@ inserted_id.forceMove(loc) //Prevents deconstructing from deleting whatever ID was inside it. . = ..() -/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user) +/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user, list/params) if(..()) return interact(user) diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index 3fe876e9994..642e61ac042 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -24,7 +24,7 @@ stack_trace("Stacking machine console at [COORD(src)] could not find its machine!") qdel(src) -/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user) +/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user, list/params) add_fingerprint(user) interact(user) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index ec2ad41a799..d4b3459749b 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -194,7 +194,10 @@ active = 0 update_icon() -/obj/item/pickaxe/tyrmalin/attack_self(mob/user as mob) +/obj/item/pickaxe/tyrmalin/attack_self(mob/user) + . = ..() + if(.) + return if(!active) turnOn(user) else @@ -358,7 +361,7 @@ else ..() -/obj/item/stack/flag/attack_hand(user as mob) +/obj/item/stack/flag/attack_hand(mob/user, list/params) if(upright) upright = 0 icon_state = base_state @@ -367,7 +370,10 @@ else ..() -/obj/item/stack/flag/attack_self(mob/user as mob) +/obj/item/stack/flag/attack_self(mob/user) + . = ..() + if(.) + return var/obj/item/stack/flag/F = locate() in get_turf(src) diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index 0bea5d5a291..2637c92175c 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -123,7 +123,7 @@ else icon_state = "[initial(icon_state)]-off" -/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user) +/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user, list/params) if(..()) return interact(user) diff --git a/code/modules/mining/resonator.dm b/code/modules/mining/resonator.dm index 7c77136c833..7d96bd50f77 100644 --- a/code/modules/mining/resonator.dm +++ b/code/modules/mining/resonator.dm @@ -34,6 +34,9 @@ fieldsactive-- /obj/item/resonator/attack_self(mob/user) + . = ..() + if(.) + return if(burst_time == 50) burst_time = 30 to_chat(user, "You set the resonator's fields to detonate after 3 seconds.") diff --git a/code/modules/mining/resonator_vr.dm b/code/modules/mining/resonator_vr.dm index a5a61cfad01..4083bf07b89 100644 --- a/code/modules/mining/resonator_vr.dm +++ b/code/modules/mining/resonator_vr.dm @@ -38,6 +38,9 @@ fieldsactive-- /obj/item/resonator/attack_self(mob/user) + . = ..() + if(.) + return if(burst_time == 50) burst_time = 30 to_chat(user, "You set the resonator's fields to detonate after 3 seconds.") diff --git a/code/modules/mining/shelter_atoms.dm b/code/modules/mining/shelter_atoms.dm index d77756aae00..72ff1f7b7cd 100644 --- a/code/modules/mining/shelter_atoms.dm +++ b/code/modules/mining/shelter_atoms.dm @@ -35,7 +35,10 @@ . += "This capsule has the [template.name] stored." . += template.description -/obj/item/survivalcapsule/attack_self() +/obj/item/survivalcapsule/attack_self(mob/user) + . = ..() + if(.) + return //Can't grab when capsule is New() because templates aren't loaded then get_template() if(!used) @@ -210,7 +213,7 @@ return FALSE -/obj/item/gps/computer/attack_hand(mob/user) +/obj/item/gps/computer/attack_hand(mob/user, list/params) attack_self(user) //Bed diff --git a/code/modules/mining/vertibore.dm b/code/modules/mining/vertibore.dm index fdc5d52ce87..e5db09d46f3 100644 --- a/code/modules/mining/vertibore.dm +++ b/code/modules/mining/vertibore.dm @@ -74,6 +74,9 @@ . = ..() /obj/item/vertibore/attack_self(mob/user) + . = ..() + if(.) + return if(mat_cost > mat_storage) to_chat(user, "The [src] shudders, the phoron feeding mechanism attempting to move things that aren't there.") return diff --git a/code/modules/mob/grab.dm b/code/modules/mob/grab.dm index 165fa00c248..e34262f400f 100644 --- a/code/modules/mob/grab.dm +++ b/code/modules/mob/grab.dm @@ -199,7 +199,10 @@ if(affecting.eye_blind < 3) affecting.Blind(3) -/obj/item/grab/attack_self() +/obj/item/grab/attack_self(mob/user) + . = ..() + if(.) + return return s_click(hud) /obj/item/grab/throw_resolve_actual(mob/user) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index ae383320ebe..d593e926cb2 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -140,7 +140,7 @@ else icon_state = "cleanbot[on]" -/mob/living/bot/cleanbot/attack_hand(var/mob/user) +/mob/living/bot/cleanbot/attack_hand(mob/user, list/params) ui_interact(user) /mob/living/bot/cleanbot/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 99a38a7768e..a2dbcb6f28f 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -69,7 +69,7 @@ return data -/mob/living/bot/farmbot/attack_hand(mob/user) +/mob/living/bot/farmbot/attack_hand(mob/user, list/params) . = ..() if(.) return @@ -404,5 +404,5 @@ created_name = t -/obj/item/farmbot_arm_assembly/attack_hand(mob/user as mob) +/obj/item/farmbot_arm_assembly/attack_hand(mob/user, list/params) return //it's a converted watertank, no you cannot pick it up and put it in your backpack diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 4f1fcad9d8c..52a232169af 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -89,7 +89,7 @@ return data -/mob/living/bot/floorbot/attack_hand(var/mob/user) +/mob/living/bot/floorbot/attack_hand(mob/user, list/params) ui_interact(user) /mob/living/bot/floorbot/emag_act(var/remaining_charges, var/mob/user) diff --git a/code/modules/mob/living/bot/medibot.dm b/code/modules/mob/living/bot/medibot.dm index 72bd61e023c..d57139e2a2a 100644 --- a/code/modules/mob/living/bot/medibot.dm +++ b/code/modules/mob/living/bot/medibot.dm @@ -221,7 +221,13 @@ busy = FALSE update_appearance() -/mob/living/bot/medibot/attack_hand(mob/living/carbon/human/attacker) +/mob/living/bot/medibot/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/attacker = user + if(!istype(attacker)) + return if(attacker.a_intent == INTENT_DISARM && !is_tipped) attacker.visible_message( SPAN_DANGER("[attacker] begins tipping over [src]."), diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index b2724a6cd83..c90b171aba1 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -162,7 +162,7 @@ return data -/mob/living/bot/secbot/attack_hand(var/mob/user) +/mob/living/bot/secbot/attack_hand(mob/user, list/params) ui_interact(user) /mob/living/bot/secbot/ui_act(action, list/params, datum/tgui/ui) diff --git a/code/modules/mob/living/carbon/alien/alien_attacks.dm b/code/modules/mob/living/carbon/alien/alien_attacks.dm index b9f12290e0f..875d9a5d5ad 100644 --- a/code/modules/mob/living/carbon/alien/alien_attacks.dm +++ b/code/modules/mob/living/carbon/alien/alien_attacks.dm @@ -3,57 +3,61 @@ /mob/living/carbon/alien/attack_ui(slot_id) return -/mob/living/carbon/alien/attack_hand(mob/living/carbon/M as mob) +/mob/living/carbon/alien/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/L = user + if(!istype(L)) + return - ..() - - switch(M.a_intent) + switch(L.a_intent) if (INTENT_HELP) - help_shake_act(M) + help_shake_act(L) if (INTENT_GRAB) - if (M == src) + if (L == src) return - var/obj/item/grab/G = new /obj/item/grab( M, src ) + var/obj/item/grab/G = new /obj/item/grab( L, src ) - M.put_in_active_hand(G) + L.put_in_active_hand(G) grabbed_by += G G.affecting = src G.synch() - LAssailant = M + LAssailant = L playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("[] has grabbed [] passively!", M, src), 1) + O.show_message(text("[] has grabbed [] passively!", L, src), 1) else var/damage = rand(1, 9) if (prob(90)) - if (MUTATION_HULK in M.mutations) + if (MUTATION_HULK in L.mutations) damage += 5 spawn(0) Unconscious(1) - step_away(src,M,15) + step_away(src,L,15) sleep(3) - step_away(src,M,15) + step_away(src,L,15) playsound(loc, "punch", 25, 1, -1) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("[] has punched []!", M, src), 1) + O.show_message(text("[] has punched []!", L, src), 1) if (damage > 4.9) Weaken(rand(10,15)) - for(var/mob/O in viewers(M, null)) + for(var/mob/O in viewers(L, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("[] has weakened []!", M, src), 1, "You hear someone fall.", 2) + O.show_message(text("[] has weakened []!", L, src), 1, "You hear someone fall.", 2) adjustBruteLoss(damage) updatehealth() else playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("[] has attempted to punch []!", M, src), 1) + O.show_message(text("[] has attempted to punch []!", L, src), 1) return diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index a533a1755d6..60103b2af09 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -109,7 +109,10 @@ ..() //TODO: ORGAN REMOVAL UPDATE. Make the brain remain in the MMI so it doesn't lose organ data. -/obj/item/mmi/attack_self(mob/user as mob) +/obj/item/mmi/attack_self(mob/user) + . = ..() + if(.) + return if(!brainmob) to_chat(user, "You upend the MMI, but there's nothing in it.") else if(locked) @@ -246,7 +249,10 @@ H.mind.transfer_to(brainmob) return -/obj/item/mmi/digital/attack_self(mob/user as mob) +/obj/item/mmi/digital/attack_self(mob/user) + . = ..() + if(.) + return if(brainmob && !brainmob.key && searching == 0) //Start the process of searching for a new user. to_chat(user, "You carefully locate the manual activation switch and start the [src]'s boot process.") diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 8dddbbdbf4e..a488416b617 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -34,6 +34,9 @@ question(ghost) /obj/item/mmi/digital/posibrain/attack_self(mob/user) + . = ..() + if(.) + return if(brainmob && !brainmob.key && searching == 0) //Start the process of searching for a new user. to_chat(user, SPAN_NOTICE("You carefully locate the manual activation switch and start the positronic brain's boot process.")) diff --git a/code/modules/mob/living/carbon/brain/robot.dm b/code/modules/mob/living/carbon/brain/robot.dm index 3babb3cfd6a..ebb046540d5 100644 --- a/code/modules/mob/living/carbon/brain/robot.dm +++ b/code/modules/mob/living/carbon/brain/robot.dm @@ -29,5 +29,8 @@ to_chat(brainmob, "You feel slightly disoriented. That's normal when you're little more than a complex circuit.") return -/obj/item/mmi/digital/robot/attack_self(mob/user as mob) +/obj/item/mmi/digital/robot/attack_self(mob/user) + . = ..() + if(.) + return return //This object is technically a brain, and should not be dumping brains out of itself like its parent object does. diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b1adfcfae65..c4112a297cb 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -44,8 +44,10 @@ N.show_message(text("[M] bursts out of [src]!"), 2) ..() -/mob/living/carbon/attack_hand(mob/M as mob) - if(!istype(M, /mob/living/carbon)) return ..() +/mob/living/carbon/attack_hand(mob/user, list/params) + var/mob/living/carbon/M = user + if(!istype(M)) + return ..() if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 2f6db0f7f4c..79dbc5ee222 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -25,9 +25,9 @@ return u_attack return null -/mob/living/carbon/human/attack_hand(mob/living/M as mob) - var/datum/gender/TT = GLOB.gender_datums[M.get_visible_gender()] - var/mob/living/carbon/human/H = M +/mob/living/carbon/human/attack_hand(mob/user, list/params) + var/datum/gender/TT = GLOB.gender_datums[user.get_visible_gender()] + var/mob/living/carbon/human/H = user if(istype(H)) var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] if(H.hand) @@ -37,7 +37,7 @@ return if(H.lying) return - M.break_cloak() + user.break_cloak() . = ..() if(. & CLICKCHAIN_DO_NOT_PROPAGATE) @@ -57,56 +57,60 @@ H.do_attack_animation(src) return FALSE - if(istype(M,/mob/living/carbon)) - var/mob/living/carbon/C = M + if(istype(user,/mob/living/carbon)) + var/mob/living/carbon/C = user C.spread_disease_to(src, "Contact") - switch(M.a_intent) + var/mob/living/L = user + if(!istype(L)) + return + + switch(L.a_intent) if(INTENT_HELP) if (istype(H) && attempt_to_scoop(H)) return 0; - if(iscarbon(M) && attempt_cpr_interaction(M)) + if(iscarbon(L) && attempt_cpr_interaction(L)) return TRUE - else if(!(M == src && apply_pressure(M, M.zone_sel.selecting))) - help_shake_act(M) + else if(!(L == src && apply_pressure(L, L.zone_sel.selecting))) + help_shake_act(L) return TRUE if(INTENT_GRAB) - if(M == src || anchored) + if(L == src || anchored) return 0 for(var/obj/item/grab/G in src.grabbed_by) - if(G.assailant == M) - to_chat(M, "You already grabbed [src].") + if(G.assailant == L) + to_chat(L, "You already grabbed [src].") return if(w_uniform) - w_uniform.add_fingerprint(M) + w_uniform.add_fingerprint(L) - var/obj/item/grab/G = new /obj/item/grab(M, src) + var/obj/item/grab/G = new /obj/item/grab(L, src) if(buckled) - to_chat(M, "You cannot grab [src], [TT.he] is buckled in!") + to_chat(L, "You cannot grab [src], [TT.he] is buckled in!") return if(!G) //the grab will delete itself in New if affecting is anchored return - M.put_in_active_hand(G) + L.put_in_active_hand(G) G.synch() - LAssailant = M + LAssailant = L H.do_attack_animation(src) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has grabbed [src] [(M.zone_sel.selecting == BP_L_HAND || M.zone_sel.selecting == BP_R_HAND)? "by [(gender==FEMALE)? "her" : ((gender==MALE)? "his": "their")] hands": "passively"]!") + visible_message("[L] has grabbed [src] [(L.zone_sel.selecting == BP_L_HAND || L.zone_sel.selecting == BP_R_HAND)? "by [(gender==FEMALE)? "her" : ((gender==MALE)? "his": "their")] hands": "passively"]!") return TRUE if(INTENT_HARM) - if(M.zone_sel.selecting == "mouth" && wear_mask && istype(wear_mask, /obj/item/grenade)) + if(L.zone_sel.selecting == "mouth" && wear_mask && istype(wear_mask, /obj/item/grenade)) var/obj/item/grenade/G = wear_mask if(!G.active) - visible_message("\The [M] pulls the pin from \the [src]'s [G.name]!") - G.activate(M) + visible_message("\The [L] pulls the pin from \the [src]'s [G.name]!") + G.activate(L) update_inv_wear_mask() else - to_chat(M, "\The [G] is already primed! Run!") + to_chat(L, "\The [G] is already primed! Run!") return if(!istype(H)) @@ -120,7 +124,7 @@ var/obj/item/organ/external/affecting = get_organ(hit_zone) if(!affecting || affecting.is_stump()) - to_chat(M, "They are missing that limb!") + to_chat(L, "They are missing that limb!") return TRUE switch(src.a_intent) @@ -133,7 +137,7 @@ if(src.canmove && src!=H && prob(20)) block = 1 - if (M.grabbed_by.len) + if (L.grabbed_by.len) // Someone got a good grip on them, they won't be able to do much damage rand_damage = max(1, rand_damage - 2) @@ -237,11 +241,11 @@ if(INTENT_DISARM) add_attack_logs(H,src,"Disarmed") - M.do_attack_animation(src) + L.do_attack_animation(src) if(w_uniform) - w_uniform.add_fingerprint(M) - var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) + w_uniform.add_fingerprint(L) + var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting)) var/list/holding = list(get_active_held_item() = 40, get_inactive_held_item = 20) @@ -257,7 +261,7 @@ return W.afterattack(target,src) if(last_push_time + 30 > world.time) - visible_message("[M] has weakly pushed [src]!") + visible_message("[L] has weakly pushed [src]!") return var/randn = rand(1, 100) @@ -267,29 +271,29 @@ apply_effect(3, WEAKEN, armor_check) playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(armor_check < 60) - if(M.zone_sel.selecting == BP_L_LEG || M.zone_sel.selecting == BP_R_LEG || M.zone_sel.selecting == BP_L_FOOT || M.zone_sel.selecting == BP_R_FOOT) - visible_message("[M] has leg swept [src]!") + if(L.zone_sel.selecting == BP_L_LEG || L.zone_sel.selecting == BP_R_LEG || L.zone_sel.selecting == BP_L_FOOT || L.zone_sel.selecting == BP_R_FOOT) + visible_message("[L] has leg swept [src]!") else - visible_message("[M] has pushed [src]!") + visible_message("[L] has pushed [src]!") else - visible_message("[M] attempted to push [src]!") + visible_message("[L] attempted to push [src]!") return if(randn <= 60) //See about breaking grips or pulls - if(break_all_grabs(M)) + if(break_all_grabs(L)) playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) return //Actually disarm them drop_all_held_items() - visible_message("[M] has disarmed [src]!") + visible_message("[L] has disarmed [src]!") playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) return playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message(" [M] attempted to disarm [src]!") + visible_message(" [L] attempted to disarm [src]!") return /mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) diff --git a/code/modules/mob/living/carbon/human/traits/weaver_objs.dm b/code/modules/mob/living/carbon/human/traits/weaver_objs.dm index 531754f5cee..76eb57f5e56 100644 --- a/code/modules/mob/living/carbon/human/traits/weaver_objs.dm +++ b/code/modules/mob/living/carbon/human/traits/weaver_objs.dm @@ -34,7 +34,7 @@ var/global/list/weavable_items = list() if(damage) qdel(src) -/obj/effect/weaversilk/attack_hand(mob/user as mob) +/obj/effect/weaversilk/attack_hand(mob/user, list/params) ..() if(user.a_intent == INTENT_HARM) to_chat(user,"You easily tear down [name].") @@ -80,7 +80,7 @@ var/global/list/weavable_items = list() return ..() -/obj/structure/bed/double/weaversilk_nest/attack_hand(mob/user as mob) +/obj/structure/bed/double/weaversilk_nest/attack_hand(mob/user, list/params) ..() if(user.a_intent == INTENT_HARM && !has_buckled_mobs()) to_chat(user,"You easily tear down [name].") diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 4b95c0fe64f..863577e8350 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -209,7 +209,7 @@ /mob/living/carbon/slime/attack_ui(slot) return -/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob) +/mob/living/carbon/slime/attack_hand(mob/user, list/params) ..() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 7c4cca78f0e..cb6c52525ff 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -93,8 +93,13 @@ return 0 // Clicking with an empty hand -/mob/living/attack_hand(mob/living/L) - ..() +/mob/living/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/L = user + if(!istype(L)) + return if(istype(L) && L.a_intent != INTENT_HELP) if(ai_holder) // Using disarm, grab, or harm intent is considered a hostile action to the mob's AI. ai_holder.react_to_attack(L) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index cc4332bb303..01528514604 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -380,7 +380,7 @@ if(stat != 2) close_up() return -/mob/living/silicon/pai/attack_hand(mob/user as mob) +/mob/living/silicon/pai/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_HELP) visible_message("[user.name] pats [src].") else diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index 33fc311228d..15ebf45560c 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -22,6 +22,9 @@ var/emagged = 0 /obj/item/dogborg/jaws/small/attack_self(mob/user) + . = ..() + if(.) + return var/mob/living/silicon/robot/R = user if(R.emagged || R.emag_items) emagged = !emagged @@ -60,6 +63,9 @@ w_class = ITEMSIZE_TINY /obj/item/dogborg/boop_module/attack_self(mob/user) + . = ..() + if(.) + return if (!( istype(user.loc, /turf) )) return @@ -187,6 +193,9 @@ . += "[src] is dry." /obj/item/dogborg/tongue/attack_self(mob/user) + . = ..() + if(.) + return var/mob/living/silicon/robot/R = user if(R.emagged || R.emag_items) emagged = !emagged @@ -295,6 +304,9 @@ var/enabled = FALSE /obj/item/pupscrubber/attack_self(mob/user) + . = ..() + if(.) + return var/mob/living/silicon/robot/R = user if(!enabled) R.scrubbing = TRUE @@ -337,7 +349,10 @@ var/cooldown = 0 var/datum/matter_synth/glass = null -/obj/item/lightreplacer/dogborg/attack_self(mob/user)//Recharger refill is so last season. Now we recycle without magic! +/obj/item/lightreplacer/dogborg/attack_self(mob/user) + . = ..() + if(.) + return//Recharger refill is so last season. Now we recycle without magic! if(uses >= max_uses) to_chat(user, "[src.name] is full.") return @@ -368,6 +383,9 @@ throw_force = 0 /obj/item/dogborg/pounce/attack_self(mob/user) + . = ..() + if(.) + return var/mob/living/silicon/robot/R = user R.leap() diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index fafc57cdf3b..e4faba9cfd7 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -178,6 +178,9 @@ hound.cell.charge = hound.cell.charge - amt /obj/item/dogborg/sleeper/attack_self(mob/user) + . = ..() + if(.) + return if(..()) return sleeperUI(user) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index a5733855a9e..0c0d15eb839 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -19,7 +19,7 @@ return UI_CLOSE return ..() -/obj/machinery/computer/drone_control/attack_hand(var/mob/user as mob) +/obj/machinery/computer/drone_control/attack_hand(mob/user, list/params) if(..()) return 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 b30b4ed247f..7c4347a92c9 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -260,7 +260,10 @@ /obj/item/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item -/obj/item/gripper/no_use/attack_self(mob/user as mob) +/obj/item/gripper/no_use/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/gripper/no_use/loader //This is used to disallow building with metal. @@ -272,7 +275,10 @@ /obj/item/stack/material ) -/obj/item/gripper/attack_self(mob/user as mob) +/obj/item/gripper/attack_self(mob/user) + . = ..() + if(.) + return if(wrapped) return wrapped.attack_self(user) return ..() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 07001f2e878..d2e1dbd62c0 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -179,7 +179,7 @@ var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice] chosen_fabricator.create_drone(src.client) -/obj/machinery/drone_fabricator/attack_hand(mob/user) +/obj/machinery/drone_fabricator/attack_hand(mob/user, list/params) if(!is_spawn_safe) is_spawn_safe = TRUE to_chat(user, "You inform the fabricator that it is safe for drones to roam around.") diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7eacac4b686..f603992ee15 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -811,7 +811,7 @@ module = null updatename("Default") -/mob/living/silicon/robot/attack_hand(mob/user) +/mob/living/silicon/robot/attack_hand(mob/user, list/params) . = ..() if(. & CLICKCHAIN_DO_NOT_PROPAGATE) return diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 52ddad2bd8a..b439a51a6c5 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -16,7 +16,10 @@ . = ..() files = new /datum/research/techonly(src) //Setup the research data holder. -/obj/item/portable_destructive_analyzer/attack_self(user as mob) +/obj/item/portable_destructive_analyzer/attack_self(mob/user) + . = ..() + if(.) + return var/response = alert(user, "Analyzing the item inside will *DESTROY* the item for good.\n\ Syncing to the research server will send the data that is stored inside to research.\n\ Ejecting will place the loaded item onto the floor.", @@ -271,7 +274,10 @@ name = "Printing Pen" var/mode = 1 -/obj/item/pen/robopen/attack_self(mob/user as mob) +/obj/item/pen/robopen/attack_self(mob/user) + . = ..() + if(.) + return var/choice = input("Would you like to change colour or mode?") as null|anything in list("Colour","Mode") if(!choice) return @@ -329,7 +335,10 @@ 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(mob/user) + . = ..() + if(.) + return deploy_paper(get_turf(src)) /obj/item/form_printer/proc/deploy_paper(var/turf/T) @@ -359,7 +368,10 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/borg/combat/shield/attack_self(var/mob/living/user) +/obj/item/borg/combat/shield/attack_self(mob/user) + . = ..() + if(.) + return set_shield_level() /obj/item/borg/combat/shield/process(delta_time) @@ -431,7 +443,10 @@ . += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored." . += "It is set to deploy [mode ? "doors" : "walls"]" -/obj/item/inflatable_dispenser/attack_self() +/obj/item/inflatable_dispenser/attack_self(mob/user) + . = ..() + if(.) + return mode = !mode to_chat(usr, "You set \the [src] to deploy [mode ? "doors" : "walls"].") diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index f0b83db6899..fe1ecde38aa 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -1,7 +1,12 @@ // When someone clicks us with an empty hand -/mob/living/simple_mob/attack_hand(mob/living/L) - ..() +/mob/living/simple_mob/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/L = user + if(!istype(L)) + return switch(L.a_intent) if(INTENT_HELP) if(health > 0) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm index 0c13a1e1cd8..79174de7049 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm @@ -62,7 +62,10 @@ if(udder && prob(5)) udder.add_reagent("milk", rand(5, 10)) -/mob/living/simple_mob/animal/passive/cow/attack_hand(mob/living/carbon/M as mob) +/mob/living/simple_mob/animal/passive/cow/attack_hand(mob/user, list/params) + var/mob/living/M = user + if(!istype(M)) + return if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead) M.visible_message("[M] tips over [src].","You tip over [src].") Weaken(30) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm index 442a60fc06d..c6a880f4034 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm @@ -110,8 +110,13 @@ var/obj/belly/B = loc sting(B.owner) -/mob/living/simple_mob/animal/passive/fish/koi/poisonous/attack_hand(mob/living/L) - ..() +/mob/living/simple_mob/animal/passive/fish/koi/poisonous/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/L = user + if(!istype(L)) + return if(isliving(L) && Adjacent(L)) var/mob/living/M = L visible_message("\The [src][is_dead()?"'s corpse":""] flails at [M]!") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm index 46605505341..abd414b2e89 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm @@ -145,14 +145,20 @@ emote_hear = list("squeeks","squeaks","squiks") emote_see = list("runs in a circle", "shakes", "scritches at something") -/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/living/hander) +/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/user, list/params) + var/mob/living/hander = user + if(!istype(hander)) + return if(hander.a_intent == INTENT_HELP) //if lime intent get_scooped(hander) //get scooped else ..() -/obj/item/holder/mouse/attack_self(var/mob/U) +/obj/item/holder/mouse/attack_self(mob/user) + . = ..() + if(.) + return for(var/mob/living/simple_mob/M in src.contents) - if((INTENT_HELP) && U.canClick()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects - U.setClickCooldown(U.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this - U.visible_message("[U] [M.response_help] \the [M].") + if((INTENT_HELP) && user.canClick()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects + user.setClickCooldown(user.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this + user.visible_message("[user] [M.response_help] \the [M].") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm index 39329e556f4..8b8d0817d79 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm @@ -189,7 +189,10 @@ icon_state = "box" var/cattype = /mob/living/simple_mob/animal/passive/cat -/obj/item/cat_box/attack_self(var/mob/user) +/obj/item/cat_box/attack_self(mob/user) + . = ..() + if(.) + return var/turf/catturf = get_turf(src) to_chat(user, "You peek into \the [name]-- and a cat jumps out!") new cattype(catturf) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm index 46bf6de79fa..bdee4c0091a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm @@ -72,7 +72,10 @@ return ..() // Clicked on by empty hand. -/mob/living/simple_mob/animal/passive/bird/parrot/attack_hand(mob/living/L) +/mob/living/simple_mob/animal/passive/bird/parrot/attack_hand(mob/user, list/params) + var/mob/living/L = user + if(!istype(L)) + return if(L.a_intent == INTENT_GRAB && my_headset) remove_headset(L) else diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm index 75f09630a40..82d92282b05 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm @@ -52,7 +52,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Eddy/attack_hand() +/mob/living/simple_mob/horror/Eddy/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm index 0356e37f13a..f36106255b5 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm @@ -53,7 +53,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Master/attack_hand() +/mob/living/simple_mob/horror/Master/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm index 9f3a7a657e6..b00e8549a2c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm @@ -54,7 +54,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Rickey/attack_hand() +/mob/living/simple_mob/horror/Rickey/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm index 9a49c2c591b..cf8dd4bf90e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm @@ -53,7 +53,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Helix/attack_hand() +/mob/living/simple_mob/horror/Helix/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm index 49de3ebe66a..3eb1df4c103 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm @@ -58,7 +58,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Steve/attack_hand() +/mob/living/simple_mob/horror/Steve/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm index 5e457e5f105..a4ef7c85111 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm @@ -54,7 +54,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Willy/attack_hand() +/mob/living/simple_mob/horror/Willy/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm b/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm index 1841bce82f0..3bd478fa12b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm @@ -52,7 +52,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/bradley/attack_hand() +/mob/living/simple_mob/horror/bradley/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm b/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm index 659f391243d..7acfd47cb6f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm @@ -51,7 +51,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/Sally/attack_hand() +/mob/living/simple_mob/horror/Sally/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm b/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm index 5a7bc3c2a04..40f40b2620c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm @@ -52,7 +52,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/BigTim/attack_hand() +/mob/living/simple_mob/horror/BigTim/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm b/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm index 0f3c44b82df..584da79a915 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm @@ -52,7 +52,7 @@ playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() -/mob/living/simple_mob/horror/TinyTim/attack_hand() +/mob/living/simple_mob/horror/TinyTim/attack_hand(mob/user, list/params) playsound(src, 'sound/h_sounds/holla.ogg', 50, 1) ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm index a62ecc3911c..fcf5e4d8f80 100644 --- a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm +++ b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm @@ -54,7 +54,10 @@ return PROJECTILE_FORCE_MISS -/mob/living/simple_mob/illusion/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_mob/illusion/attack_hand(mob/user, list/params) + var/mob/living/M = user + if(!istype(M)) + return if(!realistic) playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) visible_message(SPAN_WARNING( "\The [M]'s hand goes through \the [src]!")) diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm index c2b4e4fcf8d..a28cae4f0d8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm @@ -161,7 +161,10 @@ adjustBruteLoss(-1) // Clicked on by empty hand. -/mob/living/simple_mob/slime/attack_hand(mob/living/L) +/mob/living/simple_mob/slime/attack_hand(mob/user, list/params) + var/mob/living/L = user + if(!istype(L)) + return if(L.a_intent == INTENT_GRAB && hat) remove_hat(L) else diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm index 0a644124227..cce47e639c8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm @@ -2,7 +2,10 @@ // Clicked on by empty hand. // Handles trying to wrestle a slime off of someone being eatten. -/mob/living/simple_mob/slime/xenobio/attack_hand(mob/living/L) +/mob/living/simple_mob/slime/xenobio/attack_hand(mob/user, list/params) + var/mob/living/L = user + if(!istype(L)) + return if(victim) // Are we eating someone? var/fail_odds = 30 if(victim == L) // Harder to get the slime off if it's you that is being eatten. diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/c_pet.dm b/code/modules/mob/living/simple_mob/subtypes/vore/c_pet.dm index e0fa0d6e5a1..58be7a3dc0d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/c_pet.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/c_pet.dm @@ -49,7 +49,7 @@ has_langs = list("Coulrian") -/mob/living/simple_mob/animal/passive/honkpet/attack_hand(mob/living/user as mob) +/mob/living/simple_mob/animal/passive/honkpet/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_DISARM) return icon_state = pick("c_pet", "m_pet") .=..() @@ -96,7 +96,7 @@ "rad" = 0 ) -/mob/living/simple_mob/animal/passive/mimepet/attack_hand(mob/living/user as mob) +/mob/living/simple_mob/animal/passive/mimepet/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_DISARM) icon_state = pick("dave1", "dave2", "dave3", "dave5" , "dave6" , "dave7" , "dave8" , "dave9" , "dave10") .=..() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm index 4eb5a1e3b2b..ad06ad56094 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm @@ -219,8 +219,11 @@ //Pet 4 friendly -/mob/living/simple_mob/otie/attack_hand(mob/living/carbon/human/M as mob) +/mob/living/simple_mob/otie/attack_hand(mob/user, list/params) + var/mob/living/M = user + if(!istype(M)) + return switch(M.a_intent) if(INTENT_HELP) if(health > 0) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm index e43841315fe..9ea8a12dcd3 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm @@ -373,9 +373,9 @@ hud_elements |= energyhud // When someone clicks us with an empty hand -/mob/living/simple_mob/shadekin/attack_hand(mob/living/carbon/human/M as mob) +/mob/living/simple_mob/shadekin/attack_hand(mob/user, list/params) . = ..() - if(M.a_intent == INTENT_HELP) + if(user.a_intent == INTENT_HELP) shy_approach = FALSE //ACCLIMATED /datum/say_list/shadekin diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index 1563f96d2d7..c7e503ee6c5 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -70,7 +70,7 @@ ui.open() ui.set_auto_update(1) -/obj/machinery/ntnet_relay/attack_hand(var/mob/living/user) +/obj/machinery/ntnet_relay/attack_hand(mob/user, list/params) nano_ui_interact(user) /obj/machinery/ntnet_relay/Topic(href, href_list) diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 4c5b4d7adb7..8e357fdc180 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -109,13 +109,16 @@ /obj/item/modular_computer/attack_ai(mob/user) return attack_self(user) -/obj/item/modular_computer/attack_hand(mob/user) +/obj/item/modular_computer/attack_hand(mob/user, list/params) if(anchored) return attack_self(user) return ..() /// On-click handling. Turns on the computer if it's off and opens the GUI. /obj/item/modular_computer/attack_self(mob/user) + . = ..() + if(.) + return if(enabled && screen_on) nano_ui_interact(user) else if(!enabled && screen_on) diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 84eae51e809..fc48f029d79 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -214,7 +214,7 @@ return 1 return 0 -/obj/machinery/lapvend/attack_hand(var/mob/user) +/obj/machinery/lapvend/attack_hand(mob/user, list/params) nano_ui_interact(user) /obj/machinery/lapvend/nano_ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) diff --git a/code/modules/multiz/hoist.dm b/code/modules/multiz/hoist.dm index 74ecbd8ff48..5ade15effd6 100644 --- a/code/modules/multiz/hoist.dm +++ b/code/modules/multiz/hoist.dm @@ -11,6 +11,9 @@ icon_state = "hoist_case" /obj/item/hoist_kit/attack_self(mob/user) + . = ..() + if(.) + return new /obj/structure/hoist (get_turf(user), user.dir) user.visible_message(SPAN_WARNING( "[user] deploys the hoist kit!"), SPAN_NOTICE("You deploy the hoist kit!"), SPAN_NOTICE("You hear the sound of parts snapping into place.")) qdel(src) @@ -25,7 +28,7 @@ var/obj/structure/hoist/source_hoist description_info = "Click and drag someone (or any object) to this to attach them to the clamp. If you are within reach, when you click and drag this to a turf adjacent to you, it will move the attached object there and release it." -/obj/effect/hoist_hook/attack_hand(mob/living/user) +/obj/effect/hoist_hook/attack_hand(mob/user, list/params) return // This has to be overridden so that it works properly. /obj/effect/hoist_hook/MouseDroppedOnLegacy(atom/movable/AM,mob/user) @@ -172,7 +175,7 @@ return -/obj/structure/hoist/attack_hand(mob/living/user) +/obj/structure/hoist/attack_hand(mob/user, list/params) if (!ishuman(user)) return diff --git a/code/modules/multiz/ladder.dm b/code/modules/multiz/ladder.dm index cd4e3da5b59..ca0905cc1d8 100644 --- a/code/modules/multiz/ladder.dm +++ b/code/modules/multiz/ladder.dm @@ -37,7 +37,13 @@ attack_hand(user) return -/obj/structure/ladder/attack_hand(var/mob/M) +/obj/structure/ladder/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/M = user + if(!istype(M)) + return if(!M.may_climb_ladders(src)) return diff --git a/code/modules/multiz/structures_vr.dm b/code/modules/multiz/structures_vr.dm index 0eacbd1a2e8..34033b47c89 100644 --- a/code/modules/multiz/structures_vr.dm +++ b/code/modules/multiz/structures_vr.dm @@ -27,7 +27,7 @@ return //do not send ghosts, zshadows, ai eyes, etc teleport(AM) -/obj/structure/portal_subtle/attack_hand(mob/user as mob) +/obj/structure/portal_subtle/attack_hand(mob/user, list/params) if(istype(user) && !(istype(user,/mob/living))) return //do not send ghosts, zshadows, ai eyes, etc spawn(0) diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 771feab046d..76c749fce0e 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -173,7 +173,7 @@ /atom/movable/openspace/mimic/attackby(obj/item/W, mob/user) to_chat(user, SPAN_NOTICE("\The [src] is too far away.")) -/atom/movable/openspace/mimic/attack_hand(mob/user) +/atom/movable/openspace/mimic/attack_hand(mob/user, list/params) to_chat(user, SPAN_NOTICE("You cannot reach \the [src] from here.")) /atom/movable/openspace/mimic/examine(...) @@ -205,7 +205,7 @@ /atom/movable/openspace/turf_proxy/attackby(obj/item/W, mob/user) loc.attackby(W, user) -/atom/movable/openspace/turf_proxy/attack_hand(mob/user as mob) +/atom/movable/openspace/turf_proxy/attack_hand(mob/user, list/params) loc.attack_hand(user) /atom/movable/openspace/turf_proxy/attack_generic(mob/user as mob) @@ -232,7 +232,7 @@ /atom/movable/openspace/turf_mimic/attackby(obj/item/W, mob/user) loc.attackby(W, user) -/atom/movable/openspace/turf_mimic/attack_hand(mob/user as mob) +/atom/movable/openspace/turf_mimic/attack_hand(mob/user, list/params) to_chat(user, SPAN_NOTICE("You cannot reach \the [src] from here.")) /atom/movable/openspace/turf_mimic/attack_generic(mob/user as mob) diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm index 1af94c2e657..68d8faa8952 100644 --- a/code/modules/nifsoft/nifsoft.dm +++ b/code/modules/nifsoft/nifsoft.dm @@ -269,6 +269,9 @@ return /obj/item/disk/nifsoft/compliance/attack_self(mob/user) + . = ..() + if(.) + return var/newlaws = input(user,"Please Input Laws","Compliance Laws",laws) as message newlaws = sanitize(newlaws,2048) if(newlaws) diff --git a/code/modules/organs/external/external.dm b/code/modules/organs/external/external.dm index 80ba9979dd4..92548aff44b 100644 --- a/code/modules/organs/external/external.dm +++ b/code/modules/organs/external/external.dm @@ -183,7 +183,10 @@ if(burn_damage) take_damage(0, burn_damage * emp_mod) -/obj/item/organ/external/attack_self(var/mob/living/user) +/obj/item/organ/external/attack_self(mob/user) + . = ..() + if(.) + return if(!contents.len) return ..() var/list/removable_objects = list() diff --git a/code/modules/organs/internal/species/adherent.dm b/code/modules/organs/internal/species/adherent.dm index 5f61836a279..6b1f515b9cd 100644 --- a/code/modules/organs/internal/species/adherent.dm +++ b/code/modules/organs/internal/species/adherent.dm @@ -37,6 +37,9 @@ /obj/item/organ/internal/powered/attack_self(mob/user) . = ..() + if(.) + return + . = ..() if(.) playsound(user, sound('sound/effects/ding.ogg')) if(is_broken()) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index c5c06e65fc3..52ee7e9f9f2 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -680,7 +680,10 @@ user.put_in_active_hand(O) qdel(src) -/obj/item/organ/attack_self(mob/user as mob) +/obj/item/organ/attack_self(mob/user) + . = ..() + if(.) + return // Convert it to an edible form, yum yum. if(!(robotic >= ORGAN_ROBOT) && user.a_intent == INTENT_HELP && user.zone_sel.selecting == O_MOUTH) diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm index cd2a6d70d7a..a44340f83eb 100644 --- a/code/modules/overmap/overmap_shuttle.dm +++ b/code/modules/overmap/overmap_shuttle.dm @@ -134,7 +134,7 @@ opened = 1 //shows open so you can diagnose 'oops, no gas' easily icon_state = "fuel_port_empty" //set the default state just to be safe -/obj/structure/fuel_port/attack_hand(mob/user as mob) +/obj/structure/fuel_port/attack_hand(mob/user, list/params) if(!opened) to_chat(user, "The door is secured tightly. You'll need a crowbar to open it.") return diff --git a/code/modules/overmap/ships/computers/computer_shims.dm b/code/modules/overmap/ships/computers/computer_shims.dm index e9fd154fb86..616cb4f694f 100644 --- a/code/modules/overmap/ships/computers/computer_shims.dm +++ b/code/modules/overmap/ships/computers/computer_shims.dm @@ -80,7 +80,7 @@ // If you don't call parent in this proc, you must make all appropriate checks yourself. // If you do, you must respect the return value. -/obj/machinery/computer/ship/attack_hand(mob/user) +/obj/machinery/computer/ship/attack_hand(mob/user, list/params) if((. = ..())) return if(!allowed(user)) diff --git a/code/modules/overmap/ships/panicbutton.dm b/code/modules/overmap/ships/panicbutton.dm index 5eafe96ccd9..ebc11be98d8 100644 --- a/code/modules/overmap/ships/panicbutton.dm +++ b/code/modules/overmap/ships/panicbutton.dm @@ -23,7 +23,7 @@ else icon_state = "[initial(icon_state)]" -/obj/structure/panic_button/attack_hand(mob/living/user) +/obj/structure/panic_button/attack_hand(mob/user, list/params) if(!istype(user)) return ..() diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 896ade6120f..388f9d2cf9e 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -45,7 +45,10 @@ return ..() -/obj/item/clipboard/attack_self(mob/user as mob) +/obj/item/clipboard/attack_self(mob/user) + . = ..() + if(.) + return var/dat = "Clipboard" if(haspen) dat += "Remove Pen

" diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index a55ff4710df..4728aaf1127 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -31,7 +31,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if(!(("[department]" in alldepartments) || ("[department]" in admin_departments)) ) alldepartments |= department -/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob) +/obj/machinery/photocopier/faxmachine/attack_hand(mob/user, list/params) user.set_machine(src) nano_ui_interact(user) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 972a653bbfc..18ccc45cf3b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -61,7 +61,7 @@ else to_chat(user, SPAN_NOTICE("You can't put [P] in [src]!")) -/obj/structure/filingcabinet/attack_hand(mob/user as mob) +/obj/structure/filingcabinet/attack_hand(mob/user, list/params) if(contents.len <= 0) to_chat(user, SPAN_NOTICE("\The [src] is empty.")) return @@ -150,7 +150,7 @@ virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. -/obj/structure/filingcabinet/security/attack_hand() +/obj/structure/filingcabinet/security/attack_hand(mob/user, list/params) populate() ..() @@ -187,7 +187,7 @@ virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. -/obj/structure/filingcabinet/medical/attack_hand() +/obj/structure/filingcabinet/medical/attack_hand(mob/user, list/params) populate() ..() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 94c0aea5ce6..1589ff32092 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -76,6 +76,9 @@ return ..() /obj/item/folder/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/folder/ui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui) diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 8ebcb538289..5e7f556634e 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -53,7 +53,10 @@ "You label [A] as [label].") A.name = "[A.name] ([label])" -/obj/item/hand_labeler/attack_self(mob/user as mob) +/obj/item/hand_labeler/attack_self(mob/user) + . = ..() + if(.) + return mode = !mode icon_state = "labeler[mode]" if(mode) diff --git a/code/modules/paperwork/paper/paper.dm b/code/modules/paperwork/paper/paper.dm index 1d3ae49574d..efba476d6b3 100644 --- a/code/modules/paperwork/paper/paper.dm +++ b/code/modules/paperwork/paper/paper.dm @@ -130,7 +130,10 @@ add_fingerprint(usr) return -/obj/item/paper/attack_self(mob/living/user as mob) +/obj/item/paper/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HARM) if(icon_state == "scrap") user.show_message("\The [src] is already crumpled.") diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 475bbb54b8a..cdf496bd82e 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -137,7 +137,10 @@ + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") -/obj/item/paper_bundle/attack_self(mob/user as mob) +/obj/item/paper_bundle/attack_self(mob/user) + . = ..() + if(.) + return src.show_content(user) add_fingerprint(usr) update_icon() diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index d8025df3b3f..6c9dc000910 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -38,7 +38,7 @@ return -/obj/item/paper_bin/attack_hand(mob/user as mob) +/obj/item/paper_bin/attack_hand(mob/user, list/params) if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -116,7 +116,7 @@ icon_state = "paper_bundle" papers = /obj/item/paper/natural -/obj/item/paper_bin/bundlenatural/attack_hand(mob/user) +/obj/item/paper_bin/bundlenatural/attack_hand(mob/user, list/params) if(amount < 1) qdel(src) return ..() diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 36bd8efe1a2..fbadb527638 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -50,6 +50,9 @@ add_overlay(overlays_to_add) /obj/item/paperplane/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "You unfold [src].") var/atom/movable/internal_paper_tmp = internalPaper internal_paper_tmp.forceMove(loc) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index ea5313c3418..2bb7037582f 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -30,7 +30,10 @@ drop_sound = 'sound/items/drop/accessory.ogg' pickup_sound = 'sound/items/pickup/accessory.ogg' -/obj/item/pen/attack_self(var/mob/user) +/obj/item/pen/attack_self(mob/user) + . = ..() + if(.) + return if(user.next_move > world.time) return user.setClickCooldown(1 SECOND) @@ -62,6 +65,9 @@ return /obj/item/pen/multi/attack_self(mob/user) + . = ..() + if(.) + return if(++selectedColor > 3) selectedColor = 1 @@ -77,7 +83,10 @@ /obj/item/pen/click name = "clicker pen" -/obj/item/pen/click/attack_self(mob/user as mob) +/obj/item/pen/click/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HELP) user.visible_message("\The [user] clicks [src] idly.","You click [src] idly.") playsound(user, 'sound/weapons/flipblade.ogg', 20, 1) @@ -244,7 +253,10 @@ /obj/item/pen/chameleon var/signature = "" -/obj/item/pen/chameleon/attack_self(mob/user as mob) +/obj/item/pen/chameleon/attack_self(mob/user) + . = ..() + if(.) + return /* // Limit signatures to official crew members var/personnel_list[] = list() @@ -340,7 +352,10 @@ . = ..() name = "[colourName] chalk" -/obj/item/pen/crayon/chalk/attack_self() +/obj/item/pen/crayon/chalk/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/pen/charcoal diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index e88b05e7b2a..f46e9b90440 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -31,7 +31,7 @@ /obj/machinery/photocopier/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/photocopier/attack_hand(mob/user as mob) +/obj/machinery/photocopier/attack_hand(mob/user, list/params) user.set_machine(src) nano_ui_interact(user) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5390e1ff791..f6b10337f7a 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -41,7 +41,10 @@ var/global/photo_count = 0 . = ..() id = photo_count++ -/obj/item/photo/attack_self(mob/user as mob) +/obj/item/photo/attack_self(mob/user) + . = ..() + if(.) + return user.examinate(src) /obj/item/photo/attackby(obj/item/P as obj, mob/user as mob) @@ -130,7 +133,10 @@ var/global/photo_count = 0 size = nsize to_chat(usr, "Camera will now take [size]x[size] photos.") -/obj/item/camera/attack_self(mob/user as mob) +/obj/item/camera/attack_self(mob/user) + . = ..() + if(.) + return on = !on if(on) src.icon_state = icon_on diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 6d69d50884a..f23821c92c2 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -81,7 +81,10 @@ // Syndicate stamp to forge documents. -/obj/item/stamp/chameleon/attack_self(mob/user as mob) +/obj/item/stamp/chameleon/attack_self(mob/user) + . = ..() + if(.) + return var/list/stamp_types = typesof(/obj/item/stamp) - src.type // Get all stamp types except our own var/list/stamps = list() diff --git a/code/modules/power/antimatter/computer.dm b/code/modules/power/antimatter/computer.dm index fb2c18cd97a..aa9067bb23e 100644 --- a/code/modules/power/antimatter/computer.dm +++ b/code/modules/power/antimatter/computer.dm @@ -64,7 +64,7 @@ /obj/machinery/computer/am_engine/attack_paw(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/am_engine/attack_hand(var/mob/user as mob) +/obj/machinery/computer/am_engine/attack_hand(mob/user, list/params) if(..()) return user.machine = src diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 323e438ee16..f2063b263da 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -177,7 +177,7 @@ return -/obj/machinery/power/am_control_unit/attack_hand(mob/user as mob) +/obj/machinery/power/am_control_unit/attack_hand(mob/user, list/params) if(anchored) interact(user) return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a3e004abcf8..6d182599e63 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -897,7 +897,7 @@ GLOBAL_LIST_EMPTY(apcs) wires.cut_all() update_icon() -/obj/machinery/power/apc/attack_hand(mob/user) +/obj/machinery/power/apc/attack_hand(mob/user, list/params) // if (!can_use(user)) This already gets called in interact() and in topic() // return if(!user) diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index ab721bd55a1..23c5f37dfe0 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -73,7 +73,7 @@ busy = 0 -/obj/machinery/power/breakerbox/attack_hand(mob/user) +/obj/machinery/power/breakerbox/attack_hand(mob/user, list/params) if(update_locked) to_chat(user, "System locked. Please try again later.") return diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index d0f055cbb7b..5a8709730ce 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -996,7 +996,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( -/obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob) +/obj/item/stack/cable_coil/alien/attack_hand(mob/user, list/params) if (user.get_inactive_held_item() == src) var/N = input("How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1) as num|null if(N && N <= amount) diff --git a/code/modules/power/fission/computer.dm b/code/modules/power/fission/computer.dm index db3de793294..6c7b62a33a5 100644 --- a/code/modules/power/fission/computer.dm +++ b/code/modules/power/fission/computer.dm @@ -37,7 +37,7 @@ /obj/machinery/computer/fission_monitor/attack_ai(mob/user) attack_hand(user) -/obj/machinery/computer/fission_monitor/attack_hand(mob/user) +/obj/machinery/computer/fission_monitor/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/modules/power/fission/engine.dm b/code/modules/power/fission/engine.dm index ce2e1d4276c..3380655425e 100644 --- a/code/modules/power/fission/engine.dm +++ b/code/modules/power/fission/engine.dm @@ -106,7 +106,7 @@ var/power = (decay_heat / REACTOR_RADS_TO_MJ) * max(healthmul, 0.1) radiation_pulse(src, max(power * REACTOR_RADIATION_MULTIPLIER, 0), RAD_FALLOFF_ENGINE_FISSION) -/obj/machinery/power/fission/attack_hand(mob/user) +/obj/machinery/power/fission/attack_hand(mob/user, list/params) nano_ui_interact(user) /obj/machinery/power/fission/attack_robot(mob/user) diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm index a09df741649..a5ed6b29d08 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -99,7 +99,7 @@ var/list/fusion_cores = list() if(owned_field) owned_field.ChangeFieldStrength(value) -/obj/machinery/power/fusion_core/attack_hand(var/mob/user) +/obj/machinery/power/fusion_core/attack_hand(mob/user, list/params) if(!Adjacent(user)) // As funny as it was for the AI to hug-kill the tokamak field from a distance... return visible_message("\The [user] hugs \the [src] to make it feel better!") diff --git a/code/modules/power/fusion/core/core_control.dm b/code/modules/power/fusion/core/core_control.dm index bd84e0e82d2..802a509693f 100644 --- a/code/modules/power/fusion/core/core_control.dm +++ b/code/modules/power/fusion/core/core_control.dm @@ -21,7 +21,7 @@ /obj/machinery/computer/fusion_core_control/attack_ai(mob/user) attack_hand(user) -/obj/machinery/computer/fusion_core_control/attack_hand(mob/user) +/obj/machinery/computer/fusion_core_control/attack_hand(mob/user, list/params) add_fingerprint(user) interact(user) diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm index b67f8beacc6..668c1ee7d7c 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_control.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_control.dm @@ -10,7 +10,7 @@ /obj/machinery/computer/fusion_fuel_control/attack_ai(mob/user) attack_hand(user) -/obj/machinery/computer/fusion_fuel_control/attack_hand(mob/user) +/obj/machinery/computer/fusion_fuel_control/attack_hand(mob/user, list/params) add_fingerprint(user) interact(user) diff --git a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm index 4939e225b2c..0cacea4cd23 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm @@ -80,7 +80,7 @@ var/list/fuel_injectors = list() return ..() -/obj/machinery/fusion_fuel_injector/attack_hand(mob/user) +/obj/machinery/fusion_fuel_injector/attack_hand(mob/user, list/params) if(injecting) to_chat(user, "Shut \the [src] off before playing with the fuel rod!") diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm index 5b505c49787..8cff0d855e1 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm @@ -11,7 +11,7 @@ /obj/machinery/computer/gyrotron_control/attack_ai(var/mob/user) attack_hand(user) -/obj/machinery/computer/gyrotron_control/attack_hand(var/mob/user) +/obj/machinery/computer/gyrotron_control/attack_hand(mob/user, list/params) add_fingerprint(user) interact(user) diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 53e91a35e15..8df4097143b 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -187,7 +187,7 @@ GLOBAL_LIST_EMPTY(all_turbines) else ..() -/obj/machinery/power/generator/attack_hand(mob/user) +/obj/machinery/power/generator/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER) || !anchored) return diff --git a/code/modules/power/generator_type2.dm b/code/modules/power/generator_type2.dm index b10e006a388..1bf94294a43 100644 --- a/code/modules/power/generator_type2.dm +++ b/code/modules/power/generator_type2.dm @@ -94,7 +94,7 @@ interact(user) -/obj/machinery/power/generator_type2/attack_hand(mob/user) +/obj/machinery/power/generator_type2/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 480536a35f3..d04bee480cc 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) /obj/machinery/gravity_generator/part/get_status() return main_part?.get_status() -/obj/machinery/gravity_generator/part/attack_hand(mob/user) +/obj/machinery/gravity_generator/part/attack_hand(mob/user, list/params) return main_part.attack_hand(user) /obj/machinery/gravity_generator/part/set_broken() @@ -237,7 +237,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) return return ..() -/obj/machinery/gravity_generator/main/attack_hand(mob/user) +/obj/machinery/gravity_generator/main/attack_hand(mob/user, list/params) if((. = ..())) return ui_interact(user) diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm index bed74627fbb..4da2807a9e5 100644 --- a/code/modules/power/grid_checker.dm +++ b/code/modules/power/grid_checker.dm @@ -51,7 +51,7 @@ else if(istype(W, /obj/item/multitool) || W.is_wirecutter()) attack_hand(user) -/obj/machinery/power/grid_checker/attack_hand(mob/user) +/obj/machinery/power/grid_checker/attack_hand(mob/user, list/params) if(!user) return add_fingerprint(user) diff --git a/code/modules/power/lighting/lighting.dm b/code/modules/power/lighting/lighting.dm index 71057f024c6..0d4053fe029 100644 --- a/code/modules/power/lighting/lighting.dm +++ b/code/modules/power/lighting/lighting.dm @@ -77,7 +77,7 @@ var/global/list/light_type_cache = list() else to_chat(user, "This casing doesn't support power cells for backup power.") -/obj/machinery/light_construct/attack_hand(mob/user) +/obj/machinery/light_construct/attack_hand(mob/user, list/params) . = ..() if(.) return . // obj/machinery/attack_hand returns 1 if user can't use the machine @@ -776,7 +776,7 @@ var/global/list/light_type_cache = list() // attack with hand - remove tube/bulb // if hands aren't protected and the light is on, burn the player -/obj/machinery/light/attack_hand(mob/user) +/obj/machinery/light/attack_hand(mob/user, list/params) add_fingerprint(user) @@ -822,7 +822,7 @@ var/global/list/light_type_cache = list() // create a light tube/bulb item and put it in the user's hand user.put_in_active_hand(remove_bulb()) //puts it in our active hand -/obj/machinery/light/flamp/attack_hand(mob/user) +/obj/machinery/light/flamp/attack_hand(mob/user, list/params) if(lamp_shade) if(status == LIGHT_EMPTY) to_chat(user, "There is no [get_fitting_name()] in this light.") diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0d03e7e73a8..5bdd65663c7 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -42,7 +42,7 @@ /obj/machinery/power/powered() return 1 //doesn't require an external power source -/obj/machinery/power/port_gen/attack_hand(mob/user as mob) +/obj/machinery/power/port_gen/attack_hand(mob/user, list/params) if(..()) return if(!anchored) @@ -301,7 +301,7 @@ return return ..() -/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob) +/obj/machinery/power/port_gen/pacman/attack_hand(mob/user, list/params) ..() if (!anchored) return @@ -612,7 +612,7 @@ log_and_message_admins("[ADMIN_LOOKUPFLW(Proj.firer)] triggered an Abductor Core explosion at [x],[y],[z] via projectile.") asplod() -/obj/machinery/power/rtg/abductor/attack_hand(var/mob/living/user) +/obj/machinery/power/rtg/abductor/attack_hand(mob/user, list/params) if(!istype(user) || (. = ..())) return diff --git a/code/modules/power/sensors/sensor_monitoring.dm b/code/modules/power/sensors/sensor_monitoring.dm index b215af9cef8..fc9f49505e3 100644 --- a/code/modules/power/sensors/sensor_monitoring.dm +++ b/code/modules/power/sensors/sensor_monitoring.dm @@ -41,7 +41,7 @@ ..() // On user click opens the UI of this computer. -/obj/machinery/computer/power_monitor/attack_hand(mob/user) +/obj/machinery/computer/power_monitor/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 50cd7aa6679..12f424dba24 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -44,7 +44,7 @@ . = ..() rad_insulation = active? rad_insulation_active : rad_insulation_inactive -/obj/machinery/power/rad_collector/attack_hand(mob/user as mob) +/obj/machinery/power/rad_collector/attack_hand(mob/user, list/params) if(anchored) if(!src.locked) toggle_power() diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index cc0ed3634b1..c9b56b5a486 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -21,7 +21,7 @@ FG2.cleanup() . = ..() -/obj/machinery/containment_field/attack_hand(mob/user as mob) +/obj/machinery/containment_field/attack_hand(mob/user, list/params) if(get_dist(src, user) > 1) return 0 else diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index c18e44c00cb..d702ebe177d 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -58,7 +58,7 @@ else icon_state = "emitter" -/obj/machinery/power/emitter/attack_hand(mob/user as mob) +/obj/machinery/power/emitter/attack_hand(mob/user, list/params) src.add_fingerprint(user) activate(user) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index bdf9c93e216..dc4d70dcc98 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -73,7 +73,7 @@ field_generator power level display return -/obj/machinery/field_generator/attack_hand(mob/user as mob) +/obj/machinery/field_generator/attack_hand(mob/user, list/params) if(state == 2) if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on if(src.active >= 1) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 41a1027dd30..d87f82a0621 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -34,7 +34,7 @@ wires = null return ..() -/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob) +/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user, list/params) if(construction_state >= 3) interact(user) else if(construction_state == 2) // Wires exposed diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d76c4bff320..eae2ac24aaf 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -46,7 +46,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) STOP_PROCESSING(SSobj, src) return ..() -/obj/singularity/attack_hand(mob/user as mob) +/obj/singularity/attack_hand(mob/user, list/params) consume(user) return 1 diff --git a/code/modules/power/smes/smes.dm b/code/modules/power/smes/smes.dm index cfecd4e6c4f..3bc6c836348 100644 --- a/code/modules/power/smes/smes.dm +++ b/code/modules/power/smes/smes.dm @@ -240,7 +240,7 @@ GLOBAL_LIST_EMPTY(smeses) add_hiddenprint(user) ui_interact(user) -/obj/machinery/power/smes/attack_hand(mob/user) +/obj/machinery/power/smes/attack_hand(mob/user, list/params) add_fingerprint(user) ui_interact(user) diff --git a/code/modules/power/smes/smes_construction.dm b/code/modules/power/smes/smes_construction.dm index 3e6e604c1a9..fa4fffcf4fd 100644 --- a/code/modules/power/smes/smes_construction.dm +++ b/code/modules/power/smes/smes_construction.dm @@ -111,7 +111,7 @@ // Proc: attack_hand() // Parameters: None // Description: Opens the UI as usual, and if cover is removed opens the wiring panel. -/obj/machinery/power/smes/buildable/attack_hand() +/obj/machinery/power/smes/buildable/attack_hand(mob/user, list/params) ..() if(open_hatch) wires.Interact(usr) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 21400a33050..3258bdd980a 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -216,7 +216,7 @@ GLOBAL_LIST_EMPTY(solars_list) var/tracker = 0 var/glass_type = null -/obj/item/solar_assembly/attack_hand(var/mob/user) +/obj/item/solar_assembly/attack_hand(mob/user, list/params) if(!anchored || !isturf(loc)) // You can't pick it up ..() @@ -397,7 +397,7 @@ GLOBAL_LIST_EMPTY(solars_list) add_overlay(image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir))) return -/obj/machinery/power/solar_control/attack_hand(mob/user) +/obj/machinery/power/solar_control/attack_hand(mob/user, list/params) if(!..()) interact(user) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index b0c966d26e6..e9cb8eb978d 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -393,7 +393,7 @@ /obj/machinery/power/supermatter/attack_ai(mob/user as mob) ui_interact(user) -/obj/machinery/power/supermatter/attack_hand(mob/user as mob) +/obj/machinery/power/supermatter/attack_hand(mob/user, list/params) var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... [TU.his] body starts to glow and bursts into flames before flashing into ash.",\ "You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\ diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index d718ad20402..71da7e493e3 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -45,7 +45,7 @@ else icon_state = "coil[anchored]" -/obj/machinery/power/tesla_coil/attackby(obj/item/W, mob/user, params) +/obj/machinery/power/tesla_coil/attackby(obj/item/W, mob/user) src.add_fingerprint(user) //if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W)) @@ -61,7 +61,7 @@ return wires.Interact(user) return ..() -/obj/machinery/power/tesla_coil/attack_hand(mob/user) +/obj/machinery/power/tesla_coil/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user)) return ..() @@ -115,7 +115,7 @@ else icon_state = "grounding_rod[anchored]" -/obj/machinery/power/grounding_rod/attackby(obj/item/W, mob/user, params) +/obj/machinery/power/grounding_rod/attackby(obj/item/W, mob/user) //if(default_deconstruction_screwdriver(user, "grounding_rod_open[anchored]", "grounding_rod[anchored]", W)) if(default_deconstruction_screwdriver(user, W)) return @@ -127,7 +127,7 @@ return return ..() -/obj/machinery/power/grounding_rod/attack_hand(mob/user) +/obj/machinery/power/grounding_rod/attack_hand(mob/user, list/params) if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user)) return ..() diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 3badd5149a1..3f4daaac93b 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -275,7 +275,7 @@ updateDialog() -/obj/machinery/power/turbine/attack_hand(var/mob/user as mob) +/obj/machinery/power/turbine/attack_hand(mob/user, list/params) if((. = ..())) return src.interact(user) @@ -342,7 +342,7 @@ id = new_ident return -/obj/machinery/computer/turbine_computer/attack_hand(var/mob/user as mob) +/obj/machinery/computer/turbine_computer/attack_hand(mob/user, list/params) if((. = ..())) return src.interact(user) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f3067f57007..9a29fb62d97 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -770,6 +770,9 @@ return new_mode /obj/item/gun/attack_self(mob/user) + . = ..() + if(.) + return switch_firemodes(user) /obj/item/gun/proc/handle_pins(mob/living/user) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 730c599243b..033d000b624 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -236,13 +236,16 @@ ..() load_ammo(A, user) -/obj/item/gun/ballistic/attack_self(mob/user as mob) +/obj/item/gun/ballistic/attack_self(mob/user) + . = ..() + if(.) + return if(firemodes.len > 1) switch_firemodes(user) else unload_ammo(user) -/obj/item/gun/ballistic/attack_hand(mob/user as mob) +/obj/item/gun/ballistic/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload_ammo(user, allow_dump=0) else diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index b5bd8e9dfdd..ecd9572a6ab 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -155,7 +155,7 @@ ..() load_ammo(A, user) -/obj/item/gun/energy/attack_hand(mob/user as mob) +/obj/item/gun/energy/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload_ammo(user) else diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 1bd3da291d7..513a425d6a4 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -644,4 +644,7 @@ 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) + . = ..() + if(.) + return bolt_color = input(user,"","Choose Color",bolt_color) as color|null diff --git a/code/modules/projectiles/guns/energy/modular/modulargun.dm b/code/modules/projectiles/guns/energy/modular/modulargun.dm index 221bd9b4f6b..77be3f713bf 100644 --- a/code/modules/projectiles/guns/energy/modular/modulargun.dm +++ b/code/modules/projectiles/guns/energy/modular/modulargun.dm @@ -189,7 +189,7 @@ new_mode.apply_to(src) return FALSE -/obj/item/gun/energy/modular/attackby(obj/item/I, mob/living/user, params, clickchain_flags, damage_multiplier) +/obj/item/gun/energy/modular/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) if(I.is_screwdriver()) to_chat(user, "You [assembled ? "disassemble" : "assemble"] the gun.") assembled = !assembled diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 789748347e5..3b28e5332f6 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -29,7 +29,10 @@ projectile_type=/obj/item/projectile/beam/pulse charge_cost = 120 -/obj/item/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob) +/obj/item/gun/energy/pulse_rifle/destroyer/attack_self(mob/user) + . = ..() + if(.) + return to_chat(user, "[src.name] has three settings, and they are all DESTROY.") /obj/item/gun/energy/pulse_pistol diff --git a/code/modules/projectiles/guns/energy/sizegun_vr.dm b/code/modules/projectiles/guns/energy/sizegun_vr.dm index d398e8b6c33..704327132c5 100644 --- a/code/modules/projectiles/guns/energy/sizegun_vr.dm +++ b/code/modules/projectiles/guns/energy/sizegun_vr.dm @@ -29,6 +29,9 @@ /obj/item/gun/energy/sizegun/attack_self(mob/user) . = ..() + if(.) + return + . = ..() select_size() /obj/item/gun/energy/sizegun/consume_next_projectile() diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index fb8fc1278b1..fe787bbb4af 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -338,6 +338,9 @@ safety_state = GUN_SAFETY_OFF /obj/item/gun/energy/service/attack_self(mob/user) + . = ..() + if(.) + return cycle_weapon(user) /obj/item/gun/energy/service/proc/cycle_weapon(mob/living/L) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index fd3758befb0..355425dad9f 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -84,7 +84,10 @@ update_icon() ..() -/obj/item/gun/launcher/crossbow/attack_self(mob/living/user as mob) +/obj/item/gun/launcher/crossbow/attack_self(mob/user) + . = ..() + if(.) + return if(tension) if(bolt) user.visible_message("[user] relaxes the tension on [src]'s string and removes [bolt].","You relax the tension on [src]'s string and remove [bolt].") diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index dc8db00c0df..66f82e2c71d 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -66,6 +66,9 @@ to_chat(user, "[src] is empty.") /obj/item/gun/launcher/grenade/attack_self(mob/user) + . = ..() + if(.) + return pump(user) /obj/item/gun/launcher/grenade/attackby(obj/item/I, mob/user) @@ -74,7 +77,7 @@ else ..() -/obj/item/gun/launcher/grenade/attack_hand(mob/user) +/obj/item/gun/launcher/grenade/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload(user) else @@ -101,7 +104,10 @@ force = 5 max_grenades = 0 -/obj/item/gun/launcher/grenade/underslung/attack_self() +/obj/item/gun/launcher/grenade/underslung/attack_self(mob/user) + . = ..() + if(.) + return return //load and unload directly into chambered diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index a85fd077a30..1d9519f7d14 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -59,7 +59,7 @@ else to_chat(user, "There is nothing to remove in \the [src].") -/obj/item/gun/launcher/pneumatic/attack_hand(mob/user as mob) +/obj/item/gun/launcher/pneumatic/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload_hopper(user) else @@ -75,7 +75,10 @@ else if(istype(W) && item_storage.can_be_inserted(W)) item_storage.handle_item_insertion(W, user) -/obj/item/gun/launcher/pneumatic/attack_self(mob/user as mob) +/obj/item/gun/launcher/pneumatic/attack_self(mob/user) + . = ..() + if(.) + return eject_tank(user) /obj/item/gun/launcher/pneumatic/consume_next_projectile(mob/user=null) diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index dc3275a140c..1ab43a9d9aa 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -28,6 +28,9 @@ update_icon() /obj/item/syringe_cartridge/attack_self(mob/user) + . = ..() + if(.) + return if(syringe) to_chat(user, "You remove [syringe] from [src].") playsound(src, 'sound/weapons/empty.ogg', 50, 1) @@ -92,7 +95,10 @@ darts -= next next = null -/obj/item/gun/launcher/syringe/attack_self(mob/living/user as mob) +/obj/item/gun/launcher/syringe/attack_self(mob/user) + . = ..() + if(.) + return if(next) user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", "You unlatch and carefully relax the bolt on [src], unloading the spring.") next = null @@ -102,7 +108,7 @@ next = darts[1] add_fingerprint(user) -/obj/item/gun/launcher/syringe/attack_hand(mob/living/user as mob) +/obj/item/gun/launcher/syringe/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(!darts.len) to_chat(user, "[src] is empty.") diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm index 228c99a3abc..9c240dad1a6 100644 --- a/code/modules/projectiles/guns/magnetic/bore.dm +++ b/code/modules/projectiles/guns/magnetic/bore.dm @@ -48,7 +48,7 @@ if(mat_storage) . += image(icon, "[icon_state]_loaded") -/obj/item/gun/magnetic/matfed/attack_hand(var/mob/user) // It doesn't keep a loaded item inside. +/obj/item/gun/magnetic/matfed/attack_hand(mob/user, list/params) // It doesn't keep a loaded item inside. if(user.get_inactive_held_item() == src) var/obj/item/removing diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index d4918085565..e44daf69b92 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -149,7 +149,7 @@ return . = ..() -/obj/item/gun/magnetic/attack_hand(var/mob/user) +/obj/item/gun/magnetic/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) var/obj/item/removing diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index e7f53c622bb..778689c7ba0 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -170,7 +170,7 @@ else ..() -/obj/item/gun/ballistic/automatic/z8/attack_hand(mob/user) +/obj/item/gun/ballistic/automatic/z8/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src && use_launcher) launcher.unload(user) else @@ -253,13 +253,16 @@ update_icon() update_held_icon() -/obj/item/gun/ballistic/automatic/lmg/attack_self(mob/user as mob) +/obj/item/gun/ballistic/automatic/lmg/attack_self(mob/user) + . = ..() + if(.) + return if(cover_open) toggle_cover(user) //close the cover else return ..() //once closed, behave like normal -/obj/item/gun/ballistic/automatic/lmg/attack_hand(mob/user as mob) +/obj/item/gun/ballistic/automatic/lmg/attack_hand(mob/user, list/params) if(!cover_open && user.get_inactive_held_item() == src) toggle_cover(user) //open the cover else diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm index 534c6576bbd..500b529d398 100644 --- a/code/modules/projectiles/guns/projectile/bow.dm +++ b/code/modules/projectiles/guns/projectile/bow.dm @@ -41,7 +41,10 @@ return update_icon() -/obj/item/gun/ballistic/bow/attack_self(mob/living/user) +/obj/item/gun/ballistic/bow/attack_self(mob/user) + . = ..() + if(.) + return if(loaded.len) src.ready = 1 to_chat(user, "You draw back the bowstring.") @@ -51,7 +54,7 @@ else return -/obj/item/gun/ballistic/bow/attack_hand(mob/user as mob) +/obj/item/gun/ballistic/bow/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload_ammo(user, allow_dump=0) else diff --git a/code/modules/projectiles/guns/projectile/contender.dm b/code/modules/projectiles/guns/projectile/contender.dm index 9f0adad63e8..dc6eac27168 100644 --- a/code/modules/projectiles/guns/projectile/contender.dm +++ b/code/modules/projectiles/guns/projectile/contender.dm @@ -13,7 +13,10 @@ load_method = SINGLE_CASING heavy = TRUE -/obj/item/gun/ballistic/contender/attack_self(mob/user as mob) +/obj/item/gun/ballistic/contender/attack_self(mob/user) + . = ..() + if(.) + return if(chambered) chambered.loc = get_turf(src) chambered = null diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index 824060ce6b8..ccd0ecdc16c 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -137,6 +137,9 @@ B.reagents.trans_to_obj(dart, mix_amount) /obj/item/gun/ballistic/dartgun/attack_self(mob/user) + . = ..() + if(.) + return user.set_machine(src) var/dat = "[src] mixing control:

" diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 8b53817b1f1..b2b910259a5 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -74,7 +74,7 @@ icon_state = "colt-taj" /*//apart of reskins that have two sprites, touching may result in frustration and breaks -/obj/item/gun/ballistic/colt/detective/attack_hand(var/mob/living/user) +/obj/item/gun/ballistic/colt/detective/attack_hand(mob/user, list/params) if(!unique_reskin && loc == user) reskin_gun(user) return @@ -211,7 +211,7 @@ name = "compact signal pistol" magazine_type = /obj/item/ammo_magazine/m9mm/compact/flash -/obj/item/gun/ballistic/pistol/attack_hand(mob/living/user as mob) +/obj/item/gun/ballistic/pistol/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(silenced) if(!user.is_holding(src)) @@ -431,7 +431,7 @@ else ..() -/obj/item/gun/ballistic/konigin/attack_hand(mob/user) +/obj/item/gun/ballistic/konigin/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src && use_shotgun) shotgun.unload_ammo(user) else diff --git a/code/modules/projectiles/guns/projectile/rocket.dm b/code/modules/projectiles/guns/projectile/rocket.dm index 076a4ae5c77..2fbc5bae571 100644 --- a/code/modules/projectiles/guns/projectile/rocket.dm +++ b/code/modules/projectiles/guns/projectile/rocket.dm @@ -45,7 +45,7 @@ else ..() -/obj/item/gun/ballistic/rocket/attack_hand(mob/user) +/obj/item/gun/ballistic/rocket/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload(user) else @@ -86,7 +86,7 @@ to_chat(user, "You cannot reload the [src]!") return -/obj/item/gun/ballistic/rocket/collapsible/attack_hand(mob/user as mob) +/obj/item/gun/ballistic/rocket/collapsible/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) to_chat(user, "You cannot unload the [src]'s munition!") return diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 8ed10896d32..4136035b465 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -26,7 +26,10 @@ return chambered.get_projectile() return null -/obj/item/gun/ballistic/shotgun/pump/attack_self(mob/living/user as mob) +/obj/item/gun/ballistic/shotgun/pump/attack_self(mob/user) + . = ..() + if(.) + return if(world.time >= recentpump + 10) pump(user) recentpump = world.time diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index fa561200118..48971a6ba89 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -29,7 +29,10 @@ else icon_state = "heavysniper" -/obj/item/gun/ballistic/heavysniper/attack_self(mob/user as mob) +/obj/item/gun/ballistic/heavysniper/attack_self(mob/user) + . = ..() + if(.) + return playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1) bolt_open = !bolt_open if(bolt_open) diff --git a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm index 1cf3a698022..3828b61bb9b 100644 --- a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm @@ -68,7 +68,10 @@ . = ..() trigger_group = src -/obj/item/sniper_rifle_part/attack_self(mob/user as mob) +/obj/item/sniper_rifle_part/attack_self(mob/user) + . = ..() + if(.) + return if(part_count == 1) to_chat(user, "You can't disassemble this further!") return diff --git a/code/modules/projectiles/magazines/magazine.dm b/code/modules/projectiles/magazines/magazine.dm index 6614f99d5a0..627f910a551 100644 --- a/code/modules/projectiles/magazines/magazine.dm +++ b/code/modules/projectiles/magazines/magazine.dm @@ -78,6 +78,9 @@ // This dumps all the bullets right on the floor /obj/item/ammo_magazine/attack_self(mob/user) + . = ..() + if(.) + return if(can_remove_ammo) if(!stored_ammo.len) to_chat(user, "[src] is already empty!") @@ -98,7 +101,7 @@ return // This puts one bullet from the magazine into your hand -/obj/item/ammo_magazine/attack_hand(mob/user) +/obj/item/ammo_magazine/attack_hand(mob/user, list/params) if(can_remove_ammo) // For Smart Magazines if(user.get_inactive_held_item() == src) if(stored_ammo.len) diff --git a/code/modules/projectiles/magazines/smartmag.dm b/code/modules/projectiles/magazines/smartmag.dm index 54595d9e04f..7af16ca852b 100644 --- a/code/modules/projectiles/magazines/smartmag.dm +++ b/code/modules/projectiles/magazines/smartmag.dm @@ -109,7 +109,7 @@ ..() // You can remove the power cell from the magazine by hand, but it's way slower than using a screwdriver -/obj/item/ammo_magazine/smart/attack_hand(mob/user) +/obj/item/ammo_magazine/smart/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(attached_cell) to_chat(user, "You struggle to remove \the [attached_cell] from \the [src].") diff --git a/code/modules/random_map/drop/droppod_doors.dm b/code/modules/random_map/drop/droppod_doors.dm index 92de6014e0c..c4b959129eb 100644 --- a/code/modules/random_map/drop/droppod_doors.dm +++ b/code/modules/random_map/drop/droppod_doors.dm @@ -23,7 +23,7 @@ /obj/structure/droppod_door/attack_generic(var/mob/user) attack_hand(user) -/obj/structure/droppod_door/attack_hand(var/mob/user) +/obj/structure/droppod_door/attack_hand(mob/user, list/params) if(deploying) return to_chat(user, "You prime the explosive bolts. Better get clear!") sleep(30) diff --git a/code/modules/reagents/chemistry/machinery.dm b/code/modules/reagents/chemistry/machinery.dm index 92ed153cb25..f6554395fc7 100644 --- a/code/modules/reagents/chemistry/machinery.dm +++ b/code/modules/reagents/chemistry/machinery.dm @@ -159,7 +159,7 @@ if(AM in holdingitems) holdingitems -= AM -/obj/machinery/reagentgrinder/attack_hand(mob/user as mob) +/obj/machinery/reagentgrinder/attack_hand(mob/user, list/params) interact(user) /obj/machinery/reagentgrinder/interact(mob/user as mob) // The microwave Menu //I am reasonably certain that this is not a microwave diff --git a/code/modules/reagents/distilling/distilling.dm b/code/modules/reagents/distilling/distilling.dm index a0fc91ed971..043015b3c93 100644 --- a/code/modules/reagents/distilling/distilling.dm +++ b/code/modules/reagents/distilling/distilling.dm @@ -108,7 +108,7 @@ ..() -/obj/machinery/portable_atmospherics/powered/reagent_distillery/attack_hand(mob/user) +/obj/machinery/portable_atmospherics/powered/reagent_distillery/attack_hand(mob/user, list/params) var/list/options = list() options["examine"] = radial_examine options["use"] = radial_use diff --git a/code/modules/reagents/machinery/chem_master.dm b/code/modules/reagents/machinery/chem_master.dm index 0501d050d63..b6c9b122cd2 100644 --- a/code/modules/reagents/machinery/chem_master.dm +++ b/code/modules/reagents/machinery/chem_master.dm @@ -100,7 +100,7 @@ if (prob(50)) qdel(src) -/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params) +/obj/machinery/chem_master/attackby(obj/item/I, mob/user) if(default_unfasten_wrench(user, I, 20)) return else if(default_deconstruction_screwdriver(user, I)) @@ -147,7 +147,7 @@ pill_bottle = null return ..() -/obj/machinery/chem_master/attack_hand(mob/user) +/obj/machinery/chem_master/attack_hand(mob/user, list/params) if(machine_stat & BROKEN) return user.set_machine(src) diff --git a/code/modules/reagents/machinery/dispenser/cartridge.dm b/code/modules/reagents/machinery/dispenser/cartridge.dm index c9e2e8c3800..920d1522a64 100644 --- a/code/modules/reagents/machinery/dispenser/cartridge.dm +++ b/code/modules/reagents/machinery/dispenser/cartridge.dm @@ -51,7 +51,10 @@ label = "" name = initial(name) -/obj/item/reagent_containers/chem_disp_cartridge/attack_self() +/obj/item/reagent_containers/chem_disp_cartridge/attack_self(mob/user) + . = ..() + if(.) + return ..() if (is_open_container()) to_chat(usr, "You put the cap on \the [src].") diff --git a/code/modules/reagents/machinery/dispenser/dispenser2.dm b/code/modules/reagents/machinery/dispenser/dispenser2.dm index d884aef9c8e..6c39eab28ef 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser2.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser2.dm @@ -185,7 +185,7 @@ /obj/machinery/chemical_dispenser/attack_ai(mob/user) attack_hand(user) -/obj/machinery/chemical_dispenser/attack_hand(mob/user) +/obj/machinery/chemical_dispenser/attack_hand(mob/user, list/params) if(machine_stat & BROKEN) return ui_interact(user) diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index 523d686777b..495eac943bf 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -151,7 +151,7 @@ if(rig) . += "There is some kind of device rigged to the tank." -/obj/structure/reagent_dispensers/fueltank/attack_hand() +/obj/structure/reagent_dispensers/fueltank/attack_hand(mob/user, list/params) if (rig) usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]") if(do_after(usr, 20)) @@ -379,7 +379,7 @@ to_chat(user, "There is already a cup dispenser there!") return -/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/user) +/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/user, list/params) if(cups) new /obj/item/reagent_containers/food/drinks/sillycup(src.loc) cups-- diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 29e87cce499..ff4325ad39d 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -22,7 +22,10 @@ remove_obj_verb(src, /obj/item/reagent_containers/verb/set_APTFT) create_reagents(volume) -/obj/item/reagent_containers/attack_self(mob/user as mob) +/obj/item/reagent_containers/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/reagent_containers/afterattack(obj/target, mob/user, flag) diff --git a/code/modules/reagents/reagent_containers/blood_pack_vr.dm b/code/modules/reagents/reagent_containers/blood_pack_vr.dm index b81f32ba173..28ed0374d71 100644 --- a/code/modules/reagents/reagent_containers/blood_pack_vr.dm +++ b/code/modules/reagents/reagent_containers/blood_pack_vr.dm @@ -1,4 +1,7 @@ -/obj/item/reagent_containers/blood/attack_self(mob/living/user as mob) +/obj/item/reagent_containers/blood/attack_self(mob/user) + . = ..() + if(.) + return if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/human_user = user if(human_user.species.is_vampire) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 80c6358d6af..ce1e448a6f0 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -94,7 +94,10 @@ add_attack_logs(user, L, "Borg injected with [reagent_ids[mode]]") to_chat(user, "[t] units injected. [reagent_volumes[reagent_ids[mode]]] units remaining.") -/obj/item/reagent_containers/borghypo/attack_self(mob/user as mob) //Change the mode +/obj/item/reagent_containers/borghypo/attack_self(mob/user) + . = ..() + if(.) + return //Change the mode var/t = "" for(var/i = 1 to reagent_ids.len) if(t) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 8091a42609a..23f04175b3a 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -61,7 +61,10 @@ base_desc = desc -/obj/item/reagent_containers/glass/attack_self() +/obj/item/reagent_containers/glass/attack_self(mob/user) + . = ..() + if(.) + return ..() if(is_open_container()) to_chat(usr, "You put the lid on \the [src].") @@ -163,7 +166,7 @@ . = ..() update_icon() -/obj/item/reagent_containers/glass/beaker/attack_hand() +/obj/item/reagent_containers/glass/beaker/attack_hand(mob/user, list/params) ..() update_icon() diff --git a/code/modules/reagents/reagent_containers/hard_candy.dm b/code/modules/reagents/reagent_containers/hard_candy.dm index 1b2028d2de6..bafbb1f5de7 100644 --- a/code/modules/reagents/reagent_containers/hard_candy.dm +++ b/code/modules/reagents/reagent_containers/hard_candy.dm @@ -34,7 +34,10 @@ user.put_in_hands(trash) qdel(src) -/obj/item/reagent_containers/hard_candy/attack_self(mob/user as mob) +/obj/item/reagent_containers/hard_candy/attack_self(mob/user) + . = ..() + if(.) + return return /obj/item/reagent_containers/hard_candy/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 7f9cf1a1998..18c8b6c4167 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -94,7 +94,7 @@ volume = loaded_vial.volume reagents.maximum_volume = loaded_vial.reagents.maximum_volume -/obj/item/reagent_containers/hypospray/vial/attack_hand(mob/user as mob) +/obj/item/reagent_containers/hypospray/vial/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(loaded_vial) reagents.trans_to_holder(loaded_vial.reagents,volume) @@ -394,6 +394,9 @@ /obj/item/reagent_containers/hypospray/glukoz/attack_self(mob/user) . = ..() + if(.) + return + . = ..() if (closed) closed = 0 playsound(loc,"canopen", rand(10,50), 1) diff --git a/code/modules/reagents/reagent_containers/organic.dm b/code/modules/reagents/reagent_containers/organic.dm index db0b1dfecd8..66239ac7bd4 100644 --- a/code/modules/reagents/reagent_containers/organic.dm +++ b/code/modules/reagents/reagent_containers/organic.dm @@ -52,12 +52,15 @@ . = ..() update_icon() -/obj/item/reagent_containers/organic/attack_hand() +/obj/item/reagent_containers/organic/attack_hand(mob/user, list/params) ..() update_icon() /obj/item/reagent_containers/organic/attack_self(mob/user) + . = ..() + if(.) + return ..() if(is_open_container()) to_chat(usr, "You crush \the [src] in your hands.") diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 4af208415e9..3e2fdc5e7e4 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -69,7 +69,10 @@ D.set_up(my_target, spray_size, 10) return -/obj/item/reagent_containers/spray/attack_self(var/mob/user) +/obj/item/reagent_containers/spray/attack_self(mob/user) + . = ..() + if(.) + return if(!possible_transfer_amounts) return amount_per_transfer_from_this = next_list_item(amount_per_transfer_from_this, possible_transfer_amounts) @@ -133,7 +136,10 @@ . = ..() . += "The safety is [safety ? "on" : "off"]." -/obj/item/reagent_containers/spray/pepper/attack_self(var/mob/user) +/obj/item/reagent_containers/spray/pepper/attack_self(mob/user) + . = ..() + if(.) + return safety = !safety to_chat(usr, "You switch the safety [safety ? "on" : "off"].") @@ -234,7 +240,10 @@ . = ..() . += "The tank is [pumped ? "depressurized" : "pressurized"]." -/obj/item/reagent_containers/spray/squirt/attack_self(var/mob/user) +/obj/item/reagent_containers/spray/squirt/attack_self(mob/user) + . = ..() + if(.) + return pumped = !pumped to_chat(usr, "You pump the handle [pumped ? "to depressurize" : "to pressurize"] the tank.") diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 7145ed3f95b..31c58a4737b 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -37,7 +37,10 @@ . = ..() update_icon() -/obj/item/reagent_containers/syringe/attack_self(mob/user as mob) +/obj/item/reagent_containers/syringe/attack_self(mob/user) + . = ..() + if(.) + return switch(mode) if(SYRINGE_DRAW) mode = SYRINGE_INJECT @@ -47,7 +50,7 @@ return update_icon() -/obj/item/reagent_containers/syringe/attack_hand() +/obj/item/reagent_containers/syringe/attack_hand(mob/user, list/params) ..() update_icon() diff --git a/code/modules/reagents/reagent_containers/syringes_vr.dm b/code/modules/reagents/reagent_containers/syringes_vr.dm index 4298757eb24..7b54cf25778 100644 --- a/code/modules/reagents/reagent_containers/syringes_vr.dm +++ b/code/modules/reagents/reagent_containers/syringes_vr.dm @@ -66,7 +66,10 @@ eo.queue_syringe_infection() //Allow for capped syringe mode -/obj/item/reagent_containers/syringe/attack_self(mob/user as mob) +/obj/item/reagent_containers/syringe/attack_self(mob/user) + . = ..() + if(.) + return switch(mode) if(SYRINGE_CAPPED) mode = SYRINGE_DRAW diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 71880ca14c6..7f7651ec1d7 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -150,7 +150,7 @@ return ..() // attack with hand, move pulled object onto conveyor -/obj/machinery/conveyor/attack_hand(mob/user as mob) +/obj/machinery/conveyor/attack_hand(mob/user, list/params) if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return if (user.pulling.anchored) @@ -255,7 +255,7 @@ C.setmove() // attack with hand, switch position -/obj/machinery/conveyor_switch/attack_hand(mob/user) +/obj/machinery/conveyor_switch/attack_hand(mob/user, list/params) if(!allowed(user)) to_chat(user, "Access denied.") return @@ -316,7 +316,7 @@ desc = "A conveyor control switch. It appears to only go in one direction." // attack with hand, switch position -/obj/machinery/conveyor_switch/oneway/attack_hand(mob/user) +/obj/machinery/conveyor_switch/oneway/attack_hand(mob/user, list/params) if(position == 0) position = convdir else diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index d5ab69b3e39..deff40689f9 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -217,7 +217,7 @@ interact(user, 1) // human interact with machine -/obj/machinery/disposal/attack_hand(mob/user as mob) +/obj/machinery/disposal/attack_hand(mob/user, list/params) if(machine_stat & BROKEN) return diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index b786a9e1fa5..bf121d2b163 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -13,7 +13,7 @@ var/label_x var/tag_x -/obj/structure/bigDelivery/attack_hand(mob/user as mob) +/obj/structure/bigDelivery/attack_hand(mob/user, list/params) unwrap() /obj/structure/bigDelivery/proc/unwrap() @@ -129,7 +129,10 @@ var/nameset = 0 var/tag_x -/obj/item/smallDelivery/attack_self(mob/user as mob) +/obj/item/smallDelivery/attack_self(mob/user) + . = ..() + if(.) + return if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 wrapped.loc = user.loc if(ishuman(user)) @@ -343,7 +346,10 @@ return data -/obj/item/destTagger/attack_self(mob/user as mob) +/obj/item/destTagger/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/destTagger/ui_act(action, params) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 693b923ca75..09831dd0e55 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -134,7 +134,7 @@ var/global/list/obj/machinery/message_server/message_servers = list() Console.set_light(2) -/obj/machinery/message_server/attack_hand(user as mob) +/obj/machinery/message_server/attack_hand(mob/user, list/params) // to_chat(user, "There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.") to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]") active = !active diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 14fd66f8f77..94120753abf 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -165,7 +165,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "" return dat.Join() -/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob) +/obj/machinery/computer/rdconsole/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return ui_interact(user) diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index edb678cc028..beb9366b790 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -14,7 +14,7 @@ var/list/materials = list() // Materials this machine can accept. var/list/hidden_materials = list() // Materials this machine will not display, unless it contains them. Must be in the materials list as well. -/obj/machinery/r_n_d/attack_hand(mob/user as mob) +/obj/machinery/r_n_d/attack_hand(mob/user, list/params) return /obj/machinery/r_n_d/proc/getMaterialType(var/name) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 43546e87b2f..e7455ff7ee1 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -288,7 +288,7 @@ target.files.known_tech |= from.files.known_tech return TRUE -/obj/machinery/computer/rdservercontrol/attack_hand(mob/user as mob) +/obj/machinery/computer/rdservercontrol/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN|NOPOWER)) return ui_interact(user) diff --git a/code/modules/resleeving/computers.dm b/code/modules/resleeving/computers.dm index 2d3ac24f2c7..7b7f1c4af76 100644 --- a/code/modules/resleeving/computers.dm +++ b/code/modules/resleeving/computers.dm @@ -135,7 +135,7 @@ /obj/machinery/computer/transhuman/resleeving/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/transhuman/resleeving/attack_hand(mob/user as mob) +/obj/machinery/computer/transhuman/resleeving/attack_hand(mob/user, list/params) user.set_machine(src) add_fingerprint(user) @@ -431,12 +431,15 @@ icon_state = "cmoemergency" item_state = "card-id" -/obj/item/cmo_disk_holder/attack_self(var/mob/attacker) +/obj/item/cmo_disk_holder/attack_self(mob/user) + . = ..() + if(.) + return playsound(src, 'sound/items/poster_ripped.ogg', 50) - to_chat(attacker, "You tear open \the [name].") - attacker.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) + to_chat(user, "You tear open \the [name].") + user.temporarily_remove_from_inventory(src, INV_OP_FORCE | INV_OP_SHOULD_NOT_INTERCEPT | INV_OP_SILENT) var/obj/item/disk/transcore/newdisk = new(get_turf(src)) - attacker.put_in_hands_or_drop(newdisk) + user.put_in_hands_or_drop(newdisk) qdel(src) /obj/item/disk/transcore diff --git a/code/modules/resleeving/implant.dm b/code/modules/resleeving/implant.dm index f7f940eb6dd..5e810aebe5c 100644 --- a/code/modules/resleeving/implant.dm +++ b/code/modules/resleeving/implant.dm @@ -62,7 +62,10 @@ icon_state = "[initial(icon_state)][imps.len]" germ_level = 0 -/obj/item/backup_implanter/attack_self(mob/user as mob) +/obj/item/backup_implanter/attack_self(mob/user) + . = ..() + if(.) + return if(!istype(user)) return diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm index f65daebd29f..cd027cc7ede 100644 --- a/code/modules/resleeving/infomorph.dm +++ b/code/modules/resleeving/infomorph.dm @@ -339,7 +339,7 @@ var/list/infomorph_emotions = list( if(stat != 2) close_up() return -/mob/living/silicon/infomorph/attack_hand(mob/user as mob) +/mob/living/silicon/infomorph/attack_hand(mob/user, list/params) visible_message("[user.name] boops [src] on the head.") close_up() diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index 2fc654096ef..4625967ce41 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -342,7 +342,7 @@ return 1 -/obj/machinery/transhuman/synthprinter/attack_hand(mob/user) +/obj/machinery/transhuman/synthprinter/attack_hand(mob/user, list/params) if((busy == 0) || (machine_stat & NOPOWER)) return to_chat(user, "Current print cycle is [busy]% complete.") @@ -432,7 +432,7 @@ manip_rating += M.rating blur_amount = (48 - manip_rating * 8) -/obj/machinery/transhuman/resleever/attack_hand(mob/user) +/obj/machinery/transhuman/resleever/attack_hand(mob/user, list/params) user.set_machine(src) var/health_text = "" var/mind_text = "" diff --git a/code/modules/resleeving/mirror.dm b/code/modules/resleeving/mirror.dm index 7ed6f2c2251..cbd67adcce7 100644 --- a/code/modules/resleeving/mirror.dm +++ b/code/modules/resleeving/mirror.dm @@ -166,7 +166,10 @@ to_chat(usr, "You must target the torso.") return CLICKCHAIN_DO_NOT_PROPAGATE -/obj/item/mirrortool/attack_self(var/mob/user) +/obj/item/mirrortool/attack_self(mob/user) + . = ..() + if(.) + return if(!imp) to_chat(usr, "No mirror is loaded.") else diff --git a/code/modules/resleeving/sleevecard.dm b/code/modules/resleeving/sleevecard.dm index 0e339e45bc9..650e3408463 100644 --- a/code/modules/resleeving/sleevecard.dm +++ b/code/modules/resleeving/sleevecard.dm @@ -42,6 +42,9 @@ return ..() /obj/item/sleevecard/attack_self(mob/user) + . = ..() + if(.) + return add_fingerprint(user) if(!infomorph) diff --git a/code/modules/rigsuits/rig_attackby.dm b/code/modules/rigsuits/rig_attackby.dm index b4f60f37c2f..541277cecfa 100644 --- a/code/modules/rigsuits/rig_attackby.dm +++ b/code/modules/rigsuits/rig_attackby.dm @@ -172,7 +172,7 @@ ..() -/obj/item/rig/attack_hand(var/mob/user) +/obj/item/rig/attack_hand(mob/user, list/params) if(electrified != 0) if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here. diff --git a/code/modules/rigsuits/rig_pieces.dm b/code/modules/rigsuits/rig_pieces.dm index cfbaf2579c3..ee322c55dc5 100644 --- a/code/modules/rigsuits/rig_pieces.dm +++ b/code/modules/rigsuits/rig_pieces.dm @@ -164,12 +164,12 @@ SPECIES_ZORREN_HIGH, ) -/obj/item/clothing/suit/space/rig/attack_hand(mob/living/M) +/obj/item/clothing/suit/space/rig/attack_hand(mob/user, list/params) if(tacknife) tacknife.loc = get_turf(src) - if(M.put_in_active_hand(tacknife)) - to_chat(M, SPAN_NOTICE("You slide \the [tacknife] out of [src].")) - playsound(M, 'sound/weapons/flipblade.ogg', 40, TRUE) + if(user.put_in_active_hand(tacknife)) + to_chat(user, SPAN_NOTICE("You slide \the [tacknife] out of [src].")) + playsound(user, 'sound/weapons/flipblade.ogg', 40, TRUE) tacknife = null update_icon() return diff --git a/code/modules/rigsuits/suits/ert.dm b/code/modules/rigsuits/suits/ert.dm index 011fb51bb33..34a5878233b 100644 --- a/code/modules/rigsuits/suits/ert.dm +++ b/code/modules/rigsuits/suits/ert.dm @@ -115,7 +115,10 @@ /obj/item/rig_module/self_destruct ) -/obj/item/rig/ert/para/attack_self(mob/user as mob) +/obj/item/rig/ert/para/attack_self(mob/user) + . = ..() + if(.) + return if(user.mind.isholy && !anti_magic && !emp_proof && !blessed) anti_magic = TRUE blessed = TRUE diff --git a/code/modules/rogueminer_vr/zone_console.dm b/code/modules/rogueminer_vr/zone_console.dm index 804cb4a6f8d..635a3e7b8b3 100644 --- a/code/modules/rogueminer_vr/zone_console.dm +++ b/code/modules/rogueminer_vr/zone_console.dm @@ -32,7 +32,7 @@ /obj/machinery/computer/roguezones/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/roguezones/attack_hand(mob/user as mob) +/obj/machinery/computer/roguezones/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (BROKEN|NOPOWER)) return diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 6660ce45235..526f672973d 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -68,7 +68,7 @@ if(machine_stat & NOPOWER) icon_state = "auth_off" -/obj/machinery/keycard_auth/attack_hand(mob/user as mob) +/obj/machinery/keycard_auth/attack_hand(mob/user, list/params) if(user.stat || machine_stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") return diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index 4ca93719d90..eee94ed5a7c 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -206,7 +206,10 @@ for(var/obj/effect/directional_shield/S in active_shields) S.update_color(new_color) -/obj/item/shield_projector/attack_self(var/mob/living/user) +/obj/item/shield_projector/attack_self(mob/user) + . = ..() + if(.) + return if(active) if(always_on) to_chat(user, "You can't seem to deactivate \the [src].") @@ -398,7 +401,10 @@ else my_tool.set_ready_state(1) -/obj/item/shield_projector/line/exosuit/attack_self(var/mob/living/user) +/obj/item/shield_projector/line/exosuit/attack_self(mob/user) + . = ..() + if(.) + return if(active) if(always_on) to_chat(user, "You can't seem to deactivate \the [src].") diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index 07808ee1fed..c5e3cf38c6d 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -250,7 +250,7 @@ malfunction = 1 checkhp() -/obj/machinery/shieldgen/attack_hand(mob/user as mob) +/obj/machinery/shieldgen/attack_hand(mob/user, list/params) if(locked) to_chat(user, "The machine is locked, you are unable to use it.") return diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm index f70ed205a0f..2e55ed0cc9b 100644 --- a/code/modules/shieldgen/energy_field.dm +++ b/code/modules/shieldgen/energy_field.dm @@ -64,7 +64,7 @@ /obj/effect/energy_field/take_damage(var/damage) adjust_strength(-damage / 20) -/obj/effect/energy_field/attack_hand(var/mob/living/user) +/obj/effect/energy_field/attack_hand(mob/user, list/params) impact_effect(3) // Harmless, but still produces the 'impact' effect. ..() diff --git a/code/modules/shieldgen/energy_shield.dm b/code/modules/shieldgen/energy_shield.dm index 599008b7e96..8c2660516e5 100644 --- a/code/modules/shieldgen/energy_shield.dm +++ b/code/modules/shieldgen/energy_shield.dm @@ -162,7 +162,7 @@ animate(src, alpha = initial(alpha), time = 1 SECOND) // Just for fun -/obj/effect/shield/attack_hand(var/user) +/obj/effect/shield/attack_hand(mob/user, list/params) flash_adjacent_segments(3) /obj/effect/shield/take_damage(var/damage, var/damtype, var/hitby) diff --git a/code/modules/shieldgen/handheld_defuser.dm b/code/modules/shieldgen/handheld_defuser.dm index 4b3a10b827b..6096935b74c 100644 --- a/code/modules/shieldgen/handheld_defuser.dm +++ b/code/modules/shieldgen/handheld_defuser.dm @@ -45,6 +45,9 @@ icon_state = "hdiffuser_off" /obj/item/shield_diffuser/attack_self(mob/user) + . = ..() + if(.) + return enabled = !enabled update_icon() if(enabled) @@ -58,7 +61,7 @@ to_chat(user, "The charge meter reads [cell ? cell.percent() : 0]%") to_chat(user, "It is [enabled ? "enabled" : "disabled"].") -/obj/item/shield_diffuser/attack_hand(mob/user as mob) +/obj/item/shield_diffuser/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) if(cell) cell.update_icon() diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm index 350bc5fb850..d3579d64018 100644 --- a/code/modules/shieldgen/sheldwallgen.dm +++ b/code/modules/shieldgen/sheldwallgen.dm @@ -25,7 +25,7 @@ var/max_stored_power = 50000 //50 kW use_power = USE_POWER_OFF //Draws directly from power net. Does not use APC power. -/obj/machinery/shieldwallgen/attack_hand(mob/user as mob) +/obj/machinery/shieldwallgen/attack_hand(mob/user, list/params) if(state != 1) to_chat(user, "The shield generator needs to be firmly secured to the floor first.") return 1 @@ -257,7 +257,7 @@ update_nearby_tiles() ..() -/obj/machinery/shieldwall/attack_hand(mob/user as mob) +/obj/machinery/shieldwall/attack_hand(mob/user, list/params) return diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index 9b9b14bb25c..4136e694e42 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -67,7 +67,7 @@ else ..() -/obj/machinery/shield_capacitor/attack_hand(mob/user) +/obj/machinery/shield_capacitor/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN)) return interact(user) diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm index 1260136efa5..1cd44cceb38 100644 --- a/code/modules/shieldgen/shield_diffuser.dm +++ b/code/modules/shieldgen/shield_diffuser.dm @@ -59,7 +59,7 @@ else icon_state = "fdiffuser_on" -/obj/machinery/shield_diffuser/attack_hand(mob/user as mob) +/obj/machinery/shield_diffuser/attack_hand(mob/user, list/params) if((. = ..())) return if(alarm) diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index 970d893ebc0..e8990524486 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -94,7 +94,7 @@ /obj/machinery/shield_gen/attack_ai(user as mob) return src.attack_hand(user) -/obj/machinery/shield_gen/attack_hand(mob/user) +/obj/machinery/shield_gen/attack_hand(mob/user, list/params) if(machine_stat & (BROKEN)) return interact(user) diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm index 5bd723d914b..a15aa5ccd3c 100644 --- a/code/modules/shieldgen/shield_generator.dm +++ b/code/modules/shieldgen/shield_generator.dm @@ -435,7 +435,7 @@ return data -/obj/machinery/power/shield_generator/attack_hand(mob/user) +/obj/machinery/power/shield_generator/attack_hand(mob/user, list/params) if((. = ..())) return if(panel_open && Adjacent(user)) diff --git a/code/modules/shuttles/landmarks.dm b/code/modules/shuttles/landmarks.dm index ee23f63d1fc..4634e61d209 100644 --- a/code/modules/shuttles/landmarks.dm +++ b/code/modules/shuttles/landmarks.dm @@ -167,7 +167,10 @@ light_color = "#3728ff" var/active -/obj/item/spaceflare/attack_self(var/mob/user) +/obj/item/spaceflare/attack_self(mob/user) + . = ..() + if(.) + return if(!active) visible_message("[user] pulls the cord, activating the [src].") activate() diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index cd72a3a0a90..cf6e03626ab 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -11,7 +11,7 @@ var/skip_act = FALSE var/tgui_subtemplate = "ShuttleControlConsoleDefault" -/obj/machinery/computer/shuttle_control/attack_hand(user as mob) +/obj/machinery/computer/shuttle_control/attack_hand(mob/user, list/params) if(..(user)) return if(!allowed(user)) diff --git a/code/modules/species/protean/protean_blob.dm b/code/modules/species/protean/protean_blob.dm index 555a21e442a..016160c3159 100644 --- a/code/modules/species/protean/protean_blob.dm +++ b/code/modules/species/protean/protean_blob.dm @@ -260,7 +260,10 @@ else return ..() -/mob/living/simple_mob/protean_blob/attack_hand(mob/living/L) +/mob/living/simple_mob/protean_blob/attack_hand(mob/user, list/params) + var/mob/living/L = user + if(!istype(L)) + return if(L.get_effective_size() >= (src.get_effective_size() + 0.5) ) src.get_scooped(L) else diff --git a/code/modules/species/station/xenomorph_hybrids/hybrid_resin.dm b/code/modules/species/station/xenomorph_hybrids/hybrid_resin.dm index 830f50bfd2f..c1ca94cc79a 100644 --- a/code/modules/species/station/xenomorph_hybrids/hybrid_resin.dm +++ b/code/modules/species/station/xenomorph_hybrids/hybrid_resin.dm @@ -218,7 +218,7 @@ health = max(0, health - tforce) healthcheck() -/obj/effect/alien/hybrid_resin/attack_hand() +/obj/effect/alien/hybrid_resin/attack_hand(mob/user, list/params) usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if (MUTATION_HULK in usr.mutations) to_chat(usr, "You easily destroy the [name].") diff --git a/code/modules/species/xenomorphs/alien_facehugger.dm b/code/modules/species/xenomorphs/alien_facehugger.dm index 1c4e9559417..11636b09b95 100644 --- a/code/modules/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/species/xenomorphs/alien_facehugger.dm @@ -30,7 +30,7 @@ var/const/MAX_ACTIVE_TIME = 400 var/strength = 5 var/attached = 0 -/obj/item/clothing/mask/facehugger/attack_hand(user as mob) +/obj/item/clothing/mask/facehugger/attack_hand(mob/user, list/params) if((stat == CONSCIOUS && !sterile)) if(Attach(user)) return @@ -312,7 +312,7 @@ var/const/MAX_ACTIVE_TIME = 400 var/strength = 5 var/attached = 0 -/mob/living/simple_mob/animal/space/alien/facehugger/attack_hand(user as mob) +/mob/living/simple_mob/animal/space/alien/facehugger/attack_hand(mob/user, list/params) if((stat == CONSCIOUS && !sterile)) if(Attach(user)) diff --git a/code/modules/spells/artifacts.dm b/code/modules/spells/artifacts.dm index 0ddb3af05b4..4228e582920 100644 --- a/code/modules/spells/artifacts.dm +++ b/code/modules/spells/artifacts.dm @@ -12,7 +12,10 @@ force = 10 hitsound = 'sound/items/welder2.ogg' -/obj/item/scrying/attack_self(mob/user as mob) +/obj/item/scrying/attack_self(mob/user) + . = ..() + if(.) + return if((user.mind && !wizards.is_antagonist(user.mind))) to_chat(user, "You stare into the orb and see nothing but your own reflection.") return @@ -46,6 +49,9 @@ var/spawn_fast = 0 //if 1, ignores checking for mobs on loc before spawning /obj/item/veilrender/attack_self(mob/user) + . = ..() + if(.) + return if(charges > 0) new /obj/effect/rend(get_turf(user), spawn_type, spawn_amt, rend_desc, spawn_fast) charges-- @@ -276,6 +282,9 @@ user.unset_machine() /obj/item/voodoo/attack_self(mob/user) + . = ..() + if(.) + return if(!target && length(possible)) target = input(user, "Select your victim!", "Voodoo") as null|anything in possible return @@ -375,7 +384,10 @@ REMOVE_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src) user.update_mobility() -/obj/item/warpwhistle/attack_self(mob/living/carbon/user) +/obj/item/warpwhistle/attack_self(mob/user) + . = ..() + if(.) + return if(!istype(user) || on_cooldown) return var/turf/T = get_turf(user) diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 194c8f955f6..7eec3368fd1 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -254,7 +254,10 @@ . = ..() name += spellname -/obj/item/spellbook/oneuse/attack_self(mob/user as mob) +/obj/item/spellbook/oneuse/attack_self(mob/user) + . = ..() + if(.) + return var/spell/S = new spell(user) for(var/spell/knownspell in user.spell_list) if(knownspell.type == S.type) diff --git a/code/modules/stockmarket/computer.dm b/code/modules/stockmarket/computer.dm index d6002b9ece5..90457b111f6 100644 --- a/code/modules/stockmarket/computer.dm +++ b/code/modules/stockmarket/computer.dm @@ -13,7 +13,7 @@ . = ..() logged_in = "Cargo Department" -/obj/machinery/computer/stockexchange/attack_hand(mob/user) +/obj/machinery/computer/stockexchange/attack_hand(mob/user, list/params) if(..(user)) return diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 85a65f18344..24e9e770c7a 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -55,7 +55,7 @@ return 1 return 1 -/obj/structure/table/attackby(obj/item/W, mob/user, params) +/obj/structure/table/attackby(obj/item/W, mob/user, list/params) // Handle harm intent grabbing/tabling. if(istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W @@ -135,13 +135,12 @@ if(!user.transfer_item_to_loc(W, loc)) return if(item_pixel_place) - var/list/click_params = params2list(params) //Center the icon where the user clicked. - if(!click_params || !click_params["icon-x"] || !click_params["icon-y"]) + if(!params || !params["icon-x"] || !params["icon-y"]) return //Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf) - W.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2) - W.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2) + W.pixel_x = clamp(text2num(params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2) + W.pixel_y = clamp(text2num(params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2) return return ..() diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 8df9b0d5bbe..1107643551f 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -182,7 +182,7 @@ var/list/table_icon_cache = list() return ..() -/obj/structure/table/attack_hand(mob/user as mob) +/obj/structure/table/attack_hand(mob/user, list/params) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/X = user if(istype(X.species, /datum/species/xenos)) diff --git a/code/modules/telesci/bscyrstal.dm b/code/modules/telesci/bscyrstal.dm index ed7d3cfc95e..74ec03d84bd 100644 --- a/code/modules/telesci/bscyrstal.dm +++ b/code/modules/telesci/bscyrstal.dm @@ -15,6 +15,9 @@ pixel_y = rand(-5, 5) /obj/item/ore/bluespace_crystal/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("[user] crushes [src]!", "You crush [src]!") var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(5, 1, get_turf(src)) diff --git a/code/modules/telesci/hyper_pad.dm b/code/modules/telesci/hyper_pad.dm index 6c6fc8f5e15..8777f64c7dc 100644 --- a/code/modules/telesci/hyper_pad.dm +++ b/code/modules/telesci/hyper_pad.dm @@ -54,7 +54,7 @@ if(primary) primary.attack_ghost(ghost) -/obj/machinery/hyperpad/centre/attack_hand(mob/user) +/obj/machinery/hyperpad/centre/attack_hand(mob/user, list/params) . = ..() if(.) return @@ -75,7 +75,7 @@ src.add_fingerprint(user) startteleport(user) -/obj/machinery/hyperpad/attack_hand(mob/user) +/obj/machinery/hyperpad/attack_hand(mob/user, list/params) . = ..() if(primary) primary.attack_hand(user) diff --git a/code/modules/telesci/quantum_pad.dm b/code/modules/telesci/quantum_pad.dm index 64b2eb1abea..24c18d548c2 100644 --- a/code/modules/telesci/quantum_pad.dm +++ b/code/modules/telesci/quantum_pad.dm @@ -46,7 +46,7 @@ teleport_cooldown = initial(teleport_cooldown) teleport_cooldown -= (E * 100) -/obj/machinery/power/quantumpad/attackby(obj/item/I, mob/user, params) +/obj/machinery/power/quantumpad/attackby(obj/item/I, mob/user) if(default_deconstruction_screwdriver(user, I)) return @@ -79,7 +79,7 @@ else icon_state = initial(icon_state) -/obj/machinery/power/quantumpad/attack_hand(mob/user) +/obj/machinery/power/quantumpad/attack_hand(mob/user, list/params) . = ..() if(.) return diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 68f7c14cf6b..1f09bda5acc 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -77,7 +77,7 @@ /obj/machinery/computer/telescience/attack_ai(mob/user) src.attack_hand(user) -/obj/machinery/computer/telescience/attack_hand(mob/user) +/obj/machinery/computer/telescience/attack_hand(mob/user, list/params) if(..()) return nano_ui_interact(user) diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm index 13958086e76..782afd39a58 100644 --- a/code/modules/turbolift/turbolift_console.dm +++ b/code/modules/turbolift/turbolift_console.dm @@ -39,7 +39,7 @@ /obj/structure/lift/attack_generic(var/mob/user) return attack_hand(user) -/obj/structure/lift/attack_hand(var/mob/user) +/obj/structure/lift/attack_hand(mob/user, list/params) return interact(user) /obj/structure/lift/interact(var/mob/user) diff --git a/code/modules/vehicles/ridden/wheelchair.dm b/code/modules/vehicles/ridden/wheelchair.dm index d7720ddcb1a..57aa7c1d482 100644 --- a/code/modules/vehicles/ridden/wheelchair.dm +++ b/code/modules/vehicles/ridden/wheelchair.dm @@ -53,11 +53,14 @@ var/unfolded_type = /obj/vehicle/ridden/wheelchair /obj/item/wheelchair/attack_self(mob/user) - var/obj/vehicle/ridden/wheelchair/R = new /obj/vehicle/ridden/wheelchair(user.loc) - R.add_fingerprint(user) - R.name = src.name - R.color = src.color - qdel(src) + . = ..() + if(.) + return + var/obj/vehicle/ridden/wheelchair/R = new /obj/vehicle/ridden/wheelchair(user.loc) + R.add_fingerprint(user) + R.name = src.name + R.color = src.color + qdel(src) /obj/vehicle/ridden/wheelchair/OnMouseDropLegacy(over_object, src_location, over_location) ..() diff --git a/code/modules/vehicles_legacy/bike.dm b/code/modules/vehicles_legacy/bike.dm index 0d24ef371c4..8f31500fb0d 100644 --- a/code/modules/vehicles_legacy/bike.dm +++ b/code/modules/vehicles_legacy/bike.dm @@ -120,7 +120,7 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return CLICKCHAIN_DO_NOT_PROPAGATE -/obj/vehicle_old/bike/attack_hand(var/mob/user as mob) +/obj/vehicle_old/bike/attack_hand(mob/user, list/params) if(user == load) unload(load, user) to_chat(user, "You unbuckle yourself from \the [src].") diff --git a/code/modules/vehicles_legacy/skateboard.dm b/code/modules/vehicles_legacy/skateboard.dm index 8b4dbc471ed..abee64eb3df 100644 --- a/code/modules/vehicles_legacy/skateboard.dm +++ b/code/modules/vehicles_legacy/skateboard.dm @@ -47,7 +47,7 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return CLICKCHAIN_DO_NOT_PROPAGATE -/obj/vehicle_old/skateboard/attack_hand(var/mob/user as mob) +/obj/vehicle_old/skateboard/attack_hand(mob/user, list/params) if(user == load) unbuckle_mob(load, user) to_chat(user, "You unbuckle yourself from \the [src].") diff --git a/code/modules/vehicles_legacy/train.dm b/code/modules/vehicles_legacy/train.dm index 7b2e4186cfa..8b77caaf7d0 100644 --- a/code/modules/vehicles_legacy/train.dm +++ b/code/modules/vehicles_legacy/train.dm @@ -116,7 +116,7 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return CLICKCHAIN_DO_NOT_PROPAGATE -/obj/vehicle_old/train/attack_hand(mob/user as mob) +/obj/vehicle_old/train/attack_hand(mob/user, list/params) if(user.stat || user.restrained() || !Adjacent(user)) return 0 diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm index 6dadb766cc8..4263e11d745 100644 --- a/code/modules/virus2/curer.dm +++ b/code/modules/virus2/curer.dm @@ -36,7 +36,7 @@ /obj/machinery/computer/curer/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/curer/attack_hand(var/mob/user as mob) +/obj/machinery/computer/curer/attack_hand(mob/user, list/params) if(..()) return user.machine = src diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index 8855a8d8eb5..4541157455b 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -38,7 +38,7 @@ /obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob) +/obj/machinery/computer/diseasesplicer/attack_hand(mob/user, list/params) if(..()) return TRUE ui_interact(user) diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index 2649f39cf3d..df4e6ab9435 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -45,7 +45,7 @@ src.attack_hand(user) -/obj/machinery/disease2/incubator/attack_hand(mob/user) +/obj/machinery/disease2/incubator/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return nano_ui_interact(user) diff --git a/code/modules/virus2/isolator.dm b/code/modules/virus2/isolator.dm index a1839d5dbef..c4b98f30f33 100644 --- a/code/modules/virus2/isolator.dm +++ b/code/modules/virus2/isolator.dm @@ -41,7 +41,7 @@ src.attack_hand(user) -/obj/machinery/disease2/isolator/attack_hand(mob/user) +/obj/machinery/disease2/isolator/attack_hand(mob/user, list/params) if(machine_stat & (NOPOWER|BROKEN)) return ui_interact(user) diff --git a/code/modules/vore/eating/leave_remains_vr.dm b/code/modules/vore/eating/leave_remains_vr.dm index ea59db967db..b573c6e5e3f 100644 --- a/code/modules/vore/eating/leave_remains_vr.dm +++ b/code/modules/vore/eating/leave_remains_vr.dm @@ -91,6 +91,9 @@ pred_name = pred.name /obj/item/digestion_remains/attack_self(mob/user) + . = ..() + if(.) + return if(user.a_intent == INTENT_HARM) to_chat(user,"As you squeeze the [name], it crumbles into dust and falls apart into nothing!") qdel(src) diff --git a/code/modules/vore/fluffstuff/custom_guns.dm b/code/modules/vore/fluffstuff/custom_guns.dm index 7b20bbbf9c2..fe88e3d7f2b 100644 --- a/code/modules/vore/fluffstuff/custom_guns.dm +++ b/code/modules/vore/fluffstuff/custom_guns.dm @@ -150,7 +150,7 @@ chambered = AC update_icon() -/obj/item/gun/ballistic/revolver/mateba/fluff/tasald_corlethian/attack_hand(mob/user as mob) +/obj/item/gun/ballistic/revolver/mateba/fluff/tasald_corlethian/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src) unload_ammo(user, allow_dump = 1) else diff --git a/code/modules/vore/fluffstuff/custom_items.dm b/code/modules/vore/fluffstuff/custom_items.dm index 7c68e314247..2be982358a9 100644 --- a/code/modules/vore/fluffstuff/custom_items.dm +++ b/code/modules/vore/fluffstuff/custom_items.dm @@ -139,7 +139,10 @@ assignment = "Centcom Officer" -/obj/item/card/id/centcom/station/fluff/joanbadge/attack_self(mob/user as mob) +/obj/item/card/id/centcom/station/fluff/joanbadge/attack_self(mob/user) + . = ..() + if(.) + return if(isliving(user)) user.visible_message("[user] flashes their golden security badge.\nIt reads:NT Security.","You display the faded badge.\nIt reads: NT Security.") @@ -208,7 +211,10 @@ icon_override = 'icons/vore/custom_items_vr.dmi' item_state = "Flag_Nanotrasen_mob" -/obj/item/flag/attack_self(mob/user as mob) +/obj/item/flag/attack_self(mob/user) + . = ..() + if(.) + return if(isliving(user)) user.visible_message("[user] waves their Banner around!","You wave your Banner around.") @@ -326,7 +332,10 @@ assignment = "CC Medical" var/configured = 0 -/obj/item/card/id/centcom/station/fluff/aronai/attack_self(mob/user as mob) +/obj/item/card/id/centcom/station/fluff/aronai/attack_self(mob/user) + . = ..() + if(.) + return if(configured) return ..() @@ -436,7 +445,10 @@ if((state > 1) || !owner) STOP_PROCESSING(SSobj, src) -/obj/item/clothing/accessory/collar/vmcrystal/attack_self(mob/user as mob) +/obj/item/clothing/accessory/collar/vmcrystal/attack_self(mob/user) + . = ..() + if(.) + return if(state > 0) //Can't re-pair, one time only, for security reasons. to_chat(user, "The [name] doesn't do anything.") return 0 @@ -556,6 +568,9 @@ var/cooldown = 30 /obj/item/cane/wand/attack_self(mob/user) + . = ..() + if(.) + return if(last_use + cooldown >= world.time) return playsound(src, 'sound/weapons/sparkle.ogg', 50, 1) @@ -677,6 +692,9 @@ w_class = ITEMSIZE_SMALL /obj/item/fluff/dragor_dot/attack_self(mob/user) + . = ..() + if(.) + return if(user.ckey == "pontifexminimus") add_verb(user, /mob/living/carbon/human/proc/shapeshifter_select_gender) else @@ -704,7 +722,10 @@ desc = "A primarily blue ID with a holographic 'WAH' etched onto its back. The letters do not obscure anything important on the card. It is shiny and it feels very bumpy." var/title_strings = list("Amaya Rahl's Wah-identification card", "Amaya Rahl's Wah-ID card") -/obj/item/card/id/fluff/amaya/attack_self(mob/user as mob) +/obj/item/card/id/fluff/amaya/attack_self(mob/user) + . = ..() + if(.) + return if(configured == 1) return ..() @@ -822,7 +843,7 @@ ..() -/obj/item/perfect_tele/attack_hand(mob/user) +/obj/item/perfect_tele/attack_hand(mob/user, list/params) if(user.get_inactive_held_item() == src && power_source) to_chat(user,"You eject \the [power_source] from \the [src].") user.put_in_hands(power_source) @@ -832,6 +853,9 @@ return ..() /obj/item/perfect_tele/attack_self(mob/user) + . = ..() + if(.) + return if(!(user.ckey in warned_users)) warned_users |= user.ckey alert(user,"This device can be easily used to break ERP preferences due to the nature of teleporting \ @@ -1078,7 +1102,7 @@ tele_hand = null return ..() -/obj/item/perfect_tele_beacon/attack_hand(mob/user) +/obj/item/perfect_tele_beacon/attack_hand(mob/user, list/params) if((user.ckey != creator) && !(user.ckey in warned_users)) warned_users |= user.ckey var/choice = alert(user,"This device is a translocator beacon. Having it on your person may mean that anyone \ @@ -1091,6 +1115,9 @@ ..() /obj/item/perfect_tele_beacon/attack_self(mob/user) + . = ..() + if(.) + return if(!isliving(user)) return var/mob/living/L = user @@ -1181,7 +1208,10 @@ user.do_attack_animation(target) user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam -/obj/item/clothing/accessory/badge/holo/detective/ruda/attack_self(mob/user as mob) +/obj/item/clothing/accessory/badge/holo/detective/ruda/attack_self(mob/user) + . = ..() + if(.) + return if(!stored_name) to_chat(user, "You huff along the front of your badge, then rub your sleeve on it to polish it up.") @@ -1411,6 +1441,9 @@ update_held_icon() /obj/item/melee/baton/fluff/stunstaff/attack_self(mob/user) + . = ..() + if(.) + return if(bcell && bcell.charge > hitcost) status = !status to_chat(user, "[src] is now [status ? "on" : "off"].") @@ -1479,12 +1512,16 @@ edge = initial(edge) w_class = initial(w_class) -/obj/item/melee/fluffstuff/attack_self(mob/living/user as mob) +/obj/item/melee/fluffstuff/attack_self(mob/user) + . = ..() + if(.) + return if (active) if ((MUTATION_CLUMSY in user.mutations) && prob(50)) user.visible_message("\The [user] accidentally cuts \himself with \the [src].",\ "You accidentally cut yourself with \the [src].") - user.take_organ_damage(5,5) + var/mob/living/carbon/human/H = ishuman(user)? user : null + H?.take_organ_damage(5,5) deactivate(user) else activate(user) diff --git a/code/modules/vore/fluffstuff/custom_items_cit.dm b/code/modules/vore/fluffstuff/custom_items_cit.dm index 929af6fb7f4..788a573b976 100644 --- a/code/modules/vore/fluffstuff/custom_items_cit.dm +++ b/code/modules/vore/fluffstuff/custom_items_cit.dm @@ -27,7 +27,10 @@ if((state > 1) || !owner) STOP_PROCESSING(SSobj, src) -/obj/item/clothing/accessory/collar/lifecrystal/attack_self(mob/user as mob) +/obj/item/clothing/accessory/collar/lifecrystal/attack_self(mob/user) + . = ..() + if(.) + return owner = user //We're paired to this guy owner_c = user.client //This is his client check_owner() diff --git a/code/modules/vore/fluffstuff/guns/bsharpoon.dm b/code/modules/vore/fluffstuff/guns/bsharpoon.dm index dcf84e73ab8..b4e12759f17 100644 --- a/code/modules/vore/fluffstuff/guns/bsharpoon.dm +++ b/code/modules/vore/fluffstuff/guns/bsharpoon.dm @@ -71,7 +71,10 @@ var/turf/real_target = prob(failchance)? pick(trange(failrange, user)) : ToTurf AM.locationTransitForceMove(real_target, allow_pulled = FALSE, allow_grabbed = GRAB_AGGRESSIVE) -/obj/item/bluespace_harpoon/attack_self(mob/living/user as mob) +/obj/item/bluespace_harpoon/attack_self(mob/user) + . = ..() + if(.) + return return chande_fire_mode(user) /obj/item/bluespace_harpoon/verb/chande_fire_mode(mob/user as mob) diff --git a/code/modules/vore/fluffstuff/guns/cell_loaded/cell_loaded.dm b/code/modules/vore/fluffstuff/guns/cell_loaded/cell_loaded.dm index b5368f9902d..983f2fe1b3c 100644 --- a/code/modules/vore/fluffstuff/guns/cell_loaded/cell_loaded.dm +++ b/code/modules/vore/fluffstuff/guns/cell_loaded/cell_loaded.dm @@ -69,6 +69,9 @@ update_icon() /obj/item/gun/ballistic/cell_loaded/attack_self(mob/user) + . = ..() + if(.) + return if(!chambered) return diff --git a/code/modules/vore/fluffstuff/guns/gunsword.dm b/code/modules/vore/fluffstuff/guns/gunsword.dm index d2fa5aa3a0c..c319938d8a4 100644 --- a/code/modules/vore/fluffstuff/guns/gunsword.dm +++ b/code/modules/vore/fluffstuff/guns/gunsword.dm @@ -93,13 +93,17 @@ attack_verb = list() -/obj/item/cell/device/weapon/gunsword/attack_self(mob/living/user as mob) +/obj/item/cell/device/weapon/gunsword/attack_self(mob/user) + . = ..() + if(.) + return var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()] if (active) if ((MUTATION_CLUMSY in user.mutations) && prob(50)) user.visible_message("\The [user] accidentally cuts [TU.himself] with \the [src].",\ "You accidentally cut yourself with \the [src].") - user.take_organ_damage(5,5) + var/mob/living/carbon/human/H = ishuman(user)? user : null + H?.take_organ_damage(5,5) deactivate(user) update_icon() update_held_icon() diff --git a/code/modules/vore/resizing/holder_micro_vr.dm b/code/modules/vore/resizing/holder_micro_vr.dm index 5600b563dbe..8a3aebd6a62 100644 --- a/code/modules/vore/resizing/holder_micro_vr.dm +++ b/code/modules/vore/resizing/holder_micro_vr.dm @@ -22,7 +22,10 @@ for(var/mob/living/carbon/human/O in contents) O.request_strip_menu(usr) -/obj/item/holder/micro/attack_self(var/mob/living/user) +/obj/item/holder/micro/attack_self(mob/user) + . = ..() + if(.) + return for(var/mob/living/carbon/human/M in contents) M.help_shake_act(user) diff --git a/code/modules/vore/weight/fitness_machines_vr.dm b/code/modules/vore/weight/fitness_machines_vr.dm index ec7f8812e26..1af486035e7 100644 --- a/code/modules/vore/weight/fitness_machines_vr.dm +++ b/code/modules/vore/weight/fitness_machines_vr.dm @@ -11,20 +11,26 @@ var/cooldown = 10 var/weightloss_power = 1 -/obj/machinery/fitness/attack_hand(var/mob/living/user) - if(user.nutrition < 70) - to_chat(user, "You need more energy to workout with the [src]!") +/obj/machinery/fitness/attack_hand(mob/user, list/params) + . = ..() + if(.) + return + var/mob/living/L = user + if(!istype(L)) + return + if(L.nutrition < 70) + to_chat(L, "You need more energy to workout with the [src]!") - else if(user.weight < 70) - to_chat(user, "You're too skinny to risk losing any more weight!") + else if(L.weight < 70) + to_chat(L, "You're too skinny to risk losing any more weight!") else //If they have enough nutrition and body weight, they can exercise. - user.setClickCooldown(cooldown) - user.nutrition -= 10 * weightloss_power - user.weight -= 0.025 * weightloss_power * (0.01*user.weight_loss) + L.setClickCooldown(cooldown) + L.nutrition -= 10 * weightloss_power + L.weight -= 0.025 * weightloss_power * (0.01*L.weight_loss) flick("[icon_state]2",src) var/message = pick(messages) - to_chat(user, "[message].") + to_chat(L, "[message].") for(var/s in workout_sounds) playsound(src.loc, s, 50, 1) @@ -62,7 +68,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) return -/obj/machinery/fitness/heavy/attack_hand(var/mob/living/user) +/obj/machinery/fitness/heavy/attack_hand(mob/user, list/params) if(!anchored) to_chat(user, "For safety reasons, you are required to have this equipment wrenched down before using it!") return @@ -92,10 +98,16 @@ idle_power_usage = 0 active_power_usage = 0 -/obj/machinery/scale/attack_hand(var/mob/living/user) - if(user.loc != loc) - to_chat(user, "You need to be standing on top of the scale for it to work!") +/obj/machinery/scale/attack_hand(mob/user, list/params) + . = ..() + if(.) return - if(user.weight) //Just in case. - var/kilograms = round(text2num(user.weight),4) / 2.20463 - visible_message("[src] displays a reading of [user.weight]lb / [kilograms]kg when [user] stands on it.") + var/mob/living/L = user + if(!istype(L)) + return + if(L.loc != loc) + to_chat(L, "You need to be standing on top of the scale for it to work!") + return + if(L.weight) //Just in case. + var/kilograms = round(text2num(L.weight),4) / 2.20463 + visible_message("[src] displays a reading of [L.weight]lb / [kilograms]kg when [L] stands on it.") diff --git a/code/modules/xenoarcheaology/anomaly_container.dm b/code/modules/xenoarcheaology/anomaly_container.dm index e0b9afe6c10..fc2efc0ad1a 100644 --- a/code/modules/xenoarcheaology/anomaly_container.dm +++ b/code/modules/xenoarcheaology/anomaly_container.dm @@ -14,7 +14,7 @@ if(A) contain(A) -/obj/structure/anomaly_container/attack_hand(var/mob/user) +/obj/structure/anomaly_container/attack_hand(mob/user, list/params) release() /obj/structure/anomaly_container/attack_robot(var/mob/user) diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm index ae45138531b..6edd6549ce8 100644 --- a/code/modules/xenoarcheaology/artifacts/artifact.dm +++ b/code/modules/xenoarcheaology/artifacts/artifact.dm @@ -174,7 +174,7 @@ if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated) secondary_effect.ToggleActivate(0) -/obj/machinery/artifact/attack_hand(var/mob/user as mob) +/obj/machinery/artifact/attack_hand(mob/user, list/params) if (get_dist(user, src) > 1) to_chat(user, "You can't reach [src] from here.") return diff --git a/code/modules/xenoarcheaology/artifacts/gigadrill.dm b/code/modules/xenoarcheaology/artifacts/gigadrill.dm index ad51cd690aa..7f54c833702 100644 --- a/code/modules/xenoarcheaology/artifacts/gigadrill.dm +++ b/code/modules/xenoarcheaology/artifacts/gigadrill.dm @@ -9,7 +9,7 @@ density = 1 layer = ABOVE_JUNK_LAYER -/obj/machinery/giga_drill/attack_hand(mob/user as mob) +/obj/machinery/giga_drill/attack_hand(mob/user, list/params) if(active) active = 0 icon_state = "gigadrill" diff --git a/code/modules/xenoarcheaology/artifacts/replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm index 83c4d7159a1..cb00da1b1a4 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -138,7 +138,7 @@ last_process_time = world.time -/obj/machinery/replicator/attack_hand(mob/user as mob) +/obj/machinery/replicator/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/replicator/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm index 101ad6db746..e2c2a6a017f 100644 --- a/code/modules/xenoarcheaology/sampling.dm +++ b/code/modules/xenoarcheaology/sampling.dm @@ -151,7 +151,10 @@ else to_chat(user, "You are unable to take a sample of [item_to_sample].") -/obj/item/core_sampler/attack_self(var/mob/living/user) +/obj/item/core_sampler/attack_self(mob/user) + . = ..() + if(.) + return if(filled_bag) to_chat(user, "You eject the full sample bag.") var/success = 0 diff --git a/code/modules/xenoarcheaology/tools/ano_device_battery.dm b/code/modules/xenoarcheaology/tools/ano_device_battery.dm index 61b045bbee9..86908954ae2 100644 --- a/code/modules/xenoarcheaology/tools/ano_device_battery.dm +++ b/code/modules/xenoarcheaology/tools/ano_device_battery.dm @@ -48,7 +48,10 @@ else return ..() -/obj/item/anodevice/attack_self(var/mob/user as mob) +/obj/item/anodevice/attack_self(mob/user) + . = ..() + if(.) + return return ui_interact(user) /obj/item/anodevice/ui_state(mob/user, datum/tgui_module/module) diff --git a/code/modules/xenoarcheaology/tools/artifact_analyser.dm b/code/modules/xenoarcheaology/tools/artifact_analyser.dm index a59176a9dae..0c1a9bdd762 100644 --- a/code/modules/xenoarcheaology/tools/artifact_analyser.dm +++ b/code/modules/xenoarcheaology/tools/artifact_analyser.dm @@ -24,7 +24,7 @@ if(!owned_scanner) owned_scanner = locate(/obj/machinery/artifact_scanpad) in orange(1, src) -/obj/machinery/artifact_analyser/attack_hand(mob/user) +/obj/machinery/artifact_analyser/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1) return diff --git a/code/modules/xenoarcheaology/tools/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm index a8543f05f25..ce198e5d845 100644 --- a/code/modules/xenoarcheaology/tools/artifact_harvester.dm +++ b/code/modules/xenoarcheaology/tools/artifact_harvester.dm @@ -35,7 +35,7 @@ else return..() -/obj/machinery/artifact_harvester/attack_hand(mob/user) +/obj/machinery/artifact_harvester/attack_hand(mob/user, list/params) add_fingerprint(user) if(machine_stat & (NOPOWER|BROKEN)) return diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index 2ce1b886533..8aa7d1ea367 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -115,7 +115,7 @@ if(total_purity && fresh_coolant) coolant_purity = total_purity / fresh_coolant -/obj/machinery/radiocarbon_spectrometer/attack_hand(mob/user) +/obj/machinery/radiocarbon_spectrometer/attack_hand(mob/user, list/params) ui_interact(user) /obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, datum/tgui/ui) diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index 223f95b9116..734c3fbf0e9 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -35,7 +35,7 @@ else deactivate() -/obj/machinery/suspension_gen/attack_hand(var/mob/user) +/obj/machinery/suspension_gen/attack_hand(mob/user, list/params) if(panel_open) if(cell) to_chat(user, SPAN_NOTICE("You remove [cell].")) diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index 549055c5067..8ad4858bf02 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -44,7 +44,10 @@ var/last_scan_time = 0 var/scan_delay = 25 -/obj/item/ano_scanner/attack_self(var/mob/living/user) +/obj/item/ano_scanner/attack_self(mob/user) + . = ..() + if(.) + return interact(user) /obj/item/ano_scanner/interact(var/mob/living/user) @@ -153,7 +156,10 @@ to_chat(user, "[icon2html(thing = src, target = world)] [src] pings [pick("madly","wildly","excitedly","crazily")]!") -/obj/item/depth_scanner/attack_self(var/mob/living/user) +/obj/item/depth_scanner/attack_self(mob/user) + . = ..() + if(.) + return ui_interact(user) /obj/item/depth_scanner/ui_state(mob/user, datum/tgui_module/module) @@ -278,6 +284,9 @@ icon_state = "pinoff" /obj/item/beacon_locator/attack_self(mob/user) + . = ..() + if(.) + return return ui_interact(user) /obj/item/beacon_locator/ui_state(mob/user, datum/tgui_module/module) @@ -337,7 +346,10 @@ anomaly_scanner = new/obj/item/ano_scanner/integrated(src) depth_scanner = new/obj/item/depth_scanner(src) -/obj/item/xenoarch_multi_tool/attack_self(var/mob/living/user) +/obj/item/xenoarch_multi_tool/attack_self(mob/user) + . = ..() + if(.) + return depth_scanner.interact(usr) /obj/item/xenoarch_multi_tool/verb/swap_settings() diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index ff1b01dc245..3c376d10c2d 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -173,7 +173,10 @@ w_class = 2 attack_verb = list("drilled") -/obj/item/pickaxe/excavationdrill/attack_self(mob/user as mob) +/obj/item/pickaxe/excavationdrill/attack_self(mob/user) + . = ..() + if(.) + return var/depth = input("Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num if(depth>30 || depth<1) to_chat(user, "Invalid depth.") diff --git a/code/modules/xenobio/items/slime_objects.dm b/code/modules/xenobio/items/slime_objects.dm index 2f5e0521289..e94b678034d 100644 --- a/code/modules/xenobio/items/slime_objects.dm +++ b/code/modules/xenobio/items/slime_objects.dm @@ -7,7 +7,10 @@ description_info = "Use in your hand to attempt to create a Promethean. It functions similarly to a positronic brain, in that a ghost is needed to become the Promethean." var/searching = 0 -/obj/item/slime_cube/attack_self(mob/user as mob) +/obj/item/slime_cube/attack_self(mob/user) + . = ..() + if(.) + return if(!searching) to_chat(user, "You stare at the slimy cube, watching as some activity occurs.") icon_state = "slime cube active" @@ -91,6 +94,9 @@ return . | CLICKCHAIN_DO_NOT_PROPAGATE /obj/item/slime_crystal/attack_self(mob/user) + . = ..() + if(.) + return user.visible_message("\The [user] teleports themselves with \the [src]!") safe_blink(user, 14) qdel(src) diff --git a/code/modules/xenobio/machinery/processor.dm b/code/modules/xenobio/machinery/processor.dm index 6eb002a53ee..c52301a82db 100644 --- a/code/modules/xenobio/machinery/processor.dm +++ b/code/modules/xenobio/machinery/processor.dm @@ -24,7 +24,7 @@ . = ..() . += "The automatic intake switch is in the [auto_mode? "On" : "Off"] position." -/obj/machinery/processor/attack_hand(mob/living/user) +/obj/machinery/processor/attack_hand(mob/user, list/params) if(processing) to_chat(user, "The processor is in the process of processing!") return @@ -36,7 +36,7 @@ playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 1) return -/obj/machinery/processor/attackby(obj/item/I, mob/living/user, params, clickchain_flags, damage_multiplier) +/obj/machinery/processor/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) if(default_unfasten_wrench(user, I, 40)) return return ..() diff --git a/code/modules/xenobio2/machinery/core_extractor.dm b/code/modules/xenobio2/machinery/core_extractor.dm index 6c4cba78cef..c7ae4f1dc3f 100644 --- a/code/modules/xenobio2/machinery/core_extractor.dm +++ b/code/modules/xenobio2/machinery/core_extractor.dm @@ -145,7 +145,7 @@ eject_slime() //Here lies the UI -/obj/machinery/slime/extractor/attack_hand(mob/user as mob) +/obj/machinery/slime/extractor/attack_hand(mob/user, list/params) user.set_machine(src) interact(user) diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm index e5ca40233d6..dd46c95d3ca 100644 --- a/code/modules/xenobio2/machinery/gene_manipulators.dm +++ b/code/modules/xenobio2/machinery/gene_manipulators.dm @@ -20,7 +20,10 @@ var/list/genes = list() var/genesource = "unknown" -/obj/item/disk/xenobio/attack_self(var/mob/user as mob) +/obj/item/disk/xenobio/attack_self(mob/user) + . = ..() + if(.) + return if(genes.len) var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobiological Data", "No", "Yes") if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) @@ -56,7 +59,7 @@ /obj/machinery/xenobio/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/xenobio/attack_hand(mob/user as mob) +/obj/machinery/xenobio/attack_hand(mob/user, list/params) nano_ui_interact(user) /obj/machinery/xenobio/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/modules/xenobio2/machinery/injector_computer.dm b/code/modules/xenobio2/machinery/injector_computer.dm index 56ca60d0259..da929dd1257 100644 --- a/code/modules/xenobio2/machinery/injector_computer.dm +++ b/code/modules/xenobio2/machinery/injector_computer.dm @@ -23,7 +23,7 @@ injector.computer = null ..() -/obj/machinery/computer/xenobio2/attack_hand(mob/user) +/obj/machinery/computer/xenobio2/attack_hand(mob/user, list/params) if(..()) return 1 nano_ui_interact(user) diff --git a/code/modules/xenobio2/machinery/slime_replicator.dm b/code/modules/xenobio2/machinery/slime_replicator.dm index 690c9ed6e7a..edc019043cf 100644 --- a/code/modules/xenobio2/machinery/slime_replicator.dm +++ b/code/modules/xenobio2/machinery/slime_replicator.dm @@ -99,7 +99,7 @@ eject_core() //Here lies the UI -/obj/machinery/slime/replicator/attack_hand(mob/user as mob) +/obj/machinery/slime/replicator/attack_hand(mob/user, list/params) user.set_machine(src) interact(user) diff --git a/code/modules/xenobio2/mob/slime/slime_monkey.dm b/code/modules/xenobio2/mob/slime/slime_monkey.dm index 1e898b3e005..ddf6313df39 100644 --- a/code/modules/xenobio2/mob/slime/slime_monkey.dm +++ b/code/modules/xenobio2/mob/slime/slime_monkey.dm @@ -8,7 +8,10 @@ Slime cube lives here. icon_state = "slime cube" var/searching = 0 -/obj/item/slime_cube/attack_self(mob/user as mob) +/obj/item/slime_cube/attack_self(mob/user) + . = ..() + if(.) + return if(!searching) to_chat(user, "You stare at the slimy cube, watching as some activity occurs.") request_player() diff --git a/code/modules/xenobio2/tools/xeno_trait_scanner.dm b/code/modules/xenobio2/tools/xeno_trait_scanner.dm index 30557f200f8..6d93684a8aa 100644 --- a/code/modules/xenobio2/tools/xeno_trait_scanner.dm +++ b/code/modules/xenobio2/tools/xeno_trait_scanner.dm @@ -31,7 +31,10 @@ user.visible_message("\The [src] spits out a piece of paper.") return -/obj/item/analyzer/xeno_analyzer/attack_self(mob/user as mob) +/obj/item/analyzer/xeno_analyzer/attack_self(mob/user) + . = ..() + if(.) + return print_report(user) return 0 diff --git a/maps/Generic/misc.dm b/maps/Generic/misc.dm index 23fe8f60d95..84ea1f48da5 100644 --- a/maps/Generic/misc.dm +++ b/maps/Generic/misc.dm @@ -68,7 +68,7 @@ /turf/simulated/floor/maglev/Entered(var/atom/movable/AM, var/atom/old_loc) if(isliving(AM) && prob(50)) track_zap(AM) -/turf/simulated/floor/maglev/attack_hand(var/mob/user) +/turf/simulated/floor/maglev/attack_hand(mob/user, list/params) if(prob(75)) track_zap(user) /turf/simulated/floor/maglev/proc/track_zap(var/mob/living/user)