public static void RegisterJobs()
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName    = GameLoader.NAMESPACE + ".Conductor",
                maskColor1 = new Color32(245, 123, 66, 255),
                Type       = NPCTypeID.GetID(GameLoader.NAMESPACE + ".Conductor")
            });

            ServerManager.BlockEntityCallbacks.RegisterEntityManager(new BlockJobManager <CraftingJobInstance>(new CraftingJobSettings(GameLoader.NAMESPACE + ".TrainStation", GameLoader.NAMESPACE + ".Conductor")));
        }
Esempio n. 2
0
        public static void RegisterJobs()
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName    = JOB_NAME,
                maskColor1 = new Color32(101, 121, 123, 255),
                Type       = NPCTypeID.GetID(JOB_NAME)
            });

            ServerManager.BlockEntityCallbacks.RegisterEntityManager(new BlockJobManager <CraftingJobInstance>(new CraftingJobSettings(JOB_ITEM_KEY, JOB_NAME)));
        }
Esempio n. 3
0
        static MachinistSettingsDay()
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName           = MachinistDay.JOB_NAME,
                maskColor1        = new Color32(242, 132, 29, 255),
                Type              = NPCTypeID.GetID(MachinistDay.JOB_NAME),
                inventoryCapacity = 1f
            });

            _Settings = NPCType.GetByKeyNameOrDefault(MachinistDay.JOB_NAME);
        }
Esempio n. 4
0
        static MachinistSettingsNight()
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName           = MachinistNight.JOB_NAME,
                maskColor1        = new Color32(127, 74, 24, 255),
                Type              = NPCTypeID.GetID(MachinistNight.JOB_NAME),
                inventoryCapacity = 1f
            });

            _Settings = NPCType.GetByKeyNameOrDefault(MachinistNight.JOB_NAME);
        }
Esempio n. 5
0
        static ArtificerSettings()
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName           = Artificer.JOB_NAME,
                maskColor1        = new Color32(81, 55, 102, 255),
                Type              = NPCTypeID.GetID(Artificer.JOB_NAME),
                inventoryCapacity = 1f
            });

            _Settings = NPCType.GetByKeyNameOrDefault(Artificer.JOB_NAME);
        }
Esempio n. 6
0
        public WoodWorker() : base(Name, Name)
        {
            NPCType.AddSettings(new NPCTypeStandardSettings
            {
                keyName           = Name,
                maskColor1        = new UnityEngine.Color32(51, 51, 77, 255),
                Type              = NPCTypeID.GetID(Name),
                inventoryCapacity = 500f
            });

            NPCType = NPCType.GetByKeyNameOrDefault(Name);
        }
        public void AfterItemTypesDefined()
        {
            var defaults = new NPCTypeStandardSettings();

            foreach (var jobExtender in LoadedAssembalies)
            {
                if (Activator.CreateInstance(jobExtender) is INPCTypeStandardSettings settings &&
                    !string.IsNullOrEmpty(settings.keyName))
                {
                    NPCType.AddSettings(new NPCTypeStandardSettings
                    {
                        keyName           = settings.keyName,
                        maskColor1        = settings.maskColor1,
                        maskColor0        = settings.maskColor0,
                        Type              = NPCTypeID.GetID(settings.keyName),
                        inventoryCapacity = settings.inventoryCapacity == 0 ? defaults.inventoryCapacity : settings.inventoryCapacity,
                        movementSpeed     = settings.movementSpeed == 0 ? defaults.movementSpeed : settings.movementSpeed,
                    });
                }
            }
        }