mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Ported AutoTraitor.
This commit is contained in:
@@ -417,6 +417,7 @@
|
||||
#include "code\game\gamemodes\intercept_report.dm"
|
||||
#include "code\game\gamemodes\objective.dm"
|
||||
#include "code\game\gamemodes\setupgame.dm"
|
||||
#include "code\game\gamemodes\autotraitor\autotraitor.dm"
|
||||
#include "code\game\gamemodes\blob\blob.dm"
|
||||
#include "code\game\gamemodes\blob\blob_finish.dm"
|
||||
#include "code\game\gamemodes\blob\blob_report.dm"
|
||||
@@ -454,6 +455,7 @@
|
||||
#include "code\game\gamemodes\nuclear\nuclearbomb.dm"
|
||||
#include "code\game\gamemodes\nuclear\pinpointer.dm"
|
||||
#include "code\game\gamemodes\revolution\revolution.dm"
|
||||
#include "code\game\gamemodes\revolution\rp_revolution.dm"
|
||||
#include "code\game\gamemodes\sandbox\h_sandbox.dm"
|
||||
#include "code\game\gamemodes\sandbox\sandbox.dm"
|
||||
#include "code\game\gamemodes\traitor\traitor.dm"
|
||||
|
||||
@@ -7,12 +7,17 @@
|
||||
config_tag = "Extend-A-Traitormongous"
|
||||
|
||||
var/list/possible_traitors
|
||||
var/num_players = 0
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/announce()
|
||||
..()
|
||||
world << "<B>This is a test bed for theories and methods to implement an infinite traitor round. Traitors will be added to the round automagically as needed.<br>Expect bugs.</B>"
|
||||
world << "<B>Game mode is AutoTraitor. Traitors will be added to the round automagically as needed.<br>Expect bugs.</B>"
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
possible_traitors = get_players_for_role(BE_TRAITOR)
|
||||
|
||||
for(var/datum/mind/player in possible_traitors)
|
||||
@@ -134,33 +139,6 @@
|
||||
//else
|
||||
//message_admins("Number of Traitors is at maximum. Not making a new Traitor.")
|
||||
|
||||
|
||||
/* Old equation. Commenting out.
|
||||
target_traitors = max(1, min(round((playercount + r) / 10, 1), traitors_possible))
|
||||
message_admins("Target Traitor Count is: [target_traitors]")
|
||||
|
||||
if (traitorcount < target_traitors)
|
||||
message_admins("Number of Traitors is below Target. Making a new Traitor.")
|
||||
var/mob/living/newtraitor = pick(possible_traitors)
|
||||
message_admins("[newtraitor.real_name] is the new Traitor.")
|
||||
|
||||
for(var/datum/objective/o in SelectObjectives(newtraitor.mind.assigned_role, newtraitor.mind))
|
||||
o.owner = newtraitor.mind
|
||||
newtraitor.mind.objectives += o
|
||||
|
||||
equip_traitor(newtraitor)
|
||||
traitors += newtraitor.mind
|
||||
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
|
||||
newtraitor << "<B>You are now a traitor.</B>"
|
||||
newtraitor.mind.special_role = "traitor"
|
||||
var/obj_count = 1
|
||||
newtraitor << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in newtraitor.mind.objectives)
|
||||
newtraitor << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
else
|
||||
message_admins("Number of Traitors is at Target. No new Traitor.")
|
||||
*/
|
||||
traitorcheckloop()
|
||||
|
||||
|
||||
|
||||
@@ -324,6 +324,8 @@ Whitespace:Seperator;
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
|
||||
/datum/game_mode/proc/latespawn(var/mob)
|
||||
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
if(player.preferences.be_special & role)
|
||||
return 1
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
var/played = 0
|
||||
var/be_alien = 0 //Check if that guy wants to be an alien
|
||||
var/be_pai = 1 //Consider client when searching for players to recruit as a pAI
|
||||
var/be_syndicate = 1 //Consider client for late-game autotraitor
|
||||
var/activeslot = 1 //Default active slot!
|
||||
var/STFU_ghosts //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
var/STFU_radio //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
|
||||
@@ -344,6 +344,11 @@
|
||||
character.loc = pick(latejoin)
|
||||
character.lastarea = get_area(loc)
|
||||
|
||||
if(character.client)
|
||||
character.client.be_syndicate = preferences.be_special
|
||||
|
||||
ticker.mode.latespawn(character)
|
||||
|
||||
if(character.mind.assigned_role != "Cyborg")
|
||||
data_core.manifest_inject(character)
|
||||
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
|
||||
|
||||
@@ -1128,6 +1128,7 @@ datum/preferences
|
||||
C.midis = src.midis
|
||||
C.be_alien = be_special & BE_ALIEN
|
||||
C.be_pai = be_special & BE_PAI
|
||||
C.be_syndicate = be_special & BE_TRAITOR
|
||||
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
|
||||
C.ghost_ears = src.ghost_ears
|
||||
C.ghost_sight = src.ghost_sight
|
||||
|
||||
Reference in New Issue
Block a user