1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-28 21:08:22 +02:00

Reduce Locale file (#83)

* Update Chinese locale to fix crash and a few missing translations

* Update Chinese locale more like vanilla

* update zh-CN locale to 2.2.0

* update locale to 40+ lines

* fix

* fix2

* fix chunk-scanner-squad-movement-rampant

* ♻️
This commit is contained in:
plex 2022-04-10 00:26:19 +08:00 committed by GitHub
parent aadb6dfed9
commit 855a8a3259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 131 additions and 37510 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -738,6 +738,8 @@ function swarmUtils.buildUnits(template)
for i=1,variations do
local unit = deepcopy(template)
unit.name = unit.name .. "-v" .. i .. "-t" .. tier
unit.v = i
unit.t = tier
-- unit.nameSuffix = "-v" .. i .. "-t" .. tier
unit.effectiveLevel = effectiveLevel
unit.variation = i
@ -812,6 +814,8 @@ function swarmUtils.buildEntitySpawner(template)
for i=1,variations do
local unitSpawner = deepcopy(template)
unitSpawner.name = unitSpawner.name .. "-v" .. i .. "-t" .. tier
unitSpawner.v = i
unitSpawner.t = tier
unitSpawner.effectiveLevel = effectiveLevel
unitSpawner.variation = i
generateApperance(unitSpawner, true)
@ -837,6 +841,8 @@ function swarmUtils.buildUnitSpawner(template)
for i=1,variations do
local unitSpawner = deepcopy(template)
unitSpawner.name = unitSpawner.name .. "-v" .. i .. "-t" .. tier
unitSpawner.v = i
unitSpawner.t = tier
unitSpawner.effectiveLevel = effectiveLevel
unitSpawner.variation = i
local unitTable = unitSetToProbabilityTable(template.unitSet)
@ -863,6 +869,8 @@ function swarmUtils.buildWorm(template)
for i=1,variations do
local worm = deepcopy(template)
worm.name = worm.name .. "-v" .. i .. "-t" .. tier
worm.v = i
worm.t = tier
worm.effectiveLevel = effectiveLevel
worm.variation = i
generateApperance(worm)
@ -1197,6 +1205,8 @@ local function buildUnitTemplate(faction, unit)
local template = deepcopy(unit)
template.name = faction.type .. "-" .. unit.name
template.unit_name = unit.name
template.isRampant = true
template.tint = faction.tint
template.tint2 = faction.tint2
@ -1232,6 +1242,8 @@ local function buildTurretTemplate(faction, turret)
local template = deepcopy(turret)
template.name = faction.type .. "-" .. turret.name
template.unit_name = turret.name
template.isRampant = true
template.tint = faction.tint
template.tint2 = faction.tint2
@ -1269,6 +1281,8 @@ local function buildUnitSpawnerTemplate(faction, incomingTemplate, unitSets)
local template = deepcopy(incomingTemplate)
template.name = faction.type .. "-" .. template.name
template.unit_name = incomingTemplate.name
template.isRampant = true
template.tint = faction.tint
template.tint2 = faction.tint2
@ -1326,6 +1340,8 @@ local function buildHiveTemplate(faction, incomingTemplate)
local template = deepcopy(incomingTemplate)
template.name = faction.type .. "-" .. template.name
template.unit_name = incomingTemplate.name
template.isRampant = true
template.tint = faction.tint
template.tint2 = faction.tint2

View File

@ -232,6 +232,18 @@ local function makeWormCorpse(attributes)
return name
end
function biterFunctions.get_localised_name(attributes)
if attributes.isRampant then
return {"",
{"rampant."..attributes.faction},
{"rampant."..attributes.unit_name},
{"rampant.t"..attributes.t},
" V" ..attributes.v}
end
return {attributes.name .. "-rampant"}
end
function biterFunctions.makeBiter(attributes)
local resistances = {}
for k,v in pairs(attributes.resistances) do
@ -242,6 +254,7 @@ function biterFunctions.makeBiter(attributes)
local entity = {
type = "unit",
name = attributes.name .. "-rampant",
localised_name = biterFunctions.get_localised_name(attributes),
icon = "__base__/graphics/icons/small-biter.png",
icon_size = 64,
icon_mipmaps = 4,
@ -300,6 +313,7 @@ function biterFunctions.makeSpitter(attributes)
local entity = {
type = "unit",
name = attributes.name .. "-rampant",
localised_name = biterFunctions.get_localised_name(attributes),
icon = "__base__/graphics/icons/small-spitter.png",
icon_size = 64,
icon_mipmaps = 4,
@ -353,6 +367,7 @@ function biterFunctions.makeUnitSpawner(attributes)
local o = {
type = "unit-spawner",
name = attributes.name .. "-rampant",
localised_name = biterFunctions.get_localised_name(attributes),
icon = "__base__/graphics/icons/biter-spawner.png",
icon_size = 64,
icon_mipmaps = 4,
@ -498,6 +513,7 @@ function biterFunctions.makeWorm(attributes)
local o = {
type = "turret",
name = attributes.name .. "-rampant",
localised_name = biterFunctions.get_localised_name(attributes),
icon = "__base__/graphics/icons/medium-worm.png",
icon_size = 64, icon_mipmaps = 4,
flags = attributes.flags or {"placeable-player", "placeable-enemy", "not-repairable", "not-repairable", "breaths-air"},