Skip to content

Commit a2345e1

Browse files
authored
Version 1.1.1 Patch 1 (#738)
2 parents 6e8239e + c93aab4 commit a2345e1

File tree

12 files changed

+75
-176
lines changed

12 files changed

+75
-176
lines changed

angelsexploration/changelog.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
---------------------------------------------------------------------------------------------------
2+
Version: 0.3.13
3+
Date: 23.12.2021
4+
Bugfixes:
5+
- Fixed crash when the bob enemies do not drop artifacts (setting disabled)
6+
- Fixed crash when there are too many types of spawners or biters/spawner (737)
7+
- Fixed crash when a spawner spawns something else than a unit (737)
8+
- Fixed gathering turrets would remain idle after they all deactivated
9+
- Fixed incorrect tips and tricks information when bob enemies do not drop artifacts
10+
- Fixed crash when tips and tricks localisation would be too long
11+
- Fixed crash when AAI is processing configuration changes when exploration is not initialized
12+
---------------------------------------------------------------------------------------------------
213
Version: 0.3.12
314
Date: 19.12.2021
415
Changes:

angelsexploration/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angelsexploration",
3-
"version": "0.3.12",
3+
"version": "0.3.13",
44
"factorio_version": "1.1",
55
"title": "Angel's Exploration (BETA)",
66
"author": "Arch666Angel",

angelsexploration/prototypes/entities/biter-builder.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,12 @@ function angelsmods.functions.compile_alien_data() -- creates an overview of the
10881088
for _,spawner in pairs(data.raw["unit-spawner"]) do
10891089
spawners[spawner.name] = {}
10901090
for _,spawn in pairs(spawner.result_units) do
1091-
spawners[spawner.name][spawn.unit or spawn[1]] = combine_spawn_data(spawners[spawner.name][spawn.unit or spawn[1]], calculate_spawn_data(spawn.spawn_points or spawn[2]))
1091+
local spawn_name = spawn.unit or spawn[1]
1092+
if data.raw['unit'][spawn_name] then
1093+
spawners[spawner.name][spawn_name] = combine_spawn_data(spawners[spawner.name][spawn_name], calculate_spawn_data(spawn.spawn_points or spawn[2]))
1094+
else
1095+
--log(spawn_name)
1096+
end
10921097
end
10931098
end
10941099

angelsexploration/prototypes/entities/gathering-turret.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ data:extend(
5353
offsets = {{0, 1}},
5454
damage_type_filters = "fire"
5555
},
56+
trigger_target_mask =
57+
{
58+
"common",
59+
"ground-unit",
60+
"angels_gathering_turret_start_collecting_trigger"
61+
},
5662

5763
open_sound = sounds.machine_open,
5864
close_sound = sounds.machine_close,

angelsexploration/prototypes/overrides/biter-updates.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if mods["bobenemies"] then
119119
for _, biter in pairs({"behemoth-biter", "behemoth-spitter"}) do
120120
local unit = data.raw.unit[biter]
121121
if biter then
122-
for _,loot in pairs(unit.loot) do
122+
for _,loot in pairs(unit.loot or {}) do
123123
if loot.item == "small-alien-artifact" then
124124
loot.count_min = ((loot.count_min == nil and 1) or loot.count_min) / 4 -- 4 -> 1
125125
loot.count_max = ((loot.count_max == nil and 1) or loot.count_max) / 4 -- 12 -> 3

angelsexploration/prototypes/tips-and-tricks/1-2-native-inhabitants/1-2-native-inhabitants-functions.lua

Lines changed: 0 additions & 157 deletions
This file was deleted.

angelsexploration/prototypes/tips-and-tricks/1-2-x-native-houses/1-2-x-native-houses-description.lua

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
local tnt = angelsmods.functions.TNT
22

3+
local function compress_localised_string(localised_string)
4+
if type(localised_string)~='table' or localised_string[1]~="" then return localised_string end
5+
local compressed_localised_string = {""}
6+
for idx=2,#localised_string,19 do
7+
local compressed_string_section = {""}
8+
for i=idx,math.min(#localised_string, idx+19) do
9+
table.insert(compressed_string_section, util.table.deepcopy(localised_string[i]))
10+
end
11+
table.insert(compressed_localised_string, compressed_string_section)
12+
end
13+
if #compressed_localised_string>20 then
14+
return compress_localised_string(compressed_localised_string)
15+
end
16+
return compressed_localised_string
17+
end
18+
319
return function(spawner_name, spawn_data)
420
local spawner = data.raw["unit-spawner"][spawner_name]
521
if not spawner then return "Unknown entity '"..(spawner_name or 'nil').."'." end
@@ -26,11 +42,11 @@ return function(spawner_name, spawn_data)
2642
table.insert(spawn_description, spawn_unit)
2743
end
2844
end
29-
table.insert(description, spawn_description)
45+
table.insert(description, compress_localised_string(spawn_description))
3046

3147
-- LOOT INFO
3248
local loot = spawner.loot
33-
if loot then
49+
if loot and (#loot>0) then
3450
local loot_description = {"", {"tips-and-tricks-description.angels-native-inhabitants-spawner-loot"}}
3551
for _,drop in pairs(loot) do
3652
local min = tnt.number_to_string(drop.count_min or 1)
@@ -64,7 +80,7 @@ return function(spawner_name, spawn_data)
6480
table.insert(drop_description, (data.raw.item[drop.item] or {}).localised_name or {"tips-and-tricks-description.angels-native-inhabitants-spawner-loot-item-name", "__ITEM__"..drop.item.."__"})
6581
table.insert(loot_description, drop_description)
6682
end
67-
table.insert(description, loot_description)
83+
table.insert(description, compress_localised_string(loot_description))
6884
end
6985

7086
return description

angelsexploration/prototypes/tips-and-tricks/1-2-x-native-houses/1-2-x-native-houses.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local create_description = require "prototypes.tips-and-tricks.1-2-x-native-hous
22
local navive_data = angelsmods.functions.compile_alien_data()
33

44
for spawner_idx, spawner_data in pairs(navive_data) do
5-
local spawner_char = string.char(string.byte("a")+spawner_idx-1)
5+
local spawner_char = string.char(string.byte("a")+math.floor(spawner_idx/26)) .. string.char(string.byte("a")+(spawner_idx%26)-1)
66
local spawner_name, spawn_data = next(spawner_data)
77
data:extend(
88
{

angelsexploration/prototypes/tips-and-tricks/1-2-x-x-native-aliens/1-2-x-x-native-aliens-description.lua

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
local tnt = angelsmods.functions.TNT
22

3+
local function compress_localised_string(localised_string)
4+
if type(localised_string)~='table' or localised_string[1]~="" then return localised_string end
5+
local compressed_localised_string = {""}
6+
for idx=2,#localised_string,19 do
7+
local compressed_string_section = {""}
8+
for i=idx,math.min(#localised_string, idx+19) do
9+
table.insert(compressed_string_section, util.table.deepcopy(localised_string[i]))
10+
end
11+
table.insert(compressed_localised_string, compressed_string_section)
12+
end
13+
if #compressed_localised_string>20 then
14+
return compress_localised_string(compressed_localised_string)
15+
end
16+
return compressed_localised_string
17+
end
18+
319
local deals_area_damage = function(attack_parameters)
420
-- checks if these attack parameters deal damange in an area around the target
521
return true -- TODO
@@ -35,7 +51,7 @@ return function(spawner_name, unit_name, evolution_factor)
3551

3652
-- LOOT INFO
3753
local loot = unit.loot
38-
if loot then
54+
if loot and (#loot>0) then
3955
local loot_description = {"", {"tips-and-tricks-description.angels-native-inhabitants-unit-loot"}}
4056
for _,drop in pairs(loot) do
4157
local min = tnt.number_to_string(drop.count_min or 1)
@@ -67,7 +83,7 @@ return function(spawner_name, unit_name, evolution_factor)
6783
end
6884
table.insert(drop_description, "[img=item."..drop.item.."]")
6985
table.insert(drop_description, (data.raw.item[drop.item] or {}).localised_name or {"tips-and-tricks-description.angels-native-inhabitants-unit-loot-item-name", "__ITEM__"..drop.item.."__"})
70-
table.insert(loot_description, drop_description)
86+
table.insert(loot_description, compress_localised_string(drop_description))
7187
end
7288
table.insert(description, loot_description)
7389
end

angelsexploration/prototypes/tips-and-tricks/1-2-x-x-native-aliens/1-2-x-x-native-aliens.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ local create_description = require "prototypes.tips-and-tricks.1-2-x-x-native-al
22
local navive_data = angelsmods.functions.compile_alien_data()
33

44
for spawner_idx, spawner_data in pairs(navive_data) do
5-
local spawner_char = string.char(string.byte("a")+spawner_idx-1)
5+
local spawner_char = string.char(string.byte("a")+math.floor(spawner_idx/26)) .. string.char(string.byte("a")+(spawner_idx%26)-1)
66
local spawner_name, spawn_data = next(spawner_data)
77
for unit_idx, unit_data in pairs(spawn_data) do
8-
local unit_char = string.char(string.byte("a")+unit_idx-1)
8+
local unit_char = string.char(string.byte("a")+math.floor(unit_idx/26)) .. string.char(string.byte("a")+(unit_idx%26)-1)
99
local unit_name, evolution_factor = next(unit_data)
1010
data:extend(
1111
{

0 commit comments

Comments
 (0)