Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Systems.BlockTransfer.PressureTransferSystem Class Reference
Inheritance diagram for essentials.Systems.BlockTransfer.PressureTransferSystem:
essentials.Systems.BlockTransfer.AbstractBlockTransfer essentials.Systems.BlockTransfer.ITransferSystem essentials.Systems.BlockTransfer.IReadonlyTransferSystem

Public Member Functions

 PressureTransferSystem (float max=5f, float speed=0.25f)
- Public Member Functions inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
void AddPressure (Vector3i pt, float amt)
 Add pressure to a given point More...
- Public Member Functions inherited from essentials.Systems.BlockTransfer.IReadonlyTransferSystem
bool Has (Vector3i pt)

Protected Member Functions

sealed override float GetTransferCoefficient (Vector3i pt)
 Determines whether this instance can transfer to the specified block. More...
virtual float GetBlockCoefficient (IBlock block)
- Protected Member Functions inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
 AbstractBlockTransfer (float createThreshold, float removalThreshold, float maxPressure, float speed)
bool CanTransferTo (Vector3i pt)

Additional Inherited Members

- Properties inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
IEnumerable< Vector3iMembers [get]
 Return all coordinates of points within our domain More...
int BlockCount [get]
 Gets the number of blocks within the system More...
int QueueCount [get]
 Gets the number of blocks that need to be simulated on for this iteration More...
float AveragePressure [get]
 Gets the average of all member's pressure More...
float MaxPressure [get]
 Gets the max pressure value throughout the system More...
float MinPressure [get]
 Gets the minimum pressure value throughout the system More...
bool Sealed [get]
 A system is sealed if the pressure is uniform throughout the system, with minimal variation More...
float this[] Neighbors [get]
 Gets or sets the pressure value at a given point More...
- Properties inherited from essentials.Systems.BlockTransfer.IReadonlyTransferSystem
int BlockCount [get]
float AveragePressure [get]
float MaxPressure [get]
float MinPressure [get]
bool Sealed [get]

Constructor & Destructor Documentation

essentials.Systems.BlockTransfer.PressureTransferSystem.PressureTransferSystem ( float  max = 5f,
float  speed = 0.25f 
15  :base(0.01f, 0.005f, max, speed)
16  {
17  this.InjectDependencies();
18  }

Member Function Documentation

virtual float essentials.Systems.BlockTransfer.PressureTransferSystem.GetBlockCoefficient ( IBlock  block)
29  {
30  if (block.Solid)
31  return 0f;
32  /*if (block.RenderMode == BlockRenderMode.SolidMesh)
33  return 0.5f;*/
34  if (block.MaterialType == MaterialType.Organic || block.MaterialType == MaterialType.Mineral)
35  return 0.1f;
36  return 1f;
37  }
The best-estimated material type of a block
Definition: MaterialType.cs:8
bool Solid
Is the block solid, that is, does it have collision
Definition: IBlock.cs:188
MaterialType MaterialType
Gets the type of the material.
Definition: IBlock.cs:445
sealed override float essentials.Systems.BlockTransfer.PressureTransferSystem.GetTransferCoefficient ( Vector3i  pt)

Determines whether this instance can transfer to the specified block.

A number, between 0 and 1, that represents how conductive the block can be. 0 means non-conductive
ptThe point

Attribute: pt


Implements essentials.Systems.BlockTransfer.AbstractBlockTransfer.

21  {
22  var block = _world[pt];
23  if (!block.Generated)
24  return 0f; //Block isn't generated yet, so let's just say it can't transmit
25  return GetBlockCoefficient(block.Block);
26  }
virtual float GetBlockCoefficient(IBlock block)
Definition: PressureTransferSystem.cs:28

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