mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01: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:
@@ -233,7 +233,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
//NOTE: graphic resources are loaded on client login
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
if(active_uplink_check(user))
|
||||
return
|
||||
@@ -438,14 +438,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if ( !(U.stat || U.restrained()) )
|
||||
|
||||
add_fingerprint(U)
|
||||
U.machine = src
|
||||
U.set_machine(src)
|
||||
|
||||
switch(href_list["choice"])
|
||||
|
||||
//BASIC FUNCTIONS===================================
|
||||
|
||||
if("Close")//Self explanatory
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if("Refresh")//Refresh, goes to the end of the proc.
|
||||
@@ -635,7 +635,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -656,11 +656,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
else//If can't interact.
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
else//If not in range or not using the pda.
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -676,7 +676,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
else
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
|
||||
@@ -641,7 +641,7 @@ Code:
|
||||
..()
|
||||
|
||||
if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Intelicard</B><BR>"
|
||||
var/laws
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
@@ -82,16 +82,16 @@
|
||||
var/mob/U = usr
|
||||
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
return
|
||||
|
||||
add_fingerprint(U)
|
||||
U.machine = src
|
||||
U.set_machine(src)
|
||||
|
||||
switch(href_list["choice"])//Now we switch based on choice.
|
||||
if ("Close")
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
return
|
||||
|
||||
if ("Wipe")
|
||||
@@ -99,7 +99,7 @@
|
||||
if(confirm == "Yes")
|
||||
if(isnull(src)||!in_range(src, U)||U.machine!=src)
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
U.unset_machine()
|
||||
return
|
||||
else
|
||||
flush = 1
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/obj/item/device/paicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Personal AI Device</B><BR>"
|
||||
if(pai && (!pai.master_dna || !pai.master))
|
||||
dat += "<a href='byond://?src=\ref[src];setdna=1'>Imprint Master DNA</a><br>"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
if(!istype(user, /mob/living/carbon/human))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"<TT>
|
||||
<A href='?src=\ref[src];power=1'>Turn [on ? "Off" : "On"]</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<BR>
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
|
||||
/obj/item/device/radio/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/proc/interact(mob/user as mob)
|
||||
@@ -129,7 +129,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
|
||||
usr << browse(null, "window=radio")
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"])
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"])
|
||||
@@ -643,7 +643,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) ))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
@@ -675,7 +675,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"<B> Valve properties: </B>
|
||||
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
|
||||
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]
|
||||
|
||||
@@ -314,7 +314,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
return 0
|
||||
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
|
||||
/obj/item/device/violin/attack_self(mob/user as mob)
|
||||
if(!isliving(user) || user.stat || user.restrained() || user.lying) return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<HEAD><TITLE>Violin</TITLE></HEAD><BODY>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user