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

◆ UpdateAudio_DecideOnNewMusic()

void Terraria.Main.UpdateAudio_DecideOnNewMusic ( )
inlineprivate

Definition at line 11741 of file Main.cs.

11742 {
11743 //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
11744 //IL_0a87: Unknown result type (might be due to invalid IL or missing references)
11745 //IL_0abf: Unknown result type (might be due to invalid IL or missing references)
11746 //IL_0c6e: Unknown result type (might be due to invalid IL or missing references)
11747 //IL_0c8a: Unknown result type (might be due to invalid IL or missing references)
11748 //IL_152d: Unknown result type (might be due to invalid IL or missing references)
11749 //IL_154b: Unknown result type (might be due to invalid IL or missing references)
11750 bool flag = false;
11751 bool flag12 = false;
11752 bool flag13 = false;
11753 bool flag14 = false;
11754 bool flag15 = false;
11755 bool flag16 = false;
11756 bool flag17 = false;
11757 bool flag18 = false;
11758 bool flag19 = false;
11759 bool flag2 = false;
11760 bool flag3 = false;
11761 bool flag4 = false;
11762 bool flag5 = false;
11763 bool flag6 = false;
11764 bool flag7 = false;
11765 bool flag8 = false;
11766 bool flag9 = false;
11767 bool flag10 = LocalPlayer.townNPCs > 2f;
11768 bool flag11 = slimeRain;
11769 if (SceneMetrics.ShadowCandleCount > 0 || LocalPlayer.inventory[LocalPlayer.selectedItem].type == 5322)
11770 {
11771 flag10 = false;
11772 }
11773 float num = 0f;
11774 for (int i = 0; i < maxMusic; i++)
11775 {
11776 if (musicFade[i] > num)
11777 {
11778 num = musicFade[i];
11779 if (num == 1f)
11780 {
11781 lastMusicPlayed = i;
11782 }
11783 }
11784 }
11785 if (lastMusicPlayed == 50)
11786 {
11787 musicNoCrossFade[51] = true;
11788 }
11789 int modMusic = -1;
11791 if (!gameMenu)
11792 {
11793 Rectangle rectangle = default(Rectangle);
11795 int num2 = 5000;
11796 Rectangle value = default(Rectangle);
11797 for (int j = 0; j < 200; j++)
11798 {
11799 if (!npc[j].active)
11800 {
11801 continue;
11802 }
11803 num2 = 5000;
11804 int num3 = 0;
11805 int type = npc[j].type;
11806 if ((uint)(type - 13) <= 2u || (uint)(type - 127) <= 4u)
11807 {
11808 num3 = 1;
11809 }
11810 else if (!NPCID.Sets.BelongsToInvasionGoblinArmy[npc[j].type] || NPCID.Sets.InvasionSlotCount[npc[j].type] <= 0)
11811 {
11812 if ((uint)(type - 113) > 1u && (uint)(type - 125) > 1u)
11813 {
11814 if ((uint)(type - 134) <= 2u || (NPCID.Sets.BelongsToInvasionFrostLegion[npc[j].type] && NPCID.Sets.InvasionSlotCount[npc[j].type] > 0) || type == 266)
11815 {
11816 num3 = 3;
11817 }
11818 else if (!NPCID.Sets.BelongsToInvasionPirate[npc[j].type] || NPCID.Sets.InvasionSlotCount[npc[j].type] <= 0)
11819 {
11820 switch (type)
11821 {
11822 case 245:
11823 num3 = 4;
11824 break;
11825 case 222:
11826 num3 = 5;
11827 break;
11828 case 262:
11829 case 263:
11830 case 264:
11831 num3 = 6;
11832 break;
11833 default:
11835 {
11836 switch (type)
11837 {
11838 case 398:
11839 num3 = 7;
11840 break;
11841 case 422:
11842 case 493:
11843 case 507:
11844 case 517:
11845 num3 = 10;
11846 break;
11847 case 439:
11848 num3 = 4;
11849 break;
11850 case 438:
11851 if (npc[j].ai[1] == 1f)
11852 {
11853 num2 = 1600;
11854 num3 = 4;
11855 }
11856 break;
11857 case 657:
11858 num3 = 13;
11859 break;
11860 case 636:
11861 num3 = 14;
11862 break;
11863 case 370:
11864 num3 = 15;
11865 break;
11866 case 668:
11867 num3 = 16;
11868 break;
11869 }
11870 }
11871 else
11872 {
11873 num3 = 9;
11874 }
11875 break;
11876 }
11877 }
11878 else
11879 {
11880 num3 = 8;
11881 }
11882 }
11883 else
11884 {
11885 num3 = 2;
11886 }
11887 }
11888 else
11889 {
11890 num3 = 11;
11891 }
11893 {
11894 num3 = 12;
11895 }
11896 if (NPCID.Sets.NoInvasionMusic[npc[j].type] && NPC.GetNPCInvasionGroup(npc[j].type) != 0)
11897 {
11898 num3 = 0;
11899 }
11900 if (num3 == 0 && npc[j].boss)
11901 {
11902 num3 = 1;
11903 }
11904 if (remixWorld && getGoodWorld && (npc[j].type == 127 || npc[j].type == 134 || npc[j].type == 125 || npc[j].type == 126))
11905 {
11906 num3 = 17;
11907 }
11908 if (num3 == 0)
11909 {
11910 continue;
11911 }
11912 ((Rectangle)(ref value))._002Ector((int)(npc[j].position.X + (float)(npc[j].width / 2)) - num2, (int)(npc[j].position.Y + (float)(npc[j].height / 2)) - num2, num2 * 2, num2 * 2);
11913 if (((Rectangle)(ref rectangle)).Intersects(value))
11914 {
11915 if (npc[j].ModNPC != null && npc[j].ModNPC.Music >= 0 && (modMusic < 0 || npc[j].ModNPC.SceneEffectPriority > modPriority))
11916 {
11917 modMusic = npc[j].ModNPC.Music;
11918 modPriority = npc[j].ModNPC.SceneEffectPriority;
11919 }
11920 switch (num3)
11921 {
11922 case 1:
11923 flag = true;
11924 break;
11925 case 2:
11926 flag13 = true;
11927 break;
11928 case 3:
11929 flag14 = true;
11930 break;
11931 case 4:
11932 flag15 = true;
11933 break;
11934 case 5:
11935 flag16 = true;
11936 break;
11937 case 6:
11938 flag17 = true;
11939 break;
11940 case 7:
11941 flag18 = true;
11942 break;
11943 case 8:
11944 flag19 = true;
11945 break;
11946 case 9:
11947 flag2 = true;
11948 break;
11949 case 10:
11950 flag3 = true;
11951 break;
11952 case 11:
11953 flag4 = true;
11954 break;
11955 case 12:
11956 flag5 = true;
11957 break;
11958 case 13:
11959 flag6 = true;
11960 break;
11961 case 14:
11962 flag7 = true;
11963 break;
11964 case 15:
11965 flag8 = true;
11966 break;
11967 case 16:
11968 flag12 = true;
11969 break;
11970 case 17:
11971 flag9 = true;
11972 break;
11973 }
11974 }
11975 }
11977 }
11978 _ = (screenPosition.X + (float)(screenWidth / 2)) / 16f;
11979 if (musicVolume == 0f)
11980 {
11981 newMusic = 0;
11982 return;
11983 }
11984 if (gameMenu)
11985 {
11986 if (netMode != 2)
11987 {
11988 if (WorldGen.drunkWorldGen)
11989 {
11990 if (WorldGen.remixWorldGen)
11991 {
11992 newMusic = 70;
11993 }
11994 else
11995 {
11996 newMusic = 60;
11997 }
11998 }
11999 else if (WorldGen.remixWorldGen)
12000 {
12001 newMusic = 8;
12002 }
12003 else if (menuMode == 3000)
12004 {
12005 newMusic = 89;
12006 }
12007 else if (WorldGen.tenthAnniversaryWorldGen)
12008 {
12009 newMusic = 11;
12010 }
12011 else
12012 {
12014 }
12015 if (_isAsyncLoadComplete && newMusic == 50 && !audioSystem.IsTrackPlaying(50))
12016 {
12017 newMusic = 51;
12018 if (musicNoCrossFade[51])
12019 {
12020 musicFade[51] = 1f;
12021 }
12022 }
12023 }
12024 else
12025 {
12026 newMusic = 0;
12027 }
12028 return;
12029 }
12030 float num4 = (float)maxTilesX / 4200f;
12031 num4 *= num4;
12032 float num5 = (float)((double)((screenPosition.Y + (float)(screenHeight / 2)) / 16f - (65f + 10f * num4)) / (worldSurface / 5.0));
12034 {
12035 newMusic = 89;
12036 }
12037 else if (modPriority >= SceneEffectPriority.BossHigh)
12038 {
12040 }
12041 else if (player[myPlayer].happyFunTorchTime)
12042 {
12043 newMusic = 13;
12044 }
12045 else if (flag18)
12046 {
12047 newMusic = 38;
12048 }
12049 else if (modPriority >= SceneEffectPriority.BossMedium)
12050 {
12052 }
12053 else if (flag9)
12054 {
12055 newMusic = 81;
12056 }
12057 else if (flag2)
12058 {
12059 newMusic = 37;
12060 }
12061 else if (flag3)
12062 {
12063 newMusic = 34;
12064 }
12065 else if (flag17)
12066 {
12067 newMusic = 24;
12068 }
12069 else if (modPriority >= SceneEffectPriority.BossLow)
12070 {
12072 }
12073 else if (flag7)
12074 {
12075 newMusic = 57;
12076 }
12077 else if (flag8)
12078 {
12079 newMusic = 58;
12080 }
12081 else if (flag13)
12082 {
12083 newMusic = 12;
12084 }
12085 else if (flag)
12086 {
12087 newMusic = 5;
12088 }
12089 else if (flag14)
12090 {
12091 newMusic = 13;
12092 }
12093 else if (flag15)
12094 {
12095 newMusic = 17;
12096 }
12097 else if (flag16)
12098 {
12099 newMusic = 25;
12100 }
12101 else if (flag6)
12102 {
12103 newMusic = 56;
12104 }
12105 else if (flag12)
12106 {
12107 newMusic = 90;
12108 }
12109 else if (modPriority >= SceneEffectPriority.Event)
12110 {
12112 }
12113 else if (flag19)
12114 {
12115 newMusic = 35;
12116 }
12117 else if (flag4)
12118 {
12119 newMusic = 39;
12120 }
12121 else if (flag5)
12122 {
12123 newMusic = 41;
12124 }
12125 else if (modPriority >= SceneEffectPriority.Environment)
12126 {
12128 }
12129 else if (eclipse && !remixWorld && (double)player[myPlayer].position.Y < worldSurface * 16.0 + (double)(screenHeight / 2))
12130 {
12131 newMusic = 27;
12132 }
12133 else if (eclipse && remixWorld && (double)player[myPlayer].position.Y > rockLayer * 16.0)
12134 {
12135 newMusic = 27;
12136 }
12137 else if (flag11 && !player[myPlayer].ZoneGraveyard && (!bloodMoon || dayTime) && (double)player[myPlayer].position.Y < worldSurface * 16.0 + (double)(screenHeight / 2))
12138 {
12139 newMusic = 48;
12140 }
12141 else if (remixWorld && bloodMoon && !player[myPlayer].ZoneCrimson && !player[myPlayer].ZoneCorrupt && (double)player[myPlayer].position.Y > rockLayer * 16.0 && player[myPlayer].position.Y <= (float)(UnderworldLayer * 16))
12142 {
12143 newMusic = 2;
12144 }
12145 else if (remixWorld && bloodMoon && player[myPlayer].position.Y > (float)(UnderworldLayer * 16) && (double)(player[myPlayer].Center.X / 16f) > (double)maxTilesX * 0.37 + 50.0 && (double)(player[myPlayer].Center.X / 16f) < (double)maxTilesX * 0.63)
12146 {
12147 newMusic = 2;
12148 }
12149 else if (player[myPlayer].ZoneShimmer)
12150 {
12151 newMusic = 91;
12152 }
12153 else if (flag10 && dayTime && ((cloudAlpha == 0f && !_shouldUseWindyDayMusic) || (double)player[myPlayer].position.Y >= worldSurface * 16.0 + (double)(screenHeight / 2)) && !player[myPlayer].ZoneGraveyard)
12154 {
12155 newMusic = 46;
12156 }
12157 else if (flag10 && !dayTime && ((!bloodMoon && cloudAlpha == 0f) || (double)player[myPlayer].position.Y >= worldSurface * 16.0 + (double)(screenHeight / 2)) && !player[myPlayer].ZoneGraveyard)
12158 {
12159 newMusic = 47;
12160 }
12161 else if (player[myPlayer].ZoneSandstorm)
12162 {
12163 newMusic = 40;
12164 }
12165 else if (player[myPlayer].position.Y > (float)(UnderworldLayer * 16))
12166 {
12167 newMusic = 36;
12168 }
12169 else if (num5 < 1f)
12170 {
12171 newMusic = (dayTime ? 42 : 15);
12172 }
12173 else if (modPriority >= SceneEffectPriority.BiomeHigh)
12174 {
12176 }
12177 else if (tile[(int)(player[myPlayer].Center.X / 16f), (int)(player[myPlayer].Center.Y / 16f)].wall == 87)
12178 {
12179 newMusic = 26;
12180 }
12181 else if (player[myPlayer].ZoneDungeon)
12182 {
12183 newMusic = 23;
12184 }
12185 else if ((bgStyle == 9 && (double)player[myPlayer].position.Y < worldSurface * 16.0 + (double)(screenHeight / 2)) || undergroundBackground == 2)
12186 {
12187 newMusic = 29;
12188 }
12189 else if (player[myPlayer].ZoneCorrupt)
12190 {
12191 if (player[myPlayer].ZoneCrimson && SceneMetrics.BloodTileCount > SceneMetrics.EvilTileCount)
12192 {
12193 if ((double)player[myPlayer].position.Y > worldSurface * 16.0 + (double)(screenHeight / 2))
12194 {
12195 newMusic = 33;
12196 }
12197 else
12198 {
12199 newMusic = 16;
12200 }
12201 }
12202 else if ((double)player[myPlayer].position.Y > worldSurface * 16.0 + (double)(screenHeight / 2))
12203 {
12204 newMusic = 10;
12205 }
12206 else
12207 {
12208 newMusic = 8;
12209 }
12210 }
12211 else if (player[myPlayer].ZoneCrimson)
12212 {
12213 if ((double)player[myPlayer].position.Y > worldSurface * 16.0 + (double)(screenHeight / 2))
12214 {
12215 newMusic = 33;
12216 }
12217 else
12218 {
12219 newMusic = 16;
12220 }
12221 }
12222 else if (modPriority >= SceneEffectPriority.BiomeMedium)
12223 {
12225 }
12226 else if (player[myPlayer].ZoneMeteor)
12227 {
12228 newMusic = 2;
12229 }
12230 else if (player[myPlayer].ZoneGraveyard)
12231 {
12232 newMusic = 53;
12233 }
12234 else if (player[myPlayer].ZoneJungle)
12235 {
12236 if (remixWorld)
12237 {
12238 if ((double)player[myPlayer].position.Y > rockLayer * 16.0 + (double)(screenHeight / 2))
12239 {
12240 newMusic = 7;
12241 }
12242 else if (newMusic == 7 && (double)player[myPlayer].position.Y > (rockLayer - 50.0) * 16.0 + (double)(screenHeight / 2))
12243 {
12244 newMusic = 7;
12245 }
12246 else if ((double)player[myPlayer].position.Y < worldSurface * 16.0 + (double)(screenHeight / 2))
12247 {
12248 newMusic = (dayTime ? 42 : 15);
12249 }
12250 else
12251 {
12252 newMusic = 54;
12253 }
12254 }
12255 else if ((double)player[myPlayer].position.Y > rockLayer * 16.0 + (double)(screenHeight / 2))
12256 {
12257 newMusic = 54;
12258 }
12259 else if (newMusic == 54 && (double)player[myPlayer].position.Y > (rockLayer - 50.0) * 16.0 + (double)(screenHeight / 2))
12260 {
12261 newMusic = 54;
12262 }
12263 else if (_shouldUseStormMusic && (double)player[myPlayer].position.Y < worldSurface * 16.0 + (double)(screenHeight / 2))
12264 {
12265 newMusic = 52;
12266 }
12267 else if (dayTime)
12268 {
12269 newMusic = 7;
12270 }
12271 else
12272 {
12273 newMusic = 55;
12274 }
12275 }
12276 else if (player[myPlayer].ZoneSnow)
12277 {
12278 if ((double)player[myPlayer].position.Y > worldSurface * 16.0 + (double)(screenHeight / 2))
12279 {
12280 if (remixWorld && (double)player[myPlayer].position.Y > rockLayer * 16.0 + (double)(screenHeight / 2))
12281 {
12282 newMusic = 14;
12283 }
12284 else
12285 {
12286 newMusic = 20;
12287 }
12288 }
12289 else if (remixWorld)
12290 {
12291 newMusic = (dayTime ? 42 : 15);
12292 }
12293 else
12294 {
12295 newMusic = 14;
12296 }
12297 }
12298 else if (modPriority >= SceneEffectPriority.BiomeLow)
12299 {
12301 }
12302 else if ((double)player[myPlayer].position.Y >= worldSurface * 16.0 + (double)(screenHeight / 2) && (remixWorld || !WorldGen.oceanDepths((int)(screenPosition.X + (float)(screenWidth / 2)) / 16, (int)(screenPosition.Y + (float)(screenHeight / 2)) / 16)))
12303 {
12304 if (player[myPlayer].ZoneHallow)
12305 {
12306 if (remixWorld && (double)player[myPlayer].position.Y >= rockLayer * 16.0 + (double)(screenHeight / 2))
12307 {
12308 newMusic = 9;
12309 }
12310 else
12311 {
12312 newMusic = 11;
12313 }
12314 }
12315 else if (player[myPlayer].ZoneUndergroundDesert)
12316 {
12317 if ((double)player[myPlayer].position.Y >= worldSurface * 16.0 + (double)(screenHeight / 2))
12318 {
12319 newMusic = 61;
12320 }
12321 else
12322 {
12323 newMusic = 21;
12324 }
12325 }
12326 else
12327 {
12328 if (ugMusic == 0)
12329 {
12330 ugMusic = 4;
12331 }
12332 if (!audioSystem.IsTrackPlaying(4) && !audioSystem.IsTrackPlaying(31))
12333 {
12334 if (musicFade[4] == 1f)
12335 {
12336 musicFade[31] = 1f;
12337 }
12338 if (musicFade[31] == 1f)
12339 {
12340 musicFade[4] = 1f;
12341 }
12342 switch (rand.Next(2))
12343 {
12344 case 0:
12345 ugMusic = 4;
12346 musicFade[31] = 0f;
12347 break;
12348 case 1:
12349 ugMusic = 31;
12350 musicFade[4] = 0f;
12351 break;
12352 }
12353 }
12354 newMusic = ugMusic;
12355 if (remixWorld && (double)(player[myPlayer].position.Y / 16f) > rockLayer && player[myPlayer].position.Y / 16f < (float)(maxTilesY - 350))
12356 {
12357 if (cloudAlpha > 0f)
12358 {
12359 newMusic = 19;
12360 }
12361 else if (player[myPlayer].ZoneDesert)
12362 {
12363 newMusic = 21;
12364 }
12365 else if (_shouldUseWindyDayMusic)
12366 {
12367 newMusic = 44;
12368 }
12369 }
12370 }
12371 }
12372 else if (dayTime && player[myPlayer].ZoneHallow)
12373 {
12375 {
12376 newMusic = 52;
12377 }
12378 else if (cloudAlpha > 0f && !gameMenu)
12379 {
12380 newMusic = 19;
12381 }
12383 {
12384 newMusic = 44;
12385 }
12386 else
12387 {
12388 newMusic = 9;
12389 }
12390 }
12391 else if (_shouldUseStormMusic)
12392 {
12393 if (bloodMoon)
12394 {
12395 newMusic = 2;
12396 }
12397 else
12398 {
12399 newMusic = 52;
12400 }
12401 }
12402 else if (WorldGen.oceanDepths((int)(screenPosition.X + (float)(screenWidth / 2)) / 16, (int)(screenPosition.Y + (float)(screenHeight / 2)) / 16))
12403 {
12404 if (bloodMoon)
12405 {
12406 newMusic = 2;
12407 }
12408 else if (flag10)
12409 {
12410 if (dayTime)
12411 {
12412 newMusic = 46;
12413 }
12414 else
12415 {
12416 newMusic = 47;
12417 }
12418 }
12419 else
12420 {
12421 newMusic = (dayTime ? 22 : 43);
12422 }
12423 }
12424 else if (player[myPlayer].ZoneDesert)
12425 {
12426 if ((double)player[myPlayer].position.Y >= worldSurface * 16.0)
12427 {
12428 int num6 = (int)(player[myPlayer].Center.X / 16f);
12429 int num7 = (int)(player[myPlayer].Center.Y / 16f);
12431 {
12432 newMusic = 61;
12433 }
12434 else
12435 {
12436 newMusic = 21;
12437 }
12438 }
12439 else
12440 {
12441 newMusic = 21;
12442 }
12443 }
12444 else if (remixWorld)
12445 {
12446 newMusic = (dayTime ? 42 : 15);
12447 }
12448 else if (dayTime)
12449 {
12450 if (cloudAlpha > 0f && !gameMenu)
12451 {
12452 if (time < 10800.0)
12453 {
12454 newMusic = 59;
12455 }
12456 else
12457 {
12458 newMusic = 19;
12459 }
12460 }
12461 else
12462 {
12463 if (dayMusic == 0)
12464 {
12465 dayMusic = 1;
12466 }
12467 if (!audioSystem.IsTrackPlaying(1) && !audioSystem.IsTrackPlaying(18))
12468 {
12469 if (rand.Next(2) == 0)
12470 {
12471 dayMusic = 1;
12472 }
12473 else
12474 {
12475 dayMusic = 18;
12476 }
12477 }
12480 {
12481 newMusic = 44;
12482 }
12483 }
12484 }
12485 else if (!dayTime)
12486 {
12487 if (bloodMoon)
12488 {
12489 newMusic = 2;
12490 }
12491 else if (cloudAlpha > 0f && !gameMenu)
12492 {
12493 newMusic = 19;
12494 }
12495 else
12496 {
12497 newMusic = 3;
12498 }
12499 }
12500 if (((double)(screenPosition.Y / 16f) < worldSurface + 10.0 || remixWorld) && pumpkinMoon)
12501 {
12502 newMusic = 30;
12503 }
12504 if (((double)(screenPosition.Y / 16f) < worldSurface + 10.0 || remixWorld) && snowMoon)
12505 {
12506 newMusic = 32;
12507 }
12508 }
static bool[] BelongsToInvasionGoblinArmy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Goblin Army invasion...
Definition NPCID.cs:691
static bool[] NoInvasionMusic
If true for a given NPC type (F:Terraria.NPC.type), then that NPC will not play its associated invasi...
Definition NPCID.cs:722
static bool[] BelongsToInvasionMartianMadness
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Martian Madness inva...
Definition NPCID.cs:715
static bool[] BelongsToInvasionOldOnesArmy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Old One's Army event...
Definition NPCID.cs:292
static bool[] BelongsToInvasionPirate
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Pirate invasion....
Definition NPCID.cs:707
static int[] InvasionSlotCount
If above 0 for a given NPC type (F:Terraria.NPC.type), and its associated invasion is NOT a wave-base...
Definition NPCID.cs:731
static bool[] BelongsToInvasionFrostLegion
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Frost Legion invasio...
Definition NPCID.cs:699
static SceneMetrics SceneMetrics
Definition Main.cs:1441
static readonly int maxMusic
Definition Main.cs:475
static double time
The time that has passed since it last became day/night. Increased by F:Terraria....
Definition Main.cs:1375
static bool slimeRain
Definition Main.cs:1241
static int maxTilesY
The height of the currently-loaded world in tiles.
Definition Main.cs:1191
static float cloudAlpha
Definition Main.cs:1393
static bool _shouldUseWindyDayMusic
Definition Main.cs:2386
static IAudioSystem audioSystem
Definition Main.cs:1512
static double worldSurface
The y-coordinate of the top of the dirt layer, in tile coordinates. Corresponds to 0' on the Depth Me...
Definition Main.cs:1351
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static int netMode
Denotes the current network mode: 0 for single player client, 1 for multiplayer client,...
Definition Main.cs:2182
static double rockLayer
The y-coordinate of the top of the caverns layer, in tile coordinates.
Definition Main.cs:1357
static float[] musicFade
Definition Main.cs:1516
static bool dayTime
Definition Main.cs:1365
static bool[] musicNoCrossFade
Definition Main.cs:1514
static bool _shouldUseStormMusic
Definition Main.cs:2388
static bool bloodMoon
Definition Main.cs:1387
int lastMusicPlayed
Definition Main.cs:2390
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static int undergroundBackground
Definition Main.cs:584
static int maxTilesX
The width of the currently-loaded world in tiles.
Definition Main.cs:1186
static bool getGoodWorld
Definition Main.cs:369
static bool eclipse
Definition Main.cs:1403
static UnifiedRandom rand
Definition Main.cs:2758
static NPC[] npc
Definition Main.cs:1830
static int newMusic
Definition Main.cs:1311
static int ugMusic
Definition Main.cs:1309
static int screenWidth
Definition Main.cs:1868
static int UnderworldLayer
The y-coordinate of the top of the underworld, in tile coordinates.
Definition Main.cs:2993
static float musicVolume
Definition Main.cs:1518
static bool snowMoon
Definition Main.cs:1391
static bool pumpkinMoon
Definition Main.cs:1389
static Tilemap tile
Definition Main.cs:1820
static int menuMode
Definition Main.cs:2462
static bool gameMenu
Definition Main.cs:2076
static bool _isAsyncLoadComplete
Definition Main.cs:766
static Player LocalPlayer
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria....
Definition Main.cs:3001
static Player[] player
Definition Main.cs:1960
static int dayMusic
Definition Main.cs:1307
static int bgStyle
Definition Main.cs:877
static bool remixWorld
Definition Main.cs:377
int Music
The ID of the music that plays when this NPC is on or near the screen. Defaults to -1,...
Definition ModNPC.cs:62
This class serves as a place for you to place all your properties and hooks for each NPC....
Definition ModNPC.cs:21
This serves as the central class from which SceneEffect functions are supported and carried out.
SceneEffectPriority
This enum dictates from low to high which SceneEffect selections take priority. Setting appropriate p...

References Terraria.Main._isAsyncLoadComplete, Terraria.Main._shouldUseStormMusic, Terraria.Main._shouldUseWindyDayMusic, Terraria.Main.audioSystem, Terraria.ID.NPCID.Sets.BelongsToInvasionFrostLegion, Terraria.ID.NPCID.Sets.BelongsToInvasionGoblinArmy, Terraria.ID.NPCID.Sets.BelongsToInvasionMartianMadness, Terraria.ID.NPCID.Sets.BelongsToInvasionOldOnesArmy, Terraria.ID.NPCID.Sets.BelongsToInvasionPirate, Terraria.Main.bgStyle, Terraria.Main.bloodMoon, Terraria.SceneMetrics.BloodTileCount, Terraria.Main.cloudAlpha, Terraria.ModLoader.MenuLoader.CurrentMenu, Terraria.Main.dayMusic, Terraria.Main.dayTime, Terraria.WorldGen.drunkWorldGen, Terraria.Main.eclipse, Terraria.SceneMetrics.EvilTileCount, Terraria.Main.gameMenu, Terraria.Main.getGoodWorld, Terraria.NPC.GetNPCInvasionGroup(), Terraria.ID.WallID.Sets.Conversion.HardenedSand, Terraria.ID.NPCID.Sets.InvasionSlotCount, Terraria.WorldGen.InWorld(), Terraria.GameContent.Events.CreditsRollEvent.IsEventOngoing, Terraria.Main.lastMusicPlayed, Terraria.Main.LocalPlayer, Terraria.Main.maxMusic, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.menuMode, Terraria.ModLoader.ModNPC.Music, Terraria.Main.musicFade, Terraria.Main.musicNoCrossFade, Terraria.Main.musicVolume, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Main.newMusic, Terraria.ID.NPCID.Sets.NoInvasionMusic, Terraria.Main.npc, Terraria.WorldGen.oceanDepths(), Terraria.Main.player, Terraria.Main.pumpkinMoon, Terraria.Main.rand, Terraria.Main.remixWorld, Terraria.WorldGen.remixWorldGen, Terraria.Main.rockLayer, Terraria.ID.WallID.Sets.Conversion.Sandstone, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.SceneMetrics.ShadowCandleCount, Terraria.Main.slimeRain, Terraria.Main.snowMoon, Terraria.WorldGen.tenthAnniversaryWorldGen, Terraria.Main.tile, Terraria.Main.time, Terraria.Main.ugMusic, Terraria.Main.undergroundBackground, Terraria.Main.UnderworldLayer, and Terraria.Main.worldSurface.

Referenced by Terraria.Main.UpdateAudio().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: