forked from payday-restoration/restoration-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore.lua
727 lines (668 loc) · 23.5 KB
/
Core.lua
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
if not ModCore then
restoration.log_shit("[ERROR] Unable to find ModCore from BeardLib! Is BeardLib installed correctly?")
return
end
Month = os.date("%m")
Day = os.date("%d")
restoration._mod_path = restoration:GetPath()
function restoration:Init()
restoration.log_shit("SC: LOADING: " .. self.ModPath)
restoration.captain_types = {
winter = {
spawn_group = "Cap_Winters",
icon = "guis/textures/pd2/hud_buff_shield",
vs_line = "hud_assault_vip_winters"
},
spring = {
spawn_group = "Cap_Spring",
icon = "guis/textures/pd2/hud_buff_skull",
vs_line = "hud_assault_vip_spring"
},
summer = {
spawn_group = "Cap_Summers",
icon = "guis/textures/pd2/hud_buff_fire",
vs_line = "hud_assault_vip_summers"
},
autumn = {
spawn_group = "Cap_Autumn",
icon = "guis/textures/pd2/hud_buff_spooc",
vs_line = "hud_assault_vip_autumn"
},
hvh = {
spawn_group = "HVH_Boss",
icon = "guis/textures/pd2/hud_buff_halloween",
vs_line = "hud_assault_vip_hvh",
captain_warn = "hud_assault_vip_hvhwarn"
}
}
--Defines what captains spawn on what heists.
restoration.captain_spawns = {
--Winters
arena = restoration.captain_types.winter, --Alesso
welcome_to_the_jungle_1 = restoration.captain_types.winter, --Big Oil Day 1
stage_1 = restoration.captain_types.winter, --Big Oil Day 1 EDIT
welcome_to_the_jungle_2 = restoration.captain_types.winter, --Big Oil Day 2
stage_2 = restoration.captain_types.winter, --Big Oil Day 2 EDIT
election_day_1 = restoration.captain_types.winter, --Election Day 1
election_day_2 = restoration.captain_types.winter, --Election Day 2
election_day_3 = restoration.captain_types.winter, --Election Day 3
election_day_3_skip1 = restoration.captain_types.winter, --Election Day 3 (Skipped 1)
election_day_3_skip2 = restoration.captain_types.winter, --Election Day 3 (Skipped 2)
firestarter_2 = restoration.captain_types.winter, --firestarter day 2
four_stores = restoration.captain_types.winter, --Four Stores
hox_3 = restoration.captain_types.winter, --Hoxton Revenge
moon = restoration.captain_types.winter, --Stealing Xmas
mus = restoration.captain_types.winter, --the diamond
gallery = restoration.captain_types.winter, --art gallery
red2 = restoration.captain_types.winter, --fwb
watchdogs_1 = restoration.captain_types.winter, --Watchdogs Day 1
--Custom Heists--
office_strike = restoration.captain_types.winter, --office strike
schl = restoration.captain_types.winter, --Scarlet Club House
firestarter_2_res = restoration.captain_types.winter, --firestarter day 2 edit
constantine_clubhouse_lvl = restoration.captain_types.winter, --Smuggler's Den
TonCont = restoration.captain_types.winter, --Armored Transport: Atrium
gallery_v2 = restoration.captain_types.winter, --Art Gallery Remastered
Skyscraper = restoration.captain_types.winter, --The Skyscraper Heist
ttr_yct_lvl = restoration.captain_types.winter, --Triad Takedown Remastered
tj_af22_kitteh_level = restoration.captain_types.winter, --The Greatest Bank Of All time
bookmakers_office = restoration.captain_types.winter, --Bookmaker's Office
tRain_returns = restoration.captain_types.winter, --wip rant-man heist
constantine_policestation_lvl = restoration.captain_types.winter, --Constantine Scores (precinct raid)
battlearena = restoration.captain_types.winter, --Five-G
tonisl1 = restoration.captain_types.winter, --Grand Harvest
constantine_penthouse_lvl = restoration.captain_types.winter, --Penthouse Crasher (Constantine Scores)
tonmapjam22l = restoration.captain_types.winter, --Hard Cash
--Summers
alex_2 = restoration.captain_types.summer, --Rats Day 2
pal = restoration.captain_types.summer, --counterfeit
mia_1 = restoration.captain_types.summer, --Hotline Day 1
crojob2 = restoration.captain_types.summer, --bomb dockyard
firestarter_3 = restoration.captain_types.summer, --firestarter day 3
jolly = restoration.captain_types.summer, --aftershock
rvd1 = restoration.captain_types.summer, --highland mortuary
watchdogs_2_day = restoration.captain_types.summer, --Watchdogs Day 2 Daytime
trai = restoration.captain_types.summer, --Lost In Transit
jolly_CD = restoration.captain_types.summer, --jolly crackdown edit
--Custom Heists--
alex_2_res = restoration.captain_types.summer, --Rats Day 2 edit
lit1 = restoration.captain_types.summer, --California's Heat
glb = restoration.captain_types.summer, --Golden Lotus Bank
constantine_mobsterclub_lvl = restoration.captain_types.summer, --Aurora (Borealis?!) Club
constantine_harbor_lvl = restoration.captain_types.summer, --Harboring a Grudge
firestarter_3_res = restoration.captain_types.summer, --firestarter day 3 res edit version
bag_sim_2 = restoration.captain_types.summer, --Bag Simulator 2
RogueCompany = restoration.captain_types.summer, --Rogue Company
Security_Avenue = restoration.captain_types.summer, --Gensec HQ Raid day 1
constantine_resort_lvl = restoration.captain_types.summer, --Scarlett Resort (Constantine Scores)
--Spring
xmn_hox2 = restoration.captain_types.spring, --Hoxout Day 2, christmas
firestarter_1 = restoration.captain_types.spring, --firestarter day 1
arm_for = restoration.captain_types.spring, --train heist
arm_for_restoration = restoration.captain_types.spring, --train heist restoration edit
big = restoration.captain_types.spring, --big bank
kenaz = restoration.captain_types.spring, --ggc
dinner = restoration.captain_types.spring, --Slaughterhouse
dah = restoration.captain_types.spring, --diamond heist
hox_2 = restoration.captain_types.spring, --Hoxout Day 2
chas = restoration.captain_types.spring, --Dragon Heist
--Custom Heists--
firestarter_1_res = restoration.captain_types.spring, --firestarter day 1 res edit version
hardware_store = restoration.captain_types.spring, --Hardware Store
nft_heist = restoration.captain_types.spring, --EN EF TEE HEIST
anlh = restoration.captain_types.spring, --An End To Liang
constantine_butcher_lvl = restoration.captain_types.spring, --Butcher's Bay
constantine_bank_lvl = restoration.captain_types.spring, --Pacific Bank
santas_hardware_store = restoration.captain_types.spring, --Santa Spring Is Coming To Town
lvl_friday = restoration.captain_types.spring, --Crashing Capitol
bnktower = restoration.captain_types.spring, --Gensec HIVVVVVVVVVVVVVVEEEEEEEEEEEEEEEEE
mansion_stage1 = restoration.captain_types.spring, --Elmsworth Mansion
constantine_gunrunnerclubhouse_lvl = restoration.captain_types.spring, --Constantine Scores (gunrunner)
sh_raiders = restoration.captain_types.spring, --Safehouse Raiders
bluewave = restoration.captain_types.spring, --res map bluewave
dwn1 = restoration.captain_types.spring, --Deep Inside
constantine_murkyairport_lvl = restoration.captain_types.spring, --Murky Airport (Constantine Scores)
jambank = restoration.captain_types.spring, --Botched Bank
--Autumn
alex_1 = restoration.captain_types.autumn, --Rats Day 1
rat = restoration.captain_types.autumn, --cook off
welcome_to_the_jungle_1_night = restoration.captain_types.autumn, --Big Oil Day 1 Night
nightclub = restoration.captain_types.autumn, --Night Club
branchbank = restoration.captain_types.autumn, --Bank Heist
family = restoration.captain_types.autumn, --diamond store
framing_frame_1 = restoration.captain_types.autumn, --art gallery but ff
framing_frame_3 = restoration.captain_types.autumn, --Powerbox simulator
glace = restoration.captain_types.autumn, --Green Bridge
jewelry_store = restoration.captain_types.autumn, --Jewelry Store
ukrainian_job = restoration.captain_types.autumn, --Ukrainian Job
man = restoration.captain_types.autumn, --undercover--
watchdogs_2 = restoration.captain_types.autumn, --Watchdogs Day 2 Night
watchdogs_1_night = restoration.captain_types.autumn, --Watchdogs Day 1 Night
--Custom Heists--
alex_1_res = restoration.captain_types.autumn, --Rats Day 1 edit
lvl_fourmorestores = restoration.captain_types.autumn, --four more stores
ukrainian_job_res = restoration.captain_types.autumn, --Ukrainian Job res edit version
hntn = restoration.captain_types.autumn, --harvest and trustee north
wetwork = restoration.captain_types.autumn, --res map package wetworks
hwu = restoration.captain_types.autumn, --hwUwU (Avalon's Shadow)
amsdeal1 = restoration.captain_types.autumn, --Armsdeal Alleyway
Gambling_room = restoration.captain_types.autumn, --Underground Bargains
branchbank_meth = restoration.captain_types.autumn, --Bank Heist: Meths
constantine_apartment_lvl = restoration.captain_types.autumn, --Concrete Jungle
tj_htsb = restoration.captain_types.autumn, --harvest and trustee - southern branch
hidden_vault = restoration.captain_types.autumn, --Hidden Vault
Gensec_HQ = restoration.captain_types.autumn, --Gensec HQ Raid day 2
--I'm not typing out the whole name
help = restoration.captain_types.hvh, --Prison Nightmare
nail = restoration.captain_types.hvh, --lab rats
skm_nightmare_lvl = restoration.captain_types.hvh, --Safehouse Nightmare SKM (for flavour text)
--Custom Heists--
daymare = restoration.captain_types.hvh, --Hell's Nightmare
funbank = restoration.captain_types.hvh, --FunBank: Specials
crash_course = restoration.captain_types.hvh, --REDACTED
ascension_III = restoration.captain_types.hvh --Ascension (project eclipse 3)
}
--HVH replaces Spring during the month of Halloween
if Month == "10" and restoration.Options:GetValue("OTHER/Holiday") then
for heist, captain in pairs(restoration.captain_spawns) do
if captain == restoration.captain_types.spring then
restoration.captain_spawns[heist] = restoration.captain_types.hvh
end
end
end
--Put heist IDs in this table to disable naturally occuring captains if they're defined above as well, mostly for scripted captain encounters
restoration.disable_natural_captain = {
"skm_nightmare_lvl",
--Custom Heists--
"constantine_gunrunnerclubhouse_lvl",
"constantine_policestation_lvl"
}
--[[restoration.captain_viper = {
"jackal_zero_day_stage7" --Zero Day 7
}]]--
restoration.global_spawn_multiplier = 1
restoration.disco_inferno = false
restoration.force_halloween = false
restoration.always_bravos = false
--Increased spawns, should only be reserved for larger maps.
restoration.very_large_levels = {
--Custom Heists below--
"bnktower", --Gensec HIVVVVVVVVVVVVVVEEEEEEEEEEEEEEEEE
"bag_sim_2", --Bag Simulator 2
"finsternis", --Projekt Finsternis
"funbank" --suffer
}
--Increased spawns, slightly less. Ditto
restoration.large_levels = {
"crojob2", --Bomb Dockyard
"friend", --Scarface Mansion
"kenaz", --Golden Grin Casino
"peta", --Goatsim 1
"mad", --Boiling Point
"watchdogs_2_day", --Watchdogs Day 2
"watchdogs_2", --Watchdogs Day 2 but night
"bex", --San Martin Bank
"trai", --Lost in Transit
"corp", --Hostile Takeover
--Custom Heists below--
"hardware_store", --Hardware Store
"lit1", --California's restoration
"lit2", --California's restoration but Payday 3
"constantine_bank_lvl", --Pacific Bank
"anlh", --An End To Liang
"bluewave", --res map bluewave
"ruswl", --Scorched Earth
"hunter_departure", --Hunter and Hunted d2
"tj_af22_kitteh_level", --The Greatest Bank Of All time
"constantine_butcher_lvl", --Butcher's Bay
"glb", --Golden Lotus Bank
"schl", --Scarlet Club House
"hwu", --Avalon's Shadow
"constantine_smackdown2_lvl", --Truck Hustle
"constantine_gunrunnerclubhouse_lvl", --Constantine Scores (gunrunner)
"TonCont", --Armored Transport: Atrium
"santas_hardware_store", --Hardware Store but Xmas
"ascension_III", --Ascension (project eclipse 3)
"RogueCompany", --Rogue Company
"battlearena", --Five-G
"constantine_penthouse_lvl", --Penthouse Crashers (Constantine Scores)
"constantine_resort_lvl", --Scarlett Resort (Constantine Scores)
"constantine_murkyairport_lvl", --Murky Airport (Constantine Scores)
"Security_Avenue" --GenSec HQ Day 1
}
--Slightly reduced spawns, generally use for heists with lengthy sections where players typically hold out in one smallish position, or 'early game' heists.
restoration.tiny_levels = {
"welcome_to_the_jungle_2", --Big Oil 2. Scripted cloaker hell.
"cane", --Santa's Workshop
"brb", --Brooklyn Bank
"mus", --The Diamond
"run", --Heat Street
"ranc", --Midland Ranch
"run_res", --Whurr's Heat Street Edit
"glace", --Green Bridge
"pbr", --Beneath the Mountain
"dinner", --Slaughterhouse
"flat", --Panic Room
"gallery", --Art Gallery
"framing_frame_1", --Art Gallery but FF
"framing_frame_3", --Framing Frame 3
"spa", --Brooklyn 10-10
"man", --Undercover
"man_res", --Undercover resmod edit
"jolly", --Aftershock
"firestarter_3", --firestarter day 3
"roberts", --Go Bank
"family", --Diamond Store
"chca", --Black Cat Heist
"jewelry_store", --Ukrainian job left off since its bag moving is optional, to compensate for the extra easiness.
"rat", --Cook Off
"chas", --Dragon Heist
"pent", --Mountain Master Heist
"rvd1", --Reservoir Dogs Day 1, lots of scripted spawns and little cover
"crojob3", --Bomb: Forest, slightly reduced spawns to offset little cover/heist difficulty
"crojob3_night", --Ditto
--Custom Heists below--
"junk", --Doghouse
"knk_jwl", --Knockover: Jewerly Store
"RogueCompany", --Rogue Company
"Gambling_room", --Underground Bargains
"bookmakers_office", --Bookmaker's Office
"constantine_mobsterclub_lvl", --Aurora (Borealis?!) Club
"constantine_clubhouse_lvl", --Smuggler's Den
"crimepunishlvl", --Crime And Punshiment
"nft_heist", --EN EF TEE HEIST
"branchbank_meth", --Bank Heist: Meth
"tj_htsb", --Harvest and Trustee: Southern Branch
"hntn", --harvest and trustee north
"ttr_yct_lvl", --Triad Takedown Remastered
"modders_devmap", --Proving Grounds
"gallery_v2", --Art Gallery Remastered
"wetwork_burn", --Burnout
"brb_rant", --Brooklyn Bank: Ranted
"hidden_vault", --Hidden Vault
"constantine_gold_lvl", --Golden Shakedown (Constantine Scores)
"jambank", --Botched Bank
"tonmapjam22l", --Hard Cash
"cshr" --Old Safehouse Raid
}
--For levels that have aggressive scripted spawns, or spawn placement such that enemies are constantly spawned next to players.
restoration.very_tiny_levels = {
"pbr2", --Birth of Sky
"rvd2", --Reservoir Dogs 2, has very aggressive scripted spawns.
"vit", --White House
"nmh", --No Mercy
"des", --Henry's Rock
"bph", --Hell's Island
"born", --Biker 1
"fex", --Buluc's Mansion
"sah", --Shacklethorne
--Skirmish heists below
"skmc_mad",
"skm_red2",
"skm_watchdogs_stage2",
--Custom Heists below--
"thechase",
"daymare", --Hell's Nightmare
"trop", --Tropical Treasure
"constantine_apartment_lvl", --Concrete Jungle
"constantine_harbor_lvl", --Harboring a Grudge
"amsdeal1", --Armsdeal Alleyway
"constantine_smackdown_lvl", --Smackdown
"constantine_restaurant_lvl", --Blood in the Water (Constantine Scores)
"nmh_res" --Resmod edit of no mercy.
}
--Mostly for stuff like Cursed Killed Room and other crap puny heists or heists with a *massive* amount of scripted spawns like Texas/Mexico arc heists
restoration.extremely_tiny_levels = {
"hvh", --CKR
"peta2", --Goats day 2. Fuck this heist too
"mia_2", --Hotline Miami 2
"help", --Prison Nightmare
"nail", --Lab Rats. Fuck this heist
"chill_combat", --Safehouse Raid
"mex", --Border Crossing
"mex_cooking", --Border Crystals
"sand", --The Ukrainian Prisoner
--Skirmish heists below
"skm_nightmare_lvl", --Safehouse Nightmare SKM
--Custom Heists below--
"infinitebank_room", --First World Tower
"railrun", --The Last Train
"highrise_stage1", --Out of Frame
"Victor Romeo"
}
--Christmas Effects Heists
restoration.christmas_heists = {
"roberts",
"pines",
"cane",
"moon",
--Custom Heists--
"roberts_v2",
"santas_hardware_store", --Hardware Store but Xmas
"santa_pain"
}
--heists to remove infinite assaults from
restoration.fuck_hunt = {
"kenaz", --ggc
"pines", --white xmas
"spa", --brooklyn 10-10
"jolly", --aftershock
"born", --biker heist D1
"ukrainian_job", --uk joj
"ukrainian_job_res", --ditto
"sah", --shacklethorne
"chca", --black cat
"pent", --Mountain Master
"lvl_friday", --Mallbank / Crashing Capitol
--"hox_1", --Hoxout D1
--"xmn_hox_1" --Xmas edition
--Custom Heists--
"the_factory" --eclipse research facility
}
--Sub Faction overrides
--Texas
restoration.yee_and_I_cannot_stress_this_enough_haw = {
"ranc",
"dinner",
"trai",
"corp",
--Custom Heists--
"tonmapjam22l"
}
--San Francisco
restoration.needle = {
"chas",
"sand",
"chca",
"pent"
}
--FSB (custom heists)
restoration.fsb = {
"flatline_lvl",
"ahopl",
"rusdl",
"crimepunishlvl",
"hunter_party",
"hunter_departure",
"hunter_fall",
"ruswl"
}
restoration.Environment_Settings_Table = {} --leave blank, it will generate contents based on the table below
local environment_settings = { --edit this one
["OTHER/Env_Banks"] = true,
["OTHER/Env_RVD1"] = true,
["OTHER/Env_RVD2"] = true,
["OTHER/Env_FSD1"] = true,
["OTHER/Env_PBR2"] = true,
["OTHER/Env_CJ2"] = true,
["OTHER/Env_FRIEND"] = true,
["OTHER/Env_UnderPass"] = true,
["OTHER/Env_MallCrasher"] = true,
["OTHER/Env_Mia_1"] = true,
["OTHER/Env_FSD3"] = true,
["OTHER/Env_WDD1N"] = true,
["OTHER/Env_WDD1D"] = true,
["OTHER/Env_WDD2D"] = true,
["OTHER/Env_Alex3"] = true,
["OTHER/Env_Big"] = true,
["OTHER/Env_FS"] = true,
["OTHER/Env_Ukra"] = true,
["OTHER/Env_Peta"] = true
-- ["OTHER/Env_Kosugi"] = true
}
for name,enabled in pairs(environment_settings) do
if enabled then
restoration.Environment_Settings_Table[name] = restoration.Options:GetValue(name)
end
end
_G.SC = _G.SC or {}
SC._path = self.ModPath
SC._data = {}
--[[
if SystemFS:exists("mods/DMCWO/mod.txt") then
SC._data.sc_player_weapon_toggle = false
else
SC._data.sc_player_weapon_toggle = true
end
--]]
end
function restoration:all_enabled(...)
for _, opt in pairs({...}) do
if self.Options:GetValue(opt) == false then
return false
end
end
return true
end
function restoration.log_shit(to_log)
if restoration.we_log then
log(to_log)
end
end
function restoration:LoadSCAssets()
return true
end
--don't load the fucking classic movies if setting is on. memory hog
function restoration:LoadClassicMovies()
if restoration and restoration.Options:GetValue("OTHER/ClassicMovies") then
return true
end
end
function restoration:LoadFonts()
if not Idstring("russian"):key() == SystemInfo:language():key() then
return true
end
end
restoration.assault_style = {
"beta_assault",
"alpha_assault"
}
restoration.dodge_display = {
"dd_scale",
"dd_150",
"dd_100"
}
restoration.environments_choice_bank = {
"default",
"random",
"mellowday",
"xbox_bank",
"bank_day",
"env_trailer_bank"
}
restoration.environments_choice_rvd1 = {
"default",
"random",
"rvd1_alt1",
"rvd1_alt2"
}
restoration.environments_choice_rvd2 = {
"default",
"random",
"rvd2_alt"
}
restoration.environments_choice_firestarter_1 = {
"default",
"random",
"fsd1_eve"
}
restoration.environments_choice_pbr2 = {
"default",
"random",
"bos_alt"
}
restoration.environments_choice_friend = {
"default",
"random",
"friend_pink",
"friend_night",
}
restoration.environments_choice_crojob2 = {
"default",
"random",
"dockyard_alt"
}
restoration.environments_choice_arm_und = {
"default",
"random",
"underpass_foggyday"
}
restoration.environments_choice_mallcrasher = {
"default",
"random",
"mall_alt"
}
restoration.environments_choice_mia_1 = {
"default",
"random",
"hlm_morn",
"funny_and_epic_synthwave_very_eighties"
}
restoration.environments_choice_firestarter_3 = {
"default",
"env_trailer_bank"
}
restoration.environments_choice_watchdogs_1_night = {
"default",
"brightnight"
}
restoration.environments_choice_watchdogs_1_day = {
"default",
"cloudy_day"
}
restoration.environments_choice_watchdogs_2_day = {
"default",
"random",
"docks"
}
restoration.environments_choice_alex_3 = {
"default",
"random",
"docks"
}
restoration.environments_choice_big = {
"default",
"random",
"xbox_bank"
}
restoration.environments_choice_four_stores = {
"default",
"random",
"mellowday",
"xbox_bank",
"bank_day",
"bank_green"
}
restoration.environments_choice_ukrainian_job = {
"default",
"cloudy_day"
}
restoration.environments_choice_peta = {
"default",
"cloudy_day"
}
restoration.ponrtracks = {
"off",
"windowofoppurtunity",
"wheresthevan",
"random"
}
restoration.vm_move = {
"vm_vanilla",
"vm_drag",
"vm_lead",
"vm_static",
}
restoration.recoil_recover_style = {
"rr_off",
"rr_per_weapon",
"rr_full"
}
restoration.ads_transition_style = {
"vanilla_on_rails",
"kf_mw_style",
"tilt_in"
}
restoration.weapon_categories = {
"base_wpn_cat",
"sub_wpn_cat"
}
restoration.wepnames = {
"resmod_res_names",
"resmod_no_nicknames",
"dmcwo_reelnames",
"resmod_no_renames"
}
-- restoration.environments_choice_shadow_raid = {
-- "default",
-- "random",
-- "shadowraiud_darker",
-- "shadowraid_day"
-- }
-- These tables show the network messages we've modified in the network settings pdmod
-- We will use them for switching to RestorationMod prefixed messages when in SC Mode.
-- local connection_network_handler_funcs = {
-- 'sync_player_installed_mod'
--}
-- local unit_network_handler_funcs = {
-- 'sync_grenades',
-- 'place_grenade_crate'
--}
-- Builds a single table from our two string based keys for each handler above
-- restoration.network_handler_funcs = {}
-- function restoration:add_handler_funcs(handler_funcs)
-- for i = 1, #handler_funcs do
-- self.network_handler_funcs[handler_funcs[i]] = true
-- end
-- end
-- restoration:add_handler_funcs(connection_network_handler_funcs)
-- restoration:add_handler_funcs(unit_network_handler_funcs)
-- Takes the network keys we defined above and prefixes any matches on the given handler
-- function restoration:rename_handler_funcs(NetworkHandler)
-- for key, value in pairs(restoration.network_handler_funcs) do
-- if NetworkHandler[key] then
-- NetworkHandler['RestorationMod__' .. key] = NetworkHandler[key]
-- end
-- end
-- end
Hooks:Register("restoration_on_synced_peer")
Hooks:Add("restoration_on_synced_peer","restoration_do_sync_peer_stuff",function(peer,peer_id)
restoration:send_sync_environment(peer,peer_id)
end)
function restoration:get_env_setting(name)
local value = restoration.Environment_Settings_Table[name]
if value ~= nil then
return value
end
return restoration.Options:GetValue(name)
end
function restoration:send_sync_environment(to)
if Network:is_server() then
local env_data = restoration.Environment_Settings_Table
local env_string = env_data and LuaNetworking:TableToString(env_data)
if env_string and env_string ~= "" then
if to and managers.network:session():peer(to) then
LuaNetworking:SendToPeer(to,"environments_all",env_string)
else
LuaNetworking:SendToPeers("environments_all",env_string)
end
log("**********************************************************Sent EnvironmentSync with results: ")
PrintTable(env_data)
log("**********************************************************End")
end
end
end
--Stealing this from SH cause it's way better
function restoration:require(file)
local path = ModPath .. "req/" .. file .. ".lua"
return io.file_is_readable(path) and blt.vm.dofile(path)
end
function restoration:mission_script_patches()
if self._mission_script_patches == nil then
local level_id = Global.game_settings and Global.game_settings.level_id
if level_id then
self._mission_script_patches = self:require("mission_script/" .. level_id:gsub("_night$", ""):gsub("_day$", "")) or false
end
end
return self._mission_script_patches
end