Anvil
Anvil.API.CampaignVariableObject< T > Class Template Reference
+ Inheritance diagram for Anvil.API.CampaignVariableObject< T >:
+ Collaboration diagram for Anvil.API.CampaignVariableObject< T >:

Public Member Functions

T? GetValue (Location location)
 Gets the object from the campaign database, and spawns it at the specified location. More...
 
T? GetValue (NwGameObject owner)
 Gets the object from the campaign database, and attempts to spawn it in the inventory of the specified object.
If the owner cannot carry the object, it will be spawned at the owner's current location. More...
 
- Public Member Functions inherited from Anvil.API.CampaignVariable< T >
abstract void Delete ()
 Deletes the value of this variable. More...
 
override void Delete ()
 
bool Equals (CampaignVariable< T >? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 

Properties

override T? Value [get, set]
 
- Properties inherited from Anvil.API.CampaignVariable< T >
string Campaign = null! [get]
 
string Name = null! [get]
 
NwPlayerPlayer [get]
 
abstract T Value [get, set]
 Gets or sets the current value of this variable. Returns the default value of T if unassigned (null or 0). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Anvil.API.CampaignVariable< T >
static implicit operator T (CampaignVariable< T > value)
 Implicit conversion of the value of this variable. More...
 
static bool operator!= (CampaignVariable< T >? left, CampaignVariable< T >? right)
 
static bool operator== (CampaignVariable< T >? left, CampaignVariable< T >? right)
 

Member Function Documentation

◆ GetValue() [1/2]

T? Anvil.API.CampaignVariableObject< T >.GetValue ( Location  location)
inline

Gets the object from the campaign database, and spawns it at the specified location.

Parameters
locationThe location for the object to be spawned at.
Returns
The created object.

◆ GetValue() [2/2]

T? Anvil.API.CampaignVariableObject< T >.GetValue ( NwGameObject  owner)
inline

Gets the object from the campaign database, and attempts to spawn it in the inventory of the specified object.
If the owner cannot carry the object, it will be spawned at the owner's current location.

Parameters
ownerThe owner who should receive the spawned object.
Returns
The created object.

The documentation for this class was generated from the following file: