Exemple #1
0
        public static void RegisterQuicksilverSlimes()
        {
            Identifiable.Id slimeId = Identifiable.Id.QUICKSILVER_SLIME;

            PlortRegistry.RegisterPlort(slimeId, 200f * 5, 100f);

            DroneRegistry.RegisterBasicTarget(slimeId); //And make so that the drones can grab slimes

            Console.Log("Slime:" + slimeId + " registred perfectly");
        }
Exemple #2
0
        public static void RegisterLuckySlimes()
        {
            Identifiable.Id slimeId = Identifiable.Id.LUCKY_SLIME;

            PlortRegistry.RegisterPlort(slimeId, 250f * 20, 125f);

            DroneRegistry.RegisterBasicTarget(slimeId); //And make so that the drones can grab slimes

            Console.Log("Slime:" + slimeId + " registred perfectly");
        }
        /// <summary>Registers the item into it's registry</summary>
        public override IdentifiableItem Register()
        {
            base.Register();

            if (CanBeSold)
            {
                PlortRegistry.RegisterPlort(ID, MarketValue, MarketSaturationValue);
            }

            return(this);
        }
Exemple #4
0
        public static void RegisterFireSlimes()
        {
            Identifiable.Id id      = Identifiable.Id.FIRE_PLORT;
            Identifiable.Id slimeId = Identifiable.Id.FIRE_SLIME;

            EconomyDirector.ValueMap valueMap = GetValueMap(id);

            PlortRegistry.RegisterPlort(slimeId, valueMap.value * 4, valueMap.fullSaturation);

            DroneRegistry.RegisterBasicTarget(slimeId); //And make so that the drones can grab slimes

            Console.Log("Slime:" + slimeId + " registred perfectly");
        }
Exemple #5
0
        public override void Load()
        {
            Console.Log("Loading SlimesAndMarket");

            try                                                               //Try the code there, if some error arises then it calls the "catch" function
            {
                foreach (Identifiable.Id slime in ExtraSlimes.VANILLA_SLIMES) //For each slime int he slime class
                {
                    Console.Log("Printing Slime: " + slime.ToString());

                    EconomyDirector.ValueMap valueMap = Extension.GetValueMap(slime);

                    //If the slime is a puddle/fire/quicksilver slime then add the plort id, else just add the id of the slime (true/false argumeter tells the programm if it's a puddle/fire/quicksilver slime or regular slimes, except tarrs and lucky slimes)
                    //We are getting the informations of the plort of the correct slime (to make normal prices)
                    //But if we find nothing then return null
                    Console.Log("   valueMap not found...");
                    if (valueMap == null)
                    {
                        continue;
                    }
                    Console.Log("   ...or maybe yes? Now registering slimes");

                    PlortRegistry.RegisterPlort(slime, valueMap.value * 4, valueMap.fullSaturation); //Else, if the slime is a regular slime, then register the slime (make so that you can sell it) for 4 times the original price more.

                    DroneRegistry.RegisterBasicTarget(slime);                                        //And make so that the drones can grab slimes

                    Console.Log("Slime: " + slime + " registred perfectly");
                }
            }
            catch (Exception e)                                                     //But if an error was found
            {
                Console.Log("Slimes and Market mod error (Vanilla): " + e.Message); //Then log the error into the SRML.log file
            }

            ExtraSlimes.RegisterSaberSlimes();
            ExtraSlimes.RegisterGoldSlimes();
            ExtraSlimes.RegisterFireSlimes();
            ExtraSlimes.RegisterPuddleSlimes();
            ExtraSlimes.RegisterQuicksilverSlimes();
            ExtraSlimes.RegisterLuckySlimes();
        }