public static void init ( MushroomAddon plant, bool full ) { plant.PickGraphic = ( 0xD18 ); plant.FullGraphic = Utility.RandomMinMax( 3340, 3348 ); plant.LastPick = DateTime.Now; plant.regrowTimer = new CropTimer( plant ); if ( full ) { plant.Yield = 1; ((Item)plant).ItemID = plant.FullGraphic; } else { plant.Yield = 0; ((Item)plant).ItemID = plant.PickGraphic; plant.regrowTimer.Start(); } }
public static void init ( MushroomAddon plant, bool full ) { plant.PickGraphic = ( 0xD18 ); plant.FullGraphic = Utility.RandomMinMax( 3340, 3348 ); plant.LastPick = DateTime.UtcNow; plant.regrowTimer = new CropTimer( plant ); if ( full ) { plant.Yield = 1; ((Item)plant).ItemID = plant.FullGraphic; } else { plant.Yield = 0; ((Item)plant).ItemID = plant.PickGraphic; plant.regrowTimer.Start(); } }
public CropTimer( MushroomAddon plant ) : base( TimeSpan.FromSeconds( 600 ), TimeSpan.FromSeconds( 15 ) ) { Priority = TimerPriority.OneSecond; i_plant = plant; }