Fixed SpawnInfo parsing
*Fixed SpawnInfo.fromText using 1 as the start index instead of 0
This commit is contained in:
parent
17b2c89fad
commit
407a787e75
@ -18,11 +18,11 @@ export default class SpawnInfo {
|
||||
static fromText(text) {
|
||||
const values = text.split(",");
|
||||
return new SpawnInfo(
|
||||
parseFloat(values[1]), // max_length
|
||||
values[2] === "1", // allow_electric
|
||||
values[3] === "1", // multiple_units_only
|
||||
values[4] === "1", // light_only
|
||||
values[5] // name
|
||||
parseFloat(values[0]), // max_length
|
||||
values[1] === "1", // allow_electric
|
||||
values[2] === "1", // multiple_units_only
|
||||
values[3] === "1", // light_only
|
||||
values[4] // name
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user