Merge branch 'master' into cynosure_map

This commit is contained in:
atermonera
2022-01-25 20:17:56 -08:00
541 changed files with 3542 additions and 3828 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ LINEN BINS
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
if(I.sharp)
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
if(do_after(user, 50))
to_chat(user, "<span class='notice'>You cut [src] into pieces!</span>")
+1 -1
View File
@@ -83,7 +83,7 @@
if(WT.isOn() && WT.remove_fuel(0, user))
deconstruct(user)
return
if(C.is_crowbar() && plated_tile)
if(C.get_tool_quality(TOOL_CROWBAR) && plated_tile)
hatch_open = !hatch_open
if(hatch_open)
playsound(src, 'sound/items/Crowbar.ogg', 100, 2)
@@ -23,8 +23,8 @@
//then open it in a populated area to crash clients.
var/storage_cost = 40 //How much space this closet takes up if it's stuffed in another closet
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/open_sound = 'sound/machines/closet/closet_open.ogg'
var/close_sound = 'sound/machines/closet/closet_close.ogg'
var/store_misc = 1 //Chameleon item check
var/store_items = 1 //Will the closet store items?
@@ -277,13 +277,13 @@
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
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 * 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
@@ -332,7 +332,7 @@
else if(seal_tool)
if(istype(W, seal_tool))
var/obj/item/weapon/S = W
if(istype(S, /obj/item/weapon/weldingtool))
if(S.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = S
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
@@ -340,7 +340,7 @@
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
if(do_after(user, 20 * S.toolspeed))
if(do_after(user, 20 * S.get_tool_speed(TOOL_WELDER)))
playsound(src, S.usesound, 50)
sealed = !sealed
update_icon()
@@ -6,6 +6,8 @@
icon_state = "closed_unlocked"
seal_tool = /obj/item/weapon/tool/screwdriver
breakout_sound = 'sound/weapons/tablehit1.ogg'
open_sound = 'sound/machines/closet/crate_open.ogg'
close_sound = 'sound/machines/closet/crate_close.ogg'
closet_appearance = null // Special icon for us
door_anim_time = 0 //Unsupported
@@ -68,11 +70,11 @@
/obj/structure/closet/grave/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/shovel))
if(W.get_tool_quality(TOOL_SHOVEL))
user.visible_message("<span class='notice'>[user] piles dirt into \the [src.name].</span>", \
"<span class='notice'>You start to pile dirt into \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] pats down the dirt on top of \the [src.name].</span>", \
"<span class='notice'>You finish filling in \the [src.name].</span>")
close()
@@ -104,12 +106,12 @@
if(W)
W.forceMove(src.loc)
else
if(istype(W, /obj/item/weapon/shovel))
if(W.get_tool_quality(TOOL_SHOVEL))
if(user.a_intent == I_HURT) // Hurt intent means you're trying to kill someone, or just get rid of the grave
user.visible_message("<span class='notice'>[user] begins to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You start to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] finishes smoothing out \the [src.name].</span>", \
"<span class='notice'>You finish smoothing out \the [src.name].</span>")
if(LAZYLEN(contents))
@@ -125,7 +127,7 @@
user.visible_message("<span class='notice'>[user] begins to unearth \the [src.name].</span>", \
"<span class='notice'>You start to unearth \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] reaches the bottom of \the [src.name].</span>", \
"<span class='notice'>You finish digging out \the [src.name].</span>")
break_open()
@@ -2,6 +2,8 @@
name = "booze closet"
req_access = list(access_bar)
closet_appearance = /decl/closet_appearance/cabinet/secure
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 10)
@@ -200,6 +200,8 @@
desc = "Store psychology tools and medicines in here."
req_access = list(access_psychiatrist)
closet_appearance = /decl/closet_appearance/cabinet/secure
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/clothing/under/rank/psych,
@@ -27,6 +27,8 @@
/obj/structure/closet/secure_closet/personal/cabinet
closet_appearance = /decl/closet_appearance/cabinet/secure
door_anim_time = 0 //Unsupported
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/weapon/storage/backpack/satchel/withwallet,
@@ -58,7 +60,7 @@
to_chat(user, "<span class='warning'>Access Denied</span>")
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -54,13 +54,13 @@
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
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 * 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
@@ -85,7 +85,7 @@
W.forceMove(loc)
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -224,6 +224,8 @@
req_access = list(access_forensics_lockers)
closet_appearance = /decl/closet_appearance/cabinet/secure
door_anim_time = 0 //Unsupported
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/clothing/accessory/badge/holo/detective,
@@ -40,6 +40,8 @@
/obj/structure/closet/wardrobe/detective
name = "detective wardrobe"
closet_appearance = /decl/closet_appearance/cabinet
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/clothing/head/det = 2,
@@ -441,6 +443,8 @@
/obj/structure/closet/wardrobe/captain
name = "site manager's wardrobe"
closet_appearance = /decl/closet_appearance/cabinet
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/weapon/storage/backpack/captain,
@@ -8,6 +8,8 @@
climbable = 1
dir = 4 //Spawn facing 'forward' by default.
door_anim_time = 0 //Unsupported until appropriate sprites are available
open_sound = 'sound/machines/closet/crate_open.ogg'
close_sound = 'sound/machines/closet/crate_close.ogg'
var/points_per_crate = 5
var/rigged = 0
@@ -27,13 +29,13 @@
if(isliving(usr))
var/mob/living/L = usr
if(L.electrocute_act(17, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
if(usr.stunned)
return 2
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
playsound(src, open_sound, 15, 1, -3)
for(var/obj/O in src)
O.forceMove(get_turf(src))
src.opened = 1
@@ -49,7 +51,7 @@
if(!src.can_close())
return 0
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
playsound(src, close_sound, 15, 1, -3)
var/itemcount = 0
for(var/obj/O in get_turf(src))
if(itemcount >= storage_capacity)
@@ -113,7 +115,7 @@
user.drop_item()
W.forceMove(src)
return
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
if(rigged)
to_chat(user , "<span class='notice'>You cut away the wiring.</span>")
playsound(src, W.usesound, 100, 1)
@@ -25,7 +25,7 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_crowbar())
if(W.get_tool_quality(TOOL_CROWBAR))
new /obj/item/stack/material/wood(src)
for(var/atom/movable/AM in contents)
@@ -48,7 +48,7 @@
icon_state = "vehiclecrate"
/obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_crowbar())
if(W.get_tool_quality(TOOL_CROWBAR))
var/obj/item/mecha_parts/mecha_equipment/ME
var/obj/mecha/working/hoverpod/H = new (loc)
@@ -31,11 +31,11 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src))
if(W.get_tool_quality(TOOL_WRENCH) && do_after(user, 60 * W.get_tool_speed(TOOL_WRENCH), src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins loosening \the [src]'s bolts.</span>")
if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src))
if(W.get_tool_quality(TOOL_WIRECUTTER) && do_after(user, 70 * W.get_tool_speed(TOOL_WIRECUTTER), src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins cutting \the [src]'s bolts.</span>")
+1 -1
View File
@@ -38,7 +38,7 @@
layer = OBJ_LAYER
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(P.is_wirecutter())
if(P.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to cut the shower curtains.</span>")
if(do_after(user, 10))
+13 -13
View File
@@ -172,13 +172,13 @@
rename_door(user)
return
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
if(W.get_tool_quality(TOOL_WELDER) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0, user))
playsound(src, WT.usesound, 50, 1)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40 * WT.toolspeed))
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
var/M = text2path("/obj/item/stack/material/[glass]")
@@ -186,14 +186,14 @@
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40 * WT.toolspeed))
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40 * WT.toolspeed))
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
new /obj/item/stack/material/steel(src.loc, 4)
@@ -202,19 +202,19 @@
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
return
else if(W.is_wrench() && state == 0)
else if(W.get_tool_quality(TOOL_WRENCH) && state == 0)
playsound(src, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
else
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
else if(W.get_tool_quality(TOOL_CABLE_COIL) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
@@ -225,11 +225,11 @@
src.state = 1
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(W.is_wirecutter() && state == 1 )
else if(W.get_tool_quality(TOOL_WIRECUTTER) && state == 1 )
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER)))
if(!src) return
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -247,7 +247,7 @@
src.state = 2
src.electronics = W
else if(W.is_crowbar() && state == 2 )
else if(W.get_tool_quality(TOOL_CROWBAR) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
@@ -257,7 +257,7 @@
playsound(src, W.usesound, 100, 1)
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR)))
if(!src) return
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
src.state = 1
@@ -289,11 +289,11 @@
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
glass = material_name
else if(W.is_screwdriver() && state == 2 )
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && state == 2 )
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER)))
if(!src) return
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
var/path
@@ -12,7 +12,7 @@
return
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(src, W.usesound, 50, 1)
C.set_dir(dir)
@@ -61,7 +61,7 @@
A.updateicon()
flick("echair1", src)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(12, 1, src)
s.start()
if(has_buckled_mobs())
+2 -2
View File
@@ -29,11 +29,11 @@
to_chat(user, "<span class='notice'>You place [O] in [src].</span>")
else
opened = !opened
if(O.is_wrench())
if(O.get_tool_quality(TOOL_WRENCH))
if(!has_extinguisher)
to_chat(user, "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>")
playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
if(do_after(user, 15 * O.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You unwrench the extinguisher cabinet.</span>")
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
+2 -2
View File
@@ -69,7 +69,7 @@
return ..()
/obj/structure/fence/attackby(obj/item/W, mob/user)
if(W.is_wirecutter())
if(W.get_tool_quality(TOOL_WIRECUTTER))
if(!cuttable)
to_chat(user, span("warning", "This section of the fence can't be cut."))
return
@@ -85,7 +85,7 @@
span("danger", "You start cutting through \the [src] with \the [W]."))
playsound(src, W.usesound, 50, 1)
if(do_after(user, CUT_TIME * W.toolspeed, target = src))
if(do_after(user, CUT_TIME * W.get_tool_speed(TOOL_WIRECUTTER), target = src))
if(current_stage == hole_size)
switch(++hole_size)
if(MEDIUM_HOLE)
+4 -4
View File
@@ -30,10 +30,10 @@
// hasaxe = 1
if (isrobot(user) || locked)
if(istype(O, /obj/item/device/multitool))
if(O.get_tool_quality(TOOL_MULTITOOL))
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20 * O.toolspeed))
if(do_after(user, 20 * O.get_tool_speed(TOOL_MULTITOOL)))
locked = 0
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
update_icon()
@@ -75,7 +75,7 @@
else
if(smashed)
return
if(istype(O, /obj/item/device/multitool))
if(O.get_tool_quality(TOOL_MULTITOOL))
if(open)
open = 0
update_icon()
@@ -84,7 +84,7 @@
else
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
playsound(src, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20 * O.toolspeed))
if(do_after(user,20 * O.get_tool_speed(TOOL_MULTITOOL)))
locked = 1
to_chat(user, "<span class = 'caution'> You re-enable the locking modules.</span>")
return
+1 -1
View File
@@ -33,7 +33,7 @@
var/list/qualifiers = list("with ease", "without any trouble", "with great effort")
/obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, 'sound/items/Deconstruct.ogg', 75, 1)
weight = ((weight) % qualifiers.len) + 1
to_chat(user, "You set the machine's weight level to [weight].")
+15 -15
View File
@@ -145,24 +145,24 @@
reinforce_girder()
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_wrench() && state == 0)
if(W.get_tool_quality(TOOL_WRENCH) && state == 0)
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(do_after(user, (35 + round(max_health/50)) * W.get_tool_speed(TOOL_WRENCH)))
if(!src) return
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now securing the girder...</span>")
if(do_after(user, 40 * W.toolspeed, src))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH), src))
to_chat(user, "<span class='notice'>You secured the girder!</span>")
reset_girder()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
if(do_after(user,30 * W.toolspeed))
if(do_after(user, 30 * W.get_tool_speed(TOOL_WELDER))) // TODO: Welding tool usage checks
if(!src) return
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
dismantle()
@@ -171,11 +171,11 @@
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
dismantle()
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER)))
if(!src) return
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
state = 1
@@ -184,20 +184,20 @@
reinforcing = !reinforcing
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
else if(W.is_wirecutter() && state == 1)
else if(W.get_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now removing support struts...</span>")
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER)))
if(!src) return
to_chat(user, "<span class='notice'>You removed the support struts!</span>")
reinf_material.place_dismantled_product(get_turf(src))
reinf_material = null
reset_girder()
else if(W.is_crowbar() && state == 0 && anchored)
else if(W.get_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now dislodging the girder...</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR)))
if(!src) return
to_chat(user, "<span class='notice'>You dislodged the girder!</span>")
displace()
@@ -240,7 +240,7 @@
to_chat(user, "<span class='notice'>You begin adding the plating...</span>")
if(!do_after(user,40) || !S.use(amount_to_use))
if(!do_after(user, 40) || !S.use(amount_to_use))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
@@ -274,7 +274,7 @@
return 0
to_chat(user, "<span class='notice'>Now reinforcing...</span>")
if (!do_after(user,40) || !S.use(1))
if (!do_after(user, 40) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, "<span class='notice'>You added reinforcement!</span>")
@@ -338,16 +338,16 @@
qdel(src)
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
if(do_after(user,40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
if(do_after(user,30 * W.toolspeed))
if(do_after(user, 30 * W.get_tool_speed(TOOL_WELDER))) // TODO: #8284 welding tool usage
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
dismantle()
+5 -5
View File
@@ -51,25 +51,25 @@
return 1
/obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER)))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER)))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
return
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].")
dismantle()
..()
+3 -3
View File
@@ -94,12 +94,12 @@
return
if(istype(W, /obj/item/weapon/rcd)) // To stop us from hitting the grille when building windows, because grilles don't let parent handle it properly.
return FALSE
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
if(!shock(user, 100))
playsound(src, W.usesound, 100, 1)
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
qdel(src)
else if((W.is_screwdriver()) && (istype(loc, /turf/simulated) || anchored))
else if((W.get_tool_quality(TOOL_SCREWDRIVER)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(src, W.usesound, 100, 1)
anchored = !anchored
@@ -196,7 +196,7 @@
if(electrocute_mob(user, C, src))
if(C.powernet)
C.powernet.trigger_warning()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
if(user.stunned)
+14 -15
View File
@@ -50,7 +50,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/reagent_containers/glass/rag) || istype(I, /obj/item/weapon/soap))
if (mybucket)
if(mybucket)
if(I.reagents.total_volume < I.reagents.maximum_volume)
if(mybucket.reagents.total_volume < 1)
to_chat(user, "<span class='notice'>[mybucket] is empty!</span>")
@@ -62,47 +62,47 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
to_chat(user, "<span class='notice'>[I] can't absorb anymore liquid!</span>")
else
to_chat(user, "<span class='notice'>There is no bucket mounted here to dip [I] into!</span>")
return 1
return TRUE
else if (istype(I, /obj/item/weapon/reagent_containers/glass/bucket) && mybucket)
I.afterattack(mybucket, usr, 1)
update_icon()
return 1
return TRUE
else if(istype(I, /obj/item/weapon/reagent_containers/spray) && !myspray)
user.unEquip(I, 0, src)
user.drop_from_inventory(I, src)
myspray = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return 1
return TRUE
else if(istype(I, /obj/item/device/lightreplacer) && !myreplacer)
user.unEquip(I, 0, src)
user.drop_from_inventory(I, src)
myreplacer = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return 1
return TRUE
else if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag)
user.unEquip(I, 0, src)
user.drop_from_inventory(I, src)
mybag = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return 1
return TRUE
else if(istype(I, /obj/item/clothing/suit/caution))
if(signs < 4)
user.unEquip(I, 0, src)
user.drop_from_inventory(I, src)
signs++
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
else
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
return 1
return TRUE
else if(mybag)
return mybag.attackby(I, user)
@@ -110,12 +110,11 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
//This prevents dumb stuff like splashing the cart with the contents of a container, after putting said container into trash
else if (!has_items)
if (I.is_wrench())
if (I.get_tool_quality(TOOL_WRENCH))
if (do_after(user, 5 SECONDS, src))
dismantle(user)
return
..()
return TRUE
return ..()
//New Altclick functionality!
//Altclick the cart with a mop to stow the mop away
+1
View File
@@ -19,6 +19,7 @@
if(LAT != src)
crash_with("Found multiple lattices at '[log_info_line(loc)]'")
return INITIALIZE_HINT_QDEL
icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
+3 -3
View File
@@ -50,15 +50,15 @@
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
if(!glass)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
if(do_after(user, 20 * I.get_tool_speed(TOOL_WRENCH)))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
new /obj/item/frame/mirror( src.loc )
qdel(src)
return
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
if(shattered && glass)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
icon_state = "mirror_frame"
+3 -3
View File
@@ -343,11 +343,11 @@
song.interact(user)
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
if(O.is_wrench())
if(O.get_tool_quality(TOOL_WRENCH))
if(anchored)
playsound(src, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to loosen \the [src]'s casters...</span>")
if (do_after(user, 40 * O.toolspeed))
if (do_after(user, 40 * O.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
@@ -356,7 +356,7 @@
else
playsound(src, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to tighten \the [src] to the floor...</span>")
if (do_after(user, 20 * O.toolspeed))
if (do_after(user, 20 * O.get_tool_speed(TOOL_WRENCH)))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
+2 -2
View File
@@ -17,10 +17,10 @@
)
/obj/structure/plasticflaps/attackby(obj/item/P, mob/user)
if(P.is_wirecutter())
if(P.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to cut the plastic flaps.</span>")
if(do_after(user, 10 * P.toolspeed))
if(do_after(user, 10 * P.get_tool_speed(TOOL_WIRECUTTER)))
to_chat(user, "<span class='notice'>You cut the plastic flaps.</span>")
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 4
@@ -61,7 +61,7 @@
/obj/machinery/door/blast/puzzle/attackby(obj/item/weapon/C as obj, mob/user as mob)
if(istype(C, /obj/item/weapon))
if(C.pry == 1 && (user.a_intent != I_HURT || (stat & BROKEN)))
if(C.get_tool_quality(TOOL_CROWBAR) && (user.a_intent != I_HURT || (stat & BROKEN)))
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
+2 -2
View File
@@ -199,7 +199,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(W.is_wrench() && !anchored)
if(W.get_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
@@ -218,7 +218,7 @@
return
// Install
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fasten \the [src].</span>" )
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
+2 -2
View File
@@ -14,9 +14,9 @@
return
/obj/structure/salvageable/attackby(obj/item/I, mob/user)
if(I.is_crowbar())
if(I.get_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 50, 1)
var/actual_time = I.toolspeed * 170
var/actual_time = I.get_tool_speed(TOOL_CROWBAR) * 170
user.visible_message( \
"<span class='notice'>\The [user] begins salvaging from \the [src].</span>", \
"<span class='notice'>You start salvaging from \the [src].</span>")
+2 -2
View File
@@ -21,7 +21,7 @@
return
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
if(tool.is_screwdriver() && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double))
if(tool.get_tool_quality(TOOL_SCREWDRIVER) && !istype(src, /obj/structure/sign/scenery) && !istype(src, /obj/structure/sign/double))
playsound(src, tool.usesound, 50, 1)
to_chat(user, "You unfasten the sign with your [tool].")
var/obj/item/sign/S = new(src.loc)
@@ -42,7 +42,7 @@
var/sign_state = ""
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
if(tool.is_screwdriver() && isturf(user.loc))
if(tool.get_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc))
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
if(direction == "Cancel") return
var/obj/structure/sign/S = new(user.loc)
+1 -2
View File
@@ -127,9 +127,8 @@
/obj/structure/simple_door/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
visible_message("<span class='danger'>[user] starts digging [src]!</span>")
if(do_after(user,digTool.digspeed*hardness) && src)
if(do_after(user,40 / W.get_tool_quality(TOOL_MINING) * hardness) && src)
visible_message("<span class='danger'>[user] finished digging [src]!</span>")
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
@@ -87,7 +87,7 @@
return
/obj/structure/bed/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, 50, 1)
dismantle()
qdel(src)
@@ -118,7 +118,7 @@
add_padding(padding_type)
return
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
@@ -218,7 +218,7 @@
return
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() || istype(W,/obj/item/stack) || W.is_wirecutter())
if(W.get_tool_quality(TOOL_WRENCH) || istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER))
return
else if(istype(W,/obj/item/roller_holder))
if(has_buckled_mobs())
@@ -140,7 +140,7 @@
return
/obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || W.is_wirecutter())
if(istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER))
return
..()
@@ -240,7 +240,7 @@
color = WOOD_COLOR_CHOCOLATE
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || W.is_wirecutter())
if(istype(W,/obj/item/stack) || W.get_tool_quality(TOOL_WIRECUTTER))
return
..()
@@ -110,7 +110,7 @@ var/global/list/stool_cache = list() //haha stool
qdel(src)
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
dismantle()
qdel(src)
@@ -140,7 +140,7 @@ var/global/list/stool_cache = list() //haha stool
to_chat(user, "You add padding to \the [src].")
add_padding(padding_type)
return
else if (W.is_wirecutter())
else if (W.get_tool_quality(TOOL_WIRECUTTER))
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
@@ -56,9 +56,9 @@
L.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() || W.is_wirecutter() || istype(W,/obj/item/stack))
return
..()
if(W.get_tool_quality(TOOL_WRENCH) || W.get_tool_quality(TOOL_WIRECUTTER) || istype(W,/obj/item/stack))
return TRUE
return ..()
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
// Redundant check?
@@ -73,7 +73,7 @@
phorontanks++
else
full = TRUE
else if(I.is_wrench())
else if(I.get_tool_quality(TOOL_WRENCH))
if(anchored)
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
anchored = 0
+3 -3
View File
@@ -45,7 +45,7 @@
icon_state = "[initial(icon_state)][open][cistern]"
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(I.is_crowbar())
if(I.get_tool_quality(TOOL_CROWBAR))
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>")
playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
@@ -204,11 +204,11 @@
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob)
if(I.type == /obj/item/device/analyzer)
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>")
playsound(src, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
if(do_after(user, 50 * I.get_tool_speed(TOOL_WRENCH)))
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
@@ -86,13 +86,13 @@
switch(state)
if("01")
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
if(W.get_tool_quality(TOOL_WELDER) && !anchored )
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed))
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
if(secure)
@@ -104,30 +104,32 @@
to_chat(user,"<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>")
return
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
if(W.is_wrench() && !anchored)
if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = 1
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(W.is_wrench() && anchored)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = 0
step = null
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
if(!anchored)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
if(!src)
return
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = TRUE
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
if(do_after(user, 40 * W.get_tool_speed(TOOL_WRENCH)))
if(!src)
return
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = FALSE
step = null
//Adding cable to the assembly. Step 5 complete.
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
else if(W.get_tool_quality(TOOL_CABLE_COIL) && anchored)
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
var/obj/item/stack/cable_coil/CC = W
@@ -142,12 +144,13 @@
if("02")
//Removing wire from the assembly. Step 5 undone.
if(W.is_wirecutter() && !src.electronics)
if(W.get_tool_quality(TOOL_WIRECUTTER) && !src.electronics)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40 * W.toolspeed))
if(!src) return
if(do_after(user, 40 * W.get_tool_speed(TOOL_WIRECUTTER)))
if(!src)
return
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
new/obj/item/stack/cable_coil(get_turf(user), 1)
@@ -171,12 +174,13 @@
W.loc = src.loc
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(W.is_screwdriver() && src.electronics)
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && src.electronics)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
if(do_after(user, 40 * W.toolspeed))
if(!src || !src.electronics) return
if(do_after(user, 40 * W.get_tool_speed(TOOL_SCREWDRIVER)))
if(!src || !src.electronics)
return
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
step = 1
var/obj/item/weapon/airlock_electronics/ae = electronics
@@ -184,7 +188,7 @@
ae.loc = src.loc
//Crowbar to complete the assembly, Step 7 complete.
else if(W.is_crowbar())
else if(W.get_tool_quality(TOOL_CROWBAR))
if(!src.electronics)
to_chat(usr,"<span class='warning'>The assembly is missing electronics.</span>")
return
@@ -195,9 +199,9 @@
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
if(do_after(user, 40 * W.toolspeed))
if(!src) return
if(do_after(user, 40 * W.get_tool_speed(TOOL_CROWBAR)))
if(!src)
return
density = 1 //Shouldn't matter but just incase
to_chat(user,"<span class='notice'>You finish the windoor!</span>")
+7 -7
View File
@@ -223,13 +223,13 @@
if(!istype(W)) return//I really wish I did not need this
// Fixing.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
if(W.get_tool_quality(TOOL_WELDER) && user.a_intent == I_HELP)
var/obj/item/weapon/weldingtool/WT = W
if(health < maxhealth)
if(WT.remove_fuel(1 ,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed, target = src))
if(do_after(user, 40 * WT.get_tool_speed(TOOL_WELDER), target = src))
health = maxhealth
// playsound(src, 'sound/items/Welder.ogg', 50, 1)
update_icon()
@@ -265,7 +265,7 @@
if(W.flags & NOBLUDGEON) return
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
@@ -283,11 +283,11 @@
update_verbs()
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.</span>")
else if(W.is_crowbar() && reinf && state <= 1)
else if(W.get_tool_quality(TOOL_CROWBAR) && reinf && state <= 1)
state = 1 - state
playsound(src, W.usesound, 75, 1)
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
else if(W.is_wrench() && !anchored && (!state || !reinf))
else if(W.get_tool_quality(TOOL_WRENCH) && !anchored && (!state || !reinf))
if(!glasstype)
to_chat(user, "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>")
else
@@ -297,7 +297,7 @@
if(is_fulltile())
mats.amount = 4
qdel(src)
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
else if(W.get_tool_quality(TOOL_CABLE_COIL) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
var/obj/item/stack/cable_coil/C = W
if (C.use(1))
playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
@@ -305,7 +305,7 @@
"<span class='notice'>\The [user] begins to wire \the [src] for electrochromic tinting.</span>", \
"<span class='notice'>You begin to wire \the [src] for electrochromic tinting.</span>", \
"You hear sparks.")
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
if(do_after(user, 20 * C.get_tool_speed(TOOL_CABLE_COIL), src) && state == 0)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())