mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE [MDB IGNORE] (#16586)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE * etes * eyes Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
Gandalf
parent
bb160ed9a2
commit
1ce77983df
@@ -30,7 +30,7 @@
|
||||
if(locked)
|
||||
to_chat(user, span_notice("The crate is locked with a Deca-code lock."))
|
||||
var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text|null
|
||||
if(user.canUseTopic(src, BE_CLOSE) && locked)
|
||||
if(user.canUseTopic(src, be_close = TRUE) && locked)
|
||||
var/list/sanitised = list()
|
||||
var/sanitycheck = TRUE
|
||||
var/char = ""
|
||||
@@ -63,7 +63,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
return attack_hand(user) //this helps you not blow up so easily by overriding unlocking which results in an immediate boom.
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
transfer_fingerprints_to(M)
|
||||
|
||||
/obj/item/stack/marker_beacon/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
return
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
@@ -150,12 +150,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
|
||||
/obj/structure/marker_beacon/AltClick(mob/living/user)
|
||||
..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
return
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
applyto(target, user)
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/attack_self(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
applyto(user, user)
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/Insert(mob/living/carbon/target_carbon, special = 0, drop_if_replaced = TRUE)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(panel_open)
|
||||
input_dir = turn(input_dir, -90)
|
||||
@@ -288,7 +288,7 @@
|
||||
desired = text2num(params["sheets"])
|
||||
else
|
||||
desired = tgui_input_number(usr, "How many sheets would you like to smelt?", "Smelt", max_value = stored_amount)
|
||||
if(!desired || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!desired || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
var/sheets_to_remove = round(min(desired,50,stored_amount))
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
desired = text2num(params["sheets"])
|
||||
else
|
||||
desired = tgui_input_number(usr, "How many sheets would you like to smelt?", "Smelt", max_value = smelt_amount)
|
||||
if(!desired || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!desired || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
var/amount = round(min(desired,50,smelt_amount))
|
||||
if(amount < 1) //no negative mats
|
||||
|
||||
Reference in New Issue
Block a user