This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-server/legacyworlds-server-main/data/buildables.xsd

64 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.deepclone.com/lw/b6/m1/buildables" xmlns="http://www.deepclone.com/lw/b6/m1/buildables"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="buildables">
<xs:complexType>
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="building" type="building" />
<xs:element name="ship" type="ship" />
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="building-production">
<xs:restriction base="xs:string">
<xs:enumeration value="CASH" />
<xs:enumeration value="DEF" />
<xs:enumeration value="POP" />
<xs:enumeration value="WORK" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="buildable" abstract="true">
<xs:sequence>
<xs:element name="cost" type="cost" />
<xs:element name="tech" type="tech" minOccurs="0" />
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string" />
<xs:attribute name="description" use="required" type="xs:string" />
</xs:complexType>
<xs:complexType name="building">
<xs:complexContent>
<xs:extension base="buildable">
<xs:attribute name="type" use="required" type="building-production" />
<xs:attribute name="output" use="required" type="xs:positiveInteger" />
<xs:attribute name="workers" use="required" type="xs:nonNegativeInteger" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ship">
<xs:complexContent>
<xs:extension base="buildable">
<xs:attribute name="time" use="required" type="xs:positiveInteger" />
<xs:attribute name="power" use="required" type="xs:positiveInteger" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="cost">
<xs:attribute name="build" use="required" type="xs:positiveInteger" />
<xs:attribute name="work" use="required" type="xs:positiveInteger" />
<xs:attribute name="upkeep" use="required" type="xs:nonNegativeInteger" />
</xs:complexType>
<xs:complexType name="tech">
<xs:attribute name="name" use="required" type="xs:string" />
<xs:attribute name="level" use="required" type="xs:positiveInteger" />
</xs:complexType>
</xs:schema>