diff --git a/src/main/java/com/minecrafttas/tasmod/playback/tasfile/flavor/SerialiserFlavorBase.java b/src/main/java/com/minecrafttas/tasmod/playback/tasfile/flavor/SerialiserFlavorBase.java index 5edabd61..5d50abb8 100644 --- a/src/main/java/com/minecrafttas/tasmod/playback/tasfile/flavor/SerialiserFlavorBase.java +++ b/src/main/java/com/minecrafttas/tasmod/playback/tasfile/flavor/SerialiserFlavorBase.java @@ -29,7 +29,7 @@ import com.minecrafttas.tasmod.virtual.VirtualMouse; /** - *
The base class of a flavor. + *
The base class of a flavor * *
All serialisation and deserialisation is broken apart into functions whenever possible,
* with the intention of allowing small changes to the existing syntax.
@@ -116,6 +116,10 @@ public abstract class SerialiserFlavorBase implements Registerable {
*/
/**
+ *
+ * ##################### TASfile #################### + ** @return The very top of the header */ protected String headerStart() { @@ -123,7 +127,11 @@ protected String headerStart() { } /** - * The end of the header, used for detecting when the header stops + *
The end of the header, used for detecting when the header stops + *
+ * ################################################## + ** @return The end of the header */ protected String headerEnd() { @@ -131,17 +139,38 @@ protected String headerEnd() { } /** - *
Serialises the flavor of this file, the enabled file commands and other metadata. - *
{@link #serialiseFlavorName(List)} + *
Serialises the flavor of this file, the enabled file commands and other metadata + *
* serialiseHeader - * ├── {@link #headerStart()} // The start of the header - * ├── {@link #serialiseFlavorName(List)} // The name of the flavor - * ├── {@link #serialiseFileCommandNames(List)} // The names of the enabled file commands - * ├── {@link #serialiseMetadata(List)} // The metadata of this movie - * │ ├── {@link #serialiseMetadataName(List, String)} // The metadata extension name - * │ └── {@link #serialiseMetadataValues(List, LinkedHashMap)} // All values in the extension - * └── {@link #headerEnd()} // The end of the header + * ├── {@link #headerStart()} + * ├── {@link #serialiseFlavorName(List)} + * ├── {@link #serialiseFileCommandNames(List)} + * ├── {@link #serialiseMetadata(List)} + * │ ├── {@link #serialiseMetadataName(List, String)} + * │ └── {@link #serialiseMetadataValues(List, LinkedHashMap)} + * └── {@link #headerEnd()} + *+ *
+ * ##################### TASfile #################### // {@link #headerStart()} + * Flavor: beta1 // {@link #serialiseFlavorName(List)} + * FileCommand-Extensions: tasmod_desyncMonitor@v1, tasmod_options@v1, tasmod_label@v1 // {@link #serialiseFileCommandNames(List)} + * + * --------------------- Credits -------------------- // {@link #serialiseMetadataName(List, String)} + * Title:Insert TAS category here // {@link #serialiseMetadataValues(List, LinkedHashMap)} + * Author:Insert author here + * Playing Time:00:00.0 + * Rerecords:0 + * + * ----------------- Start Position ----------------- + * x:-32.577311363268976 + * y:56.0 + * z:-4.457057187505265 + * pitch:29.25007 + * yaw:-88.80094 + * + * ################################################## // {@link #headerEnd()} ** @return List of lines containing the header */ @@ -156,9 +185,13 @@ public List
How the flavor name is serialised. + *
How the flavor name is serialised *
You normally don't have to edit this,
* as the flavor name is taken from the extension name.
+ *
+ * Flavor: beta1 + ** * @param out The serialised lines, passed by reference */ @@ -166,6 +199,14 @@ protected void serialiseFlavorName(List
Adds the file commands that are enabled to the lines + *
+ * FileCommand-Extensions: tasmod_label@v1, tasmod_desyncMonitor@v1 + *+ * @param out The serialised lines, passed by reference + */ protected void serialiseFileCommandNames(List
Serialises the metadata to the header of the TASfile + *
+ * --------------------- Credits -------------------- + * Title:Insert TAS category here + * Author:Insert author here + * Playing Time:00:00.0 + * Rerecords:0 + * + * ----------------- Start Position ----------------- + * x:-32.577311363268976 + * y:56.0 + * z:-4.457057187505265 + * pitch:29.25007 + * yaw:-88.80094 + *+ * @param out + */ protected void serialiseMetadata(List
Serialises only the name of the metadata section + *
+ * --------------------- Credits -------------------- + *+ * @param out The lines passed in by reference + * @param name The name to process + */ protected void serialiseMetadataName(List
Serialises only the values of the metadata section + *
+ * Title:Insert TAS category here + * Author:Insert author here + * Playing Time:00:00.0 + * Rerecords:0 + *+ * @param out + * @param data + */ protected void serialiseMetadataValues(List
Serialises a list of inputs into a list of strings + *
+ * serialise + * └── {@link #serialiseContainer(BigArrayList, TickContainer)} + * ├── {@link #serialiseKeyboard(VirtualKeyboard)} + * ├── {@link #serialiseMouse(VirtualMouse)} + * ├── {@link #serialiseCameraAngle(VirtualCameraAngle)} + * ├── {@link #serialiseInlineComments(List, List)} + * │ └── {@link #serialiseFileCommandsInLine(List)} + * ├── {@link #serialiseEndlineComments(List, List)} // Same as serialiseInlineComments + * │ └── {@link #serialiseFileCommandsEndLine(List)} // Unused + * └── {@link #mergeInputs(BigArrayList, List, List, List, List)} + *+ * @param inputs The inputs to serialise + * @param toTick The tick where to stop, used for partial serialisation by savestates. -1 to serialise all + * @return The list of lines + */ public BigArrayList