mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #15980 from AffectedArc07/toml-config
[READY] Converts configs to use TOML + Configuration refactor
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
else if(dynamic_lighting != DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
if(dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
dynamic_lighting = config.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED
|
||||
dynamic_lighting = GLOB.configuration.general.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
possible_traitors = get_players_for_role(ROLE_TRAITOR)
|
||||
@@ -35,7 +35,7 @@
|
||||
if(!possible_traitors.len)
|
||||
return 0
|
||||
|
||||
if(config.traitor_scaling)
|
||||
if(GLOB.configuration.gamemode.traitor_scaling)
|
||||
num_traitors = max_traitors - 1 + prob(traitor_prob)
|
||||
log_game("Number of traitors: [num_traitors]")
|
||||
message_admins("Players counted: [num_players] Number of traitors chosen: [num_traitors]")
|
||||
|
||||
@@ -101,7 +101,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
to_chat(blob.current, "<b>Find a good location to spawn the core and then take control and overwhelm the station!</b>")
|
||||
to_chat(blob.current, "<b>When you have found a location, wait until you spawn; this will happen automatically and you cannot speed up the process.</b>")
|
||||
to_chat(blob.current, "<b>If you go outside of the station level, or in space, then you will die; make sure your location has lots of ground to cover.</b>")
|
||||
to_chat(blob.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Blob)</span>")
|
||||
to_chat(blob.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Blob)</span>")
|
||||
SEND_SOUND(blob.current, sound('sound/magic/mutate.ogg'))
|
||||
return
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E
|
||||
to_chat(world, "<B>There are alien changelings on the station. Do not let the changelings succeed!</B>")
|
||||
|
||||
/datum/game_mode/changeling/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||
@@ -147,7 +147,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E
|
||||
for(var/datum/objective/objective in changeling.objectives)
|
||||
to_chat(changeling.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
to_chat(changeling.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Changeling)</span>")
|
||||
to_chat(changeling.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Changeling)</span>")
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/remove_changeling(datum/mind/changeling_mind)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/traitor/changeling/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||
|
||||
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
to_chat(world, "<B>Some crewmembers are attempting to start a cult!<BR>\nCultists - complete your objectives. Convert crewmembers to your cause by using the offer rune. Remember - there is no you, there is only the cult.<BR>\nPersonnel - Do not let the cult succeed in its mission. Brainwashing them with holy water reverts them to whatever CentComm-allowed faith they had.</B>")
|
||||
|
||||
/datum/game_mode/cult/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/cultists_possible = get_players_for_role(ROLE_CULTIST)
|
||||
@@ -99,7 +99,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
add_cult_actions(cult_mind)
|
||||
update_cult_icons_added(cult_mind)
|
||||
cult_objs.study(cult_mind.current)
|
||||
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Cultist)</span>")
|
||||
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)</span>")
|
||||
cult_threshold_check()
|
||||
addtimer(CALLBACK(src, .proc/cult_threshold_check), 2 MINUTES) // Check again in 2 minutes for latejoiners
|
||||
..()
|
||||
@@ -167,7 +167,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
ascend(cult_mind.current)
|
||||
check_cult_size()
|
||||
cult_objs.study(cult_mind.current)
|
||||
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Cultist)</span>")
|
||||
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = TRUE, remove_gear = FALSE)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if((player.client)&&(player.ready))
|
||||
playerC++
|
||||
|
||||
if(!config.enable_gamemode_player_limit || (playerC >= required_players))
|
||||
if(!GLOB.configuration.gamemode.enable_gamemode_player_limit || (playerC >= required_players))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective.
|
||||
to_chat(raider.current, "<span class='notice'>Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious.</span>")
|
||||
to_chat(raider.current, "<span class='notice'>Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!</span>")
|
||||
to_chat(raider.current, "<span class='notice'>Choose to accomplish your objectives by either raiding the crew and taking what you need, or by attempting to trade with them.</span>")
|
||||
to_chat(raider.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Vox_Raider)</span>")
|
||||
to_chat(raider.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Vox_Raider)</span>")
|
||||
spawn(25)
|
||||
show_objectives(raider)
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
to_chat(abductor.current, "<span class='notice'>You are an agent of [team_name]!</span>")
|
||||
to_chat(abductor.current, "<span class='notice'>With the help of your teammate, kidnap and experiment on station crew members!</span>")
|
||||
to_chat(abductor.current, "<span class='notice'>Use your stealth technology and equipment to incapacitate humans for your scientist to retrieve.</span>")
|
||||
to_chat(abductor.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Abductor)</span>")
|
||||
to_chat(abductor.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Abductor)</span>")
|
||||
|
||||
abductor.announce_objectives()
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
to_chat(abductor.current, "<span class='notice'>You are a scientist of [team_name]!</span>")
|
||||
to_chat(abductor.current, "<span class='notice'>With the help of your teammate, kidnap and experiment on station crew members!</span>")
|
||||
to_chat(abductor.current, "<span class='notice'>Use your tool and ship consoles to support the agent and retrieve human specimens.</span>")
|
||||
to_chat(abductor.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Abductor)</span>")
|
||||
to_chat(abductor.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Abductor)</span>")
|
||||
|
||||
abductor.announce_objectives()
|
||||
|
||||
|
||||
@@ -837,7 +837,7 @@
|
||||
to_chat(src, "You are a brain slug that worms its way into the head of its victim. Use stealth, persuasion and your powers of mind control to keep you, your host and your eventual spawn safe and warm.")
|
||||
to_chat(src, "Sugar nullifies your abilities, avoid it at all costs!")
|
||||
to_chat(src, "You can speak to your fellow borers by prefixing your messages with ':bo'. Check out your Borer tab to see your abilities.")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Cortical_Borer)</span>")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cortical_Borer)</span>")
|
||||
|
||||
/proc/create_borer_mind(key)
|
||||
var/datum/mind/M = new /datum/mind(key)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
to_chat(src, "1. Consume resources and replicate until there are no more resources left.")
|
||||
to_chat(src, "2. Ensure that the station is fit for invasion at a later date, do not perform actions that would render it dangerous or inhospitable.")
|
||||
to_chat(src, "3. Biological and sentient resources will be harvested at a later date, do not harm them.")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Swarmer)</span>")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Swarmer)</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/New()
|
||||
..()
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
to_chat(G, "You are capable of manifesting or recalling to your master with verbs in the Guardian tab. You will also find a verb to communicate with them privately there.")
|
||||
to_chat(G, "While personally invincible, you will die if [user.real_name] does, and any damage dealt to you will have a portion passed on to them as you feed upon them to sustain yourself.")
|
||||
to_chat(G, "[G.playstyle_string]")
|
||||
to_chat(G, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Guardian)</span>")
|
||||
to_chat(G, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Guardian)</span>")
|
||||
G.faction = user.faction
|
||||
|
||||
var/color = pick(color_list)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
player_mind.special_role = SPECIAL_ROLE_MORPH
|
||||
SSticker.mode.traitors |= player_mind
|
||||
to_chat(S, S.playstyle_string)
|
||||
to_chat(S, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Morph)</span>")
|
||||
to_chat(S, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Morph)</span>")
|
||||
SEND_SOUND(S, sound('sound/magic/mutate.ogg'))
|
||||
message_admins("[key_of_morph] has been made into morph by an event.")
|
||||
log_game("[key_of_morph] was spawned as a morph by an event.")
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
to_chat(src, "<b>You are invincible and invisible to everyone but other ghosts. Most abilities will reveal you, rendering you vulnerable.</b>")
|
||||
to_chat(src, "<b>To function, you are to drain the life essence from humans. This essence is a resource, as well as your health, and will power all of your abilities.</b>")
|
||||
to_chat(src, "<b><i>You do not remember anything of your past lives, nor will you remember anything about this one after your death.</i></b>")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Revenant)</span>")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Revenant)</span>")
|
||||
var/datum/objective/revenant/objective = new
|
||||
objective.owner = mind
|
||||
mind.objectives += objective
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
mind.objectives += fluffObjective
|
||||
to_chat(src, "<B>Objective #[1]</B>: [objective.explanation_text]")
|
||||
to_chat(src, "<B>Objective #[2]</B>: [fluffObjective.explanation_text]")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Slaughter_Demon)</span>")
|
||||
to_chat(src, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Slaughter_Demon)</span>")
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/innards
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
for(var/datum/objective/objective in syndicate.objectives)
|
||||
to_chat(syndicate.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
to_chat(syndicate.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Nuclear_Agent)</span>")
|
||||
to_chat(syndicate.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Nuclear_Agent)</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
// No. of player - Min. Player to dec, divided by player per bonus, then multipled by TC per bonus. Rounded.
|
||||
total_tc = CHALLENGE_TELECRYSTALS + round((((GLOB.player_list.len - CHALLENGE_MIN_PLAYERS)/CHALLENGE_SCALE_PLAYER) * CHALLENGE_SCALE_BONUS))
|
||||
share_telecrystals()
|
||||
config.shuttle_refuel_delay = CHALLENGE_SHUTTLE_DELAY
|
||||
SSshuttle.refuel_delay = CHALLENGE_SHUTTLE_DELAY
|
||||
qdel(src)
|
||||
|
||||
/obj/item/nuclear_challenge/proc/share_telecrystals()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/datum/game_mode/revolution/pre_setup()
|
||||
possible_revolutionaries = get_players_for_role(ROLE_REV)
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
to_chat(rev_mind.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
rev_mind.special_role = SPECIAL_ROLE_HEAD_REV
|
||||
obj_count++
|
||||
to_chat(rev_mind.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Revolution)</span>")
|
||||
to_chat(rev_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Revolution)</span>")
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//This are equips the rev heads with their gear, and makes the clown not clumsy//
|
||||
@@ -214,7 +214,7 @@
|
||||
//Checks if the round is over//
|
||||
///////////////////////////////
|
||||
/datum/game_mode/revolution/check_finished()
|
||||
if(config.continuous_rounds)
|
||||
if(GLOB.configuration.gamemode.disable_certain_round_early_end)
|
||||
if(finished != 0)
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
|
||||
@@ -81,7 +81,7 @@ Made by Xhuis
|
||||
to_chat(world, "<b>There are alien <span class='deadsay'>shadowlings</span> on the station. Crew: Kill the shadowlings before they can eat or enthrall the crew. Shadowlings: Enthrall the crew while remaining in hiding.</b>")
|
||||
|
||||
/datum/game_mode/shadowling/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_shadowlings = get_players_for_role(ROLE_SHADOWLING)
|
||||
@@ -126,7 +126,7 @@ Made by Xhuis
|
||||
to_chat(shadow.current, "<b>Currently, you are disguised as an employee aboard [world.name].</b>")
|
||||
to_chat(shadow.current, "<b>In your limited state, you have two abilities: Hatch and Shadowling Hivemind (:8).</b>")
|
||||
to_chat(shadow.current, "<b>Any other shadowlings are your allies. You must assist them as they shall assist you.</b>")
|
||||
to_chat(shadow.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Shadowling)</span>")
|
||||
to_chat(shadow.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Shadowling)</span>")
|
||||
|
||||
|
||||
/datum/game_mode/proc/process_shadow_objectives(datum/mind/shadow_mind)
|
||||
@@ -168,7 +168,7 @@ Made by Xhuis
|
||||
to_chat(new_thrall_mind.current, "<span class='shadowling'>Your body has been irreversibly altered. The attentive can see this - you may conceal it by wearing a mask.</span>")
|
||||
to_chat(new_thrall_mind.current, "<span class='shadowling'>Though not nearly as powerful as your masters, you possess some weak powers. These can be found in the Thrall Abilities tab.</span>")
|
||||
to_chat(new_thrall_mind.current, "<span class='shadowling'>You may communicate with your allies by speaking in the Shadowling Hivemind (:8).</span>")
|
||||
to_chat(new_thrall_mind.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Shadowling)</span>")
|
||||
to_chat(new_thrall_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Shadowling)</span>")
|
||||
if(jobban_isbanned(new_thrall_mind.current, ROLE_SHADOWLING) || jobban_isbanned(new_thrall_mind.current, ROLE_SYNDICATE))
|
||||
replace_jobbanned_player(new_thrall_mind.current, ROLE_SHADOWLING)
|
||||
if(!victory_warning_announced && (length(shadowling_thralls) >= warning_threshold))//are the slings very close to winning?
|
||||
@@ -216,13 +216,13 @@ Made by Xhuis
|
||||
if(shadow.current.stat == DEAD)
|
||||
continue
|
||||
shadows_alive++
|
||||
if(shadow.special_role == SPECIAL_ROLE_SHADOWLING && config.shadowling_max_age)
|
||||
if(shadow.special_role == SPECIAL_ROLE_SHADOWLING && GLOB.configuration.gamemode.shadowling_max_age)
|
||||
if(ishuman(shadow.current))
|
||||
var/mob/living/carbon/human/H = shadow.current
|
||||
if(!isshadowling(H))
|
||||
for(var/obj/effect/proc_holder/spell/targeted/shadowling_hatch/hatch_ability in shadow.spell_list)
|
||||
hatch_ability.cycles_unused++
|
||||
if(!H.stunned && prob(20) && hatch_ability.cycles_unused > config.shadowling_max_age)
|
||||
if(!H.stunned && prob(20) && hatch_ability.cycles_unused > GLOB.configuration.gamemode.shadowling_max_age)
|
||||
var/shadow_nag_messages = list("You can barely hold yourself in this lesser form!", "The urge to become something greater is overwhelming!", "You feel a burning passion to hatch free of this shell and assume godhood!")
|
||||
H.take_overall_damage(0, 3)
|
||||
to_chat(H, "<span class='userdanger'>[pick(shadow_nag_messages)]</span>")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/datum/game_mode/traitor/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/possible_traitors = get_players_for_role(ROLE_TRAITOR)
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
var/num_traitors = 1
|
||||
|
||||
if(config.traitor_scaling)
|
||||
if(GLOB.configuration.gamemode.traitor_scaling)
|
||||
num_traitors = max(1, round((num_players())/(traitor_scaling_coeff)))
|
||||
else
|
||||
num_traitors = max(1, min(num_players(), traitors_possible))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/traitor/vampire/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_vampires = get_players_for_role(ROLE_VAMPIRE)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/datum/game_mode/vampire/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_vampires = get_players_for_role(ROLE_VAMPIRE)
|
||||
@@ -193,7 +193,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
for(var/datum/objective/objective in vampire.objectives)
|
||||
to_chat(vampire.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
to_chat(vampire.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Vampire)</span>")
|
||||
to_chat(vampire.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Vampire)</span>")
|
||||
return
|
||||
/datum/vampire
|
||||
var/bloodtotal = 0 // CHANGE TO ZERO WHEN PLAYTESTING HAPPENS
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
var/mob/living/simple_animal/hostile/construct/C = new picked_class(shell.loc)
|
||||
C.init_construct(shade, src, shell)
|
||||
to_chat(C, C.playstyle_string)
|
||||
to_chat(C, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Construct)</span>")
|
||||
to_chat(C, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Construct)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Creation failed!</span>: The soul stone is empty! Go kill someone!")
|
||||
|
||||
|
||||
@@ -108,19 +108,9 @@
|
||||
for(var/datum/objective/objective in wizard.objectives)
|
||||
to_chat(wizard.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
to_chat(wizard.current, "<span class='motd'>For more information, check the wiki page: ([config.wikiurl]/index.php/Wizard)</span>")
|
||||
to_chat(wizard.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Wizard)</span>")
|
||||
return
|
||||
|
||||
/*/datum/game_mode/proc/learn_basic_spells(mob/living/carbon/human/wizard_mob)
|
||||
if(!istype(wizard_mob))
|
||||
return
|
||||
if(!config.feature_object_spell_system)
|
||||
wizard_mob.verbs += /client/proc/jaunt
|
||||
wizard_mob.mind.special_verbs += /client/proc/jaunt
|
||||
else
|
||||
wizard_mob.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(usr)
|
||||
*/
|
||||
|
||||
/datum/game_mode/proc/equip_wizard(mob/living/carbon/human/wizard_mob)
|
||||
if(!istype(wizard_mob))
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
outfit = /datum/outfit/job/assistant
|
||||
|
||||
/datum/job/civilian/get_access()
|
||||
if(config.assistant_maint)
|
||||
if(GLOB.configuration.jobs.assistant_maint_access)
|
||||
return list(ACCESS_MAINT_TUNNELS)
|
||||
else
|
||||
return list()
|
||||
|
||||
@@ -85,10 +85,11 @@
|
||||
announce(H)
|
||||
|
||||
/datum/job/proc/get_access()
|
||||
if(!config) //Needed for robots.
|
||||
if(!GLOB?.configuration?.jobs) //Needed for robots.
|
||||
// AA TODO: Remove this once mulebots and stuff use Initialize()
|
||||
return src.minimal_access.Copy()
|
||||
|
||||
if(config.jobs_have_minimal_access)
|
||||
if(GLOB.configuration.jobs.jobs_have_minimal_access)
|
||||
return src.minimal_access.Copy()
|
||||
else
|
||||
return src.access.Copy()
|
||||
@@ -103,7 +104,7 @@
|
||||
/datum/job/proc/available_in_days(client/C)
|
||||
if(!C)
|
||||
return 0
|
||||
if(!config.use_age_restriction_for_jobs)
|
||||
if(!GLOB.configuration.jobs.restrict_jobs_on_account_age)
|
||||
return 0
|
||||
if(!isnum(C.player_age))
|
||||
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
set category = "Special Verbs"
|
||||
set name = "Check my playtime"
|
||||
|
||||
if(!config.use_exp_tracking)
|
||||
if(!GLOB.configuration.jobs.enable_exp_tracking)
|
||||
to_chat(src, "<span class='warning'>Playtime tracking is not enabled.</span>")
|
||||
return
|
||||
|
||||
@@ -105,9 +105,9 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
return 0
|
||||
if(!role)
|
||||
return 0
|
||||
if(!config.use_exp_restrictions)
|
||||
if(!GLOB.configuration.jobs.enable_exp_restrictions)
|
||||
return 0
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, C.mob))
|
||||
if(GLOB.configuration.jobs.enable_exp_admin_bypass && check_rights(R_ADMIN, 0, C.mob))
|
||||
return 0
|
||||
var/list/play_records = params2list(C.prefs.exp)
|
||||
var/isexempt = text2num(play_records[EXP_TYPE_EXEMPT])
|
||||
@@ -128,9 +128,9 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
return 0
|
||||
if(!exp_requirements || !exp_type)
|
||||
return 0
|
||||
if(!config.use_exp_restrictions)
|
||||
if(!GLOB.configuration.jobs.enable_exp_restrictions)
|
||||
return 0
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, C.mob))
|
||||
if(GLOB.configuration.jobs.enable_exp_admin_bypass && check_rights(R_ADMIN, 0, C.mob))
|
||||
return 0
|
||||
var/list/play_records = params2list(C.prefs.exp)
|
||||
var/isexempt = text2num(play_records[EXP_TYPE_EXEMPT])
|
||||
@@ -156,7 +156,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
return "[src] has no client."
|
||||
|
||||
/client/proc/get_exp_report()
|
||||
if(!config.use_exp_tracking)
|
||||
if(!GLOB.configuration.jobs.enable_exp_tracking)
|
||||
return "Tracking is disabled in the server configuration file."
|
||||
var/list/play_records = params2list(prefs.exp)
|
||||
if(!play_records.len)
|
||||
@@ -174,10 +174,10 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
return_text += "<LI>Exempt (all jobs auto-unlocked)</LI>"
|
||||
else if(exp_data[EXP_TYPE_LIVING] > 0)
|
||||
return_text += "<LI>[dep]: [get_exp_format(exp_data[dep])]</LI>"
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, mob))
|
||||
if(GLOB.configuration.jobs.enable_exp_admin_bypass && check_rights(R_ADMIN, 0, mob))
|
||||
return_text += "<LI>Admin</LI>"
|
||||
return_text += "</UL>"
|
||||
if(config.use_exp_restrictions)
|
||||
if(GLOB.configuration.jobs.enable_exp_restrictions)
|
||||
var/list/jobs_locked = list()
|
||||
var/list/jobs_unlocked = list()
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
#define WHITELISTFILE "data/whitelist.txt"
|
||||
|
||||
GLOBAL_LIST_EMPTY(whitelist)
|
||||
|
||||
/proc/init_whitelists()
|
||||
if(config.usewhitelist)
|
||||
load_whitelist()
|
||||
if(config.usealienwhitelist)
|
||||
load_alienwhitelist()
|
||||
|
||||
/proc/load_whitelist()
|
||||
GLOB.whitelist = file2list(WHITELISTFILE)
|
||||
if(!GLOB.whitelist.len)
|
||||
GLOB.whitelist = null
|
||||
/*
|
||||
/proc/check_whitelist(mob/M, rank)
|
||||
if(!whitelist)
|
||||
return 0
|
||||
return ("[M.ckey]" in whitelist)
|
||||
*/
|
||||
|
||||
/proc/is_job_whitelisted(mob/M, rank)
|
||||
if(guest_jobbans(rank))
|
||||
if(!config.usewhitelist)
|
||||
return TRUE
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
return TRUE
|
||||
if(check_rights(R_ADMIN, 0, M))
|
||||
return TRUE
|
||||
@@ -55,30 +32,13 @@ GLOBAL_LIST_EMPTY(whitelist)
|
||||
else
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
GLOBAL_LIST_EMPTY(alien_whitelist)
|
||||
|
||||
/proc/load_alienwhitelist()
|
||||
var/text = file2text("config/alienwhitelist.txt")
|
||||
if(!text)
|
||||
log_config("Failed to load config/alienwhitelist.txt\n")
|
||||
else
|
||||
GLOB.alien_whitelist = splittext(text, "\n")
|
||||
|
||||
//todo: admin aliens
|
||||
/proc/is_alien_whitelisted(mob/M, species)
|
||||
if(!config.usealienwhitelist)
|
||||
return TRUE
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
return TRUE
|
||||
if(species == "human" || species == "Human")
|
||||
return TRUE
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
return TRUE
|
||||
if(!GLOB.alien_whitelist)
|
||||
return FALSE
|
||||
if(!SSdbcore.IsConnected())
|
||||
return FALSE
|
||||
else
|
||||
@@ -104,14 +64,3 @@ GLOBAL_LIST_EMPTY(alien_whitelist)
|
||||
break
|
||||
|
||||
qdel(species_read)
|
||||
/*
|
||||
if(M && species)
|
||||
for(var/s in alien_whitelist)
|
||||
if(findtext(s,"[M.ckey] - [species]"))
|
||||
return 1
|
||||
if(findtext(s,"[M.ckey] - All"))
|
||||
return 1
|
||||
*/
|
||||
|
||||
|
||||
#undef WHITELISTFILE
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
set_temp("Error: Not enough biomass.", "danger")
|
||||
else if(pod.mess)
|
||||
set_temp("Error: The cloning pod is malfunctioning.", "danger")
|
||||
else if(!config.revival_cloning)
|
||||
else if(!GLOB.configuration.general.enable_cloning)
|
||||
set_temp("Error: Unable to initiate cloning cycle.", "danger")
|
||||
else
|
||||
cloneresult = pod.growclone(C)
|
||||
|
||||
@@ -45,15 +45,15 @@
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
// We dont need to clamp here. It gets clamped inside explosion()
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (GLOB.max_ex_devastation_range, devastation + round(amount/12))
|
||||
devastation += round(amount/12)
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (GLOB.max_ex_heavy_range, heavy + round(amount/6))
|
||||
heavy += round(amount/6)
|
||||
|
||||
if(round(amount/3) > 0)
|
||||
light = min (GLOB.max_ex_light_range, light + round(amount/3))
|
||||
light += round(amount/3)
|
||||
|
||||
if(flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
if(!ignorecap)
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
devastation_range = min (GLOB.max_ex_devastation_range, devastation_range)
|
||||
heavy_impact_range = min (GLOB.max_ex_heavy_range, heavy_impact_range)
|
||||
light_impact_range = min (GLOB.max_ex_light_range, light_impact_range)
|
||||
flash_range = min (GLOB.max_ex_flash_range, flash_range)
|
||||
flame_range = min (GLOB.max_ex_flame_range, flame_range)
|
||||
devastation_range = min(GLOB.configuration.general.bomb_cap / 4, devastation_range)
|
||||
heavy_impact_range = min(GLOB.configuration.general.bomb_cap / 2, heavy_impact_range)
|
||||
light_impact_range = min(GLOB.configuration.general.bomb_cap, light_impact_range)
|
||||
flash_range = min(GLOB.configuration.general.bomb_cap, flash_range)
|
||||
flame_range = min(GLOB.configuration.general.bomb_cap, flame_range)
|
||||
|
||||
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
var/list/affected_turfs = spiral_range_turfs(max_range, epicenter)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
if(GLOB.configuration.general.reactionary_explosions)
|
||||
for(var/A in affected_turfs) // we cache the explosion block rating of every turf in the explosion area
|
||||
var/turf/T = A
|
||||
cached_exp_block[T] = 0
|
||||
@@ -136,7 +136,7 @@
|
||||
continue
|
||||
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
if(GLOB.configuration.general.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
while(Trajectory != epicenter)
|
||||
Trajectory = get_step_towards(Trajectory, epicenter)
|
||||
|
||||
@@ -179,12 +179,11 @@
|
||||
addtimer(CALLBACK(src, .proc/boom, user, result), 4 SECONDS)
|
||||
|
||||
/obj/item/dice/d20/e20/proc/boom(mob/user, result)
|
||||
var/capped = FALSE
|
||||
var/capped = TRUE
|
||||
var/actual_result = result
|
||||
if(result != 20)
|
||||
capped = TRUE
|
||||
result = min(result, GLOB.max_ex_light_range) // Apply the bombcap
|
||||
else // Rolled a nat 20, screw the bombcap
|
||||
// Rolled a nat 20, screw the bombcap
|
||||
if(result == 20)
|
||||
capped = FALSE
|
||||
result = 24
|
||||
|
||||
var/turf/epicenter = get_turf(src)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/oldloc = loc
|
||||
step(src, direction)
|
||||
if(oldloc != loc)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), config.walk_speed)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), GLOB.configuration.movement.base_walk_speed)
|
||||
else
|
||||
move_delay = FALSE
|
||||
|
||||
|
||||
@@ -114,12 +114,9 @@
|
||||
|
||||
if("Body")
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
|
||||
if(config.usealienwhitelist)
|
||||
for(var/Spec in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, Spec))
|
||||
race_list += Spec
|
||||
else
|
||||
race_list += GLOB.whitelisted_species
|
||||
for(var/species in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, species))
|
||||
race_list += species
|
||||
|
||||
var/datum/ui_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(config.ghost_interaction)
|
||||
if(GLOB.configuration.general.ghost_interaction)
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
|
||||
SEND_SOUND(src, S)
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
if(!SSticker || !SSticker.login_music || config.disable_lobby_music)
|
||||
if(!SSticker || !SSticker.login_music || GLOB.configuration.general.disable_lobby_music)
|
||||
return
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85 * prefs.get_channel_volume(CHANNEL_LOBBYMUSIC), channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
S.apply_transition(src)
|
||||
|
||||
/turf/space/proc/update_starlight()
|
||||
if(config.starlight)
|
||||
if(GLOB.configuration.general.starlight)
|
||||
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
if(isspaceturf(t))
|
||||
//let's NOT update this that much pls
|
||||
|
||||
+10
-10
@@ -19,10 +19,10 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD, 0))
|
||||
if(!config.ooc_allowed)
|
||||
if(!GLOB.ooc_enabled)
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!GLOB.dooc_enabled && (mob.stat == DEAD))
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
@@ -41,7 +41,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD,0))
|
||||
if(!config.ooc_allowed)
|
||||
if(!GLOB.ooc_enabled)
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN))
|
||||
@@ -61,7 +61,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0))
|
||||
display_colour = GLOB.moderator_ooc_colour
|
||||
else if(check_rights(R_ADMIN,0))
|
||||
if(config.allow_admin_ooccolor)
|
||||
if(GLOB.configuration.admin.allow_admin_ooc_colour)
|
||||
display_colour = src.prefs.ooccolor
|
||||
else
|
||||
display_colour = GLOB.admin_ooc_colour
|
||||
@@ -92,20 +92,20 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
|
||||
if(!config.disable_ooc_emoji)
|
||||
if(GLOB.configuration.general.enable_ooc_emoji)
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
|
||||
to_chat(C, "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
/proc/toggle_ooc()
|
||||
config.ooc_allowed = ( !config.ooc_allowed )
|
||||
if(config.ooc_allowed)
|
||||
GLOB.ooc_enabled = (!GLOB.ooc_enabled)
|
||||
if(GLOB.ooc_enabled)
|
||||
to_chat(world, "<B>The OOC channel has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The OOC channel has been globally disabled!</B>")
|
||||
|
||||
/proc/auto_toggle_ooc(on)
|
||||
if(config.auto_toggle_ooc_during_round && config.ooc_allowed != on)
|
||||
if(GLOB.configuration.general.auto_disable_ooc && GLOB.ooc_enabled != on)
|
||||
toggle_ooc()
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
@@ -175,10 +175,10 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD,0))
|
||||
if(!config.looc_allowed)
|
||||
if(!GLOB.looc_enabled)
|
||||
to_chat(src, "<span class='danger'>LOOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!GLOB.dooc_enabled && (mob.stat == DEAD))
|
||||
to_chat(usr, "<span class='danger'>LOOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
|
||||
+33
-44
@@ -8,9 +8,19 @@ GLOBAL_LIST_INIT(map_transition_config, list(CC_TRANSITION_CONFIG))
|
||||
// Right off the bat
|
||||
enable_auxtools_debugger()
|
||||
|
||||
// Do sanity checks to ensure RUST actually exists
|
||||
if(!fexists(RUST_G))
|
||||
DIRECT_OUTPUT(world.log, "ERROR: RUSTG was not found and is required for the game to function. Server will now exit.")
|
||||
del(world)
|
||||
|
||||
var/rustg_version = rustg_get_version()
|
||||
if(rustg_version != RUST_G_VERSION)
|
||||
DIRECT_OUTPUT(world.log, "ERROR: RUSTG version mismatch. Library is [rustg_version], code wants [RUST_G_VERSION]. Server will now exit.")
|
||||
del(world)
|
||||
|
||||
//temporary file used to record errors with loading config and the database, moved to log directory once logging is set up
|
||||
GLOB.config_error_log = GLOB.world_game_log = GLOB.world_runtime_log = GLOB.sql_log = "data/logs/config_error.log"
|
||||
load_configuration()
|
||||
GLOB.configuration.load_configuration()
|
||||
|
||||
// Right off the bat, load up the DB
|
||||
SSdbcore.CheckSchemaVersion() // This doesnt just check the schema version, it also connects to the db! This needs to happen super early! I cannot stress this enough!
|
||||
@@ -18,6 +28,7 @@ GLOBAL_LIST_INIT(map_transition_config, list(CC_TRANSITION_CONFIG))
|
||||
|
||||
// Setup all log paths and stamp them with startups, including round IDs
|
||||
SetupLogs()
|
||||
load_files() // Loads up the MOTD (Welcome message players see when joining the server), TOS and gamemode
|
||||
|
||||
// This needs to happen early, otherwise people can get a null species, nuking their character
|
||||
makeDatumRefLists()
|
||||
@@ -32,16 +43,9 @@ GLOBAL_LIST_INIT(map_transition_config, list(CC_TRANSITION_CONFIG))
|
||||
log_world("Unit Tests Are Enabled!")
|
||||
#endif
|
||||
|
||||
if(!fexists("config/config.txt") || !fexists("config/game_options.txt"))
|
||||
stack_trace("The game config files have not been properly set! Please copy ALL files from '/config/example' into the parent folder, '/config'.")
|
||||
|
||||
if(byond_version < MIN_COMPILER_VERSION || byond_build < MIN_COMPILER_BUILD)
|
||||
log_world("Your server's byond version does not meet the recommended requirements for this code. Please update BYOND")
|
||||
|
||||
if(config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
// dumb and hardcoded but I don't care~
|
||||
config.server_name += " #[(world.port % 1000) / 100]"
|
||||
|
||||
GLOB.timezoneOffset = text2num(time2text(0, "hh")) * 36000
|
||||
|
||||
startup_procs() // Call procs that need to occur on startup (Generate lists, load MOTD, etc)
|
||||
@@ -69,8 +73,6 @@ GLOBAL_LIST_INIT(map_transition_config, list(CC_TRANSITION_CONFIG))
|
||||
/world/proc/startup_procs()
|
||||
LoadBans() // Load up who is banned and who isnt. DONT PUT THIS IN A SUBSYSTEM IT WILL TAKE TOO LONG TO BE CALLED
|
||||
jobban_loadbanfile() // Load up jobbans. Again, DO NOT PUT THIS IN A SUBSYSTEM IT WILL TAKE TOO LONG TO BE CALLED
|
||||
load_motd() // Loads up the MOTD (Welcome message players see when joining the server)
|
||||
load_mode() // Loads up the gamemode
|
||||
investigate_reset() // This is part of the admin investigate system. PLEASE DONT SS THIS EITHER
|
||||
|
||||
/// List of all world topic spam prevention handlers. See code/modules/world_topic/_spam_prevention_handler.dm
|
||||
@@ -122,10 +124,10 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
to_chat(world, "<span class='boldannounce'>Rebooting world immediately due to host request</span>")
|
||||
rustg_log_close_all() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
// Now handle a reboot
|
||||
if(config && config.shutdown_on_reboot)
|
||||
if(GLOB.configuration.system.shutdown_on_reboot)
|
||||
sleep(0)
|
||||
if(GLOB.shutdown_shell_command)
|
||||
shell(GLOB.shutdown_shell_command)
|
||||
if(GLOB.configuration.system.shutdown_shell_command)
|
||||
shell(GLOB.configuration.system.shutdown_shell_command)
|
||||
del(world)
|
||||
TgsEndProcess() // We want to shutdown on reboot. That means kill our TGS process "gracefully", instead of the watchdog crying
|
||||
return
|
||||
@@ -151,15 +153,15 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
// Send the reboot banner to all players
|
||||
for(var/client/C in GLOB.clients)
|
||||
C << output(list2params(list(secs_before_auto_reconnect)), "browseroutput:reboot")
|
||||
if(config.server) // If you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[config.server]")
|
||||
if(GLOB.configuration.url.server_url) // If you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[GLOB.configuration.url.server_url]")
|
||||
|
||||
// And begin the real shutdown
|
||||
rustg_log_close_all() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
if(config && config.shutdown_on_reboot)
|
||||
if(GLOB.configuration.system.shutdown_on_reboot)
|
||||
sleep(0)
|
||||
if(GLOB.shutdown_shell_command)
|
||||
shell(GLOB.shutdown_shell_command)
|
||||
if(GLOB.configuration.system.shutdown_shell_command)
|
||||
shell(GLOB.configuration.system.shutdown_shell_command)
|
||||
rustg_log_close_all() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
del(world)
|
||||
TgsEndProcess() // We want to shutdown on reboot. That means kill our TGS process "gracefully", instead of the watchdog crying
|
||||
@@ -180,39 +182,26 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
fdel(F)
|
||||
F << the_mode
|
||||
|
||||
/world/proc/load_motd()
|
||||
/world/proc/load_files()
|
||||
GLOB.join_motd = file2text("config/motd.txt")
|
||||
GLOB.join_tos = file2text("config/tos.txt")
|
||||
|
||||
/proc/load_configuration()
|
||||
config = new /datum/configuration()
|
||||
config.load("config/config.txt")
|
||||
config.load("config/game_options.txt","game_options")
|
||||
config.loadsql("config/dbconfig.txt")
|
||||
config.loadoverflowwhitelist("config/ofwhitelist.txt")
|
||||
config.load_rank_colour_map()
|
||||
// apply some settings from config..
|
||||
load_mode()
|
||||
|
||||
/world/proc/update_status()
|
||||
status = get_status_text()
|
||||
|
||||
/proc/get_world_status_text()
|
||||
return world.get_status_text()
|
||||
|
||||
/world/proc/get_status_text()
|
||||
var/s = ""
|
||||
|
||||
if(config && config.server_name)
|
||||
s += "<b>[config.server_name]</b> — "
|
||||
if(GLOB.configuration.general.server_name)
|
||||
s += "<b>[GLOB.configuration.general.server_name]</b> — "
|
||||
s += "<b>[station_name()]</b> "
|
||||
if(config && config.githuburl)
|
||||
s+= "([GLOB.game_version])"
|
||||
|
||||
if(config && config.server_tag_line)
|
||||
s += "<br>[config.server_tag_line]"
|
||||
if(GLOB.configuration.general.server_tag_line)
|
||||
s += "<br>[GLOB.configuration.general.server_tag_line]"
|
||||
|
||||
if(SSticker && ROUND_TIME > 0)
|
||||
s += "<br>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)], " + capitalize(get_security_level())
|
||||
s += "<br>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)], [capitalize(get_security_level())]"
|
||||
else
|
||||
s += "<br><b>STARTING</b>"
|
||||
|
||||
@@ -222,16 +211,16 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
if(!GLOB.enter_allowed)
|
||||
features += "closed"
|
||||
|
||||
if(config && config.server_extra_features)
|
||||
features += config.server_extra_features
|
||||
if(GLOB.configuration.general.server_features)
|
||||
features += GLOB.configuration.general.server_features
|
||||
|
||||
if(config && config.allow_vote_mode)
|
||||
if(GLOB.configuration.vote.allow_restart_votes)
|
||||
features += "vote"
|
||||
|
||||
if(config && config.wikiurl)
|
||||
features += "<a href=\"[config.wikiurl]\">Wiki</a>"
|
||||
if(GLOB.configuration.url.wiki_url)
|
||||
features += "<a href=\"[GLOB.configuration.url.wiki_url]\">Wiki</a>"
|
||||
|
||||
if(GLOB.abandon_allowed)
|
||||
if(GLOB.configuration.general.respawn_enabled)
|
||||
features += "respawn"
|
||||
|
||||
if(features)
|
||||
|
||||
Reference in New Issue
Block a user