示例#1
0
        public void UpdateLighting()
        {
            Light = LightingLevel.Dark;

            if (RoomType == RMUD.RoomType.Exterior)
            {
                Light = AmbientExteriorLightingLevel;
            }

            foreach (var item in MudObject.EnumerateVisibleTree(this))
            {
                var lightingLevel = GlobalRules.ConsiderValueRule <LightingLevel>("light level", item);
                if (lightingLevel > Light)
                {
                    Light = lightingLevel;
                }
            }

            if (AmbientLighting > Light)
            {
                Light = AmbientLighting;
            }
        }