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

@@ -13,7 +13,10 @@
<text name='loc-lbl' anchor='area-lbl' relative='pos-in pos' top='11' left='0' width='97' height='14'>Location</text>
<text name='loc' rel-anchor='prev' relative='pos pos-in' top='0' left='5' width='40' height='16'/>
<led name='owned' anchor='loc-lbl' relative='pos-in pos' top='11' left='10'>Not Party Property</led>
<text name='name-lbl' anchor='loc-lbl' relative='pos-in pos' top='11' left='0' width='97' height='14'>Name</text>
<field name='name' rel-anchor='prev' relative='pos pos-in' top='0' left='5' width='100' height='14'/>
<led name='owned' anchor='name-lbl' relative='pos-in pos' top='11' left='10'>Not Party Property</led>
<button name='cancel' rel-anchor='prev' relative='neg pos' type='regular' def-key='esc' top='15' left='10'>Cancel</button>
<button name='del' rel-anchor='prev' relative='pos pos-in' type='regular' top='0' left='0'>Delete</button>

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">