mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
GenericNodeMetadata and an example furnace
This commit is contained in:
parent
e880cc40e9
commit
705f142b8d
7 changed files with 964 additions and 156 deletions
|
@ -3309,9 +3309,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
p.Y = stoi(fn.next(","));
|
||||
p.Z = stoi(fn.next(","));
|
||||
NodeMetadata *meta = m_env->getMap().getNodeMetadata(p);
|
||||
if(meta && meta->typeId() == LEGN(m_nodedef, "CONTENT_LOCKABLE_CHEST")) {
|
||||
LockingChestNodeMetadata *lcm = (LockingChestNodeMetadata*)meta;
|
||||
if (lcm->getOwner() != player->getName())
|
||||
if(meta->getOwner() != ""){
|
||||
if(meta->getOwner() != player->getName())
|
||||
disable_action = true;
|
||||
}
|
||||
}
|
||||
|
@ -3327,9 +3326,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
p.Y = stoi(fn.next(","));
|
||||
p.Z = stoi(fn.next(","));
|
||||
NodeMetadata *meta = m_env->getMap().getNodeMetadata(p);
|
||||
if(meta && meta->typeId() == LEGN(m_nodedef, "CONTENT_LOCKABLE_CHEST")) {
|
||||
LockingChestNodeMetadata *lcm = (LockingChestNodeMetadata*)meta;
|
||||
if (lcm->getOwner() != player->getName())
|
||||
if(meta->getOwner() != ""){
|
||||
if(meta->getOwner() != player->getName())
|
||||
disable_action = true;
|
||||
}
|
||||
}
|
||||
|
@ -3356,9 +3354,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
p.Y = stoi(fn.next(","));
|
||||
p.Z = stoi(fn.next(","));
|
||||
NodeMetadata *meta = m_env->getMap().getNodeMetadata(p);
|
||||
if(meta && meta->typeId() == LEGN(m_nodedef, "CONTENT_LOCKABLE_CHEST")) {
|
||||
LockingChestNodeMetadata *lcm = (LockingChestNodeMetadata*)meta;
|
||||
if (lcm->getOwner() != player->getName())
|
||||
if(meta->getOwner() != ""){
|
||||
if(meta->getOwner() != player->getName())
|
||||
disable_action = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue