TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CheckWoman()

static void Terraria.WorldGen.CheckWoman ( int i,
int j )
inlinestatic

Definition at line 39172 of file WorldGen.cs.

39173 {
39174 if (destroyObject)
39175 {
39176 return;
39177 }
39178 int num = i;
39179 int num2 = j - Main.tile[i, j].frameY / 18;
39180 int num3;
39181 for (num3 = Main.tile[i, j].frameX; num3 >= 100; num3 -= 100)
39182 {
39183 }
39184 while (num3 >= 36)
39185 {
39186 num3 -= 36;
39187 }
39188 num -= num3 / 18;
39189 bool flag = false;
39190 for (int k = 0; k <= 1; k++)
39191 {
39192 for (int l = 0; l <= 2; l++)
39193 {
39194 int num4 = num + k;
39195 int num5 = num2 + l;
39196 int num6;
39197 for (num6 = Main.tile[num4, num5].frameX; num6 >= 100; num6 -= 100)
39198 {
39199 }
39200 if (num6 >= 36)
39201 {
39202 num6 -= 36;
39203 }
39204 if (!Main.tile[num4, num5].active() || Main.tile[num4, num5].type != 269 || Main.tile[num4, num5].frameY != l * 18 || num6 != k * 18)
39205 {
39206 flag = true;
39207 }
39208 }
39209 }
39211 {
39212 flag = true;
39213 }
39214 if (!flag)
39215 {
39216 return;
39217 }
39218 destroyObject = true;
39219 using (new Item.DisableNewItemMethod(!TileLoader.Drop(i, j, Main.tile[i, j].type)))
39220 {
39221 Item.NewItem(GetItemSource_FromTileBreak(i, j), i * 16, j * 16, 32, 32, 1989);
39222 for (int m = 0; m <= 1; m++)
39223 {
39224 for (int n = 0; n <= 2; n++)
39225 {
39226 int num7 = num + m;
39227 int num8 = num2 + n;
39228 if (Main.tile[num7, num8].active() && Main.tile[num7, num8].type == 269)
39229 {
39230 KillTile(num7, num8);
39231 }
39232 }
39233 }
39234 destroyObject = false;
39235 }
39236 }
static bool Drop(int i, int j, int type, bool includeLargeObjectDrops=true)
This serves as the central class from which tile-related functions are supported and carried out.
Definition TileLoader.cs:23
static bool destroyObject
Definition WorldGen.cs:1258
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool SolidTileAllowBottomSlope(int i, int j)
static IEntitySource GetItemSource_FromTileBreak(int x, int y)

References Terraria.ModLoader.TileLoader.Drop(), Terraria.Item.NewItem(), and Terraria.Main.tile.

+ Here is the call graph for this function: