Skip to content

Commit 6e694d5

Browse files
authored
Merge pull request #51 from bszonye/bradd/benchmark-bug
Fix MapTacks.PlayerTraits(-1)
2 parents c3bef0b + e9f772e commit 6e694d5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Map Tacks 2.0.0 [<img align="right" src="maptacks.png" height="256" width="256">](https://steamcommunity.com/sharedfiles/filedetails/?id=1122081356)
1+
# Map Tacks 2.0.1 [<img align="right" src="maptacks.png" height="256" width="256">](https://steamcommunity.com/sharedfiles/filedetails/?id=1122081356)
22
Adds new map icons
33
Enhances list interface
44
Fixes bugs and styling

maptacks.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ function MapTacks.PlayerTraits(playerID :number)
169169
local traits = MapTacks.GameTraits();
170170
-- Then, add the player-specific traits.
171171
local playerConfig = PlayerConfigurations[playerID];
172+
if playerConfig == nil then return traits; end -- e.g. in benchmark mode
172173
local leader = GameInfo.Leaders[playerConfig:GetLeaderTypeID()];
173174
for i, item in ipairs(leader.TraitCollection) do
174175
traits[item.TraitType] = true;
@@ -177,7 +178,6 @@ function MapTacks.PlayerTraits(playerID :number)
177178
for i, item in ipairs(civilization.TraitCollection) do
178179
traits[item.TraitType] = true;
179180
end
180-
local buildops = {};
181181
return traits;
182182
end
183183

maptacks.modinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Mod id="0a1c826c-0f43-4876-b096-23e1292eee3c" version="2.0.0">
2+
<Mod id="0a1c826c-0f43-4876-b096-23e1292eee3c" version="2.0.1">
33
<Properties>
44
<Name>Map Tacks</Name>
55
<Description>MAP_TACKS_DESCRIPTION</Description>

0 commit comments

Comments
 (0)