Class WeaponAsset
- Namespace
- SurvivorsMaker.Data
- Assembly
- SurvivorsMaker.Data.dll
Inspector-authored weapon data converted to a cached runtime definition.
[CreateAssetMenu(menuName = "Survivor Roguelite Maker/Content/Weapon", fileName = "Weapon")]
public sealed class WeaponAsset : ContentDefinitionAsset<WeaponItemDef>, IContentTextSource
- Inheritance
-
ObjectScriptableObjectWeaponAsset
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Constructors
WeaponAsset()
public WeaponAsset()
Fields
Acquisition
Channel eligibility and ownership limits; used only when Use Acquisition is on.
[Tooltip("Channel eligibility and ownership limits; used only when Use Acquisition is on.")]
public AcquisitionPolicy Acquisition
Field Value
Available
Allow this definition in normal selection pools; explicit authored references remain separate.
[Tooltip("Allow this definition in normal selection pools; explicit authored references remain separate.")]
public bool Available
Field Value
BasePrice
Nonnegative currency price before wave and character price modifiers.
[Tooltip("Nonnegative currency price before wave and character price modifiers.")]
public int BasePrice
Field Value
Combat
Weapon combat definition; times are ticks, distances are world units, spread is radians.
[Tooltip("Weapon combat definition; times are ticks, distances are world units, spread is radians.")]
public WeaponDef Combat
Field Value
Description
Plain text description shown with the name; empty = no description.
[Tooltip("Plain description shown with the name.")]
[TextArea(2, 5)]
public string Description
Field Value
DisplayName
Display label; empty uses a name derived from the content id.
[Tooltip("Name shown in menus, cards, alerts and records. Empty = derived from the Id.")]
public string DisplayName
Field Value
Family
Stable weapon family id used by family duplicate limits.
[Tooltip("Stable weapon family id used by family duplicate limits.")]
public string Family
Field Value
Id
Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.
[Tooltip("Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.")]
public string Id
Field Value
NextTier
Result of merging two copies of this weapon. Empty = terminal tier; cycles are invalid.
[Tooltip("Result of merging two copies of this weapon. Empty = terminal tier; cycles are invalid.")]
public WeaponAsset NextTier
Field Value
PoolGroups
Case-sensitive pool group ids used by group bans and duplicate limits.
[Tooltip("Case-sensitive pool group ids used by group bans and duplicate limits.")]
public List<string> PoolGroups
Field Value
PoolKind
Weapon pool classification; Automatic derives it from the combat kind.
[Tooltip("Weapon pool classification; Automatic derives it from the combat kind.")]
public WeaponPoolKind PoolKind
Field Value
Sets
Set memberships granted by this weapon. Empty = no set contributions.
[Tooltip("Set memberships granted by this weapon. Empty = no set contributions.")]
public List<SetAsset> Sets
Field Value
Tags
Case-sensitive candidate tags for weighting, filtering and build synergy counts.
[Tooltip("Case-sensitive candidate tags for weighting, filtering and build synergy counts.")]
public List<string> Tags
Field Value
TextKey
Optional localization key base; empty uses the content kind and id.
[Tooltip("Optional localization key base: \"<key>.name\" and \"<key>.description\". Empty = \"weapon.<Id>\".")]
public string TextKey
Field Value
Tier
Zero-based offer tier; must be nonnegative. Tier 0 is the lowest tier.
[Tooltip("Zero-based offer tier; must be nonnegative. Tier 0 is the lowest tier.")]
public int Tier
Field Value
UseAcquisition
Copy the acquisition policy. Off retains the default channel eligibility and limits.
[Tooltip("Copy the acquisition policy. Off retains the default channel eligibility and limits.")]
public bool UseAcquisition
Field Value
Methods
Populate(WeaponItemDef)
Fills the already-cached definition shell; resolve asset references through their conversion caches.
protected override void Populate(WeaponItemDef def)
Parameters
defWeaponItemDef
ToWeaponDef()
The combat definition shares this asset's Id and is cached with its shop definition.
public WeaponDef ToWeaponDef()
Returns
ToWeaponItemDef()
Returns the cached runtime definition for this asset revision; repeated references preserve object identity.
public WeaponItemDef ToWeaponItemDef()
Returns
Validate()
Returns authoring problems without repairing or changing serialized fields; an empty list means valid.
public override List<string> Validate()