예제 #1
0
    public void ForceUpdateGrowablesInRange()
    {
        List <GrowableEntity> obj = Facepunch.Pool.GetList <GrowableEntity>();

        Vis.Entities(base.transform.position, Server.artificialTemperatureGrowableRange, obj, 512);
        List <PlanterBox> obj2 = Facepunch.Pool.GetList <PlanterBox>();

        foreach (GrowableEntity item in obj)
        {
            if (item.isServer)
            {
                PlanterBox planter = item.GetPlanter();
                if (planter != null && !obj2.Contains(planter))
                {
                    obj2.Add(planter);
                    planter.ForceTemperatureUpdate();
                }
                item.CalculateQualities(false, false, true);
                item.SendNetworkUpdate();
            }
        }
        Facepunch.Pool.FreeList(ref obj2);
        Facepunch.Pool.FreeList(ref obj);
    }