Added feature to hide pilleffects till they are used at least once
This commit is contained in:
1 parent
71b19d9f75
commit
e8ad909891
4 files changed
+19
-2
No files matched your search
+10
@@ -1779,4 +1779,14 @@ end
|
||||
-- Returns true if a given entity is a grid entity
|
||||
function EID:IsGridEntity(entity)
|
||||
return entity.Type == nil
|
||||
end
|
||||
|
||||
-- returns true if the given pilleffect id was used at least once by the current player
|
||||
function EID:WasPillUsed(pillEffectID)
|
||||
local playerID = EID:getPlayerID(EID.player)
|
||||
local pillsTable = EID.PlayerItemInteractions[playerID].pills
|
||||
if EID.player:GetPlayerType() == 38 then
|
||||
pillsTable = EID.PlayerItemInteractions[playerID].altPills or pillsTable
|
||||
end
|
||||
return pillsTable[tostring(pillEffectID)] ~= nil
|
||||
end
|
||||
Reference in new issue
Block a user