Single lase commands

This commit is contained in:
FlightControl_Master 2017-09-01 19:24:50 +02:00
parent e6dd040a43
commit c2965e0736

View File

@ -990,6 +990,8 @@ do -- DESIGNATE
function DESIGNATE:onafterLaseOn( From, Event, To, Index, Duration, LaserCode )
self.Designating[Index] = "Laser"
self.LaseStart = timer.getTime()
self.LaseDuration = Duration
self:__Lasing( -1, Index, Duration, LaserCode )
end
@ -1038,6 +1040,7 @@ do -- DESIGNATE
end
end
if self.AutoLase or ( not self.AutoLase and ( self.LaseStart + Duration >= timer.getTime() ) ) then
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit
@ -1147,10 +1150,14 @@ do -- DESIGNATE
self.CC:GetPositionable():MessageToSetGroup( "Marking " .. MarkingCount .. " x " .. MarkedTypesText .. " with lasers " .. MarkedLaserCodesText .. ".", 5, self.AttackSet, self.DesignateName )
end
self:__Lasing( -30, Index, Duration )
self:__Lasing( -30, Index, Duration, LaserCodeRequested )
self:SetDesignateMenu()
else
self:__LaseOff( 1 )
end
end
---