NanoUI Optimizations.

We won't regenerate the list for Manifests every tick while viewing the manifest, instead we have a global variable for it PDA_Manifest that we Cut() if there is a change to the manifest then when the next player goes to view the manifest on their PDA it will recreate the list that one time.

Some sections of the PDA will no longer auto-refresh every tick because...well that's dumb.

Modes that will no longer autoupdate at all:  Viewing medical/sec records, viewing notes (will update when you change them of course), and the station alert menu.
Modes that will only autoupdate every 5 ticks:  APC list (Because it's a huge fuck off list), the manifest, mulebots and secbots screens, supply requests/orders, and janitor supply locator)

Some other things that I just can't remember right now.
This commit is contained in:
Ccomp5950
2014-03-03 22:50:24 -06:00
parent 4ddd799359
commit aa9141fb75
6 changed files with 86 additions and 35 deletions

View File

@@ -289,6 +289,8 @@ What a mess.*/
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
if ("Purge All Records")
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.security)
del(R)
temp = "All Employment records deleted."
@@ -300,6 +302,9 @@ What a mess.*/
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
//RECORD CREATE
if ("New Record (General)")
if(PDA_Manifest.len)
PDA_Manifest.Cut()
var/datum/data/record/G = new /datum/data/record()
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
@@ -372,12 +377,16 @@ What a mess.*/
switch(href_list["choice"])
if ("Change Rank")
if (active1)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
active1.fields["rank"] = href_list["rank"]
if(href_list["rank"] in get_all_jobs())
active1.fields["real_rank"] = href_list["real_rank"]
if ("Delete Record (ALL) Execute")
if (active1)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
del(R)
@@ -416,4 +425,4 @@ What a mess.*/
del(R)
continue
..(severity)
..(severity)