46950 {
46953 {
46957 int num = 0;
46960 {
46961 num = 8;
46962 }
46963 else if (
num2 == 974)
46964 {
46965 num = 9;
46966 }
46967 else if (
num2 == 1245)
46968 {
46969 num = 10;
46970 }
46971 else if (
num2 == 1333)
46972 {
46973 num = 11;
46974 }
46975 else if (
num2 == 2274)
46976 {
46977 num = 12;
46978 }
46979 else if (
num2 == 3004)
46980 {
46981 num = 13;
46982 }
46983 else if (
num2 == 3045)
46984 {
46985 num = 14;
46986 }
46987 else if (
num2 == 3114)
46988 {
46989 num = 15;
46990 }
46991 else if (
num2 == 4383)
46992 {
46993 num = 16;
46994 }
46995 else if (
num2 == 4384)
46996 {
46997 num = 17;
46998 }
46999 else if (
num2 == 4385)
47000 {
47001 num = 18;
47002 }
47003 else if (
num2 == 4386)
47004 {
47005 num = 19;
47006 }
47007 else if (
num2 == 4387)
47008 {
47009 num = 20;
47010 }
47011 else if (
num2 == 4388)
47012 {
47013 num = 21;
47014 }
47015 else if (
num2 == 5293)
47016 {
47017 num = 22;
47018 }
47019 else if (
num2 == 5353)
47020 {
47021 num = 23;
47022 }
47023 else if (
num2 >= 427)
47024 {
47026 }
47032 {
47034 }
47036 {
47037 if (Main.rand.Next(
maxValue) == 0)
47038 {
47040 if (Main.rand.Next(3) != 0)
47041 {
47042 Main.dust[
num4].noGravity =
true;
47043 }
47044 Main.dust[
num4].velocity *= 0.3f;
47045 Main.dust[
num4].velocity.Y -= 1.5f;
47048 {
47049 Main.dust[
num4].color =
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
47050 Main.dust[
num4].noGravity =
true;
47051 }
47052 }
47054 }
47055 else
47056 {
47057 if (Main.rand.Next(
maxValue) == 0)
47058 {
47060 if (Main.rand.Next(3) != 0)
47061 {
47062 Main.dust[
num5].noGravity =
true;
47063 }
47064 Main.dust[
num5].velocity *= 0.3f;
47065 Main.dust[
num5].velocity.Y -= 1.5f;
47068 {
47069 Main.dust[
num5].color =
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
47070 Main.dust[
num5].noGravity =
true;
47071 }
47072 }
47074 }
47075 }
47077 {
47080 {
47082 }
47084 {
47086 {
47088 if (Main.rand.Next(3) != 0)
47089 {
47090 Main.dust[
num6].noGravity =
true;
47091 }
47092 Main.dust[
num6].velocity *= 0.3f;
47093 Main.dust[
num6].velocity.Y -= 1.5f;
47095 }
47097 }
47098 else
47099 {
47101 {
47103 if (Main.rand.Next(3) != 0)
47104 {
47105 Main.dust[
num7].noGravity =
true;
47106 }
47107 Main.dust[
num7].velocity *= 0.3f;
47108 Main.dust[
num7].velocity.Y -= 1.5f;
47110 }
47112 }
47113 }
47115 {
47118 {
47120 }
47122 {
47124 {
47126 if (Main.rand.Next(3) != 0)
47127 {
47128 Main.dust[
num8].noGravity =
true;
47129 }
47130 Main.dust[
num8].velocity *= 0.3f;
47131 Main.dust[
num8].velocity.Y -= 1.5f;
47133 }
47135 }
47136 else
47137 {
47139 {
47141 if (Main.rand.Next(3) != 0)
47142 {
47143 Main.dust[
num9].noGravity =
true;
47144 }
47145 Main.dust[
num9].velocity *= 0.3f;
47146 Main.dust[
num9].velocity.Y -= 1.5f;
47148 }
47150 }
47151 }
47153 {
47157 {
47159 }
47161 {
47163 {
47165 if (Main.rand.Next(3) != 0)
47166 {
47167 Main.dust[
num10].noGravity =
true;
47168 }
47169 Main.dust[
num10].velocity *= 0.3f;
47170 Main.dust[
num10].velocity.Y -= 1.5f;
47172 }
47174 }
47175 else
47176 {
47178 {
47180 if (Main.rand.Next(3) != 0)
47181 {
47182 Main.dust[
num11].noGravity =
true;
47183 }
47184 Main.dust[
num11].velocity *= 0.3f;
47185 Main.dust[
num11].velocity.Y -= 1.5f;
47187 }
47189 }
47190 }
47192 {
47194 float g = 0.3f;
47197 {
47199 }
47200 else
47201 {
47203 }
47204 }
47206 {
47208 {
47210 }
47211 else
47212 {
47214 }
47215 }
47217 {
47222 {
47224 }
47225 else
47226 {
47228 }
47231 {
47233 Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(
base.Center);
47234 }
47235 }
47237 {
47239 {
47241 }
47242 else
47243 {
47245 }
47246 }
47248 {
47250 {
47252 }
47253 else
47254 {
47256 }
47257 }
47259 {
47262 {
47264 }
47266 Point p =
vec.ToTileCoordinates();
47267 DelegateMethods.v2_1 = p.ToVector2();
47268 DelegateMethods.f_1 = 4.5f;
47269 Utils.PlotTileArea(p.
X, p.
Y, DelegateMethods.SpreadLightOpen_StopForSolids);
47270 Lighting.AddLight(
vec,
rgb);
47271 }
47273 {
47275 for (
int i = 0;
i < 4;
i++)
47276 {
47277 Dust dust = Main.dust[Dust.NewDust(
base.Center, 0, 0, 242,
direction * 2, 0f, 150,
default(
Color), 1.3f)];
47279 dust.velocity *= 0f;
47280 dust.noGravity = true;
47281 dust.fadeIn = 1f;
47283 if (Main.rand.Next(2) == 0)
47284 {
47285 dust.position += Utils.RandomVector2(Main.rand, -4f, 4f);
47286 dust.scale += Main.rand.NextFloat();
47287 if (Main.rand.Next(2) == 0)
47288 {
47289 dust.customData = this;
47290 }
47291 }
47292 }
47293 }
47295 {
47296 return;
47297 }
47302 if (Main.rand.Next(40) == 0)
47303 {
47307 {
47308 dust2.velocity =
vector2.DirectionTo(
dust2.position) * 0.2f;
47309 }
47310 dust2.fadeIn = 0.3f;
47311 dust2.noLightEmittence = true;
47312 dust2.customData = this;
47313 }
47314 }
static float Clamp(float value, float min, float max)
static bool[] WaterTorches
static readonly short Count
static void TorchColor(int torchID, out float R, out float G, out float B)
int BiomeTorchHoldStyle(int style)
Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation=false, bool addGfxOffY=true)