mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Missions taking place in enemy territory now award 25% more XP
This commit is contained in:
@@ -31,8 +31,8 @@ do
|
||||
|
||||
trigger.action.outText("Generating mission and loading assets, this can take some time...", 5)
|
||||
|
||||
-- Add a little delay for the "Generating mission..." message be printed out. Once generation begins, the main DCS thread will be to busy to output anything.
|
||||
timer.scheduleFunction(TUM.mission.beginMission, false, timer.getTime() + 1)
|
||||
-- TUM.mission.beginMission()
|
||||
end
|
||||
|
||||
local function setSetting(args)
|
||||
|
||||
@@ -263,7 +263,7 @@ do
|
||||
-- @param settingValue The setting value, or nil to use the current value
|
||||
-- @return A number in the -1.0 to +1.0 range, or nil if this setting has no effect on XP gains
|
||||
-------------------------------------
|
||||
function TUM.playerScore.getScoreMultiplierMod(settingID, settingValue)
|
||||
function TUM.playerScore.getScoreMultiplier(settingID, settingValue)
|
||||
if not DCSEx.io.canReadAndWrite() then return 0 end -- IO disabled, career and scoring disabled
|
||||
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return 0 end -- No scoring in multiplayer
|
||||
|
||||
@@ -273,10 +273,14 @@ do
|
||||
return ENEMY_DEFENSE_MULTIPLIER_BONUS[settingValue]
|
||||
elseif settingID == TUM.settings.id.WINGMEN then
|
||||
return 0 - 0.10 * (settingValue - 1)
|
||||
elseif settingID == TUM.settings.id.TARGET_LOCATION then
|
||||
local zoneName = TUM.settings.getValue(TUM.settings.id.TARGET_LOCATION, true)
|
||||
local tgtZone = DCSEx.zones.getByName(zoneName)
|
||||
if not tgtZone then return 0 end
|
||||
if TUM.territories.getPointOwner(tgtZone) == TUM.settings.getEnemyCoalition() then return 0.25 end
|
||||
return 0
|
||||
elseif settingID == TUM.settings.id.AI_CAP then
|
||||
if settingValue == 2 and TUM.settings.getValue(TUM.settings.id.ENEMY_AIR_FORCE) > 1 then
|
||||
return 0.15
|
||||
end
|
||||
if settingValue == 2 and TUM.settings.getValue(TUM.settings.id.ENEMY_AIR_FORCE) > 1 then return 0.15 end
|
||||
return 0
|
||||
end
|
||||
|
||||
@@ -293,7 +297,7 @@ do
|
||||
|
||||
local scoreMultiplier = 1.0
|
||||
for _,v in pairs(TUM.settings.id) do
|
||||
scoreMultiplier = scoreMultiplier + (TUM.playerScore.getScoreMultiplierMod(v) or 0.0)
|
||||
scoreMultiplier = scoreMultiplier + (TUM.playerScore.getScoreMultiplier(v) or 0.0)
|
||||
end
|
||||
|
||||
return math.max(0.0, scoreMultiplier)
|
||||
|
||||
@@ -57,6 +57,8 @@ do
|
||||
[TUM.settings.id.WINGMEN] = { "None", "1", "2", "3" }
|
||||
}
|
||||
|
||||
local targetLocation
|
||||
|
||||
local function getFaction(side)
|
||||
if side == coalition.side.BLUE then
|
||||
return TUM.settings.getValue(TUM.settings.id.COALITION_BLUE, true)
|
||||
@@ -180,11 +182,11 @@ do
|
||||
end
|
||||
|
||||
if showScoreMultiplier then
|
||||
local settingMultiplier = TUM.playerScore.getScoreMultiplierMod(v, settings[v])
|
||||
local settingMultiplier = TUM.playerScore.getScoreMultiplier(v, settings[v])
|
||||
|
||||
if settingMultiplier ~= nil then -- Must add "~= nil" because can be 0
|
||||
summary = summary.." ("
|
||||
if settingMultiplier >= 0.0 then summary = summary.."+" end
|
||||
if settingMultiplier >= 0 then summary = summary.."+" end
|
||||
summary = summary..tostring(math.ceil(settingMultiplier * 100)).."% xp)"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user