Better pytk sync.

This commit is contained in:
JoshuaNavarro 2019-08-26 21:46:36 -07:00
parent 94d1595efa
commit 9950a6d0c0
2 changed files with 11 additions and 10 deletions

View File

@ -113,6 +113,11 @@ namespace Revitalize.Framework.Objects
{
return new BasicItemInformation(this.name, this.id,this.description, this.categoryName, this.categoryColor, this.edibility, this.fragility, this.isLamp, this.price, this.canBeSetOutdoors, this.canBeSetIndoors, this.animationManager.getTexture(), this.animationManager, this.drawColor, this.ignoreBoundingBox, this.inventory.Copy(), this.lightManager.Copy());
}
public bool requiresSyncUpdate()
{
return true;
}
}
}

View File

@ -20,7 +20,7 @@ namespace Revitalize.Framework.Objects
public class CustomObject : PySObject
{
public string text
public virtual string text
{
get
{
@ -154,6 +154,7 @@ namespace Revitalize.Framework.Objects
}
set
{
if (string.IsNullOrEmpty(value)) return;
this.info = (BasicItemInformation)Revitalize.ModCore.Serializer.DeserializeFromJSONString(value, typeof(BasicItemInformation));
}
}
@ -208,7 +209,7 @@ namespace Revitalize.Framework.Objects
//this.initNetFields();
this.InitNetFields();
this.updateInfo();
this.Price = info.price;
this.Price = this.info.price;
//if (this.info.ignoreBoundingBox)
// this.boundingBox.Value = new Rectangle(int.MinValue, int.MinValue, 0, 0);
}
@ -594,14 +595,9 @@ namespace Revitalize.Framework.Objects
return;
}
if (string.IsNullOrEmpty(this.ItemInfo))
{
this.ItemInfo = this.text;
}
else
{
this.text = this.ItemInfo;
}
this.ItemInfo = this.text;
this.text = this.ItemInfo;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~//