From: <chr...@us...> - 2006-05-21 23:07:30
|
Revision: 5 Author: christianhujer Date: 2006-05-21 16:07:22 -0700 (Sun, 21 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=5&view=rev Log Message: ----------- Changed Crossfire source to UTF-8 Modified Paths: -------------- trunk/crossfire/build.xml Removed Paths: ------------- trunk/crossfire/build_win.bat Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-05-21 23:00:50 UTC (rev 4) +++ trunk/crossfire/build.xml 2006-05-21 23:07:22 UTC (rev 5) @@ -37,7 +37,7 @@ <!-- compiling all Java classes --> <target name="compile" depends="init,clean"> - <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true"> + <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" encoding="utf-8"> <classpath> <fileset dir="${lib.dir}" includes="*.jar" /> </classpath> @@ -114,4 +114,4 @@ <bottom><![CDATA[<i>Copyright (C) 2003 Andreas Vogl, Michael Toennies</i>]]></bottom> </javadoc> </target> -</project> \ No newline at end of file +</project> Deleted: trunk/crossfire/build_win.bat =================================================================== --- trunk/crossfire/build_win.bat 2006-05-21 23:00:50 UTC (rev 4) +++ trunk/crossfire/build_win.bat 2006-05-21 23:07:22 UTC (rev 5) @@ -1,81 +0,0 @@ -@echo off -title build CFJavaEditor -REM Run this from the root directory of the project, as checked out from CVS. -REM To configure the script, you only need to set CF_JAVAPATH, (unless something changes dramatically.) - -REM check if java_home is well defined -if exist "%JAVA_HOME%\bin\javac.exe" goto start1 -REM ------ java home is unset ------ - -REM ########################################################## -REM ### set the following path to your java home directory ### -REM ########################################################## -SET CF_JAVAPATH=C:\Progra~1\Java_SDK2 - -if exist "%CF_JAVAPATH%\bin\javac.exe" goto start2 -echo BUILD FAILED -echo. -echo Could not find the java home directory. -echo Please set the system variable JAVA_HOME or just enter your -echo java path in the "build_win.bat" file at the marked position. -echo. -pause -goto stop -REM ------ start build process ------ -:start1 -SET CF_JAVAPATH="%JAVA_HOME%" -:start2 - -if exist class rd /s /q class -mkdir class - -echo Compiling... -%CF_JAVAPATH%\bin\javac -d class -classpath lib\png.jar;lib\visualtek.jar;lib\jdom.jar;lib\crimson.jar src/cfeditor/*.java src/cfeditor/textedit/textarea/*.java src/cfeditor/textedit/scripteditor/*.java - -echo Preparing to build .jar file... -xcopy /q resource\HelpFiles\*.* class\resource\HelpFiles /s /i -xcopy /q resource\conf\*.* class /s /i -xcopy /q resource\icons\*.* class\resource\icons /s /i -xcopy /q resource\system\*.* class\resource\system /s /i - -Echo Deleting all CVS directories from the class directory... -REM If there are any new subdirectories here in the future, make sure to get rid of them too. - -cd class -if exist CVS rd /s /q CVS -if exist resource\HelpFiles\CVS rd /s /q resource\HelpFiles\CVS -if exist resource\conf\CVS rd /s /q resource\conf\CVS -if exist resource\icons\CVS rd /s /q resource\icons\CVS -if exist resource\system\CVS rd /s /q resource\system\CVS -if exist resource\CVS rd /s /q resource\CVS - -echo Extracting png.jar... -%CF_JAVAPATH%\bin\jar xvf ..\lib\png.jar > NUL - -echo Extracting visualtek.jar... -%CF_JAVAPATH%\bin\jar xvf ..\lib\visualtek.jar > NUL - -echo Extracting jdom.jar... -%CF_JAVAPATH%\bin\jar xvf ..\lib\jdom.jar > NUL - -echo Extracting crimson.jar... -%CF_JAVAPATH%\bin\jar xvf ..\lib\crimson.jar > NUL - -rd /s /q META-INF - -echo Building CFJavaEditor.jar... -%CF_JAVAPATH%\bin\jar cfm ..\CFJavaEditor.jar ..\manifest.txt .\*.* -cd .. - -echo Cleaning up... -rd /s /q class - -echo Done. - -echo Press any key to test your .jar file... -pause > NUL - -REM The **** The following line is optional. Use it to test your jar file**** -%CF_JAVAPATH%\bin\java -jar CFJavaEditor.jar - -:stop \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-30 23:31:50
|
Revision: 87 Author: christianhujer Date: 2006-05-30 16:31:10 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=87&view=rev Log Message: ----------- Some work on unifying ScriptArchData. Modified Paths: -------------- trunk/crossfire/build.xml trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/ScriptArchData.java Added Paths: ----------- trunk/crossfire/src/cfeditor/action.properties trunk/crossfire/src/cfeditor/messages.properties trunk/src/app/net/sf/gridarta/gui/ trunk/src/app/net/sf/gridarta/gui/HideFileFilterProxy.java Removed Paths: ------------- trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/crossfire/build.xml 2006-05-30 23:31:10 UTC (rev 87) @@ -116,9 +116,16 @@ > <!-- pack everything into the jar file --> <fileset dir="${build.dir}" excludes="MANIFEST.MF,test/**"/> + <fileset dir="${src.dir}" includes="**/*.properties" /> <zipfileset src="../lib/japi.jar"> <include name="net/sf/japi/swing/DisposeAction.class" /> + <include name="net/sf/japi/util/filter/file/AbstractFileFilter.class" /> + <include name="net/sf/japi/util/filter/file/FileFilter.class" /> + <include name="net/sf/japi/util/filter/Filter.class" /> + <include name="net/sf/japi/util/filter/file/EndingFileFilter.class" /> + <include name="net/sf/japi/swing/ActionFactory.class" /> + <include name="net/sf/japi/swing/NamedActionMap.class" /> </zipfileset> <!-- creating the manifest --> <manifest> Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-30 23:31:10 UTC (rev 87) @@ -24,6 +24,7 @@ package cfeditor; +import static net.sf.japi.swing.ActionFactory.getFactory; import cfeditor.arch.ArchObject; import cfeditor.arch.ArchObjectParser; import cfeditor.arch.ArchObjectStack; @@ -48,6 +49,8 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.filechooser.FileFilter; import org.apache.log4j.Logger; +import net.sf.japi.util.filter.file.EndingFileFilter; +import net.sf.japi.swing.ActionFactory; /** * The main controller of the level editor. Basically the main application. @@ -56,6 +59,9 @@ */ public class CMainControl extends JFrame { + /** ActionFactory. */ + private static final ActionFactory ACTION_FACTORY = getFactory("cfeditor"); + private static final Logger log = Logger.getLogger(CMainControl.class); private static CMainControl mStatic_control = null; @@ -516,6 +522,9 @@ refreshMenusAndToolbars(); } + /** Swing FileFilter for Lua scripts. */ + public static final FileFilter pythonFileFilter = new net.sf.gridarta.gui.HideFileFilterProxy(new EndingFileFilter(true, ACTION_FACTORY.getString("fileDialog.filter.python"), ".py")); + public String getMapDefaultFolder() { return m_strMapDir; } Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-05-30 23:31:10 UTC (rev 87) @@ -46,7 +46,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; -import javax.swing.filechooser.FileFilter; +import static javax.swing.WindowConstants.HIDE_ON_CLOSE; import org.apache.log4j.Logger; /** @@ -66,32 +66,32 @@ public static final int EDATA_EVENT_OPTIONS = 2; // popup frame to edit script paths: - private static JDialog pathFrame = null; + private static JDialog pathFrame; - private static JTextField inputFPath = null; + private static JTextField inputFPath; - private static JTextField inputPlName = null; + private static JTextField inputPlName; - private static JTextField inputEEOptions = null; + private static JTextField inputEEOptions; - private static pathButtonListener ccListener; + private static PathButtonListener ccListener; - private static pathButtonListener okListener; + private static PathButtonListener okListener; // popup frame for new scripts: - private static JDialog newScriptFrame = null; + private static JDialog newScriptFrame; - private static JLabel nsHeading = null; + private static JLabel nsHeading; - private static pathButtonListener nsOkListener = null; + private static PathButtonListener nsOkListener; - private static JComboBox eventTypeBox = null; + private static JComboBox eventTypeBox; - private static JComboBox pluginNameBox = null; + private static JComboBox pluginNameBox; - private static JTextField inputNFPath = null; + private static JTextField inputNFPath; - private static JTextField inputEventOptions = null; + private static JTextField inputEventOptions; private final Vector eventList; // contains list of ScriptedEvents @@ -104,7 +104,7 @@ } /** Initialize the JComboBox with the event types. */ - private synchronized void initEventTypeBoxes() { + private static synchronized void initEventTypeBoxes() { String[] allEventTypes = new String[]{" apply", " attack", " close", " death", " drop", " pickup", " say", " stop", " time", " throw", " trigger"}; @@ -126,10 +126,10 @@ * @param dataType 0: pluginData = "plugin name" * 1: pluginData = "file path" */ - public synchronized void addEventData(String eventType, String eventData, int dataType) { + public synchronized void addEventData(final String eventType, final String eventData, final int dataType) { // first try to find an existing event - ScriptedEvent event; - int index = getScriptedEvent(eventType); + final ScriptedEvent event; + final int index = getScriptedEvent(eventType); // if none exists yet, create new - else take the existing one if (index == -1) { @@ -161,7 +161,7 @@ * @param eventType look for a ScriptedEvent of this type * @return index of ScriptedEvent in 'eventList' if found, -1 if not found */ - private int getScriptedEvent(String eventType) { + private int getScriptedEvent(final String eventType) { ScriptedEvent se; // tmp. event object if (eventList != null && eventList.size() > 0) { @@ -191,7 +191,7 @@ int numEvents = eventList.size(); for (int i = 0; i < numEvents; i++) { - se = (ScriptedEvent) (eventList.elementAt(i)); + se = (ScriptedEvent) eventList.elementAt(i); // validate this event if (!se.isValid()) { // this event is invalid @@ -215,12 +215,12 @@ * (the String is expected to end with '\n', unless empty) */ public String getMapArchEventData() { - StringBuffer buff = new StringBuffer(""); + StringBuilder buff = new StringBuilder(); ScriptedEvent se; // tmp. event object if (eventList != null && eventList.size() > 0) { for (int i = 0; i < eventList.size(); i++) { - se = (ScriptedEvent) (eventList.elementAt(i)); + se = (ScriptedEvent) eventList.elementAt(i); buff.append(se.getMapArchText()); } } @@ -305,13 +305,12 @@ /** * Try to create a reasonable default script name for lazy users :-) - * @param archName the best suitable name for the arch (see - * ArchObject.getBestName()) + * @param archName the best suitable name for the arch (see ArchObject.getBestName()) * @return a nice default script name without whitespaces */ - private String chooseDefaultScriptName(String archName) { + private static String chooseDefaultScriptName(final String archName) { String defScriptName = archName.trim(); - int i = 0; + final int i; if ((i = defScriptName.indexOf(" ")) >= 0) { if (defScriptName.length() > 12 || defScriptName.lastIndexOf(" ") != i) { // if there are several whitespaces or the name is too long, just cut off the end @@ -324,24 +323,22 @@ if (defScriptName.length() >= 3) { defScriptName = defScriptName.substring(0, 1).toUpperCase() + defScriptName.substring(1); } - defScriptName = defScriptName + "Script.py"; + defScriptName += "Script.py"; return defScriptName; } /** * This method is called when the user selects a new event to be created. - * The path relative to the map dir is calculated, and if reasonable, a - * relative path is created (relative to the map the event is on). + * The path relative to the map dir is calculated, and if reasonable, + * a relative path is created (relative to the map the event is on). * @param f script file * @return local event path */ - private String localizeEventPath(File f) { - CMainControl m_control = CMainControl.getInstance(); // main control - File localMapDir = m_control.getCurrentMap().getMapFile().getParentFile(); // local map directory - File mapDir = new File(m_control.getMapDefaultFolder()); // global map directory - File tmp; - String path = ""; + private static String localizeEventPath(final File f) { + CMainControl mainControl = CMainControl.getInstance(); // main control + final File localMapDir = mainControl.getCurrentMap().getMapFile().getParentFile(); // local map directory + File mapDir = new File(mainControl.getMapDefaultFolder()); // global map directory if (!mapDir.exists()) { log.warn("Map directory '" + mapDir.getAbsolutePath() + "' does not exist!"); @@ -349,11 +346,13 @@ } // find out if the scriptfile is in a subdirectory of the map file + File tmp; for (tmp = f.getParentFile(); tmp != null && !tmp.getAbsolutePath().equalsIgnoreCase(localMapDir.getAbsolutePath()); tmp = tmp.getParentFile()) { ; } + String path; if (tmp == null) { // scriptfile is NOT in a subirectory of mapfile -> absolute path path = f.getAbsolutePath().substring(mapDir.getAbsolutePath().length()); @@ -369,54 +368,52 @@ path = path.substring(1); // no leading slash } } - return path; } /** - * A popup is opened and the user can create a new scripting event which - * gets attached to this arch. - * @param panelList JList from the MapArchPanel (script tab) which displays - * the events + * A popup is opened and the user can create a new scripting event + * which gets attached to this arch. + * @param panelList JList from the MapArchPanel (script tab) which displays the events */ - public void addEventScript(JList panelList, ArchObject arch) { - String archName = arch.getBestName(arch.getDefaultArch()); + public void addEventScript(final JList panelList, final ArchObject arch) { + final String archName = arch.getBestName(arch.getDefaultArch()); // create a reasonable default script name for lazy users :-) - String defScriptName = chooseDefaultScriptName(archName); + final String defScriptName = chooseDefaultScriptName(archName); if (newScriptFrame == null) { // initialize popup frame newScriptFrame = new JDialog(CMainControl.getInstance().getMainView(), "New Scripted Event", true); - newScriptFrame.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); + newScriptFrame.setDefaultCloseOperation(HIDE_ON_CLOSE); - JPanel main_panel = new JPanel(); - main_panel.setLayout(new BoxLayout(main_panel, BoxLayout.Y_AXIS)); - main_panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 2, 5)); + final JPanel mainPanel = new JPanel(); + mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); + mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 2, 5)); // first line: heading JPanel line = new JPanel(new FlowLayout(FlowLayout.LEFT)); nsHeading = new JLabel("New scripted event for \"" + archName + "\":"); nsHeading.setForeground(Color.black); line.add(nsHeading); - main_panel.add(line); + mainPanel.add(line); // event type - main_panel.add(Box.createVerticalStrut(10)); + mainPanel.add(Box.createVerticalStrut(10)); line = new JPanel(new FlowLayout(FlowLayout.LEFT)); JLabel tlabel1 = new JLabel("Event Type: "); line.add(tlabel1); line.add(eventTypeBox); - //main_panel.add(line); + //mainPanel.add(line); line.add(Box.createHorizontalStrut(10)); // plugin name JLabel tlabel2 = new JLabel("Plugin: "); line.add(tlabel2); line.add(pluginNameBox); - main_panel.add(line); + mainPanel.add(line); // path - main_panel.add(Box.createVerticalStrut(5)); + mainPanel.add(Box.createVerticalStrut(5)); line = new JPanel(new FlowLayout(FlowLayout.LEFT)); JLabel tlabel3 = new JLabel("Script File:"); line.add(tlabel3); @@ -425,66 +422,66 @@ line.add(Box.createHorizontalStrut(diff)); } - main_panel.add(line); + mainPanel.add(line); inputNFPath = new JTextField(defScriptName, 20); - JButton browseb = new JButton("..."); + final JButton browseb = new JButton("..."); browseb.setMargin(new Insets(0, 10, 0, 10)); browseb.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - File home = CMainControl.getInstance().getCurrentMap().getMapFile().getParentFile(); // map dir + public void actionPerformed(final ActionEvent e) { + final File home = CMainControl.getInstance().getCurrentMap().getMapFile().getParentFile(); // map dir - JFileChooser fileChooser = new JFileChooser(); + final JFileChooser fileChooser = new JFileChooser(); fileChooser.setDialogTitle("Select Script File"); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setCurrentDirectory(home); fileChooser.setMultiSelectionEnabled(false); - fileChooser.setFileFilter(new FileFilterPython()); + fileChooser.setFileFilter(CMainControl.pythonFileFilter); if (fileChooser.showOpenDialog(newScriptFrame) == JFileChooser.APPROVE_OPTION) { // user has selected a file - File f = fileChooser.getSelectedFile(); + final File f = fileChooser.getSelectedFile(); inputNFPath.setText(localizeEventPath(f)); } } }); line.add(inputNFPath); line.add(browseb); - main_panel.add(line); + mainPanel.add(line); // description line = new JPanel(new FlowLayout(FlowLayout.LEFT)); - JPanel textPanel = new JPanel(); + final JPanel textPanel = new JPanel(); textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.Y_AXIS)); JLabel tlabel = new JLabel("When you specify an existing file, the new event will be linked"); textPanel.add(tlabel); tlabel = new JLabel("to that existing script. Otherwise a new script file is created."); textPanel.add(tlabel); line.add(textPanel); - main_panel.add(line); + mainPanel.add(line); // event options input - main_panel.add(Box.createVerticalStrut(10)); + mainPanel.add(Box.createVerticalStrut(10)); line = new JPanel(new FlowLayout(FlowLayout.LEFT)); tlabel = new JLabel("Event Options: "); line.add(tlabel); inputEventOptions = new JTextField(25); line.add(inputEventOptions); - main_panel.add(line); + mainPanel.add(line); // button panel: - main_panel.add(Box.createVerticalStrut(10)); + mainPanel.add(Box.createVerticalStrut(10)); line = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - JButton nsOkButton = new JButton("OK"); - nsOkListener = new pathButtonListener(true, newScriptFrame, this); + final JButton nsOkButton = new JButton("OK"); + nsOkListener = new PathButtonListener(true, newScriptFrame, this); nsOkButton.addActionListener(nsOkListener); line.add(nsOkButton); - JButton cancelButton = new JButton("Cancel"); - cancelButton.addActionListener(new pathButtonListener(false, newScriptFrame, null)); + final JButton cancelButton = new JButton("Cancel"); + cancelButton.addActionListener(new PathButtonListener(false, newScriptFrame, null)); line.add(cancelButton); - main_panel.add(line); + mainPanel.add(line); - newScriptFrame.getContentPane().add(main_panel); + newScriptFrame.getContentPane().add(mainPanel); newScriptFrame.pack(); newScriptFrame.setLocationRelativeTo(CMainControl.getInstance().getMainView()); newScriptFrame.setVisible(true); @@ -503,15 +500,14 @@ * The user has chosen to create a new event, now it is to be done. * @param frame the parent window of the create-new-event dialog */ - public void createNewEvent(JDialog frame) { - CMainControl m_control = CMainControl.getInstance(); // main control + public void createNewEvent(final JDialog frame) { + CMainControl mainControl = CMainControl.getInstance(); // main control String scriptPath = inputNFPath.getText().trim(); - String eventType = ((String) (eventTypeBox.getSelectedItem())).trim(); - String pluginName = ((String) (pluginNameBox.getSelectedItem())).trim(); - String eventOptions = inputEventOptions.getText().trim(); + final String eventType = ((String) (eventTypeBox.getSelectedItem())).trim(); + final String pluginName = ((String) (pluginNameBox.getSelectedItem())).trim(); + final String eventOptions = inputEventOptions.getText().trim(); - File localMapDir = m_control.getCurrentMap().getMapFile().getParentFile(); // local map directory - String absScriptPath; // the absolute script path + final File localMapDir = mainControl.getCurrentMap().getMapFile().getParentFile(); // local map directory int replaceIndex = -1; // index of event to replace ('-1' means no replace) // first check if that event type is not already in use @@ -528,17 +524,18 @@ // convert localized scriptPath into real, absolute path scriptPath = scriptPath.replace('\\', '/'); + String absScriptPath; if (scriptPath.startsWith("/")) { // script path is absolute - File mapDir = new File(m_control.getMapDefaultFolder()); // global map directory - if (!mapDir.exists()) { + final File mapDir = new File(mainControl.getMapDefaultFolder()); // global map directory + if (mapDir.exists()) { + absScriptPath = mapDir.getAbsolutePath() + scriptPath; + } else { // if map dir doesn't exist, this is not going to work frame.setVisible(false); - m_control.showMessage("Invalid Map Directory", "The map directory '" + mapDir + "' does not exist!\n" + + mainControl.showMessage("Invalid Map Directory", "The map directory '" + mapDir + "' does not exist!\n" + "Please select menu 'File->Options...' and correct that.", JOptionPane.ERROR_MESSAGE); return; - } else { - absScriptPath = mapDir.getAbsolutePath() + scriptPath; } } else { // script path is relative @@ -556,11 +553,11 @@ if (newScriptFile.exists()) { if (newScriptFile.isFile()) { // file exists -> link it to the event - ScriptedEvent event = new ScriptedEvent(eventType, pluginName, scriptPath, eventOptions); - if (replaceIndex != -1) { - eventList.setElementAt(event, replaceIndex); - } else { + final ScriptedEvent event = new ScriptedEvent(eventType, pluginName, scriptPath, eventOptions); + if (replaceIndex == -1) { eventList.addElement(event); + } else { + eventList.setElementAt(event, replaceIndex); } frame.setVisible(false); // close dialog } @@ -579,14 +576,10 @@ try { // try to create new empty file couldCreateFile = newScriptFile.createNewFile(); - } catch (IOException e) { + } catch (final IOException e) { } - if (!couldCreateFile) { - JOptionPane.showMessageDialog(frame, "File '" + newScriptFile.getName() + "' could not be created.\n" + - "Please check your path and write premissions.", - "Cannot create file", JOptionPane.ERROR_MESSAGE); - } else { + if (couldCreateFile) { // file has been created, now link it to the event ScriptedEvent event = new ScriptedEvent(eventType, pluginName, scriptPath, eventOptions); if (replaceIndex != -1) { @@ -598,6 +591,10 @@ // open new script file ScriptEditControl.getInstance().openScriptFile(newScriptFile.getAbsolutePath()); + } else { + JOptionPane.showMessageDialog(frame, "File '" + newScriptFile.getName() + "' could not be created.\n" + + "Please check your path and write premissions.", + "Cannot create file", JOptionPane.ERROR_MESSAGE); } } } @@ -611,8 +608,6 @@ return eventList == null || eventList.size() == 0; } - // ------------------------------- SUBCLASSES ------------------------------------ - /** Subclass which stores information about one scripted event. */ private class ScriptedEvent { @@ -628,14 +623,14 @@ * Construct a ScriptedEvent of given type (This is used for map-loading) * @param eventType */ - public ScriptedEvent(String eventType) { + ScriptedEvent(final String eventType) { this.eventType = eventType; pluginName = null; filePath = null; } /** Construct a fully initialized ScriptedEvent. */ - public ScriptedEvent(String eventType, String pluginName, String filePath, String eventOptions) { + ScriptedEvent(final String eventType, final String pluginName, final String filePath, final String eventOptions) { this.eventType = eventType; this.pluginName = pluginName; this.filePath = filePath; @@ -666,18 +661,18 @@ /** @return text for this events, how it is written in a mapfile */ public String getMapArchText() { - StringBuffer buff = new StringBuffer(""); - buff.append("event_" + eventType + "_plugin " + pluginName + "\n"); - buff.append("event_" + eventType + " " + filePath + "\n"); + final StringBuilder buff = new StringBuilder(""); + buff.append("event_").append(eventType).append("_plugin ").append(pluginName).append("\n"); + buff.append("event_").append(eventType).append(" ").append(filePath).append("\n"); if (eventOptions != null && eventOptions.trim().length() > 0) { - buff.append("event_" + eventType + "_options " + eventOptions + "\n"); + buff.append("event_").append(eventType).append("_options ").append(eventOptions).append("\n"); } return buff.toString(); } /** @return a cloned instance of this object */ public ScriptedEvent getClone() { - ScriptedEvent clone = new ScriptedEvent(eventType); + final ScriptedEvent clone = new ScriptedEvent(eventType); clone.pluginName = pluginName; clone.filePath = filePath; clone.eventOptions = eventOptions; @@ -687,31 +682,31 @@ /** Opens the script pad to display the script for this event. */ public void openScript() { - CMainControl m_control = CMainControl.getInstance(); // refernce to main control + CMainControl mainControl = CMainControl.getInstance(); // refernce to main control String path = ""; // file path to script file // trying to get the absolute path to scriptfile: if (filePath.startsWith("/")) { // filepath is absolue (to map base directory): - path = m_control.getMapDefaultFolder(); + path = mainControl.getMapDefaultFolder(); path += filePath; } else { // file path is relative to map dir - path = m_control.getCurrentMap().getMapFile().getParentFile().getAbsolutePath(); // map dir + path = mainControl.getCurrentMap().getMapFile().getParentFile().getAbsolutePath(); // map dir if (!path.endsWith("/")) { - path = path + "/"; // append slash to map dir + path += "/"; // append slash to map dir } path += filePath; // append relative path to map dir path = path.replace('\\', '/'); // make sure there's only one kind of slash } // now see if that file really exists: - File scriptFile = new File(path); + final File scriptFile = new File(path); if (scriptFile.exists() && scriptFile.isFile()) { ScriptEditControl.getInstance().openScriptFile(scriptFile.getAbsolutePath()); } else { // file does not exist! - m_control.showMessage("Script file not found", + mainControl.showMessage("Script file not found", "The file '" + path + "' does not exist.\nPlease correct the path.", JOptionPane.ERROR_MESSAGE); } } @@ -758,13 +753,13 @@ // button panel: line = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JButton okButton = new JButton("OK"); - okListener = new pathButtonListener(true, pathFrame, null); + okListener = new PathButtonListener(true, pathFrame, null); okListener.setTargetEvent(this); okButton.addActionListener(okListener); line.add(okButton); JButton cancelButton = new JButton("Cancel"); - ccListener = new pathButtonListener(false, pathFrame, null); + ccListener = new PathButtonListener(false, pathFrame, null); ccListener.setTargetEvent(this); cancelButton.addActionListener(ccListener); line.add(cancelButton); @@ -816,55 +811,56 @@ return filePath; } - public void setPluginName(String name) { + public void setPluginName(final String name) { pluginName = name; } - public void setFilePath(String path) { + public void setFilePath(final String path) { filePath = path; } - public void setEventOptions(String options) { + public void setEventOptions(final String options) { eventOptions = options; } - } + } // class ScriptedEvent + /** * Small class, listening for button-press events in the popup frame for * script paths or create-new-event frame. */ - private class pathButtonListener implements ActionListener { + private class PathButtonListener implements ActionListener { - private JDialog frame = null; + private JDialog frame; - private boolean isOkButton = false; + private boolean isOkButton; - private ScriptedEvent target = null; // target event + private ScriptedEvent target; // target event - private ScriptArchData sdata = null; // script arch data + private ScriptArchData sdata; // script arch data /** * Constructor * @param isOkButton true for ok-buttons * @param frame frame this listener belongs to - * @param sdata this is only set for the ok-button of "create new" - * frame, otherwise null + * @param sdata this is only set for the ok-button of "create new" frame, otherwise null */ - public pathButtonListener(boolean isOkButton, JDialog frame, ScriptArchData sdata) { + PathButtonListener(final boolean isOkButton, final JDialog frame, final ScriptArchData sdata) { this.isOkButton = isOkButton; this.frame = frame; this.sdata = sdata; } - public void setTargetEvent(ScriptedEvent newt) { + public void setTargetEvent(final ScriptedEvent newt) { target = newt; } - public void setSdata(ScriptArchData newsd) { + public void setSdata(final ScriptArchData newsd) { sdata = newsd; } - public void actionPerformed(ActionEvent e) { + /** {@inheritDoc} */ + public void actionPerformed(final ActionEvent e) { if (isOkButton && sdata == null && target != null) { target.modifyEventPath(); // ok button for modifying path } @@ -876,20 +872,7 @@ frame.setVisible(false); // hide dialog } } - } - /** - * FileFilterPython is a subclass which filters *.py files int the - * JFileChooser dialog. - */ - public class FileFilterPython extends FileFilter { + } // class PathButtonListener - public String getDescription() { - return "*.py"; - } - - public boolean accept(File f) { - return f.isDirectory() || f.getName().endsWith(".py"); - } - } -} +} // class ScriptArchData Added: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties (rev 0) +++ trunk/crossfire/src/cfeditor/action.properties 2006-05-30 23:31:10 UTC (rev 87) @@ -0,0 +1,4 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +ActionFactory.additionalBundles=cfeditor.messages Property changes on: trunk/crossfire/src/cfeditor/action.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties (rev 0) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-05-30 23:31:10 UTC (rev 87) @@ -0,0 +1,4 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +fileDialog.filter.python=Python Scripts Property changes on: trunk/crossfire/src/cfeditor/messages.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-05-30 23:31:10 UTC (rev 87) @@ -36,7 +36,7 @@ import daieditor.arch.face.FaceObjects; import daieditor.arch.match.MutableOrArchObjectMatcher; import daieditor.arch.match.ViewArchObjectMatcherManager; -import daieditor.gui.HideFileFilterProxy; +import net.sf.gridarta.gui.HideFileFilterProxy; import daieditor.gui.MapFileFilter; import daieditor.gui.map.MapCursorControl; import daieditor.gui.map.MapPreviewAccessory; @@ -738,6 +738,9 @@ /** Swing FileFilter for Lua scripts. */ public static final FileFilter luaFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ACTION_FACTORY.getString("fileDialog.filter.lua"), ".lua")); + /** Swing FileFilter for Lua scripts. */ + public static final FileFilter pythonFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ACTION_FACTORY.getString("fileDialog.filter.python"), ".py")); + /** Swing FileFilter for png graphics. */ public static final FileFilter pngFileFilter = new HideFileFilterProxy(new EndingFileFilter(true, ACTION_FACTORY.getString("fileDialog.filter.png"), ".png")); Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-05-30 23:31:10 UTC (rev 87) @@ -104,7 +104,7 @@ } } - /** Initialize the JComboBox with the event types */ + /** Initialize the JComboBox with the event types. */ private static synchronized void initEventTypeBoxes() { pluginNameBox = new JComboBox(new String[]{" Lua "}); pluginNameBox.setSelectedIndex(0); @@ -333,23 +333,23 @@ // event type mainPanel.add(Box.createVerticalStrut(10)); line = new JPanel(new FlowLayout(FlowLayout.LEFT)); - JLabel tlabel = new JLabel("Event Type: "); - line.add(tlabel); + JLabel tlabel1 = new JLabel("Event Type: "); + line.add(tlabel1); line.add(eventTypeBox); //mainPanel.add(line); line.add(Box.createHorizontalStrut(10)); // plugin name - tlabel = new JLabel("Plugin: "); - line.add(tlabel); + JLabel tlabel2 = new JLabel("Plugin: "); + line.add(tlabel2); line.add(pluginNameBox); mainPanel.add(line); // path mainPanel.add(Box.createVerticalStrut(5)); line = new JPanel(new FlowLayout(FlowLayout.LEFT)); - tlabel = new JLabel("Script File:"); - line.add(tlabel); + JLabel tlabel3 = new JLabel("Script File:"); + line.add(tlabel3); mainPanel.add(line); inputNFPath = new JTextField(defScriptName, 20); final JButton browseb = new JButton("..."); @@ -388,10 +388,10 @@ line = new JPanel(new FlowLayout(FlowLayout.LEFT)); final JPanel textPanel = new JPanel(); textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.Y_AXIS)); - tlabel = new JLabel("When you specify an existing file, the new event will be linked"); - textPanel.add(tlabel); - tlabel = new JLabel("to that existing script. Otherwise a new script file is created."); - textPanel.add(tlabel); + tlabel3 = new JLabel("When you specify an existing file, the new event will be linked"); + textPanel.add(tlabel3); + tlabel3 = new JLabel("to that existing script. Otherwise a new script file is created."); + textPanel.add(tlabel3); line.add(textPanel); mainPanel.add(line); @@ -779,10 +779,10 @@ } // class ScriptedEvent /** - * Small class, listening for button-press events in the - * popup frame for script paths or create-new-event frame + * Small class, listening for button-press events in the popup frame for + * script paths or create-new-event frame. */ - private final class PathButtonListener implements ActionListener { + private class PathButtonListener implements ActionListener { private JDialog frame; @@ -827,6 +827,7 @@ frame.setVisible(false); // hide dialog } } + } // class PathButtonListener } // class ScriptArchData Deleted: trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java =================================================================== --- trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java 2006-05-30 23:22:11 UTC (rev 86) +++ trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java 2006-05-30 23:31:10 UTC (rev 87) @@ -1,61 +0,0 @@ -/* - * Daimonin Java Editor - * Copyright (C) 2005 Christian Hujer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - * - */ - -package daieditor.gui; - -import java.io.File; -import net.sf.japi.util.filter.file.AbstractFileFilter; - -/** - * A FileFilter that wraps another FileFilter and filters out CVS and .xvpics files. - * The description and other filtering are taken from the wrapped file filter. - * @author <a href="mailto:Chr...@it...">Christian Hujer</a> - */ -public class HideFileFilterProxy extends AbstractFileFilter { - - /** The other filefilter. */ - private final AbstractFileFilter other; - - /** - * Create a HideFileFilterProxy. - * @param other FileFilter to wrap - */ - public HideFileFilterProxy(final AbstractFileFilter other) { - this.other = other; - } - - /** - * {@inheritDoc} - * Returns the description from the {@link #other} FileFilter. - */ - @Override public String getDescription() { - return other.getDescription(); - } - - /** - * {@inheritDoc} - * First checks whether the file should be hidden, if not, checks the other FileFilter. - */ - @Override public boolean accept(final File file) { - return !(file.isDirectory() && ("CVS".equals(file.getName()) || ".dedit".equals(file.getName()) || ".xvpics".equals(file.getName()))) && ((java.io.FileFilter) other).accept(file); - } - -} // class HideFileFilterProxy Copied: trunk/src/app/net/sf/gridarta/gui/HideFileFilterProxy.java (from rev 83, trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/HideFileFilterProxy.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/HideFileFilterProxy.java 2006-05-30 23:31:10 UTC (rev 87) @@ -0,0 +1,62 @@ +/* + * Gridarta Map Editor + * Copyright (C) 2005 Christian Hujer + * Copyright (C) 2006 The Gridarta Developers + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + */ + +package net.sf.gridarta.gui; + +import java.io.File; +import net.sf.japi.util.filter.file.AbstractFileFilter; + +/** + * A FileFilter that wraps another FileFilter and filters out CVS and .xvpics files. + * The description and other filtering are taken from the wrapped file filter. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class HideFileFilterProxy extends AbstractFileFilter { + + /** The other filefilter. */ + private final AbstractFileFilter other; + + /** + * Create a HideFileFilterProxy. + * @param other FileFilter to wrap + */ + public HideFileFilterProxy(final AbstractFileFilter other) { + this.other = other; + } + + /** + * {@inheritDoc} + * Returns the description from the {@link #other} FileFilter. + */ + @Override public String getDescription() { + return other.getDescription(); + } + + /** + * {@inheritDoc} + * First checks whether the file should be hidden, if not, checks the other FileFilter. + */ + @Override public boolean accept(final File file) { + return !(file.isDirectory() && ("CVS".equals(file.getName()) || ".dedit".equals(file.getName()) || ".xvpics".equals(file.getName()))) && ((java.io.FileFilter) other).accept(file); + } + +} // class HideFileFilterProxy This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-06-22 19:52:58
|
Revision: 173 Author: akirschbaum Date: 2006-06-22 12:52:42 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=173&view=rev Log Message: ----------- Prevent crash when collecting archetypes or treasurelists from unreadable or non-existent directories. Now such directories are silently ignored. Modified Paths: -------------- trunk/crossfire/CHANGES.txt trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java Modified: trunk/crossfire/CHANGES.txt =================================================================== --- trunk/crossfire/CHANGES.txt 2006-06-22 18:15:11 UTC (rev 172) +++ trunk/crossfire/CHANGES.txt 2006-06-22 19:52:42 UTC (rev 173) @@ -997,3 +997,10 @@ Reduce total memory consumption. Andreas Kirschbaum + +--- 22/06/2006 --- + +Prevent crash when collecting archetypes from unreadable or non-existent +directories. Now such directories are silently ignored. + +Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-06-22 18:15:11 UTC (rev 172) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-06-22 19:52:42 UTC (rev 173) @@ -330,9 +330,11 @@ folderLevel++; final String[] children = f.list(); - Arrays.sort(children); - for (int i = 0; i < children.length; i++) { - loadArchFromFiles(new File(f, children[i]), index); + if (children != null) { + Arrays.sort(children); + for (int i = 0; i < children.length; i++) { + loadArchFromFiles(new File(f, children[i]), index); + } } folderLevel--; } Modified: trunk/daimonin/src/daieditor/CFTreasureListTree.java =================================================================== --- trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-06-22 18:15:11 UTC (rev 172) +++ trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-06-22 19:52:42 UTC (rev 173) @@ -312,9 +312,11 @@ || name.toLowerCase().endsWith(".tl"); } }); - Arrays.sort(traverse); - for (final String entry : traverse) { - loadTreasureList(fname + File.separator + entry, tmpList, needLink); + if (traverse != null) { + Arrays.sort(traverse); + for (final String entry : traverse) { + loadTreasureList(fname + File.separator + entry, tmpList, needLink); + } } // This was a directory -> nothing to parse return; Modified: trunk/daimonin/src/daieditor/arch/ArchObjectStack.java =================================================================== --- trunk/daimonin/src/daieditor/arch/ArchObjectStack.java 2006-06-22 18:15:11 UTC (rev 172) +++ trunk/daimonin/src/daieditor/arch/ArchObjectStack.java 2006-06-22 19:52:42 UTC (rev 173) @@ -254,9 +254,11 @@ || name.toLowerCase().endsWith(".art"); } }); - Arrays.sort(traverse); - for (final String entry : traverse) { - loadArchesFromArtifacts(fname + File.separator + entry); + if (traverse != null) { + Arrays.sort(traverse); + for (final String entry : traverse) { + loadArchesFromArtifacts(fname + File.separator + entry); + } } // This was a directory -> nothing to parse return; @@ -391,7 +393,9 @@ // now, setup the arch panels if (CMainControl.arcFileFilter.accept(f)) { final String[] entries = f.list(); - Arrays.sort(entries); + if (entries != null) { + Arrays.sort(entries); + } if (!name.equalsIgnoreCase("intern") && !noPanel) { if (folderLevel > 0 && folderLevel < 2) { // add first folders as panels mainControl.addArchPanel(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-08-11 22:56:50
|
Revision: 249 Author: akirschbaum Date: 2006-08-11 15:56:44 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=249&view=rev Log Message: ----------- Prevent crash when saving inventory objects having a msg...endmsg field. Modified Paths: -------------- trunk/crossfire/CHANGES.txt trunk/crossfire/src/cfeditor/CMapFileEncode.java Modified: trunk/crossfire/CHANGES.txt =================================================================== --- trunk/crossfire/CHANGES.txt 2006-08-05 13:32:52 UTC (rev 248) +++ trunk/crossfire/CHANGES.txt 2006-08-11 22:56:44 UTC (rev 249) @@ -1004,3 +1004,9 @@ directories. Now such directories are silently ignored. Andreas Kirschbaum + +--- 12/08/2006 --- + +Prevent crash when saving inventory objects having a msg...endmsg field. + +Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-08-05 13:32:52 UTC (rev 248) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-08-11 22:56:44 UTC (rev 249) @@ -190,7 +190,7 @@ } } - if (arch.getMsgText() != null && !arch.getMsgText().trim().equals(defarch.getMsgText() == null ? "" : defarch.getMsgText().trim())) { + if (arch.getMsgText() != null && !arch.getMsgText().trim().equals((defarch == null || defarch.getMsgText() == null) ? "" : defarch.getMsgText().trim())) { String msg = ""; if (arch.getMsgText().trim().length() > 0) { msg = arch.getMsgText(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-08-31 17:59:55
|
Revision: 308 http://svn.sourceforge.net/gridarta/?rev=308&view=rev Author: akirschbaum Date: 2006-08-31 10:58:08 -0700 (Thu, 31 Aug 2006) Log Message: ----------- Update archetypes information. Modified Paths: -------------- trunk/crossfire/CHANGES.txt trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/crossfire.0 trunk/crossfire/resource/conf/treasures Modified: trunk/crossfire/CHANGES.txt =================================================================== --- trunk/crossfire/CHANGES.txt 2006-08-28 22:05:59 UTC (rev 307) +++ trunk/crossfire/CHANGES.txt 2006-08-31 17:58:08 UTC (rev 308) @@ -1016,3 +1016,9 @@ Prevent crash when saving inventory objects having a msg...endmsg field. Andreas Kirschbaum + +--- 31/08/2006 --- + +Update archetypes information. + +Andreas Kirschbaum Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2006-08-28 22:05:59 UTC (rev 307) +++ trunk/crossfire/resource/conf/archetypes 2006-08-31 17:58:08 UTC (rev 308) @@ -149,6 +149,7 @@ editable 5120 body_foot -2 item_power 1 +map_layer item editor_folder armour/boots end Object low_boots @@ -4505,6 +4506,7 @@ speed 0.50 editable 2 no_pick 1 +client_anim_random 1 editor_folder construct/fountain end Object darkhold @@ -8685,6 +8687,8 @@ face bone_head.111 type 98 invisible 1 +no_pick 1 +no_drop 1 editor_folder disease end Object incontinence @@ -14043,7 +14047,7 @@ msg Putting this shell to your ear, you hear a strange and haunting melody. - endmsg +endmsg type 35 level 40 value 590 @@ -15532,6 +15536,25 @@ smoothlevel 24 editor_folder ground/Winter end +Object evil_ice +type 102 +subtype 7 +level 1 +walk_on 1 +wc -30 +lifesave 1 +name strange looking ice +face evil_ice.111 +animation evil_ice +speed 0.2 +no_pick 1 +attacktype 16 +hp 1 +dam 10 +editable 8 +is_floor 1 +editor_folder ground/Winter +end Object glacier name glacier face glacier.111 @@ -16594,6 +16617,7 @@ editable 8 is_floor 1 smoothlevel 20 +client_anim_sync 1 editor_folder ground end Object sea1 @@ -16606,6 +16630,7 @@ editable 8 is_floor 1 smoothlevel 20 +client_anim_sync 1 editor_folder ground end Object sea_nw @@ -19816,6 +19841,33 @@ editable 128 editor_folder misc/Camp end +Object campfire_talking +name talking campfire +randomitems campfire_talking +face campfire.111 +type 73 +animation campfire_talking +glow_radius 2 +no_pick 1 +editable 128 +speed -0.3 +is_animated 1 +editor_folder misc/Camp +end +Object campfire_say +type 116 +subtype 6 +title Python +slaying /python/items/campfire_say.py +editor_folder misc/Camp +end +Object campfire_timer +type 116 +subtype 12 +title Python +slaying /python/items/campfire_timer.py +editor_folder misc/Camp +end Object campfire_out name old campfire face campfire_out.111 @@ -29854,7 +29906,7 @@ Object goblin randomitems goblin race goblin -face goblin.111 +face goblin.151 animation goblin monster 1 sleep 1 @@ -32764,7 +32816,8 @@ @match * I'm too busy to answer your queries. endmsg -face sage.111 +face sage.151 +animation c_sage Pow 5 Int 25 Dex 5 @@ -33665,7 +33718,8 @@ @match * I'm too busy to answer your queries. endmsg -face sage.111 +face sage.151 +animation sage Pow 5 Dex 5 Int 20 @@ -46211,7 +46265,7 @@ Object manabolt type 102 subtype 4 -face destruction.111 +face manabolt.111 animation manabolt flying 1 speed 1 @@ -46639,6 +46693,22 @@ editable 0 editor_folder spell/Bullet/Shell end +Object asteroid +other_arch snowstorm +type 102 +subtype 5 +face asteroid.112 +animation asteroid +is_animated 0 +is_turnable 1 +walk_on 1 +fly_on 1 +flying 1 +speed 1 +editable 0 +no_pick 1 +editor_folder spell/Bullet +end Object bullet type 102 subtype 5 @@ -46678,7 +46748,7 @@ Object cause_wounds type 102 subtype 5 -face healing.111 +face cause.111 animation cause_wounds is_animated 1 is_turnable 0 @@ -46747,7 +46817,7 @@ name uncontrolled mana type 102 subtype 6 -face destruction.111 +face manabolt.111 animation loose_magic speed 1 range 3 @@ -46762,7 +46832,7 @@ Object manaball type 102 subtype 6 -face destruction.111 +face manabolt.111 animation manaball hp 4 wc -50 @@ -46880,6 +46950,34 @@ attacktype 16 editor_folder spell/Bullet end +Object spell_asteroid +name asteroid +name_pl asteroid +face spell_evocation.111 +level 8 +value 80 +sp 15 +casting_time 10 +path_attuned 16 +other_arch asteroid +dam 75 +dam_modifier 1 +range 12 +duration 10 +duration_modifier 4 +maxsp 18 +type 101 +subtype 5 +attacktype 256 +no_drop 1 +invisible 1 +skill evocation +food 10 +msg +Info. +endmsg +editor_folder spell/Bullet +end Object spell_magic_bullet name magic bullet name_pl magic bullet @@ -48483,7 +48581,7 @@ subtype 7 walk_on 1 fly_on 1 -face destruction.111 +face manabolt.111 animation manablast speed 1 wc -50 @@ -51748,7 +51846,7 @@ other_arch divine_shock dam 1 dam_modifier 3 -duration 1 +duration 10 duration_modifier 4 maxgrace 5 attacktype 1048584 @@ -53083,7 +53181,7 @@ name godly retribution type 102 subtype 6 -face destruction.111 +face manabolt.111 animation god_power speed 1 range 4 @@ -53619,6 +53717,29 @@ invisible 1 editor_folder spell/Swarm end +Object spell_frost_nova +name frost nova +name_pl frost nova +face spell_evocation.111 +skill evocation +type 101 +subtype 36 +level 12 +value 120 +sp 30 +casting_time 12 +path_attuned 16 +other_arch spell_asteroid +duration 3 +duration_modifier 4 +maxsp 12 +no_drop 1 +invisible 1 +msg +Info on Frost Nova. +endmsg +editor_folder spell/Swarm +end Object spell_meteor_swarm name meteor swarm name_pl meteor swarm @@ -54097,6 +54218,11 @@ subtype 3 editor_folder system end +Object event_destroy +type 116 +subtype 13 +editor_folder system +end Object event_drop type 116 subtype 4 @@ -54127,7 +54253,7 @@ subtype 8 editor_folder system end -Object event_throw +Object event_timer type 116 subtype 12 editor_folder system @@ -54147,6 +54273,7 @@ Object map type 22 slaying /HallOfSelection +race /start/HallsOfSelection face map.111 x 16 y 16 @@ -55165,6 +55292,7 @@ level 1 face bul_wall_0.111 speed -0.4 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55180,6 +55308,7 @@ face bul_wall_1.111 sp 1 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55195,6 +55324,7 @@ face bul_wall_2.111 sp 2 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55210,6 +55340,7 @@ face bul_wall_3.111 sp 3 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55225,6 +55356,7 @@ face bul_wall_4.111 sp 4 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55240,6 +55372,7 @@ face bul_wall_5.111 sp 5 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55255,6 +55388,7 @@ face bul_wall_6.111 sp 6 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55270,6 +55404,7 @@ face bul_wall_7.111 sp 7 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55285,6 +55420,7 @@ face bul_wall_8.111 sp 8 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -55503,6 +55639,7 @@ resist_drain 100 no_pick 1 +no_pass 1 blocksview 1 alive 1 level 1 @@ -57655,6 +57792,7 @@ sp 1 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57671,6 +57809,7 @@ sp 2 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57687,6 +57826,7 @@ sp 3 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57703,6 +57843,7 @@ sp 4 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57719,6 +57860,7 @@ sp 5 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57735,6 +57877,7 @@ sp 6 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57751,6 +57894,7 @@ sp 7 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -57767,6 +57911,7 @@ sp 8 dam 1 speed -0.02 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58272,6 +58417,7 @@ name hedge face hedge_0.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58280,6 +58426,7 @@ name hedge face hedge_1.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58288,6 +58435,7 @@ name hedge face hedge_2.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58296,6 +58444,7 @@ name hedge face hedge_3.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58304,6 +58453,7 @@ name hedge face hedge_4.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58312,6 +58462,7 @@ name hedge face hedge_5.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58320,6 +58471,7 @@ name hedge face hedge_6.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58328,6 +58480,7 @@ name hedge face hedge_7.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58336,6 +58489,7 @@ name hedge face hedge_8.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58344,6 +58498,7 @@ name hedge face hedge_9.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58352,6 +58507,7 @@ name hedge face hedge_A.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58360,6 +58516,7 @@ name hedge face hedge_B.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58368,6 +58525,7 @@ name hedge face hedge_C.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58376,6 +58534,7 @@ name hedge face hedge_D.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58384,6 +58543,7 @@ name hedge face hedge_E.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58392,6 +58552,7 @@ name hedge face hedge_F.111 blocksview 1 +no_pick 1 is_wooded 1 editable 512 editor_folder wall/hedge @@ -58567,6 +58728,7 @@ animation lbulletwall is_animated 0 speed -0.16 +no_pick 1 no_pass 1 dam 29 blocksview 1 @@ -58584,6 +58746,7 @@ sp 1 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58600,6 +58763,7 @@ sp 2 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58616,6 +58780,7 @@ sp 3 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58632,6 +58797,7 @@ sp 4 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58648,6 +58814,7 @@ sp 5 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58664,6 +58831,7 @@ sp 6 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58680,6 +58848,7 @@ sp 7 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58696,6 +58865,7 @@ sp 8 dam 29 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58711,6 +58881,7 @@ dam 5 face light_wall.101 speed -0.1 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58730,6 +58901,7 @@ dam 5 is_animated 0 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58746,6 +58918,7 @@ sp 1 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58761,6 +58934,7 @@ face light_wall.121 sp 2 speed -0.04 +no_pick 1 no_pass 1 dam 5 blocksview 1 @@ -58778,6 +58952,7 @@ sp 3 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58794,6 +58969,7 @@ sp 4 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58810,6 +58986,7 @@ sp 5 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58826,6 +59003,7 @@ sp 6 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58842,6 +59020,7 @@ sp 7 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -58858,6 +59037,7 @@ sp 8 dam 5 speed -0.04 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -60131,6 +60311,7 @@ animation speedballwall dam 56 speed -0.03 +no_pick 1 no_pass 1 blocksview 1 editable 32 @@ -60299,6 +60480,7 @@ Object swall_0 name wall face swall_0.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60306,6 +60488,7 @@ Object swall_1_2 name wall face swall_1.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60313,6 +60496,7 @@ Object swall_1_2_half name wall face swall_1_half.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60320,6 +60504,7 @@ Object swall_1_4 name wall face swall_2.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60327,6 +60512,7 @@ Object swall_1_4_half name wall face swall_2_half.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60334,6 +60520,7 @@ Object swall_2_2_1 name wall face swall_3.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60341,6 +60528,7 @@ Object swall_1_1 name wall face swall_4.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60348,6 +60536,7 @@ Object swall_1_1_half name wall face swall_4_half.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60355,6 +60544,7 @@ Object swall_2_1_1 name wall face swall_5.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60362,6 +60552,7 @@ Object swall_2_2_2 name wall face swall_6.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60369,6 +60560,7 @@ Object swall_3_2 name wall face swall_7.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60376,6 +60568,7 @@ Object swall_1_3 name wall face swall_8.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60383,6 +60576,7 @@ Object swall_1_3_half name wall face swall_8_half.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60390,6 +60584,7 @@ Object swall_2_2_4 name wall face swall_9.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60397,6 +60592,7 @@ Object swall_2_1_2 name wall face swall_A.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60404,6 +60600,7 @@ Object swall_3_1 name wall face swall_B.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60411,6 +60608,7 @@ Object swall_2_2_3 name wall face swall_C.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60418,6 +60616,7 @@ Object swall_3_4 name wall face swall_D.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60425,6 +60624,7 @@ Object swall_3_3 name wall face swall_E.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall @@ -60432,6 +60632,7 @@ Object swall_4 name wall face swall_F.111 +no_pick 1 no_pass 1 editable 512 editor_folder wall/swall Modified: trunk/crossfire/resource/conf/crossfire.0 =================================================================== (Binary files differ) Modified: trunk/crossfire/resource/conf/treasures =================================================================== --- trunk/crossfire/resource/conf/treasures 2006-08-28 22:05:59 UTC (rev 307) +++ trunk/crossfire/resource/conf/treasures 2006-08-31 17:58:08 UTC (rev 308) @@ -6,7 +6,7 @@ # # This file contains various treasures, with generation rules. # -# $Id: treasures,v 1.9 2006/02/22 22:05:07 akirschbaum Exp $ +# $Id: treasures,v 1.87 2005/12/10 10:37:32 ryo_saeba Exp $ # # As of version 0.91.1, what this file was extended to handle list # re-linking and generation of only 1 item on that list. This does away @@ -4743,6 +4743,11 @@ arch building_mouthbook chance 2 end +treasure campfire_talking + arch campfire_say + more + arch campfire_timer +end treasure gps arch gps_event end @@ -4873,8 +4878,10 @@ more arch ring chance 90 - nrof 2 more + arch ring + chance 50 + more arch cloak end treasure leech @@ -4900,8 +4907,10 @@ more arch ring chance 90 - nrof 2 more + arch ring + chance 50 + more arch cloak more arch mithril_chainmail @@ -5146,8 +5155,10 @@ more arch ring chance 90 - nrof 2 more + arch ring + chance 50 + more arch cloak end treasure DK @@ -5581,7 +5592,7 @@ arch skill_karate end end -# note: punching and throwing arent good +# note: punching and throwing aren't good # combination to give to NPC's. They wind # throwing away their melee weapons! treasure pirate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-18 19:37:19
|
Revision: 336 http://svn.sourceforge.net/gridarta/?rev=336&view=rev Author: akirschbaum Date: 2006-09-18 12:37:10 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Restart ChangeLog file with more convenient formatting. Added Paths: ----------- trunk/crossfire/ChangeLog trunk/crossfire/ChangeLog.old Removed Paths: ------------- trunk/crossfire/CHANGES.txt Deleted: trunk/crossfire/CHANGES.txt =================================================================== --- trunk/crossfire/CHANGES.txt 2006-09-18 17:29:36 UTC (rev 335) +++ trunk/crossfire/CHANGES.txt 2006-09-18 19:37:10 UTC (rev 336) @@ -1,1024 +0,0 @@ ---- 20/06/2001 --- - -adding files for version 0.971 - -Status: - -Vendor Tag: yoyo -Release Tags: start - ---- 25/06/2001 --- - -I've added a nice feature to the JavaEditor: -The bottom-right window now displays all arch attributes -of a selected arch. It's much easier to modify them that -way. - --AV - ---- 26/06/2001 --- - -Fixed two bugs that caused some nasty exceptions -when loading new maps. (These resulted in the maps -being impossible to save.) - ---AV - ---- 27/06/2001 --- - -add script parsing to -archText & some minor insanity checks for read/write maps - ---- 29/06/2001 --- - -I've added cut/copy/paste functionality to -the Java Editor. (What good is an editor without it?) -That was a serious chunk of work, I hope -it still runs bug-free. :) - -The cut/copy/paste works similar to Crossedit. -Left-click-and-drag to highlight & select from Edit menu. - ---AV - ---- 06/07/2001 --- - -I've overhauled the view settings code in the Java Editor. - -The classification of objects used to be based on the -"editable" value from the archetype (default arch). But that -was not useful, because it was so unrelyable. E.g. floor arches -can be changed into secret exits, the archetype won't indicate -that. -That's why I changed the editable values to be calculated at -runtime, in the Java Editor. The values are now based on the -objects attributes and type. E.g. an object is considered -an "Exit" when it is of type 66 (exit) or 41 (teleporter). - -I've also made the view settings take effect on copy/paste -actions: All objects that are not shown on the map are -now ignored by copy/paste. -E.g. when selecting view->Monsters, I can copy/paste monsters -freely in my map without having to worry about getting -doubled background tiles. - -I corrected a bug in the parser that prevented the -"type" - attribute from being modified (Parser ignored it). - -Finally, I inserted a new menu under "view"-> "Reset View". -This works basically as a "Show All" for the view setting. - --AV - ---- 30/07/2001 --- - -Remove bug when map windows are cycled. Add x 16/y 16 hack -to map object in archfiles - ---- 02/08/2001 --- - -Lot's of new features to the JavaEditor: - -1) Clear command (edit menu): - Works exactly like cut, except that it doesn't write into - the copy-buffer. - -2) Fill command (edit menu): - There are two different fill-modes: - - For rectangular fill, left click and drag to highlight - a rectangular area. Then invoke fill. - - For floodfill, left click on an empty spot and do not - drag. By invoking fill all connected empty squares are - floodfilled. - -3) Delete (middle mouse button): - When you click on the map with the middle mouse button, - the topmost object on that spot is deleted. - Objects that don't match the view settings are not deleted. - This also works with dragging (multiple objects get deleted). - - Now the mouse works as follows: - left button - select - right button - insert - middle button - delete - -4) Rework of the map-tile panel (the window to the right): - - The objects are now displayed in the same order as - on the map. Topmost on the map => topmost on the panel. - - I have implemented the same mouse-button scheme - as in the map window: - left button - select - right button - insert - middle button - delete - - Inserting works similar to crossedit. You (right-)click on the - panel and the new arch gets inserted in that spot where - you clicked. - This even works for arches inside a container, but - the positioning in that case isn't perfect, that needs some more work. - -AndreasV - ---- 10/08/2001 --- - -new code for the JavaEditor... - -o First, I fixed up the way inventory items were - handed, as this was quite bugged. Items in containers - now save/load correct and they get deleted correct. - Besides, Cut/Copy/Paste now works with containers and - their inventory. - -o I seperated the map arch from the ordinary arch objects. - This was a big biiiig load of work. - ('map arch' = first arch object in the file, containing map attributes - like width, height etc). The map arch now has it's own class - (MapArchObject.java) with own fileparser and -writer methods. - This has a lot of advantages: The code is better organized, - the map attributes are easy accessible, and the map arch can be - expanded with new attributes at will without causing trouble. - - The new parser supports both map formats, old (sp, hp, value etc) and - new (width, height, swap_time etc). Even the map_tiling paths. - Still missing however is the proper user-interface for the map attributes. - That's gonna be the next step... - -o On my way diving through the code, I did a lot of cosmetics and - minor stuff. The file-modified '*' is now displayed a lot more - accurate, panel background is now green... stuff like that. - --AndreasV - ---- 11/08/2001 --- - -Now here comes the user-interface for the -map attributes. Selecting menu "map->map properties", -the user gets an input-mask for all the stuff -from the map arch. Even the new map-tiling is supported. - ---AndreasV - ---- 11/08/2001 --- - -A bunch of cosmetics and minor stuff, mostly -in relation to the recent changes. -Worth mentioning is maybe the improved file save/load -path-logic, and maximized size for newly -opened map-windows. - ---AndreasV - ---- 13/08/2001 --- - -Fixed a bug that prevented arch attributes -to get loaded properly from the map. ---AV - ---- 16/08/2001 --- - -Finally, I've included the sixlegs java png library -into the CFJavaEditor. Now the pngs are loaded with -the sixlegs lib, and all transparencies are now -set correctly! -A big thanks to Chris Nokleberg (the creator of sixlegs) -at this point. Today he sent me the last piece -I needed to make it all work. - -I'm sorry for the mess with the cvs directorys. CVS -is hell of an inconvenient program when it comes -to directory-management. - -Andreas V. - ---- 17/08/2001 --- - -New make files & makejar.bat for using -java sdk 1.3 & sixlegs png lib. - ---- 18/08/2001 --- - -In the MapArchPanel, parts of multi-objects now -display always the head's stats. Changes also get -saved to the head (similar to crossedit). - -I started implementing the "enter exit"-feature, -well known from crossedit. It's not completed yet -though, I'm gonna do that when I return from holiday -in a week. - ---Andreas V. - ---- 20/09/2001 --- - -Completed the "enter exit" feature. It works -very similar to Crossedit: Select and exit on -the map, activate menu "enter exit" (Strg-E) and the -destination map gets loaded. - ---AndreasV - ---- 21/09/2001 --- - -I've reworked some parts of the layout. Icon-Toolbar -is now left and the arch-message window is on a seperate -panel, for better size. -Besides I optimized some code a bit to speed up dragging for -insert/delete objects. - ---AndreasV - ---- 24/09/2001 --- - -I've implemented the auto-joining feature into -the CFJavaEditor. Activate it via menu "Map->Autojoin", -then any walls will join in the right way (similar -to crossedit). -The "joining-definitions" are written in an easily -customizable textfile called "autojoin.txt". - -This feature is very fast and memory-efficient. It -does not increase the loading time. - ---Andreas V. - ---- 29/09/2001 --- - -Another big update for the CFJavaEditor: -Multipart objects are now saved and loaded according to the -"new" map format as head-arches only. That was neccessary -for the JavaEditor in order to cope with maps generated -by recent versions of Crossedit. -It also makes map-files a good deal shorter. - ---Andreas V. - ---- 30/09/2001 --- - -New patch for CFJavaEditor: - -I made the map-loading process faster... a LOT faster. -Try enter-exit between some huge maps and you'll see what -I mean. -To achieve this, I reworked the view-settings concept -to do the nasty view-setting calculations not during -map loading but when the settings are actually needed instead. -Other optimizations followed. - -In the process I tweaked the map-loading methods to be resistent -against numerous kinds of corrupt mapfiles. - -Besides, I included a small new feature: The inventory of -multipart objects is now always stored in the multipart-head. -Every tile of a multipart now shows the one and same inventory. - ---Andreas V. - ---- 01/10/2001 --- - -This patch brings a major improvement in the graphic -routines, greatly increasing the speed for map-modifying -actions like select/insert/delete objects. - -Basically what I did was reducing the redraw actions of the -mapview to a minimum. Instead of drawing the entire map, -only the tiles that changed get redrawn. - -This works well for the standard (rectangular) view. -Unfortunately for iso this is much harder due to overlapping -tiles, so iso still uses the old (and slow) methods. - -I believe there is still an open end for speed improvements, -though the editor is already quite fast now. Only the arch -loading is still awefull... - ---Andreas V. - ---- 02/10/2001 --- - -Further improvements and finetuning to the new -drawing methods: - -Due to the direct drawing on the mapview, the tiles -used to "flicker" slightly when objects got drawn over -each other. To prevent this, tiles are now drawn into -a temporare buffer, then displayed as a whole. -This does not considerably slow anything down. - -Also corrected problems for tiles without background. - ---Andreas V. - ---- 03/10/2001 --- - -I extended the cut/copy/paste methods to enable -copying of multisquare objects. So they are finally -completed now, allowing to copy everything. - -I also did a few speed optimizations to the arch/image -loader. These reduce the loading time by 50% on my -machine. That's not much, but it's a start. - ---Andreas V. - ---- 16/10/01 --- - -I've added a proper online help document to the CFJavaEditor. -It's html, but I kept the style rather simple so far. -The online docu can be viewed by selecting the menu -"Help->Online Help". (Of course the .html files can as well -be viewed directly, with a browser). - -The online help so far describes how to use the editor, provides -some troubleshooting (->faq) and a few general guidelines -for map-making. - -I also added a file "INSTALL.txt" to the main folder, providing -information on how to install (= compile and run) the editor. - ---Andreas V. - ---- 5/11/01 --- - -editor had collect bad archfiles. -Now he can write negatives offsets. - ---Michael T. - ---- 22/11/01 --- - -New (increased) iso tile size for the Editor - ---Michael T. - ---- 23/11/01 --- - -Fixed up the JavaEditor to support the new iso-tile- -size better. - ---Andreas V. - ---- 27/11/01 --- - -Fixed some minor flaws in the archtext parser. - ---Andreas V. - ---- 10/02/2002 --- - -Added the attribute dialog feature, an interface -that provides an "easy" layer over the terrible true -crossfire archtext syntax. -The syntax definitions are read from a well-readable plain -text data file. Not all forms of input-values are supported -yet, but the foundation is laid and the rest will follow. - ---AndreasV - ---- 11/02/2002 --- - -Added support for floating point values in the -attribute dialogs. -Also extending the types.txt definitions file. - ---AndreasV - ---- 13/02/2002 --- - -The CFJavaEditor now works with JDK 1.4 -(and still with JDK 1.3 of course). - -There was a (per default) unset disabled icon, -which caused JDK 1.4 to try producing a greyed-out -icon from a png-imageProducer that didn't exist. -This resulted in runtime errors whenever clicking -on the mapview. Fixed now. - ---AndreasV - ---- 14/02/2002 --- - -Enhanced "types.txt" file and some cosmetics -in the code. - ---AndreasV - ---- 28/02/2002 --- - -The Attribute-Dialog now features a <Help> button. -By clicking on it, a (html) description pops up, telling how -the object works and how it can best be used. - -Also a lot of minor mods/fixes... -The map-tile window (right side window) now displays -object names instead of arch names. - ---AndreasV - ---- 19/02/2002 --- - -Great new feature in the JavaEditor: -Spellnumbers now get handled by the editor internally. -In the attribute-window the mapmaker can choose -spells by name conveniently, from a list. - -The spells are stored in a definitions file, -and they can be new imported from 'spellist.h' -automatically (In case they change). - -I have also upgraded the "types.txt"-file to make -use of the new features. -Added some new types on the way (disease and ability). - ---AndreasV - ---- 20/02/2002 --- - -Added four new kinds of attributes for "types.txt": - -- customized bool: for customizeable true/false values - instead of 1/0 -- direction: for a list of CF direction values - (north, northeast, east, ..., northwest) -- weapontype: for a list of CF weapontypes - (see weapotype code by Garbled) -- mood: for a list of CF moods (see moodfloor code) - -The last three appear as choosebox-lists, like spells. -With the help of these features, affected attributes -are a lot more intuitive and easier to understand. - ---AndreasV - ---- 21/02/2002 --- - -Fixed all Problems with JDK 1.4 afaik. -This new JDK differs quite a bit from version 1.3, which -resulted in a few "malfunctions" for the JavaEditor. -Now this should be resolved, working for both versions. - -Note that for most linux-users JDK 1.4 now works even better, -because it does not have the linux-font problems like 1.3. -So it looks a lot nicer! - ---AndreasV - ---- 24/02/2002 --- - -new features for the JavaEditor: - -- A new command in the file "types.txt" allows - to import attributes from one type to another. - This allowed to include all the common types - of equipment (girdles, helmets, bracers, rings etc.) - with relative ease. - - Now the type definitions for the editor include - almost everything that a mapmaker will need. - -- A doubleclick on an archobject in the right-side - window of the editor now opens an attribute-dialog - for this object. This works faster and is more - convenient than pressing the "attribute"-button - every time. - ---AndreasV - ---- 23/03/2002 --- - -Added support for single-button mice (for mac users). -Left- and middle-button can now be simulated by holding -<shift> or <ctrl>. -This patch was contributed by Josh Bonczkowski. - -Added ant build files for the JavaEditor, -also from Josh. - -Extended the online help docu a little bit to -cover latest features. - ---AndreasV - ---- 09/04/2002 --- - -New version of the JavaEditor: featuring support for -custom fonts. You can now choose a font from the "View->Choose Font"-menu. -This is very helpful for using larger screen resolutions -(like with flatscreens), where the default fonts are too small. - -Also done a lot of code cleanups, minor improvements and -correcting of javadoc comments. - ---AndreasV - ---- 16/04/2002, Version 0.973 --- - -I've added support for bitmask values in the -attribute-dialog. -No longer do mapmakers need to calculate those -ugly attacktype-, material- and spellpath values. -The attribute-dialog GUI presents the bitmasks in -text form now (like "physical, fire, cold" or "paper, iron") -and they can be modified conveniently by an array of -checkboxes. - -Several people have wished for this feature - I hope -they will enjoy what I have done. - -Andreas - ---- 19/04/2002, Version 0.973 --- - -fixed some bad behaviour in the JavaEditor GUIs - ---AndreasV - ---- 23/04/2002, Version 0.974 --- - -Added patches and new code concerning the attribute-dialog: -There used to be a problem with arch-attributes that are -not recognized from the type-definitions (in "types.txt"). -Such entrys in the archtext were deleted by the JavaEditor -when using the attribute-dialog interface. - -Now this handled in a better way: Entrys which are not -recognized are framed "syntax errors" and the user is -able to choose wether to keep or dump them. - -This is interesting as it often shows real errors -in maps that would otherwise be overlooked. -For example, many monsters have 'Str' and 'Dex' set -because nobody realized that those values have no effect. - -Also new is an automatic resizing of the attribute-dialog -when using larger fonts, and some fixes to the general -GUI behaviour. - ---Andreas - ---- 28/04/2002, Version 0.975 --- - -Lots of enhancements to the JavaEditor. I'm gonna -list only the most important ones here: - -o It is now possible to change (object-)types in the - attribute-dialog. Just select one from the choosebox! - The attribute dialog GUI will automatically change - to show all sections and values for the new type. - -o Created a new CFileReader class which allows to - load the resource-textfiles from the jar archive if they - don't exist in the directory. - (Removed the ugly broken code that was trying to do this before) - -o Fixed the default-layout that applies when someone starts - the CFJavaEditor for the first time on his machine. - This used to be real twisted, now it looks as it should. - -Also renamed the file "typdef.def" to "typenumbers.def". -The old name no longer fits, as the file will never get -extended to contain more than type numbers. - ---AndreasV - ---- 29/04/2002, Version 0.975 --- - -some more updates to the type-definitions - ---- 04/05/2002, Version 0.975 --- - -o Seperated map name from file name. When I first - coded this, I misunderstood the concept of map names. - It is now possible to have a different map name - and map file-name, as it should be. - -o Two fixes for ISO-view: - map.arc is now loaded but not displayed, rather - than not loaded at all. - Fixed a bug that caused the highlighting-tile - to get misplaced on large maps. - ---Andreas - ---- 23/07/2002, Version 0.975 --- - -Add support for the 'outdoor' flag in the map objects. - ---Mark Wedel - ---- 08/08/2002, Version 0.980 --- - -I changed the directory structure and setup of the JavaEditor -according to requests from Michael K. and others. The new setup -should be more conform with Java standards and more "organized". -One of the downsides is it will be more difficult to compile & run -the editor from sources for people with lesser Java experience. -I have removed former build scripts as they have to be completely -re-written now. - -A noticeable feature that was implemented in the process is -the ability to load all resource files (text, icons, data) -directly from the jar. This allows to make a jar-only release -of the editor in future. - -In the attribute-dialog, you'll notice a "summary" button at -the bottom of the window. If you click on that button, a list of -all attributes of the selected object are displayed. As the -attribute-interface sometimes has a lot of tabs and fields, -this new feature provides a quick overview of all attributes. - -The JavaEditor can now load arches from collected files. This -reduces loading time to about one third! It is still an option -to load from individual archfiles (See menu "File->Options"). -And, to combine both, you can even collect arches -(menu "Collect->Collect CF Arches"). So you don't need to worry -when your collected files get outdated for example. -From now on the JavaEditor has a collected version of the -archfiles included. That means you no longer need to worry about -arches at all unless you want to create custom arches or images. - -Added "Fill Below" menu option. This is also a feature that -had been requested a while ago. Works similar to the same thing -known from Crossedit. - -Updated the online help docu to cover latest features -an changed functionality. - -This reminds me, I've also created a documentation version-number. -Every time this number is increased, when a user updates his -editor and runs for the first time, the docu will popup automatically. -In this way, I hope to get users more aware of the documentation -and eventual changes/additions to it. In the past many users -did not know that a docu existed, even after long use of the editor. - ---AndreasV - ---- 29/08/2002, Version 0.981 --- - -Finally, I've implemented the concept of pickmaps -into the JavaEditor. - -Users are now able to pick arches either from the -conventional arch-list, or from various pickmaps. -Both can be found in the archpanel to the left side. - -Use of pickmaps saves a lot of time, as pickmaps can -show a lot more objects at once, in logical groups. -No more need to browse up and down in the arch-list -all the time. Moreover, pickmaps can contain customized -objects, in addition to default arches. -Unlike in Crossedit, the pickmaps here are seamlessly -integrated into the GUI. - -Of course it is also possible to modify pickmaps or -create new ones: Pickmaps are stored in standard CF -map format in the directory "resources/pickmaps". -They can be modified (or created) like any other map. - ---AndreasV - ---- 09/09/2002, Version 0.981 --- - -In the previous version is was not possible to insert objects -from a pickmap directly to the map-tile-window. -Now this can be done. - -I updated the type-definitions "types.txt" to support some -of the most important new attributes that have been added lately. - -Also updated the collected arch files to stay in sync -with CVS arches. - ---AndreasV - ---- 05/10/2002, Version 0.982 --- - -In the "Map"-menu there are now commands to move quickly between -tiled maps. This nice patch was contributed by Mark Wedel. - -New Feature: It is now possible to create a full size png-image -from any map in the editor. Not necessary for mapmaking, but maybe -handsome for Crossfire fans who want to tile their bathroom with -map-images... who knows ;-) - -While selecting tiles on a map (left-click and drag mouse), the -dimensions of the highlighted rectangle are now displayed in the -status-bar (bottom of window). - -Lots of bug fixes since last version of the editor. - ---AndreasV - ---- 24/10/2002, Version 0.983 --- - -Again, there is a brand new feature in the JavaEditor: Treasurelists! -The editor now offers a graphical tree of the treasurelists, where -you can click through the sub-lists and sub-sub-lists... -Of course this is also integrated into the attribute dialog: Just -click on the "treasurelist" attribute and the treasurelist-view is -directly opened. I have also included a fairly extensive piece of -online documenattion (for mapmakers) regarding this treasurelist-feature. -Lots of bug fixes since last version of the editor. - -I have applied a lot of GUI-improvements, but most of them -are not eye-catching changes. - -Updated "types.txt" file with corrections about ac and run_away, -as well as some other minor corrections. - ---AndreasV - ---- 23/01/2003, Version 0.984 --- - -The CFJavaEditor now features support for the python scripting plugin! -Look at the "script" tab on the bottom-mid frame: All scripted events -are fully managed in the editor. You can create/remove and edit -scripted events. But that's not all... - -CFJavaEditor now has it's very own ascii editor for viewing and -writing python scripts. It has real python syntax highlighting, -even an auto-complete popup menu for the CFPython package functions. - ---AndreasV - ---- 26/04/2003, Version 0.984 --- - -The primary datafile format is XML from now on. -I have chosen to included the Crimson XML parser for this purpose, -due to it's small size. The code is not dependant on this particular -parser however - it could be exchanged by any other java XML parser. - -The config files "types.xml", "spells.xml" and "typenumbers.xml" -have been converted already. - -Most important is the new format for "types.xml". The XML -is better readable and so much easier to extend and maintain. -Besides, the parser is validating, which means it can tell exact -line numbers in case of an error. - ---AndreasV - ---- 03/05/2003, Version 0.985 --- - -Added basic support for lore to the CFJavaEditor. -In the map properties window (select menu "Map->Map Properties"), -there now is a lore tab with a textarea for map lore. - -For now, arch-lore gets parsed but not displayed, which -practically disables lore in map-objects. - -The "replace" command is also new, which can be found in the -edit menu. This allows to replace (or delete) all objects matching -a certain name or archtype. This makes it very easy to accomplish -tasks like "replace all woodfloor with flagstones" or -"delete all no_spell arches". - ---AndreasV - ---- 07/07/2003, Version 0.95 --- - -Extended pickmaps to be fully dynamic. -It is now possible to insert objects from the map view to the -pickmap with right-click, and delete from pickmaps with middle- -click. That means pickmaps can be modified much like normal -maps - Shifting objects between map and pickmap, in both ways, -becomes very easy and fast. It even works for multiparts too. - -There is an entire new menu "Pickmaps" in the menu bar. -It offers commands to create new pickmaps, save pickmaps, -revert them to last saved state, and close them. - -For those who are fully satisfied with their pickmaps, -there is also a menu command to "Lock All Pickmaps". -This will disable any further changes to the pickmaps unless -they become unlocked again. In that way one can prevent -accidentally changing a pickmap by clicking the wrong -mouse button. - ---AndreasV - ---- 29/10/2003 --- - -Added some elevation intelligence. -When editing maps that have some elevation data, the elevation -data is propagated to the bottom of the stack of tiles during -insert, delete, and layer changing operations (move tile up, move -tile down). Server code that looks at elevation data expects to -find it at the bottom of the stack, which is where it naturally -belongs anyway, elevation is the height above sea level of the -ground, not of the tree or building on top of the ground. - -Note that elevation is only propagated up or down within a stack -of tiles. This means that if you delete all tiles in a particular -spot, then add a tile, there is no tile to propagate the elevation -from, so elevation needs to be set manually. Best to add a tile -first, then delete the old one if you want to keep the old -elevation. Naturally, if you are replacing hills with mountains, -you need to change the elevation manually anyway... - -David Seikel - ---- 14/09/2004 --- - -Added support for the 'other_arch' field in runes. - -Andreas Kirschbaum - ---- 19/07/2005 --- - -Added support for item transformers. - -Andreas Kirschbaum - ---- 08/09/2005 --- - -Do not strip leading (and trailing) whitespace from msg...endmsg and -maplore...endmaplore fields. - -Andreas Kirschbaum - ---- 11/09/2005 --- - -Remove unused import statements. - -Andreas Kirschbaum - ---- 13/09/2005 --- - -Added support for timed gates. - -Andreas Kirschbaum - ---- 14/09/2005 --- - -Do not add "name <untitled>" to maps that do not yet have a "name" field. - -Andreas Kirschbaum - ---- 24/09/2005 --- - -Fix help information for spellpoint regeneration rate and healing rate for -Monsters/NPCs. - -Andreas Kirschbaum - ---- 01/10/2005 --- - -Add support for shop related headers - -Brendan Lally - ---- 04/12/2005 --- - -Fix properties dialog (and make it compile again): display dialog box for -invalid shop greed values (instead printing a stack dump). - -Andreas Kirschbaum - ---- 08/02/2006 --- - -Fix display issues with map window. The problem was that the map window was -set to opaque in some look and feel settings but the paintComponent method did -not paint the whole window area. - -Andreas Kirschbaum - ---- 18/02/2006 --- - -Resize map window if map size is changed in map attributes window. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Fix spelling of "shopitems" header when loading and saving maps. It used to -save the incorrect header "shopitem". - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Save map header fields in same order as crossedit to prevent unnecessary map -differences when switching editors. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Mark map as being "modified" when pasting selections. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Implement map attributes 'template' and 'nosmooth'. - -Andreas Kirschbaum - ---- 19/02/2006 --- - -Make menu shortcuts work. Use different shortcuts for all entries. - -Andreas Kirschbaum - ---- 21/02/2006 --- - -Update archetypes information. - -Andreas Kirschbaum - ---- 21/02/2006 --- - -Make "View xxx" options in main menu work again. - -Andreas Kirschbaum - ---- 22/02/2006 --- - -Implement dialog for DOOR objects. - -Fix NullPointerException in View|Choose Font. Selecting a font now partially -works (not all controls are affected). - -Fix typo in File|Options...; also add hint about deferred effect of option -"Separate Map-Tile panel". - -Retain map view position when reverting a map. - -Update treasure lists, item types, and autojoin information. - -Andreas Kirschbaum - ---- 23/02/2006 --- - -Reverse sort order of tabs in Pickmaps and Arch List panels to make them -appear in alphabetical order. - -Fix sort order of objects in types.xml. - -Andreas Kirschbaum - ---- 25/02/2006 --- - -Implement attribute dialogs for Button Trigger, Class Changer, Key, and -Grimreaper object types. - -Indent sub-inventories in map tiles view to visualize nested inventories. - -Improve command line argument handling: -- allow to pass any number of map file names -- recognize "--" option to ignore further options -- print usage message for -h, -help, --help - -Properly report errors if a map file cannot be loaded. - -Andreas Kirschbaum - ---- 26/02/2006 --- - -Make sub-folder selection in archetypes work again. - -Andreas Kirschbaum - ---- 01/03/2006 --- - -Save object fields in same order as crossedit to prevent unnecessary map -differences when switching editors. - -Andreas Kirschbaum - ---- 02/03/2006 --- - -Fix crash due to missing synchronization in menu updates. - -Andreas Kirschbaum - ---- 21/03/2006 --- - -Reduce total memory consumption. - -Andreas Kirschbaum - ---- 22/06/2006 --- - -Prevent crash when collecting archetypes from unreadable or non-existent -directories. Now such directories are silently ignored. - -Andreas Kirschbaum - ---- 12/08/2006 --- - -Removed all ISO code. - -Christian Hujer - ---- 12/08/2006 --- - -Prevent crash when saving inventory objects having a msg...endmsg field. - -Andreas Kirschbaum - ---- 31/08/2006 --- - -Update archetypes information. - -Andreas Kirschbaum Added: trunk/crossfire/ChangeLog =================================================================== Property changes on: trunk/crossfire/ChangeLog ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: trunk/crossfire/ChangeLog.old (from rev 335, trunk/crossfire/CHANGES.txt) =================================================================== --- trunk/crossfire/ChangeLog.old (rev 0) +++ trunk/crossfire/ChangeLog.old 2006-09-18 19:37:10 UTC (rev 336) @@ -0,0 +1,1024 @@ +--- 20/06/2001 --- + +adding files for version 0.971 + +Status: + +Vendor Tag: yoyo +Release Tags: start + +--- 25/06/2001 --- + +I've added a nice feature to the JavaEditor: +The bottom-right window now displays all arch attributes +of a selected arch. It's much easier to modify them that +way. + +-AV + +--- 26/06/2001 --- + +Fixed two bugs that caused some nasty exceptions +when loading new maps. (These resulted in the maps +being impossible to save.) + +--AV + +--- 27/06/2001 --- + +add script parsing to +archText & some minor insanity checks for read/write maps + +--- 29/06/2001 --- + +I've added cut/copy/paste functionality to +the Java Editor. (What good is an editor without it?) +That was a serious chunk of work, I hope +it still runs bug-free. :) + +The cut/copy/paste works similar to Crossedit. +Left-click-and-drag to highlight & select from Edit menu. + +--AV + +--- 06/07/2001 --- + +I've overhauled the view settings code in the Java Editor. + +The classification of objects used to be based on the +"editable" value from the archetype (default arch). But that +was not useful, because it was so unrelyable. E.g. floor arches +can be changed into secret exits, the archetype won't indicate +that. +That's why I changed the editable values to be calculated at +runtime, in the Java Editor. The values are now based on the +objects attributes and type. E.g. an object is considered +an "Exit" when it is of type 66 (exit) or 41 (teleporter). + +I've also made the view settings take effect on copy/paste +actions: All objects that are not shown on the map are +now ignored by copy/paste. +E.g. when selecting view->Monsters, I can copy/paste monsters +freely in my map without having to worry about getting +doubled background tiles. + +I corrected a bug in the parser that prevented the +"type" - attribute from being modified (Parser ignored it). + +Finally, I inserted a new menu under "view"-> "Reset View". +This works basically as a "Show All" for the view setting. + +-AV + +--- 30/07/2001 --- + +Remove bug when map windows are cycled. Add x 16/y 16 hack +to map object in archfiles + +--- 02/08/2001 --- + +Lot's of new features to the JavaEditor: + +1) Clear command (edit menu): + Works exactly like cut, except that it doesn't write into + the copy-buffer. + +2) Fill command (edit menu): + There are two different fill-modes: + - For rectangular fill, left click and drag to highlight + a rectangular area. Then invoke fill. + - For floodfill, left click on an empty spot and do not + drag. By invoking fill all connected empty squares are + floodfilled. + +3) Delete (middle mouse button): + When you click on the map with the middle mouse button, + the topmost object on that spot is deleted. + Objects that don't match the view settings are not deleted. + This also works with dragging (multiple objects get deleted). + + Now the mouse works as follows: + left button - select + right button - insert + middle button - delete + +4) Rework of the map-tile panel (the window to the right): + - The objects are now displayed in the same order as + on the map. Topmost on the map => topmost on the panel. + - I have implemented the same mouse-button scheme + as in the map window: + left button - select + right button - insert + middle button - delete + + Inserting works similar to crossedit. You (right-)click on the + panel and the new arch gets inserted in that spot where + you clicked. + This even works for arches inside a container, but + the positioning in that case isn't perfect, that needs some more work. + +AndreasV + +--- 10/08/2001 --- + +new code for the JavaEditor... + +o First, I fixed up the way inventory items were + handed, as this was quite bugged. Items in containers + now save/load correct and they get deleted correct. + Besides, Cut/Copy/Paste now works with containers and + their inventory. + +o I seperated the map arch from the ordinary arch objects. + This was a big biiiig load of work. + ('map arch' = first arch object in the file, containing map attributes + like width, height etc). The map arch now has it's own class + (MapArchObject.java) with own fileparser and -writer methods. + This has a lot of advantages: The code is better organized, + the map attributes are easy accessible, and the map arch can be + expanded with new attributes at will without causing trouble. + + The new parser supports both map formats, old (sp, hp, value etc) and + new (width, height, swap_time etc). Even the map_tiling paths. + Still missing however is the proper user-interface for the map attributes. + That's gonna be the next step... + +o On my way diving through the code, I did a lot of cosmetics and + minor stuff. The file-modified '*' is now displayed a lot more + accurate, panel background is now green... stuff like that. + +-AndreasV + +--- 11/08/2001 --- + +Now here comes the user-interface for the +map attributes. Selecting menu "map->map properties", +the user gets an input-mask for all the stuff +from the map arch. Even the new map-tiling is supported. + +--AndreasV + +--- 11/08/2001 --- + +A bunch of cosmetics and minor stuff, mostly +in relation to the recent changes. +Worth mentioning is maybe the improved file save/load +path-logic, and maximized size for newly +opened map-windows. + +--AndreasV + +--- 13/08/2001 --- + +Fixed a bug that prevented arch attributes +to get loaded properly from the map. +--AV + +--- 16/08/2001 --- + +Finally, I've included the sixlegs java png library +into the CFJavaEditor. Now the pngs are loaded with +the sixlegs lib, and all transparencies are now +set correctly! +A big thanks to Chris Nokleberg (the creator of sixlegs) +at this point. Today he sent me the last piece +I needed to make it all work. + +I'm sorry for the mess with the cvs directorys. CVS +is hell of an inconvenient program when it comes +to directory-management. + +Andreas V. + +--- 17/08/2001 --- + +New make files & makejar.bat for using +java sdk 1.3 & sixlegs png lib. + +--- 18/08/2001 --- + +In the MapArchPanel, parts of multi-objects now +display always the head's stats. Changes also get +saved to the head (similar to crossedit). + +I started implementing the "enter exit"-feature, +well known from crossedit. It's not completed yet +though, I'm gonna do that when I return from holiday +in a week. + +--Andreas V. + +--- 20/09/2001 --- + +Completed the "enter exit" feature. It works +very similar to Crossedit: Select and exit on +the map, activate menu "enter exit" (Strg-E) and the +destination map gets loaded. + +--AndreasV + +--- 21/09/2001 --- + +I've reworked some parts of the layout. Icon-Toolbar +is now left and the arch-message window is on a seperate +panel, for better size. +Besides I optimized some code a bit to speed up dragging for +insert/delete objects. + +--AndreasV + +--- 24/09/2001 --- + +I've implemented the auto-joining feature into +the CFJavaEditor. Activate it via menu "Map->Autojoin", +then any walls will join in the right way (similar +to crossedit). +The "joining-definitions" are written in an easily +customizable textfile called "autojoin.txt". + +This feature is very fast and memory-efficient. It +does not increase the loading time. + +--Andreas V. + +--- 29/09/2001 --- + +Another big update for the CFJavaEditor: +Multipart objects are now saved and loaded according to the +"new" map format as head-arches only. That was neccessary +for the JavaEditor in order to cope with maps generated +by recent versions of Crossedit. +It also makes map-files a good deal shorter. + +--Andreas V. + +--- 30/09/2001 --- + +New patch for CFJavaEditor: + +I made the map-loading process faster... a LOT faster. +Try enter-exit between some huge maps and you'll see what +I mean. +To achieve this, I reworked the view-settings concept +to do the nasty view-setting calculations not during +map loading but when the settings are actually needed instead. +Other optimizations followed. + +In the process I tweaked the map-loading methods to be resistent +against numerous kinds of corrupt mapfiles. + +Besides, I included a small new feature: The inventory of +multipart objects is now always stored in the multipart-head. +Every tile of a multipart now shows the one and same inventory. + +--Andreas V. + +--- 01/10/2001 --- + +This patch brings a major improvement in the graphic +routines, greatly increasing the speed for map-modifying +actions like select/insert/delete objects. + +Basically what I did was reducing the redraw actions of the +mapview to a minimum. Instead of drawing the entire map, +only the tiles that changed get redrawn. + +This works well for the standard (rectangular) view. +Unfortunately for iso this is much harder due to overlapping +tiles, so iso still uses the old (and slow) methods. + +I believe there is still an open end for speed improvements, +though the editor is already quite fast now. Only the arch +loading is still awefull... + +--Andreas V. + +--- 02/10/2001 --- + +Further improvements and finetuning to the new +drawing methods: + +Due to the direct drawing on the mapview, the tiles +used to "flicker" slightly when objects got drawn over +each other. To prevent this, tiles are now drawn into +a temporare buffer, then displayed as a whole. +This does not considerably slow anything down. + +Also corrected problems for tiles without background. + +--Andreas V. + +--- 03/10/2001 --- + +I extended the cut/copy/paste methods to enable +copying of multisquare objects. So they are finally +completed now, allowing to copy everything. + +I also did a few speed optimizations to the arch/image +loader. These reduce the loading time by 50% on my +machine. That's not much, but it's a start. + +--Andreas V. + +--- 16/10/01 --- + +I've added a proper online help document to the CFJavaEditor. +It's html, but I kept the style rather simple so far. +The online docu can be viewed by selecting the menu +"Help->Online Help". (Of course the .html files can as well +be viewed directly, with a browser). + +The online help so far describes how to use the editor, provides +some troubleshooting (->faq) and a few general guidelines +for map-making. + +I also added a file "INSTALL.txt" to the main folder, providing +information on how to install (= compile and run) the editor. + +--Andreas V. + +--- 5/11/01 --- + +editor had collect bad archfiles. +Now he can write negatives offsets. + +--Michael T. + +--- 22/11/01 --- + +New (increased) iso tile size for the Editor + +--Michael T. + +--- 23/11/01 --- + +Fixed up the JavaEditor to support the new iso-tile- +size better. + +--Andreas V. + +--- 27/11/01 --- + +Fixed some minor flaws in the archtext parser. + +--Andreas V. + +--- 10/02/2002 --- + +Added the attribute dialog feature, an interface +that provides an "easy" layer over the terrible true +crossfire archtext syntax. +The syntax definitions are read from a well-readable plain +text data file. Not all forms of input-values are supported +yet, but the foundation is laid and the rest will follow. + +--AndreasV + +--- 11/02/2002 --- + +Added support for floating point values in the +attribute dialogs. +Also extending the types.txt definitions file. + +--AndreasV + +--- 13/02/2002 --- + +The CFJavaEditor now works with JDK 1.4 +(and still with JDK 1.3 of course). + +There was a (per default) unset disabled icon, +which caused JDK 1.4 to try producing a greyed-out +icon from a png-imageProducer that didn't exist. +This resulted in runtime errors whenever clicking +on the mapview. Fixed now. + +--AndreasV + +--- 14/02/2002 --- + +Enhanced "types.txt" file and some cosmetics +in the code. + +--AndreasV + +--- 28/02/2002 --- + +The Attribute-Dialog now features a <Help> button. +By clicking on it, a (html) description pops up, telling how +the object works and how it can best be used. + +Also a lot of minor mods/fixes... +The map-tile window (right side window) now displays +object names instead of arch names. + +--AndreasV + +--- 19/02/2002 --- + +Great new feature in the JavaEditor: +Spellnumbers now get handled by the editor internally. +In the attribute-window the mapmaker can choose +spells by name conveniently, from a list. + +The spells are stored in a definitions file, +and they can be new imported from 'spellist.h' +automatically (In case they change). + +I have also upgraded the "types.txt"-file to make +use of the new features. +Added some new types on the way (disease and ability). + +--AndreasV + +--- 20/02/2002 --- + +Added four new kinds of attributes for "types.txt": + +- customized bool: for customizeable true/false values + instead of 1/0 +- direction: for a list of CF direction values + (north, northeast, east, ..., northwest) +- weapontype: for a list of CF weapontypes + (see weapotype code by Garbled) +- mood: for a list of CF moods (see moodfloor code) + +The last three appear as choosebox-lists, like spells. +With the help of these features, affected attributes +are a lot more intuitive and easier to understand. + +--AndreasV + +--- 21/02/2002 --- + +Fixed all Problems with JDK 1.4 afaik. +This new JDK differs quite a bit from version 1.3, which +resulted in a few "malfunctions" for the JavaEditor. +Now this should be resolved, working for both versions. + +Note that for most linux-users JDK 1.4 now works even better, +because it does not have the linux-font problems like 1.3. +So it looks a lot nicer! + +--AndreasV + +--- 24/02/2002 --- + +new features for the JavaEditor: + +- A new command in the file "types.txt" allows + to import attributes from one type to another. + This allowed to include all the common types + of equipment (girdles, helmets, bracers, rings etc.) + with relative ease. + + Now the type definitions for the editor include + almost everything that a mapmaker will need. + +- A doubleclick on an archobject in the right-side + window of the editor now opens an attribute-dialog + for this object. This works faster and is more + convenient than pressing the "attribute"-button + every time. + +--AndreasV + +--- 23/03/2002 --- + +Added support for single-button mice (for mac users). +Left- and middle-button can now be simulated by holding +<shift> or <ctrl>. +This patch was contributed by Josh Bonczkowski. + +Added ant build files for the JavaEditor, +also from Josh. + +Extended the online help docu a little bit to +cover latest features. + +--AndreasV + +--- 09/04/2002 --- + +New version of the JavaEditor: featuring support for +custom fonts. You can now choose a font from the "View->Choose Font"-menu. +This is very helpful for using larger screen resolutions +(like with flatscreens), where the default fonts are too small. + +Also done a lot of code cleanups, minor improvements and +correcting of javadoc comments. + +--AndreasV + +--- 16/04/2002, Version 0.973 --- + +I've added support for bitmask values in the +attribute-dialog. +No longer do mapmakers need to calculate those +ugly attacktype-, material- and spellpath values. +The attribute-dialog GUI presents the bitmasks in +text form now (like "physical, fire, cold" or "paper, iron") +and they can be modified conveniently by an array of +checkboxes. + +Several people have wished for this feature - I hope +they will enjoy what I have done. + +Andreas + +--- 19/04/2002, Version 0.973 --- + +fixed some bad behaviour in the JavaEditor GUIs + +--AndreasV + +--- 23/04/2002, Version 0.974 --- + +Added patches and new code concerning the attribute-dialog: +There used to be a problem with arch-attributes that are +not recognized from the type-definitions (in "types.txt"). +Such entrys in the archtext were deleted by the JavaEditor +when using the attribute-dialog interface. + +Now this handled in a better way: Entrys which are not +recognized are framed "syntax errors" and the user is +able to choose wether to keep or dump them. + +This is interesting as it often shows real errors +in maps that would otherwise be overlooked. +For example, many monsters have 'Str' and 'Dex' set +because nobody realized that those values have no effect. + +Also new is an automatic resizing of the attribute-dialog +when using larger fonts, and some fixes to the general +GUI behaviour. + +--Andreas + +--- 28/04/2002, Version 0.975 --- + +Lots of enhancements to the JavaEditor. I'm gonna +list only the most important ones here: + +o It is now possible to change (object-)types in the + attribute-dialog. Just select one from the choosebox! + The attribute dialog GUI will automatically change + to show all sections and values for the new type. + +o Created a new CFileReader class which allows to + load the resource-textfiles from the jar archive if they + don't exist in the directory. + (Removed the ugly broken code that was trying to do this before) + +o Fixed the default-layout that applies when someone starts + the CFJavaEditor for the first time on his machine. + This used to be real twisted, now it looks as it should. + +Also renamed the file "typdef.def" to "typenumbers.def". +The old name no longer fits, as the file will never get +extended to contain more than type numbers. + +--AndreasV + +--- 29/04/2002, Version 0.975 --- + +some more updates to the type-definitions + +--- 04/05/2002, Version 0.975 --- + +o Seperated map name from file name. When I first + coded this, I misunderstood the concept of map names. + It is now possible to have a different map name + and map file-name, as it should be. + +o Two fixes for ISO-view: + map.arc is now loaded but not displayed, rather + than not loaded at all. + Fixed a bug that caused the highlighting-tile + to get misplaced on large maps. + +--Andreas + +--- 23/07/2002, Version 0.975 --- + +Add support for the 'outdoor' flag in the map objects. + +--Mark Wedel + +--- 08/08/2002, Version 0.980 --- + +I changed the directory structure and setup of the JavaEditor +according to requests from Michael K. and others. The new setup +should be more conform with Java standards and more "organized". +One of the downsides is it will be more difficult to compile & run +the editor from sources for people with lesser Java experience. +I have removed former build scripts as they have to be completely +re-written now. + +A noticeable feature that was implemented in the process is +the ability to load all resource files (text, icons, data) +directly from the jar. This allows to make a jar-only release +of the editor in future. + +In the attribute-dialog, you'll notice a "summary" button at +the bottom of the window. If you click on that button, a list of +all attributes of the selected object are displayed. As the +attribute-interface sometimes has a lot of tabs and fields, +this new feature provides a quick overview of all attributes. + +The JavaEditor can now load arches from collected files. This +reduces loading time to about one third! It is still an option +to load from individual archfiles (See menu "File->Options"). +And, to combine both, you can even collect arches +(menu "Collect->Collect CF Arches"). So you don't need to worry +when your collected files get outdated for example. +From now on the JavaEditor has a collected version of the +archfiles included. That means you no longer need to worry about +arches at all unless you want to create custom arches or images. + +Added "Fill Below" menu option. This is also a feature that +had been requested a while ago. Works similar to the same thing +known from Crossedit. + +Updated the online help docu to cover latest features +an changed functionality. + +This reminds me, I've also created a documentation version-number. +Every time this number is increased, when a user updates his +editor and runs for the first time, the docu will popup automatically. +In this way, I hope to get users more aware of the documentation +and eventual changes/additions to it. In the past many users +did not know that a docu existed, even after long use of the editor. + +--AndreasV + +--- 29/08/2002, Version 0.981 --- + +Finally, I've implemented the concept of pickmaps +into the JavaEditor. + +Users are now able to pick arches either from the +conventional arch-list, or from various pickmaps. +Both can be found in the archpanel to the left side. + +Use of pickmaps saves a lot of time, as pickmaps can +show a lot more objects at once, in logical groups. +No more need to browse up and down in the arch-list +all the time. Moreover, pickmaps can contain customized +objects, in addition to default arches. +Unlike in Crossedit, the pickmaps here are seamlessly +integrated into the GUI. + +Of course it is also possible to modify pickmaps or +create new ones: Pickmaps are stored in standard CF +map format in the directory "resources/pickmaps". +They can be modified (or created) like any other map. + +--AndreasV + +--- 09/09/2002, Version 0.981 --- + +In the previous version is was not possible to insert objects +from a pickmap directly to the map-tile-window. +Now this can be done. + +I updated the type-definitions "types.txt" to support some +of the most important new attributes that have been added lately. + +Also updated the collected arch files to stay in sync +with CVS arches. + +--AndreasV + +--- 05/10/2002, Version 0.982 --- + +In the "Map"-menu there are now commands to move quickly between +tiled maps. This nice patch was contributed by Mark Wedel. + +New Feature: It is now possible to create a full size png-image +from any map in the editor. Not necessary for mapmaking, but maybe +handsome for Crossfire fans who want to tile their bathroom with +map-images... who knows ;-) + +While selecting tiles on a map (left-click and drag mouse), the +dimensions of the highlighted rectangle are now displayed in the +status-bar (bottom of window). + +Lots of bug fixes since last version of the editor. + +--AndreasV + +--- 24/10/2002, Version 0.983 --- + +Again, there is a brand new feature in the JavaEditor: Treasurelists! +The editor now offers a graphical tree of the treasurelists, where +you can click through the sub-lists and sub-sub-lists... +Of course this is also integrated into the attribute dialog: Just +click on the "treasurelist" attribute and the treasurelist-view is +directly opened. I have also included a fairly extensive piece of +online documenattion (for mapmakers) regarding this treasurelist-feature. +Lots of bug fixes since last version of the editor. + +I have applied a lot of GUI-improvements, but most of them +are not eye-catching changes. + +Updated "types.txt" file with corrections about ac and run_away, +as well as some other minor corrections. + +--AndreasV + +--- 23/01/2003, Version 0.984 --- + +The CFJavaEditor now features support for the python scripting plugin! +Look at the "script" tab on the bottom-mid frame: All scripted events +are fully managed in the editor. You can create/remove and edit +scripted events. But that's not all... + +CFJavaEditor now has it's very own ascii editor for viewing and +writing python scripts. It has real python syntax highlighting, +even an auto-complete popup menu for the CFPython package functions. + +--AndreasV + +--- 26/04/2003, Version 0.984 --- + +The primary datafile format is XML from now on. +I have chosen to included the Crimson XML parser for this purpose, +due to it's small size. The code is not dependant on this particular +parser however - it could be exchanged by any other java XML parser. + +The config files "types.xml", "spells.xml" and "typenumbers.xml" +have been converted already. + +Most important is the new format for "types.xml". The XML +is better readable and so much easier to extend and maintain. +Besides, the parser is validating, which means it can tell exact +line numbers in case of an error. + +--AndreasV + +--- 03/05/2003, Version 0.985 --- + +Added basic support for lore to the CFJavaEditor. +In the map properties window (select menu "Map->Map Properties"), +there now is a lore tab with a textarea for map lore. + +For now, arch-lore gets parsed but not displayed, which +practically disables lore in map-objects. + +The "replace" command is also new, which can be found in the +edit menu. This allows to replace (or delete) all objects matching +a certain name or archtype. This makes it very easy to accomplish +tasks like "replace all woodfloor with flagstones" or +"delete all no_spell arches". + +--AndreasV + +--- 07/07/2003, Version 0.95 --- + +Extended pickmaps to be fully dynamic. +It is now possible to insert objects from the map view to the +pickmap with right-click, and delete from pickmaps with middle- +click. That means pickmaps can be modified much like normal +maps - Shifting objects between map and pickmap, in both ways, +becomes very easy and fast. It even works for multiparts too. + +There is an entire new menu "Pickmaps" in the menu bar. +It offers commands to create new pickmaps, save pickmaps, +revert them to last saved state, and close them. + +For those who are fully satisfied with their pickmaps, +there is also a menu command to "Lock All Pickmaps". +This will disable any further changes to the pickmaps unless +they become unlocked again. In that way one can prevent +accidentally changing a pickmap by clicking the wrong +mouse button. + +--AndreasV + +--- 29/10/2003 --- + +Added some elevation intelligence. +When editing maps that have some elevation data, the elevation +data is propagated to the bottom of the stack of tiles during +insert, delete, and layer changing operations (move tile up, move +tile down). Server code that looks at elevation data expects to +find it at the bottom of the stack, which is where it naturally +belongs anyway, elevation is the height above sea level of the +ground, not of the tree or building on top of the ground. + +Note that elevation is only propagated up or down within a stack +of tiles. This means that if you delete all tiles in a particular +spot, then add a tile, there is no tile to propagate the elevation +from, so elevation needs to be set manually. Best to add a tile +first, then delete the old one if you want to keep the old +elevation. Naturally, if you are replacing hills with mountains, +you need to change the elevation manually anyway... + +David Seikel + +--- 14/09/2004 --- + +Added support for the 'other_arch' field in runes. + +Andreas Kirschbaum + +--- 19/07/2005 --- + +Added support for item transformers. + +Andreas Kirschbaum + +--- 08/09/2005 --- + +Do not strip leading (and trailing) whitespace from msg...endmsg and +maplore...endmaplore fields. + +Andreas Kirschbaum + +--- 11/09/2005 --- + +Remove unused import statements. + +Andreas Kirschbaum + +--- 13/09/2005 --- + +Added support for timed gates. + +Andreas Kirschbaum + +--- 14/09/2005 --- + +Do not add "name <untitled>" to maps that do not yet have a "name" field. + +Andreas Kirschbaum + +--- 24/09/2005 --- + +Fix help information for spellpoint regeneration rate and healing rate for +Monsters/NPCs. + +Andreas Kirschbaum + +--- 01/10/2005 --- + +Add support for shop related headers + +Brendan Lally + +--- 04/12/2005 --- + +Fix properties dialog (and make it compile again): display dialog box for +invalid shop greed values (instead printing a stack dump). + +Andreas Kirschbaum + +--- 08/02/2006 --- + +Fix display issues with map window. The problem was that the map window was +set to opaque in some look and feel settings but the paintComponent method did +not paint the whole window area. + +Andreas Kirschbaum + +--- 18/02/2006 --- + +Resize map window if map size is changed in map attributes window. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Fix spelling of "shopitems" header when loading and saving maps. It used to +save the incorrect header "shopitem". + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Save map header fields in same order as crossedit to prevent unnecessary map +differences when switching editors. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Mark map as being "modified" when pasting selections. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Implement map attributes 'template' and 'nosmooth'. + +Andreas Kirschbaum + +--- 19/02/2006 --- + +Make menu shortcuts work. Use different shortcuts for all entries. + +Andreas Kirschbaum + +--- 21/02/2006 --- + +Update archetypes information. + +Andreas Kirschbaum + +--- 21/02/2006 --- + +Make "View xxx" options in main menu work again. + +Andreas Kirschbaum + +--- 22/02/2006 --- + +Implement dialog for DOOR objects. + +Fix NullPointerException in View|Choose Font. Selecting a font now partially +works (not all controls are affected). + +Fix typo in File|Options...; also add hint about deferred effect of option +"Separate Map-Tile panel". + +Retain map view position when reverting a map. + +Update treasure lists, item types, and autojoin information. + +Andreas Kirschbaum + +--- 23/02/2006 --- + +Reverse sort order of tabs in Pickmaps and Arch List panels to make them +appear in alphabetical order. + +Fix sort order of objects in types.xml. + +Andreas Kirschbaum + +--- 25/02/2006 --- + +Implement attribute d... [truncated message content] |
From: <aki...@us...> - 2006-09-18 19:49:32
|
Revision: 337 http://svn.sourceforge.net/gridarta/?rev=337&view=rev Author: akirschbaum Date: 2006-09-18 12:49:09 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Fix MultiArchData implementation (cfeditor). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/ChangeLog 2006-09-18 19:49:09 UTC (rev 337) @@ -0,0 +1,7 @@ +2006-09-18 Andreas Kirschbaum + + * Fix MultiArchData implementation. The main reason was code + cleanup but it also fixes: + - Prevent multi-part objects from overlapping other objects in + pickmaps. + - (Partially) fix fill and replace with multi-part objects. Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-09-18 19:49:09 UTC (rev 337) @@ -139,8 +139,8 @@ archTypeText.setText("<html><font color=black>Type: " + mainControl.getArchObjectParser().getArchTypeName(arch.getArchTypNr()) + " (" + arch.getArchTypNr() + ") </font></html>"); - if (arch.getMultiRefCount() > 0) { - archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> (" + +(arch.getMultiRefCount() + 1) + " parts) (" + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) + "," + (arch.getRefMaxY() - arch.getRefMaxMY() + 1) + ")</font></html>"); + if (arch.isMulti()) { + archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> (" + arch.getMultiRefCount() + " parts) (" + arch.getSizeX() + "," + arch.getSizeY() + ")</font></html>"); } else { archTileText.setText("<html><font color=black>Tile: single" + "</font></html>"); } Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-09-18 19:49:09 UTC (rev 337) @@ -179,8 +179,8 @@ CAttribDialog.setDefaultBounds(); // set width/height etc // reference to the ArchObject - if (aobj.isMulti() && aobj.getMapMultiHead() != null) { - arch = aobj.getMapMultiHead(); + if (aobj.isTail()) { + arch = aobj.getHead(); defarch = this.mainControl.getArchObjectStack().getArch(arch.getNodeNr()); } else { arch = aobj; Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-18 19:49:09 UTC (rev 337) @@ -991,19 +991,14 @@ // ok, we have it all!! final MapControl control; - if (objects == null) { - // The map is totally empty - control = newLevel(objects, maparch, show, initial); // init the map - } else { - // go to ArchObjectParser and add the default arch list information to them - if (!collectTempList(objects, file)) { // get face names, face id, etc. - return null; - } - - final List<ArchObject> sortedObjects = ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) - control = newLevel(sortedObjects, maparch, show, initial); // init the map + // go to ArchObjectParser and add the default arch list information to them + if (!collectTempList(objects, file)) { // get face names, face id, etc. + return null; } + final List<ArchObject> sortedObjects = ArchObjectParser.sortTempList(objects); // sort the list (put multiparts at the end) + control = newLevel(sortedObjects, maparch, show, initial); // init the map + if (show) { // finally, show the map and refresh toolbars currentMap.setMapFile(file); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-09-18 19:49:09 UTC (rev 337) @@ -311,7 +311,7 @@ } if (arch != null) { // so here we return the arch from the pickmap - return arch; + return arch.getHead(); } } } Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-09-18 19:49:09 UTC (rev 337) @@ -267,7 +267,7 @@ } // no single tile? - if (arch.getMultiRefCount() > 0 || arch.isReferenced()) { + if (arch.isMulti() || arch.isTail()) { return; } @@ -277,9 +277,7 @@ } // if this is a multi-tail, we put the new arch into the head's inv. - if (inv.isReferenced() && inv.getMapMultiHead() != null) { - inv = inv.getMapMultiHead(); - } + inv = inv.getHead(); final ArchObject invnew; if (arch.isDefaultArch()) { @@ -312,12 +310,7 @@ // If the active arch is part of a multi, the mutli-head's stats // are taken instead: - final ArchObject arch; - if (activeArch.isReferenced() && activeArch.getMapMultiHead() != null) { - arch = activeArch.getMapMultiHead(); - } else { - arch = activeArch; - } + final ArchObject arch = activeArch.getHead(); final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); if (defarch == null) { // hm, this should NOT happen @@ -707,12 +700,7 @@ // If the active arch is part of a multi, the mutli-head's stats // are displayed (Only the head can store information!). - final ArchObject arch; - if (activeArch.isReferenced() && activeArch.getMapMultiHead() != null) { - arch = activeArch.getMapMultiHead(); - } else { - arch = activeArch; - } + final ArchObject arch = activeArch.getHead(); // no text, we try to set the default text final boolean hasMessage; @@ -788,10 +776,9 @@ } // check for multi tile - if (arch.getMultiRefCount() > 0 || arch.isReferenced()) { + if (arch.isMulti() || arch.isTail()) { // multi: print size - archTileText.setText("Tile: " + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) - + "x" + (arch.getRefMaxY() - arch.getRefMaxMY() + 1)); + archTileText.setText("Tile: " + arch.getSizeX() + "x" + arch.getSizeY()); } else { // single archTileText.setText("Tile: single"); @@ -851,8 +838,8 @@ */ public void editScriptWanted(final int task) { ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch - if (arch != null && arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // if it's a multi, always take the head + if (arch != null) { + arch = arch.getHead(); } // check for a valid selection in the event list @@ -871,9 +858,7 @@ public void addNewScriptWanted() { ArchObject arch = mainControl.getMainView().getMapTileSelection(); // get selected arch if (arch != null) { - if (arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // if it's a multi, always add scripts to head - } + arch = arch.getHead(); arch.addEventScript(eventList, this); } } Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-18 19:49:09 UTC (rev 337) @@ -89,7 +89,7 @@ while (it.hasNext()) { final ArchObject node = (ArchObject) it.next(); // only non multi suckers - if (node.getMapMultiHead() == null && node.getMapMultiNext() == null) { + if (!node.isMulti()) { if (!writeMapArch(node, false)) { return; } @@ -105,19 +105,7 @@ while (it.hasNext()) { final ArchObject node = (ArchObject) it.next(); // search only for heads! - if (node.getMultiRefCount() > 0 && node.getMapMultiNext() != null) { - /* old version: Both heads and tails got written into the mapfile - for (multi = node; ; ) { - if (!writeMapArch(multi, false)) { - return; - } - multi = multi.getMapMultiNext(); - if (multi == null) { - break; - } - bufferedWriter.write("More\n"); - }*/ - + if (node.isMulti() && node.isHead()) { // only the heads get stored in the mapfile // (that's much more efficient) if (!writeMapArch(node, false)) { Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-18 19:49:09 UTC (rev 337) @@ -371,22 +371,18 @@ */ public void addInvObjects(final ArchObject node, String x, String y, final int archid, final int indent) { // if this is a multi-tile, we want to show the head's inventory - final Iterator it; - if (node.isReferenced() && node.getMapMultiHead() != null) { - final Iterator it2 = node.getMapMultiHead().iterator(); // we go to heads inv. + if (node.isTail()) { + final Iterator it2 = node.getHead().iterator(); // we go to heads inv. if (it2.hasNext()) { final ArchObject arch = (ArchObject) it2.next(); x = Integer.toString(arch.getMapX()); y = Integer.toString(arch.getMapY()); } - - it = node.getMapMultiHead().iterator(); // we go to heads inv. - } else { - it = node.iterator(); // we go to our own inv. start } final String indentStr = Integer.toString(indent); + final Iterator it = node.getHead().iterator(); while (it.hasNext()) { final ArchObject arch = (ArchObject) it.next(); @@ -462,9 +458,7 @@ // In the map-tile-window the object names are displayed // next to the icons mainControl.setPlainFont(this); - if (arch.isMulti() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); - } + arch = arch.getHead(); if (arch.getObjName() != null && arch.getObjName().length() > 0) { setText(arch.getObjName()); // special name Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-18 19:49:09 UTC (rev 337) @@ -447,22 +447,17 @@ if (mapControl.isPointValid(arch.getMapX(), arch.getMapY() - 1)) { redraw[--num] = new Point(arch.getMapX(), arch.getMapY() - 1); } + assert num == 0; } else if (arch.isMulti()) { - // this arch is a multi: - if (arch.isReferenced() && arch.getMapMultiHead() != null) { - arch = arch.getMapMultiHead(); // make sure we got the head - } + arch = arch.getHead(); // make sure we got the head - int num = arch.getMultiRefCount() + 1; // get number of parts - if (num <= 1) { // safety check - return null; - } - + int num = arch.getMultiRefCount(); // get number of parts redraw = new Point[num]; // create instance of needed size for (ArchObject tmp = arch; num > 0 && tmp != null; - num--, tmp = tmp.getMapMultiNext()) { + num--, tmp = tmp.getMultiNext()) { redraw[num - 1] = new Point(tmp.getMapX(), tmp.getMapY()); } + assert num == 0; } else { // just an ordinary single-square arch redraw = new Point[1]; @@ -754,7 +749,7 @@ final ImageIcon img = archlist.getFace(node.getFaceNr()); if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32)) { archlist.getFace(node.getFaceNr()).paintIcon(this, grfx, x * 32 + bOffset, y * 32 + bOffset); - } else if (node.getMultiRefCount() > 0) { + } else if (node.isHead()) { oversizedMultiHeads.addElement(node); // store oversized arches for later } } @@ -858,11 +853,11 @@ mainControl.getUnknownTileIconX().paintIcon(this, tmpGrfx, 0, 0); } else { final ImageIcon img = archlist.getFace(node.getFaceNr()); - if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32) || node.getMultiRefCount() > 0) { + if (!node.isMulti() || (img.getIconWidth() == 32 && img.getIconHeight() == 32)) { img.paintIcon(this, tmpGrfx, 0, 0); } else { - // this is an oversized image and not the head, so it must be shifted - img.paintIcon(this, tmpGrfx, -32 * node.getMultiRefX(), -32 * node.getMultiRefY()); + // this is an oversized image, so it must be shifted + img.paintIcon(this, tmpGrfx, -32 * node.getMultiX(), -32 * node.getMultiY()); } } } @@ -1431,9 +1426,7 @@ needRedraw = calcArchRedraw(newarch); } else { // insert multi tile from pickmap: - if (newarch.getMapMultiHead() != null) { - newarch = newarch.getMapMultiHead(); - } + newarch = newarch.getHead(); // first insert default arch from archlist if (!mapControl.addArchToMap(newarch.getNodeNr(), pos, allowMany ? -1 : drawInternCount, MapModel.JOIN_DISABLE)) { // do nothing @@ -1487,15 +1480,13 @@ needRedraw = calcArchRedraw(newarch); } else { // insert multi tile from pickmap: - if (newarch.getMapMultiHead() != null) { - newarch = newarch.getMapMultiHead(); - } + newarch = newarch.getHead(); // check if all spaces are free that the multi will occupy boolean allSpacesFree = true; final Point d = new Point(); - for (d.x = pos.x; d.x - pos.x <= newarch.getRefMaxX(); d.x++) { - for (d.y = pos.y; d.y - pos.y <= newarch.getRefMaxY(); d.y++) { + for (d.x = pos.x + newarch.getMinX(); d.x <= pos.x + newarch.getMaxX(); d.x++) { + for (d.y = pos.y + newarch.getMinX(); d.y <= pos.y + newarch.getMaxY(); d.y++) { if (!mapControl.isPointValid(d) || mapControl.containsArchObject(d)) { allSpacesFree = false; } Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-18 19:49:09 UTC (rev 337) @@ -173,7 +173,7 @@ // (for multiparts, only the heads get copied into the buffer) // arches that don't match the view settings are ignored! if ((mode == DO_CUT || mode == DO_COPY) && - !arch.isReferenced() && arch.getContainer() == null && + arch.isHead() && arch.getContainer() == null && (mainControl.getTileEdit() == 0 || mainControl.isTileEdit(arch.getEditType()))) { // copy this arch final ArchObject clone = arch.createClone(Math.abs(pos.x - startp.x), Math.abs(pos.y - startp.y)); @@ -189,8 +189,7 @@ // delete arch (without redrawing the map) // For CUT we don't delete multi tails of multis which are left or // above the head (we would miss to copy them otherwise). - if (mode == DO_CLEAR || !arch.isMulti() || arch.getMultiRefCount() > 0 || - (arch.getMapMultiHead() != null && arch.getMultiRefX() >= 0 && arch.getMultiRefY() >= 0)) { + if (mode == DO_CLEAR || (arch.getMultiX() >= 0 && arch.getMultiY() >= 0)) { it.remove(); } } @@ -247,51 +246,8 @@ final Iterator<ArchObject> it = buffCtrl.getArchObjects(sourcePos); while (it.hasNext()) { final ArchObject arch = it.next(); - if (arch.getMultiRefCount() > 0) { - // first we clone the head - final ArchObject clone = arch.createClone(pos.x, pos.y); - - // second we insert a default multi on the map - if (mapControl.addArchToMap(arch.getNodeNr(), pos, -1, MapModel.JOIN_DISABLE)) { - // third we chop off the default head and attach our clone - ArchObject oldHead = null; // get default head - final Iterator<ArchObject> it2 = mapControl.getArchObjects(pos); - while (it2.hasNext()) { - oldHead = it2.next(); - } - - if (oldHead != null && oldHead.getNodeNr() == arch.getNodeNr()) { - // replace old head with our clone: - if (oldHead.getPrev() != null) { - oldHead.getPrev().setNext(clone); - clone.setPrev(oldHead.getPrev()); - } else { - // no previous arch, we must stick it on the grid - mapControl.setArchObject(pos, clone); - } - - if (oldHead.getNext() != null) { - oldHead.getNext().setPrev(clone); - clone.setNext(oldHead.getNext()); - } - - clone.setMyID(oldHead.getMyID()); // pass ID to new head - clone.setMapMultiNext(oldHead.getMapMultiNext()); // set link to tail - - for (ArchObject tmp = clone.getMapMultiNext(); tmp != null; - tmp = tmp.getMapMultiNext()) { - tmp.setMapMultiHead(clone); // all tails point to new head - } - - // delete old head: - oldHead.setNext(null); - oldHead.setPrev(null); - oldHead.setMapMultiNext(null); - oldHead = null; - } else { - LOG.error("Error in CopyBuffer.paste(): Couldn't find multi-head after insertion!"); - } - } + if (arch.isMulti()) { + addArchToMap(mapControl, arch, pos, -1, false); } } } @@ -328,7 +284,7 @@ !mapControl.containsArchObject(startp)) { arch = mainControl.getArchPanelSelection(); if (arch != null) { - floodfill(mapControl, startp.x, startp.y, arch, arch.isDefaultArch()); // floodfill + floodfill(mapControl, startp.x, startp.y, arch); } } else { // Rectangular fill: @@ -344,19 +300,12 @@ // get the arch to fill with arch = mainControl.getArchPanelSelection(); - final boolean isDefarch = arch.isDefaultArch(); // cycle through all tile coordinates which are highlighted: for (pos.x = startp.x; pos.x - startp.x <= offset.x; pos.x++) { for (pos.y = startp.y; pos.y - startp.y <= offset.y; pos.y++) { // Insert the new arch into the map - if (isDefarch) { - mapControl.addArchToMap(mainControl.getPanelArch(), pos, 0, - MapModel.JOIN_DISABLE, fillBelow); - } else { - // insert arch-clone from pickmap - mapControl.addArchObjectToMap(arch.createClone(pos.x, pos.y), fillBelow); - } + addArchToMap(mapControl, arch, pos, 0, fillBelow); } } } @@ -375,31 +324,22 @@ * @param x starting x-coord for floodfill * @param y starting y-coord for floodfill * @param arch ArchObject to fill with - * @param isDefarch true when 'arch' is a default arch */ - private static void floodfill(final MapControl mapControl, final int x, final int y, final ArchObject arch, final boolean isDefarch) { - final Point p = new Point(x, y); - // insert new arch to x, y - //mapControl.addArchToMap(mainControl.getPanelArch(), p, 0, MapModel.JOIN_DISABLE); - if (isDefarch) { - mapControl.addArchToMap(arch.getNodeNr(), p, 0, MapModel.JOIN_DISABLE); - } else { - // insert arch-clone from pickmap - mapControl.addArchObjectToMap(arch.createClone(x, y)); - } + private void floodfill(final MapControl mapControl, final int x, final int y, final ArchObject arch) { + addArchToMap(mapControl, arch, new Point(x, y), 0, false); // now go recursive into all four directions if (mapControl.isPointValid(x - 1, y) && !mapControl.containsArchObject(x - 1, y)) { - floodfill(mapControl, x - 1, y, arch, isDefarch); + floodfill(mapControl, x - 1, y, arch); } if (mapControl.isPointValid(x, y - 1) && !mapControl.containsArchObject(x, y - 1)) { - floodfill(mapControl, x, y - 1, arch, isDefarch); + floodfill(mapControl, x, y - 1, arch); } if (mapControl.isPointValid(x + 1, y) && !mapControl.containsArchObject(x + 1, y)) { - floodfill(mapControl, x + 1, y, arch, isDefarch); + floodfill(mapControl, x + 1, y, arch); } if (mapControl.isPointValid(x, y + 1) && !mapControl.containsArchObject(x, y + 1)) { - floodfill(mapControl, x, y + 1, arch, isDefarch); + floodfill(mapControl, x, y + 1, arch); } } @@ -411,4 +351,31 @@ ReplaceDialog.getInstance().display(mapControl); } + /** + * Add an archetype to the destination map. Inserts a new object instance + * for default archetypes, and a clone for non-default archetypes. + */ + private void addArchToMap(final MapControl mapControl, final ArchObject arch, final Point pos, final int intern, final boolean fillBelow) { + final ArchObject newHead; + if (arch.isDefaultArch()) { + mapControl.addArchToMap(arch.getNodeNr(), pos, intern, false, fillBelow); + } else { + newHead = arch.createClone(pos.x, pos.y); + for (ArchObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + final ArchObject newTail = mainControl.getArchObjectStack().newArchObjectInstance(tmp.getNodeNr()); + newTail.setMultiX(tmp.getMultiX()); + newTail.setMultiY(tmp.getMultiY()); + newTail.setMapX(pos.x + newTail.getMultiX()); + newTail.setMapY(pos.y + newTail.getMultiY()); + newHead.addTailPart(newTail); + } + + mapControl.addArchObjectToMap(newHead, fillBelow); + for (ArchObject tmp = newHead.getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { + mapControl.addArchObjectToMap(tmp, fillBelow); + mainControl.getArchObjectParser().postParseMapArch(tmp, mapControl.getActiveEditType()); + } + } + } + } // class CopyBuffer Modified: trunk/crossfire/src/cfeditor/MultiArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/MultiArchData.java 2006-09-18 19:49:09 UTC (rev 337) @@ -2,6 +2,7 @@ * Crossfire Java Editor. * Copyright (C) 2000 Michael Toennies * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 Andreas Kirschbaum * * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) * @@ -25,197 +26,169 @@ package cfeditor; import cfeditor.arch.ArchObject; +import java.util.ArrayList; /** - * Class related to ArchObject to store multipart information. - * This data is only needed by multiparts. When the editor is running, - * usually a big number of ArchObjects exist - most of them single-tile - * objects. The encapsulation of this "multpart-only" data can save - * a little bit of memory. + * Class related to {@link ArchObject} to store multipart information. This + * data is only used for multi-part objects. When the editor is running, + * usually a big number of <code>ArchObject</code>s exist - most of them + * single-part objects. The encapsulation of this "multi-part-only" data can + * save a little bit of memory. + * * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @author Andreas Kirschbaum */ public final class MultiArchData { - private boolean referenced; // true: this arch is a part of the tail - NOT the head + /** + * Maximum coordinate of any part; it is never negative. + */ + private int maxX = 0; - private int refnr; // if != -1 - multi tile + /** + * Maximum coordinate of any part; it is never negative. + */ + private int maxY = 0; - // if refnr == nodenr - // then first tile - // else refnr==first tile - private int refx; // multi tile: offset pos from head + /** + * Minimum coordinate of any part; it is never positive. + */ + private int minX = 0; - private int refy; // sic! + /** + * Minimum coordinate of any part; it is never positive. + */ + private int minY = 0; - private int refcount; // head: number of parts (>0 means it's ahead) - - private int refmaxx; // head: parts in x - - private int refmaxy; // head: parts in y - - private int refmaxxm; // head: parts in x to count minus referenced - - private int refmaxym; // head: parts in y sic - - private int multiShapeID; // the ID of the multiPositionData (only for multiparts in ISO_VIEW!) - - private int multiPartNr; // the part number for this tile (only for multiparts in ISO_VIEW!) - - private boolean isLowestPart; // lowest part of all multi tiles (only for multiparts in ISO_VIEW!) - - private ArchObject head; // multi tile, this is the head - - private ArchObject nextref; // next multi tile of this arch in map - - /** Constructor: Initializing the data */ - public MultiArchData() { - refmaxx = refmaxy = 0; - refnr = -1; - referenced = false; - refcount = 0; - head = nextref = null; - isLowestPart = false; - refx = 0; - refy = 0; - } - /** - * @return an identical copy of this MultiArchData object. - * The links are not copied though! A cloned multipart needs to - * be re-linked properly before it can be used! + * All parts belonging to this multi-part object; the first element is the + * head part. */ - public MultiArchData getClone() { - final MultiArchData clone = new MultiArchData(); + private final ArrayList<ArchObject> parts = new ArrayList<ArchObject>(); - clone.referenced = referenced; // true: this arch is a multi tile part - // and NOT the head - clone.refnr = refnr; // if != -1 - multi tile; if refnr == nodenr then first tile - // else refnr==first tile; multi tile: offset pos from head - clone.refx = refx; - clone.refy = refy; // sic! - clone.refcount = refcount; // head: number of parts - clone.refmaxx = refmaxx; // head: parts in x - clone.refmaxy = refmaxy; // head: parts in y - clone.refmaxxm = refmaxxm; // head: parts in x to count minus referenced - clone.refmaxym = refmaxym; // head: parts in y sic - clone.multiShapeID = multiShapeID; // ID for the multiPositionData - clone.multiPartNr = multiPartNr; // part number for the multiPositionData - clone.isLowestPart = isLowestPart; // lowest part of all multi tiles - - return clone; + /** + * Create a new instance. + * + * @param head the head part of the multi-part object + */ + public MultiArchData(final ArchObject head) { + assert head.getMultiX() == 0 && head.getMultiY() == 0; + parts.add(head); } - // --- GET/SET methods --- - public boolean isReferenced() { - return referenced; - } - - public void setReferenced(final boolean referenced) { - this.referenced = referenced; - } - - public boolean isLowestPart() { - return isLowestPart; - } - - public void setLowestPart(final boolean lowestPart) { - isLowestPart = lowestPart; - } - - public int getRefNr() { - return refnr; - } - - public void setRefNr(final int value) { - refnr = value; - } - - public int getRefX() { - return refx; - } - - public void setRefX(final int value) { - refx = value; - } - - public int getRefY() { - return refy; - } - - public void setRefY(final int value) { - refy = value; - } - + /** + * Return the number of parts this multi-part objects contains. + */ public int getMultiRefCount() { - return refcount; + return parts.size(); } - public void setMultiRefCount(final int refcount) { - this.refcount = refcount; + /** + * Determine the horizontal extent in tiles. For single-part objects 1 is + * returned. + * + * @return the horizontal extent + */ + public int getSizeX() { + return maxX - minX + 1; } - public int getRefMaxx() { - return refmaxx; + /** + * Determine the vertical extent in tiles. For single-part objects 1 is + * returned. + * + * @return the vertical extent + */ + public int getSizeY() { + return maxY - minY + 1; } - public void setRefMaxx(final int value) { - refmaxx = value; + /** + * Determine the maximum x-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the maximum x-coordinate + */ + public int getMaxX() { + return maxX; } - public int getRefMaxxm() { - return refmaxxm; + /** + * Determine the maximum y-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the maximum y-coordinate + */ + public int getMaxY() { + return maxY; } - public void setRefMaxxm(final int value) { - refmaxxm = value; + /** + * Determine the minimum x-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the minimum x-coordinate + */ + public int getMinX() { + return minX; } - public int getRefMaxy() { - return refmaxy; + /** + * Determine the minimum y-coordinate of any part. The value is relative to + * the head part. For single-part objects 0 is returned. + * + * @return the minimum y-coordinate + */ + public int getMinY() { + return minY; } - public void setRefMaxy(final int value) { - refmaxy = value; + /** + * Return the head part of this multi-part object. + * + * @return the head part + */ + public ArchObject getHead() { + return parts.get(0); } - public int getRefMaxym() { - return refmaxym; + /** + * Return the part following a given part. + * + * @param the current part + * + * @return the part following the current part + */ + public ArchObject getNext(final ArchObject ob) { + assert ob != null; + final int index = parts.indexOf(ob); + assert index != -1; + return index + 1 < parts.size() ? parts.get(index + 1) : null; } - public void setRefMaxym(final int value) { - refmaxym = value; - } + /** + * Add a part to this multi-part object. + * + * @param tail the tail part to add + */ + public void addPart(final ArchObject tail) { + assert tail != null; - public int getMultiShapeID() { - return multiShapeID; - } + parts.add(tail); - public void setMultiShapeID(final int multiShapeID) { - this.multiShapeID = multiShapeID; - } + final int x = tail.getMultiX(); + if (x < minX) { + minX = x; + } else if (x > maxX) { + maxX = x; + } - public int getMultiPartNr() { - return multiPartNr; + final int y = tail.getMultiY(); + if (y < minY) { + minY = y; + } else if (y > maxY) { + maxY = y; + } } - public void setMultiPartNr(final int value) { - multiPartNr = value; - } - - public ArchObject getHead() { - return head; - } - - public void setHead(final ArchObject node) { - head = node; - } - - public ArchObject getNext() { - return nextref; - } - - public void setNext(final ArchObject node) { - nextref = node; - } - } // class MultiArchData Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-09-18 19:49:09 UTC (rev 337) @@ -341,9 +341,7 @@ // insert replacement object if (replaceArch.isMulti()) { // multi's cannot be inserted properly, so we just put them ontop - if (replaceArch.getMultiRefCount() == 0 && replaceArch.getMapMultiHead() != null) { - replaceArch = replaceArch.getMapMultiHead(); - } + replaceArch = replaceArch.getHead(); mapControl.addArchToMap(replaceArch.getNodeNr(), pos, 0, false); // TODO: if from pickmap it could have special attributes -> copy them Modified: trunk/crossfire/src/cfeditor/arch/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-09-18 19:49:09 UTC (rev 337) @@ -120,6 +120,18 @@ private MultiArchData multi; /** + * The x-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiX; + + /** + * The y-distance of this part to the head part. Set to zero for + * single-part objects. + */ + private int multiY; + + /** * Data for scripted events. * Stays null if no events defined. */ @@ -662,207 +674,146 @@ } // ---- GET/SET methods for multi arches - public int getRefMaxX() { - return multi != null ? multi.getRefMaxx() : 0; + /** + * Determine the horizontal extent in tiles. For single-part objects 1 is + * returned. + * + * @return the horizontal extent + */ + public int getSizeX() { + return multi != null ? multi.getSizeX() : 1; } - public int getRefMaxY() { - return multi != null ? multi.getRefMaxy() : 0; + /** + * Determine the vertical extent in tiles. For single-part objects 1 is + * returned. + * + * @return the vertical extent + */ + public int getSizeY() { + return multi != null ? multi.getSizeY() : 1; } - public int getRefMaxMX() { - return multi != null ? multi.getRefMaxxm() : 0; + /** + * Determine the maximum x-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the maximum x-coordinate + */ + public int getMaxX() { + return multi != null ? multi.getMaxX() : 0; } - public int getRefMaxMY() { - return multi != null ? multi.getRefMaxym() : 0; + /** + * Determine the maximum y-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the maximum y-coordinate + */ + public int getMaxY() { + return multi != null ? multi.getMaxY() : 0; } - public void setRefMaxMX(final int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setRefMaxxm(x); + /** + * Determine the minimum x-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the minimum x-coordinate + */ + public int getMinX() { + return multi != null ? multi.getMinX() : 0; } - public void setRefMaxMY(final int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setRefMaxym(y); + /** + * Determine the minimum y-coordinate of any part relative to the head + * part. For single-part objects 0 is returned. + * + * @return the minimum y-coordinate + */ + public int getMinY() { + return multi != null ? multi.getMinY() : 0; } - public void setRefMaxX(final int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (x < 0 && x < multi.getRefMaxxm()) { - multi.setRefMaxxm(x); - } else if (x > multi.getRefMaxx()) { - multi.setRefMaxx(x); - } + public void addTailPart(final ArchObject tail) { + initMultiData(); + tail.multi = multi; + multi.addPart(tail); } - public void setRefMaxY(final int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (y < 0 && y < multi.getRefMaxym()) { - multi.setRefMaxym(y); - } - - if (y > multi.getRefMaxy()) { - multi.setRefMaxy(y); - } + /** + * Return the head part of a multi-part object. For single-part objects it + * is the object itself. + * + * @return the head of the object + */ + public ArchObject getHead() { + return multi != null ? multi.getHead() : this; } - public void setReferenced(final boolean referenced) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - multi.setReferenced(referenced); + /** + * Determine if this part is the head part. For single-part objects this is + * always true. + * + * @return <code>true</code> iff this part if a head part + */ + public boolean isHead() { + return getHead() == this; } - public boolean isReferenced() { - return multi != null && multi.isReferenced(); + /** + * Determine if this part is a tail part. For single-part objects this is + * never true. + * + * @return <code>true</code> iff this part if a tail part + */ + public boolean isTail() { + return getHead() != this; } - // this chained multi tiles on map for fast access. better then number and search trash - public void setMapMultiHead(final ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setHead(arch); // this points to head. Heads DON'T points to himself + @Nullable public ArchObject getMultiNext() { + return multi != null ? multi.getNext(this) : null; } - public void setMapMultiNext(final ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setNext(arch); // if this is null and head != null = last tile + /** + * Set the x-position of this part of a multi-part object. The x-position + * is relative to the head part. + * + * @param the x-distance of this part to the head part + */ + public void setMultiX(final int multiX) { + this.multiX = multiX; } - @Nullable public ArchObject getMapMultiHead() { - return multi != null ? multi.getHead() : null; + /** + * Set the y-position of this part of a multi-part object. The y-position + * is relative to the head part. + * + * @param the y-distance of this part to the head part + */ + public void setMultiY(final int multiY) { + this.multiY = multiY; } - @Nullable public ArchObject getMapMultiNext() { - return multi != null ? multi.getNext() : null; - } - - public int getMultiShapeID() { - return multi != null ? multi.getMultiShapeID() : 0; - } - - public void setMultiShapeID(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiShapeID(value); - } - - public int getMultiPartNr() { - return multi != null ? multi.getMultiPartNr() : 0; - } - - public void setMultiPartNr(final int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiPartNr(value); - } - - public boolean isLowestPart() { - return multi != null && multi.isLowestPart(); - } - - public void setLowestPart(final boolean state) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setLowestPart(state); - } - - // Set Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public void setRefNr(final int nr) { - if (multi == null) { - if (nr != -1) { - multi = new MultiArchData(); - multi.setRefNr(nr); - } - } else { - multi.setRefNr(nr); - } - } - - // Get Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public int getRefNr() { - return multi != null ? multi.getRefNr() : -1; - - } - - // refx/refy: Offset of this multi tile from head tile - public void setRefX(final int xoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefX(xoff); - } - - public void setRefY(final int yoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefY(yoff); - } - /** - * Get the multitile arch offset. - * @return multitile arch x offset or 0 on multitile heads and singletile - * arches + * Get the x-distance of this part to the head part. For single-part + * objects this is always zero. + * + * @return the x-distance of this part to the head part */ - public int getMultiRefX() { - return multi != null ? multi.getRefX() : 0; + public int getMultiX() { + return multiX; } /** - * Get the multitile arch offset. - * @return multitile arch y offset or 0 on multitile heads and singletile - * arches + * Get the y-distance of this part to the head part. For single-part + * objects this is always zero. + * + * @return the y-distance of this part to the head part */ - public int getMultiRefY() { - return multi != null ? multi.getRefY() : 0; + public int getMultiY() { + return multiY; } - public void setMultiRefCount(final int count) { - if (multi == null) { - if (count != 0) { - multi = new MultiArchData(); - multi.setMultiRefCount(count); - } - } else { - multi.setMultiRefCount(count); - } - } - /** * Returns number of parts for multipart heads. (*.getMultiRefCount() > 0) * is often used as way to find multi-heads. @@ -872,17 +823,13 @@ return multi != null ? multi.getMultiRefCount() : 0; } - public boolean isMD() { - return multi != null; - } - /** * Initialize the multipart data object - must only be called for multipart * arches. */ - public void initMultiData() { + private void initMultiData() { if (multi == null) { - multi = new MultiArchData(); + multi = new MultiArchData(this); } } // ----- end multi-arch get/set ----- @@ -1284,9 +1231,12 @@ } if (multi != null) { - clone.multi = multi.getClone(); // clone multi data + clone.initMultiData(); } + clone.multiX = multiX; + clone.multiY = multiY; + if (script != null) { clone.script = script.getClone(); // clone scripting data } @@ -1324,7 +1274,7 @@ /** @return true if 'this' arch is part of a multisquare object */ public boolean isMulti() { - return multi != null && (multi.isReferenced() || multi.getMultiRefCount() > 0); + return multi != null; } public void addEventPlugin(final String eventType, final String pluginName) { Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-09-18 19:49:09 UTC (rev 337) @@ -197,6 +197,7 @@ // start with new clean ArchObject instance ArchObject arch; + ArchObject archlast = null; if (defArch == null) { arch = new ArchObject(); } else { @@ -218,7 +219,7 @@ boolean archmore = false; String oldCat = "<xxx>"; boolean isNewCategory = true; - int firstArch = -1; + ArchObject firstArch = null; String newCat = "no category info"; int archmoreCount = 0; while (thisLine2 != null) { @@ -233,12 +234,9 @@ if (!parsearch) { if (thisLine.regionMatches(0, "More", 0, 4)) { - if (firstArch == -1) { - firstArch = mainControl.getArchCount() - 1; // if more && !-1 last was first - mainControl.getArch(firstArch).setRefNr(firstArch); + if (firstArch == null) { + firstArch = archlast; } - mainControl.getArch(firstArch).setMultiRefCount(mainControl.getArch(firstArch).getMultiRefCount() + 1); - archmore = true; } else if (thisLine.regionMatches(0, "Object", 0, 6)) { if (arch == null) { @@ -246,14 +244,8 @@ } parsearch = true; - if (archmore) { - archmoreCount++; - if (LOG.isDebugEnabled()) { - LOG.debug("multi part object: part " + archmoreCount); - } - } else { - firstArch = -1; - archmoreCount = 0; + if (!archmore) { + firstArch = null; } if (archName == null) { @@ -297,12 +289,9 @@ // we got full arch parsearch = false; // we write this sucker - arch.setRefNr(firstArch); - if (firstArch != -1) { + if (firstArch != null) { // add to head our x/y position so he can setup refmax - mainControl.getArch(firstArch).setRefMaxX(arch.getMultiRefX()); - mainControl.getArch(firstArch).setRefMaxY(arch.getMultiRefY()); - arch.setReferenced(true); // mark it as ref + firstArch.addTailPart(arch); } else { mainControl.incArchObjCount(); @@ -359,6 +348,7 @@ arch.addArchText(arch.diffArchText(defArch.getArchText(), true)); return arch; } + archlast = arch; arch = null; } else { if (thisLine.regionMatches(0, "msg", 0, 3)) { @@ -392,13 +382,13 @@ LOG.warn("Find x cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } - arch.setRefX(Integer.parseInt(thisLine.substring(2))); + arch.setMultiX(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.regionMatches(0, "y ", 0, 2)) { if (!archmore && !arch.getArchName().equals(STARTARCH_NAME)) { LOG.warn("Find y cmd in single tile or head (add it to arch text): " + arch.getArchName()); arch.addArchText(thisLine + "\n"); } - arch.setRefY(Integer.parseInt(thisLine.substring(2))); + arch.setMultiY(Integer.parseInt(thisLine.substring(2))); } else if (thisLine.regionMatches(0, "type ", 0, 5)) { try { final int i = Integer.parseInt(thisLine.substring(5)); @@ -540,21 +530,9 @@ arch.setArchTypNr(defarch.getArchTypNr()); } - if (arch.isMulti() || defarch.isMulti()) { - if (!arch.isMD()) { - arch.initMultiData(); // make sure the MultiArchData is initialized - } + arch.setMultiX(defarch.getMultiX()); + arch.setMultiY(defarch.getMultiY()); - arch.setMultiRefCount(defarch.getMultiRefCount()); - arch.setReferenced(defarch.isReferenced()); - arch.setRefMaxX(defarch.getRefMaxX()); - arch.setRefMaxY(defarch.getRefMaxY()); - arch.setRefMaxMX(defarch.getRefMaxMX()); - arch.setRefMaxMY(defarch.getRefMaxMY()); - arch.setRefX(defarch.getMultiRefX()); - arch.setRefY(defarch.getMultiRefY()); - } - // arch.setEditType(defarch.getEditType()); // validate the ScriptedEvents @@ -568,8 +546,8 @@ } // Finally, we calculate the desired editType of the arch - if (arch.isReferenced() && arch.getMapMultiHead() != null) { - arch.setEditType(arch.getMapMultiHead().getEditType()); // copy from head + if (arch.isTail()) { + arch.setEditType(arch.getHead().getEditType()); // copy from head } else if (editType != 0) { arch.setEditType(arch.calculateEditType(editType)); // calculate new } @@ -587,29 +565,21 @@ final ArchObject defarch = mainControl.getArch(arch.getNodeNr()); // default arch // is it a multi head? - if (arch != null && defarch != null && defarch.getMultiRefCount() > 0 && - arch.getMapMultiNext() == null && arch.getMapMultiHead() == null) { + if (arch != null && defarch != null && defarch.isMulti() && !arch.isMulti()) { // we have a multi head and need to insert his tail now - final int count = defarch.getMultiRefCount(); // how many parts have we got - ArchObject newarch = null; // newly inserted arch - ArchObject oldarch = arch; // previous arch - // do insertion for all non-head parts of the multi - for (int c = 1; c <= count; c++) { - newarch = mainControl.getArchObjectStack().newArchObjectInstance(defarch.getNodeNr() + c); + for (ArchObject oldPart = defarch.getMultiNext(); oldPart != null; oldPart = oldPart.getMultiNext()) { + final ArchObject newarch = mainControl.getArchObjectStack().newArchObjectInstance(oldPart.getNodeNr()); assert newarch != null; - newarch.setMapMultiHead(arch); // set link to multi head - oldarch.setMapMultiNext(newarch); // set link between multi arches + arch.addTailPart(newarch); objects.add(newarch); // set map position (x, y) - newarch.setMapX(arch.getMapX() + mainControl.getArchObjectStack().getArch(defarch.getNodeNr() + c).getMultiRefX()); - newarch.setMapY(arch.getMapY() + mainControl.getArchObjectStack().getArch(defarch.getNodeNr() + c).getMultiRefY()); + newarch.setMapX(arch.getMapX() + newarch.getMultiX()); + newarch.setMapY(arch.getMapY() + newarch.getMultiY()); - oldarch = newarch; // next loop oldarch = current newarch - // now attach the default arch and stuff // (don't need edit type as we copy from head) mainControl.getArchObjectParser().postParseMapArch(newarch, 0); Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-18 19:37:10 UTC (rev 336) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java 2006-09-18 19:49:09 UTC (rev 337) @@ -206,13 +206,17 @@ return null; } + final ArchObject template = archNodeList[i].arch; + final ArchObject arch = new ArchObject(); - arch.setArchName(archNodeList[i].arch.getArchName()); - if (!archNodeList[i].arch.getFaceFlag()) { - arch.setFaceNr(archNodeList[i].arch.getFaceNr()); + arch.setArchName(template.getArchName()); + if (!template.getFaceFlag()) { + arch.setFaceNr(template.getFaceNr()); } - arch.setNodeNr(archNodeList[i].arch.getNodeNr()); + arch.setNodeNr(template.getNodeNr()); + arch.setMultiX(template.getMultiX()); + arch.setMultiY(template.getMultiY()); return arch; } @@ -225,9 +229,10 @@ */ public void addArchToList(final ArchObject data) { final ArchObjectNode newnode = new ArchObjectNode(data); - newnode.arch.setNodeNr(archNodeListCount); archMap.put(data.getArchName(), archNodeListCount); archNodeList[archNodeListCount++] = newnode; + newnode.arch.setNodeNr(archNodeListCount - 1); + assert newnode.arch.isDefaultArch(); } /** load the arches */ @@ -683,7 +688,7 @@ arch = mainControl.getArch(numList[i]); - if (arch.isReferenced()) { + if (arch.isTail()) { LOG.error("Collect Error: Multipart Tail in Panel found!"); } @@ -725,7 +730,7 @@ for (int j = 1; j <= multiparts; j++) { arch = mainControl.getArch(numList[i] + j); ... [truncated message content] |
From: <aki...@us...> - 2006-09-23 21:55:04
|
Revision: 371 http://svn.sourceforge.net/gridarta/?rev=371&view=rev Author: akirschbaum Date: 2006-09-23 14:54:55 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Make insertion and deletion in the map tile panel work correctly. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/ChangeLog 2006-09-23 21:54:55 UTC (rev 371) @@ -1,3 +1,9 @@ +2006-09-23 Andreas Kirschbaum + + * Make insertion and deletion in the map tile panel work + correctly. (Note that multipart objects from pickmaps still cannot + be inserted in the map tile panel.) + 2006-09-18 Andreas Kirschbaum * Fix MultiArchData implementation. The main reason was code Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 21:54:55 UTC (rev 371) @@ -88,6 +88,9 @@ private int lastClickId = -1; + /** The currently selected MapSquare. */ + private Point currentSquare = null; + /** Build Panel */ CMapTileList(final CMainControl mainControl, final CMainView mainView) { this.mainControl = mainControl; @@ -183,83 +186,78 @@ ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && e.isShiftDown())) { // --- right mouse button: insert arch --- - if ((list.locationToIndex(e.getPoint()) >= 0 || list.getModel().getSize() > 0) && - mainControl.getArchPanelSelection() != null) { - - // get the selected arch from the map - final String entry; - if (list.locationToIndex(e.getPoint()) < 0) { - entry = model.getElementAt(0).toString(); + if (currentSquare != null && mainControl.getArchPanelSelection() != null) { + final int listIndex = getListIndex(e); + if (listIndex >= list.getModel().getSize()) { + mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), null, currentSquare, MapModel.JOIN_ENABLE); } else { - entry = model.getElementAt(list.locationToIndex(e.getPoint())).toString(); + final String entry = model.getElementAt(listIndex).toString(); + final int num = Integer.parseInt(entry.substring(0, 10)); + mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), mainControl.getMapArch(num, currentSquare), currentSquare, MapModel.JOIN_ENABLE); } - final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - - // find the lowest Y-coord. in list, to see if selection points below it - // (We need this because JDK 1.4 doesn't give locationToIndex -1 when below) - int lowestY = 0; - if (list.getFirstVisibleIndex() != -1) { - try { - final Rectangle bounds = list.getCellBounds(list.getFirstVisibleIndex(), - list.getLastVisibleIndex()); - lowestY = (int) (bounds.getY() + bounds.getHeight()); - } catch (final NullPointerException ne) { - // and JDK 1.3 throws a NullpointerException here - real shit! - lowestY = -10; - } - } - - // insert arch next to selected position - if (list.locationToIndex(e.getPoint()) < 0 || (lowestY != -10 && (int) (e.getPoint().getY()) > lowestY)) { - mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), null, pos, MapModel.JOIN_ENABLE); - } else { - mainControl.insertArchToMap(mainControl.getArchPanelSelection(), mainControl.getPanelArch(), mainControl.getMapArch(num, pos), pos, MapModel.JOIN_ENABLE); - } - // refresh mainControl.getCurrentMap().setLevelChangedFlag(); // the map has been modified mainControl.refreshCurrentMap(); } } else { // --- middle mouse button: delete arch --- - deleteIndexFromList(list.locationToIndex(e.getPoint())); + final int listIndex = getListIndex(e); + if (listIndex < list.getModel().getSize()) { + deleteIndexFromList(listIndex); + } } } }); } + /** + * Determine the list index for a given mouse event. This function differs + * from <code>list.locationTopIndex(e.getPoint())</code> in that it always + * returns a valid list index, or the list size (i.e., one element past the + * last list index) if the point is after the end of the list. + * + * @param e the mouse event containing the position to check + * + * @return the selected list index + */ + private int getListIndex(final MouseEvent e) { + final int lastIndex = list.getModel().getSize() - 1; + if (lastIndex < 0) { + return 0; + } + + final Rectangle bounds = list.getCellBounds(lastIndex, lastIndex); + final int lowestY = (int) (bounds.getY() + bounds.getHeight()); + if ((int) (e.getPoint().getY()) >= lowestY) { + return lastIndex + 1; + } + + final int listIndex = list.locationToIndex(e.getPoint()); + assert listIndex >= 0; // -1 is returned only if the list is empty, but this was already checked + return listIndex; + } + @Nullable public ArchObject getMapTileSelection() { // find the selected entry if one final int index = list.getSelectedIndex(); - if (index >= list.getModel().getSize() || index < 0 - || list.getModel().getSize() <= 0 || mainControl.getCurrentMap() == null) { + if (currentSquare == null || index >= list.getModel().getSize() || index < 0 || list.getModel().getSize() <= 0 || mainControl.getCurrentMap() == null) { return null; } // parse selected entry and get the arch object final String entry = model.getElementAt(index).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - - return mainControl.getMapArch(num, pos); + return mainControl.getMapArch(num, currentSquare); } /** Insert a tile index of list, this will delete it. */ void deleteIndexFromList(final int index) { - if (index != -1 && index < list.getModel().getSize()) { + if (currentSquare != null && index != -1 && index < list.getModel().getSize()) { final ArchObject temp = getMapTileSelection(); final String entry = model.getElementAt(index).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - mainControl.deleteMapArch(num, pos, true, MapModel.JOIN_ENABLE); + mainControl.deleteMapArch(num, currentSquare, true, MapModel.JOIN_ENABLE); mainView.setMapTileList(mainControl.getCurrentMap(), (temp == null ? -1 : temp.getMyID())); } } @@ -306,6 +304,7 @@ model.removeAllElements(); if (map == null) { // mouse has been clicked outside the mapview + currentSquare = null; getPanelArch(-1); list.setEnabled(true); mainView.refreshMapArchPanel(); @@ -314,6 +313,7 @@ postSelect = -1; listCounter = 0; + currentSquare = map.getMapModel().getMouseRightPos(); ArchObject node = map.getMapModel().getMouseRightPosObject(); // Jump to the end of the list @@ -330,10 +330,6 @@ } final String num = Integer.toString(node.getMyID()); String liststring = listDef.substring(0, 10 - num.length()) + num; - final String numx = Integer.toString(node.getMapX()); - liststring += listDef.substring(0, 10 - numx.length()) + numx; - final String numy = Integer.toString(node.getMapY()); - liststring += listDef.substring(0, 10 - numy.length()) + numy; liststring += listDef; listCounter++; model.addElement(liststring); @@ -344,7 +340,7 @@ foundSIndex = true; // this is it - don't select any other tile } - addInvObjects(node, numx, numy, archid, 1); // browse the inventory of the map object + addInvObjects(node, archid, 1); // browse the inventory of the map object } if (postSelect != -1) { @@ -364,22 +360,10 @@ /** * Add inventory objects to an arch in the MapTileList recursively. * @param node the arch where the inventory gets added - * @param x map location of 'node' as strings - * @param y map location of 'node' as strings * @param archid nodeNr of the highlighted arch (?) * @param indent indentation; 1=minimal indentation */ - public void addInvObjects(final ArchObject node, String x, String y, final int archid, final int indent) { - // if this is a multi-tile, we want to show the head's inventory - if (node.isTail()) { - final Iterator it2 = node.getHead().iterator(); // we go to heads inv. - if (it2.hasNext()) { - final ArchObject arch = (ArchObject) it2.next(); - x = Integer.toString(arch.getMapX()); - y = Integer.toString(arch.getMapY()); - } - } - + public void addInvObjects(final ArchObject node, final int archid, final int indent) { final String indentStr = Integer.toString(indent); final Iterator it = node.getHead().iterator(); @@ -391,13 +375,11 @@ } final String num = Integer.toString(arch.getMyID()); String liststring = listDef.substring(0, 10 - num.length()) + num; - liststring += listDef.substring(0, 10 - x.length()) + x; - liststring += listDef.substring(0, 10 - y.length()) + y; liststring += listDef.substring(0, 10 - indentStr.length()) + indentStr; listCounter++; model.addElement(liststring); - addInvObjects(arch, x, y, archid, indent + 1); + addInvObjects(arch, archid, indent + 1); } } @@ -423,14 +405,15 @@ */ super.getListCellRendererComponent(list, value, index, iss, chf); + if (currentSquare == null) { + return this; + } + final String entry = value.toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - final Point pos = new Point(); - pos.x = Integer.parseInt(entry.substring(10, 20)); - pos.y = Integer.parseInt(entry.substring(20, 30)); - final int indent = Integer.parseInt(entry.substring(30, 40)); + final int indent = Integer.parseInt(entry.substring(10, 20)); - ArchObject arch = mainControl.getMapArch(num, pos); + ArchObject arch = mainControl.getMapArch(num, currentSquare); //String label; // We must set a disabled Icon (even though we don't want it) @@ -441,6 +424,8 @@ // arch == null should not happen, but it *can* happen when the active // window gets changed by user and java is still blitting here if (arch != null) { + arch = arch.getHead(); + if (!iss && indent == 0) { this.setBackground(IGUIConstants.BG_COLOR); } @@ -458,7 +443,6 @@ // In the map-tile-window the object names are displayed // next to the icons mainControl.setPlainFont(this); - arch = arch.getHead(); if (arch.getObjName() != null && arch.getObjName().length() > 0) { setText(arch.getObjName()); // special name Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-23 21:54:55 UTC (rev 371) @@ -107,6 +107,20 @@ } /** + * Return the position of the displayed object in the map-tile panel. + * @return the position to show + */ + @Nullable public Point getMouseRightPos() { + final Point pos = mapControl.getMapView().getMapMouseRightPos(); + + if (pos.x == -1 || pos.y == -1 || !isPointValid(pos)) { + return null; + } + + return pos; + } + + /** * Update the map description text. * @param str the new description text */ Modified: trunk/crossfire/src/cfeditor/map/MapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-23 13:38:43 UTC (rev 370) +++ trunk/crossfire/src/cfeditor/map/MapModel.java 2006-09-23 21:54:55 UTC (rev 371) @@ -35,6 +35,7 @@ @Deprecated void setArchObject(int x, int y, ArchObject arch); void setArchObject(Point pos, ArchObject arch); + @Nullable Point getMouseRightPos(); @Nullable ArchObject getMouseRightPosObject(); @Deprecated boolean addArchToMap(int archnr, int xx, int yy, int intern, boolean join, boolean insertBelow); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-24 11:19:18
|
Revision: 379 http://svn.sourceforge.net/gridarta/?rev=379&view=rev Author: akirschbaum Date: 2006-09-24 04:19:10 -0700 (Sun, 24 Sep 2006) Log Message: ----------- Do not crash when pasting multi-part objects to the edge of a map. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CopyBuffer.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-24 09:41:24 UTC (rev 378) +++ trunk/crossfire/ChangeLog 2006-09-24 11:19:10 UTC (rev 379) @@ -1,3 +1,8 @@ +2006-09-24 Andreas Kirschbaum + + * Do not crash when pasting multi-part objects to the edge of a + map. + 2006-09-23 Andreas Kirschbaum * Make insertion and deletion in the map tile panel work Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 09:41:24 UTC (rev 378) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-09-24 11:19:10 UTC (rev 379) @@ -363,10 +363,19 @@ newHead = arch.createClone(pos.x, pos.y); for (ArchObject tmp = arch.getDefaultArch().getMultiNext(); tmp != null; tmp = tmp.getMultiNext()) { final ArchObject newTail = mainControl.getArchObjectStack().newArchObjectInstance(tmp.getNodeNr()); + + final int mapx = pos.x + newTail.getMultiX(); + final int mapy = pos.y + newTail.getMultiY(); + + if (!mapControl.isPointValid(mapx, mapy)) { + // outside map + return; + } + newTail.setMultiX(tmp.getMultiX()); newTail.setMultiY(tmp.getMultiY()); - newTail.setMapX(pos.x + newTail.getMultiX()); - newTail.setMapY(pos.y + newTail.getMultiY()); + newTail.setMapX(mapx); + newTail.setMapY(mapy); newHead.addTailPart(newTail); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-26 18:39:11
|
Revision: 425 http://svn.sourceforge.net/gridarta/?rev=425&view=rev Author: akirschbaum Date: 2006-09-26 11:39:02 -0700 (Tue, 26 Sep 2006) Log Message: ----------- Make inventory display of multi-part objects in map tile panel work. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-25 22:17:46 UTC (rev 424) +++ trunk/crossfire/ChangeLog 2006-09-26 18:39:02 UTC (rev 425) @@ -1,3 +1,8 @@ +2006-09-26 Andreas Kirschbaum + + * Make inventory display of multi-part objects in map tile panel + work. + 2006-09-24 Andreas Kirschbaum * Do not crash when pasting multi-part objects to the edge of a Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-25 22:17:46 UTC (rev 424) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-26 18:39:02 UTC (rev 425) @@ -455,9 +455,11 @@ setText(arch.getArchetypeName()); // arch name } } - - setBorder(BorderFactory.createEmptyBorder(0, Math.max(0, indent - 1) * 16, 0, 0)); // indentation + } else { + setIcon(mainControl.getUnknownTileIcon()); + setText("?"); } + setBorder(BorderFactory.createEmptyBorder(0, Math.max(0, indent - 1) * 16, 0, 0)); // indentation return this; } Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-25 22:17:46 UTC (rev 424) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-26 18:39:02 UTC (rev 425) @@ -694,23 +694,22 @@ } // first, try to find the tile we had selected - GameObject node = null; final Iterator it = getArchObjects(pos); while (it.hasNext()) { - node = (GameObject) it.next(); + final GameObject node = (GameObject) it.next(); if (node.getMyID() == id) { // is it this map tile - break; + return node; } // no, lets check his inventory - final GameObject temp = findInvObject(node, id); + final GameObject temp = findInvObject(node.getHead(), id); if (temp != null) { return temp; } } - return node; + return null; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-27 18:21:30
|
Revision: 428 http://svn.sourceforge.net/gridarta/?rev=428&view=rev Author: akirschbaum Date: 2006-09-27 11:21:23 -0700 (Wed, 27 Sep 2006) Log Message: ----------- Make map grid display work correctly. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMapViewBasic.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-27 17:39:43 UTC (rev 427) +++ trunk/crossfire/ChangeLog 2006-09-27 18:21:23 UTC (rev 428) @@ -1,5 +1,7 @@ 2006-09-27 Andreas Kirschbaum + * Make map grid display work correctly. + * Fix object attributes dialog: do not ignore changed string attributes if old and new value only differs in case. Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-27 17:39:43 UTC (rev 427) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-09-27 18:21:23 UTC (rev 428) @@ -884,9 +884,9 @@ // if grid is active, draw grid lines (right and bottom) if (showMapGrid) { // horizontal: - grfx.drawLine(x * 32 + bOffset, y * 32 + bOffset, x * 32 + bOffset, y * 32 + 32 + bOffset); + grfx.drawLine(x * 32, y * 32, x * 32, y * 32 + 32); // vertical: - grfx.drawLine(x * 32 + bOffset, y * 32 + bOffset, x * 32 + 32 + bOffset, y * 32 + bOffset); + grfx.drawLine(x * 32, y * 32, x * 32 + 32, y * 32); } // if tile is highlighted, draw the highlight icon This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-27 18:29:37
|
Revision: 429 http://svn.sourceforge.net/gridarta/?rev=429&view=rev Author: akirschbaum Date: 2006-09-27 11:29:28 -0700 (Wed, 27 Sep 2006) Log Message: ----------- When saving, insert map_layer object attribute in same order as crossfire server. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMapFileEncode.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-27 18:21:23 UTC (rev 428) +++ trunk/crossfire/ChangeLog 2006-09-27 18:29:28 UTC (rev 429) @@ -1,5 +1,8 @@ 2006-09-27 Andreas Kirschbaum + * When saving, insert "map_layer" object attribute in same order + as crossfire server. + * Make map grid display work correctly. * Fix object attributes dialog: do not ignore changed string Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-27 18:21:23 UTC (rev 428) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-09-27 18:29:28 UTC (rev 429) @@ -411,6 +411,7 @@ addKey("container"); addKey("will_apply"); addKey("smoothlevel"); + addKey("map_layer"); addKey("current_weapon_script"); addKey("weapontype"); addKey("tooltype"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-27 19:13:34
|
Revision: 431 http://svn.sourceforge.net/gridarta/?rev=431&view=rev Author: akirschbaum Date: 2006-09-27 12:13:23 -0700 (Wed, 27 Sep 2006) Log Message: ----------- Fix #1539117 (Enter Exit not working for random maps). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-27 18:52:04 UTC (rev 430) +++ trunk/crossfire/ChangeLog 2006-09-27 19:13:23 UTC (rev 431) @@ -1,5 +1,7 @@ 2006-09-27 Andreas Kirschbaum + * Fix #1539117 (Enter Exit not working for random maps). + * When saving, insert "map_layer" object attribute in same order as crossfire server. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-27 18:52:04 UTC (rev 430) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-09-27 19:13:23 UTC (rev 431) @@ -1342,7 +1342,15 @@ } else { // path points to a different map final File newfile; // new mapfile to open - if (path.startsWith(File.pathSeparator) || path.startsWith("/")) { + if (path.equals("/!")) { + // destination is a random map; extract the final non-random map + final String destinationMap = getRandomMapParameter(exit, "final_map"); + if (destinationMap == null) { + showMessage("Destination Invalid", "The destination of this exit is a random map."); + return; + } + newfile = new File(mapDir.getAbsolutePath(), destinationMap); + } else if (path.startsWith(File.pathSeparator) || path.startsWith("/")) { // we have an absolute path: newfile = new File(mapDir.getAbsolutePath(), path.substring(1)); } else { @@ -1862,4 +1870,31 @@ return mapFileDecoder; } + /** + * Extract a parameter value for an exit to a random map. + * + * @param exit the exit object containing the parameters + * + * @param parameterName the parameter name to use + * + * @return the value of the given parameter name, or <code>null</code> if + * the parameter does not exist + */ + private static String getRandomMapParameter(final GameObject exit, final String parameterName) { + final String msg = exit.getMsgText(); + if (msg == null) { + return null; + } + + final String[] lines = msg.split("[\r\n]+"); + for (final String line : lines) { + final String[] tmp = line.split(" +", 2); + if (tmp.length == 2 && tmp[0].equals(parameterName)) { + return tmp[1]; + } + } + + return null; + } + } // class CMainControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-09-29 18:56:12
|
Revision: 432 http://svn.sourceforge.net/gridarta/?rev=432&view=rev Author: akirschbaum Date: 2006-09-29 11:56:05 -0700 (Fri, 29 Sep 2006) Log Message: ----------- Make deletion of inventory objects from map tile panel work. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-09-27 19:13:23 UTC (rev 431) +++ trunk/crossfire/ChangeLog 2006-09-29 18:56:05 UTC (rev 432) @@ -1,3 +1,7 @@ +2006-09-29 Andreas Kirschbaum + + * Make deletion of inventory objects from map tile panel work. + 2006-09-27 Andreas Kirschbaum * Fix #1539117 (Enter Exit not working for random maps). Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-27 19:13:23 UTC (rev 431) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-09-29 18:56:05 UTC (rev 432) @@ -703,7 +703,7 @@ } // no, lets check his inventory - final GameObject temp = findInvObject(node.getHead(), id); + final GameObject temp = findInvObject(node, id); if (temp != null) { return temp; } @@ -719,7 +719,7 @@ * @return the specified arch, or null if not found */ @Nullable public GameObject findInvObject(@NotNull final GameObject node, final int id) { - for (final GameObject arch : node) { + for (final GameObject arch : node.getHead()) { if (arch.getMyID() == id) { return arch; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-01 17:51:01
|
Revision: 439 http://svn.sourceforge.net/gridarta/?rev=439&view=rev Author: akirschbaum Date: 2006-10-01 10:50:49 -0700 (Sun, 01 Oct 2006) Log Message: ----------- Implement "Random Fill" function. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/map/MapControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-10-01 16:47:36 UTC (rev 438) +++ trunk/crossfire/ChangeLog 2006-10-01 17:50:49 UTC (rev 439) @@ -1,3 +1,7 @@ +2006-10-01 Andreas Kirschbaum + + * Implement "Random Fill" function. + 2006-09-29 Andreas Kirschbaum * Make deletion of inventory objects from map tile panel work. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-01 16:47:36 UTC (rev 438) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-01 17:50:49 UTC (rev 439) @@ -42,6 +42,7 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; +import java.util.Random; import java.util.Vector; import javax.swing.ImageIcon; import javax.swing.JComponent; @@ -158,6 +159,9 @@ private String strCurrentDir; + /** Global random number generator. */ + public static final Random rnd = new Random(System.currentTimeMillis() + 19580427); + // resource directories private File mapDir; @@ -1638,9 +1642,50 @@ return; // this should never be possible, but I just wanna make sure... } - copybuffer.fill(currentMap, fillBelow); + copybuffer.fill(currentMap, fillBelow, -1); } + /** "Random fill above" was selected from the Edit menu. */ + public void randFillAbove() { + fillRandomWanted(false); + } + + /** "Random fill below" was selected from the Edit menu. */ + public void randFillBelow() { + fillRandomWanted(true); + } + + /** + * "RandomFill" was selected from the Edit menu. + * @param fillBelow true if "Fill Below" was activated, false if "Fill Above" + */ + private void fillRandomWanted(final boolean fillBelow) { + if (currentMap == null || currentMap.getMapView() == null) { + return; // this should never be possible, but I just wanna make sure... + } + + String input = "100"; + for (;;) { + input = (String) JOptionPane.showInputDialog(mainView, "Enter a fill density between 1-100", fillBelow ? "Random fill below" : "Random fill above", JOptionPane.QUESTION_MESSAGE, null, null, input); + if (input == null) { + break; + } + + int rand = -1; + try { + rand = Integer.parseInt(input); + } catch (final NumberFormatException e) { + rand = -1; + } + if (rand < 1 || rand > 100) { + JOptionPane.showMessageDialog(mainView, "The fill density must be between 1-100.", "Illegal Value.", JOptionPane.ERROR_MESSAGE); + } else { + copybuffer.fill(currentMap, fillBelow, rand); + break; + } + } + } + /** "Replace" was selected from the Edit menu. */ public void replaceWanted() { if (currentMap == null || currentMap.getMapView() == null) { Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-10-01 16:47:36 UTC (rev 438) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-10-01 17:50:49 UTC (rev 439) @@ -163,6 +163,10 @@ private SimpleMenuEntry m_fill_below; + private SimpleMenuEntry m_rand_fill_above; + + private SimpleMenuEntry m_rand_fill_below; + private SimpleMenuEntry m_font; private CheckBoxMenuEntry se_monster; @@ -484,6 +488,30 @@ }); menuManager.addMenuEntry("main.edit", m_fill_below); + // Random Fill: + m_rand_fill_above = new SimpleMenuEntry("Random Fill Above"); + m_rand_fill_above.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); + m_rand_fill_above.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK)); + m_rand_fill_above.addActionListener( + new ActionListener() { + public void actionPerformed(final ActionEvent event) { + mainControl.randFillAbove(); + } + }); + menuManager.addMenuEntry("main.edit", m_rand_fill_above); + + // Random Fill: + m_rand_fill_below = new SimpleMenuEntry("Random Fill Below"); + m_rand_fill_below.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); + m_rand_fill_below.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK | Event.SHIFT_MASK)); + m_rand_fill_below.addActionListener( + new ActionListener() { + public void actionPerformed(final ActionEvent event) { + mainControl.randFillBelow(); + } + }); + menuManager.addMenuEntry("main.edit", m_rand_fill_below); + add(entry.getMenuBarComponent()); } Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-10-01 16:47:36 UTC (rev 438) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-10-01 17:50:49 UTC (rev 439) @@ -264,8 +264,10 @@ * @param mapControl MapControl of the active map we paste on * @param fillBelow if true, the filling content is placed *below* the * existing map + * @param density the fill density in percent; -1 to disable + * @todo the fill density is ignored for floodfill */ - public void fill(final MapControl mapControl, final boolean fillBelow) { + public void fill(final MapControl mapControl, final boolean fillBelow, final int density) { final Point startp = mapControl.getMapView().getHighlightStart(); // start of highlighted rect final Point offset = mapControl.getMapView().getHighlightOffset(); // offset of rect from startp final Point pos = new Point(); @@ -304,6 +306,9 @@ // cycle through all tile coordinates which are highlighted: for (pos.x = startp.x; pos.x - startp.x <= offset.x; pos.x++) { for (pos.y = startp.y; pos.y - startp.y <= offset.y; pos.y++) { + if (density != -1 && density != 100 && density < CMainControl.rnd.nextInt(100) + 1) { + continue; + } // Insert the new arch into the map addArchToMap(mapControl, arch, pos, 0, fillBelow); } Modified: trunk/crossfire/src/cfeditor/map/MapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapControl.java 2006-10-01 16:47:36 UTC (rev 438) +++ trunk/crossfire/src/cfeditor/map/MapControl.java 2006-10-01 17:50:49 UTC (rev 439) @@ -600,6 +600,10 @@ return mapView; } + public MapArchObject getMapArch() { + return mapModel.getMapArchObject(); + } + public File getMapFile() { return mapFile; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-08 18:27:13
|
Revision: 496 http://svn.sourceforge.net/gridarta/?rev=496&view=rev Author: akirschbaum Date: 2006-10-08 11:27:07 -0700 (Sun, 08 Oct 2006) Log Message: ----------- Fix #1573023 (Arch browser's filter broken). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CArchPanelPan.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-10-08 17:33:54 UTC (rev 495) +++ trunk/crossfire/ChangeLog 2006-10-08 18:27:07 UTC (rev 496) @@ -1,3 +1,7 @@ +2006-10-08 Andreas Kirschbaum + + * Fix #1573023 (Arch browser's filter broken). + 2006-10-03 Andreas Kirschbaum * Do not crash when a map resize cuts off only a parts of a Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-10-08 17:33:54 UTC (rev 495) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-10-08 18:27:07 UTC (rev 496) @@ -242,7 +242,7 @@ } else { final String strIndex = list.substring(offset + 45, offset + 50).trim(); if (index == Integer.parseInt(strIndex)) { - model.addElement(strIndex); + model.addElement(list.substring(offset, offset + 45).trim()); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-12 17:53:50
|
Revision: 549 http://svn.sourceforge.net/gridarta/?rev=549&view=rev Author: akirschbaum Date: 2006-10-12 10:53:43 -0700 (Thu, 12 Oct 2006) Log Message: ----------- Make "Enter Exit" work for BATTLEGROUND tiles. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/ExitTypes.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-10-11 22:56:20 UTC (rev 548) +++ trunk/crossfire/ChangeLog 2006-10-12 17:53:43 UTC (rev 549) @@ -1,3 +1,7 @@ +2006-10-12 Andreas Kirschbaum + + * Make "Enter Exit" work for BATTLEGROUND tiles. + 2006-10-08 Andreas Kirschbaum * Fix #1573023 (Arch browser's filter broken). Modified: trunk/crossfire/src/cfeditor/ExitTypes.java =================================================================== --- trunk/crossfire/src/cfeditor/ExitTypes.java 2006-10-11 22:56:20 UTC (rev 548) +++ trunk/crossfire/src/cfeditor/ExitTypes.java 2006-10-12 17:53:43 UTC (rev 549) @@ -17,6 +17,7 @@ static { EXIT_TYPES.add(41); // teleporter + EXIT_TYPES.add(58); // battleground EXIT_TYPES.add(66); // exit EXIT_TYPES.add(94); // pit EXIT_TYPES.add(95); // trapdoor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-10-23 20:55:18
|
Revision: 573 http://svn.sourceforge.net/gridarta/?rev=573&view=rev Author: christianhujer Date: 2006-10-23 13:55:10 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Removed unused png.jar. Modified Paths: -------------- trunk/crossfire/build.xml Removed Paths: ------------- trunk/crossfire/lib/png.jar Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-10-23 20:52:51 UTC (rev 572) +++ trunk/crossfire/build.xml 2006-10-23 20:55:10 UTC (rev 573) @@ -87,7 +87,7 @@ <!-- create JAR file --> <target name="jar" depends="compile" description="compiles source and creates jar."> <!-- extract classes from jar files into the build dir --> - <unjar src="${lib.dir}/png.jar" dest="${build.dir}" /> + <!--unjar src="${lib.dir}/png.jar" dest="${build.dir}" /--> <unjar src="${lib.dir}/visualtek.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/jdom.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/crimson.jar" dest="${build.dir}" /> Deleted: trunk/crossfire/lib/png.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-10-23 21:04:23
|
Revision: 574 http://svn.sourceforge.net/gridarta/?rev=574&view=rev Author: christianhujer Date: 2006-10-23 14:04:12 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Changed CMapViewBasic to use SUN ImageIO for saving the PNG. VisualTek is not needed any longer - removed. Modified Paths: -------------- trunk/crossfire/build.xml trunk/crossfire/src/cfeditor/CMapViewBasic.java Removed Paths: ------------- trunk/crossfire/lib/visualtek.jar Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-10-23 20:55:10 UTC (rev 573) +++ trunk/crossfire/build.xml 2006-10-23 21:04:12 UTC (rev 574) @@ -87,8 +87,6 @@ <!-- create JAR file --> <target name="jar" depends="compile" description="compiles source and creates jar."> <!-- extract classes from jar files into the build dir --> - <!--unjar src="${lib.dir}/png.jar" dest="${build.dir}" /--> - <unjar src="${lib.dir}/visualtek.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/jdom.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/crimson.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/bsh-core.jar" dest="${build.dir}" /> Deleted: trunk/crossfire/lib/visualtek.jar =================================================================== (Binary files differ) Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-10-23 20:55:10 UTC (rev 573) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-10-23 21:04:12 UTC (rev 574) @@ -29,8 +29,6 @@ import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; import cfeditor.map.MapModel; -import com.visualtek.png.PNGEncoder; -import com.visualtek.png.PNGException; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; @@ -45,15 +43,17 @@ import java.awt.geom.AffineTransform; import java.awt.geom.NoninvertibleTransformException; import java.awt.image.BufferedImage; +import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.Vector; +import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JComponent; import javax.swing.JScrollPane; import javax.swing.JViewport; -import net.sf.gridarta.Size2D; import net.sf.gridarta.EditOperation; +import net.sf.gridarta.Size2D; import net.sf.gridarta.gui.MapView; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; @@ -347,14 +347,7 @@ * @param filename the file to write to */ public void printFullImage(final String filename) throws IOException { - try { - // create instance of PNGencoder: - final PNGEncoder pngEnc = new PNGEncoder(renderer.getFullImage(), filename); - pngEnc.encode(); // encode image -> create file - } catch (PNGException e) { - mapControl.showMessage("Png Error", "The image could not be created."); - log.error("png error in printFullImage(" + filename + ")", e); - } + ImageIO.write(renderer.getFullImage(), "png", new File(filename)); } /** Refreshes the data in the view from the model. */ @@ -551,7 +544,7 @@ void updateLookAndFeel(); - Image getFullImage(); + BufferedImage getFullImage(); void paintTile(int x, int y); @@ -651,7 +644,7 @@ } /** @return an image of the entire mapview */ - public Image getFullImage() { + public BufferedImage getFullImage() { final int storeOffset; // tmp. storage to save map offset final Size2D mapSize = getMapControl().getMapSize(); @@ -659,7 +652,7 @@ final int mapHeight = 32 * mapSize.getHeight(); // first create a storing place for the image - final Image bufImage = new BufferedImage(mapWidth, mapHeight, BufferedImage.TYPE_INT_ARGB); + final BufferedImage bufImage = new BufferedImage(mapWidth, mapHeight, BufferedImage.TYPE_INT_ARGB); final Graphics bufGrfx = bufImage.getGraphics(); bufGrfx.setColor(Color.white); bufGrfx.setColor(Color.white); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-10-29 17:34:05
|
Revision: 595 http://svn.sourceforge.net/gridarta/?rev=595&view=rev Author: akirschbaum Date: 2006-10-29 09:33:58 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Make "move object up/down" in map tile panel work again. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-10-29 16:47:55 UTC (rev 594) +++ trunk/crossfire/ChangeLog 2006-10-29 17:33:58 UTC (rev 595) @@ -1,3 +1,7 @@ +2006-10-29 Andreas Kirschbaum + + * Make "move object up/down" in map tile panel work again. + 2006-10-12 Andreas Kirschbaum * Make "Enter Exit" work for BATTLEGROUND tiles. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-29 16:47:55 UTC (rev 594) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-10-29 17:33:58 UTC (rev 595) @@ -273,11 +273,17 @@ } void moveTileUp(final GameObject arch, final boolean refresh) { - arch.moveUp(); // XXX: ignores refresh + arch.moveUp(); + if (refresh) { + refreshCurrentMap(); + } } void moveTileDown(final GameObject arch, final boolean refresh) { - arch.moveDown(); // XXX: ignores refresh + arch.moveDown(); + if (refresh) { + refreshCurrentMap(); + } } /** collect CF arches */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-02 19:05:33
|
Revision: 602 http://svn.sourceforge.net/gridarta/?rev=602&view=rev Author: akirschbaum Date: 2006-11-02 11:05:26 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Fix check for cut off objects when resizing a map: only ask the user if objects are cut off. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-02 00:08:07 UTC (rev 601) +++ trunk/crossfire/ChangeLog 2006-11-02 19:05:26 UTC (rev 602) @@ -1,3 +1,8 @@ +2006-11-02 Andreas Kirschbaum + + * Fix check for cut off objects when resizing a map: only ask the + user if objects are cut off. + 2006-10-29 Andreas Kirschbaum * Make "move object up/down" in map tile panel work again. Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-11-02 00:08:07 UTC (rev 601) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-11-02 19:05:26 UTC (rev 602) @@ -800,7 +800,7 @@ // search the right stripe (as far as being cut off) for (int x = newSize.getWidth(); x < mapSize.getWidth(); x++) { for (int y = 0; y < mapSize.getHeight(); y++) { - if (mapGrid[x][y] != null) { + if (!mapGrid[x][y].isEmpty()) { return false; } } @@ -811,7 +811,7 @@ // search the bottom stripe (as far as being cut off) for (int y = newSize.getHeight(); y < mapSize.getHeight(); y++) { for (int x = 0; x < mapSize.getWidth(); x++) { - if (mapGrid[x][y] != null) { + if (!mapGrid[x][y].isEmpty()) { return false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-24 18:29:33
|
Revision: 682 http://svn.sourceforge.net/gridarta/?rev=682&view=rev Author: akirschbaum Date: 2006-11-24 10:29:30 -0800 (Fri, 24 Nov 2006) Log Message: ----------- Make pickmaps work again. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CPickmapPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-21 21:40:28 UTC (rev 681) +++ trunk/crossfire/ChangeLog 2006-11-24 18:29:30 UTC (rev 682) @@ -1,3 +1,7 @@ +2006-11-24 Andreas Kirschbaum <kir...@my...> + + * Make pickmaps work again. + 2006-11-02 Andreas Kirschbaum * Fix check for cut off objects when resizing a map: only ask the Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-21 21:40:28 UTC (rev 681) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-11-24 18:29:30 UTC (rev 682) @@ -274,7 +274,7 @@ final MapControl tmp = pickmaps.get(newName); boolean foundMap = false; - if (tmp != null && tmp.getMapFileName().equals(newName)) { + if (tmp != null && tmp.getMapFileName().endsWith("/"+newName)) { // this is the new active pickmap currentPickMap = tmp; // <- new pickmap foundMap = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-26 15:07:59
|
Revision: 699 http://svn.sourceforge.net/gridarta/?rev=699&view=rev Author: akirschbaum Date: 2006-11-26 07:07:58 -0800 (Sun, 26 Nov 2006) Log Message: ----------- Use ActionFactory to create GUI elements in ReplaceDialog. Modified Paths: -------------- trunk/crossfire/build.xml trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/messages.properties Added Paths: ----------- trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_fr.properties trunk/crossfire/src/cfeditor/messages_sv.properties Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-11-26 15:01:09 UTC (rev 698) +++ trunk/crossfire/build.xml 2006-11-26 15:07:58 UTC (rev 699) @@ -94,6 +94,7 @@ <unjar src="${lib.dir}/bsh-classgen.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/bsh-util.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/log4j.jar" dest="${build.dir}" /> + <unjar src="../lib/japi.jar" dest="${build.dir}" /> <delete dir="${build.dir}/META-INF" /> <!-- copy the resource files into the build dir --> Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-11-26 15:01:09 UTC (rev 698) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-11-26 15:07:58 UTC (rev 699) @@ -28,8 +28,6 @@ import cfeditor.map.MapControl; import java.awt.FlowLayout; import java.awt.Point; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; @@ -47,6 +45,8 @@ import javax.swing.JTextField; import javax.swing.WindowConstants; import net.sf.gridarta.Size2D; +import net.sf.japi.swing.ActionFactory; +import static net.sf.japi.swing.ActionFactory.getFactory; /** * This dialog manages the replace action. @@ -57,6 +57,9 @@ /** Serial Version UID. */ private static final long serialVersionUID = 1L; + /** ActionFactory. */ + private static final ActionFactory ACTION_FACTORY = getFactory("cfeditor"); + // matching criteria public static final int MATCH_ARCH_NAME = 0; @@ -92,14 +95,14 @@ private JTextField replaceInput1; - private OkButtonAL okButtonListener; + private int lastSelectedIndex; /** * Construct instance. * @param mainControl MainControl */ private ReplaceDialog(final CMainControl mainControl) { - dialog = createDialog(mainControl.getMainView(), "Replace"); + dialog = createDialog(mainControl.getMainView(), ACTION_FACTORY.getString("replaceTitle")); dialog.setModal(false); dialog.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.mainControl = mainControl; @@ -135,10 +138,10 @@ // first line: heading final JPanel line1 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - final JLabel labelon = new JLabel("On"); + final JLabel labelon = new JLabel(ACTION_FACTORY.getString("replaceOn")); line1.add(labelon); line1.add(Box.createVerticalStrut(3)); - replaceEntireBox = new JComboBox(new String[]{"entire map", "selected squares of"}); + replaceEntireBox = new JComboBox(new String[]{ACTION_FACTORY.getString("replaceOnMap"), ACTION_FACTORY.getString("replaceOnSelection")}); if (mapControl.getMapView().isHighlight()) { replaceEntireBox.setSelectedIndex(1); } else { @@ -152,7 +155,7 @@ // second line: replace what? final JPanel line2 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - final JLabel label1 = new JLabel("delete objects with"); + final JLabel label1 = new JLabel(ACTION_FACTORY.getString("replaceDelete")); line2.add(label1); line2.add(Box.createVerticalStrut(5)); @@ -167,16 +170,18 @@ // third line: replace by? final JPanel line3 = new JPanel(new FlowLayout(FlowLayout.LEFT)); - final JLabel label2 = new JLabel("and replace by"); + final JLabel label2 = new JLabel(ACTION_FACTORY.getString("replaceBy")); line3.add(label2); line3.add(Box.createVerticalStrut(5)); - replaceWithBox = new JComboBox(new String[]{"object", "nothing"}); + replaceWithBox = new JComboBox(new String[]{ACTION_FACTORY.getString("replaceByObject"), + ACTION_FACTORY.getString("replaceByNothing")}); if (replaceArch == null) { replaceWithBox.setSelectedIndex(1); } else { replaceWithBox.setSelectedIndex(0); } replaceWithBox.addItemListener(new ReplaceWithBoxItemListener()); + lastSelectedIndex = replaceWithBox.getSelectedIndex(); line3.add(replaceWithBox); iconLabel = new JLabel(); @@ -194,18 +199,9 @@ line3.add(rfArchName); mainPanel.add(line3); - // button panel: - final JButton okButton = new JButton("OK"); - okButtonListener = new OkButtonAL(); - okButton.addActionListener(okButtonListener); + final JButton okButton = new JButton(ACTION_FACTORY.createAction(false, "replaceOk", this)); + final JButton cancelButton = new JButton(ACTION_FACTORY.createAction(false, "replaceCancel", this)); - final JButton cancelButton = new JButton("Cancel"); - cancelButton.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - setVisible(false); - } - }); - setMessage(mainPanel); setOptions(new Object[]{okButton, cancelButton}); dialog.getRootPane().setDefaultButton(okButton); @@ -371,77 +367,76 @@ /** Item-listener for the "replace with"-selection box. */ private class ReplaceWithBoxItemListener implements ItemListener { - private int lastSelectedIndex; - - /** - * Constructor. - */ - ReplaceWithBoxItemListener() { - lastSelectedIndex = replaceWithBox.getSelectedIndex(); - } - - /** - * A (new) type has been selected in the box. - * @param event the occured <code>ItemEvent</code> (button pressed) - */ + /** {@inheritDoc} */ public void itemStateChanged(final ItemEvent event) { - if (event.getStateChange() == ItemEvent.SELECTED && lastSelectedIndex != replaceWithBox.getSelectedIndex()) { - if (replaceWithBox.getSelectedIndex() == 0) { + final int selectedIndex = replaceWithBox.getSelectedIndex(); + if (event.getStateChange() == ItemEvent.SELECTED && lastSelectedIndex != selectedIndex) { + switch (selectedIndex) { + case 0: // replace with arch replaceArch = mainControl.getArchPanelSelection(); // selected arch updateArchSelection(replaceArch, true); - } else if (replaceWithBox.getSelectedIndex() == 1) { + break; + + case 1: // replace with nothing iconLabel.setIcon(null); rfArchName.setText(""); colonLabel.setText(""); dialog.pack(); + break; } - lastSelectedIndex = replaceWithBox.getSelectedIndex(); + lastSelectedIndex = selectedIndex; } } } // class ReplaceWithBoxItemListener - /** Listener class for the ok-button of the replace dialog. */ - public final class OkButtonAL implements ActionListener { + /** + * Action method for Ok button. + * @used + */ + public void replaceOk() { + final String matchString = replaceInput1.getText().trim(); + final boolean deleteOnly = replaceWithBox.getSelectedIndex() == 1; + final boolean entireMap = replaceEntireBox.getSelectedIndex() == 0; - public void actionPerformed(final ActionEvent event) { - final String matchString = replaceInput1.getText().trim(); - final boolean deleteOnly = replaceWithBox.getSelectedIndex() == 1; - final boolean entireMap = replaceEntireBox.getSelectedIndex() == 0; - - if (mapControl == null || mapControl.isClosing()) { - setVisible(false); - mainControl.showMessage("Replace", "Map \"" + mapControl.getMapFileName() + "\" is no longer available.\n", JOptionPane.ERROR_MESSAGE); - } else if (!entireMap && !mapControl.getMapView().isHighlight()) { - // user selected "replace highlighted" but nothing is highlighted - mainControl.showMessage("Replace", "You chose to replace on selected squares of\n" + - "map \"" + mapControl.getMapFileName() + "\", but there is no selected area.", JOptionPane.ERROR_MESSAGE); + if (mapControl == null || mapControl.isClosing()) { + setVisible(false); + ACTION_FACTORY.showMessageDialog(this, "replaceMapGone", mapControl.getMapFileName()); + } else if (!entireMap && !mapControl.getMapView().isHighlight()) { + // user selected "replace highlighted" but nothing is highlighted + ACTION_FACTORY.showMessageDialog(this, "replaceMapNoSelection", mapControl.getMapFileName()); + } else { + final int matchCriteria; + if (replaceCriteria.getSelectedIndex() == 0) { + matchCriteria = MATCH_ARCH_NAME; + } else if (replaceCriteria.getSelectedIndex() == 1) { + matchCriteria = MATCH_OBJ_NAME; } else { - final int matchCriteria; - if (replaceCriteria.getSelectedIndex() == 0) { - matchCriteria = MATCH_ARCH_NAME; - } else if (replaceCriteria.getSelectedIndex() == 1) { - matchCriteria = MATCH_OBJ_NAME; - } else { - matchCriteria = 0; - } + matchCriteria = 0; + } - final int replaceCount = doReplace(matchCriteria, matchString, entireMap, deleteOnly); - if (replaceCount > 0) { - dialog.setVisible(false); - if (replaceCount == 1) { - mainControl.showMessage("Replace", "1 object has been replaced."); - } else { - mainControl.showMessage("Replace", replaceCount + " objects have been replaced."); - } + final int replaceCount = doReplace(matchCriteria, matchString, entireMap, deleteOnly); + if (replaceCount > 0) { + dialog.setVisible(false); + if (replaceCount == 1) { + ACTION_FACTORY.showMessageDialog(this, "replacedOne"); } else { - mainControl.showMessage("Replace", "No matching object found.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(this, "replacedMany", replaceCount); } + } else { + ACTION_FACTORY.showMessageDialog(this, "replacedZero"); } } + } - } // class OkButtonAL + /** + * Action method for Cancel button. + * @used + */ + public void replaceCancel() { + dialog.setVisible(false); + } } // class ReplaceDialog Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-11-26 15:01:09 UTC (rev 698) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-11-26 15:07:58 UTC (rev 699) @@ -2,3 +2,27 @@ # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding fileDialog.filter.python=Python Scripts + +#replace +replaceTitle=Replace +replaceOn=On +replaceOnMap=entire map +replaceOnSelection=selected squares of +replaceDelete=delete objects with +replaceBy=and replace by +replaceByObject=object +replaceByNothing=nothing + +replaceMapGone.title=Error with Replace +replaceMapGone.message=Map {0} is no longer available.\n +replaceMapNoSelection.title=No selection +replaceMapNoSelection.message=You chose to replace on selected squares of\nmap "{0}", but there is no selected area. +replacedZero.title=Replace failed +replacedZero.message=No matching object found. +replacedOne.title=Replace successful +replacedOne.message=1 Object has been replaced. +replacedMany.title=Replace successful +replacedMany.message={0} Objects have been replaced. + +replaceOk.text=OK +replaceCancel.text=Cancel Added: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties (rev 0) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-11-26 15:07:58 UTC (rev 699) @@ -0,0 +1,21 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +#replace +replaceTitle=Ersetze +replaceOn=In +replaceOnMap=der ganzen Karte +replaceOnSelection=der Auswahl auf +replaceDelete=l\xF6sche Objekte mit +replaceBy=und ersetze durch +replaceByObject=Objekt +replaceByNothing=nichts (=l\xF6schen) + +replaceMapGone=Karte {0} ist nicht mehr verf\xFCgbar.\n +replaceMapNoSelection=Ich kann ohne Selektion keine selektierten Felder\n auf der Karte "{0}" ersetzen. +replacedZero.title=Ersetzung fehlgeschlagen +replacedZero.message=Keine passenden Objekte gefunden. +replacedOne.title=Ersetzung erfolgreich +replacedOne.message=1 Objekt ersetzt. +replacedMany.title=Ersetzung erfolgreich +replacedMany.message={0} Objekte ersetzt. Property changes on: trunk/crossfire/src/cfeditor/messages_de.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/crossfire/src/cfeditor/messages_fr.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_fr.properties (rev 0) +++ trunk/crossfire/src/cfeditor/messages_fr.properties 2006-11-26 15:07:58 UTC (rev 699) @@ -0,0 +1,19 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# Translation done by Marmoth + +#replace +replaceTitle=Remplacer +replaceOn=Dans +replaceOnMap=toute la carte +replaceOnSelection=les cases s\xE9lectionn\xE9es +replaceDelete=delete objects with +replaceBy=et remplace par +replaceByObject=objet +replaceByNothing=rien + +replaceMapGone=La carte {0} n'est plus disponible.\n +replaceMapNoSelection=Vous avez choisi de remplacer les cases s\xE9lectionn\xE9es de la \ncarte \"{0}\", mais il n'y a pas de s\xE9lection. +replacedZero.message=Aucun objet correspondant trouv\xE9. +replacedOne.message=1 L'objet a \xE9t\xE9 remplac\xE9. +replacedMany.message={0} Les objets ont \xE9t\xE9 remplac\xE9s. Property changes on: trunk/crossfire/src/cfeditor/messages_fr.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/crossfire/src/cfeditor/messages_sv.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_sv.properties (rev 0) +++ trunk/crossfire/src/cfeditor/messages_sv.properties 2006-11-26 15:07:58 UTC (rev 699) @@ -0,0 +1,26 @@ +# Warning: This file MUST be ISO-8859-1 +# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding + +#replace +replaceTitle=Ers\xE4tt +replaceOn=P\xE5 +replaceOnMap=hela kartan +replaceOnSelection=markerade rutor p\xE5 +replaceDelete=radera objekt med +replaceBy=och ers\xE4tt med +replaceByObject=objekt +replaceByNothing=ingenting + +replaceMapGone.title=Fel under ers\xE4ttning +replaceMapGone.message=Kartan {0} is no longer available. +replaceMapNoSelection.title=Ingen markering +replaceMapNoSelection.message=Du valde att ers\xE4tta markerade rutor p\xE5 kartan \"{0}\",\n men det finns ingen markering. +replacedZero.title=Ers\xE4ttning misslyckades +replacedZero.message=Inga matchande objekt hittade. +replacedOne.title=Ers\xE4ttning lyckades +replacedOne.message=1 objekt har ersatts. +replacedMany.title=Ers\xE4ttning lyckades +replacedMany.message={0} objekt har ersatts. + +replaceOk.text=Ok +replaceCancel.text=Avbryt Property changes on: trunk/crossfire/src/cfeditor/messages_sv.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-11-30 22:04:47
|
Revision: 759 http://svn.sourceforge.net/gridarta/?rev=759&view=rev Author: akirschbaum Date: 2006-11-30 14:02:41 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Update archetypes, images and treasurelists. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/crossfire.0 trunk/crossfire/resource/conf/treasures Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-11-30 20:02:11 UTC (rev 758) +++ trunk/crossfire/ChangeLog 2006-11-30 22:02:41 UTC (rev 759) @@ -1,3 +1,7 @@ +2006-11-30 Andreas Kirschbaum + + * Update archetypes, images and treasurelists. + 2006-11-29 Andreas Kirschbaum * Properly center error message in create new pickmap dialog. Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2006-11-30 20:02:11 UTC (rev 758) +++ trunk/crossfire/resource/conf/archetypes 2006-11-30 22:02:41 UTC (rev 759) @@ -1,15485 +1,10696 @@ -Object door_0 -name door -face door_0.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object elvenboots +name elven boots +name_pl elven boots +client_type 290 +nrof 1 +face elvenboots.111 +value 30000 +weight 500 +type 99 +exp 3 +material 8 +stealth 1 +editable 5120 +item_power 3 +body_foot -2 +editor_folder armour/boots end -Object door_1_1 -name door -face door_1.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object high_boots +name jack boots +name_pl jack boots +client_type 291 +face high_boots.111 +value 60 +weight 6500 +ac 1 +nrof 1 +resist_physical 4 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_1_3 -name door -face door_2.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 +Object high_boots_b +name jack boots +name_pl jack boots +client_type 291 +face high_boots_b.111 +value 1700 +weight 6500 +ac 1 +nrof 1 +Cha 1 +resist_death 1 +resist_physical 4 +type 99 +material 8 +materialname black leather +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_2_2_1 -name door -face door_3.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1_2 -name door -face door_4.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_1_1 -name door -face door_5.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_2 -name door -face door_6.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_2 -name door -face door_7.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1_4 -name door -face door_8.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_4 -name door -face door_9.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_1_2 -name door -face door_A.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_1 -name door -face door_B.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2_2_3 -name door -face door_C.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_4 -name door -face door_D.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_3_3 -name door -face door_E.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_4 -name door -face door_F.111 -type 23 -editor_folder door/Door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object locked_door1 -name locked door -face ldoor1.111 -type 20 -editor_folder door/Locked -msg -You need the special key to open this door. -endmsg -slaying set_individual_value -no_pass 1 -no_pick 1 -no_magic 1 -damned 1 -end -Object locked_door2 -name locked door -face ldoor2.111 -type 20 -editor_folder door/Locked -msg -You need the special key to open this door. -endmsg -slaying set_individual_value -no_pass 1 -no_pick 1 -no_magic 1 -damned 1 -end -Object key2 -name strange key -face key2.111 -type 21 -editor_folder door/Locked -race keys -slaying set_individual_value -value 100 -weight 100 -name_pl strange keys -client_type 810 -end -Object odoor_2_fant_blue-green -name door -face odoor_2_fant_blue-green.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_blue-yellow -name door -face odoor_2_fant_blue-yellow.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_brown -name door -face odoor_2_fant_brown.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_red-white -name door -face odoor_2_fant_red-white.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object odoor_2_fant_red-yellow -name door -face odoor_2_fant_red-yellow.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_1 -name door -face odoor_1.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_2 -name door -face odoor_2.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -blocksview 1 -hp 400 -exp 1 -ac 10 -material 16 -no_pick 1 -alive 1 -level 1 -end -Object door_look_1 -name door -face wooddoor_1.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -hp 400 -exp 1 -ac 10 +Object high_boots_b_d +name jack boots +name_pl jack boots +client_type 291 +face high_boots_b.111 +title of death +value 30000 +weight 13000 +ac 1 +nrof 1 +Cha 1 +resist_death 25 +resist_physical 25 +type 99 material 2 -no_pick 1 -alive 1 -level 1 -pass_thru 1 +materialname black steel +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object door_look_2 -name door -face wooddoor_2.111 -type 23 -editor_folder door/door -randomitems door -no_pass 1 -hp 400 -exp 1 -ac 10 -material 2 -no_pick 1 -alive 1 -level 1 -pass_thru 1 +Object high_boots_w +name jack boots +name_pl jack boots +client_type 291 +face high_boots_w.111 +value 2000 +weight 6500 +ac 1 +nrof 1 +Cha 1 +resist_blind 1 +resist_physical 4 +type 99 +material 8 +materialname white leather +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object key -face key1.111 -type 24 -editor_folder door/door -race keys +Object high_boots_w_l +name jack boots +name_pl jack boots +client_type 291 +face high_boots_w.111 +title of light +value 40000 +weight 13000 +ac 1 nrof 1 +Cha 1 +resist_blind 25 +resist_physical 25 +type 99 material 2 -value 10 -weight 10 -name_pl keys -client_type 801 +materialname white steel +editable 1024 +body_foot -2 +gen_sp_armour 4 +editor_folder armour/boots end -Object town_1 -name village -face jcity_0.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -Object town_2 -name small town -face jcity_2.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_2.2 -name small town -face jcity_8.111 -type 66 -no_pick 1 -x 1 -end -Object town_3 -name small town -face jcity_4.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_3.2 -name small town -face jcity_1.111 -type 66 -no_pick 1 -y 1 -end -Object town_4 -name medium town -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_4.2 -name medium town -face jcity_C.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_4.3 -name medium town -face jcity_3.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_4.4 -name medium town -face jcity_9.111 -type 66 -no_pick 1 -x 1 -y 1 -end -Object town_5 -name city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_5.2 -name city -face jcity_E.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_5.3 -name city -face jcity_C.111 -type 66 -no_pick 1 -x 2 -end -More -Object town_5.4 -name city -face jcity_3.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_5.5 -name city -face jcity_B.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_5.6 -name city -face jcity_9.111 -type 66 -no_pick 1 -x 2 -y 1 -end -Object town_6 -name city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_6.2 -name city -face jcity_C.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_6.3 -name city -face jcity_7.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_6.4 -name city -face jcity_D.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_6.5 -name city -face jcity_3.111 -type 66 -no_pick 1 -y 2 -end -More -Object town_6.6 -name city -face jcity_9.111 -type 66 -no_pick 1 -x 1 -y 2 -end -Object town_7 -name large city -face jcity_6.111 -type 66 -editor_folder exit/Town -no_pick 1 -client_type 25012 -end -More -Object town_7.2 -name large city -face jcity_E.111 -type 66 -no_pick 1 -x 1 -end -More -Object town_7.3 -name large city -face jcity_C.111 -type 66 -no_pick 1 -x 2 -end -More -Object town_7.4 -name large city -face jcity_7.111 -type 66 -no_pick 1 -y 1 -end -More -Object town_7.5 -name large city -face jcity_F.111 -type 66 -no_pick 1 -x 1 -y 1 -end -More -Object town_7.6 -name large city -face jcity_D.111 -type 66 -no_pick 1 -x 2 -y 1 -end -More -Object town_7.7 -name large city -face jcity_3.111 -type 66 -no_pick 1 -y 2 -end -More -Object town_7.8 -name large city -face jcity_B.111 -type 66 -no_pick 1 -x 1 -y 2 -end -More -Object town_7.9 -name large city -face jcity_9.111 -type 66 -no_pick 1 -x 2 -y 2 -end -Object well -face well.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object dforest_exit -face darkforest.111 -type 66 -editor_folder exit/exit -no_pick 1 -is_floor 1 -walk_on 1 -smoothface darkforest.111 darkforest_S.111 -smoothlevel 136 -client_type 25012 -end -Object invis_exit -face exit.113 -type 66 -editor_folder exit/exit -invisible 1 -no_pick 1 -walk_on 1 -fly_on 1 -client_type 25012 -end -Object oakdoor -face oakdoor.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object volcano_high -name high volcano -face volcano_hi.111 -type 66 -editor_folder exit/exit -no_pick 1 -slow_move 20 -blocksview 1 -client_type 25012 -end -More -Object volcano_high_2 -name high volcano -face volcano_hi.211 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -x 1 -end -More -Object volcano_high_3 -name high volcano -face volcano_hi.311 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -y 1 -end -More -Object volcano_high_4 -name high volcano -face volcano_hi.411 -type 66 -no_pick 1 -slow_move 20 -blocksview 1 -x 1 -y 1 -end -Object ladder_down -name ladder going down -face ladder_down.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_bi_up -name ladder going up -face ladder2_up.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_up -name ladder going up -face ladder_up.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object ladder_bi_down -name ladder going down -face ladder2_do.111 -type 66 -editor_folder exit/Ladder -no_pick 1 -client_type 25012 -end -Object volcano_low -name volcano -face volcano_lo.111 -type 66 -editor_folder exit/exit -no_pick 1 -slow_move 15 -blocksview 1 -client_type 25012 -end -More -Object volcano_low_2 -name volcano -face volcano_lo.211 -type 66 -no_pick 1 -slow_move 15 -blocksview 1 -x 1 -end -Object perm_magic_portal -name magic portal -face magic_portal.111 -type 66 -editor_folder exit/magic_portal -slaying /city/city -hp 15 -sp 19 +Object idaten +name Idaten boots +name_pl Idaten boots +client_type 290 +nrof 1 +exp 5 +face idaten.111 +animation idaten speed 0.3 -no_pick 1 -animation perm_magic_portal -client_type 25011 +exp 20 +value 50000 +weight 5000 +type 99 +material 8 +resist_physical 3 +editable 5120 +body_foot -2 +item_power 25 +editor_folder armour/boots end -Object magic_portal -face magic_portal.11L -type 66 -editor_folder exit/magic_portal -slaying /city/city -hp 15 -sp 19 -speed 0.3 -no_pick 1 -animation magic_portal -is_used_up 1 -food 59 -changing 1 -client_type 25011 +Object levitationboots +name levitation boots +name_pl levitation boots +client_type 290 +nrof 1 +face lev_boots.111 +value 35000 +weight 2500 +type 99 +material 8 +resist_physical 3 +flying 1 +editable 5120 +body_foot -2 +item_power 1 +map_layer item +editor_folder armour/boots end -Object chole_1 -name hole in the ground -face chole_1.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 +Object low_boots +name shoes +name_pl shoes +client_type 291 +face low_boots.111 +value 25 +weight 2000 +nrof 1 +ac 1 +resist_physical 1 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 1 +editor_folder armour/boots end -Object chole_2 -name hole in the ground -face chole_2.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 +Object sandals +name sandals +name_pl sandals +client_type 291 +face sandals.111 +value 5 +weight 500 +resist_physical 1 +nrof 1 +type 99 +material 8 +editable 1024 +body_foot -2 +gen_sp_armour 1 +editor_folder armour/boots end -Object whirlwind_exit -name whirl wind -face stalkergen.111 -type 66 -editor_folder exit/exit +Object speedboots +name speed boots +name_pl speed boots +client_type 290 +nrof 1 +exp 6 +face speedboots.111 +animation speedboots speed 0.2 -no_pick 1 -animation whirlwind_exit -walk_on 1 -fly_on 1 -client_type 25012 +value 50000 +weight 5000 +type 99 +material 8 +resist_physical 3 +editable 5120 +body_foot -2 +item_power 6 +editor_folder armour/boots end -Object fogexit -name mysterous fog -face fog.111 -type 66 -editor_folder exit/exit -speed 0.2 -no_pick 1 -animation fogexit -walk_on 1 -fly_on 1 -client_type 25012 +Object bracers_ac +nrof 1 +name bracers +name_pl bracers +client_type 311 +type 104 +face bracers_ac.111 +ac 1 +value 1000 +material 2 +weight 3000 +editable 1024 +body_wrist -2 +editor_folder armour/bracers end -Object pentagram_111 -name pentagram -face pentagram.111 -type 41 -editor_folder exit/Pentagram -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 +Object bracers_dex +nrof 1 +name bracers +name_pl bracers +client_type 311 +title of dexterity +face bracersdex.111 +type 104 +Dex 2 +value 65000 +weight 3000 +editable 5120 +body_wrist -2 +item_power 2 +editor_folder armour/bracers end -More -Object pentagram_112 -name pentagram -face pentagram.112 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 +Object cloak +name cloak +name_pl cloaks +client_type 281 +type 87 +face cloak.111 +ac 0 +weight 5000 +value 40 +material 136 +editable 1024 +nrof 1 +body_shoulder -1 +editor_folder armour/cloak end -More -Object pentagram_113 -name pentagram -face pentagram.113 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 +Object magic_resist +name Cloak of Magic Resistance +name_pl Cloaks of Magic Resistance +client_type 280 +nrof 1 +type 87 +face magic_resist.111 +ac 0 +weight 5000 +value 220000 +startequip 1 +no_steal 1 +material 128 +materialname astolare +resist_magic 95 +editable 5120 +body_shoulder -1 +item_power 4 +editor_folder armour/cloak end -More -Object pentagram_121 -name pentagram -face pentagram.121 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -y 1 -end -More -Object pentagram_122 -name pentagram -face pentagram.122 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 -y 1 -end -More -Object pentagram_123 -name pentagram -face pentagram.123 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 -y 1 -end -More -Object pentagram_131 -name pentagram -face pentagram.131 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -y 2 -end -More -Object pentagram_132 -name pentagram -face pentagram.132 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 1 -y 2 -end -More -Object pentagram_133 -name pentagram -face pentagram.133 -type 41 -speed 0 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -x 2 -y 2 -end -Object hole -face hole1.111 -type 66 -editor_folder exit/exit -no_pick 1 -is_floor 1 -smoothlevel 10 -smoothface hole1.111 grass_S.111 -client_type 25012 -end -Object sewer_access -name sewer -face sewer_access.111 -type 66 -editor_folder exit/exit -msg -You open the sewer access -grid and jump down. -My god, you are stinking! -endmsg -no_pick 1 -client_type 25012 -end -Object sewer_access2 -name sewer -face sewer_access.112 -type 66 -editor_folder exit/exit -msg -You open the sewer access -grid and jump down. -My god, you are stinking! -endmsg -no_pick 1 -client_type 25012 -end -Object ruins -face ruins.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway -face archwood.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_green -face archgreen.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_gold -face archgold.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object archway_tree -face archtree.111 -type 66 -editor_folder exit/exit -no_pick 1 -client_type 25012 -end -Object exit -face exit.111 -type 66 -editor_folder exit/exit -speed 0.5 -no_pick 1 -animation exit -walk_on 1 -fly_on 1 -client_type 25012 -end -Object teleporter -face teleporter.111 -type 41 -editor_folder exit/exit -speed 0.1 -activate_on_push 1 -activate_on_release 1 -no_pick 1 -animation teleporter -end -Object stair3_ystone_up -name stairs going up -face stair3_ystone_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_3_up -name stairs going up -face stair3_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair2_down -name stairs going down -face stair2_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_gstone_do -name stairs going down -face stair3_gstone_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair2_up -name stairs going up -face stair2_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_gstone_up -name stairs going up -face stair3_gstone_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down -name stairs going down -face stair_down.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up -name stairs going up -face stair_up.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_1 -name stairs going up -face stair_up_1.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_2 -name stairs going up -face stair_up_2.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_3 -name stairs going up -face stair_up_3.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_up_4 -name stairs going up -face stair_up_4.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair3_ystone_do -name stairs going down -face stair3_ystone_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_3_down -name stairs going down -face stair3_do.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_1 -name stairs going down -face stair_down_1.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_2 -name stairs going down -face stair_down_2.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_3 -name stairs going down -face stair_down_3.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object stair_down_4 -name stairs going down -face stair_down_4.111 -type 66 -editor_folder exit/Up_down -no_pick 1 -client_type 25012 -end -Object booze -face booze.111 -type 54 -editor_folder food/food -on_use_yield boozebottle_empty -food 100 +Object oilskin +name oilskin cloak +name_pl oilskin cloaks +client_type 280 +type 87 +face oilskin.111 +Dex -1 +ac 1 +resist_physical 3 +weight 1000 +value 120000 +material 8 +editable 5120 nrof 1 -material 32 -value 5 -weight 6500 -identified 1 -name_pl boozes -client_type 611 -slaying vial_poison:poison +resist_acid 70 +magic -4 +damned 1 +body_shoulder -1 +editor_folder armour/cloak end -Object apple_half -name apple halve -face apple_half.111 -type 6 -editor_folder food/food -name_pl apple halves -food 12 +Object serp_cloak +name serpent cloak +name_pl serpent cloaks +client_type 280 +type 87 +face serp_cloak.111 +ac 1 +weight 700 +resist_poison 30 +value 900 +material 8 +materialname snakeskin +editable 5120 nrof 1 -need_an 1 -material 32 -value 1 -weight 50 -identified 1 -client_type 601 -slaying b_slicingknife:2 apple_fourth +body_shoulder -1 +item_power 2 +editor_folder armour/cloak end -Object apple_fourth -name apple fourth -face apple_fourth.111 -type 6 -editor_folder food/food -name_pl apple fourths -food 6 +Object b_gauntlets nrof 1 -need_an 1 -material 32 -value 1 -weight 25 -identified 1 -client_type 601 -slaying b_slicingknife:2 apple_eighth +name gauntlets +client_type 305 +face b_gauntlet_s.111 +type 100 +resist_physical 2 +value 6 +nrof 1 +material 2 +materialname bronze +weight 1800 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object apple_eighth -name apple eighth -face apple_eighth.111 -type 6 -editor_folder food/food -name_pl apple eighths -food 3 +Object gauntlets nrof 1 -need_an 1 -material 32 -value 1 -weight 12 -identified 1 -client_type 601 +name gauntlets +client_type 305 +face gauntlet_s.111 +type 100 +resist_physical 3 +value 25 +nrof 1 +material 2 +weight 1800 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object cheeseburger -face ch_burger.111 -type 6 -editor_folder food/food -food 350 +Object gauntlets_dex nrof 1 -material 32 -value 10 -weight 6500 -identified 1 -client_type 601 +name gauntlets +client_type 305 +title of dexterity +face gauntlet_s.111 +type 100 +Dex 2 +resist_physical 3 +value 65000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 1 +editor_folder armour/gauntlets end -Object waybread -face waybread.111 -type 6 -editor_folder food/food -food 500 +Object gauntlets_str nrof 1 -material 32 -value 30 -weight 1000 -identified 1 -name_pl waybreads -client_type 601 +name gauntlets +name_pl gauntlets +client_type 305 +title of strength +face gauntlet_s.111 +type 100 +Str 1 +resist_physical 3 +value 65000 +material 2 +weight 2000 +editable 5120 +body_hand -2 +item_power 0 +editor_folder armour/gauntlets end -Object apple -face apple.111 -type 6 -editor_folder food/food -food 25 +Object gloves nrof 1 -need_an 1 -material 32 -value 2 +name gloves +client_type 301 +face gloves.111 +type 100 +resist_physical 1 +nrof 1 +value 4 +material 8 weight 100 -identified 1 -name_pl apples -client_type 601 -slaying b_slicingknife:2 apple_half +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object chocolate -face chocolate.111 -type 6 -editor_folder food/food -food 50 +Object gloves_b nrof 1 -material 32 -value 10 +name gloves +client_type 301 +face gloves_b.111 +type 100 +resist_physical 1 +nrof 1 +value 64 +material 8 +materialname black leather weight 100 -identified 1 -name_pl chocolates -client_type 601 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object water -face water.111 -type 54 -editor_folder food/food -on_use_yield wbottle_empty -food 5 +Object gloves_w nrof 1 -material 32 -value 5 -weight 1500 -name_pl waters -client_type 611 -slaying vial_poison:water_poison +name gloves +client_type 301 +face gloves_w.111 +type 100 +resist_physical 1 +Cha 1 +resist_blind 2 +nrof 1 +value 6000 +material 8 +materialname white leather +weight 100 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object orcchop -name orc chop -face orcchop.111 -type 6 -editor_folder food/food -need_an 1 -food 10 +Object gloves_w_l nrof 1 -material 32 -value 1 -weight 650 -identified 1 -name_pl orc chops -client_type 624 +name gloves +client_type 301 +face gloves_w.111 +type 100 +resist_physical 20 +Cha 1 +resist_blind 20 +title of light +nrof 1 +value 42000 +material 2 +materialname white steel +weight 200 +editable 1024 +body_hand -2 +editor_folder armour/gauntlets end -Object food -face food.111 -type 6 -editor_folder food/food -food 200 +Object god_finger nrof 1 -material 32 -value 10 -weight 6500 -identified 1 -name_pl foods -client_type 601 +name God Finger +name_pl God Fingers +client_type 300 +type 100 +face god_finger.111 +animation god_finger +speed .1 +Str 2 +Dex -1 +resist_physical 3 +dam +3 +make_invisible 1 +value 120000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 2 +editor_folder armour/gauntlets end -Object leg_mutton -face food.111 -type 6 -editor_folder food/food -food 150 +Object shining_finger nrof 1 -material 32 -value 50 -weight 1500 -identified 1 -name_pl legs of mutton -name_pl leg of mutton -client_type 601 +name Shining Finger +name_pl Shining Fingers +client_type 300 +type 100 +face shining_finger.111 +animation shining_finger +speed .1 +Str 2 +resist_physical 3 +dam +3 +value 120000 +material 2 +weight 1800 +editable 5120 +body_hand -2 +item_power 1 +editor_folder armour/gauntlets end -Object cake -face cake.111 -type 6 -editor_folder food/food -food 125 +Object girdle_strcon nrof 1 -material 32 -value 8 -weight 3000 -identified 1 -name_pl cakes -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of fighting +face gir_strcon.111 +animation girdle_strcon +speed 0.1 +Str 1 +Con 1 +weight 2500 +value 75000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object s_weasel -name sizzling weasel on a stick -face s_weasel.111 -type 6 -editor_folder food/food -food 30 +Object girdle_con nrof 1 -material 32 -value 5 -weight 10 -identified 1 -name_pl sizzling weasels on a stick -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of constitution +face girdle_con.111 +animation girdle_con +speed 0.1 +Con 2 +weight 2500 +value 85000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object blackroot -name blackroot -face blackroot.111 -type 6 -editor_folder food/food -food 15 +Object girdle_dam nrof 1 -material 32 -value 300 -weight 300 -identified 1 -name_pl blackroot -client_type 601 +type 113 +name girdle +name_pl girdles +client_type 321 +title of damage +face girdle_dam.111 +animation girdle_dam +speed 0.1 +dam 10 +weight 2500 +value 70000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object uf6 -name uranium hexafluoride gas -face uf6.111 -type 54 -editor_folder food/food -on_use_yield wbottle_empty -food 1 +Object girdle_str nrof 1 -material 32 -value 155 -weight 11500 -name_pl uranium hexafluoride gas -client_type 611 +type 113 +name girdle +name_pl girdles +client_type 321 +title of strength +face girdle_str.111 +animation girdle_str +speed 0.1 +Str 2 +weight 2500 +value 80000 +material 8 +editable 5120 +body_waist -1 +item_power 1 +editor_folder armour/girdle end -Object bag_popcorn -name bag of popcorn -face bag_popcorn.111 -type 6 -editor_folder food/food -food 50 +Object a_helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 32 -value 6 -weight 250 -identified 1 -name_pl bags of popcorn -client_type 601 +type 34 +face a_helmet.111 +weight 5000 +ac 1 +resist_physical 5 +value 14 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object poison -name booze -face booze.111 -type 7 -editor_folder food/food -on_use_yield boozebottle_empty +Object b_full_helmet nrof 1 -material 32 -weight 6500 -identified 0 -name_pl boozes -client_type 611 -cursed 1 -known_cursed 0 -title of poison +name full helmet +name_pl full helmets +client_type 271 +type 34 +face b_fullhelmet.111 +ac 1 +resist_physical 5 +weight 12000 +value 4 +material 2 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 10 +editor_folder armour/helmet end -Object wine_poison -name bottle of wine -face wine.111 -type 7 -editor_folder food/food -on_use_yield winebottle_empty -food 75 +Object b_helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 36 -value 10 -weight 1000 -identified 0 -name_pl bottles of wine -client_type 611 -cursed 1 -known_cursed 0 -title of poison +type 34 +face b_helmet.111 +weight 5000 +ac 1 +resist_physical 3 +value 4 +material 2 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object w_glass_poison -name glass of wine -face w_glass.111 -type 7 -editor_folder food/food -food 10 +Object b_horned_helmet nrof 1 -material 36 -value 2 -weight 1000 -identified 0 -name_pl glasses of wine -client_type 611 -cursed 1 -known_cursed 0 -title of poison +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face b_hornhelmet.111 +ac 1 +resist_physical 1 +weight 6000 +value 3 +material 18 +materialname bronze +editable 1024 +body_head -1 +gen_sp_armour 2 +editor_folder armour/helmet end -Object water_poison -face water.111 -type 7 -editor_folder food/food -on_use_yield wbottle_empty -food 5 +Object bighorned_helmet nrof 1 -material 32 -value 5 -weight 1500 -name_pl waters -client_type 611 -identified 0 -cursed 1 -known_cursed 0 -title of poison +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face bighorn_he.111 +ac 1 +resist_physical 5 +weight 10000 +value 22 +material 18 +editable 1024 +body_head -1 +gen_sp_armour 3 +editor_folder armour/helmet end -Object tomato -name tomato -face tomato.111 -type 6 -editor_folder food/food -food 50 +Object crown +name crown nrof 1 -material 32 -value 7 -weight 1000 -identified 1 -name_pl tomatoes -client_type 601 +face crown.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object tomato_big -name very large tomato -face tomato_big.111 -type 6 -editor_folder food/food -food 200 + +Object crown_r +name crown nrof 1 -material 32 -value 14 -weight 1000 -identified 1 -name_pl very large tomatoes -client_type 601 +face crown_r.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object dragon_steak -name steak -face drag_steak.111 -type 72 -editor_folder food/food -food 400 + +Object crown_gray +name crown nrof 1 -material 32 -value 10 -weight 5 -identified 1 -name_pl steaks -client_type 624 +face crown_gray.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object orange -name orange -face orange.111 -type 6 -editor_folder food/food -food 25 + +Object crown_white +name crown nrof 1 -need_an 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl oranges -client_type 601 +face crown_white.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object coffee -name cup of coffee -face coffee.111 -type 6 -editor_folder food/food -on_use_yield coffee_empty -food 10 + +Object crown_dark +name crown nrof 1 -material 32 -value 1 -weight 100 -identified 1 -name_pl cups of coffee -client_type 601 +face crown_dark.111 +type 34 +material 2 +resist_physical 3 +weight 12300 +value 1700 +editable 128 +name_pl crowns +client_type 271 +body_head -1 +editor_folder armour/helmet end -Object mint -name mint sprig -face mint.111 -type 6 -editor_folder food/food -food 5 +Object eyeglasses nrof 1 -material 32 -value 5 -weight 100 -name_pl mint sprigs -client_type 601 +name eye glasses +client_type 275 +type 34 +face eyeglasses.111 +weight 120 +value 1000 +Dex 2 +Cha -2 +material 4 +materialname glass +editable 1024 +body_head -1 +editor_folder armour/helmet end -Object roast_bird -name roast bird -face roast_bird.111 -type 6 -editor_folder food/food -food 450 +Object full_helmet nrof 1 -material 32 -value 40 -weight 7500 -identified 1 -name_pl roast birds -client_type 601 +name full helmet +name_pl full helmets +client_type 271 +type 34 +face fullhelmet.111 +ac 1 +resist_physical 10 +weight 12000 +value 16 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 10 +editor_folder armour/helmet end -Object rose_pink -name pink rose -face rose_pink.111 -type 6 -editor_folder food/food -food 5 +Object helmet +name helmet +name_pl helmets +client_type 271 nrof 1 -material 32 -value 60 -weight 2 -name_pl pink roses -client_type 601 +type 34 +face helmet.111 +weight 5000 +ac 1 +resist_physical 5 +value 14 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +editor_folder armour/helmet end -Object rose_red -name red rose -face rose_red.111 -type 6 -editor_folder food/food -food 5 +Object helmet_of_brilliance +name helmet +name_pl helmets +client_type 270 nrof 1 -material 32 -value 80 -weight 2 -name_pl red roses -client_type 601 +title of brilliance +face helmet_bri.111 +type 34 +weight 7000 +ac 2 +resist_physical 5 +value 95000 +Int 2 +Pow 2 +sp 1 +editable 5120 +body_head -1 +item_power 5 +editor_folder armour/helmet end -Object rose_white -name white rose -face rose_wh.111 -type 6 -editor_folder food/food -food 5 +Object helmet_of_xrays +name helmet +name_pl helmets +client_type 270 nrof 1 -material 32 -value 45 -weight 2 -name_pl white roses -client_type 601 +title of xray vision +face helmetxray.111 +animation helmet_of_xrays +speed 0.05 +type 34 +weight 6000 +ac 2 +resist_physical 5 +value 70000 +material 2 +xrays 1 +editable 5120 +body_head -1 +item_power 3 +editor_folder armour/helmet end -Object rose_yellow -name yellow rose -face rose_yel.111 -type 6 -editor_folder food/food -food 5 +Object horned_helmet nrof 1 -material 32 -value 45 -weight 2 -name_pl yellow roses -client_type 601 +name horned helmet +name_pl horned helmets +client_type 271 +type 34 +face hornhelmet.111 +ac 1 +resist_physical 2 +weight 6000 +value 12 +material 18 +editable 1024 +body_head -1 +gen_sp_armour 2 +editor_folder armour/helmet end -Object rose_black -name black rose -face rose_black.111 -type 6 -editor_folder food/food -food 5 +Object kog +name Kabuto of Geisya +name_pl Kabutos of Geisya +client_type 270 nrof 1 -material 32 -value 160 -weight 2 -name_pl black roses -client_type 601 +type 34 +face kog.111 +Wis 1 +Cha 2 +Int 1 +weight 2000 +ac 3 +resist_physical 10 +value 100000 +material 2 +editable 1024 +body_head -1 +gen_sp_armour 5 +item_power 4 +editor_folder armour/helmet end -Object mandrake_root -name mandrake root -face root.111 -type 6 -editor_folder food/food -food 15 +Object turban +name turban +name_pl turbans +client_type 272 nrof 1 -material 32 -value 300 -weight 300 -identified 1 -name_pl mandrake roots -client_type 601 +type 34 +face turban.111 +weight 500 +resist_physical 1 +value 8 +material 128 +editable 1024 +body_head -1 +gen_sp_armour 1 +editor_folder armour/helmet end -Object clover -face clover.111 -type 6 -editor_folder food/food -food 5 +Object wig +name wig +name_pl wigs +client_type 273 nrof 1 +type 34 +face wig.111 +weight 500 +Cha 1 +value 140 material 32 -value 5 -weight 100 -name_pl clovers -client_type 601 +editable 1024 +body_head -1 +editor_folder armour/helmet end -Object wine -name bottle of wine -face wine.111 -type 54 -editor_folder food/food -on_use_yield winebottle_empty -food 75 +Object wiz_hat +name Wizard Hat +name_pl Wizard Hats +client_type 270 nrof 1 -material 36 -value 10 +type 34 +face wiz_hat.111 +animation wiz_hat +speed 0.1 +last_sp 12 +ac 1 +Int 2 +sp 4 +resist_fire 15 +resist_cold 15 +resist_drain 30 +resist_slow 30 +resist_paralyze 30 weight 1000 -identified 1 -name_pl bottles of wine -client_type 611 -slaying vial_poison:wine_poison +value 50000 +material 128 +editable 5120 +body_head -1 +item_power 10 +editor_folder armour/helmet end -Object loaf -name bread -face loaf.111 -type 6 -editor_folder food/food -food 100 +Object Pdragon_mail +name Power Dragon Mail +name_pl Power Dragon Mails +client_type 251 nrof 1 -material 32 -value 5 -weight 3000 +type 16 +face Pdragonmail.111 +animation Pdragon_mail +speed 0.2 +last_sp 13 +ac 8 +material 256 +resist_physical 60 +weight 40000 +value 990000 +exp 1 +resist_fire 50 +resist_electricity 30 +magic 4 +editable 5120 identified 1 -name_pl breads -client_type 601 +body_torso -1 +gen_sp_armour 9 +item_power 12 +editor_folder armour/mail end -Object haggis -name haggis -face haggis.111 -type 6 -editor_folder food/food -food 500 +Object b_plate_mail nrof 1 -material 32 -value 80 -weight 8000 -identified 1 -name_pl haggises -client_type 601 +name plate mail +name_pl plate mails +client_type 252 +type 16 +face b_plate_mail.111 +last_sp 7 +material 2 +materialname bronze +ac 5 +resist_physical 20 +weight 100000 +value 25 +editable 1024 +body_torso -1 +gen_sp_armour 30 +editor_folder armour/mail end -Object mushroom_1 -name mushroom -face mushroom_1.111 -type 6 -editor_folder food/food -food 50 +Object b_scale_mail nrof 1 -material 32 -value 5 -weight 100 -name_pl mushrooms -client_type 601 +name scale mail +name_pl scale mails +client_type 253 +type 16 +face b_scale_mail.111 +last_sp 9 +material 8 +materialname bronze +ac 3 +resist_physical 10 +weight 20000 +value 8 +editable 1024 +body_torso -1 +gen_sp_armour 10 +editor_folder armour/mail end -Object mushroom_2 -name mushroom -face mushroom_2.111 -type 6 -editor_folder food/food +Object chain_mail nrof 1 -material 32 -value 6 -food 55 -weight 100 -name_pl mushrooms -client_type 601 +name chain mail +name_pl chain mails +client_type 253 +type 16 +face chainmail.111 +last_sp 10 +material 2 +ac 4 +resist_physical 30 +weight 60000 +value 75 +editable 1024 +body_torso -1 +gen_sp_armour 15 +editor_folder armour/mail end -Object mushroom_3 -name mushroom -face mushroom_3.111 -type 6 -editor_folder food/food -food 60 +Object dragon_mail +name dragon mail +name_pl dragon mails +client_type 251 nrof 1 -material 32 -value 7 -weight 50 -name_pl mushrooms -client_type 601 +type 16 +face dragonmail.111 +last_sp 13 +ac 6 +resist_physical 50 +material 2048 +materialname dragonscale +weight 60000 +value 50000 +resist_fire 40 +magic 3 +editable 5120 +identified 1 +body_torso -1 +gen_sp_armour 9 +item_power 5 +editor_folder armour/mail end -Object pear -face pear.111 -type 6 -editor_folder food/food -food 25 +Object dress1 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl pears -client_type 601 +type 16 +face dress1.111 +resist_physical 1 +last_sp 5 +Cha 2 +ac 1 +weight 10000 +value 10000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object pipeweed -name pipeweed -face pipeweed.111 -type 6 -editor_folder food/food -food 5 +Object dress2 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 300 -weight 32 -name_pl pipeweed -client_type 601 +type 16 +face dress2.111 +last_sp 8 +ac 1 +Cha 1 +weight 5000 +value 3000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object cabbage -face cabbage.111 -type 6 -editor_folder food/food -food 80 +Object dress3 +name dress +name_pl dresses +client_type 255 nrof 1 -material 32 -value 4 -weight 1500 -identified 1 -name_pl cabbages -client_type 601 +type 16 +face dress3.111 +last_sp 8 +Cha 1 +weight 4500 +value 1000 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object carrot -name carrots -face carrot.111 -type 6 -editor_folder food/food -food 20 +Object elven_robe +name Elven Robe +name_pl Elven Robes +client_type 256 nrof 1 -material 32 -value 1 -weight 100 -identified 1 -name_pl carrots -client_type 601 +type 16 +face elven_robe.111 +last_sp 12 +ac 3 +stealth 1 +resist_confusion 60 +Dex 4 +magic 1 +food 4 +weight 5000 +value 3000 +material 128 +editable 5120 +body_torso -1 +item_power 13 +editor_folder armour/mail end -Object w_glass -name glass of wine -face w_glass.111 -type 54 -editor_folder food/food -on_use_yield w_glass_empty -food 10 +Object gale +name Gale Armour +name_pl Gale Armours +client_type 250 nrof 1 -material 36 -value 2 -weight 1000 -identified 1 -name_pl glasses of wine -client_type 611 -slaying vial_poison:w_glass_poison +face gale.111 +Dex 2 +ac 4 +resist_physical 40 +speed 2.000000 +type 16 +resist_electricity 30 +material 8 +value 220000 +weight 10000 +last_sp 50 +editable 5120 +body_torso -1 +item_power 4 +editor_folder armour/mail end -Object onion -name onion -face onion.111 -type 6 -editor_folder food/food -food 50 +Object lapron +name apron +name_pl aprons +client_type 257 nrof 1 -need_an 1 -material 32 -value 2 -weight 100 -identified 1 -name_pl onions -client_type 601 +type 16 +face lapron.111 +last_sp 11 +ac 1 +resist_physical 5 +weight 20000 +nrof 1 +value 10 +material 8 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object potato -name potatoes -face potato.111 -type 6 -editor_folder food/food -food 200 +Object leather_armour nrof 1 -material 32 -value 7 -weight 4000 -identified 1 -name_pl potatoes -client_type 601 +name armour +name_pl armours +client_type 254 +type 16 +face leather_ar.111 +last_sp 13 +ac 2 +resist_physical 10 +weight 20000 +value 40 +material 8 +editable 1024 +body_torso -1 +gen_sp_armour 8 +editor_folder armour/mail end -Object gen_mushroom -name mouldy patch -face gen_mushroom.111 -editor_folder food/food -randomitems random_mushroom -no_pick 1 -alive 1 -exp 1 -level 1 -ac 25 -hp 1 -maxhp 1 -speed -1.0 -invisible 1 -is_used_up 1 -end -Object fishfood -name fish -face fishfood.111 -type 6 -editor_folder food/food -food 100 +Object mithril_chainmail nrof 1 -material 32 -value 4 -weight 3500 -identified 1 -name_pl fishes -client_type 601 +name mithril chainmail +name_pl mithril chainmails +client_type 250 +type 16 +material 2 +materialname mithril +face mithril_ar.111 +animation mithril_chainmail +speed 0.1 +ac 6 +resist_physical 35 +last_sp 18 +weight 15000 +value 8000 +editable 5120 +body_torso -1 +gen_sp_armour 5 +item_power 1 +editor_folder armour/mail end -Object devourers_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch devourers_avatar -end -Object Valriel -face archangel.115 -type 50 -editor_folder gods/supernatural -msg -Lord of Angels, Duke of the Heavens, Healer and Protector -endmsg -title Gorokh -slaying demon -race angel -animation archangle -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -is_animated 1 -monster 1 -alive 1 -attacktype 4194304 -path_attuned 1025 -path_denied 393216 -resist_confusion 20 -resist_blind 100 -resist_fear 100 -ac -7 -wc -1 -hp 350 -maxhp 350 -dam 50 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 100000 -randomitems Valriel -end -Object gorokh_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You are filled with a desire to slay all -angels. -endmsg -invisible 1 -end -Object Gorokh -face devil.111 -type 50 -editor_folder gods/supernatural -msg -Demon King, Duke of Hell, Temptor and Tormentor -endmsg -title Valriel -slaying angel -race demon -animation devil -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 16384 -path_attuned 131072 -path_repelled 257 -resist_magic 30 -resist_cold -5 -resist_fear 100 -ac -5 -wc -3 -dam 50 -hp 350 -maxhp 350 -level 15 -speed 0.25 -luck -1 -last_heal -2 -last_sp -1 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 400000 -randomitems Gorokh -end -Object valriel_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch valriel_avatar -end -Object valriel_avatar -face archangel.115 -editor_folder gods/supernatural -slaying demon -race angel -animation archangle -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -is_animated 1 -monster 1 -alive 1 -attacktype 4194305 -path_attuned 1025 -path_denied 393216 -resist_confusion 20 -resist_blind 100 -resist_fear 100 -resist_physical 50 -ac -7 -wc -1 -hp 350 -maxhp 350 -dam 40 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 100000 -end -Object devourers_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch wight -end -Object gorokh_avatar -face devil.111 -editor_folder gods/supernatural -slaying angel -race demon -animation devil -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 16385 -path_attuned 393216 -path_denied 1025 -resist_physical 50 -resist_fear 100 -resist_magic 20 -ac -5 -wc -3 -dam 40 -hp 350 -maxhp 350 -level 15 -speed 0.25 -can_cast_spell 1 -can_use_armour 1 -can_use_weapon 1 -can_use_shield 1 -exp 1 -weight 400000 -end -Object gorokh_avatar_info -name avatar -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch gorokh_avatar -end -Object valriel_player_glow -name valriel's light -face archangel.115 -type 98 -editor_folder gods/supernatural -glow_radius 9 -startequip 1 -invisible 1 -end -Object devourers_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You feel a bond with all things which are -undead. -endmsg -invisible 1 -end -Object Devourers -face grimreaper.112 -type 50 -editor_folder gods/supernatural -msg -Soul Eaters, Harbingers of Death, Nameless -Lords of the Tomb -endmsg -title Gaea -race undead -animation grimreaper -is_animated 1 -monster 1 -alive 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -attacktype 16973824 -path_attuned 393216 -path_denied 65536 -path_repelled 524547 -resist_drain 100 -resist_fear 100 -resist_deplete 100 -resist_death 100 -resist_ghosthit 50 -resist_poison 100 -resist_cold 15 -resist_fire -5 -ac -12 -wc -1 -hp 350 -maxhp 350 -dam 50 -last_eat 60 -last_heal -1 -level 15 -speed 0.35 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -undead 1 -can_see_in_dark 1 -exp 1 -weight 1 -randomitems Devourers -end -Object valriel_general_info -name message -type 8 -editor_folder gods/supernatural -msg -You are filled with a desire to slay all -demons. -endmsg -invisible 1 -end -Object valriel_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch angel -end -Object gorokh_holy_servant_info -name holy servant -type 8 -editor_folder gods/supernatural -invisible 1 -other_arch devil -end -Object devourers_avatar -face grimreaper.112 -editor_folder gods/supernatural -race undead -animation grimreaper -is_animated 1 -monster 1 -alive 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -attacktype 196752 -path_attuned 262144 -path_denied 590082 -path_repelled 129 -resist_death 100 -resist_deplete 100 -resist_fear 100 -resist_drain 100 -resist_fire -50 -resist_cold 50 -resist_physical 20 -ac -12 -wc -1 -hp 350 -maxhp 350 -dam 50 -last_eat -3 -last_heal -1 -level 15 -speed 0.35 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -undead 1 -can_see_in_dark 1 -exp 1 -weight 1 -end -Object tear_gaea -name Gaea's tear -face tear.111 -type 5 -editor_folder gods/items -animation tear_gaea +Object mithril_ar_ele nrof 1 -level 10 -speed 0.25 -sp 35 -weight 10 -name_pl Gaea's tears -client_type 650 -end -Object mithril_ar_ele_sorig -name mithril chainmail of lightning of Sorig +name mithril chainmail of lightning +name_pl mithril chainmails of lightning +client_type 250 +type 16 +material 2 +materialname mithril face mithril_ar_ele.111 -type 16 -editor_folder gods/items -msg -Sorig has granted you this fine mail. It - grants great protection from electricity - and physical attacks without reducing your - mobility. Be warned that what Sorig gives, - Sorig can take away. -endmsg -nrof 1 animation mithril_ar_ele speed 0.3 ac 4 resist_physical 40 -resist_electricity 40 -startequip 1 -Dex 1 +resist_electricity 30 +Cha 1 Str 1 exp 1 -magic 5 -gen_sp_armour 2 +magic 3 last_sp 27 weight 15000 value 4000 -name_pl mithril chainmails of lightning of Sorig -client_type 250 +editable 5120 body_torso -1 -item_power 10 +gen_sp_armour 2 +item_power 9 +editor_folder armour/mail end -Object mail_mostrai -name Thorin's Plate Mail +Object plate_mail +nrof 1 +name plate mail +name_pl plate mails +client_type 252 +type 16 face plate_mail.111 +last_sp 7 +material 2 +ac 5 +resist_physical 40 +weight 100000 +value 100 +editable 1024 +body_torso -1 +gen_sp_armour 30 +editor_folder armour/mail +end +Object ring_mail +nrof 1 +name hauberk +name_pl hauberks +client_type 253 type 16 -editor_folder gods/items -msg -This shining plate mail is Mostrai's - gift to the bravest of his warriors. - It is highly enchanted, increasing the - strength of the wearer and protecting - against fire. -endmsg -name_pl Thorin's Plate Mails -client_type 250 -ac 3 -Str 1 -nrof 1 -startequip 1 -resist_physical 50 -resist_fire 30 +face ring_mail.111 +last_sp 10 +material 2 +ac 4 +resist_physical 25 weight 50000 -magic 2 -gen_sp_armour 9 -last_sp 13 +value 60 +editable 1024 body_torso -1 -item_power 4 +gen_sp_armour 15 +editor_folder armour/mail end -Object spear_ixalovh -name Ixalovh's spear -face spear_ixalovh.111 -type 15 -editor_folder gods/items +Object ring_mail2 nrof 1 -last_sp 9 -weapontype 5 -animation spear_ixalovh -speed -0.02 -Pow 1 -sp 1 -material 256 -dam 35 -weight 26500 -value 75000 -magic 12 -resist_magic 10 -resist_fire 15 -attacktype 17 -startequip 1 -name_pl Ixalovh's spears -client_type 136 -can_impale 1 -glow_radius 2 -body_arm -2 -item_power 20 -skill two handed weapons +name ring mail +name_pl ring mails +client_type 253 +type 16 +face ring_mail2.111 +last_sp 11 +material 2 +ac 4 +resist_physical 20 +weight 40000 +value 85 +editable 1024 +body_torso -1 +gen_sp_armour 15 +editor_folder armour/mail end -Object shield_gaea -name Gaea's Shield of Earth -face earth_shield.111 -type 33 -editor_folder gods/items -msg -This shield is highly enchanted by the forces - of life and nature. It is a personal gift from - Gaea, to protect her beloved children. -endmsg -animation shield_gaea -is_animated 1 -ac 4 -speed 0.2 +Object robe +name robe +name_pl robes +client_type 256 nrof 1 -startequip 1 -resist_physical 15 -resist_fire 30 -resist_cold 30 -resist_electricity 30 -resist_ghosthit -20 -weight 20000 -name_pl Gaea's Shields of Earth -client_type 260 -body_arm -1 +type 16 +face robe.111 +last_sp 12 +ac 1 +weight 10000 +value 30 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object bracers_gnarg -name bracers -face bracersdex.111 -type 104 -editor_folder gods/items -msg -An exceptional pair of bracers. Not only do - they provide the wearer with protection - from cold, they also increase the wearer's - damage and strength, and help heal the body - from damage. A mighty gift from Gnarg sent - to aid you in annihilating His enemies. -endmsg +Object robe2 +name robe +name_pl robes +client_type 256 nrof 1 -title of strength of Wargs -Str 2 -resist_physical 30 +type 16 +face robe2.111 +last_sp 12 +ac 1 +nrof 1 +weight 10000 +value 9 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail +end +Object robe_midnight +name Midnight Robe +name_pl Midnight Robes +client_type 250 +nrof 1 +type 16 +face robe_midnight.111 +animation robe_midnight +speed 0.1 +ac 5 +Dex 1 +Int 2 +Pow 2 +resist_magic 30 +resist_fire 20 resist_cold 20 -Dam 15 -hp 1 -value 65000 -weight 9000 -startequip 1 -name_pl bracers -client_type 310 -body_wrist -2 +resist_drain 20 +resist_slow 20 +resist_paralyze 20 +resist_acid 75 +resist_ghosthit -100 +reflect_spell 1 +magic 5 +weight 5000 +value 100000 +material 128 +editable 5120 +body_torso -1 +item_power 25 +editor_folder armour/mail end -Object glovesofsun -name Gloves of the Sun -face glovesofsun.111 -type 100 -editor_folder gods/items -msg -This pair of gloves will aid any of Gaea's - most faithful in seeing her will protected. -endmsg -name_pl Gloves of the Sun -client_type 300 +Object scale_mail nrof 1 -animation glovesofsun -speed 0.25 +name scale mail +name_pl scale mails +client_type 253 +type 16 +face scale_mail.111 +last_sp 9 material 8 -weight 900 -value 20000 -attacktype 5 -ac 1 -dam 2 -Dex 2 -wc 2 -magic 1 -startequip 1 -body_hand -2 -end -Object helmet_gnarg -name Gnarg's Orc Helmet -face bighorn_he.111 -type 34 -editor_folder gods/items -msg -This helmet good protection. From mighty - Gnarg it is. -endmsg -name_pl Gnarg's Orc Helmets -client_type 270 -Dex 1 ac 3 -nrof 1 -startequip 1 resist_physical 20 -resist_poison 30 -weight 7000 -gen_sp_armour 1 -body_head -1 +weight 20000 +value 30 +editable 1024 +body_torso -1 +gen_sp_armour 10 +editor_folder armour/mail end -Object horn_siren -name horn -face shellhorn1.111 -type 35 -editor_folder gods/items -msg -Putting this shell to your ear, you hear a - strange and haunting melody. -endmsg -title of the Sirens -randomitems horn_siren -level 40 -value 590 -weight 1500 -material 2 -hp 20 -maxhp 20 -speed 0.2 -name_pl horns -startequip 1 -client_type 721 -body_range -1 -end -Object pipe_lythander -name Lythander's pipe -face claypipe.111 -type 35 -editor_folder gods/items -msg -This pipe is the finest you have ever - seen. Imagine the smoke rings you - could blow with it... -endmsg -name_pl Lythander's pipes -randomitems pipe_lythander -luck 1 -material 256 -hp 60 -level 35 -maxhp 60 -speed 0.1 -value 58 -weight 40 -name_pl horns -client_type 721 -body_range -1 -startequip 1 -end -Object horn_waves -name horn -face shellhorn2.111 -type 35 -editor_folder gods/items -msg -Putting this shell to your ear, you hear - the crashing sound of ocean waves. -endmsg -title of Ocean Waves -randomitems horn_waves -level 30 -value 590 +Object tunic +name shirt +name_pl shirts +client_type 256 +nrof 1 +type 16 +face tunic.111 +last_sp 20 weight 1000 -material 2 -hp 24 -maxhp 24 -speed 0.1 -name_pl horns -client_type 721 -startequip 1 -body_range -1 +nrof 1 +value 3 +material 128 +editable 1024 +body_torso -1 +editor_folder armour/mail end -Object burningtail -name Burning Tail of many lashings of Ruggilli -face burningtail.111 -type 15 -editor_folder gods/items +Object wdsm +name White Dragon Scale Mail +name_pl White Dragon Scale Mails +client_type 251 nrof 1 -last_sp 8 -weapontype 6 -animation burningtail +type 16 +face wdsm.111 +animation wdsm speed 0.1 -material 256 -dam 40 -weight 10000 -value 75000 -magic 15 -resist_cold 25 -resist_fire 15 -attacktype 4101 +last_sp 13 +cursed 1 startequip 1 -name_pl Burning Tails of many lashings of Ruggilli -client_type 100 -body_arm -1 -item_power 25 -glow_radius 3 -skill one handed weapons +no_steal 1 +ac 5 +resist_physical 45 +weight 5000 +value 220000 +resist_cold 30 +resist_fire 95 +magic -3 +editable 5120 +body_torso -1 +gen_sp_armour 9 +item_power 5 +editor_folder armour/mail end -Object bow_lythander -name Lythander's Elven Bow -face elven_bow.111 -type 14 -editor_folder gods/items -msg -You look at this wonderful bow with - pride. It is only granted to the best - of Lythander's disciples. -endmsg -name_pl Lythander's Elven Bows -client_type 150 -race arrows -luck 1 -sp 70 -dam 30 -wc 3 +Object DShield +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 nrof 1 -startequip 1 -attacktype 1 -weight 8000 -magic 5 -body_arm -2 -skill missile weapons -end -Object gaea_general_info -name message -type 8 -editor_folder gods/elemental +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShield +speed 0.2 msg -You are filled with a desire to slay all -undead and unnatural creatures. + There is a evil spirit in the shield. endmsg -invisible 1 +Cha -3 +resist_fire 30 +resist_drain 100 +resist_ghosthit 70 +ac 3 +resist_physical 10 +weight 25000 +value 50000 +editable 5120 +body_arm -1 +item_power 5 +editor_folder armour/shield end -Object Sorig -face para_light.111 -type 50 -editor_folder gods/elemental +Object DShieldm +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 +nrof 1 +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShieldm +speed 0.2 msg -Lord of Storms, King of Thunder and Lightning, Sky Lord + There is a strong evil spirit in the shield + trying to dominate you. endmsg -race air_elemental -animation para_lightning -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 8 -resist_electricity 100 -path_attuned 131096 -path_repelled 256 -path_denied 65537 -ac -5 -wc -1 -dam 40 -hp 300 -maxhp 300 -level 15 -speed 0.40 -can_cast_spell 1 -can_use_weapon 1 -can_use_armour 1 -can_use_shield 1 -exp 1 -weight 1 -randomitems Sorig -end -Object sorig_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch sorig_avatar -end -Object sorig_holy_servant_info -name holy servant -type 8 -editor_folder gods/elemental -invisible 1 -other_arch para_lightning -end -Object ruggilli_avatar -face elem_fire.111 -editor_folder gods/elemental -race consuming_fire_creatures -animation fire_elemental -is_animated 1 -Str 30 -Con 30 -Dex 30 -Int 30 -Wis 30 -Pow 30 -monster 1 -alive 1 -attacktype 5 -path_attuned 131074 -path_repelled 10500 -path_denied 82945 -resist_fire 100 -resist_cold -100 -resist_magic 30 -resist_physical 40 -ac -5 -wc -3 -dam 60 -hp 400 -maxhp 400 -level 15 -speed 0.50 -can_use_weapon 1 -can_cast_spell 1 +Cha -3 +resist_fire 30 +resist_drain 100 +resist_ghosthit 75 reflect_missile 1 -last_heal 1 -last_eat 1 -exp 1 -weight 500000 +ac 4 +resist_physical 10 +weight 25000 +value 100000 +editable 5120 +body_arm -1 +item_power 7 +editor_folder armour/shield end -Object ruggilli_holy_servant_info -name holy servant -type 8 -editor_folder gods/elemental -invisible 1 -other_arch dragon -end -Object ruggilli_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch ruggilli_avatar -end -Object ixalovh_avatar_info -name avatar -type 8 -editor_folder gods/elemental -invisible 1 -other_arch ixalovh_avatar -end -Object Ruggilli -face elem_fire.111 -type 50 -editor_folder gods/elemental +Object DShieldms +name Demonspawn Shield +name_pl Demonspawn Shields +client_type 260 +nrof 1 +type 33 +material 256 +materialname abyssium +face DShield.111 +animation DShieldms +speed 0.25 +Cha -5 msg -Chaos God of slaughter and terror, Consuming worm, Greedy gut + There is a powerful evil... [truncated message content] |
From: <aki...@us...> - 2006-12-02 09:42:44
|
Revision: 783 http://svn.sourceforge.net/gridarta/?rev=783&view=rev Author: akirschbaum Date: 2006-12-02 01:42:45 -0800 (Sat, 02 Dec 2006) Log Message: ----------- Add "permanent experience" attribute for SKILL objects. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/types.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-12-02 09:41:20 UTC (rev 782) +++ trunk/crossfire/ChangeLog 2006-12-02 09:42:45 UTC (rev 783) @@ -1,3 +1,7 @@ +2006-12-02 Andreas Kirschbaum + + * Add "permanent experience" attribute for SKILL objects. + 2006-11-30 Andreas Kirschbaum * Update archetypes, images and treasurelists. Modified: trunk/crossfire/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/conf/types.xml 2006-12-02 09:41:20 UTC (rev 782) +++ trunk/crossfire/resource/conf/types.xml 2006-12-02 09:42:45 UTC (rev 783) @@ -4276,6 +4276,11 @@ </attribute> <attribute arch="exp" editor="experience" type="int"> </attribute> + <attribute arch="perm_exp" editor="permanent experience" type="long"> + <Permanent experience> is the experience the player gained + permanently. Even if a player dies multiple times or gets drained, his + <experience> will not fall below <permanent experience>. + </attribute> <attribute arch="can_use_skill" editor="is native skill" type="bool"> The <is native skill> flag has an effect only when this skill object is placed in the inventory of a monster (or player). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |