com.planet_ink.coffee_mud.Commands
Class Import
java.lang.Object
com.planet_ink.coffee_mud.Commands.StdCommand
com.planet_ink.coffee_mud.Commands.Import
- All Implemented Interfaces:
- Command, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>
public class Import
- extends StdCommand
|
Field Summary |
protected static java.lang.String[][] |
colors
|
static java.lang.String[][] |
objDescs
|
| Fields inherited from class com.planet_ink.coffee_mud.Commands.StdCommand |
ID |
|
Method Summary |
boolean |
canBeOrdered()
Whether the a group leader or charmer can order their followers
to do this command. |
protected static Room |
changeRoomClass(Room R,
java.lang.String newClass)
|
protected static void |
doWeapon(Weapon I,
java.lang.String name,
int val1,
java.lang.String str1,
int val2,
int val3,
int val4,
java.lang.String str4)
|
protected static java.lang.String |
eatLine(java.util.List<java.lang.String> V)
|
protected static java.lang.String |
eatLineSquiggle(java.util.List<java.lang.String> V)
|
protected static java.lang.String |
eatNextLine(java.util.List<java.lang.String> V)
|
boolean |
execute(MOB mob,
java.util.Vector commands,
int metaFlags)
This method actually performs the command, when the given parsed
set of command-line words. |
protected static java.lang.String |
fixReadableContent(java.lang.String text)
|
java.lang.String[] |
getAccessWords()
Returns the set of command words, with the most public one first,
that are entered by the user to initiate this command. |
protected static java.lang.String |
getAreaAuthor(java.util.List<java.lang.String> V)
|
protected static java.lang.String |
getAreaName(java.util.List<java.lang.String> V)
|
protected static long |
getBitMask(java.lang.String str,
int which)
|
static int |
getDRoll(java.lang.String str)
|
protected static MOB |
getMOB(java.lang.String OfThisID,
Room putInRoom,
Session session,
java.util.Vector mobData,
java.util.Vector mobProgData,
java.util.Vector specialData,
java.util.Vector shopData,
java.util.Hashtable doneMOBS,
java.lang.String areaFileName,
boolean compileErrors,
java.util.Vector commands)
|
protected static java.lang.String |
getSpell(java.lang.String word,
int i)
|
protected static boolean |
hasReadableContent(java.lang.String objectName)
|
protected static void |
importCustomFiles(MOB mob,
java.util.Hashtable files,
java.util.HashSet customBother,
boolean noPrompt,
boolean noDelete)
|
protected static void |
importCustomObjects(MOB mob,
java.util.Vector custom,
java.util.HashSet customBother,
boolean noPrompt,
boolean noDelete)
|
protected static int |
importNumber(java.lang.String s)
|
protected static java.lang.String |
nextLine(java.util.List<java.lang.String> V)
|
protected static void |
processRoomRelinks(java.util.Vector reLinkTable,
java.lang.String areaName,
java.util.Hashtable hashedRoomSet)
|
protected static void |
readBlocks(java.util.List<java.lang.String> buf,
java.util.List<java.lang.String> areaData,
java.util.List<java.lang.String> roomData,
java.util.List<java.lang.String> mobData,
java.util.List<java.lang.String> resetData,
java.util.List<java.lang.String> objectData,
java.util.List<java.lang.String> mobProgData,
java.util.List<java.lang.String> objProgData,
java.util.List<java.lang.String> shopData,
java.util.List<java.lang.String> specialData,
java.util.List<java.lang.String> socialData)
|
protected static boolean |
returnAnError(Session sess,
java.lang.String str,
boolean compileErrors,
java.util.Vector commands)
|
boolean |
securityCheck(MOB mob)
Whether this command is available to the given player |
static java.lang.String |
socialFix(java.lang.String str)
|
protected static boolean |
temporarilyDeleteArea(MOB mob,
java.util.Vector reLinkTable,
java.lang.String areaName)
|
protected static java.lang.String |
trimSpacesOnly(java.lang.String s)
|
| Methods inherited from class com.planet_ink.coffee_mud.Commands.StdCommand |
actionsCost, checkedActionsCost, combatActionsCost, compareTo, copyOf, executeInternal, ID, initializeClass, newInstance, preExecute, staffCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
objDescs
public static final java.lang.String[][] objDescs
colors
protected static final java.lang.String[][] colors
Import
public Import()
getAccessWords
public java.lang.String[] getAccessWords()
- Description copied from interface:
Command
- Returns the set of command words, with the most public one first,
that are entered by the user to initiate this command.
- Specified by:
getAccessWords in interface Command- Overrides:
getAccessWords in class StdCommand
- Returns:
- the set of command words that the user enters
getAreaName
protected static java.lang.String getAreaName(java.util.List<java.lang.String> V)
processRoomRelinks
protected static void processRoomRelinks(java.util.Vector reLinkTable,
java.lang.String areaName,
java.util.Hashtable hashedRoomSet)
temporarilyDeleteArea
protected static boolean temporarilyDeleteArea(MOB mob,
java.util.Vector reLinkTable,
java.lang.String areaName)
getAreaAuthor
protected static java.lang.String getAreaAuthor(java.util.List<java.lang.String> V)
nextLine
protected static java.lang.String nextLine(java.util.List<java.lang.String> V)
eatLine
protected static java.lang.String eatLine(java.util.List<java.lang.String> V)
eatNextLine
protected static java.lang.String eatNextLine(java.util.List<java.lang.String> V)
changeRoomClass
protected static Room changeRoomClass(Room R,
java.lang.String newClass)
getBitMask
protected static long getBitMask(java.lang.String str,
int which)
trimSpacesOnly
protected static java.lang.String trimSpacesOnly(java.lang.String s)
eatLineSquiggle
protected static java.lang.String eatLineSquiggle(java.util.List<java.lang.String> V)
hasReadableContent
protected static boolean hasReadableContent(java.lang.String objectName)
fixReadableContent
protected static java.lang.String fixReadableContent(java.lang.String text)
returnAnError
protected static boolean returnAnError(Session sess,
java.lang.String str,
boolean compileErrors,
java.util.Vector commands)
importCustomFiles
protected static void importCustomFiles(MOB mob,
java.util.Hashtable files,
java.util.HashSet customBother,
boolean noPrompt,
boolean noDelete)
throws java.io.IOException
- Throws:
java.io.IOException
importCustomObjects
protected static void importCustomObjects(MOB mob,
java.util.Vector custom,
java.util.HashSet customBother,
boolean noPrompt,
boolean noDelete)
throws java.io.IOException
- Throws:
java.io.IOException
getSpell
protected static java.lang.String getSpell(java.lang.String word,
int i)
importNumber
protected static int importNumber(java.lang.String s)
readBlocks
protected static void readBlocks(java.util.List<java.lang.String> buf,
java.util.List<java.lang.String> areaData,
java.util.List<java.lang.String> roomData,
java.util.List<java.lang.String> mobData,
java.util.List<java.lang.String> resetData,
java.util.List<java.lang.String> objectData,
java.util.List<java.lang.String> mobProgData,
java.util.List<java.lang.String> objProgData,
java.util.List<java.lang.String> shopData,
java.util.List<java.lang.String> specialData,
java.util.List<java.lang.String> socialData)
doWeapon
protected static void doWeapon(Weapon I,
java.lang.String name,
int val1,
java.lang.String str1,
int val2,
int val3,
int val4,
java.lang.String str4)
getDRoll
public static int getDRoll(java.lang.String str)
getMOB
protected static MOB getMOB(java.lang.String OfThisID,
Room putInRoom,
Session session,
java.util.Vector mobData,
java.util.Vector mobProgData,
java.util.Vector specialData,
java.util.Vector shopData,
java.util.Hashtable doneMOBS,
java.lang.String areaFileName,
boolean compileErrors,
java.util.Vector commands)
socialFix
public static java.lang.String socialFix(java.lang.String str)
execute
public boolean execute(MOB mob,
java.util.Vector commands,
int metaFlags)
throws java.io.IOException
- Description copied from interface:
Command
- This method actually performs the command, when the given parsed
set of command-line words. The commands list is almost always the
set of strings, starting with the access word that triggered the
command. Some commands have custom APIs however, that allow almost
anything to be in the commands list, or even for the commands to be null.
This method is not allowed to be called until the player or mob has
satisfied the actionsCost requirements and the securityCheck
- Specified by:
execute in interface Command- Overrides:
execute in class StdCommand
- Parameters:
mob - the mob or player issueing the commandcommands - usually the command words and parameters; a set of stringsmetaFlags - flags denoting how the command is being executed
- Returns:
- whether the command was successfully executed. Is almost meaningless.
- Throws:
java.io.IOException - usually means the player has dropped carrier- See Also:
Command.actionsCost(MOB, List),
Command.securityCheck(MOB)
canBeOrdered
public boolean canBeOrdered()
- Description copied from interface:
Command
- Whether the a group leader or charmer can order their followers
to do this command.
- Specified by:
canBeOrdered in interface Command- Overrides:
canBeOrdered in class StdCommand
- Returns:
- whether this command can be ordered.
securityCheck
public boolean securityCheck(MOB mob)
- Description copied from interface:
Command
- Whether this command is available to the given player
- Specified by:
securityCheck in interface Command- Overrides:
securityCheck in class StdCommand
- Parameters:
mob - the player mob who might not even know about this command
- Returns:
- true if the command is available, and false if it is unknown