-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
data-final-fixes.lua
48 lines (42 loc) · 1.44 KB
/
data-final-fixes.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
local function check_not_on_map(flags)
for _, flag in pairs(flags) do
if flag == "not-on-map" then
return false
end
end
return true
end
if settings.startup["diplomacy_entity_not_on_map"].value then
for _, prototypes in pairs(data.raw) do
for _, prototype in pairs(prototypes) do
if prototype.max_health then
if prototype.flags == nil then
prototype.flags = {}
end
if check_not_on_map(prototype.flags) then
table.insert(prototype.flags, "not-on-map")
end
end
end
end
end
if settings.startup["diplomacy_tech_tanks_count_switcher"].value then
if data.raw["technology"]["tanks"] then
data.raw["technology"]["tanks"].unit.count = settings.startup["diplomacy_tech_tanks_count"].value
end
end
if settings.startup["diplomacy_tech_power_armor_2_count_switcher"].value then
if data.raw["technology"]["power-armor-2"] then
data.raw["technology"]["power-armor-2"].unit.count = settings.startup["diplomacy_tech_power_armor_2_count"].value
end
end
if settings.startup["diplomacy_tech_uranium_ammo_count_switcher"].value then
if data.raw["technology"]["uranium-ammo"] then
data.raw["technology"]["uranium-ammo"].unit.count = settings.startup["diplomacy_tech_uranium_ammo_count"].value
end
end
if settings.startup["diplomacy_hp_rocket_silo_switcher"].value then
if data.raw["rocket-silo"]["rocket-silo"] then
data.raw["rocket-silo"]["rocket-silo"].max_health = settings.startup["diplomacy_hp_rocket_silo"].value
end
end