diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index f68118ac592..cc5ab96a665 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -12,6 +12,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter. var/completed = FALSE //currently only used for custom objectives. var/martyr_compatible = FALSE //If the objective is compatible with martyr objective, i.e. if you can still do it while dead. + ///can this be granted by admins? + var/admin_grantable = FALSE /datum/objective/New(text) if(text) @@ -186,8 +188,9 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/assassinate name = "assasinate" - var/target_role_type=FALSE martyr_compatible = TRUE + admin_grantable = TRUE + var/target_role_type = FALSE /datum/objective/assassinate/check_completion() @@ -205,8 +208,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/mutiny name = "mutiny" - var/target_role_type=FALSE martyr_compatible = 1 + var/target_role_type = FALSE /datum/objective/mutiny/check_completion() @@ -224,8 +227,9 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/maroon name = "maroon" - var/target_role_type=FALSE martyr_compatible = TRUE + admin_grantable = TRUE + var/target_role_type = FALSE /datum/objective/maroon/check_completion() @@ -248,7 +252,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/debrain name = "debrain" - var/target_role_type=0 + admin_grantable = TRUE + var/target_role_type = FALSE /datum/objective/debrain/check_completion() @@ -279,6 +284,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/protect//The opposite of killing a dude. name = "protect" martyr_compatible = TRUE + admin_grantable = TRUE var/target_role_type = FALSE var/human_check = TRUE @@ -303,10 +309,12 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/protect/nonhuman name = "protect nonhuman" human_check = FALSE + admin_grantable = FALSE /datum/objective/jailbreak name = "jailbreak" martyr_compatible = TRUE //why not? + admin_grantable = TRUE var/target_role_type @@ -342,6 +350,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list team_explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console). Leave no team member behind." martyr_compatible = FALSE //Technically you won't get both anyway. /// Overrides the hijack speed of any antagonist datum it is on ONLY, no other datums are impacted. + admin_grantable = TRUE var/hijack_speed_override = 1 /datum/objective/hijack/check_completion() // Requires all owners to escape. @@ -431,6 +440,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list name = "escape" explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody." team_explanation_text = "Have all members of your team escape on a shuttle or pod alive, without being in custody." + admin_grantable = TRUE /datum/objective/escape/check_completion() // Require all owners escape safely. @@ -483,6 +493,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/survive name = "survive" explanation_text = "Stay alive until the end." + admin_grantable = TRUE /datum/objective/survive/check_completion() var/list/datum/mind/owners = get_owners() @@ -494,6 +505,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/survive/malf //Like survive, but for Malf AIs name = "survive AI" explanation_text = "Prevent your own deactivation." + admin_grantable = FALSE /datum/objective/survive/malf/check_completion() var/list/datum/mind/owners = get_owners() @@ -518,6 +530,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/martyr name = "martyr" explanation_text = "Die a glorious death." + admin_grantable = TRUE /datum/objective/martyr/check_completion() var/list/datum/mind/owners = get_owners() @@ -532,6 +545,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list name = "nuclear" explanation_text = "Destroy the station with a nuclear device." martyr_compatible = TRUE + admin_grantable = TRUE /datum/objective/nuclear/check_completion() if(GLOB.station_was_nuked) @@ -541,9 +555,10 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list GLOBAL_LIST_EMPTY(possible_items) /datum/objective/steal name = "steal" + martyr_compatible = FALSE + admin_grantable = TRUE var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later. var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums). - martyr_compatible = FALSE /datum/objective/steal/get_target() return steal_target @@ -642,6 +657,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) /datum/objective/capture name = "capture" + admin_grantable = TRUE /datum/objective/capture/proc/gen_amount_goal() target_amount = rand(5,10) @@ -709,6 +725,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) /datum/objective/absorb name = "absorb" + admin_grantable = TRUE /datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6) target_amount = rand (lowbound,highbound) @@ -924,6 +941,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) //Created by admin tools /datum/objective/custom name = "custom" + admin_grantable = TRUE /datum/objective/custom/admin_edit(mob/admin) var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text) @@ -934,28 +952,12 @@ GLOBAL_LIST_EMPTY(possible_items_special) /proc/generate_admin_objective_list() GLOB.admin_objective_list = list() - var/list/allowed_types = sort_list(list( - /datum/objective/assassinate, - /datum/objective/maroon, - /datum/objective/debrain, - /datum/objective/protect, - /datum/objective/jailbreak, - /datum/objective/jailbreak/detain, - /datum/objective/destroy, - /datum/objective/hijack, - /datum/objective/escape, - /datum/objective/survive, - /datum/objective/martyr, - /datum/objective/steal, - /datum/objective/nuclear, - /datum/objective/capture, - /datum/objective/absorb, - /datum/objective/custom - ),/proc/cmp_typepaths_asc) + var/list/allowed_types = sort_list(subtypesof(/datum/objective), /proc/cmp_typepaths_asc) - for(var/T in allowed_types) - var/datum/objective/X = T - GLOB.admin_objective_list[initial(X.name)] = T + for(var/datum/objective/goal as anything in allowed_types) + if(!initial(goal.admin_grantable)) + continue + GLOB.admin_objective_list[initial(goal.name)] = goal /datum/objective/contract var/payout = 0