Merge pull request #276 from Buurazu/master
Fix 1-frame blips on obstructed items
This commit is contained in:
8 files changed
+86
-25
No files matched your search
@@ -1,6 +0,0 @@
|
||||
<ItemPools>
|
||||
<Pool Name="unused24">
|
||||
<!--Cube of Meat-->
|
||||
<Item Id="73" Weight="100" DecreaseBy="0.4" RemoveOn="0.1"/>
|
||||
</Pool>
|
||||
</ItemPools>
|
||||
@@ -13,7 +13,7 @@
|
||||
local repCollectibles={
|
||||
[2] = {"2", "The Inner Eye", "Triple shot#↓ -49% Fire Rate down"},
|
||||
[5] = {"5", "My Reflection", "Gives tears a boomerang effect#↑ +1.5 Range up#↑ +60% additional Range up#↑ +0.6 Shot Speed up#"}, -- My Reflection
|
||||
[6] = {"6", "Number One", "↑ +1.5 Tears up#↓ -1.5 Range down#↓ -20% additional Range down#↓ -75% Tear Height"}, -- Number One
|
||||
[6] = {"6", "Number One", "↑ +1.5 Tears up#↓ -1.5 Range down#↓ -20% additional Range down"}, -- Number One
|
||||
[12] = {"12", "Magic Mushroom", "↑ +1 Health up#Full health#↑ +0.3 Damage up#↑ +50% Damage Multiplier#↑ +1.5 Range up#↑ +0.3 Speed up#Size up"}, -- Magic Mushroom
|
||||
[13] = {"13", "The Virus", "Poison touch#↑ +0.2 Speed up"}, -- The Virus
|
||||
[14] = {"14", "Roid Rage", "↑ +0.3 Speed up#↑ +1.5 Range up"}, -- Roid Rage
|
||||
@@ -498,7 +498,7 @@ local repTrinkets={
|
||||
[49] = {"49", "Bloody Penny", "25% chance to drop half a heart when picking up coins"}, -- Bloody Penny
|
||||
[50] = {"50", "Burnt Penny", "25% chance to drop a bomb when picking up coins"}, -- Burnt Penny
|
||||
[51] = {"51", "Flat Penny", "25% chance to drop a key when picking up coins"}, -- Flat Penny
|
||||
[65] = {"65", "Tape Worm", "↑ +3 Range up#↑ 2x Tear Height"}, -- Tape Worm
|
||||
[65] = {"65", "Tape Worm", "↑ +3 Range up"}, -- Tape Worm
|
||||
[66] = {"66", "Lazy Worm", "↓ -0.5 Shot Speed down"}, -- Lazy Worm
|
||||
[69] = {"69", "Faded Polaroid", "Camouflages the player randomly#Confuses enemies#Can be used to open the door to the \"Home\" floor"}, -- Faded Polaroid
|
||||
[80] = {"80", "Black Feather", "↑ +0.5 Damage up for each evil item held"}, -- Black Feather
|
||||
@@ -888,7 +888,7 @@ local repPills={
|
||||
|
||||
[48] = {"47", "Shot Speed Down", "↓ -0.15 Shot Speed down"}, -- Shot Speed Down
|
||||
[49] = {"48", "Shot Speed Up", "↑ +0.15 Shot Speed up"}, -- Shot Speed Up
|
||||
[50] = {"49", "Experimental Pill", "↑ Increases 1 random stat#↓ Decreases 1 random other stat#Will not decrease with PHD"}, -- Experimental Pill
|
||||
[50] = {"49", "Experimental Pill", "↑ Increases 1 random stat#↓ Decreases 1 random other stat#Will not decrease with {{Collectible75}}PHD#Will not increase with {{Collectible654}}False PHD"}, -- Experimental Pill
|
||||
[9999] = {"", "Golden Pill", "Random pill effect#Destroys itself after a few uses"}, -- golden Pill
|
||||
}
|
||||
EID:updateDescriptionsViaTable(repPills, EID.descriptions["en_us"].pills)
|
||||
@@ -943,7 +943,7 @@ EID.descriptions["en_us"].horsepills={
|
||||
{"46", "Vurp!", "Spawns last used pill as a horse pill"}, -- Vurp!
|
||||
{"47", "Shot Speed Down", "↓ -0.3 Shot Speed down"}, -- Shot Speed Down
|
||||
{"48", "Shot Speed Up", "↑ +0.3 Shot Speed up"}, -- Shot Speed Up
|
||||
{"49", "Experimental Pill", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with PHD"}, -- Experimental Pill
|
||||
{"49", "Experimental Pill", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with {{Collectible75}}PHD#Will not increase with {{Collectible654}}False PHD"}, -- Experimental Pill
|
||||
[9999] = {"", "Golden Pill", "Random horse pill effect#Destroys itself after a few uses"}, -- Golden Pill
|
||||
}
|
||||
|
||||
@@ -966,6 +966,10 @@ EID.descriptions["en_us"].BlankCardQCard = "Teleport to I Am Error Room#Blank Ca
|
||||
EID.descriptions["en_us"].ClearRuneCharge = "Clear Rune charge:"
|
||||
EID.descriptions["en_us"].PlaceboCharge = "Placebo charge:"
|
||||
|
||||
EID.descriptions["en_us"].FalsePHDHeart = "Spawns 1 Black Heart"
|
||||
EID.descriptions["en_us"].FalsePHDDamage = "+0.6 Damage up"
|
||||
EID.descriptions["en_us"].FalsePHDHorseDamage = "+1.2 Damage up"
|
||||
|
||||
EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! WARNING !!!"
|
||||
EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled.#(If you've defeated Mom, this message is a bug and can be ignored)#(This warning can be disabled in the config)"
|
||||
|
||||
|
||||
+9
-3
@@ -371,11 +371,13 @@ function EID:getAdjustedSubtype(Type, Variant, SubType)
|
||||
return SubType - 32768
|
||||
end
|
||||
elseif tableName == "pills" or tableName == "horsepills" then
|
||||
if SubType == 14 then
|
||||
if SubType % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then
|
||||
return 9999
|
||||
end
|
||||
local pool = game:GetItemPool()
|
||||
SubType = pool:GetPillEffect(SubType, EID.player) + 1
|
||||
if REPENTANCE and EID.player.SubType == PlayerType.PLAYER_THESOUL_B then
|
||||
SubType = pool:GetPillEffect(SubType, EID.player:GetOtherTwin()) + 1
|
||||
else SubType = pool:GetPillEffect(SubType, EID.player) + 1 end
|
||||
end
|
||||
return SubType
|
||||
end
|
||||
@@ -449,7 +451,11 @@ function EID:getObjectName(Type, Variant, SubType)
|
||||
return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName
|
||||
elseif tableName == "pills" or tableName == "horsepills" then
|
||||
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
|
||||
local vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
||||
local vanillaName = nil
|
||||
-- fix Gold Pill bug
|
||||
if EID.itemConfig:GetPillEffect(adjustedSubtype - 1) then
|
||||
vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name
|
||||
end
|
||||
name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName
|
||||
return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
|
||||
elseif tableName == "sacrifice" then
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local game = Game()
|
||||
local pickupValues = {
|
||||
0x00000000, -- 0 None
|
||||
-- Hearts
|
||||
@@ -83,7 +84,7 @@ local pickupIDLookup = {
|
||||
local function IsTaintedCain()
|
||||
--no clue how the display works for co-op, as far as I can tell we're only caring about player 1
|
||||
--this check is necessary for some ingredient tracking now that Bag of Crafting is usable by everyone
|
||||
return Game():GetPlayer(0):GetPlayerType() == 23
|
||||
return game:GetPlayer(0):GetPlayerType() == 23
|
||||
end
|
||||
|
||||
local componentShifts = {
|
||||
@@ -694,7 +695,7 @@ local function getFloorItemsString(showPreviews, roomItems)
|
||||
end
|
||||
|
||||
function EID:handleBagOfCraftingRendering()
|
||||
local curSeed = Game():GetSeeds():GetStartSeed()
|
||||
local curSeed = game:GetSeeds():GetStartSeed()
|
||||
--reset our calculated recipes when the game seed changes
|
||||
if (curSeed ~= lastSeedUsed) then
|
||||
calculatedRecipes = {}
|
||||
@@ -726,7 +727,7 @@ function EID:handleBagOfCraftingRendering()
|
||||
end
|
||||
|
||||
--determine if we should display anything at all, display item preview if applicable, and figure out our room/floor's pickup contents
|
||||
if EID.isHidden or craftingIsHidden then
|
||||
if EID.isHidden or craftingIsHidden or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then
|
||||
return
|
||||
elseif EID.Config["BagOfCraftingHideInBattle"] then
|
||||
if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then
|
||||
@@ -740,7 +741,7 @@ function EID:handleBagOfCraftingRendering()
|
||||
if EID.Config["DisplayBagOfCrafting"] == "hold" and not string.find(EID.player:GetSprite():GetAnimation(), "PickupWalk") then
|
||||
return false
|
||||
end
|
||||
if Game():GetRoom():GetFrameCount() < 2 then
|
||||
if game:GetRoom():GetFrameCount() < 2 then
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -762,7 +763,7 @@ function EID:handleBagOfCraftingRendering()
|
||||
--if we're in Preview Only mode, then we have nothing more to do
|
||||
if (EID.Config["BagOfCraftingDisplayMode"] == "Preview Only") then return false end
|
||||
|
||||
local curRoomIndex = Game():GetLevel():GetCurrentRoomDesc().SafeGridIndex
|
||||
local curRoomIndex = game:GetLevel():GetCurrentRoomDesc().SafeGridIndex
|
||||
|
||||
local results = {}
|
||||
local roomItems = {}
|
||||
|
||||
+1
-1
@@ -397,7 +397,7 @@ EID.GoldenTrinketData = {
|
||||
-- Cancer, Lucky Toe (just the Luck Up), Isaac's Fork (heart heal amount), A Missing Page (damage + necronomicon multiplier), Tick (the biggest pain)
|
||||
[39] = 1, [42] = 1, [46] = {findReplace = true}, [48] = {t={2, 80},mults={1.5,2}}, [53] = {fullReplace = true},
|
||||
-- Maggy's Faith, Rainbow Worm, Tape Worm, Lazy Worm, Louse, Watch Battery (just the charge amount), Exploding Cap, Stud Finder
|
||||
[55] = 1, [64] = {append = true}, [65] = {t={3,2}}, [66] = 0.5, [70] = 1, [72] = 1, [73] = 10, [74] = {t={0.5}, mult=2},
|
||||
[55] = 1, [64] = {append = true}, [65] = 3, [66] = 0.5, [70] = 1, [72] = 1, [73] = 10, [74] = {t={0.5}, mult=2},
|
||||
-- Error (same as Rainbow Worm), Second Hand (max 2x -> 3x), Black Feather, Blind Rage, Golden Horse Shoe, Karma, Lil Larva
|
||||
[75] = {append = true}, [78] = {t={2}, mult=1.5}, [80] = 0.5, [81] = 2, [82] = {t={15}, mult=2}, [85] = {t={1,1,1}}, [86] = {t={1}, mult=2},
|
||||
-- NO!, Brown Cap, Cracked Crown, Ouroboros Worm, Broken Syringe, Teardrop Charm, Beth's Faith (possibly tripleable, but max 8 wisps in its ring)
|
||||
|
||||
@@ -374,6 +374,41 @@ local game = Game()
|
||||
return descObj
|
||||
end
|
||||
EID:addDescriptionModifier("Placebo", PlaceboCondition, PlaceboCallback)
|
||||
|
||||
-- Handle False PHD description addition
|
||||
local function FalsePHDCondition(descObj)
|
||||
if not REPENTANCE or descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_PILL then
|
||||
return false
|
||||
end
|
||||
for i = 0, game:GetNumPlayers() - 1 do
|
||||
local player = Isaac.GetPlayer(i)
|
||||
if player:HasCollectible(CollectibleType.COLLECTIBLE_FALSE_PHD) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function FalsePHDCallback(descObj)
|
||||
local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||
local horse = descObj.ObjSubType > 2048
|
||||
local data = EID.pillMetadata[adjustedID-1]
|
||||
if data ~= nil then
|
||||
local damageUp = string.find(data.class,"3") and (string.find(data.class,"-") or adjustedID-1 == PillEffect.PILLEFFECT_EXPERIMENTAL)
|
||||
-- why doesn't I'm Excited have a - in the xml data yet spawn a black heart...
|
||||
local blackHeart = (string.find(data.class,"2") or string.find(data.class,"1")) and (string.find(data.class,"-") or adjustedID-1 == PillEffect.PILLEFFECT_IM_EXCITED)
|
||||
local text = ""
|
||||
if damageUp and horse then text = EID:getDescriptionEntry("FalsePHDHorseDamage")
|
||||
elseif damageUp then text = EID:getDescriptionEntry("FalsePHDDamage")
|
||||
elseif blackHeart then text = EID:getDescriptionEntry("FalsePHDHeart") end
|
||||
if text ~= "" then
|
||||
local iconStr = "#{{Collectible654}} "
|
||||
EID:appendToDescription(descObj, iconStr..text)
|
||||
end
|
||||
end
|
||||
return descObj
|
||||
end
|
||||
EID:addDescriptionModifier("False PHD", FalsePHDCondition, FalsePHDCallback)
|
||||
|
||||
|
||||
-- Handle Abyss description addition
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
--The highest item ID found
|
||||
EID.XMLMaxItemID = 732
|
||||
--The fixed recipes, for use in Bag of Crafting
|
||||
EID.XMLRecipes = {["29,29,29,29,29,29,29,29"] = 36, ["8,8,8,8,8,8,8,8"] = 177, ["1,1,1,1,1,1,1,1"] = 45, ["2,2,2,2,2,2,2,2"] = 686, ["3,3,3,3,3,3,3,3"] = 118, ["12,12,12,12,12,12,12,12"] = 343, ["15,15,15,15,15,15,15,15"] = 37, ["21,21,21,21,21,21,21,21"] = 85, ["5,2,1,4,4,4,4,4"] = 331, ["4,4,4,4,4,4,4,4"] = 182, ["22,22,22,22,22,22,22,22"] = 75, ["3,22,22,22,22,22,22,22"] = 654, ["7,7,1,1,1,1,1,1"] = 639, ["13,13,12,12,12,12,12,12"] = 175, ["17,17,17,17,17,17,17,17"] = 483, ["16,16,15,15,15,15,15,15"] = 483, ["6,6,6,6,6,6,6,6"] = 628, ["24,24,24,24,24,24,24,24"] = 489, ["25,25,25,25,25,25,25,25"] = 580, }
|
||||
EID.XMLRecipes = {["29,29,29,29,29,29,29,29"] = 36, ["8,8,8,8,8,8,8,8"] = 177, ["1,1,1,1,1,1,1,1"] = 45, ["2,2,2,2,2,2,2,2"] = 686, ["3,3,3,3,3,3,3,3"] = 118, ["12,12,12,12,12,12,12,12"] = 343, ["15,15,15,15,15,15,15,15"] = 37, ["21,21,21,21,21,21,21,21"] = 85, ["1,2,4,4,4,4,4,5"] = 331, ["4,4,4,4,4,4,4,4"] = 182, ["22,22,22,22,22,22,22,22"] = 75, ["3,22,22,22,22,22,22,22"] = 654, ["1,1,1,1,1,1,7,7"] = 639, ["12,12,12,12,12,12,13,13"] = 175, ["17,17,17,17,17,17,17,17"] = 483, ["15,15,15,15,15,15,16,16"] = 483, ["6,6,6,6,6,6,6,6"] = 628, ["24,24,24,24,24,24,24,24"] = 489, ["25,25,25,25,25,25,25,25"] = 580, }
|
||||
|
||||
--The contents of each item pool, and the item's weight, for use in Bag of Crafting
|
||||
EID.XMLItemPools = {{{1, 1.0}, {2, 1.0}, {3, 1.0}, {4, 1.0}, {5, 1.0}, {6, 1.0}, {7, 1.0}, {8, 1.0}, {10, 1.0}, {12, 0.5}, {13, 1.0}, {14, 1.0}, {15, 1.0}, {17, 0.1}, {19, 1.0}, {36, 1.0}, {37, 1.0}, {38, 1.0}, {39, 1.0}, {40, 1.0}, {41, 1.0}, {42, 1.0}, {44, 1.0}, {45, 1.0}, {46, 1.0}, {47, 1.0}, {48, 1.0}, {49, 1.0}, {52, 1.0}, {53, 1.0}, {55, 1.0}, {56, 1.0}, {57, 1.0}, {58, 1.0}, {62, 1.0}, {65, 1.0}, {66, 1.0}, {67, 1.0}, {68, 1.0}, {69, 1.0}, {71, 1.0}, {72, 1.0}, {75, 1.0}, {76, 1.0}, {77, 1.0}, {78, 1.0}, {85, 1.0}, {86, 1.0}, {87, 1.0}, {88, 1.0}, {89, 1.0}, {91, 1.0}, {92, 1.0}, {93, 1.0}, {94, 1.0}, {95, 1.0}, {96, 1.0}, {97, 1.0}, {98, 0.2}, {99, 1.0}, {100, 1.0}, {101, 0.5}, {102, 1.0}, {103, 1.0}, {104, 1.0}, {105, 1.0}, {106, 1.0}, {107, 1.0}, {108, 1.0}, {109, 1.0}, {110, 1.0}, {111, 1.0}, {113, 1.0}, {114, 0.2}, {115, 1.0}, {117, 1.0}, {120, 1.0}, {121, 1.0}, {123, 1.0}, {124, 1.0}, {125, 1.0}, {127, 1.0}, {128, 1.0}, {129, 1.0}, {131, 1.0}, {136, 1.0}, {137, 1.0}, {138, 1.0}, {140, 1.0}, {142, 1.0}, {143, 1.0}, {144, 1.0}, {146, 1.0}, {148, 1.0}, {149, 1.0}, {150, 1.0}, {151, 1.0}, {152, 1.0}, {153, 1.0}, {154, 1.0}, {155, 1.0}, {157, 1.0}, {160, 1.0}, {161, 1.0}, {162, 1.0}, {163, 1.0}, {166, 1.0}, {167, 1.0}, {169, 1.0}, {170, 1.0}, {171, 1.0}, {172, 1.0}, {173, 1.0}, {174, 1.0}, {175, 1.0}, {176, 1.0}, {178, 1.0}, {180, 1.0}, {186, 1.0}, {188, 1.0}, {189, 1.0}, {190, 0.1}, {191, 1.0}, {192, 1.0}, {200, 1.0}, {201, 1.0}, {202, 1.0}, {206, 1.0}, {209, 1.0}, {210, 1.0}, {211, 1.0}, {213, 1.0}, {214, 1.0}, {217, 1.0}, {220, 1.0}, {221, 1.0}, {222, 1.0}, {223, 0.5}, {224, 1.0}, {225, 1.0}, {227, 1.0}, {228, 1.0}, {229, 1.0}, {231, 1.0}, {233, 1.0}, {234, 1.0}, {236, 1.0}, {237, 0.2}, {240, 1.0}, {242, 1.0}, {244, 1.0}, {245, 1.0}, {256, 1.0}, {257, 1.0}, {261, 1.0}, {264, 1.0}, {265, 1.0}, {266, 1.0}, {267, 1.0}, {268, 1.0}, {269, 1.0}, {270, 1.0}, {271, 1.0}, {272, 1.0}, {273, 1.0}, {274, 1.0}, {275, 1.0}, {276, 1.0}, {277, 1.0}, {278, 1.0}, {279, 1.0}, {280, 1.0}, {281, 1.0}, {282, 1.0}, {283, 1.0}, {284, 1.0}, {285, 1.0}, {287, 1.0}, {288, 1.0}, {291, 1.0}, {292, 1.0}, {294, 1.0}, {295, 1.0}, {298, 1.0}, {299, 1.0}, {300, 1.0}, {301, 1.0}, {302, 1.0}, {303, 1.0}, {304, 1.0}, {305, 1.0}, {306, 1.0}, {307, 1.0}, {308, 1.0}, {309, 1.0}, {310, 1.0}, {312, 1.0}, {313, 0.2}, {314, 1.0}, {315, 1.0}, {316, 1.0}, {317, 1.0}, {318, 1.0}, {319, 1.0}, {320, 1.0}, {321, 1.0}, {322, 1.0}, {323, 1.0}, {324, 1.0}, {325, 1.0}, {329, 1.0}, {330, 1.0}, {332, 1.0}, {333, 0.2}, {334, 0.2}, {335, 0.2}, {336, 1.0}, {350, 1.0}, {351, 1.0}, {352, 1.0}, {353, 1.0}, {358, 1.0}, {359, 1.0}, {361, 1.0}, {362, 1.0}, {364, 1.0}, {365, 1.0}, {366, 1.0}, {367, 1.0}, {368, 1.0}, {369, 1.0}, {371, 1.0}, {373, 1.0}, {374, 0.2}, {375, 1.0}, {377, 1.0}, {378, 1.0}, {379, 1.0}, {381, 1.0}, {382, 1.0}, {384, 1.0}, {385, 1.0}, {386, 1.0}, {388, 1.0}, {389, 1.0}, {390, 1.0}, {391, 1.0}, {392, 1.0}, {393, 1.0}, {394, 1.0}, {395, 1.0}, {397, 1.0}, {398, 1.0}, {401, 1.0}, {404, 1.0}, {405, 1.0}, {406, 1.0}, {407, 1.0}, {410, 1.0}, {411, 1.0}, {418, 1.0}, {419, 1.0}, {421, 1.0}, {422, 1.0}, {426, 1.0}, {427, 1.0}, {430, 1.0}, {431, 1.0}, {432, 1.0}, {435, 1.0}, {436, 1.0}, {437, 1.0}, {440, 1.0}, {443, 1.0}, {444, 1.0}, {445, 1.0}, {446, 1.0}, {447, 1.0}, {448, 1.0}, {449, 1.0}, {452, 1.0}, {453, 1.0}, {454, 1.0}, {457, 1.0}, {458, 1.0}, {459, 1.0}, {460, 1.0}, {461, 1.0}, {463, 1.0}, {465, 1.0}, {466, 1.0}, {467, 1.0}, {469, 1.0}, {470, 1.0}, {471, 1.0}, {473, 1.0}, {476, 1.0}, {478, 1.0}, {481, 1.0}, {482, 1.0}, {485, 1.0}, {488, 1.0}, {491, 1.0}, {492, 1.0}, {493, 1.0}, {494, 1.0}, {495, 1.0}, {496, 1.0}, {497, 1.0}, {502, 1.0}, {504, 1.0}, {506, 1.0}, {507, 1.0}, {508, 1.0}, {509, 1.0}, {511, 1.0}, {512, 1.0}, {513, 1.0}, {516, 1.0}, {517, 1.0}, {522, 1.0}, {524, 1.0}, {525, 1.0}, {529, 1.0}, {531, 1.0}, {532, 1.0}, {537, 1.0}, {539, 1.0}, {540, 1.0}, {542, 1.0}, {543, 1.0}, {544, 1.0}, {545, 1.0}, {548, 1.0}, {549, 1.0}, {553, 1.0}, {555, 1.0}, {557, 1.0}, {558, 1.0}, {559, 1.0}, {560, 1.0}, {561, 1.0}, {563, 1.0}, {565, 1.0}, {570, 1.0}, {575, 1.0}, {576, 1.0}, {578, 1.0}, {581, 1.0}, {583, 1.0}, {605, 1.0}, {607, 1.0}, {608, 1.0}, {609, 0.5}, {610, 1.0}, {611, 1.0}, {612, 1.0}, {614, 1.0}, {615, 1.0}, {616, 1.0}, {617, 1.0}, {618, 1.0}, {625, 0.1}, {629, 1.0}, {631, 1.0}, {635, 1.0}, {637, 1.0}, {639, 1.0}, {641, 1.0}, {645, 1.0}, {649, 1.0}, {650, 0.5}, {652, 1.0}, {655, 1.0}, {657, 1.0}, {658, 1.0}, {661, 1.0}, {663, 1.0}, {671, 1.0}, {675, 1.0}, {676, 1.0}, {677, 0.2}, {678, 1.0}, {680, 1.0}, {681, 1.0}, {682, 1.0}, {683, 1.0}, {687, 1.0}, {690, 1.0}, {693, 1.0}, {695, 1.0}, {703, 0.5}, {709, 1.0}, {710, 1.0}, {713, 1.0}, {717, 1.0}, {720, 1.0}, {722, 1.0}, {723, 0.1}, {724, 1.0}, {725, 1.0}, {726, 1.0}, {727, 1.0}, {728, 0.5}, {729, 1.0}}, -- treasure
|
||||
|
||||
@@ -563,6 +563,7 @@ EID.lastDescriptionEntity = nil
|
||||
EID.lastDist = 0
|
||||
EID.pathCheckerEntity = nil
|
||||
EID.hasValidWalkingpath = true
|
||||
EID.pathfindingTo = nil
|
||||
|
||||
function EID:onGameUpdate()
|
||||
EID:setPlayer()
|
||||
@@ -573,7 +574,7 @@ function EID:onGameUpdate()
|
||||
local pos = entity.Position
|
||||
for _, otherPos in ipairs(curPositions) do
|
||||
if pos:Distance(otherPos[2]) == 0 then
|
||||
entity.Position = entity.Position + Vector(1,0)
|
||||
--entity.Position = entity.Position + Vector(1,0)
|
||||
entity:GetData()["EID_RenderOffset"] = Vector(10,0)
|
||||
otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0)
|
||||
end
|
||||
@@ -598,6 +599,7 @@ function EID:onGameUpdate()
|
||||
EID.pathCheckerEntity = nil
|
||||
EID.hasValidWalkingpath = true
|
||||
end
|
||||
EID.pathfindingTo = EID.lastDescriptionEntity
|
||||
return
|
||||
end
|
||||
if EID.pathCheckerEntity == nil then
|
||||
@@ -609,16 +611,24 @@ function EID:onGameUpdate()
|
||||
EID.hasValidWalkingpath = false
|
||||
elseif not EID.pathCheckerEntity:Exists() then
|
||||
EID.pathCheckerEntity = nil
|
||||
EID.hasValidWalkingpath = false
|
||||
else
|
||||
EID.pathCheckerEntity.Position = EID.player.Position
|
||||
EID.hasValidWalkingpath = EID.pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos ( EID.lastDescriptionEntity.Position, false )
|
||||
EID.pathfindingTo = EID.lastDescriptionEntity
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate)
|
||||
|
||||
-- this can be called when moving between two different pickups
|
||||
function EID:updatePathfinding()
|
||||
if not EID.pathCheckerEntity or not EID.lastDescriptionEntity then return end
|
||||
EID.pathCheckerEntity.Position = EID.player.Position
|
||||
EID.hasValidWalkingpath = EID.pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos ( EID.lastDescriptionEntity.Position, false )
|
||||
EID.pathfindingTo = EID.lastDescriptionEntity
|
||||
end
|
||||
|
||||
local hasShownAchievementWarning = false
|
||||
|
||||
local function renderAchievementInfo()
|
||||
@@ -739,6 +749,10 @@ local function onRender(t)
|
||||
for i, entity in ipairs(entitySearch) do
|
||||
if EID:hasDescription(entity) and entity.FrameCount > 0 then
|
||||
local diff = entity.Position:__sub(sourcePos)
|
||||
-- break ties with the render offset (for Mega Chest double collectibles)
|
||||
if diff:Length() == EID.lastDist and entity:GetData()["EID_RenderOffset"] then
|
||||
diff = diff + entity:GetData()["EID_RenderOffset"]
|
||||
end
|
||||
if diff:Length() < EID.lastDist then
|
||||
EID.lastDescriptionEntity = entity
|
||||
EID.lastDist = diff:Length()
|
||||
@@ -815,6 +829,8 @@ local function onRender(t)
|
||||
end
|
||||
end
|
||||
|
||||
if EID.pathfindingTo and EID.pathfindingTo.Index ~= closest.Index then EID:updatePathfinding() end
|
||||
|
||||
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
||||
--Handle Trinkets
|
||||
local trinketID = closest.SubType
|
||||
@@ -833,7 +849,8 @@ local function onRender(t)
|
||||
EID:printDescription(descriptionObj)
|
||||
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
||||
--Handle Cards & Runes
|
||||
if ( not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"]) and closest.FrameCount < 3 then
|
||||
if (not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"]) and
|
||||
(closest.FrameCount < 3 or EID.pathfindingTo == nil) then
|
||||
-- small delay when having obstruction enabled & entering the room to prevent spoilers
|
||||
return
|
||||
end
|
||||
@@ -851,13 +868,16 @@ local function onRender(t)
|
||||
EID:printDescription(descriptionObj)
|
||||
elseif closest.Variant == PickupVariant.PICKUP_PILL then
|
||||
--Handle Pills
|
||||
if not EID.Config["DisplayObstructedPillInfo"] and closest.FrameCount < 3 then
|
||||
if not EID.Config["DisplayObstructedPillInfo"] and
|
||||
(closest.FrameCount < 3 or EID.pathfindingTo == nil) then
|
||||
-- small delay when having obstruction enabled & entering the room to prevent spoilers
|
||||
return
|
||||
end
|
||||
if EID:getEntityData(closest, "EID_DontHide") ~= true then
|
||||
local hideinShop = closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]
|
||||
local isOptionsSpawn = REPENTANCE and not EID.Config["DisplayPillInfoOptions?"] and closest:ToPickup().OptionsPickupIndex > 0
|
||||
if isOptionsSpawn or (closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]) or (not EID.Config["DisplayObstructedPillInfo"] and not EID.hasValidWalkingpath) then
|
||||
local obstructed = not EID.Config["DisplayObstructedPillInfo"] and not EID.hasValidWalkingpath
|
||||
if isOptionsSpawn or hideinShop or obstructed then
|
||||
EID:renderQuestionMark()
|
||||
return
|
||||
end
|
||||
@@ -866,6 +886,7 @@ local function onRender(t)
|
||||
local pillColor = closest.SubType
|
||||
local pool = game:GetItemPool()
|
||||
local identified = pool:IsPillIdentified(pillColor)
|
||||
if REPENTANCE and pillColor % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then identified = true end
|
||||
if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) then
|
||||
local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor)
|
||||
EID:printDescription(descEntry)
|
||||
|
||||
Reference in new issue
Block a user