Various fixes

Changes:

Cult rise/ascension works properly now,
Cult constructs now show as antagonists in admin logs,
Manifested cult ghosts are now properly deconverted before being dusted,
Admin culting someone during a non-cult round now works properly, and sets up cult objectives and thresholds (Hopefully, anyway)

Also removed a couple of unused procs
This commit is contained in:
SabreML
2020-11-08 17:38:00 +00:00
parent e33b33cece
commit c6fb656d5a
5 changed files with 16 additions and 25 deletions
+3
View File
@@ -841,6 +841,9 @@
message_admins("[key_name_admin(usr)] has de-culted [key_name_admin(current)]")
if("cultist")
if(!(src in SSticker.mode.cult))
if(!SSticker.mode.ascend_percent) // If the rise/ascend thresholds haven't been set (non-cult rounds)
SSticker.mode.cult_objs.setup()
SSticker.mode.cult_threshold_check()
SSticker.mode.add_cultist(src)
special_role = SPECIAL_ROLE_CULTIST
to_chat(current, CULT_GREETING)
+5 -17
View File
@@ -95,8 +95,8 @@ GLOBAL_LIST_EMPTY(all_cults)
add_cult_actions(cult_mind)
update_cult_icons_added(cult_mind)
cult_objs.study(cult_mind.current)
threshold_check()
addtimer(CALLBACK(src, .proc/threshold_check), 2 MINUTES) // Check again in 2 minutes for latejoiners
cult_threshold_check()
addtimer(CALLBACK(src, .proc/cult_threshold_check), 2 MINUTES) // Check again in 2 minutes for latejoiners
..()
/**
@@ -108,7 +108,7 @@ GLOBAL_LIST_EMPTY(all_cults)
* Below 100 players, [CULT_RISEN_LOW] and [CULT_ASCENDANT_LOW] are used.
* Above 100 players, [CULT_RISEN_HIGH] and [CULT_ASCENDANT_HIGH] are used.
*/
/datum/game_mode/cult/proc/threshold_check()
/datum/game_mode/proc/cult_threshold_check()
var/players = length(GLOB.player_list)
var/cultists = get_cultists() // Don't count the starting cultists towards the number of needed conversions
if(players >= CULT_POPULATION_THRESHOLD)
@@ -212,7 +212,7 @@ GLOBAL_LIST_EMPTY(all_cults)
if((cult_players >= rise_number) && !cult_risen)
cult_risen = TRUE
for(var/datum/mind/M in cult)
if(!M.current || !ishuman(M))
if(!M.current || !ishuman(M.current))
continue
SEND_SOUND(M.current, 'sound/hallucinations/i_see_you2.ogg')
to_chat(M.current, "<span class='cultlarge'>The veil weakens as your cult grows, your eyes begin to glow...</span>")
@@ -221,7 +221,7 @@ GLOBAL_LIST_EMPTY(all_cults)
else if(cult_players >= ascend_number)
cult_ascendant = TRUE
for(var/datum/mind/M in cult)
if(!M.current || !ishuman(M))
if(!M.current || !ishuman(M.current))
continue
SEND_SOUND(M.current, 'sound/hallucinations/im_here1.ogg')
to_chat(M.current, "<span class='cultlarge'>Your cult is ascendant and the red harvest approaches - you cannot hide your true nature for much longer!")
@@ -291,18 +291,6 @@ GLOBAL_LIST_EMPTY(all_cults)
dagger.Grant(cult_mind.current)
cult_mind.current.update_action_buttons(TRUE)
/datum/game_mode/cult/proc/get_unconvertables()
var/list/ucs = list()
for(var/mob/living/carbon/human/player in GLOB.player_list)
if(player.mind && player.mind.offstation_role)
continue
if(!is_convertable_to_cult(player.mind))
ucs += player.mind
return ucs
/atom/proc/cult_log(message)
investigate_log(message, "cult")
/datum/game_mode/cult/declare_completion()
if(cult_objs.cult_status == NARSIE_HAS_RISEN)
+1 -1
View File
@@ -910,7 +910,7 @@ structure_check() searches for nearby cultist structures required for the invoca
"<span class='cultlarge'>Your link to the world fades. Your form breaks apart.</span>")
for(var/obj/item/I in new_human.get_all_slots())
new_human.unEquip(I)
SSticker.mode.remove_cultist(new_human, FALSE)
SSticker.mode.remove_cultist(new_human.mind, FALSE)
new_human.dust()
/obj/effect/rune/manifest/proc/ghostify(mob/living/user, turf/T)
+2 -2
View File
@@ -455,8 +455,8 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
SSticker.mode.add_cult_actions(H.mind) // And all the actions
if(SSticker.mode.cult_risen)
SSticker.mode.rise(H)
if(SSticker.mode.cult_ascendant)
SSticker.mode.ascend(H)
if(SSticker.mode.cult_ascendant)
SSticker.mode.ascend(H)
if(H.mind.vampire)
H.mind.vampire.update_owner(H)
if((H.mind in SSticker.mode.vampire_thralls) || (H.mind in SSticker.mode.vampire_enthralled))
+5 -5
View File
@@ -47,11 +47,11 @@
return istype(M) && M.player_logged && M.stat != DEAD
/proc/isAntag(A)
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/C = A
if(C.mind && C.mind.special_role)
return 1
return 0
if(isliving(A))
var/mob/living/L = A
if(L.mind?.special_role)
return TRUE
return FALSE
/proc/isNonCrewAntag(A)
if(!isAntag(A))