This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiles.cs
95 lines (93 loc) · 2.78 KB
/
Tiles.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace IceKracken
{
public class BrickWallPlacer : ModItem
{
public override string Texture => "IceKracken/Items/NutKracker";
public override void SetDefaults()
{
item.useStyle = 1;
item.useTime = 2;
item.useAnimation = 2;
item.createWall = ModContent.WallType<BrickWall>();
item.autoReuse = true;
}
}
class BrickWall : ModWall
{
public override void SetDefaults()
{
Main.wallHouse[Type] = false;
AddMapEntry(new Color(50, 90, 120));
}
}
public class BrickPlacer : ModItem
{
public override string Texture => "IceKracken/Items/NutKracker";
public override void SetDefaults()
{
item.useStyle = 1;
item.useTime = 2;
item.useAnimation = 2;
item.createTile = ModContent.TileType<Brick>();
item.autoReuse = true;
}
}
class Brick : ModTile
{
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
minPick = 100;
soundType = SoundID.Tink;
dustType = DustID.Stone;
AddMapEntry(new Color(100, 150, 255));
}
public override void NearbyEffects(int i, int j, bool closer)
{
Lighting.AddLight(new Vector2(i, j) * 16, new Vector3(1, 1, 1) * 0.01f);
}
}
class Brick2 : ModTile
{
public override bool Autoload(ref string name, ref string texture)
{
texture = "IceKracken/Brick";
return base.Autoload(ref name, ref texture);
}
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
minPick = 100;
soundType = SoundID.Tink;
dustType = DustID.Stone;
}
public override void NearbyEffects(int i, int j, bool closer)
{
if (IceWorld.BossOpen && !Main.npc.Any(n => n.active && n.modNPC is Boss.MainBody)) Main.tile[i, j].inActive(true);
else Main.tile[i, j].inActive(false);
}
}
public class BrickPlacer2 : ModItem
{
public override string Texture => "IceKracken/Items/NutKracker";
public override void SetDefaults()
{
item.useStyle = 1;
item.useTime = 2;
item.useAnimation = 2;
item.createTile = ModContent.TileType<Brick2>();
item.autoReuse = true;
}
}
}