20 package net.sf.gridarta.var.atrinik.model.collectable;
22 import java.io.IOException;
23 import java.io.Writer;
31 import org.jetbrains.annotations.NotNull;
64 for (
Archetype tail = archetype.getMultiNext(); tail != null; tail = tail.getMultiNext()) {
83 appendable.append(
"Object ").append(archetype.getArchetypeName()).append(
'\n');
85 if (archetype.getMultiShapeID() > 0) {
86 appendable.append(
"mpart_id ").append(Integer.toString(archetype.getMultiShapeID())).append(
'\n');
88 if (archetype.getMultiPartNr() > 0) {
89 appendable.append(
"mpart_nr ").append(Integer.toString(archetype.getMultiPartNr())).append(
'\n');
92 if (archetype.getMsgText() != null) {
93 appendable.append(
"msg\n").append(archetype.getMsgText()).append(
"endmsg\n");
98 appendable.append(
"editor_folder ").append(archetype.getEditorFolder()).append(
'\n');
101 appendable.append(archetype.getObjectText());
105 gameObjectParser.
save(appendable, inv);
109 if (archetype.getMultiX() != 0) {
110 appendable.append(
"x ").append(Integer.toString(archetype.getMultiX())).append(
'\n');
112 if (archetype.getMultiY() != 0) {
113 appendable.append(
"y ").append(Integer.toString(archetype.getMultiY())).append(
'\n');
117 appendable.append(
"end\n");
Reading and writing of maps, handling of paths.
Implements Atrinik archetypes.
Handles the Atrinik variants of GameObjects and Archetypes.
Interface for classes that read or write GameObject instances.
final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser
The GameObjectParser for writing inventory game objects.
Base package of all Gridarta classes.
Main package of Gridarta4Atrinik, contains all classes specific to the Atrinik version of the Gridart...
Defines common UI constants used in different dialogs and all used icon files.
Abstract base class for Collectables that create the "archetypes" file.
MapArchObject contains the specific meta data about a map that is stored in the map-arch, at the very beginning of the map file.
static void writeArchetype(@NotNull final Appendable appendable, @NotNull final net.sf.gridarta.model.archetype.Archetype< GameObject, MapArchObject, Archetype > archetype, final boolean isHeadPart, @NotNull final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser)
Writes an Archetype.
Implements the collection process that combines individual files into collected files which are read ...
final ArchetypeSet< G, A, R > archetypeSet
The ArchetypeSet being collected.
Handles the Atrinik GameObjects.
int collectArchetype(@NotNull final Archetype archetype, @NotNull final Writer out)
Interface that captures similarities between different ArchetypeSet implementations.
A net.sf.gridarta.model.collectable.Collectable that creates the Atrinik specific "archetypes" file...
void save(@NotNull Appendable appendable, @NotNull G gameObject)
Write a game object object to a stream.
AtrinikArchetypeSetCollectable(@NotNull final ArchetypeSet< GameObject, MapArchObject, Archetype > archetypeSet, @NotNull final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser)
Creates a new instance.