[Server] Fix typos and make all files end with newlines

new-script-api
David Cernat 7 years ago
parent b20df4b7cd
commit bbac26294f

@ -65,4 +65,4 @@ void Books::update()
packet->setPlayer(player);
packet->Send(/*toOthers*/ false);
}
}

@ -27,4 +27,4 @@ int CellState::getStateType() const
std::string CellState::getDescription() const
{
return state.cell.getDescription();
}
}

@ -151,4 +151,4 @@ int Faction::getFactionReputation() const
void Faction::setFactionReputation(int reputation)
{
faction.reputation = reputation;
}
}

@ -95,4 +95,4 @@ Inventory &NetActor::getInventory()
Cells &NetActor::getCell()
{
return cellAPI;
}
}

@ -612,4 +612,4 @@ void Player::setAuthority()
// Also send this to everyone else who has the cell loaded
serverCell->sendToLoaded(authorityPacket, &writeActorList);
}
}
}

@ -69,7 +69,7 @@ std::shared_ptr<Player> Players::addPlayer(RakNet::RakNetGUID guid)
void Players::deletePlayerByPID(int pid)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (pid %lu) to deleting", pid);
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (pid %i) for deletion", pid);
auto &ls = store.get<ByID>();
auto it = ls.find(pid);
if (it != ls.end())
@ -80,7 +80,7 @@ void Players::deletePlayerByPID(int pid)
void Players::deletePlayerByGUID(RakNet::RakNetGUID guid)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (guid %lu) to deleting", guid.g);
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Marking player (guid %lu) for deletion", guid.g);
auto &ls = store.get<ByGUID>();
auto it = ls.find(guid.g);
if (it != ls.end())
@ -110,4 +110,4 @@ Players::Store::const_iterator Players::end()
size_t Players::size()
{
return store.size();
}
}

@ -97,4 +97,4 @@ std::deque<std::string> CommandController::cmdParser(const std::string &message)
throw runtime_error("failed to parse message: " + message);
return ret;
}
}

@ -150,4 +150,4 @@ void EventController::raiseEvent(Event id, sol::table data, const string &modnam
}
else
cerr << "Event with id: " << id << " is not registered" << endl;
}
}

@ -78,7 +78,7 @@ LuaState::LuaState()
configEnv = sol::environment(*lua, sol::create, lua->globals());
lua->set("Config", configEnv); // plain global environment for mod configuration
// errors in sol::functions catches only in debug build for better performance
// errors in sol::functions are caught only in Debug or RelWithDebInfo builds for better performance
#ifdef SOL_SAFE_FUNCTIONS
lua->set_function("ErrorHandler", [](sol::object error_msg) {
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, ("Lua: " + error_msg.as<string>()).c_str());
@ -134,6 +134,7 @@ LuaState::LuaState()
lua->set_function("getCurrentMpNum", []() {
return mwmp::Networking::getPtr()->getCurrentMpNum();
});
lua->set_function("setCurrentMpNum", [](int num) {
mwmp::Networking::getPtr()->setCurrentMpNum(num);
});
@ -434,4 +435,4 @@ void LuaState::loadMods()
}
dataEnv["Core"]["LOADED_MODS"] = mods.size();
}
}

@ -28,4 +28,4 @@ void LuaUtils::Init(LuaState &lua)
throw std::runtime_error("string library not initialized");
strTable.set_function("split", &str_split);
}
}

Loading…
Cancel
Save