-Add mist for assist.
-Add 'Buta's_Airboss.lua' for custom Airboss functions. -Add 'Localizations.lua' for dictionaries of other langs. -Update MIZ file with 3 AR tankers.
This commit is contained in:
Binary file not shown.
@@ -9017,7 +9017,7 @@ AirbossRoosevelt:Load()
|
|||||||
|
|
||||||
-- -- Add recovery windows:
|
-- -- Add recovery windows:
|
||||||
-- -- Case I from 9 to 10 am.
|
-- -- Case I from 9 to 10 am.
|
||||||
-- AirbossRoosevelt:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25)
|
AirbossRoosevelt:AddRecoveryWindow( "9:00", "21:00", 1, nil, true, 25)
|
||||||
-- AirbossRoosevelt:AddRecoveryWindow( "10:05", "11:05", 1, nil, true, 25)
|
-- AirbossRoosevelt:AddRecoveryWindow( "10:05", "11:05", 1, nil, true, 25)
|
||||||
-- AirbossRoosevelt:AddRecoveryWindow( "11:10", "12:10", 1, nil, true, 25)
|
-- AirbossRoosevelt:AddRecoveryWindow( "11:10", "12:10", 1, nil, true, 25)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
BAirboss = {
|
||||||
|
carrierUnit = nil,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
do
|
||||||
|
function BAirboss:New(carrierUnit)
|
||||||
|
if not carrierUnit then return end
|
||||||
|
|
||||||
|
if type(carrierUnit) == 'string' then
|
||||||
|
self.carrierGroup = Unit.getByName(carrierUnit)
|
||||||
|
else
|
||||||
|
self.carrierGroup = carrierUnit
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.carrierUnit then
|
||||||
|
local errMsg = 'ERROR: Carrier unit %s is not found in mission.'
|
||||||
|
errMsg = string.format(Localizations:translate(errMsg,'cn'),carrierUnit)
|
||||||
|
|
||||||
|
trigger.action.outText(errMsg,120)
|
||||||
|
env.error(errMsg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function BAirboss:turnIntoWind()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BAirboss:setTACAN(Channel,MorseCode)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BAirboss:setICLS(Channel,Mode,MorseCode)
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
Localizations = {
|
||||||
|
defaultLang = 'en',
|
||||||
|
|
||||||
|
--英文
|
||||||
|
["en"] = {
|
||||||
|
["ERROR: Carrier unit %s is not found in mission."] = "ERROR: Carrier unit %s is not found in mission.",
|
||||||
|
["world"] = "World",
|
||||||
|
["welcome"] = "Welcome"
|
||||||
|
},
|
||||||
|
|
||||||
|
--中文
|
||||||
|
["zh"] = {
|
||||||
|
["ERROR: Carrier unit %s is not found in mission."] = "错误: 在任务中没有找到航母单位 %s .",
|
||||||
|
["world"] = "世界",
|
||||||
|
["welcome"] = "欢迎"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
do
|
||||||
|
|
||||||
|
function Localizations:translate(text, langCode)
|
||||||
|
if not text then return end
|
||||||
|
if not langCode or type(langCode) ~= 'string' then langCode = self.defaultLang end
|
||||||
|
|
||||||
|
langCode = string.lower(langCode)
|
||||||
|
|
||||||
|
local langTable = Localizations[langCode]
|
||||||
|
local result = text
|
||||||
|
|
||||||
|
if not langTable then
|
||||||
|
local defaultLangTable = Localizations[self.defaultLang]
|
||||||
|
|
||||||
|
if defaultLangTable then
|
||||||
|
local result = defaultLangTable[text] or text
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if langTable then
|
||||||
|
result = langTable[text] or text
|
||||||
|
end
|
||||||
|
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
@@ -3,6 +3,7 @@ local script_list =
|
|||||||
-- Load order must be correct
|
-- Load order must be correct
|
||||||
-- "mist.lua", --mist_4_5_122
|
-- "mist.lua", --mist_4_5_122
|
||||||
"Moose_.lua",
|
"Moose_.lua",
|
||||||
|
'mist_4_5_126.lua',
|
||||||
-- "spawnListener.lua",
|
-- "spawnListener.lua",
|
||||||
-- "Airboss[EN].lua",
|
-- "Airboss[EN].lua",
|
||||||
"Airboss[CN].lua",
|
"Airboss[CN].lua",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,3 +24,38 @@ do
|
|||||||
trigger.action.outText(typeName,10)
|
trigger.action.outText(typeName,10)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local unit = Unit.getByName('Test-1-1')
|
||||||
|
if unit then
|
||||||
|
if unit:isActive() then
|
||||||
|
trigger.action.outText('Uncontroll is Active.',5)
|
||||||
|
else
|
||||||
|
trigger.action.outText('Uncontroll is not Active.',5)
|
||||||
|
local controller = unit:getGroup():getController()
|
||||||
|
local Start = {
|
||||||
|
id = 'Start',
|
||||||
|
params = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
controller:setCommand(Start)
|
||||||
|
if unit:isActive() then
|
||||||
|
trigger.action.outText('Start command can Active uncontrolled group.',5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not unit then
|
||||||
|
trigger.action.outText('no unit.',5)
|
||||||
|
end
|
||||||
|
|
||||||
|
local unit = Unit.getByName('Test-1-1')
|
||||||
|
if not unit then
|
||||||
|
trigger.action.outText('no unit.',5)
|
||||||
|
end
|
||||||
|
|
||||||
|
if unit then
|
||||||
|
local desc = unit:getDesc()
|
||||||
|
local msg = mist.utils.tableShow(desc)
|
||||||
|
trigger.action.outText(msg,5)
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user