mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
zone data now contains aetheryte list
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
import Aetheryte from "@/entities/Aetheryte";
|
||||
|
||||
export default class Zone {
|
||||
|
||||
name: {
|
||||
en: string,
|
||||
}
|
||||
|
||||
constructor(data: {name: {en: string}}) {
|
||||
aetherytes: Array<Aetheryte> = [];
|
||||
|
||||
constructor(data: {name: {en: string}, aetherytes: Array<{position: {x: number, y: number, zone: string}, name: {en: string}}>}) {
|
||||
this.name = {
|
||||
en: data.name.en
|
||||
};
|
||||
if (!Array.isArray(data.aetherytes)) return;
|
||||
for (const aetheryte of data.aetherytes) {
|
||||
this.aetherytes.push(new Aetheryte(aetheryte));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user