mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Move tool definitions to script
This commit is contained in:
parent
4b8e4dae58
commit
9e1c4533b8
8 changed files with 307 additions and 101 deletions
|
@ -43,7 +43,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "scriptapi.h"
|
||||
#include "nodedef.h"
|
||||
#include "tooldef.h"
|
||||
#include "content_tool.h" // For content_tool_init
|
||||
|
||||
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
|
||||
|
||||
|
@ -987,9 +986,6 @@ Server::Server(
|
|||
|
||||
infostream<<"m_nodemgr="<<m_nodemgr<<std::endl;
|
||||
|
||||
// Initialize default tool definitions
|
||||
content_tool_init(m_toolmgr);
|
||||
|
||||
// Initialize default node definitions
|
||||
content_mapnode_init(NULL, m_nodemgr);
|
||||
|
||||
|
@ -4240,6 +4236,15 @@ ITextureSource* Server::getTextureSource()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
IWritableToolDefManager* Server::getWritableToolDefManager()
|
||||
{
|
||||
return m_toolmgr;
|
||||
}
|
||||
IWritableNodeDefManager* Server::getWritableNodeDefManager()
|
||||
{
|
||||
return m_nodemgr;
|
||||
}
|
||||
|
||||
v3f findSpawnPos(ServerMap &map)
|
||||
{
|
||||
//return v3f(50,50,50)*BS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue