character crafting fix
This commit is contained in:
parent
3b75c29523
commit
0d00f0461e
2 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.1.0
|
||||
Date: 2022-08-25
|
||||
Date: 2022-08-24
|
||||
Fixes:
|
||||
- Attempt fix of issue when some character has no crafting categories
|
||||
Changes:
|
||||
- Beta release.
|
||||
Localization:
|
||||
|
|
|
@ -21,7 +21,9 @@ util.set_icons("electronic-circuit", nil)
|
|||
if util.me.handcraft() then
|
||||
data:extend({{ type = "recipe-category", name = "handcraft-only" }})
|
||||
for i, character in pairs(data.raw.character) do
|
||||
table.insert(character.crafting_categories, "handcraft-only")
|
||||
if character and character.crafting_categories then
|
||||
table.insert(character.crafting_categories, "handcraft-only")
|
||||
end
|
||||
end
|
||||
local hcec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"])
|
||||
hcec.name = "electronic-circuit-handcraft-only"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue