mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Attack chain migration: structures. (#30365)
* Attack chain migration: structures. * whoops * wth
This commit is contained in:
committed by
GitHub
parent
cd7b4e7292
commit
3208049a8a
@@ -109,8 +109,9 @@
|
||||
move_speed_multiplier = 0.5 // You can move at run speed while in this box.
|
||||
material_drop = null
|
||||
|
||||
/obj/structure/closet/cardboard/agent/attackby__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
return
|
||||
/obj/structure/closet/cardboard/agent/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_ATTACK_BY, TYPE_PROC_REF(/datum, signal_cancel_attack_by))
|
||||
|
||||
/obj/structure/closet/cardboard/agent/open()
|
||||
. = ..()
|
||||
|
||||
@@ -27,20 +27,20 @@
|
||||
close_sound_volume = 15
|
||||
var/item_path = /obj/item/bodybag
|
||||
|
||||
/obj/structure/closet/body_bag/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/closet/body_bag/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(is_pen(I))
|
||||
var/t = rename_interactive(user, I)
|
||||
if(isnull(t))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
cut_overlays()
|
||||
if(t)
|
||||
add_overlay("bodybag_label")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='notice'>You cut the tag off the bodybag.</span>")
|
||||
name = initial(name)
|
||||
cut_overlays()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/body_bag/welder_act(mob/user, obj/item/I)
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
icon_state = "floor_sign"
|
||||
/// What does the sign say?
|
||||
var/label = ""
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/custom_sign/New(turf/loc, new_label)
|
||||
. = ..()
|
||||
|
||||
@@ -67,21 +67,21 @@
|
||||
density = TRUE
|
||||
pass_flags_self = LETPASSTHROW | PASSTAKE
|
||||
|
||||
/obj/structure/holohoop/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/holohoop/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/grab) && get_dist(src, user) <= 1)
|
||||
var/obj/item/grab/G = W
|
||||
if(G.state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
G.affecting.forceMove(loc)
|
||||
G.affecting.Weaken(10 SECONDS)
|
||||
visible_message("<span class='warning'>[G.assailant] dunks [G.affecting] into [src]!</span>")
|
||||
qdel(W)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(isitem(W) && get_dist(src,user) <= 1)
|
||||
user.drop_item(src)
|
||||
visible_message("<span class='notice'>[user] dunks [W] into [src]!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(isitem(AM) && !isprojectile(AM))
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
// into the box.
|
||||
if(istype(user.pulling, /obj/structure/ore_box))
|
||||
var/obj/structure/ore_box/box = user.pulling
|
||||
box.attackby__legacy__attackchain(src, user)
|
||||
box.item_interaction(user, src)
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
/// How long this takes to unbuckle yourself from.
|
||||
var/unbuckle_time = 0 SECONDS
|
||||
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
|
||||
@@ -254,7 +254,6 @@ LINEN BINS
|
||||
anchored = TRUE
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
new_attack_chain = TRUE
|
||||
var/amount = 20
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
@@ -308,22 +307,23 @@ LINEN BINS
|
||||
if(istype(used, /obj/item/bedsheet))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='notice'>[used] is stuck to your hand!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
used.forceMove(src)
|
||||
sheets.Add(used)
|
||||
amount++
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You put [used] in [src].</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(amount && !hidden && used.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
if(used.flags & ABSTRACT)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='notice'>[used] is stuck to your hand!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
used.forceMove(src)
|
||||
hidden = used
|
||||
to_chat(user, "<span class='notice'>You hide [used] among the sheets.</span>")
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
coat = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/coatrack/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/coatrack/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
var/can_hang = FALSE
|
||||
for(var/T in allowed)
|
||||
if(istype(W,T))
|
||||
@@ -26,7 +26,7 @@
|
||||
user.drop_item(src)
|
||||
coat.forceMove(src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, border_dir)
|
||||
|
||||
@@ -284,11 +284,11 @@
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
var/obj/item/rcs/E = W
|
||||
E.try_send_container(user, src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
@@ -298,26 +298,28 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is too small to stuff [G.affecting] into!</span>")
|
||||
if(istype(W, /obj/item/tk_grab))
|
||||
return FALSE
|
||||
return // passthrough
|
||||
if(user.a_intent != INTENT_HELP) // Stops you from putting your baton in the closet on accident
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(isrobot(user) && !istype(W.loc, /obj/item/gripper))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(W.loc != user.loc)
|
||||
// It went somewhere else, don't teleport it back.
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
return TRUE // It's resolved. No afterattack needed. Stops you from emagging lockers when putting in an emag
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(can_be_emaged && (istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade) && !broken))
|
||||
emag_act(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(W, /obj/item/stack/package_wrap))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
closed_item_click(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/structure/closet/cardboard/welder_act()
|
||||
return
|
||||
|
||||
/obj/structure/closet/cardboard/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/closet/cardboard/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/WC = W
|
||||
@@ -76,26 +76,26 @@
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WC].</span>", 3, "You hear cutting.", 2)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(is_pen(W))
|
||||
var/decalselection = tgui_input_list(user, "Please select a decal", "Paint Box", list("Atmospherics", "Bartender", "Barber", "Blueshield", "Captain",
|
||||
"Cargo", "Chief Engineer", "Chaplain", "Chef", "Chemist", "Assistant", "Clown", "CMO", "Coroner", "Detective", "Engineering", "Genetics", "HOP",
|
||||
"HOS", "Hydroponics", "Internal Affairs Agent", "Janitor", "Magistrate", "Medical", "Mime", "Mining", "NT Representative", "Paramedic",
|
||||
"Prisoner", "Research Director", "Security", "Syndicate", "Therapist", "Virology", "Warden", "Xenobiology"))
|
||||
if(!decalselection)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "You're in no condition to perform this action.")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(W != user.get_active_hand())
|
||||
to_chat(user, "You must be holding the pen to perform this action.")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "You have moved too far away from the cardboard box.")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
decalselection = replacetext(decalselection, " ", "_")
|
||||
decalselection = lowertext(decalselection)
|
||||
custom_skin = "_[decalselection]"
|
||||
update_icon() // a proc declared in the closets parent file used to update opened/closed sprites on normal closets
|
||||
return
|
||||
return ..()
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
. += "<span class='notice'>It is damaged beyond repair.</span>"
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attackby__legacy__attackchain(obj/item/O as obj, mob/living/user as mob) //Marker -Agouri
|
||||
/obj/structure/closet/fireaxecabinet/item_interaction(mob/living/user, obj/item/O, list/modifiers)
|
||||
if(isrobot(user) || locked)
|
||||
if(istype(O, /obj/item/multitool))
|
||||
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
|
||||
@@ -38,14 +38,14 @@
|
||||
locked = FALSE
|
||||
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(isitem(O))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/W = O
|
||||
if(smashed || localopened)
|
||||
if(localopened)
|
||||
operate_panel()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
@@ -59,16 +59,16 @@
|
||||
locked = FALSE
|
||||
localopened = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(O, /obj/item/fireaxe) && localopened)
|
||||
if(!fireaxe)
|
||||
var/obj/item/fireaxe/F = O
|
||||
if(HAS_TRAIT(F, TRAIT_WIELDED))
|
||||
to_chat(user, "<span class='warning'>Unwield \the [F] first.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!user.unequip(F, FALSE))
|
||||
to_chat(user, "<span class='warning'>\The [F] stays stuck to your hands!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
fireaxe = F
|
||||
has_axe = "full"
|
||||
contents += F
|
||||
@@ -76,25 +76,27 @@
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
if(smashed)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
operate_panel()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(smashed)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(O, /obj/item/multitool))
|
||||
if(localopened)
|
||||
operate_panel()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
if(do_after(user, 20 * O.toolspeed, target = src))
|
||||
locked = TRUE
|
||||
to_chat(user, "<span class = 'caution'> You re-enable the locking modules.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
operate_panel()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attack_hand(mob/user as mob)
|
||||
if(locked)
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/depot/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/secure_closet/depot/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
to_chat(user, "<span class='warning'>Bluespace interference prevents [W] from locking onto [src]!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/depot/emp_act(severity)
|
||||
|
||||
@@ -34,25 +34,25 @@
|
||||
new /obj/item/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/secure_closet/personal/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(opened || !istype(W, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.loc == src)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(W, /obj/item/card/id/guest))
|
||||
to_chat(user, "<span class='warning'>Invalid identification card.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/card/id/I = W
|
||||
if(!I || !I.registered_name)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
@@ -68,3 +68,5 @@
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
opened = FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/crate/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(!opened && try_rig(W, user))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/toggle(mob/user, by_hand = FALSE)
|
||||
@@ -311,18 +311,18 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/secure/personal/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/closet/crate/secure/personal/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(opened || !istype(I, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/card/id/id = I
|
||||
if(!is_usable_id(id))
|
||||
to_chat(user, "<span class='warning'>Invalid identification card.</span>")
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(registered_name && allowed(user))
|
||||
return ..()
|
||||
@@ -330,12 +330,12 @@
|
||||
if(!registered_name)
|
||||
registered_name = id.registered_name
|
||||
to_chat(user, "<span class='notice'>Crate reserved</span>")
|
||||
return TRUE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(registered_name == id.registered_name)
|
||||
return ..()
|
||||
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/closet/crate/plastic
|
||||
name = "plastic crate"
|
||||
|
||||
@@ -29,11 +29,10 @@
|
||||
to_chat(user, "<span class='notice'>You need a crowbar to pry this open!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/largecrate/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/largecrate/crowbar_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
face_while_pulling = FALSE
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
opacity = TRUE
|
||||
new_attack_chain = TRUE
|
||||
var/assembled = TRUE
|
||||
var/overlay_color = "#ffffff"
|
||||
var/overlay_alpha = 255
|
||||
|
||||
@@ -130,30 +130,32 @@
|
||||
if(!open && !broken)
|
||||
. += "glassbox_closed"
|
||||
|
||||
/obj/structure/displaycase/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/displaycase/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(I.GetID())
|
||||
if(!openable)
|
||||
to_chat(user, "<span class='warning'>There is no ID scanner, looks like this one is sealed shut.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>[src] is broken, the ID lock won't do anything.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(allowed(user) || emagged)
|
||||
to_chat(user, "<span class='notice'>You use [I] to [open ? "close" : "open"] [src].</span>")
|
||||
toggle_lock()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(open && !showpiece)
|
||||
if(!(I.flags & (ABSTRACT | DROPDEL)) && user.drop_item())
|
||||
I.forceMove(src)
|
||||
showpiece = I
|
||||
to_chat(user, "<span class='notice'>You put [I] on display</span>")
|
||||
update_icon()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(I, /obj/item/stack/sheet/glass) && broken)
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to fix the case!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(2)
|
||||
@@ -161,6 +163,7 @@
|
||||
open = FALSE
|
||||
obj_integrity = max_integrity
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -231,7 +234,7 @@
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/displaycase_chassis/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
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)
|
||||
@@ -242,12 +245,12 @@
|
||||
electronics = new_electronics
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
electronics.is_installed = TRUE
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten glass sheets to do this!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(10)
|
||||
@@ -261,6 +264,7 @@
|
||||
else
|
||||
display.req_access = electronics.selected_accesses
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
else
|
||||
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
|
||||
|
||||
/obj/structure/door_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/door_assembly/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
. = ITEM_INTERACT_COMPLETE
|
||||
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.
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "cart"
|
||||
face_while_pulling = FALSE
|
||||
density = TRUE
|
||||
new_attack_chain = TRUE
|
||||
var/obj/item/stack/sheet/glass/my_glass = null
|
||||
var/obj/item/stack/sheet/metal/my_metal = null
|
||||
var/obj/item/stack/sheet/plasteel/my_plasteel = null
|
||||
@@ -94,7 +93,7 @@
|
||||
to_chat(user, fail_msg)
|
||||
return
|
||||
|
||||
if(!put_in_cart(used, user))
|
||||
if(!put_in_cart(used, user))
|
||||
return
|
||||
|
||||
my_flashlight = used
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
has_extinguisher = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
/obj/structure/extinguisher_cabinet/item_interaction(mob/living/user, obj/item/O, list/modifiers)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(istype(O, /obj/item/extinguisher))
|
||||
|
||||
@@ -114,13 +114,14 @@
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/falsewall/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(opening)
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade) || istype(W, /obj/item/pyro_claws))
|
||||
if(istype(used, /obj/item/gun/energy/plasmacutter) || istype(used, /obj/item/pickaxe/drill/diamonddrill) || istype(used, /obj/item/pickaxe/drill/jackhammer) || istype(used, /obj/item/melee/energy/blade) || istype(used, /obj/item/pyro_claws))
|
||||
dismantle(user, TRUE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/falsewall/attack_animal(mob/living/simple_animal/M)
|
||||
. = ..()
|
||||
@@ -272,15 +273,14 @@
|
||||
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
|
||||
cares_about_temperature = TRUE
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(W.get_heat() > 300)
|
||||
/obj/structure/falsewall/plasma/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(used.get_heat() > 300)
|
||||
var/turf/T = locate(user)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in [AREACOORD(T)]")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]",INVESTIGATE_ATMOS)
|
||||
burnbabyburn()
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
@@ -121,16 +121,16 @@
|
||||
return
|
||||
update_cut_status()
|
||||
|
||||
/obj/structure/fence/attackby__legacy__attackchain(obj/item/C, mob/user)
|
||||
/obj/structure/fence/item_interaction(mob/living/user, obj/item/C, list/modifiers)
|
||||
if(shock(user, 90))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(C, /obj/item/stack/rods))
|
||||
if(hole_size == NO_HOLE)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
var/obj/item/stack/rods/R = C
|
||||
if(R.get_amount() < HOLE_REPAIR)
|
||||
to_chat(user, "<span class='warning'>You need [HOLE_REPAIR] rods to fix this fence!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You begin repairing the fence...</span>")
|
||||
if(do_after(user, 3 SECONDS * C.toolspeed, target = src) && hole_size != NO_HOLE && R.use(HOLE_REPAIR))
|
||||
playsound(src, C.usesound, 80, 1)
|
||||
@@ -138,8 +138,7 @@
|
||||
obj_integrity = max_integrity
|
||||
to_chat(user, "<span class='notice'>You repair the fence.</span>")
|
||||
update_cut_status()
|
||||
return
|
||||
. = ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/fence/Bumped(atom/user)
|
||||
if(!ismob(user))
|
||||
|
||||
@@ -531,7 +531,7 @@
|
||||
A.loc = get_turf(src)
|
||||
*/
|
||||
|
||||
/obj/structure/bush/attackby__legacy__attackchain(obj/I as obj, mob/user as mob, params)
|
||||
/obj/structure/bush/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
//hatchets can clear away undergrowth
|
||||
if(istype(I, /obj/item/hatchet) && !stump)
|
||||
if(indestructable)
|
||||
@@ -554,8 +554,7 @@
|
||||
pixel_y = rand(-6,6)
|
||||
else
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
//Jungle grass
|
||||
|
||||
|
||||
@@ -47,108 +47,114 @@
|
||||
if(temp_check >= GIRDER_MELTING_TEMP)
|
||||
take_damage(10)
|
||||
|
||||
/obj/structure/girder/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/girder/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/diamonddrill))
|
||||
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You disintegrate the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
else if(istype(W, /obj/item/pyro_claws))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You melt the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if(iswallturf(loc))
|
||||
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to build a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(locate(/obj/structure/falsewall) in loc.contents)
|
||||
to_chat(user, "<span class='warning'>There is already a false wall present!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(islava(loc))
|
||||
to_chat(user, "<span class='warning'>You can't do that while [src] is in lava!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
to_chat(user, "<span class='warning'>You can't seem to make the metal bend.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(W, /obj/item/stack/sheet/bamboo)) // pending wall resprite(tm)
|
||||
to_chat(user, "<span class='warning'>The bamboo doesn't seem to fit around the girder.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/S = W
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 5)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(5)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/iron/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!loc || !S || S.get_amount() < 5)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(5)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/iron)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(W, /obj/item/stack/ore/glass/basalt))
|
||||
var/obj/item/stack/ore/glass/basalt/A = W
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(A.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two [A] to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!loc || !A || A.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
A.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/rock_ancient/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(A.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two [A] to add plating!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding [A]...</span>")
|
||||
if(do_after(user, 4 SECONDS, target = src))
|
||||
if(!src || !A || A.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
A.use(2)
|
||||
to_chat(user, "<span class='notice'>You add [A].</span>")
|
||||
var/turf/parent_turf = get_turf(src)
|
||||
@@ -156,38 +162,39 @@
|
||||
for(var/turf/simulated/mineral/X in parent_turf.loc)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!istype(W,/obj/item/stack/sheet))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!S.wall_allowed)
|
||||
to_chat(user, "<span class='warning'>You don't think that is good material for a wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/wood))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/wood/falsewood = new(loc)
|
||||
transfer_fingerprints_to(falsewood)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to finish a wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
@@ -196,30 +203,30 @@
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(S, /obj/item/stack/sheet/metal))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/F = new(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to finish a wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
@@ -228,30 +235,31 @@
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/plasteel))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/reinforced/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(state == GIRDER_REINF)
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start finalizing the reinforced wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
@@ -260,44 +268,45 @@
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start reinforcing the girder...</span>")
|
||||
if(do_after(user,60, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You reinforce the girder.</span>")
|
||||
var/obj/structure/girder/reinforced/R = new (loc)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
var/obj/structure/FW = new F (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user,40, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
@@ -306,12 +315,9 @@
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
add_hiddenprint(user)
|
||||
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/girder/crowbar_act(mob/user, obj/item/I)
|
||||
if(!can_displace || state != GIRDER_NORMAL)
|
||||
@@ -464,12 +470,13 @@
|
||||
. = ..()
|
||||
icon_state = GET_CULT_DATA(cult_girder_icon_state, initial(icon_state))
|
||||
|
||||
/obj/structure/girder/cult/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/girder/cult/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
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>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40* W.toolspeed, target = src))
|
||||
@@ -479,6 +486,7 @@
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
to_chat(user, "<span class='notice'>Your jackhammer smashes through the girder!</span>")
|
||||
@@ -487,23 +495,22 @@
|
||||
transfer_fingerprints_to(R)
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
var/obj/item/stack/sheet/runed_metal/R = W
|
||||
if(R.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
|
||||
return 0
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
||||
if(do_after(user, 10, target = src))
|
||||
if(R.get_amount() < 1 || !R)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
|
||||
R.use(1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
@@ -115,20 +115,21 @@
|
||||
if(pass_info.is_movable)
|
||||
. = . || pass_info.pass_flags & PASSGRILLE
|
||||
|
||||
/obj/structure/grille/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/grille/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/stack/rods) && broken)
|
||||
repair(user, I)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
//window placing begin
|
||||
else if(is_glass_sheet(I))
|
||||
build_window(I, user)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
//window placing end
|
||||
|
||||
else if(istype(I, /obj/item/shard) || !shock(user, 70))
|
||||
return ..()
|
||||
else if((!istype(I, /obj/item/shard)) && shock(user, 70))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/grille/proc/repair(mob/user, obj/item/stack/rods/R)
|
||||
if(R.get_amount() >= 1)
|
||||
|
||||
@@ -154,33 +154,29 @@
|
||||
blade_status = GUILLOTINE_BLADE_DROPPED
|
||||
icon_state = "guillotine"
|
||||
|
||||
/obj/structure/guillotine/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/guillotine/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/whetstone))
|
||||
add_fingerprint(user)
|
||||
if(blade_status == GUILLOTINE_BLADE_SHARPENING)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(blade_status == GUILLOTINE_BLADE_RAISED)
|
||||
if(blade_sharpness < GUILLOTINE_BLADE_MAX_SHARP)
|
||||
blade_status = GUILLOTINE_BLADE_SHARPENING
|
||||
if(do_after(user, 7, target = src))
|
||||
if(do_after(user, W.toolspeed, target = src))
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
user.visible_message("<span class='notice'>[user] sharpens the large blade of the guillotine.</span>",
|
||||
"<span class='notice'>You sharpen the large blade of the guillotine.</span>")
|
||||
blade_sharpness += 1
|
||||
playsound(src, 'sound/items/screwdriver.ogg', 100, 1)
|
||||
return
|
||||
else
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The blade is sharp enough!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to raise the blade in order to sharpen it!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/guillotine/wrench_act(mob/user, obj/item/I)
|
||||
if(current_action)
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
icon_state = "wall"
|
||||
var/torn = /obj/item/inflatable/torn
|
||||
var/intact = /obj/item/inflatable
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/inflatable/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -219,7 +218,7 @@
|
||||
|
||||
if(!useResource(user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/inflatable/cyborg/proc/useResource(mob/user)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
density = TRUE
|
||||
face_while_pulling = FALSE
|
||||
container_type = OPENCONTAINER
|
||||
new_attack_chain = TRUE
|
||||
//copypaste sorry
|
||||
var/maximum_volume = 150
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/kitchenspike_frame/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
@@ -30,9 +30,9 @@
|
||||
new /obj/structure/kitchenspike(loc)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike_frame/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -56,6 +56,7 @@
|
||||
buckle_lying = FALSE
|
||||
can_buckle = TRUE
|
||||
max_integrity = 250
|
||||
var/impale_time = 6 SECONDS
|
||||
|
||||
/obj/structure/kitchenspike/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -69,11 +70,13 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/kitchenspike/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
/obj/structure/kitchenspike/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(istype(I, /obj/item/grab))
|
||||
var/obj/item/grab/G = I
|
||||
if(G.affecting && isliving(G.affecting))
|
||||
start_spike(G.affecting, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/crowbar_act(mob/living/user, obj/item/I)
|
||||
@@ -103,7 +106,7 @@
|
||||
"<span class='danger'>[user] tries to slam [victim] onto the meat spike!</span>",
|
||||
"<span class='userdanger'>[user] tries to slam you onto the meat spike!</span>"
|
||||
)
|
||||
if(do_mob(user, victim, 6 SECONDS))
|
||||
if(do_mob(user, victim, impale_time))
|
||||
end_spike(victim, user)
|
||||
|
||||
/obj/structure/kitchenspike/proc/end_spike(mob/living/victim, mob/user)
|
||||
|
||||
@@ -28,18 +28,28 @@
|
||||
/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__legacy__attackchain(obj/item/C, mob/user, params)
|
||||
/obj/structure/lattice/wirecutter_act(mob/living/user, obj/item/wirecutters/wirecutters)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/W = C
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Slicing [name] joints...</span>")
|
||||
deconstruct()
|
||||
else
|
||||
// hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
var/turf/T = get_turf(src)
|
||||
return T.item_interaction(user, C, params)
|
||||
if(!istype(wirecutters))
|
||||
return
|
||||
|
||||
playsound(loc, wirecutters.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Slicing [name] joints...</span>")
|
||||
deconstruct()
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/lattice/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
// this is still here for historical reasons though it's
|
||||
// not clear if the original intention was to prevent indestructible
|
||||
// lattices from e.g. being built over with plating.
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
|
||||
// hand this off to the turf (for building plating, catwalks, etc)
|
||||
var/turf/T = get_turf(src)
|
||||
return T.item_interaction(user, used, modifiers)
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
|
||||
@@ -43,8 +43,7 @@ GLOBAL_LIST_EMPTY(tendrils)
|
||||
new /obj/structure/closet/crate/necropolis/tendril(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/spawner/lavaland/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
/obj/structure/spawner/lavaland/attacked_by(obj/item/attacker, mob/living/user)
|
||||
SEND_SIGNAL(src, COMSIG_SPAWNER_SET_TARGET, user)
|
||||
|
||||
/obj/structure/spawner/lavaland/bullet_act(obj/item/projectile/P)
|
||||
|
||||
@@ -9,10 +9,14 @@
|
||||
icon_state = "loom"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
// TODO: should absolutely be keyed to tool speed but
|
||||
// is just a constant for now for use in tests
|
||||
var/disassemble_speed = 5 SECONDS
|
||||
|
||||
/obj/structure/loom/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
/obj/structure/loom/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(weave(I, user))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/loom/crowbar_act(mob/user, obj/item/I)
|
||||
@@ -20,7 +24,7 @@
|
||||
if(!I.use_tool(src, user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
if(I.use_tool(src, user, disassemble_speed, volume = I.tool_volume))
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
deconstruct(disassembled = TRUE)
|
||||
|
||||
|
||||
@@ -116,15 +116,17 @@
|
||||
else
|
||||
icon_state = initial_state
|
||||
|
||||
/obj/structure/mineral_door/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/mineral_door/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
var/obj/item/pickaxe/digTool = W
|
||||
to_chat(user, "<span class='notice'>You start digging \the [src].</span>")
|
||||
if(do_after(user, 40 * digTool.toolspeed * hardness, target = src) && src)
|
||||
to_chat(user, "<span class='notice'>You finished digging.</span>")
|
||||
deconstruct(TRUE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -182,12 +184,13 @@
|
||||
sheetType = /obj/item/stack/sheet/mineral/plasma
|
||||
cares_about_temperature = TRUE
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby__legacy__attackchain(obj/item/W, mob/user)
|
||||
/obj/structure/mineral_door/transparent/plasma/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
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])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]",INVESTIGATE_ATMOS)
|
||||
TemperatureAct(100)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -106,6 +106,10 @@
|
||||
var/organ_warn = FALSE
|
||||
var/actually_magical = TRUE
|
||||
|
||||
/obj/structure/mirror/magic/Initialize(mapload, newdir, building)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_ATTACK_BY, TYPE_PROC_REF(/datum, signal_cancel_attack_by))
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
if(!ishuman(user) || broken)
|
||||
return
|
||||
@@ -174,9 +178,6 @@
|
||||
/obj/structure/mirror/magic/ui_close(mob/user)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
return
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "signpost"
|
||||
anchored = TRUE
|
||||
new_attack_chain = TRUE
|
||||
var/writing = ""
|
||||
|
||||
/obj/structure/signpost/Initialize(mapload)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
face_while_pulling = FALSE
|
||||
new_attack_chain = TRUE
|
||||
var/obj/item/mop/stored_mop = null
|
||||
var/maximum_volume = 150
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
@@ -39,7 +38,7 @@
|
||||
/obj/structure/mopbucket/proc/handle_mop_interaction(mob/living/user, obj/item/used)
|
||||
if(!istype(used, /obj/item/mop))
|
||||
return FALSE
|
||||
|
||||
|
||||
. = TRUE
|
||||
var/robot_mop = used.is_robot_module()
|
||||
var/obj/item/mop/attacking_mop = used
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
anchored = TRUE
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
var/status
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/morgue/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -338,7 +337,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
var/repairstate = CREMATOR_OPERATIONAL // Repairstate 0 is DESTROYED, 1 has the igniter applied but needs welding (IN_REPAIR), 2 is OPERATIONAL
|
||||
var/locked = FALSE
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/crematorium/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -103,20 +103,20 @@
|
||||
paper.show_content(usr)
|
||||
return
|
||||
|
||||
/obj/structure/noticeboard/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/noticeboard/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
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>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!user.drop_item())
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
I.forceMove(src)
|
||||
notices++
|
||||
to_chat(user, "<span class='notice'>You pin the paper to the noticeboard.</span>")
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
/obj/structure/railing/cap/reversed
|
||||
icon_state = "railing_cap_reversed"
|
||||
|
||||
/obj/structure/railing/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
/obj/structure/railing/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
. = ..()
|
||||
add_fingerprint(user) // No clue why this is happening here
|
||||
|
||||
/obj/structure/railing/attack_animal(mob/living/simple_animal/M)
|
||||
. = ..()
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
new_dir = 0
|
||||
return -1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/reflector/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
. = ITEM_INTERACT_COMPLETE
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
|
||||
@@ -187,30 +187,33 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/safe/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(open)
|
||||
if(I.flags && ABSTRACT)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
|
||||
to_chat(user, "<span class='notice'>You replace the broken mechanism.</span>")
|
||||
qdel(I)
|
||||
broken = FALSE
|
||||
locked = FALSE
|
||||
update_icon()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(I.w_class + space <= maxspace)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
SStgui.update_uis(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[I] won't fit in [src].</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/neck/stethoscope))
|
||||
attack_hand(user)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(istype(I, /obj/item/thermal_drill))
|
||||
if(drill)
|
||||
to_chat(user, "<span class='warning'>There is already a drill attached!</span>")
|
||||
@@ -222,9 +225,10 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
drill = I
|
||||
time_to_drill = DRILL_TIME * drill.time_multiplier
|
||||
update_icon()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't put [I] into the safe while it is closed!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/safe/ui_state(mob/user)
|
||||
return GLOB.physical_state
|
||||
|
||||
@@ -27,7 +27,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__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/shelf/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
var/obj/item/toy/crayon/spraycan/spraycan = I
|
||||
if(!istype(spraycan))
|
||||
return ..()
|
||||
@@ -41,7 +41,7 @@ GLOBAL_LIST_INIT(shelf_colors, list("basic", "sci", "sup", "serv", "med", "sec",
|
||||
|
||||
if(!COOLDOWN_FINISHED(src, spraypaint_cd))
|
||||
to_chat(user, "<span class='warning'>The paint on [src] is still drying!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/cur_idx = GLOB.shelf_colors.Find(shelf_style)
|
||||
if(!cur_idx)
|
||||
@@ -54,6 +54,7 @@ GLOBAL_LIST_INIT(shelf_colors, list("basic", "sci", "sup", "serv", "med", "sec",
|
||||
|
||||
// Tiny cooldown to prevent constant spamming of the action
|
||||
COOLDOWN_START(src, spraypaint_cd, 1 SECONDS)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/shelf/proc/set_style(new_style)
|
||||
if(shelf_style == new_style && !isnull(shelf_overlay))
|
||||
@@ -73,7 +74,7 @@ GLOBAL_LIST_INIT(shelf_colors, list("basic", "sci", "sup", "serv", "med", "sec",
|
||||
. = TRUE
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
return FALSE
|
||||
if(!I.use_tool(src, user, 2.5 SECONDS, volume = I.tool_volume))
|
||||
if(!I.use_tool(src, user, (2.5 SECONDS) * I.toolspeed, volume = I.tool_volume))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
var/oreAmount = 5
|
||||
var/material_drop_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/statue/attackby__legacy__attackchain(obj/item/W, mob/living/user, params)
|
||||
/obj/structure/statue/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
add_fingerprint(user)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is slicing apart the [name]...", \
|
||||
@@ -23,7 +23,7 @@
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/welder_act(mob/user, obj/item/I)
|
||||
@@ -107,13 +107,13 @@
|
||||
PlasmaBurn()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/plasma/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/statue/plasma/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
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)]")
|
||||
investigate_log("[key_name(user)] ignited a plasma statue at [COORD(loc)]", INVESTIGATE_ATMOS)
|
||||
ignite(W.get_heat())
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/welder_act(mob/user, obj/item/I)
|
||||
@@ -225,7 +225,7 @@
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/statue/bananium/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
honk()
|
||||
return ..()
|
||||
|
||||
@@ -321,11 +321,12 @@
|
||||
new /obj/item/grown/log(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/structure/snowman/built/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
/obj/structure/snowman/built/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
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
|
||||
qdel(I)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
var/icon_down = "down"
|
||||
var/folded = /obj/item/roller
|
||||
|
||||
/obj/structure/bed/roller/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/bed/roller/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
if(has_buckled_mobs())
|
||||
if(length(buckled_mobs) > 1)
|
||||
@@ -163,6 +163,8 @@
|
||||
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new folded(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
W.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/chair/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
if(!SK.status)
|
||||
to_chat(user, "<span class='notice'>[SK] is not ready to be attached!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
user.drop_item()
|
||||
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(get_turf(src), SK)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
@@ -48,8 +48,7 @@
|
||||
SK.loc = E
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/chair/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
@@ -322,8 +321,7 @@
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/sofa/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
/obj/structure/chair/sofa/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(!colorable)
|
||||
return
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
@@ -332,11 +330,17 @@
|
||||
var/list/hsl = rgb2hsl(hex2num(copytext(new_color, 2, 4)), hex2num(copytext(new_color, 4, 6)), hex2num(copytext(new_color, 6, 8)))
|
||||
hsl[3] = max(hsl[3], 0.4)
|
||||
var/list/rgb = hsl2rgb(arglist(hsl))
|
||||
color = "#[num2hex(rgb[1], 2)][num2hex(rgb[2], 2)][num2hex(rgb[3], 2)]"
|
||||
if(color)
|
||||
cut_overlay(armrest)
|
||||
armrest = GetArmrest()
|
||||
update_armrest()
|
||||
set_color("#[num2hex(rgb[1], 2)][num2hex(rgb[2], 2)][num2hex(rgb[3], 2)]")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/chair/sofa/proc/set_color(new_color)
|
||||
if(color == new_color)
|
||||
return
|
||||
|
||||
color = new_color
|
||||
cut_overlay(armrest)
|
||||
armrest = GetArmrest()
|
||||
update_armrest()
|
||||
|
||||
/obj/structure/chair/sofa/proc/GetArmrest()
|
||||
return mutable_appearance('icons/obj/chairs.dmi', "[icon_state]_armrest")
|
||||
@@ -437,13 +441,17 @@
|
||||
/obj/structure/chair/sofa/bench/handle_layer()
|
||||
return
|
||||
|
||||
/obj/structure/chair/sofa/bench/attacked_by__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
/obj/structure/chair/sofa/bench/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
cover_color = C.colour
|
||||
if(cover_color)
|
||||
GetCover()
|
||||
set_cover_color(C.colour)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/chair/sofa/bench/proc/set_cover_color(new_color)
|
||||
if(cover_color == new_color)
|
||||
return
|
||||
|
||||
GetCover()
|
||||
|
||||
/obj/structure/chair/sofa/bench/left
|
||||
icon_state = "bench_left_mapping"
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
///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__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(!try_make_table(I, user))
|
||||
return ..()
|
||||
/obj/structure/table_frame/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(try_make_table(I, user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
///Try to make a table with the item used to attack. FALSE if you can't make a table and should attack. TRUE does not necessarily mean a table was made.
|
||||
/obj/structure/table_frame/proc/try_make_table(obj/item/stack/stack, mob/user)
|
||||
|
||||
@@ -227,30 +227,30 @@
|
||||
return TRUE
|
||||
qdel(G)
|
||||
|
||||
/obj/structure/table/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/table/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(istype(I, /obj/item/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(isrobot(user) && !istype(I.loc, /obj/item/gripper))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.a_intent == INTENT_HELP && !(I.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
I.Move(loc)
|
||||
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(!modifiers || !modifiers["icon-x"] || !modifiers["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_x = clamp(text2num(modifiers["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = clamp(text2num(modifiers["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
if(slippery)
|
||||
step_away(I, user)
|
||||
visible_message("<span class='warning'>[I] slips right off [src]!</span>")
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, TRUE, -1)
|
||||
else //Don't want slippery moving tables to have the item attached to them if it slides off.
|
||||
item_placed(I)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -944,15 +944,15 @@
|
||||
step(O, get_dir(O, src))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/rack/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/rack/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
if(isrobot(user) && !istype(W.loc, /obj/item/gripper))
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
return
|
||||
if(!(W.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/rack/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
|
||||
@@ -95,14 +95,14 @@
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/dispenser/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/obj/structure/dispenser/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
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
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(I, /obj/item/tank/internals/plasma))
|
||||
try_insert_tank(user, stored_plasma_tanks, I)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/dispenser/wrench_act(mob/living/user, obj/item/I)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
pinned_target = null
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/target_stake/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/target_stake/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(istype(W, /obj/item/target) && !pinned_target)
|
||||
density = FALSE
|
||||
@@ -32,7 +32,7 @@
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
to_chat(user, "You slide the target into the stake.")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
L.Weaken(10 SECONDS)
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/transit_tube/station/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
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)
|
||||
@@ -115,6 +115,7 @@
|
||||
Bumped(GM)
|
||||
qdel(G)
|
||||
break
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_hatch()
|
||||
if(hatch_state == TRANSIT_TUBE_CLOSED)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
var/cistern = FALSE //if the cistern bit is open
|
||||
var/w_items = 0 //the combined w_class of all the items in the cistern
|
||||
var/mob/living/swirlie = null //the mob being given a swirlie
|
||||
new_attack_chain = TRUE
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS_CUSTOM(/obj/structure/toilet, 8, -8, 0, 0)
|
||||
|
||||
@@ -237,7 +236,6 @@ MAPPING_DIRECTIONAL_HELPERS_CUSTOM(/obj/structure/toilet, 8, -8, 0, 0)
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "urinal"
|
||||
anchored = TRUE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/urinal/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/grab))
|
||||
@@ -520,7 +518,6 @@ MAPPING_DIRECTIONAL_HELPERS_CUSTOM(/obj/machinery/shower, 16, -5, 0, 0)
|
||||
desc = "A sink used for washing one's hands and face."
|
||||
anchored = TRUE
|
||||
var/sink_flags = SINK_MOVEABLE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS_CUSTOM(/obj/structure/sink, 18, -4, 0, 0)
|
||||
|
||||
|
||||
@@ -106,9 +106,10 @@
|
||||
if(direction == dir && density)
|
||||
return COMPONENT_ATOM_BLOCK_EXIT
|
||||
|
||||
/obj/structure/windoor_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
/obj/structure/windoor_assembly/item_interaction(mob/living/user, obj/item/W, list/modifiers)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
add_fingerprint(user)
|
||||
. = ITEM_INTERACT_COMPLETE
|
||||
switch(state)
|
||||
if(EMPTY_ASSEMBLY)
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
|
||||
@@ -213,9 +213,10 @@
|
||||
deconstruct(FALSE)
|
||||
attacker.visible_message("<span class='danger'>[attacker] smashes through [src]!</span>", "<span class='warning'>You smash through [src].</span>", "<span class='warning'>You hear glass breaking.</span>")
|
||||
|
||||
/obj/structure/window/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
/obj/structure/window/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
. = ITEM_INTERACT_COMPLETE
|
||||
if(!can_be_reached(user))
|
||||
return 1 //skip the afterattack
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/stack/rods) && user.a_intent == INTENT_HELP)
|
||||
|
||||
Reference in New Issue
Block a user