Package net.sf.gridarta.model.gameobject
Class GameObjectUtils
- java.lang.Object
-
- net.sf.gridarta.model.gameobject.GameObjectUtils
-
public class GameObjectUtils extends java.lang.ObjectUtility class forGameObjectrelated functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable java.lang.StringgetSyntaxErrors(@NotNull BaseObject<?,?,?,?> gameObject, @NotNull ArchetypeType type)This method checks the objectText for syntax errors.
-
-
-
Method Detail
-
getSyntaxErrors
@Nullable public static @Nullable java.lang.String getSyntaxErrors(@NotNull @NotNull BaseObject<?,?,?,?> gameObject, @NotNull @NotNull ArchetypeType type)This method checks the objectText for syntax errors. More precisely: It reads every line in the objectText and looks if it matches the type-definitions (-> seeArchetypeTypeSet) for this base object. If there is no match, the line is considered wrong. Of course the type-definitions will never be perfect, this should be kept in mind.Note that the archetype is ignored in the check. The default arches should be correct, and even if not - it isn't the map maker to blame.
- Parameters:
gameObject- the game object to checktype- the type structure belonging to this base object- Returns:
- a String with all lines which don't match the
type-definitions.
If no such "errors" encountered, null is returned
-
-