Was missing the name attribute.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@752 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotSceneWriter.java,v 1.5 2001/12/07 05:11:25 mdb Exp $
|
// $Id: SpotSceneWriter.java,v 1.6 2001/12/07 05:14:57 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.tools.spot.xml;
|
package com.threerings.whirled.tools.spot.xml;
|
||||||
|
|
||||||
@@ -65,18 +65,25 @@ public class SpotSceneWriter extends SceneWriter
|
|||||||
EditablePortal port = (EditablePortal)iter.next();
|
EditablePortal port = (EditablePortal)iter.next();
|
||||||
AttributesImpl attrs = new AttributesImpl();
|
AttributesImpl attrs = new AttributesImpl();
|
||||||
addSharedAttrs(attrs, port);
|
addSharedAttrs(attrs, port);
|
||||||
if (port.targetSceneName != null) {
|
maybeAddAttr(attrs, "name", port.name);
|
||||||
attrs.addAttribute("", "targetSceneName", "", "",
|
maybeAddAttr(attrs, "targetSceneName", port.targetSceneName);
|
||||||
port.targetSceneName);
|
maybeAddAttr(attrs, "targetPortalName", port.targetPortalName);
|
||||||
}
|
|
||||||
if (port.targetPortalName != null) {
|
|
||||||
attrs.addAttribute("", "targetPortalName", "", "",
|
|
||||||
port.targetPortalName);
|
|
||||||
}
|
|
||||||
writer.emptyElement("", "portal", "", attrs);
|
writer.emptyElement("", "portal", "", attrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the supplied attribute to the attributes object iff the value
|
||||||
|
* is non-null.
|
||||||
|
*/
|
||||||
|
protected void maybeAddAttr (
|
||||||
|
AttributesImpl attrs, String name, String value)
|
||||||
|
{
|
||||||
|
if (value != null) {
|
||||||
|
attrs.addAttribute("", name, "", "", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the attributes that are shared between location and portal
|
* Adds the attributes that are shared between location and portal
|
||||||
* elements.
|
* elements.
|
||||||
|
|||||||
Reference in New Issue
Block a user