This commit is contained in:
shadowlord13
2008-06-07 02:35:42 +00:00
parent af58259444
commit 1ccf694a72
68 changed files with 3373 additions and 1901 deletions
+4 -2
View File
@@ -245,13 +245,15 @@ Pipe Valve Status: [ct]<BR>
<A href='?src=\ref[user];mach_close=canister'>Close</A><BR>
</TT>"}
user << browse(dat, "window=canister;size=600x300")
user.client_mob() << browse(dat, "window=canister;size=600x300")
return
// Process topic link from interaction window
Topic(href, href_list)
usr.client_mob() << "Topic on canister, usr is [usr], src is [src], usr.client_mob() is [usr.client_mob()], href is ([href]), href_list is ([href_list])."
..()
if (usr.stat || usr.restrained())
return
@@ -306,7 +308,7 @@ Pipe Valve Status: [ct]<BR>
update_icon()
else
usr << browse(null, "window=canister")
usr.client_mob() << browse(null, "window=canister")
// Attack by an object
+2 -2
View File
@@ -151,7 +151,7 @@ obj/machinery/atmoalter/heater
ct = "Disconnected"
var/dat = text("<TT><B>Canister Valves</B><BR>\n<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\nUpper Valve Status: [][]<BR>\n\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\nHeater Status: [] - []<BR>\n\tTrg Tmp: <A href='?src=\ref[];ht=-50'>-</A> <A href='?src=\ref[];ht=-5'>-</A> <A href='?src=\ref[];ht=-1'>-</A> [] <A href='?src=\ref[];ht=1'>+</A> <A href='?src=\ref[];ht=5'>+</A> <A href='?src=\ref[];ht=50'>+</A><BR>\n<BR>\nPipe Valve Status: []<BR>\n\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=canister'>Close</A><BR>\n</TT>", src.gas.tot_gas(), src.maximum, tt, (src.holding ? text("<BR><A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.tot_gas()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.tot_gas() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user)
user << browse(dat, "window=canister;size=600x300")
user.client_mob() << browse(dat, "window=canister;size=600x300")
return
@@ -215,7 +215,7 @@ obj/machinery/atmoalter/heater
src.updateDialog()
src.add_fingerprint(usr)
else
usr << browse(null, "window=canister")
usr.client_mob() << browse(null, "window=canister")
return
return
+10 -13
View File
@@ -36,8 +36,8 @@ obj/machinery/atmoalter/siphs
* fullairsiphon/air_vent - Air Regulator - Vent on floor, same as fullairsiphon but cannot hold a tank.
*
* scrubbers - Scrubber - Can hold a tank. Starts empty. Automatic process removes toxins from air and stores in gas content.
* scubbers/port - Portable Scrubber - same as scrubbers but pushable.
* scubbers/air_filter - Air Filter - Vent on floor, same as scrubbers but cannot hold a tank.
* scrubbers/port - Portable Scrubber - same as scrubbers but pushable.
* scrubbers/air_filter - Air Filter - Vent on floor, same as scrubbers but cannot hold a tank.
*/
// new siphon object, create the gas content and set maximum capacity
@@ -212,7 +212,7 @@ obj/machinery/atmoalter/siphs
use_power(50, ENVIRON)
if (T)
if (T.firelevel > 900000.0)
if (T.firelevel > config.min_gas_for_fire)
src.f_time = world.time + 300 // shut off automatic operation for 30 seconds if fire present
else
if (world.time > src.f_time)
@@ -273,7 +273,7 @@ obj/machinery/atmoalter/siphs
if (src.t_status == 4)
at = "Automatic On <A href='?src=\ref[src];t=3'>Stop</A>"
var/dat = text("<TT><B>Canister Valves</B> []<BR>\n\t<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\n\tUpper Valve Status: [] []<BR>\n\t\t<A href='?src=\ref[];tp=-[]'>M</A> <A href='?src=\ref[];tp=-10000'>-</A> <A href='?src=\ref[];tp=-1000'>-</A> <A href='?src=\ref[];tp=-100'>-</A> <A href='?src=\ref[];tp=-1'>-</A> [] <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=100'>+</A> <A href='?src=\ref[];tp=1000'>+</A> <A href='?src=\ref[];tp=10000'>+</A> <A href='?src=\ref[];tp=[]'>M</A><BR>\n\tPipe Valve Status: []<BR>\n\t\t<A href='?src=\ref[];cp=-[]'>M</A> <A href='?src=\ref[];cp=-10000'>-</A> <A href='?src=\ref[];cp=-1000'>-</A> <A href='?src=\ref[];cp=-100'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=100'>+</A> <A href='?src=\ref[];cp=1000'>+</A> <A href='?src=\ref[];cp=10000'>+</A> <A href='?src=\ref[];cp=[]'>M</A><BR>\n<BR>\n\n<A href='?src=\ref[];mach_close=siphon'>Close</A><BR>\n\t</TT>", (!( src.alterable ) ? "<B>Valves are locked. Unlock with wrench!</B>" : "You can lock this interface with a wrench."), num2text(src.gas.tot_gas(), 10), num2text(src.maximum, 10), (src.t_status == 4 ? text("[]", at) : text("[]", tt)), (src.holding ? text("<BR>(<A href='?src=\ref[];tank=1'>Tank ([]</A>)", src, src.holding.gas.tot_gas()) : null), src, num2text(max_valve, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(max_valve, 7), ct, src, num2text(max_valve, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(max_valve, 7), user)
user << browse(dat, "window=siphon;size=600x300")
user.client_mob() << browse(dat, "window=siphon;size=600x300")
return
@@ -332,7 +332,7 @@ obj/machinery/atmoalter/siphs
src.updateDialog()
src.add_fingerprint(usr)
else
usr << browse(null, "window=canister")
usr.client_mob() << browse(null, "window=canister")
return
return
@@ -373,9 +373,9 @@ obj/machinery/atmoalter/siphs
else if (istype(W, /obj/item/weapon/wrench)) // lock/unlock the interface
src.alterable = !( src.alterable )
if (src.alterable)
user << "\blue You unlock the interface!"
user.client_mob() << "\blue You unlock the interface!"
else
user << "\blue You lock the interface!"
user.client_mob() << "\blue You lock the interface!"
/*
@@ -509,7 +509,7 @@ obj/machinery/atmoalter/siphs
if (istype(T, /turf))
if (locate(/obj/move, T))
T = locate(/obj/move, T)
if (T.firelevel < 900000.0)
if (T.firelevel < config.min_gas_for_fire)
src.gas.turf_add_all_oxy(T)
else
@@ -555,7 +555,7 @@ obj/machinery/atmoalter/siphs
if(4.0) // 4 = automatic mode
if( !portable() ) use_power(50, ENVIRON)
if (T)
if (T.firelevel > 900000.0)
if (T.firelevel > config.min_gas_for_fire)
src.f_time = world.time + 300 // disable automatic mode for 30 seconds if a fire present
else
if (world.time > src.f_time)
@@ -568,10 +568,7 @@ obj/machinery/atmoalter/siphs
// Pipe valve status handled by /obj/machinery/connector/process()
src.setstate()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
//Foreach goto(654)
src.updateDialog()
return
+4 -3
View File
@@ -112,7 +112,7 @@ obj/machinery/computer/airtunnel
dat += "<A href='?src=\ref[src];release=1'>RELEASE (Siphons only)</A> <A href='?src=\ref[src];siphon=1'>Siphon (Siphons only)</A> <A href='?src=\ref[src];stop_siph=1'>Stop</A> <A href='?src=\ref[src];auto=1'>Regulate</A><BR>"
dat += "<BR><BR><A href='?src=\ref[user];mach_close=computer'>Close</A></TT></BODY></HTML>"
user << browse(dat, "window=computer;size=400x500")
user.client_mob() << browse(dat, "window=computer;size=400x500")
// Handle topic links from interaction window
@@ -123,8 +123,9 @@ obj/machinery/computer/airtunnel
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.stat || usr.restrained()))
if (!istype(usr, /mob/ai))
return
+5 -5
View File
@@ -59,7 +59,7 @@ obj/machinery/computer/atmosphere
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Starting all siphon systems."
usr.client_mob() << "Starting all siphon systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(1, 0)
src.add_fingerprint(usr)
@@ -72,7 +72,7 @@ obj/machinery/computer/atmosphere
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Stopping all siphon systems."
usr.client_mob() << "Stopping all siphon systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(0, 0)
src.add_fingerprint(usr)
@@ -85,7 +85,7 @@ obj/machinery/computer/atmosphere
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Starting automatic air control systems."
usr.client_mob() << "Starting automatic air control systems."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(0, 1)
src.add_fingerprint(usr)
@@ -99,7 +99,7 @@ obj/machinery/computer/atmosphere
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Releasing all scrubber toxins."
usr.client_mob() << "Releasing all scrubber toxins."
for(var/obj/machinery/atmoalter/siphs/scrubbers/S in src.returnarea())
S.reset(-1.0, 0)
src.add_fingerprint(usr)
@@ -112,7 +112,7 @@ obj/machinery/computer/atmosphere
if(stat & NOPOWER) return
if (usr.stat)
return
usr << "Releasing all stored air."
usr.client_mob() << "Releasing all stored air."
for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
S.reset(-1.0, 0)
src.add_fingerprint(usr)
+6 -8
View File
@@ -146,7 +146,7 @@ obj/machinery/computer/card
dat = text("<TT><B>Identification Card Modifier</B><BR>\n<I>Please Insert the cards into the slots</I><BR>\nTarget: <A href='?src=\ref[];modify=1'>[]</A><BR>\nConfirm Identity: <A href='?src=\ref[];scan=1'>[]</A><BR>\n-----------------<BR>\n[]<BR>\n<BR>\n<BR>\n<A href='?src=\ref[];mode=1'>Access Crew Manifest</A><BR>\n</TT>", src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.scan ? text("[]", src.scan.name) : "----------"), d1, src)
else
dat = text("<TT><B>[]</B><BR>\n<I>[]</I><BR>\n[] <A href='?src=\ref[];modify=1'>[]</A><BR>\n[] <A href='?src=\ref[];scan=1'>[]</A><BR>\n-----------------<BR>\n[]<BR>\n<BR>\n<BR>\n<A href='?src=\ref[];mode=1'>[]</A><BR>\n</TT>", stars("Identification Card Modifier"), stars("Please Insert the cards into the slots"), stars("Target:"), src, (src.modify ? text("[]", stars(src.modify.name)) : "----------"), stars("Confirm Identity:"), src, (src.scan ? text("[]", stars(src.scan.name)) : "----------"), d1, src, stars("Access Crew Manifest"))
user << browse(dat, "window=id_com;size=400x500")
user.client_mob() << browse(dat, "window=id_com;size=400x500")
// Handle topic links from interaction window
@@ -155,7 +155,7 @@ obj/machinery/computer/card
..()
if(stat & (NOPOWER|BROKEN))
usr << browse(null, "window=id_com")
usr.client_mob() << browse(null, "window=id_com")
return
if(usr.restrained() || usr.lying)
@@ -164,7 +164,7 @@ obj/machinery/computer/card
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 ((usr.stat || usr.restrained()))
if (!istype(usr, /mob/ai))
@@ -206,7 +206,7 @@ obj/machinery/computer/card
src.authenticated = 1
else if (!href_list["print"])
if ((!( src.authenticated ) && (istype(usr, /mob/ai))) && (!src.modify))
usr << "You can't modify an ID without an ID inserted to modify. Once one is in the modify slot on the computer, you can log in."
usr.client_mob() << "You can't modify an ID without an ID inserted to modify. Once one is in the modify slot on the computer, you can log in."
if (href_list["vo"])
if (src.authenticated)
@@ -274,13 +274,11 @@ obj/machinery/computer/card
if (src.modify)
src.modify.name = "[src.modify.registered]'s ID Card ([src.modify.access_level]>[src.modify.lab_access]-[src.modify.engine_access]-[src.modify.air_access])"
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
src.add_fingerprint(usr)
else
usr << browse(null, "window=id_com")
usr.client_mob() << browse(null, "window=id_com")
// Called when area power state changes
+6 -6
View File
@@ -21,9 +21,9 @@ obj/machinery/computer/data
set src in oview(1)
for(var/x in src.topics)
usr << "[x], \..."
usr.client_mob() << "[x], \..."
usr << ""
usr.client_mob() << ""
src.add_fingerprint(usr)
return
@@ -34,9 +34,9 @@ obj/machinery/computer/data
set src in oview(1)
if (src.topics[text("[]", topic)])
usr << "<B>[topic]</B>\n\t [src.topics["[topic]"]]"
usr.client_mob() << "<B>[topic]</B>\n\t [src.topics["[topic]"]]"
else
usr << "Unable to find- [topic]"
usr.client_mob() << "Unable to find- [topic]"
src.add_fingerprint(usr)
return
@@ -81,7 +81,7 @@ obj/machinery/computer/data
display()
set src in oview(1)
usr << "<B>Research Information:</B>"
usr.client_mob() << "<B>Research Information:</B>"
..()
return
@@ -108,7 +108,7 @@ obj/machinery/computer/data
display()
set src in oview(1)
usr << "<B>Research Log:</B>"
usr.client_mob() << "<B>Research Log:</B>"
..()
return
+58
View File
@@ -0,0 +1,58 @@
/obj/machinery/computer/drone_control
name = "Drone Control Station"
icon = 'stationobjs.dmi'
icon_state = "drone_control"
var/mob/user = null
New()
spawn(10)
while (!config)
sleep(10)
if ((!config.humans_can_use_drones) || (!config.enable_drones))
del(src)
attack_hand(var/mob/user as mob)
if(stat & (NOPOWER|BROKEN) ) return
if (!config.humans_can_use_drones)
return
if (user.currentDrone)
return
if (istype(user, /mob/drone))
return
var/list/L = list( )
user.machine = src
var/numDrones = 0
for(var/mob/drone/rob in world)
if (rob.stat==0)
L[rob.name] = rob
numDrones+=1
L = sortList(L)
L["Cancel"] = "Cancel"
var/t = input(user, "Which drone would you like to change to?") as null|anything in L
if(!t)
user.machine = null
user.reset_view(null)
return 0
if (t == "Cancel")
user.machine = null
user.reset_view(null)
return 0
var/selected = L[t]
if (istype(selected, /mob/drone))
user.machine = null
user.reset_view(null)
selected:use_via_drone_control(user)
return
attack_ai(var/mob/user as mob)
user << "To control a drone, click it. The drone control stations are for humans."
return
attack_paw(var/mob/user as mob)
user << "Monkeys can't control drones."
return
+6 -7
View File
@@ -40,9 +40,7 @@
return
use_power(250)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
// Attackby object - pass through to interact
@@ -85,7 +83,7 @@
dat = "<B>Engine Ejection Module</B><HR>\nStatus: Ejecting<BR>\n<BR>\nCountdown: [engine_eject_control.timeleft]/60 \[Reset\]<BR>\n<BR>\n<A href='?src=\ref[src];stop=1'>Stop Ejection</A><BR>\n<BR>\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"
else
dat = "<B>Engine Ejection Module</B><HR>\nStatus: Ejected<BR>\n<BR>\nCountdown: N/60 \[Reset\]<BR>\n<BR>\nEngine Ejected!<BR>\n<BR>\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"
user << browse(dat, "window=computer;size=400x500")
user.client_mob() << browse(dat, "window=computer;size=400x500")
// Handle topic links from interaction window
@@ -94,8 +92,9 @@
..()
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.stat || usr.restrained()))
if (!istype(usr, /mob/ai))
return
@@ -114,7 +113,7 @@
engine_eject_control.ejectstart()
src.temp = null
else
usr << "\red Access Denied."
usr.client_mob() << "\red Access Denied."
else if (href_list["stop"])
if (engine_eject_control.status > 0)
src.temp = text("Stop Ejection?<BR><BR><A href='?src=\ref[];stop2=1'>Yes</A><BR><A href='?src=\ref[];temp=1'>No</A>", src, src)
+2 -4
View File
@@ -85,7 +85,7 @@ Hair Color: ([h_r],[h_g],[h_b]) <A href='?src=\ref[src];h_reset=1'>\[Reset\]</A>
Red (0-255): <A href='?src=\ref[src];h_r=-300'>\[0\]</A> <A href='?src=\ref[src];h_r=-10'>-10</A> <A href='?src=\ref[src];h_r=-1'>-1</A> [h_r] <A href='?src=\ref[src];h_r=1'>1</A> <A href='?src=\ref[src];h_r=10'>10</A> <A href='?src=\ref[src];h_r=300'>\[255\]</A><BR>
Green (0-255): <A href='?src=\ref[src];h_g=-300'>\[0\]</A> <A href='?src=\ref[src];h_g=-10'>-10</A> <A href='?src=\ref[src];h_g=-1'>-1</A> [h_g] <A href='?src=\ref[src];h_g=1'>1</A> <A href='?src=\ref[src];h_g=10'>10</A> <A href='?src=\ref[src];h_g=300'>\[255\]</A><BR>
Blue (0-255): <A href='?src=\ref[src];h_b=-300'>\[0\]</A> <A href='?src=\ref[src];h_b=-10'>-10</A> <A href='?src=\ref[src];h_b=-1'>-1</A> [h_b] <A href='?src=\ref[src];h_b=1'>1</A> <A href='?src=\ref[src];h_b=10'>10</A> <A href='?src=\ref[src];h_b=300'>\[255\]</A><BR>"}
user << browse(dat, "window=hologram_console")
user.client_mob() << browse(dat, "window=hologram_console")
// Handle topic links from window
@@ -131,9 +131,7 @@ Blue (0-255): <A href='?src=\ref[src];h_b=-300'>\[0\]</A> <A href='?src=\ref[src
else if (href_list["temp"])
src.temp = null
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.show_console(M)
src.updateDialog()
/*
+1 -1
View File
@@ -114,7 +114,7 @@ Important Notes:<BR>
else
dat += "<A href='?src=\ref[src];login=1'>{Log In}</A>"
user << browse("<HEAD><TITLE>Medical Records</TITLE></HEAD><TT>[dat]</TT>", "window=med_rec")
user.client_mob() << browse("<HEAD><TITLE>Medical Records</TITLE></HEAD><TT>[dat]</TT>", "window=med_rec")
+9 -6
View File
@@ -43,7 +43,9 @@ obj/machinery/computer/pod
if(stat & (NOPOWER|BROKEN)) return
if (!( src.connected ))
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
var/list/observers = viewers(null, null)
for (var/mob/who in observers)
who.client_mob() << "Cannot locate mass driver connector. Cancelling firing sequence!"
return
for(var/obj/machinery/door/poddoor/M in machines)
@@ -116,7 +118,7 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
dat += "<BR>\n<A href = '?src=\ref[src];door=1'>Toggle Outer Door</A><BR>"
dat += "<BR><BR><A href='?src=\ref[user];mach_close=computer'>Close</A></TT></BODY></HTML>"
user << browse(dat, "window=computer;size=400x500")
user.client_mob() << browse(dat, "window=computer;size=400x500")
// Handle topic links from interaction window
@@ -125,7 +127,7 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
..()
if(stat & (NOPOWER|BROKEN))
usr << browse(null, "window=computer")
usr.client_mob() << browse(null, "window=computer")
return
if (usr.restrained() || usr.lying)
@@ -133,9 +135,10 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
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
if ((usr.stat || usr.restrained()))
if (!istype(usr, /mob/ai))
return
+7 -3
View File
@@ -61,7 +61,7 @@ obj/machinery/computer/prison_shuttle
del(T)
prison_entered = 1
else
usr << "\blue There is an obstructing shuttle!"
usr.client_mob() << "\blue There is an obstructing shuttle!"
// Restabalize verb
@@ -70,7 +70,9 @@ obj/machinery/computer/prison_shuttle
verb/restabalize()
set src in oview(1)
viewers(null, null) << "\red <B>Restabalizing prison shuttle atmosphere!</B>"
var/list/observers = viewers(null, null)
for (var/mob/who in observers)
who.client_mob() << "\red <B>Restabilizing prison shuttle atmosphere!</B>"
var/A = locate(/area/shuttle_prison)
for(var/obj/move/T in A)
T.firelevel = 0
@@ -93,5 +95,7 @@ obj/machinery/computer/prison_shuttle
T.otemp = T20C
T.ttemp = T20C
viewers(null, null) << "\red <B>Prison shuttle Restabalized!</B>"
observers = viewers(null, null)
for (var/mob/who in observers)
who.client_mob() << "\red <B>Prison shuttle Restabilized!</B>"
src.add_fingerprint(usr)
+1 -1
View File
@@ -79,7 +79,7 @@ obj/machinery/computer/secure_data
else
else
dat += text("<A href='?src=\ref[];login=1'>{Log In}</A>", src)
user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec")
user.client_mob() << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec")
// Handle topic links
+3 -3
View File
@@ -22,7 +22,7 @@ obj/machinery/computer/shuttle
verb/restabalize()
set src in oview(1)
world << "\red <B>Restabalizing shuttle atmosphere!</B>"
world << "\red <B>Restabilizing shuttle atmosphere!</B>"
var/A = locate(/area/shuttle)
for(var/obj/move/T in A)
T.firelevel = 0
@@ -45,7 +45,7 @@ obj/machinery/computer/shuttle
T.otemp = T20C
T.ttemp = T20C
world << "\red <B>Shuttle Restabalized!</B>"
world << "\red <B>Shuttle Restabilized!</B>"
src.add_fingerprint(usr)
@@ -75,7 +75,7 @@ obj/machinery/computer/shuttle
if ((!( istype(W, /obj/item/weapon/card/id) ) || !( ticker ) || ticker.shuttle_location == shuttle_z || !( user )))
return
if (!W.check_access(access, allowed))
user << text("The access level ([]) of [] card is not high enough. ", W.access_level, W.registered)
user.client_mob() << text("The access level ([]) of [] card is not high enough. ", W.access_level, W.registered)
return
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
switch(choice)
+7 -1
View File
@@ -84,13 +84,19 @@ obj/machinery/door
// Attack with hand. If human and wearing an ID, same as attacking with the ID
attack_hand(mob/user as mob)
if (istype(user, /mob/drone))
if (user:controlledBy != null)
user = user:controlledBy
if(istype(user, /mob/human))
var/mob/human/H = user
if(H.wear_id)
attackby(H.wear_id, user)
else if(istype(user, /mob/ai))
attackby(user, user)
// Does it accept IDs?
proc/acceptsIDs()
+43 -145
View File
@@ -109,7 +109,7 @@ About the new airlock wires panel:
if (src.locked!=1)
src.locked = 1
else
usr << "You hear a click from the bottom of the door."
usr.client_mob() << "You hear a click from the bottom of the door."
if (AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
src.loseBackupPower()
@@ -132,7 +132,7 @@ About the new airlock wires panel:
src.locked=0
src.updateDialog()
else
usr << "You hear a click or thump sound from inside the door."
usr.client_mob() << "You hear a click or thump sound from inside the door."
if (AIRLOCK_WIRE_ELECTRIFY)
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
if (src.secondsElectrified!=-1)
@@ -289,21 +289,6 @@ About the new airlock wires panel:
proc/get_connection()
var/turf/T = src.loc
if(!istype(T, /turf/station/floor))
return
for(var/obj/cable/C in T)
@@ -355,24 +340,6 @@ About the new airlock wires panel:
if (src.secondsBackupPowerLost > 0)
if ((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
t1 += text("Backup power is offline for [] seconds.<br>\n", src.secondsBackupPowerLost)
else
t1 += text("Backup power is offline indefinitely.<br>\n")
else if (src.secondsMainPowerLost > 0)
@@ -442,7 +409,7 @@ About the new airlock wires panel:
t1 += text("Cannot close door due to power failure.<br>\n")
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
user << browse(t1, "window=airlock")
user.client_mob() << browse(t1, "window=airlock")
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door
@@ -452,7 +419,6 @@ About the new airlock wires panel:
if (src.aiHacking==0)
src.aiHacking=1
spawn(20)
//TODO: Make this take a minute
user << "Airlock AI control has been blocked. Beginning fault-detection."
sleep(50)
if (src.canAIControl())
@@ -545,7 +511,7 @@ About the new airlock wires panel:
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
user << browse(t1, "window=airlock")
user.client_mob() << browse(t1, "window=airlock")
else
..(user)
return
@@ -558,12 +524,9 @@ About the new airlock wires panel:
if (usr.stat || usr.restrained() )
return
if (href_list["close"])
usr << browse(null, "window=airlock")
usr.client_mob() << browse(null, "window=airlock")
if (usr.machine==src)
usr.machine = null
return
if (!istype(usr, /mob/ai))
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
@@ -571,95 +534,30 @@ About the new airlock wires panel:
if (href_list["wires"])
var/t1 = text2num(href_list["wires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
usr << alert("You need wirecutters!", null, null, null, null, null)
alert(usr.client_mob(), "You need wirecutters!")
return
if (!( src.p_open ))
return
if (src.isWireColorCut(t1))
src.mend(t1)
else
src.cut(t1)
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!( istype(usr.equipped(), /obj/item/weapon/multitool) ))
usr << alert("You need a multitool!", null, null, null, null, null)
alert(usr.client_mob(), "You need a multitool!")
return
if ((stat & NOPOWER))
usr << "Due to a power failure, nothing happens."
usr.client_mob() << "Due to a power failure, nothing happens."
return
if (!src.arePowerSystemsOn())
usr << "Due to power being disrupted, nothing happens."
usr.client_mob() << "Due to power being disrupted, nothing happens."
return
if (!( src.p_open ))
usr << "You can't pulse it because the panel is closed."
usr.client_mob() << "You can't pulse it because the panel is closed."
return
if (src.isWireColorCut(t1))
usr << "You can't pulse that wire - it being cut means a signal can't travel properly in it."
usr.client_mob() << "You can't pulse that wire - it being cut means a signal can't travel properly in it."
return
@@ -671,7 +569,7 @@ About the new airlock wires panel:
else
//AI
if (!src.canAIControl())
usr << "Airlock control connection failure!"
usr.client_mob() << "Airlock control connection failure!"
return
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door
@@ -681,30 +579,30 @@ About the new airlock wires panel:
if (1)
//disable idscan
if (src.isWireCut(AIRLOCK_WIRE_IDSCAN))
usr << "The IdScan wire has been cut - So, you can't disable it, but it is already disabled anyways."
usr.client_mob() << "The IdScan wire has been cut - So, you can't disable it, but it is already disabled anyways."
else if (src.aiDisabledIdScanner)
usr << "You've already disabled the IdScan feature."
usr.client_mob() << "You've already disabled the IdScan feature."
else
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
src.aiDisabledIdScanner = 1
else
usr << "Unable to disable ID Scanner due to power failure."
usr.client_mob() << "Unable to disable ID Scanner due to power failure."
if (2)
//disrupt main power
if (src.secondsMainPowerLost == 0)
src.loseMainPower()
else
usr << "Main power is already offline."
usr.client_mob() << "Main power is already offline."
if (3)
//disrupt backup power
if (src.secondsBackupPowerLost == 0)
src.loseBackupPower()
else
usr << "Backup power is already offline."
usr.client_mob() << "Backup power is already offline."
if (4)
//drop door bolts
if (src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
usr << "You can't drop the door bolts - The door bolt dropping wire has been cut."
usr.client_mob() << "You can't drop the door bolts - The door bolt dropping wire has been cut."
else if (src.locked!=1)
src.locked = 1
if (5)
@@ -718,16 +616,16 @@ About the new airlock wires panel:
if (7)
//close door
if (src.blocked)
usr << text("The airlock has been welded shut!<br>\n")
usr.client_mob() << text("The airlock has been welded shut!<br>\n")
else if (src.locked)
usr << text("The door bolts are down!<br>\n")
usr.client_mob() << text("The door bolts are down!<br>\n")
else if (!src.density)
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
close()
else
usr << "Unable to close door due to power failure."
usr.client_mob() << "Unable to close door due to power failure."
else
usr << text("The airlock is already closed.<br>\n")
usr.client_mob() << text("The airlock is already closed.<br>\n")
else if (href_list["aiEnable"])
var/code = text2num(href_list["aiEnable"])
@@ -735,36 +633,36 @@ About the new airlock wires panel:
if (1)
//enable idscan
if (src.isWireCut(AIRLOCK_WIRE_IDSCAN))
usr << "You can't enable IdScan - The IdScan wire has been cut."
usr.client_mob() << "You can't enable IdScan - The IdScan wire has been cut."
else if (src.aiDisabledIdScanner)
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
src.aiDisabledIdScanner = 0
else
usr << "Unable to enable ID Scanner due to power failure."
usr.client_mob() << "Unable to enable ID Scanner due to power failure."
else
usr << "The IdScan feature is not disabled."
usr.client_mob() << "The IdScan feature is not disabled."
if (4)
//raise door bolts
if (src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
usr << text("The door bolt drop wire is cut - you can't raise the door bolts.<br>\n")
usr.client_mob() << text("The door bolt drop wire is cut - you can't raise the door bolts.<br>\n")
else if (!src.locked)
usr << text("The door bolts are already up.<br>\n")
usr.client_mob() << text("The door bolts are already up.<br>\n")
else if (src.isWireCut(AIRLOCK_WIRE_POWER_ASSIST))
usr << text("The door bolts are not coming up - The power assist wire has been cut.<br>\n")
usr.client_mob() << text("The door bolts are not coming up - The power assist wire has been cut.<br>\n")
else
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
src.locked = 0
else
usr << text("Cannot raise door bolts due to power failure.<br>\n")
usr.client_mob() << text("Cannot raise door bolts due to power failure.<br>\n")
if (5)
//electrify door for 30 seconds
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
usr << text("The electrification wire has been cut.<br>\n")
usr.client_mob() << text("The electrification wire has been cut.<br>\n")
else if (src.secondsElectrified==-1)
usr << text("The door is already indefinitely electrified. You'd have to un-electrify it before you can re-electrify it with a non-forever duration.<br>\n")
usr.client_mob() << text("The door is already indefinitely electrified. You'd have to un-electrify it before you can re-electrify it with a non-forever duration.<br>\n")
else if (src.secondsElectrified!=0)
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
usr.client_mob() << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
src.secondsElectrified = 30
spawn(10)
@@ -777,26 +675,26 @@ About the new airlock wires panel:
if (6)
//electrify door indefinitely
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
usr << text("The electrification wire has been cut.<br>\n")
usr.client_mob() << text("The electrification wire has been cut.<br>\n")
else if (src.secondsElectrified==-1)
usr << text("The door is already indefinitely electrified.<br>\n")
usr.client_mob() << text("The door is already indefinitely electrified.<br>\n")
else if (src.secondsElectrified!=0)
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
usr.client_mob() << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
src.secondsElectrified = -1
if (7)
//open door
if (src.blocked)
usr << text("The airlock has been welded shut!<br>\n")
usr.client_mob() << text("The airlock has been welded shut!<br>\n")
else if (src.locked)
usr << text("The door bolts are down!<br>\n")
usr.client_mob() << text("The door bolts are down!<br>\n")
else if (src.density)
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
open()
else
usr << "Unable to open door due to power failure."
usr.client_mob() << "Unable to open door due to power failure."
else
usr << text("The airlock is already opened.<br>\n")
usr.client_mob() << text("The airlock is already opened.<br>\n")
src.updateIconState()
src.updateDialog()
@@ -824,7 +722,7 @@ About the new airlock wires panel:
if (W.weldfuel > 2)
W.weldfuel -= 2
else
user << "Need more welding fuel!"
user.client_mob() << "Need more welding fuel!"
return
if (!( src.blocked ))
src.blocked = 1
@@ -835,12 +733,12 @@ About the new airlock wires panel:
else if (istype(C, /obj/item/weapon/wrench))
if (src.p_open)
if (src.arePowerSystemsOn())
if (src.canBoltsBeRaisedManually())
if (src.canBoltsBeRaisedManually() || istype(user, /mob/drone))
src.locked = null
else
user << alert("You strain to try to raise the door bolts, but the door's power assist seems to be disabled!", null, null, null, null, null)
user.client_mob() << alert("You strain to try to raise the door bolts, but the door's power assist seems to be disabled!", null, null, null, null, null)
else
user << alert("You need power assist!", null, null, null, null, null)
user.client_mob() << alert("You need power assist!", null, null, null, null, null)
src.updateIconState()
else if (istype(C, /obj/item/weapon/screwdriver))
src.p_open = !( src.p_open )
+15 -4
View File
@@ -20,12 +20,17 @@ obj/machinery/door/false_wall
examine()
set src in oview(1)
usr << "It looks like a regular wall"
usr.client_mob() << "It looks like a regular wall"
// AI can't use secret doors
attack_ai(mob/user as mob)
return
if (user.currentDrone!=null)
if (get_dist(user.currentDrone, src)<=1)
if (src.density)
open()
else
close()
// Monkey interact - if in monkey mode, same as human
@@ -37,13 +42,19 @@ obj/machinery/door/false_wall
// Human interact - 25% chance to open the door
attack_hand(mob/user)
if (user.currentDrone!=null)
if (get_dist(user.currentDrone, src)<=1)
if (src.density)
open()
else
close()
src.add_fingerprint(user)
if (src.density)
if (prob(25))
open()
else
user << "\blue You push the wall but nothing happens!"
user.client_mob() << "\blue You push the wall but nothing happens!"
else
close()
+2 -2
View File
@@ -16,11 +16,11 @@ obj/machinery/door/firedoor
// Standard open and close procs do not work with firedoors
open()
usr << "This is a remote firedoor!"
usr.client_mob() << "This is a remote firedoor!"
close()
usr << "This is a remote firedoor!"
usr.client_mob() << "This is a remote firedoor!"
+2 -2
View File
@@ -15,10 +15,10 @@ obj/machinery/door/poddoor
// Standard open() and close() procs do not work
open()
usr << "This is a remote controlled door!"
usr.client_mob() << "This is a remote controlled door!"
close()
usr << "This is a remote controlled door!"
usr.client_mob() << "This is a remote controlled door!"
+3
View File
@@ -88,6 +88,9 @@ obj/machinery/door/window
return
var/obj/item/weapon/card/id/card // check if user is human and wearing ID
if (istype(user, /mob/drone))
if (user:controlledBy != null)
user = user:controlledBy
if (istype(user, /mob/human))
var/mob/human/H = user
card = H.wear_id
+1 -1
View File
@@ -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
View File
@@ -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
+8 -7
View File
@@ -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
+9 -8
View File
@@ -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
+7 -6
View File
@@ -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
+7 -6
View File
@@ -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
+7 -6
View File
@@ -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
+2 -2
View File
@@ -53,8 +53,8 @@ obj/machinery/alarm
if (usr.stat || stat & NOPOWER)
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!"
if (!istype(usr, /mob/ai) && !istype(usr, /mob/drone))
usr.client_mob() << "\red You don't have the dexterity to do this!"
return
var/turf/T = src.loc
if (!( istype(T, /turf) ))
+23 -12
View File
@@ -12,8 +12,8 @@ obj/machinery/autolathe
icon_state = "autolathe"
anchored = 1
var
m_amount = 0 // amount (cc) of metal loaded
g_amount = 0 // amount (cc) of glass loaded
m_amount = 0.0 // amount (cc) of metal loaded
g_amount = 0.0 // amount (cc) of glass loaded
operating = 0 // true if the machine is operating
opened = 0 // true if the machine is open (not fully implemented?)
temp = null // temporary intaction window text
@@ -42,22 +42,26 @@ obj/machinery/autolathe
src.opened = !( src.opened )
src.icon_state = text("autolathe[]", (src.opened ? "f" : null))
else
user << "\red The machine is in use. You can not maintain it now."
user.client_mob() << "\red The machine is in use. You can not maintain it now."
else
spawn( 0 )
src.attack_hand(user)
return
// Monkey interact same a human
// Monkey interact same as human
attack_paw(mob/user)
return src.attack_hand(user)
// And the AI's interact is still just the same.
attack_ai(mob/user)
return src.attack_hand(user)
// Open interaction window
// Currenty only pipe pieces can be made
attack_hand(mob/user)
if(stat & (BROKEN|NOPOWER))
@@ -78,6 +82,8 @@ obj/machinery/autolathe
L["manif"] = "Pipe manifold (15000 cc)"
L["junct"] = "Pipe junction (10000 cc)"
L["vent"] = "Pipe vent (10000 cc)"
if (config.enable_drones)
L["drone"] = "Robot drone (150,000 cc)"
/* L["screwdriver"] = "Make Screwdriver {40 cc}"
L["wirecutters"] = "Make Wirecutters {80 cc}"
L["wrench"] = "Make Wrench {150 cc}"
@@ -96,7 +102,7 @@ obj/machinery/autolathe
for(var/t in L)
dat += "<A href='?src=\ref[src];make=[t]'>[L["[t]"]]<BR>"
user << browse("<HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=autolathe")
user.client_mob() << browse("<HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=autolathe")
return
// Called by topic links from interaction window
@@ -107,10 +113,11 @@ obj/machinery/autolathe
if ((usr.stat || usr.restrained()))
return
if (!istype(usr, /mob/ai))
return
if(operating || (stat & NOPOWER))
return
if ( get_dist(src, usr) <= 1 && istype(src.loc, /turf) )
if ( (get_dist(src, usr) <= 1 || istype(usr, /mob/ai)) && istype(src.loc, /turf) )
usr.machine = src
src.add_fingerprint(usr)
@@ -128,6 +135,8 @@ obj/machinery/autolathe
C["manif"] = 15000
C["junct"] = 10000
C["vent"] = 10000
if (config.enable_drones)
C["drone"] = 150000
var/item = href_list["make"]
var/cost = C[item]
@@ -152,12 +161,14 @@ obj/machinery/autolathe
new /obj/item/weapon/pipe{ ptype = 6 }(src.loc)
if("vent")
new /obj/item/weapon/pipe{ ptype = 7 }(src.loc)
if("drone")
if (config.enable_drones)
var/mob/drone/drone = new /mob/drone(src.loc)
drone.nameDrone(numDronesInExistance)
numDronesInExistance ++
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
return
// Perform operation animation
+14
View File
@@ -27,6 +27,20 @@ obj/machinery/camera
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] has deactivated [src]!", 1)
src.icon_state = "camera1"
//check if anyone is looking through the camera
for (var/mob/M in world)
if (istype(M, /mob/ai))
if (M:current == src)
M.show_message("\red [user] has deactivated [src]!", 1)
M:current = null
M.reset_view(null)
else
if (M.machine!=null && istype(M.machine, /obj/machinery/computer/security))
if (M.machine:current == src)
M.show_message("\red [user] has deactivated [src]!", 1)
M.machine:current = null
M.machine = null
M.reset_view(null)
else
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] has reactivated [src]!", 1)
+3 -3
View File
@@ -24,13 +24,13 @@ obj/machinery/cell_charger
if(istype(W, /obj/item/weapon/cell))
if(charging)
user << "There is already a cell in the charger."
user.client_mob() << "There is already a cell in the charger."
return
else
user.drop_item()
W.loc = src
charging = W
user << "You insert the cell into the charger."
user.client_mob() << "You insert the cell into the charger."
chargelevel = -1
@@ -78,7 +78,7 @@ obj/machinery/cell_charger
charging.updateicon()
src.charging = null
user << "You remove the cell from the charger."
user.client_mob() << "You remove the cell from the charger."
chargelevel = -1
updateicon()
+2 -2
View File
@@ -75,9 +75,9 @@
return
if(connected)
usr << "A pipe connector for gas equipment. It is connected to \an [connected.name]."
usr.client_mob() << "A pipe connector for gas equipment. It is connected to \an [connected.name]."
else
usr << "A pipe connector for gas equipment. It is unconnected."
usr.client_mob() << "A pipe connector for gas equipment. It is unconnected."
+14 -14
View File
@@ -172,14 +172,15 @@ obj/machinery/cryo_cell
if (usr.stat != 0 || stat & NOPOWER)
return
if (src.occupant)
usr << "\blue <B>The cell is already occupied!</B>"
usr.client_mob() << "\blue <B>The cell is already occupied!</B>"
return
if (usr.abiotic())
usr << "Subject may not have abiotic items on."
usr.client_mob() << "Subject may not have abiotic items on."
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
if (usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "celltop_1"
@@ -200,10 +201,10 @@ obj/machinery/cryo_cell
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
return
if (src.occupant)
user << "\blue <B>The cell is already occupied!</B>"
user.client_mob() << "\blue <B>The cell is already occupied!</B>"
return
if (G.affecting.abiotic())
user << "Subject may not have abiotic items on."
user.client_mob() << "Subject may not have abiotic items on."
return
var/mob/M = G.affecting
if (M.client)
@@ -266,7 +267,7 @@ obj/machinery/cryo_cell
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (src.occupant.toxloss < 60 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.toxloss)
dat += text("[]\t-Burn Severity %: []</FONT>", (src.occupant.fireloss < 60 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.fireloss)
dat += text("<BR><BR><A href='?src=\ref[];mach_close=cryo'>Close</A>", user)
user << browse(dat, "window=cryo;size=400x500")
user.client_mob() << browse(dat, "window=cryo;size=400x500")
else
var/dat = text("<font color='blue'> <B>[]</B></FONT><BR>", stars("System Statistics:"))
if (src.gas.temperature > T0C)
@@ -297,15 +298,16 @@ obj/machinery/cryo_cell
dat += text("[]\t[]</FONT><BR>", (src.occupant.toxloss < 60 ? "<font color='blue'>" : "<font color='red'>"), stars(text("-Toxin Content %: []", src.occupant.toxloss)))
dat += text("[]\t[]</FONT>", (src.occupant.fireloss < 60 ? "<font color='blue'>" : "<font color='red'>"), stars(text("-Burn Severity %: []", src.occupant.fireloss)))
dat += text("<BR><BR><A href='?src=\ref[];mach_close=cryo'>Close</A>", user)
user << browse(dat, "window=cryo;size=400x500")
user.client_mob() << browse(dat, "window=cryo;size=400x500")
//This is for the emergency drain feature, for draining the cryo cell back into the freezer -shadowlord13
Topic(href, href_list)
..()
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.stat || usr.restrained()))
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
@@ -343,7 +345,7 @@ obj/machinery/cryo_cell
leak_to_turf()
src.add_fingerprint(usr)
else
usr << "User too far?"
usr.client_mob() << "User too far?"
return
// Called to remove the occupant of a cell
@@ -430,9 +432,7 @@ obj/machinery/cryo_cell
if (src.gas.temperature < (60+T0C))
src.gas.temperature = min(src.gas.temperature + 1, 60+T0C)
for(var/mob/E in viewers(1, src))
if ((E.client && E.machine == src))
src.attack_hand(E)
src.updateDialog()
+8 -8
View File
@@ -40,7 +40,7 @@ obj/machinery/dispenser
user.machine = src
var/dat = text("<TT><B>Loaded Tank Dispensing Unit</B><BR>\n<FONT color = 'blue'><B>Oxygen</B>: []</FONT> []<BR>\n<FONT color = 'orange'><B>Plasma</B>: []</FONT> []<BR>\n</TT>", src.o2tanks, (src.o2tanks ? text("<A href='?src=\ref[];oxygen=1'>Dispense</A>", src) : "empty"), src.pltanks, (src.pltanks ? text("<A href='?src=\ref[];plasma=1'>Dispense</A>", src) : "empty"))
user << browse(dat, "window=dispenser")
user.client_mob() << browse(dat, "window=dispenser")
return
// dispense a tank when topic link is clicked on from interaction window
@@ -51,10 +51,12 @@ obj/machinery/dispenser
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!"
if (!istype(usr, /mob/drone))
usr.client_mob() << "\red You don't have the dexterity to do this!"
return
else
usr << "\red You are unable to dispense anything, since the controls are physical levers which don't go through any other kind of input."
return
usr.client_mob() << "\red You are unable to dispense anything, since the controls are physical levers which don't go through any other kind of input."
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
@@ -78,11 +80,9 @@ obj/machinery/dispenser
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
usr << browse(null, "window=dispenser")
usr.client_mob() << browse(null, "window=dispenser")
return
return
+8 -5
View File
@@ -31,10 +31,13 @@ obj/machinery/firealarm
attackby(obj/item/weapon/W, mob/user)
if (istype(W, /obj/item/weapon/wirecutters))
src.detecting = !( src.detecting )
var/list/observers = viewers(user, null)
if (src.detecting)
viewers(user, null) << "\red [user] has reconnected [src]'s detecting unit!"
for (var/mob/M in observers)
M.client_mob() << "\red [user] has reconnected [src]'s detecting unit!"
else
viewers(user, null) << "\red [user] has disconnected [src]'s detecting unit!"
for (var/mob/M in observers)
M.client_mob() << "\red [user] has disconnected [src]'s detecting unit!"
else
src.alarm()
src.add_fingerprint(user)
@@ -109,7 +112,7 @@ obj/machinery/firealarm
var/second = src.time % 60
var/minute = (src.time - second) / 60
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>Fire alarm</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
user << browse(dat, "window=firealarm")
user.client_mob() << browse(dat, "window=firealarm")
else
A = A.loc
if (A.fire)
@@ -123,7 +126,7 @@ obj/machinery/firealarm
var/second = src.time % 60
var/minute = (src.time - second) / 60
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><B>[]</B> []\n<HR>\nTimer System: []<BR>\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>\n</TT></BODY></HTML>", stars("Fire alarm"), d1, d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
user << browse(dat, "window=firealarm")
user.client_mob() << browse(dat, "window=firealarm")
return
@@ -154,7 +157,7 @@ obj/machinery/firealarm
src.updateDialog()
src.add_fingerprint(usr)
else
usr << browse(null, "window=firealarm")
usr.client_mob() << browse(null, "window=firealarm")
return
return
+4 -4
View File
@@ -140,7 +140,7 @@ obj/machinery/freezer
else
t2 = text("<A href = '?src=\ref[];cool=1'>Cool</A> Stopped", src)
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><BR>\n\t\t<B>Temperature</B>: []<BR>\n\t\t<B>Transfer Status</B>: []<BR>\n\t\t <B>Chemicals Used</B>: []<BR>\n\t\t<B>Freezer status</B>: []<BR>\n\t\t <A href='?src=\ref[];cp=-5'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=5'>+</A><BR>\n<BR>\n\t[]<BR>\n<BR>\n<BR>\n\t<A href='?src=\ref[];mach_close=freezer'>Close</A><BR>\n\t</TT></BODY></HTML>", src.temperature-T0C, (src.transfer ? text("Transfering <A href='?src=\ref[];transfer=0'>Stop</A>", src) : text("<A href='?src=\ref[];transfer=1'>Transfer</A> Stopped", src)), t1, t2, src, src, src.c_used, src, src, d1, user)
user << browse(dat, "window=freezer;size=400x500")
user.client_mob() << browse(dat, "window=freezer;size=400x500")
else
var/d1 = null
if (locate(/obj/item/weapon/flasks, src))
@@ -169,7 +169,7 @@ obj/machinery/freezer
else
t2 = text("<A href = '?src=\ref[];cool=1'>Cool</A> []", src, stars("Stopped"))
var/dat = text("<HTML><HEAD></HEAD><BODY><TT><BR>\n\t\t<B>[]</B>: []<BR>\n\t\t<B>[]</B>: []<BR>\n\t\t <B>[]</B>: []<BR>\n\t\t<B>[]</B>: []<BR>\n\t\t <A href='?src=\ref[];cp=-5'>-</A> <A href='?src=\ref[];cp=-1'>-</A> [] <A href='?src=\ref[];cp=1'>+</A> <A href='?src=\ref[];cp=5'>+</A><BR>\n<BR>\n\t[]<BR>\n<BR>\n<BR>\n\t<A href='?src=\ref[];mach_close=freezer'>Close</A>\n\t</TT></BODY></HTML>", stars("Temperature"), src.temperature-T0C, stars("Transfer Status"), (src.transfer ? text("Transfering <A href='?src=\ref[];transfer=0'>Stop</A>", src) : text("<A href='?src=\ref[];transfer=1'>Transfer</A> Stopped", src)), stars("Chemicals Used"), t1, stars("Freezer status"), t2, src, src, src.c_used, src, src, d1, user)
user << browse(dat, "window=freezer;size=400x500")
user.client_mob() << browse(dat, "window=freezer;size=400x500")
// Handle topic links from interaction window
@@ -178,7 +178,7 @@ obj/machinery/freezer
..()
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 ((usr.stat || usr.restrained()))
if (!istype(usr, /mob/ai))
@@ -223,7 +223,7 @@ obj/machinery/freezer
if (!( istype(F, /obj/item/weapon/flasks) ))
return
if (src.contents.len >= 3)
user << "\blue All slots are full!"
user.client_mob() << "\blue All slots are full!"
return
else
user.drop_item()
+1 -1
View File
@@ -66,7 +66,7 @@ obj/machinery/igniter
var/turf/T = src.loc
if (locate(/obj/move, T))
T = locate(/obj/move, T)
if (T.firelevel < 900000.0)
if (T.firelevel < config.min_gas_for_fire)
T.firelevel = T.poison
+1 -1
View File
@@ -54,7 +54,7 @@ obj/machinery/light_switch
examine()
set src in oview(1)
if(usr && !usr.stat)
usr << "A light switch. It is [on? "on" : "off"]."
usr.client_mob() << "A light switch. It is [on? "on" : "off"]."
// Monkey interact same as human
+9 -6
View File
@@ -52,14 +52,17 @@ obj/machinery/meter
// If the meter is clicked on, report the flow rate and temperature of the gas
Click()
if (get_dist(usr, src) <= 3)
var/mob/user = usr
if (user.currentDrone!=null)
user = user.currentDrone
if (get_dist(user, src) <= 3)
if (src.target)
usr << text("\blue <B>Results:\nMass flow []%\nTemperature [] K</B>", round(100*abs(average)/6e6, 0.1), round(target.pl.gas.temperature,0.1))
user.client_mob() << text("\blue <B>Results:\nMass flow []%\nTemperature [] K</B>", round(100*abs(average)/6e6, 0.1), round(target.pl.gas.temperature,0.1))
else
usr << "\blue <B>Results: Connection Error!</B>"
user.client_mob() << "\blue <B>Results: Connection Error!</B>"
else
usr << "\blue <B>You are too far away.</B>"
user.client_mob() << "\blue <B>You are too far away.</B>"
return
// Disabled routines
@@ -83,6 +86,6 @@ obj/machinery/meter
else
t += "It is not functioning."
usr << t
usr.client_mob() << t
*/
+7 -10
View File
@@ -49,9 +49,7 @@ obj/machinery/nuclearbomb
if (src.timeleft <= 0)
explode()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
// Monkey interact same as human
@@ -139,7 +137,7 @@ Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle<BR>
<A href='?src=\ref[src];type=7'>7</A>-<A href='?src=\ref[src];type=8'>8</A>-<A href='?src=\ref[src];type=9'>9</A><BR>
<A href='?src=\ref[src];type=R'>R</A>-<A href='?src=\ref[src];type=0'>0</A>-<A href='?src=\ref[src];type=E'>E</A><BR>
</TT>"}
user << browse(dat, "window=nuclearbomb;size=300x400")
user.client_mob() << browse(dat, "window=nuclearbomb;size=300x400")
else // Deploy and anchor the bomb.
@@ -157,8 +155,9 @@ Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle<BR>
if (usr.stat || usr.restrained())
return
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
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.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
usr.machine = src
@@ -209,11 +208,9 @@ Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle<BR>
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
src.updateDialog()
else
usr << browse(null, "window=nuclearbomb")
usr.client_mob() << browse(null, "window=nuclearbomb")
return
+1 -1
View File
@@ -253,7 +253,7 @@ obj/machinery/pipes
if(WT.welding && WT.weldfuel > 3)
WT.weldfuel -=3
user << "\blue Cutting the pipe. Stand still as this takes some time."
user.client_mob() << "\blue Cutting the pipe. Stand still as this takes some time."
var/turf/T = user.loc
sleep(50)
+6 -4
View File
@@ -79,6 +79,8 @@ obj/machinery/pod
// Eject from pod - place player behind pod and restore view
//I left these all as regular .client since the verbs won't work if the mob doesn't have the client anyhow (a remote-controlled mob with no client won't be able to use the verbs). --shadowlord13
verb/eject()
set src = usr.loc
@@ -127,8 +129,8 @@ obj/machinery/pod
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\blue <B> [] loads [] into []!</B>", H, H.pulling, src)
if (O.hasClient() && (!( O.blinded )))
O.client_mob() << text("\blue <B> [] loads [] into []!</B>", H, H.pulling, src)
H.pulling = null
return
@@ -144,8 +146,8 @@ obj/machinery/pod
if (istype(A, /atom/movable))
A.loc = src.loc
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\blue <B> [] unloads [] from []!</B>", usr, A, src)
if (O.hasClient() && (!( O.blinded )))
O.client_mob() << text("\blue <B> [] unloads [] from []!</B>", usr, A, src)
//Foreach goto(54)
if (ismob(A))
var/mob/M = A
+7 -7
View File
@@ -96,7 +96,7 @@ obj/machinery/recon
if (usr.stat)
return
if (locate(/mob, src))
usr << "There is no room! You can only fit one person."
usr.client_mob() << "There is no room! You can only fit one person."
return
var/mob/M = usr
if (M.client)
@@ -117,10 +117,10 @@ obj/machinery/recon
var/mob/human/H = usr
if ((H.pulling && !( H.pulling.anchored )))
if (!( istype(H.pulling, /obj/item/weapon) ))
usr << "You may only place items in."
usr.client_mob() << "You may only place items in."
else
if ((locate(/mob, src) && ismob(H.pulling)))
usr << "There is no room! You can only fit one person."
usr.client_mob() << "There is no room! You can only fit one person."
else
H.pulling.loc = src
if (ismob(H.pulling))
@@ -129,8 +129,8 @@ obj/machinery/recon
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\blue <B> [] loads [] into []!</B>", H, H.pulling, src)
if (O.hasClient() && (!( O.blinded )))
O.client_mob() << text("\blue <B> [] loads [] into []!</B>", H, H.pulling, src)
//Foreach goto(204)
H.pulling = null
@@ -146,8 +146,8 @@ obj/machinery/recon
if (istype(A, /atom/movable))
A.loc = src.loc
for(var/mob/O in view(src, null))
if ((O.client && !( O.blinded )))
O << text("\blue <B> [] unloads [] from []!</B>", usr, A, src)
if ((!( O.blinded )))
O.client_mob() << text("\blue <B> [] unloads [] from []!</B>", usr, A, src)
//Foreach goto(53)
if (ismob(A))
var/mob/M = A
+5 -4
View File
@@ -70,7 +70,7 @@ Keycard: [src.scan ? "<A href='?src=\ref[src];card=1'>[src.scan.name]</A>" : "<A
<A href='?src=\ref[src];em_cl=1'>Emergency Close</A><BR>
<A href='?src=\ref[src];em_op=1'>Emergency Open</A><BR>"}
user << browse(dat, "window=sec_lock")
user.client_mob() << browse(dat, "window=sec_lock")
return
@@ -89,12 +89,13 @@ Keycard: [src.scan ? "<A href='?src=\ref[src];card=1'>[src.scan.name]</A>" : "<A
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.stat || usr.restrained()))
return
if ((!( src.d1 ) || !( src.d2 )))
usr << "\red Error: Cannot interface with door security!"
usr.client_mob() << "\red Error: Cannot interface with door security!"
return
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai))))
usr.machine = src
+18 -17
View File
@@ -46,14 +46,15 @@ obj/machinery/sleeper
if (usr.stat != 0)
return
if (src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
usr.client_mob() << "\blue <B>The sleeper is already occupied!</B>"
return
if (usr.abiotic())
usr << "Subject may not have abiotic items on."
usr.client_mob() << "Subject may not have abiotic items on."
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
if (usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "sleeper_1"
@@ -71,10 +72,10 @@ obj/machinery/sleeper
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
return
if (src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
user.client_mob() << "\blue <B>The sleeper is already occupied!</B>"
return
if (G.affecting.abiotic())
user << "Subject may not have abiotic items on."
user.client_mob() << "Subject may not have abiotic items on."
return
var/mob/M = G.affecting
if (M.client)
@@ -116,9 +117,9 @@ obj/machinery/sleeper
if (src.occupant)
if (src.occupant.rejuv < 60)
src.occupant.rejuv = 60
user << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", src.occupant.rejuv)
user.client_mob() << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", src.occupant.rejuv)
else
user << "No occupant!"
user.client_mob() << "No occupant!"
// Shows the health statistics of the occupant
@@ -126,7 +127,7 @@ obj/machinery/sleeper
proc/check(mob/user)
if (src.occupant)
user << "\blue <B>Occupant ([src.occupant]) Statistics:</B>"
user.client_mob() << "\blue <B>Occupant ([src.occupant]) Statistics:</B>"
var/t1
switch(src.occupant.stat)
if(0.0)
@@ -136,14 +137,14 @@ obj/machinery/sleeper
if(2.0)
t1 = "*dead*"
else
user << "[(src.occupant.health > 50 ? "\blue " : "\red ")]\t Health %: [src.occupant.health] ([t1])"
user << "[(src.occupant.oxyloss < 60 ? "\blue " : "\red ")]\t -Respiratory Damage %: [src.occupant.oxyloss]"
user << "[(src.occupant.toxloss < 60 ? "\blue " : "\red ")]\t -Toxin Content %: [src.occupant.toxloss]"
user << "[(src.occupant.fireloss < 60 ? "\blue " : "\red ")]\t -Burn Severity %: [src.occupant.fireloss]"
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
user << "\blue \t [src.occupant.paralysis / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)"
user.client_mob() << "[(src.occupant.health > 50 ? "\blue " : "\red ")]\t Health %: [src.occupant.health] ([t1])"
user.client_mob() << "[(src.occupant.oxyloss < 60 ? "\blue " : "\red ")]\t -Respiratory Damage %: [src.occupant.oxyloss]"
user.client_mob() << "[(src.occupant.toxloss < 60 ? "\blue " : "\red ")]\t -Toxin Content %: [src.occupant.toxloss]"
user.client_mob() << "[(src.occupant.fireloss < 60 ? "\blue " : "\red ")]\t -Burn Severity %: [src.occupant.fireloss]"
user.client_mob() << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
user.client_mob() << "\blue \t [src.occupant.paralysis / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)"
else
user << "\blue There is no one inside!"
user.client_mob() << "\blue There is no one inside!"
return
@@ -272,7 +273,7 @@ obj/machinery/computer/sleep_console
else
dat += "The sleeper is empty."
dat += "<BR><BR><A href='?src=\ref[user];mach_close=sleeper'>Close</A>"
user << browse(dat, "window=sleeper;size=400x500")
user.client_mob() << browse(dat, "window=sleeper;size=400x500")
// Handle topic links from interaction window
+31 -31
View File
@@ -9,7 +9,7 @@
if (target:stat==2)
if (target in turretTargets)
src.Exited(target)
/area/turret_protected/Entered(atom/movable/O)
if (istype(O, /mob))
@@ -20,7 +20,7 @@
//else
//O << "You're already in our target list!"
return 1
/area/turret_protected/Exited(atom/movable/O)
if (istype(O, /mob))
if (!istype(O, /mob/ai))
@@ -31,9 +31,9 @@
//O << "You aren't in our target list!"
if (turretTargets.len == 0)
popDownTurrets()
return 1
/area/turret_protected/proc/popDownTurrets()
for (var/obj/machinery/turret/aTurret in src)
aTurret.popDown()
@@ -90,7 +90,7 @@
/obj/machinery/turret/proc/setState(var/enabled, var/lethal)
src.enabled = enabled
src.lasers = lethal
src.power_change()
/obj/machinery/turret/process()
@@ -113,7 +113,7 @@
if (istype(loc, /area/turret_protected))
src.wasvalid = 1
var/area/turret_protected/tarea = loc
if (tarea.turretTargets.len>0)
if (!isPopping())
if (isDown())
@@ -126,7 +126,7 @@
src.shootAt(target)
else
tarea.subjectDied(target)
else
if (src.wasvalid)
src.die()
@@ -145,7 +145,7 @@
src.cover.icon_state = "openTurretCover"
spawn(10)
if (popping==1) popping = 0
/obj/machinery/turret/proc/popDown()
if ((!isPopping()) || src.popping==1)
popping = -1
@@ -153,11 +153,11 @@
flick("popdown", src.cover)
src.cover.icon_state = "turretCover"
spawn(10)
if (popping==-1)
if (popping==-1)
invisibility = 2
popping = 0
/obj/machinery/turret/proc/shootAt(var/mob/target)
var/turf/T = loc
var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
@@ -167,15 +167,15 @@
U = U.loc
if (!( istype(T, /turf) ))
return
var/obj/beam/a_laser/A
var/obj/beam/a_laser/A
if (src.lasers)
A = new /obj/beam/a_laser( loc )
use_power(50)
else
A = new /obj/beam/a_laser/s_laser( loc )
use_power(100)
if (!( istype(U, /turf) ))
//A = null
del(A)
@@ -196,7 +196,7 @@
//src.health -= 1
else
src.health -= 2
if (src.health <= 0)
src.die()
return
@@ -215,7 +215,7 @@
flick("explosion", src)
spawn(14)
del(src)
/obj/machinery/turretid
name = "Turret deactivation control"
icon = 'items.dmi'
@@ -227,7 +227,7 @@
var/locked = 1
var/access = "5555"
var/allowed = null
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN) return
if (istype(user, /mob/ai))
@@ -236,26 +236,26 @@
var/obj/item/weapon/card/id/I = W
if (I.check_access(access, allowed))
locked = !locked
user << "You [ locked ? "lock" : "unlock"] the panel."
user.client_mob() << "You [ locked ? "lock" : "unlock"] the panel."
if (locked)
if (user.machine==src)
user.machine = null
user << browse(null, "window=turretid")
user.client_mob() << browse(null, "window=turretid")
else
if (user.machine==src)
src.attack_hand(usr)
else
user << "\red Access denied."
user.client_mob() << "\red Access denied."
/obj/machinery/turretid/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/turretid/attack_hand(mob/user as mob)
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/ai))
user << text("Too far away.")
if (!istype(user, /mob/ai))
user.client_mob() << "Too far away."
user.machine = null
user << browse(null, "window=turretid")
user.client_mob() << browse(null, "window=turretid")
return
user.machine = src
@@ -263,7 +263,7 @@
if (istype(loc, /turf))
loc = loc:loc
if (!istype(loc, /area))
user << text("Turret badly positioned - loc.loc is [].", loc)
user.client_mob() << text("Turret badly positioned - loc.loc is [].", loc)
return
var/area/area = loc
var/t = "<TT><B>Turret Control Panel</B> ([area.name])<HR>"
@@ -273,8 +273,8 @@
else
t += text("Turrets [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable")
t += text("Currently set for [] - <A href='?src=\ref[];toggleLethal=1'>Change to []?</a><br>\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal")
user << browse(t, "window=turretid")
user.client_mob() << browse(t, "window=turretid")
/obj/machinery/turretid/Topic(href, href_list)
..()
@@ -282,7 +282,7 @@
return
if (src.locked)
if (!istype(usr, /mob/ai))
usr << "Control panel is locked!"
usr.client_mob() << "Control panel is locked!"
return
if (href_list["toggleOn"])
src.enabled = !src.enabled
@@ -291,7 +291,7 @@
src.lethal = !src.lethal
src.updateTurrets()
src.attack_hand(usr)
/obj/machinery/turretid/proc/updateTurrets()
if (src.enabled)
if (src.lethal)
@@ -300,7 +300,7 @@
icon_state = "motion3"
else
icon_state = "motion0"
var/loc = src.loc
if (istype(loc, /turf))
loc = loc:loc
@@ -308,6 +308,6 @@
world << text("Turret badly positioned - loc.loc is [].", loc)
return
var/area/area = loc
for (var/obj/machinery/turret/aTurret in area)
aTurret.setState(enabled, lethal)
+1 -1
View File
@@ -54,7 +54,7 @@ obj/machinery/valve
if(usr.stat)
return
usr << "[desc] It is [ open? "open" : "closed"]."
usr.client_mob() << "[desc] It is [ open? "open" : "closed"]."
// Find the connected nodes