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

◆ ProcessSeed()

void Terraria.GameContent.UI.States.UIWorldCreation.ProcessSeed ( out string processedSeed)
inlineprivate

Definition at line 765 of file UIWorldCreation.cs.

766 {
769 string[] array = _optionSeed.Split('.');
770 if (array.Length != 4)
771 {
772 return;
773 }
774 if (int.TryParse(array[0], out var result))
775 {
776 switch (result)
777 {
778 case 1:
779 _optionSize = WorldSizeId.Small;
780 break;
781 case 2:
782 _optionSize = WorldSizeId.Medium;
783 break;
784 case 3:
785 _optionSize = WorldSizeId.Large;
786 break;
787 }
788 }
789 if (int.TryParse(array[1], out result))
790 {
791 switch (result)
792 {
793 case 1:
794 _optionDifficulty = WorldDifficultyId.Normal;
795 break;
796 case 2:
797 _optionDifficulty = WorldDifficultyId.Expert;
798 break;
799 case 3:
800 _optionDifficulty = WorldDifficultyId.Master;
801 break;
802 case 4:
803 _optionDifficulty = WorldDifficultyId.Creative;
804 break;
805 }
806 }
807 if (int.TryParse(array[2], out result))
808 {
809 switch (result)
810 {
811 case 1:
812 _optionEvil = WorldEvilId.Corruption;
813 break;
814 case 2:
815 _optionEvil = WorldEvilId.Crimson;
816 break;
817 }
818 }
819 processedSeed = array[3];
820 }
static void ProcessSpecialWorldSeeds(string processedSeed)

References Terraria.GameContent.UI.States.UIWorldCreation._optionDifficulty, Terraria.GameContent.UI.States.UIWorldCreation._optionEvil, Terraria.GameContent.UI.States.UIWorldCreation._optionSeed, Terraria.GameContent.UI.States.UIWorldCreation._optionSize, System.array, and Terraria.GameContent.UI.States.UIWorldCreation.ProcessSpecialWorldSeeds().

Referenced by Terraria.GameContent.UI.States.UIWorldCreation.FinishCreatingWorld(), and Terraria.GameContent.UI.States.UIWorldCreation.OnFinishedSettingSeed().