Item.gd 367 B

12345678910111213141516171819
  1. extends Object
  2. class_name Item
  3. var cellID : int = DB.UnknownHash
  4. var cellCustomfield : String = ""
  5. var count : int = 0
  6. func _init(_cell : ItemCell, _count : int = 1):
  7. cellID = _cell.id
  8. cellCustomfield = _cell.customfield
  9. count = _count
  10. func Export() -> Dictionary:
  11. return {
  12. "item_id": cellID,
  13. "customfield": cellCustomfield,
  14. "count": count,
  15. }