Technology definitions loader
* Added "dummy" data file for technologies (for now it simply copies the old, line-based technologies) and corresponding XML schema * Added missing SQL stored procedure to clear all dependencies and reverse dependencies from a technology * Added import classes, loader and import tool for the technology graph * Added tech graph import tool to post-build tests
This commit is contained in:
parent
c5464212bc
commit
1f3c7a9202
24 changed files with 1731 additions and 43 deletions
legacyworlds-server-main/data
42
legacyworlds-server-main/data/tech-graph.xml
Normal file
42
legacyworlds-server-main/data/tech-graph.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lw-tech-graph xmlns="http://www.deepclone.com/lw/b6/m2/tech-graph"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.deepclone.com/lw/b6/m2/tech-graph tech-graph.xsd">
|
||||
|
||||
<!-- Military technologies (cruisers, battle cruisers, dreadnoughts) -->
|
||||
|
||||
<technology name="cruisersTech" category="milTech"
|
||||
description="cruisersTechDescription" discovery="cruisersTechDescription"
|
||||
points="25000" cost="10000" />
|
||||
|
||||
<technology name="bCruisersTech" category="milTech"
|
||||
description="bCruisersTechDescription" discovery="bCruisersTechDescription"
|
||||
points="900000" cost="400000">
|
||||
<depends-on>cruisersTech</depends-on>
|
||||
</technology>
|
||||
|
||||
<technology name="dreadnoughtsTech" category="milTech"
|
||||
description="dreadnoughtsTechDescription" discovery="dreadnoughtsTechDescription"
|
||||
points="2250000" cost="1012500">
|
||||
<depends-on>bCruisersTech</depends-on>
|
||||
</technology>
|
||||
|
||||
<!-- Civilian technologies (industrial factories, corpse re-animation, bio-turrets -->
|
||||
|
||||
<technology name="indFactTech" category="civTech"
|
||||
description="indFactTechDescription" discovery="indFactTechDescription"
|
||||
points="10000" cost="5000" />
|
||||
|
||||
<technology name="reanimationTech" category="civTech"
|
||||
description="reanimationTechDescription" discovery="reanimationTechDescription"
|
||||
points="562500" cost="281250">
|
||||
<depends-on>indFactTech</depends-on>
|
||||
</technology>
|
||||
|
||||
<technology name="superTurretTech" category="civTech"
|
||||
description="superTurretTechDescription" discovery="superTurretTechDescription"
|
||||
points="1350000" cost="607500">
|
||||
<depends-on>reanimationTech</depends-on>
|
||||
</technology>
|
||||
|
||||
</lw-tech-graph>
|
35
legacyworlds-server-main/data/tech-graph.xsd
Normal file
35
legacyworlds-server-main/data/tech-graph.xsd
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns="http://www.deepclone.com/lw/b6/m2/tech-graph"
|
||||
targetNamespace="http://www.deepclone.com/lw/b6/m2/tech-graph"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xs:element name="lw-tech-graph">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="technology" type="technology-description"
|
||||
minOccurs="1" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:simpleType name="positive-long">
|
||||
<xs:restriction base="xs:long">
|
||||
<xs:minExclusive value="0"></xs:minExclusive>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="technology-description">
|
||||
<xs:sequence>
|
||||
<xs:element name="depends-on" type="xs:token" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" use="required" type="xs:token" />
|
||||
<xs:attribute name="category" use="required" type="xs:token" />
|
||||
<xs:attribute name="description" use="required" type="xs:token" />
|
||||
<xs:attribute name="discovery" use="required" type="xs:token" />
|
||||
<xs:attribute name="cost" use="required" type="positive-long" />
|
||||
<xs:attribute name="points" use="required" type="positive-long" />
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
Reference in a new issue