forked from DFHack/df_misc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtweak_lin_install.rb
executable file
·32 lines (27 loc) · 1.17 KB
/
tweak_lin_install.rb
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
#!/usr/bin/ruby
# tweak a new linux install's data/init/ files
Dir.chdir('data/init') unless File.exist?('announcements.txt')
raw = File.read('announcements.txt')
%w[DIG_CANCEL_WARM DIG_CANCEL_DAMP BIRTH_CITIZEN
STRANGE_MOOD MADE_ARTIFACT NAMED_ARTIFACT ARTIFACT_BEGUN].each { |n|
# rm pause+focus on common events
raw.sub!("#{n}:A_D:D_D:P:R", "#{n}:A_D:D_D")
}
File.open('announcements.txt', 'w') { |fd| fd.write raw }
raw = File.read('d_init.txt')
raw.sub!('AUTOSAVE:NONE', 'AUTOSAVE:YEARLY')
raw.sub!('INITIAL_SAVE:NO', 'INITIALSSAVE:YES')
raw.sub!('EMBARK_RECTANGLE:4:4', 'EMBARK_RECTANGLE:3:3')
raw.sub!('COFFIN_NO_PETS_DEFAULT:NO', 'COFFIN_NO_PETS_DEFAULT:YES')
raw.sub!('POPULATION_CAP:200', 'POPULATION_CAP:40')
raw.sub!('BABY_CHILD_CAP:100:1000', 'BABY_CHILD_CAP:4:10')
raw.sub!('SHOW_FLOW_AMOUNTS:NO', 'SHOW_FLOW_AMOUNTS:YES')
File.open('d_init.txt', 'w') { |fd| fd.write raw }
raw = File.read('init.txt')
raw.sub!('SOUND:YES', 'SOUND:NO')
raw.sub!('INTRO:YES', 'INTRO:NO')
raw.sub!('curses_640x300', 'curses_800x600')
raw.sub!('FPS:NO', 'FPS:YES')
raw.sub!('FPS_CAP:100', 'FPS_CAP:30')
raw.sub!('G_FPS_CAP:50', 'G_FPS_CAP:30')
File.open('init.txt', 'w') { |fd| fd.write raw }