Problem
CombatBehaviour.DefaultWeaponAssetPath accepts raw string resource paths for NPC default weapons. Developers can accidentally guess paths such as Weapon/Name instead of using real base-game equippable resource names.
The safer APIs already exist in S1API/Entities/Behaviour/CombatBehaviour.cs:
SetDefaultWeapon(Equippable)
SetDefaultWeapon(EquippableBuilder)
Desired behavior
Make direct DefaultWeaponAssetPath usage safer by doing one of the following:
- Validate that non-empty string values resolve to a real loadable weapon/equippable resource in the base game.
- Warn developers when they set
DefaultWeaponAssetPath directly, pointing them to the type-safe SetDefaultWeapon(Equippable) and SetDefaultWeapon(EquippableBuilder) overloads for reliability.
Acceptance criteria
- Invalid guessed weapon paths are surfaced clearly instead of failing silently or leaving developers guessing.
- The warning/error message points developers toward the type-safe default-weapon APIs.
- Existing valid weapon-path behavior remains compatible unless intentionally deprecated.
Problem
CombatBehaviour.DefaultWeaponAssetPathaccepts raw string resource paths for NPC default weapons. Developers can accidentally guess paths such asWeapon/Nameinstead of using real base-game equippable resource names.The safer APIs already exist in
S1API/Entities/Behaviour/CombatBehaviour.cs:SetDefaultWeapon(Equippable)SetDefaultWeapon(EquippableBuilder)Desired behavior
Make direct
DefaultWeaponAssetPathusage safer by doing one of the following:DefaultWeaponAssetPathdirectly, pointing them to the type-safeSetDefaultWeapon(Equippable)andSetDefaultWeapon(EquippableBuilder)overloads for reliability.Acceptance criteria