This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-server-main/data/buildables.xsd
Emmanuel BENOîT 4e1bb91780 Resource database structures
* 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.
2011-12-19 11:57:08 +01:00

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>