This commit is contained in:
Anuken
2026-08-31 22:14:02 -04:00
parent b4cd02137d
commit e69d827f72
8 changed files with 1162 additions and 184 deletions
+464
View File
@@ -1098,6 +1098,8 @@ status.slow.name = Slow
status.fast.name = Fast
status.shielded.name = Shielded
status.disarmed.name = Disarmed
status.invincible.name = Invincible
status.dynamic.name = Dynamic
settings.language = Language
settings.data = Game Data
@@ -3105,3 +3107,465 @@ lenum.dragmultiplier = Environment drag multiplier.
lenum.ban = Blocks or units that cannot be placed or built.
lenum.unban = Unban a unit or block.
lenum.musicvolume = Global music volume multiplier.\nClamped to [0, 1].
# Implemented via the localizedName() method
instruction.read = Read
instruction.write = Write
instruction.draw = Draw
instruction.print = Print
instruction.printchar = Print Char
instruction.format = Format
instruction.drawflush = Draw Flush
instruction.printflush = Print Flush
instruction.getlink = Get link
instruction.control = Control
instruction.radar = Radar
instruction.sensor = Sensor
instruction.set = Set
instruction.operation = Operation
instruction.select = Select
instruction.wait = Wait
instruction.stop = Stop
instruction.lookup = Lookup
instruction.jump = Jump
instruction.end = End
instruction.unitbind = Unit Bind
instruction.unitcontrol = Unit Control
instruction.unitradar = Unit Radar
instruction.unitlocate = Unit Locate
instruction.query = Query
instruction.getblock = Get Block
instruction.setblock = Set Block
instruction.spawnunit = Spawn Unit
instruction.spawnbullet = Spawn Bullet
instruction.applystatus = Apply Status
instruction.weathersense = Weather Sense
instruction.weatherset = Weather Set
instruction.spawnwave = Spawn Wave
instruction.setrule = Set Rule
instruction.flushmessage = Flush Message
instruction.cutscene = Cutscene
instruction.effect = Effect
instruction.explosion = Explosion
instruction.setrate = Set Rate
instruction.fetch = Fetch
instruction.sync = Sync
instruction.clientdata = Client Data
instruction.getflag = Get Flag
instruction.setflag = Set Flag
instruction.setprop = Set Prop
instruction.playsound = Play Sound
instruction.playmusic = Play Music
instruction.setmarker = Set Marker
instruction.makemarker = Make Marker
instruction.localeprint = Locale Print
instruction.packcolor = Pack Color
instruction.unpackcolor = Unpack Color
instruction.invalid = Invalid
# Implemented via the enumText() method
blockflag.label.core = core
blockflag.label.storage = storage
blockflag.label.generator = generator
blockflag.label.turret = turret
blockflag.label.factory = factory
blockflag.label.repair = repair
blockflag.label.battery = battery
blockflag.label.reactor = reactor
blockflag.label.drill = drill
blockflag.label.shield = shield
contenttype.label.block = block
contenttype.label.unit = unit
contenttype.label.item = item
contenttype.label.liquid = liquid
contenttype.label.team = team
cutsceneaction.label.active =
cutsceneaction.label.pan = pan
cutsceneaction.label.zoom = zoom
cutsceneaction.label.stop = stop
cutsceneaction.label.shake = shake
cutsceneaction.label.gethud = get Hud
cutsceneaction.label.sethud = set Hud
fetchtype.label.unit = unit
fetchtype.label.player = player
fetchtype.label.core = core
fetchtype.label.build = build
fetchtype.label.unitcount = unit count
fetchtype.label.playercount = player count
fetchtype.label.corecount = core count
fetchtype.label.buildcount = build count
graphicstype.label.clear = clear
graphicstype.label.color = color
graphicstype.label.col = col
graphicstype.label.stroke = stroke
graphicstype.label.line = line
graphicstype.label.rect = rect
graphicstype.label.linerect = line rect
graphicstype.label.poly = poly
graphicstype.label.linepoly = line poly
graphicstype.label.triangle = triangle
graphicstype.label.image = image
graphicstype.label.print = print
graphicstype.label.translate = translate
graphicstype.label.scale = scale
graphicstype.label.rotate = rotate
graphicstype.label.reset = reset
laccess.label.totalitems = total items
laccess.label.firstitem = first item
laccess.label.totalliquids = total liquids
laccess.label.totalpower = total power
laccess.label.itemcapacity = item capacity
laccess.label.liquidcapacity = liquid capacity
laccess.label.powercapacity = power capacity
laccess.label.powernetstored = powernet stored
laccess.label.powernetcapacity = powernet capacity
laccess.label.powernetin = powernet in
laccess.label.powernetout = powernet out
laccess.label.ammo = ammo
laccess.label.ammocapacity = ammo capacity
laccess.label.currentammotype = current ammo type
laccess.label.memorycapacity = memory capacity
laccess.label.health = health
laccess.label.maxhealth = max health
laccess.label.heat = heat
laccess.label.shield = shield
laccess.label.armor = armor
laccess.label.efficiency = efficiency
laccess.label.progress = progress
laccess.label.timescale = timescale
laccess.label.rotation = rotation
laccess.label.x = x
laccess.label.y = y
laccess.label.velocityx = x velocity
laccess.label.velocityy = y velocity
laccess.label.shootx = shoot x
laccess.label.shooty = shoot y
laccess.label.camerax = camera x
laccess.label.cameray = camera y
laccess.label.camerawidth = camera width
laccess.label.cameraheight = camera height
laccess.label.displaywidth = display width
laccess.label.displayheight = display height
laccess.label.buffersize = buffer size
laccess.label.operations = operations
laccess.label.size = size
laccess.label.solid = solid
laccess.label.dead = dead
laccess.label.range = range
laccess.label.shooting = shooting
laccess.label.boosting = boosting
laccess.label.minex = mining x
laccess.label.miney = mining y
laccess.label.mining = mining
laccess.label.buildx = build x
laccess.label.buildy = build y
laccess.label.pingx = ping x
laccess.label.pingy = ping y
laccess.label.pingtext = ping text
laccess.label.building = building
laccess.label.breaking = breaking
laccess.label.speed = speed
laccess.label.team = team
laccess.label.type = type
laccess.label.flag = flag
laccess.label.flying = flying
laccess.label.controlled = controlled
laccess.label.controller = controller
laccess.label.name = name
laccess.label.payloadcount = payload count
laccess.label.payloadtype = payload type
laccess.label.totalpayload = total payload
laccess.label.payloadcapacity = payload capacity
laccess.label.maxunits = max units
laccess.label.id = id
laccess.label.selectedblock = selected block
laccess.label.selectedrotation = selected rotation
laccess.label.bulletlifetime = bullet lifetime
laccess.label.bullettime = bullet time
laccess.label.enabled = enabled
laccess.label.shoot = shoot
laccess.label.shootp = shoot predict
laccess.label.config = config
laccess.label.color = color
llocate.label.ore = ore
llocate.label.spawn = spawn
llocate.label.building = building
llocate.label.damaged = damaged
lmarkercontrol.label.remove = remove
lmarkercontrol.label.world = world
lmarkercontrol.label.minimap = minimap
lmarkercontrol.label.light = light
lmarkercontrol.label.autoscale = autoscale
lmarkercontrol.label.pos = pos
lmarkercontrol.label.endpos = end pos
lmarkercontrol.label.drawlayer = draw layer
lmarkercontrol.label.color = color
lmarkercontrol.label.radius = radius
lmarkercontrol.label.stroke = stroke
lmarkercontrol.label.outline = outline
lmarkercontrol.label.rotation = rotation
lmarkercontrol.label.shape = shape
lmarkercontrol.label.arc = arc
lmarkercontrol.label.flushtext = flush text
lmarkercontrol.label.fontsize = font size
lmarkercontrol.label.textheight = text height
lmarkercontrol.label.textalign = text align
lmarkercontrol.label.linealign = line align
lmarkercontrol.label.labelflags = label flags
lmarkercontrol.label.texture = texture
lmarkercontrol.label.texturesize = texture size
lmarkercontrol.label.posi = posi
lmarkercontrol.label.uvi = uvi
lmarkercontrol.label.colori = colori
logicrule.label.currentwavetime = current wave time
logicrule.label.wavetimer = wave timer?
logicrule.label.waves = waves
logicrule.label.wave = wave
logicrule.label.wavespacing = wave spacing
logicrule.label.wavesending = waves ending?
logicrule.label.attackmode = attack mode?
logicrule.label.enemycorebuildradius = enemy core build radius
logicrule.label.dropzoneradius = drop zone radius
logicrule.label.unitcap = unit cap
logicrule.label.maparea = map area
logicrule.label.lighting = lighting?
logicrule.label.cangameover = can game over
logicrule.label.ambientlight = ambient light
logicrule.label.unitlight = unit light
logicrule.label.solarmultiplier = solar multiplier
logicrule.label.dragmultiplier = drag multiplier
logicrule.label.ban = ban
logicrule.label.unban = unban
logicrule.label.pausedisabled = pause disabled
logicrule.label.musicvolume = music volume
logicrule.label.buildspeed = build speed
logicrule.label.unithealth = unit health
logicrule.label.unitbuildspeed = unit build speed
logicrule.label.unitminespeed = unit mine speed
logicrule.label.unitcost = unit cost
logicrule.label.unitdamage = unit damage
logicrule.label.blockhealth = block health
logicrule.label.blockdamage = block damage
logicrule.label.rtsminweight = rts min weight
logicrule.label.rtsminsquad = rts min squad
lunitcontrol.label.idle = idle
lunitcontrol.label.stop = stop
lunitcontrol.label.unbind = unbind
lunitcontrol.label.move = move
lunitcontrol.label.approach = approach
lunitcontrol.label.pathfind = pathfind
lunitcontrol.label.autopathfind = auto pathfind
lunitcontrol.label.target = target
lunitcontrol.label.targetp = target predict
lunitcontrol.label.itemdrop = item drop
lunitcontrol.label.itemtake = item take
lunitcontrol.label.paydrop = payload drop
lunitcontrol.label.paytake = payload take
lunitcontrol.label.payenter = payload enter
lunitcontrol.label.flag = flag
lunitcontrol.label.mine = mine
lunitcontrol.label.build = build block
lunitcontrol.label.getblock = get block
lunitcontrol.label.deconstruct = deconstruct
lunitcontrol.label.within = within?
lunitcontrol.label.boost = boost?
messagetype.label.notify = notify
messagetype.label.announce = announce
messagetype.label.toast = toast
messagetype.label.mission = mission
querytype.label.unit = unit
querytype.label.building = building
radarsort.label.distance = distance
radarsort.label.health = health
radarsort.label.maxhealth = max health
radarsort.label.shield = shield
radarsort.label.armor = armor
radartarget.label.any = any
radartarget.label.enemy = enemy
radartarget.label.ally = ally
radartarget.label.player = player
radartarget.label.attacker = attacker
radartarget.label.flying = flying
radartarget.label.ground = ground
tilelayer.label.floor = floor
tilelayer.label.ore = ore
tilelayer.label.block = block
tilelayer.label.building = building
name.token.Jump = jump
name.token.color = color
name.token.width = width
name.token.height = height
name.token.sides = sides
name.token.radius = radius
name.token.rotation = rotation
name.token.degrees = degrees
name.token.image = image
name.token.size = size
name.token.align = align
name.token.set = set
name.token.of = of
name.token.to = to
name.token.at = at
name.token.in = in
name.token.damage = damage
name.token.velocityScl = velocity scale
name.token.lifeScl = life scale
name.token.aimX = aim X
name.token.aimY = aim Y
name.token.read = read
name.token.write = write
name.token.from = from
name.token.char = char
name.token.linknum = link\#
name.token.draw = draw
name.token.clear = clear
name.token.apply = apply
name.token.circle = circle
name.token.rect = rect
name.token.positional = positional
name.token.global = global
name.token.target = target
name.token.and = and
name.token.or = or
name.token.b-and = b-and
name.token.xor = xor
name.token.flip = flip
name.token.order = order
name.token.sort = sort
name.token.output = output
name.token.if = if
name.token.then = then
name.token.else = else
name.token.sec = sec
name.token.find = find
name.token.group = group
name.token.enemy = enemy?
name.token.ore = ore
name.token.outX = out X
name.token.outY = out Y
name.token.owner = owner
name.token.found = found?
name.token.building = building
name.token.always = always
name.token.not = not
name.token.pack = pack
name.token.unpack = unpack
name.token.-lookup = = lookup
name.token.type = type
name.token.get = get
name.token.team = team
name.token.rot = rot
name.token.spawn = spawn
name.token.-bullet = = bullet
name.token.unit = unit
name.token.weather = weather
name.token.state = state
name.token.natural = natural
name.token.speed = speed
name.token.level = level
name.token.duration = duration
name.token.shown = shown
name.token.data = data
name.token.effect = effect
name.token.pierce = pierce
name.token.ground = ground
name.token.air = air
name.token.flag = flag
name.token.volume = volume
name.token.pitch = pitch
name.token.pan = pan
name.token.limit = limit
name.token.of-id- = of id\#
name.token.replace = replace?
name.token.for = for
name.token.success = success
name.token.truefalse = true/false
name.token.layer = layer
name.token.stroke = stroke
name.token.outline = outline
name.token.fill = fill?
name.token.start = start
name.token.end = end
name.token.fetch = fetch?
name.token.background = background
name.token.printFlush = printflush
name.token.name = name
name.token.index = index
name.token.block-unit = block/unit
name.token.enable = enable
name.token.amount = amount
name.token.item = item
name.token.takeUnits = take units
name.token.value = value
name.token.floor = floor
name.token.result = result
name.token.config = config
name.token.shapeText = shape text
name.token.point = point
name.token.shape = shape
name.token.text = text
name.token.line = line
name.token.texture = texture
name.token.quad = quad
name.token.light = light
name.token.snowing = snowing
name.token.rain = rain
name.token.sandstorm = sand storm
name.token.sporestorm = spore storm
name.token.fog = fog
name.token.suspend-particles = suspended particles
name.token.topLeft = top left
name.token.top = top
name.token.topRight = top right
name.token.left = left
name.token.center = center
name.token.right = right
name.token.bottomLeft = bottom left
name.token.bottom = bottom
name.token.bottomRight = bottom right
name.token.none = none
name.token.warn = warn
name.token.cross = cross
name.token.blockfall = block
name.token.placeBlock = place block
name.token.placeBlockSpark = place block spark
name.token.breakBlock = break block
name.token.-spawn = = spawn
name.token.trail = trail
name.token.breakProp = break prop
name.token.smokeCloud = smoke cloud
name.token.vapor = vapor
name.token.hit = hit
name.token.hitSquare = hit square
name.token.shootSmall = shoot small
name.token.shootBig = shoot big
name.token.smokeSmall = smoke small
name.token.smokeBig = smoke big
name.token.smokeColor = smoke color
name.token.smokeSquare = smoke square
name.token.smokeSquareBig = smoke square big
name.token.spark = spark
name.token.sparkBig = spark big
name.token.sparkShoot = spark shoot
name.token.sparkShootBig = spark shoot big
name.token.drill = drill
name.token.drillBig = drill big
name.token.lightBlock = light block
name.token.explosion = explosion
name.token.smokePuff = smoke puff
name.token.sparkExplosion = spark explosion
name.token.crossExplosion = cross explosion
name.token.wave = wave
name.token.bubble = bubble
name.token.music = music
name.token.interrupt = interrupt
name.token.all = All
name.token.beams = Beams
name.token.block = Block
name.token.charge = Charge
name.token.environment = Environment
name.token.explosions = Explosions
name.token.loops = Loops
name.token.movement = Movement
name.token.shoot = Shoot
name.token.ui = UI
+487 -20
View File
@@ -833,7 +833,7 @@ objective.destroyblock.name = 摧毁建筑
objective.destroyblocks.name = 摧毁建筑
objective.destroycore.name = 摧毁核心
objective.commandmode.name = 指挥模式
objective.flag.name = 标签
objective.flag.name = flag
marker.shapetext.name = 带形状文本
marker.point.name = 点
@@ -1093,6 +1093,8 @@ status.slow.name = 缓慢
status.fast.name = 迅捷
status.shielded.name = 保护
status.disarmed.name = 缴械
status.invincible.name = 无敌
status.dynamic.name = dynamic
settings.language = 语言
settings.data = 数据
@@ -2808,12 +2810,12 @@ unit.emanate.description = 保护卫城核心,可建造建筑。使用一对
lst.read = 从连接的内存读取数字。
lst.write = 向连接的内存写入数字。
lst.print = 添加文字到打印缓存\n使用 [accent]Print Flush[] 后才会真正显示。
lst.printchar = 向打印缓存添加一个 UTF-16 字符或内容图标。\n直到使用 [accent]Print Flush[] 后才会真正显示。
lst.print = 添加文字到打印缓存\n使用[accent]打印文本[]后才会真正显示。
lst.printchar = 向打印缓存添加一个 UTF-16 字符或内容图标。\n直到使用[accent]打印文本[]后才会真正显示。
lst.format = 用一个值替换文本缓冲区中的下一个占位符。\n如果占位符模式无效,则不会执行任何操作。\n占位模式:"{[accent]number 0-9[]}"\n示例:\n[accent]print "test {0}"\n格式 “示例”。
lst.draw = 添加绘图操作到绘图缓存\n使用 [accent]Draw Flush[] 后才会真正显示。
lst.drawflush = 将绘图缓存中的 [accent]Draw[] 队列刷新到显示屏。
lst.printflush = 将打印缓存中的 [accent]Print[] 队列刷新到信息板。
lst.draw = 添加绘图操作到绘图缓存\n使用[accent]打印绘图[]后才会真正显示。
lst.drawflush = 将绘图缓存中的[accent]绘图[]队列刷新到显示屏。
lst.printflush = 将打印缓存中的[accent]打印[]队列刷新到信息板。
lst.getlink = 获取与处理器连接的建筑\n建筑编号从 0 开始。
lst.control = 控制建筑。
lst.radar = 让建筑搜寻感知范围内的单位。
@@ -2842,22 +2844,21 @@ lst.explosion = 在某个位置生成爆炸。
lst.setrate = 在指令/时间刻的时间下设置处理器处理速度。
lst.fetch = 按索引查找单位、核心、玩家或建筑物\n索引从 0 开始,以其返回的计数结束。
lst.packcolor = 将 RGBA 各分量(0-1 范围)打包为单个整数,用于绘图或逻辑规则。
lst.unpackcolor = 从使用[accent]Pack Color[]打包的颜色值中解压 RGBA 组件。
lst.unpackcolor = 从使用[accent]打包颜色[]打包的颜色值中解压 RGBA 组件。
lst.setrule = 设置地图规则。
lst.flushmessage = 在屏幕中央投影文字缓存区的内容\n会等待上一个文字显示结束。
lst.cutscene = 控制玩家游戏视角。
lst.setflag = 设置一个可以被所有处理器读取的全局 flag。
lst.getflag = 检查是否设置了全局 flag。
lst.setflag = 设置一个可以被所有处理器读取的全局flag。
lst.getflag = 检查是否设置了全局flag。
lst.setprop = 设置单位或建筑物的属性。
lst.effect = 创建一个粒子效果。
lst.sync = 在网络中同步一个变量。\n每个变量每秒最多同步 20 次。
lst.playsound = 播放声音。\n音量和声场位置可以是全局值,也可以根据位置计算得出。
lst.playmusic = 按名称播放音乐,如[accent]"game1"[].\n如果[accent]interrupt[]设置为 true ,先前播放的音乐将会中止\n播放 null 并把 interrupt 设置为 true 可以停止音乐。\n注意,数据补丁中的音乐需加上[accent]dp-[]前缀。
lst.makemarker = 在世界中创建一个新的逻辑标记。\n必须提供一个用于标识该标记的 ID。\n目前每个世界限制最多 20000 个标记。
lst.setmarker = 为标记设置属性。\n使用的 ID 必须与制作标记指令中的相同。
lst.playmusic = 按名称播放音乐曲目,例如 [accent]"game1"[].\n如果[accent]中断[]为真,则会停止先前播放的音乐。\n如果使用[accent]null[]音乐且[accent]中断[]设置为真,则会停止当前曲目。\n请注意,来自数据补丁的音乐必须以 [accent]dp-[] 为前缀。
lst.makemarker = 在世界中创建一个新的逻辑flag。\n必须提供一个用于标识该flag的 ID。\n目前每个世界限制最多 20000 个flag。
lst.setmarker = 为flag设置属性。\n使用的 ID 必须与制作flag指令中的相同。
lst.localeprint = 将地图本地化文本属性值添加到文本缓冲区中。\n要在地图编辑器中设置地图本地化包,请检查 [accent]地图信息 > 本地化包[]。\n如果客户端是移动设备,则尝试首先打印以 “.mobile” 结尾的属性。
lst.query = 在特定区域查询单位或建筑。\n结果输出在[accent]@queries[]中\n可以在[accent]Read[]指令中使用编号从[accent]@queries[]中读取结果\n[accent]@queries[]的长度可以用[accent]@size[]作为参数获得。
lst.query = 在特定区域查询单位或建筑。\n结果输出在[accent]@queries[]中\n可以在[accent]读取[]指令中使用编号从[accent]@queries[]中读取结果\n[accent]@queries[]的长度可以用[accent]@size[]作为参数获得。
lglobal.false = 0
lglobal.true = 1
lglobal.null = null
@@ -2918,11 +2919,11 @@ laccess.controlled = 若单位的控制方是处理器,返回 [accent]@ctrlPro
laccess.progress = 进度,0 到 1 之间的数值。\n返回工厂生产、炮塔装填,或者建筑建造的进度
laccess.speed = 单位的最高速度(格/秒)
laccess.size = 单位/建筑的大小或字符串的长度
laccess.id = 单位/块/物品/液体的 ID。\n这是 Lookup 的反向操作。
laccess.id = 单位/块/物品/液体的 ID。\n这是[accent]查询[]的反向操作。
laccess.displaywidth = 显示屏的宽度(以像素为单位)。
laccess.displayheight = 显示屏的高度(以像素为单位)。
laccess.buffersize = 显示器图形缓冲区中未处理的命令数。
laccess.operations = 方块执行操作的次数。\n对于显示屏,返回 drawflush 调用次数。
laccess.operations = 方块执行操作的次数。\n对于显示屏,返回[accent]打印绘图[]调用次数。
laccess.maxunits = 队伍能拥有的最大单位数。\n只能从核心中读取。
lcategory.unknown = 未知
@@ -3058,15 +3059,15 @@ lenum.itemtake = 从建筑中取出某种物品
lenum.paydrop = 卸下当前载荷
lenum.paytake = 从当前位置拾取载荷
lenum.payenter = 进入/降落到单位下方的荷载方块中
lenum.flag = 赋予单位数字形式的标记
lenum.flag = 赋予单位数字形式的flag
lenum.mine = 从某个位置采集矿物
lenum.build = 建造建筑
lenum.getblock = 根据坐标获取建筑物、环境块和环境墙体类型。\n坐标必须在单位的雷达范围内,否则返回空值。
lenum.within = 检查单位是否接近了某个位置
lenum.boost = 开始/停止助推
lenum.flushtext = 如果适用,将打印缓冲区的内容刷新到flag。\n如果[accent]获取对象[]设置为 true,则尝试从地图本地化包或游戏的包中获取属性。
lenum.flushtext = 如果适用,将打印缓冲区的内容刷新到标记。\n如果[accent]Fetch[]设置为 true,则尝试从地图本地化包或游戏的包中获取属性。
lenum.texture = 直接来自游戏纹理图集的纹理名称(使用 kebab-case 命名风格)。\n如果[accent]Print Flush[]设置为 true,则将文本缓冲区内容作为文本参数消耗。
lenum.texture = 直接来自游戏纹理图集的纹理名称(使用 kebab-case 命名风格)。\n如果[accent]打印文字[]设置为 true,则将文本缓冲区内容作为文本参数消耗。
lenum.texturesize = 纹理的大小(格)。零值将标记宽度缩放为原始纹理的大小。
lenum.autoscale = 标记是否根据玩家屏幕的缩放级别缩放
lenum.posi = 索引位置,用于线和四边形标记,索引零表示第一个位置。
@@ -3094,9 +3095,475 @@ lenum.blockdamage = 建筑伤害倍率
lenum.rtsminweight = 部队发动攻击所需的最小“优势”。数值越高,越谨慎。
lenum.rtsminsquad = 攻击小队的最小规模
lenum.maparea = 设置地图大小和有效范围
lenum.ambientlight = 环境光颜色,可搭配[accent]Pack Color[]使用
lenum.ambientlight = 环境光颜色,可搭配[accent]打包颜色[]使用
lenum.solarmultiplier = 太阳能电池板的发电倍率
lenum.dragmultiplier = 环境阻力乘数
lenum.ban = 禁用指定内容
lenum.unban = 解禁指定内容
lenum.musicvolume = 全局音乐音量倍率。\n取值范围限制在[0,1]。
# Implemented via the localizedName() method
instruction.read = 读取
instruction.write = 写入
instruction.draw = 绘图
instruction.print = 打印
instruction.printchar = 打印字符
instruction.format = 格式化
instruction.drawflush = 打印绘图
instruction.printflush = 打印文本
instruction.getlink = 获取连接
instruction.control = 控制建筑
instruction.radar = 建筑雷达
instruction.sensor = 获取数据
instruction.set = 赋值
instruction.operation = 运算
instruction.select = 判断
instruction.wait = 等待
instruction.stop = 停止
instruction.lookup = 查询
instruction.jump = 跳转
instruction.end = 结尾
instruction.unitbind = 绑定单位
instruction.unitcontrol = 控制单位
instruction.unitradar = 单位雷达
instruction.unitlocate = 单位搜寻
instruction.query = 范围查询
instruction.getblock = 获取地块
instruction.setblock = 设置地块
instruction.spawnunit = 生成单位
instruction.spawnbullet = 生成子弹
instruction.applystatus = 施加状态
instruction.weathersense = 检查天气
instruction.weatherset = 设置天气
instruction.spawnwave = 生成波次
instruction.setrule = 设置规则
instruction.flushmessage = 显示消息
instruction.cutscene = 镜头控制
instruction.effect = 粒子效果
instruction.explosion = 爆炸效果
instruction.setrate = 设置速率
instruction.fetch = 获取对象
instruction.sync = 网络同步
instruction.clientdata = 客户端数据
instruction.getflag = 获取flag
instruction.setflag = 设置flag
instruction.setprop = 设置属性
instruction.playsound = 播放音效
instruction.playmusic = 播放音乐
instruction.setmarker = 设置marker
instruction.makemarker = 创建marker
instruction.localeprint = 本地化输出
instruction.packcolor = 打包颜色
instruction.unpackcolor = 解包颜色
instruction.invalid = 无效
# Implemented via the enumText() method
blockflag.label.core = 核心
blockflag.label.storage = 存储
blockflag.label.generator = 发电
blockflag.label.turret = 炮塔
blockflag.label.factory = 工厂
blockflag.label.repair = 维修点
blockflag.label.battery = 电池
blockflag.label.reactor = 反应堆
blockflag.label.drill = 钻头
blockflag.label.shield = 护盾
contenttype.label.block = 方块
contenttype.label.unit = 单位
contenttype.label.item = 物品
contenttype.label.liquid = 液体
contenttype.label.team = 队伍
cutsceneaction.label.active = 激活
cutsceneaction.label.pan = 移动
cutsceneaction.label.zoom = 缩放
cutsceneaction.label.stop = 停止
cutsceneaction.label.shake = 抖动
cutsceneaction.label.gethud = 获取Hud
cutsceneaction.label.sethud = 设置Hud
fetchtype.label.unit = 单位
fetchtype.label.player = 玩家控制单位
fetchtype.label.core = 核心
fetchtype.label.build = 建筑
fetchtype.label.unitcount = 单位数
fetchtype.label.playercount = 玩家控制单位数
fetchtype.label.corecount = 核心数
fetchtype.label.buildcount = 建筑数
graphicstype.label.clear = 清屏
graphicstype.label.color = 颜色
graphicstype.label.col = 打包颜色
graphicstype.label.stroke = 线宽
graphicstype.label.line = 直线
graphicstype.label.rect = 矩形
graphicstype.label.linerect = 空心矩形
graphicstype.label.poly = 多边形
graphicstype.label.linepoly = 多边形轮廓
graphicstype.label.triangle = 三角形
graphicstype.label.image = 图像
graphicstype.label.print = 打印
graphicstype.label.translate = 平移坐标系
graphicstype.label.scale = 缩放坐标系
graphicstype.label.rotate = 旋转坐标系
graphicstype.label.reset = 重置
laccess.label.totalitems = 总物品数
laccess.label.firstitem = 第一个物品
laccess.label.totalliquids = 总液体量
laccess.label.totalpower = 总电量
laccess.label.itemcapacity = 物品容量
laccess.label.liquidcapacity = 液体容量
laccess.label.powercapacity = 电量容量
laccess.label.powernetstored = 电网存储电量
laccess.label.powernetcapacity = 电网容量
laccess.label.powernetin = 电网输入电量
laccess.label.powernetout = 电网输出电量
laccess.label.ammo = 弹药量
laccess.label.ammocapacity = 弹药容量
laccess.label.currentammotype = 当前弹药类型
laccess.label.memorycapacity = 内存块单元数量
laccess.label.health = 生命值
laccess.label.maxhealth = 最大生命值
laccess.label.heat = 热量
laccess.label.shield = 护盾
laccess.label.armor = 护甲
laccess.label.efficiency = 效率
laccess.label.progress = 进度
laccess.label.timescale = 超速效果倍率
laccess.label.rotation = 旋转
laccess.label.x = X坐标
laccess.label.y = Y坐标
laccess.label.velocityx = X轴移动速度
laccess.label.velocityy = Y轴移动速度
laccess.label.shootx = 射击X坐标
laccess.label.shooty = 射击Y坐标
laccess.label.camerax = 相机X坐标
laccess.label.cameray = 相机Y坐标
laccess.label.camerawidth = 相机宽度
laccess.label.cameraheight = 相机高度
laccess.label.displaywidth = 显示屏宽度
laccess.label.displayheight = 显示屏高度
laccess.label.buffersize = 缓冲区大小
laccess.label.operations = 操作次数
laccess.label.size = 大小/长度
laccess.label.solid = 实体
laccess.label.dead = 已摧毁/失效
laccess.label.range = 雷达范围
laccess.label.shooting = 射击状态
laccess.label.boosting = 助推状态
laccess.label.minex = 采矿X坐标
laccess.label.miney = 采矿Y坐标
laccess.label.mining = 采矿状态
laccess.label.buildx = 建造于X坐标
laccess.label.buildy = 建造于Y坐标
laccess.label.pingx = 标记点X坐标
laccess.label.pingy = 标记点Y坐标
laccess.label.pingtext = 标记点文本
laccess.label.building = 建造状态
laccess.label.breaking = 破坏状态
laccess.label.speed = 速度
laccess.label.team = 队伍
laccess.label.type = 类型
laccess.label.flag = flag
laccess.label.flying = 空中单位
laccess.label.controlled = 控制状态
laccess.label.controller = 控制方
laccess.label.name = 名字
laccess.label.payloadcount = 载荷数量
laccess.label.payloadtype = 第一个载荷类型
laccess.label.totalpayload = 已用载荷容量
laccess.label.payloadcapacity = 载荷容量
laccess.label.maxunits = 队伍可拥有的最大单位数
laccess.label.id = ID
laccess.label.selectedblock = 选定块
laccess.label.selectedrotation = 选定角度
laccess.label.bulletlifetime = 子弹可存在时间
laccess.label.bullettime = 子弹已存在时间
laccess.label.enabled = 启用
laccess.label.shoot = 射击
laccess.label.shootp = 预先射击
laccess.label.config = 配置
laccess.label.color = 颜色
llocate.label.ore = 矿物
llocate.label.spawn = 敌人出生点
llocate.label.building = 建筑
llocate.label.damaged = 受损建筑
lmarkercontrol.label.remove = 删除
lmarkercontrol.label.world = 显示?
lmarkercontrol.label.minimap = 迷你地图
lmarkercontrol.label.light = 光
lmarkercontrol.label.autoscale = 自动缩放
lmarkercontrol.label.pos = 起点位置
lmarkercontrol.label.endpos = 终点位置
lmarkercontrol.label.drawlayer = 绘制层
lmarkercontrol.label.color = 颜色
lmarkercontrol.label.radius = 半径
lmarkercontrol.label.stroke = 边框宽度
lmarkercontrol.label.outline = 轮廓
lmarkercontrol.label.rotation = 旋转
lmarkercontrol.label.shape = 形状
lmarkercontrol.label.arc = 弧形
lmarkercontrol.label.flushtext = 文本打印
lmarkercontrol.label.fontsize = 字体大小
lmarkercontrol.label.textheight = 文本高度
lmarkercontrol.label.textalign = 文本对齐
lmarkercontrol.label.linealign = 线对齐
lmarkercontrol.label.labelflags = flag标签
lmarkercontrol.label.texture = 纹理
lmarkercontrol.label.texturesize = 纹理大小
lmarkercontrol.label.posi = 位置
lmarkercontrol.label.uvi = 纹理位置范围
lmarkercontrol.label.colori = 颜色
logicrule.label.currentwavetime = 波次倒计时
logicrule.label.wavetimer = 有波次计时器?
logicrule.label.waves = 波次是否可以生成
logicrule.label.wave = 当前波数
logicrule.label.wavespacing = 波次间隔
logicrule.label.wavesending = 手动生成波次?
logicrule.label.attackmode = 进攻模式?
logicrule.label.enemycorebuildradius = 敌人核心禁建范围半径
logicrule.label.dropzoneradius = 敌人出生点半径
logicrule.label.unitcap = 单位上限
logicrule.label.maparea = 地图大小和有效范围
logicrule.label.lighting = 启用环境光?
logicrule.label.cangameover = 游戏可否结束
logicrule.label.ambientlight = 环境光颜色
logicrule.label.unitlight = 单位光
logicrule.label.solarmultiplier = 太阳能板效率
logicrule.label.dragmultiplier = 环境阻力乘数
logicrule.label.ban = 禁用
logicrule.label.unban = 解禁
logicrule.label.pausedisabled = 禁用暂停
logicrule.label.musicvolume = 音乐音量
logicrule.label.buildspeed = 建造速度
logicrule.label.unithealth = 单位生命
logicrule.label.unitbuildspeed = 单位建造速度
logicrule.label.unitminespeed = 单位采矿速度
logicrule.label.unitcost = 单位成本
logicrule.label.unitdamage = 单位伤害
logicrule.label.blockhealth = 建筑初始生命
logicrule.label.blockdamage = 建筑伤害
logicrule.label.rtsminweight = 部队最小权重
logicrule.label.rtsminsquad = 攻击队最小规模
lunitcontrol.label.idle = 待机
lunitcontrol.label.stop = 停止
lunitcontrol.label.unbind = 取消控制
lunitcontrol.label.move = 移动到...
lunitcontrol.label.approach = 靠近
lunitcontrol.label.pathfind = 敌式寻路到...
lunitcontrol.label.autopathfind = 自动寻路
lunitcontrol.label.target = 瞄准
lunitcontrol.label.targetp = 根据提前量瞄准
lunitcontrol.label.itemdrop = 将物品放入建筑
lunitcontrol.label.itemtake = 从建筑取出物品
lunitcontrol.label.paydrop = 卸下载荷
lunitcontrol.label.paytake = 拾取载荷
lunitcontrol.label.payenter = 进入载荷
lunitcontrol.label.flag = 赋予单位flag
lunitcontrol.label.mine = 采集矿物
lunitcontrol.label.build = 建造建筑
lunitcontrol.label.getblock = 用坐标获取类型
lunitcontrol.label.deconstruct = 解构
lunitcontrol.label.within = 接近目标?
lunitcontrol.label.boost = 助推?
messagetype.label.notify = 弹黑框显示
messagetype.label.announce = 中间显示
messagetype.label.toast = 上方显示
messagetype.label.mission = 任务栏显示
querytype.label.unit = 单位
querytype.label.building = 建筑
radarsort.label.distance = 距离
radarsort.label.health = 生命值
radarsort.label.maxhealth = 最大生命值
radarsort.label.shield = 护盾
radarsort.label.armor = 护甲
radartarget.label.any = 任意
radartarget.label.enemy = 敌方单位
radartarget.label.ally = 己方单位
radartarget.label.player = 玩家
radartarget.label.attacker = 有武器单位
radartarget.label.flying = 空中单位
radartarget.label.ground = 地面单位
tilelayer.label.floor = 地面
tilelayer.label.ore = 矿物
tilelayer.label.block = 方块
tilelayer.label.building = 建筑
# Implemented via the token() method
name.token.Jump = 跳转
name.token.color = 颜色
name.token.width = 宽
name.token.height = 高
name.token.sides = 边数
name.token.radius = 半径
name.token.rotation = 旋转
name.token.degrees = 角度
name.token.image = 图像
name.token.size = 大小
name.token.align = 对齐
name.token.set = 设置
name.token.of = 属性在
name.token.to = 至
name.token.at = 的
name.token.in = 于
name.token.damage = 伤害
name.token.velocityScl = 速度倍率
name.token.lifeScl = 持续时间倍率
name.token.aimX = 目标X坐标
name.token.aimY = 目标Y坐标
name.token.read = 读取
name.token.write = 写入
name.token.from = 来自
name.token.char = 字符
name.token.image = 图像
name.token.linknum = 连接\#
name.token.size = 大小
name.token.draw = 绘制
name.token.clear = 清除
name.token.apply = 施加
name.token.circle = 圆形
name.token.rect = 矩形
name.token.positional = 指定位置
name.token.global = 全局
name.token.target = 瞄准
name.token.and = 和
name.token.or = 或
name.token.b-and = 与
name.token.xor = 异或
name.token.flip = 非
name.token.order = 顺序
name.token.sort = 以
name.token.output = 排序并输出
name.token.if = 如果
name.token.then = 就
name.token.else = 否则
name.token.sec = 秒
name.token.find = 搜寻
name.token.group = 类型
name.token.enemy = 是敌?
name.token.ore = 矿物
name.token.outX = X坐标位
name.token.outY = Y坐标位
name.token.owner = 发射者
name.token.found = 找到?
name.token.building = 建筑
name.token.always = 无条件
name.token.not = 不等于
name.token.pack = 打包
name.token.unpack = 解包
name.token.-lookup = = 查找
name.token.type = 类型
name.token.get = 获取
name.token.team = 队伍
name.token.rot = 旋转
name.token.spawn = 生成
name.token.-bullet = = 子弹
name.token.shoot = 射击?
name.token.unit = 单位
name.token.weather = 天气
name.token.state = 状态
name.token.natural = 自然
name.token.speed = 速度
name.token.level = 级别
name.token.duration = 持续时间
name.token.shown = 显示
name.token.data = 数据
name.token.effect = 效果
name.token.pierce = 穿透
name.token.ground = 对地
name.token.air = 对空
name.token.flag = flag
name.token.volume = 音量
name.token.pitch = 音调
name.token.pan = 声像
name.token.limit = 限制
name.token.of-id- = 于 id\#
name.token.replace = 替换?
name.token.for = 持续
name.token.success = 消息
name.token.truefalse = 是/否
name.token.layer = 图层
name.token.stroke = 边框宽度
name.token.outline = 轮廓
name.token.fill = 实心?
name.token.start = 起点
name.token.end = 终点
name.token.fetch = 获取?
name.token.background = 透明度
name.token.printFlush = 打印缓存
name.token.name = 纹理名称
name.token.index = 索引
name.token.block = 建筑
name.token.block-unit = 建筑/单位
name.token.enable = 启用?
name.token.amount = 数量
name.token.item = 物品
name.token.takeUnits = 拾取单位
name.token.value = 值
name.token.floor = 地面
name.token.result = 结果
name.token.config = 配置
name.token.shapeText = 形状文本
name.token.point = 点
name.token.shape = 形状
name.token.text = 文本
name.token.line = 线条
name.token.texture = 纹理
name.token.quad = 方形
name.token.light = 光
name.token.snowing = 雪
name.token.rain = 雨
name.token.sandstorm = 沙暴
name.token.sporestorm = 孢子风暴
name.token.fog = 雾
name.token.suspend-particles = 悬浮颗粒
name.token.topLeft = 左上
name.token.top = 上
name.token.topRight = 右上
name.token.left = 左
name.token.center = 居中
name.token.right = 右
name.token.bottomLeft = 左下
name.token.bottom = 下
name.token.bottomRight = 右下
name.token.none = 无
name.token.warn = 警告
name.token.cross = x
name.token.blockFall = 坠落建筑
name.token.placeBlock = 放置建筑
name.token.placeBlockSpark = 放置建筑火花
name.token.breakBlock = 拆除方块
name.token.-spawn = = 生成
name.token.trail = 尾迹
name.token.breakProp = 破坏环境块
name.token.smokeCloud = 烟雾云
name.token.vapor = 蒸汽
name.token.hit = 击中
name.token.hitSquare = 方形击中
name.token.shootSmall = 小型射击
name.token.shootBig = 大型射击
name.token.smokeSmall = 小型射击烟
name.token.smokeBig = 大型射击烟
name.token.smokeColor = 彩色射击烟
name.token.smokeSquare = 方射击烟
name.token.smokeSquareBig = 大型方射击烟
name.token.spark = 火花
name.token.sparkBig = 大型火花
name.token.sparkShoot = 射击火花
name.token.sparkShootBig = 大型射击火花
name.token.drill = 挖掘
name.token.drillBig = 大型挖掘
name.token.lightBlock = 发光方块
name.token.explosion = 爆炸
name.token.smokePuff = 噗状烟雾
name.token.sparkExplosion = 火花爆炸
name.token.crossExplosion = 十字爆炸
name.token.wave = 冲击波
name.token.bubble = 气泡
name.token.music = 音乐
name.token.interrupt = 中断?
name.token.all = 全部
name.token.beams = 光束
name.token.block = 方块
name.token.charge = 充能
name.token.environment = 环境
name.token.explosions = 爆炸
name.token.loops = 循环
name.token.movement = 移动
name.token.shoot = 射击
name.token.ui = UI
+1 -1
View File
@@ -431,7 +431,7 @@ public class LCanvas extends Table{
t.margin(6f);
t.touchable = Touchable.enabled;
t.add(st.name()).style(Styles.outlineLabel).name("statement-name").color(color).padRight(8);
t.add(st.localizedName()).style(Styles.outlineLabel).name("statement-name").color(color).padRight(8);
t.add().growX();
addressLabel = t.add(index + "").style(Styles.outlineLabel).color(color).padRight(8).get();
+4 -4
View File
@@ -2,10 +2,10 @@ package mindustry.logic;
public enum LMarkerControl{
remove,
world("true/false"),
minimap("true/false"),
light("true/false"),
autoscale("true/false"),
world("truefalse"),
minimap("truefalse"),
light("truefalse"),
autoscale("truefalse"),
pos("x", "y"),
endPos("x", "y"),
drawLayer("layer"),
+40 -2
View File
@@ -16,6 +16,8 @@ import mindustry.logic.LCanvas.*;
import mindustry.logic.LExecutor.*;
import mindustry.ui.*;
import java.util.*;
import static mindustry.Vars.*;
import static mindustry.logic.LCanvas.*;
@@ -120,6 +122,33 @@ public abstract class LStatement{
return value;
}
public static String bundle(String key){
return Core.bundle.get("name.token." + key, key);
}
protected static String bundle(Enum<?> value){
if(value instanceof LogicOp op){
return selectTranslate(op.symbol);
}else if(value instanceof ConditionOp op){
return selectTranslate(op.symbol);
}
String name = value.name().toLowerCase(Locale.ROOT);
String labelKey = value.getClass().getSimpleName().toLowerCase(Locale.ROOT) + ".label." + name;
if(Core.bundle.has(labelKey)){
return Core.bundle.get(labelKey);
}
return value.name();
}
protected static String selectTranslate(String text){
if(text == null || text.isEmpty()) return text;
return switch(text){
case "not", "and", "or", "b-and", "xor", "flip", "always" -> bundle(text);
default -> text;
};
}
protected Cell<TextField> field(Table table, String value, Cons<String> setter){
return table.field(value, Styles.nodeField, s -> setter.get(sanitize(s)))
.size(144f, 40f).pad(2f).color(table.color);
@@ -176,7 +205,8 @@ public abstract class LStatement{
t.defaults().size(60f, 38f);
for(T p : values){
sizer.get(t.button(p.toString(), Styles.logicTogglet, () -> {
String btnText = (p instanceof Enum e) ? bundle(e) : bundle(p.toString());
sizer.get(t.button(btnText, Styles.logicTogglet, () -> {
getter.get(p);
hide.run();
}).self(c -> {
@@ -213,7 +243,7 @@ public abstract class LStatement{
int val = nameToAlign.get(align);
if(!hor && !Align.isCenterHorizontal(val)) continue;
if(!ver && !Align.isCenterVertical(val)) continue;
t.button(align, Styles.logicTogglet, () -> {
t.button(bundle(align), Styles.logicTogglet, () -> {
setter.get(val);
hide.run();
}).checked(current == nameToAlign.get(align)).grow();
@@ -302,6 +332,14 @@ public abstract class LStatement{
return getClass().getSimpleName().replace("Statement", "");
}
public String statementKey(){
return typeName().toLowerCase(Locale.ROOT);
}
public String localizedName(){
return Core.bundle.get("instruction." + statementKey(), name());
}
public String name(){
return Strings.insertSpaces(getClass().getSimpleName().replace("Statement", ""));
}
+162 -153
View File
@@ -65,7 +65,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" read ");
table.add(bundle("read"));
field(table, output, str -> output = str);
@@ -75,7 +75,7 @@ public class LStatements{
row(table);
table.add(" at ");
table.add(bundle("at"));
field(table, address, str -> address = str);
}
@@ -97,17 +97,17 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" write ");
table.add(bundle("write"));
field(table, input, str -> input = str);
table.add(" to ");
table.add(bundle("to"));
field(table, target, str -> target = str);
row(table);
table.add(" at ");
table.add(bundle("at"));
field(table, address, str -> address = str);
}
@@ -140,7 +140,7 @@ public class LStatements{
table.left();
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, GraphicsType.all, type, t -> {
type = t;
if(type == GraphicsType.color){
@@ -183,7 +183,7 @@ public class LStatements{
fields(s, "a", p2, v -> p2 = v);
}
case col -> {
fields(s, "color", x, v -> x = v).width(144f);
fields(s, bundle("color"), x, v -> x = v).width(144f);
col(s, x, res -> {
x = "%" + res.toString().substring(0, res.a >= 1f ? 6 : 8);
build(table);
@@ -204,17 +204,17 @@ public class LStatements{
fields(s, "x", x, v -> x = v);
fields(s, "y", y, v -> y = v);
row(s);
fields(s, "width", p1, v -> p1 = v);
fields(s, "height", p2, v -> p2 = v);
fields(s, bundle("width"), p1, v -> p1 = v);
fields(s, bundle("height"), p2, v -> p2 = v);
}
case poly, linePoly -> {
fields(s, "x", x, v -> x = v);
fields(s, "y", y, v -> y = v);
row(s);
fields(s, "sides", p1, v -> p1 = v);
fields(s, "radius", p2, v -> p2 = v);
fields(s, bundle("sides"), p1, v -> p1 = v);
fields(s, bundle("radius"), p2, v -> p2 = v);
row(s);
fields(s, "rotation", p3, v -> p3 = v);
fields(s, bundle("rotation"), p3, v -> p3 = v);
}
case triangle -> {
fields(s, "x", x, v -> x = v);
@@ -230,10 +230,10 @@ public class LStatements{
fields(s, "x", x, v -> x = v);
fields(s, "y", y, v -> y = v);
row(s);
fields(s, "image", p1, v -> p1 = v);
fields(s, "size", p2, v -> p2 = v);
fields(s, bundle("image"), p1, v -> p1 = v);
fields(s, bundle("size"), p2, v -> p2 = v);
row(s);
fields(s, "rotation", p3, v -> p3 = v);
fields(s, bundle("rotation"), p3, v -> p3 = v);
}
case print -> {
fields(s, "x", x, v -> x = v);
@@ -241,7 +241,7 @@ public class LStatements{
row(s);
fields(s, "align", p1, v -> p1 = v).width(170f);
fields(s, bundle("align"), p1, v -> p1 = v).width(170f);
fieldAlignSelect(s, () -> p1, v -> {
p1 = v;
rebuild(table);
@@ -252,7 +252,7 @@ public class LStatements{
fields(s, "y", y, v -> y = v);
}
case rotate -> {
fields(s, "degrees", p1, v -> p1 = v);
fields(s, bundle("degrees"), p1, v -> p1 = v);
}
}
}).expand().left();
@@ -308,7 +308,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" char ");
table.add(bundle("char"));
TextField field = field(table, value, str -> value = str).get();
table.button(b -> {
b.image(Icon.pencilSmall);
@@ -369,7 +369,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" to ");
table.add(bundle("to"));
field(table, target, str -> target = str);
}
@@ -390,7 +390,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" to ");
table.add(bundle("to"));
field(table, target, str -> target = str);
}
@@ -413,7 +413,9 @@ public class LStatements{
public void build(Table table){
field(table, output, str -> output = str);
table.add(" = link# ");
table.add(" = ");
table.add(bundle("linknum"));
field(table, address, str -> address = str);
}
@@ -444,17 +446,17 @@ public class LStatements{
table.left();
table.add(" set ");
table.add(bundle("set"));
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, LAccess.controls, type, t -> {
type = t;
rebuild(table);
}, 2, cell -> cell.size(100, 50)));
}, Styles.logict, () -> {}).size(90, 40).color(table.color).left().padLeft(2);
table.add(" of ").self(this::param);
table.add(bundle("of")).self(this::param);
field(table, target, v -> target = v);
@@ -465,7 +467,7 @@ public class LStatements{
int c = 0;
for(int i = 0; i < type.params.length; i++){
fields(table, type.params[i], i == 0 ? p1 : i == 1 ? p2 : i == 2 ? p3 : p4, i == 0 ? v -> p1 = v : i == 1 ? v -> p2 = v : i == 2 ? v -> p3 = v : v -> p4 = v);
fields(table, bundle(type.params[i]), i == 0 ? p1 : i == 1 ? p2 : i == 2 ? p3 : p4, i == 0 ? v -> p1 = v : i == 1 ? v -> p2 = v : i == 2 ? v -> p3 = v : v -> p4 = v);
if(++c % 2 == 0) row(table);
}
@@ -493,7 +495,7 @@ public class LStatements{
table.defaults().left();
if(buildFrom()){
table.add(" from ").self(this::param);
table.add(bundle("from")).self(this::param);
fields(table, radar, v -> radar = v);
@@ -504,10 +506,10 @@ public class LStatements{
int fi = i;
Prov<RadarTarget> get = () -> (fi == 0 ? target1 : fi == 1 ? target2 : target3);
table.add(i == 0 ? " target " : " and ").self(this::param);
table.add(bundle(i == 0 ? "target" : "and")).self(this::param);
table.button(b -> {
b.label(() -> get.get().name());
b.label(() -> bundle(get.get()));
b.clicked(() -> showSelect(b, RadarTarget.all, get.get(), t -> {
if(fi == 0) target1 = t; else if(fi == 1) target2 = t; else target3 = t;
}, 2, cell -> cell.size(100, 50)));
@@ -518,22 +520,22 @@ public class LStatements{
}
}
table.add(" order ").self(this::param);
table.add(bundle("order")).self(this::param);
fields(table, sortOrder, v -> sortOrder = v);
table.row();
table.add(" sort ").self(this::param);
table.add(bundle("sort")).self(this::param);
table.button(b -> {
b.label(() -> sort.name());
b.label(() -> bundle(sort));
b.clicked(() -> showSelect(b, RadarSort.all, sort, t -> {
sort = t;
}, 2, cell -> cell.size(100, 50)));
}, Styles.logict, () -> {}).size(90, 40).color(table.color).left().padLeft(2);
table.add(" output ").self(this::param);
table.add(bundle("output")).self(this::param);
fields(table, output, v -> output = v);
}
@@ -631,7 +633,7 @@ public class LStatements{
new Table(i -> {
boolean currentPrivileged = ui.logic.isShown() && ui.logic.privileged;
for(LAccess sensor : (currentPrivileged ? LAccess.senseablePrivileged : LAccess.senseable)){
i.button(sensor.name(), Styles.flatt, () -> {
i.button(bundle(sensor), Styles.flatt, () -> {
stype("@" + sensor.name());
hide.run();
}).size(240f, 40f).self(c -> tooltip(c, sensor)).row();
@@ -661,7 +663,7 @@ public class LStatements{
}));
}, Styles.logict, () -> {}).size(40f).padLeft(-1).color(table.color);
table.add(" in ").self(this::param);
table.add(bundle("in")).padLeft(6f).padRight(6f).self(this::param);
field(table, from, str -> from = str);
}
@@ -764,7 +766,7 @@ public class LStatements{
void opButton(Table table, Table parent){
table.button(b -> {
b.label(() -> op.symbol);
b.label(() -> selectTranslate(op.symbol));
b.clicked(() -> showSelect(b, LogicOp.all, op, o -> {
op = o;
rebuild(parent);
@@ -802,7 +804,8 @@ public class LStatements{
t.setColor(table.color);
field(t, result, str -> result = str);
t.add(" = if ");
t.add(" = ");
t.add(bundle("if"));
row(t);
@@ -816,9 +819,9 @@ public class LStatements{
table.table(t -> {
t.setColor(table.color);
t.add("then ");
t.add(bundle("then"));
field(t, a, str -> a = str).width(130f);
t.add(" else ");
t.add(bundle("else"));
field(t, b, str -> b = str).width(130f);
}).left();
}
@@ -841,7 +844,7 @@ public class LStatements{
@Override
public void build(Table table){
field(table, value, str -> value = str);
table.add(" sec");
table.add(bundle("sec"));
}
@Override
@@ -882,12 +885,12 @@ public class LStatements{
public void build(Table table){
fields(table, result, str -> result = str).width(120f);
table.add(" = lookup ");
table.add(bundle("-lookup"));
row(table);
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, GlobalVars.lookableContent, type, o -> {
type = o;
}));
@@ -917,7 +920,8 @@ public class LStatements{
public void build(Table table){
fields(table, result, str -> result = str);
table.add(" = pack ");
table.add(" = ");
table.add(bundle("pack"));
row(table);
@@ -951,7 +955,8 @@ public class LStatements{
row(table);
table.add(" = unpack ");
table.add(" = ");
table.add(bundle("unpack"));
fields(table, value, str -> value = str);
}
@@ -998,7 +1003,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add("if ").padLeft(4);
table.add(bundle("if")).padLeft(4);
last = table.color;
table.table(this::rebuild);
@@ -1014,7 +1019,7 @@ public class LStatements{
if(table.parent != null){
Label title = table.parent.find("statement-name");
if(title != null){
title.update(() -> title.setText((dest != null ? name + " -> " + dest.index : name)));
title.update(() -> title.setText((dest != null ? bundle(name) + " -> " + dest.index : bundle(name))));
}
}
});
@@ -1035,7 +1040,7 @@ public class LStatements{
if(op != ConditionOp.always) st.field(t, comp0, set0);
t.button(b -> {
b.add(op.symbol);
b.add(st.selectTranslate(op.symbol));
b.clicked(() -> st.showSelect(b, ConditionOp.all, op, getter));
}, Styles.logict, () -> {
}).size(op == ConditionOp.always ? 80f : 48f, 40f).pad(4f).color(t.color);
@@ -1075,7 +1080,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" type ");
table.add(bundle("type"));
TextField field = field(table, type, str -> type = str).get();
@@ -1130,7 +1135,7 @@ public class LStatements{
table.add(" ");
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, Structs.filter(LUnitControl.class, LUnitControl.all, t ->
t == LUnitControl.build ? state.rules.logicUnitBuild :
t == LUnitControl.deconstruct ? state.rules.logicUnitDeconstruct :
@@ -1148,7 +1153,7 @@ public class LStatements{
int c = 0;
for(int i = 0; i < type.params.length; i++){
fields(table, type.params[i], i == 0 ? p1 : i == 1 ? p2 : i == 2 ? p3 : i == 3 ? p4 : p5, i == 0 ? v -> p1 = v : i == 1 ? v -> p2 = v : i == 2 ? v -> p3 = v : i == 3 ? v -> p4 = v : v -> p5 = v).width(100f);
fields(table, bundle(type.params[i]), i == 0 ? p1 : i == 1 ? p2 : i == 2 ? p3 : i == 3 ? p4 : p5, i == 0 ? v -> p1 = v : i == 1 ? v -> p2 = v : i == 2 ? v -> p3 = v : i == 3 ? v -> p4 = v : v -> p5 = v).width(100f);
if(++c % 2 == 0) row(table);
@@ -1208,10 +1213,10 @@ public class LStatements{
void rebuild(Table table){
table.clearChildren();
table.add(" find ").left().self(this::param);
table.add(bundle("find")).left().self(this::param);
table.button(b -> {
b.label(() -> locate.name());
b.label(() -> bundle(locate));
b.clicked(() -> showSelect(b, LLocate.all, locate, t -> {
locate = t;
rebuild(table);
@@ -1221,14 +1226,14 @@ public class LStatements{
switch(locate){
case building -> {
row(table);
table.add(" group ").left().self(this::param);
table.add(bundle("group")).left().self(this::param);
table.button(b -> {
b.label(() -> flag.name());
b.label(() -> bundle(flag));
b.clicked(() -> showSelect(b, BlockFlag.allLogic, flag, t -> flag = t, 2, cell -> cell.size(110, 50)));
}, Styles.logict, () -> {}).size(110, 40).color(table.color).left().padLeft(2);
row(table);
table.add(" enemy ").left().self(this::param);
table.add(bundle("enemy")).left().self(this::param);
fields(table, enemy, str -> enemy = str);
@@ -1236,7 +1241,7 @@ public class LStatements{
}
case ore -> {
table.add(" ore ").left().self(this::param);
table.add(bundle("ore")).left().self(this::param);
table.table(ts -> {
ts.color.set(table.color);
@@ -1273,19 +1278,19 @@ public class LStatements{
}
}
table.add(" outX ").left().self(this::param);
table.add(bundle("outX")).left().self(this::param);
fields(table, outX, str -> outX = str);
table.add(" outY ").left().self(this::param);
table.add(bundle("outY")).left().self(this::param);
fields(table, outY, str -> outY = str);
row(table);
table.add(" found ").left().self(this::param);
table.add(bundle("found")).left().self(this::param);
fields(table, outFound, str -> outFound = str);
if(locate != LLocate.ore){
table.add(" building ").left().self(this::param);
table.add(bundle("building")).left().self(this::param);
fields(table, outBuild, str -> outBuild = str);
}
@@ -1312,20 +1317,20 @@ public class LStatements{
public void build(Table table){
table.clearChildren();
table.button(shape == QueryShape.circle ? "circle" : "rect", Styles.logict, () -> {
table.button(shape == QueryShape.circle ? bundle("circle") : bundle("rect"), Styles.logict, () -> {
shape = shape == QueryShape.circle ? QueryShape.rect : QueryShape.circle;
build(table);
}).size(80f, 40f).pad(4f).color(table.color);
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, QueryType.queryable, type, o -> {
type = o;
build(table);
}));
}, Styles.logict, () -> {}).size(64f, 40f).pad(4f).color(table.color);
fields(table, "team", team, str -> team = str);
fields(table, bundle("team"), team, str -> team = str);
row(table);
@@ -1335,10 +1340,10 @@ public class LStatements{
table.row();
if(shape == QueryShape.circle){
fields(table, "radius", w, str -> w = str);
fields(table, bundle("radius"), w, str -> w = str);
}else{
fields(table, "width", w, str -> w = str);
fields(table, "height", h, str -> h = str);
fields(table, bundle("width"), w, str -> w = str);
fields(table, bundle("height"), h, str -> h = str);
}
}
@@ -1367,16 +1372,17 @@ public class LStatements{
public void build(Table table){
fields(table, result, str -> result = str);
table.add(" = get ");
table.add(" = ");
table.add(bundle("get"));
row(table);
table.button(b -> {
b.label(() -> layer.name());
b.label(() -> bundle(layer));
b.clicked(() -> showSelect(b, TileLayer.all, layer, o -> layer = o));
}, Styles.logict, () -> {}).size(64f, 40f).pad(4f).color(table.color);
table.add(" at ");
table.add(bundle("at"));
fields(table, x, str -> x = str);
table.add(", ");
@@ -1411,10 +1417,10 @@ public class LStatements{
void rebuild(Table table){
table.clearChildren();
table.add("set");
table.add(bundle("set"));
table.button(b -> {
b.label(() -> layer.name());
b.label(() -> bundle(layer));
b.clicked(() -> showSelect(b, TileLayer.settable, layer, o -> {
layer = o;
rebuild(table);
@@ -1423,7 +1429,7 @@ public class LStatements{
row(table);
table.add(" at ");
table.add(bundle("at"));
fields(table, x, str -> x = str);
table.add(", ");
@@ -1431,17 +1437,17 @@ public class LStatements{
row(table);
table.add(" to ");
table.add(bundle("to"));
fields(table, block, str -> block = str);
if(layer == TileLayer.block){
row(table);
table.add("team ");
table.add(bundle("team"));
fields(table, team, str -> team = str);
table.add(" rotation ");
table.add(bundle("rotation"));
fields(table, rotation, str -> rotation = str);
}
}
@@ -1470,12 +1476,12 @@ public class LStatements{
public void build(Table table){
fields(table, result, str -> result = str);
table.add(" = spawn ");
table.add(bundle("-spawn"));
field(table, type, str -> type = str).colspan(!LCanvas.useRows() ? 1 : 2);
row(table);
table.add(" at ");
table.add(bundle("at"));
fields(table, x, str -> x = str);
table.add(", ");
@@ -1487,15 +1493,15 @@ public class LStatements{
table.add();
}
table.add("team ");
table.add(bundle("team"));
field(table, team, str -> team = str);
table.add(" rot ");
table.add(bundle("rot"));
fields(table, rotation, str -> rotation = str).left();
row(table);
table.add("effect ");
table.add(bundle("effect"));
fields(table, effect, str -> effect = str).left();
}
@@ -1523,27 +1529,27 @@ public class LStatements{
public void build(Table table){
fields(table, result, str -> result = str);
table.add(" = bullet ");
table.add(bundle("-bullet"));
row(table);
fields(table, "from", from, str -> from = str);
fields(table, "index", index, str -> index = str);
fields(table, bundle("from"), from, str -> from = str);
fields(table, bundle("index"), index, str -> index = str);
row(table);
fields(table, "x", x, str -> x = str);
fields(table, "y", y, str -> y = str);
table.row();
fields(table, "rotation", rotation, str -> rotation = str);
fields(table, "team", team, str -> team = str);
fields(table, bundle("rotation"), rotation, str -> rotation = str);
fields(table, bundle("team"), team, str -> team = str);
row(table);
fields(table, "owner", owner, str -> owner = str);
fields(table, "damage", damage, str -> damage = str);
fields(table, bundle("owner"), owner, str -> owner = str);
fields(table, bundle("damage"), damage, str -> damage = str);
table.row();
fields(table, "velocityScl", velocityScl, str -> velocityScl = str);
fields(table, "lifeScl", lifeScl, str -> lifeScl = str);
fields(table, bundle("velocityScl"), velocityScl, str -> velocityScl = str);
fields(table, bundle("lifeScl"), lifeScl, str -> lifeScl = str);
row(table);
fields(table, "aimX", aimX, str -> aimX = str);
fields(table, "aimY", aimY, str -> aimY = str);
fields(table, bundle("aimX"), aimX, str -> aimX = str);
fields(table, bundle("aimY"), aimY, str -> aimY = str);
}
@Override
@@ -1575,7 +1581,7 @@ public class LStatements{
public void build(Table table){
table.clearChildren();
table.button(clear ? "clear" : "apply", Styles.logict, () -> {
table.button(bundle(clear ? "clear" : "apply"), Styles.logict, () -> {
clear = !clear;
build(table);
}).size(80f, 40f).pad(4f).color(table.color);
@@ -1590,7 +1596,7 @@ public class LStatements{
t.left();
for(StatusEffect status : content.statusEffects()){
if(status == StatusEffects.none) continue;
t.button(status.name, status.uiIcon != Core.atlas.find("error") ? new TextureRegionDrawable(status.uiIcon) : Icon.effect, Styles.flatt, iconSmall, () -> {
t.button(status.localizedName, status.uiIcon != Core.atlas.find("error") ? new TextureRegionDrawable(status.uiIcon) : Icon.effect, Styles.flatt, iconSmall, () -> {
effect = "@status-" + status.name;
build(table);
field.setText(effect);
@@ -1602,18 +1608,18 @@ public class LStatements{
row(table);
table.add(clear ? " from " : " to ").left();
table.add(bundle(clear ? "from" : "to")).left();
fields(table, unit, str -> unit = str).left();
if(!clear && !isPermanent()){
row(table);
table.add(" for ").left();
table.add(bundle("for")).left();
fields(table, duration, str -> duration = str).left();
table.add(" sec").left();
table.add(bundle("sec")).left();
}
}
@@ -1651,7 +1657,8 @@ public class LStatements{
public void build(Table table){
field(table, to, str -> to = str);
table.add(" = weather ");
table.add(" = ");
table.add(bundle("weather"));
row(table);
@@ -1666,7 +1673,7 @@ public class LStatements{
i.left();
int c = 0;
for(Weather w : Vars.content.weathers()){
i.button(w.name, Styles.flatt, () -> {
i.button(bundle(w.name), Styles.flatt, () -> {
weather = "@" + w.name;
tfield.setText(weather);
hide.run();
@@ -1703,7 +1710,8 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" set weather ");
table.add(bundle("set"));
table.add(bundle("weather"));
tfield = field(table, weather, str -> weather = str).padRight(0f).get();
@@ -1716,7 +1724,7 @@ public class LStatements{
i.left();
int c = 0;
for(Weather w : Vars.content.weathers()){
i.button(w.name, Styles.flatt, () -> {
i.button(bundle(w.name), Styles.flatt, () -> {
weather = "@" + w.name;
tfield.setText(weather);
hide.run();
@@ -1728,7 +1736,7 @@ public class LStatements{
}));
}, Styles.logict, () -> {}).size(40f).padLeft(-1).color(table.color);
table.add(" state ");
table.add(bundle("state"));
fields(table, state, str -> state = str);
}
@@ -1755,7 +1763,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add("natural ");
table.add(bundle("natural"));
fields(table, natural, str -> natural = str);
table.add("x ").visible(() -> !natural.equals("true"));
@@ -1795,7 +1803,7 @@ public class LStatements{
table.clearChildren();
table.button(b -> {
b.label(() -> rule.name()).growX().wrap().labelAlign(Align.center);
b.label(() -> bundle(rule)).growX().wrap().labelAlign(Align.center);
b.clicked(() -> showSelect(b, LogicRule.all, rule, o -> {
rule = o;
rebuild(table);
@@ -1819,13 +1827,13 @@ public class LStatements{
p1 = "@sharded";
}
fields(table, "of", p1, s -> p1 = s);
fields(table, bundle("of"), p1, s -> p1 = s);
table.add(" = ");
row(table);
field(table, value, s -> value = s);
}
case ban, unban -> {
table.add(" block/unit ");
table.add(bundle("block-unit"));
fields(table, value, s -> value = s);
}
@@ -1867,7 +1875,7 @@ public class LStatements{
table.clearChildren();
table.button(b -> {
b.label(() -> type.name()).growX().wrap().labelAlign(Align.center);
b.label(() -> bundle(type)).growX().wrap().labelAlign(Align.center);
b.clicked(() -> showSelect(b, MessageType.all, type, o -> {
type = o;
rebuild(table);
@@ -1876,14 +1884,14 @@ public class LStatements{
switch(type){
case announce, toast -> {
table.add(" for ");
table.add(bundle("for"));
fields(table, duration, str -> duration = str);
table.add(" sec ");
table.add(bundle("sec"));
}
}
row(table);
table.add(" success ");
table.add(bundle("success"));
fields(table, outSuccess, str -> outSuccess = str);
}
@@ -1917,7 +1925,7 @@ public class LStatements{
table.clearChildren();
table.button(b -> {
b.label(() -> action.name()).growX().wrap().labelAlign(Align.center);
b.label(() -> bundle(action)).growX().wrap().labelAlign(Align.center);
b.clicked(() -> showSelect(b, CutsceneAction.all, action, o -> {
action = o;
rebuild(table);
@@ -1926,7 +1934,7 @@ public class LStatements{
switch(action){
case active, getHud -> {
table.add(" result ");
table.add(bundle("result"));
fields(table, p1, str -> p1 = str);
}
case pan -> {
@@ -1937,21 +1945,21 @@ public class LStatements{
row(table);
table.add(" speed ");
table.add(bundle("speed"));
fields(table, p3, str -> p3 = str);
}
case zoom -> {
table.add(" level ");
table.add(bundle("level"));
fields(table, p1, str -> p1 = str);
}
case shake -> {
table.add(" amount ");
table.add(bundle("amount"));
fields(table, p1, str -> p1 = str);
table.add(" duration ");
table.add(bundle("duration"));
fields(table, p2, str -> p2 = str);
}
case setHud -> {
table.add(" shown ");
table.add(bundle("shown"));
fields(table, p1, str -> p1 = str);
}
}
@@ -1982,7 +1990,7 @@ public class LStatements{
table.clearChildren();
table.button(b -> {
b.label(() -> type).growX().wrap().labelAlign(Align.center);
b.label(() -> bundle(type)).growX().wrap().labelAlign(Align.center);
b.clicked(() -> ui.effects.show(entry -> {
type = entry.name;
build(table);
@@ -1999,7 +2007,7 @@ public class LStatements{
if(entry != null){
if(entry.color){
fields(table, "color", color, str -> color = str).width(120f);
fields(table, bundle("color"), color, str -> color = str).width(120f);
col(table, color, res -> {
color = "%" + res.toString().substring(0, res.a >= 1f ? 6 : 8);
@@ -2010,11 +2018,11 @@ public class LStatements{
row(table);
if(entry.size || entry.rotate){
fields(table, entry.size ? "size" : "rotation", sizerot, str -> sizerot = str);
fields(table, bundle(entry.size ? "size" : "rotation"), sizerot, str -> sizerot = str);
}
if(entry.data != null){
fields(table, "data", data, str -> data = str);
fields(table, bundle("data"), data, str -> data = str);
}
}
}
@@ -2041,19 +2049,19 @@ public class LStatements{
@Override
public void build(Table table){
fields(table, "team", team, str -> team = str);
fields(table, bundle("team"), team, str -> team = str);
fields(table, "x", x, str -> x = str);
row(table);
fields(table, "y", y, str -> y = str);
fields(table, "radius", radius, str -> radius = str);
fields(table, bundle("radius"), radius, str -> radius = str);
table.row();
fields(table, "damage", damage, str -> damage = str);
fields(table, "air", air, str -> air = str);
fields(table, bundle("damage"), damage, str -> damage = str);
fields(table, bundle("air"), air, str -> air = str);
row(table);
fields(table, "ground", ground, str -> ground = str);
fields(table, "pierce", pierce, str -> pierce = str);
fields(table, bundle("ground"), ground, str -> ground = str);
fields(table, bundle("pierce"), pierce, str -> pierce = str);
table.row();
fields(table, "effect", effect, str -> effect = str);
fields(table, bundle("effect"), effect, str -> effect = str);
}
@Override
@@ -2110,7 +2118,7 @@ public class LStatements{
table.add(" = ");
table.button(b -> {
b.label(() -> type.name()).growX().wrap().labelAlign(Align.center);
b.label(() -> bundle(type)).growX().wrap().labelAlign(Align.center);
b.clicked(() -> showSelect(b, FetchType.all, type, o -> {
type = o;
rebuild(table);
@@ -2119,7 +2127,7 @@ public class LStatements{
row(table);
fields(table, "team", team, s -> team = s);
fields(table, bundle("team"), team, s -> team = s);
if(type != FetchType.coreCount && type != FetchType.playerCount && type != FetchType.unitCount && type != FetchType.buildCount){
table.add(" # ");
@@ -2132,13 +2140,13 @@ public class LStatements{
if(type == FetchType.buildCount || type == FetchType.build){
row(table);
fields(table, "block", extra, i -> extra = i);
fields(table, bundle("block"), extra, i -> extra = i);
}
if(type == FetchType.unitCount || type == FetchType.unit){
row(table);
fields(table, "unit", extra, i -> extra = i);
fields(table, bundle("unit"), extra, i -> extra = i);
}
}
@@ -2230,7 +2238,8 @@ public class LStatements{
fields(table, result, str -> result = str).width(width);
table.add(" = flag ");
table.add(" = ");
table.add(bundle("flag"));
fields(table, flag, str -> flag = str).width(width);
}
@@ -2259,7 +2268,7 @@ public class LStatements{
public void build(Table table){
float width = LCanvas.useRows() ? 100f : 190f;
fields(table, flag, str -> flag = str).width(width);
fields(table, bundle(flag), str -> flag = str).width(width);
table.add(" = ");
@@ -2291,7 +2300,7 @@ public class LStatements{
@Override
public void build(Table table){
table.add(" set ");
table.add(bundle("set"));
tfield = field(table, type, str -> type = str).padRight(0f).get();
@@ -2333,7 +2342,7 @@ public class LStatements{
i.left();
for(StatusEffect status : Vars.content.statusEffects()){
if(!status.unlockedNow() || !status.show || status == StatusEffects.none) continue;
i.button(status.name, status.uiIcon != Core.atlas.find("error") ? new TextureRegionDrawable(status.uiIcon) : Icon.effect, Styles.flatt, iconSmall, () -> {
i.button(status.localizedName, status.uiIcon != Core.atlas.find("error") ? new TextureRegionDrawable(status.uiIcon) : Icon.effect, Styles.flatt, iconSmall, () -> {
stype("@status-" + status.name);
hide.run();
}).size(240f, 40f).marginLeft(5f).row();
@@ -2342,7 +2351,7 @@ public class LStatements{
//sensors
new Table(i -> {
for(LAccess property : LAccess.settable){
i.button(property.name(), Styles.flatt, () -> {
i.button(bundle(property), Styles.flatt, () -> {
stype("@" + property.name());
hide.run();
}).size(240f, 40f).self(c -> tooltip(c, property)).row();
@@ -2374,13 +2383,13 @@ public class LStatements{
row(table);
table.add(" of ").self(this::param);
table.add(bundle("of")).self(this::param);
field(table, of, str -> of = str).colspan(2);
row(table);
table.add(" to ");
table.add(bundle("to"));
field(table, value, str -> value = str).colspan(2);
}
@@ -2415,7 +2424,7 @@ public class LStatements{
public void build(Table table){
table.clearChildren();
table.button(positional ? "positional" : "global", Styles.logict, () -> {
table.button(bundle(positional ? "positional" : "global"), Styles.logict, () -> {
positional = !positional;
build(table);
}).size(160f, 40f).pad(4f).color(table.color);
@@ -2431,8 +2440,8 @@ public class LStatements{
row(table);
fieldst(table, "volume", volume, str -> volume = str);
fieldst(table, "pitch", pitch, str -> pitch = str);
fieldst(table, bundle("volume"), volume, str -> volume = str);
fieldst(table, bundle("pitch"), pitch, str -> pitch = str);
table.row();
@@ -2441,12 +2450,12 @@ public class LStatements{
fieldst(table, "y", y, str -> y = str);
}else{
fieldst(table, "pan", pan, str -> pan = str);
fieldst(table, bundle("pan"), pan, str -> pan = str);
}
table.row();
fieldst(table, "limit", limit, str -> limit = str);
fieldst(table, bundle("limit"), limit, str -> limit = str);
}
@Override
@@ -2552,7 +2561,7 @@ public class LStatements{
.update(b -> b.getStyle().imageUp = choice.sound != null && choice.sound == lastPreview && choice.sound.countPlaying() > 0 ? Icon.pause : Icon.play)
.size(40f).padRight(6f);
String label = "all".equals(selectedCategory[0]) ? choice.category + "/" + choice.name : choice.name;
String label = "all".equals(selectedCategory[0]) ? bundle(choice.category) + "/" + choice.name : choice.name;
row.button(label, Styles.logicTogglet, () -> {
id = "@sfx-" + choice.name;
build(table);
@@ -2569,7 +2578,7 @@ public class LStatements{
tabs.defaults().size(140f, 34f).left();
for(String category : categoryNames){
tabs.button(Strings.capitalize(category), Styles.logicTogglet, () -> {
tabs.button(bundle(category), Styles.logicTogglet, () -> {
selectedCategory[0] = category;
rebuild.run();
//fixes flickering
@@ -2624,9 +2633,9 @@ public class LStatements{
public void build(Table table){
float width = LCanvas.useRows() ? 100f : 190f;
fields(table, "music", name, str -> name = str).width(width);
fields(table, bundle("music"), name, str -> name = str).width(width);
fields(table, "interrupt", interrupt, str -> interrupt = str).width(width);
fields(table, bundle("interrupt"), interrupt, str -> interrupt = str).width(width);
}
@Override
@@ -2658,10 +2667,10 @@ public class LStatements{
void rebuild(Table table){
table.clearChildren();
table.add("set");
table.add(bundle("set"));
table.button(b -> {
b.label(() -> type.name());
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, LMarkerControl.all, type, t -> {
type = t;
rebuild(table);
@@ -2670,7 +2679,7 @@ public class LStatements{
row(table);
fieldst(table, "of id#", id, str -> id = str);
fieldst(table, bundle("of-id-"), id, str -> id = str);
//Q: why don't you just use arrays for this?
//A: arrays aren't as easy to serialize so the code generator doesn't handle them
@@ -2683,7 +2692,7 @@ public class LStatements{
String value = i == 0 ? p1 : i == 1 ? p2 : p3;
Cons<String> setter = i == 0 ? v -> p1 = v : i == 1 ? v -> p2 = v : v -> p3 = v;
fields(t, type.params[i], value, setter).width(100f);
fields(t, bundle(type.params[i]), value, setter).width(100f);
if(type == LMarkerControl.color || (type == LMarkerControl.colori && i == 1)){
col(t, value, res -> {
@@ -2746,10 +2755,10 @@ public class LStatements{
table.clearChildren();
table.button(b -> {
b.label(() -> type);
b.label(() -> bundle(type));
b.clicked(() -> showSelect(b, MapObjectives.allMarkerTypeNames.toArray(String.class), type, t -> {
type = t;
type = bundle(t);
build(table);
}, 2, cell -> cell.size(160, 50)));
}, Styles.logict, () -> {}).size(190, 40).color(table.color).left().padLeft(2);
@@ -2764,7 +2773,7 @@ public class LStatements{
row(table);
fieldst(table, "replace", replace, v -> replace = v);
fieldst(table, bundle("replace"), replace, v -> replace = v);
}
@Override
+3 -3
View File
@@ -300,7 +300,7 @@ public class LogicDialog extends BaseDialog{
for(Prov<LStatement> prov : LogicIO.allStatements){
LStatement example = prov.get();
if(example instanceof InvalidStatement || example.hidden() || (example.privileged() && !privileged) || (example.nonPrivileged() && privileged) ||
(!text.isEmpty() && !example.name().toLowerCase(Locale.ROOT).contains(text) && !example.typeName().toLowerCase(Locale.ROOT).contains(text)) ||
(!text.isEmpty() && !example.localizedName().toLowerCase(Locale.ROOT).contains(text) && !example.typeName().toLowerCase(Locale.ROOT).contains(text)) ||
(!privileged && !state.rules.logicUnitControl && example.category() == LCategory.unit)) continue;
if(matched[0] == null){
@@ -330,10 +330,10 @@ public class LogicDialog extends BaseDialog{
style.fontColor = category.color;
style.font = Fonts.outline;
cat.button(example.name(), style, () -> {
cat.button(example.localizedName(), style, () -> {
canvas.addAt(position == -1 ? canvas.statements.getChildren().size : position, prov.get());
dialog.hide();
}).size(130f, 50f).self(c -> tooltip(c, "lst." + example.name())).top().left();
}).size(130f, 50f).self(c -> tooltip(c, "lst." + example.statementKey())).top().left();
if(cat.getChildren().size % 3 == 0) cat.row();
}
@@ -73,7 +73,7 @@ public class EffectsDialog extends BaseDialog{
t.stack(
new EffectCell(entry, cl),
new Table(af -> af.add(entry.name).grow().labelAlign(Align.bottomLeft).style(Styles.outlineLabel).bottom().left())
new Table(af -> af.add(LStatement.bundle(entry.name)).grow().labelAlign(Align.bottomLeft).style(Styles.outlineLabel).bottom().left())
).size(size).with(a -> {
a.clicked(() -> {
if(listener != null){