mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Moose Embedded update
This commit is contained in:
parent
979ce38422
commit
fe6d94466d
@ -6779,7 +6779,7 @@ function CARGO_GROUP:Spawn( Client )
|
|||||||
self.CargoGroupName = self.CargoSpawn:SpawnFromUnit( self.CargoZone:GetCargoHostUnit(), 60, 30, 1 ):GetName()
|
self.CargoGroupName = self.CargoSpawn:SpawnFromUnit( self.CargoZone:GetCargoHostUnit(), 60, 30, 1 ):GetName()
|
||||||
else
|
else
|
||||||
--- ReSpawn the Cargo in the CargoZone without a host ...
|
--- ReSpawn the Cargo in the CargoZone without a host ...
|
||||||
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, 1 ):GetName()
|
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, true, 1 ):GetName()
|
||||||
end
|
end
|
||||||
self:StatusNone()
|
self:StatusNone()
|
||||||
end
|
end
|
||||||
@ -11569,14 +11569,17 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Will spawn a Group within a given @{ZONE}.
|
--- Will spawn a Group within a given @{Zone#ZONE}.
|
||||||
|
-- Once the group is spawned within the zone, it will continue on its route.
|
||||||
|
-- The first waypoint (where the group is spawned) is replaced with the zone coordinates.
|
||||||
-- @param #SPAWN self
|
-- @param #SPAWN self
|
||||||
-- @param #ZONE Zone The zone where the group is to be spawned.
|
-- @param Zone#ZONE Zone The zone where the group is to be spawned.
|
||||||
|
-- @param #number ZoneRandomize (Optional) Set to true if you want to randomize the starting point in the zone.
|
||||||
-- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone.
|
-- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone.
|
||||||
-- @return Group#GROUP that was spawned.
|
-- @return Group#GROUP that was spawned.
|
||||||
-- @return #nil when nothing was spawned.
|
-- @return #nil when nothing was spawned.
|
||||||
function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
function SPAWN:SpawnInZone( Zone, ZoneRandomize, SpawnIndex )
|
||||||
self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } )
|
self:F( { self.SpawnTemplatePrefix, Zone, ZoneRandomize, SpawnIndex } )
|
||||||
|
|
||||||
if Zone then
|
if Zone then
|
||||||
|
|
||||||
@ -11591,11 +11594,14 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
|||||||
|
|
||||||
if SpawnTemplate then
|
if SpawnTemplate then
|
||||||
|
|
||||||
local ZonePoint = Zone:GetPointVec2()
|
local ZonePoint
|
||||||
|
|
||||||
|
if ZoneRandomize == true then
|
||||||
|
ZonePoint = Zone:GetRandomPointVec2()
|
||||||
|
else
|
||||||
|
ZonePoint = Zone:GetPointVec2()
|
||||||
|
end
|
||||||
|
|
||||||
SpawnTemplate.route.points = nil
|
|
||||||
SpawnTemplate.route.points = {}
|
|
||||||
SpawnTemplate.route.points[1] = {}
|
|
||||||
SpawnTemplate.route.points[1].x = ZonePoint.x
|
SpawnTemplate.route.points[1].x = ZonePoint.x
|
||||||
SpawnTemplate.route.points[1].y = ZonePoint.y
|
SpawnTemplate.route.points[1].y = ZonePoint.y
|
||||||
|
|
||||||
@ -11605,17 +11611,7 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
|||||||
SpawnTemplate.units[UnitID].y = ZonePoint.y
|
SpawnTemplate.units[UnitID].y = ZonePoint.y
|
||||||
self:T( 'SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
|
self:T( 'SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
|
||||||
end
|
end
|
||||||
|
|
||||||
local SpawnPos = Zone:GetRandomPointVec2()
|
|
||||||
local Point = {}
|
|
||||||
Point.type = "Turning Point"
|
|
||||||
Point.x = SpawnPos.x
|
|
||||||
Point.y = SpawnPos.y
|
|
||||||
Point.action = "Cone"
|
|
||||||
Point.speed = 5
|
|
||||||
|
|
||||||
table.insert( SpawnTemplate.route.points, 2, Point )
|
|
||||||
|
|
||||||
return self:SpawnWithIndex( self.SpawnIndex )
|
return self:SpawnWithIndex( self.SpawnIndex )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -11626,6 +11622,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Will spawn a plane group in uncontrolled mode...
|
--- Will spawn a plane group in uncontrolled mode...
|
||||||
-- This will be similar to the uncontrolled flag setting in the ME.
|
-- This will be similar to the uncontrolled flag setting in the ME.
|
||||||
-- @return #SPAWN self
|
-- @return #SPAWN self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user