public override void updateInfo()
        {
            if (this.info == null || this.containerObject == null)
            {
                this.ItemInfo = this.text;

                //ModCore.log("Updated item info!");
                return;
            }

            if (this.requiresUpdate())
            {
                //this.ItemInfo = this.text;
                this.text = this.ItemInfo;
                this.info.cleanAfterUpdate();
                MultiplayerUtilities.RequestUpdateSync(this.guid);
            }
        }
Пример #2
0
        public override void updateInfo()
        {
            //this.recreateComponents();
            if (this.info == null)
            {
                this.ItemInfo = this.text;
                //ModCore.log("Updated item info for container!");
                return;
            }
            if (this.objects != null)
            {
                if (this.childrenGuids != null)
                {
                    if (this.objects.Count == 0 || this.objects.Count != this.childrenGuids.Count)
                    {
                        this.ItemInfo = this.text;
                        //ModCore.log("Updated item info for container!");
                        return;
                    }
                }
                else
                {
                    if (this.objects.Count == 0)
                    {
                        this.ItemInfo = this.text;
                        //ModCore.log("Updated item info for container!");
                        return;
                    }
                }
            }

            if (this.requiresUpdate())
            {
                //this.ItemInfo = this.text;
                this.text = this.ItemInfo;
                this.info.cleanAfterUpdate();
                MultiplayerUtilities.RequestUpdateSync(this.guid);
            }
        }