public static bool SpreadLava(int x, int y) { if (Vector2.Distance(v2_1, new Vector2(x, y)) > f_1) { return(false); } if (WorldGen.PlaceLiquid(x, y, 1, byte.MaxValue)) { Vector2 position = new Vector2(x * 16, y * 16); int type = 35; for (int i = 0; i < 3; i++) { Dust.NewDustDirect(position, 16, 16, type, 0f, 0f, 100, Color.Transparent, 1.2f).velocity *= 7f; Dust.NewDustDirect(position, 16, 16, type, 0f, 0f, 100, Color.Transparent, 0.8f).velocity *= 4f; } return(true); } return(false); }
public static bool SpreadHoney(int x, int y) { if (Vector2.Distance(v2_1, new Vector2(x, y)) > f_1) { return(false); } if (WorldGen.PlaceLiquid(x, y, 2, byte.MaxValue)) { Vector2 position = new Vector2(x * 16, y * 16); int type = 152; for (int i = 0; i < 3; i++) { Dust dust = Dust.NewDustDirect(position, 16, 16, type, 0f, 0f, 100, Color.Transparent, 2.2f); dust.velocity.Y -= 1.2f; dust.velocity *= 7f; Dust dust2 = Dust.NewDustDirect(position, 16, 16, type, 0f, 0f, 100, Color.Transparent, 1.3f); dust2.velocity.Y -= 1.2f; dust2.velocity *= 4f; } return(true); } return(false); }
public static bool SpreadWater(int x, int y) { if ((double)Vector2.Distance(DelegateMethods.v2_1, new Vector2((float)x, (float)y)) > (double)DelegateMethods.f_1 || !WorldGen.PlaceLiquid(x, y, (byte)0, byte.MaxValue)) { return(false); } Vector2 Position = new Vector2((float)(x * 16), (float)(y * 16)); int Type = Dust.dustWater(); for (int index = 0; index < 3; ++index) { Dust dust1 = Dust.NewDustDirect(Position, 16, 16, Type, 0.0f, 0.0f, 100, Color.Transparent, 2.2f); dust1.noGravity = true; dust1.velocity.Y -= 1.2f; dust1.velocity *= 7f; Dust dust2 = Dust.NewDustDirect(Position, 16, 16, Type, 0.0f, 0.0f, 100, Color.Transparent, 1.3f); dust2.velocity.Y -= 1.2f; dust2.velocity *= 4f; } return(true); }
public static bool SpreadLava(int x, int y) { if ((double)Vector2.Distance(DelegateMethods.v2_1, new Vector2((float)x, (float)y)) > (double)DelegateMethods.f_1 || !WorldGen.PlaceLiquid(x, y, (byte)1, byte.MaxValue)) { return(false); } Vector2 Position = new Vector2((float)(x * 16), (float)(y * 16)); int Type = 35; for (int index = 0; index < 3; ++index) { Dust.NewDustDirect(Position, 16, 16, Type, 0.0f, 0.0f, 100, Color.Transparent, 1.2f).velocity *= 7f; Dust.NewDustDirect(Position, 16, 16, Type, 0.0f, 0.0f, 100, Color.Transparent, 0.8f).velocity *= 4f; } return(true); }