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
23{23{
24 auto nodeList = DependencyManager::get<NodeList>();24 auto nodeList = DependencyManager::get<NodeList>();
25 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);25 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
26 connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
26}27}
27 28
28void EntityScriptingInterface::queueEntityMessage(PacketType packetType,29void EntityScriptingInterface::queueEntityMessage(PacketType packetType,
@@ -30,12 +31,15 @@ void EntityScriptingInterface::queueEntityMessage(PacketType packetType, · 1 unmodified line
30 getEntityPacketSender()->queueEditEntityMessage(packetType, entityID, properties);31 getEntityPacketSender()->queueEditEntityMessage(packetType, entityID, properties);
31}32}
32 33
33
34bool EntityScriptingInterface::canAdjustLocks() {34bool EntityScriptingInterface::canAdjustLocks() {
35 auto nodeList = DependencyManager::get<NodeList>();35 auto nodeList = DependencyManager::get<NodeList>();
36 return nodeList->getThisNodeCanAdjustLocks();36 return nodeList->getThisNodeCanAdjustLocks();
37}37}
38 38
39bool EntityScriptingInterface::canRez() {
40 auto nodeList = DependencyManager::get<NodeList>();
41 return nodeList->getThisNodeCanRez();
42}
39 43
40void EntityScriptingInterface::setEntityTree(EntityTree* modelTree) {44void EntityScriptingInterface::setEntityTree(EntityTree* modelTree) {
41 if (_entityTree) {45 if (_entityTree) {