ScalarVector1 / DragonLens

Modern, customizable, and community-driven debugging and cheat mod for TModLoader
24 stars 14 forks source link

Paint Tool & Buff Despawner Bug Fix + Various UI Optimization #60

Closed Cyrillya closed 1 year ago

Cyrillya commented 1 year ago

Related issues

Implemented #57 partly (Added "Clear Buffs" tool to Advanced preset) Fixed #54

Fix buff despawner not removing all buffs

Previously, DelBuff() is used in buff despawner:

for (int k = 0; k < Player.MaxBuffs; k++)
{
    Main.LocalPlayer.DelBuff(k);
}

Since DelBuff() shuffles the remaining buff indexes down to fill the gap. Doing this only removes half of the buffs actually

I fixed it by directly setting buffTime and buffType

for (int k = 0; k < Player.MaxBuffs; k++)
{
    Main.LocalPlayer.buffTime[k] = 0;
    Main.LocalPlayer.buffType[k] = 0;
}

Advanced preset optimization

If your PC resolution is 1920x1080 and your ui scale is 100%, these two toolbars in Advanced preset overlap: OCSR }~`TB(QW}_@ Y }S7Y Considering that many people have the same resolution and ui scale settings as me, I made a slight change to fix this: KWVH)D3HX(6V0Z_$B6YLZHH

Clicking on a UI panel no longer spawns your selection

Before: dotnet_Ol8BVNHyJt After: dotnet_QOMAsqQYj7

Other spawner tools are fixed as well

ai2 option for projectile spawner

1.4.4 added Projectile.ai[2], which should be an option for projectile spawner. image