mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
extracting strings from Lua tables friendlier to MSVC
This commit is contained in:
@@ -142,9 +142,11 @@ namespace battleship{
|
||||
unitClass = (UnitClass)unitTable["unitClass"];
|
||||
type = (UnitType)unitTable["unitType"];
|
||||
|
||||
guiScreen = "";
|
||||
string gsk = "guiScreen";
|
||||
sol::optional<string> nameOpt = unitTable[gsk];
|
||||
guiScreen = (nameOpt != sol::nullopt ? (string)unitTable[gsk] : "");
|
||||
|
||||
if(nameOpt != sol::nullopt) guiScreen = unitTable[gsk];
|
||||
|
||||
string tblName = "garrisonCapacity";
|
||||
sol::optional<sol::table> gc = unitTable[tblName];
|
||||
|
||||
Reference in New Issue
Block a user