Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions Moose Development/Moose/Functional/Shorad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -795,15 +795,20 @@ do
local tgtgrp1 = self.Samset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord1 = tgtgrp1:GetCoordinate()
local tgtgrp2 = self.Groupset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord2 = tgtgrp2:GetCoordinate()
local dist1 = tgtcoord:Get2DDistance(tgtcoord1)
local dist2 = tgtcoord:Get2DDistance(tgtcoord2)

if dist1 < dist2 then
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
if tgtgrp2 then
local tgtcoord2 = tgtgrp2:GetCoordinate()
local dist1 = tgtcoord:Get2DDistance(tgtcoord1)
local dist2 = tgtcoord:Get2DDistance(tgtcoord2)

if dist1 < dist2 then
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
else
targetunit = tgtgrp2
targetcat = Object.Category.UNIT
end
else
targetunit = tgtgrp2
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
end
end
Expand Down
9 changes: 7 additions & 2 deletions Moose Development/Moose/Ops/CTLD.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ do
-- my_ctld.C130DynamicCargoAutoBuildMergeSeconds = 0 -- Merge window in seconds for C-130 auto-build handoff; set to 0 to disable batching (default).
-- my_ctld.locale = "en" -- Language locale to use.
-- -- Supported: "en" English (default), "de" German, "fr" French, "es" Spanish,
-- -- "pt-br" Brazilian Portuguese, "ru" Russian, "tr" Turkish, "zh-cn" Simplified Chinese (Mainland China), "zh-tw" Traditional Chinese (Taiwan).
-- -- "it" Italian, "pt-br" Brazilian Portuguese, "ru" Russian, "tr" Turkish,
-- -- "zh-cn" Simplified Chinese (Mainland China), "zh-tw" Traditional Chinese (Taiwan).
--
-- ## 2.1 CH-47 Chinook support
--
Expand Down Expand Up @@ -1499,7 +1500,7 @@ function CTLD:_InitLocalization()
end

--- [User] Set a resolver used to select a CTLD locale for group-specific menus and messages.
-- Supported locales: "en", "de", "fr", "es", "pt-br", "ru", "tr", "zh-cn", "zh-tw".
-- Supported locales: "en", "de", "fr", "es", "it", "pt-br", "ru", "tr", "zh-cn", "zh-tw".
-- If unset, CTLD keeps using `self.locale` as before.
-- @param #CTLD self
-- @param #function Resolver Function called as `Resolver(self, Group)` and expected to return a locale string.
Expand Down Expand Up @@ -1542,6 +1543,10 @@ function CTLD:_GetMenuPluralSuffix(Count, Kind, Group)
return "ов"
end
if locale == "tr" then return "" end
if locale == "it" then
if Kind == "crate" then return count > 1 and "e" or "a" end
if Kind == "set" then return "" end
end
if locale == "de" and Kind == "crate" then return count > 1 and "n" or "" end
return count > 1 and "s" or ""
end
Expand Down
Loading
Loading