[Add] outfits and ships now have a price tag.
This commit is contained in:
parent
fb57dde3ed
commit
ae84dcf911
@ -5,6 +5,7 @@
|
|||||||
<max>5</max>
|
<max>5</max>
|
||||||
<tech>2</tech>
|
<tech>2</tech>
|
||||||
<mass>0</mass>
|
<mass>0</mass>
|
||||||
|
<price>5000</price>
|
||||||
</general>
|
</general>
|
||||||
<specific type="1">
|
<specific type="1">
|
||||||
<gfx>lasergreen</gfx>
|
<gfx>lasergreen</gfx>
|
||||||
@ -25,6 +26,7 @@
|
|||||||
<max>2</max>
|
<max>2</max>
|
||||||
<tech>4</tech>
|
<tech>4</tech>
|
||||||
<mass>10</mass>
|
<mass>10</mass>
|
||||||
|
<price>25000</price>
|
||||||
</general>
|
</general>
|
||||||
<specific type="5" secondary="1">
|
<specific type="5" secondary="1">
|
||||||
<ammo>Missile</ammo>
|
<ammo>Missile</ammo>
|
||||||
@ -36,6 +38,7 @@
|
|||||||
<max>60</max>
|
<max>60</max>
|
||||||
<tech>2</tech>
|
<tech>2</tech>
|
||||||
<mass>1</mass>
|
<mass>1</mass>
|
||||||
|
<price>800</price>
|
||||||
</general>
|
</general>
|
||||||
<specific type="6">
|
<specific type="6">
|
||||||
<gfx>missile</gfx>
|
<gfx>missile</gfx>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<GUI>minimal</GUI>
|
<GUI>minimal</GUI>
|
||||||
<sound>engine</sound>
|
<sound>engine</sound>
|
||||||
<class>1</class>
|
<class>1</class>
|
||||||
|
<price>120000</price>
|
||||||
<movement>
|
<movement>
|
||||||
<thrust>320</thrust>
|
<thrust>320</thrust>
|
||||||
<turn>150</turn>
|
<turn>150</turn>
|
||||||
@ -33,6 +34,7 @@
|
|||||||
<GUI>minimal</GUI>
|
<GUI>minimal</GUI>
|
||||||
<sound>engine</sound>
|
<sound>engine</sound>
|
||||||
<class>1</class>
|
<class>1</class>
|
||||||
|
<price>180000</price>
|
||||||
<movement>
|
<movement>
|
||||||
<thrust>400</thrust>
|
<thrust>400</thrust>
|
||||||
<turn>180</turn>
|
<turn>180</turn>
|
||||||
@ -61,6 +63,7 @@
|
|||||||
<GUI>minimal</GUI>
|
<GUI>minimal</GUI>
|
||||||
<sound>engine</sound>
|
<sound>engine</sound>
|
||||||
<class>2</class>
|
<class>2</class>
|
||||||
|
<price>600000</price>
|
||||||
<movement>
|
<movement>
|
||||||
<thrust>320</thrust>
|
<thrust>320</thrust>
|
||||||
<turn>150</turn>
|
<turn>150</turn>
|
||||||
|
@ -244,6 +244,7 @@ static Outfit* outfit_parse(const xmlNodePtr parent) {
|
|||||||
if(xml_isNode(cur, "max")) tmp->max = xml_getInt(cur);
|
if(xml_isNode(cur, "max")) tmp->max = xml_getInt(cur);
|
||||||
else if(xml_isNode(cur, "tech")) tmp->tech = xml_getInt(cur);
|
else if(xml_isNode(cur, "tech")) tmp->tech = xml_getInt(cur);
|
||||||
else if(xml_isNode(cur, "mass")) tmp->mass = xml_getInt(cur);
|
else if(xml_isNode(cur, "mass")) tmp->mass = xml_getInt(cur);
|
||||||
|
else if(xml_isNode(cur, "price")) tmp->price = xml_getInt(cur);
|
||||||
} while((cur = cur->next));
|
} while((cur = cur->next));
|
||||||
}
|
}
|
||||||
else if(xml_isNode(node, "specific")) {
|
else if(xml_isNode(node, "specific")) {
|
||||||
@ -276,8 +277,9 @@ static Outfit* outfit_parse(const xmlNodePtr parent) {
|
|||||||
MELEMENT(tmp->name==NULL, "name");
|
MELEMENT(tmp->name==NULL, "name");
|
||||||
MELEMENT(tmp->max==0, "max");
|
MELEMENT(tmp->max==0, "max");
|
||||||
MELEMENT(tmp->tech==0, "tech");
|
MELEMENT(tmp->tech==0, "tech");
|
||||||
// MELEMENT(tmp->mass==0, "mass");
|
//MELEMENT(tmp->mass==0, "mass");
|
||||||
MELEMENT(tmp->type==0, "type");
|
MELEMENT(tmp->type==0, "type");
|
||||||
|
MELEMENT(tmp->price==0, "price");
|
||||||
#undef MELEMENT
|
#undef MELEMENT
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
|
@ -31,6 +31,7 @@ typedef struct Outfit_ {
|
|||||||
int max;
|
int max;
|
||||||
int tech;
|
int tech;
|
||||||
int mass;
|
int mass;
|
||||||
|
unsigned int price;
|
||||||
|
|
||||||
glTexture gfx_store; // Store graphic.
|
glTexture gfx_store; // Store graphic.
|
||||||
|
|
||||||
|
@ -80,7 +80,9 @@ static Ship* ship_parse(xmlNodePtr parent) {
|
|||||||
else if(xml_isNode(node, "sound"))
|
else if(xml_isNode(node, "sound"))
|
||||||
tmp->sound = sound_get(xml_get(node));
|
tmp->sound = sound_get(xml_get(node));
|
||||||
else if(xml_isNode(node, "class"))
|
else if(xml_isNode(node, "class"))
|
||||||
tmp->class = atoi(xml_get(node));
|
tmp->class = xml_getInt(node);
|
||||||
|
else if(xml_isNode(node, "price"))
|
||||||
|
tmp->price = xml_getInt(node);
|
||||||
else if(xml_isNode(node, "movement")) {
|
else if(xml_isNode(node, "movement")) {
|
||||||
cur = node->children;
|
cur = node->children;
|
||||||
do {
|
do {
|
||||||
@ -151,6 +153,8 @@ static Ship* ship_parse(xmlNodePtr parent) {
|
|||||||
MELEMENT(tmp->name == NULL, "name");
|
MELEMENT(tmp->name == NULL, "name");
|
||||||
MELEMENT(tmp->gfx_space == NULL, "GFX");
|
MELEMENT(tmp->gfx_space == NULL, "GFX");
|
||||||
MELEMENT(tmp->gui == NULL, "GUI");
|
MELEMENT(tmp->gui == NULL, "GUI");
|
||||||
|
MELEMENT(tmp->class==0, "class");
|
||||||
|
MELEMENT(tmp->price==0, "price");
|
||||||
MELEMENT(tmp->thrust==0, "thrust");
|
MELEMENT(tmp->thrust==0, "thrust");
|
||||||
MELEMENT(tmp->turn==0, "turn");
|
MELEMENT(tmp->turn==0, "turn");
|
||||||
MELEMENT(tmp->speed==0, "speed");
|
MELEMENT(tmp->speed==0, "speed");
|
||||||
|
@ -27,6 +27,8 @@ typedef struct Ship_ {
|
|||||||
char* name; // Ship name.
|
char* name; // Ship name.
|
||||||
ShipClass class; // Ship class.
|
ShipClass class; // Ship class.
|
||||||
|
|
||||||
|
unsigned int price; // Price!
|
||||||
|
|
||||||
// Movement.
|
// Movement.
|
||||||
double thrust, turn, speed;
|
double thrust, turn, speed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user