From 3824601a577aa72d95734886a76a2c445e0a5e98 Mon Sep 17 00:00:00 2001 From: npc-strider Date: Sun, 10 Mar 2019 10:22:04 +0800 Subject: [PATCH] v 0.2.2: fix for gridless armor --- .gitignore | 5 +++++ Shortcuts/control.lua | 2 +- Shortcuts/info.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..269f4ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +mod +*.svg +mod-list.json +*.dat +*.pdn \ No newline at end of file diff --git a/Shortcuts/control.lua b/Shortcuts/control.lua index 91f251a..247a9c9 100644 --- a/Shortcuts/control.lua +++ b/Shortcuts/control.lua @@ -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 diff --git a/Shortcuts/info.json b/Shortcuts/info.json index 4bf9da8..1d0b774 100644 --- a/Shortcuts/info.json +++ b/Shortcuts/info.json @@ -1,6 +1,6 @@ { "name": "Shortcuts", - "version": "0.2.1", + "version": "0.2.2", "factorio_version": "0.17", "title": "Shortcuts", "author": "npc_strider(morley376)",