Merge pull request #2840 from Citadel-Station-13/upstream-merge-30344
[MIRROR] Traitorbro gamemode
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/datum/antagonist/brother
|
||||
name = "Brother"
|
||||
var/special_role = "blood brother"
|
||||
var/datum/objective_team/brother_team/team
|
||||
|
||||
/datum/antagonist/brother/New(datum/mind/new_owner, datum/objective_team/brother_team/T)
|
||||
team = T
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/brother/on_gain()
|
||||
SSticker.mode.brothers += owner
|
||||
owner.special_role = special_role
|
||||
owner.objectives += team.objectives
|
||||
finalize_brother()
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/brother/on_removal()
|
||||
SSticker.mode.brothers -= owner
|
||||
team.members -= owner
|
||||
owner.objectives -= team.objectives
|
||||
if(owner.current)
|
||||
to_chat(owner.current,"<span class='userdanger'>You are no longer the [special_role]!</span>")
|
||||
owner.special_role = null
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/brother/proc/give_meeting_area()
|
||||
if(!owner.current || !team || !team.meeting_area)
|
||||
return
|
||||
to_chat(owner.current, "<B>Your designated meeting area:</B> [team.meeting_area]")
|
||||
owner.store_memory("<b>Meeting Area</b>: [team.meeting_area]")
|
||||
|
||||
/datum/antagonist/brother/greet()
|
||||
var/brother_text = ""
|
||||
var/list/brothers = team.members - owner
|
||||
for(var/i = 1 to brothers.len)
|
||||
var/datum/mind/M = brothers[i]
|
||||
brother_text += M.name
|
||||
if(i == brothers.len - 1)
|
||||
brother_text += " and "
|
||||
else if(i != brothers.len)
|
||||
brother_text += ", "
|
||||
to_chat(owner.current, "<B><font size=3 color=red>You are the [owner.special_role] of [brother_text].</font></B>")
|
||||
to_chat(owner.current, "The Syndicate only accepts those that have proven themself. Prove yourself and prove your [team.member_name]s by completing your objectives together!")
|
||||
owner.announce_objectives()
|
||||
give_meeting_area()
|
||||
|
||||
/datum/antagonist/brother/proc/finalize_brother()
|
||||
SSticker.mode.update_brother_icons_added(owner)
|
||||
@@ -21,6 +21,7 @@ GLOBAL_LIST_INIT(huds, list(
|
||||
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
|
||||
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
|
||||
ANTAG_HUD_BORER = new/datum/atom_hud/antag(),
|
||||
ANTAG_HUD_BROTHER = new/datum/atom_hud/antag/hidden(),
|
||||
))
|
||||
|
||||
/datum/atom_hud
|
||||
|
||||
+36
-3
@@ -131,10 +131,10 @@
|
||||
memory = null
|
||||
|
||||
// Datum antag mind procs
|
||||
/datum/mind/proc/add_antag_datum(datum_type)
|
||||
/datum/mind/proc/add_antag_datum(datum_type, team)
|
||||
if(!datum_type)
|
||||
return
|
||||
var/datum/antagonist/A = new datum_type(src)
|
||||
var/datum/antagonist/A = new datum_type(src, team)
|
||||
if(!A.can_be_owned(src))
|
||||
qdel(A)
|
||||
return
|
||||
@@ -194,6 +194,11 @@
|
||||
src.remove_antag_datum(ANTAG_DATUM_TRAITOR)
|
||||
SSticker.mode.update_traitor_icons_removed(src)
|
||||
|
||||
/datum/mind/proc/remove_brother()
|
||||
if(src in SSticker.mode.brothers)
|
||||
src.remove_antag_datum(ANTAG_DATUM_BROTHER)
|
||||
SSticker.mode.update_brother_icons_removed(src)
|
||||
|
||||
/datum/mind/proc/remove_nukeop()
|
||||
if(src in SSticker.mode.syndicates)
|
||||
SSticker.mode.syndicates -= src
|
||||
@@ -348,6 +353,12 @@
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
|
||||
var/list/datum/mind/other_owners = objective.get_owners() - src
|
||||
if(other_owners.len)
|
||||
output += "<ul>"
|
||||
for(var/datum/mind/M in other_owners)
|
||||
output += "<li>Conspirator: [M.name]</li>"
|
||||
output += "</ul>"
|
||||
|
||||
if(window)
|
||||
recipient << browse(output,"window=memory")
|
||||
@@ -384,7 +395,7 @@
|
||||
|
||||
/** TRAITOR ***/
|
||||
text = "traitor"
|
||||
if (SSticker.mode.config_tag=="traitor" || SSticker.mode.config_tag=="traitorchan")
|
||||
if (SSticker.mode.config_tag=="traitor" || SSticker.mode.config_tag=="traitorchan" || SSticker.mode.config_tag=="traitorbro")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in SSticker.mode.traitors)
|
||||
@@ -404,6 +415,21 @@
|
||||
|
||||
if(ishuman(current) || ismonkey(current))
|
||||
|
||||
/** BROTHER **/
|
||||
text = "brother"
|
||||
if(SSticker.mode.config_tag == "traitorbro")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if(src in SSticker.mode.brothers)
|
||||
text += "<b>Brother</b> | <a href='?src=\ref[src];brother=clear'>no</a>"
|
||||
|
||||
if(current && current.client && (ROLE_BROTHER in current.client.prefs.be_special))
|
||||
text += " | Enabled in Prefs"
|
||||
else
|
||||
text += " | Disabled in Prefs"
|
||||
|
||||
sections["brother"] = text
|
||||
|
||||
/** CHANGELING ***/
|
||||
text = "changeling"
|
||||
if (SSticker.mode.config_tag=="changeling" || SSticker.mode.config_tag=="traitorchan")
|
||||
@@ -1284,6 +1310,13 @@
|
||||
if(H)
|
||||
src = H.mind
|
||||
|
||||
else if (href_list["brother"])
|
||||
switch(href_list["brother"])
|
||||
if("clear")
|
||||
remove_brother()
|
||||
log_admin("[key_name(usr)] has de-brother'ed [current].")
|
||||
SSticker.mode.update_brother_icons_removed(src)
|
||||
|
||||
else if (href_list["silicon"])
|
||||
switch(href_list["silicon"])
|
||||
if("unemag")
|
||||
|
||||
Reference in New Issue
Block a user