Moved script files into the "feature" folder

This commit is contained in:
Wofsauge committed 2024-06-04 18:11:19 +02:00
1 parent fd25f96be3
commit e2f5172cd9
15 files changed
+19 -16

No files matched your search

+5
View File
@@ -652,6 +652,7 @@ function EID:getXMLDescription(Type, Variant, SubType)
end
-- check if an entity is part of the describable entities
---@diagnostic disable-next-line: duplicate-set-field
function EID:hasDescription(entity)
if not EID:EntitySanityCheck(entity) then return false end
@@ -1278,6 +1279,7 @@ function EID:isCollectibleAllowed(collectibleID)
end
-- Achievements Locked Check (do we have Cube of Meat or Book of Revelations unlocked?)
---@diagnostic disable-next-line: duplicate-set-field
function EID:AreAchievementsAllowed()
-- Tainted characters have definitely beaten Mom!
-- (Fixes Tainted Lost's item pools, and potentially modded character's mechanics, ruining this check)
@@ -1541,6 +1543,7 @@ function EID:resumeCoroutines()
end
-- Returns true if an item needs to be collected for the collection page
---@diagnostic disable-next-line: duplicate-set-field
function EID:requiredForCollectionPage(itemID)
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or itemID >= CollectibleType.NUM_COLLECTIBLES or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
return EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[itemID]
@@ -1548,6 +1551,7 @@ end
-- Updates the item collection state of the players, based on the QueuedItem value.
-- TODO: also check for D100 / MissingNo Item collections
---@diagnostic disable-next-line: duplicate-set-field
function EID:checkPlayersForMissingItems()
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return end
if EID.GameUpdateCount % 5 ~= 0 then return end
@@ -1948,6 +1952,7 @@ function EID:WasPillUsed(pillColor)
end
-- returns the name of the given entity
---@diagnostic disable-next-line: duplicate-set-field
function EID:GetEntityXMLName(Type, Variant, SubType)
return EID.XMLEntityNames[Type.."."..Variant] or EID.XMLEntityNames[Type.."."..Variant.."."..SubType]
end
@@ -1,6 +1,6 @@
local game = Game()
require("eid_bagofcrafting_search")
require("features.eid_bagofcrafting_search")
--these aren't local so that they can be saved and reloaded, or cleared in the Mod Config Menu
-- EID.BoC is defined in eid_data.lua
@@ -371,7 +371,6 @@ local function qualitySort(a, b)
end
end
local moddedCrafting = false
local function GameStartCrafting()
for i=1, EID.XMLMaxItemID do
local item = EID.itemConfig:GetCollectible(i)
@@ -384,7 +383,7 @@ local function GameStartCrafting()
newRecipeLearned = true
-- Use REPENTOGON to support modded items / updating the XML item pools
if REPENTOGON and not moddedCrafting then
if REPENTOGON then
-- Add modded items
CraftingMaxItemID = EID.XMLMaxItemID
local coll = EID.itemConfig:GetCollectible(CraftingMaxItemID+1)
@@ -404,7 +403,6 @@ local function GameStartCrafting()
end
end
EID.BoC.SortNeeded = true
moddedCrafting = true
end
end
EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, GameStartCrafting)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+12 -12
View File
@@ -108,14 +108,14 @@ end
table.sort(EID.Languages)
pcall(require,"scripts.eid_savegames")
require("eid_mcm")
require("eid_data")
require("eid_xmldata")
require("eid_api")
require("eid_conditionals")
require("eid_modifiers")
require("eid_holdmapdesc")
require("eid_itemprediction")
require("features.eid_mcm")
require("features.eid_data")
require("features.eid_xmldata")
require("features.eid_api")
require("features.eid_conditionals")
require("features.eid_modifiers")
require("features.eid_holdmapdesc")
require("features.eid_itemprediction")
-- load Repentence descriptions
if EID.isRepentance then
@@ -127,8 +127,8 @@ if EID.isRepentance then
end
end
local wasSuccessful, _ = pcall(require,"descriptions."..EID.GameVersion..".transformations")
require("eid_bagofcrafting")
require("eid_tmtrainer")
require("features.eid_bagofcrafting")
require("features.eid_tmtrainer")
end
EID.LastRenderCallColor = EID:getTextColor()
@@ -1831,11 +1831,11 @@ end
EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, EID.OnGameExit)
if EID.enableDebug then
require("eid_debugging")
require("features.eid_debugging")
end
-- load repentogon stuff last to allow overrides of functions
require("eid_repentogon")
require("features.eid_repentogon")
Isaac.DebugString("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
Isaac.DebugString("External Item Descriptions v"..EID.ModVersion.."_"..EID.ModVersionCommit.." loaded.")