mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
debug uplinks show all restricted items (#47374)
This commit is contained in:
@@ -26,6 +26,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/unlock_note
|
||||
var/unlock_code
|
||||
var/failsafe_code
|
||||
var/debug = FALSE
|
||||
|
||||
var/list/previous_attempts
|
||||
|
||||
@@ -147,13 +148,13 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
if(I.limited_stock == TRUE)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
var/is_inaccessible = TRUE
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(R == user.mind.assigned_role || debug)
|
||||
is_inaccessible = FALSE
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
if(I.restricted_species)
|
||||
@@ -161,7 +162,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/is_inaccessible = TRUE
|
||||
var/mob/living/carbon/human/H = user
|
||||
for(var/F in I.restricted_species)
|
||||
if(F == H.dna.species.id)
|
||||
if(F == H.dna.species.id || debug)
|
||||
is_inaccessible = FALSE
|
||||
break
|
||||
if(is_inaccessible)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
. = ..()
|
||||
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink)
|
||||
hidden_uplink.name = "debug uplink"
|
||||
hidden_uplink.debug = TRUE
|
||||
|
||||
/obj/item/uplink/nuclear/Initialize()
|
||||
. = ..()
|
||||
@@ -44,6 +45,7 @@
|
||||
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink)
|
||||
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
hidden_uplink.name = "debug nuclear uplink"
|
||||
hidden_uplink.debug = TRUE
|
||||
|
||||
/obj/item/uplink/nuclear_restricted/Initialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user