An abstract class in Root.Township, Alta.Static.
One cached world-generation step (spawn, spline, forest core or river core) that can be saved to a stream and replayed later. Subclasses are SpawnInstruction, SplineInstruction, ForestGCoreInstruction and RiverGCoreInstruction.
Constructors
Fields
| Member | What it is |
|---|
protected static Logger logger | NLog logger shared by instructions. |
3 private and internal fields
Methods
| Member | What it is |
|---|
static IInstructionResult Execute(StreamReader stream, object context) | Runs the instruction. The static overload reads type and data from a stream and runs it without keeping the object. |
abstract IInstructionResult Execute(object context) | Runs the instruction. The static overload reads type and data from a stream and runs it without keeping the object. |
static Instruction Reconstruct(Stream stream) | Reads a type id from a stream and builds that instruction from the data that follows. |
void Save(Stream stream) | Writes the instruction's type id, then its own data. |
IInstructionResult SerializeAndExecute(Stream stream, object context) | Reads the instruction's fields from a stream and runs it straight away. |
protected abstract void SerializeInternal(Stream stream) | Reads or writes the instruction's own fields. |
Used in
Members of other types that take, return or hold a Instruction: