merge
6
.gitignore
vendored
@@ -79,9 +79,11 @@ com_crashlytics_export_strings.xml
|
||||
/android/bin/
|
||||
/core/bin/
|
||||
/desktop/bin/
|
||||
/html/bin/
|
||||
/ios/bin/
|
||||
/ios-moe/bin/
|
||||
/annotations/bin/
|
||||
/server/bin/
|
||||
/tests/bin/
|
||||
/tools/bin/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk14
|
||||
dist: xenial
|
||||
android:
|
||||
components:
|
||||
|
||||
@@ -71,22 +71,17 @@ public class LogicStatementProcessor extends BaseProcessor{
|
||||
|
||||
writer.addStatement("out.append(\" \")");
|
||||
writer.addStatement("out.append((($T)obj).$L$L)", c.mirror(), field.name(),
|
||||
field.mirror().toString().equals("java.lang.String") ?
|
||||
".replace(\"\\n\", \"\\\\n\")" :
|
||||
Seq.with(typeu.directSupertypes(field.mirror())).contains(t -> t.toString().contains("java.lang.Enum")) ? ".name()" :
|
||||
"");
|
||||
Seq.with(typeu.directSupertypes(field.mirror())).contains(t -> t.toString().contains("java.lang.Enum")) ? ".name()" :
|
||||
"");
|
||||
|
||||
//reading primitives, strings and enums is supported; nothing else is
|
||||
reader.addStatement("if(tokens.length > $L) result.$L = $L(tokens[$L])$L",
|
||||
reader.addStatement("if(tokens.length > $L) result.$L = $L(tokens[$L])",
|
||||
index + 1,
|
||||
field.name(),
|
||||
field.mirror().toString().equals("java.lang.String") ?
|
||||
"" : (field.tname().isPrimitive() ? field.tname().box().toString() :
|
||||
field.mirror().toString()) + ".valueOf", //if it's not a string, it must have a valueOf method
|
||||
index + 1,
|
||||
field.mirror().toString().equals("java.lang.String") ?
|
||||
".replace(\"\\\\n\", \"\\n\")" :
|
||||
""
|
||||
index + 1
|
||||
);
|
||||
|
||||
index ++;
|
||||
|
||||
1
annotations/src/main/resources/revisions/Fire/1.json
Normal file
@@ -0,0 +1 @@
|
||||
{version:1,fields:[{name:lifetime,type:float,size:4},{name:tile,type:mindustry.world.Tile,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{version:2,fields:[{name:effectTimer,type:float,size:4},{name:intensity,type:float,size:4},{name:life,type:float,size:4},{name:opacity,type:float,size:4},{name:weather,type:mindustry.type.Weather,size:-1},{name:windVector,type:arc.math.geom.Vec2,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -187,6 +187,10 @@ configure(subprojects - project(":annotations")){
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc){
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
||||
|
||||
project(":desktop"){
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/blocks/logic/hyper-processor.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 639 B |
BIN
core/assets-raw/sprites/units/weapons/large-purple-mount.png
Normal file
|
After Width: | Height: | Size: 938 B |
@@ -137,6 +137,8 @@ mod.scripts.disable = Your device does not support mods with scripts. You must d
|
||||
about.button = About
|
||||
name = Name:
|
||||
noname = Pick a[accent] player name[] first.
|
||||
planetmap = Planet Map
|
||||
launchcore = Launch Core
|
||||
filename = File Name:
|
||||
unlocked = New content unlocked!
|
||||
completed = [accent]Completed
|
||||
@@ -171,7 +173,7 @@ host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \n
|
||||
join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] or [accent]global[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[lightgray]If you want to connect to someone by IP, you would need to ask the host for their IP, which can be found by googling "my ip" from their device.
|
||||
hostserver = Host Multiplayer Game
|
||||
invitefriends = Invite Friends
|
||||
hostserver.mobile = Host\nGame
|
||||
hostserver.mobile = Host Game
|
||||
host = Host
|
||||
hosting = [accent]Opening server...
|
||||
hosts.refresh = Refresh
|
||||
@@ -576,6 +578,8 @@ blocks.shootrange = Range
|
||||
blocks.size = Size
|
||||
blocks.liquidcapacity = Liquid Capacity
|
||||
blocks.powerrange = Power Range
|
||||
blocks.linkrange = Link Range
|
||||
blocks.instructions = Instructions
|
||||
blocks.powerconnections = Max Connections
|
||||
blocks.poweruse = Power Use
|
||||
blocks.powerdamage = Power/Damage
|
||||
@@ -728,6 +732,7 @@ category.blocks.name = Block Select
|
||||
command.attack = Attack
|
||||
command.rally = Rally
|
||||
command.retreat = Retreat
|
||||
command.idle = Idle
|
||||
placement.blockselectkeys = \n[lightgray]Key: [{0},
|
||||
keybind.respawn.name = Respawn
|
||||
keybind.control.name = Control Unit
|
||||
@@ -740,6 +745,7 @@ keybind.toggle_block_status.name = Toggle Block Statuses
|
||||
keybind.move_x.name = Move X
|
||||
keybind.move_y.name = Move Y
|
||||
keybind.mouse_move.name = Follow Mouse
|
||||
keybind.pan.name = Pan View
|
||||
keybind.boost.name = Boost
|
||||
keybind.schematic_select.name = Select Region
|
||||
keybind.schematic_menu.name = Schematic Menu
|
||||
@@ -1076,6 +1082,7 @@ block.container.name = Container
|
||||
block.launch-pad.name = Launch Pad
|
||||
block.launch-pad-large.name = Large Launch Pad
|
||||
block.segment.name = Segment
|
||||
block.command-center.name = Command Center
|
||||
block.ground-factory.name = Ground Factory
|
||||
block.air-factory.name = Air Factory
|
||||
block.naval-factory.name = Naval Factory
|
||||
@@ -1083,7 +1090,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Payload Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
@@ -1092,6 +1099,7 @@ block.overdrive-dome.name = Overdrive Dome
|
||||
block.switch.name = Switch
|
||||
block.micro-processor.name = Micro Processor
|
||||
block.logic-processor.name = Logic Processor
|
||||
block.hyper-processor.name = Hyper Processor
|
||||
block.logic-display.name = Logic Display
|
||||
block.memory-cell.name = Memory Cell
|
||||
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Přídavný přestavbovač
|
||||
block.multiplicative-reconstructor.name = Násobný přestavbovač
|
||||
block.exponential-reconstructor.name = Exponenciální přestavbovač
|
||||
block.tetrative-reconstructor.name = Umocňující přestavbovač
|
||||
block.mass-conveyor.name = Hromadný dopravník
|
||||
block.payload-conveyor.name = Hromadný dopravník
|
||||
block.payload-router.name = Směřovač nákladu
|
||||
block.disassembler.name = Rozebírač
|
||||
block.silicon-crucible.name = Křemíková nádoba
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1076,7 +1076,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Reconstructeur Additif
|
||||
block.multiplicative-reconstructor.name = Reconstructeur Multiplicatif
|
||||
block.exponential-reconstructor.name = Reconstructeur Exponentiel
|
||||
block.tetrative-reconstructor.name = Reconstructeur Tétratif
|
||||
block.mass-conveyor.name = Convoyeur de Masse
|
||||
block.payload-conveyor.name = Convoyeur de Masse
|
||||
block.payload-router.name = Routeur de Charge Utile
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Creuset de Silicium
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = 첨가물 재구성기
|
||||
block.multiplicative-reconstructor.name = 다중 재구성기
|
||||
block.exponential-reconstructor.name = 지수 재구성기
|
||||
block.tetrative-reconstructor.name = 정서 재구성기
|
||||
block.mass-conveyor.name = 매스 컨베이어
|
||||
block.payload-conveyor.name = 매스 컨베이어
|
||||
block.payload-router.name = 화물 분배기
|
||||
block.disassembler.name = 분해기
|
||||
block.silicon-crucible.name = 실리콘 도가니
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1063,7 +1063,7 @@ block.additive-reconstructor.name = Rekonstruktor Addytywny
|
||||
block.multiplicative-reconstructor.name = Rekonstruktor Multiplikatywny
|
||||
block.exponential-reconstructor.name = Rekonstruktor Wykładniczy
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Przenośnik Masowy
|
||||
block.payload-conveyor.name = Przenośnik Masowy
|
||||
block.payload-router.name = Rozdzielacz Ładunku
|
||||
block.disassembler.name = Dezasembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1079,7 +1079,7 @@ block.additive-reconstructor.name = Добавляющий реконструк
|
||||
block.multiplicative-reconstructor.name = Умножающий реконструктор
|
||||
block.exponential-reconstructor.name = Экспоненциальный реконструктор
|
||||
block.tetrative-reconstructor.name = Тетративный реконструктор
|
||||
block.mass-conveyor.name = Грузовой конвейер
|
||||
block.payload-conveyor.name = Грузовой конвейер
|
||||
block.payload-router.name = Разгрузочный маршрутизатор
|
||||
block.disassembler.name = Разборщик
|
||||
block.silicon-crucible.name = Кремниевый тигель
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Додавальний реконструк
|
||||
block.multiplicative-reconstructor.name = Примножувальний реконструктор
|
||||
block.exponential-reconstructor.name = Експоненційний реконструктор
|
||||
block.tetrative-reconstructor.name = Тетративний реконструктор
|
||||
block.mass-conveyor.name = Вантажний конвеєр
|
||||
block.payload-conveyor.name = Вантажний конвеєр
|
||||
block.payload-router.name = Розвантажувальний маршрутизатор
|
||||
block.disassembler.name = Розбирач
|
||||
block.silicon-crucible.name = Кремнієвий тигель
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -1062,7 +1062,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Mass Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
||||
@@ -285,3 +285,5 @@
|
||||
63459=logic-display|block-logic-display-medium
|
||||
63458=switch|block-switch-medium
|
||||
63457=memory-cell|block-memory-cell-medium
|
||||
63456=payload-conveyor|block-payload-conveyor-medium
|
||||
63455=hyper-processor|block-hyper-processor-medium
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB |
@@ -5,8 +5,9 @@ const log = function(context, obj){
|
||||
}
|
||||
|
||||
const readString = path => Vars.mods.getScripts().readString(path)
|
||||
|
||||
const readBytes = path => Vars.mods.getScripts().readBytes(path)
|
||||
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
||||
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
||||
|
||||
var scriptName = "base.js"
|
||||
var modName = "none"
|
||||
|
||||
@@ -7,8 +7,9 @@ const log = function(context, obj){
|
||||
}
|
||||
|
||||
const readString = path => Vars.mods.getScripts().readString(path)
|
||||
|
||||
const readBytes = path => Vars.mods.getScripts().readBytes(path)
|
||||
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
||||
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
||||
|
||||
var scriptName = "base.js"
|
||||
var modName = "none"
|
||||
@@ -40,6 +41,7 @@ importPackage(Packages.arc)
|
||||
importPackage(Packages.arc.func)
|
||||
importPackage(Packages.arc.graphics)
|
||||
importPackage(Packages.arc.graphics.g2d)
|
||||
importPackage(Packages.arc.graphics.gl)
|
||||
importPackage(Packages.arc.math)
|
||||
importPackage(Packages.arc.math.geom)
|
||||
importPackage(Packages.arc.scene)
|
||||
@@ -128,8 +130,6 @@ const ConfigEvent = Packages.mindustry.game.EventType.ConfigEvent
|
||||
const DepositEvent = Packages.mindustry.game.EventType.DepositEvent
|
||||
const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent
|
||||
const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent
|
||||
const ZoneConfigureCompleteEvent = Packages.mindustry.game.EventType.ZoneConfigureCompleteEvent
|
||||
const ZoneRequireCompleteEvent = Packages.mindustry.game.EventType.ZoneRequireCompleteEvent
|
||||
const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
|
||||
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
|
||||
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
|
||||
|
||||
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 644 KiB After Width: | Height: | Size: 646 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 406 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 403 KiB After Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -63,6 +63,7 @@ public class BaseAI{
|
||||
int range = 150;
|
||||
|
||||
Position pos = randomPosition();
|
||||
|
||||
//when there are no random positions, do nothing.
|
||||
if(pos == null) return;
|
||||
|
||||
@@ -159,7 +160,10 @@ public class BaseAI{
|
||||
|
||||
private void tryWalls(){
|
||||
Block wall = Blocks.copperWall;
|
||||
Tile spawn = state.rules.defaultTeam.core() != null ? state.rules.defaultTeam.core().tile : data.team.core().tile;
|
||||
Building spawnt = state.rules.defaultTeam.core() != null ? state.rules.defaultTeam.core() : data.team.core();
|
||||
Tile spawn = spawnt == null ? null : spawnt.tile;
|
||||
|
||||
if(spawn == null) return;
|
||||
|
||||
for(int wx = lastX; wx <= lastX + lastW; wx++){
|
||||
for(int wy = lastY; wy <= lastY + lastH; wy++){
|
||||
|
||||
@@ -185,7 +185,7 @@ public class BlockIndexer{
|
||||
|
||||
if(other == null) continue;
|
||||
|
||||
if(other.team() == team && pred.get(other) && intSet.add(other.pos())){
|
||||
if(other.team == team && pred.get(other) && intSet.add(other.pos())){
|
||||
cons.get(other);
|
||||
any = true;
|
||||
}
|
||||
@@ -212,11 +212,11 @@ public class BlockIndexer{
|
||||
}
|
||||
|
||||
public void notifyTileDamaged(Building entity){
|
||||
if(damagedTiles[entity.team().id] == null){
|
||||
damagedTiles[entity.team().id] = new BuildingArray();
|
||||
if(damagedTiles[entity.team.id] == null){
|
||||
damagedTiles[entity.team.id] = new BuildingArray();
|
||||
}
|
||||
|
||||
damagedTiles[entity.team().id].add(entity);
|
||||
damagedTiles[entity.team.id].add(entity);
|
||||
}
|
||||
|
||||
public Building findEnemyTile(Team team, float x, float y, float range, Boolf<Building> pred){
|
||||
@@ -251,7 +251,7 @@ public class BlockIndexer{
|
||||
|
||||
if(e == null) continue;
|
||||
|
||||
if(e.team() != team || !pred.get(e) || !e.block().targetable)
|
||||
if(e.team != team || !pred.get(e) || !e.block().targetable)
|
||||
continue;
|
||||
|
||||
float ndst = e.dst2(x, y);
|
||||
@@ -390,7 +390,7 @@ public class BlockIndexer{
|
||||
for(int y = quadrantY * quadrantSize; y < world.height() && y < (quadrantY + 1) * quadrantSize; y++){
|
||||
Building result = world.build(x, y);
|
||||
//when a targetable block is found, mark this quadrant as occupied and stop searching
|
||||
if(result != null && result.team() == team){
|
||||
if(result != null && result.team == team){
|
||||
bits.set(quadrantX, quadrantY);
|
||||
break outer;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class WaveSpawner{
|
||||
|
||||
private void eachFlyerSpawn(Floatc2 cons){
|
||||
for(Tile tile : spawns){
|
||||
float angle = Angles.angle(tile.x, tile.y, world.width() / 2, world.height() / 2);
|
||||
float angle = Angles.angle(world.width() / 2, world.height() / 2, tile.x, tile.y);
|
||||
|
||||
float trns = Math.max(world.width(), world.height()) * Mathf.sqrt2 * tilesize;
|
||||
float spawnX = Mathf.clamp(world.width() * tilesize / 2f + Angles.trnsx(angle, trns), -margin, world.width() * tilesize + margin);
|
||||
|
||||
@@ -6,6 +6,8 @@ import mindustry.entities.units.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class FlyingAI extends AIController{
|
||||
|
||||
@Override
|
||||
@@ -18,7 +20,7 @@ public class FlyingAI extends AIController{
|
||||
unit.wobble();
|
||||
}
|
||||
|
||||
if(target != null && unit.hasWeapons()){
|
||||
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
|
||||
if(unit.type().weapons.first().rotate){
|
||||
moveTo(target, unit.range() * 0.8f);
|
||||
unit.lookAt(target);
|
||||
@@ -26,6 +28,15 @@ public class FlyingAI extends AIController{
|
||||
attack(80f);
|
||||
}
|
||||
}
|
||||
|
||||
if(target == null && command() == UnitCommand.attack && state.rules.waves && unit.team == state.rules.defaultTeam){
|
||||
moveTo(getClosestSpawner(), state.rules.dropZoneRadius + 120f);
|
||||
}
|
||||
|
||||
if(command() == UnitCommand.rally){
|
||||
target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);
|
||||
moveTo(target, 60f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,31 +1,55 @@
|
||||
package mindustry.ai.types;
|
||||
|
||||
import arc.math.*;
|
||||
import mindustry.ai.Pathfinder.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.pathfinder;
|
||||
import java.util.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class GroundAI extends AIController{
|
||||
//static final float commandCooldown = 60f * 10;
|
||||
//float commandTimer = 60*3;
|
||||
|
||||
@Override
|
||||
public void updateMovement(){
|
||||
|
||||
Building core = unit.closestEnemyCore();
|
||||
|
||||
if(core != null){
|
||||
if(unit.within(core,unit.range() / 1.1f)){
|
||||
target = core;
|
||||
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
|
||||
target = core;
|
||||
Arrays.fill(targets, core);
|
||||
}
|
||||
|
||||
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
||||
boolean move = true;
|
||||
|
||||
if(state.rules.waves && unit.team == state.rules.defaultTeam){
|
||||
Tile spawner = getClosestSpawner();
|
||||
if(spawner != null && unit.within(spawner, state.rules.dropZoneRadius + 120f)) move = false;
|
||||
}
|
||||
|
||||
if(!unit.within(core, unit.range() * 0.5f)){
|
||||
moveToCore(FlagTarget.enemyCores);
|
||||
if(move) moveToCore(FlagTarget.enemyCores);
|
||||
}
|
||||
|
||||
if(command() == UnitCommand.rally){
|
||||
Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);
|
||||
|
||||
if(target != null && !unit.within(target, 70f)){
|
||||
moveToCore(FlagTarget.rallyPoints);
|
||||
}
|
||||
}
|
||||
|
||||
if(unit.type().canBoost){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, 0.08f);
|
||||
}
|
||||
|
||||
if(!Units.invalidateTarget(target, unit, unit.range())){
|
||||
if(unit.type().hasWeapons()){
|
||||
unit.aimLook(Predict.intercept(unit, target, unit.type().weapons.first().bullet.speed));
|
||||
@@ -33,12 +57,27 @@ public class GroundAI extends AIController{
|
||||
}else if(unit.moving()){
|
||||
unit.lookAt(unit.vel().angle());
|
||||
}
|
||||
|
||||
//auto-command works but it's very buggy
|
||||
/*
|
||||
if(unit instanceof Commanderc){
|
||||
Commanderc c = (Commanderc)unit;
|
||||
//try to command when missing members
|
||||
if(c.controlling().size <= unit.type().commandLimit/2){
|
||||
commandTimer -= Time.delta;
|
||||
|
||||
if(commandTimer <= 0){
|
||||
c.commandNearby(new SquareFormation(), u -> !(u.controller() instanceof FormationAI) && !(u instanceof Commanderc));
|
||||
commandTimer = commandCooldown;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
protected void moveToCore(FlagTarget path){
|
||||
Tile tile = unit.tileOn();
|
||||
if(tile == null) return;
|
||||
Tile targetTile = pathfinder.getTargetTile(tile, unit.team(), path);
|
||||
Tile targetTile = pathfinder.getTargetTile(tile, unit.team, path);
|
||||
|
||||
if(tile == targetTile) return;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SuicideAI extends GroundAI{
|
||||
boolean blocked = Vars.world.raycast(unit.tileX(), unit.tileY(), target.tileX(), target.tileY(), (x, y) -> {
|
||||
Tile tile = Vars.world.tile(x, y);
|
||||
if(tile != null && tile.build == target) return false;
|
||||
if(tile != null && tile.build != null && tile.build.team() != unit.team()){
|
||||
if(tile != null && tile.build != null && tile.build.team != unit.team()){
|
||||
blockedByBlock = true;
|
||||
return true;
|
||||
}else{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mindustry.async;
|
||||
|
||||
import arc.*;
|
||||
import arc.box2d.*;
|
||||
import arc.box2d.BodyDef.*;
|
||||
import arc.math.geom.*;
|
||||
@@ -98,7 +97,7 @@ public class PhysicsProcess implements AsyncProcess{
|
||||
ref.lastVelocity.set(ref.velocity);
|
||||
}
|
||||
|
||||
physics.step(Core.graphics.getDeltaTime(), 5, 8);
|
||||
physics.step(1f/45f, 5, 8);
|
||||
|
||||
//get delta vectors
|
||||
for(PhysicRef ref : refs){
|
||||
|
||||
@@ -19,6 +19,7 @@ public class MusicControl{
|
||||
public Seq<Music> ambientMusic = Seq.with();
|
||||
/** darker music, used in times of conflict */
|
||||
public Seq<Music> darkMusic = Seq.with();
|
||||
|
||||
protected Music lastRandomPlayed;
|
||||
protected Interval timer = new Interval();
|
||||
protected @Nullable Music current;
|
||||
|
||||
@@ -19,7 +19,6 @@ import mindustry.world.blocks.experimental.*;
|
||||
import mindustry.world.blocks.legacy.*;
|
||||
import mindustry.world.blocks.liquid.*;
|
||||
import mindustry.world.blocks.logic.*;
|
||||
import mindustry.world.blocks.logic.MessageBlock;
|
||||
import mindustry.world.blocks.power.*;
|
||||
import mindustry.world.blocks.production.*;
|
||||
import mindustry.world.blocks.sandbox.*;
|
||||
@@ -78,12 +77,13 @@ public class Blocks implements ContentList{
|
||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, segment, parallax,
|
||||
|
||||
//units
|
||||
commandCenter,
|
||||
groundFactory, airFactory, navalFactory,
|
||||
additiveReconstructor, multiplicativeReconstructor, exponentialReconstructor, tetrativeReconstructor,
|
||||
repairPoint, resupplyPoint,
|
||||
|
||||
//logic
|
||||
message, switchBlock, microProcessor, logicProcessor, logicDisplay, memoryCell,
|
||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, logicDisplay, memoryCell,
|
||||
|
||||
//campaign
|
||||
launchPad, launchPadLarge,
|
||||
@@ -270,7 +270,7 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
grass = new Floor("grass"){{
|
||||
|
||||
attributes.set(Attribute.water, 0.1f);
|
||||
}};
|
||||
|
||||
salt = new Floor("salt"){{
|
||||
@@ -908,6 +908,7 @@ public class Blocks implements ContentList{
|
||||
health = 45;
|
||||
speed = 0.03f;
|
||||
displayedSpeed = 4.2f;
|
||||
buildCostMultiplier = 2f;
|
||||
}};
|
||||
|
||||
titaniumConveyor = new Conveyor("titanium-conveyor"){{
|
||||
@@ -995,12 +996,14 @@ public class Blocks implements ContentList{
|
||||
consumes.power(1.75f);
|
||||
}};
|
||||
|
||||
payloadConveyor = new PayloadConveyor("mass-conveyor"){{
|
||||
requirements(Category.distribution, with(Items.copper, 1));
|
||||
payloadConveyor = new PayloadConveyor("payload-conveyor"){{
|
||||
requirements(Category.distribution, with(Items.graphite, 10, Items.copper, 20));
|
||||
canOverdrive = false;
|
||||
}};
|
||||
|
||||
payloadRouter = new PayloadRouter("payload-router"){{
|
||||
requirements(Category.distribution, with(Items.copper, 1));
|
||||
requirements(Category.distribution, with(Items.graphite, 15, Items.copper, 20));
|
||||
canOverdrive = false;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
@@ -1338,7 +1341,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
unloader = new Unloader("unloader"){{
|
||||
requirements(Category.effect, with(Items.titanium, 25, Items.silicon, 30));
|
||||
speed = 7f;
|
||||
speed = 6f;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
@@ -1485,7 +1488,7 @@ public class Blocks implements ContentList{
|
||||
reloadTime = 35f;
|
||||
shootCone = 40f;
|
||||
rotatespeed = 8f;
|
||||
powerUse = 5f;
|
||||
powerUse = 4f;
|
||||
targetAir = false;
|
||||
range = 90f;
|
||||
shootEffect = Fx.lightningShoot;
|
||||
@@ -1501,8 +1504,8 @@ public class Blocks implements ContentList{
|
||||
|
||||
hasPower = true;
|
||||
size = 2;
|
||||
force = 2.5f;
|
||||
scaledForce = 5f;
|
||||
force = 3f;
|
||||
scaledForce = 5.5f;
|
||||
range = 170f;
|
||||
damage = 0.08f;
|
||||
health = 160 * size * size;
|
||||
@@ -1555,14 +1558,14 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
segment = new PointDefenseTurret("segment"){{
|
||||
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 50));
|
||||
requirements(Category.turret, with(Items.silicon, 130, Items.thorium, 80, Items.phasefabric, 25));
|
||||
|
||||
hasPower = true;
|
||||
consumes.power(3f);
|
||||
size = 2;
|
||||
shootLength = 5f;
|
||||
bulletDamage = 12f;
|
||||
reloadTime = 25f;
|
||||
reloadTime = 20f;
|
||||
health = 190 * size * size;
|
||||
}};
|
||||
|
||||
@@ -1698,11 +1701,17 @@ public class Blocks implements ContentList{
|
||||
//endregion
|
||||
//region units
|
||||
|
||||
commandCenter = new CommandCenter("command-center"){{
|
||||
requirements(Category.units, ItemStack.with(Items.copper, 200, Items.lead, 250, Items.silicon, 250, Items.graphite, 100));
|
||||
size = 2;
|
||||
health = size * size * 55;
|
||||
}};
|
||||
|
||||
groundFactory = new UnitFactory("ground-factory"){{
|
||||
requirements(Category.units, with(Items.copper, 50, Items.lead, 120, Items.silicon, 80));
|
||||
plans = new UnitPlan[]{
|
||||
new UnitPlan(UnitTypes.dagger, 60f * 20, with(Items.silicon, 10, Items.lead, 10)),
|
||||
new UnitPlan(UnitTypes.crawler, 60f * 15, with(Items.silicon, 10, Items.coal, 20)),
|
||||
new UnitPlan(UnitTypes.dagger, 60f * 15, with(Items.silicon, 10, Items.lead, 10)),
|
||||
new UnitPlan(UnitTypes.crawler, 60f * 12, with(Items.silicon, 10, Items.coal, 20)),
|
||||
new UnitPlan(UnitTypes.nova, 60f * 40, with(Items.silicon, 30, Items.lead, 20, Items.titanium, 20)),
|
||||
};
|
||||
size = 3;
|
||||
@@ -1710,7 +1719,7 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
airFactory = new UnitFactory("air-factory"){{
|
||||
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
|
||||
requirements(Category.units, with(Items.copper, 60, Items.lead, 70));
|
||||
plans = new UnitPlan[]{
|
||||
new UnitPlan(UnitTypes.flare, 60f * 15, with(Items.silicon, 15)),
|
||||
new UnitPlan(UnitTypes.mono, 60f * 35, with(Items.silicon, 30, Items.lead, 15)),
|
||||
@@ -1720,7 +1729,7 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
navalFactory = new UnitFactory("naval-factory"){{
|
||||
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
|
||||
requirements(Category.units, with(Items.copper, 150, Items.lead, 130, Items.metaglass, 120));
|
||||
plans = new UnitPlan[]{
|
||||
new UnitPlan(UnitTypes.risso, 60f * 30f, with(Items.silicon, 20, Items.metaglass, 25)),
|
||||
};
|
||||
@@ -1768,11 +1777,11 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
exponentialReconstructor = new Reconstructor("exponential-reconstructor"){{
|
||||
requirements(Category.units, with(Items.lead, 2000, Items.silicon, 750, Items.titanium, 950, Items.thorium, 450, Items.plastanium, 350, Items.phasefabric, 250));
|
||||
requirements(Category.units, with(Items.lead, 2000, Items.silicon, 750, Items.titanium, 950, Items.thorium, 450, Items.plastanium, 350, Items.phasefabric, 450));
|
||||
|
||||
size = 7;
|
||||
consumes.power(12f);
|
||||
consumes.items(with(Items.silicon, 250, Items.titanium, 500, Items.plastanium, 400));
|
||||
consumes.power(13f);
|
||||
consumes.items(with(Items.silicon, 450, Items.titanium, 550, Items.plastanium, 550));
|
||||
consumes.liquid(Liquids.cryofluid, 1f);
|
||||
|
||||
constructTime = 60f * 60f * 1.5f;
|
||||
@@ -1780,15 +1789,16 @@ public class Blocks implements ContentList{
|
||||
|
||||
upgrades = new UnitType[][]{
|
||||
{UnitTypes.zenith, UnitTypes.antumbra},
|
||||
{UnitTypes.spiroct, UnitTypes.arkyid},
|
||||
};
|
||||
}};
|
||||
|
||||
tetrativeReconstructor = new Reconstructor("tetrative-reconstructor"){{
|
||||
requirements(Category.units, with(Items.lead, 4000, Items.silicon, 1500, Items.thorium, 500, Items.plastanium, 50, Items.phasefabric, 600, Items.surgealloy, 500));
|
||||
requirements(Category.units, with(Items.lead, 4000, Items.silicon, 1500, Items.thorium, 500, Items.plastanium, 450, Items.phasefabric, 600, Items.surgealloy, 500));
|
||||
|
||||
size = 9;
|
||||
consumes.power(25f);
|
||||
consumes.items(with(Items.silicon, 350, Items.plastanium, 450, Items.surgealloy, 400, Items.phasefabric, 150));
|
||||
consumes.items(with(Items.silicon, 350, Items.plastanium, 550, Items.surgealloy, 350, Items.phasefabric, 150));
|
||||
consumes.liquid(Liquids.cryofluid, 3f);
|
||||
|
||||
constructTime = 60f * 60f * 4;
|
||||
@@ -1861,7 +1871,6 @@ public class Blocks implements ContentList{
|
||||
//looked up by name, no ref needed
|
||||
new LegacyMechPad("legacy-mech-pad");
|
||||
new LegacyUnitFactory("legacy-unit-factory");
|
||||
new LegacyCommandCenter("legacy-command-center");
|
||||
|
||||
//endregion
|
||||
//region campaign
|
||||
@@ -1897,7 +1906,7 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
microProcessor = new LogicBlock("micro-processor"){{
|
||||
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 60));
|
||||
requirements(Category.logic, with(Items.copper, 80, Items.lead, 50, Items.silicon, 50));
|
||||
|
||||
instructionsPerTick = 2;
|
||||
|
||||
@@ -1905,15 +1914,28 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
logicProcessor = new LogicBlock("logic-processor"){{
|
||||
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 140, Items.graphite, 80, Items.thorium, 70));
|
||||
requirements(Category.logic, with(Items.lead, 320, Items.silicon, 100, Items.graphite, 60, Items.thorium, 50));
|
||||
|
||||
instructionsPerTick = 5;
|
||||
|
||||
range = 16 * 10;
|
||||
range = 8 * 20;
|
||||
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
hyperProcessor = new LogicBlock("hyper-processor"){{
|
||||
requirements(Category.logic, with(Items.lead, 450, Items.silicon, 150, Items.thorium, 75, Items.surgealloy, 50));
|
||||
|
||||
consumes.liquid(Liquids.cryofluid, 0.08f);
|
||||
hasLiquids = true;
|
||||
|
||||
instructionsPerTick = 25;
|
||||
|
||||
range = 8 * 40;
|
||||
|
||||
size = 3;
|
||||
}};
|
||||
|
||||
logicDisplay = new LogicDisplay("logic-display"){{
|
||||
requirements(Category.logic, with(Items.copper, 200, Items.lead, 120, Items.silicon, 100, Items.metaglass, 50));
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public class Bullets implements ContentList{
|
||||
width = 6f;
|
||||
height = 8f;
|
||||
hitEffect = Fx.flakExplosion;
|
||||
splashDamage = 20f;
|
||||
splashDamage = 22f;
|
||||
splashDamageRadius = 20f;
|
||||
fragBullet = flakGlassFrag;
|
||||
fragBullets = 5;
|
||||
@@ -240,7 +240,7 @@ public class Bullets implements ContentList{
|
||||
explodeRange = 20f;
|
||||
}};
|
||||
|
||||
missileExplosive = new MissileBulletType(3f, 10){{
|
||||
missileExplosive = new MissileBulletType(3.7f, 10){{
|
||||
width = 8f;
|
||||
height = 8f;
|
||||
shrinkY = 0f;
|
||||
@@ -255,7 +255,7 @@ public class Bullets implements ContentList{
|
||||
statusDuration = 60f;
|
||||
}};
|
||||
|
||||
missileIncendiary = new MissileBulletType(3f, 12){{
|
||||
missileIncendiary = new MissileBulletType(3.7f, 12){{
|
||||
frontColor = Pal.lightishOrange;
|
||||
backColor = Pal.lightOrange;
|
||||
width = 7f;
|
||||
@@ -269,7 +269,7 @@ public class Bullets implements ContentList{
|
||||
status = StatusEffects.burning;
|
||||
}};
|
||||
|
||||
missileSurge = new MissileBulletType(3f, 20){{
|
||||
missileSurge = new MissileBulletType(3.7f, 20){{
|
||||
width = 8f;
|
||||
height = 8f;
|
||||
shrinkY = 0f;
|
||||
@@ -279,7 +279,7 @@ public class Bullets implements ContentList{
|
||||
hitEffect = Fx.blastExplosion;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
lightning = 2;
|
||||
lightningLength = 14;
|
||||
lightningLength = 10;
|
||||
}};
|
||||
|
||||
standardCopper = new BasicBulletType(2.5f, 9){{
|
||||
|
||||
@@ -33,8 +33,10 @@ public class Fx{
|
||||
float scl = 1f + e.fout() * 2f;
|
||||
|
||||
UnitType unit = e.data();
|
||||
rect(unit.region, e.x, e.y,
|
||||
unit.region.getWidth() * Draw.scl * scl, unit.region.getHeight() * Draw.scl * scl, 180f);
|
||||
TextureRegion region = unit.icon(Cicon.full);
|
||||
|
||||
rect(region, e.x, e.y,
|
||||
region.getWidth() * Draw.scl * scl, region.getHeight() * Draw.scl * scl, 180f);
|
||||
|
||||
}),
|
||||
|
||||
@@ -512,6 +514,29 @@ public class Fx{
|
||||
|
||||
}),
|
||||
|
||||
sapExplosion = new Effect(25, e -> {
|
||||
|
||||
color(Pal.sapBullet);
|
||||
e.scaled(6, i -> {
|
||||
stroke(3f * i.fout());
|
||||
Lines.circle(e.x, e.y, 3f + i.fin() * 80f);
|
||||
});
|
||||
|
||||
color(Color.gray);
|
||||
|
||||
randLenVectors(e.id, 9, 2f + 70 * e.finpow(), (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f);
|
||||
});
|
||||
|
||||
color(Pal.sapBulletBack);
|
||||
stroke(1f * e.fout());
|
||||
|
||||
randLenVectors(e.id + 1, 8, 1f + 60f * e.finpow(), (x, y) -> {
|
||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||
});
|
||||
|
||||
}),
|
||||
|
||||
massiveExplosion = new Effect(30, e -> {
|
||||
|
||||
color(Pal.missileYellow);
|
||||
|
||||
@@ -17,7 +17,7 @@ import static mindustry.content.UnitTypes.*;
|
||||
import static mindustry.type.ItemStack.*;
|
||||
|
||||
public class TechTree implements ContentList{
|
||||
private static ObjectMap<UnlockableContent, TechNode> map = new ObjectMap<>();
|
||||
static ObjectMap<UnlockableContent, TechNode> map = new ObjectMap<>();
|
||||
|
||||
public static Seq<TechNode> all;
|
||||
public static TechNode root;
|
||||
@@ -38,7 +38,6 @@ public class TechTree implements ContentList{
|
||||
node(distributor);
|
||||
node(sorter, () -> {
|
||||
node(invertedSorter);
|
||||
node(message);
|
||||
node(overflowGate, () -> {
|
||||
node(underflowGate);
|
||||
});
|
||||
@@ -204,6 +203,26 @@ public class TechTree implements ContentList{
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(microProcessor, () -> {
|
||||
node(switchBlock, () -> {
|
||||
node(message, () -> {
|
||||
node(logicDisplay, () -> {
|
||||
|
||||
});
|
||||
|
||||
node(memoryCell, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
node(logicProcessor, () -> {
|
||||
node(hyperProcessor, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -340,6 +359,10 @@ public class TechTree implements ContentList{
|
||||
});
|
||||
|
||||
node(groundFactory, () -> {
|
||||
node(commandCenter, () -> {
|
||||
|
||||
});
|
||||
|
||||
node(dagger, () -> {
|
||||
node(mace, () -> {
|
||||
node(fortress, () -> {
|
||||
@@ -406,8 +429,6 @@ public class TechTree implements ContentList{
|
||||
});
|
||||
});
|
||||
|
||||
//TODO research sectors
|
||||
|
||||
node(groundZero, () -> {
|
||||
node(frozenForest, Seq.with(
|
||||
new SectorComplete(groundZero),
|
||||
@@ -544,7 +565,7 @@ public class TechTree implements ContentList{
|
||||
}
|
||||
|
||||
public static class TechNode{
|
||||
private static TechNode context;
|
||||
static TechNode context;
|
||||
|
||||
/** Depth in tech tree. */
|
||||
public int depth;
|
||||
@@ -556,25 +577,20 @@ public class TechTree implements ContentList{
|
||||
public ItemStack[] requirements;
|
||||
/** Requirements that have been fulfilled. Always the same length as the requirement array. */
|
||||
public final ItemStack[] finishedRequirements;
|
||||
/** Extra objectives needed to research this. TODO implement */
|
||||
/** Extra objectives needed to research this. */
|
||||
public Seq<Objective> objectives = new Seq<>();
|
||||
/** Time required to research this content, in seconds. */
|
||||
public float time;
|
||||
/** Nodes that depend on this node. */
|
||||
public final Seq<TechNode> children = new Seq<>();
|
||||
/** Research progress, in seconds. */
|
||||
public float progress;
|
||||
|
||||
TechNode(@Nullable TechNode ccontext, UnlockableContent content, ItemStack[] requirements, Runnable children){
|
||||
if(ccontext != null){
|
||||
ccontext.children.add(this);
|
||||
}
|
||||
if(ccontext != null) ccontext.children.add(this);
|
||||
|
||||
this.parent = ccontext;
|
||||
this.content = content;
|
||||
this.requirements = requirements;
|
||||
this.depth = parent == null ? 0 : parent.depth + 1;
|
||||
this.progress = Core.settings == null ? 0 : Core.settings.getFloat("research-" + content.name, 0f);
|
||||
this.time = Seq.with(requirements).mapFloat(i -> i.item.cost * i.amount).sum() * 10;
|
||||
this.finishedRequirements = new ItemStack[requirements.length];
|
||||
|
||||
@@ -599,7 +615,6 @@ public class TechTree implements ContentList{
|
||||
|
||||
/** Flushes research progress to settings. */
|
||||
public void save(){
|
||||
Core.settings.put("research-" + content.name, progress);
|
||||
|
||||
//save finished requirements by item type
|
||||
for(ItemStack stack : finishedRequirements){
|
||||
|
||||
@@ -27,7 +27,7 @@ public class UnitTypes implements ContentList{
|
||||
public static @EntityDef({Unitc.class, Legsc.class}) UnitType atrax;
|
||||
|
||||
//legs + building
|
||||
public static @EntityDef({Unitc.class, Legsc.class, Builderc.class}) UnitType spiroct, arkyid;
|
||||
public static @EntityDef({Unitc.class, Legsc.class, Builderc.class}) UnitType spiroct, arkyid, toxopid;
|
||||
|
||||
//air (no special traits)
|
||||
public static @EntityDef({Unitc.class}) UnitType flare, eclipse, horizon, zenith, antumbra;
|
||||
@@ -72,7 +72,6 @@ public class UnitTypes implements ContentList{
|
||||
mace = new UnitType("mace"){{
|
||||
speed = 0.4f;
|
||||
hitsize = 9f;
|
||||
range = 10f;
|
||||
health = 500;
|
||||
armor = 4f;
|
||||
|
||||
@@ -84,12 +83,11 @@ public class UnitTypes implements ContentList{
|
||||
reload = 14f;
|
||||
recoil = 1f;
|
||||
ejectEffect = Fx.none;
|
||||
bullet = new BulletType(3f, 30f){{
|
||||
bullet = new BulletType(3.9f, 30f){{
|
||||
ammoMultiplier = 3f;
|
||||
hitSize = 7f;
|
||||
lifetime = 42f;
|
||||
lifetime = 12f;
|
||||
pierce = true;
|
||||
drag = 0.05f;
|
||||
statusDuration = 60f * 4;
|
||||
shootEffect = Fx.shootSmallFlame;
|
||||
hitEffect = Fx.hitFlameSmall;
|
||||
@@ -165,7 +163,7 @@ public class UnitTypes implements ContentList{
|
||||
boostMultiplier = 1.5f;
|
||||
speed = 0.48f;
|
||||
hitsize = 10f;
|
||||
health = 300f;
|
||||
health = 320f;
|
||||
buildSpeed = 0.9f;
|
||||
armor = 4f;
|
||||
|
||||
@@ -173,7 +171,7 @@ public class UnitTypes implements ContentList{
|
||||
mineSpeed = 5f;
|
||||
commandLimit = 8;
|
||||
|
||||
abilities.add(new ShieldFieldAbility(15f, 30f, 60f * 5, 60f));
|
||||
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 5, 60f));
|
||||
|
||||
weapons.add(new Weapon("heal-shotgun-weapon"){{
|
||||
x = 5f;
|
||||
@@ -193,7 +191,7 @@ public class UnitTypes implements ContentList{
|
||||
|
||||
bullet = new LightningBulletType(){{
|
||||
lightningColor = hitColor = Pal.heal;
|
||||
damage = 12f;
|
||||
damage = 15f;
|
||||
lightningLength = 7;
|
||||
lightningLengthRand = 7;
|
||||
shootEffect = Fx.shootHeal;
|
||||
@@ -206,7 +204,7 @@ public class UnitTypes implements ContentList{
|
||||
hitsize = 12f;
|
||||
boostMultiplier = 2f;
|
||||
itemCapacity = 80;
|
||||
health = 640f;
|
||||
health = 650f;
|
||||
buildSpeed = 1.7f;
|
||||
canBoost = true;
|
||||
armor = 9f;
|
||||
@@ -219,7 +217,7 @@ public class UnitTypes implements ContentList{
|
||||
mineSpeed = 7f;
|
||||
drawShields = false;
|
||||
|
||||
abilities.add(new ForceFieldAbility(60f, 0.12f, 200f, 60f * 8));
|
||||
abilities.add(new ForceFieldAbility(60f, 0.2f, 300f, 60f * 7));
|
||||
|
||||
weapons.add(new Weapon("beam-weapon"){{
|
||||
shake = 2f;
|
||||
@@ -230,7 +228,7 @@ public class UnitTypes implements ContentList{
|
||||
shootSound = Sounds.laser;
|
||||
|
||||
bullet = new LaserBulletType(){{
|
||||
damage = 27f;
|
||||
damage = 30f;
|
||||
recoil = 1f;
|
||||
sideAngle = 45f;
|
||||
sideWidth = 1f;
|
||||
@@ -316,7 +314,7 @@ public class UnitTypes implements ContentList{
|
||||
drag = 0.4f;
|
||||
hitsize = 12f;
|
||||
rotateSpeed = 3f;
|
||||
health = 600;
|
||||
health = 760;
|
||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
||||
legCount = 6;
|
||||
legLength = 13f;
|
||||
@@ -352,7 +350,7 @@ public class UnitTypes implements ContentList{
|
||||
despawnEffect = Fx.none;
|
||||
width = 0.54f;
|
||||
lifetime = 35f;
|
||||
knockback = -1.2f;
|
||||
knockback = -1.24f;
|
||||
}};
|
||||
}});
|
||||
|
||||
@@ -365,62 +363,109 @@ public class UnitTypes implements ContentList{
|
||||
bullet = new SapBulletType(){{
|
||||
sapStrength = 0.65f;
|
||||
length = 40f;
|
||||
damage = 12;
|
||||
damage = 13;
|
||||
shootEffect = Fx.shootSmall;
|
||||
hitColor = color = Color.valueOf("bf92f9");
|
||||
despawnEffect = Fx.none;
|
||||
width = 0.4f;
|
||||
lifetime = 25f;
|
||||
knockback = -0.6f;
|
||||
knockback = -0.65f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
|
||||
//TODO implement
|
||||
arkyid = new UnitType("arkyid"){{
|
||||
drag = 0.1f;
|
||||
speed = 0.5f;
|
||||
hitsize = 9f;
|
||||
health = 140;
|
||||
hitsize = 21f;
|
||||
health = 8000;
|
||||
armor = 6f;
|
||||
|
||||
legCount = 6;
|
||||
legMoveSpace = 1f;
|
||||
legPairOffset = 3;
|
||||
legLength = 34f;
|
||||
rotateShooting = false;
|
||||
legLength = 30f;
|
||||
legExtension = -15;
|
||||
legBaseOffset = 10f;
|
||||
landShake = 2f;
|
||||
landShake = 1f;
|
||||
legSpeed = 0.1f;
|
||||
legLengthScl = 1f;
|
||||
rippleScale = 2f;
|
||||
legSpeed = 0.2f;
|
||||
|
||||
legSplashDamage = 32;
|
||||
legSplashRange = 30;
|
||||
|
||||
hovering = true;
|
||||
allowLegStep = true;
|
||||
visualElevation = 0.4f;
|
||||
groundLayer = Layer.legUnit;
|
||||
|
||||
BulletType sapper = new SapBulletType(){{
|
||||
sapStrength = 0.8f;
|
||||
length = 55f;
|
||||
damage = 34;
|
||||
shootEffect = Fx.shootSmall;
|
||||
hitColor = color = Color.valueOf("bf92f9");
|
||||
despawnEffect = Fx.none;
|
||||
width = 0.55f;
|
||||
lifetime = 30f;
|
||||
knockback = -1f;
|
||||
}};
|
||||
|
||||
weapons.add(
|
||||
new Weapon("missiles-mount"){{
|
||||
reload = 20f;
|
||||
new Weapon("spiroct-weapon"){{
|
||||
reload = 9f;
|
||||
x = 4f;
|
||||
y = 8f;
|
||||
rotate = true;
|
||||
shake = 1f;
|
||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||
width = 8f;
|
||||
height = 8f;
|
||||
shrinkY = 0f;
|
||||
drag = -0.003f;
|
||||
homingRange = 60f;
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 10f;
|
||||
lifetime = 120f;
|
||||
trailColor = Color.gray;
|
||||
backColor = Pal.bulletYellowBack;
|
||||
frontColor = Pal.bulletYellow;
|
||||
hitEffect = Fx.blastExplosion;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
weaveScale = 8f;
|
||||
weaveMag = 2f;
|
||||
bullet = sapper;
|
||||
}},
|
||||
new Weapon("spiroct-weapon"){{
|
||||
reload = 15f;
|
||||
x = 9f;
|
||||
y = 6f;
|
||||
rotate = true;
|
||||
bullet = sapper;
|
||||
}},
|
||||
new Weapon("spiroct-weapon"){{
|
||||
reload = 23f;
|
||||
x = 14f;
|
||||
y = 0f;
|
||||
rotate = true;
|
||||
bullet = sapper;
|
||||
}},
|
||||
new Weapon("large-purple-mount"){{
|
||||
y = -7f;
|
||||
x = 9f;
|
||||
shootY = 7f;
|
||||
reload = 45;
|
||||
shake = 3f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.shellEjectSmall;
|
||||
shootSound = Sounds.shootBig;
|
||||
rotate = true;
|
||||
occlusion = 8f;
|
||||
recoil = 3f;
|
||||
|
||||
bullet = new ArtilleryBulletType(2f, 12){{
|
||||
hitEffect = Fx.sapExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 70f;
|
||||
width = height = 19f;
|
||||
collidesTiles = false;
|
||||
ammoMultiplier = 4f;
|
||||
splashDamageRadius = 95f;
|
||||
splashDamage = 55f;
|
||||
backColor = Pal.sapBulletBack;
|
||||
frontColor = lightningColor = Pal.sapBullet;
|
||||
lightning = 3;
|
||||
lightningLength = 10;
|
||||
smokeEffect = Fx.shootBigSmoke2;
|
||||
shake = 5f;
|
||||
|
||||
status = StatusEffects.sapped;
|
||||
statusDuration = 60f * 10;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
@@ -448,7 +493,7 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
horizon = new UnitType("horizon"){{
|
||||
health = 300;
|
||||
health = 350;
|
||||
speed = 2f;
|
||||
accel = 0.08f;
|
||||
drag = 0.016f;
|
||||
@@ -457,19 +502,19 @@ public class UnitTypes implements ContentList{
|
||||
engineOffset = 7.8f;
|
||||
range = 140f;
|
||||
faceTarget = false;
|
||||
armor = 2f;
|
||||
armor = 4f;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
minShootVelocity = 0.75f;
|
||||
x = 3f;
|
||||
shootY = 0f;
|
||||
reload = 12f;
|
||||
reload = 11f;
|
||||
shootCone = 180f;
|
||||
ejectEffect = Fx.none;
|
||||
inaccuracy = 15f;
|
||||
ignoreRotation = true;
|
||||
shootSound = Sounds.none;
|
||||
bullet = new BombBulletType(23f, 25f){{
|
||||
bullet = new BombBulletType(28f, 25f){{
|
||||
width = 10f;
|
||||
height = 14f;
|
||||
hitEffect = Fx.flakExplosion;
|
||||
@@ -483,21 +528,21 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
zenith = new UnitType("zenith"){{
|
||||
health = 1000;
|
||||
speed = 1.9f;
|
||||
health = 700;
|
||||
speed = 1.7f;
|
||||
accel = 0.04f;
|
||||
drag = 0.016f;
|
||||
flying = true;
|
||||
range = 140f;
|
||||
hitsize = 18f;
|
||||
lowAltitude = true;
|
||||
armor = 6f;
|
||||
armor = 5f;
|
||||
|
||||
engineOffset = 12f;
|
||||
engineSize = 3f;
|
||||
|
||||
weapons.add(new Weapon("zenith-missiles"){{
|
||||
reload = 32f;
|
||||
reload = 40f;
|
||||
x = 7f;
|
||||
rotate = true;
|
||||
shake = 1f;
|
||||
@@ -533,21 +578,21 @@ public class UnitTypes implements ContentList{
|
||||
rotateSpeed = 1.9f;
|
||||
flying = true;
|
||||
lowAltitude = true;
|
||||
health = 9000;
|
||||
health = 7000;
|
||||
armor = 9f;
|
||||
engineOffset = 21;
|
||||
engineSize = 5.3f;
|
||||
hitsize = 58f;
|
||||
hitsize = 56f;
|
||||
|
||||
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
||||
width = 8f;
|
||||
height = 8f;
|
||||
shrinkY = 0f;
|
||||
drag = -0.01f;
|
||||
splashDamageRadius = 40f;
|
||||
splashDamage = 40f;
|
||||
splashDamageRadius = 20f;
|
||||
splashDamage = 30f;
|
||||
ammoMultiplier = 4f;
|
||||
lifetime = 80f;
|
||||
lifetime = 50f;
|
||||
hitEffect = Fx.blastExplosion;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
|
||||
@@ -581,17 +626,18 @@ public class UnitTypes implements ContentList{
|
||||
new Weapon("large-bullet-mount"){{
|
||||
y = 2f;
|
||||
x = 10f;
|
||||
shootY = 12f;
|
||||
reload = 10;
|
||||
shootY = 10f;
|
||||
reload = 12;
|
||||
shake = 1f;
|
||||
rotateSpeed = 2f;
|
||||
ejectEffect = Fx.shellEjectSmall;
|
||||
shootSound = Sounds.shootBig;
|
||||
rotate = true;
|
||||
occlusion = 8f;
|
||||
bullet = new BasicBulletType(7f, 60){{
|
||||
bullet = new BasicBulletType(7f, 50){{
|
||||
width = 12f;
|
||||
height = 18f;
|
||||
lifetime = 25f;
|
||||
shootEffect = Fx.shootBig;
|
||||
}};
|
||||
}}
|
||||
@@ -612,6 +658,18 @@ public class UnitTypes implements ContentList{
|
||||
destructibleWreck = false;
|
||||
armor = 13f;
|
||||
|
||||
BulletType fragBullet = new FlakBulletType(4f, 5){{
|
||||
shootEffect = Fx.shootBig;
|
||||
ammoMultiplier = 4f;
|
||||
splashDamage = 42f;
|
||||
splashDamageRadius = 25f;
|
||||
collidesGround = true;
|
||||
lifetime = 38f;
|
||||
|
||||
status = StatusEffects.blasted;
|
||||
statusDuration = 60f;
|
||||
}};
|
||||
|
||||
weapons.add(
|
||||
new Weapon("large-laser-mount"){{
|
||||
shake = 4f;
|
||||
@@ -619,14 +677,14 @@ public class UnitTypes implements ContentList{
|
||||
x = 18f;
|
||||
y = 5f;
|
||||
rotateSpeed = 2f;
|
||||
reload = 50f;
|
||||
reload = 45f;
|
||||
recoil = 4f;
|
||||
shootSound = Sounds.laser;
|
||||
occlusion = 20f;
|
||||
rotate = true;
|
||||
|
||||
bullet = new LaserBulletType(){{
|
||||
damage = 75f;
|
||||
damage = 90f;
|
||||
sideAngle = 20f;
|
||||
sideWidth = 1.5f;
|
||||
sideLength = 80f;
|
||||
@@ -636,50 +694,29 @@ public class UnitTypes implements ContentList{
|
||||
colors = new Color[]{Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.white};
|
||||
}};
|
||||
}},
|
||||
new Weapon("missiles-mount"){{
|
||||
new Weapon("large-artillery"){{
|
||||
x = 11f;
|
||||
y = 27f;
|
||||
rotateSpeed = 2f;
|
||||
reload = 4f;
|
||||
reload = 9f;
|
||||
shootSound = Sounds.flame;
|
||||
occlusion = 7f;
|
||||
rotate = true;
|
||||
recoil = 0.5f;
|
||||
|
||||
bullet = Bullets.pyraFlame;
|
||||
bullet = fragBullet;
|
||||
}},
|
||||
new Weapon("large-artillery"){{
|
||||
y = -13f;
|
||||
x = 20f;
|
||||
reload = 18f;
|
||||
reload = 12f;
|
||||
ejectEffect = Fx.shellEjectSmall;
|
||||
rotateSpeed = 7f;
|
||||
shake = 1f;
|
||||
shootSound = Sounds.shoot;
|
||||
rotate = true;
|
||||
occlusion = 12f;
|
||||
bullet = new ArtilleryBulletType(3.2f, 12){{
|
||||
trailMult = 0.8f;
|
||||
hitEffect = Fx.massiveExplosion;
|
||||
knockback = 1.5f;
|
||||
lifetime = 140f;
|
||||
height = 12f;
|
||||
width = 12f;
|
||||
collidesTiles = false;
|
||||
ammoMultiplier = 4f;
|
||||
splashDamageRadius = 60f;
|
||||
splashDamage = 60f;
|
||||
backColor = Pal.missileYellowBack;
|
||||
frontColor = Pal.missileYellow;
|
||||
trailEffect = Fx.artilleryTrail;
|
||||
trailSize = 6f;
|
||||
hitShake = 4f;
|
||||
|
||||
shootEffect = Fx.shootBig2;
|
||||
|
||||
status = StatusEffects.blasted;
|
||||
statusDuration = 60f;
|
||||
}};
|
||||
bullet = fragBullet;
|
||||
}});
|
||||
}};
|
||||
|
||||
@@ -1001,7 +1038,7 @@ public class UnitTypes implements ContentList{
|
||||
lifetime = 60f;
|
||||
shootEffect = Fx.shootSmall;
|
||||
smokeEffect = Fx.shootSmallSmoke;
|
||||
tileDamageMultiplier = 0.95f;
|
||||
tileDamageMultiplier = 0.09f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
@@ -1092,6 +1129,7 @@ public class UnitTypes implements ContentList{
|
||||
hitsize = 0f;
|
||||
health = 1;
|
||||
rotateSpeed = 360f;
|
||||
itemCapacity = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -243,11 +243,11 @@ public class ContentLoader{
|
||||
}
|
||||
|
||||
public Block block(int id){
|
||||
return (Block)getByID(ContentType.block, id);
|
||||
return getByID(ContentType.block, id);
|
||||
}
|
||||
|
||||
public Block block(String name){
|
||||
return (Block)getByName(ContentType.block, name);
|
||||
return getByName(ContentType.block, name);
|
||||
}
|
||||
|
||||
public Seq<Item> items(){
|
||||
@@ -255,7 +255,7 @@ public class ContentLoader{
|
||||
}
|
||||
|
||||
public Item item(int id){
|
||||
return (Item)getByID(ContentType.item, id);
|
||||
return getByID(ContentType.item, id);
|
||||
}
|
||||
|
||||
public Seq<Liquid> liquids(){
|
||||
@@ -263,7 +263,7 @@ public class ContentLoader{
|
||||
}
|
||||
|
||||
public Liquid liquid(int id){
|
||||
return (Liquid)getByID(ContentType.liquid, id);
|
||||
return getByID(ContentType.liquid, id);
|
||||
}
|
||||
|
||||
public Seq<BulletType> bullets(){
|
||||
@@ -271,7 +271,7 @@ public class ContentLoader{
|
||||
}
|
||||
|
||||
public BulletType bullet(int id){
|
||||
return (BulletType)getByID(ContentType.bullet, id);
|
||||
return getByID(ContentType.bullet, id);
|
||||
}
|
||||
|
||||
public Seq<SectorPreset> sectors(){
|
||||
|
||||
@@ -155,12 +155,6 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(ZoneRequireCompleteEvent.class, e -> {
|
||||
if(e.objective.display() != null){
|
||||
ui.hudfrag.showToast(Core.bundle.format("zone.requirement.complete", e.zoneForMet.localizedName, e.objective.display()));
|
||||
}
|
||||
});
|
||||
|
||||
//delete save on campaign game over
|
||||
Events.on(GameOverEvent.class, e -> {
|
||||
if(state.isCampaign() && !net.client() && !headless){
|
||||
|
||||
@@ -302,6 +302,11 @@ public class Logic implements ApplicationListener{
|
||||
});
|
||||
}
|
||||
|
||||
@Remote(called = Loc.both)
|
||||
public static void updateGameOver(Team winner){
|
||||
state.gameOver = true;
|
||||
}
|
||||
|
||||
@Remote(called = Loc.both)
|
||||
public static void gameOver(Team winner){
|
||||
state.stats.wavesLasted = state.wave;
|
||||
@@ -320,6 +325,10 @@ public class Logic implements ApplicationListener{
|
||||
Events.fire(Trigger.update);
|
||||
universe.updateGlobal();
|
||||
|
||||
if(Core.settings.modified() && !state.isPlaying()){
|
||||
Core.settings.forceSave();
|
||||
}
|
||||
|
||||
if(state.isGame()){
|
||||
if(!net.client()){
|
||||
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.type().isCounted);
|
||||
|
||||
@@ -366,6 +366,9 @@ public class NetClient implements ApplicationListener{
|
||||
|
||||
@Remote
|
||||
public static void playerDisconnect(int playerid){
|
||||
if(netClient != null){
|
||||
netClient.addRemovedEntity(playerid);
|
||||
}
|
||||
Groups.player.removeByID(playerid);
|
||||
}
|
||||
|
||||
@@ -437,13 +440,14 @@ public class NetClient implements ApplicationListener{
|
||||
}
|
||||
|
||||
@Remote(variants = Variant.one, priority = PacketPriority.low, unreliable = true)
|
||||
public static void stateSnapshot(float waveTime, int wave, int enemies, boolean paused, short coreDataLen, byte[] coreData){
|
||||
public static void stateSnapshot(float waveTime, int wave, int enemies, boolean paused, boolean gameOver, short coreDataLen, byte[] coreData){
|
||||
try{
|
||||
if(wave > state.wave){
|
||||
state.wave = wave;
|
||||
Events.fire(new WaveEvent());
|
||||
}
|
||||
|
||||
state.gameOver = gameOver;
|
||||
state.wavetime = waveTime;
|
||||
state.wave = wave;
|
||||
state.enemies = enemies;
|
||||
@@ -558,6 +562,22 @@ public class NetClient implements ApplicationListener{
|
||||
//limit to 10 to prevent buffer overflows
|
||||
int usedRequests = Math.min(player.builder().plans().size, 10);
|
||||
|
||||
int totalLength = 0;
|
||||
|
||||
//prevent buffer overflow by checking config length
|
||||
for(int i = 0; i < usedRequests; i++){
|
||||
BuildPlan plan = player.builder().plans().get(i);
|
||||
if(plan.config instanceof byte[]){
|
||||
int length = ((byte[])plan.config).length;
|
||||
totalLength += length;
|
||||
}
|
||||
|
||||
if(totalLength > 2048){
|
||||
usedRequests = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
requests = new BuildPlan[usedRequests];
|
||||
for(int i = 0; i < usedRequests; i++){
|
||||
requests[i] = player.builder().plans().get(i);
|
||||
|
||||
@@ -34,8 +34,9 @@ import static arc.util.Log.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class NetServer implements ApplicationListener{
|
||||
private static final int maxSnapshotSize = 430, timerBlockSync = 0;
|
||||
private static final float serverSyncTime = 12, blockSyncTime = 60 * 8;
|
||||
/** note that snapshots are compressed, so the max snapshot size here is above the typical UDP safe limit */
|
||||
private static final int maxSnapshotSize = 800, timerBlockSync = 0;
|
||||
private static final float serverSyncTime = 12, blockSyncTime = 60 * 6;
|
||||
private static final FloatBuffer fbuffer = FloatBuffer.allocate(20);
|
||||
private static final Vec2 vector = new Vec2();
|
||||
private static final Rect viewport = new Rect();
|
||||
@@ -370,6 +371,11 @@ public class NetServer implements ApplicationListener{
|
||||
return;
|
||||
}
|
||||
|
||||
if(currentlyKicking[0] != null){
|
||||
player.sendMessage("[scarlet]A vote is already in progress.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.length == 0){
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("[orange]Players to kick: \n");
|
||||
@@ -384,9 +390,7 @@ public class NetServer implements ApplicationListener{
|
||||
int id = Strings.parseInt(args[0].substring(1));
|
||||
found = Groups.player.find(p -> p.id() == id);
|
||||
}else{
|
||||
found = Groups.player.find(p -> {
|
||||
return p.name.equalsIgnoreCase(args[0]);
|
||||
});
|
||||
found = Groups.player.find(p -> p.name.equalsIgnoreCase(args[0]));
|
||||
}
|
||||
|
||||
if(found != null){
|
||||
@@ -526,6 +530,10 @@ public class NetServer implements ApplicationListener{
|
||||
public static void serverPacketUnreliable(Player player, String type, String contents){
|
||||
serverPacketReliable(player, type, contents);
|
||||
}
|
||||
|
||||
private static boolean invalid(float f){
|
||||
return Float.isInfinite(f) || Float.isNaN(f);
|
||||
}
|
||||
|
||||
@Remote(targets = Loc.client, unreliable = true)
|
||||
public static void clientSnapshot(
|
||||
@@ -544,6 +552,16 @@ public class NetServer implements ApplicationListener{
|
||||
NetConnection con = player.con;
|
||||
if(con == null || snapshotID < con.lastReceivedClientSnapshot) return;
|
||||
|
||||
//validate coordinates just in case
|
||||
if(invalid(x)) x = 0f;
|
||||
if(invalid(y)) y = 0f;
|
||||
if(invalid(xVelocity)) xVelocity = 0f;
|
||||
if(invalid(yVelocity)) yVelocity = 0f;
|
||||
if(invalid(pointerX)) pointerX = 0f;
|
||||
if(invalid(pointerY)) pointerY = 0f;
|
||||
if(invalid(rotation)) rotation = 0f;
|
||||
if(invalid(baseRotation)) baseRotation = 0f;
|
||||
|
||||
boolean verifyPosition = !player.dead() && netServer.admins.getStrict() && headless;
|
||||
|
||||
if(con.lastReceivedClientTime == 0) con.lastReceivedClientTime = Time.millis() - 16;
|
||||
@@ -612,12 +630,12 @@ public class NetServer implements ApplicationListener{
|
||||
if(!player.dead()){
|
||||
Unit unit = player.unit();
|
||||
|
||||
unit.vel.set(xVelocity, yVelocity).limit(unit.type().speed);
|
||||
long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime);
|
||||
float maxSpeed = (boosting ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed;
|
||||
float maxSpeed = ((player.unit().type().canBoost && player.unit().isFlying()) ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed;
|
||||
if(unit.isGrounded()){
|
||||
maxSpeed *= unit.floorSpeedMultiplier();
|
||||
}
|
||||
unit.vel.set(xVelocity, yVelocity).limit(maxSpeed);
|
||||
float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f;
|
||||
|
||||
if(con.lastUnit != unit){
|
||||
@@ -681,8 +699,8 @@ public class NetServer implements ApplicationListener{
|
||||
public static void adminRequest(Player player, Player other, AdminAction action){
|
||||
|
||||
if(!player.admin){
|
||||
Log.warn("ACCESS DENIED: Player @ / @ attempted to perform admin action without proper security access.",
|
||||
player.name, player.con.address);
|
||||
Log.warn("ACCESS DENIED: Player @ / @ attempted to perform admin action '@' on '@' without proper security access.",
|
||||
player.name, player.con.address, action.name(), other == null ? null : other.name);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -735,7 +753,7 @@ public class NetServer implements ApplicationListener{
|
||||
}
|
||||
|
||||
public boolean isWaitingForPlayers(){
|
||||
if(state.rules.pvp){
|
||||
if(state.rules.pvp && !state.gameOver){
|
||||
int used = 0;
|
||||
for(TeamData t : state.teams.getActive()){
|
||||
if(Groups.player.count(p -> p.team() == t.team) > 0){
|
||||
@@ -761,6 +779,10 @@ public class NetServer implements ApplicationListener{
|
||||
}
|
||||
|
||||
if(state.isGame() && net.server()){
|
||||
if(state.rules.pvp){
|
||||
state.serverPaused = isWaitingForPlayers();
|
||||
}
|
||||
|
||||
sync();
|
||||
}
|
||||
}
|
||||
@@ -794,7 +816,7 @@ public class NetServer implements ApplicationListener{
|
||||
if(!entity.block().sync) continue;
|
||||
sent ++;
|
||||
|
||||
dataStream.writeInt(entity.tile().pos());
|
||||
dataStream.writeInt(entity.pos());
|
||||
entity.writeAll(Writes.get(dataStream));
|
||||
|
||||
if(syncStream.size() > maxSnapshotSize){
|
||||
@@ -828,7 +850,7 @@ public class NetServer implements ApplicationListener{
|
||||
byte[] stateBytes = syncStream.toByteArray();
|
||||
|
||||
//write basic state data.
|
||||
Call.stateSnapshot(player.con, state.wavetime, state.wave, state.enemies, state.serverPaused, (short)stateBytes.length, net.compressSnapshot(stateBytes));
|
||||
Call.stateSnapshot(player.con, state.wavetime, state.wave, state.enemies, state.serverPaused, state.gameOver, (short)stateBytes.length, net.compressSnapshot(stateBytes));
|
||||
|
||||
viewport.setSize(player.con.viewWidth, player.con.viewHeight).setCenter(player.con.viewX, player.con.viewY);
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ public class Renderer implements ApplicationListener{
|
||||
}
|
||||
|
||||
public void draw(){
|
||||
Events.fire(Trigger.preDraw);
|
||||
|
||||
camera.update();
|
||||
|
||||
if(Float.isNaN(camera.position.x) || Float.isNaN(camera.position.y)){
|
||||
@@ -205,6 +207,8 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
Draw.sort(true);
|
||||
|
||||
Events.fire(Trigger.draw);
|
||||
|
||||
if(pixelator.enabled()){
|
||||
pixelator.register();
|
||||
}
|
||||
@@ -254,6 +258,8 @@ public class Renderer implements ApplicationListener{
|
||||
Draw.reset();
|
||||
Draw.flush();
|
||||
Draw.sort(false);
|
||||
|
||||
Events.fire(Trigger.postDraw);
|
||||
}
|
||||
|
||||
private void drawBackground(){
|
||||
|
||||
@@ -128,6 +128,8 @@ public class UI implements ApplicationListener, Loadable{
|
||||
public void update(){
|
||||
if(disableUI || Core.scene == null) return;
|
||||
|
||||
Events.fire(Trigger.uiDrawBegin);
|
||||
|
||||
Core.scene.act();
|
||||
Core.scene.draw();
|
||||
|
||||
@@ -143,6 +145,8 @@ public class UI implements ApplicationListener, Loadable{
|
||||
control.tutorial.draw();
|
||||
Draw.flush();
|
||||
}
|
||||
|
||||
Events.fire(Trigger.uiDrawEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -221,12 +225,15 @@ public class UI implements ApplicationListener, Loadable{
|
||||
}
|
||||
|
||||
public TextureRegionDrawable getIcon(String name){
|
||||
if(Icon.icons.containsKey(name)){
|
||||
return Icon.icons.get(name);
|
||||
}
|
||||
if(Icon.icons.containsKey(name)) return Icon.icons.get(name);
|
||||
return Core.atlas.getDrawable("error");
|
||||
}
|
||||
|
||||
public TextureRegionDrawable getIcon(String name, String def){
|
||||
if(Icon.icons.containsKey(name)) return Icon.icons.get(name);
|
||||
return getIcon(def);
|
||||
}
|
||||
|
||||
public void loadAnd(Runnable call){
|
||||
loadAnd("@loading", call);
|
||||
}
|
||||
|
||||
@@ -484,6 +484,9 @@ public class World{
|
||||
|
||||
private class Context implements WorldContext{
|
||||
|
||||
Context(){
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tile tile(int index){
|
||||
return tiles.geti(index);
|
||||
|
||||
@@ -37,18 +37,18 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
private Pixmap pixmap;
|
||||
private Texture texture;
|
||||
private GenerateInput input = new GenerateInput();
|
||||
private Seq<GenerateFilter> filters = new Seq<>();
|
||||
Seq<GenerateFilter> filters = new Seq<>();
|
||||
private int scaling = mobile ? 3 : 1;
|
||||
private Table filterTable;
|
||||
|
||||
private AsyncExecutor executor = new AsyncExecutor(1);
|
||||
private AsyncResult<Void> result;
|
||||
private boolean generating;
|
||||
boolean generating;
|
||||
private GenTile returnTile = new GenTile();
|
||||
|
||||
private GenTile[][] buffer1, buffer2;
|
||||
private Cons<Seq<GenerateFilter>> applier;
|
||||
private CachedTile ctile = new CachedTile(){
|
||||
CachedTile ctile = new CachedTile(){
|
||||
//nothing.
|
||||
@Override
|
||||
protected void changeEntity(Team team, Prov<Building> entityprov, int rotation){
|
||||
@@ -178,7 +178,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
add(new Image(Styles.black8));
|
||||
add(new Image(Icon.refresh, Scaling.none));
|
||||
visible(() -> generating && !updateEditorOnChange);
|
||||
}}).grow().padRight(10);
|
||||
}}).uniformX().grow().padRight(10);
|
||||
t.pane(p -> filterTable = p.marginRight(6)).update(pane -> {
|
||||
if(Core.scene.getKeyboardFocus() instanceof Dialog && Core.scene.getKeyboardFocus() != this){
|
||||
return;
|
||||
@@ -191,7 +191,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
}else{
|
||||
Core.scene.setScrollFocus(null);
|
||||
}
|
||||
}).grow().get().setScrollingDisabled(true, false);
|
||||
}).grow().uniformX().get().setScrollingDisabled(true, false);
|
||||
}).grow();
|
||||
|
||||
buffer1 = create();
|
||||
@@ -213,7 +213,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
}
|
||||
|
||||
void rebuildFilters(){
|
||||
int cols = Math.max((int)(Math.max(filterTable.parent.getWidth(), Core.graphics.getWidth()/2f * 0.9f) / Scl.scl(290f)), 1);
|
||||
int cols = Math.max((int)(Core.graphics.getWidth()/2f / Scl.scl(290f)), 1);
|
||||
filterTable.clearChildren();
|
||||
filterTable.top().left();
|
||||
int i = 0;
|
||||
@@ -229,7 +229,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
t.setColor(Pal.gray);
|
||||
|
||||
t.top().left();
|
||||
t.add(filter.name()).left().padLeft(6);
|
||||
t.add(filter.name()).left().padLeft(6).width(100f).wrap();
|
||||
|
||||
t.add().growX();
|
||||
|
||||
@@ -408,6 +408,9 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
public byte team;
|
||||
public short block, floor, ore;
|
||||
|
||||
GenTile(){
|
||||
}
|
||||
|
||||
public void set(Block floor, Block wall, Block ore, Team team){
|
||||
this.floor = floor.id;
|
||||
this.block = wall.id;
|
||||
|
||||