Add a user-defined name to vehicle definitions.

This also adds partial support for a custom vehicle graphic.
This commit is contained in:
2025-02-22 22:07:55 -05:00
committed by Celtic Minstrel
parent f4bdf95617
commit 8ab663b620
7 changed files with 66 additions and 1 deletions

View File

@@ -264,6 +264,11 @@ shop ID 0. Shops require the following subtags:
of this element in a `CDATA` declaration.
* `<journal>` - (max unbounded) A journal string. The scenario editor wraps the contents
of this element in a `CDATA` declaration.
* `<vehicle>` - (max unbounded) Contains additional data for a placed boat or horse. Only present if the additional data is used.
* `type=` - Must be either `boat` or `horse`.
* `id=` - The horse or boat ID, as written into the map data - a one-based index into the global list of horses or boats.
* `<name>` - A designer-visible name for the boat or horse. Used by the scenario editor to present a list of boats or horses.
* `<pic>` - The graphic to use for the boat or horse.
The `<editor>` element can have the following child tags:

View File

@@ -289,6 +289,23 @@
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="vehicle" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="boat"/>
<xs:enumeration value="horse"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:integer"/>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="pic" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="editorData">