[MIRROR] Refactors tool typechecks, refactors transforming tools, makes Altevian wrench into one (#7062)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2023-10-04 15:37:41 -07:00
committed by GitHub
parent 00a5f09ad4
commit d2e66e6410
310 changed files with 1035 additions and 944 deletions

View File

@@ -140,7 +140,7 @@
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user)
if(!istype(W) || !user) return
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
if(!anchored)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] secures the [src.name] to the floor.", \

View File

@@ -467,7 +467,7 @@ GLOBAL_LIST_EMPTY(apcs)
if(issilicon(user) && get_dist(src,user) > 1)
return attack_hand(user)
add_fingerprint(user)
if(W.is_crowbar() && opened)
if(W.has_tool_quality(TOOL_CROWBAR) && opened)
if(has_electronics == APC_HAS_ELECTRONICS_WIRED)
if(terminal)
to_chat(user, "<span class='warning'>Disconnect the wires first.</span>")
@@ -491,7 +491,7 @@ GLOBAL_LIST_EMPTY(apcs)
else if(opened != 2) //cover isn't removed
opened = 0
update_icon()
else if(W.is_crowbar() && !(stat & BROKEN) )
else if(W.has_tool_quality(TOOL_CROWBAR) && !(stat & BROKEN) )
if(coverlocked && !(stat & MAINT))
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened.</span>")
return
@@ -517,7 +517,7 @@ GLOBAL_LIST_EMPTY(apcs)
"<span class='notice'>You insert the power cell.</span>")
chargecount = 0
update_icon()
else if (W.is_screwdriver()) // haxing
else if (W.has_tool_quality(TOOL_SCREWDRIVER)) // haxing
if(opened)
if(cell)
to_chat(user, "<span class='warning'>Remove the power cell first.</span>")
@@ -573,7 +573,7 @@ GLOBAL_LIST_EMPTY(apcs)
"You add cables to the APC frame.")
make_terminal()
terminal.connect_to_network()
else if(W.is_wirecutter() && terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED)
else if(W.has_tool_quality(TOOL_WIRECUTTER) && terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED)
var/turf/T = loc
if(istype(T) && !T.is_plating())
to_chat(user, "<span class='warning'>You must remove the floor plating in front of the APC first.</span>")
@@ -605,8 +605,8 @@ GLOBAL_LIST_EMPTY(apcs)
else if(istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && ((stat & BROKEN)))
to_chat(user, "<span class='warning'>The [src] is too broken for that. Repair it first.</span>")
return
else if(istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && !terminal)
var/obj/item/weapon/weldingtool/WT = W
else if(W.has_tool_quality(TOOL_WELDER) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && !terminal)
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(WT.get_fuel() < 3)
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
return
@@ -674,7 +674,7 @@ GLOBAL_LIST_EMPTY(apcs)
else
if(istype(user, /mob/living/silicon))
return attack_hand(user)
if(!opened && wiresexposed && (istype(W, /obj/item/device/multitool) || W.is_wirecutter() || istype(W, /obj/item/device/assembly/signaler)))
if(!opened && wiresexposed && (istype(W, /obj/item/device/multitool) || W.has_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/device/assembly/signaler)))
return attack_hand(user)
//Placeholder until someone can do take_damage() for APCs or something.
to_chat(user, "<span class='notice'>The [name] looks too sturdy to bash open with \the [W.name].</span>")

View File

@@ -11,7 +11,7 @@
insert_cell(newcell)
/obj/item/weapon/module/power_control/attackby(var/obj/item/I, var/mob/user)
if(I.is_multitool())
if(I.has_tool_quality(TOOL_MULTITOOL))
to_chat(user, SPAN_NOTICE("You begin tweaking the power control circuits to support a power cell rack."))
if(do_after(user, 50 * I.toolspeed))
var/obj/item/newcircuit = new/obj/item/weapon/circuitboard/batteryrack(get_turf(user))

View File

@@ -177,7 +177,7 @@ var/list/possible_cable_coil_colours = list(
if(!T.is_plating())
return
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
var/obj/item/stack/cable_coil/CC
if(d1 == UP || d2 == UP)
to_chat(user, "<span class='warning'>You must cut this cable from above.</span>")

View File

@@ -24,7 +24,7 @@
/obj/structure/cable/ender/attackby(obj/item/W, mob/user)
src.add_fingerprint(user)
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "<span class='notice'> These cables are too tough to be cut with those [W.name].</span>")
return
else if(istype(W, /obj/item/stack/cable_coil))

View File

@@ -17,7 +17,7 @@
if(!T.is_plating())
return
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
to_chat(usr, "<font color='blue'>These cables are too tough to be cut with those [W.name].</font>")
return
else if(istype(W, /obj/item/stack/cable_coil))

View File

@@ -81,7 +81,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
//CHOMPEdit End
return
if(W.is_wrench() || W.is_screwdriver() || W.is_crowbar() || istype(W, /obj/item/weapon/storage/part_replacer))
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER) || W.has_tool_quality(TOOL_CROWBAR) || istype(W, /obj/item/weapon/storage/part_replacer))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
return

View File

@@ -170,7 +170,7 @@ GLOBAL_LIST_EMPTY(all_turbines)
attack_hand(user)
/obj/machinery/power/generator/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, 75, 1)
anchored = !anchored
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \

View File

@@ -96,7 +96,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
/obj/machinery/gravity_generator/main/station/Initialize()
. = ..()
setup_parts()
middle.add_overlay("activated")
middle.add_overlay("activated")
//
// Generator an admin can spawn
@@ -204,7 +204,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
/obj/machinery/gravity_generator/main/attackby(obj/item/I, mob/user, params)
switch(broken_state)
if(GRAV_NEEDS_SCREWDRIVER)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='notice'>You secure the screws of the framework.</span>")
playsound(src, I.usesound, 75, 1)
broken_state++
@@ -212,7 +212,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
return
if(GRAV_NEEDS_WELDING)
if(I.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/W = I
var/obj/item/weapon/weldingtool/W = I.get_welder()
if(W.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You mend the damaged framework.</span>")
broken_state++
@@ -231,7 +231,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
to_chat(user, "<span class='warning'>You need 10 sheets of plasteel!</span>")
return
if(GRAV_NEEDS_WRENCH)
if(I.is_wrench())
if(I.has_tool_quality(TOOL_WRENCH))
to_chat(user, "<span class='notice'>You secure the plating to the framework.</span>")
playsound(src, I.usesound, 75, 1)
set_fix()
@@ -408,7 +408,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
/obj/machinery/gravity_generator/main/proc/update_list()
levels.Cut()
var/my_z = get_z(src)
//Actually doing it special this time instead of letting using_map decide
if(using_map.use_overmap)
var/obj/effect/overmap/visitable/S = get_overmap_sector(my_z)
@@ -418,7 +418,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
levels = GetConnectedZlevels(my_z)
else
levels = GetConnectedZlevels(my_z)
for(var/z in levels)
if(!GLOB.gravity_generators["[z]"])
GLOB.gravity_generators["[z]"] = list()

View File

@@ -38,12 +38,12 @@
/obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user)
if(!user)
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
default_deconstruction_screwdriver(user, W)
opened = !opened
else if(W.is_crowbar())
else if(W.has_tool_quality(TOOL_CROWBAR))
default_deconstruction_crowbar(user, W)
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
else if(istype(W, /obj/item/device/multitool) || W.has_tool_quality(TOOL_WIRECUTTER))
attack_hand(user)
/obj/machinery/power/grid_checker/attack_hand(mob/user)

View File

@@ -103,7 +103,7 @@ var/global/list/light_type_cache = list()
add_fingerprint(user)
return
if (W.is_wrench())
if (W.has_tool_quality(TOOL_WRENCH))
if (src.stage == 1)
playsound(src, W.usesound, 75, 1)
to_chat(usr, "You begin deconstructing [src].")
@@ -122,7 +122,7 @@ var/global/list/light_type_cache = list()
to_chat(usr, "You have to unscrew the case first.")
return
if(W.is_wirecutter())
if(W.has_tool_quality(TOOL_WIRECUTTER))
if (src.stage != 2) return
src.stage = 1
src.update_icon()
@@ -142,7 +142,7 @@ var/global/list/light_type_cache = list()
"You add wires to [src].")
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if (src.stage == 2)
src.stage = 3
src.update_icon()
@@ -667,7 +667,7 @@ var/global/list/light_type_cache = list()
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(W.is_screwdriver()) //If it's a screwdriver open it.
if(W.has_tool_quality(TOOL_SCREWDRIVER)) //If it's a screwdriver open it.
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] opens [src]'s casing.", \
"You open [src]'s casing.", "You hear a noise.")
@@ -685,7 +685,7 @@ var/global/list/light_type_cache = list()
electrocute_mob(user, get_area(src), src, rand(0.7,1.0))
/obj/machinery/light/flamp/attackby(obj/item/W, mob/user)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
anchored = !anchored
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
@@ -698,7 +698,7 @@ var/global/list/light_type_cache = list()
return
else
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] removes [src]'s lamp shade.", \
"You remove [src]'s lamp shade.", "You hear a noise.")

View File

@@ -83,9 +83,9 @@
/obj/structure/construction/attackby(obj/item/weapon/W as obj, mob/user as mob)
add_fingerprint(user)
if(istype(W, /obj/item/weapon/weldingtool))
if(W.has_tool_quality(TOOL_WELDER))
if(stage == FRAME_UNFASTENED)
var/obj/item/weapon/weldingtool/WT = W
var/obj/item/weapon/weldingtool/WT = W.get_welder()
if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
return
@@ -106,7 +106,7 @@
to_chat(user, "You have to remove the wires first.")
return
else if(W.is_wirecutter())
else if(W.has_tool_quality(TOOL_WIRECUTTER))
if (stage == FRAME_WIRED)
stage = FRAME_FASTENED
user.update_examine_panel(src)
@@ -129,7 +129,7 @@
update_icon()
return
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if (stage == FRAME_UNFASTENED)
stage = FRAME_FASTENED
user.update_examine_panel(src)

View File

@@ -70,7 +70,7 @@
O.loc = src
to_chat(user, "<font color='blue'>You add the phoron tank to the generator.</font>")
else if(!active)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
anchored = !anchored
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(anchored)
@@ -78,14 +78,14 @@
else
to_chat(user, "<font color='blue'>You unsecure the generator from the floor.</font>")
SSmachines.makepowernets()
else if(O.is_screwdriver())
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
open = !open
playsound(src, O.usesound, 50, 1)
if(open)
to_chat(user, "<font color='blue'>You open the access panel.</font>")
else
to_chat(user, "<font color='blue'>You close the access panel.</font>")
else if(O.is_crowbar() && !open)
else if(O.has_tool_quality(TOOL_CROWBAR) && !open)
playsound(src, O.usesound, 50, 1)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)

View File

@@ -279,7 +279,7 @@
updateUsrDialog()
return
else if(!active)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
if(!anchored)
connect_to_network()
to_chat(user, "<span class='notice'>You secure the generator to the floor.</span>")

View File

@@ -71,11 +71,11 @@ var/global/list/rad_collectors = list()
W.loc = src
update_icons()
return 1
else if(W.is_crowbar())
else if(W.has_tool_quality(TOOL_CROWBAR))
if(P && !src.locked)
eject()
return 1
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
if(P)
to_chat(user, "<font color='blue'>Remove the phoron tank first.</font>")
return 1

View File

@@ -158,7 +158,7 @@
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
if(active)
to_chat(user, "Turn off [src] first.")
return
@@ -183,8 +183,8 @@
update_icon() // VOREStation Add
return
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(active)
to_chat(user, "Turn off [src] first.")
return

View File

@@ -116,7 +116,7 @@ field_generator power level display
if(active)
to_chat(user, "The [src] needs to be off.")
return
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
switch(state)
if(0)
state = 1
@@ -135,8 +135,8 @@ field_generator power level display
if(2)
to_chat(user, "<font color='red'>The [src.name] needs to be unwelded from the floor.</font>")
return
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
else if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = W.get_welder()
switch(state)
if(0)
to_chat(user, "<font color='red'>The [src.name] needs to be wrenched to the floor.</font>")

View File

@@ -24,7 +24,7 @@
if(src) qdel(src)
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
anchored = !anchored
playsound(src, W.usesound, 75, 1)
if(anchored)
@@ -36,7 +36,7 @@
"You unsecure the [src.name] from the floor.", \
"You hear a ratchet.")
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open
playsound(src, W.usesound, 50, 1)
visible_message("<b>\The [user]</b> adjusts \the [src]'s mechanisms.")

View File

@@ -113,7 +113,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/structure/particle_accelerator/examine(mob/user)
. = ..()
switch(construction_state)
if(0)
. += "Looks like it's not attached to the flooring."
@@ -204,14 +204,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 75, 1)
src.anchored = TRUE
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 75, 1)
src.anchored = FALSE
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
@@ -223,16 +223,16 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
"You add some wires.")
temp_state++
if(2)
if(O.is_wirecutter())//TODO:Shock user if its on?
if(O.has_tool_quality(TOOL_WIRECUTTER))//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [src.name].", \
"You remove some wires.")
temp_state--
else if(O.is_screwdriver())
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
"You close the access panel.")
temp_state++
if(3)
if(O.is_screwdriver())
if(O.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
"You open the access panel.")
temp_state--
@@ -292,7 +292,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/examine(mob/user)
. = ..()
switch(construction_state)
if(0)
. += "Looks like it's not attached to the flooring."
@@ -338,14 +338,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/temp_state = src.construction_state
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 75, 1)
src.anchored = TRUE
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(O.is_wrench())
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 75, 1)
src.anchored = FALSE
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
@@ -357,16 +357,16 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
"You add some wires.")
temp_state++
if(2)
if(O.is_wirecutter())//TODO:Shock user if its on?
if(O.has_tool_quality(TOOL_WIRECUTTER))//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [src.name].", \
"You remove some wires.")
temp_state--
else if(O.is_screwdriver())
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
"You close the access panel.")
temp_state++
if(3)
if(O.is_screwdriver())
if(O.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
"You open the access panel.")
temp_state--

View File

@@ -74,7 +74,7 @@
to_chat(user, "<span class='notice'>You add \the [reagent_container] to \the [src].</span>")
update_icon()
return
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
anchored = !anchored
playsound(src, W.usesound, 75, 1)
if(anchored)

View File

@@ -310,8 +310,8 @@ GLOBAL_LIST_EMPTY(smeses)
to_chat(user, "<span class='filter_notice'><span class='warning'>You need to open access hatch on [src] first!</span></span>")
return FALSE
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())
to_chat(user, "<span class='filter_notice'>Turn on \the [WT] first!</span>")
return FALSE
@@ -342,7 +342,7 @@ GLOBAL_LIST_EMPTY(smeses)
connect_to_network()
return FALSE
else if(W.is_wirecutter() && !building_terminal)
else if(W.has_tool_quality(TOOL_WIRECUTTER) && !building_terminal)
building_terminal = TRUE
var/obj/machinery/power/terminal/term
for(var/obj/machinery/power/terminal/T in get_turf(user))

View File

@@ -335,7 +335,7 @@
failure_probability = 0
// Crowbar - Disassemble the SMES.
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
if (terminals.len)
to_chat(user, "<span class='warning'>You have to disassemble the terminal first!</span>")
return

View File

@@ -6,7 +6,7 @@
var/overlay_icon = 'icons/obj/power_vr.dmi'
/obj/machinery/power/smes/buildable/hybrid/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(W.is_screwdriver() || W.is_wirecutter())
if(W.has_tool_quality(TOOL_SCREWDRIVER) || W.has_tool_quality(TOOL_WIRECUTTER))
to_chat(user,"<span class='warning'>\The [src] full of weird alien technology that's best not messed with.</span>")
return 0

View File

@@ -58,7 +58,7 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar panel.</span>")
if(do_after(user, 50))
@@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(solars_list)
return 0 //if there's no SSsun.sun or the panel is not linked to a solar control computer, no need to proceed
if(!powernet || powernet != control.powernet)
return 0 // We aren't connected to the controller
if(obscured)
if(obscured)
return 0 //get no light from the SSsun.sun, so don't generate power
return GLOB.solar_gen_rate * sunfrac
@@ -207,13 +207,13 @@ GLOBAL_LIST_EMPTY(solars_list)
if (!isturf(loc))
return 0
if(!anchored)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
anchored = TRUE
user.visible_message("<span class='notice'>[user] wrenches the solar assembly into place.</span>")
playsound(src, W.usesound, 75, 1)
return 1
else
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
anchored = FALSE
user.visible_message("<span class='notice'>[user] unwrenches the solar assembly from it's place.</span>")
playsound(src, W.usesound, 75, 1)
@@ -242,7 +242,7 @@ GLOBAL_LIST_EMPTY(solars_list)
user.visible_message("<span class='notice'>[user] inserts the electronics into the solar assembly.</span>")
return 1
else
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
new /obj/item/weapon/tracker_electronics(src.loc)
tracker = 0
user.visible_message("<span class='notice'>[user] takes out the electronics from the solar assembly.</span>")
@@ -412,7 +412,7 @@ GLOBAL_LIST_EMPTY(solars_list)
return data
/obj/machinery/power/solar_control/attackby(obj/item/I, user as mob)
if(I.is_screwdriver())
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)

View File

@@ -34,7 +34,7 @@
// SPECIAL BOARDS BELOW
/obj/item/weapon/circuitboard/tesla_coil/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_multitool())
if(I.has_tool_quality(TOOL_MULTITOOL))
var/result = tgui_input_list(user, "What do you want to reconfigure the board to?", "Multitool-Circuitboard interface", list("Standard", "Relay", "Prism", "Amplifier", "Recaster", "Collector"))
switch(result)
if("Standard")

View File

@@ -53,7 +53,7 @@
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.is_crowbar())
if(W.has_tool_quality(TOOL_CROWBAR))
playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar tracker.</span>")
if(do_after(user, 50))