Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add blood brother to Check Antagonists #877

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
#define DATA_HUD_ABDUCTOR 19
#define ANTAG_HUD_EVENTMISC 20
#define ANTAG_HUD_BLOB 21
// SS220 EDIT - START
#define ANTAG_HUD_BLOOD_BROTHER 22
// SS220 EDIT - END

// Notification action types
#define NOTIFY_JUMP "jump"
Expand Down
3 changes: 3 additions & 0 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,9 @@
sections["eventmisc"] = memory_edit_eventmisc(H)
/** TRAITOR ***/
sections["traitor"] = memory_edit_traitor()
// SS220 EDIT - START
sections["blood_brother"] = memory_edit_blood_brother()
// SS220 EDIT - END
if(!issilicon(current))
/** CULT ***/
sections["cult"] = memory_edit_cult(H)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/admin/player_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@
if(SSticker.mode.traitors.len)
dat += check_role_table("Traitors", SSticker.mode.traitors)

// SS220 EDIT - START
if(SSticker.mode.blood_brothers.len)
dat += check_role_table("Blood Brothers", SSticker.mode.blood_brothers)
// SS220 EDIT - END

if(SSticker.mode.implanted.len)
dat += check_role_table("Mindslaves", SSticker.mode.implanted)

Expand Down
5 changes: 2 additions & 3 deletions modular_ss220/_defines220/_defines220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
#include "code/signals_mob/signals_mob_main.dm"
#include "code/signals_mob/signals_mob_silicon.dm"
#include "code/signals_mob/signals_mob_simple.dm"
#include "code/role_preferences.dm"
#include "code/gamemode.dm"
#include "code/signals_keybindings.dm"
#include "code/signals_obj.dm"
#include "code/cult_defines_ss220.dm"
#include "code/hud_ss220.dm"
#include "code/atom_hud.dm"
#include "code/gamemode.dm"
#include "code/role_preferences.dm"
#include "code/layers_ss220.dm"
#include "code/signals_atom.dm"
#include "code/jobs_defines.dm"
Expand Down
1 change: 0 additions & 1 deletion modular_ss220/_defines220/code/atom_hud.dm

This file was deleted.

4 changes: 2 additions & 2 deletions modular_ss220/antagonists/_antagonists.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "code/antag_mix/scenarios/antag_scenario.dm"
#include "code/antag_mix/scenarios/antag_team_scenario.dm"
#include "code/antag_mix/scenarios/minor_scenarios.dm"
#include "code/configuration/antag_mix_configuration.dm"
#include "code/blood_brothers/blood_brothers_datum.dm"
#include "code/blood_brothers/blood_brothers_team.dm"
#include "code/blood_brothers/blood_brothers_datum.dm"
#include "code/configuration/antag_mix_configuration.dm"
#include "code/mind/memory_edit.dm"
#include "code/antag_mix/antag_mix.dm"
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
alert(admin, "No candidates for second blood brother found.")
return FALSE

sortTim(choices, GLOBAL_PROC_REF(cmp_text_asc))
var/choice = tgui_input_list(admin, "Choose the blood brother.", "Brother", choices)
var/choice = tgui_input_list(admin, "Choose the blood brother.", "Brother", sortTim(choices, GLOBAL_PROC_REF(cmp_text_asc)))
if(!choice)
return FALSE

Expand Down
105 changes: 10 additions & 95 deletions modular_ss220/antagonists/code/mind/memory_edit.dm
Original file line number Diff line number Diff line change
@@ -1,89 +1,3 @@
/datum/mind/edit_memory()
if(!SSticker || !SSticker.mode)
alert("Not before round-start!", "Alert")
return

var/list/out = list("<meta charset='UTF-8'><B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]")
out.Add("Mind currently owned by key: [key] [active ? "(synced)" : "(not synced)"]")
out.Add("Assigned role: [assigned_role]. <a href='?src=[UID()];role_edit=1'>Edit</a>")
out.Add("Factions and special roles:")

var/list/sections = list(
"implant",
"revolution",
"cult",
"wizard",
"changeling",
"vampire", // "traitorvamp",
"nuclear",
"traitor", // "traitorchan",
)
var/mob/living/carbon/human/H = current
if(ishuman(current))
/** Impanted**/
sections["implant"] = memory_edit_implant(H)
/** REVOLUTION ***/
sections["revolution"] = memory_edit_revolution(H)
/** WIZARD ***/
sections["wizard"] = memory_edit_wizard(H)
/** CHANGELING ***/
sections["changeling"] = memory_edit_changeling(H)
/** VAMPIRE ***/
sections["vampire"] = memory_edit_vampire(H)
/** NUCLEAR ***/
sections["nuclear"] = memory_edit_nuclear(H)
/** Abductors **/
sections["abductor"] = memory_edit_abductor(H)
sections["eventmisc"] = memory_edit_eventmisc(H)
/** TRAITOR ***/
sections["traitor"] = memory_edit_traitor()
/** BLOOD BROTHER **/
sections["blood_brother"] = memory_edit_blood_brother()
if(!issilicon(current))
/** CULT ***/
sections["cult"] = memory_edit_cult(H)
/** SILICON ***/
if(issilicon(current))
sections["silicon"] = memory_edit_silicon()
/*
This prioritizes antags relevant to the current round to make them appear at the top of the panel.
Traitorchan and traitorvamp are snowflaked in because they have multiple sections.
*/
if(SSticker.mode.config_tag == "traitorchan")
if(sections["traitor"])
out.Add(sections["traitor"])
if(sections["changeling"])
out.Add(sections["changeling"])
sections -= "traitor"
sections -= "changeling"
// Elif technically unnecessary but it makes the following else look better
else if(SSticker.mode.config_tag == "traitorvamp")
if(sections["traitor"])
out.Add(sections["traitor"])
if(sections["vampire"])
out.Add(sections["vampire"])
sections -= "traitor"
sections -= "vampire"
else
if(sections[SSticker.mode.config_tag])
out.Add(sections[SSticker.mode.config_tag])
sections -= SSticker.mode.config_tag

for(var/i in sections)
if(sections[i])
out.Add(sections[i])

out.Add(memory_edit_uplink())

out.Add("<b>Memory:</b>")
out.Add(memory)
out.Add("<a href='?src=[UID()];memory_edit=1'>Edit memory</a><br>")
out.Add("Objectives:")
out.Add(gen_objective_text(admin = TRUE))
out.Add("<a href='?src=[UID()];obj_add=1'>Add objective</a><br>")
out.Add("<a href='?src=[UID()];obj_announce=1'>Announce objectives</a><br>")
DIRECT_OUTPUT(usr, browse(out.Join("<br>"), "window=edit_memory[src];size=500x500"))

/datum/mind/proc/memory_edit_blood_brother()
. = _memory_edit_header("blood brother")
if(has_antag_datum(/datum/antagonist/blood_brother))
Expand All @@ -94,6 +8,16 @@
. += _memory_edit_role_enabled(ROLE_BLOOD_BROTHER)


/datum/mind/proc/clear_antag_datum(datum/antagonist/antag_datum_to_clear)
if(!has_antag_datum(antag_datum_to_clear))
return

remove_antag_datum(antag_datum_to_clear)
var/antag_name = initial(antag_datum_to_clear.name)
log_admin("[key_name(usr)] has removed <b>[antag_name]</b> from [key_name(current)]")
message_admins("[key_name_admin(usr)] has removed <b>[antag_name]</b> from [key_name_admin(current)]")


/datum/mind/Topic(href, href_list)
if(!check_rights(R_ADMIN))
return
Expand All @@ -108,12 +32,3 @@
qdel(brother_antag_datum)

. = ..()

/datum/mind/proc/clear_antag_datum(datum/antagonist/antag_datum_to_clear)
if(!has_antag_datum(antag_datum_to_clear))
return

remove_antag_datum(antag_datum_to_clear)
var/antag_name = initial(antag_datum_to_clear.name)
log_admin("[key_name(usr)] has removed <b>[antag_name]</b> from [key_name(current)]")
message_admins("[key_name_admin(usr)] has removed <b>[antag_name]</b> from [key_name_admin(current)]")