Refactors objectives, expands team functionality, and custom teams (#22374)

* step 1

* renaming 1

* how could I forget this

* renaming 2

* renaming 3

* add matching proc, even if unused can remove later

* rename team obj to match

* oops

* okay more stuff

* okay more stuff

* fix this stuff

* okay more stuff

* needs_target = FALSE

* OKAY MORE STUFF

* OOPS AGAIN.

* self-review

* more round_end stuff

* stuff 119

* yeah fix that too

* EVEN MORE CHANGES

* grammar

* fix

* s34n review

* fixes custom teams with no antags not showing objs

* makes objectives work properly with teams

* a
This commit is contained in:
Contrabang
2023-10-01 14:14:10 +01:00
committed by GitHub
parent 4ce0b08f9c
commit 7e0aa47311
42 changed files with 630 additions and 477 deletions
+15 -6
View File
@@ -1618,6 +1618,14 @@
if(!check_rights(R_ADMIN))
return
var/datum/team/team
if(href_list["team_command"] == "new_custom_team") // this needs to be handled before all the other stuff, as the team doesn't exist yet
message_admins("[key_name_admin(usr)] created a new custom team.")
log_admin("[key_name(usr)] created a new custom team.")
team = new()
team.admin_rename_team(usr)
check_teams()
return
var/datum/mind/member
if(href_list["team"])
team = locateUID(href_list["team"])
@@ -1646,6 +1654,8 @@
show_player_panel(member.current)
if("add_objective")
team.admin_add_objective(usr)
if("announce_objectives")
team.admin_announce_objectives(usr)
if("remove_objective")
var/datum/objective/O = locateUID(href_list["objective"])
if(O)
@@ -2143,11 +2153,12 @@
possible_traitors -= player
if(possible_traitors.len)
var/datum/mind/newtraitormind = pick(possible_traitors)
var/datum/objective/assassinate/kill_objective = new()
kill_objective.target = H.mind
kill_objective.owner = newtraitormind
kill_objective.explanation_text = "Assassinate [H.mind.name], the [H.mind.assigned_role]"
newtraitormind.objectives += kill_objective
newtraitormind.add_mind_objective(kill_objective)
var/datum/antagonist/traitor/T = new()
T.give_objectives = FALSE
to_chat(newtraitormind.current, "<span class='danger'>ATTENTION:</span> It is time to pay your debt to the Syndicate...")
@@ -3467,16 +3478,14 @@
D.implant(hunter_mob)
if(killthem)
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = hunter_mind
kill_objective.target = H.mind
kill_objective.explanation_text = "Kill [H.real_name], the [H.mind.assigned_role]."
hunter_mind.objectives += kill_objective
hunter_mind.add_mind_objective(kill_objective)
else
var/datum/objective/protect/protect_objective = new
protect_objective.owner = hunter_mind
protect_objective.target = H.mind
protect_objective.explanation_text = "Protect [H.real_name], the [H.mind.assigned_role]."
hunter_mind.objectives += protect_objective
hunter_mind.add_mind_objective(protect_objective)
SSticker.mode.traitors |= hunter_mob.mind
to_chat(hunter_mob, "<span class='danger'>ATTENTION:</span> You are now on a mission!")
to_chat(hunter_mob, "<b>Goal: <span class='danger'>[killthem ? "MURDER" : "PROTECT"] [H.real_name]</span>, currently in [get_area(H.loc)].</b>");
+4 -14
View File
@@ -18,15 +18,10 @@
SSticker.mode.traitors += H.mind
H.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/objective/hijack/hijack_objective = new
hijack_objective.owner = H.mind
H.mind.objectives += hijack_objective
H.mind.add_mind_objective(/datum/objective/hijack)
to_chat(H, "<B>You are a Highlander. Kill all other Highlanders. There can be only one.</B>")
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
to_chat(H, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
H.mind.announce_objectives(title = FALSE)
for(var/obj/item/I in H)
if(istype(I, /obj/item/implant))
@@ -75,15 +70,10 @@
SSticker.mode.traitors += H.mind
H.mind.special_role = "[H.real_name] Prime"
var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone
hijack_objective.owner = H.mind
H.mind.objectives += hijack_objective
H.mind.add_mind_objective(/datum/objective/hijackclone)
to_chat(H, "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>")
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
to_chat(H, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
H.mind.announce_objectives(title = FALSE)
var/obj/item/slot_item_ID = H.get_item_by_slot(slot_wear_id)
qdel(slot_item_ID)