mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2026-08-25 20:35:19 +00:00
Renamed "inaccurate" to "imprecise"
This commit is contained in:
@@ -549,8 +549,8 @@ do
|
|||||||
return typeName
|
return typeName
|
||||||
end
|
end
|
||||||
|
|
||||||
function Library.objectNames.getGeneric(obj, inaccurate)
|
function Library.objectNames.getGeneric(obj, imprecise)
|
||||||
inaccurate = inaccurate or false
|
imprecise = imprecise or false
|
||||||
if not obj then return "nothing" end
|
if not obj then return "nothing" end
|
||||||
|
|
||||||
if Object.getCategory(obj) == Object.Category.SCENERY then
|
if Object.getCategory(obj) == Object.Category.SCENERY then
|
||||||
@@ -561,7 +561,7 @@ do
|
|||||||
local objDesc = obj:getDesc()
|
local objDesc = obj:getDesc()
|
||||||
|
|
||||||
if objDesc.category == Unit.Category.AIRPLANE then
|
if objDesc.category == Unit.Category.AIRPLANE then
|
||||||
if inaccurate then return "aircraft" end
|
if imprecise then return "aircraft" end
|
||||||
|
|
||||||
if obj:hasAttribute("AWACS") then
|
if obj:hasAttribute("AWACS") then
|
||||||
return "AWACS"
|
return "AWACS"
|
||||||
@@ -581,7 +581,7 @@ do
|
|||||||
return "aircraft"
|
return "aircraft"
|
||||||
end
|
end
|
||||||
elseif objDesc.category == Unit.Category.HELICOPTER then
|
elseif objDesc.category == Unit.Category.HELICOPTER then
|
||||||
if inaccurate then return "helicopter" end
|
if imprecise then return "helicopter" end
|
||||||
|
|
||||||
if obj:hasAttribute("Attack helicopters") then
|
if obj:hasAttribute("Attack helicopters") then
|
||||||
return "attack helicopter"
|
return "attack helicopter"
|
||||||
@@ -591,7 +591,7 @@ do
|
|||||||
return "helicopter"
|
return "helicopter"
|
||||||
end
|
end
|
||||||
elseif objDesc.category == Unit.Category.GROUND_UNIT then
|
elseif objDesc.category == Unit.Category.GROUND_UNIT then
|
||||||
if inaccurate then
|
if imprecise then
|
||||||
if obj:hasAttribute("Infantry") then
|
if obj:hasAttribute("Infantry") then
|
||||||
return "infantry"
|
return "infantry"
|
||||||
else
|
else
|
||||||
@@ -626,7 +626,7 @@ do
|
|||||||
end
|
end
|
||||||
elseif objDesc.category == Unit.Category.SHIP then
|
elseif objDesc.category == Unit.Category.SHIP then
|
||||||
if obj:getTypeName() == "speedboat" then return "speedboat" end
|
if obj:getTypeName() == "speedboat" then return "speedboat" end
|
||||||
if inaccurate then return "ship" end
|
if imprecise then return "ship" end
|
||||||
|
|
||||||
if obj:hasAttribute("Submarines") then
|
if obj:hasAttribute("Submarines") then
|
||||||
return "submarine"
|
return "submarine"
|
||||||
@@ -649,12 +649,12 @@ do
|
|||||||
return "unknown"
|
return "unknown"
|
||||||
end
|
end
|
||||||
|
|
||||||
function Library.objectNames.getGenericGroup(grp, inaccurate)
|
function Library.objectNames.getGenericGroup(grp, imprecise)
|
||||||
if not grp then return "nothing" end
|
if not grp then return "nothing" end
|
||||||
|
|
||||||
-- TODO: should not just take the first unit but pick the most relevant one (e.g. one SAM and 3 supply trucks should be reported as "SAM" not as "truck")
|
-- TODO: should not just take the first unit but pick the most relevant one (e.g. one SAM and 3 supply trucks should be reported as "SAM" not as "truck")
|
||||||
for _,u in ipairs(grp:getUnits()) do
|
for _,u in ipairs(grp:getUnits()) do
|
||||||
return Library.objectNames.getGeneric(u, inaccurate)
|
return Library.objectNames.getGeneric(u, imprecise)
|
||||||
end
|
end
|
||||||
|
|
||||||
return "unknown"
|
return "unknown"
|
||||||
|
|||||||
Reference in New Issue
Block a user