forked from github/server
remove duplicate handling of "speed" attribute in JSON
add weight and capacity in this test (still broken)
This commit is contained in:
parent
d0e2ad542a
commit
dba51bf0f7
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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" : {
|
||||
|
|
Loading…
Reference in New Issue