[MIRROR] mass refactor of holder checks (#11155)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-08 10:31:10 -07:00
committed by GitHub
parent 54d0d16826
commit 7161a6c22e
60 changed files with 381 additions and 123 deletions

View File

@@ -71,7 +71,7 @@
/obj/machinery/gateway/centerstation/attack_ghost(mob/user as mob) /obj/machinery/gateway/centerstation/attack_ghost(mob/user as mob)
if(awaygate) if(awaygate)
if(user.client.holder) if(check_rights_for(user.client, R_HOLDER))
user.loc = awaygate.loc user.loc = awaygate.loc
else if(active) else if(active)
user.loc = awaygate.loc user.loc = awaygate.loc
@@ -95,7 +95,7 @@
// commented out, of course. // commented out, of course.
/* /*
/atom/proc/attack_admin(mob/user as mob) /atom/proc/attack_admin(mob/user as mob)
if(!user || !user.client || !user.client.holder) if(!user || !user.client || !check_rights_for(user.client, R_HOLDER))
return return
attack_hand(user) attack_hand(user)

View File

@@ -27,7 +27,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
var/class var/class
/obj/effect/statclick/debug/Click() /obj/effect/statclick/debug/Click()
if(!usr.client.holder || !target) if(!check_rights_for(usr.client, R_HOLDER) || !target)
return return
if(!class) if(!class)
if(istype(target, /datum/controller/subsystem)) if(istype(target, /datum/controller/subsystem))

View File

@@ -49,7 +49,7 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/show_info(var/mob/user) /datum/controller/subsystem/persistence/proc/show_info(var/mob/user)
if(!user.client.holder) if(!check_rights_for(user.client, R_HOLDER))
return return
var/list/dat = list("<table width = '100%'>") var/list/dat = list("<table width = '100%'>")

View File

@@ -152,7 +152,7 @@ SUBSYSTEM_DEF(plants)
set name = "Show Plant Genes" set name = "Show Plant Genes"
set desc = "Prints the round's plant gene masks." set desc = "Prints the round's plant gene masks."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
if(!SSplants || !SSplants.gene_tag_masks) if(!SSplants || !SSplants.gene_tag_masks)
to_chat(usr, "Gene masks not set.") to_chat(usr, "Gene masks not set.")

View File

@@ -60,7 +60,7 @@ SUBSYSTEM_DEF(webhooks)
set name = "Reload Webhooks" set name = "Reload Webhooks"
set category = "Debug" set category = "Debug"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if(!SSwebhooks.subsystem_initialized) if(!SSwebhooks.subsystem_initialized)
@@ -75,7 +75,7 @@ SUBSYSTEM_DEF(webhooks)
set name = "Ping Webhook" set name = "Ping Webhook"
set category = "Debug" set category = "Debug"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if(!length(SSwebhooks.webhook_decls)) if(!length(SSwebhooks.webhook_decls))

View File

@@ -0,0 +1,258 @@
/////////////////////
/// PHASE SHIFT ///
/////////////////////
//Visual effect for phase in/out
/obj/effect/temp_visual/shadekin
randomdir = FALSE
duration = 5
icon = 'icons/mob/vore_shadekin.dmi'
/obj/effect/temp_visual/shadekin/phase_in
icon_state = "tp_in"
/obj/effect/temp_visual/shadekin/phase_out
icon_state = "tp_out"
/datum/power/shadekin/phase_shift
name = "Phase Shift (100)"
desc = "Shift yourself out of alignment with realspace to travel quickly to different areas."
verbpath = /mob/living/proc/phase_shift
ability_icon_state = "phase_shift"
/mob/living/proc/phase_shift()
set name = "Phase Shift (100)"
set desc = "Shift yourself out of alignment with realspace to travel quickly to different areas."
set category = "Abilities.Shadekin"
var/datum/component/shadekin/SK = get_shadekin_component()
if(!SK)
return FALSE
if(stat)
to_chat(src, span_warning("Can't use that ability in your state!"))
return FALSE
var/area/A = get_area(src)
if(!check_rights_for(client, R_HOLDER) && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
to_chat(src, span_warning("You can't do that here!"))
return
var/ability_cost = 100
var/darkness = 1
var/turf/T = get_turf(src)
if(!T)
to_chat(src,span_warning("You can't use that here!"))
return FALSE
if(SK.doing_phase)
return FALSE
var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
darkness = 1-brightness //Invert
var/watcher = 0
for(var/mob/living/carbon/human/watchers in oview(7,src )) // If we can see them...
if(watchers in oviewers(7,src)) // And they can see us...
if(!(watchers.stat) && !isbelly(watchers.loc) && !istype(watchers.loc, /obj/item/holder)) // And they are alive and not being held by someone...
watcher++ // They are watching us!
ability_cost = CLAMP(ability_cost/(0.01+darkness*2),50, 80)//This allows for 1 watcher in full light
if(watcher>0)
ability_cost = ability_cost + ( 15 * watcher )
/*
if(!(SK.in_phase))
log_debug("[src] attempted to shift with [watcher] visible Carbons with a cost of [ability_cost] in a darkness level of [darkness]")
*/
if(SK.doing_phase)
to_chat(src, span_warning("You are already trying to phase!"))
return FALSE
else if(SK.shadekin_get_energy() < ability_cost && !(SK.in_phase))
to_chat(src, span_warning("Not enough energy for that ability!"))
return FALSE
if(!(SK.in_phase))
SK.shadekin_adjust_energy(-ability_cost)
playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
if(!T.CanPass(src,T) || loc != T)
to_chat(src,span_warning("You can't use that here!"))
return FALSE
//Shifting in
if(SK.in_phase)
phase_in(T, SK)
//Shifting out
else
phase_out(T, SK)
/mob/living/proc/phase_in(var/turf/T, var/datum/component/shadekin/SK)
if(SK.in_phase)
// pre-change
if(!isturf(T)) //Sanity
return
forceMove(T)
var/original_canmove = canmove
SetStunned(0)
SetWeakened(0)
if(buckled)
buckled.unbuckle_mob()
if(pulledby)
pulledby.stop_pulling()
stop_pulling()
// change
canmove = FALSE
SK.in_phase = FALSE
SK.doing_phase = TRUE
throwpass = FALSE
name = get_visible_name()
for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
//cut_overlays()
invisibility = initial(invisibility)
see_invisible = initial(see_invisible)
incorporeal_move = initial(incorporeal_move)
density = initial(density)
can_pull_size = initial(can_pull_size)
can_pull_mobs = initial(can_pull_mobs)
hovering = initial(hovering)
update_icon()
//Cosmetics mostly
var/obj/effect/temp_visual/shadekin/phase_in/phaseanim = new /obj/effect/temp_visual/shadekin/phase_in(src.loc)
phaseanim.pixel_y = (src.size_multiplier - 1) * 16 // Pixel shift for the animation placement
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
phaseanim.dir = dir
alpha = 0
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
addtimer(CALLBACK(src, PROC_REF(shadekin_complete_phase_in), original_canmove, SK), 5, TIMER_DELETE_ME)
/mob/living/proc/shadekin_complete_phase_in(var/original_canmove, var/datum/component/shadekin/SK)
canmove = original_canmove
alpha = initial(alpha)
remove_modifiers_of_type(/datum/modifier/shadekin_phase_vision)
remove_modifiers_of_type(/datum/modifier/phased_out)
//Potential phase-in vore
if(can_be_drop_pred || can_be_drop_prey) //Toggleable in vore panel
var/list/potentials = living_mobs(0)
var/mob/living/our_prey
if(potentials.len)
var/mob/living/target = pick(potentials)
if(can_be_drop_pred && istype(target) && target.devourable && target.can_be_drop_prey && target.phase_vore && vore_selected && phase_vore)
target.forceMove(vore_selected)
to_chat(target, span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.name]!"))
our_prey = target
else if(can_be_drop_prey && istype(target) && devourable && target.can_be_drop_pred && target.phase_vore && target.vore_selected && phase_vore)
our_prey = src
forceMove(target.vore_selected)
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.name]!"))
to_chat(src, span_vwarning("You phase into [target], having them [target.vore_selected.vore_verb] you into their [target.vore_selected.name]!"))
if(our_prey)
for(var/obj/item/flashlight/held_lights in our_prey.contents)
if(istype(held_lights,/obj/item/flashlight/glowstick) ||istype(held_lights,/obj/item/flashlight/flare) ) //No affecting glowsticks or flares...As funny as that is
continue
held_lights.on = 0
held_lights.update_brightness()
SK.doing_phase = FALSE
if(!SK.flicker_time)
return //Early return. No time, no flickering.
//Affect nearby lights
for(var/obj/machinery/light/L in range(SK.flicker_distance, src))
if(prob(SK.flicker_break_chance))
addtimer(CALLBACK(L, TYPE_PROC_REF(/obj/machinery/light, broken)), rand(5,25), TIMER_DELETE_ME)
else
if(SK.flicker_color)
L.flicker(SK.flicker_time, SK.flicker_color)
else
L.flicker(SK.flicker_time)
for(var/obj/item/flashlight/flashlights in range(SK.flicker_distance, src)) //Find any flashlights near us and make them flicker too!
if(istype(flashlights,/obj/item/flashlight/glowstick) ||istype(flashlights,/obj/item/flashlight/flare)) //No affecting glowsticks or flares...As funny as that is
continue
flashlights.flicker(SK.flicker_time, SK.flicker_color, TRUE)
for(var/mob/living/creatures in range(SK.flicker_distance, src))
if(isbelly(creatures.loc)) //don't flicker anyone that gets nomphed.
continue
for(var/obj/item/flashlight/held_lights in creatures.contents)
if(istype(held_lights,/obj/item/flashlight/glowstick) ||istype(held_lights,/obj/item/flashlight/flare) ) //No affecting glowsticks or flares...As funny as that is
continue
held_lights.flicker(SK.flicker_time, SK.flicker_color, TRUE)
/mob/living/proc/phase_out(var/turf/T)
var/datum/component/shadekin/SK = get_shadekin_component()
if(!(SK.in_phase))
// pre-change
forceMove(T)
var/original_canmove = canmove
SetStunned(0)
SetWeakened(0)
if(buckled)
buckled.unbuckle_mob()
if(pulledby)
pulledby.stop_pulling()
stop_pulling()
if(SK.normal_phase && SK.drop_items_on_phase)
drop_both_hands()
if(back)
unEquip(back)
can_pull_size = 0
can_pull_mobs = MOB_PULL_NONE
hovering = TRUE
canmove = FALSE
// change
SK.in_phase = TRUE
SK.doing_phase = TRUE
throwpass = TRUE
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
if(real_name) //If we a real name, perfect, let's just set our name to our newfound visible name.
name = get_visible_name()
else //If we don't, let's put our real_name as our initial name.
real_name = initial(name)
name = get_visible_name()
for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc)
phaseanim.pixel_y = (src.size_multiplier - 1) * 16 // Pixel shift for the animation placement
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
phaseanim.dir = dir
alpha = 0
add_modifier(/datum/modifier/shadekin_phase_vision)
if(SK.normal_phase)
add_modifier(/datum/modifier/phased_out)
addtimer(CALLBACK(src, PROC_REF(complete_phase_out), original_canmove, SK), 5, TIMER_DELETE_ME)
/mob/living/proc/complete_phase_out(original_canmove, var/datum/component/shadekin/SK)
invisibility = INVISIBILITY_SHADEKIN
see_invisible = INVISIBILITY_SHADEKIN
see_invisible_default = INVISIBILITY_SHADEKIN // Allow seeing phased entities while phased.
update_icon()
alpha = 127
canmove = original_canmove
incorporeal_move = TRUE
density = FALSE
SK.doing_phase = FALSE
/datum/modifier/shadekin_phase_vision
name = "Shadekin Phase Vision"
vision_flags = SEE_THRU
/datum/modifier/phased_out
name = "Phased Out"
desc = "You are currently phased out of realspace, and cannot interact with it."
hidden = TRUE
//Stops you from using guns. See /obj/item/gun/proc/special_check(var/mob/user)

View File

@@ -569,7 +569,7 @@ GLOBAL_DATUM(spoiler_obfuscation_image, /image)
return return
if(!isliving(ourmob)) if(!isliving(ourmob))
return return
if(ourmob.client?.holder) if(check_rights_for(ourmob.client, R_HOLDER))
return return
if(issimplekin(ourmob)) if(issimplekin(ourmob))
var/mob/living/simple_mob/shadekin/SK = ourmob var/mob/living/simple_mob/shadekin/SK = ourmob

View File

@@ -17,7 +17,7 @@
set name = "Set Base Turf" set name = "Set Base Turf"
set desc = "Set the base turf for a z-level." set desc = "Set the base turf for a z-level."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/choice = tgui_input_number(usr, "Which Z-level do you wish to set the base turf for?") var/choice = tgui_input_number(usr, "Which Z-level do you wish to set the base turf for?")
if(!choice) if(!choice)

View File

@@ -551,7 +551,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
msg = span_notice(msg)// close the span from right at the top msg = span_notice(msg)// close the span from right at the top
for(var/mob/M in mob_list) for(var/mob/M in mob_list)
if(M.client && M.client.holder) if(M.client && check_rights_for(M.client, R_HOLDER))
to_chat(M,msg) to_chat(M,msg)
/proc/get_nt_opposed() /proc/get_nt_opposed()

View File

@@ -22,7 +22,7 @@ mob
if(GLOB.master_mode == "sandbox") if(GLOB.master_mode == "sandbox")
sandbox = new/datum/hSB sandbox = new/datum/hSB
sandbox.owner = src.ckey sandbox.owner = src.ckey
if(src.client.holder) if(check_rights_for(src.client, R_HOLDER))
sandbox.admin = 1 sandbox.admin = 1
add_verb(src, /mob/proc/sandbox_panel) add_verb(src, /mob/proc/sandbox_panel)
sandbox_panel() sandbox_panel()

View File

@@ -406,7 +406,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
/* --- Loop through the receivers and categorize them --- */ /* --- Loop through the receivers and categorize them --- */
// Allows admins to disable radio // Allows admins to disable radio
if(R?.client?.holder) if(check_rights_for(R?.client, R_HOLDER))
if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio)) if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio))
continue continue
@@ -623,7 +623,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
/* --- Loop through the receivers and categorize them --- */ /* --- Loop through the receivers and categorize them --- */
// Allow admins to disable radios completely // Allow admins to disable radios completely
if(R?.client?.holder) if(check_rights_for(R?.client, R_HOLDER))
if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio)) if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio))
continue continue

View File

@@ -7,7 +7,7 @@
var/size_limit = 0.5 var/size_limit = 0.5
/obj/structure/portal_event/resize/attack_ghost(var/mob/observer/dead/user) /obj/structure/portal_event/resize/attack_ghost(var/mob/observer/dead/user)
if(!target && user?.client?.holder) if(!target && check_rights_for(user?.client, R_HOLDER))
if(tgui_alert(user, "Would you like to adjust the portal's size settings?", "Change portal size settings", list("No","Yes")) == "Yes") if(tgui_alert(user, "Would you like to adjust the portal's size settings?", "Change portal size settings", list("No","Yes")) == "Yes")
var/our_message var/our_message
if(tgui_alert(user, "Should this portal shrink people who are over the limit, or grow people who are under the limit?", "Change portal size settings", list("Shrink","Grow")) == "Shrink") if(tgui_alert(user, "Should this portal shrink people who are over the limit, or grow people who are under the limit?", "Change portal size settings", list("Shrink","Grow")) == "Shrink")

View File

@@ -541,7 +541,7 @@
* For now, we do it this way because calling this on a canvas itself might cause issues due to the whole dimension thing. * For now, we do it this way because calling this on a canvas itself might cause issues due to the whole dimension thing.
*/ */
/obj/structure/sign/painting/proc/admin_lateload_painting(var/spawn_specific = 0, var/which_painting = 0) /obj/structure/sign/painting/proc/admin_lateload_painting(var/spawn_specific = 0, var/which_painting = 0)
if(!usr.client.holder) if(!check_rights_for(usr.client, R_HOLDER))
return 0 return 0
if(spawn_specific && isnum(which_painting)) if(spawn_specific && isnum(which_painting))
var/list/painting = SSpersistence.all_paintings[which_painting] var/list/painting = SSpersistence.all_paintings[which_painting]

View File

@@ -640,7 +640,7 @@
return return
if(!ismovable(AM)) if(!ismovable(AM))
return return
if(!user.client?.holder) if(!check_rights_for(user.client, R_HOLDER))
return return
if(changing_state) if(changing_state)
return return

View File

@@ -12,7 +12,7 @@ GLOBAL_VAR_INIT(silent_ert, 0)
set category = "Fun.Event Kit" set category = "Fun.Event Kit"
set desc = "Send an emergency response team to the station" set desc = "Send an emergency response team to the station"
if(!holder) if(!check_rights_for(src, R_HOLDER))
to_chat(usr, span_danger("Only administrators may use this command.")) to_chat(usr, span_danger("Only administrators may use this command."))
return return
if(!ticker) if(!ticker)

View File

@@ -46,7 +46,7 @@
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) /client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
set name = "ToRban" set name = "ToRban"
set category = "Server.Config" set category = "Server.Config"
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
switch(task) switch(task)
if("update") if("update")
ToRban_update() ToRban_update()

View File

@@ -630,7 +630,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
set category = "Server.Game" set category = "Server.Game"
set name = "Restart" set name = "Restart"
set desc="Restarts the world" set desc="Restarts the world"
if (!usr.client.holder) if (!check_rights_for(usr.client, R_HOLDER))
return return
var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") // Not tgui_alert for safety var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") // Not tgui_alert for safety
if(!confirm || confirm == "Cancel") if(!confirm || confirm == "Cancel")
@@ -1021,7 +1021,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server.Game" set category = "Server.Game"
set desc="Reboots the server post haste" set desc="Reboots the server post haste"
set name="Immediate Reboot" set name="Immediate Reboot"
if(!usr.client.holder) return if(!check_rights_for(usr.client, R_HOLDER)) return
if(alert(usr, "Reboot server?","Reboot!","Yes","No") != "Yes") // Not tgui_alert for safety if(alert(usr, "Reboot server?","Reboot!","Yes","No") != "Yes") // Not tgui_alert for safety
return return
to_world(span_filter_system("[span_red(span_bold("Rebooting world!"))] [span_blue("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!")]")) to_world(span_filter_system("[span_red(span_bold("Rebooting world!"))] [span_blue("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!")]"))
@@ -1299,7 +1299,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set name = "Update Mob Sprite" set name = "Update Mob Sprite"
set desc = "Should fix any mob sprite update errors." set desc = "Should fix any mob sprite update errors."
if (!holder) if (!check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return

View File

@@ -29,7 +29,7 @@
/client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") ) /client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") )
set name = "Investigate" set name = "Investigate"
set category = "Admin.Investigate" set category = "Admin.Investigate"
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
switch(subject) switch(subject)
if("singulo", "telesci") //general one-round-only stuff if("singulo", "telesci") //general one-round-only stuff
var/F = investigate_subject2file(subject) var/F = investigate_subject2file(subject)

View File

@@ -67,7 +67,7 @@
/client/proc/admin_ghost() /client/proc/admin_ghost()
set category = "Admin.Game" set category = "Admin.Game"
set name = "Aghost" set name = "Aghost"
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/build_mode var/build_mode
if(src.buildmode) if(src.buildmode)

View File

@@ -245,7 +245,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
//probably a bit iffy - will hopefully figure out a better solution //probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other) /proc/check_if_greater_rights_than(client/other)
if(usr?.client) if(usr?.client)
if(usr.client.holder) if(check_rights_for(usr.client, R_HOLDER))
if(!other || !other.holder) if(!other || !other.holder)
return TRUE return TRUE
return usr.client.holder.check_if_greater_rights_than_holder(other.holder) return usr.client.holder.check_if_greater_rights_than_holder(other.holder)

View File

@@ -623,7 +623,7 @@
var/mob/living/carbon/human/Tar = target var/mob/living/carbon/human/Tar = target
if(!istype(Tar)) if(!istype(Tar))
return return
if(!user.client.holder) if(!check_rights_for(user.client, R_HOLDER))
return return
var/obj/item/X = user.client.holder.marked_datum var/obj/item/X = user.client.holder.marked_datum
if(!istype(X)) if(!istype(X))
@@ -634,7 +634,7 @@
var/mob/living/carbon/human/Tar = target var/mob/living/carbon/human/Tar = target
if(!istype(Tar)) if(!istype(Tar))
return return
if(!user.client.holder) if(!check_rights_for(user.client, R_HOLDER))
return return
var/obj/item/X = user.client.holder.marked_datum var/obj/item/X = user.client.holder.marked_datum
if(!istype(X)) if(!istype(X))

View File

@@ -1,6 +1,6 @@
/datum/admins/proc/player_panel_new()//The new one /datum/admins/proc/player_panel_new()//The new one
if (!usr.client.holder) if (!check_rights_for(usr.client, R_HOLDER))
return return
var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale) var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale)
var/dat = "<html><head><title>Admin Player Panel</title></head>" var/dat = "<html><head><title>Admin Player Panel</title></head>"
@@ -324,7 +324,7 @@
//The old one //The old one
/datum/admins/proc/player_panel_old() /datum/admins/proc/player_panel_old()
if (!usr.client.holder) if (!check_rights_for(usr.client, R_HOLDER))
return return
var/dat = "<html><head><title>Player Menu</title></head>" var/dat = "<html><head><title>Player Menu</title></head>"

View File

@@ -835,7 +835,7 @@
var/mob/M = locate(href_list["newban"]) var/mob/M = locate(href_list["newban"])
if(!ismob(M)) return if(!ismob(M)) return
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway if(M.client && check_rights_for(M.client, R_HOLDER)) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel"))) switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel")))
if(null) if(null)

View File

@@ -31,7 +31,7 @@
for(var/mob/M in mob_list) for(var/mob/M in mob_list)
if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details. if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, M.client.holder)]):</EM> " + span_message("[msg]")))) to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, check_rights_for(M.client, R_HOLDER))]):</EM> " + span_message("[msg]"))))
else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC. else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
var/datum/antagonist/A = null var/datum/antagonist/A = null
if(M.mind) // Observers don't have minds, but they should still see AOOC. if(M.mind) // Observers don't have minds, but they should still see AOOC.

View File

@@ -2,7 +2,7 @@
set category = "Mapping" set category = "Mapping"
set name = "Check Piping" set name = "Check Piping"
set background = 1 set background = 1
if(!src.holder) if(!check_rights_for(src, R_HOLDER))
return return
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -43,7 +43,7 @@
/client/proc/powerdebug() /client/proc/powerdebug()
set category = "Mapping" set category = "Mapping"
set name = "Check Power" set name = "Check Power"
if(!src.holder) if(!check_rights_for(src, R_HOLDER))
return return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -3,7 +3,7 @@
set category = "Fun.Event Kit" set category = "Fun.Event Kit"
set name = "Change Custom Event" set name = "Change Custom Event"
if(!holder) if(!check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return

View File

@@ -2,7 +2,7 @@
set category = "Admin.Chat" set category = "Admin.Chat"
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
set hidden = 1 set hidden = 1
if(!src.holder) if(!check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return
if(!src.mob) if(!src.mob)

View File

@@ -245,7 +245,7 @@ var/list/sounds_cache = list()
/client/proc/stop_sounds() /client/proc/stop_sounds()
set category = "Debug.Dangerous" set category = "Debug.Dangerous"
set name = "Stop All Playing Sounds" set name = "Stop All Playing Sounds"
if(!src.holder) if(!check_rights_for(src, R_HOLDER))
return return
log_admin("[key_name(src)] stopped all currently playing sounds.") log_admin("[key_name(src)] stopped all currently playing sounds.")

View File

@@ -20,7 +20,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
/client/proc/cmd_admin_prison(mob/M as mob in mob_list) /client/proc/cmd_admin_prison(mob/M as mob in mob_list)
set category = "Admin.Game" set category = "Admin.Game"
set name = "Prison" set name = "Prison"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if (ismob(M)) if (ismob(M))
@@ -48,7 +48,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
/client/proc/cmd_check_new_players() /client/proc/cmd_check_new_players()
set category = "Admin.Investigate" set category = "Admin.Investigate"
set name = "Check new Players" set name = "Check new Players"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All")) var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All"))
@@ -86,7 +86,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
set name = "Subtle Message" set name = "Subtle Message"
if(!ismob(M)) return if(!ismob(M)) return
if (!holder) if (!check_rights_for(src, R_HOLDER))
return return
var/msg = tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]")) var/msg = tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]"))
@@ -99,7 +99,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
if(usr) if(usr)
if (usr.client) if (usr.client)
if(usr.client.holder) if(check_rights_for(usr.client, R_HOLDER))
to_chat(M, span_bold("You hear a voice in your head...") + " " + span_italics("[msg]")) to_chat(M, span_bold("You hear a voice in your head...") + " " + span_italics("[msg]"))
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]") log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
@@ -112,7 +112,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
set category = "Fun.Narrate" set category = "Fun.Narrate"
set name = "Global Narrate" set name = "Global Narrate"
if (!holder) if (!check_rights_for(src, R_HOLDER))
return return
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:")) var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
@@ -133,7 +133,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
set category = "Fun.Narrate" set category = "Fun.Narrate"
set name = "Direct Narrate" set name = "Direct Narrate"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if(!M) if(!M)
@@ -160,7 +160,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
set category = "Admin.Game" set category = "Admin.Game"
set name = "Godmode" set name = "Godmode"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
M.status_flags ^= GODMODE M.status_flags ^= GODMODE
@@ -180,16 +180,16 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
else else
if(!usr || !usr.client) if(!usr || !usr.client)
return return
if(!usr.client.holder) if(!check_rights_for(usr.client, R_HOLDER))
to_chat(usr, span_red("Error: cmd_admin_mute: You don't have permission to do this.")) to_chat(usr, span_red("Error: cmd_admin_mute: You don't have permission to do this."))
return return
if(!M.client) if(!M.client)
to_chat(usr, span_red("Error: cmd_admin_mute: This mob doesn't have a client tied to it.")) to_chat(usr, span_red("Error: cmd_admin_mute: This mob doesn't have a client tied to it."))
if(M.client.holder) if(check_rights_for(M.client, R_HOLDER))
to_chat(usr, span_red("Error: cmd_admin_mute: You cannot mute an admin/mod.")) to_chat(usr, span_red("Error: cmd_admin_mute: You cannot mute an admin/mod."))
if(!M.client) if(!M.client)
return return
if(M.client.holder) if(check_rights_for(M.client, R_HOLDER))
return return
var/muteunmute var/muteunmute
@@ -230,7 +230,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
set category = "Fun.Silicon" set category = "Fun.Silicon"
set name = "Add Random AI Law" set name = "Add Random AI Law"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
@@ -282,7 +282,7 @@ Ccomp's first proc.
set name = "Allow player to respawn" set name = "Allow player to respawn"
set desc = "Let a player bypass the wait to respawn or allow them to re-enter their corpse." set desc = "Let a player bypass the wait to respawn or allow them to re-enter their corpse."
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/target = tgui_input_list(usr, "Select a ckey to allow to rejoin", "Allow Respawn Selector", GLOB.respawn_timers) var/target = tgui_input_list(usr, "Select a ckey to allow to rejoin", "Allow Respawn Selector", GLOB.respawn_timers)
@@ -319,13 +319,13 @@ Ccomp's first proc.
set name = "Toggle antagHUD usage" set name = "Toggle antagHUD usage"
set desc = "Toggles antagHUD usage for observers" set desc = "Toggles antagHUD usage for observers"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/action="" var/action=""
if(CONFIG_GET(flag/antag_hud_allowed)) if(CONFIG_GET(flag/antag_hud_allowed))
for(var/mob/observer/dead/g in get_ghosts()) for(var/mob/observer/dead/g in get_ghosts())
if(!g.client.holder) //Remove the verb from non-admin ghosts if(!check_rights_for(g.client, R_HOLDER)) //Remove the verb from non-admin ghosts
remove_verb(g, /mob/observer/dead/verb/toggle_antagHUD) remove_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
if(g.antagHUD) if(g.antagHUD)
g.antagHUD = 0 // Disable it on those that have it enabled g.antagHUD = 0 // Disable it on those that have it enabled
@@ -336,7 +336,7 @@ Ccomp's first proc.
action = "disabled" action = "disabled"
else else
for(var/mob/observer/dead/g in get_ghosts()) for(var/mob/observer/dead/g in get_ghosts())
if(!g.client.holder) // Add the verb back for all non-admin ghosts if(!check_rights_for(g.client, R_HOLDER)) // Add the verb back for all non-admin ghosts
add_verb(g, /mob/observer/dead/verb/toggle_antagHUD) add_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
to_chat(g, span_boldnotice("The Administrator has enabled AntagHUD")) // Notify all observers they can now use AntagHUD to_chat(g, span_boldnotice("The Administrator has enabled AntagHUD")) // Notify all observers they can now use AntagHUD
CONFIG_SET(flag/antag_hud_allowed, TRUE) CONFIG_SET(flag/antag_hud_allowed, TRUE)
@@ -354,7 +354,7 @@ Ccomp's first proc.
set name = "Toggle antagHUD Restrictions" set name = "Toggle antagHUD Restrictions"
set desc = "Restricts players that have used antagHUD from being able to join this round." set desc = "Restricts players that have used antagHUD from being able to join this round."
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/action="" var/action=""
@@ -614,7 +614,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Fun.Silicon" set category = "Fun.Silicon"
set name = "Add Custom AI law" set name = "Add Custom AI law"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "")) var/input = sanitize(tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", ""))
@@ -643,7 +643,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Game" set category = "Admin.Game"
set name = "Rejuvenate" set name = "Rejuvenate"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if(!mob) if(!mob)
@@ -666,7 +666,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Fun.Event Kit" set category = "Fun.Event Kit"
set name = "Create Command Report" set name = "Create Command Report"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE, prevent_enter = TRUE), extra = 0) var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE, prevent_enter = TRUE), extra = 0)
@@ -696,7 +696,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Game" set category = "Admin.Game"
set name = "Delete" set name = "Delete"
if (!holder) if (!check_rights_for(src, R_HOLDER))
return return
admin_delete(O) admin_delete(O)
@@ -705,7 +705,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Investigate" set category = "Admin.Investigate"
set name = "List free slots" set name = "List free slots"
if (!holder) if (!check_rights_for(src, R_HOLDER))
return return
if(job_master) if(job_master)
@@ -717,7 +717,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
/client/proc/cmd_manual_ban() /client/proc/cmd_manual_ban()
set name = "Manual Ban" set name = "Manual Ban"
set category = "Admin.Moderation" set category = "Admin.Moderation"
if(!authenticated || !holder) if(!authenticated || !check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return
var/mob/M = null var/mob/M = null
@@ -730,7 +730,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(!selection) if(!selection)
return return
M = selection:mob M = selection:mob
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level))) if ((M.client && check_rights_for(M.client, R_HOLDER) && (M.client.holder.level >= holder.level)))
tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!") tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!")
return return
@@ -780,7 +780,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set name = "Check Contents" set name = "Check Contents"
set popup_menu = FALSE set popup_menu = FALSE
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/list/L = M.get_contents() var/list/L = M.get_contents()
@@ -792,7 +792,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
/client/proc/cmd_admin_remove_phoron() /client/proc/cmd_admin_remove_phoron()
set category = "Debug.Game" set category = "Debug.Game"
set name = "Stabilize Atmos." set name = "Stabilize Atmos."
if(!holder) if(!check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return
feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -824,7 +824,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set name = "Change View Range" set name = "Change View Range"
set desc = "switches between 1x and custom views" set desc = "switches between 1x and custom views"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/view = src.view var/view = src.view

View File

@@ -317,7 +317,7 @@ var/redspace_abduction_z
target.forceMove(locate(target.x,target.y,redspace_abduction_z)) target.forceMove(locate(target.x,target.y,redspace_abduction_z))
to_chat(target,span_danger("The tug relaxes, but everything around you looks... slightly off.")) to_chat(target,span_danger("The tug relaxes, but everything around you looks... slightly off."))
to_chat(user,span_notice("The mob has been moved. ([admin_jump_link(target,usr.client.holder)])")) to_chat(user, span_notice("The mob has been moved. ([admin_jump_link(target, check_rights_for(usr.client, R_HOLDER))])"))
target.transforming = FALSE target.transforming = FALSE

View File

@@ -17,7 +17,7 @@
A.associate(src) A.associate(src)
if(!holder) if(!check_rights_for(src, R_HOLDER))
return //This can happen if an admin attempts to vv themself into somebody elses's deadmin datum by getting ref via brute force return //This can happen if an admin attempts to vv themself into somebody elses's deadmin datum by getting ref via brute force
to_chat(src, span_interface("You are now an admin."), confidential = TRUE) to_chat(src, span_interface("You are now an admin."), confidential = TRUE)

View File

@@ -6,7 +6,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
set name = "Spawn Strike Team" set name = "Spawn Strike Team"
set desc = "Spawns a strike team if you want to run an admin event." set desc = "Spawns a strike team if you want to run an admin event."
if(!src.holder) if(!check_rights_for(src, R_HOLDER))
to_chat(src, "Only administrators may use this command.") to_chat(src, "Only administrators may use this command.")
return return

View File

@@ -12,5 +12,5 @@
else else
holder.add_tagged_datum(target_datum) holder.add_tagged_datum(target_datum)
ADMIN_VERB_ONLY_CONTEXT_MENU(tag_datum, R_NONE, "Tag Datum", datum/target_datum as mob|obj|turf|area in view()) ADMIN_VERB_ONLY_CONTEXT_MENU(tag_datum, R_HOLDER, "Tag Datum", datum/target_datum as mob|obj|turf|area in view())
user.tag_datum(target_datum) user.tag_datum(target_datum)

View File

@@ -11,7 +11,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(debug_variables, (R_DEBUG|R_SERVER|R_ADMIN|R_SPAWN|R
//set src in world //set src in world
var/static/cookieoffset = rand(1, 9999) //to force cookies to reset after the round. var/static/cookieoffset = rand(1, 9999) //to force cookies to reset after the round.
if(!usr.client || !usr.client.holder) //This is usr because admins can call the proc on other clients, even if they're not admins, to show them VVs. if(!usr.client || !check_rights_for(usr.client, R_HOLDER)) //This is usr because admins can call the proc on other clients, even if they're not admins, to show them VVs.
to_chat(usr, span_danger("You need to be an administrator to access this."), confidential = TRUE) to_chat(usr, span_danger("You need to be an administrator to access this."), confidential = TRUE)
return return

View File

@@ -135,7 +135,7 @@
/obj/structure/redgate/attack_ghost(var/mob/observer/dead/user) /obj/structure/redgate/attack_ghost(var/mob/observer/dead/user)
if(target) if(target)
if(!(secret || target.secret) || user?.client?.holder) if(!(secret || target.secret) || check_rights_for(user?.client, R_HOLDER))
user.forceMove(get_turf(target)) user.forceMove(get_turf(target))
else else
return ..() return ..()

View File

@@ -55,7 +55,7 @@
// Rate limiting // Rate limiting
var/mtl = CONFIG_GET(number/minute_topic_limit) var/mtl = CONFIG_GET(number/minute_topic_limit)
if (!holder && mtl) if (!check_rights_for(src, R_HOLDER) && mtl)
var/minute = round(world.time, 600) var/minute = round(world.time, 600)
if (!topiclimiter) if (!topiclimiter)
topiclimiter = new(LIMITER_SIZE) topiclimiter = new(LIMITER_SIZE)
@@ -73,7 +73,7 @@
return return
var/stl = CONFIG_GET(number/second_topic_limit) var/stl = CONFIG_GET(number/second_topic_limit)
if (!holder && stl && href_list["window_id"] != "statbrowser") if (!check_rights_for(src, R_HOLDER) && stl && href_list["window_id"] != "statbrowser")
var/second = round(world.time, 10) var/second = round(world.time, 10)
if (!topiclimiter) if (!topiclimiter)
topiclimiter = new(LIMITER_SIZE) topiclimiter = new(LIMITER_SIZE)
@@ -113,7 +113,7 @@
return return
if(href_list["irc_msg"]) if(href_list["irc_msg"])
if(!holder && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes if(!check_rights_for(src, R_HOLDER) && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
to_chat(src, span_warning("You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you")) to_chat(src, span_warning("You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you"))
return return
if(mute_irc) if(mute_irc)
@@ -782,7 +782,7 @@
// Mouse stuff // Mouse stuff
/client/Click(atom/object, atom/location, control, params) /client/Click(atom/object, atom/location, control, params)
var/mcl = CONFIG_GET(number/minute_click_limit) var/mcl = CONFIG_GET(number/minute_click_limit)
if (!holder && mcl) if (!check_rights_for(src, R_HOLDER) && mcl)
var/minute = round(world.time, 600) var/minute = round(world.time, 600)
if (!clicklimiter) if (!clicklimiter)
@@ -805,7 +805,7 @@
return return
var/scl = CONFIG_GET(number/second_click_limit) var/scl = CONFIG_GET(number/second_click_limit)
if (!holder && scl) if (!check_rights_for(src, R_HOLDER) && scl)
var/second = round(world.time, 10) var/second = round(world.time, 10)
if (!clicklimiter) if (!clicklimiter)
clicklimiter = new(LIMITER_SIZE) clicklimiter = new(LIMITER_SIZE)
@@ -827,13 +827,13 @@
window_scaling = text2num(winget(src, null, "dpi")) window_scaling = text2num(winget(src, null, "dpi"))
/client/proc/open_filter_editor(atom/in_atom) /client/proc/open_filter_editor(atom/in_atom)
if(holder) if(check_rights_for(src, R_HOLDER))
holder.filteriffic = new /datum/filter_editor(in_atom) holder.filteriffic = new /datum/filter_editor(in_atom)
holder.filteriffic.tgui_interact(mob) holder.filteriffic.tgui_interact(mob)
///opens the particle editor UI for the in_atom object for this client ///opens the particle editor UI for the in_atom object for this client
/client/proc/open_particle_editor(atom/movable/in_atom) /client/proc/open_particle_editor(atom/movable/in_atom)
if(holder) if(check_rights_for(src, R_HOLDER))
holder.particle_test = new /datum/particle_editor(in_atom) holder.particle_test = new /datum/particle_editor(in_atom)
holder.particle_test.tgui_interact(mob) holder.particle_test.tgui_interact(mob)

View File

@@ -46,7 +46,7 @@
if(!.) if(!.)
return return
return preferences.client.holder return check_rights_for(preferences.client, R_HOLDER)
/datum/preference/toggle/holder/play_adminhelp_ping /datum/preference/toggle/holder/play_adminhelp_ping
category = PREFERENCE_CATEGORY_GAME_PREFERENCES category = PREFERENCE_CATEGORY_GAME_PREFERENCES

View File

@@ -16,7 +16,7 @@
to_chat(src, span_warning("You have OOC muted.")) to_chat(src, span_warning("You have OOC muted."))
return return
if(!holder) if(!check_rights_for(src, R_HOLDER))
if(!CONFIG_GET(flag/ooc_allowed)) if(!CONFIG_GET(flag/ooc_allowed))
to_chat(src, span_danger("OOC is globally muted.")) to_chat(src, span_danger("OOC is globally muted."))
return return

View File

@@ -173,7 +173,7 @@
var/check_togglable var/check_togglable
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/s_name = tgui_input_text(src, "Item Name:", "Name") var/s_name = tgui_input_text(src, "Item Name:", "Name")

View File

@@ -226,7 +226,7 @@
var/check_togglable var/check_togglable
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
var/s_name = tgui_input_text(src, "Structure Name:", "Name") var/s_name = tgui_input_text(src, "Structure Name:", "Name")

View File

@@ -226,7 +226,7 @@
set name = "Trigger Event (Debug Only)" set name = "Trigger Event (Debug Only)"
set category = "Debug.Dangerous" set category = "Debug.Dangerous"
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
if(ispath(type)) if(ispath(type))

View File

@@ -3,7 +3,7 @@
set category = "Server.Admin" set category = "Server.Admin"
set desc = "Dumps food and drink recipe info and images for wiki or other use." set desc = "Dumps food and drink recipe info and images for wiki or other use."
if(!holder) if(!check_rights_for(src, R_HOLDER))
return return
//////////////////////// DRINK //////////////////////// DRINK

View File

@@ -214,7 +214,7 @@ Works together with spawning an observer, noted above.
//RS Port #658 Start //RS Port #658 Start
/mob/observer/dead/proc/check_area() /mob/observer/dead/proc/check_area()
if(client?.holder) if(check_rights_for(client, R_HOLDER))
return return
if(!isturf(loc)) if(!isturf(loc))
return return
@@ -251,7 +251,7 @@ Works together with spawning an observer, noted above.
B.update() B.update()
if(ghost.client) if(ghost.client)
ghost.client.time_died_as_mouse = ghost.timeofdeath ghost.client.time_died_as_mouse = ghost.timeofdeath
if(ghost.client && !ghost.client.holder && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed. if(ghost.client && !check_rights_for(ghost.client, R_HOLDER) && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
remove_verb(ghost, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing! remove_verb(ghost, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
return ghost return ghost
@@ -368,18 +368,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Toggle AntagHUD" set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist" set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!CONFIG_GET(flag/antag_hud_allowed) && !client.holder) if(!CONFIG_GET(flag/antag_hud_allowed) && !check_rights_for(client, R_HOLDER))
to_chat(src, span_filter_notice(span_red("Admins have disabled this for this round."))) to_chat(src, span_filter_notice(span_red("Admins have disabled this for this round.")))
return return
if(jobban_isbanned(src, JOB_ANTAGHUD)) if(jobban_isbanned(src, JOB_ANTAGHUD))
to_chat(src, span_filter_notice(span_red(span_bold("You have been banned from using this feature")))) to_chat(src, span_filter_notice(span_red(span_bold("You have been banned from using this feature"))))
return return
if(CONFIG_GET(flag/antag_hud_restricted) && !has_enabled_antagHUD && !client.holder) if(CONFIG_GET(flag/antag_hud_restricted) && !has_enabled_antagHUD && !check_rights_for(client, R_HOLDER))
var/response = tgui_alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?",list("Yes","No")) var/response = tgui_alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?",list("Yes","No"))
if(response != "Yes") return if(response != "Yes") return
can_reenter_corpse = FALSE can_reenter_corpse = FALSE
set_respawn_timer(-1) // Foreeeever set_respawn_timer(-1) // Foreeeever
if(!has_enabled_antagHUD && !client.holder) if(!has_enabled_antagHUD && !check_rights_for(client, R_HOLDER))
has_enabled_antagHUD = TRUE has_enabled_antagHUD = TRUE
antagHUD = !antagHUD antagHUD = !antagHUD
@@ -388,7 +388,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/observer/dead/proc/jumpable_areas() /mob/observer/dead/proc/jumpable_areas()
var/list/areas = return_sorted_areas() var/list/areas = return_sorted_areas()
if(client?.holder) if(check_rights_for(client, R_HOLDER))
return areas return areas
for(var/key in areas) for(var/key in areas)
@@ -402,7 +402,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/observer/dead/proc/jumpable_mobs() /mob/observer/dead/proc/jumpable_mobs()
var/list/mobs = getmobs() var/list/mobs = getmobs()
if(client?.holder) if(check_rights_for(client, R_HOLDER))
return mobs return mobs
for(var/key in mobs) for(var/key in mobs)
@@ -466,7 +466,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ManualFollow(M || jumpable_mobs()[mobname]) ManualFollow(M || jumpable_mobs()[mobname])
/mob/observer/dead/forceMove(atom/destination, direction, movetime, just_spawned = FALSE) // pass movetime through /mob/observer/dead/forceMove(atom/destination, direction, movetime, just_spawned = FALSE) // pass movetime through
if(client?.holder) if(check_rights_for(client, R_HOLDER))
return ..() return ..()
if(get_z(destination) in using_map?.secret_levels) if(get_z(destination) in using_map?.secret_levels)
@@ -486,7 +486,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return ..() return ..()
/mob/observer/dead/Move(atom/newloc, direct = 0, movetime) /mob/observer/dead/Move(atom/newloc, direct = 0, movetime)
if(client?.holder) if(check_rights_for(client, R_HOLDER))
return ..() return ..()
if(get_z(newloc) in using_map?.secret_levels) if(get_z(newloc) in using_map?.secret_levels)
@@ -770,7 +770,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//This is called when a ghost is drag clicked to something. //This is called when a ghost is drag clicked to something.
/mob/observer/dead/MouseDrop(atom/over) /mob/observer/dead/MouseDrop(atom/over)
if(!usr || !over) return if(!usr || !over) return
if (isobserver(usr) && usr.client && usr.client.holder && isliving(over)) if (isobserver(usr) && usr.client && check_rights_for(usr.client, R_HOLDER) && isliving(over))
if (usr.client.holder.cmd_ghost_drag(src,over)) if (usr.client.holder.cmd_ghost_drag(src,over))
return return

View File

@@ -15,7 +15,7 @@
to_chat(src, span_danger("You have deadchat muted.")) to_chat(src, span_danger("You have deadchat muted."))
return return
if(!src.client.holder && !check_rights(R_HOLDER, FALSE)) if(!check_rights(R_HOLDER, FALSE))
if(!CONFIG_GET(flag/dsay_allowed)) if(!CONFIG_GET(flag/dsay_allowed))
to_chat(src, span_danger("Deadchat is globally muted.")) to_chat(src, span_danger("Deadchat is globally muted."))
return return

View File

@@ -378,7 +378,7 @@ var/list/channel_to_radio_key = list()
if(M && src) //If we still exist, when the spawn processes if(M && src) //If we still exist, when the spawn processes
//VOREStation Add - Ghosts don't hear whispers //VOREStation Add - Ghosts don't hear whispers
if(whispering && isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ if(whispering && isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \
(!(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) && !M.client?.holder))) (!(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) && !check_rights_for(M.client, R_HOLDER))))
M.show_message(span_game(span_say(span_name(src.name) + " [w_not_heard].")), 2) M.show_message(span_game(span_say(span_name(src.name) + " [w_not_heard].")), 2)
return return
//VOREStation Add End //VOREStation Add End

View File

@@ -537,7 +537,7 @@
if (isnewplayer(G)) if (isnewplayer(G))
continue continue
else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
if((client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || G.client.holder) && \ if((client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || check_rights_for(G.client, R_HOLDER)) && \
G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle)) G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle))
to_chat(G, span_filter_say(span_cult("[src.name]'s screen prints, \"[message]\""))) to_chat(G, span_filter_say(span_cult("[src.name]'s screen prints, \"[message]\"")))

View File

@@ -501,7 +501,7 @@
if(isnewplayer(M)) if(isnewplayer(M))
continue continue
if(isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ if(isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \
!L.client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !M.client?.holder)) !L.client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !check_rights_for(M.client, R_HOLDER)))
spawn(0) spawn(0)
M.show_message(undisplayed_message, 2) M.show_message(undisplayed_message, 2)
else else
@@ -1166,7 +1166,7 @@
if(isnewplayer(M)) if(isnewplayer(M))
continue continue
if(isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ if(isobserver(M) && (!M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \
!L.client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !M.client?.holder)) !L.client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) && !check_rights_for(M.client, R_HOLDER)))
spawn(0) spawn(0)
M.show_message(undisplayed_message, 2) M.show_message(undisplayed_message, 2)
else else

View File

@@ -11,7 +11,7 @@
return FALSE return FALSE
//CHOMPAdd End //CHOMPAdd End
//RS Port #658 Start //RS Port #658 Start
if(!client?.holder && A.flag_check(AREA_BLOCK_PHASE_SHIFT)) if(!check_rights_for(client, R_HOLDER) && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
to_chat(src,span_warning("You can't use that here!")) to_chat(src,span_warning("You can't use that here!"))
return FALSE return FALSE
//RS Port #658 End //RS Port #658 End

View File

@@ -471,14 +471,14 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
else else
name = realname name = realname
if(subject && subject.forbid_seeing_deadchat && !subject.client.holder) if(subject && subject.forbid_seeing_deadchat && !check_rights_for(subject.client, R_HOLDER))
return // Can't talk in deadchat if you can't see it. return // Can't talk in deadchat if you can't see it.
for(var/mob/M in player_list) for(var/mob/M in player_list)
if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (M.client.holder && check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay))
var/follow var/follow
var/lname var/lname
if(M.forbid_seeing_deadchat && !M.client.holder) if(M.forbid_seeing_deadchat && !check_rights_for(M.client, R_HOLDER))
continue continue
if(subject) if(subject)
@@ -486,12 +486,12 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
continue continue
if(subject != M) if(subject != M)
follow = "([ghost_follow_link(subject, M)]) " follow = "([ghost_follow_link(subject, M)]) "
if(M.stat != DEAD && M.client.holder) if(M.stat != DEAD && check_rights_for(M.client, R_HOLDER))
follow = "([admin_jump_link(subject, M.client.holder)]) " follow = "([admin_jump_link(subject, check_rights_for(M.client, R_HOLDER))]) "
var/mob/observer/dead/DM var/mob/observer/dead/DM
if(isobserver(subject)) if(isobserver(subject))
DM = subject DM = subject
if(M.client.holder) // What admins see if(check_rights_for(M.client, R_HOLDER)) // What admins see
lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])" lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])"
else else
if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous
@@ -505,10 +505,10 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
/proc/say_dead_object(var/message, var/obj/subject = null) /proc/say_dead_object(var/message, var/obj/subject = null)
for(var/mob/M in player_list) for(var/mob/M in player_list)
if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (M.client.holder && check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay))
var/follow var/follow
var/lname = "Game Master" var/lname = "Game Master"
if(M.forbid_seeing_deadchat && !M.client.holder) if(M.forbid_seeing_deadchat && !check_rights_for(M.client, R_HOLDER))
continue continue
if(subject) if(subject)

View File

@@ -415,7 +415,7 @@
else if(!istype(mob, /mob/observer/dead) && T.blocks_nonghost_incorporeal) else if(!istype(mob, /mob/observer/dead) && T.blocks_nonghost_incorporeal)
return return
//RS Port #658 Start //RS Port #658 Start
if(!holder) if(!check_rights_for(src, R_HOLDER))
if(isliving(mob) && A.flag_check(AREA_BLOCK_PHASE_SHIFT)) if(isliving(mob) && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
to_chat(mob, span_warning("Something blocks you from entering this location while phased out.")) to_chat(mob, span_warning("Something blocks you from entering this location while phased out."))
return return

View File

@@ -129,7 +129,7 @@
client.prefs.real_name = random_name(client.prefs.identifying_gender) client.prefs.real_name = random_name(client.prefs.identifying_gender)
observer.real_name = client.prefs.real_name observer.real_name = client.prefs.real_name
observer.name = observer.real_name observer.name = observer.real_name
if(!client.holder && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed. if(!check_rights_for(client, R_HOLDER) && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
remove_verb(observer, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing! remove_verb(observer, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
observer.key = key observer.key = key

View File

@@ -50,7 +50,7 @@
establish_db_connection() establish_db_connection()
if(SSdbcore.IsConnected()) if(SSdbcore.IsConnected())
var/isadmin = 0 var/isadmin = 0
if(src.client && src.client.holder) if(src.client && check_rights_for(src.client, R_HOLDER))
isadmin = 1 isadmin = 1
var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id, question FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime") var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT id, question FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")

View File

@@ -50,7 +50,7 @@
if(!client) if(!client)
return // Clientless mobs shouldn't be trying to talk in deadchat. return // Clientless mobs shouldn't be trying to talk in deadchat.
if(!client.holder) if(!check_rights_for(client, R_HOLDER))
if(!CONFIG_GET(flag/dsay_allowed)) if(!CONFIG_GET(flag/dsay_allowed))
to_chat(src, span_danger("Deadchat is globally muted.")) to_chat(src, span_danger("Deadchat is globally muted."))
return return

View File

@@ -196,7 +196,7 @@
if(src.client && M && !(get_z(src) == get_z(M))) if(src.client && M && !(get_z(src) == get_z(M)))
message = span_multizsay("[message]") message = span_multizsay("[message]")
if(isobserver(M) && (!M.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \ if(isobserver(M) && (!M.read_preference(/datum/preference/toggle/ghost_see_whisubtle) || \
(!(read_preference(/datum/preference/toggle/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) && !M.client?.holder))) (!(read_preference(/datum/preference/toggle/whisubtle_vis) || (isbelly(M.loc) && src == M.loc:owner)) && !check_rights_for(M.client, R_HOLDER))))
spawn(0) spawn(0)
M.show_message(undisplayed_message, 2) M.show_message(undisplayed_message, 2)
else else
@@ -351,7 +351,7 @@
continue continue
else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \
G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle)) G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle))
if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || G.client.holder) if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || check_rights_for(G.client, R_HOLDER))
to_chat(G, span_psay("\The [M] thinks, \"[message]\"")) to_chat(G, span_psay("\The [M] thinks, \"[message]\""))
log_say(message,M) log_say(message,M)
else //There wasn't anyone to send the message to, pred or prey, so let's just say it instead and correct our psay just in case. else //There wasn't anyone to send the message to, pred or prey, so let's just say it instead and correct our psay just in case.
@@ -456,7 +456,7 @@
continue continue
else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \
G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle)) G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle))
if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || G.client.holder) if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || check_rights_for(G.client, R_HOLDER))
to_chat(G, span_pemote("\The [M] [message]")) to_chat(G, span_pemote("\The [M] [message]"))
log_say(message,M) log_say(message,M)
else //There wasn't anyone to send the message to, pred or prey, so let's just emote it instead and correct our psay just in case. else //There wasn't anyone to send the message to, pred or prey, so let's just emote it instead and correct our psay just in case.

View File

@@ -39,12 +39,12 @@
to_chat(user, span_notice("Your hand scatters \the [src]...")) to_chat(user, span_notice("Your hand scatters \the [src]..."))
qdel(src) //Delete portals which aren't set that people mess with. qdel(src) //Delete portals which aren't set that people mess with.
else return //do not send ghosts, zshadows, ai eyes, etc else return //do not send ghosts, zshadows, ai eyes, etc
else if(isliving(user) || isobserver(user) && user?.client?.holder) //unless they're staff else if(isliving(user) || isobserver(user) && check_rights_for(user?.client, R_HOLDER)) //unless they're staff
spawn(0) spawn(0)
src.teleport(user) src.teleport(user)
/obj/structure/portal_event/attack_ghost(var/mob/observer/dead/user) /obj/structure/portal_event/attack_ghost(var/mob/observer/dead/user)
if(!target && user?.client?.holder) if(!target && check_rights_for(user?.client, R_HOLDER))
to_chat(user, span_notice("Selecting 'Portal Here' will create and link a portal at your location, while 'Target Here' will create an object that is only visible to ghosts which will act as the target, again at your location. Each option will give you the ability to change portal types, but for all options except 'Select Type' you only get one shot at it, so be sure to experiment with 'Select Type' first if you're not familiar with them.")) to_chat(user, span_notice("Selecting 'Portal Here' will create and link a portal at your location, while 'Target Here' will create an object that is only visible to ghosts which will act as the target, again at your location. Each option will give you the ability to change portal types, but for all options except 'Select Type' you only get one shot at it, so be sure to experiment with 'Select Type' first if you're not familiar with them."))
var/response = tgui_alert(user, "You appear to be staff. This portal has no exit point. If you want to make one, move to where you want it to go, and click the appropriate option, see chat for more info, otherwise click 'Cancel'", "Unbound Portal", list("Cancel","Portal Here","Target Here", "Select Type")) var/response = tgui_alert(user, "You appear to be staff. This portal has no exit point. If you want to make one, move to where you want it to go, and click the appropriate option, see chat for more info, otherwise click 'Cancel'", "Unbound Portal", list("Cancel","Portal Here","Target Here", "Select Type"))
if(response == "Portal Here") if(response == "Portal Here")
@@ -69,7 +69,7 @@
return return
if(target) if(target)
message_admins("The [src]([x],[y],[z]) was given [target]([target.x],[target.y],[target.z]) as a target, and should be ready to use.") message_admins("The [src]([x],[y],[z]) was given [target]([target.x],[target.y],[target.z]) as a target, and should be ready to use.")
else if(user?.client?.holder) else if(check_rights_for(user?.client, R_HOLDER))
src.teleport(user) src.teleport(user)
else return else return

View File

@@ -31,7 +31,7 @@
return ..() return ..()
/obj/effect/overmap/bluespace_rift/attack_ghost(var/mob/observer/dead/user) /obj/effect/overmap/bluespace_rift/attack_ghost(var/mob/observer/dead/user)
if(!partner && user?.client?.holder) if(!partner && check_rights_for(user?.client, R_HOLDER))
var/response = tgui_alert(user, "You appear to be staff. This rift has no exit point. If you want to make one, move to where you want it to go, and click 'Make Here', otherwise click 'Cancel'", "Bluespace Rift", list("Cancel","Make Here")) var/response = tgui_alert(user, "You appear to be staff. This rift has no exit point. If you want to make one, move to where you want it to go, and click 'Make Here', otherwise click 'Cancel'", "Bluespace Rift", list("Cancel","Make Here"))
if(response == "Make Here") if(response == "Make Here")
new type(get_turf(user), src) new type(get_turf(user), src)

View File

@@ -3,7 +3,7 @@
set name = "Display Random Map" set name = "Display Random Map"
set desc = "Show the contents of a random map." set desc = "Show the contents of a random map."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", random_maps) var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", random_maps)
if(!choice) if(!choice)
@@ -17,7 +17,7 @@
set name = "Delete Random Map" set name = "Delete Random Map"
set desc = "Delete a random map." set desc = "Delete a random map."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", random_maps) var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", random_maps)
if(!choice) if(!choice)
@@ -34,7 +34,7 @@
set name = "Create Random Map" set name = "Create Random Map"
set desc = "Create a random map." set desc = "Create a random map."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map)) var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map))
if(!map_datum) if(!map_datum)
@@ -58,7 +58,7 @@
set name = "Apply Random Map" set name = "Apply Random Map"
set desc = "Apply a map to the game world." set desc = "Apply a map to the game world."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", random_maps) var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", random_maps)
if(!choice) if(!choice)
@@ -83,7 +83,7 @@
set name = "Overlay Random Map" set name = "Overlay Random Map"
set desc = "Apply a map to another map." set desc = "Apply a map to another map."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", random_maps) var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", random_maps)
if(!choice) if(!choice)

View File

@@ -3,6 +3,6 @@
set name = "Debug RogueMiner" set name = "Debug RogueMiner"
set desc = "Debug the RogueMiner controller." set desc = "Debug the RogueMiner controller."
if(!holder) return if(!check_rights_for(src, R_HOLDER)) return
debug_variables(rm_controller) debug_variables(rm_controller)
feedback_add_details("admin_verb","DRM") feedback_add_details("admin_verb","DRM")

View File

@@ -351,7 +351,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket_list)
/datum/ticket/proc/AddInteraction(formatted_message) /datum/ticket/proc/AddInteraction(formatted_message)
var/curinteraction = "[gameTimestamp()]: [formatted_message]" var/curinteraction = "[gameTimestamp()]: [formatted_message]"
if(CONFIG_GET(flag/discord_ahelps_all)) if(CONFIG_GET(flag/discord_ahelps_all))
ahelp_discord_message("ADMINHELP: TICKETID:[id] [strip_html_properly(curinteraction)]") ahelp_discord_message("ADMINHELP: TICKETID: [id] [strip_html_properly(curinteraction)]")
_interactions += curinteraction _interactions += curinteraction
/datum/ticket/proc/TicketPanel() /datum/ticket/proc/TicketPanel()

View File

@@ -221,7 +221,7 @@ Any-Mode: (hotkey doesn't need to be on)
else else
to_chat(src,hotkey_mode) to_chat(src,hotkey_mode)
to_chat(src,other) to_chat(src,other)
if(holder) if(check_rights_for(src, R_HOLDER))
to_chat(src,admin) to_chat(src,admin)
// Set the DreamSeeker input macro to the type appropriate for its mob // Set the DreamSeeker input macro to the type appropriate for its mob