mirror of
https://github.com/cybergirlvannie/OpenSS13.git
synced 2026-08-23 20:56:21 +01:00
This commit is contained in:
@@ -136,7 +136,7 @@ obj/machinery/power
|
||||
|
||||
for(var/obj/cable/LC in T)
|
||||
if(LC.d1 == dirn || LC.d2 == dirn)
|
||||
user << "There's already a cable at that position."
|
||||
user.client_mob() << "There's already a cable at that position."
|
||||
return
|
||||
|
||||
var/obj/cable/NC = new(T)
|
||||
|
||||
+18
-18
@@ -110,11 +110,11 @@ obj/machinery/power/apc
|
||||
if(stat & BROKEN) return
|
||||
|
||||
if(usr && !usr.stat)
|
||||
usr << "A control terminal for the area electrical systems."
|
||||
usr.client_mob() << "A control terminal for the area electrical systems."
|
||||
if(opened)
|
||||
usr << "The cover is open and the power cell is [ cell ? "installed" : "missing"]."
|
||||
usr.client_mob() << "The cover is open and the power cell is [ cell ? "installed" : "missing"]."
|
||||
else
|
||||
usr << "The cover is closed."
|
||||
usr.client_mob() << "The cover is closed."
|
||||
|
||||
|
||||
// Update the APC icon to show the three base states (normal, opened with cell, opened without cell)
|
||||
@@ -156,48 +156,48 @@ obj/machinery/power/apc
|
||||
updateicon()
|
||||
else
|
||||
if(coverlocked)
|
||||
user << "The cover is locked and cannot be opened."
|
||||
user.client_mob() << "The cover is locked and cannot be opened."
|
||||
else
|
||||
opened = 1
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
if(cell)
|
||||
user << "There is a power cell already installed."
|
||||
user.client_mob() << "There is a power cell already installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "You insert the power cell."
|
||||
user.client_mob() << "You insert the power cell."
|
||||
chargecount = 0
|
||||
|
||||
updateicon()
|
||||
else if (istype(W, /obj/item/weapon/card/id) ) // trying to unlock the interface with an ID card
|
||||
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
user.client_mob() << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if (I.check_access(access, allowed))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] the APC interface."
|
||||
user.client_mob() << "You [ locked ? "lock" : "unlock"] the APC interface."
|
||||
updateicon()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
user.client_mob() << "\red Access denied."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) ) // trying to unlock with an emag card
|
||||
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
user.client_mob() << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] the APC interface."
|
||||
user.client_mob() << "You [ locked ? "lock" : "unlock"] the APC interface."
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
|
||||
user.client_mob() << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
|
||||
|
||||
|
||||
// Attack with hand - remove cell (if present and cover open) or interact with the APC
|
||||
@@ -224,7 +224,7 @@ obj/machinery/power/apc
|
||||
cell.updateicon()
|
||||
|
||||
src.cell = null
|
||||
user << "You remove the power cell."
|
||||
user.client_mob() << "You remove the power cell."
|
||||
charging = 0
|
||||
src.updateicon()
|
||||
|
||||
@@ -240,7 +240,7 @@ obj/machinery/power/apc
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=apc")
|
||||
user.client_mob() << browse(null, "window=apc")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -327,7 +327,7 @@ obj/machinery/power/apc
|
||||
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
t += "</TT>"
|
||||
user << browse(t, "window=apc")
|
||||
user.client_mob() << browse(t, "window=apc")
|
||||
return
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ obj/machinery/power/apc
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
@@ -409,14 +409,14 @@ obj/machinery/power/apc
|
||||
updateicon()
|
||||
update()
|
||||
else if( href_list["close"] )
|
||||
usr << browse(null, "window=apc")
|
||||
usr.client_mob() << browse(null, "window=apc")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=apc")
|
||||
usr.client_mob() << browse(null, "window=apc")
|
||||
usr.machine = null
|
||||
|
||||
return
|
||||
|
||||
@@ -134,7 +134,7 @@ obj/machinery/power/generator
|
||||
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/ai)))
|
||||
user.machine = null
|
||||
user << browse(null, "window=teg")
|
||||
user.client_mob() << browse(null, "window=teg")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -158,7 +158,7 @@ obj/machinery/power/generator
|
||||
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
t += "</PRE>"
|
||||
user << browse(t, "window=teg;size=460x300")
|
||||
user.client_mob() << browse(t, "window=teg;size=460x300")
|
||||
return
|
||||
|
||||
|
||||
@@ -170,9 +170,10 @@ obj/machinery/power/generator
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
if (!istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
@@ -180,7 +181,7 @@ obj/machinery/power/generator
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=teg")
|
||||
usr.client_mob() << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
@@ -247,7 +248,7 @@ obj/machinery/power/generator
|
||||
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=teg")
|
||||
usr.client_mob() << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
|
||||
return
|
||||
|
||||
@@ -45,9 +45,9 @@ obj/machinery/power/monitor
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if (I.check_access(access, allowed))
|
||||
control = !control
|
||||
user << "You [ control ? "enable" : "disable"] remote APC control."
|
||||
user.client_mob() << "You [ control ? "enable" : "disable"] remote APC control."
|
||||
else
|
||||
user << "\red Access denied."
|
||||
user.client_mob() << "\red Access denied."
|
||||
else
|
||||
attack_hand(user) // otherwise interact as usual
|
||||
|
||||
@@ -58,7 +58,7 @@ obj/machinery/power/monitor
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=powcomp")
|
||||
user.client_mob() << browse(null, "window=powcomp")
|
||||
return
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ obj/machinery/power/monitor
|
||||
|
||||
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A></TT>"
|
||||
|
||||
user << browse(t, "window=powcomp;size=450x740")
|
||||
user.client_mob() << browse(t, "window=powcomp;size=450x740")
|
||||
|
||||
|
||||
// Handle topic links from the interaction window
|
||||
@@ -117,8 +117,9 @@ obj/machinery/power/monitor
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai))))
|
||||
usr.machine = src
|
||||
@@ -131,11 +132,11 @@ obj/machinery/power/monitor
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
else if( href_list["close"] )
|
||||
usr << browse(null, "window=powcomp")
|
||||
usr.client_mob() << browse(null, "window=powcomp")
|
||||
usr.machine = null
|
||||
return
|
||||
else
|
||||
usr << browse(null, "window=powcomp")
|
||||
usr.client_mob() << browse(null, "window=powcomp")
|
||||
usr.machine = null
|
||||
|
||||
// Timed process - use power, update window to viewers
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=smes")
|
||||
user.client_mob() << browse(null, "window=smes")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -245,7 +245,7 @@
|
||||
t += "<BR></PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
t += "</TT>"
|
||||
user << browse(t, "window=smes;size=460x300")
|
||||
user.client_mob() << browse(t, "window=smes;size=460x300")
|
||||
return
|
||||
|
||||
|
||||
@@ -258,8 +258,9 @@
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
@@ -267,7 +268,7 @@
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=smes")
|
||||
usr.client_mob() << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
@@ -337,7 +338,7 @@
|
||||
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=smes")
|
||||
usr.client_mob() << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
|
||||
return
|
||||
@@ -114,7 +114,7 @@ obj/machinery/power/solar_control
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=solcon")
|
||||
user.client_mob() << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -155,7 +155,7 @@ obj/machinery/power/solar_control
|
||||
t += "</PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
t += "</TT>"
|
||||
user << browse(t, "window=solcon")
|
||||
user.client_mob() << browse(t, "window=solcon")
|
||||
|
||||
return
|
||||
|
||||
@@ -169,8 +169,9 @@ obj/machinery/power/solar_control
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
@@ -178,7 +179,7 @@ obj/machinery/power/solar_control
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.client_mob() << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
@@ -214,7 +215,7 @@ obj/machinery/power/solar_control
|
||||
src.updateDialog()
|
||||
|
||||
else
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.client_mob() << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
|
||||
return
|
||||
|
||||
@@ -189,7 +189,7 @@ obj/machinery/power/turbine
|
||||
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/ai)) )
|
||||
user.machine = null
|
||||
user << browse(null, "window=turbine")
|
||||
user.client_mob() << browse(null, "window=turbine")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -208,7 +208,7 @@ obj/machinery/power/turbine
|
||||
t += "</PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
t += "</TT>"
|
||||
user << browse(t, "window=turbine")
|
||||
user.client_mob() << browse(t, "window=turbine")
|
||||
|
||||
return
|
||||
|
||||
@@ -223,14 +223,15 @@ obj/machinery/power/turbine
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=turbine")
|
||||
usr.client_mob() << browse(null, "window=turbine")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
@@ -241,7 +242,7 @@ obj/machinery/power/turbine
|
||||
src.updateDialog()
|
||||
|
||||
else
|
||||
usr << browse(null, "window=turbine")
|
||||
usr.client_mob() << browse(null, "window=turbine")
|
||||
usr.machine = null
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user