|
|
|
|
@@ -36,11 +36,29 @@ This file's folder contains:
|
|
|
|
|
// PROCS //
|
|
|
|
|
///////////
|
|
|
|
|
|
|
|
|
|
/proc/is_servant_of_ratvar(mob/M)
|
|
|
|
|
/proc/is_servant_of_ratvar(mob/living/M)
|
|
|
|
|
return M && istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.servants_of_ratvar)
|
|
|
|
|
|
|
|
|
|
/proc/is_eligible_servant(mob/M)
|
|
|
|
|
return M && istype(M) && M.mind && !iscultist(M) && !isconstruct(M) && !isloyal(M)
|
|
|
|
|
/proc/is_eligible_servant(mob/living/M)
|
|
|
|
|
if(!istype(M))
|
|
|
|
|
return 0
|
|
|
|
|
if(!M.mind)
|
|
|
|
|
return 0
|
|
|
|
|
if(ishuman(M) && (M.mind.assigned_role in list("Captain", "Chaplain")))
|
|
|
|
|
return 0
|
|
|
|
|
if(iscultist(M))
|
|
|
|
|
return 0
|
|
|
|
|
if(isconstruct(M))
|
|
|
|
|
return 0
|
|
|
|
|
if(isguardian(M))
|
|
|
|
|
var/mob/living/simple_animal/hostile/guardian/G = M
|
|
|
|
|
if(!is_servant_of_ratvar(G.summoner))
|
|
|
|
|
return 0 //can't convert it unless the owner is converted
|
|
|
|
|
if(isloyal(M))
|
|
|
|
|
return 0
|
|
|
|
|
if(M.mind.enslaved_to)
|
|
|
|
|
return 0
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/proc/add_servant_of_ratvar(mob/M, silent = FALSE)
|
|
|
|
|
if(is_servant_of_ratvar(M) || !ticker || !ticker.mode)
|
|
|
|
|
@@ -49,23 +67,24 @@ This file's folder contains:
|
|
|
|
|
if(!silent)
|
|
|
|
|
M << "<span class='heavy_brass'>Your mind is racing! Your body feels incredibly light! Your world glows a brilliant yellow! All at once it comes to you. Ratvar, the Clockwork \
|
|
|
|
|
Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>"
|
|
|
|
|
if(!is_eligible_servant(M))
|
|
|
|
|
M.visible_message("<span class='warning'>[M] seems to resist an unseen force!</span>", "<span class='warning'><b>And yet, you somehow push it all away.</b></span>")
|
|
|
|
|
return 0
|
|
|
|
|
else if(issilicon(M))
|
|
|
|
|
if(!silent)
|
|
|
|
|
M << "<span class='heavy_brass'>You are unable to compute this truth. Your vision glows a brilliant yellow, and all at once it comes to you. Ratvar, the Clockwork Justiciar, lies in \
|
|
|
|
|
exile, derelict and forgotten in an unseen realm.</span>"
|
|
|
|
|
if(!is_eligible_servant(M))
|
|
|
|
|
M.visible_message("<span class='warning'>[M] whirs as it resists an outside influence!</span>", \
|
|
|
|
|
"<span class='warning'><b>Corrupt data purged. Resetting cortex chip to factory defaults... complete.</b></span>")
|
|
|
|
|
return 0
|
|
|
|
|
else
|
|
|
|
|
if(!silent)
|
|
|
|
|
M << "<span class='heavy_brass'>Your world glows a brilliant yellow! All at once it comes to you. Ratvar, the Clockwork Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>"
|
|
|
|
|
if(!is_eligible_servant(M))
|
|
|
|
|
M.visible_message("<span class='warning'>[M] seems to resist an unseen force!</span>", "<span class='warning'><b>And yet, you somehow push it all away.</b></span>")
|
|
|
|
|
if(!M.stat)
|
|
|
|
|
M.visible_message("<span class='warning'>[M] whirs as it resists an outside influence!</span>")
|
|
|
|
|
M << "<span class='warning'><b>Corrupt data purged. Resetting cortex chip to factory defaults... complete.</b></span>" //silicons have a custom fail message
|
|
|
|
|
return 0
|
|
|
|
|
else if(!silent)
|
|
|
|
|
M << "<span class='heavy_brass'>Your world glows a brilliant yellow! All at once it comes to you. Ratvar, the Clockwork Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>"
|
|
|
|
|
|
|
|
|
|
if(!is_eligible_servant(M))
|
|
|
|
|
if(!silent && !M.stat)
|
|
|
|
|
M.visible_message("<span class='warning'>[M] seems to resist an unseen force!</span>")
|
|
|
|
|
M << "<span class='warning'><b>And yet, you somehow push it all away.</b></span>"
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
if(!silent)
|
|
|
|
|
M.visible_message("<span class='heavy_brass'>[M]'s eyes glow a blazing yellow!</span>", \
|
|
|
|
|
"<span class='heavy_brass'>Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork Justiciar above all else. Perform his every \
|
|
|
|
|
@@ -82,6 +101,7 @@ This file's folder contains:
|
|
|
|
|
R.emagged = 1
|
|
|
|
|
R << "<span class='warning'><b>You have been desynced from your master AI. In addition, your onboard camera is no longer active and your safeties have been disabled.</b></span>"
|
|
|
|
|
S.laws = new/datum/ai_laws/ratvar
|
|
|
|
|
S.laws.associate(S)
|
|
|
|
|
S.update_icons()
|
|
|
|
|
S.show_laws()
|
|
|
|
|
if(istype(ticker.mode, /datum/game_mode/clockwork_cult))
|
|
|
|
|
@@ -89,11 +109,12 @@ This file's folder contains:
|
|
|
|
|
C.present_tasks(M) //Memorize the objectives
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/proc/remove_servant_of_ratvar(mob/M)
|
|
|
|
|
/proc/remove_servant_of_ratvar(mob/living/M, silent = FALSE)
|
|
|
|
|
if(!is_servant_of_ratvar(M)) //In this way, is_servant_of_ratvar() checks the existence of ticker and minds
|
|
|
|
|
return 0
|
|
|
|
|
M.visible_message("<span class='big'>[M] seems to have remembered their true allegiance!</span>", \
|
|
|
|
|
"<span class='userdanger'>A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.</span>")
|
|
|
|
|
if(!silent)
|
|
|
|
|
M.visible_message("<span class='big'>[M] seems to have remembered their true allegiance!</span>", \
|
|
|
|
|
"<span class='userdanger'>A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.</span>")
|
|
|
|
|
ticker.mode.servants_of_ratvar -= M.mind
|
|
|
|
|
ticker.mode.update_servant_icons_removed(M.mind)
|
|
|
|
|
all_clockwork_mobs -= M
|
|
|
|
|
@@ -106,7 +127,7 @@ This file's folder contains:
|
|
|
|
|
var/mob/living/silicon/robot/R = S
|
|
|
|
|
R.emagged = initial(R.emagged)
|
|
|
|
|
R << "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>"
|
|
|
|
|
S.laws = initial(S.laws)
|
|
|
|
|
S.make_laws()
|
|
|
|
|
S.update_icons()
|
|
|
|
|
S.show_laws()
|
|
|
|
|
return 1
|
|
|
|
|
@@ -143,6 +164,8 @@ This file's folder contains:
|
|
|
|
|
recommended_enemies = 4
|
|
|
|
|
enemy_minimum_age = 14
|
|
|
|
|
protected_jobs = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain") //Silicons can eventually be converted
|
|
|
|
|
restricted_jobs = list("Chaplain", "Captain")
|
|
|
|
|
var/servants_to_serve = list()
|
|
|
|
|
|
|
|
|
|
/datum/game_mode/clockwork_cult/announce()
|
|
|
|
|
world << "<b>The game mode is: Clockwork Cult!</b>"
|
|
|
|
|
@@ -158,7 +181,7 @@ This file's folder contains:
|
|
|
|
|
var/starter_servants = max(1, round(num_players() / 10)) //Guaranteed one cultist - otherwise, about one cultist for every ten players
|
|
|
|
|
while(starter_servants)
|
|
|
|
|
var/datum/mind/servant = pick(antag_candidates)
|
|
|
|
|
servants_of_ratvar += servant
|
|
|
|
|
servants_to_serve += servant
|
|
|
|
|
antag_candidates -= servant
|
|
|
|
|
modePlayer += servant
|
|
|
|
|
servant.special_role = "Servant of Ratvar"
|
|
|
|
|
@@ -169,13 +192,13 @@ This file's folder contains:
|
|
|
|
|
|
|
|
|
|
/datum/game_mode/clockwork_cult/post_setup()
|
|
|
|
|
forge_clock_objectives()
|
|
|
|
|
for(var/S in servants_of_ratvar)
|
|
|
|
|
for(var/S in servants_to_serve)
|
|
|
|
|
var/datum/mind/servant = S
|
|
|
|
|
log_game("[servant.key] was made an initial servant of Ratvar")
|
|
|
|
|
var/mob/living/L = servant.current
|
|
|
|
|
greet_servant(L)
|
|
|
|
|
equip_servant(L)
|
|
|
|
|
present_tasks(L)
|
|
|
|
|
add_servant_of_ratvar(L)
|
|
|
|
|
..()
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
|