public class ScriptUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static @NotNull java.lang.String |
chooseDefaultScriptName(@NotNull java.io.File baseDir,
java.lang.String archetypeName,
java.lang.String scriptEnding,
@NotNull PathManager pathManager)
Try to create a reasonable default script name for lazy users.
|
static @NotNull java.lang.String |
localizeEventPath(@NotNull java.io.File localMapDir,
java.io.File f,
@NotNull java.io.File mapDir)
This method is called when the user selects a new event to be created.
|
@NotNull public static @NotNull java.lang.String localizeEventPath(@NotNull @NotNull java.io.File localMapDir, java.io.File f, @NotNull @NotNull java.io.File mapDir)
localMapDir
- the base directoryf
- script filemapDir
- the map directory@NotNull public static @NotNull java.lang.String chooseDefaultScriptName(@NotNull @NotNull java.io.File baseDir, java.lang.String archetypeName, java.lang.String scriptEnding, @NotNull @NotNull PathManager pathManager)
baseDir
- the base dir for the default script namearchetypeName
- the best suitable name for the archetype (see
GameObject.getBestName())scriptEnding
- the ending for scriptspathManager
- the path manager for converting path names