Merge pull request #6695 from Markolie/toolz

Tool overhaul
This commit is contained in:
Fox McCloud
2017-03-09 01:43:18 -05:00
committed by GitHub
242 changed files with 2123 additions and 1258 deletions
+2 -2
View File
@@ -170,13 +170,13 @@ Pipelines + Other Objects -> Pipe network
var/unsafe_wrenching = FALSE
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if(internal_pressure > 2*ONE_ATMOSPHERE)
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
unsafe_wrenching = TRUE //Oh dear oh dear
if(do_after(user, 40, target = src) && isnull(gcDestroyed))
if(do_after(user, 40 * W.toolspeed, target = src) && isnull(gcDestroyed))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You have unfastened \the [src].</span>", \
@@ -107,9 +107,9 @@
to_chat(user, "<span class='danger'>You cannot unwrench [src], it is too exerted due to internal pressure.</span>")
add_fingerprint(user)
return 1
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You have unfastened \the [src].</span>", \
@@ -325,9 +325,9 @@
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
@@ -345,13 +345,15 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(!welded)
if(open)
to_chat(user, "<span class='notice'> Now closing the vent.</span>")
if(do_after(user, 20, target = src))
to_chat(user, "<span class='notice'>Now closing the vent.</span>")
if(do_after(user, 20 * W.toolspeed, target = src))
playsound(loc, W.usesound, 100, 1)
open = 0
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
else
to_chat(user, "<span class='notice'> Now opening the vent.</span>")
if(do_after(user, 20, target = src))
to_chat(user, "<span class='notice'>Now opening the vent.</span>")
if(do_after(user, 20 * W.toolspeed, target = src))
playsound(loc, W.usesound, 100, 1)
open = 1
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
return
@@ -375,9 +375,9 @@
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
playsound(get_turf(src), WT.usesound, 50, 1)
if(!welded)
user.visible_message("[user] welds the scrubber shut.", "You weld the vent scrubber.", "You hear welding.")
welded = 1
@@ -46,17 +46,20 @@
if(istype(used_atom, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = used_atom
if(W.remove_fuel(0, user))
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
playsound(holder, W.usesound, 50, 1)
else
return 0
else if(istype(used_atom, /obj/item/weapon/wrench))
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
var/obj/item/weapon/wrench/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/screwdriver))
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/item/weapon/screwdriver/S = used_atom
playsound(holder, S.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/wirecutters))
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
var/obj/item/weapon/wirecutters/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
@@ -65,7 +68,7 @@
return 0
else
C.use(4)
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(holder, C.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
+1 -1
View File
@@ -23,7 +23,7 @@
targets -= T
playsound(get_turf(src), cast_sound, 50, 1)
if(do_after(user,delay, target = user))
if(do_after(user, delay, target = user))
for(var/i=0,i<summon_amt,i++)
if(!targets.len)
break
+39
View File
@@ -6,6 +6,7 @@
/datum/wires/airlock
holder_type = /obj/machinery/door/airlock
wire_count = 12
window_x = 410
window_y = 570
var/const/AIRLOCK_WIRE_IDSCAN = 1
@@ -21,6 +22,44 @@ var/const/AIRLOCK_WIRE_SAFETY = 512
var/const/AIRLOCK_WIRE_SPEED = 1024
var/const/AIRLOCK_WIRE_LIGHT = 2048
/datum/wires/airlock/GetWireName(index)
switch(index)
if(AIRLOCK_WIRE_IDSCAN)
return "ID Scan"
if(AIRLOCK_WIRE_MAIN_POWER1)
return "Primary Power"
if(AIRLOCK_WIRE_MAIN_POWER2)
return "Secondary Power"
if(AIRLOCK_WIRE_DOOR_BOLTS)
return "Door Bolts"
if(AIRLOCK_WIRE_BACKUP_POWER1)
return "Primary Backup Power"
if(AIRLOCK_WIRE_BACKUP_POWER2)
return "Secondary Backup Power"
if(AIRLOCK_WIRE_OPEN_DOOR)
return "Door State"
if(AIRLOCK_WIRE_AI_CONTROL)
return "AI Control"
if(AIRLOCK_WIRE_ELECTRIFY)
return "Electrification"
if(AIRLOCK_WIRE_ELECTRIFY)
return "Door Safeties"
if(AIRLOCK_WIRE_ELECTRIFY)
return "Door Timing"
if(AIRLOCK_WIRE_ELECTRIFY)
return "Bolt Lights"
/datum/wires/airlock/CanUse(mob/living/L)
var/obj/machinery/door/airlock/A = holder
if(!issilicon(L))
+16
View File
@@ -9,6 +9,22 @@ var/const/AALARM_WIRE_SYPHON = 4
var/const/AALARM_WIRE_AI_CONTROL = 8
var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/GetWireName(index)
switch(index)
if(AALARM_WIRE_IDSCAN)
return "ID Scan"
if(AALARM_WIRE_POWER)
return "Power"
if(AALARM_WIRE_SYPHON)
return "Syphon"
if(AALARM_WIRE_AI_CONTROL)
return "AI Control"
if(AALARM_WIRE_AALARM)
return "Atmospherics Alarm"
/datum/wires/alarm/CanUse(mob/living/L)
var/obj/machinery/alarm/A = holder
+14
View File
@@ -7,6 +7,20 @@ var/const/APC_WIRE_MAIN_POWER1 = 2
var/const/APC_WIRE_MAIN_POWER2 = 4
var/const/APC_WIRE_AI_CONTROL = 8
/datum/wires/apc/GetWireName(index)
switch(index)
if(APC_WIRE_IDSCAN)
return "ID Scan"
if(APC_WIRE_MAIN_POWER1)
return "Primary Power"
if(APC_WIRE_MAIN_POWER2)
return "Secondary Power"
if(APC_WIRE_AI_CONTROL)
return "AI Control"
/datum/wires/apc/get_status()
. = ..()
var/obj/machinery/power/apc/A = holder
+11
View File
@@ -6,6 +6,17 @@ var/const/AUTOLATHE_HACK_WIRE = 1
var/const/AUTOLATHE_SHOCK_WIRE = 2
var/const/AUTOLATHE_DISABLE_WIRE = 4
/datum/wires/autolathe/GetWireName(index)
switch(index)
if(AUTOLATHE_HACK_WIRE)
return "Hack"
if(AUTOLATHE_SHOCK_WIRE)
return "Shock"
if(AUTOLATHE_DISABLE_WIRE)
return "Disable"
/datum/wires/autolathe/get_status()
. = ..()
var/obj/machinery/autolathe/A = holder
+20
View File
@@ -26,6 +26,26 @@ var/const/CAMERA_WIRE_ALARM = 8
var/const/CAMERA_WIRE_NOTHING1 = 16
var/const/CAMERA_WIRE_NOTHING2 = 32
/datum/wires/camera/GetWireName(index)
switch(index)
if(CAMERA_WIRE_FOCUS)
return "Focus"
if(CAMERA_WIRE_POWER)
return "Power"
if(CAMERA_WIRE_LIGHT)
return "Light"
if(CAMERA_WIRE_ALARM)
return "Alarm"
if(CAMERA_WIRE_NOTHING1)
return "Nothing"
if(CAMERA_WIRE_NOTHING2)
return "Nothing"
/datum/wires/camera/UpdateCut(index, mended)
var/obj/machinery/camera/C = holder
+6 -1
View File
@@ -3,6 +3,11 @@
var/const/WIRE_EXPLODE = 1
/datum/wires/explosive/GetWireName(index)
switch(index)
if(WIRE_EXPLODE)
return "Explode"
/datum/wires/explosive/proc/explode()
return
@@ -22,7 +27,7 @@ var/const/WIRE_EXPLODE = 1
/datum/wires/explosive/gibtonite
holder_type = /obj/item/weapon/twohanded/required/gibtonite
/datum/wires/explosive/gibtonite/CanUse(mob/living/L)
/datum/wires/explosive/gibtonite/CanUse(mob/L)
return 1
/datum/wires/explosive/gibtonite/UpdateCut(index, mended)
+30
View File
@@ -2,6 +2,7 @@
random = 1
holder_type = /mob/living/simple_animal/bot/mulebot
wire_count = 10
window_x = 410
var/const/WIRE_POWER1 = 1 // power connections
var/const/WIRE_POWER2 = 2
@@ -13,6 +14,35 @@ var/const/WIRE_REMOTE_RX = 64 // remote recv functions
var/const/WIRE_REMOTE_TX = 128 // remote trans status
var/const/WIRE_BEACON_RX = 256 // beacon ping recv
/datum/wires/mulebot/GetWireName(index)
switch(index)
if(WIRE_POWER1)
return "Primary Power"
if(WIRE_POWER2)
return "Secondary Power"
if(WIRE_AVOIDANCE)
return "Mob Avoidance"
if(WIRE_LOADCHECK)
return "Load Checking"
if(WIRE_MOTOR1)
return "Primary Motor"
if(WIRE_MOTOR2)
return "Secondary Motor"
if(WIRE_REMOTE_RX)
return "Remote Signal Receiver"
if(WIRE_REMOTE_TX)
return "Remote Signal Sender"
if(WIRE_BEACON_RX)
return "Navigation Beacon Receiver"
/datum/wires/mulebot/CanUse(mob/living/L)
var/mob/living/simple_animal/bot/mulebot/M = holder
if(M.open)
+11
View File
@@ -7,6 +7,17 @@ var/const/NUCLEARBOMB_WIRE_LIGHT = 1
var/const/NUCLEARBOMB_WIRE_TIMING = 2
var/const/NUCLEARBOMB_WIRE_SAFETY = 4
/datum/wires/nuclearbomb/GetWireName(index)
switch(index)
if(NUCLEARBOMB_WIRE_LIGHT)
return "Bomb Light"
if(NUCLEARBOMB_WIRE_TIMING)
return "Bomb Timing"
if(NUCLEARBOMB_WIRE_SAFETY)
return "Bomb Safety"
/datum/wires/nuclearbomb/CanUse(mob/living/L)
var/obj/machinery/nuclearbomb/N = holder
if(N.panel_open)
+14 -1
View File
@@ -6,7 +6,20 @@ var/const/PARTICLE_TOGGLE_WIRE = 1 // Toggles whether the PA is on or not.
var/const/PARTICLE_STRENGTH_WIRE = 2 // Determines the strength of the PA.
var/const/PARTICLE_INTERFACE_WIRE = 4 // Determines the interface showing up.
var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be.
//var/const/PARTICLE_NOTHING_WIRE = 16 // Blank wire
/datum/wires/particle_acc/control_box/GetWireName(index)
switch(index)
if(PARTICLE_TOGGLE_WIRE)
return "Power Toggle"
if(PARTICLE_STRENGTH_WIRE)
return "Strength"
if(PARTICLE_INTERFACE_WIRE)
return "Interface"
if(PARTICLE_LIMIT_POWER_WIRE)
return "Maximum Power"
/datum/wires/particle_acc/control_box/CanUse(mob/living/L)
var/obj/machinery/particle_accelerator/control_box/C = holder
+11
View File
@@ -6,6 +6,17 @@ var/const/WIRE_SIGNAL = 1
var/const/WIRE_RECEIVE = 2
var/const/WIRE_TRANSMIT = 4
/datum/wires/radio/GetWireName(index)
switch(index)
if(WIRE_SIGNAL)
return "Signal"
if(WIRE_RECEIVE)
return "Receiver"
if(WIRE_TRANSMIT)
return "Transmitter"
/datum/wires/radio/CanUse(mob/living/L)
var/obj/item/device/radio/R = holder
if(R.b_stat)
+17
View File
@@ -19,6 +19,23 @@ var/const/BORG_WIRE_CAMERA = 4
var/const/BORG_WIRE_AI_CONTROL = 8 // Not used on MoMMIs
var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs
/datum/wires/robot/GetWireName(index)
switch(index)
if(BORG_WIRE_MAIN_POWER)
return "Main Power"
if(BORG_WIRE_LOCKED_DOWN)
return "Lockdown"
if(BORG_WIRE_CAMERA)
return "Camera"
if(BORG_WIRE_AI_CONTROL)
return "AI Control"
if(BORG_WIRE_LAWCHECK)
return "Law Check"
/datum/wires/robot/get_status()
. = ..()
var/mob/living/silicon/robot/R = holder
+11
View File
@@ -10,6 +10,17 @@ var/const/SMARTFRIDGE_WIRE_ELECTRIFY = 1
var/const/SMARTFRIDGE_WIRE_THROW = 2
var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
/datum/wires/smartfridge/GetWireName(index)
switch(index)
if(SMARTFRIDGE_WIRE_ELECTRIFY)
return "Electrification"
if(SMARTFRIDGE_WIRE_THROW)
return "Item Throw"
if(SMARTFRIDGE_WIRE_IDSCAN)
return "ID Scan"
/datum/wires/smartfridge/CanUse(mob/living/L)
var/obj/machinery/smartfridge/S = holder
if(!issilicon(L))
+16
View File
@@ -9,6 +9,22 @@ var/const/WIRE_DELAY = 4 // Raises the timer on pulse, does nothing on cut
var/const/WIRE_PROCEED = 8 // Lowers the timer, explodes if cut while the bomb is active
var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if pulsed while already active, will stop a timer a bomb on cut
/datum/wires/syndicatebomb/GetWireName(index)
switch(index)
if(WIRE_BOOM)
return "Explode"
if(WIRE_UNBOLT)
return "Unbolt"
if(WIRE_DELAY)
return "Delay"
if(WIRE_PROCEED)
return "Proceed"
if(WIRE_ACTIVATE)
return "Activate"
/datum/wires/syndicatebomb/CanUse(mob/living/L)
var/obj/machinery/syndicatebomb/P = holder
+14
View File
@@ -9,6 +9,20 @@ var/const/VENDING_WIRE_CONTRABAND = 2
var/const/VENDING_WIRE_ELECTRIFY = 4
var/const/VENDING_WIRE_IDSCAN = 8
/datum/wires/vending/GetWireName(index)
switch(index)
if(VENDING_WIRE_THROW)
return "Item Throw"
if(VENDING_WIRE_CONTRABAND)
return "Contraband"
if(VENDING_WIRE_ELECTRIFY)
return "Electrification"
if(VENDING_WIRE_IDSCAN)
return "ID Scan"
/datum/wires/vending/CanUse(mob/living/L)
var/obj/machinery/vending/V = holder
if(!istype(L, /mob/living/silicon))
+48 -36
View File
@@ -71,7 +71,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
/datum/wires/proc/get_status()
return list()
/datum/wires/proc/Interact(mob/living/user)
/datum/wires/proc/Interact(mob/user)
if(user && istype(user) && holder && CanUse(user))
ui_interact(user)
@@ -81,12 +81,12 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
ui = new(user, src, ui_key, "wires.tmpl", holder.name, window_x, window_y)
ui.open()
/datum/wires/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/datum/wires/ui_data(mob/user, ui_key = "main", datum/topic_state/state = physical_state)
var/data[0]
var/list/W[0]
for(var/colour in wires)
W[++W.len] = list("colour" = capitalize(colour), "cut" = IsColourCut(colour), "attached" = IsAttached(colour))
W[++W.len] = list("colour" = capitalize(colour), "cut" = IsColourCut(colour), "index" = can_see_wire_index(user) ? GetWireName(GetIndex(colour)) : null, "attached" = IsAttached(colour))
if(W.len > 0)
data["wires"] = W
@@ -99,44 +99,53 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
/datum/wires/nano_host()
return holder
/datum/wires/proc/can_see_wire_index(mob/user)
if(user.can_admin_interact())
return TRUE
else if(istype(user.get_active_hand(), /obj/item/device/multitool))
var/obj/item/device/multitool/M = user.get_active_hand()
if(M.shows_wire_information)
return TRUE
return FALSE
/datum/wires/Topic(href, href_list)
if(..())
return 1
if(in_range(holder, usr) && isliving(usr))
var/mob/living/L = usr
if(CanUse(L) && href_list["action"])
var/obj/item/I = L.get_active_hand()
var/colour = lowertext(href_list["wire"])
holder.add_hiddenprint(L)
switch(href_list["action"])
if("cut") // Toggles the cut/mend status
if(istype(I, /obj/item/weapon/wirecutters))
playsound(holder, 'sound/items/Wirecutter.ogg', 20, 1)
CutWireColour(colour)
else
to_chat(L, "<span class='error'>You need wirecutters!</span>")
if("pulse")
if(istype(I, /obj/item/device/multitool))
playsound(holder, 'sound/weapons/empty.ogg', 20, 1)
PulseColour(colour)
else
to_chat(L, "<span class='error'>You need a multitool!</span>")
if("attach")
if(IsAttached(colour))
var/obj/item/O = Detach(colour)
if(O)
L.put_in_hands(O)
else
if(istype(I, /obj/item/device/assembly/signaler))
if(L.drop_item())
Attach(colour, I)
else
to_chat(L, "<span class='warning'>[L.get_active_hand()] is stuck to your hand!</span>")
var/mob/L = usr
if(CanUse(L) && href_list["action"])
var/obj/item/I = L.get_active_hand()
var/colour = lowertext(href_list["wire"])
holder.add_hiddenprint(L)
switch(href_list["action"])
if("cut") // Toggles the cut/mend status
if(istype(I, /obj/item/weapon/wirecutters) || L.can_admin_interact())
if(istype(I))
playsound(holder, I.usesound, 20, 1)
CutWireColour(colour)
else
to_chat(L, "<span class='error'>You need wirecutters!</span>")
if("pulse")
if(istype(I, /obj/item/device/multitool) || L.can_admin_interact())
playsound(holder, 'sound/weapons/empty.ogg', 20, 1)
PulseColour(colour)
else
to_chat(L, "<span class='error'>You need a multitool!</span>")
if("attach")
if(IsAttached(colour))
var/obj/item/O = Detach(colour)
if(O)
L.put_in_hands(O)
else
if(istype(I, /obj/item/device/assembly/signaler))
if(L.drop_item())
Attach(colour, I)
else
to_chat(L, "<span class='error'>You need a remote signaller!</span>")
to_chat(L, "<span class='warning'>[L.get_active_hand()] is stuck to your hand!</span>")
else
to_chat(L, "<span class='error'>You need a remote signaller!</span>")
nanomanager.update_uis(src)
return 1
@@ -155,7 +164,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
if(holder)
nanomanager.update_uis(holder)
/datum/wires/proc/CanUse(mob/living/L)
/datum/wires/proc/CanUse(mob/L)
return 1
/datum/wires/CanUseTopic(mob/user, datum/topic_state/state)
@@ -203,6 +212,9 @@ var/const/POWER = 8
return index
else
CRASH("[colour] is not a key in wires.")
/datum/wires/proc/GetWireName(index)
return
//
// Is Index/Colour Cut procs
@@ -247,9 +247,10 @@
V.flags |= NODROP
agent.equip_to_slot_or_del(V, slot_wear_suit)
agent.equip_to_slot_or_del(new /obj/item/weapon/abductor_baton(agent), slot_in_backpack)
agent.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/decloner/alien(agent), slot_belt)
agent.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/decloner/alien(agent), slot_in_backpack)
agent.equip_to_slot_or_del(new /obj/item/device/abductor/silencer(agent), slot_in_backpack)
agent.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/abductor(agent), slot_head)
agent.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/military/abductor/full(agent), slot_belt)
agent.update_icons()
@@ -547,31 +547,37 @@ Congratulations! You are now trained for xenobiology research!"}
name = "alien scalpel"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/weapon/hemostat/alien
name = "alien hemostat"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/weapon/retractor/alien
name = "alien retractor"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/weapon/circular_saw/alien
name = "alien saw"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/weapon/surgicaldrill/alien
name = "alien drill"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/weapon/cautery/alien
name = "alien cautery"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/clothing/head/helmet/abductor
name = "agent headgear"
@@ -605,9 +611,9 @@ Congratulations! You are now trained for xenobiology research!"}
/obj/structure/abductor_tableframe/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30 * I.toolspeed, target = src))
playsound(src.loc, I.usesound, 50, 1)
new /obj/item/stack/sheet/mineral/abductor(get_turf(src))
qdel(src)
return
@@ -617,7 +623,7 @@ Congratulations! You are now trained for xenobiology research!"}
to_chat(user, "<span class='warning'>You need one alien alloy sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [P] to [src]...</span>")
if(do_after(user, 50, target = src))
if(do_after(user, 50 * I.toolspeed, target = src))
P.use(1)
new /obj/structure/table/abductor(src.loc)
qdel(src)
@@ -51,7 +51,7 @@
return
if(!IsAbductor(user))
to_chat(user, "<span class='warning'>You start mashing alien buttons at random!</span>")
if(do_after(user,100, target = src))
if(do_after(user, 100, target = src))
TeleporterSend()
return
user.set_machine(src)
@@ -322,7 +322,7 @@
to_chat(src, "You slither up [M] and begin probing at their ear canal...")
if(!do_after(src,50, target = M))
if(!do_after(src, 50, target = M))
to_chat(src, "As [M] moves away, you are dislodged and fall to the ground.")
return
@@ -164,7 +164,7 @@
else if(istype(target,/obj/item)) // Eat items just to be annoying
var/obj/item/I = target
if(!I.anchored)
if(do_after(src,20, target = I))
if(do_after(src, 20, target = I))
eat(I)
return
target.attack_animal(src)
+3 -3
View File
@@ -58,12 +58,12 @@ var/bomb_set
panel_open = 1
overlays += image(icon, "npanel_open")
to_chat(user, "You unscrew the control panel of [src].")
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, O.usesound, 50, 1)
else
panel_open = 0
overlays -= image(icon, "npanel_open")
to_chat(user, "You screw the control panel of [src] back on.")
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, O.usesound, 50, 1)
else
if(panel_open == 0)
to_chat(user, "[src] emits a buzzing noise, the panel staying locked in.")
@@ -71,7 +71,7 @@ var/bomb_set
panel_open = 0
overlays -= image(icon, "npanel_open")
to_chat(user, "You screw the control panel of [src] back on.")
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, O.usesound, 50, 1)
flick("nuclearbombc", src)
return
+1 -1
View File
@@ -26,7 +26,7 @@
jobtype = /datum/job/chief_engineer
uniform = /obj/item/clothing/under/rank/chief_engineer
belt = /obj/item/weapon/storage/belt/utility/full
belt = /obj/item/weapon/storage/belt/utility/chief/full
gloves = /obj/item/clothing/gloves/color/black/ce
shoes = /obj/item/clothing/shoes/brown
head = /obj/item/clothing/head/hardhat/white
+2 -2
View File
@@ -65,7 +65,7 @@
var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH)
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in choices
dir = choices[selected]
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
var/node_connect = dir
initialize_directions = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
@@ -224,7 +224,7 @@
var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH)
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in choices
dir = choices[selected]
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
var/node_connect = dir
initialize_directions = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
+2 -2
View File
@@ -139,8 +139,8 @@
qdel(W)
return
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(src.loc, W.usesound, 50, 1)
if(do_after(user, 20 * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You deconstruct the table.</span>")
new /obj/item/stack/sheet/plasteel(loc, 5)
qdel(src)
+2 -2
View File
@@ -312,7 +312,7 @@
else
orient = "RIGHT"
dir = 4
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, G.usesound, 50, 1)
return
if(exchange_parts(user, G))
@@ -519,7 +519,7 @@
if(do_after(user, 20, target = L))
if(src.occupant)
to_chat(user, "<span class='boldnotice'>>The sleeper is already occupied!</span>")
to_chat(user, "<span class='boldnotice'>The sleeper is already occupied!</span>")
return
if(!L) return
L.forceMove(src)
+2 -2
View File
@@ -65,7 +65,7 @@
dir = 8
else
dir = 4
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, G.usesound, 50, 1)
return
if(exchange_parts(user, G))
@@ -293,7 +293,7 @@
dir = 8
else
dir = 4
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, G.usesound, 50, 1)
if(exchange_parts(user, G))
return
+9 -7
View File
@@ -581,9 +581,7 @@
return ui_interact(user)
/obj/machinery/alarm/attack_ghost(user as mob)
if(stat & (BROKEN|MAINT))
return
return ui_interact(user)
return interact(user)
/obj/machinery/alarm/attack_hand(mob/user)
. = ..()
@@ -595,7 +593,7 @@
if(buildstage != 2)
return
if(wiresexposed && !istype(user, /mob/living/silicon/ai))
if(wiresexposed)
wires.Interact(user)
if(!shorted)
@@ -1004,6 +1002,7 @@
return
to_chat(user, "You wire \the [src]!")
playsound(get_turf(src), coil.usesound, 50, 1)
coil.amount -= 5
if(!coil.amount)
qdel(coil)
@@ -1015,8 +1014,8 @@
else if(istype(W, /obj/item/weapon/crowbar))
to_chat(user, "You start prying out the circuit.")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,20, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 20 * W.toolspeed, target = src))
if(buildstage != 1)
return
to_chat(user, "You pry out the circuit!")
@@ -1028,6 +1027,7 @@
if(0)
if(istype(W, /obj/item/weapon/airalarm_electronics))
to_chat(user, "You insert the circuit!")
playsound(get_turf(src), W.usesound, 50, 1)
qdel(W)
buildstage = 1
update_icon()
@@ -1036,7 +1036,7 @@
else if(istype(W, /obj/item/weapon/wrench))
to_chat(user, "You remove the fire alarm assembly from the wall!")
new /obj/item/mounted/frame/alarm_frame(get_turf(user))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
qdel(src)
return 0
@@ -1067,3 +1067,5 @@ Just an object used in constructing air alarms
desc = "Looks like a circuit. Probably is."
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
+2 -2
View File
@@ -75,9 +75,9 @@ obj/machinery/air_sensor
if(bolts)
to_chat(usr, "The [src] is bolted to the floor! You can't detach it like this.")
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "\blue You begin to unfasten \the [src]...")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("[user] unfastens \the [src].", "\blue You have unfastened \the [src].", "You hear ratchet.")
new /obj/item/pipe_gsensor(src.loc)
qdel(src)
+2 -2
View File
@@ -631,9 +631,9 @@ update_flag
// Do after stuff here
to_chat(user, "<span class='notice'>You start to slice away at \the [src]...</span>")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
busy = 1
if(do_after(user, 50, target = src))
if(do_after(user, 50 * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
+2 -2
View File
@@ -123,9 +123,9 @@
if(!istype(W, /obj/item/weapon/wrench))
return ..()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "\blue You begin to unfasten \the [src]...")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
+1 -1
View File
@@ -202,7 +202,7 @@
return
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
return
+2 -2
View File
@@ -69,8 +69,8 @@
return 1
if(istype(W, /obj/item/weapon/wrench))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 30 * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
new/obj/item/mounted/frame/driver_button(get_turf(src))
qdel(src)
+13 -7
View File
@@ -28,6 +28,8 @@
var/alarm_on = 0
var/busy = 0
var/emped = 0 //Number of consecutive EMP's on this camera
var/toggle_message = 'sound/items/Wirecutter.ogg'
/obj/machinery/camera/New()
..()
@@ -107,8 +109,12 @@
/obj/machinery/camera/blob_act()
qdel(src)
return
/obj/machinery/camera/attack_ghost(mob/user)
if(panel_open)
wires.Interact(user)
/obj/machinery/camera/attack_alien(mob/living/carbon/alien/humanoid/user as mob)
/obj/machinery/camera/attack_alien(mob/living/carbon/alien/humanoid/user)
if(!istype(user))
return
user.do_attack_animation(src)
@@ -123,7 +129,7 @@
src.view_range = num
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob, params)
/obj/machinery/camera/attackby(obj/item/W, mob/living/user as mob, params)
var/msg = "<span class='notice'>You attach [W] into the assembly inner circuits.</span>"
var/msg2 = "<span class='notice'>The camera already has that upgrade!</span>"
@@ -134,7 +140,7 @@
panel_open = !panel_open
user.visible_message("<span class='warning'>[user] screws the camera's panel [panel_open ? "open" : "closed"]!</span>",
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open)
wires.Interact(user)
@@ -234,7 +240,7 @@
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(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
playsound(loc, "sparks", 50, 1)
visible_message("<span class='notice'>[user] has sliced the camera apart with an energy blade!</span>")
qdel(src)
@@ -271,7 +277,7 @@
else
visible_message("<span class='danger'>\The [src] [change_msg]!</span>")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, toggle_message, 100, 1)
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
@@ -351,9 +357,9 @@
return 0
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
busy = 1
if(do_after(user, 100, target = src))
if(do_after(user, 100 * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
@@ -26,7 +26,7 @@
if(0)
// State 0
if(iswrench(W) && isturf(src.loc))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user, "You wrench the assembly into place.")
anchored = 1
state = 1
@@ -44,7 +44,7 @@
return
else if(iswrench(W))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user, "You unattach the assembly from it's place.")
anchored = 0
update_icon()
@@ -57,6 +57,7 @@
var/obj/item/stack/cable_coil/C = W
if(C.use(2))
to_chat(user, "<span class='notice'>You add wires to the assembly.</span>")
playsound(loc, W.usesound, 50, 1)
state = 3
else
to_chat(user, "<span class='warning'>You need 2 coils of wire to wire the assembly.</span>")
@@ -74,7 +75,7 @@
if(3)
// State 3
if(isscrewdriver(W))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
if(!input)
@@ -116,7 +117,7 @@
else if(iswirecutter(W))
new/obj/item/stack/cable_coil(get_turf(src), 2)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user, "You cut the wires from the circuits.")
state = 2
return
@@ -137,7 +138,7 @@
var/obj/U = locate(/obj) in upgrades
if(U)
to_chat(user, "You unattach an upgrade from the assembly.")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
U.loc = get_turf(src)
upgrades -= U
return
@@ -162,9 +163,9 @@
return 0
to_chat(user, "<span class='notice'>You start to weld the [src]..</span>")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
busy = 1
if(do_after(user, 20, target = src))
if(do_after(user, 20 * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
+1 -1
View File
@@ -62,7 +62,7 @@
anchored = !anchored
to_chat(user, "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground")
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1)
playsound(get_turf(src), W.usesound, 75, 1)
attack_hand(mob/user)
if(charging)
+1 -1
View File
@@ -382,7 +382,7 @@
connected = null
else
anchored = 1
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
else
+20 -20
View File
@@ -22,8 +22,8 @@
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "\blue You wrench the frame into place.")
anchored = 1
state = 1
@@ -32,33 +32,33 @@
if(!WT.isOn())
to_chat(user, "The welder must be on for this task.")
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(0, user)) return
to_chat(user, "\blue You deconstruct the frame.")
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "\blue You unfasten the frame.")
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You place the circuit board inside the frame.")
icon_state = "1"
circuit = P
user.drop_item()
P.loc = src
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You screw the circuit board into place.")
state = 2
icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You remove the circuit board.")
state = 1
icon_state = "0"
@@ -66,14 +66,14 @@
circuit = null
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You unfasten the circuit board.")
state = 1
icon_state = "1"
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
P:amount -= 5
if(!P:amount) qdel(P)
to_chat(user, "\blue You add cables to the frame.")
@@ -84,7 +84,7 @@
if(brain)
to_chat(user, "Get that brain out of there first")
else
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You remove the cables.")
state = 2
icon_state = "2"
@@ -93,8 +93,8 @@
if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
if(P)
P:amount -= 2
if(!P:amount) qdel(P)
@@ -147,7 +147,7 @@
icon_state = "3b"
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You remove the brain.")
brain.loc = loc
brain = null
@@ -155,7 +155,7 @@
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "\blue You remove the glass panel.")
state = 3
if(brain)
@@ -166,7 +166,7 @@
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(!brain)
var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
@@ -199,7 +199,7 @@
else if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
if(!do_after(user,40, target = src))
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
return
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
@@ -207,7 +207,7 @@
return
else
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
if(!do_after(user,40, target = src))
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
return
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
+35 -33
View File
@@ -29,6 +29,8 @@
var/list/records = null
var/frame_desc = null
var/contain_parts = 1
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/weapon/circuitboard/computer
board_type = "computer"
@@ -354,8 +356,8 @@
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = 1
state = 1
@@ -364,23 +366,23 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>The welding tool must be on to complete this task.</span>")
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/sheet/metal(loc, 5)
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard) && !circuit)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "computer")
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, B.usesound, 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
icon_state = "1"
circuit = P
@@ -389,12 +391,12 @@
else
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = 2
icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = 1
icon_state = "0"
@@ -402,16 +404,16 @@
circuit = null
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
icon_state = "1"
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.amount >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, C.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * C.toolspeed, target = src))
if(state == 2 && C.amount >= 5 && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = 3
@@ -424,7 +426,7 @@
return
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 2
icon_state = "2"
@@ -434,9 +436,9 @@
if(istype(P, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = P
if(G.amount >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, G.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to add the glass panel to the frame.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * G.toolspeed, target = src))
if(state == 3 && G.amount >= 2 && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
state = 4
@@ -449,13 +451,13 @@
return
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3
icon_state = "3"
new /obj/item/stack/sheet/glass(loc, 2)
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/B = new circuit.build_path (loc)
if(circuit.powernet) B:powernet = circuit.powernet
@@ -478,7 +480,7 @@
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20, target = src))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = 1
@@ -488,23 +490,23 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>The welding tool must be on to complete this task.</span>")
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/sheet/mineral/bananium(loc, 5)
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard) && !circuit)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "honkcomputer")
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
icon_state = "1"
circuit = P
@@ -513,12 +515,12 @@
else
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = 2
icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = 1
icon_state = "0"
@@ -526,16 +528,16 @@
circuit = null
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
icon_state = "1"
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.amount >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, C.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * C.toolspeed, target = src))
if(state == 2 && C.amount >= 5 && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = 3
@@ -548,7 +550,7 @@
return
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 2
icon_state = "2"
@@ -558,9 +560,9 @@
if(istype(P, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = P
if(G.amount >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, G.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to add the glass panel to the frame.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * G.toolspeed, target = src))
if(state == 3 && G.amount >= 2 && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
state = 4
@@ -573,13 +575,13 @@
return
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3
icon_state = "3"
new /obj/item/stack/sheet/glass(loc, 2)
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/B = new circuit.build_path (loc)
if(circuit.powernet) B:powernet = circuit.powernet
+6 -5
View File
@@ -101,18 +101,19 @@
text = replacetext(text, "\n", "<BR>")
return text
/obj/machinery/computer/attack_ghost(user as mob)
/obj/machinery/computer/attack_ghost(mob/user)
return attack_hand(user)
/obj/machinery/computer/attack_hand(user as mob)
/obj/machinery/computer/attack_hand(mob/user)
/* Observers can view computers, but not actually use them via Topic*/
if(istype(user, /mob/dead/observer)) return 0
return ..()
/obj/machinery/computer/attackby(I as obj, user as mob, params)
/obj/machinery/computer/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
var/obj/item/weapon/screwdriver/S = I
playsound(src.loc, S.usesound, 50, 1)
if(do_after(user, 20 * S.toolspeed, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
+4 -3
View File
@@ -93,10 +93,11 @@
onclose(user, "honkputer")
/obj/machinery/computer/HONKputer/attackby(I as obj, user as mob, params)
/obj/machinery/computer/HONKputer/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
var/obj/item/weapon/screwdriver/S = I
playsound(src.loc, S.usesound, 50, 1)
if(do_after(user, 20 * S.toolspeed, target = src))
var/obj/structure/computerframe/HONKputer/A = new /obj/structure/computerframe/HONKputer( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
+9 -9
View File
@@ -66,9 +66,9 @@
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, C.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * C.toolspeed, target = src))
if(state == 1 && C.amount >= 5 && C.use(5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
state = 2
@@ -86,13 +86,13 @@
return
G.use(5)
to_chat(user, "<span class='notice'>You add the glass to the frame.</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), G.usesound, 50, 1)
new /obj/structure/displaycase_frame(src.loc)
qdel(src)
return
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, P.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle the frame.</span>")
new /obj/item/stack/sheet/metal(src.loc, 5)
qdel(src)
@@ -100,7 +100,7 @@
if(istype(P, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, B.usesound, 50, 1)
to_chat(user, "<span class='notice'>You add the circuit board to the frame.</span>")
circuit = P
user.drop_item()
@@ -114,7 +114,7 @@
else
to_chat(user, "<span class='danger'>This frame does not accept circuit boards of this type!</span>")
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 1
icon_state = "box_0"
@@ -123,7 +123,7 @@
if(3)
if(istype(P, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
state = 2
circuit.loc = src.loc
circuit = null
@@ -145,7 +145,7 @@
component_check = 0
break
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
new_machine.construction()
for(var/obj/O in new_machine.component_parts)
@@ -190,7 +190,7 @@
for(var/I in req_components)
if(istype(P, I) && (req_components[I] > 0) && (!(P.flags & NODROP) || istype(P, /obj/item/stack)))
success=1
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
if(istype(P, /obj/item/stack))
var/obj/item/stack/S = P
var/camt = min(S.amount, req_components[I])
+3 -3
View File
@@ -66,7 +66,7 @@ for reference:
if(istype(W, stacktype))
if(src.health < src.maxhealth)
visible_message("\red [user] begins to repair the [src]!")
if(do_after(user,20, target = src))
if(do_after(user, 20 * W.toolspeed, target = src))
src.health = src.maxhealth
W:use(1)
visible_message("\red [user] repairs the [src]!")
@@ -77,9 +77,9 @@ for reference:
else if(istype(W, /obj/item/weapon/crowbar))
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>[user] is prying apart \the [src].</span>", "<span class='notice'>You begin to pry apart \the [src].</span>")
playsound(src, 'sound/items/Crowbar.ogg', 200, 1)
playsound(src, W.usesound, 200, 1)
if(do_after(user, 300, target = src) && src && !src.gcDestroyed)
if(do_after(user, 300 * W.toolspeed, target = src) && src && !src.gcDestroyed)
user.visible_message("<span class='notice'>[user] pries apart \the [src].</span>", "<span class='notice'>You pry apart \the [src].</span>")
dismantle()
return
+29 -4
View File
@@ -560,6 +560,8 @@ About the new airlock wires panel:
return
/obj/machinery/door/airlock/attack_ghost(mob/user)
if(p_open)
wires.Interact(user)
ui_interact(user)
/obj/machinery/door/airlock/attack_ai(mob/user)
@@ -793,7 +795,7 @@ About the new airlock wires panel:
update_icon()
return 1
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob, params)
/obj/machinery/door/airlock/attackby(obj/item/C, mob/user as mob, params)
// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user))
if(!istype(usr, /mob/living/silicon))
if(isElectrified())
@@ -828,16 +830,16 @@ About the new airlock wires panel:
else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe) )
else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe))
var/beingcrowbarred = null
if(istype(C, /obj/item/weapon/crowbar) )
beingcrowbarred = 1 //derp, Agouri
else
beingcrowbarred = 0
if( beingcrowbarred && p_open && (operating == -1 || (density && welded && operating != 1 && !arePowerSystemsOn() && !locked)) )
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(loc, C.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40, target = src))
if(do_after(user, 40 * C.toolspeed, target = src))
to_chat(user, "\blue You removed the airlock electronics!")
var/obj/structure/door_assembly/da = new assembly_type(loc)
@@ -871,6 +873,29 @@ About the new airlock wires panel:
qdel(src)
return
else if(istype(C, /obj/item/weapon/crowbar/power))
if(isElectrified())
shock(user, 100)//it's like sticking a fork in a power socket
return
if(!density)//already open
return
if(locked)
to_chat(user, "<span class='warning'>The bolts are down, it won't budge!</span>")
return
if(welded)
to_chat(user, "<span class='warning'>It's welded, it won't budge!</span>")
return
if(arePowerSystemsOn())
var/obj/item/weapon/crowbar/power/P = C
playsound(src, 'sound/machines/airlock_alien_prying.ogg',100,1) //is it aliens or just the CE being a dick?
if(do_after(user, P.airlock_open_time, target = src))
open(2)
if(density && !open(2))
to_chat(user, "<span class='warning'>Despite your attempts, the [src] refuses to open.</span>")
else if(arePowerSystemsOn())
to_chat(user, "\blue The airlock's motors resist your efforts to force it.")
else if(locked)
@@ -14,6 +14,8 @@
var/last_configurator = null
var/locked = TRUE
var/const/max_brain_damage = 60 // Maximum brain damage a mob can have until it can't use the electronics
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/weapon/airlock_electronics/attack_self(mob/user)
if(!ishuman(user) && !isrobot(user))
+32 -30
View File
@@ -64,12 +64,12 @@
if(boltslocked)
to_chat(user, "<span class='notice'>There are screws locking the bolts in place!</span>")
return
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] starts undoing [src]'s bolts...</span>", \
"<span class='notice'>You start unfastening [src]'s floor bolts...</span>")
if(!do_after(user, 50, target = src))
if(!do_after(user, 50 * C.toolspeed, target = src))
return
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src]'s bolts.</span>", \
"<span class='notice'>You undo [src]'s floor bolts.</span>")
deconstruct(TRUE)
@@ -77,7 +77,7 @@
else if(istype(C, /obj/item/weapon/screwdriver))
user.visible_message("<span class='notice'>[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts...</span>", \
"<span class='notice'>You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts...</span>")
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
boltslocked = !boltslocked
return
else
@@ -250,6 +250,8 @@
desc = "A circuit board used in construction of firelocks."
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/structure/firelock_frame
name = "firelock frame"
@@ -287,14 +289,14 @@
switch(constructionStep)
if(CONSTRUCTION_PANEL_OPEN)
if(istype(C, /obj/item/weapon/crowbar))
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] starts prying something out from [src]...</span>", \
"<span class='notice'>You begin prying out the wire cover...</span>")
if(!do_after(user, 50, target = src))
if(!do_after(user, 50 * C.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_PANEL_OPEN)
return
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] pries out a metal plate from [src], exposing the wires.</span>", \
"<span class='notice'>You remove the cover plate from [src], exposing the wires.</span>")
constructionStep = CONSTRUCTION_WIRES_EXPOSED
@@ -304,16 +306,16 @@
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
to_chat(user, "<span class='warning'>There's already a firelock there.</span>")
return
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] starts bolting down [src]...</span>", \
"<span class='notice'>You begin bolting [src]...</span>")
if(!do_after(user, 30, target = src))
if(!do_after(user, 30 * C.toolspeed, target = src))
return
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
return
user.visible_message("<span class='notice'>[user] finishes the firelock.</span>", \
"<span class='notice'>You finish the firelock.</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
if(reinforced)
new /obj/machinery/door/firedoor/heavy(get_turf(src))
else
@@ -330,23 +332,23 @@
return
user.visible_message("<span class='notice'>[user] begins reinforcing [src]...</span>", \
"<span class='notice'>You begin reinforcing [src]...</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 60, target = src))
playsound(get_turf(src), C.usesound, 50, 1)
if(do_after(user, 60 * C.toolspeed, target = src))
if(constructionStep != CONSTRUCTION_PANEL_OPEN || reinforced || P.get_amount() < 2 || !P)
return
user.visible_message("<span class='notice'>[user] reinforces [src].</span>", \
"<span class='notice'>You reinforce [src].</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
P.use(2)
reinforced = 1
return
if(CONSTRUCTION_WIRES_EXPOSED)
if(istype(C, /obj/item/weapon/wirecutters))
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] starts cutting the wires from [src]...</span>", \
"<span class='notice'>You begin removing [src]'s wires...</span>")
if(!do_after(user, 60, target = src))
if(!do_after(user, 60 * C.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
return
@@ -360,14 +362,14 @@
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(1, user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] starts welding a metal plate into [src]...</span>", \
"<span class='notice'>You begin welding the cover plate back onto [src]...</span>")
if(!do_after(user, 80, target = src))
if(!do_after(user, 80 * C.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] welds the metal plate into [src].</span>", \
"<span class='notice'>You weld [src]'s cover plate into place, hiding the wires.</span>")
constructionStep = CONSTRUCTION_PANEL_OPEN
@@ -377,15 +379,15 @@
if(istype(C, /obj/item/weapon/crowbar))
user.visible_message("<span class='notice'>[user] begins removing the circuit board from [src]...</span>", \
"<span class='notice'>You begin prying out the circuit board from [src]...</span>")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
if(!do_after(user, 50, target = src))
playsound(get_turf(src), C.usesound, 50, 1)
if(!do_after(user, 50 * C.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_GUTTED)
return
user.visible_message("<span class='notice'>[user] removes [src]'s circuit board.</span>", \
"<span class='notice'>You remove the circuit board from [src].</span>")
new /obj/item/weapon/firelock_electronics(get_turf(src))
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
constructionStep = CONSTRUCTION_NOCIRCUIT
update_icon()
return
@@ -396,13 +398,13 @@
return
user.visible_message("<span class='notice'>[user] begins wiring [src]...</span>", \
"<span class='notice'>You begin adding wires to [src]...</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 60, target = src))
playsound(get_turf(src), B.usesound, 50, 1)
if(do_after(user, 60 * B.toolspeed, target = src))
if(constructionStep != CONSTRUCTION_GUTTED || B.get_amount() < 5 || !B)
return
user.visible_message("<span class='notice'>[user] adds wires to [src].</span>", \
"<span class='notice'>You wire [src].</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), B.usesound, 50, 1)
B.use(5)
constructionStep = CONSTRUCTION_WIRES_EXPOSED
update_icon()
@@ -411,16 +413,16 @@
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(1,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
"<span class='notice'>You begin slicing [src] apart...</span>")
if(!do_after(user, 80, target = src))
if(!do_after(user, 80 * W.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
return
user.visible_message("<span class='notice'>[user] cuts apart [src]!</span>", \
"<span class='notice'>You cut [src] into metal.</span>")
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
var/turf/T = get_turf(src)
new /obj/item/stack/sheet/metal(T, 3)
if(reinforced)
@@ -430,8 +432,8 @@
if(istype(C, /obj/item/weapon/firelock_electronics))
user.visible_message("<span class='notice'>[user] starts adding [C] to [src]...</span>", \
"<span class='notice'>You begin adding a circuit board to [src]...</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(!do_after(user, 40, target = src))
playsound(get_turf(src), C.usesound, 50, 1)
if(!do_after(user, 40 * C.toolspeed, target = src))
return
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
return
@@ -439,7 +441,7 @@
qdel(C)
user.visible_message("<span class='notice'>[user] adds a circuit to [src].</span>", \
"<span class='notice'>You insert and secure [C].</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), C.usesound, 50, 1)
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return
+6 -5
View File
@@ -227,18 +227,19 @@
/obj/machinery/door/window/attack_hand(mob/user as mob)
return attackby(user, user)
/obj/machinery/door/window/emag_act(user as mob, weapon as obj)
/obj/machinery/door/window/emag_act(mob/user, obj/weapon)
if(density)
operating = -1
flick("[base_state]spark", src)
sleep(6)
desc += "<BR><span class='warning'>Its access panel is smoking slightly.</span>"
if(istype(weapon, /obj/item/weapon/melee/energy/blade))
var/obj/item/weapon/melee/energy/blade/B
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(loc, "sparks", 50, 1)
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, B.usesound, 50, 1)
visible_message("<span class='warning'> The glass door was sliced open by [user]!</span>")
open(2)
emagged = 1
@@ -264,17 +265,17 @@
if(density || operating)
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel.</span>")
return
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
p_open = !( p_open )
to_chat(user, "<span class='notice'>You [p_open ? "open":"close"] the maintenance panel of the [name].</span>")
return
if(istype(I, /obj/item/weapon/crowbar))
if(p_open && !density && !operating)
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
user.visible_message("<span class='warning'>[user] removes the electronics from the [name].</span>", \
"You start to remove electronics from the [name].")
if(do_after(user,40, target = src))
if(do_after(user, 40 * I.toolspeed, target = src))
if(p_open && !density && !operating && loc)
var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(loc)
switch(base_state)
+2 -2
View File
@@ -20,7 +20,7 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array/process()
return PROCESS_KILL
/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
/obj/machinery/doppler_array/attackby(var/obj/item/O, var/mob/user, params)
if(istype(O, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
anchored = 1
@@ -30,7 +30,7 @@ var/list/doppler_arrays = list()
anchored = 0
power_change()
to_chat(user, "<span class='notice'>You unfasten [src].</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, O.usesound, 50, 1)
/obj/machinery/doppler_array/verb/rotate()
set name = "Rotate Tachyon-doppler Dish"
+8 -5
View File
@@ -97,7 +97,7 @@ FIRE ALARM
else if(istype(W, /obj/item/weapon/wirecutters)) // cutting the wires out
to_chat(user, "<span class='warning'>You cut the wires!</span>")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil()
new_coil.amount = 5
new_coil.loc = user.loc
@@ -111,17 +111,18 @@ FIRE ALARM
return
buildstage = 2
playsound(get_turf(src), W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
update_icon()
else if(istype(W, /obj/item/weapon/crowbar))
to_chat(user, "<span class='warning'>You pry out the circuit!</span>")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 20 * W.toolspeed, target = src))
if(buildstage != 1)
return
var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics()
circuit.loc = user.loc
circuit.forceMove(get_turf(src))
buildstage = 0
update_icon()
if(0)
@@ -134,7 +135,7 @@ FIRE ALARM
else if(istype(W, /obj/item/weapon/wrench))
to_chat(user, "<span class='warning'>You remove the fire alarm assembly from the wall!</span>")
new /obj/item/mounted/frame/firealarm(get_turf(user))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
qdel(src)
return
@@ -275,6 +276,8 @@ Just a object used in constructing fire alarms
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/machinery/partyalarm
name = "\improper PARTY BUTTON"
+2 -2
View File
@@ -76,14 +76,14 @@
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
+2 -2
View File
@@ -152,8 +152,8 @@
return 1
if(istype(W, /obj/item/weapon/wrench))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 30 * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
new/obj/item/mounted/frame/light_switch(get_turf(src))
qdel(src)
+6 -6
View File
@@ -395,7 +395,7 @@ Class Procs:
/obj/machinery/proc/default_deconstruction_crowbar(var/obj/item/weapon/crowbar/C, var/ignore_panel = 0)
if(istype(C) && (panel_open || ignore_panel))
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(loc, C.usesound, 50, 1)
spawn_frame()
for(var/obj/item/I in component_parts)
if(I.reliability != 100 && crit_fail)
@@ -413,7 +413,7 @@ Class Procs:
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed, var/obj/item/weapon/screwdriver/S)
if(istype(S))
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, S.usesound, 50, 1)
if(!panel_open)
panel_open = 1
icon_state = icon_state_open
@@ -427,7 +427,7 @@ Class Procs:
/obj/machinery/proc/default_change_direction_wrench(var/mob/user, var/obj/item/weapon/wrench/W)
if(panel_open && istype(W))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
dir = turn(dir,-90)
to_chat(user, "<span class='notice'>You rotate [src].</span>")
return 1
@@ -436,14 +436,14 @@ Class Procs:
/obj/proc/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
if(istype(W))
to_chat(user, "<span class='notice'>Now [anchored ? "un" : ""]securing [name].</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, time, target = src))
playsound(loc, W.usesound, 50, 1)
if(do_after(user, time * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You've [anchored ? "un" : ""]secured [name].</span>")
anchored = !anchored
if(istype(src, /obj/machinery))
var/obj/machinery/M = src
M.power_change() //Turn on or off the machine depending on the status of power in the new area.
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
return 1
return 0
+23 -23
View File
@@ -22,8 +22,8 @@
if(istype(W, /obj/item/weapon/screwdriver))
to_chat(user, "You begin to unscrew the bolts off the [src]...")
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 30, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 30 * W.toolspeed, target = src))
var/obj/machinery/mass_driver_frame/F = new(get_turf(src))
F.dir = src.dir
F.anchored = 1
@@ -106,17 +106,17 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
playsound(get_turf(src), WT.usesound, 50, 1)
to_chat(user, "You begin to cut the frame apart...")
if(do_after(user, 30, target = src) && (build == 0))
if(do_after(user, 30 * WT.toolspeed, target = src) && (build == 0))
to_chat(user, "<span class='notice'>You detach the plasteel sheets from each others.</span>")
new /obj/item/stack/sheet/plasteel(get_turf(src),3)
qdel(src)
return 1
if(istype(W, /obj/item/weapon/wrench))
to_chat(user, "You begin to anchor \the [src] on the floor.")
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10, target = src) && (build == 0))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src) && (build == 0))
to_chat(user, "<span class='notice'>You anchor \the [src]!</span>")
anchored = 1
build++
@@ -125,8 +125,8 @@
if(1) // Fixed to the floor
if(istype(W, /obj/item/weapon/wrench))
to_chat(user, "You begin to de-anchor \the [src] from the floor.")
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10, target = src) && (build == 1))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src) && (build == 1))
build--
update_icon()
anchored = 0
@@ -137,9 +137,9 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
playsound(get_turf(src), WT.usesound, 50, 1)
to_chat(user, "You begin to weld \the [src] to the floor...")
if(do_after(user, 40, target = src) && (build == 1))
if(do_after(user, 40 * WT.toolspeed, target = src) && (build == 1))
to_chat(user, "<span class='notice'>You welded \the [src] to the floor.</span>")
build++
update_icon()
@@ -150,17 +150,17 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
playsound(get_turf(src), WT.usesound, 50, 1)
to_chat(user, "You begin to unweld \the [src] to the floor...")
if(do_after(user, 40, target = src) && (build == 2))
if(do_after(user, 40 * WT.toolspeed, target = src) && (build == 2))
to_chat(user, "<span class='notice'>You unwelded \the [src] to the floor.</span>")
build--
update_icon()
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C=W
var/obj/item/stack/cable_coil/C = W
to_chat(user, "You start adding cables to \the [src]...")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20, target = src) && (C.amount >= 3) && (build == 2))
playsound(get_turf(src), C.usesound, 50, 1)
if(do_after(user, 20 * C.toolspeed, target = src) && (C.amount >= 3) && (build == 2))
C.use(3)
to_chat(user, "<span class='notice'>You've added cables to \the [src].</span>")
build++
@@ -168,18 +168,18 @@
if(3) // Wired
if(istype(W, /obj/item/weapon/wirecutters))
to_chat(user, "You begin to remove the wiring from \the [src].")
if(do_after(user, 10, target = src) && (build == 3))
if(do_after(user, 10 * W.toolspeed, target = src) && (build == 3))
new /obj/item/stack/cable_coil(loc,3)
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You've removed the cables from \the [src].</span>")
build--
update_icon()
return 1
if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/rods/R=W
var/obj/item/stack/rods/R = W
to_chat(user, "You begin to complete \the [src]...")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20, target = src) && (R.amount >= 3) && (build == 3))
playsound(get_turf(src), R.usesound, 50, 1)
if(do_after(user, 20 * R.toolspeed, target = src) && (R.amount >= 3) && (build == 3))
R.use(3)
to_chat(user, "<span class='notice'>You've added the grille to \the [src].</span>")
build++
@@ -188,15 +188,15 @@
if(4) // Grille in place
if(istype(W, /obj/item/weapon/crowbar))
to_chat(user, "You begin to pry off the grille from \the [src]...")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user, 30, target = src) && (build == 4))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 30 * W.toolspeed, target = src) && (build == 4))
new /obj/item/stack/rods(loc,2)
build--
update_icon()
return 1
if(istype(W, /obj/item/weapon/screwdriver))
to_chat(user, "You finalize the Mass Driver...")
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
var/obj/machinery/mass_driver/M = new(get_turf(src))
M.dir = src.dir
qdel(src)
+3 -3
View File
@@ -543,10 +543,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/wrench))
to_chat(user, "<span class='notice'>Now [anchored ? "un" : ""]securing [name]</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 60, target = src))
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 60 * I.toolspeed, target = src))
new /obj/item/mounted/frame/newscaster_frame(loc)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
qdel(src)
return
+4 -4
View File
@@ -620,7 +620,7 @@
var/obj/machinery/atmospherics/omni/filter/P = new(loc)
P.construction(dir, pipe_dir, color)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
user.visible_message( \
"[user] fastens the [src].", \
"\blue You have fastened the [src].", \
@@ -645,8 +645,8 @@
if(!locate(/obj/machinery/atmospherics/pipe, src.loc))
to_chat(user, "\red You need to fasten it to a pipe")
return 1
new/obj/machinery/meter( src.loc )
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/machinery/meter(loc)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user, "\blue You have fastened the meter to the pipe")
qdel(src)
@@ -663,7 +663,7 @@
if(!istype(W, /obj/item/weapon/wrench))
return ..()
new/obj/machinery/air_sensor( src.loc )
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
to_chat(user, "\blue You have fastened the gas sensor")
qdel(src)
+4 -4
View File
@@ -112,9 +112,9 @@
return
else if(istype(W, /obj/item/weapon/wrench))
if(unwrenched==0)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You have unfastened \the [src]. Now it can be pulled somewhere else.</span>", \
@@ -125,9 +125,9 @@
if(usr.machine==src)
usr << browse(null, "window=pipedispenser")
else /*if(unwrenched==1)*/
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * W.toolspeed, target = src))
user.visible_message( \
"[user] fastens \the [src].", \
"<span class='notice'>You have fastened \the [src]. Now it can dispense pipes.</span>", \
+16 -16
View File
@@ -337,7 +337,7 @@ var/list/turret_icons
//If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components
to_chat(user, "<span class='notice'>You begin prying the metal coverings off.</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * I.toolspeed, target = src))
if(prob(70))
to_chat(user, "<span class='notice'>You remove the turret and salvage some components.</span>")
if(installation)
@@ -369,15 +369,15 @@ var/list/turret_icons
)
wrenching = 1
if(do_after(user, 50, target = src))
if(do_after(user, 50 * I.toolspeed, target = src))
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
anchored = 1
update_icon()
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
else if(anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
anchored = 0
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
update_icon()
@@ -778,14 +778,14 @@ var/list/turret_icons
switch(build_step)
if(0) //first step
if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
anchored = 1
build_step = 1
return
else if(istype(I, /obj/item/weapon/crowbar) && !anchored)
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
playsound(loc, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
new /obj/item/stack/sheet/metal( loc, 5)
qdel(src) // qdel
@@ -803,7 +803,7 @@ var/list/turret_icons
return
else if(istype(I, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(loc, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
anchored = 0
build_step = 0
@@ -812,7 +812,7 @@ var/list/turret_icons
if(2)
if(istype(I, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
build_step = 3
return
@@ -825,8 +825,8 @@ var/list/turret_icons
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
return
playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1)
if(do_after(user, 20, target = src))
playsound(loc, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
to_chat(user, "You remove the turret's interior metal armor.")
@@ -857,7 +857,7 @@ var/list/turret_icons
return
else if(istype(I, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
build_step = 2
return
@@ -876,7 +876,7 @@ var/list/turret_icons
if(5)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
build_step = 6
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
return
@@ -894,7 +894,7 @@ var/list/turret_icons
return
else if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
build_step = 5
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
return
@@ -906,8 +906,8 @@ var/list/turret_icons
if(WT.get_fuel() < 5)
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1)
if(do_after(user, 30, target = src))
playsound(loc, WT.usesound, 50, 1)
if(do_after(user, 30 * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user))
return
build_step = 8
@@ -924,7 +924,7 @@ var/list/turret_icons
qdel(src) // qdel
else if(istype(I, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
playsound(loc, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
new /obj/item/stack/sheet/metal(loc, 2)
build_step = 6
+6 -5
View File
@@ -198,9 +198,9 @@
/obj/machinery/programmable/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/weapon/wrench)) // code borrowed from pipe dispenser
if(unwrenched==0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "\blue You begin to unfasten \the [src] from the floor...")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * I.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src]. Now it can be pulled somewhere else.", \
@@ -211,9 +211,9 @@
if(usr.machine==src)
usr << browse(null, "window=pipedispenser")
else /* unwrenched */
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "\blue You begin to fasten \the [src] to the floor...")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * I.toolspeed, target = src))
user.visible_message( \
"[user] fastens \the [src].", \
"\blue You fastened \the [src] into place.", \
@@ -238,8 +238,9 @@
if(istype(I,/obj/item/weapon/crowbar))
if(open)
to_chat(user, "\blue You begin to pry out the [src]'s circuits.")
if(do_after(user,40, target = src))
if(do_after(user, 40 * I.toolspeed, target = src))
to_chat(user, "\blue You remove the circuitboard.")
playsound(loc, I.usesound, 50, 1)
circuit_removed = 1
use_power = 0
on = 0
+1 -1
View File
@@ -57,7 +57,7 @@
return
anchored = !anchored
to_chat(user, "You [anchored ? "attached" : "detached"] the recharger.")
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(loc, G.usesound, 75, 1)
/obj/machinery/recharger/attack_hand(mob/user as mob)
add_fingerprint(user)
+7 -6
View File
@@ -238,7 +238,7 @@
update_icon()
else if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
if(is_open)
to_chat(user, "\blue You close the panel.")
is_open = 0
@@ -250,11 +250,12 @@
var/obj/item/stack/cable_coil/coil = W
to_chat(user, "\blue You begin to replace the wires.")
//if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ), target = src)) //Take longer to repair heavier damage
if(do_after(user, 30, target = src))
if(do_after(user, 30 * coil.toolspeed, target = src))
if(!src || !coil) return
coil.use(1)
health = max_health
malfunction = 0
playsound(loc, coil.usesound, 50, 1)
to_chat(user, "\blue You repair the [src]!")
update_icon()
@@ -263,7 +264,7 @@
to_chat(user, "The bolts are covered, unlocking this would retract the covers.")
return
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue You unsecure the [src] from the floor!")
if(active)
to_chat(user, "\blue The [src] shuts off!")
@@ -271,7 +272,7 @@
anchored = 0
else
if(istype(get_turf(src), /turf/space)) return //No wrenching these in space!
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue You secure the [src] to the floor!")
anchored = 1
@@ -460,14 +461,14 @@
else if(state == 0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, W.usesound, 75, 1)
to_chat(user, "You secure the external reinforcing bolts to the floor.")
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, W.usesound, 75, 1)
to_chat(user, "You undo the external reinforcing bolts.")
src.anchored = 0
return
+1 -1
View File
@@ -503,7 +503,7 @@
return
if(istype(I, /obj/item/weapon/screwdriver))
src.panelopen = !src.panelopen
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, I.usesound, 100, 1)
to_chat(user, text("<font color='blue'>You [] the unit's maintenance panel.</font>",(src.panelopen ? "open up" : "close") ))
src.updateUsrDialog()
return
+28 -15
View File
@@ -59,14 +59,14 @@
to_chat(user, "<span class='notice'>The bomb must be placed on solid ground to attach it</span>")
else
to_chat(user, "<span class='notice'>You firmly wrench the bomb to the floor</span>")
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
anchored = 1
if(active)
to_chat(user, "<span class='notice'>The bolts lock in place</span>")
else
if(!active)
to_chat(user, "<span class='notice'>You wrench the bomb from the floor</span>")
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
anchored = 0
else
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")
@@ -89,7 +89,7 @@
else
to_chat(user, "<span class='notice'>There isn't anything in here to remove!</span>")
else if(open_panel)
to_chat(user, "<span class='notice'>The wires conneting the shell to the explosives are holding it down!</span>")
to_chat(user, "<span class='notice'>The wires connecting the shell to the explosives are holding it down!</span>")
else
to_chat(user, "<span class='notice'>The cover is screwed on, it won't pry off!</span>")
else if(istype(I, /obj/item/weapon/bombcore))
@@ -102,38 +102,51 @@
to_chat(user, "<span class='notice'>[payload] is already loaded into [src], you'll have to remove it first.</span>")
else
..()
/obj/machinery/syndicatebomb/attack_ghost(mob/user)
interact(user)
/obj/machinery/syndicatebomb/attack_hand(var/mob/user)
/obj/machinery/syndicatebomb/attack_hand(mob/user)
interact(user)
/obj/machinery/syndicatebomb/attack_ai()
return
/obj/machinery/syndicatebomb/interact(var/mob/user)
/obj/machinery/syndicatebomb/interact(mob/user)
if(wires && open_panel)
wires.Interact(user)
if(!open_panel)
if(!open_panel && can_interact(user))
if(!active)
spawn()
settings(user)
return
else if(anchored)
to_chat(user, "<span class='notice'>The bomb is bolted to the floor!</span>")
return
/obj/machinery/syndicatebomb/proc/can_interact(mob/user)
if(user.can_advanced_admin_interact())
return TRUE
if(!isliving(user))
return FALSE
if(user.incapacitated())
return FALSE
if(!Adjacent(user))
return FALSE
return TRUE
/obj/machinery/syndicatebomb/proc/settings(var/mob/user)
/obj/machinery/syndicatebomb/proc/settings(mob/user)
var/newtime = input(user, "Please set the timer.", "Timer", "[timer]") as num
newtime = Clamp(newtime, 120, 60000)
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
if(can_interact(user)) //No running off and setting bombs from across the station
timer = newtime
src.loc.visible_message("<span class='notice'>[bicon(src)] timer set for [timer] seconds.</span>")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
loc.visible_message("<span class='notice'>[bicon(src)] timer set for [timer] seconds.</span>")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && can_interact(user))
if(defused || active)
if(defused)
src.loc.visible_message("<span class='notice'>[bicon(src)] Device error: User intervention required.</span>")
loc.visible_message("<span class='notice'>[bicon(src)] Device error: User intervention required.</span>")
return
else
src.loc.visible_message("<span class='danger'>[bicon(src)] [timer] seconds until detonation, please clear the area.</span>")
loc.visible_message("<span class='danger'>[bicon(src)] [timer] seconds until detonation, please clear the area.</span>")
playsound(loc, 'sound/machines/click.ogg', 30, 1)
active = 1
update_icon()
@@ -143,8 +156,8 @@
var/area/A = get_area(bombturf)
if(payload && !istype(payload, /obj/item/weapon/bombcore/training))
msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!"
log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name] ([bombturf.x], [bombturf.y], [bombturf.z])")
payload.adminlog = "\The [src] that [key_name(user)] had primed detonated!"
/obj/machinery/syndicatebomb/proc/isWireCut(var/index)
return wires.IsIndexCut(index)
+2 -2
View File
@@ -184,8 +184,8 @@
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(src.loc, D.usesound, 50, 1)
if(do_after(user, 20 * D.toolspeed, target = src))
if(src.stat & BROKEN)
to_chat(user, "\blue The broken glass falls out.")
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
@@ -24,24 +24,24 @@
if(0)
if(istype(P, /obj/item/weapon/screwdriver))
to_chat(user, "You unfasten the bolts.")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
construct_op++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
to_chat(user, "You fasten the bolts.")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc,P.usesound, 50, 1)
construct_op--
if(istype(P, /obj/item/weapon/wrench))
to_chat(user, "You dislodge the external plating.")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, P.usesound, 75, 1)
construct_op++
if(2)
if(istype(P, /obj/item/weapon/wrench))
to_chat(user, "You secure the external plating.")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, P.usesound, 75, 1)
construct_op--
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src.loc, P.usesound, 50, 1)
to_chat(user, "You remove the cables.")
construct_op++
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
@@ -51,6 +51,7 @@
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/A = P
if(A.amount >= 5)
playsound(loc, A.usesound, 50, 1)
to_chat(user, "You insert the cables.")
A.amount -= 5
if(A.amount <= 0)
@@ -60,8 +61,8 @@
stat &= ~BROKEN // the machine's not borked anymore!
if(istype(P, /obj/item/weapon/crowbar))
to_chat(user, "You begin prying out the circuit board other components...")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,60, target = src))
playsound(src.loc, P.usesound, 50, 1)
if(do_after(user, 60 * P.toolspeed, target = src))
to_chat(user, "You finish prying out the components.")
// Drop all the component stuff
+2 -2
View File
@@ -128,8 +128,8 @@
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(src.loc, D.usesound, 50, 1)
if(do_after(user, 20 * D.toolspeed, target = src))
if(src.stat & BROKEN)
to_chat(user, "\blue The broken glass falls out.")
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
@@ -340,8 +340,8 @@
/obj/machinery/computer/telecomms/traffic/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
playsound(get_turf(src), D.usesound, 50, 1)
if(do_after(user, 20 * D.toolspeed, target = src))
if(src.stat & BROKEN)
to_chat(user, "\blue The broken glass falls out.")
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+1 -1
View File
@@ -237,7 +237,7 @@
return
if(istype(I, /obj/item/weapon/screwdriver) && anchored)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
panel_open = !panel_open
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
overlays.Cut()
@@ -194,6 +194,8 @@
range = MELEE|RANGED
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
var/canRwall = 0
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/mecha_parts/mecha_equipment/rcd/New()
rcd_list += src
@@ -224,7 +226,7 @@
if(do_after_cooldown(W))
chassis.spark_system.start()
W.ChangeTurf(/turf/simulated/floor/plating)
playsound(W, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(W, usesound, 50, 1)
else if(istype(target, /turf/simulated/floor))
var/turf/simulated/floor/F = target
occupant_message("Deconstructing [target]...")
@@ -232,27 +234,27 @@
chassis.spark_system.start()
F.ChangeTurf(/turf/space)
F.air_update_turf()
playsound(F, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(F, usesound, 50, 1)
else if(istype(target, /obj/machinery/door/airlock))
occupant_message("Deconstructing [target]...")
if(do_after_cooldown(target))
chassis.spark_system.start()
qdel(target)
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(target, usesound, 50, 1)
if(1)
if(istype(target, /turf/space))
var/turf/space/S = target
occupant_message("Building Floor...")
if(do_after_cooldown(S))
S.ChangeTurf(/turf/simulated/floor/plating)
playsound(S, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(S, usesound, 50, 1)
chassis.spark_system.start()
else if(istype(target, /turf/simulated/floor))
var/turf/simulated/floor/F = target
occupant_message("Building Wall...")
if(do_after_cooldown(F))
F.ChangeTurf(/turf/simulated/wall)
playsound(F, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(F, usesound, 50, 1)
chassis.spark_system.start()
if(2)
if(istype(target, /turf/simulated/floor))
@@ -261,7 +263,7 @@
chassis.spark_system.start()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target)
T.autoclose = 1
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(target, usesound, 50, 1)
playsound(target, 'sound/effects/sparks2.ogg', 50, 1)
+1 -1
View File
@@ -734,7 +734,7 @@
// Since having maint protocols available is controllable by the MMI, I see this as a consensual way to remove an MMI without destroying the mech
user.visible_message("[user] begins levering out the MMI from the [src].", "You begin to lever out the MMI from the [src].")
to_chat(occupant, "<span class='warning'>[user] is prying you out of the exosuit!</span>")
if(do_after(user,80,target=src))
if(do_after(user, 80 * W.toolspeed, target=src))
user.visible_message("<span class='notice'>[user] pries the MMI out of the [src]!</span>", "<span class='notice'>You finish removing the MMI from the [src]!</span>")
go_out()
return
+16 -10
View File
@@ -6,22 +6,25 @@
if(istype(used_atom, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = used_atom
if(W.remove_fuel(0, user))
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
playsound(holder, W.usesound, 50, 1)
else
return 0
else if(istype(used_atom, /obj/item/weapon/wrench))
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
var/obj/item/weapon/wrench/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/screwdriver))
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/item/weapon/screwdriver/S = used_atom
playsound(holder, S.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/wirecutters))
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
var/obj/item/weapon/wirecutters/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.use(4))
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(holder, C.usesound, 50, 1)
else
to_chat(user, ("There's not enough cable to finish the task."))
return 0
@@ -38,22 +41,25 @@
if(istype(used_atom, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = used_atom
if(W.remove_fuel(0, user))
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
playsound(holder, W.usesound, 50, 1)
else
return 0
else if(istype(used_atom, /obj/item/weapon/wrench))
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
var/obj/item/weapon/wrench/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/screwdriver))
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/item/weapon/screwdriver/S = used_atom
playsound(holder, S.usesound, 50, 1)
else if(istype(used_atom, /obj/item/weapon/wirecutters))
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
var/obj/item/weapon/wirecutters/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.use(4))
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(holder, C.usesound, 50, 1)
else
to_chat(user, ("There's not enough cable to finish the task."))
return 0
+1 -1
View File
@@ -35,7 +35,7 @@
var/obj/item/weapon/weldingtool/WT = W
if(salvage_num <= 0)
user.visible_message("[user] begins to slice apart the now completely stripped [src].", "You begin to slice apart the [src].", "You hear the sound of a welder nearby.")
if(WT.remove_fuel(0,user) && do_after(user,80,target=src))
if(WT.remove_fuel(0,user) && do_after(user, 80 * WT.toolspeed, target = src))
user.visible_message("The now-dilapidated [src] falls apart in a clatter.", "As you slice apart the final support structures, the [src] falls apart in a heap.", "You hear metal clanking to the floor.")
new /obj/item/stack/sheet/metal(src.loc)
var/obj/item/stack/rods/rods = new /obj/item/stack/rods(src.loc)
+2 -2
View File
@@ -222,7 +222,7 @@
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, WT.usesound, 100, 1)
health -= damage
healthcheck()
@@ -381,7 +381,7 @@
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, WT.usesound, 100, 1)
health -= damage
user.changeNext_move(CLICK_CD_MELEE)
@@ -309,7 +309,7 @@ obj/structure/sign/poster/New(serial,var/subtypeIn = -1)
obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
qdel(src)
+1 -1
View File
@@ -33,7 +33,7 @@
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, WT.usesound, 100, 1)
health -= damage
healthcheck()
+3
View File
@@ -19,6 +19,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/r_speed = 1.0
var/health = null
var/hitsound = null
var/usesound = null
var/w_class = 3
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
pass_flags = PASSTABLE
@@ -60,6 +61,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/block_chance = 0
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
var/toolspeed = 1 // If this item is a tool, the speed multiplier
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
sprite_sheets = list(
+2 -1
View File
@@ -10,6 +10,7 @@
w_class = 1
slot_flags = SLOT_BELT | SLOT_EARS
attack_verb = list("attacked", "coloured")
toolspeed = 1
var/colour = "#FF0000" //RGB
var/drawtype = "rune"
var/list/graffiti = list("body","amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","up","down","left","right","heart","borgsrogue","voxpox","shitcurity","catbeast","hieroglyphs1","hieroglyphs2","hieroglyphs3","security","syndicate1","syndicate2","nanotrasen","lie","valid","arrowleft","arrowright","arrowup","arrowdown","chicken","hailcrab","brokenheart","peace","scribble","scribble2","scribble3","skrek","squish","tunnelsnake","yip","youaredead")
@@ -86,7 +87,7 @@
else if(graffiti.Find(drawtype))
temp = "graffiti"
to_chat(user, "You start drawing a [temp] on the [target.name].")
if(instant || do_after(user, 50, target = target))
if(instant || do_after(user, 50 * toolspeed, target = target))
var/obj/effect/decal/cleanable/crayon/C = new /obj/effect/decal/cleanable/crayon(target,colour,drawtype,temp)
C.add_hiddenprint(user)
to_chat(user, "You finish drawing [temp].")
+2 -2
View File
@@ -14,7 +14,7 @@
/obj/item/clothing/suit/space/hardsuit
)
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
/obj/item/device/modkit/afterattack(obj/item/O, mob/user as mob, proximity)
if(!proximity)
return
@@ -47,7 +47,7 @@
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
return
playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(user.loc, O.usesound, 100, 1)
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
+67 -25
View File
@@ -1,3 +1,7 @@
#define PROXIMITY_NONE ""
#define PROXIMITY_ON_SCREEN "_red"
#define PROXIMITY_NEAR "_yellow"
/**
* Multitool -- A multitool is used for hacking electronic devices.
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
@@ -10,13 +14,15 @@
icon_state = "multitool"
flags = CONDUCT
force = 5.0
w_class = 2
throwforce = 5.0
throw_range = 15
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
throw_range = 7
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
materials = list(MAT_METAL=50, MAT_GLASS=20)
origin_tech = "magnets=1;engineering=1"
origin_tech = "magnets=1;engineering=2"
toolspeed = 1
hitsound = 'sound/weapons/tap.ogg'
var/shows_wire_information = FALSE // shows what a wire does if set to TRUE
var/obj/machinery/buffer // simple machine buffer for device linkage
/obj/item/device/multitool/proc/IsBufferA(var/typepath)
@@ -28,38 +34,74 @@
/obj/item/device/multitool/ai_detect
var/track_delay = 0
var/track_cooldown = 0
var/track_delay = 10 //How often it checks for proximity
var/detect_state = PROXIMITY_NONE
var/rangealert = 8 //Glows red when inside
var/rangewarning = 20 //Glows yellow when inside
origin_tech = "magnets=1;engineering=2;syndicate=1"
/obj/item/device/multitool/ai_detect/New()
..()
processing_objects += src
/obj/item/device/multitool/ai_detect/Destroy()
processing_objects -= src
return ..()
/obj/item/device/multitool/ai_detect/process()
if(track_delay > world.time)
if(track_cooldown > world.time)
return
var/found_eye = 0
for(var/mob/camera/aiEye/A in living_mob_list)
var/turf/our_turf = get_turf(src)
var/turf/eye_turf = get_turf(A)
if(get_dist(our_turf, eye_turf) < 9)
found_eye = 1
detect_state = PROXIMITY_NONE
multitool_detect()
icon_state = "[initial(icon_state)][detect_state]"
track_cooldown = world.time + track_delay
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
var/turf/our_turf = get_turf(src)
for(var/mob/living/silicon/ai/AI in ai_list)
if(AI.cameraFollow == src)
detect_state = PROXIMITY_ON_SCREEN
break
if(found_eye)
icon_state = "[initial(icon_state)]_red"
else
icon_state = initial(icon_state)
if(!detect_state && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
if(chunk)
if(chunk.seenby.len)
for(var/mob/camera/aiEye/A in chunk.seenby)
var/turf/detect_turf = get_turf(A)
if(get_dist(our_turf, detect_turf) < rangealert)
detect_state = PROXIMITY_ON_SCREEN
break
if(get_dist(our_turf, detect_turf) < rangewarning)
detect_state = PROXIMITY_NEAR
break
/obj/item/device/multitool/ai_detect/admin
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
track_delay = 5
shows_wire_information = TRUE
track_delay = world.time + 10 // 1 second
return
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
var/turf/our_turf = get_turf(src)
for(var/mob/J in urange(rangewarning,our_turf))
if(check_rights(R_ADMIN, 0, J))
detect_state = PROXIMITY_NEAR
var/turf/detect_turf = get_turf(J)
if(get_dist(our_turf, detect_turf) < rangealert)
detect_state = PROXIMITY_ON_SCREEN
break
/obj/item/device/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
/obj/item/device/multitool/abductor
name = "alien multitool"
desc = "An omni-technological interface."
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
origin_tech = "magnets=5;engineering=5;abductor=3"
shows_wire_information = TRUE
@@ -63,7 +63,7 @@
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
return
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
playsound(src, I.usesound, 50, 1, 1)
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")
sleep(5)
if(chosen_wire == correct_wire)
@@ -84,8 +84,8 @@
to_chat(user, "<span class='warning'>You can't see the box well enough to cut the wires out.</span>")
return
user.visible_message("<span class='notice'>[user] starts removing the payload and wires from \the [src].</span>")
if(do_after(user, 40, target = src))
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
if(do_after(user, 40 * I.toolspeed, target = src))
playsound(src, I.usesound, 50, 1, 1)
user.unEquip(src)
user.visible_message("<span class='notice'>[user] removes the insides of \the [src]!</span>")
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc)
@@ -138,8 +138,8 @@
if(3)
if(iswirecutter(W) && b_stat && wires.IsAllCut())
to_chat(user, "<span class='notice'>You cut out the intercoms wiring and disconnect its electronics.</span>")
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
if(do_after(user, 10, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src))
if(buildstage != 3)
return
new /obj/item/stack/cable_coil(get_turf(src),5)
@@ -152,8 +152,8 @@
else return ..()
if(2)
if(isscrewdriver(W))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 10, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src))
update_icon()
on = 1
b_stat = 0
@@ -170,15 +170,15 @@
if(coil.amount < 5)
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
return
if(do_after(user, 10, target = src))
if(do_after(user, 10 * coil.toolspeed, target = src))
coil.use(5)
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
buildstage = 2
return 1
if(iscrowbar(W))
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 10, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src))
if(buildstage != 1)
return
new /obj/item/weapon/intercom_electronics(get_turf(src))
@@ -187,19 +187,19 @@
return 1
if(0)
if(istype(W,/obj/item/weapon/intercom_electronics))
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 10, target = src))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src))
qdel(W)
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
buildstage = 1
return 1
if(iswelder(W))
var/obj/item/weapon/weldingtool/WT=W
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
playsound(get_turf(src), WT.usesound, 50, 1)
if(!WT.remove_fuel(3, user))
to_chat(user, "<span class='warning'>You're out of welding fuel.</span>")
return 1
if(do_after(user, 10, target = src))
if(do_after(user, 10 * WT.toolspeed, target = src))
to_chat(user, "<span class='notice'>You cut the intercom frame from the wall!</span>")
new /obj/item/mounted/frame/intercom(get_turf(src))
qdel(src)
@@ -233,6 +233,8 @@
desc = "Looks like a circuit. Probably is."
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/device/radio/intercom/locked
var/locked_frequency
@@ -94,7 +94,7 @@ var/global/list/default_medbay_channels = list(
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/attack_ghost(mob/user)
return ui_interact(user)
return interact(user)
/obj/item/device/radio/attack_self(mob/user as mob)
user.set_machine(src)
+2 -1
View File
@@ -279,7 +279,7 @@ REAGENT SCANNER
else
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
overlays += "advanced"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, usesound, 50, 1)
upgraded = 1
qdel(W)
@@ -296,6 +296,7 @@ REAGENT SCANNER
desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality."
w_class = 1
origin_tech = "magnets=2;biotech=2"
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/device/analyzer
desc = "A hand-held environmental scanner which reports current gas levels."
@@ -303,7 +303,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
to_chat(user, "<span class='notice'>You start winding the tape back in.</span>")
if(do_after(user, 120, target = src))
if(do_after(user, 120 * I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wound the tape back in!</span>")
fix()
else if(istype(I, /obj/item/weapon/pen))
@@ -3,6 +3,8 @@
desc = "Place it on a wall."
var/sheets_refunded = 2
var/list/mount_reqs = list() //can contain simfloor, nospace. Used in try_build to see if conditions are needed, then met
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/mounted/frame/attackby(obj/item/weapon/W, mob/user)
..()
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "tube"
origin_tech = "materials=3;engineering=2"
amount = 10
toolspeed = 1
/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob)
if(!istype(M) || !istype(user))
+2
View File
@@ -14,6 +14,8 @@
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/stack/rods/cyborg
materials = list()
@@ -143,7 +143,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(W.sharp)
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
if(do_after(user,50, target = src))
if(do_after(user, 50 * W.toolspeed, target = src))
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
@@ -9,6 +9,8 @@
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = MINERAL_MATERIAL_AMOUNT
var/sheettype = null //this is used for girders in the creation of walls/false walls
usesound = 'sound/items/Deconstruct.ogg'
toolspeed = 1
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
+1 -1
View File
@@ -1301,7 +1301,7 @@ obj/item/toy/cards/deck/syndicate/black
/obj/item/toy/minigibber/attackby(var/obj/O, var/mob/user, params)
if(istype(O,/obj/item/toy/character) && O.loc == user)
to_chat(user, "<span class='notice'>You start feeding \the [O] [bicon(O)] into \the [src]'s mini-input.</span>")
if(do_after(user,10, target = src))
if(do_after(user, 10, target = src))
if(O.loc != user)
to_chat(user, "<span class='alert'>\The [O] is too far away to feed into \the [src]!</span>")
else
+10 -8
View File
@@ -20,6 +20,8 @@ RCD
w_class = 3
materials = list(MAT_METAL = 30000)
origin_tech = "engineering=4;materials=2"
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
var/datum/effect/system/spark_spread/spark_system
var/max_matter = 100
var/matter = 0
@@ -172,7 +174,7 @@ RCD
door_name = temp_t
/obj/item/weapon/rcd/proc/activate()
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, usesound, 50, 1)
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
@@ -197,7 +199,7 @@ RCD
if(checkResource(3, user))
to_chat(user, "Building Wall ...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20, target = A))
if(do_after(user, 20 * toolspeed, target = A))
if(!useResource(3, user)) return 0
activate()
var/turf/AT = A
@@ -210,7 +212,7 @@ RCD
if(checkResource(10, user))
to_chat(user, "Building Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new door_type(A)
@@ -231,7 +233,7 @@ RCD
if(checkResource(5, user))
to_chat(user, "Deconstructing Wall...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40, target = A))
if(do_after(user, 40 * toolspeed, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
@@ -243,7 +245,7 @@ RCD
if(checkResource(5, user))
to_chat(user, "Deconstructing Floor...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
@@ -255,7 +257,7 @@ RCD
if(checkResource(20, user))
to_chat(user, "Deconstructing Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(20, user)) return 0
activate()
qdel(A)
@@ -270,7 +272,7 @@ RCD
return 0
to_chat(user, "Deconstructing window...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
if(!do_after(user, 20 * toolspeed, target = A))
return 0
if(locate(/obj/structure/window/full/shuttle) in A.contents)
return 0 // Let's not give shuttle-griefers an easy time.
@@ -307,7 +309,7 @@ RCD
return 0
to_chat(user, "Constructing window...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
if(!do_after(user, 20 * toolspeed, target = A))
return 0
if(locate(/obj/structure/grille) in A.contents)
return 0 // We already have window
+10 -8
View File
@@ -87,6 +87,8 @@
icon_state = "razor"
flags = CONDUCT
w_class = 1
usesound = 'sound/items/Welder2.ogg'
toolspeed = 1
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
@@ -106,24 +108,24 @@
if(H == user) //shaving yourself
user.visible_message("<span class='notice'>[user] starts to shave their facial hair with \the [src].</span>", \
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
if(do_after(user, 50, target = H))
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
playsound(src.loc, usesound, 20, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s facial hair with \the [src].</span>", \
"<span class='warning'>You start shaving [H]'s facial hair.</span>")
if(do_after(user, 50, target = H))
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
playsound(src.loc, usesound, 20, 1)
if(user.zone_sel.selecting == "head")
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
@@ -137,24 +139,24 @@
if(H == user) //shaving yourself
user.visible_message("<span class='warning'>[user] starts to shave their head with \the [src].</span>", \
"<span class='warning'>You start to shave your head with \the [src].</span>")
if(do_after(user, 50, target = H))
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves his head with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src].</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
playsound(src.loc, usesound, 40, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s head with \the [src]!</span>", \
"<span class='warning'>You start shaving [H]'s head.</span>")
if(do_after(user, 50, target = H))
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves [H]'s head bald with \the [src]!</span>", \
"<span class='warning'>You shave [H]'s head bald.</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
playsound(src.loc, usesound, 40, 1)
else
..()
else
+6 -4
View File
@@ -256,6 +256,7 @@
force = 0
throwforce = 6
w_class = 4
toolspeed = 1
var/revivecost = 1000
var/cooldown = 0
@@ -346,7 +347,7 @@
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
@@ -362,7 +363,7 @@
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
@@ -455,6 +456,7 @@
var/busy = 0
var/safety = 1
flags = NODROP
toolspeed = 1
/obj/item/weapon/borg_defib/attack(mob/M, mob/user)
var/tobehealed
@@ -495,7 +497,7 @@
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
@@ -511,7 +513,7 @@
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
@@ -7,6 +7,7 @@
det_time = 10
display_timer = 0
origin_tech = "syndicate=2"
toolspeed = 1
var/atom/target = null
var/image_overlay = null
var/obj/item/device/assembly_holder/nadeassembly = null
@@ -36,7 +37,7 @@
update_icon()
return
if(nadeassembly && istype(I, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 20, 1)
playsound(src, I.usesound, 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
@@ -73,7 +74,7 @@
return
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
if(do_after(user, 50, target = AM))
if(do_after(user, 50 * toolspeed, target = AM))
if(!user.unEquip(src))
return
src.target = AM
@@ -11,6 +11,7 @@
var/payload_name = null // used for spawned grenades
w_class = 2
force = 2
var/prime_sound = 'sound/items/Screwdriver2.ogg'
var/stage = EMPTY
var/list/beakers = list()
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
@@ -124,7 +125,7 @@
if(stage == WIRED)
if(beakers.len)
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 25, -3)
playsound(loc, prime_sound, 25, -3)
stage = READY
update_icon()
var/contained = ""
@@ -265,7 +266,7 @@
has_reagents = 1
if(!has_reagents)
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
playsound(loc, usesound, 50, 1)
return
if(nadeassembly)
@@ -347,7 +348,7 @@
if(E.reagents.total_volume) has_reagents = 1
if(!has_reagents)
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
playsound(loc, prime_sound, 50, 1)
return
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
+1 -1
View File
@@ -130,7 +130,7 @@
to_chat(user, "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>")
return
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
if(do_after(user, 35, target = src))
if(do_after(user, 35 * M.toolspeed, target = src))
var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola
M.use(6)
user.put_in_hands(S)

Some files were not shown because too many files have changed in this diff Show More