Exemplo n.º 1
0
        public override void WorldLoaded()
        {
            base.WorldLoaded();

            _customRoomLabelManager =
                UtilityWorldObjectManager.GetUtilityWorldObject <CustomRoomLabelManager>();

            LabelPlacementHandler = new LabelPlacementHandler(
                _labelHolder,
                new MeshHandler(_fontHandler),
                new LabelMaker(_customRoomLabelManager),
                new RoomRoleFinder(_customRoomLabelManager)
                );

            _labelDrawer = new LabelDrawer(_labelHolder, _fontHandler);
        }
        public void RegenerateIfNeeded(CustomRoomLabelManager customRoomLabelManager)
        {
            if (_ready && _map == Find.CurrentMap)
            {
                return;
            }

            customRoomLabelManager.CleanupMissingRooms();

            _map = Find.CurrentMap;
            _labelHolder.Clear();
            _ready = true;

            RegenerateRoomLabels();
            RegenerateZoneLabels();
        }
Exemplo n.º 3
0
 public LabelMaker(CustomRoomLabelManager customRoomLabelManager)
 {
     _customRoomLabelManager   = customRoomLabelManager;
     _defaultGrowingZonePrefix = "GrowingZone".Translate();
 }
Exemplo n.º 4
0
 public RoomRoleFinder(CustomRoomLabelManager customRoomLabelManager)
 {
     _customRoomLabelManager = customRoomLabelManager;
 }