Skip to main content

ForgedPoint

A class in Root.Township, Alta.Blacksmithing.

One point on a piece of forged metal that fills as it is hammered while hot. Synced and saved as a child of the forged item, and drives its shape colouring.

Constructors​

MemberWhat it is
ForgedPoint()Creates a ForgedPoint with default values.

Fields​

7 private and internal fields
MemberWhat it is
private float completeAreaToThicknessMultiplierHeat conductivity multiplier when fully forged.
private MetalHeatPoint heatPointBacking field for HeatPoint.
private float incompleteAreaToThicknessMultiplierHeat conductivity multiplier when not forged at all.
private bool isChangedSyncLastSyncTrue when progress changed since the last sync.
private bool isFinishedTrue once progress reaches 1, so it syncs as finished.
private float progressBacking field for Progress.
private float progressMultiplierHow much hammer damage adds to progress, also scaled by the metal's glow.

Properties​

MemberWhat it is
NetworkEntity Entity { get; set; }The forged item's entity.
float Glow { get; }How hot the point is, from its heat point. Hammering scales with it.
MetalHeatPoint HeatPoint { get; }The MetalHeatPoint on the same object.
float Progress { get; set; }How forged the point is, from 0 to 1. Also changes the heat point's conductivity.

Events​

MemberWhat it is
event Action<ForgedPoint> ChangedRaised when progress changes.

Methods​

MemberWhat it is
void CopyFrom(ForgedPoint other)Copies another point's progress.
void Initialize(ChildSyncableCollectionBase<ForgedPoint> collection)Does nothing.
void InitializeAsServer(SpawnData spawnData)Does nothing.
bool IsEqual(ForgedPoint other)True if both points have the same progress.
bool IsNeedingSync()True if progress changed since the last sync.
void Sync(IPlayer player, Stream stream)Writes or reads progress, as a finished flag or a 0 to 1 value. Remote clients apply it.
void TakeDamage(float damage)Server: adds damage times the multiplier times the glow. 0.99 or more counts as finished.
1 private and internal method
MemberWhat it is
private void OnChanged()Marks the point for sync, updates the heat point's thickness conductivity from progress and fires Changed.

Used in​

Members of other types that take, return or hold a ForgedPoint: