Example #1
0
 private void onRainUpdated(ELightingRain rain)
 {
     if (rain != ELightingRain.POST_DRIZZLE)
     {
         return;
     }
     if (Physics.Raycast(base.transform.position + Vector3.up, Vector3.up, 32f, RayMasks.BLOCK_WIND))
     {
         return;
     }
     this.updatePlanted(1u);
     if (Provider.isServer)
     {
         BarricadeManager.updateFarm(base.transform, this.planted, false);
     }
 }
Example #2
0
 public override void simulate(uint simulation, bool inputSteady)
 {
     if (this.isUsing && this.isUseable)
     {
         base.player.equipment.isBusy = false;
         this.isUsing = false;
         if (Provider.isServer)
         {
             if (this.farm != null && !this.farm.checkFarm())
             {
                 BarricadeManager.updateFarm(this.farm.transform, 1u, true);
                 base.player.equipment.use();
             }
             else
             {
                 base.player.equipment.dequip();
             }
         }
     }
 }