mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE (#69790)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE The most idiotic thing I've seen is canUseTopic's defines, they literally just define TRUE, you can use it however you want, it doesn't matter, it just means TRUE. You can mix and match the args and it will set that arg to true, despite the name. It's so idiotic I decided to remove it, so now I can reclaim a little bit of my sanity.
This commit is contained in:
@@ -702,16 +702,6 @@
|
||||
/// The layer above mutant body parts
|
||||
#define ABOVE_BODY_FRONT_LAYER (BODY_FRONT_LAYER-1)
|
||||
|
||||
//used by canUseTopic()
|
||||
/// If silicons need to be next to the atom to use this
|
||||
#define BE_CLOSE TRUE
|
||||
/// If other mobs (monkeys, aliens, etc) can use this
|
||||
#define NO_DEXTERITY TRUE // I had to change 20+ files because some non-dnd-playing fuckchumbis can't spell "dexterity"
|
||||
// If telekinesis you can use it from a distance
|
||||
#define NO_TK TRUE
|
||||
/// If mobs can use this while resting
|
||||
#define FLOOR_OKAY TRUE
|
||||
|
||||
/// The default mob sprite size (used for shrinking or enlarging the mob sprite to regular size)
|
||||
#define RESIZE_DEFAULT_SIZE 1
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
///Toggles the tracking for the gps
|
||||
/datum/component/gps/item/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(parent, BE_CLOSE))
|
||||
if(!user.canUseTopic(parent, be_close = TRUE))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, span_warning("It's busted!"))
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST)
|
||||
to_chat(user, "<span class='warning'>You are not the high priest, and therefore cannot select a religious sect.")
|
||||
return
|
||||
if(!user.canUseTopic(parent, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(parent, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
to_chat(user,span_warning("You cannot select a sect at this time."))
|
||||
return
|
||||
if(GLOB.religious_sect)
|
||||
@@ -152,7 +152,7 @@
|
||||
if(performing_rite)
|
||||
to_chat(user, "<span class='notice'>There is a rite currently being performed here already.")
|
||||
return
|
||||
if(!user.canUseTopic(parent, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(parent, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
to_chat(user,span_warning("You are not close enough to perform the rite."))
|
||||
return
|
||||
performing_rite = new path(parent)
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
AfterRotation.Invoke(user, degrees)
|
||||
|
||||
/datum/component/simple_rotation/proc/CanUserRotate(mob/user, degrees)
|
||||
if(isliving(user) && user.canUseTopic(parent, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(isliving(user) && user.canUseTopic(parent, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return TRUE
|
||||
if((rotation_flags & ROTATION_GHOSTS_ALLOWED) && isobserver(user) && CONFIG_GET(flag/ghost_interaction))
|
||||
return TRUE
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
var/safety = tgui_alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [to_insert.name]?", list("Proceed", "Abort"))
|
||||
if(safety != "Proceed" || QDELETED(to_insert) || QDELETED(resolve_parent) || QDELETED(user) || !user.canUseTopic(resolve_parent, BE_CLOSE, iscarbon(user)))
|
||||
if(safety != "Proceed" || QDELETED(to_insert) || QDELETED(resolve_parent) || QDELETED(user) || !user.canUseTopic(resolve_parent, be_close = TRUE, no_dexterity = iscarbon(user)))
|
||||
return
|
||||
|
||||
var/turf/loccheck = get_turf(resolve_parent)
|
||||
|
||||
@@ -242,7 +242,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0)
|
||||
var/obj/item/choice = tgui_input_list(user, "Select a part to remove", "Part Removal", sort_names(droppable_parts))
|
||||
if(isnull(choice))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
to_chat(user, span_notice("You remove [choice] from [src]."))
|
||||
if(choice == assembly.xray_module)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
var/obj/item/choice = tgui_input_list(user, "Select a part to remove", "Part Removal", sort_names(droppable_parts))
|
||||
if(isnull(choice))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
to_chat(user, span_notice("You remove [choice] from [src]."))
|
||||
drop_upgrade(choice)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return
|
||||
if(!pad_ref?.resolve())
|
||||
return
|
||||
if(!usr.canUseTopic(src, BE_CLOSE) || (machine_stat & (NOPOWER|BROKEN)))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE) || (machine_stat & (NOPOWER|BROKEN)))
|
||||
return
|
||||
switch(action)
|
||||
if("recalc")
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
. = ..()
|
||||
if(!can_interact(user))
|
||||
return
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational)
|
||||
if(!user.canUseTopic(src, be_close = !issilicon(user)) || !is_operational)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/ui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -155,7 +155,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/defibrillator_mount, 28)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/defibrillator_mount/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(!defib)
|
||||
to_chat(user, span_warning("It'd be hard to remove a defib unit from a mount that has none."))
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
. += span_notice("Alt-click to toggle modes.")
|
||||
|
||||
/obj/item/grenade/barrier/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
toggle_mode(user)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if (deconstruction != BLASTDOOR_FINISHED)
|
||||
return
|
||||
var/change_id = tgui_input_number(user, "Set the door controllers ID", "Door Controller ID", id, 100)
|
||||
if(!change_id || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!change_id || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
id = change_id
|
||||
to_chat(user, span_notice("You change the ID to [id]."))
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
to_chat(user, span_warning("The safety hatch has been disabled!"))
|
||||
|
||||
/obj/machinery/fat_sucker/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(user == occupant)
|
||||
to_chat(user, span_warning("You can't reach the controls from inside!"))
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(mob/living/target)
|
||||
. = ..()
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target))
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, be_close = TRUE) || !isliving(target))
|
||||
return
|
||||
|
||||
if(attached)
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
/obj/machinery/launchpad/briefcase/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr)
|
||||
if(!briefcase || !usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!briefcase || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
usr.visible_message(span_notice("[usr] starts closing [src]..."), span_notice("You start closing [src]..."))
|
||||
if(do_after(usr, 30, target = usr))
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/medical_kiosk/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(!scanner_wand)
|
||||
to_chat(user, span_warning("The scanner wand is currently removed from the machine."))
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
var/s = tgui_input_text(user, "Write something", "Newspaper")
|
||||
if (!s)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
scribble_page = curr_page
|
||||
scribble = s
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
var/choice = tgui_input_text(user, "Enter a new turret name", "Turret Classification", finish_name, MAX_NAME_LEN)
|
||||
if(!choice)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
finish_name = choice
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
|
||||
/obj/machinery/space_heater/improvised_chem_heater/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!can_interact(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!can_interact(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
replace_beaker(user)
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !user.can_interact_with(src))
|
||||
return
|
||||
var/new_timer = tgui_input_number(user, "Set the timer", "Countdown", timer_set, maximum_timer, minimum_timer)
|
||||
if(!new_timer || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!new_timer || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
timer_set = new_timer
|
||||
loc.visible_message(span_notice("[icon2html(src, viewers(src))] timer set for [timer_set] seconds."))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/item/ai_module/supplied/freeform/attack_self(mob/user)
|
||||
var/newpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority ", lawpos, 50, 15)
|
||||
if(!newpos || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!newpos || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
lawpos = newpos
|
||||
var/targName = tgui_input_text(user, "Enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len), TRUE)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/item/ai_module/remove/attack_self(mob/user)
|
||||
lawpos = tgui_input_number(user, "Law to delete", "Law Removal", lawpos, 50)
|
||||
if(!lawpos || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!lawpos || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
to_chat(user, span_notice("Law [lawpos] selected."))
|
||||
..()
|
||||
|
||||
@@ -370,7 +370,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
toggle_window_glass(usr)
|
||||
@@ -380,7 +380,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
toggle_window_size(usr)
|
||||
|
||||
@@ -365,7 +365,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
var/playeffect = TRUE
|
||||
switch(action)
|
||||
|
||||
@@ -623,7 +623,7 @@
|
||||
/obj/item/card/id/proc/alt_click_can_use_id(mob/living/user)
|
||||
if(!isliving(user))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
|
||||
return TRUE
|
||||
@@ -1239,7 +1239,7 @@
|
||||
to_chat(user, "Restating prisoner ID to default parameters.")
|
||||
return
|
||||
var/choice = tgui_input_number(user, "Sentence time in seconds", "Sentencing")
|
||||
if(!choice || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) || loc != user)
|
||||
if(!choice || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user)
|
||||
return FALSE
|
||||
time_to_assign = choice
|
||||
to_chat(user, "You set the sentence time to [time_to_assign] seconds.")
|
||||
@@ -1565,7 +1565,7 @@
|
||||
assignment = target_occupation
|
||||
|
||||
var/new_age = tgui_input_number(user, "Choose the ID's age", "Agent card age", AGE_MIN, AGE_MAX, AGE_MIN)
|
||||
if(QDELETED(user) || QDELETED(src) || !user.canUseTopic(user, BE_CLOSE, NO_DEXTERITY, NO_TK))
|
||||
if(QDELETED(user) || QDELETED(src) || !user.canUseTopic(user, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE))
|
||||
return
|
||||
if(new_age)
|
||||
registered_age = new_age
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
return list()
|
||||
|
||||
/obj/item/choice_beacon/proc/canUseBeacon(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, TRUE)
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
if(isnull(display_names[choice]))
|
||||
return
|
||||
if(!M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!M.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
|
||||
spawn_option(display_names[choice],M)
|
||||
|
||||
@@ -752,7 +752,7 @@
|
||||
/obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user)
|
||||
. = ..()
|
||||
var/new_cost = tgui_input_number(user, "New cost for using this medical kiosk", "Pricing", custom_cost, 1000, 10)
|
||||
if(!new_cost || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!new_cost || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
if(loc != user)
|
||||
to_chat(user, span_warning("You must hold the circuitboard to change its cost!"))
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if (H == user)
|
||||
to_chat(user, span_warning("You need a mirror to properly style your own facial hair!"))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list)
|
||||
if(isnull(new_style))
|
||||
@@ -186,7 +186,7 @@
|
||||
if (H == user)
|
||||
to_chat(user, span_warning("You need a mirror to properly style your own hair!"))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", GLOB.hairstyles_list)
|
||||
if(isnull(new_style))
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
if(has_cap && user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(has_cap && user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
is_capped = !is_capped
|
||||
to_chat(user, span_notice("The cap on [src] is now [is_capped ? "on" : "off"]."))
|
||||
update_appearance()
|
||||
|
||||
@@ -99,13 +99,13 @@
|
||||
qdel(H)
|
||||
|
||||
/obj/item/holochip/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
if(loc != user)
|
||||
to_chat(user, span_warning("You must be holding the holochip to continue!"))
|
||||
return FALSE
|
||||
var/split_amount = tgui_input_number(user, "How many credits do you want to extract from the holochip? (Max: [credits] cr)", "Holochip", max_value = credits)
|
||||
if(!split_amount || QDELETED(user) || QDELETED(src) || issilicon(user) || !usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)) || loc != user)
|
||||
if(!split_amount || QDELETED(user) || QDELETED(src) || issilicon(user) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)) || loc != user)
|
||||
return
|
||||
var/new_credits = spend(split_amount, TRUE)
|
||||
var/obj/item/holochip/H = new(user ? user : drop_location(), new_credits)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/obj/item/beacon/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/pen)) // needed for things that use custom names like the locator
|
||||
var/new_name = tgui_input_text(user, "What would you like the name to be?", "Beacon", max_length = MAX_NAME_LEN)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(new_name)
|
||||
name = new_name
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
. += span_notice("Can be used again to interrupt the effect early. The recharge time is the same as the time spent in desync.")
|
||||
|
||||
/obj/item/desynchronizer/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
var/new_duration = tgui_input_number(user, "Set the duration", "Desynchronizer", duration / 10, max_duration, 5)
|
||||
if(!new_duration || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!new_duration || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
duration = new_duration
|
||||
to_chat(user, span_notice("You set the duration to [DisplayTimeText(duration)]."))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
to_chat(user, span_notice("[icon2html(src, user)] [isliving(target) ? "Subject" : "Target"] is free of radioactive contamination."))
|
||||
|
||||
/obj/item/geiger_counter/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, span_warning("[src] must be on to reset its radiation level!"))
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/obj/item/storage/portable_chem_mixer/AltClick(mob/living/user)
|
||||
if(!atom_storage.locked)
|
||||
return ..()
|
||||
if(!can_interact(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!can_interact(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
replace_beaker(user)
|
||||
update_appearance()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
. += span_notice("Insert [src] into an active quantum pad to link it.")
|
||||
|
||||
/obj/item/quantum_keycard/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
to_chat(user, span_notice("You start pressing [src]'s unlink button..."))
|
||||
if(do_after(user, 40, target = src))
|
||||
|
||||
@@ -81,7 +81,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/MouseDrop(mob/over, src_location, over_location)
|
||||
var/mob/headset_user = usr
|
||||
if((headset_user == over) && headset_user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if((headset_user == over) && headset_user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return attack_self(headset_user)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
||||
..()
|
||||
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !user.can_read(src))
|
||||
if(!user.canUseTopic(src, be_close = TRUE) || !user.can_read(src))
|
||||
return
|
||||
|
||||
if(cooldown)
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
/obj/item/healthanalyzer/AltClick(mob/user)
|
||||
..()
|
||||
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !user.can_read(src) || user.is_blind())
|
||||
if(!user.canUseTopic(src, be_close = TRUE) || !user.can_read(src) || user.is_blind())
|
||||
return
|
||||
|
||||
mode = !mode
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sort_list(options))
|
||||
if(isnull(answer))
|
||||
return
|
||||
if(!ready || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) || !user.can_read(src))
|
||||
if(!ready || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || !user.can_read(src))
|
||||
return
|
||||
|
||||
var/sequence
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
. += span_notice("<b>Not Linked.</b> Use on another quantum spin inverter to establish a quantum link.")
|
||||
|
||||
/obj/item/swapper/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
to_chat(user, span_notice("You break the current quantum link."))
|
||||
if(!QDELETED(linked_swapper))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
icon_state = base_icon_state
|
||||
|
||||
/obj/item/reagent_containers/cup/blastoff_ampoule/attack_self(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY) || spillable)
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE) || spillable)
|
||||
return ..()
|
||||
reagent_flags |= OPENCONTAINER
|
||||
spillable = TRUE
|
||||
|
||||
@@ -24,18 +24,18 @@
|
||||
return
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
var/beard_or_hair = tgui_alert(user, "What do you want to dye?", "Character Preference", list("Hair", "Facial Hair"))
|
||||
if(!beard_or_hair || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
||||
if(!beard_or_hair || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE))
|
||||
return
|
||||
|
||||
var/list/choices = beard_or_hair == "Hair" ? GLOB.hair_gradients_list : GLOB.facial_hair_gradients_list
|
||||
var/new_grad_style = tgui_input_list(user, "Choose a color pattern", "Character Preference", choices)
|
||||
if(isnull(new_grad_style))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE))
|
||||
return
|
||||
|
||||
var/new_grad_color = input(user, "Choose a secondary hair color:", "Character Preference",human_target.grad_color) as color|null
|
||||
if(!new_grad_color || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE) || !user.CanReach(target))
|
||||
if(!new_grad_color || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE) || !user.CanReach(target))
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("You start applying the hair dye..."))
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
source.delay = 3
|
||||
|
||||
/obj/item/extinguisher/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
if(!user.is_holding(src))
|
||||
to_chat(user, span_notice("You must be holding the [src] in your hands do this!"))
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
toggle_igniter(user)
|
||||
|
||||
/obj/item/flamethrower/AltClick(mob/user)
|
||||
if(ptank && isliving(user) && user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(ptank && isliving(user) && user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
user.put_in_hands(ptank)
|
||||
ptank = null
|
||||
to_chat(user, span_notice("You remove the plasma tank from [src]!"))
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
var/newtime = tgui_input_list(user, "Please enter a new detonation time", "Detonation Timer", list("Instant", 3, 4, 5))
|
||||
if (isnull(newtime))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(newtime == "Instant" && change_det_time(0))
|
||||
to_chat(user, span_notice("You modify the time delay. It's set to be instantaneous."))
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
if (active)
|
||||
return
|
||||
var/newspread = tgui_input_number(user, "Please enter a new spread amount", "Grenade Spread", 5, 100, 5)
|
||||
if(!newspread || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!newspread || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
unit_spread = newspread
|
||||
to_chat(user, span_notice("You set the time release to [unit_spread] units per detonation."))
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/item/grenade/c4/attack_self(mob/user)
|
||||
var/newtime = tgui_input_number(user, "Please set the timer", "C4 Timer", minimum_timer, maximum_timer, minimum_timer)
|
||||
if(!newtime || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!newtime || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
det_time = newtime
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!user.can_write(used_item))
|
||||
return
|
||||
var/new_name = tgui_input_text(user, "What would you like the label to be?", name, max_length = MAX_NAME_LEN)
|
||||
if((user.get_active_held_item() != used_item) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if((user.get_active_held_item() != used_item) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(new_name)
|
||||
name = "implant case - '[new_name]'"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
var/new_name = tgui_input_text(user, "What would you like the label to be?", name, max_length = MAX_NAME_LEN)
|
||||
if(user.get_active_held_item() != I)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(new_name)
|
||||
name = "implanter ([new_name])"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/item/implantpad/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
if(!case)
|
||||
to_chat(user, span_warning("There's no implant to remove from [src]."))
|
||||
@@ -60,7 +60,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/implantpad/ui_interact(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
user.unset_machine(src)
|
||||
user << browse(null, "window=implantpad")
|
||||
return
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/inspector/CtrlClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)) || !cell_cover_open || !cell)
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands= !iscyborg(user)) || !cell_cover_open || !cell)
|
||||
return ..()
|
||||
user.visible_message(span_notice("[user] removes \the [cell] from [src]!"), \
|
||||
span_notice("You remove [cell]."))
|
||||
@@ -378,7 +378,7 @@
|
||||
grind_results = list(/datum/reagent/water = 5)
|
||||
|
||||
/obj/item/paper/fake_report/water/AltClick(mob/living/user, obj/item/I)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
var/datum/action/innate/origami/origami_action = locate() in user.actions
|
||||
if(origami_action?.active) //Origami masters can fold water
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pet_carrier/AltClick(mob/living/user)
|
||||
if(open || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(open || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
locked = !locked
|
||||
to_chat(user, span_notice("You flip the lock switch [locked ? "down" : "up"]."))
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
. = ..()
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
usr.visible_message(span_notice("[usr] unloads [src]."), \
|
||||
span_notice("You unload [src] onto [over_atom]."))
|
||||
for(var/V in occupants)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!user.can_write(writing_instrument))
|
||||
return
|
||||
var/txt = tgui_input_text(user, "What would you like to write on the sign?", "Sign Label", max_length = 30)
|
||||
if(txt && user.canUseTopic(src, BE_CLOSE))
|
||||
if(txt && user.canUseTopic(src, be_close = TRUE))
|
||||
label = txt
|
||||
name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
. += span_notice("Alt-click to set your war cry.")
|
||||
|
||||
/obj/item/spear/explosive/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(user.canUseTopic(src, be_close = TRUE))
|
||||
..()
|
||||
if(istype(user) && loc == user)
|
||||
var/input = tgui_input_text(user, "What do you want your war cry to be? You will shout it when you hit someone in melee.", "War Cry", max_length = 50)
|
||||
|
||||
@@ -655,13 +655,13 @@
|
||||
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
|
||||
return
|
||||
|
||||
if(is_cyborg || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(is_cyborg || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return SECONDARY_ATTACK_CONTINUE_CHAIN
|
||||
if(is_zero_amount(delete_if_zero = TRUE))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = tgui_input_number(user, "How many sheets do you wish to take out of this stack?", "Stack Split", max_value = max)
|
||||
if(!stackmaterial || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, !iscyborg(user)))
|
||||
if(!stackmaterial || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
split_stack(user, stackmaterial)
|
||||
to_chat(user, span_notice("You take [stackmaterial] sheets out of the stack."))
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/item/stack/wrapping_paper/attack_hand_secondary(mob/user, modifiers)
|
||||
var/new_base = input(user, "", "Select a base color", color) as color
|
||||
var/new_ribbon = input(user, "", "Select a ribbon color", color) as color
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
set_greyscale(colors = list(new_base, new_ribbon))
|
||||
return TRUE
|
||||
|
||||
@@ -796,7 +796,7 @@
|
||||
. += span_notice("Alt-click it to quickly draw the blade.")
|
||||
|
||||
/obj/item/storage/belt/sabre/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
if(length(contents))
|
||||
var/obj/item/I = contents[1]
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
. += span_notice("Alt-click to [open ? "close":"open"] it.")
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(user.canUseTopic(src, be_close = TRUE))
|
||||
if(!atom_storage.locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_appearance()
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY))
|
||||
if(unique_reskin && !current_skin && user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE))
|
||||
reskin_obj(user)
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
. = ..()
|
||||
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
if(!ishuman(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!ishuman(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
if(has_buckled_mobs())
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
@@ -286,7 +286,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool, 0)
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
usr.visible_message(span_notice("[usr] grabs \the [src.name]."), span_notice("You grab \the [src.name]."))
|
||||
var/obj/item/C = new item_chair(loc)
|
||||
@@ -482,7 +482,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
|
||||
|
||||
/obj/structure/chair/bronze/AltClick(mob/user)
|
||||
turns = 0
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
if(!(datum_flags & DF_ISPROCESSING))
|
||||
user.visible_message(span_notice("[user] spins [src] around, and the last vestiges of Ratvarian technology keeps it spinning FOREVER."), \
|
||||
|
||||
@@ -598,7 +598,7 @@
|
||||
set category = "Object"
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE) || !isturf(loc))
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
||||
@@ -661,7 +661,7 @@
|
||||
/obj/structure/closet/attack_hand_secondary(mob/user, modifiers)
|
||||
. = ..()
|
||||
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
if(!user.canUseTopic(src, be_close = TRUE) || !isturf(loc))
|
||||
return
|
||||
|
||||
if(!opened && secure)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", name, max_length = 53)
|
||||
if(user.get_active_held_item() != interact_tool)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
handle_tag("[t ? t : initial(name)]")
|
||||
return
|
||||
@@ -315,7 +315,7 @@
|
||||
open()
|
||||
|
||||
/obj/structure/closet/body_bag/environmental/prisoner/attack_hand_secondary(mob/user, modifiers)
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
if(!user.canUseTopic(src, be_close = TRUE) || !isturf(loc))
|
||||
return
|
||||
togglelock(user)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
if(!payments_acc)
|
||||
to_chat(usr, span_notice("[src] hasn't been registered yet."))
|
||||
return TRUE
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
if(!potential_acc)
|
||||
to_chat(usr, span_notice("No ID card detected."))
|
||||
@@ -514,7 +514,7 @@
|
||||
if(payments_acc != potential_acc.registered_account)
|
||||
to_chat(usr, span_warning("[src] rejects your new price."))
|
||||
return
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
to_chat(usr, span_warning("You need to get closer!"))
|
||||
return
|
||||
sale_price = new_price_input
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/structure/sacrificealtar/AltClick(mob/living/user)
|
||||
..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
|
||||
@@ -110,7 +110,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
toggle_cabinet(user)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
if(obj_flags & IN_USE)
|
||||
to_chat(user, span_warning("It's already in use - wait a bit!"))
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
playsound(src, 'sound/machines/click.ogg', 10, TRUE)
|
||||
|
||||
/obj/item/plunger/AltClick(mob/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
var/new_layer = tgui_input_list(user, "Select a layer", "Layer", GLOB.plumbing_layers)
|
||||
|
||||
@@ -151,7 +151,7 @@ at the cost of risking a vicious bite.**/
|
||||
switch(altar_result)
|
||||
if("Change Color")
|
||||
var/chosen_color = input(user, "", "Choose Color", pants_color) as color|null
|
||||
if(!isnull(chosen_color) && user.canUseTopic(src, BE_CLOSE))
|
||||
if(!isnull(chosen_color) && user.canUseTopic(src, be_close = TRUE))
|
||||
pants_color = chosen_color
|
||||
if("Create Artefact")
|
||||
if(!COOLDOWN_FINISHED(src, use_cooldown) || status != ALTAR_INACTIVE)
|
||||
|
||||
@@ -32,7 +32,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list)
|
||||
if(isnull(new_style))
|
||||
return TRUE
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE //no tele-grooming
|
||||
hairdresser.facial_hairstyle = new_style
|
||||
else
|
||||
@@ -42,7 +42,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", GLOB.hairstyles_list)
|
||||
if(isnull(new_style))
|
||||
return TRUE
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE //no tele-grooming
|
||||
if(HAS_TRAIT(hairdresser, TRAIT_BALD))
|
||||
to_chat(hairdresser, span_notice("If only growing back hair were that easy for you..."))
|
||||
@@ -153,7 +153,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
if(isnull(choice))
|
||||
return TRUE
|
||||
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
|
||||
switch(choice)
|
||||
@@ -161,7 +161,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
var/newname = sanitize_name(tgui_input_text(amazed_human, "Who are we again?", "Name change", amazed_human.name, MAX_NAME_LEN), allow_numbers = TRUE) //It's magic so whatever.
|
||||
if(!newname)
|
||||
return TRUE
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
amazed_human.real_name = newname
|
||||
amazed_human.name = newname
|
||||
@@ -176,7 +176,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
return TRUE
|
||||
if(!selectable_races[racechoice])
|
||||
return TRUE
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
|
||||
var/datum/species/newrace = selectable_races[racechoice]
|
||||
@@ -190,7 +190,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
|
||||
if(MUTCOLORS in amazed_human.dna.species.species_traits)
|
||||
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change", amazed_human.dna.features["mcolor"]) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
@@ -211,7 +211,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
return TRUE
|
||||
if(amazed_human.gender == "male")
|
||||
if(tgui_alert(amazed_human, "Become a Witch?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
amazed_human.gender = FEMALE
|
||||
amazed_human.physique = FEMALE
|
||||
@@ -221,7 +221,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
|
||||
else
|
||||
if(tgui_alert(amazed_human, "Become a Warlock?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
amazed_human.gender = MALE
|
||||
amazed_human.physique = MALE
|
||||
@@ -234,13 +234,13 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
|
||||
if("hair")
|
||||
var/hairchoice = tgui_alert(amazed_human, "Hairstyle or hair color?", "Change Hair", list("Style", "Color"))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
if(hairchoice == "Style") //So you just want to use a mirror then?
|
||||
return ..()
|
||||
else
|
||||
var/new_hair_color = input(amazed_human, "Choose your hair color", "Hair Color",amazed_human.hair_color) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
if(new_hair_color)
|
||||
amazed_human.hair_color = sanitize_hexcolor(new_hair_color)
|
||||
@@ -254,7 +254,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
||||
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eye_color = input(amazed_human, "Choose your eye color", "Eye Color", amazed_human.eye_color_left) as color|null
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return TRUE
|
||||
if(new_eye_color)
|
||||
amazed_human.eye_color_left = sanitize_hexcolor(new_eye_color)
|
||||
|
||||
@@ -90,7 +90,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", name), null)
|
||||
if (user.get_active_held_item() != P)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if (t)
|
||||
name = text("[]- '[]'", initial(name), t)
|
||||
|
||||
@@ -162,13 +162,13 @@
|
||||
to_chat(user, span_warning("The rotation is locked!"))
|
||||
return FALSE
|
||||
var/new_angle = tgui_input_number(user, "New angle for primary reflection face", "Reflector Angle", rotation_angle, 360)
|
||||
if(isnull(new_angle) || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(isnull(new_angle) || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return FALSE
|
||||
set_angle(SIMPLIFY_DEGREES(new_angle))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
else if(finished)
|
||||
rotate(user)
|
||||
|
||||
@@ -131,7 +131,7 @@ FLOOR SAFES
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
var/canhear = FALSE
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
/obj/structure/training_machine/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, FLOOR_OKAY))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, floor_okay = TRUE))
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
user_unbuckle_mob(buckled_mobs[1], user)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
RegisterSignal(src, COMSIG_LIVING_BANED, .proc/on_baned)
|
||||
random_revenant_name()
|
||||
|
||||
/mob/living/simple_animal/revenant/canUseTopic(atom/movable/M, be_close=FALSE, no_dexterity=FALSE, no_tk=FALSE, no_hands = FALSE, floor_okay=FALSE)
|
||||
/mob/living/simple_animal/revenant/canUseTopic(atom/movable/M, be_close=FALSE, no_dexterity=FALSE, no_tk=FALSE, need_hands = FALSE, floor_okay=FALSE)
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/random_revenant_name()
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(!istype(user) || !user.canUseTopic(M, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(M, be_close = TRUE))
|
||||
return
|
||||
|
||||
if(M.stat != DEAD)
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
return
|
||||
var/sniped_amount = painting_metadata.credit_value
|
||||
var/offer_amount = tgui_input_number(user, "How much do you want to offer?", "Patronage Amount", (painting_metadata.credit_value + 1), account.account_balance, painting_metadata.credit_value)
|
||||
if(!offer_amount || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!offer_amount || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
if(sniped_amount != painting_metadata.credit_value)
|
||||
return
|
||||
@@ -327,7 +327,7 @@
|
||||
if(painting_metadata.loaded_from_json) // No renaming old paintings
|
||||
return
|
||||
var/new_name = tgui_input_text(user, "What do you want to name the painting?", "Title Your Masterpiece")
|
||||
if(new_name != painting_metadata.title && new_name && user.canUseTopic(src, BE_CLOSE))
|
||||
if(new_name != painting_metadata.title && new_name && user.canUseTopic(src, be_close = TRUE))
|
||||
painting_metadata.title = new_name
|
||||
var/sign_choice = tgui_alert(user, "Do you want to sign it or remain anonymous?", "Sign painting?", list("Yes", "No"))
|
||||
if(sign_choice != "Yes")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/item/assembly/control/multitool_act(mob/living/user)
|
||||
var/change_id = tgui_input_number(user, "Set the door controllers ID", "Door ID", id, 100)
|
||||
if(!change_id || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!change_id || QDELETED(user) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
id = change_id
|
||||
to_chat(user, span_notice("You change the ID to [id]."))
|
||||
|
||||
@@ -742,7 +742,7 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister())
|
||||
timer_set = min(maximum_timer_set, timer_set + 10)
|
||||
if("input")
|
||||
var/user_input = tgui_input_number(usr, "Set time to valve toggle", "Canister Timer", timer_set, maximum_timer_set, minimum_timer_set)
|
||||
if(isnull(user_input) || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE, FALSE, TRUE))
|
||||
if(isnull(user_input) || QDELETED(usr) || QDELETED(src) || !usr.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
timer_set = user_input
|
||||
log_admin("[key_name(usr)] has activated a prototype valve timer")
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)) || !can_interact(user))
|
||||
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)) || !can_interact(user))
|
||||
return
|
||||
if(!holding)
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return NONE
|
||||
|
||||
/obj/item/toy/cards/cardhand/attack_self(mob/living/user)
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK))
|
||||
if(!isliving(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE))
|
||||
return
|
||||
|
||||
var/list/handradial = list()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
* * obj/item/toy/singlecard/card (optional) - The card drawn from the hand
|
||||
**/
|
||||
/obj/item/toy/cards/proc/draw(mob/living/user, obj/item/toy/singlecard/card)
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK))
|
||||
if(!isliving(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE))
|
||||
return
|
||||
|
||||
var/has_no_cards = !LAZYLEN(cards)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
|
||||
/obj/item/toy/cards/deck/attack_hand(mob/living/user, list/modifiers, flip_card = FALSE)
|
||||
if(!ishuman(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)))
|
||||
if(!ishuman(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
|
||||
var/obj/item/toy/singlecard/card = draw(user)
|
||||
@@ -164,7 +164,7 @@
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/obj/item/toy/cards/deck/AltClick(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
if(wielded)
|
||||
shuffle_cards(user)
|
||||
else
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
var/cardtext = stripped_input(user, "What do you wish to write on the card?", "Card Writing", "", 50)
|
||||
if(!cardtext || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!cardtext || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
|
||||
cardname = cardtext
|
||||
@@ -228,7 +228,7 @@
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/toy/singlecard/attack_self(mob/living/carbon/human/user)
|
||||
if(!ishuman(user) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)))
|
||||
if(!ishuman(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
|
||||
Flip()
|
||||
@@ -236,7 +236,7 @@
|
||||
user.balloon_alert_to_viewers("flips a card")
|
||||
|
||||
/obj/item/toy/singlecard/AltClick(mob/living/carbon/human/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, NO_TK, !iscyborg(user)))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = TRUE, need_hands = !iscyborg(user)))
|
||||
transform = turn(transform, 90)
|
||||
// use the simple_rotation component to make this turn with Alt+RMB & Alt+LMB at some point in the future - TimT
|
||||
return ..()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/new_beacon_name = tgui_input_text(user, "What would you like the tag to be?", "Beacon Tag", max_length = MAX_NAME_LEN)
|
||||
if(isnull(new_beacon_name))
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
name += " ([tag])"
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
toggle_helmet_light(user)
|
||||
|
||||
/obj/item/clothing/head/hardhat/weldhat/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(user.canUseTopic(src, be_close = TRUE))
|
||||
toggle_welding_screen(user)
|
||||
|
||||
/obj/item/clothing/head/hardhat/weldhat/ui_action_click(mob/user, actiontype)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/obj/item/clothing/head/fedora/det_hat/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(loc != user || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
if(loc != user || !user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = TRUE))
|
||||
return
|
||||
if(candy_cooldown < world.time)
|
||||
var/obj/item/food/candy_corn/CC = new /obj/item/food/candy_corn(src)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/clothing/head/soft/AltClick(mob/user)
|
||||
..()
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
flip(user)
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/item/clothing/head/wig/attack_self(mob/user)
|
||||
var/new_style = tgui_input_list(user, "Select a hairstyle", "Wig Styling", GLOB.hairstyles_list - "Bald")
|
||||
var/newcolor = adjustablecolor ? input(usr,"","Choose Color",color) as color|null : null
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(new_style && new_style != hairstyle)
|
||||
hairstyle = new_style
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/obj/item/clothing/mask/breath/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
adjustmask(user)
|
||||
|
||||
/obj/item/clothing/mask/breath/examine(mob/user)
|
||||
|
||||
@@ -171,13 +171,13 @@
|
||||
|
||||
/// Open the cell cover when ALT+Click on the suit
|
||||
/obj/item/clothing/suit/space/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return ..()
|
||||
toggle_spacesuit_cell(user)
|
||||
|
||||
/// Remove the cell whent he cover is open on CTRL+Click
|
||||
/obj/item/clothing/suit/space/CtrlClick(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
if(cell_cover_open && cell)
|
||||
remove_cell(user)
|
||||
return
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
. += span_notice("There's nothing placed on the helmet.")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(user.canUseTopic(src, be_close = TRUE))
|
||||
toggle_welding_screen(user)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/ui_action_click(mob/user, action)
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(!user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
return
|
||||
if(attached_accessory)
|
||||
remove_accessory(user)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/accessory/attack_self_secondary(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
if(user.canUseTopic(src, be_close = TRUE, no_dexterity = TRUE, no_tk = FALSE, need_hands = !iscyborg(user)))
|
||||
above_suit = !above_suit
|
||||
to_chat(user, "[src] will be worn [above_suit ? "above" : "below"] your suit.")
|
||||
return
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
/// Exit sanity checks
|
||||
if(!cash_deposit)
|
||||
return TRUE
|
||||
if(QDELETED(held_item) || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(QDELETED(held_item) || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return FALSE
|
||||
if(!chip.spend(cash_deposit, FALSE))
|
||||
balloon_alert(user, "insufficient credits")
|
||||
@@ -260,7 +260,7 @@
|
||||
/// If the user has enough money, ask them the amount or charge the force fee
|
||||
var/amount = force_fee || tgui_input_number(user, "How much? (Max: [payee.account_balance])", "Patronage", max_value = payee.account_balance)
|
||||
/// Exit checks in case the user cancelled or entered an invalid amount
|
||||
if(!amount || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!amount || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return FALSE
|
||||
if(!payee.adjust_money(-amount))
|
||||
balloon_alert(user, "insufficient credits")
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
var/scramble_response = tgui_alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", list("Yes", "Cancel"))
|
||||
if(scramble_response != "Yes")
|
||||
return
|
||||
if(active || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(active || !user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
toggle_on(user)
|
||||
update_appearance()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
return
|
||||
var/recipient = tgui_input_text(user, "Who is receiving this valentine?", "To:", max_length = MAX_NAME_LEN)
|
||||
var/sender = tgui_input_text(user, "Who is sending this valentine?", "From:", max_length = MAX_NAME_LEN)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
if(recipient && sender)
|
||||
name = "valentine - To: [recipient] From: [sender]"
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
. += span_notice("Alt-click to [panel_open ? "close" : "open"] the control panel.")
|
||||
|
||||
/obj/structure/aquarium/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
return ..()
|
||||
panel_open = !panel_open
|
||||
update_appearance()
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
. = ..()
|
||||
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
|
||||
return
|
||||
if(!can_interact(user) || !user.canUseTopic(src, !issilicon(user), FALSE, NO_TK))
|
||||
if(!can_interact(user) || !user.canUseTopic(src, !issilicon(user), FALSE, no_tk = TRUE))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
if(brewing)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/machinery/icecream_vat/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!can_interact(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(!can_interact(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
return
|
||||
replace_beaker(user)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user