Class MudlibBoundary.Builder

java.lang.Object
io.github.protasm.jvmud.engine.mudlib.MudlibBoundary.Builder
Enclosing class:
MudlibBoundary

public static final class MudlibBoundary.Builder extends Object
  • Method Details

    • gameId

      public MudlibBoundary.Builder gameId(String gameId)
      Sets a stable game id. Blank values are treated as absent.
    • gameName

      public MudlibBoundary.Builder gameName(String gameName)
      Sets a display name for the game. Blank values are treated as absent.
    • mudlibRootPath

      public MudlibBoundary.Builder mudlibRootPath(Path mudlibRootPath)
      Sets the filesystem root used to resolve mudlib-absolute LPC paths.
    • boundaryObjectPath

      public MudlibBoundary.Builder boundaryObjectPath(String boundaryObjectPath)
      Sets a mudlib object path for a general boundary adapter.
    • mudlibGlobalObjectPath

      public MudlibBoundary.Builder mudlibGlobalObjectPath(String mudlibGlobalObjectPath)
      Sets the mudlib-owned global function object path.
    • compatibilityGlobalObjectPath

      public MudlibBoundary.Builder compatibilityGlobalObjectPath(String compatibilityGlobalObjectPath)
      Sets the JVMud compatibility global function object path.
    • compatibilityGlobalObjectSourcePath

      public MudlibBoundary.Builder compatibilityGlobalObjectSourcePath(Path compatibilityGlobalObjectSourcePath)
      Sets the filesystem source for the JVMud compatibility global function object.
    • mfunObjectPath

      @Deprecated(forRemoval=false) public MudlibBoundary.Builder mfunObjectPath(String mfunObjectPath)
      Sets a mudlib object path for legacy mfun/efun adapter behavior.
    • playerObjectPath

      public MudlibBoundary.Builder playerObjectPath(String playerObjectPath)
      Sets the LPC player object path used when binding interactive sessions.
    • playerPrompt

      public MudlibBoundary.Builder playerPrompt(String playerPrompt)
      Sets the prompt text shown when an interactive player can enter commands.
    • maxLineLength

      public MudlibBoundary.Builder maxLineLength(int maxLineLength)
      Sets the maximum output line length before whitespace wrapping is attempted.
    • showRuler

      public MudlibBoundary.Builder showRuler(boolean showRuler)
      Sets whether command prompts should be preceded by a visual line-length ruler.
    • initialPlacePath

      public MudlibBoundary.Builder initialPlacePath(String initialPlacePath)
      Sets the starting place object path for new Personas.
    • preloadFilePath

      public MudlibBoundary.Builder preloadFilePath(String preloadFilePath)
      Sets the mudlib-relative file that lists startup preload objects.
    • preloadObjectPath

      public MudlibBoundary.Builder preloadObjectPath(String preloadObjectPath)
      Adds a startup preload object path.
    • databaseJdbcUrl

      public MudlibBoundary.Builder databaseJdbcUrl(String databaseJdbcUrl)
      Sets the JDBC URL used by JVMud-native database efuns.
    • databaseUser

      public MudlibBoundary.Builder databaseUser(String databaseUser)
      Sets the JDBC user used by JVMud-native database efuns.
    • databasePassword

      public MudlibBoundary.Builder databasePassword(String databasePassword)
      Sets the JDBC password used by JVMud-native database efuns.
    • temporalTickMethod

      public MudlibBoundary.Builder temporalTickMethod(String temporalTickMethod)
      Sets the mudlib method to invoke for deterministic temporal ticks.
    • temporalTickInterval

      public MudlibBoundary.Builder temporalTickInterval(Duration temporalTickInterval)
      Sets the wall-clock interval for one world tick.
    • temporalTickIntervalSeconds

      public MudlibBoundary.Builder temporalTickIntervalSeconds(int temporalTickIntervalSeconds)
      Sets the wall-clock interval for one world tick in whole seconds.
    • handle

      Declares interest in a lifecycle event without naming a specific method.

      This records boundary intent and makes MudlibBoundary.handles(MudlibLifecycleEvent) return true, but it does not by itself give JVMud a method to invoke. Use lifecycleMethod(MudlibLifecycleEvent, String) for hooks that should actually call into LPC code.

      Parameters:
      event - lifecycle event the mudlib understands
      Returns:
      this builder
      Throws:
      NullPointerException - if event is null
    • lifecycleMethod

      public MudlibBoundary.Builder lifecycleMethod(MudlibLifecycleEvent event, String methodName)
      Maps a lifecycle event to a mudlib method name.

      The event remains JVMud-native while the method name is mudlib-specific. Blank method names remove any existing mapping. Nonblank names also mark the event as handled so MudlibBoundary.handles(MudlibLifecycleEvent) remains true.

      Parameters:
      event - lifecycle event to map
      methodName - mudlib method name to invoke for the event
      Returns:
      this builder
      Throws:
      NullPointerException - if event is null
    • engineFunction

      public MudlibBoundary.Builder engineFunction(String mudlibName, String engineName)
      Maps a mudlib-visible function spelling to a JVMud-native engine function name.
    • compatibilityPredefine

      public MudlibBoundary.Builder compatibilityPredefine(String macroName, String replacementText)
      Declares a compile-time compatibility predefine for this mudlib profile.

      The replacement text is passed to the LPC preprocessor as source text. String-valued macros should therefore include their LPC quotes, for example "\"3.6.3\"".

      Parameters:
      macroName - predefined macro name exposed to mudlib source
      replacementText - replacement source text for the macro
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if macroName is blank
    • compatibilityFunctionPredefine

      public MudlibBoundary.Builder compatibilityFunctionPredefine(String macroName, String argumentName, String replacementText)
      Declares an argument-specific function-like preprocessor compatibility replacement.

      For a configured macro PROBE and argument feature, the preprocessor can replace PROBE(feature) with the supplied replacement source text. JVMud treats the macro name and argument as mudlib-boundary data, not as engine-native LPC vocabulary.

      Parameters:
      macroName - function-like macro name exposed to mudlib source
      argumentName - first argument spelling that should match
      replacementText - replacement source text for that call
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if macroName or argumentName is blank
    • build

      public MudlibBoundary build()
      Builds an immutable, normalized boundary declaration.