remove duplicate handling of "speed" attribute in JSON

add weight and capacity in this test (still broken)
This commit is contained in:
Enno Rehling 2014-06-26 19:11:34 -07:00
parent d0e2ad542a
commit dba51bf0f7
2 changed files with 6 additions and 4 deletions

View File

@ -260,9 +260,6 @@ void json_race(cJSON *json, race *rc) {
else if (strcmp(child->string, "weight")==0) {
rc->weight = child->valueint;
}
else if (strcmp(child->string, "speed")==0) {
rc->speed = child->valueint;
}
else if (strcmp(child->string, "capacity")==0) {
rc->capacity = child->valueint;
}

View File

@ -9,7 +9,12 @@ function setup()
eressea.settings.set("rules.ships.storms", "0")
conf = [[{
"races": {
"human" : { "speed" : 1, "flags" : [ "walk" ] },
"human" : {
"speed" : 1,
"weight" : 1000,
"capacity" : 1500,
"flags" : [ "walk" ]
},
"troll" : {}
},
"items" : {