Fix previous commit for BS12.

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2014-01-08 11:49:15 +00:00
parent 68ae21fac3
commit 794be2b31e
8 changed files with 17 additions and 19 deletions

View File

@@ -35,7 +35,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/proc/generate_nanoui_items()
var/items_nano[0]
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
var/list/O = text2list(D, ":")
if(O.len != 3) //If it is not an actual item, make a break in the menu.
if(O.len == 1) //If there is one item, it's probably a title
items_nano[++items_nano.len] = list("Category" = "[O[1]]", "items" = list())
@@ -53,7 +53,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
else
var/itemname = O[3]
items_nano[items_nano.len]["items"] += list(list("Name" = itemname, "Cost" = cost, "obj_path" = path_text))
return items_nano
@@ -62,7 +62,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
//Halfassed fix for href exploit ~Z
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
var/list/O = text2list(D, ":")
if(O.len>0)
valid_items += O[1]
@@ -83,7 +83,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/category_items = 1 //To prevent stupid :P
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
var/list/O = text2list(D, ":")
if(O.len != 3) //If it is not an actual item, make a break in the menu.
if(O.len == 1) //If there is one item, it's probably a title
dat += "<b>[O[1]]</b><br>"
@@ -273,7 +273,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/Topic(href, href_list)
if (href_list["buy_item"])
if(href_list["buy_item"] == "random")
var/boughtItem = chooseRandomItem()
if(boughtItem)
@@ -347,19 +347,19 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/title = "Syndicate Uplink"
var/data[0]
data["crystals"] = uses
data["nano_items"] = nanoui_items
data["welcome"] = welcome
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -381,7 +381,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
usr.set_machine(src)
if(href_list["lock"])
toggle()
ui.close()
ui.close()
return 1
if(..(href, href_list) == 1)