mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
Merge pull request #8 from spencershepard/bugfix/changeGameState-error
Update RotorOps.lua
This commit is contained in:
commit
f72f039e0a
10
RotorOps.lua
10
RotorOps.lua
@ -1,5 +1,5 @@
|
|||||||
RotorOps = {}
|
RotorOps = {}
|
||||||
RotorOps.version = "1.0.10"
|
RotorOps.version = "1.0.11"
|
||||||
|
|
||||||
--RotorOps settings that are safe to change dynamically (ideally from the mission editor in DO SCRIPT for ease of use)
|
--RotorOps settings that are safe to change dynamically (ideally from the mission editor in DO SCRIPT for ease of use)
|
||||||
RotorOps.voice_overs = true
|
RotorOps.voice_overs = true
|
||||||
@ -569,7 +569,7 @@ function RotorOps.assessUnitsInZone(var)
|
|||||||
|
|
||||||
--is the game finished?
|
--is the game finished?
|
||||||
if all_zones_clear then
|
if all_zones_clear then
|
||||||
changeGameState(RotorOps.game_states.won)
|
RotorOps.changeGameState(RotorOps.game_states.won)
|
||||||
gameMsg(gameMsgs.success)
|
gameMsg(gameMsgs.success)
|
||||||
return --we won't reset our timer to fire this function again
|
return --we won't reset our timer to fire this function again
|
||||||
end
|
end
|
||||||
@ -655,7 +655,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function changeGameState(new_state)
|
function RotorOps.changeGameState(new_state)
|
||||||
RotorOps.game_state = new_state
|
RotorOps.game_state = new_state
|
||||||
trigger.action.setUserFlag(RotorOps.game_state_flag, new_state)
|
trigger.action.setUserFlag(RotorOps.game_state_flag, new_state)
|
||||||
end
|
end
|
||||||
@ -678,7 +678,7 @@ function RotorOps.setActiveZone(new_index)
|
|||||||
ctld.activatePickupZone(RotorOps.zones[old_index].name)
|
ctld.activatePickupZone(RotorOps.zones[old_index].name)
|
||||||
end
|
end
|
||||||
ctld.deactivatePickupZone(RotorOps.zones[new_index].name)
|
ctld.deactivatePickupZone(RotorOps.zones[new_index].name)
|
||||||
changeGameState(new_index)
|
RotorOps.changeGameState(new_index)
|
||||||
if new_index < old_index then gameMsg(gameMsgs.fallback, new_index) end
|
if new_index < old_index then gameMsg(gameMsgs.fallback, new_index) end
|
||||||
if new_index > old_index then gameMsg(gameMsgs.get_troops_to_zone, new_index) end
|
if new_index > old_index then gameMsg(gameMsgs.get_troops_to_zone, new_index) end
|
||||||
|
|
||||||
@ -771,7 +771,7 @@ function RotorOps.setupConflict(_game_state_flag)
|
|||||||
RotorOps.setupCTLD()
|
RotorOps.setupCTLD()
|
||||||
--RotorOps.setupRadioMenu()
|
--RotorOps.setupRadioMenu()
|
||||||
RotorOps.game_state_flag = _game_state_flag
|
RotorOps.game_state_flag = _game_state_flag
|
||||||
changeGameState(RotorOps.game_states.not_started)
|
RotorOps.changeGameState(RotorOps.game_states.not_started)
|
||||||
trigger.action.outText("ALL TROOPS GET TO TRANSPORT AND PREPARE FOR DEPLOYMENT!" , 10, false)
|
trigger.action.outText("ALL TROOPS GET TO TRANSPORT AND PREPARE FOR DEPLOYMENT!" , 10, false)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user