Refactors tool typechecks, refactors transforming tools, makes Altevian wrench into one

This commit is contained in:
Heroman
2023-10-01 09:34:43 +10:00
parent d62009d967
commit 9a94306585
310 changed files with 1036 additions and 946 deletions
+2 -2
View File
@@ -192,8 +192,8 @@
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.remove_fuel(0, user))
damage = 15
@@ -180,7 +180,7 @@
poster_set = TRUE
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, W.usesound, 100, 1)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
@@ -165,7 +165,7 @@
flick("poster_being_set", src)
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, W.usesound, 100, 1)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
+3 -3
View File
@@ -101,7 +101,7 @@
explode(M)
/obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open
user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>",
"<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>")
@@ -110,7 +110,7 @@
// Panel open, stay uncloaked, or uncloak if already cloaked. If you don't cloak on place, ignore it and just be normal alpha.
alpha = camo_net ? (panel_open ? 255 : 50) : 255
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
else if((W.has_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/multitool)) && panel_open)
interact(user)
else
..()
@@ -309,7 +309,7 @@
return
/obj/item/weapon/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver() && trap)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && trap)
to_chat(user, "<span class='notice'>You begin removing \the [trap].</span>")
if(do_after(user, 10 SECONDS))
to_chat(user, "<span class='notice'>You finish disconnecting the mine's trigger.</span>")
+2 -2
View File
@@ -30,8 +30,8 @@
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.remove_fuel(0, user))
damage = 15
+3
View File
@@ -1018,3 +1018,6 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
/obj/item/proc/on_holder_escape(var/obj/item/weapon/holder/H)
return
/obj/item/proc/get_welder()
return
+1 -1
View File
@@ -87,7 +87,7 @@
/obj/item/weapon/deskbell/attackby(obj/item/W, mob/user, params)
if(!istype(W))
return
if(W.is_wrench() && isturf(loc))
if(W.has_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5))
if(!src) return
to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>")
+2 -2
View File
@@ -47,7 +47,7 @@
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(W.is_wirecutter())
else if(W.has_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
cut_overlays()
@@ -244,7 +244,7 @@
inject_occupant(H)
break
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(syringe)
if(used)
to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>")
+1 -1
View File
@@ -96,7 +96,7 @@
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(bcell)
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))
+1 -1
View File
@@ -37,7 +37,7 @@
power_supply = new cell_type(src)
/obj/item/device/flash/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver() && broken)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && broken)
if(repairing)
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
return
+3 -3
View File
@@ -9,7 +9,7 @@
var/list/known_targets
var/list/supported_types
var/datum/tgui_state/default/must_hack/hack_state
/obj/item/device/multitool/hacktool/override
hackspeed = 0.75
max_level = 5
@@ -31,7 +31,7 @@
return ..()
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
in_hack_mode = !in_hack_mode
playsound(src, W.usesound, 50, 1)
else
@@ -78,7 +78,7 @@
if(D.security_level > max_level)
to_chat(user, "\icon[src][bicon(src)] <span class='warning'>Target's electronic security is too complex.</span>")
return 0
var/found = known_targets.Find(D)
if(found)
known_targets.Swap(1, found) // Move the last hacked item first
@@ -54,7 +54,7 @@
else
to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc)
@@ -66,9 +66,6 @@
return
/obj/item/device/multitool/is_multitool()
return TRUE
/obj/item/device/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
@@ -179,7 +179,7 @@
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(bcell)
if(istype(bcell, /obj/item/weapon/cell/device/shield_generator)) //No stealing self charging batteries!
var/choice = tgui_alert(user, "A popup appears on the device 'REMOVING THE INTERNAL CELL WILL DESTROY THE BATTERY. DO YOU WISH TO CONTINUE?'...Well, do you?", "Selection List", list("Cancel", "Remove"))
+1 -1
View File
@@ -30,7 +30,7 @@
..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !!T.is_plating())
@@ -336,10 +336,10 @@
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
if(!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(keyslot1 || keyslot2)
@@ -131,12 +131,12 @@
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
add_fingerprint(user)
if(W.is_screwdriver()) // Opening the intercom up.
if(W.has_tool_quality(TOOL_SCREWDRIVER)) // Opening the intercom up.
wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
playsound(src, W.usesound, 50, 1)
update_icon()
else if(wiresexposed && W.is_wirecutter())
else if(wiresexposed && W.has_tool_quality(TOOL_WIRECUTTER))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
@@ -173,7 +173,7 @@
/obj/item/device/radio/intercom/update_icon()
var/area/A = get_area(src)
on = A?.powered(EQUIP)
cut_overlays()
if(!on)
@@ -614,7 +614,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.set_machine(src)
if (!W.is_screwdriver())
if (!W.has_tool_quality(TOOL_SCREWDRIVER))
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
@@ -666,10 +666,10 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
if (!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(keyslot)
+1 -1
View File
@@ -110,7 +110,7 @@
else
to_chat(user, "Error: The device is linked to another monitor.")
else if(W.is_wrench() && user.a_intent != I_HURT)
else if(W.has_tool_quality(TOOL_WRENCH) && user.a_intent != I_HURT)
if(isturf(loc))
anchored = !anchored
@@ -146,7 +146,7 @@
to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>")
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (W.is_screwdriver())
if (W.has_tool_quality(TOOL_SCREWDRIVER))
if(cover_open)
cover_open = 0
to_chat(user, "You screw the panel into place.")
@@ -237,7 +237,7 @@
return cell
/obj/item/device/suit_cooling_unit/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (W.is_screwdriver())
if (W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='warning'>This cooler's cell is permanently installed!</span>")
return
@@ -409,7 +409,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && I.is_screwdriver())
if(ruined && I.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src))
+2 -2
View File
@@ -33,8 +33,8 @@
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.remove_fuel(0, user))
cut_overlays()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
@@ -41,8 +41,8 @@
stacktype = material.stack_type
/obj/item/stack/tile/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(can_weld == FALSE)
to_chat("You can't reform these into their original components.")
+1 -1
View File
@@ -118,7 +118,7 @@
visible_message("<span class='notice'>[user] pairs [I] to [nickname]</span>")
toggle_pairing()
else if(I.is_screwdriver() && cell)
else if(I.has_tool_quality(TOOL_SCREWDRIVER) && cell)
if(do_after(user, 3 SECONDS, src))
to_chat(user, "<span class='notice'>You remove [cell] into [nickname].</span>")
playsound(src, I.usesound, 50, 1)
+1 -1
View File
@@ -248,7 +248,7 @@
return 1
/obj/item/weapon/rms/attackby(obj/item/W, mob/user)
if(W.is_multitool())
if(W.has_tool_quality(TOOL_MULTITOOL))
overcharge = !overcharge
if(overcharge)
to_chat(user, "<span class='notice'>The Rapid Material Synthesizer quietly whirrs...</span>")
+2 -2
View File
@@ -26,8 +26,8 @@
/obj/item/weapon/flame/candle/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("<span class='notice'>\The [user] casually lights the [src] with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter))
@@ -7,7 +7,7 @@
build_path = /obj/machinery/computer/rdconsole/core
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
user.visible_message("<b>\The [user]</b> adjusts the jumper on \the [src]'s access protocol pins.", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/computer/rdconsole/core)
@@ -12,7 +12,7 @@
/obj/item/weapon/stock_parts/scanning_module = 1)
/obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
user.visible_message("<b>\The [user]</b> adjusts the jumper on \the [src]'s access protocol pins.", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/r_n_d/server/core)
@@ -29,11 +29,11 @@
return ..()
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
open_panel = !open_panel
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
playsound(src, I.usesound, 50, 1)
else if(I.is_wirecutter() || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
else if(I.has_tool_quality(TOOL_WIRECUTTER) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
..()
@@ -69,7 +69,7 @@
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
if(W.is_wrench() && !status)//Taking this apart
if(W.has_tool_quality(TOOL_WRENCH) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
@@ -84,7 +84,7 @@
qdel(src)
return
if(W.is_screwdriver() && igniter && !lit)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && igniter && !lit)
status = !status
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
update_icon()
@@ -49,7 +49,7 @@
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!W.is_wirecutter())
if (!W.has_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "<span class='warning'>I need wirecutters for that.</span>")
return
@@ -132,7 +132,7 @@
to_chat(user, "<span class='warning'>You MUST put the paper on a table!</span>")
if (W.w_class < ITEMSIZE_LARGE)
var/obj/item/I = user.get_inactive_hand()
if(I.is_wirecutter())
if(I.has_tool_quality(TOOL_WIRECUTTER))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
to_chat(user, "<span class='warning'>You need more paper!</span>")
@@ -78,7 +78,7 @@
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(W.is_screwdriver() && path != 2)
else if(W.has_tool_quality(TOOL_SCREWDRIVER) && path != 2)
if(stage == 1)
path = 1
if(beakers.len)
@@ -92,7 +92,7 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
switch(det_time)
if (1)
det_time = 10
@@ -39,7 +39,7 @@
return IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
if(O.has_tool_quality(TOOL_CROWBAR) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.has_tool_quality(TOOL_SCREWDRIVER) || istype(O, /obj/item/weapon/cell/device) )
IC.attackby(O, user)
else
..()
@@ -7,7 +7,7 @@
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "You finish the concealed blade weapon.")
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/material/butterfly(user.loc, material.name)
@@ -77,7 +77,7 @@
/obj/item/weapon/inducer/attackby(obj/item/W, mob/user)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
if(!opened)
to_chat(user, "<span class='notice'>You open the battery compartment.</span>")
@@ -12,7 +12,7 @@
var/epitaph = "" //A quick little blurb
/obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
@@ -27,7 +27,7 @@
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
material.place_dismantled_product(get_turf(src))
@@ -290,7 +290,7 @@ Protectiveness | Armor %
unbreakable = FALSE
name = "plate insert"
desc = "used to craft armor plates for a plate carrier. Trim with a welder for light armor or add a second for heavy armor"
/obj/item/weapon/material/armor_plating/attackby(var/obj/O, mob/user)
if(istype(O, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/S = O
@@ -323,12 +323,12 @@ Protectiveness | Armor %
..()
//Make plating inserts for modular armour.
/obj/item/weapon/material/armor_plating/insert/attackby(var/obj/O, mob/user)
/obj/item/weapon/material/armor_plating/insert/attackby(var/obj/item/O, mob/user)
. = ..()
if(istype(O, /obj/item/weapon/weldingtool))
var /obj/item/weapon/weldingtool/S = O
if(O.has_tool_quality(TOOL_WELDER))
var /obj/item/weapon/weldingtool/S = O.get_welder()
if(S.remove_fuel(0,user))
if(!src || !S.isOn()) return
to_chat(user, "<span class='notice'>You trim down the edges to size.</span>")
@@ -47,8 +47,8 @@
alpha = 255
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.remove_fuel(0, user))
material.place_sheet(loc)
qdel(src)
@@ -145,7 +145,7 @@
update_icon()
else
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else if(W.is_screwdriver() && bcell)
else if(W.has_tool_quality(TOOL_SCREWDRIVER) && bcell)
bcell.update_icon()
bcell.forceMove(get_turf(loc))
bcell = null
@@ -13,22 +13,4 @@
sharp = TRUE
edge = FALSE
attack_verb = list("stabbed", "lunged at", "dextrously struck", "sliced", "lacerated", "impaled", "diced", "charioted")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/melee/altevian_wrench
name = "Hull Systems Multi-Wrench"
desc = "A wrench designed with a method to help secure and access bolts, hatches, and airlocks on altevian designed vessels. This operates as nothing more than a massive wrench when used for other purposes."
icon = 'icons/obj/weapons_vr.dmi'
icon_state = "altevian-wrench"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_melee_vr.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_melee_vr.dmi',
)
slot_flags = SLOT_BACK
force = 25
throwforce = 15
w_class = ITEMSIZE_HUGE
sharp = FALSE
edge = FALSE
attack_verb = list("whacked", "slammed", "bashed", "wrenched", "fixed", "bolted", "clonked", "bonked")
hitsound = 'sound/weapons/smash.ogg'
hitsound = 'sound/weapons/bladeslice.ogg'
@@ -153,8 +153,8 @@
/obj/item/weapon/storage/belt/utility/chief/full
starts_with = list(
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/crowbar/power,
/obj/item/weapon/tool/transforming/powerdrill,
/obj/item/weapon/tool/transforming/jawsoflife,
/obj/item/weapon/weldingtool/experimental,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
@@ -43,7 +43,7 @@
playsound(src, "sparks", 50, 1)
return
if (W.is_screwdriver())
if (W.has_tool_quality(TOOL_SCREWDRIVER))
if (do_after(user, 20 * W.toolspeed))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
@@ -97,9 +97,9 @@
/obj/item/weapon/storage/toolbox/syndicate/powertools
starts_with = list(
/obj/item/clothing/gloves/yellow,
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/transforming/powerdrill,
/obj/item/weapon/weldingtool/experimental,
/obj/item/weapon/tool/crowbar/power,
/obj/item/weapon/tool/transforming/jawsoflife,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
/obj/item/device/analyzer
@@ -328,7 +328,6 @@
description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts."
force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it.
can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/tool/screwdriver)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
starts_with = list(
/obj/item/weapon/gun/magnetic/fuelrod,
/obj/item/weapon/fuel_assembly/deuterium,
@@ -39,7 +39,6 @@
/obj/item/weapon/makeover,
/obj/item/pizzavoucher //VOREStation edit
)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
+1 -1
View File
@@ -106,7 +106,7 @@
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
detonator_mode = !detonator_mode
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>")
@@ -130,7 +130,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "<span class='notice'>You attach the wires to the tank.</span>")
src.add_bomb_overlay()
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
if(wired && src.proxyassembly.assembly)
to_chat(user, "<span class='notice'>You carefully begin clipping the wires that attach to the tank.</span>")
@@ -185,7 +185,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "<span class='notice'>You need to wire the device up first.</span>")
if(istype(W, /obj/item/weapon/weldingtool/))
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(1,user))
if(!valve_welded)
@@ -72,34 +72,40 @@
toolspeed = 0.5
/obj/item/weapon/tool/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
matter = list(MAT_METAL=150, MAT_SILVER=50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
name = "power pryer"
desc = "You shouldn't see this."
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/obj/item/weapon/tool/wirecutters/power/counterpart = null
/obj/item/weapon/tool/crowbar/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/*
* Prybar
*/
/obj/item/weapon/tool/crowbar/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/prybar
name = "pry bar"
desc = "A steel bar with a wedge, designed specifically for opening unpowered doors in an emergency. It comes in a variety of configurations - collect them all!"
icon = 'icons/obj/tools_vr.dmi'
icon_state = "prybar"
item_state = "crowbar"
slot_flags = SLOT_BELT
force = 4
throwforce = 5
pry = 1
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 30)
attack_verb = list("whapped", "smacked", "swatted", "thwacked", "hit")
usesound = 'sound/items/crowbar.ogg'
toolspeed = 1
var/random_color = TRUE
/obj/item/weapon/tool/crowbar/power/attack_self(mob/user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
counterpart.persist_storable = persist_storable
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
/obj/item/weapon/tool/prybar/red
icon_state = "prybar_red"
item_state = "crowbar_red"
random_color = FALSE
/obj/item/weapon/tool/prybar/New()
if(random_color)
icon_state = "prybar[pick("","_green","_aubergine","_blue")]"
. = ..()
@@ -1,31 +0,0 @@
/*
* Prybar
*/
/obj/item/weapon/tool/prybar
name = "pry bar"
desc = "A steel bar with a wedge, designed specifically for opening unpowered doors in an emergency. It comes in a variety of configurations - collect them all!"
icon = 'icons/obj/tools_vr.dmi'
icon_state = "prybar"
item_state = "crowbar"
slot_flags = SLOT_BELT
force = 4
throwforce = 5
pry = 1
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 30)
attack_verb = list("whapped", "smacked", "swatted", "thwacked", "hit")
usesound = 'sound/items/crowbar.ogg'
toolspeed = 1
var/random_color = TRUE
/obj/item/weapon/tool/prybar/red
icon_state = "prybar_red"
item_state = "crowbar_red"
random_color = FALSE
/obj/item/weapon/tool/prybar/New()
if(random_color)
icon_state = "prybar[pick("","_green","_aubergine","_blue")]"
. = ..()
@@ -106,42 +106,10 @@
toolspeed = 0.5
/obj/item/weapon/tool/screwdriver/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a screw bit."
icon_state = "drill_screw"
item_state = "drill"
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
slot_flags = SLOT_BELT
name = "power screwdriver"
desc = "You shouldn't see this."
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
attack_verb = list("drilled", "screwed", "jabbed", "whacked")
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
var/obj/item/weapon/tool/wrench/power/counterpart = null
/obj/item/weapon/tool/screwdriver/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/screwdriver/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user)
playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
counterpart.persist_storable = persist_storable
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
toolspeed = 0.25
@@ -0,0 +1,182 @@
/obj/item/weapon/tool/transforming
name = "transforming tool"
desc = "You should never see this..."
var/list/possible_tooltypes = list()
var/current_tooltype = 1
var/obj/item/weapon/weldingtool/welder
var/weldertype = /obj/item/weapon/weldingtool/dummy
/obj/item/weapon/tool/transforming/New(newloc, no_counterpart = TRUE)
..(newloc)
if(TOOL_WELDER in possible_tooltypes)
welder = new weldertype(src)
on_tool_switch()
/obj/item/weapon/tool/transforming/Destroy()
if(welder)
QDEL_NULL(welder)
..()
/obj/item/weapon/tool/transforming/get_welder()
return welder
/obj/item/weapon/tool/transforming/attack_self(mob/user)
if(!possible_tooltypes.len || possible_tooltypes.len < 2)
return
if(current_tooltype == possible_tooltypes.len)
current_tooltype = 1
else
current_tooltype++
on_tool_switch(user)
/obj/item/weapon/tool/transforming/proc/on_tool_switch(var/mob/user)
return
/obj/item/weapon/tool/transforming/jawsoflife
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science."
icon = 'icons/obj/tools.dmi'
icon_state = "jaws_pry"
item_state = "jawsoflife"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_METAL=150, MAT_SILVER=50)
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
sharp = TRUE
edge = TRUE
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked", "pinched", "nipped")
possible_tooltypes = list(TOOL_CROWBAR,TOOL_WIRECUTTER)
/obj/item/weapon/tool/transforming/jawsoflife/on_tool_switch(var/mob/user)
switch(possible_tooltypes[current_tooltype])
if(TOOL_CROWBAR)
desc = initial(desc) + " It's fitted with a prying head."
icon_state = "jaws_pry"
usesound = 'sound/items/jaws_pry.ogg'
tool_qualities = list(TOOL_CROWBAR)
if(user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
if(TOOL_WIRECUTTER)
desc = initial(desc) + " It's fitted with a cutting head."
icon_state = "jaws_cutter"
usesound = 'sound/items/jaws_cut.ogg'
tool_qualities = list(TOOL_WIRECUTTER)
if(user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
/obj/item/weapon/tool/transforming/powerdrill
name = "hand drill"
desc = "A simple powered hand drill."
icon = 'icons/obj/tools.dmi'
icon_state = "drill_bolt"
item_state = "drill"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
force = 8
throwforce = 8
toolspeed = 0.25
sharp = FALSE
edge = FALSE
attack_verb = list("drilled", "screwed", "jabbed", "whacked")
possible_tooltypes = list(TOOL_WRENCH,TOOL_SCREWDRIVER)
/obj/item/weapon/tool/transforming/powerdrill/on_tool_switch(var/mob/user)
switch(possible_tooltypes[current_tooltype])
if(TOOL_WRENCH)
desc = initial(desc) + " It's fitted with a bolt driver."
icon_state = "drill_bolt"
sharp = FALSE
tool_qualities = list(TOOL_WRENCH)
if(user)
playsound(src,'sound/items/change_drill.ogg',50,1)
to_chat(user, "<span class='notice'>You attach the bolt driver to [src].</span>")
if(TOOL_SCREWDRIVER)
desc = initial(desc) + " It's fitted with a screw driver."
icon_state = "drill_screw"
sharp = TRUE
tool_qualities = list(TOOL_SCREWDRIVER)
if(user)
playsound(src,'sound/items/change_drill.ogg',50,1)
to_chat(user, "<span class='notice'>You attach the screw driver to [src].</span>")
/obj/item/weapon/tool/transforming/altevian
name = "Hull Systems Omni-Tool"
desc = "A big and bulky tool, used by altevians for exterior operations. Can take shape of any regular tool, scaled up to a comically large size."
icon = 'icons/obj/weapons_vr.dmi'
icon_state = "altevian-wrench"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_melee_vr.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_melee_vr.dmi',
)
slot_flags = SLOT_BACK
w_class = ITEMSIZE_HUGE
force = 25
throwforce = 15
toolspeed = 0.25
sharp = FALSE
edge = FALSE
attack_verb = list("whacked", "slammed", "bashed", "wrenched", "fixed", "bolted", "clonked", "bonked")
hitsound = 'sound/weapons/smash.ogg'
possible_tooltypes = list(TOOL_WRENCH,TOOL_CROWBAR,TOOL_WIRECUTTER,TOOL_SCREWDRIVER,TOOL_MULTITOOL,TOOL_WELDER)
weldertype = /obj/item/weapon/weldingtool/dummy/altevian
/obj/item/weapon/tool/transforming/altevian/on_tool_switch(var/mob/user)
switch(possible_tooltypes[current_tooltype])
if(TOOL_WRENCH)
desc = initial(desc) + " It's currently in bolting mode."
icon_state = "altevian-wrench"
usesound = 'sound/items/ratchet.ogg'
tool_qualities = list(TOOL_WRENCH)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into bolting mode.</span>")
if(TOOL_CROWBAR)
desc = initial(desc) + " It's currently in prying mode."
icon_state = "altevian-crowbar"
usesound = 'sound/items/crowbar.ogg'
tool_qualities = list(TOOL_CROWBAR)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into prying mode.</span>")
if(TOOL_WIRECUTTER)
desc = initial(desc) + " It's currently in cutting mode."
icon_state = "altevian-wirecutter"
usesound = 'sound/items/wirecutter.ogg'
tool_qualities = list(TOOL_WIRECUTTER)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into cutting mode.</span>")
if(TOOL_SCREWDRIVER)
desc = initial(desc) + " It's currently in screwing mode."
icon_state = "altevian-screwdriver"
usesound = 'sound/items/screwdriver.ogg'
tool_qualities = list(TOOL_SCREWDRIVER)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into screwing mode.</span>")
if(TOOL_MULTITOOL)
desc = initial(desc) + " It's currently in pulsing mode."
icon_state = "altevian-pulser"
usesound = 'sound/items/screwdriver.ogg'
tool_qualities = list(TOOL_MULTITOOL)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into pulsing mode.</span>")
if(TOOL_WELDER)
desc = initial(desc) + " It's currently in welding mode."
icon_state = "altevian-welder-on"
welder.usesound = 'sound/items/Welder2.ogg'
usesound = 'sound/items/Welder2.ogg'
tool_qualities = list(TOOL_WELDER)
if(user)
playsound(src,'sound/items/ratchet.ogg',50,1)
to_chat(user, "<span class='notice'>You reconfigure [src] into welding mode.</span>")
/obj/item/weapon/weldingtool/dummy/altevian
toolspeed = 0.25
@@ -41,6 +41,7 @@
toolspeed = 1
drop_sound = 'sound/items/drop/weldingtool.ogg'
pickup_sound = 'sound/items/pickup/weldingtool.ogg'
tool_qualities = list(TOOL_WELDER)
/obj/item/weapon/weldingtool/Initialize()
. = ..()
@@ -58,6 +59,9 @@
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/weldingtool/get_welder()
return src
/obj/item/weapon/weldingtool/examine(mob/user)
. = ..()
if(max_fuel && loc == user)
@@ -690,4 +694,22 @@
else
setWelding(FALSE, M.occupant)
/obj/item/weapon/weldingtool/dummy
name = "dummy welding tool"
desc = "you shouldn't be reading this. Tell a dev!"
welding = TRUE
/obj/item/weapon/weldingtool/dummy/process()
return
/obj/item/weapon/weldingtool/dummy/get_fuel()
return get_max_fuel()
/obj/item/weapon/weldingtool/dummy/remove_fuel(var/amount = 1, var/mob/M = null)
return TRUE
/obj/item/weapon/weldingtool/dummy/isOn()
return TRUE
#undef WELDER_FUEL_BURN_INTERVAL
@@ -98,35 +98,8 @@
reach = 2
/obj/item/weapon/tool/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_METAL=150, MAT_SILVER=50)
name = "power cutters"
desc = "You shouldn't see this."
usesound = 'sound/items/jaws_cut.ogg'
force = 15
toolspeed = 0.25
random_color = FALSE
var/obj/item/weapon/tool/crowbar/power/counterpart = null
/obj/item/weapon/tool/wirecutters/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wirecutters/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
counterpart.persist_storable = persist_storable
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
toolspeed = 0.25
@@ -74,37 +74,10 @@
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5)
/obj/item/weapon/tool/wrench/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
name = "power wrench"
desc = "You shouldn't see this."
usesound = 'sound/items/drill_use.ogg'
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
var/obj/item/weapon/tool/screwdriver/power/counterpart = null
/obj/item/weapon/tool/wrench/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wrench/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/wrench/power/attack_self(mob/user)
playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
counterpart.persist_storable = persist_storable
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")
+1 -1
View File
@@ -244,7 +244,7 @@
var/inc_damage = W.force
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
if(!shock(user, 100, pick(BP_L_HAND, BP_R_HAND)))
playsound(src, W.usesound, 100, 1)
inc_damage *= 3
+4 -4
View File
@@ -25,8 +25,8 @@
/obj/random/tool/powermaint/item_to_spawn()
return pick(prob(320);/obj/random/tool,
prob(1);/obj/item/weapon/tool/screwdriver/power,
prob(1);/obj/item/weapon/tool/wirecutters/power,
prob(1);/obj/item/weapon/tool/transforming/powerdrill,
prob(1);/obj/item/weapon/tool/transforming/jawsoflife,
prob(15);/obj/item/weapon/weldingtool/electric,
prob(5);/obj/item/weapon/weldingtool/experimental)
@@ -36,8 +36,8 @@
icon_state = "tool_2"
/obj/random/tool/power/item_to_spawn()
return pick(/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/wirecutters/power,
return pick(/obj/item/weapon/tool/transforming/powerdrill,
/obj/item/weapon/tool/transforming/jawsoflife,
/obj/item/weapon/weldingtool/electric,
/obj/item/weapon/weldingtool/experimental)
+1 -1
View File
@@ -394,7 +394,7 @@
frame_canvas(user, I)
else if(current_canvas && current_canvas.painting_name == initial(current_canvas.painting_name) && istype(I,/obj/item/weapon/pen))
try_rename(user)
else if(current_canvas && I.is_wirecutter())
else if(current_canvas && I.has_tool_quality(TOOL_WIRECUTTER))
unframe_canvas(user)
else
return ..()
+3 -3
View File
@@ -87,12 +87,12 @@
qdel(src)
/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob)
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(C.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = C.get_welder()
if(WT.isOn() && WT.remove_fuel(0, user))
deconstruct(user)
return
if(C.is_crowbar() && plated_tile)
if(C.has_tool_quality(TOOL_CROWBAR) && plated_tile)
hatch_open = !hatch_open
if(hatch_open)
playsound(src, 'sound/items/Crowbar.ogg', 100, 2)
@@ -271,7 +271,7 @@
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
@@ -291,8 +291,8 @@
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
@@ -326,8 +326,8 @@
else if(seal_tool)
if(istype(W, seal_tool))
var/obj/item/weapon/S = W
if(istype(S, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = S
if(S.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = S.get_welder()
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
@@ -24,7 +24,7 @@
icon_state = icon_closed
/obj/structure/closet/secure_closet/egg/attackby(obj/item/weapon/W, mob/user as mob) //This also prevents crew from welding the eggs and making them unable to be opened.
if(istype(W, /obj/item/weapon/weldingtool))
if(W.has_tool_quality(TOOL_WELDER))
src.dump_contents()
qdel(src)
@@ -54,7 +54,7 @@
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
@@ -90,7 +90,7 @@
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
else if(istype(W,/obj/item/weapon/packageWrap) || W.has_tool_quality(TOOL_WELDER))
return ..(W,user)
else
togglelock(user)
@@ -90,7 +90,7 @@
src.set_dir(turn(src.dir, 90))
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() && istype(src,/obj/structure/closet/crate/bin))
if(W.has_tool_quality(TOOL_WRENCH) && istype(src,/obj/structure/closet/crate/bin))
return ..()
else if(opened)
if(isrobot(user))
@@ -117,7 +117,7 @@
user.drop_item()
W.forceMove(src)
return
else if(W.is_wirecutter())
else if(W.has_tool_quality(TOOL_WIRECUTTER))
if(rigged)
to_chat(user , "<span class='notice'>You cut away the wiring.</span>")
playsound(src, W.usesound, 100, 1)
@@ -25,7 +25,7 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
new /obj/item/stack/material/wood(src)
for(var/atom/movable/AM in contents)
@@ -55,7 +55,7 @@
icon_state = "vehiclecrate"
/obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
var/obj/item/mecha_parts/mecha_equipment/ME
var/obj/mecha/working/hoverpod/H = new (loc)
@@ -3,7 +3,7 @@
desc = "You hear chirping and cawing inside the crate. It sounds like there are a lot of birds in there..."
/obj/structure/largecrate/birds/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
new /obj/item/stack/material/wood(src)
new /mob/living/simple_mob/animal/passive/bird(src)
new /mob/living/simple_mob/animal/passive/bird/parrot/kea(src)
@@ -31,11 +31,11 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src))
if(W.has_tool_quality(TOOL_WRENCH) && do_after(user, 60 * W.toolspeed, src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins loosening \the [src]'s bolts.</span>")
if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src))
if(W.has_tool_quality(TOOL_WIRECUTTER) && do_after(user, 70 * W.toolspeed, src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins cutting \the [src]'s bolts.</span>")
+1 -1
View File
@@ -38,7 +38,7 @@
layer = OBJ_LAYER
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(P.is_wirecutter())
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to cut the shower curtains.</span>")
if(do_after(user, 10))
+2 -2
View File
@@ -20,14 +20,14 @@
layer = BELOW_MOB_LAYER
/obj/structure/dancepole/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.is_screwdriver())
if(O.has_tool_quality(TOOL_SCREWDRIVER))
anchored = !anchored
playsound(src, O.usesound, 50, 1)
if(anchored)
to_chat(user, "<font color='blue'>You secure \the [src].</font>")
else
to_chat(user, "<font color='blue'>You unsecure \the [src].</font>")
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>Now disassembling \the [src]...</span>")
if(do_after(user, 30 * O.toolspeed))
@@ -170,8 +170,8 @@
rename_door(user)
return
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if (WT.remove_fuel(0, user))
playsound(src, WT.usesound, 50, 1)
if(istext(glass))
@@ -200,7 +200,7 @@
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
return
else if(W.is_wrench() && state == 0)
else if(W.has_tool_quality(TOOL_WRENCH) && state == 0)
playsound(src, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
@@ -223,7 +223,7 @@
src.state = 1
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(W.is_wirecutter() && state == 1 )
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1 )
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
@@ -245,7 +245,7 @@
src.state = 2
src.electronics = W
else if(W.is_crowbar() && state == 2 )
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
@@ -287,7 +287,7 @@
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
glass = material_name
else if(W.is_screwdriver() && state == 2 )
else if(W.has_tool_quality(TOOL_SCREWDRIVER) && state == 2 )
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
+7 -7
View File
@@ -31,15 +31,15 @@
if(!T)
warning("Drop pod wasn't spawned on a turf")
return
moveToNullspace()
icon_state = "[initial(icon_state)]_falling"
// Show warning on 3x3 area centred on our drop spot
var/list/turfs_nearby = block(get_step(T, SOUTHWEST), get_step(T, NORTHEAST))
for(var/turf/TN in turfs_nearby)
new /obj/effect/temporary_effect/shuttle_landing(TN)
// Wait a minute
sleep(4 SECONDS)
@@ -58,7 +58,7 @@
T.hotspot_expose(900)
sleep(1 SECOND)
filters = null
// CRONCH
playsound(src, 'sound/effects/meteorimpact.ogg', 50, 1)
if(!polite)
@@ -69,7 +69,7 @@
else
for(var/turf/simulated/floor/F in view(1, T))
F.burn_tile(900)
for(var/obj/O in T)
if(O == src)
continue
@@ -80,7 +80,7 @@
// Landed! Simmer
plane = initial(plane)
icon_state = "[initial(icon_state)]"
if(auto_open)
sleep(2 SECONDS)
open_pod()
@@ -109,7 +109,7 @@
user.visible_message("<b>[user]</b> opens \the [src]!","You open \the [src]!")
/obj/structure/drop_pod/attackby(obj/item/O, mob/user)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
if(finished)
to_chat(user, "<span class='notice'>You start breaking down \the [src].</span>")
if(do_after(user, 10 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE))
@@ -12,7 +12,7 @@
return
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(src, W.usesound, 50, 1)
C.set_dir(dir)
+1 -1
View File
@@ -31,7 +31,7 @@
to_chat(user, "<span class='notice'>You place [O] in [src].</span>")
else
opened = !opened
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
if(!has_extinguisher)
to_chat(user, "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>")
playsound(src, O.usesound, 50, 1)
+1 -1
View File
@@ -69,7 +69,7 @@
return ..()
/obj/structure/fence/attackby(obj/item/W, mob/user)
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
if(!cuttable)
to_chat(user, span("warning", "This section of the fence can't be cut."))
return
+1 -1
View File
@@ -34,7 +34,7 @@
var/list/qualifiers = list("with ease", "without any trouble", "with great effort")
/obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, 'sound/items/Deconstruct.ogg', 75, 1)
weight = ((weight) % qualifiers.len) + 1
to_chat(user, "You set the machine's weight level to [weight].")
+5 -6
View File
@@ -146,7 +146,7 @@
reinforce_girder()
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_wrench() && state == 0)
if(W.has_tool_quality(TOOL_WRENCH) && state == 0)
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
@@ -172,7 +172,7 @@
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
dismantle()
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
@@ -185,7 +185,7 @@
reinforcing = !reinforcing
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
else if(W.is_wirecutter() && state == 1)
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now removing support struts...</span>")
if(do_after(user,40 * W.toolspeed))
@@ -195,7 +195,7 @@
reinf_material = null
reset_girder()
else if(W.is_crowbar() && state == 0 && anchored)
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now dislodging the girder...</span>")
if(do_after(user, 40 * W.toolspeed))
@@ -339,7 +339,7 @@
qdel(src)
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
if(do_after(user,40 * W.toolspeed))
@@ -419,4 +419,3 @@
/obj/structure/girder/eris
wall_type = /turf/simulated/wall/eris
+2 -2
View File
@@ -51,7 +51,7 @@
return TRUE
/obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
@@ -67,7 +67,7 @@
epitaph += carving_2
update_icon()
return
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].")
+2 -2
View File
@@ -94,12 +94,12 @@
return
if(istype(W, /obj/item/weapon/rcd)) // To stop us from hitting the grille when building windows, because grilles don't let parent handle it properly.
return FALSE
else if(W.is_wirecutter())
else if(W.has_tool_quality(TOOL_WIRECUTTER))
if(!shock(user, 100))
playsound(src, W.usesound, 100, 1)
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
qdel(src)
else if((W.is_screwdriver()) && (istype(loc, /turf/simulated) || anchored))
else if((W.has_tool_quality(TOOL_SCREWDRIVER)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(src, W.usesound, 100, 1)
anchored = !anchored
+1 -1
View File
@@ -176,7 +176,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
//This prevents dumb stuff like splashing the cart with the contents of a container, after putting said container into trash
else if (!has_items)
if (I.is_wrench())
if (I.has_tool_quality(TOOL_WRENCH))
if (do_after(user, 5 SECONDS, src))
dismantle(user)
return
+4 -4
View File
@@ -55,19 +55,19 @@
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile/floor))
if(istype(C, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
if (istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(C.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = C.get_welder()
if(WT.welding == 1)
if(WT.remove_fuel(0, user))
to_chat(user, "<span class='notice'>Slicing lattice joints ...</span>")
new /obj/item/stack/rods(src.loc)
qdel(src)
return
if (istype(C, /obj/item/stack/rods))
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if(R.get_amount() < 2)
to_chat(user, "<span class='notice'>You need at least two rods to form a catwalk here.</span>")
+1 -1
View File
@@ -86,7 +86,7 @@
return
// Dismantling the half wall
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
for(var/obj/structure/S in loc)
if(istype(S, /obj/structure/window))
to_chat(user, "<span class='notice'>There is still a window on the low wall!</span>")
@@ -295,7 +295,7 @@
to_chat(user, "<span class='warning'>Close the valve first.</span>")
return
if (tank)
if(!W.is_wrench())
if(!W.has_tool_quality(TOOL_WRENCH))
return
if (!is_loosen)
is_loosen = TRUE
+2 -2
View File
@@ -50,7 +50,7 @@
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_wrench())
if(I.has_tool_quality(TOOL_WRENCH))
if(!glass)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
@@ -58,7 +58,7 @@
new /obj/item/frame/mirror( src.loc )
qdel(src)
return
if(I.is_wrench())
if(I.has_tool_quality(TOOL_WRENCH))
if(shattered && glass)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
icon_state = "mirror_frame"
+1 -1
View File
@@ -17,7 +17,7 @@
)
/obj/structure/plasticflaps/attackby(obj/item/P, mob/user)
if(P.is_wirecutter())
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to cut the plastic flaps.</span>")
if(do_after(user, 10 * P.toolspeed))
+4 -4
View File
@@ -202,7 +202,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(W.is_wrench() && !anchored)
if(W.has_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<b>\The [user]</b> dismantles \the [src].", "<span class='notice'>You dismantle \the [src].</span>")
@@ -211,8 +211,8 @@
return
// Repair
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(health < maxhealth && W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/F = W.get_welder()
if(F.welding)
playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
@@ -221,7 +221,7 @@
return
// Install
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message(anchored ? "<b>\The [user]</b> begins unscrewing \the [src]." : "<b>\The [user]</b> begins fasten \the [src]." )
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
+1 -1
View File
@@ -14,7 +14,7 @@
return
/obj/structure/salvageable/attackby(obj/item/I, mob/user)
if(I.is_crowbar())
if(I.has_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 50, 1)
var/actual_time = I.toolspeed * 170
user.visible_message( \
+2 -2
View File
@@ -11,7 +11,7 @@
qdel(src)
/obj/structure/sign/attackby(obj/item/tool, mob/user) //deconstruction
if(tool.is_screwdriver() && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double))
if(tool.has_tool_quality(TOOL_SCREWDRIVER) && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double))
playsound(src, tool.usesound, 50, 1)
unfasten(user)
else ..()
@@ -36,7 +36,7 @@
var/original_type
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
if(tool.is_screwdriver() && isturf(user.loc))
if(tool.has_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc))
var/direction = tgui_input_list(usr, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel"))
if(direction == "Cancel") return
var/target_type = original_type || /obj/structure/sign
+2 -2
View File
@@ -181,8 +181,8 @@
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHardness()
else if(istype(W,/obj/item/weapon/weldingtool) && breakable)
var/obj/item/weapon/weldingtool/WT = W
else if(W.has_tool_quality(TOOL_WELDER) && breakable)
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(material.ignition_point && WT.remove_fuel(0, user))
TemperatureAct(150)
else
@@ -88,7 +88,7 @@
return
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
dismantle()
qdel(src)
@@ -119,7 +119,7 @@
add_padding(padding_type)
return
else if(W.is_wirecutter())
else if(W.has_tool_quality(TOOL_WIRECUTTER))
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
@@ -219,7 +219,7 @@
return
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() || istype(W,/obj/item/stack) || W.is_wirecutter())
if(W.has_tool_quality(TOOL_WRENCH) || istype(W,/obj/item/stack) || W.has_tool_quality(TOOL_WIRECUTTER))
return
else if(istype(W,/obj/item/roller_holder))
if(has_buckled_mobs())
@@ -369,7 +369,7 @@
buckle_lying = 1
/obj/structure/dirtybed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
@@ -207,7 +207,7 @@
return
/obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || W.is_wirecutter())
if(istype(W,/obj/item/stack) || W.has_tool_quality(TOOL_WIRECUTTER))
return
..()
@@ -273,7 +273,7 @@
return
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || W.is_wirecutter())
if(istype(W,/obj/item/stack) || W.has_tool_quality(TOOL_WIRECUTTER))
return
..()
@@ -110,7 +110,7 @@ var/global/list/stool_cache = list() //haha stool
qdel(src)
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
dismantle()
qdel(src)
@@ -140,7 +140,7 @@ var/global/list/stool_cache = list() //haha stool
to_chat(user, "You add padding to \the [src].")
add_padding(padding_type)
return
else if (W.is_wirecutter())
else if (W.has_tool_quality(TOOL_WIRECUTTER))
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
@@ -55,7 +55,7 @@
L.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() || W.is_wirecutter() || istype(W,/obj/item/stack))
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_WIRECUTTER) || istype(W,/obj/item/stack))
return
..()
@@ -73,7 +73,7 @@
phorontanks++
else
full = TRUE
else if(I.is_wrench())
else if(I.has_tool_quality(TOOL_WRENCH))
if(anchored)
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
anchored = FALSE
+2 -2
View File
@@ -44,7 +44,7 @@
icon_state = "[initial(icon_state)][open][cistern]"
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(I.is_crowbar())
if(I.has_tool_quality(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(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
@@ -200,7 +200,7 @@
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob)
if(I.type == /obj/item/device/analyzer)
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
if(I.is_wrench())
if(I.has_tool_quality(TOOL_WRENCH))
var/newtemp = tgui_input_list(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve", temperature_settings)
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>")
playsound(src, I.usesound, 50, 1)
@@ -87,8 +87,8 @@
switch(state)
if("01")
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER) && !anchored)
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src, WT.usesound, 50, 1)
@@ -106,7 +106,7 @@
return
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
if(W.is_wrench() && !anchored)
if(W.has_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
@@ -117,7 +117,7 @@
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(W.is_wrench() && anchored)
else if(W.has_tool_quality(TOOL_WRENCH) && anchored)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
@@ -143,7 +143,7 @@
if("02")
//Removing wire from the assembly. Step 5 undone.
if(W.is_wirecutter() && !src.electronics)
if(W.has_tool_quality(TOOL_WIRECUTTER) && !src.electronics)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
@@ -172,7 +172,7 @@
W.loc = src.loc
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(W.is_screwdriver() && src.electronics)
else if(W.has_tool_quality(TOOL_SCREWDRIVER) && src.electronics)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
@@ -185,7 +185,7 @@
ae.loc = src.loc
//Crowbar to complete the assembly, Step 7 complete.
else if(W.is_crowbar())
else if(W.has_tool_quality(TOOL_CROWBAR))
if(!src.electronics)
to_chat(usr,"<span class='warning'>The assembly is missing electronics.</span>")
return
+5 -5
View File
@@ -223,8 +223,8 @@
if(!istype(W)) return//I really wish I did not need this
// Fixing.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
var/obj/item/weapon/weldingtool/WT = W
if(W.has_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP)
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(health < maxhealth)
if(WT.remove_fuel(1 ,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
@@ -265,7 +265,7 @@
if(W.flags & NOBLUDGEON) return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
@@ -285,11 +285,11 @@
update_verbs()
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.</span>")
else if(W.is_crowbar() && reinf && state <= 1)
else if(W.has_tool_quality(TOOL_CROWBAR) && reinf && state <= 1)
state = 1 - state
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
else if(W.is_wrench() && !anchored && (!state || !reinf))
else if(W.has_tool_quality(TOOL_WRENCH) && !anchored && (!state || !reinf))
if(!glasstype)
to_chat(user, "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>")
else