mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
POWER TOOLS TAKE 2. (#20923)
New power tools for the CE! It's like goof's golden tools but less memey and makes more sense, power tools are much faster than normal tools and take the place of two. Hand drill, activate to switch between between screwdriver bit and bolt bit (screwdriver/wrench) Jaws of life, activate to switch between a cutting head and prying head, can also open powered doors like a xeno. Cutting head cuts your head off if you suicide with them. I wanted to make the prying head gib your head but i couldn't figure it out. Reworked how construction handles sounds and added a new "usesound" var to obj/items. This is useful if you want to add another tool or item that makes a send when it's being used. Also useful if you want to replace a sound for an item or if you have an item with a choice of sounds (like if you have two versions of a sound sound you want to play) CE now gets a unique white tool belt, exactly the same as a regular tool belt, just a re-skin. CE also spawns with the new power tools and an experimental welder, CE will be the ONLY one to spawn with these tools, might make him a more valuable target for traitors. I figured this would be acceptable considering most heads are not antag enabled (i think) Also i added a welding tool sound for reasons... figured might as well add some more sounds while i was reworking it.
This commit is contained in:
@@ -631,14 +631,14 @@
|
||||
switch(buildstage)
|
||||
if(2)
|
||||
if(istype(W, /obj/item/weapon/wirecutters) && panel_open && wires.is_all_cut())
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You cut the final wires.</span>"
|
||||
new /obj/item/stack/cable_coil(loc, 5)
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
user << "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>"
|
||||
update_icon()
|
||||
@@ -660,7 +660,7 @@
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
user.visible_message("[user.name] removes the electronics from [src.name].",\
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
if (do_after(user, 20/W.toolspeed, target = src))
|
||||
if (buildstage == 1)
|
||||
user <<"<span class='notice'>You remove the air alarm electronics.</span>"
|
||||
@@ -701,7 +701,7 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You detach \the [src] from the wall.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
new /obj/item/wallframe/airalarm( user.loc )
|
||||
qdel(src)
|
||||
return
|
||||
@@ -730,4 +730,4 @@
|
||||
if(!disassembled)
|
||||
I.obj_integrity = I.max_integrity * 0.5
|
||||
new /obj/item/stack/cable_coil(loc, 3)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
var/new_setting = "Heater"
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(build_path == initial(heater.build_path))
|
||||
newtype = freezer
|
||||
new_setting = "Freezer"
|
||||
|
||||
@@ -29,7 +29,7 @@ Chief Engineer
|
||||
name = "Chief Engineer"
|
||||
|
||||
id = /obj/item/weapon/card/id/silver
|
||||
belt = /obj/item/weapon/storage/belt/utility/full
|
||||
belt = /obj/item/weapon/storage/belt/utility/chief/full
|
||||
l_pocket = /obj/item/device/pda/heads/ce
|
||||
ears = /obj/item/device/radio/headset/heads/ce
|
||||
uniform = /obj/item/clothing/under/rank/chief_engineer
|
||||
@@ -125,4 +125,4 @@ Atmospheric Technician
|
||||
dufflebag = /obj/item/weapon/storage/backpack/dufflebag/engineering
|
||||
box = /obj/item/weapon/storage/box/engineer
|
||||
pda_slot = slot_l_store
|
||||
backpack_contents = list(/obj/item/device/modular_computer/tablet/preset/advanced=1)
|
||||
backpack_contents = list(/obj/item/device/modular_computer/tablet/preset/advanced=1)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
if(8)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
user << "<span class='notice'>You start attaching the gun to the frame...</span>"
|
||||
sleep(40)
|
||||
@@ -460,4 +460,4 @@
|
||||
overlays -= "hs_arm"
|
||||
new /obj/item/bodypart/l_arm/robot(get_turf(src))
|
||||
user << "<span class='notice'>You remove the robot arm from [src].</span>"
|
||||
build_step--
|
||||
build_step--
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && storedcutter)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
user << "<span class='notice'>\The [storedcutter] has been [cuttersecured ? "unsecured" : "secured"].</span>"
|
||||
cuttersecured = !cuttersecured
|
||||
return
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
if (terminal)
|
||||
user << "<span class='warning'>Disconnect the wires first!</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You are trying to remove the power control board...</span>" //lpeters - fixed grammar issues
|
||||
if(do_after(user, 50/W.toolspeed, target = src))
|
||||
if (has_electronics==1)
|
||||
@@ -430,12 +430,12 @@
|
||||
if (has_electronics==1 && terminal)
|
||||
has_electronics = 2
|
||||
stat &= ~MAINT
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You screw the circuit electronics into place.</span>"
|
||||
else if (has_electronics==2)
|
||||
has_electronics = 1
|
||||
stat |= MAINT
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You unfasten the electronics.</span>"
|
||||
else /* has_electronics==0 */
|
||||
user << "<span class='warning'>There is nothing to secure!</span>"
|
||||
|
||||
@@ -190,7 +190,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
if(GRAV_NEEDS_SCREWDRIVER)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You secure the screws of the framework.</span>"
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
broken_state++
|
||||
update_icon()
|
||||
return
|
||||
@@ -220,7 +220,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
if(GRAV_NEEDS_WRENCH)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You secure the plating to the framework.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
set_fix()
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
usr << "<span class='notice'>You begin deconstructing [src]...</span>"
|
||||
if (!do_after(usr, 30/W.toolspeed, target = src))
|
||||
return
|
||||
@@ -102,13 +102,13 @@
|
||||
new /obj/item/stack/cable_coil(get_turf(loc), 1, "red")
|
||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||
"<span class='notice'>You remove the wiring from [src].</span>", "<span class='italics'>You hear clicking.</span>")
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] closes [src]'s casing.", \
|
||||
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
switch(fixture_type)
|
||||
if("tube")
|
||||
newlight = new /obj/machinery/light/built(loc)
|
||||
@@ -328,7 +328,7 @@
|
||||
// attempt to stick weapon into light socket
|
||||
else if(status == LIGHT_EMPTY)
|
||||
if(istype(W, /obj/item/weapon/screwdriver)) //If it's a screwdriver open it.
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] opens [src]'s casing.", \
|
||||
"<span class='notice'>You open [src]'s casing.</span>", "<span class='italics'>You hear a noise.</span>")
|
||||
deconstruct()
|
||||
|
||||
@@ -241,7 +241,7 @@ display round(lastgen) and plasmatank amount
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
panel_open = !panel_open
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>You open the access panel.</span>"
|
||||
else
|
||||
|
||||
@@ -212,10 +212,10 @@
|
||||
anchored = !anchored
|
||||
if(anchored)
|
||||
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
else
|
||||
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
|
||||
@@ -277,7 +277,7 @@
|
||||
var/lastgen = 0
|
||||
var/track = 0 // 0= off 1=timed 2=auto (tracker)
|
||||
var/trackrate = 600 // 300-900 seconds
|
||||
var/nexttime = 0 // time for a panel to rotate of 1° in manual tracking
|
||||
var/nexttime = 0 // time for a panel to rotate of 1 degree in manual tracking
|
||||
var/obj/machinery/power/tracker/connected_tracker = null
|
||||
var/list/connected_panels = list()
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
|
||||
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20/I.toolspeed, target = src))
|
||||
if (src.stat & BROKEN)
|
||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||
@@ -474,9 +474,9 @@
|
||||
connected_tracker.unset_control()
|
||||
|
||||
if(track==1 && trackrate) //manual tracking and set a rotation speed
|
||||
if(nexttime <= world.time) //every time we need to increase/decrease the angle by 1°...
|
||||
if(nexttime <= world.time) //every time we need to increase/decrease the angle by 1�...
|
||||
targetdir = (targetdir + trackrate/abs(trackrate) + 360) % 360 //... do it
|
||||
nexttime += 36000/abs(trackrate) //reset the counter for the next 1°
|
||||
nexttime += 36000/abs(trackrate) //reset the counter for the next 1�
|
||||
|
||||
//rotates the panel to the passed angle
|
||||
/obj/machinery/power/solar_control/proc/set_panels(currentdir)
|
||||
|
||||
@@ -696,11 +696,11 @@
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(mode==0)
|
||||
mode=1
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user << "<span class='notice'>You remove the screws around the power connection.</span>"
|
||||
else if(mode==1)
|
||||
mode=0
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user << "<span class='notice'>You attach the screws around the power connection.</span>"
|
||||
|
||||
else if(istype(I,/obj/item/weapon/weldingtool) && mode==1)
|
||||
|
||||
@@ -505,6 +505,25 @@ datum/design/diagnostic_hud_night
|
||||
build_path = /obj/item/clothing/glasses/science
|
||||
category = list("Equipment")
|
||||
|
||||
/datum/design/handdrill
|
||||
name = "Hand Drill"
|
||||
desc = "A small electric hand drill with an interchangable screwdriver and bolt bit"
|
||||
id = "handdrill"
|
||||
req_tech = list("materials" = 4, "engineering" = 6)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 3500, MAT_SILVER = 1500, MAT_TITANIUM = 2500)
|
||||
build_path = /obj/item/weapon/screwdriver/power
|
||||
category = list("Equipment")
|
||||
|
||||
/datum/design/jawsoflife
|
||||
name = "Jaws of Life"
|
||||
desc = "A small, compact Jaws of Life with an interchangable pry jaws and cutting jaws"
|
||||
id = "jawsoflife"
|
||||
req_tech = list("materials" = 4, "engineering" = 6, "magnets" = 6) // added one more requirment since the Jaws of Life are a bit OP
|
||||
build_path = /obj/item/weapon/crowbar/power
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 4500, MAT_SILVER = 2500, MAT_TITANIUM = 3500)
|
||||
|
||||
/datum/design/diskplantgene
|
||||
name = "Plant data disk"
|
||||
desc = "A disk for storing plant genetic data."
|
||||
|
||||
Reference in New Issue
Block a user