diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm new file mode 100644 index 0000000000..d30a2d098f --- /dev/null +++ b/code/__DEFINES/antagonists.dm @@ -0,0 +1,3 @@ +#define ANTAG_DATUM_CULT /datum/antagonist/cult +#define ANTAG_DATUM_CLOCKCULT /datum/antagonist/clockcult +#define ANTAG_DATUM_CLOCKCULT_SILENT /datum/antagonist/clockcult/silent \ No newline at end of file diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index cdad092087..deee1111c0 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -1,87 +1,49 @@ -//The Datum, Antagonist. Handles various antag things via a datum. /datum/antagonist - var/mob/living/owner //who's our owner and accordingly an antagonist - var/some_flufftext = "yer an antag larry" - var/prevented_antag_datum_type //the type of antag datum that this datum can't coexist with; should probably be a list - var/silent_update = FALSE //if we suppress messages during on_gain, apply_innate_effects, remove_innate_effects, and on_remove + var/name = "Antagonist" -/datum/antagonist/New() - if(!prevented_antag_datum_type) - prevented_antag_datum_type = type + var/datum/mind/owner //Mind that owns this datum -/datum/antagonist/Destroy() - owner = null - return ..() + var/silent = FALSE //Silent will prevent the gain/lose texts to show -/datum/antagonist/proc/can_be_owned(mob/living/new_body) - return new_body && !new_body.has_antag_datum(prevented_antag_datum_type, TRUE) + var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum + var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with -/datum/antagonist/proc/give_to_body(mob/living/new_body) //tries to give an antag datum to a mob. cancels out if it can't be owned by the new body - if(new_body && can_be_owned(new_body)) - new_body.antag_datums += src - owner = new_body - on_gain() - . = src //return the datum if successful - else - qdel(src) - . = FALSE -/datum/antagonist/proc/on_gain() //on initial gain of antag datum, do this. should only be called once per datum - apply_innate_effects() - if(!silent_update && some_flufftext) - to_chat(owner, some_flufftext) +/datum/antagonist/New(datum/mind/new_owner) + . = ..() + typecache_datum_blacklist = typecacheof(typecache_datum_blacklist) + if(new_owner) + owner = new_owner -/datum/antagonist/proc/apply_innate_effects() //applies innate effects to the owner, may be called multiple times due to mind transferral, but should only be called once per mob - //antag huds would go here if antag huds were less completely unworkable as-is +/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body) + remove_innate_effects(old_body) + apply_innate_effects(new_body) -/datum/antagonist/proc/remove_innate_effects() //removes innate effects from the owner, may be called multiple times due to mind transferral, but should only be called once per mob - //also antag huds but see above antag huds a shit +//This handles the application of antag huds/special abilities +/datum/antagonist/proc/apply_innate_effects(mob/living/mob_override) + return -/datum/antagonist/proc/on_remove() //totally removes the antag datum from the owner; can only be called once per owner +//This handles the removal of antag huds/special abilities +/datum/antagonist/proc/remove_innate_effects(mob/living/mob_override) + return + +//Proc called when the datum is given to a mind. +/datum/antagonist/proc/on_gain() + if(owner && owner.current) + if(!silent) + greet() + apply_innate_effects() + +/datum/antagonist/proc/on_removal() remove_innate_effects() - owner.antag_datums -= src + if(owner) + owner.antag_datums -= src + if(!silent && owner.current) + farewell() qdel(src) -/datum/antagonist/proc/transfer_to_new_body(mob/living/new_body) - remove_innate_effects() - if(!islist(new_body.antag_datums)) - new_body.antag_datums = list() - new_body.antag_datums += src - owner.antag_datums -= src - owner = new_body - apply_innate_effects() +/datum/antagonist/proc/greet() + return -//mob var and helper procs/Destroy override -/mob/living - var/list/antag_datums - -/mob/living/Destroy() //TODO: merge this with the living/Destroy() in code\modules\mob\living\living.dm (currently line 29) - if(islist(antag_datums)) - for(var/i in antag_datums) - qdel(i) - antag_datums = null - return ..() - -/mob/living/proc/can_have_antag_datum(datum_type) //if we can have this specific antagonist datum; neccessary, but requires creating a new antag datum each time. - var/datum/antagonist/D = new datum_type() - . = D.can_be_owned(src) //we can't exactly cache the results, either, because conditions might change. avoid use? TODO: better proc - qdel(D) - -/mob/living/proc/gain_antag_datum(datum_type) //tries to give a mob a specific antagonist datum; returns the datum if successful. - if(!islist(antag_datums)) - antag_datums = list() - var/datum/antagonist/D = new datum_type() - . = D.give_to_body(src) - -/mob/living/proc/has_antag_datum(type, check_subtypes) //checks this mob for if it has the antagonist datum. can either check specific type or subtypes - if(!islist(antag_datums)) - return FALSE - for(var/i in antag_datums) - var/datum/antagonist/D = i - if(check_subtypes) - if(istype(D, type)) - return D //if it finds the datum, will return it so you can mess with it - else - if(D.type == type) - return D - return FALSE +/datum/antagonist/proc/farewell() + return \ No newline at end of file diff --git a/code/datums/antagonists/datum_clockcult.dm b/code/datums/antagonists/datum_clockcult.dm index 0c39b5a989..ba18e76f02 100644 --- a/code/datums/antagonists/datum_clockcult.dm +++ b/code/datums/antagonists/datum_clockcult.dm @@ -1,92 +1,57 @@ //CLOCKCULT PROOF OF CONCEPT - -/datum/antagonist/clockcultist - prevented_antag_datum_type = /datum/antagonist/clockcultist - some_flufftext = null +/datum/antagonist/clockcult var/datum/action/innate/hierophant/hierophant_network = new() -/datum/antagonist/clockcultist/silent - silent_update = TRUE +/datum/antagonist/clockcult/silent + silent = TRUE -/datum/antagonist/clockcultist/Destroy() +/datum/antagonist/clockcult/Destroy() qdel(hierophant_network) - ..() + return ..() -/datum/antagonist/clockcultist/can_be_owned(mob/living/new_body) - . = ..() - if(.) - . = is_eligible_servant(new_body) - -/datum/antagonist/clockcultist/give_to_body(mob/living/new_body) - if(iscyborg(new_body)) - var/mob/living/silicon/robot/R = new_body - if(R.deployed) - var/mob/living/silicon/ai/AI = R.mainframe - R.undeploy() - var/converted = add_servant_of_ratvar(AI, silent_update) - to_chat(AI, "Anomaly Detected. Returned to core!") //The AI needs to be in its core to properly be converted - return converted - if(!silent_update) - if(issilicon(new_body)) - to_chat(new_body, "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.") - else - to_chat(new_body, "[iscarbon(new_body) ? "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.") - . = ..() - if(!silent_update && new_body) - if(.) - new_body.visible_message("[new_body]'s eyes glow a blazing yellow!") - to_chat(new_body, "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 whim without hesitation.") - else - new_body.visible_message("[new_body] seems to resist an unseen force!") - to_chat(new_body, "And yet, you somehow push it all away.") - -/datum/antagonist/clockcultist/on_gain() - if(SSticker && SSticker.mode && owner.mind) - SSticker.mode.servants_of_ratvar += owner.mind - SSticker.mode.update_servant_icons_added(owner.mind) - if(jobban_isbanned(owner, ROLE_SERVANT_OF_RATVAR)) - INVOKE_ASYNC(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR) - if(owner.mind) - owner.mind.special_role = "Servant of Ratvar" - owner.log_message("Has been converted to the cult of Ratvar!", INDIVIDUAL_ATTACK_LOG) - if(issilicon(owner)) +/datum/antagonist/clockcult/on_gain() + if(!owner) + return + var/mob/living/current = owner.current + if(!istype(current)) + return + if(jobban_isbanned(current, ROLE_SERVANT_OF_RATVAR)) + addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR), 0) + owner.current.log_message("Has been converted to the cult of Ratvar!", INDIVIDUAL_ATTACK_LOG) + if(issilicon(current)) var/mob/living/silicon/S = owner - if(iscyborg(S) && !silent_update) - to_chat(S, "You have been desynced from your master AI.\n\ - In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.") + if(iscyborg(S) && !silent) + to_chat(S, "You have been desynced from your master AI.") + to_chat(S, "In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.") if(isAI(S)) to_chat(S, "You are able to use your cameras to listen in on conversations.") to_chat(S, "You can communicate with other servants by using the Hierophant Network action button in the upper left.") - else if(isbrain(owner) || isclockmob(owner)) - to_chat(owner, "You can communicate with other servants by using the Hierophant Network action button in the upper left.") + else if(isbrain(current) || isclockmob(current)) + to_chat(current, "You can communicate with other servants by using the Hierophant Network action button in the upper left.") ..() if(istype(SSticker.mode, /datum/game_mode/clockwork_cult)) var/datum/game_mode/clockwork_cult/C = SSticker.mode C.present_tasks(owner) //Memorize the objectives -/datum/antagonist/clockcultist/apply_innate_effects() - GLOB.all_clockwork_mobs += owner - owner.faction |= "ratvar" - owner.grant_language(/datum/language/ratvar) - owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons - if(issilicon(owner)) - var/mob/living/silicon/S = owner +/datum/antagonist/clockcult/apply_innate_effects(mob/living/mob_override) + . = ..() + var/mob/living/current = owner.current + if(istype(mob_override)) + current = mob_override + GLOB.all_clockwork_mobs += current + SSticker.mode.update_servant_icons_added(owner) + current.faction |= "ratvar" + current.grant_language(/datum/language/ratvar) + current.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons + if(issilicon(current)) + var/mob/living/silicon/S = current if(iscyborg(S)) var/mob/living/silicon/robot/R = S - if(!R.shell) - R.UnlinkSelf() + R.UnlinkSelf() R.module.rebuild_modules() else if(isAI(S)) var/mob/living/silicon/ai/A = S - A.can_be_carded = FALSE A.requires_power = POWER_REQ_CLOCKCULT - var/list/AI_frame = list(mutable_appearance('icons/mob/clockwork_mobs.dmi', "aiframe")) //make the AI's cool frame - for(var/d in GLOB.cardinal) - AI_frame += image('icons/mob/clockwork_mobs.dmi', A, "eye[rand(1, 10)]", dir = d) //the eyes are randomly fast or slow - A.add_overlay(AI_frame) if(!A.lacks_power()) A.ai_restore_power() if(A.eyeobj) @@ -106,58 +71,55 @@ hierophant_network.title = "Silicon" hierophant_network.span_for_name = "nezbere" hierophant_network.span_for_message = "brass" - else if(isbrain(owner)) - hierophant_network.Grant(owner) + else if(isbrain(current)) + hierophant_network.Grant(current) hierophant_network.title = "Vessel" hierophant_network.span_for_name = "nezbere" hierophant_network.span_for_message = "alloy" - else if(isclockmob(owner)) - hierophant_network.Grant(owner) + else if(isclockmob(current)) + hierophant_network.Grant(current) hierophant_network.title = "Construct" hierophant_network.span_for_name = "nezbere" hierophant_network.span_for_message = "brass" - owner.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump) + current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump) if(!GLOB.clockwork_gateway_activated) - owner.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs) - ..() + current.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs) + update_slab_info() -/datum/antagonist/clockcultist/remove_innate_effects() - GLOB.all_clockwork_mobs -= owner - owner.faction -= "ratvar" - owner.remove_language(/datum/language/ratvar) - owner.clear_alert("clockinfo") - owner.clear_alert("scripturereq") - for(var/datum/action/innate/function_call/F in owner.actions) //Removes any bound Ratvarian spears + +/datum/antagonist/clockcult/remove_innate_effects(mob/living/mob_override) + var/mob/living/current = owner.current + if(istype(mob_override)) + current = mob_override + GLOB.all_clockwork_mobs -= current + current.faction -= "ratvar" + current.remove_language(/datum/language/ratvar) + current.clear_alert("clockinfo") + current.clear_alert("scripturereq") + for(var/datum/action/innate/function_call/F in owner.current.actions) //Removes any bound Ratvarian spears qdel(F) - if(issilicon(owner)) - var/mob/living/silicon/S = owner + if(issilicon(current)) + var/mob/living/silicon/S = current if(isAI(S)) var/mob/living/silicon/ai/A = S - A.can_be_carded = initial(A.can_be_carded) A.requires_power = initial(A.requires_power) - A.cut_overlays() S.make_laws() S.update_icons() S.show_laws() - var/mob/living/temp_owner = owner + var/mob/living/temp_owner = current ..() if(iscyborg(temp_owner)) var/mob/living/silicon/robot/R = temp_owner R.module.rebuild_modules() if(temp_owner) temp_owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons + update_slab_info() -/datum/antagonist/clockcultist/on_remove() - if(!silent_update) - owner.visible_message("[owner] seems to have remembered their true allegiance!", \ +/datum/antagonist/clockcult/on_removal() + . = ..() + if(!silent) + owner.current.visible_message("[owner] seems to have remembered their true allegiance!", \ "A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.") - if(SSticker && SSticker.mode && owner.mind) - SSticker.mode.servants_of_ratvar -= owner.mind - SSticker.mode.update_servant_icons_removed(owner.mind) - if(owner.mind) - owner.mind.wipe_memory() - owner.mind.special_role = null - owner.log_message("Has renounced the cult of Ratvar!", INDIVIDUAL_ATTACK_LOG) - if(iscyborg(owner)) - to_chat(owner, "Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.") - ..() + owner.current.log_message("Has renounced the cult of Ratvar!", INDIVIDUAL_ATTACK_LOG) + if(iscyborg(owner.current)) + to_chat(owner.current, "Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.") \ No newline at end of file diff --git a/code/datums/antagonists/datum_cult.dm b/code/datums/antagonists/datum_cult.dm index 7d6806bab6..69c9849782 100644 --- a/code/datums/antagonists/datum_cult.dm +++ b/code/datums/antagonists/datum_cult.dm @@ -1,50 +1,33 @@ -/datum/antagonist/cultist - prevented_antag_datum_type = /datum/antagonist/cultist - some_flufftext = null - var/datum/action/innate/cultcomm/communion = new() +/datum/antagonist/cult + var/datum/action/innate/cultcomm/communion = new -/datum/antagonist/cultist/Destroy() +/datum/antagonist/cult/Destroy() qdel(communion) return ..() -/datum/antagonist/cultist/can_be_owned(mob/living/new_body) +/datum/antagonist/cult/on_gain() . = ..() - if(.) - . = is_convertable_to_cult(new_body) + if(!owner) + return + if(jobban_isbanned(owner.current, ROLE_CULTIST)) + addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_CULTIST, ROLE_CULTIST), 0) + owner.current.log_message("Has been converted to the cult of Nar'Sie!", INDIVIDUAL_ATTACK_LOG) -/datum/antagonist/cultist/on_gain() - if(SSticker && SSticker.mode && owner.mind) - SSticker.mode.cult += owner.mind - SSticker.mode.update_cult_icons_added(owner.mind) - if(istype(SSticker.mode, /datum/game_mode/cult)) - var/datum/game_mode/cult/C = SSticker.mode - C.memorize_cult_objectives(owner.mind) - if(jobban_isbanned(owner, ROLE_CULTIST)) - INVOKE_ASYNC(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_CULTIST, ROLE_CULTIST) - if(owner.mind) - owner.mind.special_role = "Cultist" - owner.log_message("Has been converted to the cult of Nar'Sie!", INDIVIDUAL_ATTACK_LOG) - ..() - -/datum/antagonist/cultist/apply_innate_effects() - owner.faction |= "cult" - owner.verbs += /mob/living/proc/cult_help +/datum/antagonist/cult/apply_innate_effects() + . = ..() + owner.current.faction |= "cult" + owner.current.verbs += /mob/living/proc/cult_help communion.Grant(owner) - ..() -/datum/antagonist/cultist/remove_innate_effects() - owner.faction -= "cult" - owner.verbs -= /mob/living/proc/cult_help - ..() +/datum/antagonist/cult/remove_innate_effects() + . = ..() + owner.current.faction -= "cult" + owner.current.verbs -= /mob/living/proc/cult_help -/datum/antagonist/cultist/on_remove() - if(owner.mind) - owner.mind.wipe_memory() - if(SSticker && SSticker.mode) - SSticker.mode.cult -= owner.mind - SSticker.mode.update_cult_icons_removed(owner.mind) + +/datum/antagonist/cult/on_removal() + . = ..() to_chat(owner, "An unfamiliar white light flashes through your mind, cleansing the taint of the Dark One and all your memories as its servant.") - owner.log_message("Has renounced the cult of Nar'Sie!", INDIVIDUAL_ATTACK_LOG) - if(!silent_update) - owner.visible_message("[owner] looks like [owner.p_they()] just reverted to their old faith!") - ..() + owner.current.log_message("Has renounced the cult of Nar'Sie!", INDIVIDUAL_ATTACK_LOG) + if(!silent) + owner.current.visible_message("[owner] looks like [owner.current.p_they()] just reverted to their old faith!") \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 5a6c34bcc4..5a1ba5b8c5 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -54,6 +54,7 @@ var/linglink var/miming = 0 // Mime's vow of silence + var/list/antag_datums = list() var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD var/datum/gang/gang_datum //Which gang this mind belongs to, if any @@ -86,13 +87,13 @@ if(new_character.mind) //disassociate any mind currently in our new body's mind variable new_character.mind.current = null - if(istype(current) && islist(current.antag_datums)) //wow apparently current isn't always living good fucking job SOMEONE - for(var/i in current.antag_datums) - var/datum/antagonist/D = i - D.transfer_to_new_body(new_character) var/datum/atom_hud/antag/hud_to_transfer = antag_hud//we need this because leave_hud() will clear this list + var/mob/living/old_current = current current = new_character //associate ourself with our new body new_character.mind = src //and associate our new body with ourself + for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body + var/datum/antagonist/A = a + A.on_body_transfer(old_current, current) if(iscarbon(new_character)) var/mob/living/carbon/C = new_character C.last_mind = src @@ -108,6 +109,51 @@ /datum/mind/proc/wipe_memory() memory = null +// Datum antag mind procs +/datum/mind/proc/add_antag_datum(datum_type, on_gain = TRUE) + if(!datum_type) + return + if(!can_hold_antag_datum(datum_type)) + return + var/datum/antagonist/A = new datum_type(src) + antag_datums += A + if(on_gain) + A.on_gain() + +/datum/mind/proc/remove_antag_datum(datum_type) + if(!datum_type) + return + var/datum/antagonist/A = has_antag_datum(datum_type) + if(A) + A.on_removal() + +/datum/mind/proc/remove_all_antag_datums() //For the Lazy amongst us. + for(var/a in antag_datums) + var/datum/antagonist/A = a + A.on_removal() + +/datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE) + if(!datum_type) + return + . = FALSE + for(var/a in antag_datums) + var/datum/antagonist/A = a + if(check_subtypes && istype(A, datum_type)) + return A + else if(A.type == datum_type) + return A + +/datum/mind/proc/can_hold_antag_datum(datum_type) + if(!datum_type) + return + . = TRUE + if(has_antag_datum(datum_type)) + return FALSE + for(var/i in antag_datums) + var/datum/antagonist/A = i + if(is_type_in_typecache(A, A.typecache_datum_blacklist)) + return FALSE + /* Removes antag type's references from a mind. diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 670e08e7a2..65e6b4ca6b 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -46,7 +46,7 @@ Credit where due: /////////// /proc/is_servant_of_ratvar(mob/living/M) - return istype(M) && M.has_antag_datum(/datum/antagonist/clockcultist, TRUE) + return istype(M) && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_CLOCKCULT) /proc/is_eligible_servant(mob/living/M) if(!istype(M)) @@ -65,17 +65,21 @@ Credit where due: return FALSE /proc/add_servant_of_ratvar(mob/living/L, silent = FALSE) - var/update_type = /datum/antagonist/clockcultist + if(!L || !L.mind) + return + var/update_type = ANTAG_DATUM_CLOCKCULT if(silent) - update_type = /datum/antagonist/clockcultist/silent - . = L.gain_antag_datum(update_type) + update_type = ANTAG_DATUM_CLOCKCULT_SILENT + . = L.mind.add_antag_datum(update_type) /proc/remove_servant_of_ratvar(mob/living/L, silent = FALSE) - var/datum/antagonist/clockcultist/clock_datum = L.has_antag_datum(/datum/antagonist/clockcultist, TRUE) + if(!L || !L.mind) + return + var/datum/antagonist/clockcult/clock_datum = L.mind.has_antag_datum(/datum/antagonist/clockcult) if(!clock_datum) return FALSE - clock_datum.silent_update = silent - clock_datum.on_remove() + clock_datum.silent = silent + clock_datum.on_removal() return TRUE /////////////// diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 65dcb863eb..6d188ae8e9 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -5,7 +5,7 @@ var/list/cult_objectives = list() /proc/iscultist(mob/living/M) - return istype(M) && M.has_antag_datum(/datum/antagonist/cultist, TRUE) + return istype(M) && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_CULT) /proc/is_sacrifice_target(datum/mind/mind) if(SSticker.mode.name == "cult") @@ -158,18 +158,18 @@ /datum/game_mode/proc/add_cultist(datum/mind/cult_mind, stun) //BASE if (!istype(cult_mind)) return 0 - if(cult_mind.current.gain_antag_datum(/datum/antagonist/cultist)) + if(cult_mind.add_antag_datum(ANTAG_DATUM_CULT)) if(stun) cult_mind.current.Paralyse(5) return 1 /datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1, stun) if(cult_mind.current) - var/datum/antagonist/cultist/cult_datum = cult_mind.current.has_antag_datum(/datum/antagonist/cultist, TRUE) + var/datum/antagonist/cult/cult_datum = cult_mind.has_antag_datum(ANTAG_DATUM_CULT) if(!cult_datum) return FALSE - cult_datum.silent_update = show_message - cult_datum.on_remove() + cult_datum.silent = show_message + cult_datum.on_removal() if(stun) cult_mind.current.Paralyse(5) return TRUE diff --git a/tgstation.dme b/tgstation.dme index 3b53fa152d..8f80e4e005 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -24,6 +24,7 @@ #include "code\__DATASTRUCTURES\priority_queue.dm" #include "code\__DATASTRUCTURES\stacks.dm" #include "code\__DEFINES\admin.dm" +#include "code\__DEFINES\antagonists.dm" #include "code\__DEFINES\atmospherics.dm" #include "code\__DEFINES\atom_hud.dm" #include "code\__DEFINES\callbacks.dm"