mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-31 20:43:12 +00:00
What was supposed to be another straightforward major system overhaul that once again spiraled out of control (#8220)
* get_tool_quality has numerical meaning * Basic tools set tool quality * Toolspeed is replaced by tool quality checks * Addresses assorted results from live test * Extra cleanup
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
if((!A.secured) && (!secured))
|
||||
attach_assembly(A,user)
|
||||
return
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(toggle_secure())
|
||||
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
|
||||
else
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/assembly_holder/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(!a_left || !a_right)
|
||||
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
|
||||
return
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.is_wrench() && !status)
|
||||
if(W.get_tool_quality(TOOL_WRENCH) && !status)
|
||||
var/turf/T = loc
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
@@ -26,7 +26,7 @@
|
||||
part2 = null
|
||||
qdel(src)
|
||||
return
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -34,6 +34,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
var/debug = FALSE // If true, can view all catalogue data defined, regardless of unlock status.
|
||||
var/weakref/partial_scanned = null // Weakref of the thing that was last scanned if inturrupted. Used to allow for partial scans to be resumed.
|
||||
var/partial_scan_time = 0 // How much to make the next scan shorter.
|
||||
var/toolspeed = 1
|
||||
|
||||
/obj/item/device/cataloguer/advanced
|
||||
name = "advanced cataloguer"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human))
|
||||
if(LAZYLEN(species_restricted) && ishuman(M))
|
||||
var/exclusive = null
|
||||
var/wearable = null
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -191,19 +191,15 @@
|
||||
SPECIES_TESHARI = 'icons/mob/species/teshari/ears.dmi')
|
||||
|
||||
/obj/item/clothing/ears/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
|
||||
if (src.loc != user || !istype(user,/mob/living/carbon/human))
|
||||
..()
|
||||
if (!user || !canremove)
|
||||
return
|
||||
|
||||
if (src.loc != user || !ishuman(user))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_ear != src && H.r_ear != src)
|
||||
..()
|
||||
return
|
||||
|
||||
if(!canremove)
|
||||
return
|
||||
return ..()
|
||||
|
||||
var/obj/item/clothing/ears/O
|
||||
if(slot_flags & SLOT_TWOEARS )
|
||||
@@ -316,25 +312,6 @@
|
||||
/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
|
||||
return 0 // return 1 to cancel attack_hand()
|
||||
|
||||
/*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
|
||||
if(W.is_wirecutter() || istype(W, /obj/item/weapon/scalpel))
|
||||
if (clipped)
|
||||
to_chat(user, "<span class='notice'>The [src] have already been clipped!</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message("<font color='red'>[user] cuts the fingertips off of the [src].</font>","<font color='red'>You cut the fingertips off of the [src].</font>")
|
||||
|
||||
clipped = 1
|
||||
name = "modified [name]"
|
||||
desc = "[desc]<br>They have had the fingertips cut off of them."
|
||||
if("exclude" in species_restricted)
|
||||
species_restricted -= SPECIES_UNATHI
|
||||
species_restricted -= SPECIES_TAJ
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/item/clothing/gloves/clean_blood()
|
||||
. = ..()
|
||||
transfer_blood = 0
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
icon_state = "boxing"
|
||||
item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red")
|
||||
|
||||
/*
|
||||
/obj/item/clothing/gloves/boxing/attackby(obj/item/weapon/W, mob/user)
|
||||
if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel))
|
||||
to_chat(user, "<span class='notice'>That won't work.</span>") //Nope
|
||||
return
|
||||
..()
|
||||
*/
|
||||
|
||||
/obj/item/clothing/gloves/boxing/green
|
||||
icon_state = "boxinggreen"
|
||||
item_state_slots = list(slot_r_hand_str = "green", slot_l_hand_str = "green")
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/attackby(obj/item/I, mob/user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
switch(aggressiveness)
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>You set the aggressiveness restrictor to the second position.</span>")
|
||||
@@ -123,11 +123,11 @@
|
||||
phrase = 1
|
||||
if(5)
|
||||
to_chat(user, "<span class='warning'>You adjust the restrictor but nothing happens, probably because its broken.</span>")
|
||||
if(I.is_wirecutter())
|
||||
if(I.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(aggressiveness != 5)
|
||||
to_chat(user, "<span class='warning'>You broke it!</span>")
|
||||
aggressiveness = 5
|
||||
if(I.is_crowbar())
|
||||
if(I.get_tool_quality(TOOL_CROWBAR))
|
||||
if(!hailer)
|
||||
to_chat(user, "<span class='warning'>This mask has an integrated hailer, you can't remove it!</span>")
|
||||
else
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
|
||||
// Pass repair items on to the chestpiece.
|
||||
if(chest && (istype(W,/obj/item/stack/material) || istype(W, /obj/item/weapon/weldingtool)))
|
||||
if(chest && (istype(W,/obj/item/stack/material) || W.get_tool_quality(TOOL_WELDER)))
|
||||
return chest.attackby(W,user)
|
||||
|
||||
// Lock or unlock the access panel.
|
||||
@@ -30,7 +30,7 @@
|
||||
to_chat(user, "You [locked ? "lock" : "unlock"] \the [src] access panel.")
|
||||
return
|
||||
|
||||
else if(W.is_crowbar())
|
||||
else if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
if(!open && locked)
|
||||
to_chat(user, "The access panel is locked shut.")
|
||||
return
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
if(open)
|
||||
// Hacking.
|
||||
if(W.is_wirecutter() || istype(W, /obj/item/device/multitool))
|
||||
if(W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL))
|
||||
if(open)
|
||||
wires.Interact(user)
|
||||
else
|
||||
@@ -102,7 +102,7 @@
|
||||
src.cell = W
|
||||
return
|
||||
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
|
||||
if(!air_supply)
|
||||
to_chat(user, "There is no tank to remove.")
|
||||
@@ -116,7 +116,7 @@
|
||||
air_supply = null
|
||||
return
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
|
||||
var/list/current_mounts = list()
|
||||
if(cell) current_mounts += "cell"
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
to_chat(user, "<span class='warning'>You cannot modify \the [src] while it is being worn.</span>")
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(helmet || boots || tank)
|
||||
var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank,cooler)
|
||||
if(!choice) return
|
||||
|
||||
@@ -164,10 +164,8 @@
|
||||
slot = ACCESSORY_SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/stethoscope/do_surgery(mob/living/carbon/human/M, mob/living/user)
|
||||
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
|
||||
return ..()
|
||||
attack(M, user) //default surgery behaviour is just to scan as usual
|
||||
return 1
|
||||
return attack(M, user) //default surgery behaviour is just to scan as usual
|
||||
|
||||
|
||||
/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(ishuman(M) && isliving(user))
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
scan_cash(SC)
|
||||
else if(istype(O, /obj/item/weapon/card/emag))
|
||||
return ..()
|
||||
else if(O.is_wrench())
|
||||
else if(O.get_tool_quality(TOOL_WRENCH))
|
||||
var/obj/item/weapon/tool/wrench/W = O
|
||||
toggle_anchors(W, user)
|
||||
// Not paying: Look up price and add it to transaction_amount
|
||||
@@ -481,8 +481,10 @@
|
||||
to_chat(usr, "<span class='warning'>The cash box is locked.</span>")
|
||||
|
||||
|
||||
/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
if(manipulating) return
|
||||
/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/W, mob/user)
|
||||
if(manipulating || !W.get_tool_quality(TOOL_WRENCH))
|
||||
return
|
||||
|
||||
manipulating = 1
|
||||
if(!anchored)
|
||||
user.visible_message("\The [user] begins securing \the [src] to the floor.",
|
||||
@@ -491,7 +493,7 @@
|
||||
user.visible_message("<span class='warning'>\The [user] begins unsecuring \the [src] from the floor.</span>",
|
||||
"You begin unsecuring \the [src] from the floor.")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(!do_after(user, 20 * W.toolspeed))
|
||||
if(!do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
manipulating = 0
|
||||
return
|
||||
if(!anchored)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This cable coil appears to be empty.</span>")
|
||||
return
|
||||
else if(W.is_wirecutter())
|
||||
else if(W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(!string_attached)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -156,7 +156,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
if(I || istype(W, /obj/item/weapon/spacecash))
|
||||
attack_hand(user)
|
||||
return
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
|
||||
SStgui.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
|
||||
else if(W.get_tool_quality(TOOL_MULTITOOL) || W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
@@ -180,14 +180,14 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_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.")
|
||||
else
|
||||
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||
|
||||
if(do_after(user, 20 * W.toolspeed))
|
||||
if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
||||
anchored = !anchored
|
||||
|
||||
@@ -132,7 +132,7 @@ GLOBAL_LIST_INIT(generic_fishing_chance_list, list(FISHING_RARE = 5, FISHING_UNC
|
||||
to_chat(user,"You cast \the [P.name] into \the [src].")
|
||||
being_fished = TRUE
|
||||
R.cast = TRUE
|
||||
var/fishing_time = rand(min_fishing_time SECONDS,max_fishing_time SECONDS) * R.toolspeed
|
||||
var/fishing_time = rand(min_fishing_time SECONDS,max_fishing_time SECONDS) * R.get_tool_speed(TOOL_FISHING)
|
||||
if(do_after(user,fishing_time,user))
|
||||
playsound(src, 'sound/effects/slosh.ogg', 5, 1, 5)
|
||||
to_chat(user,"<span class='notice'>You feel a tug and begin pulling!</span>")
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
applies_material_colour = TRUE
|
||||
default_material = "wood"
|
||||
can_dull = FALSE
|
||||
tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_MEDIOCRE)
|
||||
var/strung = TRUE
|
||||
var/line_break = TRUE
|
||||
|
||||
@@ -51,7 +52,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_wirecutter() && strung)
|
||||
if(I.get_tool_quality(TOOL_WIRECUTTER) && strung)
|
||||
strung = FALSE
|
||||
to_chat(user, "<span class='notice'>You cut \the [src]'s string!</span>")
|
||||
update_icon()
|
||||
@@ -90,10 +91,10 @@
|
||||
if(re.id == "nutriment" || re.id == "protein" || re.id == "glucose" || re.id == "fishbait")
|
||||
foodvolume += re.volume
|
||||
|
||||
toolspeed = initial(toolspeed) * min(0.75, (0.5 / max(0.5, (foodvolume / Bait.reagents.maximum_volume))))
|
||||
set_tool_quality(TOOL_FISHING, initial(tool_qualities[TOOL_FISHING]) * 2 * max(0.75, (foodvolume / Bait.reagents.maximum_volume)))
|
||||
|
||||
else
|
||||
toolspeed = initial(toolspeed)
|
||||
set_tool_quality(TOOL_FISHING, initial(tool_qualities[TOOL_FISHING]))
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/proc/consume_bait()
|
||||
if(Bait)
|
||||
@@ -118,7 +119,7 @@
|
||||
attackspeed = 2 SECONDS
|
||||
default_material = "titanium"
|
||||
|
||||
toolspeed = 0.75
|
||||
tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_DECENT)
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/modern/built
|
||||
strung = FALSE
|
||||
@@ -128,4 +129,4 @@
|
||||
desc = "Mass produced, but somewhat reliable."
|
||||
default_material = "plastic"
|
||||
|
||||
toolspeed = 0.9
|
||||
tool_qualities = list(TOOL_FISHING = TOOL_QUALITY_STANDARD)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
if (is_sliceable())
|
||||
//these are used to allow hiding edge items in food that is not on a table/tray
|
||||
var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc))
|
||||
var/hide_item = !has_edge(W) || !can_slice_here
|
||||
var/hide_item = !W.edge || !can_slice_here
|
||||
|
||||
if (hide_item)
|
||||
if (W.w_class >= src.w_class || is_robot_module(W))
|
||||
@@ -186,7 +186,7 @@
|
||||
contents += W
|
||||
return
|
||||
|
||||
if (has_edge(W))
|
||||
if (W.edge)
|
||||
if (!can_slice_here)
|
||||
to_chat(user, "<span class='warning'>You cannot slice \the [src] here! You need a table or at least a tray to do it.</span>")
|
||||
return
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
else if(istype(check, /obj/item/weapon/disk/nuclear))
|
||||
to_chat(user, "<span class='warning'>You can't cook that.</span>")
|
||||
return 0
|
||||
else if(I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/weapon/storage/part_replacer)) // You can't cook tools, dummy.
|
||||
else if(I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/weapon/storage/part_replacer)) // You can't cook tools, dummy.
|
||||
return 0
|
||||
else if(!istype(check) && !istype(check, /obj/item/weapon/holder))
|
||||
to_chat(user, "<span class='warning'>That's not edible.</span>")
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
/obj/machinery/appliance/cooker/oven/proc/manip(var/obj/item/I)
|
||||
// check if someone's trying to manipulate the machine
|
||||
|
||||
if(I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/weapon/storage/part_replacer))
|
||||
if(I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/weapon/storage/part_replacer))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -75,24 +75,24 @@
|
||||
|
||||
/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver
|
||||
if(src.broken == 2 && O.get_tool_quality(TOOL_SCREWDRIVER)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if (do_after(user,20 * O.toolspeed))
|
||||
if (do_after(user,20 * O.get_tool_speed(TOOL_SCREWDRIVER)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] fixes part of the microwave.</span>", \
|
||||
"<span class='notice'>You have fixed part of the microwave.</span>" \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench
|
||||
else if(src.broken == 1 && O.get_tool_quality(TOOL_WRENCH)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
)
|
||||
if (do_after(user,20 * O.toolspeed))
|
||||
if (do_after(user,20 * O.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] fixes the microwave.</span>", \
|
||||
"<span class='notice'>You have fixed the microwave.</span>" \
|
||||
@@ -157,10 +157,10 @@
|
||||
var/obj/item/weapon/grab/G = O
|
||||
to_chat(user, "<span class='warning'>This is ridiculous. You can not fit \the [G.affecting] in this [src].</span>")
|
||||
return 1
|
||||
else if(O.is_screwdriver())
|
||||
else if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, O)
|
||||
return
|
||||
else if(O.is_crowbar())
|
||||
else if(O.get_tool_quality(TOOL_CROWBAR))
|
||||
if(default_deconstruction_crowbar(user, O))
|
||||
return
|
||||
else
|
||||
@@ -168,7 +168,7 @@
|
||||
"<span class='notice'>\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.</span>", \
|
||||
"<span class='notice'>You attempt to [src.anchored ? "unsecure" : "secure"] the microwave.</span>"
|
||||
)
|
||||
if (do_after(user,20/O.toolspeed))
|
||||
if (do_after(user,20/O.get_tool_speed(TOOL_CROWBAR)))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.</span>", \
|
||||
"<span class='notice'>You [src.anchored ? "unsecure" : "secure"] the microwave.</span>"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.is_screwdriver())
|
||||
if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
@@ -119,7 +119,7 @@
|
||||
if(wrenchable && default_unfasten_wrench(user, O, 20))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/device/multitool) || O.is_wirecutter())
|
||||
if(O.get_tool_quality(TOOL_MULTITOOL) || O.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
@@ -202,11 +202,11 @@
|
||||
|
||||
if(W.flags & NOBLUDGEON) return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
to_chat(user, "<span class='notice'>It's a holowindow, you can't unfasten it!</span>")
|
||||
else if(W.is_crowbar() && reinf && state <= 1)
|
||||
else if(W.get_tool_quality(TOOL_CROWBAR) && reinf && state <= 1)
|
||||
to_chat(user, "<span class='notice'>It's a holowindow, you can't pry it!</span>")
|
||||
else if(W.is_wrench() && !anchored && (!state || !reinf))
|
||||
else if(W.get_tool_quality(TOOL_WRENCH) && !anchored && (!state || !reinf))
|
||||
to_chat(user, "<span class='notice'>It's a holowindow, you can't dismantle it!</span>")
|
||||
else
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
@@ -263,7 +263,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
to_chat(user, "<span class='notice'>It's a holochair, you can't dismantle it!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
. += "The lid is open."
|
||||
|
||||
/obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user)
|
||||
if(I.is_crowbar())
|
||||
if(I.get_tool_quality(TOOL_CROWBAR))
|
||||
closed = !closed
|
||||
user.visible_message("<span class='notice'>[user] [closed ? "closes" : "opens"] \the [src].</span>", "<span class='notice'>You [closed ? "close" : "open"] \the [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(I.is_wrench())
|
||||
else if(I.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "wrenches" : "unwrenches"] \the [src].</span>", "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
@@ -107,7 +107,7 @@
|
||||
if(smoked)
|
||||
to_chat(user, "The hive is smoked.")
|
||||
return 1
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(bee_count)
|
||||
to_chat(user, "<span class='notice'>You can't dismantle \the [src] with these bees inside.</span>")
|
||||
return
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")
|
||||
anchored = !anchored
|
||||
|
||||
@@ -508,18 +508,18 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no seeds in \the [O.name].</span>")
|
||||
return
|
||||
else if(O.is_wrench())
|
||||
else if(O.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
|
||||
else if(O.is_screwdriver())
|
||||
else if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
overlays.Cut()
|
||||
if(panel_open)
|
||||
overlays += image(icon, "[initial(icon_state)]-panel")
|
||||
else if((O.is_wirecutter() || istype(O, /obj/item/device/multitool)) && panel_open)
|
||||
else if((O.get_tool_quality(TOOL_WIRECUTTER) || O.get_tool_quality(TOOL_MULTITOOL)) && panel_open)
|
||||
wires.Interact(user)
|
||||
|
||||
/obj/machinery/seed_storage/emag_act(var/remaining_charges, var/mob/user)
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
plant_controller.add_plant(src)
|
||||
|
||||
if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel))
|
||||
if(W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_SCALPEL))
|
||||
if(sampled)
|
||||
to_chat(user, "<span class='warning'>\The [src] has already been sampled recently.</span>")
|
||||
return
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
if(O.is_open_container())
|
||||
return 0
|
||||
|
||||
if(O.is_wirecutter() || istype(O, /obj/item/weapon/surgical/scalpel))
|
||||
if(O.get_tool_quality(TOOL_WIRECUTTER) || O.get_tool_quality(TOOL_SCALPEL))
|
||||
|
||||
if(!seed)
|
||||
to_chat(user, "There is nothing to take a sample from in \the [src].")
|
||||
@@ -564,7 +564,7 @@
|
||||
qdel(O)
|
||||
check_health()
|
||||
|
||||
else if(mechanical && O.is_wrench())
|
||||
else if(mechanical && O.get_tool_quality(TOOL_WRENCH))
|
||||
|
||||
//If there's a connector here, the portable_atmospherics setup can handle it.
|
||||
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
visible_message("<span class='notice'>\The [user] waves \the [src] around [target].</span>")
|
||||
|
||||
/obj/item/device/electronic_assembly/attackby(var/obj/item/I, var/mob/user)
|
||||
if(can_anchor && I.is_wrench())
|
||||
if(can_anchor && I.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
to_chat(user, span("notice", "You've [anchored ? "" : "un"]secured \the [src] to \the [get_turf(src)]."))
|
||||
if(anchored)
|
||||
@@ -252,14 +252,14 @@
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
else if(I.is_crowbar())
|
||||
else if(I.get_tool_quality(TOOL_CROWBAR))
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
opened = !opened
|
||||
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.is_screwdriver())
|
||||
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(opened)
|
||||
interact(user)
|
||||
return TRUE
|
||||
@@ -359,4 +359,4 @@
|
||||
|
||||
// Returns TRUE if I is something that could/should have a valid interaction. Used to tell circuitclothes to hit the circuit with something instead of the clothes
|
||||
/obj/item/device/electronic_assembly/proc/is_valid_tool(var/obj/item/I)
|
||||
return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/weapon/cell/device) || istype(I, /obj/item/device/integrated_electronics)
|
||||
return I.get_tool_quality(TOOL_CROWBAR) || I.get_tool_quality(TOOL_SCREWDRIVER) || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/weapon/cell/device) || istype(I, /obj/item/device/integrated_electronics)
|
||||
@@ -12,7 +12,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if (I.is_crowbar())
|
||||
if (I.get_tool_quality(TOOL_CROWBAR))
|
||||
toggle_open(user)
|
||||
else if (opened)
|
||||
EA.attackby(I, user)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
/obj/item/weapon/tool/screwdriver,
|
||||
/obj/item/device/multitool
|
||||
)
|
||||
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
|
||||
cant_hold = list(/obj/item/weapon/tool/powerdrill)
|
||||
|
||||
/obj/item/weapon/storage/bag/circuits/basic/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
return
|
||||
else
|
||||
name = ("bookcase ([newname])")
|
||||
else if(O.is_wrench())
|
||||
else if(O.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 100, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You unfasten \the [src] from the floor.</span>" : "<span class='notice'>You secure \the [src] to the floor.</span>"))
|
||||
anchored = !anchored
|
||||
else if(O.is_screwdriver())
|
||||
else if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You begin dismantling \the [src].</span>")
|
||||
if(do_after(user,25 * O.toolspeed))
|
||||
if(do_after(user,25 * O.get_tool_speed(TOOL_SCREWDRIVER)))
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/material/wood(get_turf(src), 3)
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
@@ -281,7 +281,7 @@ Book Cart End
|
||||
return
|
||||
scanner.computer.inventory.Add(src)
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
|
||||
else if(istype(W, /obj/item/weapon/material/knife) || W.is_wirecutter())
|
||||
else if(istype(W, /obj/item/weapon/material/knife) || W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
if(carved) return
|
||||
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
|
||||
if(do_after(user, 30))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//Step one - dehairing.
|
||||
/obj/item/stack/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(has_edge(W) || is_sharp(W))
|
||||
if(W.edge || W.sharp)
|
||||
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
|
||||
user.visible_message("<span class='notice'>\The [user] starts cutting hair off \the [src]</span>", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
|
||||
var/scraped = 0
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
/obj/item/stack/material/log/attackby(var/obj/item/W, var/mob/user)
|
||||
if(!istype(W) || W.force <= 0)
|
||||
return ..()
|
||||
if(W.sharp && W.edge)
|
||||
var/time = (3 SECONDS / max(W.force / 10, 1)) * W.toolspeed
|
||||
if(W.get_tool_quality(TOOL_WOODCUT)) // Not all that is sharp should chop wood
|
||||
var/time = (3 SECONDS / max(W.force / 10, 1)) * W.get_tool_speed(TOOL_WOODCUT)
|
||||
user.setClickCooldown(time)
|
||||
if(do_after(user, time, src) && use(1))
|
||||
to_chat(user, "<span class='notice'>You cut up a log into planks.</span>")
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
to_chat(user, "<span class='notice'>You can't anchor something to empty space. Idiot.</span>")
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
qdel(W)
|
||||
|
||||
if(8)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>Now attaching the gun to the frame...</span>")
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
else if(O.is_screwdriver())
|
||||
else if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(!locked)
|
||||
open = !open
|
||||
to_chat(user, "<span class='notice'>Maintenance panel is now [open ? "opened" : "closed"].</span>")
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
qdel(W)
|
||||
|
||||
if(8)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>Now attaching the gun to the frame...</span>")
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
qdel(W)
|
||||
|
||||
if(7)
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>Attatching the mop to the frame...</span>")
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
src.searching = 0
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='blue'>\The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?</font>")
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
// to_chat(src.brainmob, "<b>Use say #b to speak to other artificial intelligences.</b>")
|
||||
src.brainmob.mind.assigned_role = "Synthetic Brain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='blue'>\The [src] chimes quietly.</font>")
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
to_chat(src.brainmob, "<b>Use say #b to speak to other artificial intelligences.</b>")
|
||||
src.brainmob.mind.assigned_role = "Positronic Brain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='blue'>The positronic brain beeps as it loads a personality.</font>")
|
||||
playsound(src, 'sound/misc/boobeebeep.ogg', 50, 1)
|
||||
@@ -80,7 +80,7 @@
|
||||
src.searching = 0
|
||||
icon_state = "posibrain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='blue'>The positronic brain buzzes and beeps, and the golden lights fade away. Perhaps you could try again?</font>")
|
||||
playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1)
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
return 0
|
||||
|
||||
//Apply weapon damage
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
var/weapon_edge = has_edge(I)
|
||||
var/weapon_sharp = I.sharp
|
||||
var/weapon_edge = I.edge
|
||||
var/hit_embed_chance = I.embed_chance
|
||||
if(prob(getarmor(hit_zone, "melee"))) //melee armour provides a chance to turn sharp/edge weapon attacks into blunt ones
|
||||
weapon_sharp = 0
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
amount *= M.incoming_damage_percent
|
||||
if(!isnull(M.incoming_brute_damage_percent))
|
||||
amount *= M.incoming_brute_damage_percent
|
||||
O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
|
||||
O.take_damage(amount, 0, damage_source.sharp, damage_source.edge, damage_source)
|
||||
else
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.incoming_healing_percent))
|
||||
@@ -175,7 +175,7 @@
|
||||
amount *= M.incoming_damage_percent
|
||||
if(!isnull(M.incoming_fire_damage_percent))
|
||||
amount *= M.incoming_fire_damage_percent
|
||||
O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
|
||||
O.take_damage(0, amount, damage_source.sharp, damage_source.edge, damage_source)
|
||||
else
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.incoming_healing_percent))
|
||||
|
||||
@@ -441,14 +441,13 @@ emp_act
|
||||
|
||||
var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
|
||||
if(armor < 100)
|
||||
apply_damage(throw_damage, dtype, zone, armor, soaked, is_sharp(O), has_edge(O), O)
|
||||
apply_damage(throw_damage, dtype, zone, armor, soaked, O.sharp, O.edge, O)
|
||||
|
||||
|
||||
//thrown weapon embedded object code.
|
||||
if(dtype == BRUTE && istype(O,/obj/item))
|
||||
var/obj/item/I = O
|
||||
if (!is_robot_module(I))
|
||||
var/sharp = is_sharp(I)
|
||||
var/damage = throw_damage
|
||||
if (soaked)
|
||||
damage -= soaked
|
||||
@@ -456,12 +455,11 @@ emp_act
|
||||
damage /= armor+1
|
||||
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3)
|
||||
var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class
|
||||
|
||||
var/embed_chance = I.sharp ? damage/I.w_class : damage/(I.w_class*3)
|
||||
var/embed_threshold = I.sharp ? 5*I.w_class : 15*I.w_class
|
||||
//Sharp objects will always embed if they do enough damage.
|
||||
//Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold
|
||||
if((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
if((I.sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
affecting.embed(I)
|
||||
|
||||
// Begin BS12 momentum-transfer code.
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
//Armor
|
||||
var/soaked = get_armor_soak(def_zone, P.check_armour, P.armor_penetration)
|
||||
var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration)
|
||||
var/proj_sharp = is_sharp(P)
|
||||
var/proj_edge = has_edge(P)
|
||||
var/proj_sharp = P.sharp
|
||||
var/proj_edge = P.edge
|
||||
|
||||
if ((proj_sharp || proj_edge) && (soaked >= round(P.damage*0.8)))
|
||||
proj_sharp = 0
|
||||
@@ -246,8 +246,8 @@
|
||||
if(!effective_force || blocked >= 100)
|
||||
return 0
|
||||
//Apply weapon damage
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
var/weapon_edge = has_edge(I)
|
||||
var/weapon_sharp = I.sharp
|
||||
var/weapon_edge = I.edge
|
||||
|
||||
if(getsoak(hit_zone, "melee",) - (I.armor_penetration/5) > round(effective_force*0.8)) //soaking a hit turns sharp attacks into blunt ones
|
||||
weapon_sharp = 0
|
||||
@@ -282,7 +282,7 @@
|
||||
var/soaked = get_armor_soak(null, "melee")
|
||||
|
||||
|
||||
apply_damage(throw_damage, dtype, null, armor, soaked, is_sharp(O), has_edge(O), O)
|
||||
apply_damage(throw_damage, dtype, null, armor, soaked, O.sharp, O.edge, O)
|
||||
|
||||
O.throwing = 0 //it hit, so stop moving
|
||||
|
||||
|
||||
@@ -760,14 +760,14 @@ var/list/ai_verbs_default = list(
|
||||
var/obj/item/device/aicard/card = W
|
||||
card.grab_ai(src, user)
|
||||
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(user == deployed_shell)
|
||||
to_chat(user, "<span class='notice'>The shell's subsystems resist your efforts to tamper with your bolts.</span>")
|
||||
return
|
||||
if(anchored)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message("<font color='blue'>\The [user] starts to unbolt \the [src] from the plating...</font>")
|
||||
if(!do_after(user,40 * W.toolspeed))
|
||||
if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message("<font color='blue'>\The [user] decides not to unbolt \the [src].</font>")
|
||||
return
|
||||
user.visible_message("<font color='blue'>\The [user] finishes unfastening \the [src]!</font>")
|
||||
@@ -776,7 +776,7 @@ var/list/ai_verbs_default = list(
|
||||
else
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message("<font color='blue'>\The [user] starts to bolt \the [src] to the plating...</font>")
|
||||
if(!do_after(user,40 * W.toolspeed))
|
||||
if(!do_after(user,40 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message("<font color='blue'>\The [user] decides not to bolt \the [src].</font>")
|
||||
return
|
||||
user.visible_message("<font color='blue'>\The [user] finishes fastening down \the [src]!</font>")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(src.cable)
|
||||
if(get_dist(src, src.cable) > 1)
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='red'>The data cable rapidly retracts back into its spool.</font>", 3, "<font color='red'>You hear a click and the sound of wire spooling rapidly.</font>", 2)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
src.silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes
|
||||
to_chat(src, "<font color=green><b>Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.</b></font>")
|
||||
if(prob(20))
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("<font color='red'>A shower of sparks spray from [src]'s inner workings.</font>", 3, "<font color='red'>You hear and smell the ozone hiss of electrical sparks being expelled violently.</font>", 2)
|
||||
return src.death(0)
|
||||
|
||||
@@ -178,7 +178,7 @@ var/list/mob_hat_cache = list()
|
||||
to_chat(user, "<span class='danger'>\The [src] is not compatible with \the [W].</span>")
|
||||
return
|
||||
|
||||
else if (W.is_crowbar())
|
||||
else if (W.get_tool_quality(TOOL_CROWBAR))
|
||||
to_chat(user, "<span class='danger'>\The [src] is hermetically sealed. You can't open the case.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("<font color='red'>[user] has fixed some of the burnt wires on [src]!</font>"), 1)
|
||||
|
||||
else if (W.is_crowbar() && user.a_intent != I_HURT) // crowbar means open or close the cover
|
||||
else if (W.get_tool_quality(TOOL_CROWBAR) && user.a_intent != I_HURT) // crowbar means open or close the cover
|
||||
if(opened)
|
||||
if(cell)
|
||||
to_chat(user, "You close the cover.")
|
||||
@@ -617,26 +617,26 @@
|
||||
C.brute_damage = 0
|
||||
C.electronics_damage = 0
|
||||
|
||||
else if (W.is_wirecutter() || istype(W, /obj/item/device/multitool))
|
||||
else if (W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL))
|
||||
if (wiresexposed)
|
||||
wires.Interact(user)
|
||||
else
|
||||
to_chat(user, "You can't reach the wiring.")
|
||||
|
||||
else if(W.is_screwdriver() && opened && !cell) // haxing
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && opened && !cell) // haxing
|
||||
wiresexposed = !wiresexposed
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
updateicon()
|
||||
|
||||
else if(W.is_screwdriver() && opened && cell) // radio
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && opened && cell) // radio
|
||||
if(radio)
|
||||
radio.attackby(W,user)//Push it to the radio to let it handle everything
|
||||
else
|
||||
to_chat(user, "Unable to locate a radio.")
|
||||
updateicon()
|
||||
|
||||
else if(W.is_wrench() && opened && !cell)
|
||||
else if(W.get_tool_quality(TOOL_WRENCH) && opened && !cell)
|
||||
if(bolt)
|
||||
to_chat(user,"You begin removing \the [bolt].")
|
||||
|
||||
|
||||
@@ -2,7 +2,4 @@
|
||||
gib_on_butchery = TRUE
|
||||
|
||||
/mob/living/simple_mob/can_butcher(var/mob/user, var/obj/item/I) // Override for special butchering checks.
|
||||
. = ..()
|
||||
|
||||
if(. && (!is_sharp(I) || !has_edge(I)))
|
||||
return FALSE
|
||||
return ..() && I.sharp && I.edge
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
|
||||
projectile_dam_type = BRUTE
|
||||
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased.
|
||||
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
|
||||
apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, P.sharp, P.edge, P)
|
||||
return -1 //Doesn't reflect non-beams or non-energy projectiles. They just smack and drop with little to no effect.
|
||||
else
|
||||
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
|
||||
@@ -74,7 +74,7 @@
|
||||
if(!(P.damage_type == BRUTE || P.damage_type == BURN))
|
||||
projectile_dam_type = BURN
|
||||
incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased.
|
||||
apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P)
|
||||
apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, P.sharp, P.edge, P)
|
||||
|
||||
// Find a turf near or on the original location to bounce to
|
||||
if(P.starting)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
try_install_component(user, C)
|
||||
else
|
||||
to_chat(user, "This component is too large for \the [src].")
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
var/list/components = get_all_components()
|
||||
if(components.len)
|
||||
to_chat(user, "Remove all components from \the [src] before disassembling it.")
|
||||
@@ -171,7 +171,7 @@
|
||||
to_chat(user, "You repair \the [src].")
|
||||
return
|
||||
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/list/all_components = get_all_components()
|
||||
if(!all_components.len)
|
||||
to_chat(user, "This device doesn't have any components installed.")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
name = "telescreen"
|
||||
|
||||
/obj/item/modular_computer/telescreen/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(W.is_crowbar())
|
||||
if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
if(anchored)
|
||||
shutdown_computer()
|
||||
anchored = FALSE
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
integrated_object_type = /obj/item/weapon/gun/energy/laser/mounted/augment
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_FOREARM)
|
||||
organ_tag = O_AUG_R_FOREARM
|
||||
@@ -66,7 +66,7 @@
|
||||
integrated_object_type = /obj/item/weapon/portable_scanner
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/hand/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_HAND)
|
||||
organ_tag = O_AUG_R_HAND
|
||||
@@ -110,7 +110,7 @@
|
||||
integrated_object_type = null
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_UPPERARM)
|
||||
organ_tag = O_AUG_R_UPPERARM
|
||||
@@ -166,8 +166,6 @@
|
||||
|
||||
integrated_object_type = null
|
||||
|
||||
toolspeed = 0.8
|
||||
|
||||
var/list/integrated_tools = list(
|
||||
/obj/item/weapon/tool/screwdriver = null,
|
||||
/obj/item/weapon/tool/wrench = null,
|
||||
@@ -211,7 +209,8 @@
|
||||
integrated_tools[path] = new path(src)
|
||||
var/obj/item/I = integrated_tools[path]
|
||||
I.canremove = FALSE
|
||||
I.toolspeed = toolspeed
|
||||
for(var/quality in I.tool_qualities)
|
||||
I.set_tool_quality(quality, TOOL_QUALITY_MEDIOCRE)
|
||||
I.my_augment = src
|
||||
I.name = "integrated [I.name]"
|
||||
|
||||
|
||||
@@ -458,20 +458,11 @@ var/list/organ_cache = list()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/proc/can_butcher(var/obj/item/O, var/mob/living/user)
|
||||
if(butcherable && meat_type)
|
||||
|
||||
if(istype(O, /obj/machinery/gibber)) // The great equalizer.
|
||||
return TRUE
|
||||
|
||||
if(robotic >= ORGAN_ROBOT)
|
||||
if(O.is_screwdriver())
|
||||
return TRUE
|
||||
|
||||
else
|
||||
if(is_sharp(O) && has_edge(O))
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
return (butcherable && meat_type) && ( \
|
||||
istype(O, /obj/machinery/gibber) || \
|
||||
(robotic >= ORGAN_ROBOT && O.get_tool_quality(TOOL_SCREWDRIVER)) || \
|
||||
(O.sharp && O.edge)
|
||||
)
|
||||
|
||||
/obj/item/organ/proc/butcher(var/obj/item/O, var/mob/living/user, var/atom/newtarget)
|
||||
if(robotic >= ORGAN_ROBOT)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/fuel_port/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_crowbar())
|
||||
if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
if(opened)
|
||||
to_chat(user, "<spawn class='notice'>You tightly shut \the [src] door.")
|
||||
playsound(src, 'sound/effects/locker_close.ogg', 25, 0, -3)
|
||||
|
||||
@@ -120,7 +120,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(O.is_multitool() && panel_open)
|
||||
if(O.get_tool_quality(TOOL_MULTITOOL) && panel_open)
|
||||
var/input = sanitize(input(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department))
|
||||
if(!input)
|
||||
to_chat(usr, "No input found. Please hang up and try your call again.")
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
P.loc = src
|
||||
open_animation()
|
||||
SStgui.update_uis(src)
|
||||
else if(P.is_wrench())
|
||||
else if(P.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
else if(P.is_screwdriver())
|
||||
else if(P.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
to_chat(user, "<span class='notice'>You begin taking the [name] apart.</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 10 * P.toolspeed))
|
||||
if(do_after(user, 10 * P.get_tool_speed(TOOL_SCREWDRIVER)))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You take the [name] apart.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 4 )
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(istype(W, /obj/item/weapon/storage))
|
||||
empty_bin(user, W)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
qdel(O)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>")
|
||||
else if(O.is_wrench())
|
||||
else if(O.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(1) // Configure pAI device
|
||||
pda.pai.attack_self(usr)
|
||||
if(2) // Eject pAI device
|
||||
var/turf/T = get_turf_or_move(pda.loc)
|
||||
var/turf/T = get_turf(pda.loc)
|
||||
if(T)
|
||||
pda.pai.loc = T
|
||||
pda.pai = null
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
icon_state = "[base_icon_state][LAZYLEN(notices)]"
|
||||
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/weapon/thing, var/mob/user)
|
||||
if(thing.is_screwdriver())
|
||||
if(thing.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/choice = input("Which direction do you wish to place the noticeboard?", "Noticeboard Offset") as null|anything in list("North", "South", "East", "West")
|
||||
if(choice && Adjacent(user) && thing.loc == user && !user.incapacitated())
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
@@ -103,7 +103,7 @@
|
||||
pixel_x = -32
|
||||
pixel_y = 0
|
||||
return
|
||||
else if(thing.is_wrench())
|
||||
else if(thing.get_tool_quality(TOOL_WRENCH))
|
||||
visible_message(SPAN_WARNING("\The [user] begins dismantling \the [src]."))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 50, src))
|
||||
|
||||
@@ -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.get_tool_quality(TOOL_WRENCH))
|
||||
if(!anchored)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] secures the [src.name] to the floor.", \
|
||||
|
||||
@@ -480,14 +480,14 @@ 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.get_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>")
|
||||
return
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You begin to remove the power control board...") //lpeters - fixed grammar issues //Ner - grrrrrr
|
||||
if(do_after(user, 50 * W.toolspeed))
|
||||
if(do_after(user, 50 * W.get_tool_speed(TOOL_CROWBAR)))
|
||||
if(has_electronics == APC_HAS_ELECTRONICS_WIRED)
|
||||
has_electronics = APC_HAS_ELECTRONICS_NONE
|
||||
if((stat & BROKEN))
|
||||
@@ -504,7 +504,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.get_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
|
||||
@@ -530,7 +530,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.get_tool_quality(TOOL_SCREWDRIVER)) // haxing
|
||||
if(opened)
|
||||
if(cell)
|
||||
to_chat(user, "<span class='warning'>Remove the power cell first.</span>")
|
||||
@@ -586,7 +586,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.get_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>")
|
||||
@@ -594,7 +594,7 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
user.visible_message("<span class='warning'>[user.name] starts dismantling the [src]'s power terminal.</span>", \
|
||||
"You begin to cut the cables...")
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50 * W.toolspeed))
|
||||
if(do_after(user, 50 * W.get_tool_speed(TOOL_WIRECUTTER)))
|
||||
if(terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED)
|
||||
if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
@@ -618,7 +618,7 @@ 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)
|
||||
else if(W.get_tool_quality(TOOL_WELDER) && opened && has_electronics == APC_HAS_ELECTRONICS_NONE && !terminal)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.get_fuel() < 3)
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
|
||||
@@ -627,7 +627,7 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
"You start welding the APC frame...", \
|
||||
"You hear welding.")
|
||||
playsound(src, WT.usesound, 25, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed))
|
||||
if(do_after(user, 50 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
if(emagged || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/material/steel(loc)
|
||||
@@ -685,9 +685,10 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
"You hear a bang!")
|
||||
update_icon()
|
||||
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(istype(user, /mob/living/silicon) || ( \
|
||||
!opened && wiresexposed && ( \
|
||||
W.get_tool_quality(TOOL_MULTITOOL) || W.get_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>")
|
||||
|
||||
@@ -176,7 +176,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
if(!T.is_plating())
|
||||
return
|
||||
|
||||
if(W.is_wirecutter())
|
||||
if(W.get_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>")
|
||||
@@ -510,7 +510,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
stacktype = /obj/item/stack/cable_coil
|
||||
drop_sound = 'sound/items/drop/accessory.ogg'
|
||||
pickup_sound = 'sound/items/pickup/accessory.ogg'
|
||||
tool_qualities = list(TOOL_CABLE_COIL)
|
||||
tool_qualities = list(TOOL_CABLE_COIL = TOOL_QUALITY_STANDARD)
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg
|
||||
name = "cable coil synthesizer"
|
||||
@@ -947,7 +947,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
|
||||
stacktype = null
|
||||
toolspeed = 0.25
|
||||
tool_qualities = list(TOOL_CABLE_COIL = TOOL_QUALITY_GOOD)
|
||||
|
||||
/obj/item/stack/cable_coil/alien/Initialize(var/ml, length = MAXCOIL, var/param_color = null) //There has to be a better way to do this.
|
||||
. = ..()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/structure/cable/ender/attackby(obj/item/W, mob/user)
|
||||
src.add_fingerprint(user)
|
||||
if(W.is_wirecutter())
|
||||
if(W.get_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))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(!T.is_plating())
|
||||
return
|
||||
|
||||
if(W.is_wirecutter())
|
||||
if(W.get_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))
|
||||
|
||||
@@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
cur_assembly = W
|
||||
return
|
||||
|
||||
if(W.is_wrench() || W.is_screwdriver() || W.is_crowbar() || istype(W, /obj/item/weapon/storage/part_replacer))
|
||||
if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_SCREWDRIVER) || W.get_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
|
||||
|
||||
@@ -169,7 +169,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.get_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.", \
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
/obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user)
|
||||
if(!user)
|
||||
return
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, W)
|
||||
opened = !opened
|
||||
else if(W.is_crowbar())
|
||||
else if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
default_deconstruction_crowbar(user, W)
|
||||
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
|
||||
else if(W.get_tool_quality(TOOL_MULTITOOL) || W.get_tool_quality(TOOL_WIRECUTTER))
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/power/grid_checker/attack_hand(mob/user)
|
||||
|
||||
@@ -103,11 +103,11 @@ var/global/list/light_type_cache = list()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
if (W.is_wrench())
|
||||
if (W.get_tool_quality(TOOL_WRENCH))
|
||||
if (src.stage == 1)
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
to_chat(usr, "You begin deconstructing [src].")
|
||||
if (!do_after(usr, 30 * W.toolspeed))
|
||||
if (!do_after(usr, 30 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
return
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
|
||||
user.visible_message("[user.name] deconstructs [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.get_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.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if (src.stage == 2)
|
||||
src.stage = 3
|
||||
src.update_icon()
|
||||
@@ -558,7 +558,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.get_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.")
|
||||
@@ -576,7 +576,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.get_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>")
|
||||
@@ -589,7 +589,7 @@ var/global/list/light_type_cache = list()
|
||||
return
|
||||
|
||||
else
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_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.")
|
||||
|
||||
@@ -71,7 +71,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.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(anchored)
|
||||
@@ -79,14 +79,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.get_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.get_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)
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(!active)
|
||||
if(O.is_wrench())
|
||||
if(O.get_tool_quality(TOOL_WRENCH))
|
||||
if(!anchored)
|
||||
connect_to_network()
|
||||
to_chat(user, "<span class='notice'>You secure the generator to the floor.</span>")
|
||||
|
||||
@@ -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.get_tool_quality(TOOL_CROWBAR))
|
||||
if(P && !src.locked)
|
||||
eject()
|
||||
return 1
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(P)
|
||||
to_chat(user, "<font color='blue'>Remove the phoron tank first.</font>")
|
||||
return 1
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(active)
|
||||
to_chat(user, "Turn off [src] first.")
|
||||
return
|
||||
@@ -171,7 +171,7 @@
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be unwelded from the floor.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(W.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(active)
|
||||
to_chat(user, "Turn off [src] first.")
|
||||
@@ -185,7 +185,7 @@
|
||||
user.visible_message("[user.name] starts to weld [src] to the floor.", \
|
||||
"You start to weld [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
to_chat(user, "You weld [src] to the floor.")
|
||||
@@ -198,7 +198,7 @@
|
||||
user.visible_message("[user.name] starts to cut [src] free from the floor.", \
|
||||
"You start to cut [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
to_chat(user, "You cut [src] free from the floor.")
|
||||
|
||||
@@ -103,7 +103,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.get_tool_quality(TOOL_WRENCH))
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
@@ -122,7 +122,7 @@ 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))
|
||||
else if(W.get_tool_quality(TOOL_WELDER))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
switch(state)
|
||||
if(0)
|
||||
@@ -134,7 +134,7 @@ field_generator power level display
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
to_chat(user, "You weld the field generator to the floor.")
|
||||
@@ -146,7 +146,7 @@ field_generator power level display
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20 * WT.toolspeed))
|
||||
if (do_after(user,20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
to_chat(user, "You cut the [src] free from the floor.")
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(src) qdel(src)
|
||||
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
@@ -29,13 +29,13 @@
|
||||
"You unsecure the [src.name] from the floor.", \
|
||||
"You hear a ratchet.")
|
||||
return
|
||||
if(W.is_screwdriver())
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
panel_open = !panel_open
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>\The [user] adjusts \the [src]'s mechanisms.</span>")
|
||||
if(panel_open && do_after(user, 30))
|
||||
to_chat(user, "<span class='notice'>\The [src] looks like it could be modified.</span>")
|
||||
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
if(panel_open && do_after(user, 80 * W.get_tool_speed(TOOL_SCREWDRIVER))) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='cult'>\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..</span>")
|
||||
else
|
||||
|
||||
@@ -125,13 +125,8 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
. += "It is assembled."
|
||||
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
if(istool(W))
|
||||
if(src.process_tool_hit(W,user))
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
return src.process_tool_hit(W,user) || ..()
|
||||
|
||||
/obj/structure/particle_accelerator/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(master?.active)
|
||||
@@ -197,21 +192,21 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
|
||||
/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user)
|
||||
if(!(O) || !(user))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!ismob(user) || !isobj(O))
|
||||
return 0
|
||||
return FALSE
|
||||
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.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
src.anchored = 1
|
||||
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.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
src.anchored = 0
|
||||
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
|
||||
@@ -223,27 +218,27 @@ 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.get_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.get_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.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
if(temp_state == src.construction_state)//Nothing changed
|
||||
return 0
|
||||
else
|
||||
src.construction_state = temp_state
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
update_icon()
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
src.construction_state = temp_state
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -305,11 +300,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
if(istool(W))
|
||||
if(src.process_tool_hit(W,user))
|
||||
return
|
||||
..()
|
||||
return
|
||||
return src.process_tool_hit(W,user) || ..()
|
||||
|
||||
/obj/machinery/particle_accelerator/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -332,20 +323,20 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
|
||||
/obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user)
|
||||
if(!(O) || !(user))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!ismob(user) || !isobj(O))
|
||||
return 0
|
||||
return FALSE
|
||||
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.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
src.anchored = 1
|
||||
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.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
src.anchored = 0
|
||||
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
|
||||
@@ -357,29 +348,29 @@ 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.get_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.get_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.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
active = 0
|
||||
if(temp_state == src.construction_state)//Nothing changed
|
||||
return 0
|
||||
else
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
if(use_power)
|
||||
update_use_power(USE_POWER_OFF)
|
||||
src.construction_state = temp_state
|
||||
if(src.construction_state >= 3)
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
update_icon()
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
if(src.construction_state < 3)//Was taken apart, update state
|
||||
update_state()
|
||||
if(use_power)
|
||||
update_use_power(USE_POWER_OFF)
|
||||
src.construction_state = temp_state
|
||||
if(src.construction_state >= 3)
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
@@ -71,7 +71,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.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
|
||||
@@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(smeses)
|
||||
stat = 0
|
||||
return FALSE
|
||||
|
||||
else if(W.is_wirecutter() && !building_terminal)
|
||||
else if(W.get_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))
|
||||
@@ -326,7 +326,7 @@ GLOBAL_LIST_EMPTY(smeses)
|
||||
else
|
||||
to_chat(user, "<span class='filter_notice'><span class='notice'>You begin to cut the cables...</span></span>")
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50 * W.toolspeed))
|
||||
if(do_after(user, 50 * W.get_tool_speed(TOOL_WIRECUTTER)))
|
||||
if (prob(50) && electrocute_mob(usr, term.powernet, term))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
|
||||
@@ -328,14 +328,14 @@
|
||||
failure_probability = 0
|
||||
|
||||
// Crowbar - Disassemble the SMES.
|
||||
if(W.is_crowbar())
|
||||
if(W.get_tool_quality(TOOL_CROWBAR))
|
||||
if (terminals.len)
|
||||
to_chat(user, "<span class='warning'>You have to disassemble the terminal first!</span>")
|
||||
return
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='warning'>You begin to disassemble the [src]!</span>")
|
||||
if (do_after(usr, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
|
||||
if (do_after(usr, (100 * cur_coils) * W.get_tool_speed(TOOL_CROWBAR))) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
|
||||
|
||||
if (failure_probability && prob(failure_probability))
|
||||
total_system_failure(failure_probability, user)
|
||||
|
||||
@@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(W.is_crowbar())
|
||||
if(W.get_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))
|
||||
@@ -212,13 +212,13 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
if (!isturf(loc))
|
||||
return 0
|
||||
if(!anchored)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = 1
|
||||
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.get_tool_quality(TOOL_WRENCH))
|
||||
anchored = 0
|
||||
user.visible_message("<span class='notice'>[user] unwrenches the solar assembly from it's place.</span>")
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
@@ -247,7 +247,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.get_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>")
|
||||
@@ -407,7 +407,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.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
|
||||
@@ -50,13 +50,13 @@
|
||||
|
||||
//if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W))
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
return FALSE
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
return FALSE
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
return FALSE
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
return FALSE
|
||||
if(is_wire_tool(W))
|
||||
return wires.Interact(user)
|
||||
return ..()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
if(W.is_crowbar())
|
||||
if(W.get_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))
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(!BB)
|
||||
to_chat(user, "<font color='blue'>There is no bullet in the casing to inscribe anything into.</font>")
|
||||
return
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(I.is_screwdriver())
|
||||
else if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(attached_cell)
|
||||
to_chat(user, "You begin removing \the [attached_cell] from \the [src].")
|
||||
if(do_after(user, 10)) // Faster than doing it by hand
|
||||
|
||||
@@ -250,11 +250,11 @@
|
||||
verbs += /obj/item/weapon/gun/verb/allow_dna
|
||||
return
|
||||
|
||||
if(A.is_screwdriver())
|
||||
if(A.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(dna_lock && attached_lock && !attached_lock.controller_lock)
|
||||
to_chat(user, "<span class='notice'>You begin removing \the [attached_lock] from \the [src].</span>")
|
||||
playsound(src, A.usesound, 50, 1)
|
||||
if(do_after(user, 25 * A.toolspeed))
|
||||
if(do_after(user, 25 * A.get_tool_speed(TOOL_SCREWDRIVER)))
|
||||
to_chat(user, "<span class='notice'>You remove \the [attached_lock] from \the [src].</span>")
|
||||
user.put_in_hands(attached_lock)
|
||||
dna_lock = 0
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell installed.</span>")
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(cell)
|
||||
var/obj/item/C = cell
|
||||
C.loc = get_turf(user)
|
||||
@@ -274,7 +274,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need at least three plastic sheets to complete this task.</span>")
|
||||
return
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(buildstate == 5)
|
||||
to_chat(user, "<span class='notice'>You secure the crossbow's various parts.</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
/obj/item/weapon/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user)
|
||||
if(removable_components)
|
||||
if(thing.is_crowbar())
|
||||
if(thing.get_tool_quality(TOOL_CROWBAR))
|
||||
if(!manipulator)
|
||||
to_chat(user, "<span class='warning'>\The [src] has no manipulator installed.</span>")
|
||||
return
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(thing.is_screwdriver())
|
||||
if(thing.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(!capacitor)
|
||||
to_chat(user, "<span class='warning'>\The [src] has no capacitor installed.</span>")
|
||||
return
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
increment_construction_stage()
|
||||
return
|
||||
|
||||
if(thing.is_screwdriver() && construction_stage >= 9)
|
||||
if(thing.get_tool_quality(TOOL_SCREWDRIVER) && construction_stage >= 9)
|
||||
user.visible_message("<span class='notice'>\The [user] secures \the [src] and finishes it off.</span>")
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/item/weapon/gun/magnetic/coilgun = new(loc)
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
FireModeModify()
|
||||
|
||||
/obj/item/weapon/gun/energy/modular/attackby(obj/item/O, mob/user)
|
||||
if(O.is_screwdriver())
|
||||
if(O.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
to_chat(user, "<span class='notice'>You [assembled ? "disassemble" : "assemble"] the gun.</span>")
|
||||
assembled = !assembled
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
return
|
||||
if(O.is_crowbar())
|
||||
if(O.get_tool_quality(TOOL_CROWBAR))
|
||||
if(assembled == 1)
|
||||
to_chat(user, "<span class='warning'>Disassemble the [src] first!</span>")
|
||||
return
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
. = ..()
|
||||
|
||||
if(locate(/obj/item/hose_connector) in src)
|
||||
if(O.is_wirecutter())
|
||||
if(O.get_tool_quality(TOOL_WIRECUTTER))
|
||||
var/list/available_sockets = list()
|
||||
|
||||
for(var/obj/item/hose_connector/HC in src)
|
||||
|
||||
@@ -76,10 +76,10 @@
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user)
|
||||
if(W.is_wrench())
|
||||
if(W.get_tool_quality(TOOL_WRENCH))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "un" : ""]fasten \the [src].</span>")
|
||||
if (do_after(user, 20 * W.toolspeed))
|
||||
if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
|
||||
user.visible_message(
|
||||
"<span class='notice'>\The [user] [anchored ? "un" : ""]fastens \the [src].</span>",
|
||||
"<span class='notice'>You have [anchored ? "un" : ""]fastened \the [src].</span>",
|
||||
@@ -91,7 +91,7 @@
|
||||
else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge))
|
||||
add_cartridge(W, user)
|
||||
|
||||
else if(W.is_screwdriver())
|
||||
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges
|
||||
if(!label) return
|
||||
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (W.is_wrench())
|
||||
if (W.get_tool_quality(TOOL_WRENCH))
|
||||
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
|
||||
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
|
||||
modded = modded ? 0 : 1
|
||||
@@ -265,7 +265,7 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_wrench())
|
||||
if(I.get_tool_quality(TOOL_WRENCH))
|
||||
src.add_fingerprint(user)
|
||||
if(bottle)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
@@ -283,14 +283,14 @@
|
||||
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
|
||||
else
|
||||
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
|
||||
if(do_after(user, 20 * I.toolspeed, src))
|
||||
if(do_after(user, 20 * I.get_tool_speed(TOOL_WRENCH), src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
||||
anchored = !anchored
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
return
|
||||
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(cupholder)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You take the cup dispenser off.</span>")
|
||||
@@ -305,7 +305,7 @@
|
||||
if(!bottle && !cupholder)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start taking the water-cooler apart.</span>")
|
||||
if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder)
|
||||
if(do_after(user, 20 * I.get_tool_speed(TOOL_SCREWDRIVER)) && !bottle && !cupholder)
|
||||
to_chat(user, "<span class='notice'>You take the water-cooler apart.</span>")
|
||||
new /obj/item/stack/material/plastic( src.loc, 4 )
|
||||
qdel(src)
|
||||
|
||||
@@ -141,18 +141,18 @@
|
||||
|
||||
/obj/machinery/pump/attackby(obj/item/weapon/W, mob/user)
|
||||
. = TRUE
|
||||
if(W.is_screwdriver() && !open)
|
||||
if(W.get_tool_quality(TOOL_SCREWDRIVER) && !open)
|
||||
to_chat(user, SPAN_NOTICE("You [unlocked ? "screw" : "unscrew"] the battery panel."))
|
||||
unlocked = !unlocked
|
||||
|
||||
else if(W.is_crowbar() && unlocked)
|
||||
else if(W.get_tool_quality(TOOL_CROWBAR) && unlocked)
|
||||
to_chat(user, open ? \
|
||||
"<span class='notice'>You crowbar the battery panel in place.</span>" : \
|
||||
"<span class='notice'>You remove the battery panel.</span>" \
|
||||
)
|
||||
open = !open
|
||||
|
||||
else if(W.is_wrench())
|
||||
else if(W.get_tool_quality(TOOL_WRENCH))
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>\The [src] is active. Turn it off before trying to move it!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(D.is_wirecutter())
|
||||
else if(D.get_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(user, "<span class='notice'>You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.</span>")
|
||||
user.put_in_hands(new /obj/item/clothing/head/helmet/bucket)
|
||||
user.drop_from_inventory(src)
|
||||
|
||||
@@ -275,14 +275,14 @@
|
||||
if(default_deconstruction_screwdriver(user, I))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
if(I.get_tool_quality(TOOL_WELDER))
|
||||
if(panel_open)
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "The welding tool must be on to complete this task.")
|
||||
return
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 20 * WT.toolspeed))
|
||||
if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 2 )
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
var/obj/structure/disposalpipe/CP = locate() in T
|
||||
|
||||
// wrench: (un)anchor
|
||||
if(I.is_wrench())
|
||||
if(I.get_tool_quality(TOOL_WRENCH))
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
if(ispipe)
|
||||
@@ -285,13 +285,13 @@
|
||||
update()
|
||||
|
||||
// weldingtool: convert to real pipe
|
||||
else if(istype(I, /obj/item/weapon/weldingtool))
|
||||
else if(I.get_tool_quality(TOOL_WELDER))
|
||||
if(anchored)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
to_chat(user, "Welding the [nicetype] in place.")
|
||||
if(do_after(user, 20 * W.toolspeed))
|
||||
if(do_after(user, 20 * W.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !W.isOn()) return
|
||||
to_chat(user, "The [nicetype] has been welded in place!")
|
||||
update() // TODO: Make this neat
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if(mode<=0) // It's off
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(contents.len > 0)
|
||||
to_chat(user, "Eject the items first!")
|
||||
return
|
||||
@@ -70,7 +70,7 @@
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "You attach the screws around the power connection.")
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/weldingtool) && mode==-1)
|
||||
else if(I.get_tool_quality(TOOL_WELDER) && mode==-1)
|
||||
if(contents.len > 0)
|
||||
to_chat(user, "Eject the items first!")
|
||||
return
|
||||
@@ -79,7 +79,7 @@
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
to_chat(user, "You start slicing the floorweld off the disposal unit.")
|
||||
|
||||
if(do_after(user,20 * W.toolspeed))
|
||||
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !W.isOn()) return
|
||||
to_chat(user, "You sliced the floorweld off the disposal unit.")
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
@@ -1554,7 +1554,7 @@
|
||||
if(!I || !user)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
if(mode==0)
|
||||
mode=1
|
||||
to_chat(user, "You remove the screws around the power connection.")
|
||||
@@ -1565,12 +1565,12 @@
|
||||
to_chat(user, "You attach the screws around the power connection.")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/weldingtool) && mode==1)
|
||||
else if(I.get_tool_quality(TOOL_WELDER) && mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
to_chat(user, "You start slicing the floorweld off the disposal outlet.")
|
||||
if(do_after(user,20 * W.toolspeed))
|
||||
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !W.isOn()) return
|
||||
to_chat(user, "You sliced the floorweld off the disposal outlet.")
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
|
||||
@@ -430,19 +430,19 @@
|
||||
if(!I || !user)
|
||||
return
|
||||
|
||||
if(I.is_screwdriver())
|
||||
if(I.get_tool_quality(TOOL_SCREWDRIVER))
|
||||
c_mode = !c_mode
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "You [c_mode ? "remove" : "attach"] the screws around the power connection.")
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && c_mode==1)
|
||||
if(I.get_tool_quality(TOOL_WELDER) && c_mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(!W.remove_fuel(0,user))
|
||||
to_chat(user, "You need more welding fuel to complete this task.")
|
||||
return
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "You start slicing the floorweld off the delivery chute.")
|
||||
if(do_after(user,20 * W.toolspeed))
|
||||
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
|
||||
if(!src || !W.isOn()) return
|
||||
to_chat(user, "You sliced the floorweld off the delivery chute.")
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user