wyvern.world
Class SystemProps

java.lang.Object
  extended bywyvern.world.SystemProps

public final class SystemProps
extends java.lang.Object

This class reads and retrieves properties set in the wyvern.ini file. It also initializes the Jython interpeter system state.

Version:
1.0, Mar 19, 1998
Author:
Steve Yegge

Field Summary
static java.lang.String DEFAULT_MAIN_MAP
           
static java.lang.String INITFILE_NAME
          This file goes in the admin directory, "wyvern/admin/".
 
Method Summary
static void disableScheduler()
          If called on startup, instructs the system not to start up the game scheduler.
static boolean getAnimationFlag()
          Returns true if animation timers are enabled in this session.
static int getIntProperty(java.lang.String name)
          Returns a property with an integer value.
static java.lang.String getProperty(java.lang.String name)
          Returns true if a game engine property is set.
static java.lang.String getWelcomeMessage()
          Returns the message to display when a user logs in.
static boolean inMapEditor()
          Returns true if the system is running in a Map Editor.
static boolean isPropertySet(java.lang.String name)
          Returns true if the property is "true", else false.
static void printProperties()
          Prints all the properties and their values.
static boolean runningWindows()
          Returns true if we're on some flavor of Microsoft Windows.
static void setAnimationFlag(boolean value)
          Sets the system property controlling the startup of animation timers.
static void setProperty(java.lang.String name, java.lang.String value)
          Sets an arbitrary property by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITFILE_NAME

public static final java.lang.String INITFILE_NAME
This file goes in the admin directory, "wyvern/admin/". It is a system properties list, so the format is property.name=value. The file comment header contains a list of supported configuration properties.

See Also:
Constant Field Values

DEFAULT_MAIN_MAP

public static final java.lang.String DEFAULT_MAIN_MAP
See Also:
Constant Field Values
Method Detail

getProperty

public static java.lang.String getProperty(java.lang.String name)
Returns true if a game engine property is set.

Parameters:
name - the property name
Returns:
the property value, null if it's not set

isPropertySet

public static boolean isPropertySet(java.lang.String name)
Returns true if the property is "true", else false.

Parameters:
name - the property name
Returns:
true if the property exists and is set to true, else false.

getWelcomeMessage

public static java.lang.String getWelcomeMessage()
Returns the message to display when a user logs in.


getAnimationFlag

public static boolean getAnimationFlag()
Returns true if animation timers are enabled in this session.

Returns:
true if animation is enabled

setAnimationFlag

public static void setAnimationFlag(boolean value)
Sets the system property controlling the startup of animation timers. Has no effect on existing animation timers, if any. Used by the Map Editor.

Parameters:
value - true to set animation on startup

setProperty

public static void setProperty(java.lang.String name,
                               java.lang.String value)
Sets an arbitrary property by name.

Parameters:
name - the property to set
value - the value to set it to

getIntProperty

public static int getIntProperty(java.lang.String name)
Returns a property with an integer value.

Parameters:
name - the property name
Returns:
the property value, as an int. If the property isn't set, or has a non-integer value, returns 0 (zero).

inMapEditor

public static final boolean inMapEditor()
Returns true if the system is running in a Map Editor.


runningWindows

public static boolean runningWindows()
Returns true if we're on some flavor of Microsoft Windows.


printProperties

public static void printProperties()
Prints all the properties and their values.


disableScheduler

public static void disableScheduler()
If called on startup, instructs the system not to start up the game scheduler. Only used for static systems like the map editor, or scripts or backfill tools. Ignored if the game has already started up.