Update eid_bagofcrafting.lua
This commit is contained in:
1 parent
d59fcd41a0
commit
ce5dc1daf0
1 file changed
+1
-7
@@ -513,8 +513,7 @@ local moddedCrafting = false
|
|||||||
-- Check for modded items past the known max item ID on game start (can also support game updates)
|
-- Check for modded items past the known max item ID on game start (can also support game updates)
|
||||||
-- Only works if the new items are at Weight 1.0 in their item pools, but better than nothing
|
-- Only works if the new items are at Weight 1.0 in their item pools, but better than nothing
|
||||||
local function GameStartCrafting()
|
local function GameStartCrafting()
|
||||||
if EID.Config["BagOfCraftingModdedRecipes"] and not EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_TMTRAINER) and EID.itemConfig:GetCollectible(EID.XMLMaxItemID+1) ~= nil then
|
if EID.Config["BagOfCraftingModdedRecipes"] and not EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_TMTRAINER) and EID.itemConfig:GetCollectible(EID.XMLMaxItemID+1) ~= nil and not moddedCrafting then
|
||||||
dofile(EID.modPath .. "eid_xmldata.lua")
|
|
||||||
-- Items past max ID detected
|
-- Items past max ID detected
|
||||||
CraftingMaxItemID = EID.XMLMaxItemID -- XMLMaxItemID is never modified
|
CraftingMaxItemID = EID.XMLMaxItemID -- XMLMaxItemID is never modified
|
||||||
-- Add new item qualities
|
-- Add new item qualities
|
||||||
@@ -540,11 +539,6 @@ local function GameStartCrafting()
|
|||||||
end
|
end
|
||||||
moddedCrafting = true
|
moddedCrafting = true
|
||||||
sortNeeded = true
|
sortNeeded = true
|
||||||
elseif moddedCrafting then
|
|
||||||
-- we had modded items; they have since been disabled
|
|
||||||
dofile(EID.modPath .. "eid_xmldata.lua")
|
|
||||||
moddedCrafting = false
|
|
||||||
sortNeeded = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, GameStartCrafting)
|
EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, GameStartCrafting)
|
||||||
|
|||||||
Reference in new issue
Block a user