v 0.2.2: fix for gridless armor

This commit is contained in:
Peter 2019-03-10 10:22:04 +08:00
parent a596f824ba
commit 3824601a57
3 changed files with 7 additions and 2 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
mod
*.svg
mod-list.json
*.dat
*.pdn

View File

@ -3,7 +3,7 @@ local function update_armor(event)
power_armor = player.get_inventory(defines.inventory.player_armor)
if power_armor and power_armor.valid then
if power_armor[1].valid_for_read then
if power_armor[1].grid.valid then
if power_armor[1].grid and power_armor[1].grid.valid then
global.shortcuts_armor[player.index] = power_armor[1].grid
end
end

View File

@ -1,6 +1,6 @@
{
"name": "Shortcuts",
"version": "0.2.1",
"version": "0.2.2",
"factorio_version": "0.17",
"title": "Shortcuts",
"author": "npc_strider(morley376)",