-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTheGatrix.cs
72 lines (66 loc) · 2.82 KB
/
TheGatrix.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System.Collections.Generic;
using SubworldLibrary;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.World.Generation;
using Thinf.NPCs.Radicow;
namespace Thinf
{
public class TheGatrix : Subworld
{
public override int width => 1000;
public override int height => 1000;
public override ModWorld modWorld => null;
public override bool saveSubworld => false;
public override bool disablePlayerSaving => false;
public override bool saveModData => false;
public override List<GenPass> tasks => new List<GenPass>()
{
new SubworldGenPass(progress =>
{
progress.Message = "Entering the Gatrix";
Main.worldSurface = Main.maxTilesY - 42;
Main.rockLayer = Main.maxTilesY;
for (int i = 0; i < Main.maxTilesX; i++)
{
for (int j = 0; j < Main.maxTilesY; j++)
{
progress.Set((j + i * Main.maxTilesY) / (float)(Main.maxTilesX * Main.maxTilesY));
if (j >= Main.worldSurface - (350) && j <= Main.worldSurface)
{
Main.tile[i, j].active(true);
Main.tile[i, j].type = TileID.WoodBlock;
WorldGen.PlaceWall(i, j - Main.rand.Next(90), WallID.WoodenFence);
}
else if (j % 45 == 0)
{
Main.tile[i, j].active(true);
Main.tile[i, j].type = TileID.Platforms;
}
}
}
}),
new SubworldGenPass(progress =>
{
progress.Message = "Transporting Radicow";
Main.tile[Main.spawnTileX, Main.spawnTileY].active(true);
Main.tile[Main.spawnTileX, Main.spawnTileY].type = TileID.WoodBlock;
Main.tile[Main.spawnTileX + 1, Main.spawnTileY].active(true);
Main.tile[Main.spawnTileX + 1, Main.spawnTileY].type = TileID.WoodBlock;
Main.tile[Main.spawnTileX - 1, Main.spawnTileY].active(true);
Main.tile[Main.spawnTileX - 1, Main.spawnTileY].type = TileID.WoodBlock;
Main.tile[Main.spawnTileX + 1, Main.spawnTileY + 1].active(true);
Main.tile[Main.spawnTileX + 1, Main.spawnTileY + 1].type = TileID.WoodBlock;
Main.tile[Main.spawnTileX - 1, Main.spawnTileY + 1].active(true);
Main.tile[Main.spawnTileX - 1, Main.spawnTileY + 1].type = TileID.WoodBlock;
NPC.NewNPC(Main.spawnTileX * 16, Main.spawnTileY * 16, ModContent.NPCType<RadicowBattle>());
})
};
public override void Load()
{
Main.dayTime = true;
Main.time = 27000;
}
}
}