diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index 2ecafc1b41a..91b849bd50e 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -21,6 +21,7 @@
#define DEADMIN_POSITION_SECURITY (1<<18)
#define DEADMIN_POSITION_SILICON (1<<19)
#define SOUND_ENDOFROUND (1<<20)
+#define ADMIN_IGNORE_CULT_GHOST (1<<21)
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_ENDOFROUND|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm
index 6eb1171e7d1..fca4f28d12f 100644
--- a/code/controllers/configuration/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -8,6 +8,10 @@
/datum/config_entry/flag/auto_deadmin_players
protection = CONFIG_ENTRY_LOCKED
+/datum/config_entry/number/auto_deadmin_timegate
+ config_entry_value = null
+ protection = CONFIG_ENTRY_LOCKED
+
/datum/config_entry/flag/auto_deadmin_antagonists
protection = CONFIG_ENTRY_LOCKED
diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm
index a52a33ad353..e92968f42ac 100644
--- a/code/controllers/subsystem/job.dm
+++ b/code/controllers/subsystem/job.dm
@@ -484,13 +484,20 @@ SUBSYSTEM_DEF(job)
if(!C?.holder)
return TRUE
var/datum/job/job = GetJob(rank)
+
+ var/timegate_expired = FALSE
+ // allow only forcing deadminning in the first X seconds of the round if auto_deadmin_timegate is set in config
+ var/timegate = CONFIG_GET(number/auto_deadmin_timegate)
+ if(timegate && (world.time - SSticker.round_start_time > timegate))
+ timegate_expired = TRUE
+
if(!job)
return
- if((job.auto_deadmin_role_flags & DEADMIN_POSITION_HEAD) && (CONFIG_GET(flag/auto_deadmin_heads) || (C.prefs?.toggles & DEADMIN_POSITION_HEAD)))
+ if((job.auto_deadmin_role_flags & DEADMIN_POSITION_HEAD) && ((CONFIG_GET(flag/auto_deadmin_heads) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_HEAD)))
return C.holder.auto_deadmin()
- else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SECURITY) && (CONFIG_GET(flag/auto_deadmin_security) || (C.prefs?.toggles & DEADMIN_POSITION_SECURITY)))
+ else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SECURITY) && ((CONFIG_GET(flag/auto_deadmin_security) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_SECURITY)))
return C.holder.auto_deadmin()
- else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SILICON) && (CONFIG_GET(flag/auto_deadmin_silicons) || (C.prefs?.toggles & DEADMIN_POSITION_SILICON))) //in the event there's ever psuedo-silicon roles added, ie synths.
+ else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SILICON) && ((CONFIG_GET(flag/auto_deadmin_silicons) && !timegate_expired) || (C.prefs?.toggles & DEADMIN_POSITION_SILICON))) //in the event there's ever psuedo-silicon roles added, ie synths.
return C.holder.auto_deadmin()
/datum/controller/subsystem/job/proc/setup_officer_positions()
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index eee48826e86..2e0f3412e70 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -843,7 +843,7 @@ structure_check() searches for nearby cultist structures required for the invoca
notify_ghosts("Manifest rune invoked in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src, header = "Manifest rune")
var/list/ghosts_on_rune = list()
for(var/mob/dead/observer/O in T)
- if(O.client && !is_banned_from(O.ckey, ROLE_CULTIST) && !QDELETED(src) && !QDELETED(O))
+ if(O.client && !is_banned_from(O.ckey, ROLE_CULTIST) && !QDELETED(src) && !(IsAdminGhost(O) && (O.client.prefs.toggles & ADMIN_IGNORE_CULT_GHOST)) && !QDELETED(O))
ghosts_on_rune += O
if(!ghosts_on_rune.len)
to_chat(user, "There are no spirits near [src]!")
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 62f42ecf1fa..18768d1135c 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -659,35 +659,40 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Hide Dead Chat: [(chat_toggles & CHAT_DEAD)?"Shown":"Hidden"]
"
dat += "Hide Radio Messages: [(chat_toggles & CHAT_RADIO)?"Shown":"Hidden"]
"
dat += "Hide Prayers: [(chat_toggles & CHAT_PRAYER)?"Shown":"Hidden"]
"
+ dat += "Ignore Being Summoned as Cult Ghost: [(toggles & ADMIN_IGNORE_CULT_GHOST)?"Don't Allow Being Summoned":"Allow Being Summoned"]
"
if(CONFIG_GET(flag/allow_admin_asaycolor))
dat += "
"
dat += "ASAY Color: Change
"
//deadmin
dat += "