Esempio n. 1
0
 public void StopMining()
 {
     ExcavatorServerEffects.SetMining(false);
     CancelInvoke(ProduceResources);
     if (HasFlag(Flags.On))
     {
         Facepunch.Rust.Analytics.ExcavatorStopped(GetNetworkTime() - excavatorStartTime);
     }
     SetFlag(Flags.On, false);
     Interface.CallHook("OnExcavatorMiningToggled", this);
 }
Esempio n. 2
0
 public void BeginMining()
 {
     if (IsPowered())
     {
         SetFlag(Flags.On, true);
         InvokeRepeating(ProduceResources, resourceProductionTickRate, resourceProductionTickRate);
         ExcavatorServerEffects.SetMining(true);
         Facepunch.Rust.Analytics.ExcavatorStarted();
         excavatorStartTime = GetNetworkTime();
         Interface.CallHook("OnExcavatorMiningToggled", this);
     }
 }