[sol] Updated to version 3.0.3.

This commit is contained in:
Quentin Bazin 2020-05-10 19:50:21 +02:00
parent c277dc7d87
commit 2ddc43cb41
5 changed files with 12 additions and 22184 deletions

4
.gitmodules vendored
View File

@ -13,3 +13,7 @@
path = external/zlib
url = git://github.com/Unarelith/zlib.git
ignore = dirty
[submodule "external/sol2"]
path = external/sol2
url = git://github.com/ThePhD/sol2.git
ignore = dirty

View File

@ -207,6 +207,11 @@ add_subdirectory(external/SFML)
add_subdirectory(external/zlib)
include_directories(external/zlib)
#------------------------------------------------------------------------------
# - sol3 (sol2 v3.x)
#------------------------------------------------------------------------------
include_directories(external/sol2/single/include/sol)
#------------------------------------------------------------------------------
# Subdirectories
#------------------------------------------------------------------------------

22180
external/sol.hpp vendored

File diff suppressed because it is too large Load Diff

1
external/sol2 vendored Submodule

@ -0,0 +1 @@
Subproject commit 230928c0451544dbc97b2e0a007ca16c3566df66

View File

@ -69,16 +69,14 @@ void TilesDef::deserialize(sf::Packet &packet) {
void TilesDef::loadFromLuaTable(const sol::table &table) {
if (table["tiles"].get_type() == sol::type::table) {
sol::as_table_t<std::vector<std::string>> t = table["tiles"];
m_textureFilenames = t.source;
m_textureFilenames = table["tiles"].get<std::vector<std::string>>();
}
else
m_textureFilenames.emplace_back(table["tiles"].get<std::string>());
if (table["alt_tiles"].get_type() != sol::type::none) {
if (table["alt_tiles"].get_type() == sol::type::table) {
sol::as_table_t<std::vector<std::string>> t = table["alt_tiles"];
m_altTextureFilenames = t.source;
m_altTextureFilenames = table["alt_tiles"].get<std::vector<std::string>>();
}
else
m_altTextureFilenames.emplace_back(table["alt_tiles"].get<std::string>());