Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
location generation fixes part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
themaoci committed Jan 24, 2023
1 parent df7df0a commit 1d9026a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/controllers/LocationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class LocationController {
* @returns {string} zlib compressed json string
*/
static async testData(request, reply) {
const staticMapName = "factory4_day";
const staticMapName = "woods";
const location_data = await Location.generateLocationData(staticMapName);
if (typeof location_data != "undefined") {
console.log(`Name: ${location_data.Name}`)
Expand Down
4 changes: 3 additions & 1 deletion lib/models/Location.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class Location extends BaseModel {
const containerTable = lootGenData.containersSpawnData[containerId];
if(containerTable == null){
await logger.error(`Container: ${containerId} not found in conrainersSpawnData.json`);
return;
return data;
}
const containerTemplate = await Item.get(containerId);
let SpawnList = {}
Expand Down Expand Up @@ -323,6 +323,7 @@ class Location extends BaseModel {
// generate specific container loot here !!!
data = await this.generateContainerContents(data);
// push result to output
if(data == null) console.log(lootSpawn.worldId);
output.Loot.push(data);
}
/**
Expand Down Expand Up @@ -361,6 +362,7 @@ class Location extends BaseModel {
}
data.Items.push({ _id: newId, _tpl: quest.questItmTpl });
data.Root = newId;

output.Loot.push(data);
};

Expand Down

0 comments on commit 1d9026a

Please sign in to comment.