* Added buttons to the syndie uplink which will reveal/hide the description of the items. [?] [X]

* Fixed being able to order items with an inactive uplink.
 * Shortened the name of an uplink item to make room.
 * Removed the (?) from the Random Item to help avoid confusion with the new buttons.
This commit is contained in:
Giacomand
2013-08-06 05:57:11 +01:00
parent 6f4e534ca3
commit ad8c525218
2 changed files with 23 additions and 5 deletions
+2 -2
View File
@@ -234,7 +234,7 @@ var/list/uplink_items = list()
cost = 1
/datum/uplink_item/device_tools/hacked_module
name = "Hacked Artificial Intelligence Law Upload Module"
name = "Hacked AI Law Upload Module"
desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. Be careful with their wording, as artificial intelligences may look for loopholes to exploit."
item = /obj/item/weapon/aiModule/syndicate
cost = 7
@@ -307,7 +307,7 @@ var/list/uplink_items = list()
cost = 10
/datum/uplink_item/badass/random
name = "Random Item (?)"
name = "Random Item"
desc = "Picking this choice will send you a random item from the list. Useful for when you cannot think of a strategy to finish your objectives with."
item = /obj/item/weapon/storage/box/syndicate
cost = 0
+21 -3
View File
@@ -11,6 +11,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/uses // Numbers of crystals
// List of items not to shove in their hands.
var/list/purchase_log = list()
var/show_description = null
var/active = 0
/obj/item/device/uplink/New()
..()
@@ -45,9 +47,15 @@ A list of items and costs is stored under the datum of every game mode, alongsid
if(item.cost > 0)
cost_text = "([item.cost])"
if(item.cost <= uses)
dat += "<A href='byond://?src=\ref[src];buy_item=[category]:[i];'>[item.name]</A> [cost_text]<BR><font size=2>[desc]</font><BR>"
dat += "<A href='byond://?src=\ref[src];buy_item=[category]:[i];'>[item.name]</A> [cost_text] "
else
dat += "<font color='grey'><i>[item.name] [cost_text]</i></font><BR><font size=2><font color='grey'><i>[desc]</i></font></font><BR>"
dat += "<font color='grey'><i>[item.name] [cost_text] </i></font>"
if(item.desc)
if(show_description == item.type)
dat += "<A href='byond://?src=\ref[src];show_desc=0'><font size=2>\[-\]</font></A><BR><font size=2>[desc]</font>"
else
dat += "<A href='byond://?src=\ref[src];show_desc=[item.type]'><font size=2>\[?\]</font></A>"
dat += "<BR>"
// Break up the categories, if it isn't the last.
if(buyable_items.len != index)
@@ -70,6 +78,10 @@ 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(!active)
return
if (href_list["buy_item"])
var/item = href_list["buy_item"]
@@ -89,6 +101,13 @@ A list of items and costs is stored under the datum of every game mode, alongsid
I.buy(src, usr)
else if(href_list["show_desc"])
var/type = text2path(href_list["show_desc"])
show_description = type
interact(usr)
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
@@ -104,7 +123,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/hidden
name = "Hidden Uplink."
desc = "There is something wrong if you're examining this."
var/active = 0
/obj/item/device/uplink/hidden/Topic(href, href_list)
..()