Add link to send resources
This commit is contained in:
src
@ -40,5 +40,19 @@ function grabVillageInfo($el): Village {
|
||||
const id = getNumber(parsedHref.query.newdid);
|
||||
const name = $el.find('.name').text();
|
||||
const active = $el.hasClass('active');
|
||||
return new Village(id, name, active, new Coordinates(0, 0));
|
||||
const x = getNumber(
|
||||
$el
|
||||
.find('.coordinateX')
|
||||
.text()
|
||||
.replace('−', '-')
|
||||
.replace(/[^0-9-]/gi, '')
|
||||
);
|
||||
const y = getNumber(
|
||||
$el
|
||||
.find('.coordinateY')
|
||||
.text()
|
||||
.replace('−', '-')
|
||||
.replace(/[^0-9-]/gi, '')
|
||||
);
|
||||
return new Village(id, name, active, new Coordinates(x, y));
|
||||
}
|
||||
|
Reference in New Issue
Block a user