Пример #1
0
 public bool Restart(Inventory inventory, int amount, BlueprintDataBlock blueprint, ulong startTimeMillis)
 {
     if (!blueprint || !blueprint.CanWork(amount, inventory))
     {
         this = new CraftingSession();
         return(false);
     }
     this.blueprint       = blueprint;
     this.startTime       = (float)((double)((float)startTimeMillis) / 1000);
     this.duration        = blueprint.craftingDuration * (float)amount;
     this.progressPerSec  = 1f;
     this.progressSeconds = 0f;
     this.amount          = amount;
     this.inProgress      = true;
     return(true);
 }
Пример #2
0
 public bool Restart(Inventory inventory, int amount, BlueprintDataBlock blueprint, ulong startTimeMillis)
 {
     if (!blueprint || !blueprint.CanWork(amount, inventory))
     {
         this = new CraftingSession();
         return false;
     }
     this.blueprint = blueprint;
     this.startTime = (float)((double)((float)startTimeMillis) / 1000);
     this.duration = blueprint.craftingDuration * (float)amount;
     this.progressPerSec = 1f;
     this.progressSeconds = 0f;
     this.amount = amount;
     this.inProgress = true;
     return true;
 }