-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathconfiguration.dm
More file actions
1063 lines (828 loc) · 33.3 KB
/
configuration.dm
File metadata and controls
1063 lines (828 loc) · 33.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/datum/configuration
var/server_name = "Nebula 13" // server name (for world name / status)
var/server_suffix = 0 // generate numeric suffix based on server port
var/log_ooc = 0 // log OOC channel
var/log_access = 0 // log login/logout
var/log_say = 0 // log client say
var/log_admin = 0 // log admin actions
var/log_debug = 1 // log debug output
var/log_game = 0 // log game events
var/log_vote = 0 // log voting
var/log_whisper = 0 // log client whisper
var/log_emote = 0 // log emotes
var/log_attack = 0 // log attack messages
var/log_adminchat = 0 // log admin chat messages
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
var/log_pda = 0 // log pda messages
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
var/log_runtime = 0 // logs world.log to a file
var/log_world_output = 0 // log to_world_log(messages)
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
var/allow_vote_restart = 0 // allow votes to restart
var/ert_admin_call_only = 0
var/allow_vote_mode = 0 // allow votes to change mode
var/allow_admin_jump = 1 // allows admin jumping
var/allow_admin_spawning = 1 // allows admin item spawning
var/allow_admin_rev = 1 // allows admin revives
var/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
var/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
var/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
var/vote_autotransfer_interval = 18000 // length of time before next sequential autotransfer vote
var/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100).
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
var/vote_no_dead = 0 // dead people can't vote (tbi)
var/vote_no_dead_crew_transfer = 0 // dead people can't vote on crew transfer votes
// var/enable_authentication = 0 // goon authentication
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/objectives_disabled = 0 //if objectives are disabled or not
var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/allow_holidays = FALSE
var/fps = 20
var/tick_limit_mc_init = TICK_LIMIT_MC_INIT_DEFAULT //SSinitialization throttling
var/list/resource_urls = null
var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
var/list/mode_names = list()
var/list/modes = list() // allowed modes
var/list/votable_modes = list() // votable modes
var/list/probabilities = list() // relative probability of each mode
var/secret_hide_possibilities = FALSE // Whether or not secret modes show list of possible round types
var/humans_need_surnames = 0
var/allow_random_events = 0 // enables random events mid-round when set to 1
var/allow_ai = 1 // allow ai job
var/hostedby = null
var/respawn_delay = 30
var/guest_jobban = 1
var/usewhitelist = 0
var/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
var/mods_can_tempban = 0
var/mods_can_job_tempban = 0
var/mod_tempban_max = 1440
var/mod_job_tempban_max = 1440
var/load_jobs_from_txt = 0
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
var/character_slots = 10 // The number of available character slots
var/loadout_slots = 3 // The number of loadout slots per character
var/max_maint_drones = 5 //This many drones can spawn,
var/allow_drone_spawn = 1 //assuming the admin allow them to.
var/drone_build_time = 1200 //A drone will become available every X ticks since last drone spawn. Default is 2 minutes.
var/disable_player_mice = 0
var/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech
var/usealienwhitelist = 0
var/usealienwhitelistSQL = 0;
var/limitalienplayers = 0
var/alien_to_human_ratio = 0.5
var/allow_extra_antags = 0
var/guests_allowed = 1
var/debugparanoid = 0
var/serverurl
var/server
var/banappeals
var/wikiurl
var/forumurl
var/discordurl
var/githuburl
var/issuereporturl
var/forbid_singulo_possession = 0
//game_options.txt configs
var/show_human_death_message = FALSE
var/health_threshold_dead = -100
var/organ_health_multiplier = 0.9
var/organ_regeneration_multiplier = 0.25
var/organs_decay
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
//so that it's similar to PAIN. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
var/organ_damage_spillover_multiplier = 0.5
var/bones_can_break = 1
var/limbs_can_break = 1
var/revival_pod_plants = 1
var/revival_cloning = 1
var/revival_brain_life = -1
var/use_loyalty_implants = 0
var/max_character_aspects = 5
var/welder_vision = 1
///If false, skips all level generation.
var/roundstart_level_generation = 1
var/no_click_cooldown = 0
//Used for modifying movement speed for mobs.
//Unversal modifiers
var/run_delay = 2
var/walk_delay = 4
var/creep_delay = 6
var/minimum_sprint_cost = 0.8
var/skill_sprint_cost_range = 0.8
var/minimum_stamina_recovery = 1
var/maximum_stamina_recovery = 3
var/glide_size_delay = 1
//Mob specific modifiers. NOTE: These will affect different mob types in different ways
var/human_delay = 0
var/robot_delay = 0
var/monkey_delay = 0
var/alien_delay = 0
var/slime_delay = 0
var/animal_delay = 0
var/maximum_mushrooms = 15 //After this amount alive, mushrooms will not boom boom
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
var/use_age_restriction_for_antags = 0 //Do antags use account age restrictions? --requires database
var/use_iterative_explosions //Defines whether the server uses iterative or circular explosions.
var/iterative_explosives_z_threshold = 10
var/iterative_explosives_z_multiplier = 0.75
var/assistant_maint = 0 //Do assistants get maint access?
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
var/ghost_interaction = 0
var/comms_password = null
var/ban_comms_password = null
var/list/forbidden_versions = list() // Clients with these byond versions will be autobanned. Format: string "byond_version.byond_build"; separate with ; in config, e.g. 512.1234;512.1235
var/minimum_byond_version = 0
var/minimum_byond_build = 0
var/login_export_addr = null
var/enter_allowed = 1
var/player_limit = 0
var/use_irc_bot = 0
var/irc_bot_host = ""
var/main_irc = ""
var/admin_irc = ""
var/announce_shuttle_dock_to_irc = FALSE
var/custom_item_icon_location // File location to look for custom items icons, needs to be relative to the executing binary.
var/custom_icon_icon_location // File location to look for custom icons, needs to be relative to the executing binary.
// Event settings
var/expected_round_length = 3 * 60 * 60 * 10 // 3 hours
// If the first delay has a custom start time
// No custom time, no custom time, between 80 to 100 minutes respectively.
var/list/event_first_run = list(EVENT_LEVEL_MUNDANE = null, EVENT_LEVEL_MODERATE = null, EVENT_LEVEL_MAJOR = list("lower" = 48000, "upper" = 60000))
// The lowest delay until next event
// 10, 30, 50 minutes respectively
var/list/event_delay_lower = list(EVENT_LEVEL_MUNDANE = 6000, EVENT_LEVEL_MODERATE = 18000, EVENT_LEVEL_MAJOR = 30000)
// The upper delay until next event
// 15, 45, 70 minutes respectively
var/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000)
var/aliens_allowed = 0
var/alien_eggs_allowed = 0
var/ninjas_allowed = 0
var/abandon_allowed = 1
var/ooc_allowed = 1
var/looc_allowed = 1
var/dooc_allowed = 1
var/dsay_allowed = 1
var/aooc_allowed = 1
var/exterior_ambient_light = 0 // The strength of ambient light applied to outside turfs
var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010"
var/aggressive_changelog = 0
var/disable_webhook_embeds = FALSE
var/ghosts_can_possess_animals = 0
var/delist_when_no_admins = FALSE
var/allow_map_switching = 0 // Whether map switching is allowed
var/auto_map_vote = 0 // Automatically call a map vote at end of round and switch to the selected map
var/wait_for_sigusr1_reboot = 0 // Don't allow reboot unless it was caused by SIGUSR1
var/radiation_decay_rate = 1 //How much radiation is reduced by each tick
var/radiation_resistance_multiplier = 1.25
var/radiation_material_resistance_divisor = 2 //A turf's possible radiation resistance is divided by this number, to get the real value.
var/radiation_lower_limit = 0.15 //If the radiation level for a turf would be below this, ignore it.
var/auto_local_admin = TRUE // If true, connections from 127.0.0.1 get automatic admin.
var/autostealth = 0 // Staff get automatic stealth after this many minutes
var/error_cooldown = 600 // The "cooldown" time for each occurrence of a unique error
var/error_limit = 50 // How many occurrences before the next will silence them
var/error_silence_time = 6000 // How long a unique error will be silenced for
var/error_msg_delay = 50 // How long to wait between messaging admins about occurrences of a unique error
var/max_gear_cost = 10 // Used in chargen for accessory loadout limit. 0 disables loadout, negative allows infinite points.
var/allow_ic_printing = TRUE //Whether players should be allowed to print IC circuits from scripts.
var/allow_unsafe_narrates = FALSE //Whether admins can use unsanitized narration; when true, allows HTML etc.
var/do_not_prevent_spam = FALSE //If this is true, skips spam prevention for user actions; inputs, verbs, macros, etc.
var/max_acts_per_interval = 140 //Number of actions per interval permitted for spam protection.
var/act_interval = 0.1 SECONDS //Interval for spam prevention.
var/panic_bunker = FALSE //is the panic bunker enabled?
var/panic_bunker_message = "Sorry! The panic bunker is enabled. Please head to our Discord or forum to get yourself added to the panic bunker bypass."
var/lock_client_view_x
var/lock_client_view_y
var/max_client_view_x = MAX_VIEW
var/max_client_view_y = MAX_VIEW
var/allow_diagonal_movement = FALSE
var/no_throttle_localhost
var/dex_malus_brainloss_threshold = 30 //The threshold of when brainloss begins to affect dexterity.
var/grant_default_darksight = FALSE
var/default_darksight_range = 2
var/default_darksight_effectiveness = 0.05
// Economy variables
var/withdraw_period = 1 DAY
var/interest_period = 1 DAY
var/interest_mod_delay = 2 DAYS
var/withdraw_mod_delay = 3 DAYS
var/transaction_mod_delay = 2 DAYS
var/fractional_reserve_mod_delay = 3 DAYS
var/anti_tamper_mod_delay = 2 DAYS
var/static/list/protected_vars = list(
"comms_password",
"ban_comms_password",
"login_export_addr"
)
var/expanded_alt_interactions = FALSE // Set to true to enable look, grab, drop, etc. in the alt interaction menu.
var/show_typing_indicator_for_whispers = FALSE // Do whispers show typing indicators overhead?
// Stress-related healing vars.
var/adjust_healing_from_stress = FALSE
var/stress_shock_recovery_constant = 0.5
var/stress_healing_recovery_constant = 0.3
var/stress_blood_recovery_constant = 0.3
var/exoplanet_min_day_duration = 10 MINUTES
var/exoplanet_max_day_duration = 40 MINUTES
///If true, exoplanets won't have daycycles
var/disable_daycycle = FALSE
/// Whether or not you will show a message when examining something.
var/visible_examine = TRUE
/// Whether or not loadout options will get free name and desc entry by default.
var/allow_loadout_customization = FALSE
/datum/configuration/VV_hidden()
. = ..() | protected_vars
/datum/configuration/New()
var/list/all_modes = decls_repository.get_decls_of_subtype(/decl/game_mode)
for (var/mode_type in all_modes)
var/decl/game_mode/game_mode = all_modes[mode_type]
if (!game_mode.uid || !(game_mode.uid in modes))
continue
log_misc("Adding game mode [game_mode.name] ([game_mode.uid]) to configuration.")
src.modes += game_mode.uid
src.mode_names[game_mode.uid] = game_mode.name
src.probabilities[game_mode.uid] = game_mode.probability
if (game_mode.votable)
src.votable_modes += game_mode.uid
src.votable_modes += "secret"
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
if (pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
continue
if(type == "config")
switch (name)
if ("resource_urls")
config.resource_urls = splittext(value, " ")
if ("admin_legacy_system")
config.admin_legacy_system = 1
if ("ban_legacy_system")
config.ban_legacy_system = 1
if ("use_age_restriction_for_jobs")
config.use_age_restriction_for_jobs = 1
if ("use_age_restriction_for_antags")
config.use_age_restriction_for_antags = 1
if ("jobs_have_minimal_access")
config.jobs_have_minimal_access = 1
if ("use_iterative_explosions")
use_iterative_explosions = 1
if ("expanded_alt_interactions")
expanded_alt_interactions = 1
if ("explosion_z_threshold")
iterative_explosives_z_threshold = text2num(value)
if ("explosion_z_mult")
iterative_explosives_z_multiplier = text2num(value)
if ("custom_item_icon_location")
config.custom_item_icon_location = value
if ("custom_icon_icon_location")
config.custom_icon_icon_location = value
if ("log_ooc")
config.log_ooc = 1
if ("log_access")
config.log_access = 1
if ("log_say")
config.log_say = 1
if ("debug_paranoid")
config.debugparanoid = 1
if ("log_admin")
config.log_admin = 1
if ("log_debug")
config.log_debug = text2num(value)
if ("log_game")
config.log_game = 1
if ("log_vote")
config.log_vote = 1
if ("log_whisper")
config.log_whisper = 1
if ("log_attack")
config.log_attack = 1
if ("log_emote")
config.log_emote = 1
if ("log_adminchat")
config.log_adminchat = 1
if ("log_adminwarn")
config.log_adminwarn = 1
if ("log_pda")
config.log_pda = 1
if ("log_world_output")
config.log_world_output = 1
if ("log_hrefs")
config.log_hrefs = 1
if ("log_runtime")
config.log_runtime = 1
if ("roundstart_level_generation")
config.roundstart_level_generation = text2num(value)
if ("no_click_cooldown")
config.no_click_cooldown = 1
if("allow_admin_ooccolor")
config.allow_admin_ooccolor = 1
if ("allow_vote_restart")
config.allow_vote_restart = 1
if ("allow_vote_mode")
config.allow_vote_mode = 1
if ("allow_admin_jump")
config.allow_admin_jump = 1
if("allow_admin_rev")
config.allow_admin_rev = 1
if ("allow_admin_spawning")
config.allow_admin_spawning = 1
if ("no_dead_vote")
config.vote_no_dead = 1
if ("no_dead_vote_crew_transfer")
config.vote_no_dead_crew_transfer = 1
if ("default_no_vote")
config.vote_no_default = 1
if ("vote_delay")
config.vote_delay = text2num(value)
if ("vote_period")
config.vote_period = text2num(value)
if ("vote_autotransfer_initial")
config.vote_autotransfer_initial = text2num(value)
if ("vote_autotransfer_interval")
config.vote_autotransfer_interval = text2num(value)
if ("vote_autogamemode_timeleft")
config.vote_autogamemode_timeleft = text2num(value)
if("ert_admin_only")
config.ert_admin_call_only = 1
if ("allow_ai")
config.allow_ai = 1
// if ("authentication")
// config.enable_authentication = 1
if ("respawn_delay")
config.respawn_delay = text2num(value)
config.respawn_delay = config.respawn_delay > 0 ? config.respawn_delay : 0
if ("servername")
config.server_name = value
if ("serversuffix")
config.server_suffix = 1
if ("hostedby")
config.hostedby = value
if ("serverurl")
config.serverurl = value
if ("server")
config.server = value
if ("banappeals")
config.banappeals = value
if ("wikiurl")
config.wikiurl = value
if ("forumurl")
config.forumurl = value
if ("discordurl")
config.discordurl = value
if ("githuburl")
config.githuburl = value
if ("issuereporturl")
config.issuereporturl = value
if ("ghosts_can_possess_animals")
config.ghosts_can_possess_animals = value
if ("guest_jobban")
config.guest_jobban = 1
if ("guest_ban")
config.guests_allowed = 0
if ("disable_ooc")
config.ooc_allowed = 0
if ("disable_looc")
config.looc_allowed = 0
if ("disable_aooc")
config.aooc_allowed = 0
if ("disable_entry")
config.enter_allowed = 0
if ("disable_dead_ooc")
config.dooc_allowed = 0
if ("disable_dsay")
config.dsay_allowed = 0
if ("disable_respawn")
config.abandon_allowed = 0
if ("usewhitelist")
config.usewhitelist = 1
if ("feature_object_spell_system")
config.feature_object_spell_system = 1
if ("traitor_scaling")
config.traitor_scaling = 1
if ("aliens_allowed")
config.aliens_allowed = 1
if("alien_eggs_allowed")
config.alien_eggs_allowed = 1
if ("ninjas_allowed")
config.ninjas_allowed = 1
if ("objectives_disabled")
if(!value)
log_misc("Could not find value for objectives_disabled in configuration.")
config.objectives_disabled = CONFIG_OBJECTIVE_NONE
else
switch(value)
if("none")
config.objectives_disabled = CONFIG_OBJECTIVE_NONE
if("verb")
config.objectives_disabled = CONFIG_OBJECTIVE_VERB
if("all")
config.objectives_disabled = CONFIG_OBJECTIVE_ALL
else
log_misc("Incorrect objective disabled definition: [value]")
config.objectives_disabled = CONFIG_OBJECTIVE_NONE
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
if ("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
var/prob_value = null
if (prob_pos)
prob_name = lowertext(copytext(value, 1, prob_pos))
prob_value = copytext(value, prob_pos + 1)
if (prob_name in config.modes)
config.probabilities[prob_name] = text2num(prob_value)
else
log_misc("Unknown game mode probability configuration definition: [prob_name].")
else
log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].")
if("allow_random_events")
config.allow_random_events = 1
if("kick_inactive")
config.kick_inactive = text2num(value)
if("mods_can_tempban")
config.mods_can_tempban = 1
if("mods_can_job_tempban")
config.mods_can_job_tempban = 1
if("mod_tempban_max")
config.mod_tempban_max = text2num(value)
if("mod_job_tempban_max")
config.mod_job_tempban_max = text2num(value)
if("load_jobs_from_txt")
load_jobs_from_txt = 1
if("forbid_singulo_possession")
forbid_singulo_possession = 1
if("popup_admin_pm")
config.popup_admin_pm = 1
if("allow_holidays")
config.allow_holidays = 1
if("use_irc_bot")
use_irc_bot = 1
if("ticklag")
var/ticklag = text2num(value)
if(ticklag > 0)
fps = 10 / ticklag
if("fps")
fps = text2num(value)
if("tick_limit_mc_init")
tick_limit_mc_init = text2num(value)
if("allow_antag_hud")
config.antag_hud_allowed = 1
if("antag_hud_restricted")
config.antag_hud_restricted = 1
if("secret_hide_possibilities")
secret_hide_possibilities = TRUE
if("humans_need_surnames")
humans_need_surnames = 1
if("usealienwhitelist")
usealienwhitelist = 1
if("usealienwhitelist_sql") // above need to be enabled as well
usealienwhitelistSQL = 1;
if("alien_player_ratio")
limitalienplayers = 1
alien_to_human_ratio = text2num(value)
if("assistant_maint")
config.assistant_maint = 1
if("gateway_delay")
config.gateway_delay = text2num(value)
if("continuous_rounds")
config.continous_rounds = 1
if("ghost_interaction")
config.ghost_interaction = 1
if("disable_player_mice")
config.disable_player_mice = 1
if("uneducated_mice")
config.uneducated_mice = 1
if("comms_password")
config.comms_password = value
if("ban_comms_password")
config.ban_comms_password = value
if("forbidden_versions")
config.forbidden_versions = splittext(value, ";")
if("minimum_byond_version")
config.minimum_byond_version = text2num(value)
if("minimum_byond_build")
config.minimum_byond_build = text2num(value)
if("login_export_addr")
config.login_export_addr = value
if("irc_bot_host")
config.irc_bot_host = value
if("main_irc")
config.main_irc = value
if("admin_irc")
config.admin_irc = value
if("announce_shuttle_dock_to_irc")
config.announce_shuttle_dock_to_irc = TRUE
if("allow_cult_ghostwriter")
config.cult_ghostwriter = 1
if("req_cult_ghostwriter")
config.cult_ghostwriter_req_cultists = text2num(value)
if("character_slots")
config.character_slots = text2num(value)
if("loadout_slots")
config.loadout_slots = text2num(value)
if("allow_drone_spawn")
config.allow_drone_spawn = text2num(value)
if("drone_build_time")
config.drone_build_time = text2num(value)
if("max_maint_drones")
config.max_maint_drones = text2num(value)
if("expected_round_length")
config.expected_round_length = MinutesToTicks(text2num(value))
if("disable_welder_vision")
config.welder_vision = 0
if("disable_circuit_printing")
config.allow_ic_printing = FALSE
if("allow_extra_antags")
config.allow_extra_antags = 1
if("event_custom_start_mundane")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_custom_start_moderate")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_custom_start_major")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_delay_lower")
var/values = text2numlist(value, ";")
config.event_delay_lower[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
config.event_delay_lower[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
config.event_delay_lower[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
if("event_delay_upper")
var/values = text2numlist(value, ";")
config.event_delay_upper[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
if("exterior_ambient_light")
value = text2num(value)
config.exterior_ambient_light = value >= 0 ? value : 0
if("law_zero")
law_zero = value
if("aggressive_changelog")
config.aggressive_changelog = 1
if("delist_when_no_admins")
config.delist_when_no_admins = TRUE
if("map_switching")
config.allow_map_switching = 1
if("disable_webhook_embeds")
config.disable_webhook_embeds = TRUE
if("auto_map_vote")
config.auto_map_vote = 1
if("wait_for_sigusr1")
config.wait_for_sigusr1_reboot = 1
if("autostealth")
config.autostealth = text2num(value)
if("auto_local_admin")
config.auto_local_admin = text2num(value)
if("radiation_lower_limit")
radiation_lower_limit = text2num(value)
if("error_cooldown")
error_cooldown = text2num(value)
if("error_limit")
error_limit = text2num(value)
if("error_silence_time")
error_silence_time = text2num(value)
if("error_msg_delay")
error_msg_delay = text2num(value)
if("max_gear_cost")
max_gear_cost = text2num(value)
if(max_gear_cost < 0)
max_gear_cost = INFINITY
if("radiation_decay_rate")
radiation_decay_rate = text2num(value)
if("radiation_resistance_multiplier")
radiation_resistance_multiplier = text2num(value)
if("radiation_material_resistance_divisor")
radiation_material_resistance_divisor = text2num(value)
if("radiation_lower_limit")
radiation_lower_limit = text2num(value)
if("player_limit")
player_limit = text2num(value)
if("hub")
world.update_hub_visibility()
if ("allow_unsafe_narrates")
config.allow_unsafe_narrates = TRUE
if ("do_not_prevent_spam")
config.do_not_prevent_spam = TRUE
if ("max_acts_per_interval")
config.max_acts_per_interval = text2num(value)
if ("act_interval")
config.act_interval = text2num(value) SECONDS
if("panic_bunker")
config.panic_bunker = TRUE
if("panic_bunker_message")
config.panic_bunker_message = value
if("no_throttle_localhost")
config.no_throttle_localhost = TRUE
if("show_typing_indicator_for_whispers")
config.show_typing_indicator_for_whispers = TRUE
if("visible_examine")
config.visible_examine = text2num(value)
if("allow_loadout_customization")
config.allow_loadout_customization = TRUE
else
//crappy hook to get modpacks to load any extra config
if(!load_mod_config(name, value))
log_misc("Unknown setting in configuration: '[name]'")
else if(type == "game_options")
if(!value)
log_misc("Unknown value for setting [name] in [filename].")
value = text2num(value)
switch(name)
if("show_human_death_message")
config.show_human_death_message = TRUE
if ("max_character_aspects")
config.max_character_aspects = text2num(value)
if("health_threshold_dead")
config.health_threshold_dead = value
if("revival_pod_plants")
config.revival_pod_plants = value
if("revival_cloning")
config.revival_cloning = value
if("revival_brain_life")
config.revival_brain_life = value
if("organ_health_multiplier")
config.organ_health_multiplier = value / 100
if("organ_regeneration_multiplier")
config.organ_regeneration_multiplier = value / 100
if("organ_damage_spillover_multiplier")
config.organ_damage_spillover_multiplier = value / 100
if("organs_can_decay")
config.organs_decay = 1
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")
config.limbs_can_break = value
if("run_delay")
config.run_delay = value
if("walk_delay")
config.walk_delay = value
if("creep_delay")
config.creep_delay = value
if("glide_size_delay")
config.glide_size_delay = value
if("minimum_sprint_cost")
config.minimum_sprint_cost = value
if("skill_sprint_cost_range")
config.skill_sprint_cost_range = value
if("minimum_stamina_recovery")
config.minimum_stamina_recovery = value
if("maximum_stamina_recovery")
config.maximum_stamina_recovery = value
if("human_delay")
config.human_delay = value
if("robot_delay")
config.robot_delay = value
if("monkey_delay")
config.monkey_delay = value
if("alien_delay")
config.alien_delay = value
if("slime_delay")
config.slime_delay = value
if("animal_delay")
config.animal_delay = value
if("maximum_mushrooms")
config.maximum_mushrooms = value
if("lock_client_view_x")
config.lock_client_view_x = text2num(value)
if("lock_client_view_y")
config.lock_client_view_y = text2num(value)
if("max_client_view_x")
config.max_client_view_x = text2num(value)
if("max_client_view_y")
config.max_client_view_y = text2num(value)
if("allow_diagonal_movement")
config.allow_diagonal_movement = TRUE
if("use_loyalty_implants")
config.use_loyalty_implants = 1
if("dexterity_malus_brainloss_threshold")
config.dex_malus_brainloss_threshold = text2num(value)
if("grant_default_darksight")
config.grant_default_darksight = TRUE
if("default_darksight_range")
config.default_darksight_range = max(text2num(value), 0)
if("default_darksight_effectiveness")
config.default_darksight_effectiveness = clamp(text2num(value), 0, 1)
// Economy config.
if("withdraw_period")
config.withdraw_period = value DAYS
if("interest_period")
config.interest_period = value DAYS
if("grant_default_darksight")
config.grant_default_darksight = TRUE
if("default_darksight_range")
config.default_darksight_range = max(text2num(value), 0)
if("default_darksight_effectiveness")
config.default_darksight_effectiveness = clamp(text2num(value), 0, 1)
if("interest_mod_delay")
config.interest_mod_delay = value DAYS
if("withdraw_mod_delay")
config.withdraw_mod_delay = value DAYS
if("transaction_mod_delay")
config.transaction_mod_delay = value DAYS
if("fractional_reserve_mod_delay")
config.fractional_reserve_mod_delay = value DAYS
if("anti_tamper_mod_delay")
config.anti_tamper_mod_delay = value DAYS
if("adjust_healing_from_stress")
config.adjust_healing_from_stress = TRUE
if("stress_shock_recovery_constant")
config.stress_shock_recovery_constant = text2num(value)
if("stress_healing_recovery_constant")
config.stress_healing_recovery_constant = text2num(value)
if("stress_blood_recovery_constant")
config.stress_blood_recovery_constant = text2num(value)
if("exoplanet_min_day_duration")
config.exoplanet_min_day_duration = text2num(value)
if("exoplanet_max_day_duration")
config.exoplanet_max_day_duration = text2num(value)
if("disable_daycycle")
config.disable_daycycle = TRUE
else
//crappy hook to get modpacks to load any extra config
if(!load_mod_config(name, value))
log_misc("Unknown setting in game_options configuration: '[name]'")
fps = round(fps)
if(fps <= 0)
fps = initial(fps)
/datum/configuration/proc/loadsql(filename) // -- TLE
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)