Ver código fonte

Fix ownerless objects not spawning

tags/v0.1.0
Fen Dweller 5 anos atrás
pai
commit
f748e3c41b
2 arquivos alterados com 12 adições e 7 exclusões
  1. +12
    -5
      media/attribution.js
  2. +0
    -2
      presets/cities.js

+ 12
- 5
media/attribution.js Ver arquivo

@@ -11383,10 +11383,15 @@ function ownersOf(file) {
function ownersOfFull(file) {
const result = [];
if (attribution.files[file]) {
attribution.files[file].owners.forEach(owner => {
result.push(attributionData.people[owner]);
});
return result;
if (attribution.files[file].owners) {
attribution.files[file].owners.forEach(owner => {
result.push(attributionData.people[owner]);
});
return result;
}
else {
return [];
}
}
else {
const found = attribution.prefixes[Object.keys(attribution.prefixes).find(path => {
@@ -11394,8 +11399,10 @@ function ownersOfFull(file) {
})];

if (found === undefined || found.owners === undefined) {
if (found === undefined) {
return undefined;
} else if (found.owners === undefined) {
return [];
} else {
found.owners.forEach(owner => {
result.push(attributionData.people[owner]);


+ 0
- 2
presets/cities.js Ver arquivo

@@ -17,8 +17,6 @@ function makeCity(name, height) {
},
};

console.log(views)

return makeEntity({ name: name }, views);
}



Carregando…
Cancelar
Salvar