Skip to content

Commit

Permalink
Fix more translation marker conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Jun 17, 2024
1 parent aa05416 commit e9716d2
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
64 changes: 32 additions & 32 deletions scripts/scenario_30_brokenglass.lua
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,10 @@ Don't waste your time shooting at that station. It has an Exuari emergency integ
end

function InitKraylor()
for _, e in ipairs(Kw_stations) do
for idx, e in ipairs(Kw_stations) do
e:onTakingDamage(KWGoAggro)
end
for _, e in ipairs(Kw_enemies) do
for idx, e in ipairs(Kw_enemies) do
e:onTakingDamage(KWGoAggro)
end
end
Expand All @@ -910,13 +910,13 @@ function InitTraffic()
Traffic.types = {'Atlantis', 'Transport1x2', 'Maverick', 'Kiriya', 'Hathcock', 'Flavia P.Falcon'}
Traffic.srcdest = {'J2','D0','B10','J8','zz1','zz6','zz8','D10','H11','K5'}
Traffic.stations = {Admin_station, Defence_station, Wormhole_station, Colony_area_station}
for _, stn in ipairs(Patrol_stations) do
for idx, stn in ipairs(Patrol_stations) do
table.insert(Traffic.stations,stn)
end
for _, stn in ipairs(Resupply_stations) do
for idx, stn in ipairs(Resupply_stations) do
table.insert(Traffic.stations,stn)
end
for _, stn in ipairs(Lookout_stations) do
for idx, stn in ipairs(Lookout_stations) do
table.insert(Traffic.stations,stn)
end
Traffic.timer = getScenarioTime()
Expand Down Expand Up @@ -1028,7 +1028,7 @@ function SpawnPatrolEnemies()
local x, y = Patrol_stations[2]:getPosition()
Defence_station.patrol_enemies = SpawnEnemies(x - 5000, y - 5000, random(1.6,2), "Ghosts")

for _, enemy in ipairs(Defence_station.patrol_enemies) do
for idx, enemy in ipairs(Defence_station.patrol_enemies) do
enemy:orderAttack(Patrol_stations[2])
end
Defence_station:sendCommsMessage(Player, _("defenceStnCheckpoint-IncCall",[[RED ALERT!
Expand Down Expand Up @@ -1075,7 +1075,7 @@ function ConvoyGoAggro(__, instigator)

Player:setFaction("Human Navy")
Defence_station.drones_think_were_friendly = false
for _, e in ipairs(Defence_station.convoy_enemies) do
for idx, e in ipairs(Defence_station.convoy_enemies) do
if e.goneAggro ~= nil then return end -- Bail if already activated
e.goneAggro = true
if e:isValid() then e:orderAttack(Player)end
Expand All @@ -1093,7 +1093,7 @@ function DroneStationGoAggro(self, instigator)
local x, y = self:getPosition()
local spx, spy = vectorFromAngle(irandom(0, 360), 1500)
local defenders = SpawnEnemies(x + spx, y + spy, random(.8,1.2), "Ghosts")
for _, ship in ipairs(defenders) do
for idx, ship in ipairs(defenders) do
table.insert(Defence_station.ghost_defenders, ship)
end
end
Expand All @@ -1111,26 +1111,26 @@ function SpawnKWEnemies(start_aggro)
if Difficulty >= 1 then
local x, y = sectorToXY("AI23")
local enemies = SpawnEnemies(x, y, random(.8,1.2), "Kraylor")
for _, e in ipairs(enemies) do
for idx, e in ipairs(enemies) do
table.insert(Kw_enemies, e)
end
end
if Difficulty >= 3 then
local x, y = sectorToXY("AG26")
local enemies = SpawnEnemies(x, y, random(.8,1.2), "Kraylor")
for _, e in ipairs(enemies) do
for idx, e in ipairs(enemies) do
table.insert(Kw_enemies, e)
end
end
if Difficulty == 5 then
local x, y = sectorToXY("AI25")
local enemies = SpawnEnemies(x, y, random(.8,1.2), "Kraylor")
for _, e in ipairs(enemies) do
for idx, e in ipairs(enemies) do
table.insert(Kw_enemies, e)
end
end

for _, e in ipairs(Kw_enemies) do
for idx, e in ipairs(Kw_enemies) do
if start_aggro then
e:orderAttack(Player)
else
Expand All @@ -1142,7 +1142,7 @@ end

function KWGoAggro(self, instigator)
if instigator ~= Player then return end
for _, e in ipairs(Kw_enemies) do
for idx, e in ipairs(Kw_enemies) do
if e.goneAggro == true then return end
e.goneAggro = true
e:orderAttack(Player)
Expand Down Expand Up @@ -1179,7 +1179,7 @@ function SpawnRepairEnemies()
-- This is needed to get the Kraylor to actually attack it
Wormhole_station:setFaction("Human Navy")

for _, enemy in ipairs(Wormhole_station.repair_enemies) do
for idx, enemy in ipairs(Wormhole_station.repair_enemies) do
enemy:orderAttack(Wormhole_station)
end
Wormhole_station:sendCommsMessage(Player, _("wormhole-incCall",[[RED ALERT!
Expand All @@ -1194,7 +1194,7 @@ function SpawnHarrasment()

Defence_station.harass_enemies = SpawnEnemies(x + spx, y + spy, random(0.25,0.5), "Exuari")

for _, enemy in ipairs(Defence_station.harass_enemies) do
for idx, enemy in ipairs(Defence_station.harass_enemies) do
enemy:setWarpDrive(false)
enemy:setJumpDrive(true)
enemy:orderAttack(Player)
Expand Down Expand Up @@ -1825,7 +1825,7 @@ function UpdateMissionPatrol()

if Defence_station.mission_state == "patrol attack" then
local allDestroyed = true
for _, enemy in ipairs(Defence_station.patrol_enemies) do
for idx, enemy in ipairs(Defence_station.patrol_enemies) do
if enemy:isValid() then
allDestroyed = false
if distance(enemy,Player) < 2000 then
Expand Down Expand Up @@ -1854,7 +1854,7 @@ INVESTIGATE BUT DO NOT ENGAGE! We have it on good word that attacking this convo
end

function CheckConvoyArrived()
for _, enemy in ipairs(Defence_station.convoy_enemies) do
for idx, enemy in ipairs(Defence_station.convoy_enemies) do
-- Make them disappear when they get to G0
if enemy:isValid() then
if distance(enemy, enemy.dx, enemy.dy) < 1000 and not enemy.goneAggro then
Expand Down Expand Up @@ -2046,7 +2046,7 @@ function UpdateMissionDroneNest()
local with_convoy = false
if #Defence_station.convoy_enemies ~= 0 then
CheckConvoyArrived()
for _, enemy in ipairs(Defence_station.convoy_enemies) do
for idx, enemy in ipairs(Defence_station.convoy_enemies) do
if enemy:isValid() and distance(Player, enemy) < 5000 then
with_convoy = true
end
Expand Down Expand Up @@ -2084,14 +2084,14 @@ function FinishMissionDroneNest ()
if MockDroneShip ~= nil and MockDroneShip:isValid() then
MockDroneShip:destroy()
end
for _, e in ipairs(Defence_station.convoy_enemies) do
for idx, e in ipairs(Defence_station.convoy_enemies) do
if Difficulty == 5 then
e:orderRoaming()
else
e:orderIdle()
end
end
for _, stn in ipairs(Drone_stations) do
for idx, stn in ipairs(Drone_stations) do
if stn:isValid() then
if stn == Drone_control_station then
stn:onDestroyed(function ()
Expand Down Expand Up @@ -2169,7 +2169,7 @@ function UpdateMissionRepair(delta)

if Wormhole_station.tier2_mission_state == "attack" then
local allDestroyed = true
for _, enemy in ipairs(Wormhole_station.repair_enemies) do
for idx, enemy in ipairs(Wormhole_station.repair_enemies) do
if enemy:isValid() then
allDestroyed = false
if distance(enemy,Player) < 2000 then
Expand Down Expand Up @@ -2254,7 +2254,7 @@ function TransferToPP1()
end

function UpdateNebulaBonuses()
for _, bonus in pairs(Admin_station.nebula_bonuses) do
for idx, bonus in pairs(Admin_station.nebula_bonuses) do
if bonus.revealed == nil then
if bonus:isScannedBy(Player) then
bonus.revealed = true
Expand All @@ -2268,7 +2268,7 @@ function UpdateDroneStations()

-- Proximity Defence
if Defence_station.drones_think_were_friendly ~= true then
for _, stn in ipairs(Drone_stations) do
for idx, stn in ipairs(Drone_stations) do
if stn:isValid() then
if distance(Player, stn) > 80000 then return end -- Exit early (don't iterate all stations) if player is far
if distance(Player, stn) < 2000 and stn.prox_spawned == nil then
Expand All @@ -2278,7 +2278,7 @@ function UpdateDroneStations()
local x_d = x - (2 * (x - x_t)) + irandom(-2000, 2000)
local y_d = y - (2 * (y - y_t)) + irandom(-2000, 2000)
local defenders = SpawnEnemies(x_d, y_d, random(0.1,0.3), "Ghosts")
for _, d in ipairs(defenders) do
for idx2, d in ipairs(defenders) do
d:orderAttack(Player)
table.insert(Defence_station.ghost_defenders, d)
end
Expand Down Expand Up @@ -2320,7 +2320,7 @@ end

function UpdateHarassment()
local alldead = true
for _, enemy in ipairs(Defence_station.harass_enemies) do
for idx, enemy in ipairs(Defence_station.harass_enemies) do
if enemy:isValid() then
alldead = false
if distance(enemy, Player) > 240000 then
Expand Down Expand Up @@ -2405,14 +2405,14 @@ function HendrixHints(stn)
end

function CheckDefeatConditions()
for _, stn in ipairs(Patrol_stations) do
for idx, stn in ipairs(Patrol_stations) do
if not stn:isValid() then
Player:addToShipLog(_("defeat-shipLog", "DEFEAT - A Patrol Station has been destroyed"), "Red")
victory("Exuari")
end
end

for _, stn in ipairs({Admin_station, Defence_station, Wormhole_station}) do
for idx, stn in ipairs({Admin_station, Defence_station, Wormhole_station}) do
if not stn:isValid() then
Player:addToShipLog(_("defeat-shipLog", "DEFEAT - A Core station (Admin, Defence, Wormhole) has been destroyed"), "Red")
victory("Exuari")
Expand Down Expand Up @@ -2441,7 +2441,7 @@ end

function CheckCheevoJunk()
CHEEVOS["junk"] = true
for _, stn in ipairs(Exuari_junk_stations) do
for idx, stn in ipairs(Exuari_junk_stations) do
if stn:isValid() then
CHEEVOS["junk"] = false
return
Expand All @@ -2451,14 +2451,14 @@ end

function CheckCheevoNoGhosts()
CHEEVOS["noghosts"] = true
for _, ship in ipairs(Defence_station.convoy_enemies) do
for idx, ship in ipairs(Defence_station.convoy_enemies) do
if ship:isValid() then
CHEEVOS["noghosts"] = false
return
end
end

for _, ship in ipairs(Defence_station.ghost_defenders) do
for idx, ship in ipairs(Defence_station.ghost_defenders) do
if ship:isValid() then
CHEEVOS["noghosts"] = false
return
Expand All @@ -2468,7 +2468,7 @@ end

function CheckCheevoNoWormhole()
CHEEVOS["nowormhole"] = true
for _, val in pairs(Wormhole_station.insults) do
for idx, val in pairs(Wormhole_station.insults) do
if val ~= true then
CHEEVOS["nowormhole"] = false
return
Expand All @@ -2490,7 +2490,7 @@ end

function CheckCheevoGrandSlam()
CHEEVOS["grandslam"] = true
for _, val in pairs(CHEEVOS) do
for idx, val in pairs(CHEEVOS) do
if val ~= true then
CHEEVOS["grandslam"] = false
return
Expand Down
4 changes: 2 additions & 2 deletions scripts/scenario_39_locusts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ function constructEnvironment()
local spaced_station = true
local closest_station_distance = 999999
local closest_station = nil
for _, station in ipairs(station_list) do
for idx, station in ipairs(station_list) do
local current_distance = distance(station, ox, oy)
if current_distance < closest_station_distance then
closest_station_distance = current_distance
Expand Down Expand Up @@ -898,7 +898,7 @@ function updatePlayerSoftTemplate(p)
local system_types = {"reactor","beamweapons","missilesystem","maneuver","impulse","warp","jumpdrive","frontshield","rearshield"}
p.normal_coolant_rate = {}
p.normal_power_rate = {}
for _, system in ipairs(system_types) do
for idx, system in ipairs(system_types) do
p.normal_coolant_rate[system] = p:getSystemCoolantRate(system)
p.normal_power_rate[system] = p:getSystemPowerRate(system)
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/scenario_47_scavenger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ function getTemplatePool(max_strength)
end)
local template_pool = {}
if pool_selectivity == "less/heavy" then
for _, current_ship_template in ipairs(ship_template_by_strength) do
for idx, current_ship_template in ipairs(ship_template_by_strength) do
if ship_template[current_ship_template].strength <= max_strength then
table.insert(template_pool,current_ship_template)
end
Expand Down
12 changes: 6 additions & 6 deletions scripts/scenario_53_escape.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ function handleDockedState()
missilePresence = 0
stationStatusReport()
local missile_types = {'Homing', 'Nuke', 'Mine', 'EMP', 'HVLI'}
for _, missile_type in ipairs(missile_types) do
for idx, missile_type in ipairs(missile_types) do
missilePresence = missilePresence + player:getWeaponStorageMax(missile_type)
end
if missilePresence > 0 then
Expand Down Expand Up @@ -3270,7 +3270,7 @@ function cumulativeHarassment(delta)
local cpx, cpy = playerRepulse:getPosition()
local dpx, dpy = vectorFromAngle(random(0,360),playerRepulse:getLongRangeRadarRange()+500)
local fleet = spawnEnemies(cpx+dpx,cpy+dpy,total_health,"Exuari")
for _, enemy in ipairs(fleet) do
for idx, enemy in ipairs(fleet) do
enemy:orderAttack(playerRepulse)
end
harassment_timer = delta + 200 - (difficulty*20)
Expand Down Expand Up @@ -3493,7 +3493,7 @@ function kraylorPatrol(delta)
end
end
kraylorPatrolCount = 0
for _, kgi in ipairs(kgr) do
for idx, kgi in ipairs(kgr) do
if kgi then
kraylorPatrolCount = kraylorPatrolCount + 1
end
Expand Down Expand Up @@ -3522,7 +3522,7 @@ function kraylorPatrol(delta)
patrolGroup = spawnEnemies(tx+dx,ty+dy,random(.8,2.2),"Kraylor")
end
kGroup = kGroup + 1
for _, enemy in ipairs(patrolGroup) do
for idx, enemy in ipairs(patrolGroup) do
enemy:orderFlyTowards(tx, ty)
enemy.target = target
enemy.groupID = kGroup
Expand Down Expand Up @@ -3644,7 +3644,7 @@ function kraylorTransportPlot(delta)
if invalidKraylorTransportCount > 0 then
kraylorTransportCount = 0
tempTransportList = {}
for _, kobj in ipairs(kraylorTransportList) do
for idx, kobj in ipairs(kraylorTransportList) do
if kobj ~= nil and kobj:isValid() then
table.insert(tempTransportList,kobj)
kraylorTransportCount = kraylorTransportCount + 1
Expand Down Expand Up @@ -3718,7 +3718,7 @@ function independentTransportPlot(delta)
if invalidIndependentTransportCount > 0 then
independentTransportCount = 0
tempTransportList = {}
for _, obj in ipairs(independentTransportList) do
for idx, obj in ipairs(independentTransportList) do
if obj ~= nil and obj:isValid() then
table.insert(independentTransportList,obj)
independentTransportCount = independentTransportCount + 1
Expand Down
8 changes: 4 additions & 4 deletions scripts/scenario_62_whatTheDickens.lua
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function fezFleet(delta)
end
function destroyFezFleet(delta)
fezFleetCount = 0
for _, enemy in ipairs(fezList) do
for idx, enemy in ipairs(fezList) do
if enemy:isValid() then
fezFleetCount = fezFleetCount + 1
end
Expand Down Expand Up @@ -890,7 +890,7 @@ function destroyBelleFleet(delta)
victory("Exuari")
end
belleFleetCount = 0
for _, enemy in ipairs(belleList) do
for idx, enemy in ipairs(belleList) do
if enemy:isValid() then
belleFleetCount = belleFleetCount + 1
end
Expand Down Expand Up @@ -954,7 +954,7 @@ function arriveNearBedlam(delta)
end
function destroyCratchitFleet(delta)
cratchitFleetCount = 0
for _, enemy in ipairs(cratchitList) do
for idx, enemy in ipairs(cratchitList) do
if enemy:isValid() then
cratchitFleetCount = cratchitFleetCount + 1
end
Expand Down Expand Up @@ -1081,7 +1081,7 @@ function returnTim(delta)
end
end
function endChristmasPast(delta)
for _, enemy in ipairs(turkeyList) do
for idx, enemy in ipairs(turkeyList) do
enemy:destroy()
end
friendTurkeySurprise:destroy()
Expand Down

0 comments on commit e9716d2

Please sign in to comment.