diff --git a/code/datums/actions/items/cult_dagger.dm b/code/datums/actions/items/cult_dagger.dm
index 986f70677381..107f075ed608 100644
--- a/code/datums/actions/items/cult_dagger.dm
+++ b/code/datums/actions/items/cult_dagger.dm
@@ -9,10 +9,11 @@
default_button_position = "6:157,4:-2"
-/datum/action/item_action/cult_dagger/Grant(mob/M)
- if(iscultist(M))
- return ..()
- Remove(owner)
+/datum/action/item_action/cult_dagger/Grant(mob/grant_to)
+ if(!iscultist(grant_to))
+ return
+
+ return ..()
/datum/action/item_action/cult_dagger/Trigger(trigger_flags)
for(var/obj/item/held_item as anything in owner.held_items) // In case we were already holding a dagger
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index 09e94361ff24..0178bbce4697 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -104,7 +104,10 @@
return ..()
/datum/game_mode/cult/check_finished(force_ending)
- if (..())
+ if(!SSticker.setup_done || !gamemode_ready)
+ return FALSE
+ . = ..()
+ if (.)
return TRUE
return !main_cult.check_sacrifice_status() //we should remove this any time soon
diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm
index 85696b0e1b67..8d7aaeba7c33 100644
--- a/code/modules/admin/antag_panel.dm
+++ b/code/modules/admin/antag_panel.dm
@@ -34,14 +34,15 @@ GLOBAL_VAR(antag_prototypes)
var/command_part = commands.Join(" | ")
var/data_part = antag_panel_data()
var/objective_part = antag_panel_objectives()
+ var/team_objective_part = antag_panel_team_objectives()
var/memory_part = antag_panel_memory()
- var/list/parts = listtrim(list(command_part,data_part,objective_part,memory_part))
+ var/list/parts = listtrim(list(command_part, data_part, objective_part, team_objective_part, memory_part))
return parts.Join("
")
/datum/antagonist/proc/antag_panel_objectives()
- var/result = "Objectives:
"
+ var/result = "Personal Objectives:
"
if (objectives.len == 0)
result += "EMPTY
"
else
@@ -53,6 +54,20 @@ GLOBAL_VAR(antag_prototypes)
result += "Announce objectives
"
return result
+/datum/antagonist/proc/antag_panel_team_objectives()
+ var/datum/team/antag_team = get_team()
+ if(!antag_team)
+ return
+ var/result = "Team Objectives:
"
+ if (antag_team.objectives.len == 0)
+ result += "EMPTY
"
+ else
+ var/obj_count = 1
+ for(var/datum/objective/objective in antag_team.objectives)
+ result += "[obj_count]: [objective.explanation_text][objective.check_completion() ? " (COMPLETED)" : ""] Edit Delete [objective.completed ? "Mark as incomplete" : "Mark as complete"]
"
+ obj_count++
+ return result
+
/datum/antagonist/proc/antag_panel_memory()
var/out = "Memory:
"
out += task_memory
diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm
index 12b11474abec..001669ee5d26 100644
--- a/code/modules/antagonists/_common/antag_datum.dm
+++ b/code/modules/antagonists/_common/antag_datum.dm
@@ -203,7 +203,7 @@ GLOBAL_LIST_EMPTY(antagonists)
//Returns the team antagonist belongs to if any.
/datum/antagonist/proc/get_team()
- return
+ return null
//Individual roundend report
/datum/antagonist/proc/roundend_report()
@@ -401,8 +401,9 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/get_objectives()
var/objective_count = 1
var/list/objective_data = list()
+ var/datum/team/antag_team = get_team()
//all obj
- for(var/datum/objective/objective in objectives)
+ for(var/datum/objective/objective in objectives + antag_team?.objectives)
objective_data += list(list(
"count" = objective_count,
"name" = objective.objective_name,
diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm
index 1af357fb8fe7..4edbb2f306b4 100644
--- a/code/modules/antagonists/abductor/abductor.dm
+++ b/code/modules/antagonists/abductor/abductor.dm
@@ -64,7 +64,6 @@
/datum/antagonist/abductor/on_gain()
owner.special_role = "[name] [sub_role]"
owner.assigned_role = "[name] [sub_role]"
- objectives += team.objectives
finalize_abductor()
ADD_TRAIT(owner.current, TRAIT_ABDUCTOR_TRAINING, ABDUCTOR_ANTAGONIST) // Yogs -- Fixes abductors having their traits associated with their mind instead of their mob
return ..()
diff --git a/code/modules/antagonists/ashwalker/ashwalker.dm b/code/modules/antagonists/ashwalker/ashwalker.dm
index 6073694de410..bfb6b4e1246f 100644
--- a/code/modules/antagonists/ashwalker/ashwalker.dm
+++ b/code/modules/antagonists/ashwalker/ashwalker.dm
@@ -14,7 +14,6 @@
/datum/antagonist/ashwalker/create_team(datum/team/team)
if(team)
ashie_team = team
- objectives |= ashie_team.objectives
else
ashie_team = new
diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm
index 5547a26bfbc3..53d34e0adbea 100644
--- a/code/modules/antagonists/brother/brother.dm
+++ b/code/modules/antagonists/brother/brother.dm
@@ -20,7 +20,6 @@
/datum/antagonist/brother/on_gain()
SSticker.mode.brothers += owner
- objectives += team.objectives
owner.special_role = special_role
if(owner.current)
give_pinpointer()
diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm
index dcd539145557..03e17fee9c51 100644
--- a/code/modules/antagonists/cult/cult.dm
+++ b/code/modules/antagonists/cult/cult.dm
@@ -40,9 +40,6 @@
stack_trace("Wrong team type passed to [type] initialization.")
cult_team = new_team
-/datum/antagonist/cult/proc/add_objectives()
- objectives |= cult_team.objectives
-
/datum/antagonist/cult/Destroy()
QDEL_NULL(communion)
QDEL_NULL(vote)
@@ -70,9 +67,7 @@
owner.announce_objectives()
/datum/antagonist/cult/on_gain()
-// add_objectives() figure it out sometime later (remove cult the gamemode in favor of dynamic ruleset)
. = ..()
- add_objectives()
var/mob/living/current = owner.current
if(ishuman(current))
var/mob/living/carbon/human/H = current
@@ -481,12 +476,6 @@
var/sacced = FALSE
var/sac_image
-/datum/objective/sacrifice/is_valid_target(possible_target)
- . = ..()
- var/datum/mind/M = possible_target
- if(istype(M) && isipc(M.current))
- return FALSE
-
/// Unregister signals from the old target so it doesn't cause issues when sacrificed of when a new target is found.
/datum/objective/sacrifice/proc/clear_sacrifice()
if(!target)
@@ -503,13 +492,29 @@
var/datum/team/cult/cult = team
var/list/target_candidates = list()
for(var/mob/living/carbon/human/player in GLOB.player_list)
- if(player.mind && !player.mind.has_antag_datum(/datum/antagonist/cult) && !is_convertable_to_cult(player) && player.stat != DEAD)
- target_candidates += player.mind
+ if(!player.mind)
+ continue
+ if(player.mind.has_antag_datum(/datum/antagonist/cult))
+ continue
+ if(is_convertable_to_cult(player))
+ continue
+ if(isipc(player))
+ continue
+ if(player.stat == DEAD)
+ continue
+ target_candidates += player.mind
if(target_candidates.len == 0)
message_admins("Cult Sacrifice: Could not find unconvertible target, checking for convertible target.")
for(var/mob/living/carbon/human/player in GLOB.player_list)
- if(player.mind && !player.mind.has_antag_datum(/datum/antagonist/cult) && player.stat != DEAD)
- target_candidates += player.mind
+ if(!player.mind)
+ continue
+ if(player.mind.has_antag_datum(/datum/antagonist/cult))
+ continue
+ if(isipc(player))
+ continue
+ if(player.stat == DEAD)
+ continue
+ target_candidates += player.mind
listclearnulls(target_candidates)
if(LAZYLEN(target_candidates))
target = pick(target_candidates)
@@ -581,7 +586,7 @@
update_explanation_text()
/datum/objective/eldergod/update_explanation_text()
- explanation_text = "Summon Nar'sie by invoking the rune 'Summon Nar'sie'. The summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin."
+ explanation_text = "Summon Nar'sie by invoking the rune 'Summon Nar'sie'. The summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin."
/datum/objective/eldergod/check_completion()
if(killed)
diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm
index c1a3754354f5..f5892b008e6e 100644
--- a/code/modules/antagonists/ert/ert.dm
+++ b/code/modules/antagonists/ert/ert.dm
@@ -62,7 +62,6 @@
/datum/antagonist/ert/on_gain()
update_name()
- forge_objectives()
equipERT()
. = ..()
@@ -253,10 +252,6 @@
if(istype(new_team))
ert_team = new_team
-/datum/antagonist/ert/proc/forge_objectives()
- if(ert_team)
- objectives |= ert_team.objectives
-
/datum/antagonist/ert/proc/equipERT()
var/mob/living/carbon/human/H = owner.current
if(!istype(H))
diff --git a/code/modules/antagonists/monkey/monkey.dm b/code/modules/antagonists/monkey/monkey.dm
index 19c134750402..14d5b9ab4792 100644
--- a/code/modules/antagonists/monkey/monkey.dm
+++ b/code/modules/antagonists/monkey/monkey.dm
@@ -72,9 +72,6 @@
stack_trace("Wrong team type passed to [type] initialization.")
monkey_team = new_team
-/datum/antagonist/monkey/proc/forge_objectives()
- objectives |= monkey_team.objectives
-
/datum/antagonist/monkey/admin_remove(mob/admin)
var/mob/living/carbon/human/M = owner.current
if(ismonkey(M))
diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm
index 5ba81ca9faa7..c374a5232ae8 100644
--- a/code/modules/antagonists/nukeop/nukeop.dm
+++ b/code/modules/antagonists/nukeop/nukeop.dm
@@ -41,7 +41,6 @@
/datum/antagonist/nukeop/on_gain()
give_alias()
- forge_objectives()
. = ..()
equip_op()
memorize_code()
@@ -94,10 +93,6 @@
else
to_chat(owner, "Unfortunately the syndicate was unable to provide you with nuclear authorization code.")
-/datum/antagonist/nukeop/proc/forge_objectives()
- if(nuke_team)
- objectives |= nuke_team.objectives
-
/datum/antagonist/nukeop/proc/move_to_spawnpoint()
var/team_number = 1
if(nuke_team)
diff --git a/code/modules/antagonists/official/official.dm b/code/modules/antagonists/official/official.dm
index 8b1c544e25e6..7f7ac455bbc8 100644
--- a/code/modules/antagonists/official/official.dm
+++ b/code/modules/antagonists/official/official.dm
@@ -30,9 +30,7 @@
ert_team = new_team
/datum/antagonist/centcom/proc/forge_objectives()
- if (ert_team)
- objectives |= ert_team.objectives
- else if (!mission)
+ if(!ert_team && !mission)
var/datum/objective/missionobj = new
missionobj.owner = owner
missionobj.explanation_text = "Conduct a routine performance review of [station_name()] and its Captain."
@@ -86,4 +84,4 @@
/datum/antagonist/centcom/grand_admiral
name = "CentCom Grand Admiral"
role = "Grand Admiral"
- outfit = /datum/outfit/centcom/grand_admiral
\ No newline at end of file
+ outfit = /datum/outfit/centcom/grand_admiral
diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm
index 2e0f24481c15..709cb0f00b29 100644
--- a/code/modules/antagonists/revolution/revolution.dm
+++ b/code/modules/antagonists/revolution/revolution.dm
@@ -46,14 +46,9 @@
/datum/antagonist/rev/on_gain()
. = ..()
- create_objectives()
equip_rev()
owner.current.log_message("has been converted to the revolution!", LOG_ATTACK, color="red")
-/datum/antagonist/rev/on_removal()
- remove_objectives()
- return ..()
-
/datum/antagonist/rev/greet()
to_chat(owner, span_userdanger("You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!"))
owner.announce_objectives()
@@ -78,12 +73,6 @@
/datum/antagonist/rev/get_team()
return rev_team
-/datum/antagonist/rev/proc/create_objectives()
- objectives |= rev_team.objectives
-
-/datum/antagonist/rev/proc/remove_objectives()
- objectives -= rev_team.objectives
-
//Bump up to head_rev
/datum/antagonist/rev/proc/promote()
var/old_team = rev_team
diff --git a/code/modules/antagonists/zombie/zombie.dm b/code/modules/antagonists/zombie/zombie.dm
index efa491c95810..21087bdeee6b 100644
--- a/code/modules/antagonists/zombie/zombie.dm
+++ b/code/modules/antagonists/zombie/zombie.dm
@@ -63,9 +63,6 @@
stack_trace("Wrong team type passed to [type] initialization.")
team = new_team
-/datum/antagonist/zombie/proc/add_objectives()
- objectives |= team.objectives
-
///datum/antagonist/zombie/Destroy()
// QDEL_NULL(zombify)
// return ..()
@@ -80,7 +77,6 @@
/datum/antagonist/zombie/on_gain()
. = ..()
var/mob/living/current = owner.current
- add_objectives()
GLOB.zombies += owner
current.log_message("has been made a zombie!", LOG_ATTACK, color="#960000")
diff --git a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm
index 852419fa6b1e..aed8745887c6 100644
--- a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm
+++ b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm
@@ -37,7 +37,6 @@
H.fully_replace_character_name(H.real_name, new_name)
H.equipOutfit(/datum/outfit/infiltrator)
owner.store_memory("Do NOT kill or destroy needlessly, as this defeats the purpose of an 'infiltration'!")
- objectives |= infiltrator_team.objectives
. = ..()
if(send_to_spawnpoint)
move_to_spawnpoint()