diff --git a/Assets/Scripts/Gui/techTree.lua b/Assets/Scripts/Gui/techTree.lua index 05bfe30..2118987 100644 --- a/Assets/Scripts/Gui/techTree.lua +++ b/Assets/Scripts/Gui/techTree.lua @@ -38,10 +38,10 @@ gui = { pos = {x = Pos.x + margin.left, y = Pos.y + margin.top + 2 * heightOffset}, size = techButtonSize, name = "Research", - imagePath = baseTechPath .. 'fpt.jpg', + imagePath = baseTechPath .. 'cruisers.jpg', guiType = GuiType.BUTTON, buttonType = ButtonType.RESEARCH, - techId = TechId.FPT, + techId = TechId.CRUISERS, trigger = 82, }, { @@ -58,20 +58,20 @@ gui = { pos = {x = Pos.x + .5 * (Size.x - 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset}, size = techButtonSize, name = "Research", - imagePath = baseTechPath .. 'ept.jpg', + imagePath = baseTechPath .. 'stealth.jpg', guiType = GuiType.BUTTON, buttonType = ButtonType.RESEARCH, - techId = TechId.EFT, + techId = TechId.ST_SUB, trigger = 82, }, { pos = {x = Pos.x + .5 * (Size.x + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset}, size = techButtonSize, name = "Research", - imagePath = baseTechPath .. 'ept.jpg', + imagePath = baseTechPath .. 'robo.jpg', guiType = GuiType.BUTTON, buttonType = ButtonType.RESEARCH, - techId = TechId.EFT, + techId = TechId.ROBO, trigger = 82, }, { @@ -88,22 +88,20 @@ gui = { pos = {x = Pos.x + Size.x - (margin.right + 3 * techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset}, size = techButtonSize, name = "Research", - imagePath = baseTechPath .. 'pct.jpg', + imagePath = baseTechPath .. 'carriers.jpg', guiType = GuiType.BUTTON, buttonType = ButtonType.RESEARCH, - techId = TechId.PCT, + techId = TechId.CARRIERS, trigger = 82, }, { pos = {x = Pos.x + Size.x - (margin.right + techButtonSize.x), y = Pos.y + margin.top + 2 * heightOffset}, size = techButtonSize, name = "Research", - imagePath = baseTechPath .. 'pct.jpg', + imagePath = baseTechPath .. 'tanks.jpg', guiType = GuiType.BUTTON, buttonType = ButtonType.RESEARCH, - techId = TechId.PCT, + techId = TechId.TANKS, trigger = 82, }, - --[[ - ]]-- } diff --git a/Assets/Textures/Icons/Technologies/advancedTower.png b/Assets/Textures/Icons/Technologies/carriers.jpg similarity index 100% rename from Assets/Textures/Icons/Technologies/advancedTower.png rename to Assets/Textures/Icons/Technologies/carriers.jpg diff --git a/Assets/Textures/Icons/Technologies/carrierFoundation.png b/Assets/Textures/Icons/Technologies/cruisers.jpg similarity index 100% rename from Assets/Textures/Icons/Technologies/carrierFoundation.png rename to Assets/Textures/Icons/Technologies/cruisers.jpg diff --git a/Assets/Textures/Icons/Technologies/siegeFactory.jpg b/Assets/Textures/Icons/Technologies/robo.jpg similarity index 100% rename from Assets/Textures/Icons/Technologies/siegeFactory.jpg rename to Assets/Textures/Icons/Technologies/robo.jpg diff --git a/Assets/Textures/Icons/Technologies/tacticalCruiser.png b/Assets/Textures/Icons/Technologies/stealth.jpg similarity index 100% rename from Assets/Textures/Icons/Technologies/tacticalCruiser.png rename to Assets/Textures/Icons/Technologies/stealth.jpg diff --git a/Assets/Textures/Icons/Technologies/tanks.jpg b/Assets/Textures/Icons/Technologies/tanks.jpg new file mode 100755 index 0000000..a1451cc Binary files /dev/null and b/Assets/Textures/Icons/Technologies/tanks.jpg differ diff --git a/game.cpp b/game.cpp index 5fd9e7a..b8b850e 100644 --- a/game.cpp +++ b/game.cpp @@ -244,13 +244,11 @@ namespace battleship{ sol::table techTable = SOL_LUA_VIEW[techKey][i + 1]; Technology t; - t.id = techTable["id"]; t.cost = techTable["cost"]; t.name = techTable["name"]; t.icon = techTable["icon"]; t.description = techTable["description"]; t.parents = parseTechTable(i, techKey, "numParents", "parents"); - t.children = parseTechTable(i, techKey, "numChildren", "children"); t.abilities = parseTechTable(i, techKey, "numAbilities", "abilities"); technologies.push_back(t); diff --git a/researchButton.cpp b/researchButton.cpp index 2c8fc03..e3afa47 100644 --- a/researchButton.cpp +++ b/researchButton.cpp @@ -60,7 +60,7 @@ namespace battleship{ bool hasTechParents = true; for(int tp : techParents) - if(find(technologies.begin(), technologies.end(), techId) == technologies.end()){ + if(find(technologies.begin(), technologies.end(), tp) == technologies.end()){ hasTechParents = false; break; } diff --git a/technology.h b/technology.h index c93985f..88d863e 100644 --- a/technology.h +++ b/technology.h @@ -6,12 +6,11 @@ namespace battleship{ struct Technology{ - int id, cost; + int cost; std::string name; std::string icon; std::string description; std::vector parents; - std::vector children; std::vector abilities; }; }