Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 2174a75

Browse files
committed
Uplink category fix
1 parent 4198a90 commit 2174a75

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

code/controllers/subsystem/blackmarket.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ SUBSYSTEM_DEF(blackmarket)
3333
markets[M].add_item(item)
3434
qdel(I)
3535
. = ..()
36+
return SS_INIT_SUCCESS
3637

3738
/datum/controller/subsystem/blackmarket/fire(resumed)
3839
while(length(queued_purchases))

code/modules/cargo/blackmarket/blackmarket_uplink.dm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818

1919
/obj/item/blackmarket_uplink/Initialize(mapload)
2020
. = ..()
21+
// We don't want to go through this at mapload because the SSblackmarket isn't initialized yet.
22+
if(mapload)
23+
return
24+
25+
update_viewing_category()
26+
27+
/// Simple internal proc for updating the viewing_category variable.
28+
/obj/item/blackmarket_uplink/proc/update_viewing_category()
2129
if(accessible_markets.len)
2230
viewing_market = accessible_markets[1]
2331
var/list/categories = SSblackmarket.markets[viewing_market].categories
@@ -56,6 +64,9 @@
5664
to_chat(user, span_notice("You withdraw [amount_to_remove] credits into a holochip."))
5765

5866
/obj/item/blackmarket_uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
67+
if(!viewing_category)
68+
update_viewing_category()
69+
5970
ui = SStgui.try_update_ui(user, src, ui)
6071
if(!ui)
6172
ui = new(user, src, "BlackMarketUplink", "Black Market Uplink")

0 commit comments

Comments
 (0)