funcs to handle generic item markup + reorganize loc tables + misc (#681)

* RIP tear delay multiplier, and reorganizing

* moving things around and adding things

* Move black feather items table

* Improve Black Feather, change Black Rune's detection

* Fix bugs with cheat/rep only modifiers

* New generic PlayersHaveItem function stuff

* Change Collectible checks to generic Item checks

* Update eid_conditionals.lua

* Tear multiplier -> Tears multiplier

* Tear -> Tears multiplier

* BFFs overhaul

* BFFs overhaul

* NoEffect changed

* NoEffect changed

* Add SelfConditional, BFFs check, find+replace can also append

* Remove BFFs modifier

* BFFs + started work on self-noeffects

* Added blinkpink, working on BFFs/hivemind

* repentance flies

* some rep familiars checked
This commit is contained in:
Buurazu authored and GitHub committed 2024-06-20 15:10:57 +02:00
1 parent 7e2959a891
commit a023ec2fff
10 files changed
+639 -374

No files matched your search

+11 -9
View File
@@ -12,6 +12,7 @@ EID.ItemReminderSelectedCategory = 0 -- Currently selected category
EID.ItemReminderSelectedPlayer = 0 -- Currently selected player
EID.ItemReminderSelectedItem = 0 -- Currently selected Item
EID.InsideItemReminder = false -- Disable some modifiers, when building the Item Reminder description
EID.ItemReminderPlayerEntity = nil -- for description modifiers to reference
-- TODO:
-- crooked penny cheats. 404/liberty cap/broken syringe/etc. "what item is it"
@@ -72,7 +73,6 @@ EID.ItemReminderDescriptionModifier = {
---------------- Passive Items ----------------
["5.100.392"] = { -- Zodiac
isHiddenInfo = true,
isRepentance = true,
modifierFunction = function(descObj, player)
local zodiacItem = player:GetZodiacEffect()
if zodiacItem > 0 then
@@ -121,11 +121,10 @@ EID.ItemReminderDescriptionModifier = {
["5.100.44"] = { -- Teleport! location
isCheat = true,
isRepentance = true,
-- The result preview changes as soon as we activate Teleport, which looks awkward, so try to not display the result while mid-teleport.
-- Doesn't work perfectly and only in Rep
modifierFunction = function(descObj, player)
if player:GetSprite():GetAnimation() ~= "TeleportUp" then
-- The result preview changes as soon as we activate Teleport, which looks awkward, so try to not display the result while mid-teleport.
-- Doesn't work perfectly and only in Rep
if not EID.isRepentance or player:GetSprite():GetAnimation() ~= "TeleportUp" then
EID:ItemReminderAddResultHeaderSuffix(descObj)
descObj.Description = EID:Teleport1Prediction(EID:GetItemSeed(player, 44))
end
@@ -310,10 +309,12 @@ function EID:ItemReminderAddDescription(player, entityType, variant, subType, ex
local specialDesc = EID.ItemReminderDescriptionModifier[objectID]
if specialDesc and type(specialDesc.modifierFunction) == "function" then
-- dont add, if description modifier is a cheat and cheats are disabled
local evalShowCheat = not (specialDesc.isCheat and not EID.Config["ItemReminderShowRNGCheats"])
local evalShowHidden = not (specialDesc.isHidden and not EID.Config["ItemReminderShowHiddenInfo"])
if evalShowCheat or evalShowHidden then
-- don't add, if description modifier is a cheat and cheats are disabled
local evaluateFunction = true
if (specialDesc.isCheat and not EID.Config["ItemReminderShowRNGCheats"]) then evaluateFunction = false end
if (specialDesc.isHiddenInfo and not EID.Config["ItemReminderShowHiddenInfo"]) then evaluateFunction = false end
if (specialDesc.isRepentance and not EID.isRepentance) then evaluateFunction = false end
if evaluateFunction then
specialDesc.modifierFunction(descObj, player)
end
end
@@ -598,6 +599,7 @@ function EID:ItemReminderGetDescription()
for key, _ in pairs(EID.ItemReminderBlacklist) do currentBlacklist[key] = true end
local player = EID:ItemReminderGetAllPlayers()[EID.ItemReminderSelectedPlayer + 1] or EID.player -- use main player as fallback
EID.ItemReminderPlayerEntity = player -- for description modifiers to reference
if EID.ItemReminderSelectedCategory == 0 or EID.Config["ItemReminderDisplayMode"] == "Classic" then
-- execute all functions defined per category