feat: add combat, wild wolves, factions, and tribe war motivation
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
class_name ItemDefinition
|
||||
extends Resource
|
||||
|
||||
@export var item_id: StringName
|
||||
@export var display_name: String
|
||||
@export var category: StringName = SimulationIds.ITEM_CATEGORY_WEAPON
|
||||
@export var equip_slot: StringName = SimulationIds.EQUIP_SLOT_HAND
|
||||
@export_range(0.0, 1000.0, 0.1) var damage := 0.0
|
||||
@export_range(0.0, 50.0, 0.1) var reach := 1.5
|
||||
@export_range(0.0, 5.0, 0.05) var attack_cooldown := 0.6
|
||||
|
||||
|
||||
func validate() -> Array[String]:
|
||||
var errors: Array[String] = []
|
||||
if item_id.is_empty():
|
||||
errors.append("item_id is empty")
|
||||
if display_name.is_empty():
|
||||
errors.append("display_name is empty for '%s'" % item_id)
|
||||
if damage <= 0.0:
|
||||
errors.append("damage must be positive for '%s'" % item_id)
|
||||
return errors
|
||||
|
||||
|
||||
func is_weapon() -> bool:
|
||||
return category == SimulationIds.ITEM_CATEGORY_WEAPON
|
||||
Reference in New Issue
Block a user