diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 2a6edf3e5d3..1d9b18db08e 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -98,6 +98,7 @@ var/list/mechtoys = list( var/reqtime = 0 //Cooldown for requisitions - Quarxink var/hacked = 0 var/can_order_contraband = 0 + var/last_viewed_group = "categories" /obj/machinery/computer/ordercomp name = "Supply ordering console" @@ -106,6 +107,7 @@ var/list/mechtoys = list( circuit = "/obj/item/weapon/circuitboard/ordercomp" var/temp = null var/reqtime = 0 //Cooldown for requisitions - Quarxink + var/last_viewed_group = "categories" /* /obj/effect/marker/supplymarker @@ -375,19 +377,20 @@ var/list/mechtoys = list( if(href_list["order"] == "categories") //all_supply_groups //Request what? + last_viewed_group = "categories" temp = "Supply points: [supply_shuttle.points]
" temp += "Main Menu


" temp += "Select a category

" for(var/supply_group_name in all_supply_groups ) temp += "[supply_group_name]
" else - var/cur_supply_group = href_list["order"] + last_viewed_group = href_list["order"] temp = "Supply points: [supply_shuttle.points]
" temp += "Back to all categories


" - temp += "Request from: [cur_supply_group]

" + temp += "Request from: [last_viewed_group]

" for(var/supply_name in supply_shuttle.supply_packs ) var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name] - if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to + if(N.hidden || N.contraband || N.group != last_viewed_group) continue //Have to send the type instead of a reference to temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage else if (href_list["doorder"]) @@ -440,7 +443,7 @@ var/list/mechtoys = list( supply_shuttle.requestlist += O temp = "Thanks for your request. The cargo team will process it as soon as possible.
" - temp += "
OK" + temp += "
Back Main Menu" else if (href_list["vieworders"]) temp = "Current approved orders:

" @@ -558,19 +561,20 @@ var/list/mechtoys = list( if(href_list["order"] == "categories") //all_supply_groups //Request what? + last_viewed_group = "categories" temp = "Supply points: [supply_shuttle.points]
" temp += "Main Menu


" temp += "Select a category

" for(var/supply_group_name in all_supply_groups ) temp += "[supply_group_name]
" else - var/cur_supply_group = href_list["order"] + last_viewed_group = href_list["order"] temp = "Supply points: [supply_shuttle.points]
" temp += "Back to all categories


" - temp += "Request from: [cur_supply_group]

" + temp += "Request from: [last_viewed_group]

" for(var/supply_name in supply_shuttle.supply_packs ) var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name] - if(N.hidden || (N.contraband && !can_order_contraband) || N.group != cur_supply_group) continue //Have to send the type instead of a reference to + if(N.hidden || (N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage /*temp = "Supply points: [supply_shuttle.points]


Request what?

" @@ -632,7 +636,7 @@ var/list/mechtoys = list( supply_shuttle.requestlist += O temp = "Order request placed.
" - temp += "
OK | Authorize Order" + temp += "
Back | Main Menu | Authorize Order" else if(href_list["confirmorder"]) //Find the correct supply_order datum @@ -650,10 +654,10 @@ var/list/mechtoys = list( supply_shuttle.points -= P.cost supply_shuttle.shoppinglist += O temp = "Thanks for your order.
" - temp += "
OK" + temp += "
Back Main Menu" else temp = "Not enough supply points.
" - temp += "
OK" + temp += "
Back Main Menu" break else if (href_list["vieworders"]) @@ -692,7 +696,7 @@ var/list/mechtoys = list( supply_shuttle.requestlist.Cut(i,i+1) temp = "Request removed.
" break - temp += "
OK" + temp += "
Back Main Menu" else if (href_list["clearreq"]) supply_shuttle.requestlist.Cut()