/// <summary>
        /// Show visualisation of this reagent data
        /// </summary>
        /// <param name="spriteData"></param>
        private void ShowVisualisation(ContainerCustomSprite spriteData)
        {
            mainSpriteRender.sprite = spriteData.MainSprite;
            if (fillVisual && fillVisual.fillSpriteRender)
            {
                fillVisual.fillSpriteRender.gameObject.SetActive(false);
            }

            if (item)
            {
                // set custom description from data (if avaliable)
                var customDesc = spriteData.CustomDescription;
                if (!string.IsNullOrEmpty(customDesc))
                {
                    item.ServerSetArticleDescription(customDesc);
                }

                // set custom name from data (if avaliable)
                var customName = spriteData.CustomName;
                if (!string.IsNullOrEmpty(customName))
                {
                    item.ServerSetArticleName(customName);
                }
            }
        }
Esempio n. 2
0
        protected override void Start()
        {
            base.Start();

            if (DMMath.Prob(10))
            {
                itemAttributes.ServerSetArticleName("spess cube");
            }
        }
Esempio n. 3
0
    protected override void Start()
    {
        base.Start();

        if (GetProbability(10))
        {
            itemAttributes.ServerSetArticleName("spess cube");
        }
    }
Esempio n. 4
0
        public override void OnStartServer()
        {
            base.OnStartServer();
            if (!isToy)
            {
                return;
            }

            itemAttributesV2.ServerSetArticleName("Toy Facehugger");
            itemAttributesV2.ServerSetArticleDescription("Still pretty scary!");
        }
Esempio n. 5
0
    private void SyncState(EmptyFullStatus value)
    {
        spriteSync            = value;
        spriteRenderer.sprite = spriteSync == EmptyFullStatus.Empty ? EmptySprite : FullSprite;

        if (!string.IsNullOrEmpty(EmptyName) && !string.IsNullOrEmpty(FullName))
        {
            itemAttributes.ServerSetArticleName(spriteSync == EmptyFullStatus.Empty ? EmptyName : FullName);
        }

        pickupable.RefreshUISlotImage();
    }
Esempio n. 6
0
    private void RenameIDObject()
    {
        var newName = "";

        if (!RegisteredName.IsNullOrEmpty())
        {
            newName += $"{RegisteredName}'s ";
        }
        newName += "ID Card";
        if (JobType != JobType.NULL)
        {
            newName += $" ({JobType})";
        }
        itemAttributes.ServerSetArticleName(newName);
    }
Esempio n. 7
0
    private void RenameIDObject()
    {
        var newName = "";

        if (!RegisteredName.IsNullOrEmpty())
        {
            newName += $"{RegisteredName}'s ";
        }
        newName += "ID Card";

        if (jobTitle.IsNullOrEmpty() == false)
        {
            newName += $" ({jobTitle})";
        }
        else if (Occupation != null)
        {
            newName += $" ({Occupation.DisplayName})";
        }

        itemAttributes.ServerSetArticleName(newName);
    }
Esempio n. 8
0
 public void SyncPlant(string _OldPlantSyncString, string _PlantSyncString)
 {
     PlantSyncString = _PlantSyncString;
     if (!isServer)
     {
         if (DefaultPlantData.PlantDictionary.ContainsKey(PlantSyncString))
         {
             plantData = DefaultPlantData.PlantDictionary[PlantSyncString].plantData;
         }
     }
     SpriteHandler.spriteData = SpriteFunctions.SetupSingleSprite(plantData.ProduceSprite);
     SpriteHandler.PushTexture();
     if (ItemAttributesV2 == null)
     {
         ItemAttributesV2 = this.GetComponent <ItemAttributesV2>();
     }
     if (isServer && ItemAttributesV2 != null)
     {
         ItemAttributesV2.ServerSetArticleDescription(plantData.Description);
         ItemAttributesV2.ServerSetArticleName(plantData.Plantname);
     }
     this.name = plantData.Plantname;
 }