mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add logging of show/hide/getByName in tutorial
This commit is contained in:
parent
d9e6491843
commit
1f2b555a26
1 changed files with 11 additions and 1 deletions
|
@ -937,6 +937,10 @@ stepCleanupFinish.prototype = {
|
|||
|
||||
|
||||
|
||||
function isEntityInLocalTree(entityID) {
|
||||
return Entities.getEntityProperties(entityID, 'visible').visible !== undefined;
|
||||
}
|
||||
|
||||
function showEntitiesWithTag(tag) {
|
||||
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
||||
if (entities) {
|
||||
|
@ -955,6 +959,7 @@ function showEntitiesWithTag(tag) {
|
|||
collisionless: collisionless,
|
||||
userData: JSON.stringify(data),
|
||||
};
|
||||
debug("Showing: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||
Entities.editEntity(entityID, newProperties);
|
||||
}
|
||||
}
|
||||
|
@ -979,6 +984,7 @@ function showEntitiesWithTag(tag) {
|
|||
Entities.editEntity(entityID, newProperties);
|
||||
});
|
||||
}
|
||||
|
||||
function hideEntitiesWithTag(tag) {
|
||||
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
||||
if (entities) {
|
||||
|
@ -994,6 +1000,8 @@ function hideEntitiesWithTag(tag) {
|
|||
ignoreForCollisions: 1,
|
||||
userData: JSON.stringify(data),
|
||||
};
|
||||
|
||||
debug("Hiding: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||
Entities.editEntity(entityID, newProperties);
|
||||
}
|
||||
}
|
||||
|
@ -1020,7 +1028,9 @@ function hideEntitiesWithTag(tag) {
|
|||
// cached list of entities. Otherwise, return undefined.
|
||||
function getEntityWithName(name) {
|
||||
debug("Getting entity with name:", name);
|
||||
return TUTORIAL_NAME_TO_ENTITY_PROPERTIES_MAP[name];
|
||||
var entityID = TUTORIAL_NAME_TO_ENTITY_PROPERTIES_MAP[name];
|
||||
debug("Entity id: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||
return entityID;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue