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

◆ IsHarvestableHerbWithSeed()

static bool Terraria.WorldGen.IsHarvestableHerbWithSeed ( int type,
int style )
inlinestatic

Definition at line 56825 of file WorldGen.cs.

56826 {
56827 switch (type)
56828 {
56829 case 82:
56830 return false;
56831 default:
56832 return false;
56833 case 83:
56834 case 84:
56835 {
56836 bool result = false;
56837 if (type == 84)
56838 {
56839 result = true;
56840 }
56841 if (style == 0 && Main.dayTime)
56842 {
56843 result = true;
56844 }
56845 if (style == 1 && !Main.dayTime)
56846 {
56847 result = true;
56848 }
56849 if (style == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0))
56850 {
56851 result = true;
56852 }
56853 if (style == 4 && (Main.raining || Main.cloudAlpha > 0f))
56854 {
56855 result = true;
56856 }
56857 if (style == 5 && !Main.raining && Main.dayTime && Main.time > 40500.0)
56858 {
56859 result = true;
56860 }
56861 return result;
56862 }
56863 }
56864 }

References Terraria.Main.bloodMoon, Terraria.Main.cloudAlpha, Terraria.Main.dayTime, Terraria.Main.moonPhase, Terraria.Main.raining, Terraria.Main.time, and System.type.

Referenced by Terraria.Player.PlaceThing_Tiles_BlockPlacementForAssortedThings(), and Terraria.GameContent.SmartCursorHelper.Step_AlchemySeeds().