Beispiel #1
0
        public void AddModInfo(SRModInfo info)
        {
            var newobj = Instantiate(infoButtonPrefab);

            newobj.GetComponent <Button>().onClick.AddListener(() => OnModSelect(info));
            newobj.transform.GetChild(0).GetComponent <Text>().text = info.Name;
            newobj.transform.GetChild(1).GetComponent <Text>().text = $"Version: {info.Version}";
            newobj.transform.SetParent(modScrollbarContent.transform, false);
        }
Beispiel #2
0
        public override void PreLoad()
        {
            SlimeTraitRegistry.Register(new DietTraitProcessor(SRModInfo.GetCurrentInfo().Id, "diet"));
            SlimeTraitRegistry.Register(new TemperamentTraitProcessor(SRModInfo.GetCurrentInfo().Id, "temperament"));

            SRCallbacks.OnActorSpawn     += SRCallbacks_OnActorSpawn;
            SRCallbacks.OnSaveGameLoaded += (s) => s.Player.AddComponent <GenomeViewer>();
            SaveRegistry.RegisterDataParticipant <GenomeHolder>();
            SaveRegistry.RegisterDataParticipant <SlimeGeneticsHandler>();

            BindingRegistry.RegisterActions(typeof(ModActions));
            TranslationPatcher.AddUITranslation("key.probegenetics", "Probe Genetic Data");

            GeneticUI.SetupGeneticUI();
        }
Beispiel #3
0
        public void OnModSelect(SRModInfo info)
        {
            modNamePanelText.text = info.Name;
            authorNameText.gameObject.SetActive(false);
            descriptionText.gameObject.SetActive(false);
            if (info.Author != null)
            {
                authorNameText.text = "Author: " + info.Author;
                authorNameText.gameObject.SetActive(true);
            }

            if (info.Description != null)
            {
                descriptionText.text = "Description: " + info.Description;
                descriptionText.gameObject.SetActive(true);
            }
        }
Beispiel #4
0
 public void OnModSelect(SRModInfo info)
 {
     modNamePanelText.text = info.Name;
 }