Inherits: Resource
A resource type holding a set of inventory item prototypes in JSON format.
json_data: String
- JSON string containing item prototypes.
parse(json: String)
- Parses the given json string and generates a newprototypes
dictionary.add_prototype(id: String) -> void
- Adds a prototype with the given ID.remove_prototype(id: String) -> void
- Removes the prototype with the given ID.duplicate_prototype(id: String) -> void
- Duplicates the prototype with the given ID.rename_prototype(id: String, new_id: String) -> void
- Renames the prototype with the given ID to a new ID.get_prototype(id: String) -> Dictionary
- Returns the prototype with the given ID.has_prototype(id: String) -> bool
- Checks if a prototype with the given ID exists.set_prototype_property(id: String, property_name: String, value) -> void
- Sets the property with the given value for the prototype with the given ID.get_prototype_property(id: String, property_name: String, default_value)
- Returns the value of the property with the given name from the prototype with the given ID. In case the value can not be found, the default value is returned.prototype_has_property(id: String, property_name: String) -> bool
- Checks if the given item prototype has the given property.