Merge branch 'dev' of https://github.com/hppeng-wynn/hppeng-wynn.github.io into dev
This commit is contained in:
commit
6fde28c544
3 changed files with 12 additions and 12 deletions
|
@ -511,6 +511,11 @@ function useBaseItem(elem) {
|
|||
setValue(id+"-choice", baseItem.get(id));
|
||||
}
|
||||
}
|
||||
//take care of displayName
|
||||
if (baseItem.get("displayName")) {
|
||||
setValue("name-choice", baseItem.get("displayName"));
|
||||
}
|
||||
|
||||
//Take care of durability, duration, and charges.
|
||||
if (baseItem.get("tier") === "Crafted") {
|
||||
let specialIDs = ["duration", "durability"];
|
||||
|
|
|
@ -190,10 +190,10 @@ function save_map_data() {
|
|||
function init_map_maps() {
|
||||
for (const [terr,data] of Object.entries(terrdata)) {
|
||||
terrs.set(data.territory,data.location);
|
||||
claims.set(data.territory,data.guild);
|
||||
if (!guilds.includes(data.guild)) {
|
||||
guilds.push(data.guild);
|
||||
}
|
||||
// claims.set(data.territory,data.guild);
|
||||
// if (!guilds.includes(data.guild)) {
|
||||
// guilds.push(data.guild);
|
||||
// }
|
||||
neighbors.set(data.territory,data.neighbors);
|
||||
resources.set(data.territory,{"resources":data.resources,"storage":data.storage,"emeralds":data.emeralds,"doubleemeralds":data.doubleemeralds,"doubleresource":data.doubleresource});
|
||||
}
|
||||
|
|
11
map.js
11
map.js
|
@ -1,8 +1,3 @@
|
|||
/**TODO:
|
||||
* Fix Claims (broken)
|
||||
* Guild pull fails to update actual guilds on the map, which also do not save properly.
|
||||
* Fix custom items saving reversed IDs in the wrong order.
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTING SECTION
|
||||
|
@ -116,7 +111,7 @@ function init_map(){ //async just in case we need async stuff
|
|||
map_elem.style.background = "#121516";
|
||||
|
||||
try {
|
||||
//refreshData();
|
||||
refreshData();
|
||||
pullguilds();
|
||||
//save_map_data();
|
||||
} catch (error) {
|
||||
|
@ -204,8 +199,9 @@ function toggleButton(elemID) {
|
|||
*
|
||||
*/
|
||||
async function refreshData() {
|
||||
terrs = new Map();
|
||||
//terrs = new Map();
|
||||
claims = new Map();
|
||||
terrdata;
|
||||
guilds = [];
|
||||
|
||||
|
||||
|
@ -214,7 +210,6 @@ async function refreshData() {
|
|||
.then(data => {return data.json()})
|
||||
.then(res => { //success
|
||||
terrdata = Object.entries(res['territories']);
|
||||
console.log(terrdata);
|
||||
guilds = [];
|
||||
for (const terr of terrdata) {
|
||||
//terrs.set(terr[0], terr[1].location) //bounds shouldnt change
|
||||
|
|
Loading…
Reference in a new issue