mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
Rudimentary uplink descriptions.
This commit is contained in:
@@ -11,12 +11,21 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/cost = 0
|
||||
var/path = null
|
||||
var/reference = ""
|
||||
var/description = ""
|
||||
|
||||
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text)
|
||||
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text, var/itemDescription)
|
||||
cost = itemCost
|
||||
path = itemPath
|
||||
name = itemName
|
||||
reference = itemReference
|
||||
description = itemDescription
|
||||
|
||||
|
||||
datum/uplink_item/proc/description()
|
||||
if(!description)
|
||||
// Fallback description
|
||||
var/obj/temp = src.path
|
||||
description = replacetext(initial(temp.desc), "\n", "<br>")
|
||||
return description
|
||||
|
||||
datum/nano_item_lists
|
||||
var/list/items_nano
|
||||
@@ -41,16 +50,17 @@ datum/nano_item_lists
|
||||
uses = ticker.mode.uplink_uses
|
||||
ItemsCategory = ticker.mode.uplink_items
|
||||
|
||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||
nanoui_items = IL.items_nano
|
||||
ItemsReference = IL.items_reference
|
||||
|
||||
world_uplinks += src
|
||||
|
||||
/obj/item/device/uplink/Del()
|
||||
world_uplinks -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/uplink/proc/generate_items()
|
||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||
nanoui_items = IL.items_nano
|
||||
ItemsReference = IL.items_reference
|
||||
|
||||
// BS12 no longer use this menu but there are forks that do, hency why we keep it
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
var/dat = "<B>[src.welcome]</B><BR>"
|
||||
@@ -87,7 +97,7 @@ datum/nano_item_lists
|
||||
for(var/category in ItemsCategory)
|
||||
nano[++nano.len] = list("Category" = category, "items" = list())
|
||||
for(var/datum/uplink_item/I in ItemsCategory[category])
|
||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Cost" = I.cost, "obj_path" = I.reference))
|
||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
|
||||
reference[I.reference] = I
|
||||
|
||||
var/datum/nano_item_lists/result = new
|
||||
@@ -189,6 +199,8 @@ datum/nano_item_lists
|
||||
data["welcome"] = welcome
|
||||
data["crystals"] = uses
|
||||
data["menu"] = nanoui_menu
|
||||
if(!nanoui_items)
|
||||
generate_items()
|
||||
data["nano_items"] = nanoui_items
|
||||
data += nanoui_data
|
||||
|
||||
|
||||
+99
-93
@@ -1,93 +1,99 @@
|
||||
|
||||
<!--
|
||||
Title: Syndicate Uplink, uses some javascript to change nanoUI up a bit.
|
||||
Used In File(s): \code\game\objects\items\devices\uplinks.dm
|
||||
-->
|
||||
{{:helper.syndicateMode()}}
|
||||
<H2><span class="white">{{:data.welcome}}</span></H2>
|
||||
<br>
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
<b>Functions</b>:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.link('Request Items', 'gear', {'menu' : 0}, null, 'fixedLeftWider')}}
|
||||
{{:helper.link('Exploitable Information', 'gear', {'menu' : 1}, null, 'fixedLeftWider')}}
|
||||
{{:helper.link('Return', 'arrowreturn-1-w', {'return' : 1}, null, 'fixedLeft')}}
|
||||
{{:helper.link('Close', 'gear', {'lock' : "1"}, null, 'fixedLeft')}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
{{if data.menu == 0}}
|
||||
<H2><span class="white">Request items:</span></H2>
|
||||
<span class="white"><i>Each item costs a number of tele-crystals as indicated by the number following their name.</i></span>
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
<b>Tele-Crystals</b>:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:data.crystals}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{{for data.nano_items}}
|
||||
<div class="item">
|
||||
<H3><span class="white">{{:value.Category}}</span></H3>
|
||||
</div>
|
||||
{{for value.items :itemValue:itemIndex}}
|
||||
<div class="item">
|
||||
{{:helper.link( itemValue.Name, 'gear', {'buy_item' : itemValue.obj_path, 'cost' : itemValue.Cost}, itemValue.Cost > data.crystals ? 'disabled' : null, null)}} - <span class="white">{{:itemValue.Cost}}</span>
|
||||
</div>
|
||||
{{/for}}
|
||||
<br>
|
||||
{{/for}}
|
||||
|
||||
<div class="item">
|
||||
{{:helper.link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, data.crystals <= 0 ? 'disabled' : null, null)}}
|
||||
</div>
|
||||
|
||||
{{else data.menu == 1}}
|
||||
<H2><span class="white">Information Record List:</span></H2>
|
||||
<br>
|
||||
<div class="item">
|
||||
Select a Record
|
||||
</div>
|
||||
<br>
|
||||
{{for data.exploit_records}}
|
||||
<div class="item">
|
||||
{{:helper.link(value.Name, 'gear', {'menu' : 11, 'id' : value.id}, null, null)}}
|
||||
</div>
|
||||
{{/for}}
|
||||
|
||||
{{else data.menu == 11}}
|
||||
<H2><span class="white">Information Record:</span></H2>
|
||||
<br>
|
||||
<div class="statusDisplayRecords">
|
||||
<div class="item">
|
||||
<div class="itemContent" style="width: 100%;">
|
||||
{{if data.exploit_exists == 1}}
|
||||
<span class="good">Name: </span> <span class="average">{{:data.exploit.name}} </span><br>
|
||||
<span class="good">Sex: </span> <span class="average">{{:data.exploit.sex}} </span><br>
|
||||
<span class="good">Species: </span> <span class="average">{{:data.exploit.species}} </span><br>
|
||||
<span class="good">Age: </span> <span class="average">{{:data.exploit.age}} </span><br>
|
||||
<span class="good">Rank: </span> <span class="average">{{:data.exploit.rank}} </span><br>
|
||||
<span class="good">Home System: </span> <span class="average">{{:data.exploit.home_system}} </span><br>
|
||||
<span class="good">Citizenship: </span> <span class="average">{{:data.exploit.citizenship}} </span><br>
|
||||
<span class="good">Faction: </span> <span class="average">{{:data.exploit.faction}} </span><br>
|
||||
<span class="good">Religion: </span> <span class="average">{{:data.exploit.religion}} </span><br>
|
||||
<span class="good">Fingerprint: </span> <span class="average">{{:data.exploit.fingerprint}} </span><br>
|
||||
|
||||
<br>Acquired Information:<br>
|
||||
<span class="good">Notes:<br> </span> <span class="average">{{:data.exploit.nanoui_exploit_record}}</span><br><br>
|
||||
{{else}}
|
||||
<span class="bad">
|
||||
No exploitative information acquired!
|
||||
<br>
|
||||
<br>
|
||||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!--
|
||||
Title: Syndicate Uplink, uses some javascript to change nanoUI up a bit.
|
||||
Used In File(s): \code\game\objects\items\devices\uplinks.dm
|
||||
-->
|
||||
{{:helper.syndicateMode()}}
|
||||
<H2><span class="white">{{:data.welcome}}</span></H2>
|
||||
<br>
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
<b>Functions</b>:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.link('Request Items', 'gear', {'menu' : 0}, null, 'fixedLeftWider')}}
|
||||
{{:helper.link('Exploitable Information', 'gear', {'menu' : 1}, null, 'fixedLeftWider')}}
|
||||
{{:helper.link('Return', 'arrowreturn-1-w', {'return' : 1}, null, 'fixedLeft')}}
|
||||
{{:helper.link('Close', 'gear', {'lock' : "1"}, null, 'fixedLeft')}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
{{if data.menu == 0}}
|
||||
<H2><span class="white">Request items:</span></H2>
|
||||
<span class="white"><i>Each item costs a number of tele-crystals as indicated by the number following their name.</i></span>
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
<b>Tele-Crystals</b>:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:data.crystals}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{{for data.nano_items}}
|
||||
<div class="item">
|
||||
<H3><span class="white">{{:value.Category}}</span></H3>
|
||||
</div>
|
||||
{{for value.items :itemValue:itemIndex}}
|
||||
<div class="item">
|
||||
{{:helper.link( itemValue.Name, 'gear', {'buy_item' : itemValue.obj_path, 'cost' : itemValue.Cost}, itemValue.Cost > data.crystals ? 'disabled' : null, null)}} - <span class="white">{{:itemValue.Cost}}</span>
|
||||
</div>
|
||||
|
||||
{{if itemValue.Cost <= data.crystals}}
|
||||
<div class="item">
|
||||
{{:itemValue.Description}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
<br>
|
||||
{{/for}}
|
||||
|
||||
<div class="item">
|
||||
{{:helper.link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, data.crystals <= 0 ? 'disabled' : null, null)}}
|
||||
</div>
|
||||
|
||||
{{else data.menu == 1}}
|
||||
<H2><span class="white">Information Record List:</span></H2>
|
||||
<br>
|
||||
<div class="item">
|
||||
Select a Record
|
||||
</div>
|
||||
<br>
|
||||
{{for data.exploit_records}}
|
||||
<div class="item">
|
||||
{{:helper.link(value.Name, 'gear', {'menu' : 11, 'id' : value.id}, null, null)}}
|
||||
</div>
|
||||
{{/for}}
|
||||
|
||||
{{else data.menu == 11}}
|
||||
<H2><span class="white">Information Record:</span></H2>
|
||||
<br>
|
||||
<div class="statusDisplayRecords">
|
||||
<div class="item">
|
||||
<div class="itemContent" style="width: 100%;">
|
||||
{{if data.exploit_exists == 1}}
|
||||
<span class="good">Name: </span> <span class="average">{{:data.exploit.name}} </span><br>
|
||||
<span class="good">Sex: </span> <span class="average">{{:data.exploit.sex}} </span><br>
|
||||
<span class="good">Species: </span> <span class="average">{{:data.exploit.species}} </span><br>
|
||||
<span class="good">Age: </span> <span class="average">{{:data.exploit.age}} </span><br>
|
||||
<span class="good">Rank: </span> <span class="average">{{:data.exploit.rank}} </span><br>
|
||||
<span class="good">Home System: </span> <span class="average">{{:data.exploit.home_system}} </span><br>
|
||||
<span class="good">Citizenship: </span> <span class="average">{{:data.exploit.citizenship}} </span><br>
|
||||
<span class="good">Faction: </span> <span class="average">{{:data.exploit.faction}} </span><br>
|
||||
<span class="good">Religion: </span> <span class="average">{{:data.exploit.religion}} </span><br>
|
||||
<span class="good">Fingerprint: </span> <span class="average">{{:data.exploit.fingerprint}} </span><br>
|
||||
|
||||
<br>Acquired Information:<br>
|
||||
<span class="good">Notes:<br> </span> <span class="average">{{:data.exploit.nanoui_exploit_record}}</span><br><br>
|
||||
{{else}}
|
||||
<span class="bad">
|
||||
No exploitative information acquired!
|
||||
<br>
|
||||
<br>
|
||||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user