mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
bugfix for not garrisonning transport ships
moved resource deposits on the river map bugfix for not rendering the minimap after opening the console
This commit is contained in:
@@ -6,7 +6,7 @@ metadata = {
|
||||
impassibleNodeValue = 65535,
|
||||
spawnPoints = {
|
||||
{x = -396.000000, y = 0.000000, z = -374.000000},
|
||||
{x = 300.000000, y = 0.000000, z = 400.000000},
|
||||
{x = 470.000000, y = 0.000000, z = 440.000000},
|
||||
--{x = -326.000000, y = 0.000000, z = 374.000000},
|
||||
},
|
||||
choosablePlayers = {
|
||||
@@ -20,10 +20,10 @@ metadata = {
|
||||
},
|
||||
civilianPlayer = {
|
||||
resourceDeposits = {
|
||||
{id = 0, pos = {x = 450.000000, y = 0.000000, z = 450.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 450.000000, y = 0.000000, z = 430.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 450.000000, y = 0.000000, z = 410.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 450.000000, y = 0.000000, z = 390.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 220.000000, y = 0.000000, z = 450.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 220.000000, y = 0.000000, z = 430.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 220.000000, y = 0.000000, z = 410.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = 220.000000, y = 0.000000, z = 390.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = -450.000000, y = 0.000000, z = -450.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = -450.000000, y = 0.000000, z = -430.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
{id = 0, pos = {x = -450.000000, y = 0.000000, z = -410.000000}, rot = {w = 1.000000, x = 0.000000, y = 0.000000, z = 0.000000}, initAmmount = 20000},
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
game = {cpuPlayers = {}}
|
||||
_minimapPos = {x = 0, y = 0}
|
||||
_minimapSize = {x = 0, y = 0}
|
||||
GameObjectFrameStatus = {
|
||||
PLACEABLE = 0,
|
||||
BLOCKED_BY_FOG_OF_WAR = 1,
|
||||
|
||||
@@ -395,6 +395,13 @@ end
|
||||
|
||||
function Player:buildExtractors(arguments)
|
||||
extractors = self:getUnitsByClass(UnitClass.EXTRACTOR, -1)
|
||||
|
||||
if arguments and arguments.numWaitExtractors and #extractors >= arguments.numWaitExtractors then
|
||||
for i = 1, arguments.numWaitExtractors do
|
||||
if not extractors[i]:toStructure():isComplete() then return BTNodeResult.RUNNING end
|
||||
end
|
||||
end
|
||||
|
||||
visibleDeposits = self:getVisibleDeposits()
|
||||
depId = nil
|
||||
|
||||
|
||||
@@ -21,20 +21,35 @@ for i = 1, #game.cpuPlayers do
|
||||
{
|
||||
type = BTNodeType.SEQUENCE,
|
||||
children = {
|
||||
{type = BTNodeType.FUNCTION, func = player.buildExtractors},
|
||||
{
|
||||
type = BTNodeType.FUNCTION,
|
||||
func = player.buildTaskForces,
|
||||
args = {
|
||||
factoryClass = UnitClass.LAND_FACTORY,
|
||||
taskForceData = {{class = UnitClass.RESOURCE_ROVER, numUnits = 4}}
|
||||
taskForceData = {{class = UnitClass.RESOURCE_ROVER, numUnits = 1}}
|
||||
}
|
||||
},
|
||||
{type = BTNodeType.FUNCTION, func = player.buildExtractors, args = {numWaitExtractors = 1}},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{type = BTNodeType.FUNCTION, func = player.startHarvesting},
|
||||
{
|
||||
type = BTNodeType.PARALLEL,
|
||||
children = {
|
||||
{type = BTNodeType.FUNCTION, func = player.buildExtractors},
|
||||
{
|
||||
type = BTNodeType.FUNCTION,
|
||||
func = player.buildTaskForces,
|
||||
args = {
|
||||
factoryClass = UnitClass.LAND_FACTORY,
|
||||
taskForceData = {{class = UnitClass.RESOURCE_ROVER, numUnits = 3}}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
{type = BTNodeType.FUNCTION, func = player.startHarvesting},
|
||||
{
|
||||
type = BTNodeType.SELECTOR,
|
||||
children = {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
_minimapPos = {x = 0, y = 0}
|
||||
_minimapSize = {x = 0, y = 0}
|
||||
@@ -260,6 +260,8 @@ namespace battleship{
|
||||
for(string f : configData::scripts)
|
||||
SOL_LUA_STATE.script_file(path + f);
|
||||
|
||||
SOL_LUA_STATE.script_file(path + "Scripts/Gui/_minimap.lua");
|
||||
|
||||
sol::table resTable = SOL_LUA_STATE["graphics"]["resolution"];
|
||||
width = resTable["x"];
|
||||
height = resTable["y"];
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ namespace battleship{
|
||||
name("pl"),
|
||||
trader(new Trader())
|
||||
{
|
||||
resources[0] = 5000;
|
||||
resources[0] = 10000;
|
||||
|
||||
colorMaterial = new Material(Root::getSingleton()->getLibPath() + "texture");
|
||||
colorMaterial->addBoolUniform("lightingEnabled", false);
|
||||
|
||||
+1
-1
@@ -345,7 +345,7 @@ namespace battleship{
|
||||
bool buildOrder = (order.type == Order::TYPE::BUILD);
|
||||
bool resourceOrder = (order.type == Order::TYPE::LOAD || order.type == Order::TYPE::UNLOAD || order.type == Order::TYPE::SUPPLY);
|
||||
|
||||
if(blockingUnit && blockingUnit != this && !resourceOrder && !buildOrder && (!garrisonOrder || (garrisonOrder && blockingUnit != (Unit*)targObj))){
|
||||
if(blockingUnit && blockingUnit != this && !resourceOrder && !buildOrder && !garrisonOrder){
|
||||
vector<int> surrCellIds = map->getSurroundingCells(cells[dest].pos, 1);
|
||||
int altDest = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user