Merge branch 'tool_behavior-replacing' of https://github.com/SandPoot/Citadel-Station-13 into tool_behavior-replacing
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
I.play_tool_sound(src, 100)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
|
||||
@@ -112,6 +112,10 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
var/tool_behaviour = NONE
|
||||
var/toolspeed = 1
|
||||
//Special multitools
|
||||
var/buffer = null
|
||||
var/show_wires = FALSE
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
|
||||
var/reach = 1 //In tiles, how far this weapon can reach; 1 for adjacent, which is default
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
return
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!loaded)
|
||||
return
|
||||
if(ghetto && prob(10)) //Is it a ghetto RCL? If so, give it a 10% chance to fall apart
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/list/dept_list = list("Civilian","Security","Medical","Science","Engineering","Cargo")
|
||||
|
||||
/obj/item/circuitboard/computer/card/minor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
target_dept = (target_dept == dept_list.len) ? 1 : (target_dept + 1)
|
||||
to_chat(user, "<span class='notice'>You set the board to \"[dept_list[target_dept]]\".</span>")
|
||||
else
|
||||
@@ -181,7 +181,7 @@
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
|
||||
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/computer/rdconsole/core)
|
||||
name = "R&D Console - Robotics (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
@@ -338,7 +338,7 @@
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
|
||||
/obj/item/circuitboard/computer/libraryconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement)
|
||||
name = "Library Visitor Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
/obj/machinery/vending/custom = "Custom Vendor")
|
||||
|
||||
/obj/item/circuitboard/machine/vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/position = vending_names_paths.Find(build_path)
|
||||
position = (position == vending_names_paths.len) ? 1 : (position + 1)
|
||||
var/typepath = vending_names_paths[position]
|
||||
@@ -372,7 +372,7 @@
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
@@ -441,7 +441,7 @@
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/processor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(build_path == /obj/machinery/processor)
|
||||
name = "Slime Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor/slime
|
||||
@@ -477,7 +477,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/position = fridges_name_paths.Find(build_path, fridges_name_paths)
|
||||
position = (position == fridges_name_paths.len) ? 1 : (position + 1)
|
||||
build_path = fridges_name_paths[position]
|
||||
@@ -658,7 +658,7 @@
|
||||
build_path = PATH_POWERCOIL
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
@@ -777,7 +777,7 @@
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
var/new_name = "ChemMaster"
|
||||
var/new_path = /obj/machinery/chem_master
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_power()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && (obj_flags & EMAGGED))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
|
||||
diode.forceMove(drop_location())
|
||||
|
||||
@@ -26,10 +26,9 @@
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
buffer = null // simple machine buffer for device linkage
|
||||
toolspeed = 1
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/multitool/chaplain
|
||||
@@ -72,7 +71,7 @@
|
||||
if(selected_io)
|
||||
icon_state += "_red"
|
||||
|
||||
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
/obj/item/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
if(!io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
|
||||
return
|
||||
@@ -101,7 +100,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
/obj/item/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
if(!io1.linked.len || !io2.linked.len)
|
||||
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
|
||||
return
|
||||
@@ -256,6 +255,7 @@
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
show_wires = TRUE
|
||||
|
||||
/obj/item/multitool/advanced
|
||||
name = "advanced multitool"
|
||||
@@ -263,6 +263,7 @@
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.2
|
||||
show_wires = TRUE
|
||||
|
||||
/obj/item/multitool/advanced/brass
|
||||
name = "clockwork multitool"
|
||||
|
||||
@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
|
||||
@@ -278,7 +278,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
|
||||
bowmanize()
|
||||
qdel(W)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot || keyslot2)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
freerange = TRUE
|
||||
|
||||
/obj/item/radio/intercom/ratvar/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
to_chat(user, "<span class='danger'>[src] is fastened to the wall with [is_servant_of_ratvar(user) ? "replicant alloy" : "some material you've never seen"], and can't be removed.</span>")
|
||||
return //no unfastening!
|
||||
. = ..()
|
||||
@@ -57,7 +57,7 @@
|
||||
. += "<span class='notice'>It's <i>unscrewed</i> from the wall, and can be <b>detached</b>.</span>"
|
||||
|
||||
/obj/item/radio/intercom/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(unfastened)
|
||||
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
@@ -69,7 +69,7 @@
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
unfastened = TRUE
|
||||
return
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(!unfastened)
|
||||
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
|
||||
return
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
/obj/item/radio/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
unscrewed = !unscrewed
|
||||
if(unscrewed)
|
||||
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
@@ -384,7 +384,7 @@
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -893,7 +893,7 @@ GENETICS SCANNER
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=200)
|
||||
var/list/discovered = list() //hit a dna console to update the scanners database
|
||||
var/list/buffer
|
||||
buffer = list()
|
||||
var/ready = TRUE
|
||||
var/cooldown = 200
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
|
||||
/obj/item/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
|
||||
if(ruined && I.tool_behaviour == TOOL_SCREWDRIVER || istype(I, /obj/item/pen))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(I.use_tool(src, user, 120))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
possible_colors = list("purple")
|
||||
|
||||
/obj/item/dualsaber/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
flame_turf(turflist)
|
||||
|
||||
/obj/item/flamethrower/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !status)//Taking this apart
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.forceMove(T)
|
||||
@@ -94,7 +94,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && igniter && !lit)
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER && igniter && !lit)
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(stage == WIRED)
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
@@ -105,11 +105,11 @@
|
||||
to_chat(user, "<span class='warning'>You need one length of coil to wire the assembly!</span>")
|
||||
return
|
||||
|
||||
else if(stage == READY && istype(I, /obj/item/wirecutters) && !active)
|
||||
else if(stage == READY && I.tool_behaviour == TOOL_WIRECUTTER && !active)
|
||||
stage_change(WIRED)
|
||||
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == WIRED && istype(I, /obj/item/wrench))
|
||||
else if(stage == WIRED && I.tool_behaviour == TOOL_WRENCH)
|
||||
if(beakers.len)
|
||||
for(var/obj/O in beakers)
|
||||
O.forceMove(drop_location())
|
||||
@@ -275,7 +275,7 @@
|
||||
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
|
||||
|
||||
/obj/item/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
switch(unit_spread)
|
||||
if(0 to 24)
|
||||
unit_spread += 5
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
if(nadeassembly && I.tool_behaviour == TOOL_WIRECUTTER)
|
||||
I.play_tool_sound(src, 20)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
@@ -206,7 +206,7 @@
|
||||
user.gib(1, 1)
|
||||
|
||||
/obj/item/grenade/plastic/c4/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
open_panel = !open_panel
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(is_wire_tool(I))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
/obj/item/inducer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
W.play_tool_sound(src)
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
to_chat(user, "<span class='notice'>[src] is now [choice].</span>")
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
if(!active)
|
||||
to_chat(user, "<span class='warning'>COLOR_SET</span>")
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
updateTank(W, 0, user)
|
||||
else if(W.type == type)
|
||||
to_chat(user, "<span class='warning'>You're fairly certain that putting a pneumatic cannon inside another pneumatic cannon would cause a spacetime disruption.</span>")
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
switch(pressureSetting)
|
||||
if(1)
|
||||
pressureSetting = 2
|
||||
@@ -93,7 +93,7 @@
|
||||
if(3)
|
||||
pressureSetting = 1
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s pressure output to [pressureSetting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(tank)
|
||||
updateTank(tank, 1, user)
|
||||
else if(loadedWeightClass >= maxWeightClass)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
to_chat(user, "<span class='warning'>\The [IT] is too small for \the [src].</span>")
|
||||
return
|
||||
updateTank(W, 0, user)
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
switch(fisto_setting)
|
||||
if(1)
|
||||
fisto_setting = 2
|
||||
@@ -46,7 +46,7 @@
|
||||
fisto_setting = 1
|
||||
W.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(tank)
|
||||
updateTank(tank, 1, user)
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/multitool))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(check_completion())
|
||||
Interact(user)
|
||||
else
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
var/mob/living/living_user = usr
|
||||
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||
if(!istype(item_in_hand, /obj/item/multitool))
|
||||
if(!item_in_hand.tool_behaviour == TOOL_MULTITOOL)
|
||||
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ as performing this in action() will cause the upgrade to end up in the borg inst
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
|
||||
R.revive()
|
||||
R.logevent("WARN -- System recovered from unexpected shutdown.")
|
||||
R.logevent("System brought online.")
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "cyborg VTEC module"
|
||||
@@ -149,6 +151,7 @@ as performing this in action() will cause the upgrade to end up in the borg inst
|
||||
return FALSE
|
||||
|
||||
R.ionpulse = TRUE
|
||||
R.toggle_ionpulse() //Enabled by default
|
||||
|
||||
/obj/item/borg/upgrade/thrusters/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -285,6 +288,8 @@ as performing this in action() will cause the upgrade to end up in the borg inst
|
||||
return FALSE
|
||||
|
||||
R.SetEmagged(1)
|
||||
R.logevent("WARN: hardware installed with missing security certificate!") //A bit of fluff to hint it was an illegal tech item
|
||||
R.logevent("WARN: root privleges granted to PID [num2hex(rand(1,65535), -1)][num2hex(rand(1,65535), -1)].") //random eight digit hex value. Two are used because rand(1,4294967295) throws an error
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
state = 0 //fine
|
||||
|
||||
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
if(O.tool_behaviour == TOOL_CROWBAR)
|
||||
new/obj/item/stack/sheet/metal(user.loc)
|
||||
amount--
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(get_amount() < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if (W.use_tool(src, user, 20))
|
||||
open =! open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
|
||||
return
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
|
||||
if ((istype(W, /obj/item/multitool)) && (!l_hacking))
|
||||
if((W.tool_behaviour == TOOL_MULTITOOL) && (!l_hacking))
|
||||
if(open == 1)
|
||||
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
|
||||
l_hacking = 1
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
newSaber.hacked = TRUE
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
|
||||
|
||||
@@ -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