mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Job role signup refactor. PLAYERS2.SQLITE MUST BE UPDATED!
* mob.client.prefs.be_special & BE_* replaced with mob.client.desires_role(ROLE_*) * Added several new ROLEs for handling blob, borer, etc. * SQLite table added for client_roles. * New dialog added for handling special role preferences in-game. * Added /datum/browser/clean for a cleaner UI. Needs more testing, but the basics work.
This commit is contained in:
200
SQL/players2.sql
200
SQL/players2.sql
@@ -1,97 +1,119 @@
|
|||||||
CREATE TABLE `body` (
|
|
||||||
`ID` INTEGER PRIMARY KEY AUTOINCREMENT,
|
-- Table: players
|
||||||
`player_ckey` TEXT NOT NULL,
|
CREATE TABLE players (
|
||||||
`player_slot` INTEGER NOT NULL,
|
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`hair_red` INTEGER,
|
player_ckey TEXT NOT NULL,
|
||||||
`hair_green` INTEGER,
|
player_slot INTEGER NOT NULL,
|
||||||
`hair_blue` INTEGER,
|
ooc_notes TEXT,
|
||||||
`facial_red` INTEGER,
|
real_name TEXT,
|
||||||
`facial_green` INTEGER,
|
random_name INTEGER,
|
||||||
`facial_blue` INTEGER,
|
gender TEXT,
|
||||||
`skin_tone` INTEGER,
|
age INTEGER,
|
||||||
`hair_style_name` TEXT,
|
species TEXT,
|
||||||
`facial_style_name` TEXT,
|
language TEXT,
|
||||||
`eyes_red` INTEGER,
|
flavor_text TEXT,
|
||||||
`eyes_green` INTEGER,
|
med_record TEXT,
|
||||||
`eyes_blue` INTEGER,
|
sec_record TEXT,
|
||||||
`underwear` INTEGER,
|
gen_record TEXT,
|
||||||
`backbag` INTEGER,
|
player_alt_titles TEXT,
|
||||||
`b_type` TEXT,
|
be_special TEXT,
|
||||||
FOREIGN KEY(player_ckey, player_slot) REFERENCES players(player_ckey, player_slot) ON DELETE CASCADE,
|
disabilities INTEGER,
|
||||||
UNIQUE(player_ckey, player_slot)
|
nanotrasen_relation TEXT,
|
||||||
|
UNIQUE ( player_ckey, player_slot )
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `jobs` (
|
|
||||||
`ID` INTEGER PRIMARY KEY AUTOINCREMENT,
|
-- Table: body
|
||||||
`player_ckey` TEXT NOT NULL,
|
CREATE TABLE body (
|
||||||
`player_slot` INTEGER NOT NULL,
|
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`alternate_option` INTEGER,
|
player_ckey TEXT NOT NULL,
|
||||||
`job_civilian_high` INTEGER,
|
player_slot INTEGER NOT NULL,
|
||||||
`job_civilian_med` INTEGER,
|
hair_red INTEGER,
|
||||||
`job_civilian_low` INTEGER,
|
hair_green INTEGER,
|
||||||
`job_medsci_high` INTEGER,
|
hair_blue INTEGER,
|
||||||
`job_medsci_med` INTEGER,
|
facial_red INTEGER,
|
||||||
`job_medsci_low` INTEGER,
|
facial_green INTEGER,
|
||||||
`job_engsec_high` INTEGER,
|
facial_blue INTEGER,
|
||||||
`job_engsec_med` INTEGER,
|
skin_tone INTEGER,
|
||||||
`job_engsec_low` INTEGER,
|
hair_style_name TEXT,
|
||||||
FOREIGN KEY(player_ckey, player_slot) REFERENCES players(player_ckey, player_slot) ON DELETE CASCADE,
|
facial_style_name TEXT,
|
||||||
UNIQUE(player_ckey, player_slot)
|
eyes_red INTEGER,
|
||||||
|
eyes_green INTEGER,
|
||||||
|
eyes_blue INTEGER,
|
||||||
|
underwear INTEGER,
|
||||||
|
backbag INTEGER,
|
||||||
|
b_type TEXT,
|
||||||
|
FOREIGN KEY ( player_ckey, player_slot ) REFERENCES players ( player_ckey, player_slot ) ON DELETE CASCADE,
|
||||||
|
UNIQUE ( player_ckey, player_slot )
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `limbs` (
|
|
||||||
`ID` INTEGER PRIMARY KEY AUTOINCREMENT,
|
-- Table: jobs
|
||||||
`player_ckey` TEXT NOT NULL,
|
CREATE TABLE jobs (
|
||||||
`player_slot` INTEGER NOT NULL,
|
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`l_arm` TEXT,
|
player_ckey TEXT NOT NULL,
|
||||||
`r_arm` TEXT,
|
player_slot INTEGER NOT NULL,
|
||||||
`l_leg` TEXT,
|
alternate_option INTEGER,
|
||||||
`r_leg` TEXT,
|
job_civilian_high INTEGER,
|
||||||
`l_foot` TEXT,
|
job_civilian_med INTEGER,
|
||||||
`r_foot` TEXT,
|
job_civilian_low INTEGER,
|
||||||
`l_hand` TEXT,
|
job_medsci_high INTEGER,
|
||||||
`r_hand` TEXT,
|
job_medsci_med INTEGER,
|
||||||
`heart` TEXT,
|
job_medsci_low INTEGER,
|
||||||
`eyes` TEXT,
|
job_engsec_high INTEGER,
|
||||||
FOREIGN KEY(player_ckey, player_slot) REFERENCES players(player_ckey, player_slot) ON DELETE CASCADE,
|
job_engsec_med INTEGER,
|
||||||
UNIQUE(player_ckey, player_slot)
|
job_engsec_low INTEGER,
|
||||||
|
FOREIGN KEY ( player_ckey, player_slot ) REFERENCES players ( player_ckey, player_slot ) ON DELETE CASCADE,
|
||||||
|
UNIQUE ( player_ckey, player_slot )
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `players` (
|
|
||||||
`ID` INTEGER PRIMARY KEY AUTOINCREMENT,
|
-- Table: limbs
|
||||||
`player_ckey` TEXT NOT NULL,
|
CREATE TABLE limbs (
|
||||||
`player_slot` INTEGER NOT NULL,
|
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`ooc_notes` TEXT,
|
player_ckey TEXT NOT NULL,
|
||||||
`real_name` TEXT,
|
player_slot INTEGER NOT NULL,
|
||||||
`random_name` INTEGER,
|
l_arm TEXT,
|
||||||
`gender` TEXT,
|
r_arm TEXT,
|
||||||
`age` INTEGER,
|
l_leg TEXT,
|
||||||
`species` TEXT,
|
r_leg TEXT,
|
||||||
`language` TEXT,
|
l_foot TEXT,
|
||||||
`flavor_text` TEXT,
|
r_foot TEXT,
|
||||||
`med_record` TEXT,
|
l_hand TEXT,
|
||||||
`sec_record` TEXT,
|
r_hand TEXT,
|
||||||
`gen_record` TEXT,
|
heart TEXT,
|
||||||
`player_alt_titles` TEXT,
|
eyes TEXT,
|
||||||
`be_special` TEXT,
|
FOREIGN KEY ( player_ckey, player_slot ) REFERENCES players ( player_ckey, player_slot ) ON DELETE CASCADE,
|
||||||
`disabilities` INTEGER,
|
UNIQUE ( player_ckey, player_slot )
|
||||||
`nanotrasen_relation` TEXT,
|
);
|
||||||
UNIQUE(player_ckey, player_slot)
|
|
||||||
|
|
||||||
|
-- Table: client
|
||||||
|
CREATE TABLE client (
|
||||||
|
ID INTEGER NOT NULL
|
||||||
|
PRIMARY KEY AUTOINCREMENT,
|
||||||
|
ckey INTEGER UNIQUE,
|
||||||
|
ooc_color TEXT,
|
||||||
|
lastchangelog TEXT,
|
||||||
|
UI_style TEXT,
|
||||||
|
default_slot INTEGER,
|
||||||
|
toggles INTEGER,
|
||||||
|
UI_style_color TEXT,
|
||||||
|
UI_style_alpha INTEGER,
|
||||||
|
randomslot INTEGER,
|
||||||
|
volume INTEGER,
|
||||||
|
special INTEGER,
|
||||||
|
warns INTEGER,
|
||||||
|
warnbans INTEGER
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
-- Table: client_roles
|
||||||
|
CREATE TABLE client_roles (
|
||||||
|
ckey TEXT UNIQUE,
|
||||||
|
slot INTEGER,
|
||||||
|
role TEXT NOT NULL,
|
||||||
|
preference INTEGER NOT NULL,
|
||||||
|
PRIMARY KEY ( ckey, slot )
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `client` (
|
|
||||||
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
||||||
`ckey` INTEGER UNIQUE,
|
|
||||||
`ooc_color` TEXT,
|
|
||||||
`lastchangelog` TEXT,
|
|
||||||
`UI_style` TEXT,
|
|
||||||
`default_slot` INTEGER,
|
|
||||||
`toggles` INTEGER,
|
|
||||||
`UI_style_color`TEXT,
|
|
||||||
`UI_style_alpha`INTEGER,
|
|
||||||
`randomslot` INTEGER,
|
|
||||||
`volume` INTEGER,
|
|
||||||
`special` INTEGER,
|
|
||||||
`warns` INTEGER,
|
|
||||||
`warnbans` INTEGER
|
|
||||||
);
|
|
||||||
@@ -346,24 +346,24 @@ var/list/DummyCache = list()
|
|||||||
|
|
||||||
// Same as above but for alien candidates.
|
// Same as above but for alien candidates.
|
||||||
|
|
||||||
/proc/get_alien_candidates()
|
/proc/get_alien_candidates(var/role_id=ROLE_ALIEN)
|
||||||
|
|
||||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||||
var/i = 0
|
var/i = 0
|
||||||
while(candidates.len <= 0 && i < 5)
|
while(candidates.len <= 0 && i < 5)
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in player_list)
|
||||||
if(G.client.prefs.be_special & BE_ALIEN)
|
if(G.client.desires_role(role_id))
|
||||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||||
candidates += G.key
|
candidates += G.key
|
||||||
i++
|
i++
|
||||||
return candidates
|
return candidates
|
||||||
|
|
||||||
/proc/get_candidates(be_special_flag=0)
|
/proc/get_candidates(role_id=null)
|
||||||
. = list()
|
. = list()
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in player_list)
|
||||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
if(!G.client.is_afk() && (role_id==null || G.client.desires_role(role_id)))
|
||||||
. += G.client
|
. += G.client
|
||||||
|
|
||||||
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
||||||
|
|||||||
@@ -174,4 +174,40 @@
|
|||||||
if(src && src.mob)
|
if(src && src.mob)
|
||||||
//world << "[src] was [src.mob.machine], setting to null"
|
//world << "[src] was [src.mob.machine], setting to null"
|
||||||
src.mob.unset_machine()
|
src.mob.unset_machine()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
///////////////////////
|
||||||
|
// CLEAN UI STYLE.
|
||||||
|
///////////////////////
|
||||||
|
|
||||||
|
/datum/browser/clean/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||||
|
..(nuser,nwindow_id,ntitle,nwidth,nheight,nref)
|
||||||
|
add_stylesheet("common",'html/browser/clean.css') // Clean style.
|
||||||
|
|
||||||
|
// Re-implemented without the extra divs.
|
||||||
|
/datum/browser/clean/get_header()
|
||||||
|
var/key
|
||||||
|
var/filename
|
||||||
|
for (key in stylesheets)
|
||||||
|
filename = "[ckey(key)].css"
|
||||||
|
user << browse_rsc(stylesheets[key], filename)
|
||||||
|
head_content += "<link rel='stylesheet' type='text/css' href='[filename]'>"
|
||||||
|
|
||||||
|
for (key in scripts)
|
||||||
|
filename = "[ckey(key)].js"
|
||||||
|
user << browse_rsc(scripts[key], filename)
|
||||||
|
head_content += "<script type='text/javascript' src='[filename]'></script>"
|
||||||
|
|
||||||
|
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
|
<head>
|
||||||
|
[head_content]
|
||||||
|
</head>
|
||||||
|
<body scroll=auto>
|
||||||
|
"}
|
||||||
|
|
||||||
|
/datum/browser/clean/get_footer()
|
||||||
|
return {"
|
||||||
|
</body>
|
||||||
|
</html>"}
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
if (used)
|
if (used)
|
||||||
H << "You already used this contract!"
|
H << "You already used this contract!"
|
||||||
return
|
return
|
||||||
var/list/candidates = get_candidates(BE_WIZARD)
|
var/list/candidates = get_candidates(ROLE_WIZARD)
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
src.used = 1
|
src.used = 1
|
||||||
var/client/C = pick(candidates)
|
var/client/C = pick(candidates)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
possible_traitors = get_players_for_role(BE_TRAITOR)
|
possible_traitors = get_players_for_role(ROLE_TRAITOR)
|
||||||
|
|
||||||
for(var/datum/mind/player in possible_traitors)
|
for(var/datum/mind/player in possible_traitors)
|
||||||
for(var/job in restricted_jobs)
|
for(var/job in restricted_jobs)
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
playercount += 1
|
playercount += 1
|
||||||
if (player.client && player.mind && player.mind.special_role && player.stat != 2)
|
if (player.client && player.mind && player.mind.special_role && player.stat != 2)
|
||||||
traitorcount += 1
|
traitorcount += 1
|
||||||
if (player.client && player.mind && !player.mind.special_role && player.stat != 2 && (player.client && player.client.prefs.be_special & BE_TRAITOR) && !jobban_isbanned(player, "Syndicate") && !isMoMMI(player))
|
if (player.client && player.mind && !player.mind.special_role && player.stat != 2 && (player.client && player.client.desires_role(ROLE_TRAITOR)) && !jobban_isbanned(player, "Syndicate") && !isMoMMI(player))
|
||||||
possible_traitors += player
|
possible_traitors += player
|
||||||
for(var/datum/mind/player in possible_traitors)
|
for(var/datum/mind/player in possible_traitors)
|
||||||
for(var/job in restricted_jobs)
|
for(var/job in restricted_jobs)
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
if(emergency_shuttle.departed)
|
if(emergency_shuttle.departed)
|
||||||
return
|
return
|
||||||
//message_admins("Late Join Check")
|
//message_admins("Late Join Check")
|
||||||
if((character.client && character.client.prefs.be_special & BE_TRAITOR) && !jobban_isbanned(character, "Syndicate"))
|
if((character.client && character.client.desires_role(ROLE_TRAITOR)) && !jobban_isbanned(character, "Syndicate"))
|
||||||
//message_admins("Late Joiner has Be Syndicate")
|
//message_admins("Late Joiner has Be Syndicate")
|
||||||
//message_admins("Checking number of players")
|
//message_admins("Checking number of players")
|
||||||
var/playercount = 0
|
var/playercount = 0
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ var/list/blob_nodes = list()
|
|||||||
|
|
||||||
/datum/game_mode/blob/pre_setup()
|
/datum/game_mode/blob/pre_setup()
|
||||||
|
|
||||||
var/list/possible_blobs = get_players_for_role(BE_ALIEN)
|
var/list/possible_blobs = get_players_for_role(ROLE_BLOB)
|
||||||
|
|
||||||
// stop setup if no possible traitors
|
// stop setup if no possible traitors
|
||||||
if(!possible_blobs.len)
|
if(!possible_blobs.len)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
|
|
||||||
if(!new_overmind)
|
if(!new_overmind)
|
||||||
candidates = get_candidates(BE_ALIEN)
|
candidates = get_candidates(ROLE_BLOB)
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
C = pick(candidates)
|
C = pick(candidates)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
// also make sure that there's at least one borer and one host
|
// also make sure that there's at least one borer and one host
|
||||||
recommended_enemies = max(src.num_players() / 20 * 2, 2)
|
recommended_enemies = max(src.num_players() / 20 * 2, 2)
|
||||||
|
|
||||||
var/list/datum/mind/possible_borers = get_players_for_role(BE_ALIEN)
|
var/list/datum/mind/possible_borers = get_players_for_role(ROLE_BORER)
|
||||||
|
|
||||||
if(possible_borers.len < 2)
|
if(possible_borers.len < 2)
|
||||||
log_admin("MODE FAILURE: BORER. NOT ENOUGH BORER CANDIDATES.")
|
log_admin("MODE FAILURE: BORER. NOT ENOUGH BORER CANDIDATES.")
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||||
|
|
||||||
for(var/datum/mind/player in possible_changelings)
|
for(var/datum/mind/player in possible_changelings)
|
||||||
for(var/job in restricted_jobs)//Removing robots from the list
|
for(var/job in restricted_jobs)//Removing robots from the list
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||||
|
|
||||||
for(var/datum/mind/player in possible_changelings)
|
for(var/datum/mind/player in possible_changelings)
|
||||||
for(var/job in restricted_jobs)//Removing robots from the list
|
for(var/job in restricted_jobs)//Removing robots from the list
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/cultists_possible = get_players_for_role(BE_CULTIST)
|
var/list/cultists_possible = get_players_for_role(ROLE_CULTIST)
|
||||||
for(var/datum/mind/player in cultists_possible)
|
for(var/datum/mind/player in cultists_possible)
|
||||||
for(var/job in restricted_jobs)//Removing heads and such from the list
|
for(var/job in restricted_jobs)//Removing heads and such from the list
|
||||||
if(player.assigned_role == job)
|
if(player.assigned_role == job)
|
||||||
|
|||||||
@@ -158,19 +158,16 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
else
|
else
|
||||||
|
|
||||||
var/list/candidates = list() //list of candidate keys
|
var/list/candidates = list() //list of candidate keys
|
||||||
for(var/mob/dead/observer/G in player_list)
|
|
||||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_NINJA)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_NINJA, poll="Would you like to spawn as a space ninja?"))
|
||||||
|
if(G.client && !G.client.holder && !G.client.is_afk())
|
||||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||||
candidates += G
|
candidates += G
|
||||||
if(!candidates.len) return
|
|
||||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
|
||||||
|
|
||||||
while(!ninja_key && candidates.len)
|
if(!candidates.len) return
|
||||||
candidate_mob = pick(candidates)
|
|
||||||
if(sd_Alert(candidate_mob, "Would you like to spawn as a space ninja?", buttons = list("Yes","No"), duration = 150) == "Yes")
|
candidate_mob = pick(candidates)
|
||||||
ninja_key = candidate_mob.ckey
|
ninja_key=candidate_mob.ckey
|
||||||
else
|
|
||||||
candidates.Remove(candidate_mob)
|
|
||||||
|
|
||||||
if(!ninja_key)
|
if(!ninja_key)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -226,23 +226,12 @@
|
|||||||
set_security_level(SEC_LEVEL_BLUE)*/
|
set_security_level(SEC_LEVEL_BLUE)*/
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1)
|
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1, poll=0)
|
||||||
var/list/players = list()
|
var/list/players = list()
|
||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
var/list/drafted = list()
|
var/list/drafted = list()
|
||||||
var/datum/mind/applicant = null
|
var/datum/mind/applicant = null
|
||||||
|
|
||||||
var/roletext
|
|
||||||
switch(role)
|
|
||||||
if(BE_CHANGELING) roletext="changeling"
|
|
||||||
if(BE_TRAITOR) roletext="traitor"
|
|
||||||
if(BE_OPERATIVE) roletext="operative"
|
|
||||||
if(BE_WIZARD) roletext="wizard"
|
|
||||||
if(BE_REV) roletext="revolutionary"
|
|
||||||
if(BE_CULTIST) roletext="cultist"
|
|
||||||
if(BE_RAIDER) roletext="Vox Raider"
|
|
||||||
|
|
||||||
|
|
||||||
// Ultimate randomizing code right here
|
// Ultimate randomizing code right here
|
||||||
for(var/mob/new_player/player in player_list)
|
for(var/mob/new_player/player in player_list)
|
||||||
if(player.client && player.ready)
|
if(player.client && player.ready)
|
||||||
@@ -254,10 +243,10 @@
|
|||||||
|
|
||||||
for(var/mob/new_player/player in players)
|
for(var/mob/new_player/player in players)
|
||||||
if(player.client && player.ready)
|
if(player.client && player.ready)
|
||||||
if(player.client.prefs.be_special & role)
|
if(player.client.desires_role(role, display_to_user=poll))//if(player.client.prefs.be_special & role)
|
||||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
|
||||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||||
log_debug("[player.key] had [roletext] enabled, so drafting them.")
|
log_debug("[player.key] had [role] enabled, so drafting them.")
|
||||||
|
|
||||||
if(restricted_jobs)
|
if(restricted_jobs)
|
||||||
for(var/datum/mind/player in candidates)
|
for(var/datum/mind/player in candidates)
|
||||||
@@ -268,8 +257,8 @@
|
|||||||
if(candidates.len < recommended_enemies)
|
if(candidates.len < recommended_enemies)
|
||||||
for(var/mob/new_player/player in players)
|
for(var/mob/new_player/player in players)
|
||||||
if(player.client && player.ready)
|
if(player.client && player.ready)
|
||||||
if(!(player.client.prefs.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
if(player.client.desires_role(role, display_to_user=poll)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
|
||||||
drafted += player.mind
|
drafted += player.mind
|
||||||
|
|
||||||
if(restricted_jobs)
|
if(restricted_jobs)
|
||||||
@@ -285,7 +274,7 @@
|
|||||||
applicant = pick(drafted)
|
applicant = pick(drafted)
|
||||||
if(applicant)
|
if(applicant)
|
||||||
candidates += applicant
|
candidates += applicant
|
||||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
log_debug("[applicant.key] was force-drafted as [role], because there aren't enough candidates.")
|
||||||
drafted.Remove(applicant)
|
drafted.Remove(applicant)
|
||||||
|
|
||||||
else // Not enough scrubs, ABORT ABORT ABORT
|
else // Not enough scrubs, ABORT ABORT ABORT
|
||||||
@@ -294,7 +283,7 @@
|
|||||||
if(candidates.len < recommended_enemies && override_jobbans) //If we still don't have enough people, we're going to start drafting banned people.
|
if(candidates.len < recommended_enemies && override_jobbans) //If we still don't have enough people, we're going to start drafting banned people.
|
||||||
for(var/mob/new_player/player in players)
|
for(var/mob/new_player/player in players)
|
||||||
if (player.client && player.ready)
|
if (player.client && player.ready)
|
||||||
if(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
if(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
|
||||||
drafted += player.mind
|
drafted += player.mind
|
||||||
|
|
||||||
if(restricted_jobs)
|
if(restricted_jobs)
|
||||||
@@ -311,7 +300,7 @@
|
|||||||
if(applicant)
|
if(applicant)
|
||||||
candidates += applicant
|
candidates += applicant
|
||||||
drafted.Remove(applicant)
|
drafted.Remove(applicant)
|
||||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
log_debug("[applicant.key] was force-drafted as [role], because there aren't enough candidates.")
|
||||||
|
|
||||||
else // Not enough scrubs, ABORT ABORT ABORT
|
else // Not enough scrubs, ABORT ABORT ABORT
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
if(!..())
|
if(!..())
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/list/candidates = get_players_for_role(BE_RAIDER)
|
var/list/candidates = get_players_for_role(ROLE_VOXRAIDER)
|
||||||
var/raider_num = 0
|
var/raider_num = 0
|
||||||
|
|
||||||
//Check that we have enough vox.
|
//Check that we have enough vox.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
/datum/game_mode/malfunction/pre_setup()
|
/datum/game_mode/malfunction/pre_setup()
|
||||||
for(var/mob/new_player/player in player_list)
|
for(var/mob/new_player/player in player_list)
|
||||||
if(player.mind && player.mind.assigned_role == "AI" && (player.client.prefs.be_special & BE_MALF))
|
if(player.mind && player.mind.assigned_role == "AI" && player.client.desires_role(ROLE_MALF))
|
||||||
malf_ai+=player.mind
|
malf_ai+=player.mind
|
||||||
if(malf_ai.len)
|
if(malf_ai.len)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
if(!..())
|
if(!..())
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/list/possible_syndicates = get_players_for_role(BE_OPERATIVE)
|
var/list/possible_syndicates = get_players_for_role(ROLE_OPERATIVE)
|
||||||
var/agent_number = 0
|
var/agent_number = 0
|
||||||
|
|
||||||
if(possible_syndicates.len < 1)
|
if(possible_syndicates.len < 1)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV)
|
var/list/datum/mind/possible_headrevs = get_players_for_role(ROLE_REV)
|
||||||
|
|
||||||
var/head_check = 0
|
var/head_check = 0
|
||||||
for(var/mob/new_player/player in player_list)
|
for(var/mob/new_player/player in player_list)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/possible_traitors = get_players_for_role(BE_TRAITOR)
|
var/list/possible_traitors = get_players_for_role(ROLE_TRAITOR)
|
||||||
|
|
||||||
// stop setup if no possible traitors
|
// stop setup if no possible traitors
|
||||||
if(!possible_traitors.len)
|
if(!possible_traitors.len)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
if(config.protect_roles_from_antagonist)
|
if(config.protect_roles_from_antagonist)
|
||||||
restricted_jobs += protected_jobs
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
var/list/datum/mind/possible_vampires = get_players_for_role(BE_VAMPIRE)
|
var/list/datum/mind/possible_vampires = get_players_for_role(ROLE_VAMPIRE)
|
||||||
|
|
||||||
for(var/datum/mind/player in possible_vampires)
|
for(var/datum/mind/player in possible_vampires)
|
||||||
for(var/job in restricted_jobs)//Removing robots from the list
|
for(var/job in restricted_jobs)//Removing robots from the list
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
spawn(rand(200, 600))
|
spawn(rand(200, 600))
|
||||||
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
|
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in player_list)
|
||||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_WIZARD)
|
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.desires_role(ROLE_WIZARD))
|
||||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||||
candidates += G
|
candidates += G
|
||||||
if(!candidates.len)
|
if(!candidates.len)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
/datum/game_mode/wizard/can_start()//This could be better, will likely have to recode it later
|
/datum/game_mode/wizard/can_start()//This could be better, will likely have to recode it later
|
||||||
if(!..())
|
if(!..())
|
||||||
return 0
|
return 0
|
||||||
var/list/datum/mind/possible_wizards = get_players_for_role(BE_WIZARD)
|
var/list/datum/mind/possible_wizards = get_players_for_role(ROLE_WIZARD)
|
||||||
if(possible_wizards.len==0)
|
if(possible_wizards.len==0)
|
||||||
return 0
|
return 0
|
||||||
var/datum/mind/wizard
|
var/datum/mind/wizard
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
if(!job.player_old_enough(player.client))
|
if(!job.player_old_enough(player.client))
|
||||||
Debug("FOC player not old enough, Player: [player]")
|
Debug("FOC player not old enough, Player: [player]")
|
||||||
continue
|
continue
|
||||||
if(flag && (!player.client.prefs.be_special & flag))
|
if(flag && !player.client.desires_role(job.title))
|
||||||
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
||||||
continue
|
continue
|
||||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||||
@@ -163,7 +163,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
for(var/level = 1 to 3)
|
for(var/level = 1 to 3)
|
||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
if(ticker.mode.name == "AI malfunction")//Make sure they want to malf if its malf
|
if(ticker.mode.name == "AI malfunction")//Make sure they want to malf if its malf
|
||||||
candidates = FindOccupationCandidates(job, level, BE_MALF)
|
candidates = FindOccupationCandidates(job, level, ROLE_MALF)
|
||||||
else
|
else
|
||||||
candidates = FindOccupationCandidates(job, level)
|
candidates = FindOccupationCandidates(job, level)
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ client/proc/one_click_antag()
|
|||||||
var/mob/living/carbon/human/H = null
|
var/mob/living/carbon/human/H = null
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/applicant in player_list)
|
for(var/mob/living/carbon/human/applicant in player_list)
|
||||||
if(applicant.client.prefs.be_special & BE_TRAITOR)
|
if(applicant.client.desires_role(ROLE_TRAITOR))
|
||||||
if(!applicant.stat)
|
if(!applicant.stat)
|
||||||
if(applicant.mind)
|
if(applicant.mind)
|
||||||
if (!applicant.mind.special_role)
|
if (!applicant.mind.special_role)
|
||||||
@@ -91,7 +91,7 @@ client/proc/one_click_antag()
|
|||||||
var/mob/living/carbon/human/H = null
|
var/mob/living/carbon/human/H = null
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/applicant in player_list)
|
for(var/mob/living/carbon/human/applicant in player_list)
|
||||||
if(applicant.client.prefs.be_special & BE_CHANGELING)
|
if(applicant.client.desires_role(ROLE_CHANGELING))
|
||||||
if(!applicant.stat)
|
if(!applicant.stat)
|
||||||
if(applicant.mind)
|
if(applicant.mind)
|
||||||
if (!applicant.mind.special_role)
|
if (!applicant.mind.special_role)
|
||||||
@@ -121,7 +121,7 @@ client/proc/one_click_antag()
|
|||||||
var/mob/living/carbon/human/H = null
|
var/mob/living/carbon/human/H = null
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/applicant in player_list)
|
for(var/mob/living/carbon/human/applicant in player_list)
|
||||||
if(applicant.client.prefs.be_special & BE_REV)
|
if(applicant.client.desires_role(ROLE_REV))
|
||||||
if(applicant.stat == CONSCIOUS)
|
if(applicant.stat == CONSCIOUS)
|
||||||
if(applicant.mind)
|
if(applicant.mind)
|
||||||
if(!applicant.mind.special_role)
|
if(!applicant.mind.special_role)
|
||||||
@@ -143,22 +143,10 @@ client/proc/one_click_antag()
|
|||||||
/datum/admins/proc/makeWizard()
|
/datum/admins/proc/makeWizard()
|
||||||
var/list/mob/dead/observer/candidates = list()
|
var/list/mob/dead/observer/candidates = list()
|
||||||
var/mob/dead/observer/theghost = null
|
var/mob/dead/observer/theghost = null
|
||||||
var/time_passed = world.time
|
|
||||||
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_WIZARD,poll="Do you wish to be considered for the Space Wizard Federation \"Ambassador\"?"))
|
||||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||||
spawn(0)
|
candidates += G
|
||||||
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
|
||||||
if("Yes")
|
|
||||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
|
||||||
return
|
|
||||||
candidates += G
|
|
||||||
if("No")
|
|
||||||
return
|
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
sleep(300)
|
|
||||||
|
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
shuffle(candidates)
|
shuffle(candidates)
|
||||||
@@ -185,14 +173,13 @@ client/proc/one_click_antag()
|
|||||||
var/list/mob/living/carbon/human/candidates = list()
|
var/list/mob/living/carbon/human/candidates = list()
|
||||||
var/mob/living/carbon/human/H = null
|
var/mob/living/carbon/human/H = null
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/applicant in player_list)
|
for(var/mob/living/carbon/human/applicant in get_active_candidates(ROLE_CULTIST))
|
||||||
if(applicant.client.prefs.be_special & BE_CULTIST)
|
if(applicant.stat == CONSCIOUS)
|
||||||
if(applicant.stat == CONSCIOUS)
|
if(applicant.mind)
|
||||||
if(applicant.mind)
|
if(!applicant.mind.special_role)
|
||||||
if(!applicant.mind.special_role)
|
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
if(!(applicant.job in temp.restricted_jobs))
|
||||||
if(!(applicant.job in temp.restricted_jobs))
|
candidates += applicant
|
||||||
candidates += applicant
|
|
||||||
|
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
var/numCultists = min(candidates.len, 4)
|
var/numCultists = min(candidates.len, 4)
|
||||||
@@ -214,22 +201,10 @@ client/proc/one_click_antag()
|
|||||||
var/list/mob/dead/observer/candidates = list()
|
var/list/mob/dead/observer/candidates = list()
|
||||||
var/mob/dead/observer/theghost = null
|
var/mob/dead/observer/theghost = null
|
||||||
var/list/mob/dead/observer/picked = list()
|
var/list/mob/dead/observer/picked = list()
|
||||||
var/time_passed = world.time
|
|
||||||
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_OPERATIVE,poll="Do you wish to be considered for a nuke team being sent in?"))
|
||||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||||
spawn(0)
|
candidates += G
|
||||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
|
||||||
if("Yes")
|
|
||||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
|
||||||
return
|
|
||||||
candidates += G
|
|
||||||
if("No")
|
|
||||||
return
|
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
sleep(300)
|
|
||||||
|
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
var/numagents = 5
|
var/numagents = 5
|
||||||
@@ -319,7 +294,6 @@ client/proc/one_click_antag()
|
|||||||
/datum/admins/proc/makeDeathsquad()
|
/datum/admins/proc/makeDeathsquad()
|
||||||
var/list/mob/dead/observer/candidates = list()
|
var/list/mob/dead/observer/candidates = list()
|
||||||
var/mob/dead/observer/theghost = null
|
var/mob/dead/observer/theghost = null
|
||||||
var/time_passed = world.time
|
|
||||||
var/input = "Purify the station."
|
var/input = "Purify the station."
|
||||||
if(prob(10))
|
if(prob(10))
|
||||||
input = "Save Runtime and any other cute things on the station."
|
input = "Save Runtime and any other cute things on the station."
|
||||||
@@ -327,18 +301,9 @@ client/proc/one_click_antag()
|
|||||||
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||||
|
|
||||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_COMMANDO, poll="Do you wish to be considered for an elite syndicate strike team being sent in?"))
|
||||||
spawn(0)
|
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
candidates += G
|
||||||
if("Yes")
|
|
||||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
|
||||||
return
|
|
||||||
candidates += G
|
|
||||||
if("No")
|
|
||||||
return
|
|
||||||
else
|
|
||||||
return
|
|
||||||
sleep(300)
|
|
||||||
|
|
||||||
for(var/mob/dead/observer/G in candidates)
|
for(var/mob/dead/observer/G in candidates)
|
||||||
if(!G.key)
|
if(!G.key)
|
||||||
@@ -434,25 +399,13 @@ client/proc/one_click_antag()
|
|||||||
|
|
||||||
var/list/mob/dead/observer/candidates = list()
|
var/list/mob/dead/observer/candidates = list()
|
||||||
var/mob/dead/observer/theghost = null
|
var/mob/dead/observer/theghost = null
|
||||||
var/time_passed = world.time
|
|
||||||
var/input = "Disregard shinies, acquire hardware."
|
var/input = "Disregard shinies, acquire hardware."
|
||||||
|
|
||||||
var/leader_chosen = 0 //when the leader is chosen. The last person spawned.
|
var/leader_chosen = 0 //when the leader is chosen. The last person spawned.
|
||||||
|
|
||||||
//Generates a list of candidates from active ghosts.
|
//Generates a list of candidates from active ghosts.
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_VOXRAIDER, poll="Do you wish to be considered for a vox raiding party arriving on the station?"))
|
||||||
spawn(0)
|
candidates += G
|
||||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
|
||||||
if("Yes")
|
|
||||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
|
||||||
return
|
|
||||||
candidates += G
|
|
||||||
if("No")
|
|
||||||
return
|
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
sleep(300) //Debug.
|
|
||||||
|
|
||||||
for(var/mob/dead/observer/G in candidates)
|
for(var/mob/dead/observer/G in candidates)
|
||||||
if(!G.key)
|
if(!G.key)
|
||||||
|
|||||||
@@ -197,9 +197,8 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
|||||||
/proc/create_xeno(ckey)
|
/proc/create_xeno(ckey)
|
||||||
if(!ckey)
|
if(!ckey)
|
||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
for(var/mob/M in player_list)
|
for(var/mob/M in get_active_candidates(ROLE_ALIEN))
|
||||||
if(M.stat != DEAD) continue //we are not dead!
|
if(M.stat != DEAD) continue //we are not dead!
|
||||||
if(!M.client.prefs.be_special & BE_ALIEN) continue //we don't want to be an alium
|
|
||||||
if(M.client.is_afk()) continue //we are afk
|
if(M.client.is_afk()) continue //we are afk
|
||||||
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
|
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
|
||||||
candidates += M.ckey
|
candidates += M.ckey
|
||||||
|
|||||||
@@ -305,3 +305,21 @@
|
|||||||
'icons/xenoarch_icons/chart3.jpg',
|
'icons/xenoarch_icons/chart3.jpg',
|
||||||
'icons/xenoarch_icons/chart4.jpg'
|
'icons/xenoarch_icons/chart4.jpg'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
/proc/get_role_desire_str(var/rolepref)
|
||||||
|
if((rolepref & (ROLEPREF_ENABLE|ROLEPREF_PERSIST)) == ROLEPREF_PERSIST)
|
||||||
|
return "Never"
|
||||||
|
if((rolepref & (ROLEPREF_ENABLE|ROLEPREF_PERSIST)) == 0)
|
||||||
|
return "No"
|
||||||
|
if((rolepref & (ROLEPREF_ENABLE|ROLEPREF_PERSIST)) == ROLEPREF_ENABLE)
|
||||||
|
return "Yes"
|
||||||
|
if((rolepref & (ROLEPREF_ENABLE|ROLEPREF_PERSIST)) == (ROLEPREF_ENABLE|ROLEPREF_PERSIST))
|
||||||
|
return "Always"
|
||||||
|
return "???"
|
||||||
|
|
||||||
|
/client/proc/desires_role(var/role_id, var/display_to_user=0)
|
||||||
|
var/role_desired = prefs.roles[role_id]
|
||||||
|
if(display_to_user)
|
||||||
|
src << "<span style='sinister'>The game is currently looking for [role_id] candidates. Your current answer is <a href='?src=\ref[prefs]&reset_role_pref=[role_id]'>[get_role_desire_str(role_desired)]</a>.</span>"
|
||||||
|
return role_desired & ROLEPREF_ENABLE
|
||||||
@@ -2,22 +2,23 @@
|
|||||||
|
|
||||||
var/list/preferences_datums = list()
|
var/list/preferences_datums = list()
|
||||||
|
|
||||||
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf
|
var/global/list/special_roles = list(
|
||||||
//some autodetection here.
|
ROLE_ALIEN = 1, //always show
|
||||||
"traitor" = IS_MODE_COMPILED("traitor"), // 0
|
ROLE_BLOB = 1,
|
||||||
"operative" = IS_MODE_COMPILED("nuclear"), // 1
|
ROLE_BORER = 1,
|
||||||
"changeling" = IS_MODE_COMPILED("changeling"), // 2
|
ROLE_CHANGELING = IS_MODE_COMPILED("changeling"),
|
||||||
"wizard" = IS_MODE_COMPILED("wizard"), // 3
|
ROLE_CULTIST = IS_MODE_COMPILED("cult"),
|
||||||
"malf AI" = IS_MODE_COMPILED("malfunction"), // 4
|
ROLE_PLANT = 1,
|
||||||
"revolutionary" = IS_MODE_COMPILED("revolution"), // 5
|
"infested monkey" = IS_MODE_COMPILED("monkey"),
|
||||||
"alien candidate" = 1, //always show // 6
|
ROLE_MALF = IS_MODE_COMPILED("malfunction"),
|
||||||
"pAI candidate" = 1, // -- TLE // 7
|
ROLE_NINJA = 1,
|
||||||
"cultist" = IS_MODE_COMPILED("cult"), // 8
|
ROLE_OPERATIVE = IS_MODE_COMPILED("nuclear"),
|
||||||
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
|
ROLE_PAI = 1, // -- TLE
|
||||||
"ninja" = "true", // 10
|
ROLE_REV = IS_MODE_COMPILED("revolution"),
|
||||||
"vox raider" = IS_MODE_COMPILED("heist"), // 11
|
ROLE_TRAITOR = IS_MODE_COMPILED("traitor"),
|
||||||
"diona" = 1, // 12
|
ROLE_VAMPIRE = IS_MODE_COMPILED("vampire"),
|
||||||
"vampire" = IS_MODE_COMPILED("vampire") // 13
|
ROLE_VOXRAIDER = IS_MODE_COMPILED("heist"),
|
||||||
|
ROLE_WIZARD = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
var/const/MAX_SAVE_SLOTS = 8
|
var/const/MAX_SAVE_SLOTS = 8
|
||||||
@@ -28,7 +29,7 @@ var/const/MAX_SAVE_SLOTS = 8
|
|||||||
#define RETURN_TO_LOBBY 2
|
#define RETURN_TO_LOBBY 2
|
||||||
#define POLLED_LIMIT 300
|
#define POLLED_LIMIT 300
|
||||||
|
|
||||||
datum/preferences
|
/datum/preferences
|
||||||
//doohickeys for savefiles
|
//doohickeys for savefiles
|
||||||
var/database/db = ("players2.sqlite")
|
var/database/db = ("players2.sqlite")
|
||||||
var/path
|
var/path
|
||||||
@@ -49,7 +50,6 @@ datum/preferences
|
|||||||
//game-preferences
|
//game-preferences
|
||||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||||
var/ooccolor = "#b82e00"
|
var/ooccolor = "#b82e00"
|
||||||
var/be_special = 0 //Special role selection
|
|
||||||
var/UI_style = "Midnight"
|
var/UI_style = "Midnight"
|
||||||
var/toggles = TOGGLES_DEFAULT
|
var/toggles = TOGGLES_DEFAULT
|
||||||
var/UI_style_color = "#ffffff"
|
var/UI_style_color = "#ffffff"
|
||||||
@@ -127,8 +127,14 @@ datum/preferences
|
|||||||
|
|
||||||
// jukebox volume
|
// jukebox volume
|
||||||
var/volume = 100
|
var/volume = 100
|
||||||
|
|
||||||
|
var/list/roles=list() // "role" => ROLEPREF_*
|
||||||
|
|
||||||
|
var/client/client
|
||||||
|
|
||||||
/datum/preferences/New(client/C)
|
/datum/preferences/New(client/C)
|
||||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||||
|
client=C
|
||||||
if(istype(C))
|
if(istype(C))
|
||||||
if(!IsGuestKey(C.key))
|
if(!IsGuestKey(C.key))
|
||||||
var/load_pref = load_preferences_sqlite(C.ckey)
|
var/load_pref = load_preferences_sqlite(C.ckey)
|
||||||
@@ -338,9 +344,7 @@ datum/preferences
|
|||||||
// END AUTOFIX
|
// END AUTOFIX
|
||||||
if(jobban_isbanned(user, "Syndicate"))
|
if(jobban_isbanned(user, "Syndicate"))
|
||||||
dat += "<b>You are banned from antagonist roles.</b>"
|
dat += "<b>You are banned from antagonist roles.</b>"
|
||||||
src.be_special = 0
|
|
||||||
else
|
else
|
||||||
var/n = 0
|
|
||||||
for (var/i in special_roles)
|
for (var/i in special_roles)
|
||||||
if(special_roles[i]) //if mode is available on the server
|
if(special_roles[i]) //if mode is available on the server
|
||||||
if(jobban_isbanned(user, i))
|
if(jobban_isbanned(user, i))
|
||||||
@@ -349,8 +353,7 @@ datum/preferences
|
|||||||
if(jobban_isbanned(user, "pAI"))
|
if(jobban_isbanned(user, "pAI"))
|
||||||
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||||
else
|
else
|
||||||
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
|
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=toggle_role;role_id=[i]'><b>[roles[i] & ROLEPREF_ENABLE ? "Yes" : "No"]</b></a><br>"
|
||||||
n++
|
|
||||||
dat += "</td></tr></table><hr><center>"
|
dat += "</td></tr></table><hr><center>"
|
||||||
|
|
||||||
if(!IsGuestKey(user.key))
|
if(!IsGuestKey(user.key))
|
||||||
@@ -677,10 +680,43 @@ datum/preferences
|
|||||||
job_engsec_low |= job.flag
|
job_engsec_low |= job.flag
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
proc/process_link(mob/user, list/href_list)
|
proc/SetRoles(var/mob/user, var/list/href_list)
|
||||||
if(!user) return
|
// We just grab the role from the POST(?) data.
|
||||||
|
for(var/role_id in special_roles)
|
||||||
|
if(!(role_id in href_list))
|
||||||
|
user << "<span class='danger'>BUG: Unable to find role [role_id].</span>"
|
||||||
|
continue
|
||||||
|
var/oldval=roles[role_id]
|
||||||
|
roles[role_id] = text2num(href_list[role_id])
|
||||||
|
if(oldval!=roles[role_id])
|
||||||
|
user << "<span class='info'>Set role [role_id] to [get_role_desire_str(user.client.prefs.roles[role_id])]!</span>"
|
||||||
|
|
||||||
|
save_preferences_sqlite(user, user.ckey)
|
||||||
|
save_character_sqlite(user.ckey, user, default_slot)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
proc/ToggleRole(var/mob/user, var/list/href_list)
|
||||||
|
var/role_id = href_list["role_id"]
|
||||||
|
//user << "<span class='info'>Toggling role [role_id] (currently at [roles[role_id]])...</span>"
|
||||||
|
if(!(role_id in special_roles))
|
||||||
|
user << "<span class='danger'>BUG: Unable to find role [role_id].</span>"
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if(roles[role_id] == null || roles[role_id] == "")
|
||||||
|
roles[role_id] = 0
|
||||||
|
// Always set persist.
|
||||||
|
roles[role_id] |= ROLEPREF_PERSIST
|
||||||
|
// Toggle role enable
|
||||||
|
roles[role_id] ^= ROLEPREF_ENABLE
|
||||||
|
return 1
|
||||||
|
|
||||||
|
proc/process_link(mob/user, list/href_list)
|
||||||
|
if(!user)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!istype(user, /mob/new_player))
|
||||||
|
return
|
||||||
|
|
||||||
if(!istype(user, /mob/new_player)) return
|
|
||||||
if(href_list["preference"] == "job")
|
if(href_list["preference"] == "job")
|
||||||
switch(href_list["task"])
|
switch(href_list["task"])
|
||||||
if("close")
|
if("close")
|
||||||
@@ -764,6 +800,12 @@ datum/preferences
|
|||||||
gen_record = genmsg
|
gen_record = genmsg
|
||||||
SetRecords(user)
|
SetRecords(user)
|
||||||
|
|
||||||
|
else if(href_list["preference"] == "set_roles")
|
||||||
|
return SetRoles(user,href_list)
|
||||||
|
|
||||||
|
else if(href_list["preference"] == "toggle_role")
|
||||||
|
ToggleRole(user,href_list)
|
||||||
|
|
||||||
switch(href_list["task"])
|
switch(href_list["task"])
|
||||||
if("random")
|
if("random")
|
||||||
switch(href_list["preference"])
|
switch(href_list["preference"])
|
||||||
@@ -1128,10 +1170,6 @@ datum/preferences
|
|||||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||||
UI_style_alpha = UI_style_alpha_new
|
UI_style_alpha = UI_style_alpha_new
|
||||||
|
|
||||||
if("be_special")
|
|
||||||
var/num = text2num(href_list["num"])
|
|
||||||
be_special ^= (1<<num)
|
|
||||||
|
|
||||||
if("name")
|
if("name")
|
||||||
be_random_name = !be_random_name
|
be_random_name = !be_random_name
|
||||||
|
|
||||||
@@ -1330,3 +1368,66 @@ datum/preferences
|
|||||||
|
|
||||||
proc/close_load_dialog(mob/user)
|
proc/close_load_dialog(mob/user)
|
||||||
user << browse(null, "window=saves")
|
user << browse(null, "window=saves")
|
||||||
|
|
||||||
|
proc/configure_special_roles(var/mob/user)
|
||||||
|
var/html={"
|
||||||
|
<form method="get">
|
||||||
|
<input type="hidden" name="src" value="\ref[src]" />
|
||||||
|
<input type="hidden" name="preference" value="set_roles" />
|
||||||
|
<h1>Special Role Preferences</h1>
|
||||||
|
<p>Please note that this also handles in-round polling for things like Raging Mages and Borers.</p>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Legend</legend>
|
||||||
|
<dl>
|
||||||
|
<dt>Never:</dt>
|
||||||
|
<dd>Always answer no to this role.</dd>
|
||||||
|
<dt>No:</dt>
|
||||||
|
<dd>Answer no for this round. (Default)</dd>
|
||||||
|
<dt>Yes:</dt>
|
||||||
|
<dd>Answer yes for this round.</dd>
|
||||||
|
<dt>Always:</dt>
|
||||||
|
<dd>Always answer yes to this role.</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
<table border=\"0\">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Role</th>
|
||||||
|
<th class="clmNever">Never</th>
|
||||||
|
<th class="clmNo">No</th>
|
||||||
|
<th class="clmYes">Yes</th>
|
||||||
|
<th class="clmAlways">Always</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>"}
|
||||||
|
for(var/role_id in special_roles)
|
||||||
|
var/desire = get_role_desire_str(roles[role_id])
|
||||||
|
html += {"
|
||||||
|
<tr>
|
||||||
|
<th>[role_id]</th>
|
||||||
|
<td class='column clmNever'><input type="radio" name="[role_id]" value="[ROLEPREF_PERSIST]" title="Never"[desire=="Never"?" checked='checked'":""]/></td>
|
||||||
|
<td class='column clmNo'><input type="radio" name="[role_id]" value="0" title="No"[desire=="No"?" checked='checked'":""] /></td>
|
||||||
|
<td class='column clmYes'><input type="radio" name="[role_id]" value="[ROLEPREF_ENABLE]" title="Yes"[desire=="Yes"?" checked='checked'":""] /></td>
|
||||||
|
<td class='column clmAlways'><input type="radio" name="[role_id]" value="[ROLEPREF_ENABLE|ROLEPREF_PERSIST]" title="Always"[desire=="Always"?" checked='checked'":""] /></td>
|
||||||
|
</tr>
|
||||||
|
"}
|
||||||
|
html += {"
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<input type="submit" value="Submit" />
|
||||||
|
<input type="reset" value="Reset" />
|
||||||
|
</form>"}
|
||||||
|
var/datum/browser/B = new /datum/browser/clean(user, "roles", "Role Selections", 300, 390)
|
||||||
|
B.set_content(html)
|
||||||
|
B.add_stylesheet("specialroles", 'html/browser/config_roles.css')
|
||||||
|
B.open()
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
if(!usr)
|
||||||
|
return
|
||||||
|
if(client.mob!=usr)
|
||||||
|
usr << "YOU AREN'T ME GO AWAY"
|
||||||
|
return
|
||||||
|
switch(href_list["preference"])
|
||||||
|
if("set_roles")
|
||||||
|
return SetRoles(usr, href_list)
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/datum/preferences/proc/savefile_update()
|
/datum/preferences/proc/savefile_update()
|
||||||
|
// Preseed roles.
|
||||||
|
for(var/role_id in special_roles)
|
||||||
|
roles[role_id]=0
|
||||||
|
|
||||||
if(savefile_version < 8) //lazily delete everything + additional files so they can be saved in the new format
|
if(savefile_version < 8) //lazily delete everything + additional files so they can be saved in the new format
|
||||||
for(var/ckey in preferences_datums)
|
for(var/ckey in preferences_datums)
|
||||||
var/datum/preferences/D = preferences_datums[ckey]
|
var/datum/preferences/D = preferences_datums[ckey]
|
||||||
@@ -74,7 +78,7 @@
|
|||||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
||||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
//be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||||
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
||||||
@@ -106,7 +110,7 @@
|
|||||||
S["ooccolor"] >> ooccolor
|
S["ooccolor"] >> ooccolor
|
||||||
S["lastchangelog"] >> lastchangelog
|
S["lastchangelog"] >> lastchangelog
|
||||||
S["UI_style"] >> UI_style
|
S["UI_style"] >> UI_style
|
||||||
S["be_special"] >> be_special
|
//S["be_special"] >> be_special
|
||||||
S["default_slot"] >> default_slot
|
S["default_slot"] >> default_slot
|
||||||
S["toggles"] >> toggles
|
S["toggles"] >> toggles
|
||||||
S["UI_style_color"] >> UI_style_color
|
S["UI_style_color"] >> UI_style_color
|
||||||
@@ -120,7 +124,7 @@
|
|||||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
||||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
//be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||||
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
||||||
@@ -174,7 +178,7 @@
|
|||||||
S["ooccolor"] << ooccolor
|
S["ooccolor"] << ooccolor
|
||||||
S["lastchangelog"] << lastchangelog
|
S["lastchangelog"] << lastchangelog
|
||||||
S["UI_style"] << UI_style
|
S["UI_style"] << UI_style
|
||||||
S["be_special"] << be_special
|
//S["be_special"] << be_special
|
||||||
S["default_slot"] << default_slot
|
S["default_slot"] << default_slot
|
||||||
S["toggles"] << toggles
|
S["toggles"] << toggles
|
||||||
S["UI_style_color"] << UI_style_color
|
S["UI_style_color"] << UI_style_color
|
||||||
@@ -197,7 +201,7 @@
|
|||||||
|
|
||||||
/datum/preferences/proc/load_save_sqlite(var/ckey, var/user, var/slot)
|
/datum/preferences/proc/load_save_sqlite(var/ckey, var/user, var/slot)
|
||||||
var/list/preference_list = new
|
var/list/preference_list = new
|
||||||
var/database/query/q = new
|
var/database/query/q = new
|
||||||
var/database/query/check = new
|
var/database/query/check = new
|
||||||
|
|
||||||
check.Add("SELECT player_ckey FROM players WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
check.Add("SELECT player_ckey FROM players WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
||||||
@@ -238,7 +242,6 @@ SELECT
|
|||||||
players.sec_record,
|
players.sec_record,
|
||||||
players.gen_record,
|
players.gen_record,
|
||||||
players.player_alt_titles,
|
players.player_alt_titles,
|
||||||
players.be_special,
|
|
||||||
players.disabilities,
|
players.disabilities,
|
||||||
players.nanotrasen_relation,
|
players.nanotrasen_relation,
|
||||||
jobs.player_ckey,
|
jobs.player_ckey,
|
||||||
@@ -329,7 +332,6 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
sec_record = preference_list["sec_record"]
|
sec_record = preference_list["sec_record"]
|
||||||
gen_record = preference_list["gen_record"]
|
gen_record = preference_list["gen_record"]
|
||||||
player_alt_titles = player_alt_list2
|
player_alt_titles = player_alt_list2
|
||||||
be_special = text2num(preference_list["be_special"])
|
|
||||||
disabilities = text2num(preference_list["disabilities"])
|
disabilities = text2num(preference_list["disabilities"])
|
||||||
nanotrasen_relation = preference_list["nanotrasen_relation"]
|
nanotrasen_relation = preference_list["nanotrasen_relation"]
|
||||||
|
|
||||||
@@ -406,7 +408,7 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
|
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
|
||||||
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
|
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
|
||||||
b_type = sanitize_text(b_type, initial(b_type))
|
b_type = sanitize_text(b_type, initial(b_type))
|
||||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
//be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||||
|
|
||||||
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
||||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||||
@@ -419,6 +421,17 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
||||||
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
||||||
|
|
||||||
|
q = new
|
||||||
|
q.Add("SELECT role, preference FROM client_roles WHERE ckey=? AND slot=?", ckey, slot)
|
||||||
|
if(q.Execute(db))
|
||||||
|
while(q.NextRow())
|
||||||
|
var/list/row = q.GetRowData()
|
||||||
|
roles[row["role"]] = text2num(row["preference"]) | ROLEPREF_PERSIST
|
||||||
|
else
|
||||||
|
message_admins("Error #: [q.Error()] - [q.ErrorMsg()]")
|
||||||
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
|
return 0
|
||||||
|
|
||||||
if(!skills) skills = list()
|
if(!skills) skills = list()
|
||||||
if(!used_skillpoints) used_skillpoints= 0
|
if(!used_skillpoints) used_skillpoints= 0
|
||||||
if(isnull(disabilities)) disabilities = 0
|
if(isnull(disabilities)) disabilities = 0
|
||||||
@@ -478,7 +491,7 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
S["med_record"] >> med_record
|
S["med_record"] >> med_record
|
||||||
S["sec_record"] >> sec_record
|
S["sec_record"] >> sec_record
|
||||||
S["gen_record"] >> gen_record
|
S["gen_record"] >> gen_record
|
||||||
S["be_special"] >> be_special
|
//S["be_special"] >> be_special
|
||||||
S["disabilities"] >> disabilities
|
S["disabilities"] >> disabilities
|
||||||
S["player_alt_titles"] >> player_alt_titles
|
S["player_alt_titles"] >> player_alt_titles
|
||||||
S["used_skillpoints"] >> used_skillpoints
|
S["used_skillpoints"] >> used_skillpoints
|
||||||
@@ -584,8 +597,6 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
load_save(S.cd)
|
load_save(S.cd)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/datum/preferences/proc/save_character_sqlite(var/ckey, var/user, var/slot)
|
/datum/preferences/proc/save_character_sqlite(var/ckey, var/user, var/slot)
|
||||||
|
|
||||||
if(slot > MAX_SAVE_SLOTS)
|
if(slot > MAX_SAVE_SLOTS)
|
||||||
@@ -603,17 +614,18 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
|
|
||||||
check.Add("SELECT player_ckey FROM players WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
check.Add("SELECT player_ckey FROM players WHERE player_ckey = ? AND player_slot = ?", ckey, slot)
|
||||||
if(check.Execute(db))
|
if(check.Execute(db))
|
||||||
if(!check.NextRow()) //1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
if(!check.NextRow()) //1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||||
q.Add("INSERT INTO players (player_ckey,player_slot,ooc_notes,real_name,random_name,gender,age,species,language,flavor_text,med_record,sec_record,gen_record,player_alt_titles,be_special,disabilities,nanotrasen_relation) \
|
q.Add("INSERT INTO players (player_ckey,player_slot,ooc_notes,real_name,random_name,gender,age,species,language,flavor_text,med_record,sec_record,gen_record,player_alt_titles,disabilities,nanotrasen_relation) \
|
||||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", ckey, slot, metadata, real_name, be_random_name, gender, age, species, language, flavor_text, med_record, sec_record, gen_record, altTitles, be_special, disabilities, nanotrasen_relation)
|
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||||
|
ckey, slot, metadata, real_name, be_random_name, gender, age, species, language, flavor_text, med_record, sec_record, gen_record, altTitles, disabilities, nanotrasen_relation)
|
||||||
if(!q.Execute(db))
|
if(!q.Execute(db))
|
||||||
message_admins("Error #:[q.Error()] - [q.ErrorMsg()]")
|
message_admins("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
return 0
|
return 0
|
||||||
user << "Created Character"
|
user << "Created Character"
|
||||||
else
|
else
|
||||||
q.Add("UPDATE players SET ooc_notes=?,real_name=?,random_name=?,gender=?,age=?,species=?,language=?,flavor_text=?,med_record=?,sec_record=?,gen_record=?,player_alt_titles=?,be_special=?,disabilities=?,nanotrasen_relation=? WHERE player_ckey = ? AND player_slot = ?",\
|
q.Add("UPDATE players SET ooc_notes=?,real_name=?,random_name=?,gender=?,age=?,species=?,language=?,flavor_text=?,med_record=?,sec_record=?,gen_record=?,player_alt_titles=?,disabilities=?,nanotrasen_relation=? WHERE player_ckey = ? AND player_slot = ?",\
|
||||||
metadata, real_name, be_random_name, gender, age, species, language, flavor_text, med_record, sec_record, gen_record, altTitles, be_special, disabilities, nanotrasen_relation, ckey, slot)
|
metadata, real_name, be_random_name, gender, age, species, language, flavor_text, med_record, sec_record, gen_record, altTitles, disabilities, nanotrasen_relation, ckey, slot)
|
||||||
if(!q.Execute(db))
|
if(!q.Execute(db))
|
||||||
message_admins("Error #:[q.Error()] - [q.ErrorMsg()]")
|
message_admins("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
@@ -697,6 +709,23 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
message_admins("Error #: [check.Error()] - [check.ErrorMsg()]")
|
message_admins("Error #: [check.Error()] - [check.ErrorMsg()]")
|
||||||
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
check.Add("DELETE FROM client_roles WHERE ckey=? AND slot=?", ckey, slot)
|
||||||
|
if(!check.Execute(db))
|
||||||
|
message_admins("Error #: [check.Error()] - [check.ErrorMsg()]")
|
||||||
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
for(var/role_id in roles)
|
||||||
|
if(!(roles[role_id] & ROLEPREF_PERSIST))
|
||||||
|
continue
|
||||||
|
q = new
|
||||||
|
q.Add("INSERT INTO client_roles (ckey, slot, role, preference) VALUES (?,?,?,?)", ckey, slot, role_id, (roles[role_id] & ~ROLEPREF_PERSIST))
|
||||||
|
if(!q.Execute(db))
|
||||||
|
message_admins("Error #: [q.Error()] - [q.ErrorMsg()]")
|
||||||
|
warning("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||||
|
return 0
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
@@ -720,7 +749,7 @@ AND players.player_slot = ? ;"}, ckey, slot)
|
|||||||
S["sec_record"] << sec_record
|
S["sec_record"] << sec_record
|
||||||
S["gen_record"] << gen_record
|
S["gen_record"] << gen_record
|
||||||
S["player_alt_titles"] << player_alt_titles
|
S["player_alt_titles"] << player_alt_titles
|
||||||
S["be_special"] << be_special
|
//S["be_special"] << be_special
|
||||||
S["disabilities"] << disabilities
|
S["disabilities"] << disabilities
|
||||||
S["used_skillpoints"] << used_skillpoints
|
S["used_skillpoints"] << used_skillpoints
|
||||||
S["skills"] << skills
|
S["skills"] << skills
|
||||||
|
|||||||
@@ -143,18 +143,6 @@
|
|||||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
//be special
|
|
||||||
/client/verb/toggle_be_special(role in be_special_flags)
|
|
||||||
set name = "Toggle SpecialRole Candidacy"
|
|
||||||
set category = "Preferences"
|
|
||||||
set desc = "Toggles which special roles you would like to be a candidate for, during events."
|
|
||||||
var/role_flag = be_special_flags[role]
|
|
||||||
if(!role_flag) return
|
|
||||||
prefs.be_special ^= role_flag
|
|
||||||
prefs.save_preferences_sqlite(src, ckey)
|
|
||||||
src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)."
|
|
||||||
feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
||||||
|
|
||||||
|
|
||||||
/client/verb/change_ui()
|
/client/verb/change_ui()
|
||||||
set name = "Change UI"
|
set name = "Change UI"
|
||||||
@@ -203,3 +191,10 @@
|
|||||||
media.update_music()
|
media.update_music()
|
||||||
else
|
else
|
||||||
media.stop_music()
|
media.stop_music()
|
||||||
|
|
||||||
|
/client/verb/setup_special_roles()
|
||||||
|
set name = "Setup Special Roles"
|
||||||
|
set category = "Preferences"
|
||||||
|
set desc = "Toggle hearing streaming media (radios, jukeboxes, etc)"
|
||||||
|
|
||||||
|
prefs.configure_special_roles(usr)
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
if (!possible_blobs.len)
|
if (!possible_blobs.len)
|
||||||
return
|
return
|
||||||
for(var/mob/living/G in possible_blobs)
|
for(var/mob/living/G in possible_blobs)
|
||||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_ALIEN)
|
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.desires_role(ROLE_BLOB))
|
||||||
var/datum/mind/blob = pick(possible_blobs)
|
var/datum/mind/blob = pick(possible_blobs)
|
||||||
infected_crew += blob
|
infected_crew += blob
|
||||||
blob.special_role = "Blob"
|
blob.special_role = "Blob"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var/global/list/datum/mind/raiders = list() //Antags.
|
|||||||
if(!..())
|
if(!..())
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/list/candidates = get_candidates(BE_RAIDER)
|
var/list/candidates = get_candidates(ROLE_VOXRAIDER)
|
||||||
var/raider_num = 0
|
var/raider_num = 0
|
||||||
|
|
||||||
//Check that we have enough vox.
|
//Check that we have enough vox.
|
||||||
|
|||||||
@@ -24,29 +24,13 @@
|
|||||||
|
|
||||||
/datum/seed/proc/request_player(var/mob/living/host)
|
/datum/seed/proc/request_player(var/mob/living/host)
|
||||||
if(!host) return
|
if(!host) return
|
||||||
for(var/mob/dead/observer/O in player_list)
|
for(var/mob/dead/observer/O in get_active_candidates(ROLE_PLANT,poll="Someone is harvesting [display_name]. Would you like to play as one?"))
|
||||||
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
|
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
|
||||||
continue
|
continue
|
||||||
if(O.client)
|
if(O.client)
|
||||||
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
|
if(O.client.desires_role(ROLE_PLANT))
|
||||||
currently_querying |= O.client
|
transfer_personality(O.client,host)
|
||||||
question(O.client,host)
|
break
|
||||||
|
|
||||||
/datum/seed/proc/question(var/client/C,var/mob/living/host)
|
|
||||||
spawn(0)
|
|
||||||
|
|
||||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob.
|
|
||||||
|
|
||||||
var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.")
|
|
||||||
|
|
||||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer.
|
|
||||||
|
|
||||||
if(response == "Yes")
|
|
||||||
transfer_personality(C,host)
|
|
||||||
else if (response == "Never for this round")
|
|
||||||
C.prefs.be_special ^= BE_PLANT
|
|
||||||
|
|
||||||
currently_querying -= C
|
|
||||||
|
|
||||||
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
|
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,11 @@
|
|||||||
affected_mob = loc
|
affected_mob = loc
|
||||||
processing_objects.Add(src)
|
processing_objects.Add(src)
|
||||||
|
|
||||||
for(var/mob/dead/observer/O in player_list)
|
for(var/mob/dead/observer/O in get_active_candidates(ROLE_ALIEN,poll="[affected_mob] has been infected by \a [src]!"))
|
||||||
if(O.client && O.client.prefs.be_special & BE_ALIEN)
|
if(O.client && O.client.desires_role(ROLE_ALIEN))
|
||||||
if(check_observer(O))
|
if(check_observer(O))
|
||||||
O << "<span class=\"recruit\">[affected_mob] has been infected by \a [src]!. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</span>"
|
O << "<span class=\"recruit\">You are a possible candidate for \a [src]. Get ready. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Retract</a>)</span>"
|
||||||
|
ghost_volunteers += O
|
||||||
spawn(0)
|
spawn(0)
|
||||||
AddInfectionImages(affected_mob)
|
AddInfectionImages(affected_mob)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,11 +31,11 @@
|
|||||||
reset_search()
|
reset_search()
|
||||||
|
|
||||||
proc/request_player()
|
proc/request_player()
|
||||||
for(var/mob/dead/observer/O in player_list)
|
for(var/mob/dead/observer/O in get_active_candidates(ROLE_POSIBRAIN,poll="\A [src] has been activated."))
|
||||||
if(O.client && O.client.prefs.be_special & BE_PAI)
|
if(O.client)
|
||||||
if(check_observer(O))
|
if(check_observer(O))
|
||||||
O << "<span class=\"recruit\">\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</span>"
|
O << "<span class=\"recruit\">You are a possible candidate for \a [src]. Get ready. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Retract</a>)</span>"
|
||||||
//question(O.client)
|
ghost_volunteers += O
|
||||||
|
|
||||||
proc/check_observer(var/mob/dead/observer/O)
|
proc/check_observer(var/mob/dead/observer/O)
|
||||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||||
@@ -53,8 +53,6 @@
|
|||||||
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||||
if(response == "Yes")
|
if(response == "Yes")
|
||||||
transfer_personality(C.mob)
|
transfer_personality(C.mob)
|
||||||
else if (response == "Never for this round")
|
|
||||||
C.prefs.be_special ^= BE_PAI
|
|
||||||
|
|
||||||
proc/transfer_personality(var/mob/candidate)
|
proc/transfer_personality(var/mob/candidate)
|
||||||
|
|
||||||
|
|||||||
@@ -200,11 +200,12 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
|||||||
user << browse(dat, "window=findPai")
|
user << browse(dat, "window=findPai")
|
||||||
|
|
||||||
proc/requestRecruits()
|
proc/requestRecruits()
|
||||||
for(var/mob/dead/observer/O in player_list)
|
for(var/mob/dead/observer/O in get_active_candidates(ROLE_PAI)) // We handle polling ourselves.
|
||||||
if(O.client && O.client.prefs.be_special & BE_PAI)
|
if(O.client)
|
||||||
if(check_recruit(O))
|
if(check_recruit(O))
|
||||||
O << "<span class=\"recruit\">A pAI card is looking for personalities. (<a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</span>"
|
O << "<span class=\"recruit\">A pAI card is looking for personalities. (<a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</span>"
|
||||||
//question(O.client)
|
//question(O.client)
|
||||||
|
|
||||||
proc/check_recruit(var/mob/dead/observer/O)
|
proc/check_recruit(var/mob/dead/observer/O)
|
||||||
if(jobban_isbanned(O, "pAI"))
|
if(jobban_isbanned(O, "pAI"))
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -398,27 +398,11 @@ mob/living/simple_animal/borer/proc/detatch()
|
|||||||
mob/living/simple_animal/borer/proc/request_player()
|
mob/living/simple_animal/borer/proc/request_player()
|
||||||
var/list/candidates=list()
|
var/list/candidates=list()
|
||||||
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
for(var/mob/dead/observer/G in get_active_candidates(ROLE_BORER, poll="HEY KID, YOU WANNA BE A BORER?"))
|
||||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_ALIEN)
|
if(G.client && !G.client.holder)
|
||||||
if(!jobban_isbanned(G, "Syndicate"))
|
if(!jobban_isbanned(G, "Syndicate"))
|
||||||
candidates += G
|
candidates += G
|
||||||
|
|
||||||
if(!candidates.len)
|
|
||||||
message_admins("No applicable ghosts for [src.name]. Polling.")
|
|
||||||
var/time_passed = world.time
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
|
||||||
if(!jobban_isbanned(G, "Syndicate"))
|
|
||||||
spawn(0)
|
|
||||||
switch(alert(G, "HEY KID, YOU WANNA BE A BORER?","Please answer in 30 seconds!","Yes","No"))
|
|
||||||
if("Yes")
|
|
||||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
|
||||||
continue
|
|
||||||
candidates += G
|
|
||||||
if("No")
|
|
||||||
continue
|
|
||||||
|
|
||||||
sleep(300)
|
|
||||||
|
|
||||||
if(!candidates.len)
|
if(!candidates.len)
|
||||||
message_admins("Unable to find a mind for [src.name]")
|
message_admins("Unable to find a mind for [src.name]")
|
||||||
return 0
|
return 0
|
||||||
@@ -438,8 +422,6 @@ mob/living/simple_animal/borer/proc/question(var/client/C)
|
|||||||
return
|
return
|
||||||
if(response == "Yes")
|
if(response == "Yes")
|
||||||
transfer_personality(C)
|
transfer_personality(C)
|
||||||
else if (response == "Never for this round")
|
|
||||||
C.prefs.be_special ^= BE_ALIEN
|
|
||||||
|
|
||||||
mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
|
mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
|
||||||
|
|
||||||
|
|||||||
@@ -701,37 +701,34 @@ var/list/TAGGERLOCATIONS = list(
|
|||||||
|
|
||||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|SOUND_STREAMING)
|
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|SOUND_STREAMING)
|
||||||
|
|
||||||
#define BE_TRAITOR 1
|
//////////////////////////////////
|
||||||
#define BE_OPERATIVE 2
|
// ROLES 2.0
|
||||||
#define BE_CHANGELING 4
|
//////////////////////////////////
|
||||||
#define BE_WIZARD 8
|
// First bit is no/yes.
|
||||||
#define BE_MALF 16
|
// Second bit is persistence (save to char prefs).
|
||||||
#define BE_REV 32
|
#define ROLEPREF_ENABLE 1 // Enable role for this character.
|
||||||
#define BE_ALIEN 64
|
#define ROLEPREF_PERSIST 2 // Save preference.
|
||||||
#define BE_PAI 128
|
#define ROLEPREF_POLLED 4 // Have we polled this guy?
|
||||||
#define BE_CULTIST 256
|
|
||||||
#define BE_MONKEY 512
|
// Should correspond to jobbans, too.
|
||||||
#define BE_NINJA 1024
|
#define ROLE_ALIEN "alien"
|
||||||
#define BE_RAIDER 2048
|
#define ROLE_BLOB "blob" // New!
|
||||||
#define BE_PLANT 4096
|
#define ROLE_BORER "borer" // New!
|
||||||
#define BE_VAMPIRE 8192
|
#define ROLE_CHANGELING "changeling"
|
||||||
|
#define ROLE_COMMANDO "commando" // New!
|
||||||
|
#define ROLE_CULTIST "cultist"
|
||||||
|
#define ROLE_MALF "malf AI"
|
||||||
|
#define ROLE_NINJA "ninja"
|
||||||
|
#define ROLE_OPERATIVE "operative" // New!
|
||||||
|
#define ROLE_PAI "pAI"
|
||||||
|
#define ROLE_PLANT "Dionaea"
|
||||||
|
#define ROLE_POSIBRAIN "posibrain"
|
||||||
|
#define ROLE_REV "revolutionary"
|
||||||
|
#define ROLE_TRAITOR "traitor"
|
||||||
|
#define ROLE_VAMPIRE "vampire"
|
||||||
|
#define ROLE_VOXRAIDER "vox raider"
|
||||||
|
#define ROLE_WIZARD "wizard"
|
||||||
|
|
||||||
var/list/be_special_flags = list(
|
|
||||||
"Traitor" = BE_TRAITOR,
|
|
||||||
"Operative" = BE_OPERATIVE,
|
|
||||||
"Changeling" = BE_CHANGELING,
|
|
||||||
"Wizard" = BE_WIZARD,
|
|
||||||
"Malf AI" = BE_MALF,
|
|
||||||
"Revolutionary" = BE_REV,
|
|
||||||
"Xenomorph" = BE_ALIEN,
|
|
||||||
"pAI" = BE_PAI,
|
|
||||||
"Cultist" = BE_CULTIST,
|
|
||||||
"Monkey" = BE_MONKEY,
|
|
||||||
"Ninja" = BE_NINJA,
|
|
||||||
"Raider" = BE_RAIDER,
|
|
||||||
"Diona" = BE_PLANT,
|
|
||||||
"Vampire" = BE_VAMPIRE
|
|
||||||
)
|
|
||||||
|
|
||||||
#define AGE_MIN 17 //youngest a character can be
|
#define AGE_MIN 17 //youngest a character can be
|
||||||
#define AGE_MAX 85 //oldest a character can be
|
#define AGE_MAX 85 //oldest a character can be
|
||||||
@@ -916,4 +913,4 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
|
|||||||
#define HASMAT_OVER 16 //does it have overlays for when you load materials in? - mainly for fabricators
|
#define HASMAT_OVER 16 //does it have overlays for when you load materials in? - mainly for fabricators
|
||||||
#define ACCESS_EMAG 32 //does it lose all its access when smacked by an emag? incompatible with CONSOLECONTROl, for obvious reasons
|
#define ACCESS_EMAG 32 //does it lose all its access when smacked by an emag? incompatible with CONSOLECONTROl, for obvious reasons
|
||||||
#define LOCKBOXES 64 //does it spawn a lockbox around a design which is said to be locked? - for fabricators
|
#define LOCKBOXES 64 //does it spawn a lockbox around a design which is said to be locked? - for fabricators
|
||||||
#define TRUELOCKS 128 //does it make a truly locked lockbox? If not set, the lockboxes made are unlockable by any crew with an ID
|
#define TRUELOCKS 128 //does it make a truly locked lockbox? If not set, the lockboxes made are unlockable by any crew with an ID
|
||||||
|
|||||||
19
html/browser/config_roles.css
Normal file
19
html/browser/config_roles.css
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
td.column {
|
||||||
|
width: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
td.clmNever {
|
||||||
|
background: #ffcccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.clmNo {
|
||||||
|
background: #ffeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.clmYes {
|
||||||
|
background: #eeffee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.clmAlways {
|
||||||
|
background: #ccffcc;
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user