Refactored grid entity handling to allow for custom grid entity descriptions
relates to #866
This commit is contained in:
1 parent
498af83e4f
commit
75461bedfe
7 files changed
+161
-65
No files matched your search
@@ -102,6 +102,7 @@ end
|
||||
|
||||
|
||||
require("features.eid_api")
|
||||
require("features.eid_grid_descriptions")
|
||||
|
||||
require("features.eid_language_manager")
|
||||
EID:InitializeLanguagePacks()
|
||||
@@ -821,7 +822,7 @@ function EID:renderUnidentifiedPill(entity)
|
||||
local descriptionObj = EID:getDescriptionObj(entity.Type, entity.Variant, entity.SubType, entity, false)
|
||||
descriptionObj.Description = ""
|
||||
descriptionObj.ShowWhenUnidentified = false
|
||||
descriptionObj = EID:applyDescriptionModifier(descriptionObj, -999)
|
||||
descriptionObj = EID:applyDescriptionModifier(descriptionObj, math.mininteger)
|
||||
|
||||
if EID.Config["ShowItemIcon"] and descriptionObj.Icon then
|
||||
offsetX = offsetX + 14
|
||||
@@ -1590,19 +1591,8 @@ function EID:OnRender()
|
||||
end
|
||||
end
|
||||
else -- Grid entities
|
||||
local room = game:GetRoom()
|
||||
if closest:GetType() == GridEntityType.GRID_SPIKES then
|
||||
if EID.isRepentance and closest:GetVariant() >= 100 and EID.Config["DisplaySanguineInfo"] then
|
||||
local desc = EID:getDescriptionObj(5, 100, 692, closest, false)
|
||||
desc.Description = EID:trimSanguineDesc(closest, desc)
|
||||
if desc.Description ~= "" then
|
||||
EID:addDescriptionToPrint(desc)
|
||||
end
|
||||
elseif room:GetType() == RoomType.ROOM_SACRIFICE and EID.Config["DisplaySacrificeInfo"] then
|
||||
local desc = EID:getDescriptionObj(-999, -1, closest.VarData + 1, closest)
|
||||
EID:addDescriptionToPrint(desc)
|
||||
end
|
||||
end
|
||||
local desc = EID:getDescriptionObj(-999, closest:GetType(), closest:GetVariant(), closest)
|
||||
EID:addDescriptionToPrint(desc)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user