Working plane cargo AI dispatcher, but still need to work on the collisions on the runway etc of moving vehicles with planes...

This commit is contained in:
FlightControl
2018-08-14 21:04:11 +02:00
parent 4d7812b368
commit e4f8b5afc3
4 changed files with 31 additions and 24 deletions

View File

@@ -89,7 +89,7 @@ do -- CARGO_GROUP
for UnitID, UnitTemplate in pairs( self.CargoTemplate.units ) do
UnitTemplate.name = UnitTemplate.name .. "#CARGO"
local CargoUnitName = UnitTemplate.name
local CargoUnitName = UnitTemplate.name
self.CargoUnitTemplate[CargoUnitName] = UnitTemplate
GroupTemplate.units[#GroupTemplate.units+1] = self.CargoUnitTemplate[CargoUnitName]
@@ -101,7 +101,7 @@ do -- CARGO_GROUP
end
-- Then we register the new group in the database
self.CargoGroup = GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID)
GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID )
-- Now we spawn the new group based on the template created.
self.CargoObject = _DATABASE:Spawn( GroupTemplate )