forked from Mirrorlandia_minetest/minetest
Cleanup: drop Server::hudGetHotbarItemcount()
Call directly accessible RemotePlayer::getHotbarItemcount() from server api
This commit is contained in:
parent
f35236afea
commit
373f1bfb4a
@ -1462,9 +1462,7 @@ int ObjectRef::l_hud_get_hotbar_itemcount(lua_State *L)
|
||||
if (player == NULL)
|
||||
return 0;
|
||||
|
||||
s32 hotbar_itemcount = getServer(L)->hudGetHotbarItemcount(player);
|
||||
|
||||
lua_pushnumber(L, hotbar_itemcount);
|
||||
lua_pushnumber(L, player->getHotbarItemcount());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ Server::~Server()
|
||||
|
||||
{
|
||||
MutexAutoLock envlock(m_env_mutex);
|
||||
|
||||
|
||||
infostream << "Server: Saving players" << std::endl;
|
||||
m_env->saveLoadedPlayers();
|
||||
|
||||
@ -3090,11 +3090,6 @@ bool Server::hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount)
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Server::hudGetHotbarItemcount(RemotePlayer *player) const
|
||||
{
|
||||
return player->getHotbarItemcount();
|
||||
}
|
||||
|
||||
void Server::hudSetHotbarImage(RemotePlayer *player, std::string name)
|
||||
{
|
||||
if (!player)
|
||||
|
@ -290,7 +290,6 @@ public:
|
||||
bool hudChange(RemotePlayer *player, u32 id, HudElementStat stat, void *value);
|
||||
bool hudSetFlags(RemotePlayer *player, u32 flags, u32 mask);
|
||||
bool hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount);
|
||||
s32 hudGetHotbarItemcount(RemotePlayer *player) const;
|
||||
void hudSetHotbarImage(RemotePlayer *player, std::string name);
|
||||
std::string hudGetHotbarImage(RemotePlayer *player);
|
||||
void hudSetHotbarSelectedImage(RemotePlayer *player, std::string name);
|
||||
|
Loading…
Reference in New Issue
Block a user