Resource Definition Loader
* Implemented resource definition loader including tests * Added resource definition xml file and style definition * Made a small style change to i18n loader
This commit is contained in:
parent
3637b6e1d1
commit
f4a16aa431
20 changed files with 2275 additions and 3 deletions
legacyworlds-server-tests/TestFiles/resource-loader
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lw-resources>
|
||||
|
||||
<does-not-exist />
|
||||
|
||||
</lw-resources>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lw-resources xmlns="http://www.deepclone.com/lw/b6/m2/resources"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.deepclone.com/lw/b6/m2/resources
|
||||
resources.xsd">
|
||||
|
||||
<basic-resource />
|
||||
</lw-resources>
|
|
@ -0,0 +1,2 @@
|
|||
This is not an XML file, obviously.
|
||||
We'll make that even more confusing: <<<<<< & >>!!!
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lw-resources xmlns="http://www.deepclone.com/lw/b6/m2/resources"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.deepclone.com/lw/b6/m2/resources
|
||||
resources.xsd">
|
||||
|
||||
<basic-resource name="money" description="moneyDescription"
|
||||
weight="0" /> <!-- This could have a category="" as well -->
|
||||
|
||||
<natural-resource name="titanium" description="titaniumDescription"
|
||||
category="minerals" weight="1" presence-probability="0.8">
|
||||
<quantity average="5000" deviation="1500" />
|
||||
<difficulty average="0.1" deviation="0.05" />
|
||||
<recovery average="0.4" deviation="0.05" />
|
||||
</natural-resource>
|
||||
|
||||
</lw-resources>
|
Reference in a new issue