mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Attack chain, initial setup. (pull *immediately* for *any* TM issues) (#26834)
* refactor: Attack chain, initial setup. * migrate curtain to make dreamchecker happy * update thurible * don't call attacked_by separately for legacy attack chain * remove duplicate proc * condense similar code, put allowances for legacy code in new procs * update docs, include diagram source * add comment on how to update diagram * fix admonition * mindflayer updates * remove commented out code * clarify all steps * after_attack should be overridable * whoops * retrofit recent changes * duh, can't restrict this yet because of tool_acts * i hate ore bags with the fire of a thousand suns * return correct value for object attack logic * Various cleanups. We don't want to attempt to pull stuff out of `/obj/item/attackby`, because those pieces are part of the related objects' migrations, not `/obj/item` itself. Attempting to do this causes knockon effects where things expected to call e.g. `/obj/item/storage/attackby` in the call chain were not ferried over to the new item interaction code, because the related objects hadn't actually been migrated over yet. I've used refactoring /obj/vehicle as the example for migrating `attackby` methods instead. * simplify some argument names * fuck it * make it do the thing * Rename CI module call * Prove that CI works * improve test output * aaand fix it again * fix curtain tool interactions * fix compile error * fix compile error * Better docs, introduce migration plan tool.
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/barsign/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/barsign/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
switch(build_stage)
|
||||
// Inserting the electronics/circuit
|
||||
if(BARSIGN_FRAME)
|
||||
@@ -483,7 +483,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use it while in your active hand to toggle the access restrictions.</span>"
|
||||
|
||||
/obj/item/barsign_electronics/attack_self(mob/user)
|
||||
/obj/item/barsign_electronics/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
if(destroyed)
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@ LINEN BINS
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/bedsheet/attack_self(mob/user as mob)
|
||||
/obj/item/bedsheet/attack_self__legacy__attackchain(mob/user as mob)
|
||||
user.drop_item()
|
||||
if(layer == initial(layer))
|
||||
layer = 5
|
||||
@@ -44,7 +44,7 @@ LINEN BINS
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/bedsheet/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(I.sharp)
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
transfer_fingerprints_to(C)
|
||||
@@ -316,7 +316,7 @@ LINEN BINS
|
||||
default_unfasten_wrench(user, I, time = 20)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/bedsheetbin/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/bedsheet))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='notice'>[I] is stuck to your hand!</span>")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
coat = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/coatrack/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/coatrack/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
var/can_hang = FALSE
|
||||
for(var/T in allowed)
|
||||
if(istype(W,T))
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
var/obj/item/rcs/E = W
|
||||
E.try_send_container(user, src)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/structure/closet/cardboard/welder_act()
|
||||
return
|
||||
|
||||
/obj/structure/closet/cardboard/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/closet/cardboard/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/WC = W
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
. += "<span class='notice'>It is damaged beyond repair.</span>"
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attackby(obj/item/O as obj, mob/living/user as mob) //Marker -Agouri
|
||||
/obj/structure/closet/fireaxecabinet/attackby__legacy__attackchain(obj/item/O as obj, mob/living/user as mob) //Marker -Agouri
|
||||
if(isrobot(user) || locked)
|
||||
if(istype(O, /obj/item/multitool))
|
||||
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/depot/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/secure_closet/depot/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
to_chat(user, "<span class='warning'>Bluespace interference prevents [W] from locking onto [src]!</span>")
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
new /obj/item/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/secure_closet/personal/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(opened || !istype(W, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
opened = FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/crate/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(!opened && try_rig(W, user))
|
||||
return
|
||||
return ..()
|
||||
@@ -306,7 +306,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/secure/personal/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/closet/crate/secure/personal/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(opened || !istype(I, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
to_chat(user, "<span class='notice'>You need a crowbar to pry this open!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/largecrate/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
opacity = TRUE
|
||||
density = FALSE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/curtain/open
|
||||
icon_state = "open"
|
||||
@@ -39,11 +40,10 @@
|
||||
icon_state = "open"
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
|
||||
/obj/structure/curtain/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/toy/crayon))
|
||||
/obj/structure/curtain/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/toy/crayon))
|
||||
color = tgui_input_color(user,"Please choose a color.", "Curtain Color")
|
||||
return
|
||||
return ..()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
if(!open && !broken)
|
||||
. += "glassbox_closed"
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/displaycase/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(I.GetID())
|
||||
if(!openable)
|
||||
to_chat(user, "<span class='warning'>There is no ID scanner, looks like this one is sealed shut.</span>")
|
||||
@@ -232,7 +232,7 @@
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/displaycase_chassis/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/airlock_electronics))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, TRUE)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
else
|
||||
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/door_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(is_pen(W))
|
||||
// The door assembly gets renamed to "Assembly - Foobar",
|
||||
// but the `t` returned from the proc is just "Foobar" without the prefix.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
return
|
||||
|
||||
/obj/structure/engineeringcart/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/engineeringcart/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
||||
if(!I.is_robot_module())
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
has_extinguisher = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
|
||||
/obj/structure/extinguisher_cabinet/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(istype(O, /obj/item/extinguisher))
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/falsewall/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(opening)
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving.</span>")
|
||||
return
|
||||
@@ -217,7 +217,7 @@
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS)
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/falsewall/uranium/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/falsewall/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(W.get_heat() > 300)
|
||||
var/turf/T = locate(user)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in [ADMIN_VERBOSEJMP(T)]")
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
return
|
||||
update_cut_status()
|
||||
|
||||
/obj/structure/fence/attackby(obj/item/C, mob/user)
|
||||
/obj/structure/fence/attackby__legacy__attackchain(obj/item/C, mob/user)
|
||||
if(shock(user, 90))
|
||||
return
|
||||
if(istype(C, /obj/item/stack/rods))
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
A.loc = get_turf(src)
|
||||
*/
|
||||
|
||||
/obj/structure/bush/attackby(obj/I as obj, mob/user as mob, params)
|
||||
/obj/structure/bush/attackby__legacy__attackchain(obj/I as obj, mob/user as mob, params)
|
||||
//hatchets can clear away undergrowth
|
||||
if(istype(I, /obj/item/hatchet) && !stump)
|
||||
if(indestructable)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if(temp_check >= GIRDER_MELTING_TEMP)
|
||||
take_damage(10)
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/girder/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
@@ -463,7 +463,7 @@
|
||||
. = ..()
|
||||
icon_state = GET_CULT_DATA(cult_girder_icon_state, initial(icon_state))
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/girder/cult/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user)) //Cultists can demolish cult girders instantly with their dagger
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
clonemind = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/grey_autocloner/attackby(obj/item/bio_chip_implanter/implant, mob/user, params)
|
||||
/obj/machinery/grey_autocloner/attackby__legacy__attackchain(obj/item/bio_chip_implanter/implant, mob/user, params)
|
||||
if(!istype(implant) || !(istype(implant.imp, /obj/item/bio_chip/grey_autocloner)))
|
||||
return ..()
|
||||
var/obj/item/bio_chip/grey_autocloner/autoclone = implant.imp
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(pass_info.is_movable)
|
||||
. = . || pass_info.pass_flags & PASSGRILLE
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/grille/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/stack/rods) && broken)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
blade_status = GUILLOTINE_BLADE_DROPPED
|
||||
icon_state = "guillotine"
|
||||
|
||||
/obj/structure/guillotine/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/guillotine/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/whetstone))
|
||||
add_fingerprint(user)
|
||||
if(blade_status == GUILLOTINE_BLADE_SHARPENING)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'><b>Use this item in hand</b> to create an inflatable wall.</span>"
|
||||
|
||||
/obj/item/inflatable/attack_self(mob/user)
|
||||
/obj/item/inflatable/attack_self__legacy__attackchain(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
to_chat(user, "<span class='notice'>You inflate [src].</span>")
|
||||
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
|
||||
@@ -51,7 +51,7 @@
|
||||
/obj/structure/inflatable/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/inflatable/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/inflatable/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(I.sharp || is_type_in_typecache(I, GLOB.pointed_types))
|
||||
user.do_attack_animation(src, used_item = I)
|
||||
deconstruct(FALSE)
|
||||
@@ -88,7 +88,7 @@
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_door"
|
||||
|
||||
/obj/item/inflatable/door/attack_self(mob/user)
|
||||
/obj/item/inflatable/door/attack_self__legacy__attackchain(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
to_chat(user, "<span class='notice'>You inflate [src].</span>")
|
||||
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
|
||||
@@ -165,7 +165,7 @@
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_wall_torn"
|
||||
|
||||
/obj/item/inflatable/torn/attack_self(mob/user)
|
||||
/obj/item/inflatable/torn/attack_self__legacy__attackchain(mob/user)
|
||||
to_chat(user, "<span class='warning'>The inflatable wall is too torn to be inflated!</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_door_torn"
|
||||
|
||||
/obj/item/inflatable/door/torn/attack_self(mob/user)
|
||||
/obj/item/inflatable/door/torn/attack_self__legacy__attackchain(mob/user)
|
||||
to_chat(user, "<span class='warning'>The inflatable door is too torn to be inflated!</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/structure/janitorialcart/on_reagent_change()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/janitorialcart/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(I.is_robot_module())
|
||||
to_chat(user, "<span class='warning'>You cannot interface your modules with [src]!</span>")
|
||||
return
|
||||
@@ -89,7 +89,7 @@
|
||||
to_chat(user, "<span class='notice'>There is already one of those in [src].</span>")
|
||||
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user, params)
|
||||
mybag.attackby__legacy__attackchain(I, user, params)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is already one of those in [src].</span>")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/kitchenspike_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
@@ -69,7 +69,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/kitchenspike/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/grab))
|
||||
var/obj/item/grab/G = I
|
||||
if(G.affecting && isliving(G.affecting))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
|
||||
return "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>"
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
/obj/structure/lattice/attackby__legacy__attackchain(obj/item/C, mob/user, params)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
@@ -39,7 +39,7 @@
|
||||
deconstruct()
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
return T.attackby__legacy__attackchain(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
|
||||
@@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(tendrils)
|
||||
new /obj/structure/closet/crate/necropolis/tendril(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/spawner/lavaland/attacked_by(obj/item/I, mob/living/user)
|
||||
/obj/structure/spawner/lavaland/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
SEND_SIGNAL(src, COMSIG_SPAWNER_SET_TARGET, user)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/loom/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/loom/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
if(weave(I, user))
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
else
|
||||
icon_state = initial_state
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/mineral_door/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
var/obj/item/pickaxe/digTool = W
|
||||
to_chat(user, "<span class='notice'>You start digging \the [src].</span>")
|
||||
@@ -181,7 +181,7 @@
|
||||
icon_state = "plasma"
|
||||
sheetType = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby__legacy__attackchain(obj/item/W, mob/user)
|
||||
if(W.get_heat())
|
||||
message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x], [y], [z] - <a href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", 0, 1)
|
||||
log_game("Plasma mineral door ignited by [key_name(user)] in ([x], [y], [z])")
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
/obj/structure/mirror/magic/ui_close(mob/user)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/mirror/magic/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
GLOB.janitorial_equipment -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/mopbucket/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(W.is_robot_module())
|
||||
to_chat(user, "<span class='warning'>You cannot interface your modules with [src]!</span>")
|
||||
return
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
return ..()
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
|
||||
/obj/structure/morgue/attackby__legacy__attackchain(P as obj, mob/user as mob, params)
|
||||
if(is_pen(P))
|
||||
var/t = rename_interactive(user, P)
|
||||
|
||||
@@ -419,7 +419,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
GLOB.crematoriums += src
|
||||
return TRUE
|
||||
|
||||
/obj/structure/crematorium/attackby(obj/item/P, mob/user, params)
|
||||
/obj/structure/crematorium/attackby__legacy__attackchain(obj/item/P, mob/user, params)
|
||||
if(is_pen(P))
|
||||
rename_interactive(user, P)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
return
|
||||
var/obj/item/held_item = usr.get_active_hand()
|
||||
if(is_pen(held_item))
|
||||
paper.attackby(held_item, usr)
|
||||
paper.attackby__legacy__attackchain(held_item, usr)
|
||||
return
|
||||
else
|
||||
usr.put_in_hands(paper)
|
||||
@@ -104,7 +104,7 @@
|
||||
paper.show_content(usr)
|
||||
return
|
||||
|
||||
/obj/structure/noticeboard/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/noticeboard/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/paper))
|
||||
if(notices >= MAX_NOTICES)
|
||||
to_chat(user, "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/obj/structure/railing/cap/reversed
|
||||
icon_state = "railing_cap_reversed"
|
||||
|
||||
/obj/structure/railing/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/railing/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
return -1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/reflector/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
|
||||
@@ -188,7 +188,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/safe/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
if(I.flags && ABSTRACT)
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@ GLOBAL_LIST_INIT(shelf_colors, list("basic", "sci", "sup", "serv", "med", "sec",
|
||||
if(mapload)
|
||||
SEND_SIGNAL(src, COMSIG_SHELF_ADDED_ON_MAPLOAD)
|
||||
|
||||
/obj/structure/shelf/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/shelf/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
var/obj/item/toy/crayon/spraycan/spraycan = I
|
||||
if(!istype(spraycan))
|
||||
return ..()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/oreAmount = 5
|
||||
var/material_drop_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
|
||||
/obj/structure/statue/attackby__legacy__attackchain(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(default_unfasten_wrench(user, W))
|
||||
@@ -71,7 +71,7 @@
|
||||
desc = "This statue has a sickening green colour."
|
||||
icon_state = "eng"
|
||||
|
||||
/obj/structure/statue/uranium/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/statue/uranium/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
radiate()
|
||||
return ..()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
PlasmaBurn()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/plasma/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/statue/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(W.get_heat() > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("[key_name_admin(user)] ignited a plasma statue at [COORD(loc)]")
|
||||
log_game("[key_name(user)] ignited plasma a statue at [COORD(loc)]")
|
||||
@@ -240,7 +240,7 @@
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/statue/bananium/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
honk()
|
||||
return ..()
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
new /obj/item/grown/log(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/structure/snowman/built/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/snowman/built/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/snowball) && obj_integrity < max_integrity)
|
||||
to_chat(user, "<span class='notice'>You patch some of the damage on [src] with [I].</span>")
|
||||
obj_integrity = max_integrity
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
var/icon_down = "down"
|
||||
var/folded = /obj/item/roller
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/bed/roller/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
if(has_buckled_mobs())
|
||||
if(length(buckled_mobs) > 1)
|
||||
@@ -185,12 +185,12 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/extended = /obj/structure/bed/roller
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
/obj/item/roller/attack_self__legacy__attackchain(mob/user)
|
||||
var/obj/structure/bed/roller/R = new extended(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller/afterattack(atom/target, mob/user, proximity, params)
|
||||
/obj/item/roller/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
return
|
||||
if(isturf(target))
|
||||
@@ -200,7 +200,7 @@
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/roller/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
@@ -216,7 +216,7 @@
|
||||
origin_tech = "magnets=3;biotech=4;powerstorage=3"
|
||||
extended = /obj/structure/bed/roller/holo
|
||||
|
||||
/obj/item/roller/holo/attackby(obj/item/W, mob/user, params)
|
||||
/obj/item/roller/holo/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
@@ -242,7 +242,7 @@
|
||||
..()
|
||||
held = new /obj/item/roller(src)
|
||||
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
/obj/item/roller_holder/attack_self__legacy__attackchain(mob/user as mob)
|
||||
if(!held)
|
||||
to_chat(user, "<span class='notice'>The rack is empty.</span>")
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
. = ..()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/chair/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
if(!SK.status)
|
||||
@@ -294,7 +294,7 @@
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/sofa/attacked_by(obj/item/I, mob/living/user)
|
||||
/obj/structure/chair/sofa/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
if(!colorable)
|
||||
return
|
||||
@@ -399,7 +399,7 @@
|
||||
/obj/structure/chair/sofa/bench/handle_layer()
|
||||
return
|
||||
|
||||
/obj/structure/chair/sofa/bench/attacked_by(obj/item/I, mob/living/user)
|
||||
/obj/structure/chair/sofa/bench/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
@@ -557,7 +557,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/chair/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
/obj/item/chair/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
|
||||
..()
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -571,7 +571,7 @@
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, TRUE, -1)
|
||||
smash(user)
|
||||
|
||||
/obj/item/chair/stool/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/chair/stool/attack__legacy__attackchain(mob/M as mob, mob/user as mob)
|
||||
if(prob(5) && isliving(M))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!.</span>")
|
||||
user.unEquip(src)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
///What stacks can be used to make the table, and if it will result in a unique table
|
||||
var/list/restrict_table_types = list() //ex: list(/obj/item/stack/tile/carpet = /obj/structure/table/wood/poker, /obj/item/stack/sheet/wood = /obj/item/stack/sheet/wood::table_type), carpet will make poker table, wood will result in standard table_type. If the list is empty, any material can be used for its default table_type.
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/table_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(!try_make_table(I, user))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
return TRUE
|
||||
qdel(G)
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/table/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
@@ -935,7 +935,7 @@
|
||||
step(O, get_dir(O, src))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/rack/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
@@ -1016,7 +1016,7 @@
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/rack_parts/attack_self(mob/user)
|
||||
/obj/item/rack_parts/attack_self__legacy__attackchain(mob/user)
|
||||
if(building)
|
||||
return
|
||||
building = TRUE
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/dispenser/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/tank/internals/oxygen) || istype(I, /obj/item/tank/internals/air) || istype(I, /obj/item/tank/internals/anesthetic))
|
||||
try_insert_tank(user, stored_oxygen_tanks, I)
|
||||
return
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
pinned_target = null
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/target_stake/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(istype(W, /obj/item/target) && !pinned_target)
|
||||
density = FALSE
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
L.Weaken(10 SECONDS)
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/transit_tube/station/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/grab) && hatch_state == TRANSIT_TUBE_OPEN)
|
||||
var/obj/item/grab/G = W
|
||||
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
pixel_y = -8
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/toilet/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers))
|
||||
if(!open)
|
||||
return
|
||||
@@ -230,7 +230,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
|
||||
/obj/structure/urinal/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/urinal/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/grab))
|
||||
var/obj/item/grab/G = I
|
||||
if(!G.confirm())
|
||||
@@ -339,7 +339,7 @@
|
||||
if(istype(T) && !T.density)
|
||||
T.MakeSlippery(TURF_WET_WATER, 5 SECONDS)
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/shower/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(I.type == /obj/item/analyzer)
|
||||
to_chat(user, "<span class='notice'>The water temperature seems to be [current_temperature].</span>")
|
||||
return ..()
|
||||
@@ -540,7 +540,7 @@
|
||||
user.clean_blood()
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O, mob/user, params)
|
||||
/obj/structure/sink/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>Someone's already washing here!</span>")
|
||||
return
|
||||
@@ -650,7 +650,7 @@
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
/obj/structure/sink/puddle/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
@@ -711,7 +711,7 @@
|
||||
..()
|
||||
desc = "An entire [result_name] in a box, straight from Space Sweden. It has an [pick("unpronounceable", "overly accented", "entirely gibberish", "oddly normal-sounding")] name."
|
||||
|
||||
/obj/item/bathroom_parts/attack_self(mob/user)
|
||||
/obj/item/bathroom_parts/attack_self__legacy__attackchain(mob/user)
|
||||
var/turf/T = get_turf(user)
|
||||
if(!T)
|
||||
to_chat(user, "<span class='warning'>You can't build that here!</span>")
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/windoor_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
deconstruct(FALSE)
|
||||
M.visible_message("<span class='danger'>[M] smashes through [src]!</span>", "<span class='warning'>You smash through [src].</span>", "<span class='warning'>You hear glass breaking.</span>")
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/window/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(!can_be_reached(user))
|
||||
return 1 //skip the afterattack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user