diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm
index 0db83ac6adb..2a4cfb7fb1b 100644
--- a/code/_globalvars/configuration.dm
+++ b/code/_globalvars/configuration.dm
@@ -48,5 +48,6 @@ var/list/be_special_flags = list(
"Monkey" = BE_MONKEY,
"Gang" = BE_GANG,
"Abductor" = BE_ABDUCTOR,
- "Revenant" = BE_REVENANT
+ "Revenant" = BE_REVENANT,
+ "Shadowling" = BE_SHADOWLING
)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 7f941c2b080..ff3a5a9ebc3 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -113,6 +113,13 @@
else
message_admins("[key_name_admin(usr)] tried to create a revenant. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create a revenant.")
+ if("16")
+ if(src.makeShadowling())
+ message_admins("[key_name(usr)] created a shadowling.")
+ log_admin("[key_name(usr)] created a shadowling.")
+ else
+ message_admins("[key_name_admin(usr)] tried to create a shadowling. Unfortunately, there were no candidates available.")
+ log_admin("[key_name(usr)] failed to create a shadowling.")
else if(href_list["forceevent"])
if(!check_rights(R_FUN)) return
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 32b0121f7d2..4ea28b8d491 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -18,6 +18,7 @@ client/proc/one_click_antag()
Make Malf AI
Make Blob
Make Gangsters
+ Make Shadowling
Make Wizard (Requires Ghosts)
Make Nuke Team (Requires Ghosts)
Make Centcom Response Team (Requires Ghosts)
@@ -621,6 +622,36 @@ client/proc/one_click_antag()
else
return
+/datum/admins/proc/makeShadowling()
+ var/datum/game_mode/shadowling/temp = new
+ if(config.protect_roles_from_antagonist)
+ temp.restricted_jobs += temp.protected_jobs
+ if(config.protect_assistant_from_antagonist)
+ temp.restricted_jobs += "Assistant"
+ var/list/mob/living/carbon/human/candidates = list()
+ var/mob/living/carbon/human/H = null
+ for(var/mob/living/carbon/human/applicant in player_list)
+ if(applicant.client.prefs.be_special & BE_SHADOWLING)
+ if(!applicant.stat)
+ if(applicant.mind)
+ if(!applicant.mind.special_role)
+ if(temp.age_check(applicant.client))
+ if(!(applicant.job in temp.restricted_jobs))
+ if(!(is_shadow_or_thrall(applicant)))
+ candidates += applicant
+
+ if(candidates.len)
+ H = pick(candidates)
+ ticker.mode.shadows += H.mind
+ H.mind.special_role = "shadowling"
+ H << "Something stirs in the space between worlds. A red light floods your mind, and suddenly you understand. Your human disguise has served you well, but it \
+ is time you cast it away. You are a shadowling, and you are to ascend at all costs."
+ ticker.mode.finalize_shadowling(H.mind)
+ message_admins("[H] has been made into a shadowling.")
+ candidates.Remove(H)
+ return 1
+ return 0
+
/datum/admins/proc/getCandidates(var/Question, var/jobbanType, var/datum/game_mode/gametypeCheck)
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time