diff --git a/code/game/dna.dm b/code/game/dna.dm
index 17ca55751fb..b8b346cc6fd 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -447,13 +447,13 @@
panel_open = !panel_open
if(panel_open)
icon_state = "[icon_state]_maintenance"
- user << "You open the maintenance panel of [src]."
+ user << "You open the maintenance panel of [src]."
else
if(open)
icon_state = "[initial(icon_state)]_open"
else
icon_state = "[initial(icon_state)]"
- user << "You close the maintenance panel of [src]."
+ user << "You close the maintenance panel of [src]."
return
if(istype(G, /obj/item/weapon/crowbar))
@@ -542,7 +542,7 @@
user.drop_item()
I.loc = src
src.diskette = I
- user << "You insert [I]."
+ user << "You insert [I]."
src.updateUsrDialog()
return
else
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 029063c0d51..ebe0566804d 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -49,7 +49,7 @@
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
- user << "\red This part is faulty, you cannot add this to the machine!"
+ user << "This part is faulty, you cannot add this to the machine!"
return
switch(state)
if(1)
@@ -57,17 +57,17 @@
var/obj/item/weapon/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- user << "\blue You start to add cables to the frame."
+ user << "You start to add cables to the frame."
if(do_after(user, 20))
if(C)
C.amount -= 5
if(!C.amount) del(C)
- user << "\blue You add cables to the frame."
+ user << "You add cables to the frame."
state = 2
icon_state = "box_1"
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- user << "\blue You dismantle the frame"
+ user << "You dismantle the frame."
new /obj/item/stack/sheet/metal(src.loc, 5)
del(src)
if(2)
@@ -75,7 +75,7 @@
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- user << "\blue You add the circuit board to the frame."
+ user << "You add the circuit board to the frame."
circuit = P
user.drop_item()
P.loc = src
@@ -86,10 +86,10 @@
update_namelist()
update_req_desc()
else
- user << "\red This frame does not accept circuit boards of this type!"
+ user << "This frame does not accept circuit boards of this type!"
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- user << "\blue You remove the cables."
+ user << "You remove the cables."
state = 1
icon_state = "box_0"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
@@ -102,9 +102,9 @@
circuit.loc = src.loc
circuit = null
if(components.len == 0)
- user << "\blue You remove the circuit board."
+ user << "You remove the circuit board."
else
- user << "\blue You remove the circuit board and other components."
+ user << "You remove the circuit board and other components."
for(var/obj/item/weapon/W in components)
W.loc = src.loc
desc = initial(desc)
@@ -132,27 +132,26 @@
del(src)
if(istype(P, /obj/item/weapon))
+ var/success
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
+ success=1
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/CP = P
- if(CP.amount > 1)
- var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src, 1)
- CP.amount--
- if(!CP.amount) del(CP)
- else CP.update_icon()
+ var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src, 1, CP.item_color)
+ if(CP.use(1))
components += CC
req_components[I]--
update_req_desc()
- break
+ break
user.drop_item()
P.loc = src
components += P
req_components[I]--
update_req_desc()
break
- if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
- user << "\red You cannot add that component to the machine!"
+ if(!success)
+ user << "You cannot add that to the machine!"
//Machine Frame Circuit Boards
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index fd3c869d85b..f04a742c876 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -212,7 +212,7 @@ Class Procs:
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
- usr << "\red You don't have the dexterity to do this!"
+ usr << "You don't have the dexterity to do this!"
return 1
/*
//distance checks are made by atom/proc/DblClick
@@ -225,7 +225,7 @@ Class Procs:
visible_message("\red [H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
- user << "\red You momentarily forget how to use [src]."
+ user << "You momentarily forget how to use [src]."
return 1
src.add_fingerprint(user)
@@ -254,8 +254,8 @@ Class Procs:
if (!panel_open)
panel_open = 1
icon_state = icon_state_open
- user << "You open the maintenance hatch of [src]."
+ user << "You open the maintenance hatch of [src]."
else
panel_open = 0
icon_state = icon_state_closed
- user << "You close the maintenance hatch of [src]."
+ user << "You close the maintenance hatch of [src]."
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index a22750aa3dd..b4c9e607982 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -24,26 +24,26 @@
switch(construct_op)
if(0)
if(istype(P, /obj/item/weapon/screwdriver))
- user << "You unfasten the bolts."
+ user << "You unfasten the bolts."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op ++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
- user << "You fasten the bolts."
+ user << "You fasten the bolts."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op --
if(istype(P, /obj/item/weapon/wrench))
- user << "You dislodge the external plating."
+ user << "You dislodge the external plating."
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op ++
if(2)
if(istype(P, /obj/item/weapon/wrench))
- user << "You secure the external plating."
+ user << "You secure the external plating."
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op --
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- user << "You remove the cables."
+ user << "You remove the cables."
construct_op ++
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( user.loc )
A.amount = 5
@@ -51,21 +51,17 @@
if(3)
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
- if(A.amount >= 5)
- user << "You insert the cables."
- A.amount -= 5
- if(A.amount <= 0)
- user.drop_item()
- del(A)
+ if(A.use(5))
+ user << "You insert the cables."
construct_op --
stat &= ~BROKEN // the machine's not borked anymore!
else
- user << "You need more cable"
+ user << "You need more cable to do that."
if(istype(P, /obj/item/weapon/crowbar))
- user << "You begin prying out the circuit board and components..."
+ user << "You begin prying out the circuit board and components..."
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,60))
- user << "You finish prying out the components."
+ user << "You finish prying out the components."
// Drop all the component stuff
if(component_parts)
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 00777fcc9eb..0c4bd97519a 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -302,8 +302,8 @@
if(src.amount < used)
return 0
else if (src.amount == used)
- //handle mob icon update
- if(ismob(loc))
+ .=1 //Because del(src) stops the proc, set the default return value to 1
+ if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.u_equip(src)
del(src)