Removes ghost check for battlecruiser objective and fixes players being able to roll it multiple times in a row (#70194)

Removes the ghost check for the battlecruiser objective
Fixes the same player being able to reroll battlecruiser
This commit is contained in:
Salex08
2022-09-29 22:52:21 +01:00
committed by GitHub
parent b9c9ad31e1
commit 5dada0e63a
5 changed files with 10 additions and 12 deletions
@@ -13,6 +13,8 @@ GLOBAL_LIST_EMPTY(antagonist_teams)
var/list/datum/mind/members = list()
///Common objectives, these won't be added or removed automatically, subtypes handle this, this is here for bookkeeping purposes.
var/list/datum/objective/objectives = list()
///List of players in a team, mainly used to make sure someone cant spawn ghost roll more then once in a row
var/list/players_spawned = list()
/datum/team/New(starting_members)
. = ..()
@@ -1,7 +1,6 @@
/datum/team/ashwalkers
name = "Ashwalkers"
show_roundend_report = FALSE
var/list/players_spawned = new
/datum/antagonist/ashwalker
name = "\improper Ash Walker"
@@ -1,6 +1,3 @@
/// The minimum number of ghosts and observers needed before handing out battlecruiser objectives.
#define MIN_GHOSTS_FOR_BATTLECRUISER 8
/datum/traitor_objective/final/battlecruiser
name = "Reveal Station Coordinates to nearby Syndicate Battlecruiser"
description = "Use a special upload card on a communications console to send the coordinates \
@@ -18,12 +15,6 @@
// There's no empty space to load a battlecruiser in...
if(!SSmapping.empty_space)
return FALSE
// Check how many observers + ghosts (dead players) we have.
// If there's not a ton of observers and ghosts to populate the battlecruiser,
// We won't bother giving the objective out.
var/num_ghosts = length(GLOB.current_observers_list) + length(GLOB.dead_player_list)
if(num_ghosts < MIN_GHOSTS_FOR_BATTLECRUISER)
return FALSE
return TRUE
@@ -58,5 +49,3 @@
"style" = STYLE_SYNDICATE,
"spawn" = emag_card,
))
#undef MIN_GHOSTS_FOR_BATTLECRUISER
@@ -117,12 +117,19 @@
/// The antag datum to give to the player spawned
var/antag_datum_to_give = /datum/antagonist/battlecruiser
/obj/effect/mob_spawn/ghost_role/human/syndicate/battlecruiser/allow_spawn(mob/user, silent = FALSE)
if(!(user.ckey in antag_team.players_spawned))
return TRUE
to_chat(user, span_boldwarning("You have already used up your chance to roll as Battlecruiser."))
return FALSE
/obj/effect/mob_spawn/ghost_role/human/syndicate/battlecruiser/special(mob/living/spawned_mob, mob/possesser)
. = ..()
if(!spawned_mob.mind)
spawned_mob.mind_initialize()
var/datum/mind/mob_mind = spawned_mob.mind
mob_mind.add_antag_datum(antag_datum_to_give, antag_team)
antag_team.players_spawned += (spawned_mob.ckey)
/datum/team/battlecruiser
name = "\improper Battlecruiser Crew"
@@ -172,6 +172,7 @@
if(candidates.len > 0)
var/mob/our_candidate = candidates[1]
spawner.create(our_candidate)
spawner.antag_team.players_spawned += (our_candidate.ckey)
candidates.Splice(1, 2)
notify_ghosts(
"The battlecruiser has an object of interest: [our_candidate]!",