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

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