From 6831ab046c21939106fc812cbfdf4e02aa51ccf4 Mon Sep 17 00:00:00 2001 From: Pete Goodfellow Date: Mon, 1 Apr 2013 00:17:15 +0100 Subject: [PATCH] Added a configuration option to force random names. This replaces the gameticker var/random_players. The 'Make everyone random' verb works as it did before. --- code/controllers/configuration.dm | 3 +++ code/game/gamemodes/gameticker.dm | 2 -- code/modules/admin/verbs/randomverbs.dm | 8 ++++---- code/modules/mob/new_player/new_player.dm | 2 +- config/game_options.txt | 3 +++ 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 57d16d68032..9e5747fb046 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -58,6 +58,7 @@ var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database //game_options.txt configs + var/force_random_names = 0 var/list/mode_names = list() var/list/modes = list() // allowed modes var/list/votable_modes = list() // votable modes @@ -332,6 +333,8 @@ use_recursive_explosions = 1 if("humans_need_surnames") humans_need_surnames = 1 + if("force_random_names") + config.force_random_names = 1 if("allow_ai") config.allow_ai = 1 else diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 0854510357a..0d4634fe21e 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -24,8 +24,6 @@ var/global/datum/controller/gameticker/ticker var/Bible_name // name of the bible var/Bible_deity_name - var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders - var/list/syndicate_coalition = list() // list of traitor-compatible factions var/list/factions = list() // list of all factions var/list/availablefactions = list() // list of factions with openings diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0903627d067..3736607eb16 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -783,12 +783,12 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Make Everyone Random" set desc = "Make everyone have a random appearance. You can only use this before rounds!" - if (ticker && ticker.mode) + if(ticker && ticker.mode) usr << "Nope you can't do this, the game's already started. This only works before rounds!" return - if(ticker.random_players) - ticker.random_players = 0 + if(config.force_random_names) + config.force_random_names = 0 message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1) usr << "Disabled." return @@ -806,7 +806,7 @@ Traitors and the like can also be revived with the previous role mostly intact. usr << "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet." - ticker.random_players = 1 + config.force_random_names = 1 feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f7abec2be59..08e7e99212f 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -308,7 +308,7 @@ var/mob/living/carbon/human/new_character = new(loc) new_character.lastarea = get_area(loc) - if(ticker.random_players || appearance_isbanned(new_character)) + if(config.force_random_names || appearance_isbanned(new_character)) new_character.gender = pick(MALE, FEMALE) client.prefs.real_name = random_name() client.prefs.randomize_appearance_for(new_character) diff --git a/config/game_options.txt b/config/game_options.txt index a47f8c1be63..e7cfd646c3a 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -45,6 +45,9 @@ ANIMAL_DELAY 0 ## If uncommented this adds a random surname to a player's name if they only specify one name. #HUMANS_NEED_SURNAMES +## If uncommented, this forces all players to use random names !and appearances!. +#FORCE_RANDOM_NAMES + ### ALERT LEVELS ### ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced.