Roundstart PR: Attempt 2 (#33424)

* use roundstart_pop_ready instead of rst_pop

* move setup for dynamic

- moves mode.Setup so antags spawn before crew
- adds close_spawn_windows

* get rid of create_roundstart_human

* try again

* remove captainship message and add close_spawn_windows

* mostly works

* works

* Update gameticker.dm

* oops guess it's somehow necessary

* replace client references with variable

* tweak parameter and remove else

* Update new_player.dm

* change setup of ticker.mind

* move new_player_panel_proc

* actually don't move ticker.mind

* Update gameticker.dm

* Create all crew and antags, then spawn

Tested:
- AI
- Captain
- Latejoin captain
- malf AI
- nuke op
- syndicate borg

* remove close_spawn_windows() unnecessary

* adds a CHECK_TICK

* move store positon and ticker.mind for antags

* Update misc_gamemode_procs.dm

* Update misc_gamemode_procs.dm

* Update robot.dm

* Update robot.dm

* Update robot.dm

* fixes PR

* fixes clown and mime database names

* Update gameticker.dm

* fix species whitelisting

* Revert "fix species whitelisting"

This reverts commit 7c052cfe66.

* modify whitelist species

- unused
- annoying to use
- annoying to modify
- I hate it

* Update setup.dm

* turns out mutons are no good

* Update species.dm

* fix a runtime
This commit is contained in:
adacovsk
2022-10-04 10:09:34 -04:00
committed by GitHub
parent 1a077b4100
commit 61b5eddbe5
22 changed files with 181 additions and 297 deletions

View File

@@ -419,9 +419,6 @@
#define LOWEST_DENOMINATION 1 #define LOWEST_DENOMINATION 1
#define round_to_lowest_denomination(A) (round(A, LOWEST_DENOMINATION)) #define round_to_lowest_denomination(A) (round(A, LOWEST_DENOMINATION))
#define create_trader_account create_account("Trader Shoal", 0, null, 0, 1, TRUE, FALSE)
//Starts 0 credits, not sourced from any database, earns 0 credits, hidden
// strips all newlines from a string, replacing them with null // strips all newlines from a string, replacing them with null
#define STRIP_NEWLINE(S) replacetextEx(S, "\n", null) #define STRIP_NEWLINE(S) replacetextEx(S, "\n", null)

View File

@@ -967,21 +967,22 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
) )
//Generic species flags. //Generic species flags.
#define NO_BREATHE 1 #define WHITELISTED (1<<0) //species that don't break player preferences available to admins only
#define NO_SCAN 2 #define PLAYABLE (1<<1) //species available to players
#define NO_PAIN 4 #define NO_BREATHE (1<<2)
#define IS_SLOW 8 #define NO_SCAN (1<<3)
#define IS_PLANT 16 #define NO_PAIN (1<<4)
#define IS_WHITELISTED 32 #define IS_SLOW (1<<5)
#define RAD_ABSORB 64 #define IS_PLANT (1<<6)
#define REQUIRE_LIGHT 128 #define RAD_ABSORB (1<<7)
#define HYPOTHERMIA_IMMUNE 256 #define REQUIRE_LIGHT (1<<8)
#define PLASMA_IMMUNE 512 #define HYPOTHERMIA_IMMUNE (1<<9)
#define RAD_GLOW 1024 #define PLASMA_IMMUNE (1<<10)
#define ELECTRIC_HEAL 2048 #define RAD_GLOW (1<<11)
#define SPECIES_NO_MOUTH 4096 #define ELECTRIC_HEAL (1<<12)
//#define REQUIRE_DARK 8192 #define SPECIES_NO_MOUTH (1<<13)
#define RAD_IMMUNE 16384 //#define REQUIRE_DARK (1<<14)
#define RAD_IMMUNE (1<<15)
//Species anatomical flags. //Species anatomical flags.
#define HAS_SKIN_TONE 1 #define HAS_SKIN_TONE 1
@@ -1061,7 +1062,7 @@ var/default_colour_matrix = list(1,0,0,0,\
//Language flags. //Language flags.
#define WHITELISTED (1<<0) // Language is available if the speaker is whitelisted. //#define WHITELISTED (1<<0) // Language is available if the speaker is whitelisted. Used in species flags
#define RESTRICTED (1<<1) // Language can only be accquired by spawning or an admin. #define RESTRICTED (1<<1) // Language can only be accquired by spawning or an admin.
#define CAN_BE_SECONDARY_LANGUAGE (1<<2) // Language is available on character setup as secondary language. #define CAN_BE_SECONDARY_LANGUAGE (1<<2) // Language is available on character setup as secondary language.
#define NONORAL (1<<3) //Language is spoken without using the mouth, so can be spoken while muzzled. #define NONORAL (1<<3) //Language is spoken without using the mouth, so can be spoken while muzzled.

View File

@@ -80,15 +80,14 @@
if (mind) if (mind)
mind.name = newname mind.name = newname
if(mind.initial_account)
mind.initial_account.owner_name = newname
if (dna) if (dna)
dna.real_name = real_name dna.real_name = real_name
if (oldname) if (oldname)
/* //Update the datacore records and centcomm database
* Update the datacore records!
* This is going to be a bit costly.
*/
for (var/list/L in list(data_core.general, data_core.medical, data_core.security,data_core.locked)) for (var/list/L in list(data_core.general, data_core.medical, data_core.security,data_core.locked))
if (L) if (L)
var/datum/data/record/R = find_record("name", oldname, L) var/datum/data/record/R = find_record("name", oldname, L)

View File

@@ -206,13 +206,9 @@ var/stacking_limit = 90
message_admins("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].") message_admins("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].")
log_admin("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].") log_admin("Parameters were: centre = [curve_centre_of_round], width = [curve_width_of_round].")
var/rst_pop = 0 if (roundstart_pop_ready >= high_pop_limit)
for(var/mob/living/player in player_list) message_admins("DYNAMIC MODE: Mode: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
if(player.mind) log_admin("DYNAMIC MODE: High Population Override is in effect! ([roundstart_pop_ready]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
rst_pop++
if (rst_pop >= high_pop_limit)
message_admins("DYNAMIC MODE: Mode: High Population Override is in effect! ([rst_pop]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
log_admin("DYNAMIC MODE: High Population Override is in effect! ([rst_pop]/[high_pop_limit]) Threat Level will have more impact on which roles will appear, and player population less.")
dynamic_stats = new dynamic_stats = new
dynamic_stats.starting_threat_level = threat_level dynamic_stats.starting_threat_level = threat_level
@@ -255,13 +251,13 @@ var/stacking_limit = 90
var/datum/dynamic_ruleset/midround/DR = rule var/datum/dynamic_ruleset/midround/DR = rule
if (initial(DR.weight)) if (initial(DR.weight))
midround_rules += new rule() midround_rules += new rule()
for(var/mob/living/player in player_list) for(var/mob/new_player/player in player_list)
if(player.mind) if(player.mind && player.ready)
roundstart_pop_ready++ roundstart_pop_ready++
candidates.Add(player) candidates.Add(player)
message_admins("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") message_admins("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
log_admin("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") log_admin("DYNAMIC MODE: Listing [roundstart_rules.len] round start rulesets, and [roundstart_pop_ready] players ready.")
if (candidates.len <= 0) if (roundstart_pop_ready <= 0)
message_admins("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.") message_admins("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.")
log_admin("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.") log_admin("DYNAMIC MODE: Not a single player readied-up. The round will begin without any roles assigned.")
return 1 return 1
@@ -277,7 +273,7 @@ var/stacking_limit = 90
var/starting_rulesets = "" var/starting_rulesets = ""
for (var/datum/dynamic_ruleset/roundstart/DR in executed_rules) for (var/datum/dynamic_ruleset/roundstart/DR in executed_rules)
starting_rulesets += "[DR.name], " starting_rulesets += "[DR.name], "
dynamic_stats.round_start_pop = candidates.len dynamic_stats.round_start_pop = roundstart_pop_ready
dynamic_stats.round_start_rulesets = starting_rulesets dynamic_stats.round_start_rulesets = starting_rulesets
dynamic_stats.measure_threat(threat) dynamic_stats.measure_threat(threat)
candidates.Cut() candidates.Cut()
@@ -339,11 +335,7 @@ var/stacking_limit = 90
if (classic_secret) // Classic secret experience : one & only one roundstart ruleset if (classic_secret) // Classic secret experience : one & only one roundstart ruleset
extra_rulesets_amount = 0 extra_rulesets_amount = 0
else else
var/rst_pop = 0 if (roundstart_pop_ready > high_pop_limit)
for(var/mob/living/player in player_list)
if(player.mind)
rst_pop++
if (rst_pop > high_pop_limit)
if (threat_level > 50) if (threat_level > 50)
extra_rulesets_amount++ extra_rulesets_amount++
if (threat_level > 75) if (threat_level > 75)

View File

@@ -559,9 +559,8 @@ Assign your candidates in choose_candidates() instead.
if(old_AI.mind.assigned_role=="AI" || old_AI.mind.assigned_role=="Cyborg" || old_AI.mind.assigned_role=="Mobile MMI") if(old_AI.mind.assigned_role=="AI" || old_AI.mind.assigned_role=="Cyborg" || old_AI.mind.assigned_role=="Mobile MMI")
old_AI.create_roundstart_silicon(old_AI.mind.assigned_role) old_AI.create_roundstart_silicon(old_AI.mind.assigned_role)
else else
var/mob/living/carbon/human/new_character = old_AI.create_character(0) var/mob/living/carbon/human/new_character = old_AI.create_human(old_AI.client.prefs)
new_character.DormantGenes(20,10,0,0) // 20% chance of getting a dormant bad gene, in which case they also get 10% chance of getting a dormant good gene job_master.PostJobSetup(new_character)
job_master.EquipRank(new_character, new_character.mind.assigned_role, 0)
EquipCustomItems(new_character) EquipCustomItems(new_character)
log_admin("([old_AI.ckey]) was displaced by a malf AI and started the game as a [old_AI.mind.assigned_role].") log_admin("([old_AI.ckey]) was displaced by a malf AI and started the game as a [old_AI.mind.assigned_role].")
message_admins("([old_AI.ckey]) was displaced by a malf AI and started the game as a [old_AI.mind.assigned_role].") message_admins("([old_AI.ckey]) was displaced by a malf AI and started the game as a [old_AI.mind.assigned_role].")

View File

@@ -158,7 +158,7 @@
/proc/equip_wizard(mob/living/carbon/human/wizard_mob, apprentice = FALSE) /proc/equip_wizard(mob/living/carbon/human/wizard_mob, apprentice = FALSE)
if (!istype(wizard_mob)) if (!istype(wizard_mob))
return return
wizard_mob.delete_all_equipped_items()
var/datum/faction/wizard/civilwar/wpf/WPF = find_active_faction_by_type(/datum/faction/wizard/civilwar/wpf) var/datum/faction/wizard/civilwar/wpf/WPF = find_active_faction_by_type(/datum/faction/wizard/civilwar/wpf)
var/datum/faction/wizard/civilwar/wpf/PFW = find_active_faction_by_type(/datum/faction/wizard/civilwar/pfw) var/datum/faction/wizard/civilwar/wpf/PFW = find_active_faction_by_type(/datum/faction/wizard/civilwar/pfw)
if(WPF && WPF.get_member_by_mind(wizard_mob.mind)) //WPF get red if(WPF && WPF.get_member_by_mind(wizard_mob.mind)) //WPF get red

View File

@@ -90,7 +90,7 @@
return return
// -- Equip mindless: if we're going to give the outfit to a mob without a mind // -- Equip mindless: if we're going to give the outfit to a mob without a mind
/datum/outfit/proc/equip(var/mob/living/carbon/human/H, var/equip_mindless = FALSE, var/priority = FALSE, var/strip = FALSE, var/delete = FALSE) /datum/outfit/proc/equip(var/mob/living/carbon/human/H, var/equip_mindless = TRUE, var/priority = FALSE, var/strip = FALSE, var/delete = FALSE)
if (!H || (!H.mind && !equip_mindless) ) if (!H || (!H.mind && !equip_mindless) )
return return

View File

@@ -111,9 +111,6 @@
if(jobban_isbanned(O, jbrole)) if(jobban_isbanned(O, jbrole))
return 0 return 0
if(alien_whitelist_id && !is_alien_whitelisted(src, alien_whitelist_id) && config.usealienwhitelist)
return 0
return O.client return O.client
/datum/recruiter/Destroy() /datum/recruiter/Destroy()

View File

@@ -167,26 +167,6 @@ var/datum/controller/gameticker/ticker
init_mind_ui() init_mind_ui()
init_PDAgames_leaderboard() init_PDAgames_leaderboard()
for(var/mob/new_player/player in player_list)
if(!(player.ready && player.mind && player.mind.assigned_role))
continue
var/mob/living/L = player
if(istype(L))
ticker.minds += L.mind
switch(player.mind.assigned_role)
if("Mobile MMI", "Cyborg", "AI")
player.create_roundstart_silicon(player.mind.assigned_role)
log_admin("([player.ckey]) started the game as a [player.mind.assigned_role].")
if("MODE")
//do nothing
else
player.create_roundstart_human() //Create player characters and transfer them
if(ape_mode == APE_MODE_EVERYONE) //this likely doesn't work properly, why does it only apply to humans?
for(var/mob/living/carbon/human/player in player_list)
player.apeify()
var/can_continue = mode.Setup()//Setup special modes var/can_continue = mode.Setup()//Setup special modes
if(!can_continue) if(!can_continue)
current_state = GAME_STATE_PREGAME current_state = GAME_STATE_PREGAME
@@ -197,6 +177,66 @@ var/datum/controller/gameticker/ticker
job_master.ResetOccupations() job_master.ResetOccupations()
return 0 return 0
//After antagonists have been removed from new_players in player_list, create crew
var/list/new_characters = list() //list of created crew for transferring
var/list/new_players_ready = list() //unique list of people who have readied up, so we can delete mob/new_player later (ready is lost on mind transfer)
for(var/mob/M in player_list)
if(!istype(M, /mob/new_player/))
var/mob/living/L = M
ticker.minds += L.mind
L.store_position()
M.close_spawn_windows()
continue
var/mob/new_player/np = M
if(!(np.ready && np.mind && np.mind.assigned_role))
//If they aren't ready, update new player panels so they say join instead of ready up.
np.new_player_panel()
continue
var/datum/preferences/prefs = M.client.prefs
var/key = M.key
new_players_ready |= M
//Create player characters
switch(np.mind.assigned_role)
if("Cyborg", "Mobile MMI", "AI")
var/mob/living/silicon/S = np.create_roundstart_silicon(prefs)
ticker.minds += S.mind
S.store_position()
log_admin("([key]) started the game as a [S.mind.assigned_role].")
new_characters[key] = S
if("MODE")
//antags aren't new players
else
var/mob/living/carbon/human/H = np.create_human(prefs)
ticker.minds += H.mind
H.store_position()
EquipCustomItems(H)
H.update_icons()
new_characters[key] = H
if(H.mind.assigned_role != "Trader")
data_core.manifest_inject(H)
CHECK_TICK
//Transfer characters to players
for(var/i = 1, i <= new_characters.len, i++)
var/mob/M = new_characters[new_characters[i]]
var/key = new_characters[i]
M.key = key
if(istype(M, /mob/living/carbon/human/))
var/mob/living/carbon/human/H = M
job_master.PostJobSetup(H)
//minds are linked to accounts... And accounts are linked to jobs.
var/rank = M.mind.assigned_role
var/datum/job/job = job_master.GetJob(rank)
if(job)
job.equip(M, job.priority) // Outfit datum.
//delete the new_player mob for those who readied
for(var/mob/np in new_players_ready)
qdel(np)
if(ape_mode == APE_MODE_EVERYONE) //this likely doesn't work properly, why does it only apply to humans?
for(var/mob/living/carbon/human/player in player_list)
player.apeify()
if(hide_mode) if(hide_mode)
var/list/modes = new var/list/modes = new
for (var/datum/gamemode/M in runnable_modes) for (var/datum/gamemode/M in runnable_modes)
@@ -208,33 +248,7 @@ var/datum/controller/gameticker/ticker
to_chat(world, "<B>The current game mode is - Secret!</B>") to_chat(world, "<B>The current game mode is - Secret!</B>")
to_chat(world, "<B>Possibilities:</B> [english_list(modes)]") to_chat(world, "<B>Possibilities:</B> [english_list(modes)]")
var/captain = FALSE mode.PostSetup() //provides antag objectives
for(var/mob/living/carbon/human/player in player_list)
//Used to display a message the captainship message
if(player.mind)
if(player.mind.assigned_role == "MODE")
//no injection
else
job_master.EquipRank(player, player.mind.assigned_role, 0)
EquipCustomItems(player)
player.update_icons()
if(player.mind.assigned_role == "Captain")
captain = TRUE
if(player.mind.assigned_role != "Trader")
data_core.manifest_inject(player)
mode.PostSetup()
//send message that no one is a captain and store positions for some reason
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
if(!captain)
to_chat(M, "Captainship not forced on anyone.")
M.store_position()//updates the players' origin_ vars so they retain their location when the round starts.
// Update new player panels so they say join instead of ready up.
for(var/mob/new_player/player in player_list)
player.new_player_panel_proc()
gamestart_time = world.time / 10 gamestart_time = world.time / 10
current_state = GAME_STATE_PLAYING current_state = GAME_STATE_PLAYING

View File

@@ -31,7 +31,7 @@
job_title = src.title job_title = src.title
if(!trader_account) if(!trader_account)
trader_account = create_trader_account trader_account = create_account("Trader Shoal", 0, null, 0, 1, TRUE, FALSE)
SStrade.loyal_customers[M.real_name] = 0 SStrade.loyal_customers[M.real_name] = 0

View File

@@ -407,9 +407,11 @@ var/global/datum/controller/occupations/job_master
Debug("DO, AC1 end") Debug("DO, AC1 end")
return TRUE return TRUE
/datum/controller/occupations/proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0) /datum/controller/occupations/proc/PostJobSetup(var/mob/living/carbon/human/H)
if(!H) if(!(H && H.mind && H.mind.assigned_role))
return 0 return 0
var/joined_late = ticker.current_state == GAME_STATE_PLAYING ? TRUE : FALSE
var/rank = H.mind.assigned_role
var/datum/job/job = GetJob(rank) var/datum/job/job = GetJob(rank)
if(job && !job.no_starting_money) if(job && !job.no_starting_money)
//give them an account in the station database //give them an account in the station database
@@ -461,11 +463,6 @@ var/global/datum/controller/occupations/job_master
var/alt_title = null var/alt_title = null
if(job)
job.equip(H, job.priority) // Outfit datum.
else
to_chat(H, "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator.")
H.job = rank H.job = rank
if(H.mind) if(H.mind)

View File

@@ -1,89 +0,0 @@
#define WHITELISTFILE "data/whitelist.txt"
var/list/whitelist = list()
/proc/load_whitelist()
whitelist = file2list(WHITELISTFILE)
if(!whitelist.len)
whitelist = null
/proc/check_whitelist(mob/M /*, var/rank*/)
if(!whitelist)
return 0
return ("[M.ckey]" in whitelist)
// species = list("ckey","ckey")
var/global/list/alien_whitelist = list()
/proc/load_alienwhitelist()
alien_whitelist=list()
alien_whitelist["all"]=list()
var/text = file2text("config/alienwhitelist.txt")
if (!text)
diary << "Failed to load config/alienwhitelist.txt\n"
else
for(var/line in splittext(text, "\n"))
if(dd_hasprefix(line,"#"))
continue
if(!findtext(line,"-"))
continue
var/list/parts=splittext(line,"-")
var/ckey=trim(lowertext(parts[1]))
var/specieslist=splittext(parts[2],",")
for(var/species in specieslist)
species=lowertext(trim(species))
if(!(species in alien_whitelist))
alien_whitelist[species]=list()
if(!(ckey in alien_whitelist[species]))
alien_whitelist[species] += ckey
/*testing("Starting alien whitelist debug output")
for(var/species in alien_whitelist)
for(var/ckey in alien_whitelist[species])
testing("[ckey] - [species]")*/
//todo: admin aliens
/proc/is_alien_whitelisted(mob/M, var/species)
if(!config.usealienwhitelist)
return 1
var/datum/species/current_species = all_species[species]
species=lowertext(species)
if(species == "human")
return 1
if(check_rights(R_ADMIN, 0))
return 1
if(!alien_whitelist)
return 0
// Species is in whitelist
if("*" in alien_whitelist[species])
return 1
// CKey is in whitelist
/*testing("Checking [M]/[M.ckey] for whitelisted species [species]")
for(var/ckey in alien_whitelist[species])
testing(ckey)
testing(ckey in alien_whitelist[species])
testing(alien_whitelist[species].Find(ckey))
testing(M.ckey in alien_whitelist[species] + " " + alien_whitelist[species].Find(M.ckey))*/
//testing("[species] has [alien_whitelist[species]] and ([M.ckey] is [M.ckey in alien_whitelist[species] ? "in" : "not in"] the list)")
if((M.ckey in alien_whitelist[species]) || (M.ckey in alien_whitelist["all"]) || (current_species && current_species.conditional_whitelist()))
return 1
// Occupation is in whitelist (for lizard janitors :V)
if("job=[lowertext(M.mind.assigned_role)]" in alien_whitelist[species]\
||("job=[lowertext(M.mind.assigned_role)]" in alien_whitelist["all"]))
return 1
return 0
/proc/has_whitelist_entries(var/species)
if(!config.usealienwhitelist)
return 1
species=lowertext(species)
return species in alien_whitelist
#undef WHITELISTFILE

View File

@@ -61,7 +61,7 @@
/obj/item/weapon/card/debit/trader/New(var/new_loc, var/account_number) /obj/item/weapon/card/debit/trader/New(var/new_loc, var/account_number)
if(!trader_account) if(!trader_account)
trader_account = create_trader_account trader_account = create_account("Trader Shoal", 0, null, 0, 1, TRUE, FALSE)
return ..(new_loc, trader_account.account_number) return ..(new_loc, trader_account.account_number)
/obj/item/weapon/card/debit/preferred /obj/item/weapon/card/debit/preferred

View File

@@ -950,22 +950,11 @@ var/const/MAX_SAVE_SLOTS = 16
if(new_age) if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("species") if("species")
var/list/new_species = list("Human")
var/prev_species = species var/prev_species = species
var/whitelisted = 0 if(check_rights(R_ADMIN,0))
species = input("Please select a species", "Character Generation", null) in whitelisted_species
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it! else
for(var/S in whitelisted_species) species = input("Please select a species", "Character Generation", null) in playable_species
if(is_alien_whitelisted(user,S))
new_species += S
whitelisted = 1
if(!whitelisted)
alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
else //Not using the whitelist? Aliens for everyone!
new_species = whitelisted_species
species = input("Please select a species", "Character Generation", null) in new_species
if(prev_species != species) if(prev_species != species)
//grab one of the valid hair styles for the newly chosen species //grab one of the valid hair styles for the newly chosen species

View File

@@ -130,7 +130,7 @@
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
return 0 return 0
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist)) if(jobban_isbanned(O, "Dionaea"))
return 0 return 0
return O.client return O.client

View File

@@ -5,7 +5,7 @@
known_languages = list(LANGUAGE_HUMAN) known_languages = list(LANGUAGE_HUMAN)
attack_verb = "punches" attack_verb = "punches"
flags = IS_WHITELISTED | PLASMA_IMMUNE flags = WHITELISTED | PLAYABLE | PLASMA_IMMUNE
anatomy_flags = NO_BLOOD anatomy_flags = NO_BLOOD
blood_color = "#743474" blood_color = "#743474"
flesh_color = "#898476" flesh_color = "#898476"

View File

@@ -75,10 +75,6 @@
set name = "Evolve" set name = "Evolve"
set desc = "Grow to a more complex form." set desc = "Grow to a more complex form."
if(!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist)
to_chat(src, alert("You are currently not whitelisted to play an adult Diona."))
return FALSE
if(stat == DEAD) if(stat == DEAD)
to_chat(src, "You cannot evolve if you are dead!") to_chat(src, "You cannot evolve if you are dead!")
return return

View File

@@ -9,11 +9,12 @@ var/global/list/language_keys[0]
var/global/list/all_languages[0] var/global/list/all_languages[0]
var/global/list/all_species = list() var/global/list/all_species = list()
var/global/list/whitelisted_species = list("Human") var/global/list/whitelisted_species = list("Human")
var/global/list/playable_species = list("Human")
/proc/buildSpeciesLists() /proc/buildSpeciesLists()
var/datum/language/L var/datum/language/L
var/datum/species/S var/datum/species/S
for(. in (typesof(/datum/language)-/datum/language)) for(. in subtypesof(/datum/language))
L = new . L = new .
all_languages[L.name] = L all_languages[L.name] = L
for (var/language_name in all_languages) for (var/language_name in all_languages)
@@ -21,11 +22,13 @@ var/global/list/whitelisted_species = list("Human")
language_keys[":[lowertext(L.key)]"] = L language_keys[":[lowertext(L.key)]"] = L
language_keys[".[lowertext(L.key)]"] = L language_keys[".[lowertext(L.key)]"] = L
language_keys["#[lowertext(L.key)]"] = L language_keys["#[lowertext(L.key)]"] = L
for(. in (typesof(/datum/species)-/datum/species)) for(. in subtypesof(/datum/species))
S = new . S = new .
all_species[S.name] = S all_species[S.name] = S
if(S.flags & IS_WHITELISTED) if(S.flags & WHITELISTED)
whitelisted_species += S.name whitelisted_species += S.name
if(S.flags & PLAYABLE || S.conditional_playable())
playable_species += S.name
return return
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
@@ -310,7 +313,7 @@ var/global/list/whitelisted_species = list("Human")
) )
return offsets return offsets
/datum/species/proc/conditional_whitelist() /datum/species/proc/conditional_playable()
return 0 return 0
/datum/species/human /datum/species/human
@@ -350,7 +353,7 @@ var/global/list/whitelisted_species = list("Human")
heat_level_2 = 420 //Default 400 heat_level_2 = 420 //Default 400
heat_level_3 = 1200 //Default 1000 heat_level_3 = 1200 //Default 1000
flags = NO_PAIN flags = WHITELISTED | NO_PAIN
anatomy_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT | HAS_SWEAT_GLANDS anatomy_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT | HAS_SWEAT_GLANDS
blood_color = PALE_BLOOD blood_color = PALE_BLOOD
@@ -393,7 +396,7 @@ var/global/list/whitelisted_species = list("Human")
heat_level_2 = 480 //Default 400 heat_level_2 = 480 //Default 400
heat_level_3 = 1100 //Default 1000 heat_level_3 = 1100 //Default 1000
flags = IS_WHITELISTED flags = WHITELISTED
anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
default_mutations=list(M_CLAWS) default_mutations=list(M_CLAWS)
@@ -417,7 +420,7 @@ var/global/list/whitelisted_species = list("Human")
icobase = 'icons/mob/human_races/r_skeleton.dmi' icobase = 'icons/mob/human_races/r_skeleton.dmi'
deform = 'icons/mob/human_races/r_skeleton.dmi' // TODO: Need deform. deform = 'icons/mob/human_races/r_skeleton.dmi' // TODO: Need deform.
known_languages = list(LANGUAGE_CLATTER) known_languages = list(LANGUAGE_CLATTER)
flags = IS_WHITELISTED | NO_BREATHE flags = WHITELISTED | NO_BREATHE
anatomy_flags = NO_SKIN | NO_BLOOD anatomy_flags = NO_SKIN | NO_BLOOD
meat_type = /obj/item/stack/sheet/bone meat_type = /obj/item/stack/sheet/bone
chem_flags = NO_EAT | NO_INJECT chem_flags = NO_EAT | NO_INJECT
@@ -440,7 +443,7 @@ var/global/list/whitelisted_species = list("Human")
You can not eat normally, as your necrotic state only permits you to only eat raw flesh. As you lack skin, you can not be injected via syringe.<br>\ You can not eat normally, as your necrotic state only permits you to only eat raw flesh. As you lack skin, you can not be injected via syringe.<br>\
You are also incredibly weak to brute damage, but you're fast and don't need to breathe, so that's going for you." You are also incredibly weak to brute damage, but you're fast and don't need to breathe, so that's going for you."
/datum/species/skellington/conditional_whitelist() /datum/species/skellington/conditional_playable()
var/MM = text2num(time2text(world.timeofday, "MM")) var/MM = text2num(time2text(world.timeofday, "MM"))
return MM == 10 //October return MM == 10 //October
@@ -534,7 +537,7 @@ var/global/list/whitelisted_species = list("Human")
primitive = /mob/living/carbon/monkey/tajara primitive = /mob/living/carbon/monkey/tajara
flags = IS_WHITELISTED flags = WHITELISTED
anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SWEAT_GLANDS anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SWEAT_GLANDS
default_mutations=list(M_CLAWS) default_mutations=list(M_CLAWS)
@@ -612,7 +615,7 @@ var/global/list/whitelisted_species = list("Human")
primitive = /mob/living/carbon/monkey/grey primitive = /mob/living/carbon/monkey/grey
flags = IS_WHITELISTED flags = PLAYABLE | WHITELISTED
anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS | ACID4WATER anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS | ACID4WATER
spells = list(/spell/targeted/telepathy) spells = list(/spell/targeted/telepathy)
@@ -681,7 +684,6 @@ var/global/list/whitelisted_species = list("Human")
tacklePower = 90 tacklePower = 90
primitive = /mob/living/carbon/monkey // TODO primitive = /mob/living/carbon/monkey // TODO
anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS
// Both must be set or it's only a 45% chance of manifesting. // Both must be set or it's only a 45% chance of manifesting.
@@ -719,7 +721,7 @@ var/global/list/whitelisted_species = list("Human")
known_languages = list(LANGUAGE_SKRELLIAN) known_languages = list(LANGUAGE_SKRELLIAN)
primitive = /mob/living/carbon/monkey/skrell primitive = /mob/living/carbon/monkey/skrell
flags = IS_WHITELISTED flags = WHITELISTED
anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SWEAT_GLANDS anatomy_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SWEAT_GLANDS
flesh_color = "#8CD7A3" flesh_color = "#8CD7A3"
@@ -753,7 +755,7 @@ var/global/list/whitelisted_species = list("Human")
breath_type = GAS_NITROGEN breath_type = GAS_NITROGEN
default_mutations = list(M_BEAK, M_TALONS) default_mutations = list(M_BEAK, M_TALONS)
flags = IS_WHITELISTED | NO_SCAN flags = PLAYABLE | WHITELISTED
blood_color = VOX_BLOOD blood_color = VOX_BLOOD
flesh_color = "#808D11" flesh_color = "#808D11"
@@ -869,7 +871,7 @@ var/global/list/whitelisted_species = list("Human")
heat_level_2 = T0C + 75 heat_level_2 = T0C + 75
heat_level_3 = T0C + 100 heat_level_3 = T0C + 100
flags = IS_WHITELISTED | NO_BREATHE | REQUIRE_LIGHT | NO_SCAN | IS_PLANT | RAD_ABSORB | IS_SLOW | NO_PAIN | HYPOTHERMIA_IMMUNE flags = WHITELISTED | PLAYABLE | NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | IS_SLOW | NO_PAIN | HYPOTHERMIA_IMMUNE
anatomy_flags = NO_BLOOD | HAS_SWEAT_GLANDS anatomy_flags = NO_BLOOD | HAS_SWEAT_GLANDS
blood_color = "#004400" blood_color = "#004400"
@@ -1029,7 +1031,7 @@ var/list/has_died_as_golem = list()
icobase = 'icons/mob/human_races/r_grue.dmi' // Normal icon set. icobase = 'icons/mob/human_races/r_grue.dmi' // Normal icon set.
deform = 'icons/mob/human_races/r_def_grue.dmi' // Mutated icon set. deform = 'icons/mob/human_races/r_def_grue.dmi' // Mutated icon set.
attack_verb = "claws" attack_verb = "claws"
flags = IS_WHITELISTED | HYPOTHERMIA_IMMUNE flags = HYPOTHERMIA_IMMUNE
anatomy_flags = HAS_LIPS anatomy_flags = HAS_LIPS
punch_damage = 7 punch_damage = 7
default_mutations=list(M_CLAWS,M_TALONS) default_mutations=list(M_CLAWS,M_TALONS)
@@ -1059,7 +1061,7 @@ var/list/has_died_as_golem = list()
icobase = 'icons/mob/human_races/r_ghoul.dmi' icobase = 'icons/mob/human_races/r_ghoul.dmi'
deform = 'icons/mob/human_races/r_skeleton.dmi' //It's thin leathery skin on top of bone, deformation's just gonna show bone deform = 'icons/mob/human_races/r_skeleton.dmi' //It's thin leathery skin on top of bone, deformation's just gonna show bone
flags = NO_PAIN | IS_WHITELISTED | RAD_ABSORB flags = NO_PAIN | WHITELISTED | RAD_ABSORB
anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS
has_mutant_race = 0 has_mutant_race = 0
@@ -1084,7 +1086,7 @@ var/list/has_died_as_golem = list()
attack_verb = "glomps" attack_verb = "glomps"
tacklePower = 35 tacklePower = 35
flags = IS_WHITELISTED | NO_BREATHE | ELECTRIC_HEAL flags = WHITELISTED | NO_BREATHE | ELECTRIC_HEAL
anatomy_flags = NO_SKIN | NO_BLOOD | NO_BONES | NO_STRUCTURE | MULTICOLOR anatomy_flags = NO_SKIN | NO_BLOOD | NO_BONES | NO_STRUCTURE | MULTICOLOR
spells = list(/spell/regen_limbs) spells = list(/spell/regen_limbs)
@@ -1211,7 +1213,7 @@ var/list/has_died_as_golem = list()
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/insectoid meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/insectoid
primitive = /mob/living/carbon/monkey/roach primitive = /mob/living/carbon/monkey/roach
flags = IS_WHITELISTED flags = WHITELISTED | PLAYABLE
anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS | NO_BALD | RGBSKINTONE anatomy_flags = HAS_LIPS | HAS_SWEAT_GLANDS | NO_BALD | RGBSKINTONE
burn_mod = 1.1 burn_mod = 1.1
@@ -1272,7 +1274,7 @@ var/list/has_died_as_golem = list()
known_languages = list(LANGUAGE_VOX) known_languages = list(LANGUAGE_VOX)
meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/mushroom_man meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/mushroom_man
flags = IS_WHITELISTED | NO_BREATHE | IS_PLANT | SPECIES_NO_MOUTH flags = WHITELISTED | PLAYABLE | NO_BREATHE | IS_PLANT | SPECIES_NO_MOUTH
anatomy_flags = NO_BALD anatomy_flags = NO_BALD
gender = NEUTER gender = NEUTER
@@ -1367,7 +1369,7 @@ var/list/has_died_as_golem = list()
icobase = 'icons/mob/human_races/r_lich.dmi' icobase = 'icons/mob/human_races/r_lich.dmi'
deform = 'icons/mob/human_races/r_lich.dmi' deform = 'icons/mob/human_races/r_lich.dmi'
known_languages = list(LANGUAGE_CLATTER) known_languages = list(LANGUAGE_CLATTER)
flags = IS_WHITELISTED | NO_BREATHE flags = WHITELISTED | NO_BREATHE
anatomy_flags = HAS_LIPS | NO_SKIN | NO_BLOOD anatomy_flags = HAS_LIPS | NO_SKIN | NO_BLOOD
meat_type = /obj/item/stack/sheet/bone meat_type = /obj/item/stack/sheet/bone
chem_flags = NO_EAT | NO_INJECT chem_flags = NO_EAT | NO_INJECT

View File

@@ -255,6 +255,7 @@
return 0 return 0
/mob/proc/store_position() /mob/proc/store_position()
//updates the players' origin_ vars so they retain their location when the round starts.
origin_x = x origin_x = x
origin_y = y origin_y = y
origin_z = z origin_z = z

View File

@@ -153,12 +153,6 @@
to_chat(usr, "<span class='warning'>The round is either not ready, or has already finished...</span>") to_chat(usr, "<span class='warning'>The round is either not ready, or has already finished...</span>")
return return
if(client.prefs.species != "Human")
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
to_chat(src, alert("You are currently not whitelisted to play [client.prefs.species]."))
return 0
LateChoices() LateChoices()
if(href_list["cluwnebanned"]) if(href_list["cluwnebanned"])
if(!iscluwnebanned(usr)) if(!iscluwnebanned(usr))
@@ -185,10 +179,6 @@
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>") to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
return return
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
to_chat(src, alert("You are currently not whitelisted to play [client.prefs.species]."))
return 0
AttemptLateSpawn(href_list["SelectedJob"]) AttemptLateSpawn(href_list["SelectedJob"])
return return
@@ -366,7 +356,7 @@
job_master.AssignRole(src, rank, 1) job_master.AssignRole(src, rank, 1)
var/mob/living/carbon/human/character = create_character(1) //creates the human and transfers vars and mind var/mob/living/carbon/human/character = create_human(client.prefs) //creates the human and transfers vars and mind
if(character.client.prefs.randomslot) if(character.client.prefs.randomslot)
character.client.prefs.random_character_sqlite(character, character.ckey) character.client.prefs.random_character_sqlite(character, character.ckey)
@@ -399,7 +389,7 @@
var/turf/T = character.loc var/turf/T = character.loc
if(character.mind.assigned_role != "MODE") if(character.mind.assigned_role != "MODE")
job_master.EquipRank(character, rank, 1) //Must come before OnPostSetup for uplinks job_master.PostJobSetup(character)
for(var/role in character.mind.antag_roles) for(var/role in character.mind.antag_roles)
var/datum/role/R = character.mind.antag_roles[role] var/datum/role/R = character.mind.antag_roles[role]
@@ -415,6 +405,8 @@
qdel(src) qdel(src)
return return
if(job)
job.equip(character, job.priority) // Outfit datum.
EquipCustomItems(character) EquipCustomItems(character)
@@ -653,34 +645,34 @@
src << browse(dat, "window=latechoices;size=360x640;can_close=1") src << browse(dat, "window=latechoices;size=360x640;can_close=1")
/mob/new_player/proc/create_character() /mob/new_player/proc/create_human(var/datum/preferences/prefs)
spawning = 1 spawning = TRUE
close_spawn_windows() close_spawn_windows()
var/mob/living/carbon/human/new_character = new(loc) var/mob/living/carbon/human/new_character = new(loc)
var/datum/species/chosen_species var/datum/species/chosen_species
if(client.prefs.species) var/late_join = ticker.current_state == GAME_STATE_PLAYING ? TRUE : FALSE
chosen_species = all_species[client.prefs.species]
if(chosen_species) if(prefs.species)
if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED) || (client && client.holder && (client.holder.rights & R_ADMIN)) )// Have to recheck admin due to no usr at roundstart. Latejoins are fine though. chosen_species = all_species[prefs.species]
new_character.set_species(client.prefs.species) if(chosen_species && (check_rights(R_ADMIN, 0) || chosen_species.flags & PLAYABLE || chosen_species.conditional_playable()))
//if(chosen_species.language) new_character.set_species(prefs.species)
//new_character.add_language(chosen_species.language) else
to_chat(usr, "Your preferences had a non-playable species, so you were reverted to the default species.")
var/datum/language/chosen_language var/datum/language/chosen_language
if(client.prefs.language) if(prefs.language)
chosen_language = all_languages["[client.prefs.language]"] chosen_language = all_languages["[prefs.language]"]
if(chosen_language) if(chosen_language)
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED) ) if(chosen_language.flags & WHITELISTED)
new_character.add_language("[client.prefs.language]") new_character.add_language("[prefs.language]")
if(ticker.random_players || appearance_isbanned(src)) //disabling ident bans for now if(ticker.random_players || appearance_isbanned(src)) //disabling ident bans for now
new_character.setGender(pick(MALE, FEMALE)) new_character.setGender(pick(MALE, FEMALE))
client.prefs.real_name = random_name(new_character.gender, new_character.species.name) prefs.real_name = random_name(new_character.gender, new_character.species.name)
client.prefs.randomize_appearance_for(new_character) prefs.randomize_appearance_for(new_character)
client.prefs.flavor_text = "" prefs.flavor_text = ""
else else
client.prefs.copy_to(new_character) prefs.copy_to(new_character)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBY)// MAD JAMS cant last forever yo src << sound(null, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBY)// MAD JAMS cant last forever yo
@@ -689,50 +681,50 @@
mind.active = 0 // we wish to transfer the key manually mind.active = 0 // we wish to transfer the key manually
mind.transfer_to(new_character) // won't transfer key since the mind is not active mind.transfer_to(new_character) // won't transfer key since the mind is not active
new_character.name = real_name new_character.name = prefs.real_name
new_character.dna.ready_dna(new_character) new_character.dna.ready_dna(new_character)
if(new_character.mind) if(new_character.mind)
new_character.mind.store_memory("<b>Your blood type is:</b> [new_character.dna.b_type]<br>") new_character.mind.store_memory("<b>Your blood type is:</b> [new_character.dna.b_type]<br>")
if(client.prefs.disabilities & DISABILITY_FLAG_NEARSIGHTED) if(prefs.disabilities & DISABILITY_FLAG_NEARSIGHTED)
new_character.dna.SetSEState(GLASSESBLOCK,1,1) new_character.dna.SetSEState(GLASSESBLOCK,1,1)
new_character.disabilities |= NEARSIGHTED new_character.disabilities |= NEARSIGHTED
if(client.prefs.disabilities & DISABILITY_FLAG_VEGAN) if(prefs.disabilities & DISABILITY_FLAG_VEGAN)
new_character.dna.SetSEState(VEGANBLOCK, 1, 1) new_character.dna.SetSEState(VEGANBLOCK, 1, 1)
if(client.prefs.disabilities & DISABILITY_FLAG_ASTHMA) if(prefs.disabilities & DISABILITY_FLAG_ASTHMA)
new_character.dna.SetSEState(ASTHMABLOCK, 1, 1) new_character.dna.SetSEState(ASTHMABLOCK, 1, 1)
chosen_species = all_species[client.prefs.species] chosen_species = all_species[prefs.species]
if( (client.prefs.disabilities & DISABILITY_FLAG_FAT) && (chosen_species.anatomy_flags & CAN_BE_FAT) ) if( (prefs.disabilities & DISABILITY_FLAG_FAT) && (chosen_species.anatomy_flags & CAN_BE_FAT) )
new_character.mutations += M_FAT new_character.mutations += M_FAT
new_character.overeatduration = 600 new_character.overeatduration = 600
if(client.prefs.disabilities & DISABILITY_FLAG_EPILEPTIC) if(prefs.disabilities & DISABILITY_FLAG_EPILEPTIC)
new_character.dna.SetSEState(EPILEPSYBLOCK,1,1) new_character.dna.SetSEState(EPILEPSYBLOCK,1,1)
new_character.disabilities |= EPILEPSY new_character.disabilities |= EPILEPSY
if(client.prefs.disabilities & DISABILITY_FLAG_DEAF) if(prefs.disabilities & DISABILITY_FLAG_DEAF)
new_character.dna.SetSEState(DEAFBLOCK,1,1) new_character.dna.SetSEState(DEAFBLOCK,1,1)
new_character.sdisabilities |= DEAF new_character.sdisabilities |= DEAF
if(client.prefs.disabilities & DISABILITY_FLAG_MUTE) if(prefs.disabilities & DISABILITY_FLAG_MUTE)
new_character.dna.SetSEState(MUTEBLOCK,1,1) new_character.dna.SetSEState(MUTEBLOCK,1,1)
new_character.sdisabilities |= MUTE new_character.sdisabilities |= MUTE
if(client.prefs.disabilities & DISABILITY_FLAG_LISP) if(prefs.disabilities & DISABILITY_FLAG_LISP)
new_character.dna.SetSEState(LISPBLOCK, 1, 1) new_character.dna.SetSEState(LISPBLOCK, 1, 1)
if(client.prefs.disabilities & DISABILITY_FLAG_ANEMIA) if(prefs.disabilities & DISABILITY_FLAG_ANEMIA)
new_character.dna.SetSEState(ANEMIABLOCK, 1, 1) new_character.dna.SetSEState(ANEMIABLOCK, 1, 1)
new_character.dna.UpdateSE() new_character.dna.UpdateSE()
domutcheck(new_character, null, MUTCHK_FORCED) domutcheck(new_character, null, MUTCHK_FORCED)
var/rank = new_character.mind.assigned_role var/rank = new_character.mind.assigned_role
if(!(ticker.current_state == GAME_STATE_PLAYING)) if(!late_join)
var/obj/S = null var/obj/S = null
// Find a spawn point that wasn't given to anyone // Find a spawn point that wasn't given to anyone
for(var/obj/effect/landmark/start/sloc in landmarks_list) for(var/obj/effect/landmark/start/sloc in landmarks_list)
@@ -757,27 +749,26 @@
// Use the arrivals shuttle spawn point // Use the arrivals shuttle spawn point
stack_trace("no spawn points for [rank]") stack_trace("no spawn points for [rank]")
new_character.forceMove(pick(latejoin)) new_character.forceMove(pick(latejoin))
// 20% chance of getting a dormant bad gene, in which case they also get 10% chance of getting a dormant good gene
new_character.key = key //Manually transfer the key to log them in new_character.DormantGenes(20,10,0,0)
for(var/datum/religion/R in ticker.religions) for(var/datum/religion/R in ticker.religions)
if(R.converts_everyone && new_character.mind.assigned_role != "Chaplain") if(R.converts_everyone && new_character.mind.assigned_role != "Chaplain")
R.convert(new_character,null,TRUE,TRUE) R.convert(new_character,null,TRUE,TRUE)
break //Only autoconvert them once, and only if they aren't leading their own faith. break //Only autoconvert them once, and only if they aren't leading their own faith.
if(late_join)
new_character.key = key
return new_character return new_character
/mob/new_player/proc/create_roundstart_human() //Basically, a stripped down version of create_human(). We don't care about DNA, prefs, species, etc. and we skip some rather lengthy setup for each step.
var/mob/living/carbon/human/new_character = create_character() /mob/new_player/proc/create_roundstart_silicon(var/datum/preferences/prefs)
qdel(src) var/type = mind.assigned_role
new_character.DormantGenes(20,10,0,0) // 20% chance of getting a dormant bad gene, in which case they also get 10% chance of getting a dormant good gene
//Basically, a stripped down version of create_character(). We don't care about DNA, prefs, species, etc. and we skip some rather lengthy setup for each step.
/mob/new_player/proc/create_roundstart_silicon(var/type)
if(type != "Cyborg" && type != "AI" && type != "Mobile MMI") if(type != "Cyborg" && type != "AI" && type != "Mobile MMI")
return return
//End lobby
spawning = 1 spawning = TRUE
close_spawn_windows() close_spawn_windows()
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBY) src << sound(null, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBY)
@@ -797,17 +788,20 @@
message_admins("WARNING! Couldn't find a spawn location for a [type]. They will spawn at the arrival shuttle.") message_admins("WARNING! Couldn't find a spawn location for a [type]. They will spawn at the arrival shuttle.")
//Create the robot and move over prefs //Create the robot and move over prefs
if(type == "AI") if(type == "AI")
return AIize() var/mob/living/silicon/new_character
new_character = AIize()
return new_character
else else
forceMove(spawn_loc)
var/mob/living/silicon/robot/new_character var/mob/living/silicon/robot/new_character
var/datum/preferences/prefs = client.prefs forceMove(spawn_loc)
if(type == "Mobile MMI") if(type == "Mobile MMI")
new_character = MoMMIfy() new_character = MoMMIfy()
else else
new_character = Robotize() new_character = Robotize()
new_character.mmi.create_identity(prefs) //Uses prefs to create a brain mob new_character.mmi.create_identity(prefs) //Uses prefs to create a brain mob
return new_character return new_character
/mob/new_player/proc/ViewPrediction() /mob/new_player/proc/ViewPrediction()
@@ -828,7 +822,7 @@
return 0 return 0
/mob/new_player/proc/close_spawn_windows() /mob/proc/close_spawn_windows()
src << browse(null, "window=latechoices") //closes late choices window src << browse(null, "window=latechoices") //closes late choices window
src << browse(null, "window=playersetup") //closes the player setup window src << browse(null, "window=playersetup") //closes the player setup window

View File

@@ -83,10 +83,6 @@ var/auxtools_path
load_admins() load_admins()
load_mods() load_mods()
LoadBansjob() LoadBansjob()
if(config.usewhitelist)
load_whitelist()
if(config.usealienwhitelist)
load_alienwhitelist()
jobban_loadbanfile() jobban_loadbanfile()
oocban_loadbanfile() oocban_loadbanfile()
paxban_loadbanfile() paxban_loadbanfile()

View File

@@ -661,7 +661,6 @@
#include "code\game\jobs\access.dm" #include "code\game\jobs\access.dm"
#include "code\game\jobs\job_controller.dm" #include "code\game\jobs\job_controller.dm"
#include "code\game\jobs\jobs.dm" #include "code\game\jobs\jobs.dm"
#include "code\game\jobs\whitelist.dm"
#include "code\game\jobs\job\assistant.dm" #include "code\game\jobs\job\assistant.dm"
#include "code\game\jobs\job\captain.dm" #include "code\game\jobs\job\captain.dm"
#include "code\game\jobs\job\civilian.dm" #include "code\game\jobs\job\civilian.dm"