mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
Update RotorOps.lua
This commit is contained in:
parent
6bedc64684
commit
993c80aa93
12
RotorOps.lua
12
RotorOps.lua
@ -251,7 +251,11 @@ function RotorOps.deployTroops(quantity, target_group_obj)
|
|||||||
for index, zone in pairs(RotorOps.zones)
|
for index, zone in pairs(RotorOps.zones)
|
||||||
do
|
do
|
||||||
if isUnitInZone(valid_unit, zone.name) then
|
if isUnitInZone(valid_unit, zone.name) then
|
||||||
|
if side == "red" then
|
||||||
gameMsg(gameMsgs.troops_dropped, index)
|
gameMsg(gameMsgs.troops_dropped, index)
|
||||||
|
else
|
||||||
|
gameMsg(gameMsgs.friendly_troops_dropped, index)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -432,7 +436,7 @@ function RotorOps.aiExecute(vars)
|
|||||||
|
|
||||||
--we should remove inactive/dead groups and cancel timer here
|
--we should remove inactive/dead groups and cancel timer here
|
||||||
if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then
|
if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then
|
||||||
debugMsg("group no longer exists")
|
--debugMsg("group no longer exists")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -541,7 +545,6 @@ function RotorOps.assessUnitsInZone(var)
|
|||||||
for index, group in pairs(RotorOps.ai_blue_vehicle_groups) do
|
for index, group in pairs(RotorOps.ai_blue_vehicle_groups) do
|
||||||
if group then
|
if group then
|
||||||
RotorOps.aiTask(group, "clear_zone", RotorOps.active_zone)
|
RotorOps.aiTask(group, "clear_zone", RotorOps.active_zone)
|
||||||
debugMsg("active_zone="..RotorOps.active_zone)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -551,7 +554,7 @@ function RotorOps.assessUnitsInZone(var)
|
|||||||
|
|
||||||
--set user flags based on quantities of enemy units remaining
|
--set user flags based on quantities of enemy units remaining
|
||||||
if not active_zone_initial_enemy_units then
|
if not active_zone_initial_enemy_units then
|
||||||
debugMsg("taking stock of the active zone")
|
--debugMsg("taking stock of the active zone")
|
||||||
active_zone_initial_enemy_units = red_ground_units
|
active_zone_initial_enemy_units = red_ground_units
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -611,7 +614,8 @@ function RotorOps.assessUnitsInZone(var)
|
|||||||
else
|
else
|
||||||
header = "[BATTLE FOR "..RotorOps.active_zone .. "] "
|
header = "[BATTLE FOR "..RotorOps.active_zone .. "] "
|
||||||
end
|
end
|
||||||
body = "RED: " ..#red_infantry.. " infantry, " .. #red_vehicles .. " vehicles. BLUE: "..#blue_infantry.. " infantry, " .. #blue_vehicles.." vehicles."
|
--body = "RED: " ..#red_infantry.. " infantry, " .. #red_vehicles .. " vehicles. BLUE: "..#blue_infantry.. " infantry, " .. #blue_vehicles.." vehicles."
|
||||||
|
body = "RED: " ..#red_infantry.. " infantry, " .. #red_vehicles .. " vehicles. BLUE: "..#blue_infantry.. " infantry, " .. #blue_vehicles.." vehicles."..trigger.misc.getUserFlag(active_zone_status_flag)
|
||||||
|
|
||||||
message = header .. body
|
message = header .. body
|
||||||
if RotorOps.zone_status_display then
|
if RotorOps.zone_status_display then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user