rej cleanup

This commit is contained in:
LetterJay
2017-05-10 22:35:01 -05:00
parent cbffd533ba
commit b7acf503eb
8 changed files with 0 additions and 195 deletions
-28
View File
@@ -1,28 +0,0 @@
diff a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm (rejected hunks)
@@ -328,6 +328,26 @@ GLOBAL_LIST(external_rsc_urls)
if(!tooltips)
tooltips = new /datum/tooltip(src)
+ var/list/topmenus = GLOB.menulist[/datum/menu]
+ for (var/thing in topmenus)
+ var/datum/menu/topmenu = thing
+ var/topmenuname = "[topmenu]"
+ if (topmenuname == "[topmenu.type]")
+ var/list/tree = splittext(topmenuname, "/")
+ topmenuname = tree[tree.len]
+ winset(src, "[topmenu.type]", "parent=menu;name=[url_encode(topmenuname)]")
+ var/list/entries = topmenu.Generate_list(src)
+ for (var/child in entries)
+ winset(src, "[url_encode(child)]", "[entries[child]]")
+ if (!ispath(child, /datum/menu))
+ var/atom/verb/verbpath = child
+ if (copytext(verbpath.name,1,2) != "@")
+ new child(src)
+
+ for (var/thing in prefs.menuoptions)
+ var/datum/menu/menuitem = GLOB.menulist[thing]
+ if (menuitem)
+ menuitem.Load_checked(src)
//////////////
//DISCONNECT//
-18
View File
@@ -1,18 +0,0 @@
diff a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm (rejected hunks)
@@ -102,6 +102,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/uplink_spawn_loc = UPLINK_PDA
+ var/list/menuoptions
+
/datum/preferences/New(client/C)
parent = C
custom_names["ai"] = pick(GLOB.ai_names)
@@ -124,6 +126,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!loaded_preferences_successfully)
save_preferences()
save_character() //let's save this new random character so it doesn't keep generating new ones.
+ menuoptions = list()
return
@@ -1,38 +0,0 @@
diff a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm (rejected hunks)
@@ -1,5 +1,5 @@
//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped.
-#define SAVEFILE_VERSION_MIN 10
+#define SAVEFILE_VERSION_MIN 15
//This is the current version, anything below this will attempt to update (if it's not obsolete)
#define SAVEFILE_VERSION_MAX 17
@@ -156,12 +137,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["tgui_fancy"] >> tgui_fancy
S["tgui_lock"] >> tgui_lock
S["windowflash"] >> windowflashing
+ S["be_special"] >> be_special
- if(islist(S["be_special"]))
- S["be_special"] >> be_special
- else //force update and store the old bitflag version of be_special
- needs_update = 11
- S["be_special"] >> old_be_special
S["default_slot"] >> default_slot
S["chat_toggles"] >> chat_toggles
@@ -177,6 +154,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["uses_glasses_colour"]>> uses_glasses_colour
S["clientfps"] >> clientfps
S["parallax"] >> parallax
+ S["menuoptions"] >> menuoptions
//try to fix any outdated data if necessary
if(needs_update >= 0)
@@ -235,6 +216,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["uses_glasses_colour"]<< uses_glasses_colour
S["clientfps"] << clientfps
S["parallax"] << parallax
+ S["menuoptions"] << menuoptions
return 1