Пример #1
0
        /// <summary>
        ///     Main mod class constructor. Sets up the static instance.
        /// </summary>
        public PrepareLanding()
        {
            Logger.Message("Enter constructor.");
            if (Instance == null)
            {
                Instance = this;
            }

            // initialize events
            EventHandler = new RimWorldEventHandler();

            // global game options
            GameOptions = new GameOptions(Settings, EventHandler);

            // instance used to keep track of (or override) game ticks.
            GameTicks = new GameTicks();

            // Holds various mod options (shown on the 'option' tab on the GUI).
            var filterOptions = new FilterOptions();

            GameData = new GameData.GameData(filterOptions);

            TileFilter = new WorldTileFilter(GameData.UserData);

            // instantiate the tile highlighter
            TileHighlighter = new TileHighlighter(filterOptions);

            Logger.Message("Exit constructor.");
        }
Пример #2
0
        public GameOptions(ModSettingsPack settingsPack, RimWorldEventHandler eventHandler)
        {
            _settingsPack = settingsPack;

            eventHandler.DefsLoaded += OnDefLoaded;
        }