Files
boatgame/scripts/resource_definitions/weapon_def.gd
T
2026-07-07 23:04:20 +02:00

16 lines
623 B
GDScript

class_name WeaponDef
extends Resource
## Data-only description of a weapon type. Never mutated at runtime.
enum Size {ANCILLIARY, SMALL, MEDIUM, LARGE, HUGE}
enum Type {BALLISTIC, ENERGY, MISSILE, TORPEDO}
@export var display_name := "Weapon Cannon"
@export var weapon_scene: PackedScene # the mounted body — consumed by slots in Part 3
@export var ammo: AmmoDef # what it fires
@export var fire_interval := 1.5 # seconds between shots
@export var muzzle_speed_scale := 1.0 # multiplier over ammo.muzzle_speed (barrel length)
@export var size := Size.MEDIUM
@export var type := Type.BALLISTIC