mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Merge pull request #34886 from AnturK/reshuffle
Antag directory reshuffling. And some minor fixups/renames.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#define NUKE_RESULT_FLUKE 0
|
||||
#define NUKE_RESULT_NUKE_WIN 1
|
||||
#define NUKE_RESULT_CREW_WIN 2
|
||||
#define NUKE_RESULT_CREW_WIN_SYNDIES_DEAD 3
|
||||
#define NUKE_RESULT_DISK_LOST 4
|
||||
#define NUKE_RESULT_DISK_STOLEN 5
|
||||
#define NUKE_RESULT_NOSURVIVORS 6
|
||||
#define NUKE_RESULT_WRONG_STATION 7
|
||||
#define NUKE_RESULT_WRONG_STATION_DEAD 8
|
||||
|
||||
#define APPRENTICE_DESTRUCTION "destruction"
|
||||
#define APPRENTICE_BLUESPACE "bluespace"
|
||||
#define APPRENTICE_ROBELESS "robeless"
|
||||
#define APPRENTICE_HEALING "healing"
|
||||
@@ -1,37 +0,0 @@
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/abductors = list()
|
||||
|
||||
// LANDMARKS
|
||||
/obj/effect/landmark/abductor
|
||||
var/team_number = 1
|
||||
|
||||
/obj/effect/landmark/abductor/agent
|
||||
icon_state = "abductor_agent"
|
||||
/obj/effect/landmark/abductor/scientist
|
||||
icon_state = "abductor"
|
||||
|
||||
// OBJECTIVES
|
||||
/datum/objective/experiment
|
||||
target_amount = 6
|
||||
|
||||
/datum/objective/experiment/New()
|
||||
explanation_text = "Experiment on [target_amount] humans."
|
||||
|
||||
/datum/objective/experiment/check_completion()
|
||||
for(var/obj/machinery/abductor/experiment/E in GLOB.machines)
|
||||
if(!istype(team, /datum/team/abductor_team))
|
||||
return FALSE
|
||||
var/datum/team/abductor_team/T = team
|
||||
if(E.team_number == T.team_number)
|
||||
return E.points >= target_amount
|
||||
return FALSE
|
||||
|
||||
/datum/game_mode/proc/update_abductor_icons_added(datum/mind/alien_mind)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR]
|
||||
hud.join_hud(alien_mind.current)
|
||||
set_antag_hud(alien_mind.current, ((alien_mind in abductors) ? "abductor" : "abductee"))
|
||||
|
||||
/datum/game_mode/proc/update_abductor_icons_removed(datum/mind/alien_mind)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR]
|
||||
hud.leave_hud(alien_mind.current)
|
||||
set_antag_hud(alien_mind.current, null)
|
||||
@@ -1,11 +0,0 @@
|
||||
This folder contains all "mini-antagonists" - antagonists that can still spice up the round but aren't enough to be a roundtype in their own right.
|
||||
Currently, that list consists of:
|
||||
-Abductors
|
||||
-Swarmers
|
||||
-Prophets of sin
|
||||
-The Jungle Fever virus (infected monkey bites human, human becomes another infected monkey)
|
||||
-Morphs
|
||||
-Sintouched crewmembers
|
||||
-Slaughter demons
|
||||
-Umbras (formerly revenants)
|
||||
Please update this if you add another mini-antagonist.
|
||||
@@ -52,7 +52,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/proc/are_operatives_dead()
|
||||
for(var/datum/mind/operative_mind in get_antagonists(/datum/antagonist/nukeop))
|
||||
for(var/datum/mind/operative_mind in get_antag_minds(/datum/antagonist/nukeop))
|
||||
if(ishuman(operative_mind.current) && (operative_mind.current.stat != DEAD))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -687,7 +687,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
if("Chief Medical Officer")
|
||||
department_string = "medical"
|
||||
|
||||
var/list/lings = get_antagonists(/datum/antagonist/changeling,TRUE)
|
||||
var/list/lings = get_antag_minds(/datum/antagonist/changeling,TRUE)
|
||||
var/ling_count = lings.len
|
||||
|
||||
for(var/datum/mind/M in SSticker.minds)
|
||||
@@ -715,7 +715,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
//Needed heads is between min_lings and the maximum possible amount of command roles
|
||||
//So at the time of writing, rand(3,6), it's also capped by the amount of lings there are
|
||||
//Because you can't fill 6 head roles with 3 lings
|
||||
var/list/lings = get_antagonists(/datum/antagonist/changeling,TRUE)
|
||||
var/list/lings = get_antag_minds(/datum/antagonist/changeling,TRUE)
|
||||
var/needed_heads = rand(min_lings,GLOB.command_positions.len)
|
||||
needed_heads = min(lings.len,needed_heads)
|
||||
|
||||
@@ -792,7 +792,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
//Check each staff member has been replaced, by cross referencing changeling minds, changeling current dna, the staff minds and their original DNA names
|
||||
var/success = 0
|
||||
changelings:
|
||||
for(var/datum/mind/changeling in get_antagonists(/datum/antagonist/changeling,TRUE))
|
||||
for(var/datum/mind/changeling in get_antag_minds(/datum/antagonist/changeling,TRUE))
|
||||
if(success >= department_minds.len) //We did it, stop here!
|
||||
return TRUE
|
||||
if(ishuman(changeling.current))
|
||||
|
||||
@@ -154,7 +154,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
|
||||
..()
|
||||
var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
|
||||
var/list/nukeops = get_antag_minds(/datum/antagonist/nukeop)
|
||||
var/danger = GLOB.joined_player_list.len - nukeops.len
|
||||
danger = CEILING(danger, 10)
|
||||
scaleTC(danger)
|
||||
|
||||
-9
@@ -201,15 +201,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
return
|
||||
antag_memory = new_memo
|
||||
|
||||
//Should probably be on ticker or job ss ?
|
||||
/proc/get_antagonists(antag_type,specific = FALSE)
|
||||
. = list()
|
||||
for(var/datum/antagonist/A in GLOB.antagonists)
|
||||
if(!A.owner)
|
||||
continue
|
||||
if(!antag_type || !specific && istype(A,antag_type) || specific && A.type == antag_type)
|
||||
. += A.owner
|
||||
|
||||
//This datum will autofill the name with special_role
|
||||
//Used as placeholder for minor antagonists, please create proper datums for these
|
||||
/datum/antagonist/auto_custom
|
||||
@@ -0,0 +1,19 @@
|
||||
//Returns MINDS of the assigned antags of given type/subtypes
|
||||
/proc/get_antag_minds(antag_type,specific = FALSE)
|
||||
. = list()
|
||||
for(var/datum/antagonist/A in GLOB.antagonists)
|
||||
if(!A.owner)
|
||||
continue
|
||||
if(!antag_type || !specific && istype(A,antag_type) || specific && A.type == antag_type)
|
||||
. += A.owner
|
||||
|
||||
//Get all teams [of type team_type]
|
||||
/proc/get_all_teams(team_type)
|
||||
. = list()
|
||||
for(var/V in GLOB.antagonists)
|
||||
var/datum/antagonist/A = V
|
||||
if(!A.owner)
|
||||
continue
|
||||
var/datum/team/T = A.get_team()
|
||||
if(!team_type || istype(T,team_type))
|
||||
. |= T
|
||||
@@ -32,15 +32,3 @@
|
||||
report += printplayerlist(members)
|
||||
|
||||
return report.Join("<br>")
|
||||
|
||||
//Get all teams [of type team_type]
|
||||
//TODO move these to some antag helpers file with get_antagonists
|
||||
/proc/get_all_teams(team_type)
|
||||
. = list()
|
||||
for(var/V in GLOB.antagonists)
|
||||
var/datum/antagonist/A = V
|
||||
if(!A.owner)
|
||||
continue
|
||||
var/datum/team/T = A.get_team()
|
||||
if(!team_type || istype(T,team_type))
|
||||
. |= T
|
||||
+39
-5
@@ -40,7 +40,6 @@
|
||||
return team
|
||||
|
||||
/datum/antagonist/abductor/on_gain()
|
||||
SSticker.mode.abductors += owner
|
||||
owner.special_role = "[name] [sub_role]"
|
||||
owner.assigned_role = "[name] [sub_role]"
|
||||
owner.objectives += team.objectives
|
||||
@@ -48,7 +47,6 @@
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/abductor/on_removal()
|
||||
SSticker.mode.abductors -= owner
|
||||
owner.objectives -= team.objectives
|
||||
if(owner.current)
|
||||
to_chat(owner.current,"<span class='userdanger'>You are no longer the [owner.special_role]!</span>")
|
||||
@@ -74,7 +72,7 @@
|
||||
H.forceMove(LM.loc)
|
||||
break
|
||||
|
||||
SSticker.mode.update_abductor_icons_added(owner)
|
||||
update_abductor_icons_added(owner,"abductor")
|
||||
|
||||
/datum/antagonist/abductor/scientist/finalize_abductor()
|
||||
..()
|
||||
@@ -176,7 +174,43 @@
|
||||
owner.objectives += objectives
|
||||
|
||||
/datum/antagonist/abductee/apply_innate_effects(mob/living/mob_override)
|
||||
SSticker.mode.update_abductor_icons_added(mob_override ? mob_override.mind : owner)
|
||||
update_abductor_icons_added(mob_override ? mob_override.mind : owner,"abductee")
|
||||
|
||||
/datum/antagonist/abductee/remove_innate_effects(mob/living/mob_override)
|
||||
SSticker.mode.update_abductor_icons_removed(mob_override ? mob_override.mind : owner)
|
||||
update_abductor_icons_removed(mob_override ? mob_override.mind : owner)
|
||||
|
||||
|
||||
// LANDMARKS
|
||||
/obj/effect/landmark/abductor
|
||||
var/team_number = 1
|
||||
|
||||
/obj/effect/landmark/abductor/agent
|
||||
icon_state = "abductor_agent"
|
||||
/obj/effect/landmark/abductor/scientist
|
||||
icon_state = "abductor"
|
||||
|
||||
// OBJECTIVES
|
||||
/datum/objective/experiment
|
||||
target_amount = 6
|
||||
|
||||
/datum/objective/experiment/New()
|
||||
explanation_text = "Experiment on [target_amount] humans."
|
||||
|
||||
/datum/objective/experiment/check_completion()
|
||||
for(var/obj/machinery/abductor/experiment/E in GLOB.machines)
|
||||
if(!istype(team, /datum/team/abductor_team))
|
||||
return FALSE
|
||||
var/datum/team/abductor_team/T = team
|
||||
if(E.team_number == T.team_number)
|
||||
return E.points >= target_amount
|
||||
return FALSE
|
||||
|
||||
/datum/antagonist/proc/update_abductor_icons_added(datum/mind/alien_mind,hud_type)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR]
|
||||
hud.join_hud(alien_mind.current)
|
||||
set_antag_hud(alien_mind.current, hud_type)
|
||||
|
||||
/datum/antagonist/proc/update_abductor_icons_removed(datum/mind/alien_mind)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR]
|
||||
hud.leave_hud(alien_mind.current)
|
||||
set_antag_hud(alien_mind.current, null)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user