mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-22 06:35:12 +01:00
[MIRROR] Adds IS_TRAITOR macro [MDB IGNORE] (#20153)
* Adds IS_TRAITOR macro (#74293) ## About The Pull Request i was making another PR and found that we have cultist, heretic, and nuke op IS macros but not one for traitors this adds one and then replaces it where applicable, mostly in checks where a traitor device does something different if you are not a traitor ## Why It's Good For The Game better for people making traitor only devices to have this macro, as it is more clear and also cleaner in general i think ## Changelog 🆑 code: adds IS_TRAITOR macro /🆑 * Adds IS_TRAITOR macro --------- Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
This commit is contained in:
@@ -245,7 +245,7 @@
|
||||
if(!user.mind)
|
||||
return
|
||||
|
||||
if(!user.mind.has_antag_datum(/datum/antagonist/traitor))
|
||||
if(!IS_TRAITOR(user))
|
||||
to_chat(user, span_warning("You can't seem to find a way to detonate the charge."))
|
||||
return
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han
|
||||
|
||||
/obj/item/traitor_machine_trapper/examine(mob/user)
|
||||
. = ..()
|
||||
if(!user.mind?.has_antag_datum(/datum/antagonist/traitor))
|
||||
if(!IS_TRAITOR(user))
|
||||
return
|
||||
if(target_machine_path)
|
||||
. += span_notice("This device must be placed by <b>clicking on a [initial(target_machine_path.name)]</b> with it. It can be removed with a screwdriver.")
|
||||
|
||||
@@ -265,7 +265,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new())
|
||||
if(planted_on)
|
||||
return
|
||||
|
||||
if(user.mind?.has_antag_datum(/datum/antagonist/traitor))
|
||||
if(IS_TRAITOR(user))
|
||||
if(target_object_type)
|
||||
. += span_notice("This device must be placed by <b>clicking on the [initial(target_object_type.name)]</b> with it.")
|
||||
. += span_notice("Remember, you may leave behind fingerprints or fibers on the device. Use <b>soap</b> or similar to scrub it clean to be safe!")
|
||||
|
||||
Reference in New Issue
Block a user