mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
@@ -20,8 +20,9 @@ UnitId = {
|
||||
MARKET = 17,
|
||||
LAB = 18,
|
||||
POINT_DEFENSE = 19,
|
||||
EXTRACTOR = 19,
|
||||
REFINERY = 20
|
||||
EXTRACTOR = 20,
|
||||
REFINERY = 21,
|
||||
FORT = 22
|
||||
}
|
||||
WeaponClass = {HITSCAN = 0, SHELL = 1, TORPEDO = 2, CRUISE_MISSILE = 3}
|
||||
UnitClass = {
|
||||
@@ -40,7 +41,8 @@ UnitClass = {
|
||||
LAB = 12,
|
||||
POINT_DEFENSE = 13,
|
||||
EXTRACTOR = 14,
|
||||
REFINERY = 15
|
||||
REFINERY = 15,
|
||||
FORT = 16
|
||||
}
|
||||
UnitType = {UNDERWATER = 0, SEA_LEVEL = 1, HOVER = 2, LAND = 3, AIR = 4}
|
||||
ArmorType = {CAST = 0, COMBINED = 1, MECHANIC = 2, SHELL = 3, STEEL = 4}
|
||||
@@ -518,4 +520,19 @@ units = {
|
||||
selectionSfx = PATH .. 'Sounds/Units/Sample/selection.ogg',
|
||||
deathSfx = PATH .. 'Sounds/SFX/Explosions/explosion01.ogg',
|
||||
},
|
||||
{
|
||||
unitClass = UnitClass.FORT,
|
||||
unitType = UnitType.LAND,
|
||||
isVehicle = false,
|
||||
health = 1000,
|
||||
cost = 1000,
|
||||
size = {x = 1, y = 1.15, z = 2},
|
||||
hitboxOffset = {x = 0, y = 0, z = 0},
|
||||
lineOfSight = 5,
|
||||
name = 'Fort',
|
||||
basePath = PATH .. structurePrefix .. 'Forts/',
|
||||
meshPath = 'fort.xml',
|
||||
selectionSfx = PATH .. 'Sounds/Units/Sample/selection.ogg',
|
||||
deathSfx = PATH .. 'Sounds/SFX/Explosions/explosion01.ogg',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
numGui = 5
|
||||
res = graphics.resolution
|
||||
Size = {x = 100, y = 100}
|
||||
|
||||
@@ -47,5 +46,14 @@ gui = {
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 68,
|
||||
structureId = UnitId.POINT_DEFENSE
|
||||
}
|
||||
},
|
||||
{
|
||||
pos = {x = res.x - 5 * Size.x - 200, y = res.y - 200},
|
||||
size = Size,
|
||||
imagePath = '',
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.BUILD,
|
||||
trigger = 70,
|
||||
structureId = UnitId.FORT
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
res = graphics.resolution
|
||||
Size = {x = 100, y = 100}
|
||||
|
||||
gui = {
|
||||
{
|
||||
pos = {x = res.x - 200, y = res.y - 200},
|
||||
size = Size,
|
||||
imagePath = '',
|
||||
guiType = GuiType.BUTTON,
|
||||
buttonType = ButtonType.FORT_TRAIN,
|
||||
trigger = 82,
|
||||
unitId = UnitId.ENGINEER
|
||||
},
|
||||
}
|
||||
@@ -26,7 +26,8 @@ ButtonType = {
|
||||
BUILD = 22,
|
||||
LAND_FACTORY_TRAIN = 23,
|
||||
NAVAL_FACTORY_TRAIN = 24,
|
||||
STATISTICS = 25
|
||||
FORT_TRAIN = 25,
|
||||
STATISTICS = 26
|
||||
}
|
||||
|
||||
ListboxType = {
|
||||
|
||||
@@ -194,6 +194,8 @@ namespace battleship{
|
||||
if(buttons.empty()){
|
||||
if(!mainPlayer->getSelectedUnitsByClass(UnitClass::ENGINEER).empty())
|
||||
guiManager->readLuaScreenScript("engineerCommands.lua", buttons, listboxes, checkboxes, sliders, textboxes, guiRects, texts);
|
||||
else if(!mainPlayer->getSelectedUnitsByClass(UnitClass::FORT).empty())
|
||||
guiManager->readLuaScreenScript("fortCommands.lua", buttons, listboxes, checkboxes, sliders, textboxes, guiRects, texts);
|
||||
else if(!mainPlayer->getSelectedUnitsByClass(UnitClass::LAND_FACTORY).empty())
|
||||
guiManager->readLuaScreenScript("landFactoryCommands.lua", buttons, listboxes, checkboxes, sliders, textboxes, guiRects, texts);
|
||||
else if(!mainPlayer->getSelectedUnitsByClass(UnitClass::NAVAL_FACTORY).empty())
|
||||
|
||||
@@ -182,6 +182,13 @@ namespace battleship{
|
||||
button = new TrainButton(pos, size, buttonName, (int)guiTable["trigger"], (string)guiTable["imagePath"], (int)SOL_LUA_STATE["UnitId"]["NAVAL_FACTORY"], unitId);
|
||||
break;
|
||||
}
|
||||
case FORT_TRAIN:
|
||||
{
|
||||
int unitId = guiTable["unitId"];
|
||||
string buttonName = SOL_LUA_STATE["units"][unitId + 1]["name"];
|
||||
button = new TrainButton(pos, size, buttonName, (int)guiTable["trigger"], (string)guiTable["imagePath"], (int)SOL_LUA_STATE["UnitId"]["FORT"], unitId);
|
||||
break;
|
||||
}
|
||||
case STATISTICS:
|
||||
button = new StatsButton(pos, size, name, (int)guiTable["trigger"], (string)guiTable["imagePath"]);
|
||||
break;
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace battleship{
|
||||
BUILD,
|
||||
LAND_FACTORY_TRAIN,
|
||||
NAVAL_FACTORY_TRAIN,
|
||||
FORT_TRAIN,
|
||||
STATISTICS
|
||||
};
|
||||
enum ListboxType {
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace battleship{
|
||||
int unitClass = SOL_LUA_VIEW["units"][id + 1]["unitClass"];
|
||||
|
||||
switch((UnitClass)unitClass){
|
||||
case UnitClass::FORT:
|
||||
case UnitClass::LAND_FACTORY:
|
||||
case UnitClass::NAVAL_FACTORY:
|
||||
return new Factory(player, id, pos, rot, buildStatus);
|
||||
|
||||
Reference in New Issue
Block a user