Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into auxtools-atmos
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/multitool))
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
active = !active
|
||||
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
|
||||
return
|
||||
@@ -76,10 +76,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
return default_unfasten_wrench(user, P, 20)
|
||||
if(!anchored)
|
||||
if(istype(P, /obj/item/weldingtool) && can_deconstruct)
|
||||
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
|
||||
if(state != EMPTY_CORE)
|
||||
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
|
||||
return
|
||||
@@ -105,13 +105,13 @@
|
||||
circuit = P
|
||||
return
|
||||
if(CIRCUIT_CORE)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = EMPTY_CORE
|
||||
@@ -120,7 +120,7 @@
|
||||
circuit = null
|
||||
return
|
||||
if(SCREWED_CORE)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = CIRCUIT_CORE
|
||||
@@ -139,7 +139,7 @@
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
return
|
||||
if(CABLED_CORE)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
|
||||
else
|
||||
@@ -201,7 +201,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/crowbar) && brain)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && brain)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
@@ -210,7 +210,7 @@
|
||||
return
|
||||
|
||||
if(GLASS_CORE)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = CABLED_CORE
|
||||
@@ -218,7 +218,7 @@
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(brain)
|
||||
@@ -247,7 +247,7 @@
|
||||
P.transfer_ai("INACTIVE", "AICARD", src, user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
state = GLASS_CORE
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
pick_sign(user)
|
||||
|
||||
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>Access denied.</span>")
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(W, /obj/item/bedsheet))
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1 & NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
|
||||
@@ -45,7 +45,7 @@ LINEN BINS
|
||||
return
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & HOLOGRAM_1) && (istype(I, /obj/item/wirecutters) || I.get_sharpness()))
|
||||
if(!(flags_1 & HOLOGRAM_1) && (I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness()))
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
|
||||
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/cutting_tool = TOOL_WELDER
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
@@ -302,7 +302,9 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/handle_lock_removal(mob/user, obj/item/screwdriver/S)
|
||||
/obj/structure/closet/proc/handle_lock_removal(mob/user, obj/item/S)
|
||||
if(!S.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
return
|
||||
if(lock_in_use)
|
||||
to_chat(user, "<span class='notice'>Wait for work on [src] to be done first!</span>")
|
||||
return
|
||||
@@ -357,7 +359,7 @@
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
var/welder = FALSE
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin [welder ? "slicing" : "deconstructing"] \the [src] apart...</span>")
|
||||
@@ -377,9 +379,9 @@
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/electronics/airlock))
|
||||
handle_lock_addition(user, W)
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
handle_lock_removal(user, W)
|
||||
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -396,7 +398,7 @@
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench) && anchorable)
|
||||
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
setAnchored(!anchored)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
else
|
||||
name = "body bag"
|
||||
return
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
else if(I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
to_chat(user, "<span class='notice'>You cut the tag off [src].</span>")
|
||||
name = "body bag"
|
||||
tagged = 0
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
max_integrity = 70
|
||||
integrity_failure = 0
|
||||
can_weld_shut = 0
|
||||
cutting_tool = /obj/item/wirecutters
|
||||
cutting_tool = TOOL_WIRECUTTER
|
||||
open_sound = "rustle"
|
||||
material_drop = /obj/item/stack/sheet/cardboard
|
||||
delivery_icon = "deliverybox"
|
||||
@@ -74,7 +74,7 @@
|
||||
mob_storage_capacity = 5
|
||||
resistance_flags = NONE
|
||||
move_speed_multiplier = 2
|
||||
cutting_tool = /obj/item/weldingtool
|
||||
cutting_tool = TOOL_WELDER
|
||||
open_sound = 'sound/machines/click.ogg'
|
||||
material_drop = /obj/item/stack/sheet/plasteel
|
||||
#undef SNAKE_SPAM_TICKS
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
cutting_tool = /obj/item/screwdriver
|
||||
cutting_tool = TOOL_SCREWDRIVER
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
cutting_tool = /obj/item/screwdriver
|
||||
cutting_tool = TOOL_SCREWDRIVER
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/PopulateContents()
|
||||
..()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
cutting_tool = /obj/item/screwdriver
|
||||
cutting_tool = TOOL_SCREWDRIVER
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/PopulateContents()
|
||||
new /obj/item/storage/backpack/satchel/leather/withwallet( src )
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
cutting_tool = /obj/item/screwdriver
|
||||
cutting_tool = TOOL_SCREWDRIVER
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/PopulateContents()
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
to_chat(user, "<span class='warning'>You need a crowbar to pry this open!</span>")
|
||||
|
||||
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=5))
|
||||
return
|
||||
@@ -121,7 +121,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
else if(!alert && istype(W, /obj/item/crowbar) && openable) //Only applies to the lab cage and player made display cases
|
||||
else if(!alert && W.tool_behaviour == TOOL_CROWBAR && openable) //Only applies to the lab cage and player made display cases
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench)) //The player can only deconstruct the wooden frame
|
||||
if(I.tool_behaviour == TOOL_WRENCH) //The player can only deconstruct the wooden frame
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 30))
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
created_name = t
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && (mineral || glass || !anchored ))
|
||||
else if(W.tool_behaviour == TOOL_WELDER && (mineral || glass || !anchored ))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
if(!anchored )
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(!anchored)
|
||||
var/door_check = 1
|
||||
for(var/obj/machinery/door/D in loc)
|
||||
if(!D.sub_door)
|
||||
@@ -134,7 +134,7 @@
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/wirecutters) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
else if(W.tool_behaviour == TOOL_WIRECUTTER && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", \
|
||||
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
electronics = W
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/crowbar) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
else if(W.tool_behaviour == TOOL_CROWBAR && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [G] to [src]!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/dresser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
add_overlay(mutable_appearance('icons/obj/chairs.dmi', "echair_over", MOB_LAYER + 1))
|
||||
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
W.play_tool_sound(src)
|
||||
C.setDir(dir)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && !stored_extinguisher)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && !stored_extinguisher)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(density)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.density)
|
||||
@@ -107,7 +107,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
else if(W.tool_behaviour == TOOL_WELDER || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(W.use_tool(src, user, 0, volume=50))
|
||||
dismantle(user, TRUE)
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
/obj/structure/falsewall/reinforced/attackby(obj/item/tool, mob/user)
|
||||
..()
|
||||
if(istype(tool, /obj/item/wirecutters))
|
||||
if(tool.tool_behaviour == TOOL_WIRECUTTER)
|
||||
dismantle(user, TRUE, tool)
|
||||
|
||||
/*
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
hole_size = LARGE_HOLE
|
||||
|
||||
/obj/structure/fence/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(!cuttable)
|
||||
to_chat(user, "<span class='notice'>This section of the fence can't be cut.</span>")
|
||||
return
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(iscyborg(user) || istype(I, /obj/item/multitool))
|
||||
if(iscyborg(user) || I.tool_behaviour == TOOL_MULTITOOL)
|
||||
toggle_lock(user)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=2))
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/deconstructible = TRUE
|
||||
|
||||
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench) && deconstructible)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && deconstructible)
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 50))
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
else if(W.tool_behaviour == TOOL_WELDER || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
|
||||
/obj/structure/girder/bronze/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(W.tool_behaviour == TOOL_WELDER || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(!W.tool_start_check(user, amount = 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start slicing apart [src]...</span>")
|
||||
|
||||
@@ -142,11 +142,11 @@
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(!shock(user, 100))
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruct()
|
||||
else if((istype(W, /obj/item/screwdriver)) && (isturf(loc) || anchored))
|
||||
else if((W.tool_behaviour == TOOL_SCREWDRIVER) && (isturf(loc) || anchored))
|
||||
if(!shock(user, 90))
|
||||
W.play_tool_sound(src, 100)
|
||||
setAnchored(!anchored)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] can't hold any more signs!</span>")
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user)
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
user.visible_message("[user] begins to empty the contents of [src].", "<span class='notice'>You begin to empty the contents of [src]...</span>")
|
||||
if(I.use_tool(src, user, 30))
|
||||
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/obj/F = new /obj/structure/kitchenspike(src.loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
if(C.tool_behaviour == TOOL_WIRECUTTER)
|
||||
to_chat(user, "<span class='notice'>Slicing [name] joints ...</span>")
|
||||
deconstruct()
|
||||
else
|
||||
|
||||
@@ -78,13 +78,13 @@
|
||||
if(admin)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
can_rotate = !can_rotate
|
||||
to_chat(user, "<span class='notice'>You [can_rotate ? "unlock" : "lock"] [src]'s rotation.</span>")
|
||||
W.play_tool_sound(src)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='warning'>Unweld [src] from the floor first!</span>")
|
||||
return
|
||||
@@ -95,7 +95,7 @@
|
||||
if(buildstackamount)
|
||||
new buildstacktype(drop_location(), buildstackamount)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
else if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
//However if a player wants to move an existing showcase or remove one, this is for that.
|
||||
|
||||
/obj/structure/showcase/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/screwdriver) && !anchored)
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER && !anchored)
|
||||
if(deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
to_chat(user, "<span class='notice'>You screw the screws back into the showcase.</span>")
|
||||
W.play_tool_sound(src, 100)
|
||||
@@ -119,7 +119,7 @@
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruction_state = SHOWCASE_SCREWDRIVERED
|
||||
|
||||
if(istype(W, /obj/item/crowbar) && deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
if(W.tool_behaviour == TOOL_CROWBAR && deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
if(W.use_tool(src, user, 20, volume=100))
|
||||
to_chat(user, "<span class='notice'>You start to crowbar the showcase apart...</span>")
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 4)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && buildable_sign)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && buildable_sign)
|
||||
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
|
||||
"<span class='notice'>You start unfastening [src].</span>")
|
||||
I.play_tool_sound(src)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(W.tool_behaviour == TOOL_WELDER || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -170,13 +170,13 @@
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/wrench) && deconstruction_ready)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
@@ -538,7 +538,7 @@
|
||||
return "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>"
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -689,7 +689,7 @@
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1 & NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -747,7 +747,7 @@
|
||||
var/building = FALSE
|
||||
|
||||
/obj/item/rack_parts/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
oxygentanks++
|
||||
else
|
||||
full = TRUE
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
default_unfasten_wrench(user, I, time = 20)
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
for(var/obj/structure/transit_tube_pod/P in loc)
|
||||
P.deconstruct(FALSE, user)
|
||||
else
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/transit_tube/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(tube_construction)
|
||||
for(var/obj/structure/transit_tube_pod/pod in src.loc)
|
||||
to_chat(user, "<span class='warning'>Remove the pod first!</span>")
|
||||
@@ -50,7 +50,7 @@
|
||||
transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
else if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
for(var/obj/structure/transit_tube_pod/pod in src.loc)
|
||||
pod.attackby(W, user)
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
icon_state = "pod"
|
||||
|
||||
/obj/structure/transit_tube_pod/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(!moving)
|
||||
I.play_tool_sound(src)
|
||||
if(contents.len)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(I.use_tool(src, user, 30))
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if("01")
|
||||
if(istype(W, /obj/item/weldingtool) && !anchored)
|
||||
if(W.tool_behaviour == TOOL_WELDER && !anchored)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/wrench) && !anchored)
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !anchored)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
@@ -128,7 +128,7 @@
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/wrench) && anchored)
|
||||
else if(W.tool_behaviour == TOOL_WRENCH && anchored)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.",
|
||||
"<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
if("02")
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
|
||||
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
@@ -218,7 +218,7 @@
|
||||
W.forceMove(drop_location())
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
else if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
if(!electronics)
|
||||
to_chat(usr, "<span class='warning'>The assembly is missing electronics!</span>")
|
||||
return
|
||||
|
||||
@@ -191,7 +191,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent == INTENT_HELP)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
@@ -224,7 +224,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
qdel(K)
|
||||
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
I.play_tool_sound(src, 75)
|
||||
if(reinf)
|
||||
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
|
||||
@@ -245,7 +245,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
return
|
||||
|
||||
|
||||
else if (istype(I, /obj/item/crowbar) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
|
||||
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
|
||||
I.play_tool_sound(src, 75)
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
@@ -253,7 +253,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench) && !anchored)
|
||||
else if(I.tool_behaviour == TOOL_WRENCH && !anchored)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'> You begin to disassemble [src]...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
|
||||
Reference in New Issue
Block a user