mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-Killed the updateDialog lag. I added a check to see if there were any mobs to update, if not it will stop checking until a user uses the machine again. I had to replace all the machine = src and machine = null with procs to help make it manageable. I believe this is one of the culprits causing the server to lag as the round goes on, as more players will interact with machines.
-Atmos delay is now based on active players, to help fight lag for massive player rounds. -Changed some for(blah in world) loops to use the correct lists. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4958 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -132,7 +132,7 @@
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!user) return 0
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? 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)))
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
density = 0
|
||||
|
||||
/obj/machinery/artillerycontrol/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
||||
dat += "Locked on<BR>"
|
||||
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
||||
|
||||
@@ -92,7 +92,7 @@ obj/machinery/computer/forensic_scanning
|
||||
attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
var/isai = 0
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
|
||||
@@ -33,7 +33,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/SQLquery
|
||||
|
||||
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Library Visitor</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -135,7 +135,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
|
||||
|
||||
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -411,7 +411,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
O.loc = src
|
||||
|
||||
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Scanner Control Interface</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
if(cache)
|
||||
dat += "<FONT color=#005500>Data stored in memory.</FONT><BR>"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["sel_iron"])
|
||||
if (href_list["sel_iron"] == "yes")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["release"])
|
||||
switch(href_list["release"])
|
||||
|
||||
@@ -112,7 +112,7 @@ proc/move_mining_shuttle()
|
||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(ticker.mode.name == "blob")
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
usr << "\blue The machine is processing."
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/item/weapon/moneybag/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/coin/COIN
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/structure/ore_box/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
|
||||
@@ -509,7 +509,7 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
|
||||
@@ -435,7 +435,7 @@
|
||||
|
||||
/mob/living/carbon/human/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
@@ -559,7 +559,7 @@
|
||||
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
|
||||
|
||||
@@ -670,7 +670,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/metroid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
@@ -826,7 +826,8 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 5)
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("rorojelly", 1)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
|
||||
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
var/list/ai_list = list()
|
||||
|
||||
//Not sure why this is necessary...
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
var/is_in_use = 0
|
||||
if (subject!=null)
|
||||
for(var/mob/living/silicon/ai/M in player_list)
|
||||
for(var/A in ai_list)
|
||||
var/mob/living/silicon/ai/M = A
|
||||
if ((M.client && M.machine == subject))
|
||||
world << "[M] - Using [subject]"
|
||||
is_in_use = 1
|
||||
subject.attack_ai(M)
|
||||
return is_in_use
|
||||
|
||||
|
||||
/mob/living/silicon/ai
|
||||
@@ -105,10 +112,14 @@
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
|
||||
ai_list += src
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/Del()
|
||||
ai_list -= src
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
set category = "AI Commands"
|
||||
@@ -302,7 +313,7 @@
|
||||
if (href_list["mach_close"] == "aialerts")
|
||||
viewalerts = 0
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
if (href_list["switchcamera"])
|
||||
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
|
||||
@@ -531,7 +542,7 @@
|
||||
/mob/living/silicon/ai/proc/ai_network_change()
|
||||
set category = "AI Commands"
|
||||
set name = "Jump To Network"
|
||||
machine = null
|
||||
unset_machine()
|
||||
src.cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define UPDATE_BUFFER 20 // 2 seconds
|
||||
#define UPDATE_BUFFER 25 // 2.5 seconds
|
||||
|
||||
// CAMERA CHUNK
|
||||
//
|
||||
|
||||
@@ -116,8 +116,8 @@
|
||||
user.cameraFollow = null
|
||||
src.eye = user.eyeobj
|
||||
|
||||
//user.machine = null //Uncomment this if it causes problems.
|
||||
user.lightNearbyCamera()
|
||||
//user.unset_machine() //Uncomment this if it causes problems.
|
||||
//user.lightNearbyCamera()
|
||||
|
||||
|
||||
// Return to the Core.
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
current = null
|
||||
cameraFollow = null
|
||||
machine = null
|
||||
unset_machine()
|
||||
|
||||
if(src.eyeobj && src.loc)
|
||||
src.eyeobj.loc = src.loc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if (src.stat!=0)
|
||||
src.cameraFollow = null
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -216,14 +216,14 @@
|
||||
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
return 0
|
||||
if (stat == 2 || !C.status || C.network != src.network) return 0
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
src.machine = src
|
||||
src.set_machine(src)
|
||||
src:current = C
|
||||
src.reset_view(C)
|
||||
return 1
|
||||
@@ -233,7 +233,7 @@
|
||||
set category = "pAI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
@@ -242,7 +242,7 @@
|
||||
set category = "pAI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/dat = ""
|
||||
var/left_part = ""
|
||||
var/right_part = softwareMenu()
|
||||
src.machine = src
|
||||
src.set_machine(src)
|
||||
|
||||
if(temp)
|
||||
left_part = temp
|
||||
|
||||
@@ -839,7 +839,7 @@
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
return
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/interact(mob/user)
|
||||
if(wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/t1 = text("<B>Access Panel</B><br>\n")
|
||||
var/list/Borgwires = list(
|
||||
"Orange" = 1,
|
||||
@@ -116,7 +116,7 @@
|
||||
/mob/living/silicon/robot/Topic(href, href_list)
|
||||
..()
|
||||
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if (href_list["borgwires"])
|
||||
var/t1 = text2num(href_list["borgwires"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
@@ -138,7 +138,7 @@
|
||||
src.pulse(t1)
|
||||
else if (href_list["close2"])
|
||||
usr << browse(null, "window=borgwires")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
#undef BORG_WIRE_LAWCHECK
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
* Inventory
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
|
||||
@@ -219,7 +219,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
|
||||
/mob/proc/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
@@ -509,7 +509,7 @@ var/list/slot_equipment_priority = list( \
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
reset_view(null)
|
||||
machine = null
|
||||
unset_machine()
|
||||
if(istype(src, /mob/living))
|
||||
if(src:cameraFollow)
|
||||
src:cameraFollow = null
|
||||
@@ -517,7 +517,7 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/Topic(href, href_list)
|
||||
if(href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
// ..()
|
||||
return
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
usr.m_intent = "run"
|
||||
usr.m_int = "13,14"
|
||||
if("Reset Machine")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
if("internal")
|
||||
if (( !usr.stat && !usr.stunned && !usr.paralysis && !usr.restrained() ))
|
||||
if (usr.internal)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
user << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<center><table>"
|
||||
var/i
|
||||
for(i=contents.len, i>=1, i--)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "Photocopier<BR><BR>"
|
||||
if(copy || photocopy)
|
||||
|
||||
@@ -263,10 +263,10 @@
|
||||
/obj/machinery/power/am_control_unit/proc/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=AMcontrol")
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = ""
|
||||
dat += "AntiMatter Control Panel<BR>"
|
||||
@@ -303,13 +303,13 @@
|
||||
..()
|
||||
//Ignore input if we are broken or guy is not touching us, AI can control from a ways away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=AMcontrol")
|
||||
return
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=AMcontrol")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["togglestatus"])
|
||||
|
||||
@@ -86,11 +86,7 @@
|
||||
/obj/machinery/power/apc/updateDialog()
|
||||
if (stat & (BROKEN|MAINT))
|
||||
return
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if (M.client && M.machine == src)
|
||||
src.interact(M)
|
||||
AutoUpdateAI(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
@@ -463,7 +459,7 @@
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit)
|
||||
return
|
||||
// do APC interaction
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
src.interact(user)
|
||||
|
||||
/obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
@@ -513,24 +509,24 @@
|
||||
user << browse(t1, "window=apcwires")
|
||||
onclose(user, "apcwires")
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
|
||||
|
||||
//This goes after the wire stuff. They should be able to fix a physical problem when a wire is cut
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack)
|
||||
user << "AI control for this APC interface has been disabled."
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
else if (src.malfai)
|
||||
if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai))
|
||||
user << "AI control for this APC interface has been disabled."
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
|
||||
@@ -748,7 +744,7 @@
|
||||
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
|
||||
user << "\red You don't have the dexterity to use this [src]!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
if(user.restrained())
|
||||
user << "\red You must have free hands to use this [src]"
|
||||
@@ -770,12 +766,12 @@
|
||||
if(!loud)
|
||||
user << "\red \The [src] have AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
else
|
||||
if ((!in_range(src, user) || !istype(src.loc, /turf)))
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -794,7 +790,7 @@
|
||||
if(!can_use(usr, 1))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if (href_list["apcwires"])
|
||||
var/t1 = text2num(href_list["apcwires"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
@@ -857,11 +853,11 @@
|
||||
update()
|
||||
else if( href_list["close"] )
|
||||
usr << browse(null, "window=apc")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
else if (href_list["close2"])
|
||||
usr << browse(null, "window=apcwires")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
else if (href_list["overload"])
|
||||
|
||||
@@ -123,11 +123,11 @@
|
||||
|
||||
/obj/machinery/power/generator/proc/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai)))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=teg")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<PRE><B>Thermo-Electric Generator</B><HR>"
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
|
||||
/obj/machinery/power/generator_type2/proc/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai)))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=teg")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<PRE><B>Thermo-Electric Generator</B><HR>"
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/gravity_control_computer/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
if ( (get_dist(src, usr) > 1 ))
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=air_alarm")
|
||||
return
|
||||
|
||||
|
||||
@@ -239,11 +239,11 @@ display round(lastgen) and plasmatank amount
|
||||
/obj/machinery/power/port_gen/pacman/proc/interact(mob/user)
|
||||
if (get_dist(src, user) > 1 )
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=port_gen")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = text("<b>[name]</b><br>")
|
||||
if (active)
|
||||
@@ -284,7 +284,7 @@ display round(lastgen) and plasmatank amount
|
||||
src.updateUsrDialog()
|
||||
if (href_list["action"] == "close")
|
||||
usr << browse(null, "window=port_gen")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super
|
||||
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
||||
|
||||
@@ -70,13 +70,13 @@
|
||||
..()
|
||||
//Ignore input if we are broken, !silicon guy cant touch us, or nonai controlling from super far away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon)) || (get_dist(src, usr) > 8 && !istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pacontrol")
|
||||
return
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=pacontrol")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
if(href_list["togglep"])
|
||||
src.toggle_power()
|
||||
@@ -205,10 +205,10 @@
|
||||
/obj/machinery/particle_accelerator/control_box/proc/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=pacontrol")
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = ""
|
||||
dat += "Particle Accelerator Control Panel<BR>"
|
||||
|
||||
@@ -180,11 +180,11 @@
|
||||
|
||||
/obj/machinery/power/smes/proc/interact(mob/user)
|
||||
if(get_dist(src, user) > 1 && !istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=smes")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
else if( href_list["cmode"] )
|
||||
@@ -299,7 +299,7 @@
|
||||
|
||||
else
|
||||
usr << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -276,12 +276,12 @@
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<TT><B>Solar Generator Control</B><HR><PRE>"
|
||||
t += "Generated power : [round(lastgen)] W<BR><BR>"
|
||||
@@ -306,11 +306,11 @@
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
if(href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["dir"])
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
@@ -43,7 +43,7 @@
|
||||
Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
if (data == "amountc")
|
||||
var/num = input("Enter desired output amount", "Amount", "30") as num
|
||||
@@ -162,7 +162,7 @@
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
initWindow(user)
|
||||
updateWindow(user)
|
||||
@@ -251,7 +251,7 @@
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
|
||||
if (href_list["ejectp"])
|
||||
@@ -260,7 +260,7 @@
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chemmaster")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(beaker)
|
||||
@@ -374,7 +374,7 @@
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert beaker.<BR>"
|
||||
@@ -488,7 +488,7 @@
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(!beaker) return
|
||||
|
||||
if (href_list["create_vaccine"])
|
||||
@@ -566,7 +566,7 @@
|
||||
/obj/machinery/computer/pandemic/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(src.temphtml)
|
||||
dat = "[src.temphtml]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
|
||||
@@ -789,7 +789,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/interact(mob/user as mob) // The microwave Menu
|
||||
@@ -841,7 +841,7 @@
|
||||
/obj/machinery/reagentgrinder/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
switch(href_list["action"])
|
||||
if ("grind")
|
||||
grind()
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if(stat & BROKEN)
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return
|
||||
|
||||
var/dat = "<head><title>Waste Disposal Unit</title></head><body><TT><B>Waste Disposal Unit</B><HR>"
|
||||
@@ -244,7 +244,7 @@
|
||||
dat += "Pressure: [round(per, 1)]%<BR></body>"
|
||||
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=disposal;size=360x170")
|
||||
onclose(user, "disposal")
|
||||
|
||||
@@ -266,10 +266,10 @@
|
||||
return
|
||||
|
||||
if (in_range(src, usr) && istype(src.loc, /turf))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["close"])
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=disposal")
|
||||
return
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
eject()
|
||||
else
|
||||
usr << browse(null, "window=disposal")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
|
||||
var/temp_screen = text2num(href_list["menu"])
|
||||
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access.
|
||||
@@ -548,7 +548,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
files.RefreshResearch()
|
||||
switch(screen) //A quick check to make sure you get the right screen when a device is disconnected.
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/machinery/r_n_d/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["pulse"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(!src.allowed(usr) && !emagged)
|
||||
usr << "\red You do not have the required access level"
|
||||
return
|
||||
@@ -276,7 +276,7 @@
|
||||
/obj/machinery/computer/rdservercontrol/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
|
||||
switch(screen)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
user << "This device is busy"
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<h1>Keycard Authentication Device</h1>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user