public static void init(OrgeCrop plant, bool full) { plant.PickGraphic = Utility.RandomList(0xC55, 0xC56, 0xC57, 0xC59); plant.FullGraphic = Utility.RandomList(0xC58, 0xC5A, 0xC5B); plant.Hue = 0x28E; plant.LastPick = DateTime.Now; plant.regrowTimer = new CropTimer(plant); if (full) { plant.Yield = plant.Capacity; ((Item)plant).ItemID = plant.FullGraphic; } else { plant.Yield = 0; ((Item)plant).ItemID = plant.PickGraphic; plant.regrowTimer.Start(); } }
public CropTimer(OrgeCrop plant) : base(TimeSpan.FromSeconds(600), TimeSpan.FromSeconds(15)) { Priority = TimerPriority.OneSecond; i_plant = plant; }
public CropTimer( OrgeCrop plant ) : base( TimeSpan.FromSeconds( 600 ), TimeSpan.FromSeconds( 15 ) ) { Priority = TimerPriority.OneSecond; i_plant = plant; }
public static void init ( OrgeCrop plant, bool full ) { plant.PickGraphic = Utility.RandomList( 0xC55, 0xC56, 0xC57, 0xC59 ); plant.FullGraphic = Utility.RandomList( 0xC58, 0xC5A, 0xC5B ); plant.Hue = 0x28E; plant.LastPick = DateTime.Now; plant.regrowTimer = new CropTimer( plant ); if ( full ) { plant.Yield = plant.Capacity; ((Item)plant).ItemID = plant.FullGraphic; } else { plant.Yield = 0; ((Item)plant).ItemID = plant.PickGraphic; plant.regrowTimer.Start(); } }