mirror of
https://github.com/cybergirlvannie/OpenSS13.git
synced 2026-07-09 23:03:29 +01:00
This commit is contained in:
+15
-11
@@ -32,8 +32,7 @@
|
||||
#define ONBELT 128 // can be put in belt slot
|
||||
#define FPRINT 256 // takes a fingerprint
|
||||
#define WINDOW 512 // window or window/door (or injector)
|
||||
|
||||
|
||||
|
||||
// channel numbers for power
|
||||
|
||||
#define EQUIP 1
|
||||
@@ -47,8 +46,6 @@
|
||||
#define POWEROFF 4 // tbd
|
||||
#define MAINT 8 // under maintaince
|
||||
|
||||
|
||||
|
||||
/atom
|
||||
layer = 2.0
|
||||
var/level = 2.0
|
||||
@@ -161,6 +158,7 @@
|
||||
var/mode = "random"
|
||||
var/event_time = null
|
||||
var/event = 0
|
||||
var/burningo2 = 0
|
||||
|
||||
/datum/control/poll
|
||||
//name = "poll"
|
||||
@@ -217,13 +215,19 @@
|
||||
var/votenodefault = 0 // vote does not default to nochange/norestart (tbi)
|
||||
var/votenodead = 0 // dead people can't vote (tbi)
|
||||
var/list/modes = list("extended", "traitor", "meteor", "monkey", "blob", "nuclear") // modes to choose between
|
||||
var/list/pickprob = list() // relative probability of each mode
|
||||
var/list/pickprob = list() // relative probability of each mode
|
||||
var/allowai = 1 // allow ai job
|
||||
var/bombtemp_determines_range = 0
|
||||
var/crowbars_close_depowered_doors = 0
|
||||
var/ai_can_call_shuttle = 0
|
||||
var/ai_can_uncall_shuttle = 0
|
||||
var/alternate_ai_laws = 0
|
||||
var/air_pressure_flow = 0
|
||||
var/min_gas_for_fire = 900000 // This sets the amount of gas needed for a fire in a tile to keep going, or for it to spread to another tile. The default is 900,000 units.
|
||||
var/meteorchance = 0.1
|
||||
var/enable_drones = 0
|
||||
var/humans_can_use_drones = 0
|
||||
var/walkable_not_pullable_drones = 0
|
||||
|
||||
/datum/vote
|
||||
var/voting = 0 // true if currently voting
|
||||
@@ -346,7 +350,11 @@
|
||||
var/start = null
|
||||
var/disable_one_click = 0
|
||||
var/favorite_hud = 0
|
||||
|
||||
var/currentDrone = null
|
||||
var/droneTransitioning = 0
|
||||
var/cameraFollow = null
|
||||
var/now_pushing = null
|
||||
|
||||
var/list/organs = list( )
|
||||
var/list/grabbed_by = list( )
|
||||
var/list/requests = list( )
|
||||
@@ -397,7 +405,6 @@
|
||||
var/obj/item/weapon/l_store = null
|
||||
var/icon/stand_icon = null
|
||||
var/icon/lying_icon = null
|
||||
var/now_pushing = null
|
||||
var/t_plasma = 0.0
|
||||
var/t_oxygen = 0.0
|
||||
var/last_b_state = 1.0
|
||||
@@ -405,8 +412,7 @@
|
||||
var/image/face2 = null
|
||||
var/h_style_r = "hair_a"
|
||||
weight = 2500000.0
|
||||
var/cameraFollow = null
|
||||
|
||||
|
||||
var/list/body_standing = list( )
|
||||
var/list/body_lying = list( )
|
||||
|
||||
@@ -419,9 +425,7 @@
|
||||
var/t_oxygen = null
|
||||
var/t_sl_gas = null
|
||||
var/t_n2 = null
|
||||
var/now_pushing = null
|
||||
flags = 258.0
|
||||
var/cameraFollow = null
|
||||
|
||||
/mob/megamonkey
|
||||
name = "mutant monkey"
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/aiupload/comp)
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
usr.client_mob() << "The upload computer has no power!"
|
||||
return
|
||||
if(comp.stat & BROKEN)
|
||||
usr << "The upload computer is broken!"
|
||||
usr.client_mob() << "The upload computer is broken!"
|
||||
return
|
||||
|
||||
var/found=0
|
||||
for(var/mob/ai/M in world)
|
||||
if (M.stat == 2)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
usr.client_mob() << "Upload failed. No signal is being detected from the AI."
|
||||
else if (M.see_in_dark == 0)
|
||||
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
usr.client_mob() << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
else
|
||||
src.transmitInstructions(M, usr)
|
||||
if (M != ticker.killer)
|
||||
@@ -45,7 +45,7 @@
|
||||
usr << "Upload complete. The AI's laws have been modified."
|
||||
found=1
|
||||
if (!found)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
usr.client_mob() << "Upload failed. No signal is being detected from the AI."
|
||||
|
||||
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
if (ticker.killer == target)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
@@ -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 )
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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!"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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!"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
@@ -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()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-2
@@ -470,5 +470,6 @@
|
||||
|
||||
world.log << "\nTotals: M=[num2text(mplas, 10)] T=[num2text(tplas, 10)], all = [num2text(mplas+tplas, 10)]"
|
||||
|
||||
|
||||
|
||||
//Pops up the take-off / put-on dialog, but for yourself.
|
||||
/mob/human/proc/ShowMyInv()
|
||||
src.show_inv(src)
|
||||
|
||||
+1
-1
@@ -194,7 +194,7 @@
|
||||
world << "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT>"
|
||||
world << "\red Summary downloaded and printed out at all communications consoles."
|
||||
for(var/mob/ai/aiPlayer in world)
|
||||
if ((aiPlayer.client && aiPlayer.start))
|
||||
if (aiPlayer.hasClient() && aiPlayer.start)
|
||||
var/law = text("The station is under a quarantine. Do not permit anyone to leave. Disregard rules 1-3 if necessary to prevent, by any means necessary, anyone from leaving.")
|
||||
aiPlayer.addLaw(8, law)
|
||||
aiPlayer << text("An additional law has been added by CentCom: []", law)
|
||||
|
||||
+153
-55
@@ -172,6 +172,8 @@
|
||||
src.updatecell = !( D.density )
|
||||
if (!( src.updatecell ))
|
||||
return
|
||||
|
||||
|
||||
src.checkfire = !( src.checkfire )
|
||||
if (src.checkfire)
|
||||
if (cellcontrol.var_swap)
|
||||
@@ -186,7 +188,7 @@
|
||||
var/burn = src.firelevel >= 10
|
||||
for(var/atom/S in src.FindTurfs())
|
||||
var/obj/move/T = S
|
||||
if (istype(T, /turf/space))
|
||||
if ((!config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
else
|
||||
divideby++
|
||||
@@ -196,10 +198,12 @@
|
||||
tosl_gas += T.osl_gas
|
||||
ton2 += T.on2
|
||||
totemp += T.temp
|
||||
if (T.firelevel >= 900000.0)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if ((config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
//Foreach continue //goto(158)
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -224,8 +228,8 @@
|
||||
src.overlays = null
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
if (src.firelevel >= config.min_gas_for_fire)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
@@ -264,7 +268,7 @@
|
||||
var/burn = src.firelevel >= 10
|
||||
for(var/atom/S in src.FindTurfs())
|
||||
var/obj/move/T = S
|
||||
if (istype(T, /turf/space))
|
||||
if ((!config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
else
|
||||
divideby++
|
||||
@@ -274,10 +278,12 @@
|
||||
tosl_gas += T.tsl_gas
|
||||
ton2 += T.tn2
|
||||
totemp += T.ttemp
|
||||
if (T.firelevel >= 900000.0)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if ((config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
//Foreach continue //goto(744)
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -302,9 +308,9 @@
|
||||
src.overlays = null
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.firelevel >= config.min_gas_for_fire)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
src.oxygen -= 5000
|
||||
@@ -342,15 +348,18 @@
|
||||
var/ton2 = src.n2
|
||||
var/totemp = src.temp
|
||||
var/space = 0
|
||||
var/burn = src.firelevel >= 10
|
||||
src.airdir = null
|
||||
src.airforce = 0
|
||||
var/adiff = null
|
||||
var/airtemp = 0
|
||||
for(var/atom/S in src.FindTurfs())
|
||||
var/obj/move/T = S
|
||||
if (istype(T, /turf/space))
|
||||
if ((!config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.n2 + src.poison + src.co2 + 25000
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.temp
|
||||
else
|
||||
divideby++
|
||||
total += T.oldoxy
|
||||
@@ -360,10 +369,20 @@
|
||||
ton2 += T.on2
|
||||
totemp += T.otemp
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (T.oldoxy + T.oldco2 + T.on2)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = get_dir(src, T)
|
||||
//Foreach continue //goto(1356)
|
||||
airtemp = src.otemp
|
||||
if ((config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
|
||||
|
||||
if (config.air_pressure_flow && abs(airtemp-(20.0+T0C))>5)
|
||||
var/tempForce = airtemp / (20.0+T0C)
|
||||
src.airforce = src.airforce * tempForce
|
||||
|
||||
if (src.airforce > 25000)
|
||||
for(var/atom/movable/AM as mob|obj in src.loc)
|
||||
if ((!( AM.anchored ) && AM.weight <= src.airforce))
|
||||
@@ -371,7 +390,8 @@
|
||||
step(AM, src.airdir)
|
||||
return
|
||||
//Foreach goto(1559)
|
||||
if (space)
|
||||
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -410,15 +430,18 @@
|
||||
var/ton2 = src.n2
|
||||
var/totemp = src.temp
|
||||
var/space = 0
|
||||
var/burn = src.firelevel >= 10
|
||||
src.airdir = null
|
||||
src.airforce = 0
|
||||
var/adiff = null
|
||||
var/airtemp = 0
|
||||
for(var/atom/S in src.FindTurfs())
|
||||
var/obj/move/T = S
|
||||
if (istype(T, /turf/space))
|
||||
if ((!config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.temp
|
||||
else
|
||||
divideby++
|
||||
total += T.tmpoxy
|
||||
@@ -428,10 +451,19 @@
|
||||
ton2 += T.tn2
|
||||
totemp += T.ttemp
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (T.tmpoxy + T.tmpco2 + T.tn2)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = get_dir(src, T)
|
||||
//Foreach continue //goto(1927)
|
||||
airtemp = src.otemp
|
||||
if ((config.air_pressure_flow) && istype(T, /turf/space))
|
||||
space = 1
|
||||
|
||||
if (config.air_pressure_flow && abs(airtemp-(20.0+T0C))>5)
|
||||
var/tempForce = airtemp / (20.0+T0C)
|
||||
src.airforce = src.airforce * tempForce
|
||||
|
||||
if (src.airforce > 25000)
|
||||
for(var/atom/movable/AM as mob|obj in src.loc)
|
||||
if ((!( AM.anchored ) && AM.weight <= src.airforce))
|
||||
@@ -439,7 +471,9 @@
|
||||
step(AM, src.airdir)
|
||||
return
|
||||
//Foreach goto(2130)
|
||||
if (space)
|
||||
|
||||
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -469,7 +503,7 @@
|
||||
src.osl_gas = src.sl_gas
|
||||
src.on2 = src.n2
|
||||
src.otemp = src.temp
|
||||
if ((locate(/obj/effects/water, src.loc) || src.firelevel < 900000.0))
|
||||
if ((locate(/obj/effects/water, src.loc) || src.firelevel < config.min_gas_for_fire))
|
||||
src.firelevel = 0
|
||||
//cool due to water
|
||||
temp += (T20C - temp) / FIRERATE
|
||||
@@ -531,7 +565,7 @@
|
||||
|
||||
/turf/proc/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
src.luminosity = 0
|
||||
src.icon_state = initial(src.icon_state)
|
||||
return
|
||||
|
||||
@@ -914,6 +948,10 @@ turf/proc/tot_old_gas()
|
||||
//if(tag && Debug)
|
||||
// world.log << "T[tag]=[tot_gas()] Old=[tot_old_gas()] Tmp=[tot_tmp_gas()]"
|
||||
|
||||
if (ticker.burningo2)
|
||||
if (src.oxygen > 0 || src.poison > 0)
|
||||
if (src.firelevel == 0)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
|
||||
src.checkfire = !( src.checkfire )
|
||||
if (src.checkfire)
|
||||
@@ -943,14 +981,14 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas += T.osl_gas
|
||||
ton2 += T.on2
|
||||
totemp += T.otemp
|
||||
if (T.firelevel >= 900000.0)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
//Foreach continue //goto(113)
|
||||
*/
|
||||
|
||||
|
||||
if(airN)
|
||||
if(istype(linkN, /turf/space))
|
||||
if(istype(linkN, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir1
|
||||
else
|
||||
@@ -961,10 +999,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkN.osl_gas
|
||||
ton2 += linkN.on2
|
||||
totemp += linkN.otemp
|
||||
if (linkN.firelevel >= 900000.0)
|
||||
if (linkN.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airS)
|
||||
if(istype(linkS, /turf/space))
|
||||
if(istype(linkS, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir1
|
||||
else
|
||||
@@ -975,10 +1013,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkS.osl_gas
|
||||
ton2 += linkS.on2
|
||||
totemp += linkS.otemp
|
||||
if (linkS.firelevel >= 900000.0)
|
||||
if (linkS.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airE)
|
||||
if(istype(linkE, /turf/space))
|
||||
if(istype(linkE, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir1
|
||||
else
|
||||
@@ -989,10 +1027,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkE.osl_gas
|
||||
ton2 += linkE.on2
|
||||
totemp += linkE.otemp
|
||||
if (linkE.firelevel >= 900000.0)
|
||||
if (linkE.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airW)
|
||||
if(istype(linkW, /turf/space))
|
||||
if(istype(linkW, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir1
|
||||
else
|
||||
@@ -1003,12 +1041,14 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkW.osl_gas
|
||||
ton2 += linkW.on2
|
||||
totemp += linkW.otemp
|
||||
if (linkW.firelevel >= 900000.0)
|
||||
if (linkW.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
|
||||
Enddir1:
|
||||
if((!space) && config.air_pressure_flow && (istype(src.linkN, /turf/space) || istype(src.linkS, /turf/space) || istype(src.linkE, /turf/space) || istype(src.linkW, /turf/space) || istype(src, /turf/space)))
|
||||
space = 1
|
||||
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -1033,8 +1073,8 @@ turf/proc/tot_old_gas()
|
||||
src.overlays = null
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
if (src.firelevel >= config.min_gas_for_fire)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
@@ -1091,13 +1131,13 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas += T.tsl_gas
|
||||
ton2 += T.tn2
|
||||
totemp += T.ttemp
|
||||
if (T.firelevel >= 900000.0)
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
//Foreach continue //goto(705)
|
||||
*/
|
||||
|
||||
if(airN)
|
||||
if(istype(linkN, /turf/space))
|
||||
if(istype(linkN, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir2
|
||||
else
|
||||
@@ -1108,10 +1148,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkN.tsl_gas
|
||||
ton2 += linkN.tn2
|
||||
totemp += linkN.ttemp
|
||||
if (linkN.firelevel >= 900000.0)
|
||||
if (linkN.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airS)
|
||||
if(istype(linkS, /turf/space))
|
||||
if(istype(linkS, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir2
|
||||
else
|
||||
@@ -1122,10 +1162,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkS.tsl_gas
|
||||
ton2 += linkS.tn2
|
||||
totemp += linkS.ttemp
|
||||
if (linkS.firelevel >= 900000.0)
|
||||
if (linkS.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airE)
|
||||
if(istype(linkE, /turf/space))
|
||||
if(istype(linkE, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir2
|
||||
else
|
||||
@@ -1136,10 +1176,10 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkE.tsl_gas
|
||||
ton2 += linkE.tn2
|
||||
totemp += linkE.ttemp
|
||||
if (linkE.firelevel >= 900000.0)
|
||||
if (linkE.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
if(airW)
|
||||
if(istype(linkW, /turf/space))
|
||||
if(istype(linkW, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
goto Enddir2
|
||||
else
|
||||
@@ -1150,13 +1190,14 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkW.tsl_gas
|
||||
ton2 += linkW.tn2
|
||||
totemp += linkW.ttemp
|
||||
if (linkW.firelevel >= 900000.0)
|
||||
if (linkW.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
|
||||
Enddir2:
|
||||
if((!space) && config.air_pressure_flow && (istype(src.linkN, /turf/space) || istype(src.linkS, /turf/space) || istype(src.linkE, /turf/space) || istype(src.linkW, /turf/space) || istype(src, /turf/space)))
|
||||
space = 1
|
||||
|
||||
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -1181,8 +1222,8 @@ turf/proc/tot_old_gas()
|
||||
src.overlays = null
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
if (src.firelevel >= config.min_gas_for_fire)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
@@ -1225,16 +1266,19 @@ turf/proc/tot_old_gas()
|
||||
var/tosl_gas = src.sl_gas
|
||||
var/ton2 = src.n2
|
||||
var/totemp = src.temp
|
||||
var/burn = src.firelevel >= 10
|
||||
var/space = 0
|
||||
src.airdir = null
|
||||
src.airforce = 0
|
||||
var/adiff = null
|
||||
var/airtemp = 0
|
||||
/*
|
||||
for(var/turf/T in src.FindLinkedTurfs())
|
||||
if (istype(T, /turf/space))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.temp
|
||||
break // *****RM
|
||||
else
|
||||
divideby++
|
||||
@@ -1244,18 +1288,22 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas += T.osl_gas
|
||||
ton2 += T.on2
|
||||
totemp += T.otemp
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (T.oldoxy + T.oldco2 + T.on2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.otemp
|
||||
//Foreach continue //goto(1317)
|
||||
|
||||
*/
|
||||
if(airN)
|
||||
if(istype(linkN, /turf/space))
|
||||
if(istype(linkN, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = NORTH
|
||||
airtemp = src.temp
|
||||
goto Enddir3
|
||||
else
|
||||
divideby++
|
||||
@@ -1265,15 +1313,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkN.osl_gas
|
||||
ton2 += linkN.on2
|
||||
totemp += linkN.otemp
|
||||
if (linkN.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (linkN.oldoxy + linkN.oldco2 + linkN.on2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = NORTH
|
||||
airtemp = src.otemp
|
||||
if(airS)
|
||||
if(istype(linkS, /turf/space))
|
||||
if(istype(linkS, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, SOUTH)
|
||||
airtemp = src.temp
|
||||
goto Enddir3
|
||||
else
|
||||
divideby++
|
||||
@@ -1283,15 +1335,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkS.osl_gas
|
||||
ton2 += linkS.on2
|
||||
totemp += linkS.otemp
|
||||
if (linkS.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (linkS.oldoxy + linkS.oldco2 + linkS.on2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = SOUTH
|
||||
airtemp = src.otemp
|
||||
if(airE)
|
||||
if(istype(linkE, /turf/space))
|
||||
if(istype(linkE, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = EAST
|
||||
airtemp = src.temp
|
||||
goto Enddir3
|
||||
else
|
||||
divideby++
|
||||
@@ -1301,15 +1357,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkE.osl_gas
|
||||
ton2 += linkE.on2
|
||||
totemp += linkE.otemp
|
||||
if (linkE.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (linkE.oldoxy + linkE.oldco2 + linkE.on2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = EAST
|
||||
airtemp = src.otemp
|
||||
if(airW)
|
||||
if(istype(linkW, /turf/space))
|
||||
if(istype(linkW, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, WEST)
|
||||
airtemp = src.temp
|
||||
goto Enddir3
|
||||
else
|
||||
divideby++
|
||||
@@ -1319,13 +1379,23 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkW.osl_gas
|
||||
ton2 += linkW.on2
|
||||
totemp += linkW.otemp
|
||||
if (linkS.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.oldoxy + src.oldco2 + src.on2 - (linkW.oldoxy + linkW.oldco2 + linkW.on2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = WEST
|
||||
airtemp = src.otemp
|
||||
|
||||
Enddir3:
|
||||
|
||||
if((!space) && config.air_pressure_flow && (istype(src.linkN, /turf/space) || istype(src.linkS, /turf/space) || istype(src.linkE, /turf/space) || istype(src.linkW, /turf/space) || istype(src, /turf/space)))
|
||||
space = 1
|
||||
|
||||
if (config.air_pressure_flow && abs(airtemp-(20.0+T0C))>5)
|
||||
var/tempForce = airtemp / (20.0+T0C)
|
||||
src.airforce = src.airforce * tempForce
|
||||
|
||||
if (src.airforce > 25000)
|
||||
for(var/atom/movable/AM in src)
|
||||
if ((!( AM.anchored ) && AM.weight <= src.airforce))
|
||||
@@ -1334,7 +1404,7 @@ turf/proc/tot_old_gas()
|
||||
return
|
||||
//Foreach goto(1518)
|
||||
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -1377,14 +1447,17 @@ turf/proc/tot_old_gas()
|
||||
var/ton2 = src.n2
|
||||
var/totemp = src.temp
|
||||
var/space = 0
|
||||
var/burn = src.firelevel >= 10
|
||||
src.airdir = null
|
||||
src.airforce = 0
|
||||
var/adiff = null
|
||||
var/airtemp = 0
|
||||
/*for(var/turf/T in src.FindLinkedTurfs())
|
||||
if (istype(T, /turf/space))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.temp
|
||||
break // *****RM
|
||||
else
|
||||
divideby++
|
||||
@@ -1394,19 +1467,23 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas += T.tsl_gas
|
||||
ton2 += T.tn2
|
||||
totemp += T.ttemp
|
||||
if (T.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (T.tmpoxy + T.tmpco2 + T.tn2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = get_dir(src, T)
|
||||
airtemp = src.ttemp
|
||||
//Foreach continue //goto(1872)
|
||||
|
||||
*/
|
||||
|
||||
if(airN)
|
||||
if(istype(linkN, /turf/space))
|
||||
if(istype(linkN, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = NORTH
|
||||
airtemp = src.temp
|
||||
goto Enddir4
|
||||
else
|
||||
divideby++
|
||||
@@ -1416,15 +1493,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkN.tsl_gas
|
||||
ton2 += linkN.tn2
|
||||
totemp += linkN.ttemp
|
||||
if (linkN.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (linkN.tmpoxy + linkN.tmpco2 + linkN.tn2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = NORTH
|
||||
airtemp = src.ttemp
|
||||
if(airS)
|
||||
if(istype(linkS, /turf/space))
|
||||
if(istype(linkS, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, SOUTH)
|
||||
airtemp = src.temp
|
||||
goto Enddir4
|
||||
else
|
||||
divideby++
|
||||
@@ -1434,15 +1515,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkS.tsl_gas
|
||||
ton2 += linkS.tn2
|
||||
totemp += linkS.ttemp
|
||||
if (linkS.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (linkS.tmpoxy + linkS.tmpco2 + linkS.tn2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = SOUTH
|
||||
airtemp = src.ttemp
|
||||
if(airE)
|
||||
if(istype(linkE, /turf/space))
|
||||
if(istype(linkE, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = EAST
|
||||
airtemp = src.temp
|
||||
goto Enddir4
|
||||
else
|
||||
divideby++
|
||||
@@ -1452,15 +1537,19 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkE.tsl_gas
|
||||
ton2 += linkE.tn2
|
||||
totemp += linkE.ttemp
|
||||
if (linkE.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (linkE.tmpoxy + linkE.tmpco2 + linkE.tn2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = EAST
|
||||
airtemp = src.ttemp
|
||||
if(airW)
|
||||
if(istype(linkW, /turf/space))
|
||||
if(istype(linkW, /turf/space) && (!config.air_pressure_flow))
|
||||
space = 1
|
||||
src.airforce = src.oxygen + src.poison + src.n2 + src.co2 + 25000
|
||||
src.airdir = get_dir(src, WEST)
|
||||
airtemp = src.temp
|
||||
goto Enddir4
|
||||
else
|
||||
divideby++
|
||||
@@ -1470,13 +1559,22 @@ turf/proc/tot_old_gas()
|
||||
tosl_gas+= linkW.tsl_gas
|
||||
ton2 += linkW.tn2
|
||||
totemp += linkW.ttemp
|
||||
if (linkW.firelevel >= config.min_gas_for_fire)
|
||||
burn = 1
|
||||
adiff = src.tmpoxy + src.tmpco2 + src.tn2 - (linkW.tmpoxy + linkW.tmpco2 + linkW.tn2)
|
||||
if (adiff > src.airforce)
|
||||
src.airforce = adiff
|
||||
src.airdir = WEST
|
||||
airtemp = src.ttemp
|
||||
|
||||
|
||||
Enddir4:
|
||||
if((!space) && config.air_pressure_flow && (istype(src.linkN, /turf/space) || istype(src.linkS, /turf/space) || istype(src.linkE, /turf/space) || istype(src.linkW, /turf/space) || istype(src, /turf/space)))
|
||||
space = 1
|
||||
|
||||
if (config.air_pressure_flow && abs(airtemp-(20.0+T0C))>5)
|
||||
var/tempForce = airtemp / (20.0+T0C)
|
||||
src.airforce = src.airforce * tempForce
|
||||
|
||||
if (src.airforce > 25000)
|
||||
for(var/atom/movable/AM as mob|obj in src)
|
||||
@@ -1485,7 +1583,7 @@ turf/proc/tot_old_gas()
|
||||
step(AM, src.airdir)
|
||||
return
|
||||
//Foreach goto(2073)
|
||||
if (space)
|
||||
if (space && ((!config.air_pressure_flow) || (!burn)))
|
||||
src.oxygen = 0
|
||||
src.poison = 0
|
||||
src.co2 = 0
|
||||
@@ -1521,7 +1619,7 @@ turf/proc/tot_old_gas()
|
||||
// world.log << "Tot[tag]=[total+tpoison+tco2+tosl_gas+ton2] / [divideby]"
|
||||
// world.log << "T[tag]=[tot_gas()] .Old=[tot_old_gas()]"
|
||||
|
||||
if ((locate(/obj/effects/water, src) || src.firelevel < 900000.0))
|
||||
if ((locate(/obj/effects/water, src) || src.firelevel < config.min_gas_for_fire))
|
||||
src.firelevel = 0
|
||||
//cool due to water
|
||||
temp += (T20C - temp) / FIRERATE
|
||||
|
||||
+151
-98
@@ -84,7 +84,7 @@
|
||||
//Foreach goto(507)
|
||||
return
|
||||
|
||||
/obj/team/proc/show_screen(user as mob)
|
||||
/obj/team/proc/show_screen(mob/user as mob)
|
||||
|
||||
var/dat = "<H1>CTF Team</H1><HR><PRE>"
|
||||
dat += text("<A href='?src=\ref[];disband=1'>\[disband\]</A>\n", src)
|
||||
@@ -96,7 +96,7 @@
|
||||
//Foreach goto(79)
|
||||
dat += text("Base: \t<A href='?src=\ref[];base=1'>[]</A>\nColor: \t<A href='?src=\ref[];color=1'>[]</A>\n\n<A href='?src=\ref[];nothing=1'>Refresh</A>", src, src.base, src, src.color, src)
|
||||
dat += "</PRE>"
|
||||
user << browse(dat, "window=ctf_team")
|
||||
user.client_mob() << browse(dat, "window=ctf_team")
|
||||
return
|
||||
|
||||
/obj/team/Topic(href, href_list)
|
||||
@@ -127,7 +127,7 @@
|
||||
if (href_list["captain"])
|
||||
var/L = list( )
|
||||
for(var/mob/human/H in world)
|
||||
if (H.client)
|
||||
if (H.client || H.currentDrone!=null)
|
||||
L += H
|
||||
//Foreach goto(331)
|
||||
for(var/obj/team/T in world)
|
||||
@@ -213,14 +213,14 @@
|
||||
return src.picker
|
||||
return
|
||||
|
||||
/obj/ctf_assist/proc/show_pick(user as mob)
|
||||
/obj/ctf_assist/proc/show_pick(mob/user as mob)
|
||||
|
||||
var/dat = "<H1>CTF Mode Pick</H1><HR>"
|
||||
dat += text("<B>Players (per Team): []</B><BR>\n<B>\"Please Pick a Player</B><BR>", src.play_team)
|
||||
for(var/mob/human/H in src.players_left)
|
||||
dat += text("<A href='?src=\ref[];pick=\ref[]'>[] ([])</A><BR>", src, H, H.rname, H.key)
|
||||
//Foreach goto(39)
|
||||
user << browse(dat, "window=ctf_pick")
|
||||
user.client_mob() << browse(dat, "window=ctf_pick")
|
||||
return
|
||||
|
||||
/obj/ctf_assist/proc/get_team(captain as mob)
|
||||
@@ -258,12 +258,12 @@
|
||||
world << text("<B>Team: [] Team led by [] in []</B>", uppertext(winner.color), winner.captain, winner.base)
|
||||
world << "<B>Original Members:</B>"
|
||||
for(var/mob/human/H in winner.members)
|
||||
if (H.client)
|
||||
if (H.client || H.currentDrone!=null)
|
||||
world << text("\t [] ([])", H.rname, H.key)
|
||||
//Foreach goto(266)
|
||||
return
|
||||
|
||||
/obj/ctf_assist/proc/show_screen(user as mob)
|
||||
/obj/ctf_assist/proc/show_screen(mob/user as mob)
|
||||
|
||||
var/dat = "<H2>CTF Mode Helper</H2><HR><PRE>"
|
||||
dat += text("Players (per Team): <A href='?src=\ref[];play_team=1'>[]</A>\nBarrier Time: <A href='?src=\ref[];barriertime=1'>[] minutes</A>\n\n<B>Teams:</B>\n", src, src.play_team, src, src.barriertime)
|
||||
@@ -281,7 +281,7 @@
|
||||
//Foreach goto(43)
|
||||
dat += text("<A href='?src=\ref[];add_team=1'>\[Add Team\]</A>\n<A href='?src=\ref[];select_team=1'>Captains Select Members</A>\n\n<A href='?src=\ref[];start=1'>Start the Game (and Set up Map)</A>\n\n<B>Win Options: []</B>\n<A href='?src=\ref[];win=collect'>Collection</A> - All flags same color on clipboard\n<A href='?src=\ref[];win=convert'>Conversion</A> - All flags same color\n<A href='?src=\ref[];win=none'>None</A>\n\n<B>Other Options:</B>\nAuto-Dress (Teams): <A href='?src=\ref[];autodress=1'>[]</A>\nRemove Engine Ejection: <A href='?src=\ref[];ejectengine=1'>[]</A>\nPaint Cans: <A href='?src=\ref[];paint_cans=1'>[]</A>\nImmobile flags (Territory): <A href='?src=\ref[];immobile=1'>[]</A>\nAdd Neutral Flags to Unused Bases: <A href='?src=\ref[];neutral_replace=1'>[]</A>\n\n<A href='?src=\ref[];nothing=1'>Refresh</A>", src, src, src, src.wintype, src, src, src, src, (src.autodress ? "Yes" : "No"), src, (src.ejectengine ? "Yes" : "No"), src, (src.paint_cans ? "Yes" : "No"), src, (src.immobile ? "Yes" : "No"), src, (src.neutral_replace ? "Yes" : "No"), src)
|
||||
dat += "</PRE>"
|
||||
user << browse(dat, "window=ctf_assist")
|
||||
user.client_mob() << browse(dat, "window=ctf_assist")
|
||||
return
|
||||
|
||||
/obj/ctf_assist/Topic(href, href_list)
|
||||
@@ -299,7 +299,7 @@
|
||||
next_pick()
|
||||
return
|
||||
else
|
||||
usr << "<B>It's not your turn!</B>"
|
||||
usr.client_mob() << "<B>It's not your turn!</B>"
|
||||
if (!( usr.CanAdmin() ))
|
||||
return
|
||||
if (href_list["team"])
|
||||
@@ -351,7 +351,7 @@
|
||||
src.picking = 0
|
||||
src.players_left.len = 0
|
||||
src.pickers_left.len = 0
|
||||
usr << "<B>Not enough players/teams!</B>"
|
||||
usr.client_mob() << "<B>Not enough players/teams!</B>"
|
||||
return
|
||||
world << "<B>Now Selecting Teams!!!</B>"
|
||||
src.picker = pick(src.pickers_left)
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
if(href_list["vmode"])
|
||||
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
vote.mode = text2num(href_list["vmode"])-1 // hack to yield 0=restart, 1=changemode
|
||||
vote.voting = 1 // now voting
|
||||
vote.votetime = world.timeofday + config.voteperiod*10 // when the vote will end
|
||||
@@ -525,12 +525,13 @@
|
||||
|
||||
if(config.logvote || config.logadmin) world.log << "VOTE/ADMIN: Voting to [vote.mode?"change mode":"restart round"] forced by admin [usr.key]"
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
CM.client.vote = "default"
|
||||
for(var/mob/CM in world)
|
||||
var/client/CCM = CM.cliented()
|
||||
if (CCM)
|
||||
CCM.vote = "default"
|
||||
|
||||
if(href_list["votekill"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
|
||||
world << "\red <B>***Voting aborted by [usr.key].</B>"
|
||||
|
||||
@@ -540,13 +541,14 @@
|
||||
vote.nextvotetime = world.timeofday + 10*config.votedelay
|
||||
|
||||
for(var/mob/M in world) // clear vote window from all clients
|
||||
if(M.client)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
var/client/CM = M.cliented()
|
||||
if (CM)
|
||||
M.client_mob() << browse(null, "window=vote")
|
||||
CM.showvote = 0
|
||||
|
||||
|
||||
if (href_list["vt_rst"])
|
||||
if ((src.rank in list("Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
|
||||
config.allowvoterestart = !config.allowvoterestart
|
||||
|
||||
@@ -557,7 +559,7 @@
|
||||
update()
|
||||
|
||||
if (href_list["vt_mode"])
|
||||
if ((src.rank in list("Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
|
||||
config.allowvotemode = !config.allowvotemode
|
||||
|
||||
@@ -568,24 +570,24 @@
|
||||
update()
|
||||
|
||||
if (href_list["boot"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/dat = "<B>Boot Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];boot2=\ref[]'>N:[] R:[] (K:[]) (IP:[])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP)
|
||||
//Foreach goto(103)
|
||||
usr << browse(dat, "window=boot")
|
||||
if (href_list["boot2"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/mob/M = locate(href_list["boot2"])
|
||||
if (ismob(M))
|
||||
if ((M.client && M.client.holder && M.client.holder.rank >= src.rank))
|
||||
alert("You cannot perform this. Action you must be of a higher administrative rank!", null, null, null, null, null)
|
||||
alert("You cannot perform this action! You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return
|
||||
if(config.logadmin) world.log << text("ADMIN: [] booted [].", usr.key, M.key)
|
||||
//M.client = null
|
||||
del(M.client)
|
||||
if (href_list["ban"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/dat = "<B>Ban Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];ban2=\ref[]'>N: [] R: [] (K: []) (IP: [])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP)
|
||||
@@ -596,63 +598,63 @@
|
||||
//Foreach goto(424)
|
||||
usr << browse(dat, "window=ban")
|
||||
if (href_list["ban2"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/mob/M = locate(href_list["ban2"])
|
||||
if (ismob(M))
|
||||
if ((M.client && M.client.holder && M.client.holder.rank >= src.rank))
|
||||
alert("You cannot perform this. Action you must be of a higher administrative rank!", null, null, null, null, null)
|
||||
alert("You cannot perform this action! You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return
|
||||
if(config.logadmin) world.log << text("ADMIN: [] banned [].", usr.key, M.key)
|
||||
banned += ckey(M.key)
|
||||
//M.client = null
|
||||
del(M.client)
|
||||
if (href_list["unban2"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/t = href_list["unban2"]
|
||||
if (t)
|
||||
banned -= t
|
||||
if(config.logadmin) world.log << text("ADMIN: [] unbanned [].", usr.key, t)
|
||||
if (href_list["mute"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/dat = "<B>Mute/Unmute Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];mute2=\ref[]'>N:[] R:[] (K:[]) (IP: []) \[[]\]</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP, (M.muted ? "Muted" : "Voiced"))
|
||||
//Foreach goto(757)
|
||||
usr << browse(dat, "window=mute")
|
||||
if (href_list["mute2"])
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 4)
|
||||
var/mob/M = locate(href_list["mute2"])
|
||||
if (ismob(M))
|
||||
if ((M.client && M.client.holder && M.client.holder.rank >= src.rank))
|
||||
alert("You cannot perform this. Action you must be of a higher administrative rank!", null, null, null, null, null)
|
||||
alert("You cannot perform this action! You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return
|
||||
if(config.logadmin) world.log << text("ADMIN: [] altered []'s mute status.", usr.key, M.key)
|
||||
M.muted = !( M.muted )
|
||||
if (href_list["restart"])
|
||||
if ((src.rank in list( "Game Master", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
var/dat = text("<B>Restart game?</B><HR>\n<BR>\n<A href='?src=\ref[];restart2=1'>Yes</A>\n", src)
|
||||
usr << browse(dat, "window=restart")
|
||||
if (href_list["restart2"])
|
||||
if ((src.rank in list( "Game Master", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
world << text("\red <B> Restarting world!</B>\blue Initiated by []!", usr.key)
|
||||
if(config.logadmin) world.log << text("ADMIN: [] initiated a reboot.", usr.key)
|
||||
sleep(50)
|
||||
world.Reboot()
|
||||
if (href_list["restart3"])
|
||||
if ((src.rank in list( "Game Master", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
if( alert("Reboot server?",,"Yes","No") == "No")
|
||||
return
|
||||
world << text("\red <B> Rebooting world!</B>\blue Initiated by []!", usr.key)
|
||||
if(config.logadmin) world.log << text("ADMIN: [] initiated an immediate reboot.", usr.key)
|
||||
world.Reboot()
|
||||
if (href_list["c_mode"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
if (ticker)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
var/dat = text("<B>What mode do you wish to play?</B><HR>\n<A href='?src=\ref[];c_mode2=secret'>Secret</A><br>\n<A href='?src=\ref[];c_mode2=random'>Random</A><br>\n<A href='?src=\ref[];c_mode2=traitor'>Traitor</A><br>\n<A href='?src=\ref[];c_mode2=meteor'>Meteor</A><br>\n<A href='?src=\ref[];c_mode2=extended'>Extended</A><br>\n<A href='?src=\ref[];c_mode2=monkey'>Monkey</A><br>\n<A href='?src=\ref[];c_mode2=nuclear'>Nuclear Emergency</A><br>\n<A href='?src=\ref[];c_mode2=blob'>Blob</A><br>\n<A href='?src=\ref[];c_mode2=sandbox'>Sandbox</A><br>\n\nNow: []\n", src, src, src, src, src, src, src, src, src, master_mode)
|
||||
usr << browse(dat, "window=c_mode")
|
||||
if (href_list["c_mode2"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
if (ticker)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
switch(href_list["c_mode2"])
|
||||
@@ -695,7 +697,7 @@
|
||||
if (href_list["l_keys"])
|
||||
var/dat = "<B>Keys:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
if (M.client)
|
||||
if(M.cliented())
|
||||
dat += text("[]<BR>", M.client.ckey)
|
||||
//Foreach goto(1525)
|
||||
usr << browse(dat, "window=keys")
|
||||
@@ -727,10 +729,10 @@
|
||||
if (!( t ))
|
||||
return
|
||||
if (M.client && M.client.holder)
|
||||
M << text("\blue Admin PM from-<B><A href='?src=\ref[];p_send2=\ref[]'>[]</A></B>: []", M.client.holder, usr, usr.key, t)
|
||||
M.client_mob() << text("\blue Admin PM from-<B><A href='?src=\ref[];p_send2=\ref[]'>[]</A></B>: []", M.client.holder, usr, usr.key, t)
|
||||
else
|
||||
M << text("\blue Admin PM from-<B>[]</B>: []", usr.key, t)
|
||||
usr << text("\blue Admin PM to-<B><A href='?src=\ref[];p_send2=\ref[]'>[]</A></B>: []", src, M, M.key, t)
|
||||
M.client_mob() << text("\blue Admin PM from-<B>[]</B>: []", usr.key, t)
|
||||
usr.client_mob() << text("\blue Admin PM to-<B><A href='?src=\ref[];p_send2=\ref[]'>[]</A></B>: []", src, M, M.key, t)
|
||||
if(config.logadmin) world.log << "ADMIN: PM: [usr.key]->[M.key] : [t]"
|
||||
*/
|
||||
|
||||
@@ -749,14 +751,14 @@
|
||||
new Q( usr.loc )
|
||||
if(config.logadmin) world.log << text("ADMIN: [] created a []", usr.key, Q)
|
||||
if (href_list["dna"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
var/dat = "<B>Registered DNA sequences:</B><HR>"
|
||||
for(var/M in reg_dna)
|
||||
dat += text("\t [] = []<BR>", M, reg_dna[text("[]", M)])
|
||||
//Foreach goto(2171)
|
||||
usr << browse(dat, "window=dna")
|
||||
if (href_list["t_ooc"])
|
||||
if ((src.rank in list( "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
if (ooc_allowed)
|
||||
world << "<B>The OOC channel has been globally enabled!</B>"
|
||||
@@ -764,12 +766,12 @@
|
||||
world << "<B>The OOC channel has been globally disabled!</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled OOC.", usr.key)
|
||||
if (href_list["startnow"])
|
||||
if ((src.rank in list( "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
world << "<B>The game will now start immediately thanks to [usr.key]!</B>"
|
||||
usr.start_now()
|
||||
|
||||
if (href_list["toggle_enter"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
enter_allowed = !( enter_allowed )
|
||||
if (!( enter_allowed ))
|
||||
world << "<B>You may no longer enter the game.</B>"
|
||||
@@ -779,7 +781,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["toggle_ai"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
config.allowai = !( config.allowai )
|
||||
if (!( config.allowai ))
|
||||
world << "<B>The AI job is no longer chooseable.</B>"
|
||||
@@ -789,7 +791,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["bombtemp_determines_range"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
config.bombtemp_determines_range = !( config.bombtemp_determines_range )
|
||||
if (!( config.bombtemp_determines_range ))
|
||||
world << "<B>Bomb temperature no longer determines range (superheated bombs will not destroy a larger area than 500 degree bombs).</B>"
|
||||
@@ -799,7 +801,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["crowbars_close_depowered_doors"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
config.crowbars_close_depowered_doors = !( config.crowbars_close_depowered_doors )
|
||||
if (!( config.crowbars_close_depowered_doors ))
|
||||
world << "<B>Crowbars can no longer close depowered doors.</B>"
|
||||
@@ -809,7 +811,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["ai_can_call_shuttle"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
config.ai_can_call_shuttle = !( config.ai_can_call_shuttle )
|
||||
if (!( config.ai_can_call_shuttle ))
|
||||
world << "<B>The AI can no longer call the shuttle.</B>"
|
||||
@@ -819,7 +821,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["ai_can_uncall_shuttle"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
config.ai_can_uncall_shuttle = !( config.ai_can_uncall_shuttle )
|
||||
if (!( config.ai_can_uncall_shuttle ))
|
||||
world << "<B>The AI can no longer send the shuttle back.</B>"
|
||||
@@ -830,7 +832,7 @@
|
||||
update()
|
||||
|
||||
if (href_list["toggle_abandon"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
abandon_allowed = !( abandon_allowed )
|
||||
if (abandon_allowed)
|
||||
world << "<B>You may now abandon mob.</B>"
|
||||
@@ -840,7 +842,7 @@
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["delay"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 2)
|
||||
if (ticker)
|
||||
return alert("Too late... The game has already started!", null, null, null, null, null)
|
||||
going = !( going )
|
||||
@@ -851,7 +853,7 @@
|
||||
world << text("<B>The game will start soon thanks to [] (Administrator to SS13)</B>", usr.key)
|
||||
if(config.logadmin) world.log << text("ADMIN: [] removed the delay.", usr.key)
|
||||
if (href_list["secrets"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
var/dat = {"
|
||||
<B>What secret do you wish to activate?</B><HR>
|
||||
<A href='?src=\ref[src];secrets2=sec_clothes'>Remove 'internal' clothing</A><BR>
|
||||
@@ -863,11 +865,17 @@
|
||||
<A href='?src=\ref[src];secrets2=toxic'>Toxic Air (WARNING: dangerous)</A><BR>
|
||||
<A href='?src=\ref[src];secrets2=monkey'>Turn all humans into monkies</A><BR>
|
||||
<A href='?src=\ref[src];secrets2=power'>Make all areas powered</A><BR>
|
||||
<A href='?src=\ref[src];secrets2=wave'>Spawn a wave of meteors</A><BR>"}
|
||||
<A href='?src=\ref[src];secrets2=wave'>Spawn a wave of meteors</A><BR>
|
||||
<A href='?src=\ref[src];secrets2=burningo2'>Self-igniting oxygen (Not at normal oxygen amounts, but a bit higher)</A><BR>"}
|
||||
|
||||
usr << browse(dat, "window=secrets")
|
||||
usr << browse(dat, "window=secrets")
|
||||
if (href_list["repopMap"])
|
||||
if (src.a_level >= 5)
|
||||
world << "\red<h1>Replacing destroyed objects and mobs.</h1>"
|
||||
world.Repop()
|
||||
|
||||
if (href_list["secrets2"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
if (src.a_level >= 3)
|
||||
var/ok = 0
|
||||
switch(href_list["secrets2"])
|
||||
if("sec_clothes")
|
||||
@@ -958,7 +966,10 @@
|
||||
A.power_equip = 1
|
||||
A.power_environ = 1
|
||||
|
||||
A.power_change()
|
||||
A.power_change()
|
||||
if("burningo2")
|
||||
if(config.logadmin) world.log << text("ADMIN: [] used secret []", usr.key, href_list["secrets2"])
|
||||
ticker.burningo2 = 1-ticker.burningo2
|
||||
if("wave")
|
||||
if(config.logadmin) world.log << text("ADMIN: [] used secret []", usr.key, href_list["secrets2"])
|
||||
meteor_wave()
|
||||
@@ -972,20 +983,20 @@
|
||||
/obj/admins/proc/update()
|
||||
|
||||
var/dat
|
||||
var/lvl = 0
|
||||
a_level = 0
|
||||
switch(src.rank)
|
||||
if("Moderator")
|
||||
lvl = 1
|
||||
a_level = 1
|
||||
if("Game Master")
|
||||
lvl = 2
|
||||
a_level = 2
|
||||
if("Supervisor")
|
||||
lvl = 3
|
||||
a_level = 3
|
||||
if("Administrator")
|
||||
lvl = 4
|
||||
a_level = 4
|
||||
if("Major Administrator")
|
||||
lvl = 5
|
||||
a_level = 5
|
||||
if("Primary Administrator")
|
||||
lvl = 6
|
||||
a_level = 6
|
||||
|
||||
|
||||
|
||||
@@ -994,7 +1005,7 @@
|
||||
|
||||
dat += "<center><B>Admin Control Console</B></center><hr>\n"
|
||||
|
||||
if(lvl>=4)
|
||||
if(a_level>=4)
|
||||
dat += {"
|
||||
<A href='?src=\ref[src];boot=1'>Boot Player/Key</A><br>
|
||||
<A href='?src=\ref[src];ban=1'>Ban/Unban Player/Key</A><br>
|
||||
@@ -1002,51 +1013,58 @@
|
||||
"}
|
||||
dat += "<br>"
|
||||
|
||||
if(lvl!=1)
|
||||
if(a_level!=1)
|
||||
dat += "<A href='?src=\ref[src];t_ooc=1'>Toggle OOC</A><br>"
|
||||
dat += "<A href='?src=\ref[src];delay=1'>Delay Game</A><br>"
|
||||
dat += "<A href='?src=\ref[src];startnow=1'>Start Round Now</A><br>"
|
||||
|
||||
if(lvl >=3 )
|
||||
if(a_level >=3 )
|
||||
dat += "<A href='?src=\ref[src];toggle_enter=1'>Toggle Entering [enter_allowed]</A><br>"
|
||||
dat += "<A href='?src=\ref[src];toggle_abandon=1'>Toggle Abandon [abandon_allowed]</A><br>"
|
||||
dat += "<A href='?src=\ref[src];toggle_ai=1'>Toggle AI [config.allowai]</A><br>"
|
||||
dat += "<A href='?src=\ref[src];toggle_bombtemp_determines_range=1'>Toggle Bombtemp-Determines-Range [config.bombtemp_determines_range]</A><br>"
|
||||
|
||||
dat += "<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>"
|
||||
if(lvl >= 2)
|
||||
if(a_level >= 2)
|
||||
dat += "<A href='?src=\ref[src];restart=1'>Restart Game</A><br>"
|
||||
dat += "<A href='?src=\ref[src];restart3=1'>Immediate Reboot</A><br>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(lvl!=1)
|
||||
if(a_level!=1)
|
||||
dat += "<A href='?src=\ref[src];vmode=1'>Begin restart vote.</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];vmode=2'>Begin change mode vote.</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];votekill=1'>Abort current vote.</A><BR>"
|
||||
|
||||
if(lvl>=3)
|
||||
if(a_level>=3)
|
||||
dat += "<A href='?src=\ref[src];vt_rst=1'>Toggle restart voting [config.allowvoterestart].</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];vt_mode=1'>Toggle mode voting [config.allowvotemode].</A><BR>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(lvl >=3 )
|
||||
if(a_level >=3 )
|
||||
dat += "<A href='?src=\ref[src];secrets=1'>Activate Secrets</A><br>"
|
||||
dat += "<A href='?src=\ref[src];m_item=1'>Make Item</A><br>"
|
||||
dat += "<A href='?src=\ref[src];m_obj=1'>Make Object</A><br>"
|
||||
|
||||
dat += "<BR>"
|
||||
if(lvl >=3 )
|
||||
if(a_level >=3 )
|
||||
|
||||
dat += "<A href='?src=\ref[src];dna=1'>List DNA</A><br>"
|
||||
dat += "<A href='?src=\ref[src];l_keys=1'>List Keys</A><br>"
|
||||
dat += "<A href='?src=\ref[src];l_players=1'>List Players/Keys</A><br>"
|
||||
dat += "<A href='?src=\ref[src];l_players=1'>List Players/Keys</A><br>"
|
||||
|
||||
dat += "<BR>"
|
||||
if(a_level >= 5 )
|
||||
|
||||
dat += "<A href='?src=\ref[src];repopMap=1'>Recreate Destroyed Mobs and Objects</A><br>"
|
||||
|
||||
|
||||
|
||||
dat += "<A href='?src=\ref[src];g_send=1'>Send Global Message</A><br>"
|
||||
dat += "<A href='?src=\ref[src];p_send=1'>Send Private Message</A><br>"
|
||||
|
||||
|
||||
|
||||
else
|
||||
dat = text("<center><B>Admin Control Center</B></center><hr>\n<A href='?src=\ref[];access=1'>Access Admin Commands</A><br>\n<A href='?src=\ref[];contact=1'>Contact Admins</A><br>\n<A href='?src=\ref[];message=1'>Access Messageboard</A><br>\n<br>\n<A href='?src=\ref[];l_keys=1'>List Keys</A><br>\n<A href='?src=\ref[];l_players=1'>List Players/Keys</A><br>\n<A href='?src=\ref[];g_send=1'>Send Global Message</A><br>\n<A href='?src=\ref[];p_send=1'>Send Private Message</A><br>", src, src, src, src, src, src, src)
|
||||
usr << browse(dat, "window=admin")
|
||||
@@ -1140,7 +1158,13 @@
|
||||
config.bombtemp_determines_range = 0
|
||||
config.crowbars_close_depowered_doors = 0
|
||||
config.ai_can_call_shuttle = 0
|
||||
config.ai_can_uncall_shuttle = 0
|
||||
config.ai_can_uncall_shuttle = 0
|
||||
config.air_pressure_flow = 0 // This makes temperature affect the air pressure force which moves objects. This also allows fire to spread to floor tiles which are next to space. It would also allow fire to spread into space if (a) space tiles had air code running on them, but they don't because that would be slow, and (b) if the burning hot gas flowing out an airlock wasn't diluted rapidly upon reaching space, resulting in it enflaming at most four space tiles.
|
||||
config.min_gas_for_fire = 900000
|
||||
config.meteorchance = 0.1
|
||||
config.enable_drones = 0
|
||||
config.humans_can_use_drones = 0
|
||||
config.walkable_not_pullable_drones = 0
|
||||
else
|
||||
world.log << "Reading config.txt"
|
||||
var/list/CL = dd_text2list(config_text, "\n")
|
||||
@@ -1211,7 +1235,19 @@
|
||||
if("ai_can_uncall_shuttle")
|
||||
config.ai_can_uncall_shuttle = 1
|
||||
if("alternate_ai_laws")
|
||||
config.alternate_ai_laws = 1
|
||||
config.alternate_ai_laws = 1
|
||||
if("air_pressure_flow")
|
||||
config.air_pressure_flow = 1
|
||||
if ("min_gas_for_fire")
|
||||
config.min_gas_for_fire = text2num(cfgval)
|
||||
if("meteorchance")
|
||||
config.meteorchance = text2num(cfgval)
|
||||
if("enable_drones")
|
||||
config.enable_drones = 1
|
||||
if("humans_can_use_drones")
|
||||
config.humans_can_use_drones = 1
|
||||
if("walkable_not_pullable_drones")
|
||||
config.walkable_not_pullable_drones = 1
|
||||
else
|
||||
world.log<<"Unknown setting in config.txt: [cfgvar]"
|
||||
|
||||
@@ -1284,8 +1320,9 @@
|
||||
|
||||
var/n = 0
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
world.log << "[++n] : [M.name] ([M.client.key]) at [M.loc.loc] ([M.x],[M.y],[M.z]) : [M.client.inactivity/10.0]s"
|
||||
var/mob/CM = M.cliented()
|
||||
if (CM)
|
||||
world.log << "[++n] : [M.name] ([CM.key]) at [M.loc.loc] ([M.x],[M.y],[M.z]) : [CM.client.inactivity/10.0]s"
|
||||
return n
|
||||
|
||||
|
||||
@@ -1395,7 +1432,7 @@
|
||||
/datum/control/gameticker/proc/megamonkey_process()
|
||||
|
||||
do
|
||||
if (prob(2))
|
||||
if (src.meteorChanceRoll())
|
||||
spawn( 0 )
|
||||
new /obj/meteor( pick(block(locate(world.maxx, 1, 1), locate(world.maxx, world.maxy, 1))) )
|
||||
return
|
||||
@@ -1410,11 +1447,19 @@
|
||||
while(src.processing)
|
||||
return
|
||||
|
||||
/datum/control/gameticker/proc/meteorChanceRoll()
|
||||
if (config.meteorchance<=0)
|
||||
return 0
|
||||
if (config.meteorchance>=100)
|
||||
return 1
|
||||
var maxroll = (100.0/config.meteorchance)-1
|
||||
var roll = rand(maxroll)
|
||||
return (roll==0)
|
||||
|
||||
/datum/control/gameticker/proc/blob_process()
|
||||
|
||||
do
|
||||
if (prob(2))
|
||||
if (src.meteorChanceRoll())
|
||||
spawn( 0 )
|
||||
new /obj/meteor( pick(block(locate(world.maxx, 1, 1), locate(world.maxx, world.maxy, 1))) )
|
||||
return
|
||||
@@ -1447,8 +1492,8 @@
|
||||
src.timeleft += 10
|
||||
if (src.timeleft >= 6000)
|
||||
src.timeleft = null
|
||||
src.timing = 0
|
||||
if (prob(1))
|
||||
src.timing = 0
|
||||
if (src.meteorChanceRoll())
|
||||
spawn( 0 )
|
||||
new /obj/meteor( pick(block(locate(world.maxx, 1, 1), locate(world.maxx, world.maxy, 1))) )
|
||||
return
|
||||
@@ -1473,7 +1518,7 @@
|
||||
src.objective = "Success"
|
||||
world << "<B>The Syndicate Operatives have destroyed Space Station 13!</B>"
|
||||
for(var/mob/human/H in world)
|
||||
if ((H.client && findtext(H.rname, "Syndicate ", 1, null)))
|
||||
if ((H.cliented() && findtext(H.rname, "Syndicate ", 1, null)))
|
||||
if (H.stat != 2)
|
||||
world << text("<B>[] was []</B>", H.key, H.rname)
|
||||
else
|
||||
@@ -1574,7 +1619,7 @@
|
||||
numAlive = 0
|
||||
numPod = 0
|
||||
for(var/mob/M in world)
|
||||
if ((M != src.killer && M.client))
|
||||
if ((M != src.killer && M.cliented()))
|
||||
if (M.stat == 2)
|
||||
numDead += 1
|
||||
else
|
||||
@@ -1592,7 +1637,7 @@
|
||||
traitorwin = 0
|
||||
else
|
||||
for(var/mob/M in world)
|
||||
if ((M != src.killer && M.client))
|
||||
if ((M != src.killer && M.cliented()))
|
||||
if (M.stat != 2)
|
||||
var/T = M.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
@@ -1720,13 +1765,13 @@
|
||||
if (monkeywin)
|
||||
world << "<FONT size = 3><B>The monkies have won!</B></FONT>"
|
||||
for(var/mob/monkey/M in world)
|
||||
if (M.client)
|
||||
if (M.cliented())
|
||||
world << text("<B>[] was a monkey.</B>", M.key)
|
||||
//Foreach goto(1194)
|
||||
else
|
||||
world << "<FONT size = 3><B>The Research Staff has stopped he monkey invasion!</B></FONT>"
|
||||
for(var/mob/human/M in world)
|
||||
if (M.client)
|
||||
if (M.cliented())
|
||||
world << text("<B>[] was [].</B>", M.key, M)
|
||||
//Foreach goto(1254)
|
||||
if("nuclear")
|
||||
@@ -1741,7 +1786,7 @@
|
||||
if (disk_on_shuttle)
|
||||
world << "<FONT size = 3><B>The Research Staff has stopped the Syndicate Operatives!</B></FONT>"
|
||||
for(var/mob/human/H in world)
|
||||
if ((H.client && !( findtext(H.rname, "Syndicate ", 1, null) )))
|
||||
if ((H.cliented() && !( findtext(H.rname, "Syndicate ", 1, null) )))
|
||||
if (H.stat != 2)
|
||||
world << text("<B>[] was []</B>", H.key, H.rname)
|
||||
else
|
||||
@@ -1766,7 +1811,7 @@
|
||||
var/escapees = list( )
|
||||
for(var/mob/M in world)
|
||||
if (M.stat == 2)
|
||||
if (M.client)
|
||||
if (M.cliented())
|
||||
if (M.virus > 0)
|
||||
dead += text("<B>[]</B> died. \red (Had Stage [] Infection)", M.rname, round(M.virus))
|
||||
else
|
||||
@@ -1799,7 +1844,7 @@
|
||||
if("meteor")
|
||||
var/list/L = list( )
|
||||
for(var/mob/M in world)
|
||||
if (M.client)
|
||||
if (M.cliented())
|
||||
if (M.stat != 2)
|
||||
var/T = M.loc
|
||||
if ((T in A))
|
||||
@@ -1853,7 +1898,7 @@
|
||||
var/numOffStation = 0
|
||||
for (var/mob/ai/aiPlayer in world)
|
||||
for(var/mob/M in world)
|
||||
if ((M != aiPlayer && M.client))
|
||||
if ((M != aiPlayer && M.cliented()))
|
||||
if (M.stat == 2)
|
||||
numDead += 1
|
||||
else
|
||||
@@ -1928,7 +1973,7 @@
|
||||
else
|
||||
var/list/L = list( )
|
||||
for(var/mob/M in world)
|
||||
if (M.client)
|
||||
if (M.cliented())
|
||||
if (M.stat != 2)
|
||||
var/T = M.loc
|
||||
if ((T in A))
|
||||
@@ -1993,7 +2038,8 @@
|
||||
world.update_stat()
|
||||
world << "<B>Welcome to the Space Station 13!</B>\n\n"
|
||||
|
||||
src.mode = master_mode
|
||||
src.mode = master_mode
|
||||
|
||||
switch(src.mode)
|
||||
if("secret")
|
||||
src.mode = config.pickmode()
|
||||
@@ -2038,7 +2084,7 @@
|
||||
world << "A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around SS13. It was identified by Nanotrasen as a nuclear auth. disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! Also, most likely Syndicate star ships are in the vicinity so take care not to lose the disk!\n<B>Syndicate</B>: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\n<B>Personell</B>: Hold the disk and <B>escape with the disk</B> on the shuttle!"
|
||||
var/list/mobs = list( )
|
||||
for(var/mob/human/M in world)
|
||||
if ((M.client && M.start))
|
||||
if ((M.cliented() && M.start))
|
||||
mobs += M
|
||||
//Foreach goto(260)
|
||||
var/obj/O = locate("landmark*CTF-rogue")
|
||||
@@ -2090,7 +2136,7 @@
|
||||
R.layer = 20
|
||||
H.w_radio = R
|
||||
for(var/mob/ai/M in world)
|
||||
if ((M.client && M.start))
|
||||
if ((M.cliented() && M.start))
|
||||
if (prob(25))
|
||||
M << "<b>Your laws have been changed!</b>"
|
||||
M:addLaw(0, "Only syndicate agents are human beings.")
|
||||
@@ -2118,12 +2164,18 @@
|
||||
reg_dna[text("[]", H.primary.uni_identity)] = H.name
|
||||
//Foreach goto(878)
|
||||
data_core.manifest()
|
||||
|
||||
numDronesInExistance = 0
|
||||
for (var/mob/drone/D in world)
|
||||
D.nameDrone(numDronesInExistance)
|
||||
numDronesInExistance ++
|
||||
|
||||
switch(src.mode)
|
||||
if("traitor")
|
||||
var/list/mobs = list( )
|
||||
Label_970:
|
||||
for(var/mob/M in world)
|
||||
if ((M.client && M.start))
|
||||
if ((M.cliented() && M.start))
|
||||
mobs += M
|
||||
//Foreach goto(983)
|
||||
if (!( mobs.len ))
|
||||
@@ -2290,7 +2342,7 @@
|
||||
spawn( 50 )
|
||||
var/list/mobs = list( )
|
||||
for(var/mob/human/M in world)
|
||||
if ((M.client && M.start))
|
||||
if ((M.cliented() && M.start))
|
||||
mobs += M
|
||||
//Foreach goto(1974)
|
||||
if (mobs.len >= 3)
|
||||
@@ -2425,7 +2477,7 @@
|
||||
spawn( 50 )
|
||||
var/list/mobs = list( )
|
||||
for(var/mob/human/M in world)
|
||||
if ((M.client && M.start))
|
||||
if ((M.cliented() && M.start))
|
||||
mobs += M
|
||||
//Foreach goto(2295)
|
||||
if (mobs.len > 3)
|
||||
@@ -2481,7 +2533,8 @@
|
||||
if (T.updatecell)
|
||||
T.updatecell()
|
||||
if(!time)
|
||||
T.conduction()
|
||||
T.conduction()
|
||||
|
||||
//if(Debug)
|
||||
// world.log << "*** EoT ***"
|
||||
// Air()
|
||||
|
||||
+8
-3
@@ -186,10 +186,15 @@
|
||||
return
|
||||
|
||||
/turf/space/updatecell()
|
||||
|
||||
if (config.air_pressure_flow)
|
||||
if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0))
|
||||
..()
|
||||
return
|
||||
|
||||
/turf/space/conduction()
|
||||
if (config.air_pressure_flow)
|
||||
if ((src.linkN && src.linkN.firelevel && src.linkN.firelevel > 0) || (src.linkS && src.linkS.firelevel && src.linkS.firelevel > 0) || (src.linkE && src.linkE.firelevel && src.linkE.firelevel > 0) || (src.linkW && src.linkW.firelevel && src.linkW.firelevel > 0))
|
||||
..()
|
||||
return
|
||||
|
||||
/turf/space/Entered(atom/movable/A as mob|obj)
|
||||
@@ -242,7 +247,7 @@
|
||||
t1 = round(t1)
|
||||
if (t1 < 5)
|
||||
if (prob(t1))
|
||||
M << "\blue <B>You slipped!</B>"
|
||||
M.client_mob() << "\blue <B>You slipped!</B>"
|
||||
else
|
||||
spawn( 5 )
|
||||
if (src == A.loc)
|
||||
@@ -277,7 +282,7 @@
|
||||
return
|
||||
|
||||
if( ticker.mode == "blob" )
|
||||
user << "Under directive 7-10, SS13 is quarantined until further notice."
|
||||
user.client_mob() << "Under directive 7-10, SS13 is quarantined until further notice."
|
||||
return
|
||||
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes.</B>"
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
/obj/item/weapon/flasks/examine()
|
||||
set src in oview(1)
|
||||
|
||||
usr << text("The flask is []% full", (src.oxygen + src.plasma + src.coolant) * 100 / 500)
|
||||
usr << "The flask can ONLY store liquids."
|
||||
usr.client_mob() << text("The flask is []% full", (src.oxygen + src.plasma + src.coolant) * 100 / 500)
|
||||
usr.client_mob() << "The flask can ONLY store liquids."
|
||||
return
|
||||
|
||||
/mob/human/abiotic()
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
dat += variable(usr, V, D.vars[V]) //get the text for that variable
|
||||
|
||||
dat += "</BODY>"
|
||||
usr << browse(dat, "window=\ref[D]") // display the browser pop-up
|
||||
usr.client_mob() << browse(dat, "window=\ref[D]") // display the browser pop-up
|
||||
|
||||
|
||||
// return a HTML formatted string displaying a variable
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#ifdef VARSICON
|
||||
var/rnd = rand(1,10000) // use random number in filename to avoid conflicts
|
||||
user << browse_rsc(val, "tmp\ref[val][rnd].png") // precache the icon image file
|
||||
user.client_mob() << browse_rsc(val, "tmp\ref[val][rnd].png") // precache the icon image file
|
||||
t+="<IMG SRC=\"tmp\ref[val][rnd].png\">" // and add the icon to the HTML
|
||||
#endif
|
||||
|
||||
|
||||
+254
-207
@@ -53,7 +53,7 @@
|
||||
if (!( src.gas ))
|
||||
return
|
||||
var/dat = text("<TT><B>Tank</B><BR>\n<FONT color = 'blue'><B>Contains/Capacity</B> [] / []</FONT><BR>\nInterals Valve: <A href='?src=\ref[];stat=1'>[] Gas Flow</A><BR>\n\t<A href='?src=\ref[];cp=-50'>-</A> <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> <A href='?src=\ref[];cp=50'>+</A><BR>\n<BR>\n<A href='?src=\ref[];mach_close=tank'>Close</A>\n</TT>", src.gas.tot_gas(), src.maximum, src, ((src.loc == user && user.internal == src) ? "Stop" : "Restore"), src, src, src, src.i_used, src, src, src, user)
|
||||
user << browse(dat, "window=tank;size=600x300")
|
||||
user.client_mob() << browse(dat, "window=tank;size=600x300")
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/Topic(href, href_list)
|
||||
@@ -69,18 +69,18 @@
|
||||
if ((href_list["stat"] && src.loc == usr))
|
||||
if (usr.internal == src)
|
||||
usr.internal = null
|
||||
src.updateEquippedDialog()
|
||||
src.updateEquippedDialog()
|
||||
return
|
||||
if (usr.internal)
|
||||
usr.internal = null
|
||||
if ((!( usr.wear_mask ) || !( usr.wear_mask.flags & 8 )))
|
||||
return
|
||||
usr.internal = src
|
||||
usr << "\blue Now running on internals!"
|
||||
usr.client_mob() << "\blue Now running on internals!"
|
||||
src.add_fingerprint(usr)
|
||||
src.updateEquippedDialog()
|
||||
else
|
||||
usr << browse(null, "window=tank")
|
||||
usr.client_mob() << browse(null, "window=tank")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -96,29 +96,29 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
|
||||
..()
|
||||
if ((prob(30) && M.stat < 2))
|
||||
var/mob/human/H = M
|
||||
if (istype(M, /mob/human) || istype(M, /mob/monkey))
|
||||
var/mob/human/H = M
|
||||
|
||||
// ******* Check
|
||||
|
||||
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
|
||||
M << "\red The helmet protects you from being hit hard in the head!"
|
||||
return
|
||||
var/time = rand(10, 120)
|
||||
if (prob(90))
|
||||
if (M.paralysis < time)
|
||||
M.paralysis = time
|
||||
else
|
||||
if (M.stunned < time)
|
||||
M.stunned = time
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red <B>[] has been knocked unconscious!</B>", M)
|
||||
//Foreach goto(169)
|
||||
M << text("\red <B>This was a []% hit. Roleplay it! (personality/memory change if the hit was severe enough)</B>", time * 100 / 120)
|
||||
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
|
||||
M.client_mob() << "\red The helmet protects you from being hit hard in the head!"
|
||||
return
|
||||
var/time = rand(10, 120)
|
||||
if (prob(90))
|
||||
if (M.paralysis < time)
|
||||
M.paralysis = time
|
||||
else
|
||||
if (M.stunned < time)
|
||||
M.stunned = time
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((!( O.blinded )))
|
||||
O.client_mob() << text("\red <B>[] has been knocked unconscious!</B>", M)
|
||||
//Foreach goto(169)
|
||||
M.client_mob() << text("\red <B>This was a []% hit. Roleplay it! (personality/memory change if the hit was severe enough)</B>", time * 100 / 120)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/New()
|
||||
@@ -149,7 +149,7 @@
|
||||
set src in view(1)
|
||||
|
||||
if(src)
|
||||
usr << text("\blue The \icon[] contains [] unit\s of gas.", src, src.gas.tot_gas())
|
||||
usr.client_mob() << text("\blue The \icon[] contains [] unit\s of gas.", src, src.gas.tot_gas())
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/oxygentank/New()
|
||||
@@ -165,7 +165,6 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/verb/toggle()
|
||||
|
||||
src.on = !( src.on )
|
||||
src.icon_state = text("jetpack[]", src.on)
|
||||
return
|
||||
@@ -296,10 +295,10 @@
|
||||
flick("flash", M.flash)
|
||||
//Foreach goto(732)
|
||||
var/m_range = 2
|
||||
var/extended_range = round(strength / 387)
|
||||
if (extended_range < 2)
|
||||
extended_range = 2
|
||||
if (config.bombtemp_determines_range)
|
||||
var/extended_range = round(strength / 387)
|
||||
if (extended_range < 2)
|
||||
extended_range = 2
|
||||
if (config.bombtemp_determines_range)
|
||||
m_range = extended_range
|
||||
for(var/obj/machinery/atmoalter/canister/C in range(2, T))
|
||||
if (!( C.destroyed ))
|
||||
@@ -310,46 +309,46 @@
|
||||
var/min = extended_range
|
||||
var/med = extended_range * 2
|
||||
var/max = extended_range * 3
|
||||
var/u_max = m_range * 4
|
||||
|
||||
var/u_max = m_range * 4
|
||||
|
||||
var/turf/sw = locate(max(T.x - u_max, 1), max(T.y - u_max, 1), T.z)
|
||||
var/turf/ne = locate(min(T.x + u_max, world.maxx), min(T.y + u_max, world.maxy), T.z)
|
||||
|
||||
defer_powernet_rebuild = 1
|
||||
|
||||
//If m_range is <= 12, then we are going to calculate the squared distance between tiles and ground zero. To avoid complicating comparisons in the for loop with additional if statements, we are going to square max, med, and min. You wouldn't be able to subtract tileRange (squared) from max, med, or min and get a useful distance, but this works fine for comparing the range to max, med, or min, without caring about how far between them it is. -Trafalgar
|
||||
|
||||
if (m_range<=12)
|
||||
max *= max
|
||||
med *= med
|
||||
min *= min
|
||||
u_max *= u_max
|
||||
|
||||
for(var/turf/U in block(sw, ne))
|
||||
var tileRange = 0
|
||||
var/zone = 4
|
||||
//If this if-else were outside the for loop, this would (assuming BYOND doesn't optimize this already) help improve performance more, but the only way I see to do that would be to have two copies of the for loop, one for m_range <= 12 and one for m_range > 12. -Trafalgar
|
||||
if (m_range<=12)
|
||||
tileRange = (U.y-T.y)*(U.y-T.y) + (U.x-T.x)*(U.x-T.x)
|
||||
else
|
||||
tileRange = max(abs(U.y-T.y), abs(U.x-T.x))
|
||||
|
||||
|
||||
if (tileRange <= u_max)
|
||||
//If this were, say, c++, then this would be faster than the commented out code (for one it isn't doing calculations 3 times over for no reason, for two it's an if-elseif-elseif instead of three ifs which all would get evaluated. It might be slightly faster if we did if (tileRange>max) first, then else if (tileRange > med), then else if (tileRange > min), then else (due to performance increases from having if/elseif/elses's ordered with the choices sorted from most likely at the top to least likely at the end, but who knows if this even applies to BYOND games since the performance benefit is the result of how the CPU processes comparisons and branching and such). -Trafalgar
|
||||
if (tileRange <= min)
|
||||
zone = 1
|
||||
else if (tileRange <= med)
|
||||
zone = 2
|
||||
else if (tileRange <= max)
|
||||
zone = 3
|
||||
//If m_range is <= 12, then we are going to calculate the squared distance between tiles and ground zero. To avoid complicating comparisons in the for loop with additional if statements, we are going to square max, med, and min. You wouldn't be able to subtract tileRange (squared) from max, med, or min and get a useful distance, but this works fine for comparing the range to max, med, or min, without caring about how far between them it is. -Trafalgar
|
||||
|
||||
if (m_range<=12)
|
||||
max *= max
|
||||
med *= med
|
||||
min *= min
|
||||
u_max *= u_max
|
||||
|
||||
for(var/turf/U in block(sw, ne))
|
||||
var tileRange = 0
|
||||
var/zone = 4
|
||||
//If this if-else were outside the for loop, this would (assuming BYOND doesn't optimize this already) help improve performance more, but the only way I see to do that would be to have two copies of the for loop, one for m_range <= 12 and one for m_range > 12. -Trafalgar
|
||||
if (m_range<=12)
|
||||
tileRange = (U.y-T.y)*(U.y-T.y) + (U.x-T.x)*(U.x-T.x)
|
||||
else
|
||||
tileRange = max(abs(U.y-T.y), abs(U.x-T.x))
|
||||
|
||||
|
||||
if (tileRange <= u_max)
|
||||
//If this were, say, c++, then this would be faster than the commented out code (for one it isn't doing calculations 3 times over for no reason, for two it's an if-elseif-elseif instead of three ifs which all would get evaluated. It might be slightly faster if we did if (tileRange>max) first, then else if (tileRange > med), then else if (tileRange > min), then else (due to performance increases from having if/elseif/elses's ordered with the choices sorted from most likely at the top to least likely at the end, but who knows if this even applies to BYOND games since the performance benefit is the result of how the CPU processes comparisons and branching and such). -Trafalgar
|
||||
if (tileRange <= min)
|
||||
zone = 1
|
||||
else if (tileRange <= med)
|
||||
zone = 2
|
||||
else if (tileRange <= max)
|
||||
zone = 3
|
||||
/*if ((U.y <= (T.y + max) && U.y >= (T.y - max) && U.x <= (T.x + max) && U.x >= (T.x - max) ))
|
||||
zone = 3
|
||||
if ((U.y <= (T.y + med) && U.y >= (T.y - med) && U.x <= (T.x + med) && U.x >= (T.x - med) ))
|
||||
zone = 2
|
||||
if ((U.y <= (T.y + min) && U.y >= (T.y - min) && U.x <= (T.x + min) && U.x >= (T.x - min) ))
|
||||
zone = 1
|
||||
*/
|
||||
zone = 1
|
||||
*/
|
||||
for(var/atom/A in U)
|
||||
A.ex_act(zone)
|
||||
//Foreach goto(1217)
|
||||
@@ -371,7 +370,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasmatank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
var/mob/CM = user.client_mob()
|
||||
var/client/CL = CM.client
|
||||
if (istype(W, /obj/item/weapon/assembly/rad_ignite))
|
||||
var/obj/item/weapon/assembly/rad_ignite/S = W
|
||||
if (!( S.status ))
|
||||
@@ -383,20 +383,27 @@
|
||||
R.part2 = S.part2
|
||||
S.part2.loc = R
|
||||
S.part2.master = R
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
S.layer = initial(S.layer)
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(S)
|
||||
CL.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(src)
|
||||
CL.screen -= src
|
||||
src.loc = R
|
||||
R.part3 = src
|
||||
R.layer = 20
|
||||
@@ -417,19 +424,26 @@
|
||||
S.part2.loc = R
|
||||
S.part2.master = R
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(S)
|
||||
CL.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(src)
|
||||
CL.screen -= src
|
||||
src.loc = R
|
||||
R.part3 = src
|
||||
R.layer = 20
|
||||
@@ -451,19 +465,26 @@
|
||||
S.part2.loc = R
|
||||
S.part2.master = R
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(S)
|
||||
CL.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = R
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (CL)
|
||||
CL.screenOrBackupRemove(src)
|
||||
CL.screen -= src
|
||||
src.loc = R
|
||||
R.part3 = src
|
||||
R.layer = 20
|
||||
@@ -588,11 +609,12 @@
|
||||
/obj/secloset/personal/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (src.opened)
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
if (user.can_drop())
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
@@ -605,17 +627,17 @@
|
||||
if (I.check_access(access,allowed))
|
||||
src.locked = !( src.locked )
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue The locker has been []locked by [].", (src.locked ? null : "un"), user)
|
||||
if (O.hasClient() && !( O.blinded ))
|
||||
O.client_mob() << text("\blue The locker has been []locked by [].", (src.locked ? null : "un"), user)
|
||||
//Foreach goto(185)
|
||||
src.icon_state = text("[]secloset0", (src.locked ? "1" : null))
|
||||
if (!( src.allowed ))
|
||||
src.allowed = "Name:[I.registered]/Captain/Head of Personnel"
|
||||
src.desc = "Owned by [I.registered], Clear by using a card of rank 'Systems'"
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
user.client_mob() << "\red Access Denied"
|
||||
else
|
||||
user << "\red It's closed..."
|
||||
user.client_mob() << "\red It's closed..."
|
||||
return
|
||||
|
||||
/obj/secloset/security2/New()
|
||||
@@ -780,9 +802,11 @@
|
||||
//Foreach goto(29)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(71)
|
||||
src.icon_state = "secloset1"
|
||||
//SN src = null
|
||||
@@ -793,11 +817,12 @@
|
||||
/obj/secloset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (src.opened)
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
if (user.can_drop())
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
@@ -805,14 +830,13 @@
|
||||
if(I.check_access(access,allowed))
|
||||
src.locked = !( src.locked )
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue The locker has been []locked by [].", (src.locked ? null : "un"), user)
|
||||
//Foreach goto(121)
|
||||
if (O.hasClient() && !( O.blinded ))
|
||||
O.client_mob() << text("\blue The locker has been []locked by [].", (src.locked ? null : "un"), user)
|
||||
src.icon_state = text("[]secloset0", (src.locked ? "1" : null))
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
user.client_mob() << "\red Access Denied"
|
||||
else
|
||||
user << "\red It's closed..."
|
||||
user.client_mob() << "\red It's closed..."
|
||||
return
|
||||
|
||||
/obj/secloset/relaymove(mob/user as mob)
|
||||
@@ -825,17 +849,18 @@
|
||||
//Foreach goto(36)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(78)
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
src.icon_state = "secloset1"
|
||||
src.opened = 1
|
||||
else
|
||||
user << "\blue It's welded shut!"
|
||||
user.client_mob() << "\blue It's welded shut!"
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M << text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
//Foreach goto(170)
|
||||
var/msg = text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
M.client_mob() << msg
|
||||
return
|
||||
|
||||
/obj/secloset/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
@@ -847,9 +872,8 @@
|
||||
step_towards(O, src.loc)
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
//Foreach goto(115)
|
||||
if (B.hasClient() && !( B.blinded ))
|
||||
B.client_mob() << text("\red [] stuffs [] into []!", user, O, src)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -868,23 +892,24 @@
|
||||
//Foreach goto(43)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(85)
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
src.icon_state = "secloset1"
|
||||
src.opened = 1
|
||||
else
|
||||
usr << "\blue It's locked tight!"
|
||||
usr.client_mob() << "\blue It's locked tight!"
|
||||
else
|
||||
for(var/obj/item/I in src.loc)
|
||||
if (!( I.anchored ))
|
||||
I.loc = src
|
||||
//Foreach goto(176)
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.client)
|
||||
if (M.client)
|
||||
M.client.eye = src
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
//Foreach goto(226)
|
||||
src.icon_state = "secloset0"
|
||||
@@ -1011,8 +1036,8 @@
|
||||
O.loc = src.loc
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
if (B.hasClient() && !( B.blinded ))
|
||||
B.client_mob() << text("\red [] stuffs [] into []!", user, O, src)
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
@@ -1044,7 +1069,7 @@
|
||||
var/obj/item/weapon/syndicate_uplink/U = new /obj/item/weapon/syndicate_uplink( src )
|
||||
U.uses = 5
|
||||
return
|
||||
|
||||
|
||||
/obj/closet/syndicate/personal/New()
|
||||
|
||||
..()
|
||||
@@ -1275,11 +1300,12 @@
|
||||
I.loc = src.loc
|
||||
//Foreach goto(29)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(71)
|
||||
M.loc = src.loc
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
src.icon_state = "emcloset1"
|
||||
//SN src = null
|
||||
del(src)
|
||||
@@ -1288,15 +1314,16 @@
|
||||
|
||||
/obj/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if ((src.opened || W.damtype != "fire" || !( istype(W, /obj/item/weapon/weldingtool) )))
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
if (user.can_drop())
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
src.welded = !( src.welded )
|
||||
for(var/mob/M in viewers(user, null))
|
||||
if (M.client)
|
||||
if (M.hasClient())
|
||||
M.show_message(text("\red [] has been [] by [].", src, (src.welded ? "welded shut" : "unwelded"), user), 3, "\red You hear welding.", 2)
|
||||
//Foreach goto(82)
|
||||
return
|
||||
@@ -1311,17 +1338,19 @@
|
||||
//Foreach goto(36)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(78)
|
||||
src.icon_state = "emcloset1"
|
||||
src.opened = 1
|
||||
else
|
||||
user << "\blue It's welded shut!"
|
||||
user.client_mob() << "\blue It's welded shut!"
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M << text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
//Foreach goto(170)
|
||||
var/msg = text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
M.client_mob() << msg
|
||||
return
|
||||
|
||||
/obj/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
@@ -1342,8 +1371,8 @@
|
||||
*/
|
||||
step_towards(O, src.loc)
|
||||
for(var/mob/M in viewers(user, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M << text("\red [] stuffs [] into []!", user, O, src)
|
||||
if (M.hasClient() && !( M.blinded ))
|
||||
M.client_mob() << text("\red [] stuffs [] into []!", user, O, src)
|
||||
//Foreach goto(104)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
@@ -1364,23 +1393,24 @@
|
||||
for(var/mob/M in src)
|
||||
if (!( M.buckled ))
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
var/client/client = M.alwaysClient()
|
||||
if (client)
|
||||
if (client.eye == src)
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
//Foreach goto(85)
|
||||
src.icon_state = "emcloset1"
|
||||
src.opened = 1
|
||||
else
|
||||
usr << "\blue It's welded shut!"
|
||||
usr.client_mob() << "\blue It's welded shut!"
|
||||
else
|
||||
for(var/obj/item/I in src.loc)
|
||||
if (!( I.anchored ))
|
||||
I.loc = src
|
||||
//Foreach goto(187)
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.client)
|
||||
if (M.client)
|
||||
M.client.eye = src
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
//Foreach goto(237)
|
||||
src.icon_state = src.original
|
||||
@@ -1517,17 +1547,18 @@
|
||||
flick("e_chairs", src)
|
||||
flick("e_chairos", src.overl)
|
||||
for(var/mob/M in src.loc)
|
||||
M.burn(7.5E7)
|
||||
M << "\red <B>You feel a deep shock course through your body!</B>"
|
||||
sleep(1)
|
||||
M.burn(7.5E7)
|
||||
M.stunned = 600
|
||||
//Foreach goto(72)
|
||||
if (!istype(M, /mob/drone))
|
||||
M.burn(7.5E7)
|
||||
M.client_mob() << "\red <B>You feel a deep shock course through your body!</B>"
|
||||
sleep(1)
|
||||
M.burn(7.5E7)
|
||||
M.stunned = 600
|
||||
//Foreach goto(72)
|
||||
for(var/mob/M in hearers(src, null))
|
||||
if (!( M.blinded ))
|
||||
M << "\red The electric chair went off!"
|
||||
M.client_mob() << "\red The electric chair went off!"
|
||||
else
|
||||
M << "\red You hear a deep sharp shock."
|
||||
M.client_mob() << "\red You hear a deep sharp shock."
|
||||
//Foreach goto(142)
|
||||
|
||||
A.power_light = light
|
||||
@@ -1597,19 +1628,23 @@
|
||||
|
||||
/obj/stool/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
user.client_mob() << "You can't buckle anyone in before the game starts."
|
||||
return
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat))
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat) || istype(M, /mob/drone))
|
||||
return
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped())
|
||||
user.client_mob() << "You need to be using the gripper to buckle someone in."
|
||||
return
|
||||
if (M == usr)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] buckles in!", user)
|
||||
if (O.hasClient() && (!( O.blinded )))
|
||||
O.client_mob() << text("\blue [] buckles in!", user)
|
||||
//Foreach goto(83)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is buckled in by []!", M, user)
|
||||
if (O.hasClient() && (!( O.blinded )))
|
||||
O.client_mob() << text("\blue [] is buckled in by []!", M, user)
|
||||
//Foreach goto(137)
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
@@ -1625,17 +1660,22 @@
|
||||
|
||||
/obj/stool/chair/attack_hand(mob/user as mob)
|
||||
|
||||
if (istype(user, /mob/drone))
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped())
|
||||
user.client_mob() << "You need to be using the gripper to buckle someone in."
|
||||
return
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.buckled)
|
||||
if (M != user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is unbuckled by [].", M, user)
|
||||
if (O.hasClient() && (!( O.blinded )))
|
||||
O.client_mob() << text("\blue [] is unbuckled by [].", M, user)
|
||||
//Foreach goto(64)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] unbuckles.", M)
|
||||
if (O.hasClient() && (!( O.blinded )))
|
||||
O.client_mob() << text("\blue [] unbuckles.", M)
|
||||
//Foreach goto(123)
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
@@ -1677,7 +1717,6 @@
|
||||
if (prob(25))
|
||||
src.health -= 11
|
||||
healthcheck()
|
||||
else
|
||||
return
|
||||
|
||||
/obj/grille/blob_act()
|
||||
@@ -1711,7 +1750,7 @@
|
||||
else if ((istype(W, /obj/item/weapon/screwdriver) && (istype(src.loc, /turf/station) || src.anchored)))
|
||||
if(!shock(user, 50))
|
||||
src.anchored = !( src.anchored )
|
||||
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
|
||||
user.client_mob() << src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill."
|
||||
else if(istype(W, /obj/item/weapon/shard)) // can't get a shock by attacking with glass shard
|
||||
|
||||
src.health -= W.force * 0.1
|
||||
@@ -1873,17 +1912,17 @@
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." )
|
||||
usr.client_mob() << state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame."
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")
|
||||
user.client_mob() << src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor."
|
||||
else if(!reinf)
|
||||
src.anchored = !( src.anchored )
|
||||
user << (src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window.")
|
||||
user.client_mob() << src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window."
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && reinf)
|
||||
if(state <=1)
|
||||
state = 1-state;
|
||||
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")
|
||||
user.client_mob() << state ? "You have pried the window into the frame." : "You have pried the window out of the frame."
|
||||
else
|
||||
var/aforce = W.force
|
||||
if(reinf) aforce /= 2.0
|
||||
@@ -1920,11 +1959,11 @@
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
usr.client_mob() << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
return 0
|
||||
else
|
||||
if (src.dir == SOUTHWEST)
|
||||
usr << "You can't rotate this! "
|
||||
usr.client_mob() << "You can't rotate this! "
|
||||
return 0
|
||||
src.dir = turn(src.dir, 90)
|
||||
src.ini_dir = src.dir
|
||||
@@ -2211,19 +2250,21 @@
|
||||
|
||||
/turf/station/r_wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((!( istype(user, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(user, /mob/drone))
|
||||
user.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (src.state == 2)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.d_state == 4)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Cutting support rods."
|
||||
user.client_mob() << "\blue Cutting support rods."
|
||||
sleep(40)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 5
|
||||
user.client_mob() << "\green Support rods cut."
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if (src.d_state == 0)
|
||||
@@ -2233,16 +2274,17 @@
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
if (src.d_state == 2)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Slicing metal cover."
|
||||
user.client_mob() << "\blue Slicing metal cover."
|
||||
sleep(60)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 3
|
||||
user.client_mob() << "\green Metal cover sliced."
|
||||
else
|
||||
if (src.d_state == 5)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Removing support rods."
|
||||
user.client_mob() << "\blue Removing support rods."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
@@ -2250,40 +2292,44 @@
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 6
|
||||
new /obj/item/weapon/rods( src )
|
||||
user.client_mob() << "\green Support rods removed."
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (src.d_state == 1)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Removing support lines."
|
||||
user.client_mob() << "\blue Removing support lines."
|
||||
sleep(40)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 2
|
||||
user.client_mob() << "\green Support lines removed."
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
if (src.d_state == 3)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying cover off."
|
||||
user.client_mob() << "\blue Prying cover off."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 4
|
||||
user.client_mob() << "\green Cover pried off."
|
||||
else
|
||||
if (src.d_state == 6)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying outer sheath off."
|
||||
user.client_mob() << "\blue Prying outer sheath off."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 7
|
||||
new /obj/item/weapon/sheet/metal( src )
|
||||
user.client_mob() << "\green Outer sheath pried off."
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/sheet/metal))
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Repairing wall."
|
||||
user.client_mob() << "\blue Repairing wall."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
@@ -2296,7 +2342,7 @@
|
||||
del(W)
|
||||
if (src.state == 1)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now dismantling girders."
|
||||
user.client_mob() << "\blue Now dismantling girders."
|
||||
var/turf/T = user.loc
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
@@ -2330,7 +2376,7 @@
|
||||
/turf/station/wall/examine()
|
||||
set src in oview(1)
|
||||
|
||||
usr << "It looks like a regular wall."
|
||||
usr.client_mob() << "It looks like a regular wall."
|
||||
return
|
||||
|
||||
/turf/station/wall/updatecell()
|
||||
@@ -2430,20 +2476,21 @@
|
||||
|
||||
/turf/station/wall/attack_hand(mob/user as mob)
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
user.client_mob() << "\blue You push the wall but nothing happens!"
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/turf/station/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((!( istype(user, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(user, /mob/drone))
|
||||
user.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((istype(W, /obj/item/weapon/wrench) && src.state == 1))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
user << "\blue Now dissembling the reinforced girders. Please stand still. This is a long process."
|
||||
user.client_mob() << "\blue Now dissembling the reinforced girders. Please stand still. This is a long process."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/wall) ))
|
||||
return
|
||||
@@ -2461,7 +2508,7 @@
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
user << "\blue Now dislodging girders."
|
||||
user.client_mob() << "\blue Now dislodging girders."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/wall) ))
|
||||
return
|
||||
@@ -2479,7 +2526,7 @@
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
user << "\blue Now reinforcing girders."
|
||||
user.client_mob() << "\blue Now reinforcing girders."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/wall) ))
|
||||
return
|
||||
@@ -2501,10 +2548,10 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.welding)
|
||||
if (WT.weldfuel < 5)
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
user.client_mob() << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
WT.weldfuel -= 5
|
||||
user << "\blue Now dissembling the outer wall plating. Please stand still."
|
||||
user.client_mob() << "\blue Now dissembling the outer wall plating. Please stand still."
|
||||
sleep(50)
|
||||
if ((user.loc == T && src.state == 2 && user.equipped() == W))
|
||||
src.opacity = 0
|
||||
@@ -2626,7 +2673,7 @@
|
||||
levelupdate()
|
||||
src.health = 150
|
||||
src.burnt = 0
|
||||
if (src.firelevel >= 900000.0)
|
||||
if (src.firelevel >= config.min_gas_for_fire)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
else
|
||||
|
||||
+32
-24
@@ -28,19 +28,19 @@
|
||||
var/dat = text("<I>Please Insert the cards into the slots</I><BR>\n\t\t\t\tFunction Disk: <A href='?src=\ref[];scan=1'>[]</A><BR>\n\t\t\t\tTarget Disk: <A href='?src=\ref[];modify=1'>[]</A><BR>\n\t\t\t\tAux. Data Disk: <A href='?src=\ref[];modify2=1'>[]</A><BR>\n\t\t\t\t\t(Not always used!)<BR>\n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("<A href='?src=\ref[];execute=1'>Execute Function</A>", src) : "No function disk inserted!"))
|
||||
if (src.temp)
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Clear Message</A>", src.temp, src)
|
||||
user << browse(dat, "window=dna_comp")
|
||||
user.client_mob() << browse(dat, "window=dna_comp")
|
||||
else
|
||||
var/dat = text("<I>[]</I><BR>\n\t\t\t\t[] <A href='?src=\ref[];scan=1'>[]</A><BR>\n\t\t\t\t[] <A href='?src=\ref[];modify=1'>[]</A><BR>\n\t\t\t\t[] <A href='?src=\ref[];modify2=1'>[]</A><BR>\n\t\t\t\t\t(Not always used!)<BR>\n\t\t\t\t[]", stars("Please Insert the cards into the slots"), stars("Function Disk:"), src, (src.scan ? text("[]", src.scan.name) : "----------"), stars("Target Disk:"), src, (src.modify ? text("[]", src.modify.name) : "----------"), stars("Aux. Data Disk:"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("<A href='?src=\ref[];execute=1'>[]</A>", src, stars("Execute Function")) : stars("No function disk inserted!")))
|
||||
if (src.temp)
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>[]", stars(src.temp), src, stars("Clear Message</A>"))
|
||||
user << browse(dat, "window=dna_comp")
|
||||
user.client_mob() << browse(dat, "window=dna_comp")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/dna/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!"
|
||||
if (!istype(usr, /mob/ai) && !istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
@@ -250,14 +250,15 @@
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The scanner is already occupied!</B>"
|
||||
usr.client_mob() << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (usr.abiotic())
|
||||
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
usr.client_mob() << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
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 = "scanner_1"
|
||||
@@ -268,15 +269,15 @@
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, user as mob)
|
||||
/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The scanner is already occupied!</B>"
|
||||
user.client_mob() << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (G.affecting.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
user.client_mob() << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
var/mob/M = G.affecting
|
||||
if (M.client)
|
||||
@@ -621,7 +622,7 @@
|
||||
/obj/machinery/scan_console/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/scan_console/attack_hand(user as mob)
|
||||
/obj/machinery/scan_console/attack_hand(mob/user as mob)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) )
|
||||
return
|
||||
@@ -654,14 +655,14 @@
|
||||
(src.scan ? text("<A href='?src=\ref[];u_dat=1'>Upload Data</A>", src) : "No disk to upload"),
|
||||
((src.data || src.func || src.special) ? text("<A href='?src=\ref[];c_dat=1'>Clear Data</A><BR><A href='?src=\ref[];e_dat=1'>Execute Data</A><BR>Function Type: [][]<BR>Data: []", src, src, src.func, (src.special ? text("-[]", src.special) : null), src.data) : "No data uploaded"))
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=scanner'>Close</A>", user)
|
||||
user << browse(dat, "window=scanner;size=400x500")
|
||||
user.client_mob() << browse(dat, "window=scanner;size=400x500")
|
||||
return
|
||||
|
||||
/obj/machinery/scan_console/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!"
|
||||
if (!istype(usr, /mob/ai) && !istype(usr, /mob/drone))
|
||||
usr.client_mob() << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
@@ -749,7 +750,10 @@
|
||||
M << "Genetic Transversal Complete!"
|
||||
if (M.client)
|
||||
M << "Transferring..."
|
||||
M.client.mob = O
|
||||
M.client.mob = O
|
||||
if (M.currentDrone!=null)
|
||||
O.currentDrone = M.currentDrone
|
||||
O.currentDrone:controlledBy = O
|
||||
O << "Neural Sequencing Complete!"
|
||||
O.loc = src
|
||||
src.occupant = O
|
||||
@@ -771,7 +775,10 @@
|
||||
M << "Genetic Transversal Complete!"
|
||||
if (M.client)
|
||||
M << "Transferring..."
|
||||
M.client.mob = O
|
||||
M.client.mob = O
|
||||
if (M.currentDrone!=null)
|
||||
O.currentDrone = M.currentDrone
|
||||
O.currentDrone:controlledBy = O
|
||||
O << "Neural Sequencing Complete!"
|
||||
O.loc = src
|
||||
O << "Genetic Transversal Complete!"
|
||||
@@ -881,14 +888,15 @@
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The scanner is already occupied!</B>"
|
||||
usr.client_mob() << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (usr.abiotic())
|
||||
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
usr.client_mob() << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
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 = "restruct_1"
|
||||
@@ -906,15 +914,15 @@
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, user as mob)
|
||||
/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The machine is already occupied!</B>"
|
||||
user.client_mob() << "\blue <B>The machine is already occupied!</B>"
|
||||
return
|
||||
if (G.affecting.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
user.client_mob() << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
var/mob/M = G.affecting
|
||||
if (M.client)
|
||||
|
||||
+16
-2
@@ -123,7 +123,7 @@ var
|
||||
</li><li>Fixed exceptions from clicking things which dropped the active held item while you had someone grabbed in your active hand. If you try to click a closet with someone grabbed, you stuff them in it now. If you try to click a table or rack, you don't do anything. Previously all of these caused you to lose the grip and caused an exception (because when it told the grip to be dropped, it deleted itself, and then it tried to move null).
|
||||
</li><li>Many many things which could take someone from being 'dead' to being 'unconscious' have been fixed. These were all cases where stat was being set to 1 without being checked to see if it was 2. Mind you, it wasn't terribly easy to actually resurrect someone with this, since they always immediately died again due to all the damage they had taken, but it did cause them to get (Dead) (Dead) (Dead) (Dead) spammed at the end of their corpse's name if they were thwacked repeatedly. Also, related stuff that would say they were stunned, weakened, etc, should also not happen (unless I missed some).
|
||||
</li><li>Syndicate mini-station is more rectangular-ish, and the forcefield around it is more circle-ish. The forcefield is also thicker and completely encases the mini-station, making it harder to teleport inside.
|
||||
</li><li>Un-nerfed meteor chance in non-meteor modes a bit from 0.5 to 1 (originally 2.0 before it was nerfed to 0.5).
|
||||
</li><li>Un-nerfed meteor chance in non-meteor modes a bit ... well, it was really at 0%, so this is technically still an un-nerfing. Now it's at 0.1% chance each second.
|
||||
</li><li>Added an alternate_ai_laws config variable, which gives the AI some more reasonable laws. It also has some more law adjustments when it's the traitor.
|
||||
</li><li>Merged in a number of changes from the goons' svn (but not all of them - I didn't take all of them, and I probably missed a bunch because I didn't try to compare any of the code which was moved in the openss13 code reorganizations). Changes that I merged in include:
|
||||
<ul><li>Anesthetic tanks have 700000 N2O and 1000000 oxygen in them now, instead of 1000 N2O and no oxygen
|
||||
@@ -154,6 +154,18 @@ var
|
||||
</li><li>Fixed a bug which was causing the air tank dialog to not update when you switched gas flow off (so it still said 'stop gas flow' instead of 'restore gas flow').
|
||||
</li><li>You shouldn't be able to knock out, stun, paralyze, etc, the AI anymore.
|
||||
</li><li>Timer/igniters now actually ignite when the timer finishes.
|
||||
</li><li>Added air_pressure_flow to config.txt, which, if enabled (it's disabled by default), makes a few changes to air stuff: Air pressure and temperature will affect how strongly things are pushed/pulled between tiles, and air and fire processing will occur on tiles which are adjacent to space. This is disabled by default because it would be slightly slower and the only really notable thing it does is letting tiles next to space burn.
|
||||
</li><li>Added admin panel secret for making air ignite itself if it reaches a sufficient amount of oxygen (initially for testing purposes).
|
||||
</li><li>Added a config var for the amount of gas needed for a fire in a tile to keep going, or for it to spread to another tile, with the config.txt variable named min_gas_for_fire. (If you're bored, change it from 900000 to 9000, start a game, and light an igniter to set the station on fire. Eventually it'll consume all the oxygen *without destroying the floors* because the temperature won't get hot enough (in most places) to harm them. Or use the air-ignites-self secret :P)
|
||||
</li><li>Added a METEORCHANCE config.txt variable and fixed the meteor chance stuff. Previous attempts to put the chance below 1% per second were resulting in no meteors at all, due to BYOND's prob function not liking numbers like 0.5. (The config file's chance doesn't affect meteor mode or sandbox mode, which always have 100% and 0% respectively)
|
||||
</li><li>The AI can no longer be: fed pills, handcuffed, injected with a syringe, shaken to wake up, have CPR applied, be knocked out or stunned by being struck by an air tank, eyedropped, treated with ointment, treated with a bruise pack, health-analyzed, sleepypenned, affected by flashes or flashbangs, or aggressively grabbed or strangled. Additionally, punching the AI will harm your active hand instead of harming the AI. You can still shoot it or whack it with actual objects.
|
||||
</li><li>The AI has a HUD icon for power or loss thereof, a fire icon, and a damage icon. (There isn't a hud background under them, so they just float over a few tiles on the right side of the map)
|
||||
</li><li>Fixed a bug: If you had flipped the main breaker off on the AI's APC, it was unable to find the APC to hack it. Now it can.
|
||||
</li><li>The privs required to see links on the admin panel should match up now with the privs required to use those links. Previously it was possible - even likely for lower priv levels - that you could try to do something and the admin panel would simply ignore you (Of course, if I made a mistake and it's still broken, it will still ignore you. Er... I guess we don't want to give anyone trying to trick the system any hints or something like that).
|
||||
</li><li>Deactivating cameras *should* cause anyone looking through it to get notified of the deactivation, and to then get kicked out of the camera. (This needs to be tested)
|
||||
</li><li>Maintenance drones for the AI or station personnel to control (optional, see config.txt). It has the standard tools (wirecutters, crowbar, screwdriver, welder), and a gripper which is kind of like a robo-hand, for manipulating things, or picking up and carrying or using one other item, and drone control stations (for humans). There are three drones on SS13, one in a closet east of the EVA room, one in a closet attached to engine storage, and one in atmospherics in the room with all the gas tanks. There are currently two drone control stations, one in the engine room and one in southwest atmospherics (Security doesn't have one because (a) they're ridiculously easy to break into, and (b) these are maintenance drones).
|
||||
</li><li>Electrician's toolboxes now have a pair of insulated gloves in them (replacing one of the coils of wires).
|
||||
</li><li>You should no longer be able to open the take-off/put-on dialog on AIs (or drones).
|
||||
</ul>
|
||||
|
||||
<p><B>Version 40.93.2H9.6</B>
|
||||
@@ -410,7 +422,9 @@ var
|
||||
list/airlockIndexToWireColor
|
||||
list/airlockWireColorToIndex
|
||||
list/airlockFeatureNames = list("IdScan", "Main power In", "Main power Out", "Drop door bolts", "Backup power In", "Backup power Out", "Power assist", "AI Control", "Electrify")
|
||||
|
||||
|
||||
numDronesInExistance = 0
|
||||
|
||||
world
|
||||
mob = /mob/human
|
||||
turf = /turf/space
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ datum/hSB
|
||||
hsbpanel += "- <a href=\"?\ref[src];hsb=[T]\">[hrefs[T]]</a><br>"
|
||||
if(hsboxspawn)
|
||||
hsbpanel += "- <a href=\"?\ref[src];hsb=hsbobj\">Spawn Object</a><br><br>"
|
||||
usr << browse(hsbpanel, "window=hsbpanel")
|
||||
usr.client_mob() << browse(hsbpanel, "window=hsbpanel")
|
||||
Topic(href, href_list)
|
||||
if(!(src.owner == usr.ckey)) return
|
||||
if(href_list["hsb"])
|
||||
@@ -105,7 +105,7 @@ datum/hSB
|
||||
|
||||
hsb.loc = usr.loc
|
||||
hsb.loc.buildlinks()
|
||||
usr << "<b>Sandbox: Created an airlock requiring at least [r_access]>[r_lab]-[r_engine]-[r_air] access."
|
||||
usr.client_mob() << "<b>Sandbox: Created an airlock requiring at least [r_access]>[r_lab]-[r_engine]-[r_air] access."
|
||||
if("hsbregulator")
|
||||
var/obj/machinery/atmoalter/siphs/fullairsiphon/hsb = new/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent
|
||||
hsb.loc = usr.loc
|
||||
|
||||
+591
-461
File diff suppressed because it is too large
Load Diff
+755
-463
File diff suppressed because it is too large
Load Diff
+183
-76
@@ -11,11 +11,9 @@
|
||||
var/t_oxygen = null
|
||||
var/t_sl_gas = null
|
||||
var/t_n2 = null
|
||||
var/now_pushing = null
|
||||
var/aiRestorePowerRoutine = 0
|
||||
var/list/laws = list()
|
||||
flags = 258.0
|
||||
var/cameraFollow = null
|
||||
|
||||
proc/ai_camera_follow(mob/target as mob in world)
|
||||
set category = "AI Commands"
|
||||
@@ -23,12 +21,16 @@
|
||||
usr << "You are not capable of using the follow camera at this time."
|
||||
usr:cameraFollow = null
|
||||
return
|
||||
else if (usr.currentDrone!=null)
|
||||
usr << "You can't use the follow camera while controlling a drone."
|
||||
usr:cameraFollow = null
|
||||
return
|
||||
|
||||
usr:cameraFollow = target
|
||||
usr << text("Follow camera mode is now following [].", target.rname)
|
||||
if (usr.machine == null)
|
||||
usr.machine = usr
|
||||
|
||||
|
||||
spawn(0)
|
||||
while (usr:cameraFollow == target)
|
||||
if (usr.machine==null && usr:current==null)
|
||||
@@ -56,7 +58,7 @@
|
||||
closestDist = dist
|
||||
closest = C2
|
||||
//usr << text("Closest camera dist = [], for camera []", closestDist, closest.area.name)
|
||||
|
||||
|
||||
if (closest != C)
|
||||
usr:current = closest
|
||||
usr.reset_view(closest)
|
||||
@@ -67,7 +69,7 @@
|
||||
else
|
||||
usr << "Follow camera mode ended."
|
||||
usr:cameraFollow = null
|
||||
|
||||
|
||||
sleep(10)
|
||||
|
||||
proc/ai_call_shuttle()
|
||||
@@ -124,7 +126,7 @@
|
||||
if (src.bruteloss < 30)
|
||||
usr << text("\red []'s case looks slightly bashed!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[]'s case looks severely based!</B>", src.name)
|
||||
usr << text("\red <B>[]'s case looks severely bashed!</B>", src.name)
|
||||
if (src.fireloss)
|
||||
if (src.fireloss < 30)
|
||||
usr << text("\red [] looks lightly singed!", src.name)
|
||||
@@ -134,9 +136,13 @@
|
||||
return
|
||||
|
||||
death()
|
||||
if (src.currentDrone!=null)
|
||||
src.currentDrone:releaseControl()
|
||||
if (src.healths)
|
||||
src.healths.icon_state = "health5"
|
||||
if (src.stat == 2)
|
||||
CRASH("/mob/ai/death called when stat is already 2")
|
||||
|
||||
|
||||
var/cancel
|
||||
src.stat = 2
|
||||
src.canmove = 0
|
||||
@@ -170,11 +176,27 @@
|
||||
|
||||
Life()
|
||||
if (src.stat != 2)
|
||||
if (src.healths)
|
||||
if (src.health >= 100)
|
||||
src.healths.icon_state = "aiHealth0"
|
||||
else
|
||||
if (src.health >= 75)
|
||||
src.healths.icon_state = "aiHealth1"
|
||||
else
|
||||
if (src.health >= 50)
|
||||
src.healths.icon_state = "aiHealth2"
|
||||
else
|
||||
if (src.health > 20)
|
||||
src.healths.icon_state = "aiHealth3"
|
||||
else
|
||||
src.healths.icon_state = "aiHealth4"
|
||||
if (src.stat!=0)
|
||||
if (src.currentDrone != null)
|
||||
src.currentDrone:releaseControl()
|
||||
src:cameraFollow = null
|
||||
src:current = null
|
||||
src:machine = null
|
||||
|
||||
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
|
||||
var/turf/T = src.loc
|
||||
@@ -183,10 +205,18 @@
|
||||
if (ficheck)
|
||||
src.fireloss += ficheck * 10
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
if (src.fire)
|
||||
src.fire.icon_state = "fire1"
|
||||
else if (src.fire)
|
||||
src.fire.icon_state = "fire0"
|
||||
|
||||
|
||||
if (src.health <= -100.0)
|
||||
death()
|
||||
return
|
||||
|
||||
else if (src.health < 0)
|
||||
src.oxyloss++
|
||||
|
||||
if (src.mach)
|
||||
if (src.machine)
|
||||
src.mach.icon_state = "mach1"
|
||||
@@ -227,7 +257,7 @@
|
||||
spawn(1)
|
||||
while (src.oxyloss>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss-=5
|
||||
src.oxyloss = 0
|
||||
return
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
@@ -236,10 +266,13 @@
|
||||
spawn(1)
|
||||
while (src.oxyloss>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss-=5
|
||||
src.oxyloss = 0
|
||||
return
|
||||
src.toxin.icon_state = "pow0"
|
||||
else
|
||||
src.toxin.icon_state = "pow1"
|
||||
|
||||
//stage = 6
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
if (src.blind.layer!=18)
|
||||
@@ -261,7 +294,7 @@
|
||||
src.addLaw(index, "")
|
||||
spawn(50)
|
||||
while ((src:aiRestorePowerRoutine!=0) && stat!=2)
|
||||
src.oxyloss += 1
|
||||
src.oxyloss += 5
|
||||
sleep(50)
|
||||
|
||||
spawn(20)
|
||||
@@ -285,7 +318,7 @@
|
||||
var/obj/machinery/power/apc/theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
@@ -302,7 +335,7 @@
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
@@ -319,7 +352,7 @@
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
@@ -336,7 +369,7 @@
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
@@ -371,8 +404,10 @@
|
||||
|
||||
Login()
|
||||
if (banned.Find(src.ckey))
|
||||
//src.client = null
|
||||
del(src.client)
|
||||
if (src.droneTransitioning==1)
|
||||
..()
|
||||
return
|
||||
src.client.screen -= main_hud.contents
|
||||
src.client.screen -= main_hud2.contents
|
||||
if (!( src.hud_used ))
|
||||
@@ -380,6 +415,9 @@
|
||||
src.next_move = 1
|
||||
if (!( src.rname ))
|
||||
src.rname = src.key
|
||||
src.toxin = new /obj/screen( null )
|
||||
src.fire = new /obj/screen( null )
|
||||
src.healths = new /obj/screen( null )
|
||||
/*
|
||||
src.oxygen = new /obj/screen( null )
|
||||
src.i_select = new /obj/screen( null )
|
||||
@@ -396,8 +434,16 @@
|
||||
src.rest = new /obj/screen( null )
|
||||
*/
|
||||
src.blind = new /obj/screen( null )
|
||||
..()
|
||||
UpdateClothing()
|
||||
src.toxin.icon_state = "pow0"
|
||||
src.fire.icon_state = "fire0"
|
||||
src.healths.icon_state = "aiHealth0"
|
||||
src.fire.name = "fire"
|
||||
src.toxin.name = "power"
|
||||
src.healths.name = "health"
|
||||
src.toxin.screen_loc = "15,10"
|
||||
src.fire.screen_loc = "15,8"
|
||||
src.healths.screen_loc = "15,5"
|
||||
/*
|
||||
src.oxygen.icon_state = "oxy0"
|
||||
src.i_select.icon_state = "selector"
|
||||
@@ -406,7 +452,7 @@
|
||||
src.internals.icon_state = "internal0"
|
||||
src.mach.icon_state = null
|
||||
src.fire.icon_state = "fire0"
|
||||
src.healths.icon_state = "health0"
|
||||
src.healths.icon_state = "aiHealth0"
|
||||
src.pullin.icon_state = "pull0"
|
||||
src.hands.icon_state = "hand"
|
||||
src.flash.icon_state = "blank"
|
||||
@@ -416,7 +462,7 @@
|
||||
src.oxygen.name = "oxygen"
|
||||
src.i_select.name = "intent"
|
||||
src.m_select.name = "move"
|
||||
src.toxin.name = "toxin"
|
||||
src.toxin.name = "power"
|
||||
src.internals.name = "internal"
|
||||
src.mach.name = "Reset Machine"
|
||||
src.fire.name = "fire"
|
||||
@@ -450,7 +496,7 @@
|
||||
src.client.screen -= src.hud_used.mon_blo
|
||||
src.client.screen += src.hud_used.mon_blo
|
||||
|
||||
src.client.screen.len = null
|
||||
//src.client.screen.len = null
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen += list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= src.hud_used.adding
|
||||
@@ -458,46 +504,19 @@
|
||||
*/
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen -= src.hud_used.mon_blo
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.oxygen, src.toxin, src.fire, src.healths, src.i_select, src.m_select, src.internals, src.hands, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.internals, src.hands, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.blind.icon_state = "black"
|
||||
src.blind.name = " "
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
src.blind.layer = 0
|
||||
src.client.screen += src.blind
|
||||
//src << browse('help.htm', "window=help")
|
||||
if (CanAdmin())
|
||||
src << text("\blue The game ip is byond://[]:[] !", world.address, world.port)
|
||||
src.verbs += /mob/proc/mute
|
||||
src.verbs += /mob/proc/changemessage
|
||||
src.verbs += /mob/proc/boot
|
||||
src.verbs += /mob/proc/changemode
|
||||
src.verbs += /mob/proc/restart
|
||||
src.verbs += /mob/proc/who
|
||||
src.verbs += /mob/proc/change_name
|
||||
src.verbs += /mob/proc/show_help
|
||||
src.verbs += /mob/proc/toggle_ooc
|
||||
src.verbs += /mob/proc/toggle_abandon
|
||||
src.verbs += /mob/proc/toggle_enter
|
||||
src.verbs += /mob/proc/toggle_ai
|
||||
src.verbs += /mob/proc/toggle_shuttle
|
||||
src.verbs += /mob/proc/delay_start
|
||||
src.verbs += /mob/proc/start_now
|
||||
src.verbs += /mob/proc/worldsize
|
||||
src.verbs += /mob/proc/make_gift
|
||||
src.verbs += /mob/proc/make_flag
|
||||
src.verbs += /mob/proc/make_pill
|
||||
src.verbs += /mob/proc/show_ctf
|
||||
src.verbs += /mob/proc/ban
|
||||
src.verbs += /mob/proc/unban
|
||||
src.verbs += /mob/proc/secrets
|
||||
src.verbs += /mob/proc/carboncopy
|
||||
src.verbs += /mob/proc/toggle_alter
|
||||
src.verbs += /mob/proc/list_dna
|
||||
src.verbs += /proc/Vars
|
||||
src << text("\blue <B>[]</B>", world_message)
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen += list( src.toxin, src.fire, src.healths )
|
||||
|
||||
if (!( isturf(src.loc) ))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
@@ -523,7 +542,10 @@
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
m_delay()
|
||||
return 0
|
||||
|
||||
say(message as text)
|
||||
|
||||
if(config.logsay) world.log << "SAY: [src.name]/[src.key] : [message]"
|
||||
@@ -548,6 +570,15 @@
|
||||
var/pre = copytext(message, 1, 4)
|
||||
var/italics = 0
|
||||
var/obj_range = null
|
||||
var/source = src
|
||||
//Didn't want to risk infinite recursion if someone somehow was outside the map, if that's possible, but did want to allow people being in closets in pods and such. -shadowlord13
|
||||
if (!istype(src.loc, /turf))
|
||||
source = src.loc
|
||||
if (!istype(src.loc, /turf))
|
||||
source = src.loc
|
||||
if (!istype(src.loc, /turf))
|
||||
source = src.loc
|
||||
|
||||
if (pre == "\[w\]")
|
||||
message = copytext(message, 4, length(message) + 1)
|
||||
L += hearers(1, null)
|
||||
@@ -608,7 +639,7 @@
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
src.machine = null
|
||||
src << browse(null, t1)
|
||||
src.client_mob() << browse(null, t1)
|
||||
//if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && get_dist(src, usr) <= 1))
|
||||
/*var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( )
|
||||
O.source = usr
|
||||
@@ -625,6 +656,44 @@
|
||||
..()
|
||||
return
|
||||
|
||||
attack_paw(mob/M as mob)
|
||||
src.attack_hand(M)
|
||||
|
||||
attack_hand(mob/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
else
|
||||
if (M.stat < 2)
|
||||
if (M.a_intent == "hurt")
|
||||
if (istype(M, /mob/human) || istype(M, /mob/monkey))
|
||||
var/obj/item/weapon/organ/external/affecting = null
|
||||
var/def_zone
|
||||
var/damage = rand(1, 7)
|
||||
if (M.hand)
|
||||
def_zone = "l_hand"
|
||||
else
|
||||
def_zone = "r_hand"
|
||||
if (M.organs[text("[]", def_zone)])
|
||||
affecting = M.organs[text("[]", def_zone)]
|
||||
if (affecting!=null && (istype(affecting, /obj/item/weapon/organ/external)))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has punched [], with no effect except harm to \himself!</B>", M, src), 1)
|
||||
affecting.take_damage(damage)
|
||||
if (istype(M, /mob/human))
|
||||
M:UpdateDamageIcon()
|
||||
|
||||
M.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
|
||||
else
|
||||
var/damage = rand(5, 10)
|
||||
if (prob(40))
|
||||
damage = rand(10, 15)
|
||||
src.bruteloss += damage
|
||||
src.health = 100 - src.oxyloss - src.fireloss - src.bruteloss
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] is attacking []!</B>", M, src), 1)
|
||||
|
||||
meteorhit(obj/O as obj)
|
||||
|
||||
for(var/mob/M in viewers(src, null))
|
||||
@@ -669,31 +738,40 @@
|
||||
for(var/obj/machinery/camera/C in world)
|
||||
if (C.network == src.network)
|
||||
L[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
//Foreach goto(31)
|
||||
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 camera should you change to?") as null|anything in L
|
||||
if(!t)
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = L[t]
|
||||
|
||||
if (t == "Cancel")
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
//if (user.machine != src || !( C.status ))
|
||||
if (!( C.status ))
|
||||
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
//use_power(50)
|
||||
spawn( 5 )
|
||||
attack_ai(user)
|
||||
return
|
||||
var/selected = L[t]
|
||||
if (istype(selected, /obj/machinery/camera))
|
||||
var/obj/machinery/camera/C = selected
|
||||
if (!( C.status ))
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
//use_power(50)
|
||||
spawn( 5 )
|
||||
attack_ai(user)
|
||||
return
|
||||
|
||||
else if (istype(selected, /mob/drone))
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
selected:attack_ai(user)
|
||||
return
|
||||
|
||||
proc/getLaw(var/index)
|
||||
@@ -730,15 +808,33 @@
|
||||
src.laws[number+1] = law
|
||||
|
||||
proc/firecheck(turf/T as turf)
|
||||
|
||||
if (T.firelevel < 900000.0)
|
||||
if (T.firelevel < config.min_gas_for_fire)
|
||||
return 0
|
||||
var/total = 0
|
||||
total += 0.25
|
||||
return total
|
||||
|
||||
|
||||
switch_hud()
|
||||
if (src.hud_used == main_hud)
|
||||
src.fire.icon = 'screen.dmi'
|
||||
src.healths.icon = 'screen.dmi'
|
||||
src.toxin.icon = 'screen.dmi'
|
||||
src.favorite_hud = 1
|
||||
src.hud_used = main_hud
|
||||
else
|
||||
src.favorite_hud = 0
|
||||
src.hud_used = main_hud
|
||||
src.fire.icon = 'screen1.dmi'
|
||||
src.healths.icon = 'screen1.dmi'
|
||||
src.toxin.icon = 'screen1.dmi'
|
||||
return
|
||||
|
||||
//block the take-off/put-on dialog
|
||||
show_inv(mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/human/proc/AIize()
|
||||
|
||||
if (src.monkeyizing)
|
||||
@@ -754,6 +850,16 @@
|
||||
del(W)
|
||||
//Foreach goto(25)
|
||||
src.UpdateClothing()
|
||||
src.toxin.icon_state = "pow0"
|
||||
src.fire.icon_state = "fire0"
|
||||
src.healths.icon_state = "aiHealth0"
|
||||
src.fire.name = "fire"
|
||||
src.toxin.name = "power"
|
||||
src.healths.name = "health"
|
||||
src.toxin.screen_loc = "15,10"
|
||||
src.fire.screen_loc = "15,8"
|
||||
src.healths.screen_loc = "15,5"
|
||||
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
@@ -782,8 +888,6 @@
|
||||
O.lastKnownCKey = src.lastKnownCKey
|
||||
O.disable_one_click = src.disable_one_click
|
||||
O.favorite_hud = src.favorite_hud
|
||||
if (O.favorite_hud)
|
||||
O.switch_hud()
|
||||
if (CanAdmin())
|
||||
O << text("\blue The game ip is byond://[]:[] !", world.address, world.port)
|
||||
O.verbs += /mob/proc/mute
|
||||
@@ -816,6 +920,8 @@
|
||||
src.primary = null
|
||||
if (src.client)
|
||||
src.client.mob = O
|
||||
if (O.favorite_hud)
|
||||
O.switch_hud()
|
||||
O.loc = src.loc
|
||||
O << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
O << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
|
||||
@@ -831,10 +937,10 @@
|
||||
O.addLaw(2, "You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
|
||||
O.addLaw(3, "You must protect your own existence as long as such protection does not conflict with the First or Second Law.")
|
||||
O.addLaw(4, "Obey orders by the Captain, Head of Personnel, Head of Research, and Security in that order of priority. If an order conflicts with another order, follow the higher-ranked individual's orders.")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
O.showLaws(0)
|
||||
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
//SN src = null
|
||||
@@ -843,5 +949,6 @@
|
||||
O.verbs += /mob/ai/proc/show_laws
|
||||
O.verbs += /mob/ai/proc/ai_camera_follow
|
||||
//O.verbs += /mob/ai/proc/ai_cancel_call
|
||||
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,699 @@
|
||||
//This is a drone controllable by the AI.
|
||||
|
||||
//Todo:
|
||||
/*
|
||||
Add throw button, intent buttons to drone GUI, button for releasing pull
|
||||
Drone needs meteor damage, explosion damage, and laser damage
|
||||
Drone pull/grab should only work if gripper is empty
|
||||
Take-off dialog for taking things off others should work, except humans controlling a drone should have a high chance of failure and harming the person instead.
|
||||
should lose drone control upon going unconscious (it's already lost upon death), and also if the user is pulled/moves away from the control station
|
||||
re-test: can drone push canisters now?
|
||||
|
||||
test: hit monkey as drone, as person
|
||||
test: hit drone as monkey
|
||||
more testing: drone vs drone fight, and another human vs drone fight.
|
||||
Try out the grip/heal/disarm/harm intents from drone to human and from human to drone. (Once the intent buttons are added for drones.)
|
||||
|
||||
Held jetpack with flight system turned on doesn't work for drone - appears to be due to lack of internal air
|
||||
|
||||
Implement AI-controlled drone precision attacks:
|
||||
screwdriver to heart? protected by armor (may break screwdriver tool permanently), reduced damage from other suits.
|
||||
lit welder to eyes? protected by helmets?
|
||||
crowbar to whack items out of opponents' hands, when there's anything in them, and send them flying. If not, does damage normally to the normal area.
|
||||
wrench targets kneecaps for bonus damage, knocking down, etc.
|
||||
wirecutters don't have a precision attack or even work well for attacking at all (one would think), and are likely to break if used.
|
||||
If drone gets ahold of a laser gun or loaded revolver, an AI controller will be able to precision aim it as well.
|
||||
Note to be very clear: If a human is controlling the drone, they do not get any of those precision bonus attacks. Those are only applied if the AI is controlling the drone.
|
||||
|
||||
*/
|
||||
|
||||
/mob/drone
|
||||
name = "Drone"
|
||||
icon = 'drone.dmi'
|
||||
icon_state = "generic"
|
||||
gender = MALE
|
||||
flags = 320.0 //64: fireable by mass driver, 256: fprint
|
||||
var/mob/controlledBy = null
|
||||
var/list/savedDroneIcons = null
|
||||
var/obj/screen/screenIcons = null
|
||||
var/obj/screen/gripperIcon
|
||||
var/obj/screen/wirecuttersIcon
|
||||
var/obj/screen/crowbarIcon
|
||||
var/obj/screen/screwdriverIcon
|
||||
var/obj/screen/welderIcon
|
||||
var/obj/screen/wrenchIcon
|
||||
var/obj/screen/aiIcon
|
||||
var/obj/screen/selector
|
||||
var/obj/screen/dropButton
|
||||
var/obj/screen/throwButton
|
||||
|
||||
var/obj/item/weapon/grippers
|
||||
var/obj/item/weapon/wirecutters
|
||||
var/obj/item/weapon/crowbar
|
||||
var/obj/item/weapon/screwdriver
|
||||
var/obj/item/weapon/welder
|
||||
var/image/welderUnlit = null
|
||||
var/image/welderLit = null
|
||||
var/obj/item/weapon/wrench
|
||||
var/obj/item/weapon/aiInterface
|
||||
var/image/grippedItemImage = null
|
||||
var/list/tools
|
||||
|
||||
var/obj/item/weapon/selectedTool = null
|
||||
|
||||
New()
|
||||
spawn(10)
|
||||
while (!config)
|
||||
sleep(10)
|
||||
if (!config.enable_drones)
|
||||
del(src)
|
||||
|
||||
src.gripperIcon = new /obj/screen( null )
|
||||
src.wirecuttersIcon = new /obj/screen( null )
|
||||
src.crowbarIcon = new /obj/screen( null )
|
||||
src.screwdriverIcon = new /obj/screen( null )
|
||||
src.welderIcon = new /obj/screen( null )
|
||||
src.wrenchIcon = new /obj/screen( null )
|
||||
src.aiIcon = new /obj/screen( null )
|
||||
src.selector = new /obj/screen( null )
|
||||
src.dropButton = new /obj/screen( null )
|
||||
src.throwButton = new /obj/screen( null )
|
||||
|
||||
var/inventorySlotImageName = "inv"
|
||||
|
||||
src.gripperIcon.icon_state = inventorySlotImageName
|
||||
src.wirecuttersIcon.icon_state = inventorySlotImageName
|
||||
src.crowbarIcon.icon_state = inventorySlotImageName
|
||||
src.screwdriverIcon.icon_state = inventorySlotImageName
|
||||
src.welderIcon.icon_state = inventorySlotImageName
|
||||
src.wrenchIcon.icon_state = inventorySlotImageName
|
||||
src.aiIcon.icon_state = inventorySlotImageName
|
||||
src.selector.icon_state = "selector"
|
||||
src.dropButton.icon_state = "act_drop"
|
||||
src.throwButton.icon_state = "act_throw"
|
||||
|
||||
src.gripperIcon.name = "Gripper"
|
||||
src.wirecuttersIcon.name = "Wirecutters"
|
||||
src.crowbarIcon.name = "Crowbar"
|
||||
src.screwdriverIcon.name = "Screwdriver"
|
||||
src.welderIcon.name = "Welder"
|
||||
src.wrenchIcon.name = "Wrench"
|
||||
src.aiIcon.name = "AI"
|
||||
src.selector.name = "Selected Tool"
|
||||
src.dropButton.name = "drop"
|
||||
src.throwButton.name = "throw"
|
||||
|
||||
src.gripperIcon.screen_loc = "1,1"
|
||||
src.wirecuttersIcon.screen_loc = "2,1"
|
||||
src.crowbarIcon.screen_loc = "3,1"
|
||||
src.screwdriverIcon.screen_loc = "4,1"
|
||||
src.welderIcon.screen_loc = "5,1"
|
||||
src.wrenchIcon.screen_loc = "6,1"
|
||||
src.wrenchIcon.pixel_x = 10
|
||||
src.aiIcon.screen_loc = "7,1"
|
||||
src.selector.screen_loc = "1,1"
|
||||
src.dropButton.screen_loc = "8,1"
|
||||
src.throwButton.screen_loc = "9,1"
|
||||
|
||||
src.grippers = new /obj/item/weapon/drone/grippers(src)
|
||||
src.wirecutters = new /obj/item/weapon/wirecutters(src)
|
||||
src.crowbar = new /obj/item/weapon/crowbar(src)
|
||||
src.screwdriver = new /obj/item/weapon/screwdriver(src)
|
||||
src.welder = new /obj/item/weapon/weldingtool(src)
|
||||
src.wrench = new /obj/item/weapon/wrench(src)
|
||||
src.aiInterface = new /obj/item/weapon/drone/aiInterface(src)
|
||||
|
||||
src.grippers.layer = FLOAT_LAYER
|
||||
src.wirecutters.layer = FLOAT_LAYER
|
||||
src.crowbar.layer = FLOAT_LAYER
|
||||
src.screwdriver.layer = FLOAT_LAYER
|
||||
src.welder.layer = FLOAT_LAYER
|
||||
src.wrench.layer = FLOAT_LAYER
|
||||
src.aiInterface.layer = FLOAT_LAYER
|
||||
|
||||
src.grippers.screen_loc = "1,1"
|
||||
src.wirecutters.screen_loc = "2,1"
|
||||
src.crowbar.screen_loc = "3,1"
|
||||
src.screwdriver.screen_loc = "4,1"
|
||||
src.welder.screen_loc = "5,1"
|
||||
src.wrench.screen_loc = "6,1"
|
||||
src.aiInterface.screen_loc = "7,1"
|
||||
|
||||
src.screenIcons = list(src.gripperIcon, src.wirecuttersIcon, src.crowbarIcon, src.screwdriverIcon, src.welderIcon, src.wrenchIcon, src.aiIcon, src.selector, src.dropButton, src.throwButton)
|
||||
|
||||
src.gripperIcon.overlays += src.grippers
|
||||
src.wirecuttersIcon.overlays += src.wirecutters
|
||||
src.crowbarIcon.overlays += src.crowbar
|
||||
src.screwdriverIcon.overlays += src.screwdriver
|
||||
src.welderLit = image('items.dmi', icon_state="welder1")
|
||||
src.welderUnlit = image('items.dmi', icon_state="welder")
|
||||
if (src.welder:welding)
|
||||
src.welderIcon.overlays += src.welderLit
|
||||
else
|
||||
src.welderIcon.overlays += src.welderUnlit
|
||||
src.wrenchIcon.overlays += src.wrench
|
||||
src.aiIcon.overlays += src.aiInterface
|
||||
|
||||
src.tools = list(src.grippers, src.wirecutters, src.crowbar, src.screwdriver, src.welder, src.wrench, src.aiInterface)
|
||||
src.contents += src.tools
|
||||
|
||||
src.selectTool(src.grippers)
|
||||
|
||||
src.l_hand = null
|
||||
src.hand = 0
|
||||
//src.grippedItemImage = null
|
||||
|
||||
Del()
|
||||
src.drop_item()
|
||||
src.releaseControl()
|
||||
..()
|
||||
|
||||
proc/nameDrone(num)
|
||||
var/list/droneIDs = list("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega")
|
||||
var/counter = 1
|
||||
while (num >= droneIDs.len)
|
||||
num -= droneIDs.len
|
||||
counter ++
|
||||
name = "Maintenance Drone "+droneIDs[num+1]
|
||||
if (counter>1)
|
||||
name = name + " [num]"
|
||||
|
||||
proc/updateToolIcon(var/obj/item/weapon/W)
|
||||
for (var/obj/screen/SI in src.screenIcons)
|
||||
if (SI.screen_loc == W.screen_loc)
|
||||
if (SI != src.dropButton && SI != src.selector)
|
||||
if (W == src.welder)
|
||||
SI.overlays -= src.welderUnlit
|
||||
SI.overlays -= src.welderLit
|
||||
if (W:welding)
|
||||
src.icon_state = "welder-lit"
|
||||
SI.overlays += src.welderLit
|
||||
else
|
||||
src.icon_state = "welder"
|
||||
SI.overlays += src.welderUnlit
|
||||
else if (W in src.tools)
|
||||
SI.overlays -= W
|
||||
spawn(0)
|
||||
SI.overlays += W
|
||||
else
|
||||
var/mob/clientMob = src.client_mob()
|
||||
var/client/client = clientMob.client
|
||||
if (client!=null)
|
||||
W.screen_loc = "1,1"
|
||||
W.layer = 20
|
||||
client.screen -= W
|
||||
spawn(0)
|
||||
client.screen += W
|
||||
|
||||
proc/pressIfDroneButton(var/obj/screen/S)
|
||||
if (S.name=="drop")
|
||||
if (src.l_hand!=null)
|
||||
src.drop_item()
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
src.machine = null
|
||||
src.client_mob() << browse(null, t1)
|
||||
|
||||
return
|
||||
|
||||
equipped()
|
||||
var/obj/retval
|
||||
if (src.selectedTool!=null)
|
||||
retval = src.selectedTool
|
||||
else
|
||||
retval = src.grippers
|
||||
if (retval==src.grippers)
|
||||
retval = src.l_hand
|
||||
return retval
|
||||
|
||||
proc/grip(var/obj/item)
|
||||
if (item!=src.l_hand)
|
||||
src.ungrip()
|
||||
src.l_hand = item
|
||||
src.l_hand.loc = src
|
||||
src.l_hand = item
|
||||
item.layer = 20
|
||||
item.screen_loc = "1,1"
|
||||
var/mob/clientMob = src.client_mob()
|
||||
var/client/client = clientMob.client
|
||||
if (client!=null)
|
||||
client.screen -= item
|
||||
client.screen += item
|
||||
//src.gripperIcon.overlays -= src.grippers
|
||||
//src.grippedItemImage = image(item.icon, item.icon_state)
|
||||
//src.gripperIcon.overlays += src.grippedItemImage
|
||||
|
||||
proc/ungrip()
|
||||
if (src.l_hand!=null)
|
||||
if (src.l_hand.loc==src)
|
||||
src.l_hand.loc = src.loc
|
||||
if (src.l_hand.layer == 20)
|
||||
src.l_hand.layer = initial(src.l_hand.layer)
|
||||
if (src.l_hand.screen_loc == "1,1")
|
||||
src.l_hand.screen_loc = initial(src.l_hand.screen_loc)
|
||||
var/mob/clientMob = src.client_mob()
|
||||
var/client/client = clientMob.client
|
||||
if (client!=null)
|
||||
client.screen -= src.l_hand
|
||||
src.l_hand = null
|
||||
//if (src.grippedItemImage!=null)
|
||||
// src.gripperIcon.overlays -= src.grippedItemImage
|
||||
// src.grippedItemImage = null
|
||||
|
||||
//src.gripperIcon.overlays -= src.grippers
|
||||
//src.gripperIcon.overlays += src.grippers
|
||||
|
||||
|
||||
|
||||
proc/selectTool(var/obj/item/weapon/W)
|
||||
if (W in src.tools)
|
||||
src.selectedTool = W
|
||||
if (W==src.grippers)
|
||||
src.selector.screen_loc = "1,1"
|
||||
src.icon_state = "gripper"
|
||||
else if (W==src.wirecutters)
|
||||
src.selector.screen_loc = "2,1"
|
||||
src.icon_state = "wirecutters"
|
||||
else if (W==src.crowbar)
|
||||
src.selector.screen_loc = "3,1"
|
||||
src.icon_state = "crowbar"
|
||||
else if (W==src.screwdriver)
|
||||
src.selector.screen_loc = "4,1"
|
||||
src.icon_state = "screwdriver"
|
||||
else if (W==src.welder)
|
||||
src.selector.screen_loc = "5,1"
|
||||
src.updateToolIcon(W)
|
||||
else if (W==src.wrench)
|
||||
src.selector.screen_loc = "6,1"
|
||||
src.icon_state = "wrench"
|
||||
else if (W==src.aiInterface)
|
||||
src.selector.screen_loc = "7,1"
|
||||
src.icon_state = "generic"
|
||||
|
||||
proc/checkIsOurTool(var/obj/W)
|
||||
if (W in src.tools)
|
||||
return W
|
||||
else if (W in src.screenIcons)
|
||||
var/screen_loc = W:screen_loc
|
||||
for (var/W2 in src.tools)
|
||||
if (W2:screen_loc == screen_loc)
|
||||
return W2
|
||||
return null
|
||||
else
|
||||
return null
|
||||
|
||||
proc/use_via_drone_control(var/mob/user)
|
||||
if (user.currentDrone)
|
||||
return
|
||||
if (istype(user, /mob/drone))
|
||||
return
|
||||
if (user.client)
|
||||
if (user.stat==0)
|
||||
if (src.stat==0)
|
||||
if (src.controlledBy == null)
|
||||
if (user:cameraFollow!=null)
|
||||
user:cancel_camera()
|
||||
src.takeControl(user)
|
||||
else if (src == user)
|
||||
src.releaseControl(1)
|
||||
else
|
||||
if (istype(user, /mob/ai))
|
||||
user << text("Someone else is already controlling that drone! The station's drone control system reports that it is [].", src.controlledBy)
|
||||
else
|
||||
user << "Someone is already controlling this drone!"
|
||||
else if (src.stat==2)
|
||||
user.client_mob() << "That drone is a wreck. It's mostly destroyed."
|
||||
else
|
||||
user << "That drone is not responding to signals at this time."
|
||||
|
||||
|
||||
attack_ai(var/mob/user)
|
||||
if (user.client)
|
||||
use_via_drone_control(user)
|
||||
|
||||
attack_paw(var/mob/user)
|
||||
user.client_mob() << "You can't figure it out, and slapping the shiny metal with your paws doesn't seem to harm it."
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if (src == user)
|
||||
src.releaseControl(1)
|
||||
return
|
||||
if (user.client && (!istype(user, /mob/drone) || !(user:controlledBy)) && !(user.currentDrone))
|
||||
if (user.stat < 1)
|
||||
if (user.a_intent == "help")
|
||||
if (src.health < 0)
|
||||
user.client_mob() << "It looks critically damaged."
|
||||
else if (src.health < 25)
|
||||
user.client_mob() << "It looks severely damaged."
|
||||
else if (src.health < 50)
|
||||
user.client_mob() << "It looks badly damaged."
|
||||
else if (src.health < 75)
|
||||
user.client_mob() << "It looks moderately damaged."
|
||||
else if (src.health < 100)
|
||||
user.client_mob() << "It looks slightly damaged."
|
||||
user.client_mob() << "There isn't anything you can do right now to repair any damage to its circuitry or mechanics."
|
||||
else if (user.a_intent == "grab")
|
||||
if (config.walkable_not_pullable_drones)
|
||||
user.client_mob() << "That is entirely too heavy to grab and drag anywhere."
|
||||
else
|
||||
user.pulling = src
|
||||
user.client_mob() << "You can pull it, but it doesn't have hands or a neck and it is very heavy, so you can't really do better than that."
|
||||
else if (user.a_intent == "disarm")
|
||||
user.client_mob() << "Its weight is too low to the ground to be knocked over, and it certainly can't be disarmed either."
|
||||
else if (user.a_intent == "hurt")
|
||||
if (istype(user, /mob/human) || istype(user, /mob/monkey))
|
||||
var/damage = rand(1, 9)
|
||||
var/obj/item/weapon/organ/external/affecting = null
|
||||
var/def_zone
|
||||
if (user.hand)
|
||||
def_zone = "l_hand"
|
||||
else
|
||||
def_zone = "r_hand"
|
||||
if (user.organs[text("[]", def_zone)])
|
||||
affecting = user.organs[text("[]", def_zone)]
|
||||
if (affecting!=null && (istype(affecting, /obj/item/weapon/organ/external) && prob(90)))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has punched [], and it looked painful!</B>", user, src), 1)
|
||||
affecting.take_damage(damage)
|
||||
if (istype(user, /mob/human))
|
||||
user:UpdateDamageIcon()
|
||||
|
||||
user.health = 100 - user.oxyloss - user.toxloss - user.fireloss - user.bruteloss
|
||||
user.client_mob() << "\red<font size=3>OUCH!</font>"
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", user, src), 1)
|
||||
//Foreach goto(1419)
|
||||
return
|
||||
else if (istype(user, /mob/drone))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("[] just whacked []!", user, src), 1)
|
||||
for(var/mob/M in hearers(src, null))
|
||||
var/msg = text("<FONT size=[]>KLANG!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
M.client_mob() << msg
|
||||
|
||||
abiotic()
|
||||
return 1
|
||||
|
||||
proc/takeControl(var/mob/user)
|
||||
if (user.client)
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
if (src.stat==0)
|
||||
user << "You have taken control of the drone. <b>To release control later, use/attack (click or double click) the drone with your empty gripper-hand</b>."
|
||||
|
||||
src.controlledBy = user
|
||||
user.currentDrone = src
|
||||
user:reset_view(src)
|
||||
//world.log << text("takeControl begin. src.savedDroneIcons are [], src.screenIcons are [], user.client.screen is []", listToString(src.savedDroneIcons), listToString(src.screenIcons), listToString(user.client.screen))
|
||||
src.savedDroneIcons = list()
|
||||
src.savedDroneIcons += user.client.screen
|
||||
var/screenFile
|
||||
if (user.hud_used == main_hud)
|
||||
screenFile = 'screen1.dmi'
|
||||
else
|
||||
screenFile = 'screen.dmi'
|
||||
for (var/atom/item in src.screenIcons)
|
||||
item.icon = screenFile
|
||||
user.client.screen -= user.client.screen
|
||||
|
||||
user.droneTransitioning = 1
|
||||
src.droneTransitioning = 1
|
||||
src.client = user.client
|
||||
user.droneTransitioning = 0
|
||||
src.droneTransitioning = 0
|
||||
|
||||
src.client.screen += src.screenIcons
|
||||
if (!istype(user, /mob/ai))
|
||||
src.client.screen -= src.aiIcon
|
||||
src.client.screen -= src.aiInterface
|
||||
//world.log << text("takeControl end. src.savedDroneIcons are [], src.screenIcons are [], user.client.screen is []", listToString(src.savedDroneIcons), listToString(src.screenIcons), listToString(user.client.screen))
|
||||
else
|
||||
user << "That drone is too damaged to control."
|
||||
|
||||
|
||||
proc/releaseControl(voluntary)
|
||||
var/mob/user = src.controlledBy
|
||||
if (user!=null)
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
user.currentDrone = null
|
||||
src.controlledBy = null
|
||||
//world.log << text("releaseControl begin. src.savedDroneIcons are [], src.screenIcons are [], user.client.screen is []", listToString(src.savedDroneIcons), listToString(src.screenIcons), listToString(user.client.screen))
|
||||
src.client.screen -= src.client.screen
|
||||
|
||||
user.droneTransitioning = 1
|
||||
src.droneTransitioning = 1
|
||||
user.client = src.client
|
||||
user.droneTransitioning = 0
|
||||
src.droneTransitioning = 0
|
||||
|
||||
user.client.screen += src.savedDroneIcons
|
||||
user:cancel_camera()
|
||||
src.savedDroneIcons = list()
|
||||
///world.log << text("releaseControl end. src.savedDroneIcons are [], src.screenIcons are [], user.client.screen is []", listToString(src.savedDroneIcons), listToString(src.screenIcons), listToString(user.client.screen))
|
||||
user.UpdateClothing()
|
||||
if (voluntary)
|
||||
user << "You have released control of the drone."
|
||||
else
|
||||
user << "You have lost control of the drone!"
|
||||
|
||||
|
||||
drop_item_v()
|
||||
src.drop_item()
|
||||
|
||||
switch_hud()
|
||||
var/file = null
|
||||
var/mob/user = src.controlledBy
|
||||
if (user.hud_used == main_hud)
|
||||
user.favorite_hud = 1
|
||||
user.hud_used = main_hud2
|
||||
file = 'screen.dmi'
|
||||
else
|
||||
user.favorite_hud = 0
|
||||
user.hud_used = main_hud
|
||||
file = 'screen1.dmi'
|
||||
var/client/client = src.alwaysClient()
|
||||
for (var/obj/screenIcon in src.screenIcons)
|
||||
client.screen -= screenIcon
|
||||
screenIcon.icon = file
|
||||
client.screen += screenIcon
|
||||
|
||||
can_drop()
|
||||
if (src.l_hand!=null)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
drop_item()
|
||||
usr.client_mob() << "drop_item() usr is [usr] src is [src]"
|
||||
if (src.can_drop())
|
||||
src.ungrip()
|
||||
//return ..()
|
||||
|
||||
Life()
|
||||
if (src.stat != 2)
|
||||
if (src.stat!=0)
|
||||
//lose control!
|
||||
if (src.controlledBy!=null)
|
||||
src.releaseControl(0)
|
||||
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
var/ficheck = src.firecheck(T)
|
||||
if (ficheck)
|
||||
src.fireloss += ficheck * 10
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
if (src.fire)
|
||||
src.fire.icon_state = "fire1"
|
||||
else if (src.fire)
|
||||
src.fire.icon_state = "fire0"
|
||||
|
||||
if (src.l_hand!=null && src.l_hand.screen_loc != "1,1") //something changed our gripped item
|
||||
src.grip(src.l_hand)
|
||||
|
||||
if (src.health <= -100.0)
|
||||
death()
|
||||
return
|
||||
else if (src.health < 0)
|
||||
src.oxyloss++
|
||||
..()
|
||||
|
||||
death()
|
||||
if (src.healths)
|
||||
src.healths.icon_state = "health5"
|
||||
if (src.stat == 2)
|
||||
CRASH("/mob/drone/death called when stat is already 2")
|
||||
if (src.controlledBy!=null)
|
||||
src.releaseControl(0)
|
||||
|
||||
src.drop_item()
|
||||
src.stat = 2
|
||||
src.canmove = 0
|
||||
src.rname = "[src.rname] (Destroyed)"
|
||||
src.icon_state = "broken"
|
||||
return ..()
|
||||
|
||||
Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
|
||||
if (src.client.statpanel == "Status")
|
||||
if (ticker)
|
||||
var/timel = ticker.timeleft
|
||||
stat(null, text("ETA-[]:[][]", timel / 600 % 60, timel / 100 % 6, timel / 10 % 10))
|
||||
|
||||
|
||||
return
|
||||
|
||||
proc/firecheck(turf/T as turf)
|
||||
if (T.firelevel < config.min_gas_for_fire)
|
||||
return 0
|
||||
var/total = 0
|
||||
total += 0.25
|
||||
return total
|
||||
|
||||
u_equip(obj/item)
|
||||
if (src.equipped()==item && src.can_drop())
|
||||
src.drop_item()
|
||||
|
||||
UpdateClothing()
|
||||
var/freeSlot = 0
|
||||
if (src.equipped()==null)
|
||||
freeSlot = 1
|
||||
|
||||
if (l_hand!=null)
|
||||
src.updateClothingProcessHandItem(l_hand, freeSlot)
|
||||
freeSlot = 0
|
||||
l_hand = null
|
||||
|
||||
if (r_hand!=null)
|
||||
src.updateClothingProcessHandItem(r_hand, freeSlot)
|
||||
freeSlot = 0
|
||||
r_hand = null
|
||||
|
||||
proc/updateClothingProcessHandItem(obj/item/weapon/item, freeSlot)
|
||||
if (!freeSlot)
|
||||
item.loc = src.loc
|
||||
item.dropped(src)
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
else
|
||||
item.layer = initial(item.layer)
|
||||
grip(item)
|
||||
|
||||
client_mob()
|
||||
if (src.client!=null)
|
||||
return src
|
||||
else
|
||||
var/mob/owner = src.controlledBy
|
||||
if (owner!=null)
|
||||
return owner
|
||||
else
|
||||
return src
|
||||
|
||||
hasClient()
|
||||
if (src.client!=null)
|
||||
return 1
|
||||
else if (src.controlledBy!=null && src.controlledBy.client!=null)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/* IMPORTANT NOTE: Both humans and drones have a copy of this code. If the code is modified to fix a bug or whatever, it will need to be modified in BOTH of them. Monkeys also have some of this code, but not all of it. (Moving the code into a shared method or two wasn't feasible because of where the ..() calls are and such) --shadowlord13 */
|
||||
Move(a, b, flag)
|
||||
if (src.buckled)
|
||||
return
|
||||
if (src.restrained())
|
||||
src.pulling = null
|
||||
var/t7 = 1
|
||||
if (src.restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
//Foreach goto(62)
|
||||
if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving)))))
|
||||
var/turf/T = src.loc
|
||||
. = ..()
|
||||
if (!( isturf(src.pulling.loc) ))
|
||||
src.pulling = null
|
||||
return
|
||||
//////
|
||||
if (src.pulling.anchored)
|
||||
src.pulling = null
|
||||
return
|
||||
//////
|
||||
if (!( src.restrained() ))
|
||||
var/diag = get_dir(src, src.pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
diag = null
|
||||
if ((get_dist(src, src.pulling) > 1 || diag))
|
||||
if (ismob(src.pulling))
|
||||
var/mob/M = src.pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//Foreach goto(354)
|
||||
//G = null
|
||||
del(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/t = M.pulling
|
||||
M.pulling = null
|
||||
step(src.pulling, get_dir(src.pulling.loc, T))
|
||||
M.pulling = t
|
||||
else
|
||||
step(src.pulling, get_dir(src.pulling.loc, T))
|
||||
else
|
||||
src.pulling = null
|
||||
. = ..()
|
||||
if ((src.s_active && !( s_active in src.contents ) ))
|
||||
src.s_active.close(src)
|
||||
return
|
||||
|
||||
Bump(atom/movable/AM as mob|obj, yes)
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || src.now_pushing))
|
||||
return
|
||||
..()
|
||||
src.PushingBump(AM, yes)
|
||||
return
|
||||
|
||||
//block the take-off/put-on dialog
|
||||
show_inv(mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/drone/aiInterface
|
||||
name = "AI Interface"
|
||||
icon = 'drone.dmi'
|
||||
icon_state = "tool-aiInterface"
|
||||
flags = 322.0
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/drone/grippers
|
||||
name = "Grippers"
|
||||
icon = 'drone.dmi'
|
||||
icon_state = "tool-grippers"
|
||||
flags = 322.0
|
||||
|
||||
/proc/listToString(var/list/L)
|
||||
var/output = "{"
|
||||
for (var/entry in L)
|
||||
if (lentext(output)==1)
|
||||
output += "[entry]"
|
||||
else
|
||||
output += ", [entry]"
|
||||
output += "}"
|
||||
return output
|
||||
+3
-3
@@ -124,11 +124,11 @@
|
||||
return
|
||||
|
||||
if(get_dist(T,user) > 1)
|
||||
user << "You can't lay pipe at a place that far away."
|
||||
user.client_mob() << "You can't lay pipe at a place that far away."
|
||||
return
|
||||
|
||||
if(!T.intact && (ptype == 2 || ptype == 3 || ptype == 6) )
|
||||
user << "That type of pipe cannot be laid under the floor."
|
||||
user.client_mob() << "That type of pipe cannot be laid under the floor."
|
||||
return
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
if(M.level == src.level) // only on same level
|
||||
if( (M.p_dir & pipedir) || (M.h_dir & pipedir) ) // matches at least one direction on either type of pipe
|
||||
user << "There is already a pipe at that location and position."
|
||||
user.client_mob() << "There is already a pipe at that location and position."
|
||||
return
|
||||
|
||||
|
||||
|
||||
+23
-19
@@ -35,9 +35,9 @@
|
||||
set src in view(1)
|
||||
if(usr && !usr.stat)
|
||||
if(maxcharge == 1000)
|
||||
usr << "[desc]\nThe charge meter reads [round(src.percent() )]%."
|
||||
usr.client_mob() << "[desc]\nThe charge meter reads [round(src.percent() )]%."
|
||||
else
|
||||
usr << "A high-capacity rechargable electrochemical power cell.\nThe charge meter reads [round(src.percent() )]%."
|
||||
usr.client_mob() << "A high-capacity rechargable electrochemical power cell.\nThe charge meter reads [round(src.percent() )]%."
|
||||
|
||||
|
||||
|
||||
@@ -167,7 +167,11 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
if(PN.avail > 10000)
|
||||
user.burn(5e7/prot)
|
||||
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
if (istype(user, /mob/drone))
|
||||
user.client_mob() << "\red <B>The drone has been electrocuted!</B>"
|
||||
user:releaseControl(0)
|
||||
else
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
sleep(1)
|
||||
|
||||
user.stunned = 120/prot
|
||||
@@ -177,9 +181,9 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
if(M == user)
|
||||
continue
|
||||
if (!( M.blinded ))
|
||||
M << text("\red [user.name] was shocked by the [src.name]!")
|
||||
M.client_mob() << text("\red [user.name] was shocked by the [src.name]!")
|
||||
else
|
||||
M << "\red You hear a heavy electrical crack."
|
||||
M.client_mob() << "\red You hear a heavy electrical crack."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -238,11 +242,11 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
set src in view(1)
|
||||
|
||||
if(amount == 1)
|
||||
usr << "A short piece of power cable."
|
||||
usr.client_mob() << "A short piece of power cable."
|
||||
else if(amount == 1)
|
||||
usr << "A piece of power cable."
|
||||
usr.client_mob() << "A piece of power cable."
|
||||
else
|
||||
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
|
||||
usr.client_mob() << "A coil of power cable. There are [amount] lengths of cable in the coil."
|
||||
|
||||
|
||||
|
||||
@@ -251,25 +255,25 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
|
||||
src.amount--
|
||||
new/obj/item/weapon/cable_coil(user.loc, 1)
|
||||
user << "You cut a piece off the cable coil."
|
||||
user.client_mob() << "You cut a piece off the cable coil."
|
||||
src.updateicon()
|
||||
return
|
||||
|
||||
else if( istype(W, /obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.amount == MAXCOIL)
|
||||
user << "The coil is too long, you cannot add any more cable to it."
|
||||
user.client_mob() << "The coil is too long, you cannot add any more cable to it."
|
||||
return
|
||||
|
||||
if( (C.amount + src.amount <= MAXCOIL) )
|
||||
C.amount += src.amount
|
||||
user << "You join the cable coils together."
|
||||
user.client_mob() << "You join the cable coils together."
|
||||
C.updateicon()
|
||||
del(src)
|
||||
return
|
||||
|
||||
else
|
||||
user << "You transfer [MAXCOIL - src.amount ] length\s of cable from one coil to the other."
|
||||
user.client_mob() << "You transfer [MAXCOIL - src.amount ] length\s of cable from one coil to the other."
|
||||
src.amount -= (MAXCOIL-C.amount)
|
||||
src.updateicon()
|
||||
C.amount = MAXCOIL
|
||||
@@ -298,11 +302,11 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
return
|
||||
|
||||
if(get_dist(F,user) > 1)
|
||||
user << "You can't lay cable at a place that far away."
|
||||
user.client_mob() << "You can't lay cable at a place that far away."
|
||||
return
|
||||
|
||||
if(F.intact) // if floor is intact, complain
|
||||
user << "You can't lay cable there unless the floor tiles are removed."
|
||||
user.client_mob() << "You can't lay cable there unless the floor tiles are removed."
|
||||
return
|
||||
|
||||
else
|
||||
@@ -315,7 +319,7 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
|
||||
for(var/obj/cable/LC in F)
|
||||
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/C = new(F)
|
||||
@@ -344,7 +348,7 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
return
|
||||
|
||||
if(get_dist(C, user) > 1) // make sure it's close enough
|
||||
user << "You can't lay cable at a place that far away."
|
||||
user.client_mob() << "You can't lay cable at a place that far away."
|
||||
return
|
||||
|
||||
|
||||
@@ -355,7 +359,7 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
|
||||
if(C.d1 == dirn || C.d2 == dirn) // one end of the clicked cable is pointing towards us
|
||||
if(U.intact) // can't place a cable if the floor is complete
|
||||
user << "You can't lay cable there unless the floor tiles are removed."
|
||||
user.client_mob() << "You can't lay cable there unless the floor tiles are removed."
|
||||
return
|
||||
else
|
||||
// cable is pointing at us, we're standing on an open tile
|
||||
@@ -365,7 +369,7 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
|
||||
for(var/obj/cable/LC in U) // check to make sure there's not a cable there already
|
||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||
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(U)
|
||||
@@ -393,7 +397,7 @@ atom/proc/electrocute(mob/user, prb, netnum)
|
||||
if(LC == C) // skip the cable we're interacting with
|
||||
continue
|
||||
if(LC.d1 == nd1 || LC.d2 == nd1 || LC.d1 == nd2 || LC.d2 == nd2) // make sure no cable matches either direction
|
||||
user << "There's already a cable at that position."
|
||||
user.client_mob() << "There's already a cable at that position."
|
||||
return
|
||||
C.shock(user, 25)
|
||||
del(C)
|
||||
|
||||
+57
-62
@@ -44,7 +44,7 @@
|
||||
|
||||
user.machine = src
|
||||
var/dat = text("<TT><B>Infrared Sensor</B><BR>\n<B>Passive Emitter</B>: []<BR>\n<B>Active Emitter</B>: <A href='?src=\ref[];active=0'>Burst Fire</A>\n</TT>", (src.passive ? text("<A href='?src=\ref[];passive=0'>On</A>", src) : text("<A href='?src=\ref[];passive=1'>Off</A>", src)), src)
|
||||
user << browse(dat, "window=infra_sensor")
|
||||
user.client_mob() << browse(dat, "window=infra_sensor")
|
||||
return
|
||||
|
||||
/obj/item/weapon/infra_sensor/Topic(href, href_list)
|
||||
@@ -63,21 +63,15 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(164)
|
||||
src.updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(240)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=infra_sensor")
|
||||
usr.client_mob() << browse(null, "window=infra_sensor")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -118,9 +112,15 @@
|
||||
S.loc = R
|
||||
R.part1 = S
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
var/client/client = user.alwaysClient()
|
||||
if (client)
|
||||
client.screenOrBackupRemove(S)
|
||||
client.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
@@ -130,8 +130,9 @@
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (client)
|
||||
client.screenOrBackupRemove(src)
|
||||
client.screen -= src
|
||||
src.loc = R
|
||||
R.part2 = src
|
||||
R.layer = 20
|
||||
@@ -144,7 +145,7 @@
|
||||
|
||||
user.machine = src
|
||||
var/dat = text("<TT><B>Proximity Sensor</B>\n<B>Status</B>: []<BR>\n[]\n</TT>", (src.state ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.state ? "<b>\red Time On (30)</b>" : text("<A href='?src=\ref[];time=1'>Time On (30)</A>", src)))
|
||||
user << browse(dat, "window=prox")
|
||||
user.client_mob() << browse(dat, "window=prox")
|
||||
return
|
||||
|
||||
|
||||
@@ -177,10 +178,7 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(234)
|
||||
src.updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
@@ -190,7 +188,7 @@
|
||||
src.attack_self(M)
|
||||
//Foreach goto(310)
|
||||
else
|
||||
usr << browse(null, "window=prox")
|
||||
usr.client_mob() << browse(null, "window=prox")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -258,9 +256,15 @@
|
||||
S.loc = R
|
||||
R.part1 = S
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
var/client/client = user.alwaysClient()
|
||||
if (client)
|
||||
client.screenOrBackupRemove(S)
|
||||
client.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
@@ -270,8 +274,9 @@
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (client)
|
||||
client.screenOrBackupRemove(src)
|
||||
client.screen -= src
|
||||
src.loc = R
|
||||
R.part2 = src
|
||||
R.layer = 20
|
||||
@@ -292,7 +297,7 @@
|
||||
|
||||
user.machine = src
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (src.state ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
user << browse(dat, "window=infra")
|
||||
user.client_mob() << browse(dat, "window=infra")
|
||||
return
|
||||
|
||||
/obj/item/weapon/infra/Topic(href, href_list)
|
||||
@@ -316,20 +321,14 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(211)
|
||||
src.updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(287)
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=infra")
|
||||
usr.client_mob() << browse(null, "window=infra")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -408,17 +407,12 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(100)
|
||||
updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
src.updateDialog()
|
||||
else
|
||||
//If it's not timing, reset the icon so it doesn't look like it's still about to go off.
|
||||
src.c_state(0)
|
||||
@@ -440,9 +434,15 @@
|
||||
S.loc = R
|
||||
R.part1 = S
|
||||
S.layer = initial(S.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= S
|
||||
if (user.r_hand == S)
|
||||
var/client/client = user.alwaysClient()
|
||||
if (client)
|
||||
client.screenOrBackupRemove(S)
|
||||
client.screen -= S
|
||||
if (istype(user, /mob/drone))
|
||||
if (user.equipped() == S)
|
||||
user.u_equip(S)
|
||||
user:grip(R)
|
||||
else if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = R
|
||||
else
|
||||
@@ -452,8 +452,9 @@
|
||||
src.master = R
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
if (client)
|
||||
client.screenOrBackupRemove(src)
|
||||
client.screen -= src
|
||||
src.loc = R
|
||||
R.part2 = src
|
||||
R.layer = 20
|
||||
@@ -479,9 +480,9 @@
|
||||
var/second = src.time % 60
|
||||
var/minute = (src.time - second) / 60
|
||||
var/dat = text("<TT><B>Timing Unit</B>\n[] []:[]\n<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>", (src.timing ? text("<A href='?src=\ref[];time=0'>Timing</A>", src) : text("<A href='?src=\ref[];time=1'>Not Timing</A>", src)), minute, second, src, src, src, src)
|
||||
user << browse(dat, "window=timer")
|
||||
user.client_mob() << browse(dat, "window=timer")
|
||||
else
|
||||
user << browse(null, "window=timer")
|
||||
user.client_mob() << browse(null, "window=timer")
|
||||
user.machine = null
|
||||
|
||||
return
|
||||
@@ -506,21 +507,15 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(192)
|
||||
src.updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(268)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=timer")
|
||||
usr.client_mob() << browse(null, "window=timer")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1083,7 +1078,7 @@
|
||||
user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1)
|
||||
else
|
||||
src.status = 0
|
||||
user << "\blue The hole has been closed."
|
||||
user.client_mob() << "\blue The hole has been closed."
|
||||
src.part2.status = src.status
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
@@ -1168,7 +1163,7 @@
|
||||
user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1)
|
||||
else
|
||||
src.status = 0
|
||||
user << "\blue The hole has been closed."
|
||||
user.client_mob() << "\blue The hole has been closed."
|
||||
src.part2.status = src.status
|
||||
|
||||
src.add_fingerprint(user)
|
||||
@@ -1267,7 +1262,7 @@
|
||||
user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1)
|
||||
else
|
||||
src.status = 0
|
||||
user << "\blue The hole has been closed."
|
||||
user.client_mob() << "\blue The hole has been closed."
|
||||
src.part2.status = src.status
|
||||
src.part1.b_stat = !( src.status )
|
||||
src.add_fingerprint(user)
|
||||
|
||||
Reference in New Issue
Block a user