Moved EID:CheckCurrentRoomGridEntities() into eid_api.lua file
This commit is contained in:
1 parent
57fa4aea59
commit
315ba762e6
2 files changed
+12
-12
No files matched your search
+12
@@ -1741,6 +1741,18 @@ function EID:evaluateTransformationProgress(transformation)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Create a list of all grid entities in the room that have an EID description
|
||||||
|
function EID:CheckCurrentRoomGridEntities()
|
||||||
|
EID.CurrentRoomGridEntities = {}
|
||||||
|
local room = game:GetRoom()
|
||||||
|
for i = 1, room:GetGridSize(), 1 do
|
||||||
|
local gridEntity = room:GetGridEntity(i)
|
||||||
|
if gridEntity and EID:hasDescription(gridEntity) then
|
||||||
|
EID.CurrentRoomGridEntities[i] = gridEntity
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Workaround function to get the currently held pill of the players. Used to map Pill ID to pill color and vise versa
|
-- Workaround function to get the currently held pill of the players. Used to map Pill ID to pill color and vise versa
|
||||||
EID.PlayerHeldPill = {}
|
EID.PlayerHeldPill = {}
|
||||||
function EID:evaluateHeldPill()
|
function EID:evaluateHeldPill()
|
||||||
|
|||||||
@@ -746,18 +746,6 @@ if REPENTANCE then
|
|||||||
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoomRep)
|
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoomRep)
|
||||||
end
|
end
|
||||||
|
|
||||||
function EID:CheckCurrentRoomGridEntities()
|
|
||||||
EID.CurrentRoomGridEntities = {}
|
|
||||||
local room = game:GetRoom()
|
|
||||||
for i = 1, room:GetGridSize(), 1 do
|
|
||||||
local gridEntity = room:GetGridEntity(i)
|
|
||||||
if gridEntity and EID:hasDescription(gridEntity) then
|
|
||||||
EID.CurrentRoomGridEntities[i] = gridEntity
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- On new room, save the status of any variables that need to be rewound upon Glowing Hourglass usage
|
|
||||||
function EID:onNewRoom()
|
function EID:onNewRoom()
|
||||||
EID:CheckCurrentRoomGridEntities()
|
EID:CheckCurrentRoomGridEntities()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user