mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
Update RotorOps.lua
changed scope of changeGameState
This commit is contained in:
parent
43b17d1b23
commit
c1fc5bbfac
10
RotorOps.lua
10
RotorOps.lua
@ -1,5 +1,5 @@
|
||||
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.voice_overs = true
|
||||
@ -569,7 +569,7 @@ function RotorOps.assessUnitsInZone(var)
|
||||
|
||||
--is the game finished?
|
||||
if all_zones_clear then
|
||||
changeGameState(RotorOps.game_states.won)
|
||||
RotorOps.changeGameState(RotorOps.game_states.won)
|
||||
gameMsg(gameMsgs.success)
|
||||
return --we won't reset our timer to fire this function again
|
||||
end
|
||||
@ -655,7 +655,7 @@ end
|
||||
|
||||
|
||||
|
||||
local function changeGameState(new_state)
|
||||
function RotorOps.changeGameState(new_state)
|
||||
RotorOps.game_state = new_state
|
||||
trigger.action.setUserFlag(RotorOps.game_state_flag, new_state)
|
||||
end
|
||||
@ -678,7 +678,7 @@ function RotorOps.setActiveZone(new_index)
|
||||
ctld.activatePickupZone(RotorOps.zones[old_index].name)
|
||||
end
|
||||
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.get_troops_to_zone, new_index) end
|
||||
|
||||
@ -771,7 +771,7 @@ function RotorOps.setupConflict(_game_state_flag)
|
||||
RotorOps.setupCTLD()
|
||||
--RotorOps.setupRadioMenu()
|
||||
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)
|
||||
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user