Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase Class Referenceabstract

Base class for an item that modifies the world More...

Inheritance diagram for essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase:
essentials.action.ItemFramework.Interactive.Bases.DeterioratingItemBase essentials.action.ItemFramework.Interactive.Bases.UseableItemBase essentials.action.ItemFramework.ItemBase essentials.action.ItemFramework.Interactive.IUseableItem essentials.action.ItemFramework.Interactive.IEquipableItem pluginbase.Objects.Syncable.SyncableObject essentials.action.ItemFramework.IItem essentials.action.ItemFramework.IItem essentials.action.ItemFramework.IItem pluginbase.Objects.Syncable.SyncableBase< T > pluginbase.Objects.Syncable.INetSyncable pluginbase.Objects.Syncable.INetSyncable pluginbase.Objects.Syncable.INetSyncable pluginbase.Objects.Syncable.INetSyncable pluginbase.Objects.Syncable.INetWatcher pluginbase.Objects.Syncable.INetWatcher pluginbase.Objects.Syncable.INetWatcher pluginbase.Objects.Syncable.INetWatcher essentials.action.ItemFramework.Interactive.Bases.Simple.Shovel

Public Member Functions

 WorldModifyingItemBase ()
 
- Public Member Functions inherited from essentials.action.ItemFramework.Interactive.Bases.DeterioratingItemBase
 DeterioratingItemBase ()
 
- Public Member Functions inherited from essentials.action.ItemFramework.Interactive.Bases.UseableItemBase
 UseableItemBase ()
 
- Public Member Functions inherited from essentials.action.ItemFramework.ItemBase
 ItemBase ()
 
override string ToString ()
 
- Public Member Functions inherited from pluginbase.Objects.Syncable.SyncableObject
 SyncableObject ()
 Initializes a new instance of the pluginbase.Objects.Syncable.SyncableObject class. More...
 

Protected Member Functions

override ICollection
< IItemDisplayComponent
CreateDisplayComponents ()
 Instantiate display components durring an equip More...
 
virtual bool BlockSelectPredicate (IWorldReadonlyBlock block)
 The predicate which choses whether or not a block can be operated on in the world More...
 
override ItemUseReturn UseServerDeteriorate (ItemAction action, ItemUseContext itemUseContext)
 
abstract ItemUseReturn UseServer (ItemAction action, Vector3i worldCoord)
 
- Protected Member Functions inherited from essentials.action.ItemFramework.Interactive.Bases.DeterioratingItemBase
sealed override ItemUseReturn UseServer (ItemAction action, ItemUseContext itemUseContext)
 
- Protected Member Functions inherited from essentials.action.ItemFramework.Interactive.Bases.UseableItemBase
virtual void Equip ()
 Called when an item is equipped More...
 
virtual void Unequip ()
 Called when an item is unequipped More...
 
virtual void UpdateDisplay (Vector3d position, Vector3d direction)
 While the item is equipped, this will be called regularly to update the position and direction the using player is facing More...
 
- Protected Member Functions inherited from essentials.action.ItemFramework.ItemBase
virtual Bitmap LoadIcon ()
 Loads the bitmap representing the image of the item More...
 
virtual IReadonlyModel LoadModel ()
 Loads the mesh representing the model in-world More...
 
- Protected Member Functions inherited from pluginbase.Objects.Syncable.SyncableObject
sealed override void ResetWatch ()
 Reset variables watched status More...
 
sealed override void TouchRecurse ()
 Touch self, including all children of this syncable object More...
 
sealed override void EncodeTo (BinaryWriter writer, EncodeContext context)
 Encode changes to binary data More...
 
sealed override void DecodeFrom (BinaryReader reader, DecodeContext context)
 Decode changes from binary data More...
 
sealed override void Persist (IPersistObject obj)
 Build up a persistant object for this syncable, including all sync children and persist objects More...
 
sealed override void Load (IReadPersistObject obj)
 Load a given persistent object back into this instance More...
 
- Protected Member Functions inherited from pluginbase.Objects.Syncable.SyncableBase< T >
void Touch ()
 Touch the instance, notifying something has changed More...
 
virtual void OnChanged ()
 Raises the changed event. More...
 

Properties

virtual int Reach [get]
 The reach of the modifier More...
 
virtual int LookAhead [get]
 How far the modifying query looks-ahead of the user More...
 
- Properties inherited from essentials.action.ItemFramework.Interactive.Bases.DeterioratingItemBase
float Quality [get, protected set]
 
override string IconLabel [get]
 
virtual float DeteriorationPerUse [get]
 
bool DestroyWhenDeteriorated [get]
 
float DeteriorationUseThreshold [get]
 
- Properties inherited from essentials.action.ItemFramework.Interactive.Bases.UseableItemBase
bool Equipped [get]
 
- Properties inherited from essentials.action.ItemFramework.ItemBase
abstract string Icon [get]
 Gets the path to the icon More...
 
abstract string Name [get]
 Gets the name of the item More...
 
virtual string IconLabel [get]
 
virtual string Description [get]
 
virtual string MeshResource [get]
 
virtual string ModelImage [get]
 
virtual int MeshalizerResolution [get]
 
virtual float MeshalizerDepth [get]
 
virtual float ModelSize [get]
 
virtual ItemRenderMode ItemRenderMode [get]
 
virtual string ModelCacheKey [get]
 
virtual bool ShowNameplate [get]
 
virtual bool Bounce [get]
 
virtual bool AutoDespawn [get]
 
virtual TimeSpan AutoDespawnDelay [get]
 
virtual bool HasGravity [get]
 
virtual double ViewDistance [get]
 
- Properties inherited from pluginbase.Objects.Syncable.SyncableObject
virtual ushort NetOwnerId [get]
 Gets the network owner of this object (user id) More...
 
- Properties inherited from pluginbase.Objects.Syncable.INetSyncable
INetWatcher Watcher [get, set]
 Who is watching (who to inform of a change) More...
 
bool Modified [get]
 Gets a value indicating whether this pluginbase.Objects.Syncable.INetSyncable is modified. More...
 
- Properties inherited from essentials.action.ItemFramework.IItem
string Name [get]
 The human-readable name of the item More...
 
string IconLabel [get]
 Gets the wording that can appear over a icon More...
 
bool ShowNameplate [get]
 Whether or not to show the nameplate above the item More...
 
bool Bounce [get]
 Whether or not the item should bounce in the world More...
 
bool AutoDespawn [get]
 Whether or not the item should be subject to auto-despawn More...
 
TimeSpan AutoDespawnDelay [get]
 The amount of time the auto despawn will take, if set (Overrides global default) More...
 
bool HasGravity [get]
 Whether or not gravity affects the item More...
 
double ViewDistance [get]
 The distance from which the dropped item can be viewed More...
 

Additional Inherited Members

- Protected Attributes inherited from essentials.action.ItemFramework.ItemBase
readonly IModelFactory ModelFactory
 
readonly IPluginLogger Logger
 
- Events inherited from pluginbase.Objects.Syncable.SyncableBase< T >
Action< T > Changed
 Event triggered when any change occurs on this object, either locally or over the network More...
 
Action< T > NetUpdate
 Event triggered when a change occurs resulting from a change over the network More...
 
Action< T > Touched
 Event occurs only when an object is first touched. Usually the first instance of a local-change More...
 

Detailed Description

Base class for an item that modifies the world

Constructor & Destructor Documentation

essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.WorldModifyingItemBase ( )
21  {
22  this.InjectDependencies();
23  }

Member Function Documentation

virtual bool essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.BlockSelectPredicate ( IWorldReadonlyBlock  block)
protectedvirtual

The predicate which choses whether or not a block can be operated on in the world

Returns
true, if select predicate was blocked, false otherwise.
Parameters
blockBlock.
71  {
72  return block.Block.Solid;
73  }
IBlock Block
Block that exists here
Definition: IWorldReadonlyBlock.cs:19
override ICollection<IItemDisplayComponent> essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.CreateDisplayComponents ( )
protectedvirtual

Instantiate display components durring an equip

Returns
The display components.

Reimplemented from essentials.action.ItemFramework.Interactive.Bases.UseableItemBase.

26  {
27  var comps = base.CreateDisplayComponents();
28  comps.Add(new ItemCrosshairs());
29  comps.Add(new ItemCursor(this.GetEditPosition));
30  return comps;
31  }
Display component for item that should display a crosshair when selected
Definition: ItemCrosshairs.cs:11
Class to use as a display component for an item that needs a cursor
Definition: ItemCursor.cs:12
abstract ItemUseReturn essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.UseServer ( ItemAction  action,
Vector3i  worldCoord 
)
protectedpure virtual
override ItemUseReturn essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.UseServerDeteriorate ( ItemAction  action,
ItemUseContext  itemUseContext 
)
protectedvirtual

Implements essentials.action.ItemFramework.Interactive.Bases.DeterioratingItemBase.

76  {
77  var pos = this.GetEditPosition(itemUseContext.Position, itemUseContext.Direction);
78  if (pos.HasValue)
79  {
80  return this.UseServer(action, pos.Value);
81  }
82  return ItemUseReturn.None();
83  }
abstract ItemUseReturn UseServer(ItemAction action, Vector3i worldCoord)

Property Documentation

virtual int essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.LookAhead
getprotected

How far the modifying query looks-ahead of the user

The look ahead.

virtual int essentials.action.ItemFramework.Interactive.Bases.WorldModifyingItemBase.Reach
getprotected

The reach of the modifier

The reach.


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