summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/objects.js
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-07-29 17:31:31 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:46 +0200
commitb817af6802c1168f17f87308aa922bee5f629a24 (patch)
treeecc1f3128ceef7cc54ebc09fbcc515b9cb7e584e /frontend/src/sagas/objects.js
parent0a984529480c08aaf6af9f6f657d4ed805e77d49 (diff)
Adding prefabs works now
Diffstat (limited to 'frontend/src/sagas/objects.js')
-rw-r--r--frontend/src/sagas/objects.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/sagas/objects.js b/frontend/src/sagas/objects.js
index cc19eb75..58dee6be 100644
--- a/frontend/src/sagas/objects.js
+++ b/frontend/src/sagas/objects.js
@@ -148,7 +148,8 @@ export const updateTopologyOnServer = function* (id) {
export const getTopologyAsObject = function* (id, keepIds) {
const topologyStore = yield select(OBJECT_SELECTORS['topology'])
-
+ console.log(topologyStore)
+ //console.log("DEBUG: roomIds = " + topologyStore[id].roomIds)
const rooms = yield getAllRooms(topologyStore[id].roomIds, keepIds)
return {
_id: keepIds ? id : undefined,
@@ -167,10 +168,10 @@ export const getAllRooms = function* (roomIds, keepIds) {
for(let i in roomIds){
console.log("DEBUG: on iteration " + i + ", roomStore has value = " + roomStore[i])
- let tiles = yield getAllRoomTiles(roomStore[i], keepIds)
+ let tiles = yield getAllRoomTiles(roomStore[roomIds[i]], keepIds)
rooms.push({
_id: keepIds ? i : undefined,
- name: roomStore[i].name,
+ name: roomStore[roomIds[i]].name,
tiles: tiles,
}
)