Emmanuel BENOîT
4e1bb91780
* Added structures for resource definitions, natural resources definitions, resource providers, empire resources and empire mining settings (both empire-wide and planet-specific). * Added a few common utility functions to the SQL test suite. These functions allow test initialisation to be a little shorter. * Added "MINE" production type and an associated building definition. The production will not be added to the XML dump or to the output of the planets summary page, as this is extremely temporary.
65 lines
2.3 KiB
XML
65 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:enumeration value="MINE" />
|
|
</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>
|