Solaestas / Everglow

GNU General Public License v3.0
27 stars 4 forks source link

Second Demo Preparations #226

Closed Setnour6 closed 4 months ago

Setnour6 commented 9 months ago

The first set of changes for the second demo release of Everglow, aimed for 1.4.4.

I need help with making two of the demo chests spawn. I want one chest to have the updated spell books and another chest to have the bayonets. I can move the code back to Myth again if you don't want it to be in Everglow.Function

public override void PostWorldGen()
{
        bool placed1 = false;
        bool placed2 = false;
        for (int offX = -36; offX < 36; offX += 72)
        {
            for (int offY = -36; offY < 12; offY++)
            {
                        // The logic here needs to be updated
                if (!placed1)
                    placed1 = TrySpellbookChest(Main.spawnTileX + offX, Main.spawnTileY + offY, 36);
                else if (!placed2)
                    placed2 = TryBayonetChest(Main.spawnTileX + offX + 4, Main.spawnTileY + offY, 36);
                else
                {
                    break;
                }
            }
        }
}