History

add a bool value to Node which indicates if it is allowed to rez new entities

Seth Alves committed 11 years ago

Commit 4e833011 parent d17289f12 files · +101 −32Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 12 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+5−1
@@ -23,6 +23,7 @@ EntityScriptingInterface::EntityScriptingInterface() : · 22 unmodified lines
2323 {
2424 auto nodeList = DependencyManager::get<NodeList>();
2525 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
26+ connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
2627 }
2728
2829 void EntityScriptingInterface::queueEntityMessage(PacketType packetType,
@@ -30,12 +31,15 @@ void EntityScriptingInterface::queueEntityMessage(PacketType packetType, · 1 unmodified line
3031 getEntityPacketSender()->queueEditEntityMessage(packetType, entityID, properties);
3132 }
3233
33−
3434 bool EntityScriptingInterface::canAdjustLocks() {
3535 auto nodeList = DependencyManager::get<NodeList>();
3636 return nodeList->getThisNodeCanAdjustLocks();
3737 }
3838
39+bool EntityScriptingInterface::canRez() {
40+ auto nodeList = DependencyManager::get<NodeList>();
41+ return nodeList->getThisNodeCanRez();
42+}
3943
4044 void EntityScriptingInterface::setEntityTree(EntityTree* modelTree) {
4145 if (_entityTree) {