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:
@@ -38,7 +38,7 @@
|
||||
if(!inputvalue)
|
||||
return
|
||||
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(user.canUseTopic(src, be_close = TRUE))
|
||||
name = "folder[(inputvalue ? " - '[inputvalue]'" : null)]"
|
||||
|
||||
/obj/item/folder/proc/remove_item(obj/item/Item, mob/user)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
. += span_notice("Alt-click [src] to fold it into a paper plane.")
|
||||
|
||||
/obj/item/paper/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
|
||||
if(istype(src, /obj/item/paper/carbon))
|
||||
var/obj/item/paper/carbon/Carbon = src
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
to_chat(user, span_warning("You must be holding the pen to continue!"))
|
||||
return
|
||||
var/deg = tgui_input_number(user, "What angle would you like to rotate the pen head to? (0-360)", "Rotate Pen Head", max_value = 360)
|
||||
if(isnull(deg) || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) || loc != user)
|
||||
if(isnull(deg) || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user)
|
||||
return
|
||||
degrees = deg
|
||||
to_chat(user, span_notice("You rotate the top of the pen to [deg] degrees."))
|
||||
@@ -163,12 +163,12 @@
|
||||
//Changing name/description of items. Only works if they have the UNIQUE_RENAME object flag set
|
||||
if(isobj(O) && proximity && (O.obj_flags & UNIQUE_RENAME))
|
||||
var/penchoice = tgui_input_list(user, "What would you like to edit?", "Pen Setting", list("Rename", "Description", "Reset"))
|
||||
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
|
||||
if(QDELETED(O) || !user.canUseTopic(O, be_close = TRUE))
|
||||
return
|
||||
if(penchoice == "Rename")
|
||||
var/input = tgui_input_text(user, "What do you want to name [O]?", "Object Name", "[O.name]", MAX_NAME_LEN)
|
||||
var/oldname = O.name
|
||||
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
|
||||
if(QDELETED(O) || !user.canUseTopic(O, be_close = TRUE))
|
||||
return
|
||||
if(input == oldname || !input)
|
||||
to_chat(user, span_notice("You changed [O] to... well... [O]."))
|
||||
@@ -184,7 +184,7 @@
|
||||
if(penchoice == "Description")
|
||||
var/input = tgui_input_text(user, "Describe [O]", "Description", "[O.desc]", 140)
|
||||
var/olddesc = O.desc
|
||||
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
|
||||
if(QDELETED(O) || !user.canUseTopic(O, be_close = TRUE))
|
||||
return
|
||||
if(input == olddesc || !input)
|
||||
to_chat(user, span_notice("You decide against changing [O]'s description."))
|
||||
@@ -194,7 +194,7 @@
|
||||
O.renamedByPlayer = TRUE
|
||||
|
||||
if(penchoice == "Reset")
|
||||
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
|
||||
if(QDELETED(O) || !user.canUseTopic(O, be_close = TRUE))
|
||||
return
|
||||
|
||||
qdel(O.GetComponent(/datum/component/rename))
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
|
||||
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
|
||||
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
|
||||
if(!istype(target) || target.anchored || target.buckled || !Adjacent(target) || !user.canUseTopic(src, BE_CLOSE) || target == ass || copier_blocked())
|
||||
if(!istype(target) || target.anchored || target.buckled || !Adjacent(target) || !user.canUseTopic(src, be_close = TRUE) || target == ass || copier_blocked())
|
||||
return
|
||||
add_fingerprint(user)
|
||||
if(target == user)
|
||||
|
||||
Reference in New Issue
Block a user