20 package net.sf.gridarta.var.crossfire.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');
87 appendable.append(
"editor_folder ").append(archetype.getEditorFolder()).append(
'\n');
90 if (archetype.getMsgText() != null) {
91 appendable.append(
"msg\n").append(archetype.getMsgText()).append(
"endmsg\n");
95 appendable.append(archetype.getObjectText());
98 gameObjectParser.
save(appendable, inv);
102 if (archetype.getMultiX() != 0) {
103 appendable.append(
"x ").append(Integer.toString(archetype.getMultiX())).append(
'\n');
105 if (archetype.getMultiY() != 0) {
106 appendable.append(
"y ").append(Integer.toString(archetype.getMultiY())).append(
'\n');
110 appendable.append(
"end\n");
Reading and writing of maps, handling of paths.
MapArchObject contains the specific meta data about a map that is stored in the map-arch, at the very beginning of the map file.
Handles the Crossfire variants of GameObjects and Archetypes.
Interface for classes that read or write GameObject instances.
int collectArchetype(@NotNull final Archetype archetype, @NotNull final Writer out)
Handles the Crossfire GameObjects.
Base package of all Gridarta classes.
A net.sf.gridarta.model.collectable.Collectable that creates the Crossfire specific "archetypes" file...
Abstract base class for Collectables that create the "archetypes" file.
Implements Crossfire archetypes.
Defines common UI constants used in different dialogs and all used icon files.
final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser
The GameObjectParser for writing inventory game objects.
Implements the collection process that combines individual files into collected files which are read ...
final ArchetypeSet< G, A, R > archetypeSet
The ArchetypeSet being collected.
Main package of Gridarta4Crossfire, contains all classes specific to the Crossfire version of the Gri...
CrossfireArchetypeSetCollectable(@NotNull final ArchetypeSet< GameObject, MapArchObject, Archetype > archetypeSet, @NotNull final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser)
Creates a new instance.
Interface that captures similarities between different ArchetypeSet implementations.
static void writeArchetype(@NotNull final Appendable appendable, @NotNull final net.sf.gridarta.model.archetype.Archetype< GameObject, ?, ?> archetype, final boolean isHeadPart, @NotNull final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser)
Writes an Archetype.
void save(@NotNull Appendable appendable, @NotNull G gameObject)
Write a game object object to a stream.