Merge branch 'master' into master

This commit is contained in:
Felix Corvus
2020-09-20 16:56:36 +03:00
committed by GitHub
66 changed files with 2074 additions and 1857 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 904 B

After

Width:  |  Height:  |  Size: 671 B

View File

@@ -20,7 +20,8 @@ gameover = Game Over
gameover.pvp = The[accent] {0}[] team is victorious! gameover.pvp = The[accent] {0}[] team is victorious!
highscore = [accent]New highscore! highscore = [accent]New highscore!
copied = Copied. copied = Copied.
indevpopup = [accent]v6[] is currently in [accent]alpha[].\n[lightgray]This means:[]\n[scarlet]- The campaign is completely unfinished[]\n- Content is missing\n - Most [scarlet]Unit AI[] does not work properly\n- Many units are unfinished\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[]. indev.popup = [accent]v6[] is currently in [accent]alpha[].\n[lightgray]This means:[]\n[scarlet]- The campaign is completely unfinished[]\n- Content is missing\n - Most [scarlet]Unit AI[] does not work properly\n- Many units are unfinished\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[].
indev.notready = This part of the game isn't ready yet
load.sound = Sounds load.sound = Sounds
load.map = Maps load.map = Maps
@@ -615,6 +616,8 @@ blocks.inaccuracy = Inaccuracy
blocks.shots = Shots blocks.shots = Shots
blocks.reload = Shots/Second blocks.reload = Shots/Second
blocks.ammo = Ammo blocks.ammo = Ammo
blocks.shieldhealth = Shield Health
blocks.cooldowntime = Cooldown Time
bar.drilltierreq = Better Drill Required bar.drilltierreq = Better Drill Required
bar.noresources = Missing Resources bar.noresources = Missing Resources
@@ -662,6 +665,7 @@ unit.persecond = /sec
unit.perminute = /min unit.perminute = /min
unit.timesspeed = x speed unit.timesspeed = x speed
unit.percent = % unit.percent = %
unit.shieldhealth = shield health
unit.items = items unit.items = items
unit.thousands = k unit.thousands = k
unit.millions = mil unit.millions = mil
@@ -789,6 +793,9 @@ keybind.diagonal_placement.name = Diagonal Placement
keybind.pick.name = Pick Block keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.pickupCargo.name = Pickup Cargo
keybind.dropCargo.name = Drop Cargo
keybind.command.name = Command
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
@@ -1002,7 +1009,6 @@ block.dark-metal.name = Dark Metal
block.basalt.name = Basalt block.basalt.name = Basalt
block.hotrock.name = Hot Rock block.hotrock.name = Hot Rock
block.magmarock.name = Magma Rock block.magmarock.name = Magma Rock
block.cliffs.name = Cliffs
block.copper-wall.name = Copper Wall block.copper-wall.name = Copper Wall
block.copper-wall-large.name = Large Copper Wall block.copper-wall-large.name = Large Copper Wall
block.titanium-wall.name = Titanium Wall block.titanium-wall.name = Titanium Wall

View File

@@ -868,6 +868,8 @@ unit.mega.name = 메가
unit.risso.name = 리소 unit.risso.name = 리소
unit.minke.name = 민케 unit.minke.name = 민케
unit.bryde.name = 브리드 unit.bryde.name = 브리드
unit.sei.name = 세이
unit.omura.name = 오무라
unit.alpha.name = 알파 unit.alpha.name = 알파
unit.beta.name = 베타 unit.beta.name = 베타
unit.gamma.name = 감마 unit.gamma.name = 감마
@@ -878,21 +880,21 @@ block.sand-boulder.name = 사암
block.grass.name = 잔디 block.grass.name = 잔디
block.slag.name = 광재 block.slag.name = 광재
block.salt.name = 소금 block.salt.name = 소금
block.saltrocks.name = 소금 바위 block.salt-wall.name = 소금
block.pebbles.name = 조약돌 block.pebbles.name = 조약돌
block.tendrils.name = 덩굴 block.tendrils.name = 덩굴
block.sandrocks.name = 모래 바위 block.sand-wall.name = 모래
block.spore-pine.name = 포자 덮인 소나무 block.spore-pine.name = 포자 덮인 소나무
block.sporerocks.name = 포자 바위 block.spore-wall.name = 포자
block.rock.name = block.boulder.name =
block.snowrock.name = 눈덩이 block.snow-boulder.name = 눈덩이
block.snow-pine.name = 눈 덮인 소나무 block.snow-pine.name = 눈 덮인 소나무
block.shale.name = 이판암 block.shale.name = 이판암
block.shale-boulder.name = 둥근 이판암 block.shale-boulder.name = 둥근 이판암
block.moss.name = 이끼 block.moss.name = 이끼
block.shrubs.name = 관목 block.shrubs.name = 관목
block.spore-moss.name = 포자 이끼 block.spore-moss.name = 포자 이끼
block.shalerocks.name = 이판암 바위 block.shale-wall.name = 이판암
block.scrap-wall.name = 조각벽 block.scrap-wall.name = 조각벽
block.scrap-wall-large.name = 대형 조각벽 block.scrap-wall-large.name = 대형 조각벽
block.scrap-wall-huge.name = 거대한 조각 벽 block.scrap-wall-huge.name = 거대한 조각 벽
@@ -911,6 +913,7 @@ block.water.name = 물
block.tainted-water.name = 오염된 물 block.tainted-water.name = 오염된 물
block.darksand-tainted-water.name = 오염된 젖은 검은 모래 block.darksand-tainted-water.name = 오염된 젖은 검은 모래
block.tar.name = 석유 block.tar.name = 석유
block.mud.name = 진흙
block.stone.name = 바위 block.stone.name = 바위
block.sand.name = 모래 block.sand.name = 모래
block.darksand.name = 검은 모래 block.darksand.name = 검은 모래
@@ -920,13 +923,16 @@ block.craters.name = 구덩이
block.sand-water.name = 젖은 모래 block.sand-water.name = 젖은 모래
block.darksand-water.name = 젖은 검은 모래 block.darksand-water.name = 젖은 검은 모래
block.char.name = block.char.name =
block.holostone.name = 홀로스톤 block.dacite.name = 데이사이트
block.dacite-wall.name = 데이사이트 벽
block.ice-snow.name = 얼음눈 block.ice-snow.name = 얼음눈
block.rocks.name = block.stone-wall.name =
block.icerocks.name = 얼음바위 block.ice-wall.name = 얼음
block.snowrocks.name = 바위 block.snow-wall.name =
block.dunerocks.name = 모래 block.dune-wall.name = 모래
block.pine.name = 소나무 block.pine.name = 소나무
block.dirt.name =
block.dirt-wall.name = 흙 벽
block.white-tree-dead.name = 죽은 하얀나무 block.white-tree-dead.name = 죽은 하얀나무
block.white-tree.name = 하얀 나무 block.white-tree.name = 하얀 나무
block.spore-cluster.name = 포자낭 block.spore-cluster.name = 포자낭
@@ -942,7 +948,7 @@ block.dark-panel-4.name = 어두운 패널 4
block.dark-panel-5.name = 어두운 패널 5 block.dark-panel-5.name = 어두운 패널 5
block.dark-panel-6.name = 어두운 패널 6 block.dark-panel-6.name = 어두운 패널 6
block.dark-metal.name = 어두운 금속제 block.dark-metal.name = 어두운 금속제
block.ignarock.name = 얼은 바위 block.basalt.name = 현무암
block.hotrock.name = 뜨거운 바위 block.hotrock.name = 뜨거운 바위
block.magmarock.name = 용암 바위 block.magmarock.name = 용암 바위
block.cliffs.name = 절벽 block.cliffs.name = 절벽
@@ -1012,7 +1018,7 @@ block.power-void.name = 방전장치
block.power-source.name = 전력 공급기 block.power-source.name = 전력 공급기
block.unloader.name = 언로더 block.unloader.name = 언로더
block.vault.name = 창고 block.vault.name = 창고
block.wave.name = 웨이브 block.wave.name = 파도
block.swarmer.name = 스워머 block.swarmer.name = 스워머
block.salvo.name = 살보 block.salvo.name = 살보
block.ripple.name = 립플 block.ripple.name = 립플
@@ -1020,7 +1026,7 @@ block.phase-conveyor.name = 메타 컨베이어
block.bridge-conveyor.name = 다리 컨베이어 block.bridge-conveyor.name = 다리 컨베이어
block.plastanium-compressor.name = 플라스터늄 압축기 block.plastanium-compressor.name = 플라스터늄 압축기
block.pyratite-mixer.name = 파이라타이트 혼합기 block.pyratite-mixer.name = 파이라타이트 혼합기
block.blast-mixer.name = 화합물 혼합기 block.blast-mixer.name = 폭발물 혼합기
block.solar-panel.name = 태양 전지판 block.solar-panel.name = 태양 전지판
block.solar-panel-large.name = 대형 태양 전지판 block.solar-panel-large.name = 대형 태양 전지판
block.oil-extractor.name = 석유 추출기 block.oil-extractor.name = 석유 추출기
@@ -1063,11 +1069,11 @@ block.additive-reconstructor.name = 첨가물 재구성기
block.multiplicative-reconstructor.name = 다중 재구성기 block.multiplicative-reconstructor.name = 다중 재구성기
block.exponential-reconstructor.name = 지수 재구성기 block.exponential-reconstructor.name = 지수 재구성기
block.tetrative-reconstructor.name = 정서 재구성기 block.tetrative-reconstructor.name = 정서 재구성기
block.payload-conveyor.name = 매스 컨베이어 block.payload-conveyor.name = 화물 컨베이어
block.payload-router.name = 화물 분배기 block.payload-router.name = 화물 분배기
block.disassembler.name = 분해기 block.disassembler.name = 가속 분해기
block.silicon-crucible.name = 실리콘 도가니 block.silicon-crucible.name = 실리콘 도가니
block.large-overdrive-projector.name = 대형 과부하 프로젝터 block.overdrive-dome.name = 대형 과부하 프로젝터
team.blue.name = 파랑색 팀 team.blue.name = 파랑색 팀
team.crux.name = 빨강색 팀 team.crux.name = 빨강색 팀
team.sharded.name = 주황색 팀 team.sharded.name = 주황색 팀
@@ -1100,7 +1106,7 @@ tutorial.launch = 특정 웨이브에 도달하면 [accent]코어로 출격[]
item.copper.description = 가장 기본적인 건설 재료. 모든 유형의 블록에서 광범위하게 사용됩니다. item.copper.description = 가장 기본적인 건설 재료. 모든 유형의 블록에서 광범위하게 사용됩니다.
item.lead.description = 기본 초반 재료. 전자 및 액체 수송 블록에서 광범위하게 사용되는 자원입니다. item.lead.description = 기본 초반 재료. 전자 및 액체 수송 블록에서 광범위하게 사용되는 자원입니다.
item.metaglass.description = 초강력 유리 화합물. 액체 분배 및 저장에 광범위하게 사용됩니다. item.metaglass.description = 초강력 방탄 유리. 액체 분배 및 저장에 광범위하게 사용됩니다.
item.graphite.description = 탄약 및 전기 부품에 사용되는 무기질 탄소. item.graphite.description = 탄약 및 전기 부품에 사용되는 무기질 탄소.
item.sand.description = 제련에서 합금 또는 플럭스에서 광범위하게 사용되는 일반적인 재료. item.sand.description = 제련에서 합금 또는 플럭스에서 광범위하게 사용되는 일반적인 재료.
item.coal.description = 화석화된 식물 물질. 씨앗이 나오기 훨씬 전에 형성되었습니다. 연료 및 자원 생산에 광범위하게 사용됩니다. item.coal.description = 화석화된 식물 물질. 씨앗이 나오기 훨씬 전에 형성되었습니다. 연료 및 자원 생산에 광범위하게 사용됩니다.
@@ -1128,7 +1134,7 @@ block.plastanium-compressor.description = 석유와 티타늄으로 플라스터
block.phase-weaver.description = 방사성 토륨과 모래에서 메타를 합성합니다. 작동하려면 엄청난 양의 전력이 필요합니다. block.phase-weaver.description = 방사성 토륨과 모래에서 메타를 합성합니다. 작동하려면 엄청난 양의 전력이 필요합니다.
block.alloy-smelter.description = 티타늄, 납, 실리콘, 구리를 결합하여 설금을 생산합니다. block.alloy-smelter.description = 티타늄, 납, 실리콘, 구리를 결합하여 설금을 생산합니다.
block.cryofluidmixer.description = 물과 미세 티타늄 분말을 냉각수로 혼합합니다. 토륨 원자로 사용에 필수적입니다. block.cryofluidmixer.description = 물과 미세 티타늄 분말을 냉각수로 혼합합니다. 토륨 원자로 사용에 필수적입니다.
block.blast-mixer.description = 포자 클러스터를 파이라타이트와 분쇄하고 혼합하여 화합물을 만듭니다. block.blast-mixer.description = 포자 클러스터를 파이라타이트와 분쇄하고 혼합하여 폭발물을 만듭니다.
block.pyratite-mixer.description = 석탄, 납, 모래를 가연성이 높은 파이라타이트로 만듭니다. block.pyratite-mixer.description = 석탄, 납, 모래를 가연성이 높은 파이라타이트로 만듭니다.
block.melter.description = 웨이브 포탑에서 추가 처리 또는 사용을 위해 고철을 광재로 녹입니다. block.melter.description = 웨이브 포탑에서 추가 처리 또는 사용을 위해 고철을 광재로 녹입니다.
block.separator.description = 광재를 미네랄 성분으로 분리합니다. 그리고 냉각된 결과를 출력합니다. block.separator.description = 광재를 미네랄 성분으로 분리합니다. 그리고 냉각된 결과를 출력합니다.
@@ -1195,7 +1201,7 @@ block.combustion-generator.description = 석탄과 같은 가연성 물질을
block.thermal-generator.description = 열이 있는 곳에 설치하면 전력이 생성됩니다. block.thermal-generator.description = 열이 있는 곳에 설치하면 전력이 생성됩니다.
block.steam-generator.description = 고급 연소 발전기. 더 효율적이지만 증기를 생성하기 위해 물이 필요합니다. block.steam-generator.description = 고급 연소 발전기. 더 효율적이지만 증기를 생성하기 위해 물이 필요합니다.
block.differential-generator.description = 많은 양의 전력을 생성합니다. 냉각수와 불타는 파이라타이트의 온도 차이를 이용합니다. block.differential-generator.description = 많은 양의 전력을 생성합니다. 냉각수와 불타는 파이라타이트의 온도 차이를 이용합니다.
block.rtg-generator.description = 간단하고 안정적인 발전기. 붕괴하는 방사성 화합물의 열을 이용하여 느린 속도로 전력을 생성합니다. block.rtg-generator.description = 간단하고 안정적인 발전기. 붕괴하는 방사성 물의 열을 이용하여 느린 속도로 전력을 생성합니다.
block.solar-panel.description = 태양으로부터 소량의 전력을 생성합니다. block.solar-panel.description = 태양으로부터 소량의 전력을 생성합니다.
block.solar-panel-large.description = 표준 태양 전지판보다 훨씬 더 효율적인 버전. block.solar-panel-large.description = 표준 태양 전지판보다 훨씬 더 효율적인 버전.
block.thorium-reactor.description = 토륨으로부터 상당한 양의 전력을 생산합니다. 지속적인 냉각이 필요하며, 충분한 양의 냉각수가 공급되지 않으면 크게 폭발합니다. 전력 출력은 토륨의 양에 따라 달라집니다. block.thorium-reactor.description = 토륨으로부터 상당한 양의 전력을 생산합니다. 지속적인 냉각이 필요하며, 충분한 양의 냉각수가 공급되지 않으면 크게 폭발합니다. 전력 출력은 토륨의 양에 따라 달라집니다.
@@ -1229,5 +1235,5 @@ block.ripple.description = 매우 강력한 포병 포탑. 원거리에 있는
block.cyclone.description = 대공 및 대지 포탑. 근처 유닛에게 폭발성 덩어리를 발사합니다. block.cyclone.description = 대공 및 대지 포탑. 근처 유닛에게 폭발성 덩어리를 발사합니다.
block.spectre.description = 거대한 이중 배럴 대포. 공중 및 지상 목표물에 큰 관통 철갑탄을 발사합니다. block.spectre.description = 거대한 이중 배럴 대포. 공중 및 지상 목표물에 큰 관통 철갑탄을 발사합니다.
block.meltdown.description = 거대한 레이저 대포. 근처의 적에게 지속적인 레이버 빔을 충전하여 발사합니다. 냉각수가 있어야 작동합니다. block.meltdown.description = 거대한 레이저 대포. 근처의 적에게 지속적인 레이버 빔을 충전하여 발사합니다. 냉각수가 있어야 작동합니다.
block.repair-point.description = 주변에서 가장 가까운 유닛을 지속적으로 치료합니다. block.repair-point.description = 주변에서 가장 가까운 유닛을 지속적으로 치료합니다.
block.segment.description = 날아오는 발사체를 요격합니다. 레이저는 목표 대상이 아닙니다. block.segment.description = 날아오는 발사체를 요격합니다. 레이저는 목표 대상이 아닙니다.

View File

@@ -20,7 +20,7 @@ gameover = Jocul s-a încheiat
gameover.pvp = Echipa [accent] {0}[] este câștigătoare! gameover.pvp = Echipa [accent] {0}[] este câștigătoare!
highscore = [accent]Scor maxim nou! highscore = [accent]Scor maxim nou!
copied = Copiat. copied = Copiat.
indevpopup = [accent]v6[] este momentan în [accent]alpha[].\n[lightgray]Asta înseamnă că:[]\n[scarlet]- Campania este complet neterminată[]\n- Majoritatea [scarlet]AI-ului unităților[] nu funcționează bine\n- Multe unități sunt neterminate\n- Modul campanie nu este terminat \n- Tot ce vedeți se poate schimba sau poate fi eliminat.\n\nPentru a raporta buguri și crashuri intrați pe [accent]Github[]. indev.popup = [accent]v6[] este momentan în [accent]alpha[].\n[lightgray]Asta înseamnă că:[]\n[scarlet]- Campania este complet neterminată[]\n- Majoritatea [scarlet]AI-ului unităților[] nu funcționează bine\n- Multe unități sunt neterminate\n- Modul campanie nu este terminat \n- Tot ce vedeți se poate schimba sau poate fi eliminat.\n\nPentru a raporta buguri și crashuri intrați pe [accent]Github[].
load.sound = Sunete load.sound = Sunete
load.map = Hărți load.map = Hărți

View File

@@ -20,7 +20,8 @@ gameover = Игра окончена
gameover.pvp = [accent]{0}[] команда победила! gameover.pvp = [accent]{0}[] команда победила!
highscore = [accent]Новый рекорд! highscore = [accent]Новый рекорд!
copied = Скопировано. copied = Скопировано.
indevpopup = [accent]v6[] находится на стадии [accent]alpha[].\n[lightgray]Это означает следующее:[]\n[scarlet]- Кампания не завершена[]\n- Отсутствие контента\n- Большинство [scarlet]ИИ единиц[] не работает правильно\n- Множество единиц не готово\n- Всё, что вы видите, может быть изменено или удалено.\n\nСообщайте о багах и вылетах на [accent]GitHub[]. indev.popup = [accent]v6[] находится на стадии [accent]alpha[].\n[lightgray]Это означает следующее:[]\n[scarlet]- Кампания не завершена[]\n- Отсутствие контента\n- Большинство [scarlet]ИИ единиц[] не работает правильно\n- Множество единиц не готово\n- Всё, что вы видите, может быть изменено или удалено.\n\nСообщайте о багах и вылетах на [accent]GitHub[].
indev.notready = Эта часть игры ещё не готова
load.sound = Звуки load.sound = Звуки
load.map = Карты load.map = Карты

View File

@@ -20,7 +20,8 @@ gameover = Гра завершена
gameover.pvp = [accent]{0}[] команда перемогла! gameover.pvp = [accent]{0}[] команда перемогла!
highscore = [accent]Новий рекорд! highscore = [accent]Новий рекорд!
copied = Скопійовано. copied = Скопійовано.
indevpopup = Наразі [accent]6.0[] знаходиться у стадії [accent]альфа[].\n[lightgray]Це означає наступне:[]\n- Не вистачає наповнення гри;\n- Більшість [scarlet]ШІ бойових одиниць[] не працює належним чином;\n- Багато одиниць [scarlet]відсутні[] або незавершені;\n- Кампанія повністю не є завершеною;\n- Усе, що ви бачите, може змінитися або видалитися.\n\nПовідомляйте про вади або збої на [accent]Github[], а про помилки в перекладі в Discord. indev.popup = Наразі [accent]6.0[] знаходиться у стадії [accent]альфа[].\n[lightgray]Це означає наступне:[]\n- Не вистачає наповнення гри;\n- Більшість [scarlet]ШІ бойових одиниць[] не працює належним чином;\n- Багато одиниць [scarlet]відсутні[] або незавершені;\n- Кампанія повністю не є завершеною;\n- Усе, що ви бачите, може змінитися або видалитися.\n\nПовідомляйте про вади або збої на [accent]Github[], а про помилки в перекладі в Discord.
indev.notready = Ця частина гри ще не готова
load.sound = Звуки load.sound = Звуки
load.map = Мапи load.map = Мапи

View File

@@ -15,7 +15,7 @@ void main(){
vec2 c = v_texCoords.xy; vec2 c = v_texCoords.xy;
vec2 coords = vec2(c.x * u_resolution.x + u_campos.x, c.y * u_resolution.y + u_campos.y); vec2 coords = vec2(c.x * u_resolution.x + u_campos.x, c.y * u_resolution.y + u_campos.y);
float btime = u_time / 8000000.0; float btime = u_time / 70000.0;
float noise = sin((texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / NSCALE + vec2(abs(sin(btime)) * 1.1) * vec2(-0.8, -1.0)).r) / 2.0); float noise = sin((texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / NSCALE + vec2(abs(sin(btime)) * 1.1) * vec2(-0.8, -1.0)).r) / 2.0);
vec4 color = texture2D(u_texture, c); vec4 color = texture2D(u_texture, c);

View File

@@ -22,12 +22,10 @@ void main(){
float noise = (texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / NSCALE + vec2(btime * 1.1) * vec2(0.8, -1.0)).r) / 2.0; float noise = (texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / NSCALE + vec2(btime * 1.1) * vec2(0.8, -1.0)).r) / 2.0;
vec4 color = texture2D(u_texture, c); vec4 color = texture2D(u_texture, c);
if(color.a > 0.1){ if(noise > 0.6){
if(noise > 0.6){ color.rgb = S2;
color.rgb = S2; }else if (noise > 0.54){
}else if (noise > 0.54){ color.rgb = S1;
color.rgb = S1;
}
} }
gl_FragColor = color; gl_FragColor = color;

View File

@@ -20,7 +20,7 @@ void main(){
vec4 color = texture2D(u_texture, c); vec4 color = texture2D(u_texture, c);
if(!(noise > 0.54 && noise < 0.58)){ if(!(noise > 0.54 && noise < 0.58)){
color.rgb *= 0.6; color.rgb *= vec3(0.6, 0.6, 0.7);
} }
gl_FragColor = color; gl_FragColor = color;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 810 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 KiB

After

Width:  |  Height:  |  Size: 735 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1013 KiB

After

Width:  |  Height:  |  Size: 1020 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -5,20 +5,14 @@ import arc.math.geom.*;
import mindustry.ai.formations.*; import mindustry.ai.formations.*;
public class CircleFormation extends FormationPattern{ public class CircleFormation extends FormationPattern{
/** The radius of one member. This is needed to determine how close we can pack a given number of members around circle. */
public float memberRadius;
/** Angle offset. */ /** Angle offset. */
public float angleOffset = 0; public float angleOffset = 0;
public CircleFormation(float memberRadius){
this.memberRadius = memberRadius;
}
@Override @Override
public Vec3 calculateSlotLocation(Vec3 outLocation, int slotNumber){ public Vec3 calculateSlotLocation(Vec3 outLocation, int slotNumber){
if(slots > 1){ if(slots > 1){
float angle = (360f * slotNumber) / slots; float angle = (360f * slotNumber) / slots;
float radius = memberRadius / (float)Math.sin(180f / slots * Mathf.degRad); float radius = spacing / (float)Math.sin(180f / slots * Mathf.degRad);
outLocation.set(Angles.trnsx(angle, radius), Angles.trnsy(angle, radius), angle); outLocation.set(Angles.trnsx(angle, radius), Angles.trnsy(angle, radius), angle);
}else{ }else{
outLocation.set(0, 0, 360f * slotNumber); outLocation.set(0, 0, 360f * slotNumber);

View File

@@ -2,10 +2,10 @@ package mindustry.ai.types;
import arc.math.geom.*; import arc.math.geom.*;
import arc.util.ArcAnnotate.*; import arc.util.ArcAnnotate.*;
import mindustry.*;
import mindustry.ai.formations.*; import mindustry.ai.formations.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*;
public class FormationAI extends AIController implements FormationMember{ public class FormationAI extends AIController implements FormationMember{
public Unit leader; public Unit leader;
@@ -25,33 +25,33 @@ public class FormationAI extends AIController implements FormationMember{
@Override @Override
public void updateUnit(){ public void updateUnit(){
UnitType type = unit.type();
if(leader.dead){ if(leader.dead){
unit.resetController(); unit.resetController();
return; return;
} }
unit.controlWeapons(leader.isRotate(), leader.isShooting); unit.controlWeapons(true, leader.isShooting);
// unit.moveAt(Tmp.v1.set(deltaX, deltaY).limit(unit.type().speed)); // unit.moveAt(Tmp.v1.set(deltaX, deltaY).limit(unit.type().speed));
if(leader.isShooting){
unit.aimLook(leader.aimX(), leader.aimY()); unit.aim(leader.aimX(), leader.aimY());
}else{
if(!leader.moving() || !unit.type().rotateShooting){ if(unit.type().rotateShooting){
if(unit.moving()){ unit.lookAt(leader.aimX(), leader.aimY());
unit.lookAt(unit.vel.angle()); }else if(unit.moving()){
} unit.lookAt(unit.vel.angle());
}else{
unit.lookAt(leader.rotation);
}
} }
Vec2 realtarget = vec.set(target); Vec2 realtarget = vec.set(target);
if(unit.isGrounded() && Vars.world.raycast(unit.tileX(), unit.tileY(), leader.tileX(), leader.tileY(), Vars.world::solid)){ float margin = 3f;
//TODO pathfind
//realtarget.set(Vars.pathfinder.getTargetTile(unit.tileOn(), unit.team, leader));
}
unit.moveAt(realtarget.sub(unit).limit(unit.type().speed)); if(unit.dst(realtarget) <= margin){
unit.vel.approachDelta(Vec2.ZERO, type.speed * type.accel / 2f);
}else{
unit.moveAt(realtarget.sub(unit).limit(type.speed));
}
} }
@Override @Override
@@ -68,7 +68,7 @@ public class FormationAI extends AIController implements FormationMember{
//TODO return formation size //TODO return formation size
//eturn ((Commanderc)unit).formation(). //eturn ((Commanderc)unit).formation().
} }
return unit.hitSize * 1.7f; return unit.hitSize * 1f;
} }
@Override @Override

View File

@@ -5,6 +5,7 @@ import mindustry.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.blocks.payloads.*;
import java.util.*; import java.util.*;
@@ -48,6 +49,19 @@ public class TeamIndexProcess implements AsyncProcess{
activeCounts[team.id][type.id] += amount; activeCounts[team.id][type.id] += amount;
} }
private void count(Unit unit){
updateCount(unit.team, unit.type(), 1);
if(!unit.deactivated) updateActiveCount(unit.team, unit.type(), 1);
if(unit instanceof Payloadc){
((Payloadc)unit).payloads().each(p -> {
if(p instanceof UnitPayload){
count(((UnitPayload)p).unit);
}
});
}
}
@Override @Override
public void reset(){ public void reset(){
counts = new int[Team.all.length]; counts = new int[Team.all.length];
@@ -71,8 +85,7 @@ public class TeamIndexProcess implements AsyncProcess{
for(Unit unit : Groups.unit){ for(Unit unit : Groups.unit){
tree(unit.team).insert(unit); tree(unit.team).insert(unit);
updateCount(unit.team, unit.type(), 1); count(unit);
if(!unit.deactivated) updateActiveCount(unit.team, unit.type(), 1);
} }
} }

View File

@@ -342,6 +342,7 @@ public class Blocks implements ContentList{
sandWall = new StaticWall("sand-wall"){{ sandWall = new StaticWall("sand-wall"){{
variants = 2; variants = 2;
sandWater.asFloor().wall = this;
}}; }};
saltWall = new StaticWall("salt-wall"); saltWall = new StaticWall("salt-wall");
@@ -801,7 +802,7 @@ public class Blocks implements ContentList{
}}; }};
door = new Door("door"){{ door = new Door("door"){{
requirements(Category.defense, with(Items.graphite, 6, Items.silicon, 4)); requirements(Category.defense, with(Items.titanium, 6, Items.silicon, 4));
health = 100 * wallHealthMultiplier; health = 100 * wallHealthMultiplier;
}}; }};

View File

@@ -1,18 +1,15 @@
package mindustry.content; package mindustry.content;
import arc.*; import arc.*;
import arc.math.*;
import arc.struct.*; import arc.struct.*;
import arc.util.ArcAnnotate.*; import arc.util.ArcAnnotate.*;
import mindustry.core.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.game.Objectives.*; import mindustry.game.Objectives.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*;
import static mindustry.content.Blocks.*; import static mindustry.content.Blocks.*;
import static mindustry.content.SectorPresets.*;
import static mindustry.content.SectorPresets.craters; import static mindustry.content.SectorPresets.craters;
import static mindustry.content.SectorPresets.*;
import static mindustry.content.UnitTypes.*; import static mindustry.content.UnitTypes.*;
import static mindustry.type.ItemStack.*; import static mindustry.type.ItemStack.*;
@@ -422,7 +419,11 @@ public class TechTree implements ContentList{
node(risso, () -> { node(risso, () -> {
node(minke, () -> { node(minke, () -> {
node(bryde, () -> { node(bryde, () -> {
node(sei, () -> {
node(omura, () -> {
});
});
}); });
}); });
}); });
@@ -522,42 +523,27 @@ public class TechTree implements ContentList{
}); });
} }
private static void setup(){ public static void setup(){
TechNode.context = null; TechNode.context = null;
map = new ObjectMap<>(); map = new ObjectMap<>();
all = new Seq<>(); all = new Seq<>();
} }
private static TechNode node(UnlockableContent content, Runnable children){ public static TechNode node(UnlockableContent content, Runnable children){
ItemStack[] requirements; return node(content, content.researchRequirements(), children);
if(content instanceof Block){
Block block = (Block)content;
requirements = new ItemStack[block.requirements.length];
for(int i = 0; i < requirements.length; i++){
int quantity = 40 + Mathf.round(Mathf.pow(block.requirements[i].amount, 1.25f) * 20, 10);
requirements[i] = new ItemStack(block.requirements[i].item, UI.roundAmount(quantity));
}
}else{
requirements = ItemStack.empty;
}
return node(content, requirements, children);
} }
private static TechNode node(UnlockableContent content, ItemStack[] requirements, Runnable children){ public static TechNode node(UnlockableContent content, ItemStack[] requirements, Runnable children){
return new TechNode(content, requirements, children); return new TechNode(content, requirements, children);
} }
private static TechNode node(UnlockableContent content, Seq<Objective> objectives, Runnable children){ public static TechNode node(UnlockableContent content, Seq<Objective> objectives, Runnable children){
TechNode node = new TechNode(content, empty, children); TechNode node = new TechNode(content, empty, children);
node.objectives = objectives; node.objectives = objectives;
return node; return node;
} }
private static TechNode node(UnlockableContent block){ public static TechNode node(UnlockableContent block){
return node(block, () -> {}); return node(block, () -> {});
} }

View File

@@ -38,6 +38,9 @@ public class UnitTypes implements ContentList{
//air + building + mining + payload //air + building + mining + payload
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega; public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega;
//air + building + payload TODO implement
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType quad, oct;
//air + building + mining //air + building + mining
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma; public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma;
@@ -744,6 +747,7 @@ public class UnitTypes implements ContentList{
accel = 0.08f; accel = 0.08f;
drag = 0.016f; drag = 0.016f;
flying = true; flying = true;
hitsize = 9f;
targetAir = false; targetAir = false;
engineOffset = 7.8f; engineOffset = 7.8f;
range = 140f; range = 140f;
@@ -1010,6 +1014,7 @@ public class UnitTypes implements ContentList{
abilities.add(new HealFieldAbility(5f, 60f * 5, 50f)); abilities.add(new HealFieldAbility(5f, 60f * 5, 50f));
weapons.add(new Weapon("heal-weapon-mount"){{ weapons.add(new Weapon("heal-weapon-mount"){{
top = false;
y = -2.5f; y = -2.5f;
x = 3.5f; x = 3.5f;
reload = 30f; reload = 30f;

View File

@@ -334,7 +334,7 @@ public class Control implements ApplicationListener, Loadable{
} }
public void playTutorial(){ public void playTutorial(){
ui.showInfo("There is no tutorial yet."); ui.showInfo("@indev.notready");
//TODO implement //TODO implement
//ui.showInfo("death"); //ui.showInfo("death");
/* /*
@@ -434,7 +434,7 @@ public class Control implements ApplicationListener, Loadable{
//just a regular reminder //just a regular reminder
if(!OS.prop("user.name").equals("anuke") && !OS.hasEnv("iknowwhatimdoing")){ if(!OS.prop("user.name").equals("anuke") && !OS.hasEnv("iknowwhatimdoing")){
app.post(() -> app.post(() -> { app.post(() -> app.post(() -> {
ui.showStartupInfo("@indevpopup"); ui.showStartupInfo("@indev.popup");
})); }));
} }

View File

@@ -338,8 +338,6 @@ public class NetClient implements ApplicationListener{
@Remote(variants = Variant.both) @Remote(variants = Variant.both)
public static void setRules(Rules rules){ public static void setRules(Rules rules){
state.rules = rules; state.rules = rules;
//campaign is not valid in multiplayer
state.rules.sector = null;
} }
@Remote(variants = Variant.both) @Remote(variants = Variant.both)
@@ -442,7 +440,7 @@ public class NetClient implements ApplicationListener{
} }
@Remote(variants = Variant.one, priority = PacketPriority.low, unreliable = true) @Remote(variants = Variant.one, priority = PacketPriority.low, unreliable = true)
public static void stateSnapshot(float waveTime, int wave, int enemies, boolean paused, boolean gameOver, short coreDataLen, byte[] coreData){ public static void stateSnapshot(float waveTime, int wave, int enemies, boolean paused, boolean gameOver, int timeData, short coreDataLen, byte[] coreData){
try{ try{
if(wave > state.wave){ if(wave > state.wave){
state.wave = wave; state.wave = wave;
@@ -455,6 +453,8 @@ public class NetClient implements ApplicationListener{
state.enemies = enemies; state.enemies = enemies;
state.serverPaused = paused; state.serverPaused = paused;
universe.updateNetSeconds(timeData);
netClient.byteStream.setBytes(net.decompressSnapshot(coreData, coreDataLen)); netClient.byteStream.setBytes(net.decompressSnapshot(coreData, coreDataLen));
DataInputStream input = netClient.dataStream; DataInputStream input = netClient.dataStream;

View File

@@ -846,7 +846,7 @@ public class NetServer implements ApplicationListener{
byte[] stateBytes = syncStream.toByteArray(); byte[] stateBytes = syncStream.toByteArray();
//write basic state data. //write basic state data.
Call.stateSnapshot(player.con, state.wavetime, state.wave, state.enemies, state.serverPaused, state.gameOver, (short)stateBytes.length, net.compressSnapshot(stateBytes)); Call.stateSnapshot(player.con, state.wavetime, state.wave, state.enemies, state.serverPaused, state.gameOver, universe.seconds(), (short)stateBytes.length, net.compressSnapshot(stateBytes));
viewport.setSize(player.con.viewWidth, player.con.viewHeight).setCenter(player.con.viewX, player.con.viewY); viewport.setSize(player.con.viewWidth, player.con.viewHeight).setCenter(player.con.viewX, player.con.viewY);

View File

@@ -519,7 +519,7 @@ public class World{
dark = Math.max((edgeBlend - edgeDst) * (4f / edgeBlend), dark); dark = Math.max((edgeBlend - edgeDst) * (4f / edgeBlend), dark);
} }
if(state.hasSector()){ if(state.hasSector() && state.getSector().preset == null){
int circleBlend = 14; int circleBlend = 14;
//quantized angle //quantized angle
float offset = state.getSector().rect.rotation + 90; float offset = state.getSector().rect.rotation + 90;

View File

@@ -8,6 +8,7 @@ import arc.util.ArcAnnotate.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.ui.*; import mindustry.ui.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@@ -43,6 +44,11 @@ public abstract class UnlockableContent extends MappableContent{
} }
/** @return items needed to research this content */
public ItemStack[] researchRequirements(){
return ItemStack.empty;
}
public String emoji(){ public String emoji(){
return Fonts.getUnicodeStr(name); return Fonts.getUnicodeStr(name);
} }

View File

@@ -64,8 +64,12 @@ public class DrawOperation{
if(type == OpType.floor.ordinal()){ if(type == OpType.floor.ordinal()){
tile.setFloor((Floor)content.block(to)); tile.setFloor((Floor)content.block(to));
}else if(type == OpType.block.ordinal()){ }else if(type == OpType.block.ordinal()){
tile.getLinkedTiles(t -> editor.renderer.updatePoint(t.x, t.y));
Block block = content.block(to); Block block = content.block(to);
tile.setBlock(block, tile.team(), tile.build == null ? 0 : tile.build.rotation); tile.setBlock(block, tile.team(), tile.build == null ? 0 : tile.build.rotation);
tile.getLinkedTiles(t -> editor.renderer.updatePoint(t.x, t.y));
}else if(type == OpType.rotation.ordinal()){ }else if(type == OpType.rotation.ordinal()){
if(tile.build != null) tile.build.rotation = to; if(tile.build != null) tile.build.rotation = to;
}else if(type == OpType.team.ordinal()){ }else if(type == OpType.team.ordinal()){
@@ -74,7 +78,7 @@ public class DrawOperation{
tile.setOverlayID(to); tile.setOverlayID(to);
} }
}); });
editor.renderer().updatePoint(tile.x, tile.y); editor.renderer.updatePoint(tile.x, tile.y);
} }
@Struct @Struct

View File

@@ -46,14 +46,14 @@ public class EditorTile extends Tile{
return; return;
} }
//if(this.block == type && (build == null || build.rotation == rotation)){ if(this.block == type && (build == null || build.rotation == rotation)){
// ui.editor.editor.renderer().updatePoint(x, y); update();
// return; return;
//} }
if(rotation != 0) op(OpType.rotation, (byte)rotation);
if(team() != Team.derelict) op(OpType.team, (byte)team().id);
op(OpType.block, block.id); op(OpType.block, block.id);
if(rotation != 0) op(OpType.rotation, (byte)rotation);
if(team != Team.derelict) op(OpType.team, (byte)team.id);
super.setBlock(type, team, rotation); super.setBlock(type, team, rotation);
} }
@@ -87,7 +87,7 @@ public class EditorTile extends Tile{
if(skip()){ if(skip()){
super.fireChanged(); super.fireChanged();
}else{ }else{
ui.editor.editor.renderer().updatePoint(x, y); update();
} }
} }
@@ -121,6 +121,10 @@ public class EditorTile extends Tile{
} }
} }
private void update(){
ui.editor.editor.renderer.updatePoint(x, y);
}
private boolean skip(){ private boolean skip(){
return state.isGame() || ui.editor.editor.isLoading(); return state.isGame() || ui.editor.editor.isLoading();
} }

View File

@@ -18,10 +18,10 @@ import static mindustry.Vars.*;
public class MapEditor{ public class MapEditor{
public static final int[] brushSizes = {1, 2, 3, 4, 5, 9, 15, 20}; public static final int[] brushSizes = {1, 2, 3, 4, 5, 9, 15, 20};
private final Context context = new Context(); public StringMap tags = new StringMap();
private StringMap tags = new StringMap(); public MapRenderer renderer = new MapRenderer(this);
private MapRenderer renderer = new MapRenderer(this);
private final Context context = new Context();
private OperationStack stack = new OperationStack(); private OperationStack stack = new OperationStack();
private DrawOperation currentOp; private DrawOperation currentOp;
private boolean loading; private boolean loading;
@@ -35,10 +35,6 @@ public class MapEditor{
return loading; return loading;
} }
public StringMap getTags(){
return tags;
}
public void beginEdit(int width, int height){ public void beginEdit(int width, int height){
reset(); reset();
@@ -214,10 +210,6 @@ public class MapEditor{
} }
} }
public MapRenderer renderer(){
return renderer;
}
public void resize(int width, int height){ public void resize(int width, int height){
clearOp(); clearOp();

View File

@@ -116,9 +116,9 @@ public class MapEditorDialog extends Dialog implements Disposable{
t.button("@editor.export", Icon.upload, () -> createDialog("@editor.export", t.button("@editor.export", Icon.upload, () -> createDialog("@editor.export",
"@editor.exportfile", "@editor.exportfile.description", Icon.file, "@editor.exportfile", "@editor.exportfile.description", Icon.file,
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))), (Runnable)() -> platform.export(editor.tags.get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
"@editor.exportimage", "@editor.exportimage.description", Icon.fileImage, "@editor.exportimage", "@editor.exportimage.description", Icon.fileImage,
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), "png", file -> { (Runnable)() -> platform.export(editor.tags.get("name", "unknown"), "png", file -> {
Pixmap out = MapIO.writeImage(editor.tiles()); Pixmap out = MapIO.writeImage(editor.tiles());
file.writePNG(out); file.writePNG(out);
out.dispose(); out.dispose();
@@ -129,16 +129,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
if(steam){ if(steam){
menu.cont.button("@editor.publish.workshop", Icon.link, () -> { menu.cont.button("@editor.publish.workshop", Icon.link, () -> {
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim())); Map builtin = maps.all().find(m -> m.name().equals(editor.tags.get("name", "").trim()));
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){ if(editor.tags.containsKey("steamid") && builtin != null && !builtin.custom){
platform.viewListingID(editor.getTags().get("steamid")); platform.viewListingID(editor.tags.get("steamid"));
return; return;
} }
Map map = save(); Map map = save();
if(editor.getTags().containsKey("steamid") && map != null){ if(editor.tags.containsKey("steamid") && map != null){
platform.viewListing(map); platform.viewListing(map);
return; return;
} }
@@ -156,7 +156,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
} }
platform.publish(map); platform.publish(map);
}).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.getTags().containsKey("steamid") ? editor.getTags().get("author").equals(player.name) ? "@workshop.listing" : "@view.workshop" : "@editor.publish.workshop")); }).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.tags.containsKey("steamid") ? editor.tags.get("author").equals(player.name) ? "@workshop.listing" : "@view.workshop" : "@editor.publish.workshop"));
menu.cont.row(); menu.cont.row();
} }
@@ -235,7 +235,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
state.rules = (lastSavedRules == null ? new Rules() : lastSavedRules); state.rules = (lastSavedRules == null ? new Rules() : lastSavedRules);
lastSavedRules = null; lastSavedRules = null;
saved = false; saved = false;
editor.renderer().updateAll(); editor.renderer.updateAll();
} }
private void playtest(){ private void playtest(){
@@ -264,10 +264,10 @@ public class MapEditorDialog extends Dialog implements Disposable{
public @Nullable Map save(){ public @Nullable Map save(){
boolean isEditor = state.rules.editor; boolean isEditor = state.rules.editor;
state.rules.editor = false; state.rules.editor = false;
String name = editor.getTags().get("name", "").trim(); String name = editor.tags.get("name", "").trim();
editor.getTags().put("rules", JsonIO.write(state.rules)); editor.tags.put("rules", JsonIO.write(state.rules));
editor.getTags().remove("width"); editor.tags.remove("width");
editor.getTags().remove("height"); editor.tags.remove("height");
player.clearUnit(); player.clearUnit();
@@ -281,7 +281,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
if(map != null && !map.custom){ if(map != null && !map.custom){
handleSaveBuiltin(map); handleSaveBuiltin(map);
}else{ }else{
returned = maps.saveMap(editor.getTags()); returned = maps.saveMap(editor.tags);
ui.showInfoFade("@editor.saved"); ui.showInfoFade("@editor.saved");
} }
} }
@@ -352,7 +352,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
@Override @Override
public void dispose(){ public void dispose(){
editor.renderer().dispose(); editor.renderer.dispose();
} }
public void beginEditMap(Fi file){ public void beginEditMap(Fi file){
@@ -614,12 +614,12 @@ public class MapEditorDialog extends Dialog implements Disposable{
Tile tile = editor.tile(x, y); Tile tile = editor.tile(x, y);
if(tile.block().breakable && tile.block() instanceof Boulder){ if(tile.block().breakable && tile.block() instanceof Boulder){
tile.setBlock(Blocks.air); tile.setBlock(Blocks.air);
editor.renderer().updatePoint(x, y); editor.renderer.updatePoint(x, y);
} }
if(tile.overlay() != Blocks.air && tile.overlay() != Blocks.spawn){ if(tile.overlay() != Blocks.air && tile.overlay() != Blocks.spawn){
tile.setOverlay(Blocks.air); tile.setOverlay(Blocks.air);
editor.renderer().updatePoint(x, y); editor.renderer.updatePoint(x, y);
} }
} }
} }

View File

@@ -144,7 +144,7 @@ public class MapGenerateDialog extends BaseDialog{
} }
//reset undo stack as generation... messes things up //reset undo stack as generation... messes things up
editor.renderer().updateAll(); editor.renderer.updateAll();
editor.clearOp(); editor.clearOp();
} }

View File

@@ -29,7 +29,7 @@ public class MapInfoDialog extends BaseDialog{
private void setup(){ private void setup(){
cont.clear(); cont.clear();
ObjectMap<String, String> tags = editor.getTags(); ObjectMap<String, String> tags = editor.tags;
cont.pane(t -> { cont.pane(t -> {
t.add("@editor.mapname").padRight(8).left(); t.add("@editor.mapname").padRight(8).left();
@@ -73,8 +73,8 @@ public class MapInfoDialog extends BaseDialog{
t.row(); t.row();
t.add("@editor.generation").padRight(8).left(); t.add("@editor.generation").padRight(8).left();
t.button("@edit", () -> { t.button("@edit", () -> {
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")), generate.show(Vars.maps.readFilters(editor.tags.get("genfilters", "")),
filters -> editor.getTags().put("genfilters", JsonIO.write(filters))); filters -> editor.tags.put("genfilters", JsonIO.write(filters)));
hide(); hide();
}).left().width(200f); }).left().width(200f);

View File

@@ -248,7 +248,7 @@ public class MapView extends Element implements GestureListener{
Draw.color(Pal.remove); Draw.color(Pal.remove);
Lines.stroke(2f); Lines.stroke(2f);
Lines.rect(centerx - sclwidth / 2 - 1, centery - sclheight / 2 - 1, sclwidth + 2, sclheight + 2); Lines.rect(centerx - sclwidth / 2 - 1, centery - sclheight / 2 - 1, sclwidth + 2, sclheight + 2);
editor.renderer().draw(centerx - sclwidth / 2, centery - sclheight / 2, sclwidth, sclheight); editor.renderer.draw(centerx - sclwidth / 2, centery - sclheight / 2, sclwidth, sclheight);
Draw.reset(); Draw.reset();
if(grid){ if(grid){

View File

@@ -1,5 +1,6 @@
package mindustry.entities; package mindustry.entities;
import arc.*;
import arc.func.*; import arc.func.*;
import arc.math.geom.*; import arc.math.geom.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
@@ -18,6 +19,15 @@ public class Units{
private static float cdist; private static float cdist;
private static boolean boolResult; private static boolean boolResult;
@Remote(called = Loc.server)
public static void unitCapDeath(Unit unit){
if(unit != null){
unit.dead = true;
Fx.unitCapKill.at(unit);
Core.app.post(() -> Call.unitDeath(unit.id));
}
}
@Remote(called = Loc.server) @Remote(called = Loc.server)
public static void unitDeath(int uid){ public static void unitDeath(int uid){
Unit unit = Groups.unit.getByID(uid); Unit unit = Groups.unit.getByID(uid);

View File

@@ -27,7 +27,7 @@ abstract class CommanderComp implements Unitc{
@Override @Override
public void update(){ public void update(){
if(formation != null){ if(formation != null){
formation.anchor.set(x, y, rotation); formation.anchor.set(x, y, /*rotation*/ 0); //TODO rotation set to 0 because rotating is pointless
formation.updateSlots(); formation.updateSlots();
} }
} }
@@ -73,7 +73,7 @@ abstract class CommanderComp implements Unitc{
void command(Formation formation, Seq<Unit> units){ void command(Formation formation, Seq<Unit> units){
clearCommand(); clearCommand();
float spacing = hitSize() * 1.7f; float spacing = hitSize() * 1f;
minFormationSpeed = type().speed; minFormationSpeed = type().speed;
controlling.addAll(units); controlling.addAll(units);

View File

@@ -37,7 +37,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
private UnitController controller; private UnitController controller;
private UnitType type; private UnitType type;
boolean spawnedByCore, deactivated; boolean spawnedByCore, deactivated; //TODO remove deactivation boolean
transient Seq<Ability> abilities = new Seq<>(0); transient Seq<Ability> abilities = new Seq<>(0);
@@ -204,13 +204,14 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override @Override
public void add(){ public void add(){
teamIndex.updateCount(team, type, 1);
//check if over unit cap //check if over unit cap
if(count() > cap() && !spawnedByCore){ if(count() > cap() && !spawnedByCore){
deactivated = true; deactivated = true;
}else{
teamIndex.updateActiveCount(team, type, 1); if(!dead){
Call.unitCapDeath(self());
}
} }
} }
@@ -245,6 +246,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
a.update(self()); a.update(self());
} }
} }
}else if(!dead){
Call.unitCapDeath(self());
} }
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f); drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f);

View File

@@ -87,6 +87,9 @@ public class SectorInfo{
/** Update averages of various stats, updates some special sector logic. /** Update averages of various stats, updates some special sector logic.
* Called every frame. */ * Called every frame. */
public void update(){ public void update(){
//updating in multiplayer as a client doesn't make sense
if(net.client()) return;
internalTimeSpent += Time.delta; internalTimeSpent += Time.delta;
//create last stored core items //create last stored core items

View File

@@ -14,7 +14,8 @@ import static mindustry.Vars.*;
/** Updates and handles state of the campaign universe. Has no relevance to other gamemodes. */ /** Updates and handles state of the campaign universe. Has no relevance to other gamemodes. */
public class Universe{ public class Universe{
private long seconds; private int seconds;
private int netSeconds;
private float secondCounter; private float secondCounter;
private int turn; private int turn;
@@ -76,15 +77,19 @@ public class Universe{
/** Update planet rotations, global time and relevant state. */ /** Update planet rotations, global time and relevant state. */
public void update(){ public void update(){
secondCounter += Time.delta / 60f;
if(secondCounter >= 1){ //only update time when not in multiplayer
seconds += (int)secondCounter; if(!net.client()){
secondCounter %= 1f; secondCounter += Time.delta / 60f;
//save every few seconds if(secondCounter >= 1){
if(seconds % 10 == 1){ seconds += (int)secondCounter;
save(); secondCounter %= 1f;
//save every few seconds
if(seconds % 10 == 1){
save();
}
} }
} }
@@ -191,25 +196,30 @@ public class Universe{
return count; return count;
} }
public float secondsMod(float mod, float scale){ public void updateNetSeconds(int value){
return (seconds / scale) % mod; netSeconds = value;
} }
public long seconds(){ public float secondsMod(float mod, float scale){
return seconds; return (seconds() / scale) % mod;
}
public int seconds(){
//use networked seconds when playing as client
return net.client() ? netSeconds : seconds;
} }
public float secondsf(){ public float secondsf(){
return seconds + secondCounter; return seconds() + secondCounter;
} }
private void save(){ private void save(){
Core.settings.put("utime", seconds); Core.settings.put("utimei", seconds);
Core.settings.put("turn", turn); Core.settings.put("turn", turn);
} }
private void load(){ private void load(){
seconds = Core.settings.getLong("utime"); seconds = Core.settings.getInt("utimei");
turn = Core.settings.getInt("turn"); turn = Core.settings.getInt("turn");
} }

View File

@@ -210,8 +210,8 @@ public class FloorRenderer implements Disposable{
tile.block().drawBase(tile); tile.block().drawBase(tile);
}else if(floor.cacheLayer == layer && (world.isAccessible(tile.x, tile.y) || tile.block().cacheLayer != CacheLayer.walls || !tile.block().fillsTile)){ }else if(floor.cacheLayer == layer && (world.isAccessible(tile.x, tile.y) || tile.block().cacheLayer != CacheLayer.walls || !tile.block().fillsTile)){
floor.drawBase(tile); floor.drawBase(tile);
}else if(floor.cacheLayer.ordinal() < layer.ordinal() && layer != CacheLayer.walls){ }else if(floor.cacheLayer != layer && layer != CacheLayer.walls){
floor.drawNonLayer(tile); floor.drawNonLayer(tile, layer);
} }
} }
} }

View File

@@ -324,7 +324,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
commander.clearCommand(); commander.clearCommand();
}else{ }else{
commander.commandNearby(new SquareFormation()); //TODO try out some other formations
commander.commandNearby(new CircleFormation());
Fx.commandSend.at(player); Fx.commandSend.at(player);
} }

View File

@@ -146,7 +146,7 @@ public class Map implements Comparable<Map>, Publishable{
public void addSteamID(String id){ public void addSteamID(String id){
tags.put("steamid", id); tags.put("steamid", id);
ui.editor.editor.getTags().put("steamid", id); ui.editor.editor.tags.put("steamid", id);
try{ try{
ui.editor.save(); ui.editor.save();
}catch(Exception e){ }catch(Exception e){
@@ -159,7 +159,7 @@ public class Map implements Comparable<Map>, Publishable{
public void removeSteamID(){ public void removeSteamID(){
tags.remove("steamid"); tags.remove("steamid");
ui.editor.editor.getTags().remove("steamid"); ui.editor.editor.tags.remove("steamid");
try{ try{
ui.editor.save(); ui.editor.save();
}catch(Exception e){ }catch(Exception e){
@@ -203,7 +203,7 @@ public class Map implements Comparable<Map>, Publishable{
@Override @Override
public boolean prePublish(){ public boolean prePublish(){
tags.put("author", player.name); tags.put("author", player.name);
ui.editor.editor.getTags().put("author", tags.get("author")); ui.editor.editor.tags.put("author", tags.get("author"));
ui.editor.save(); ui.editor.save();
return true; return true;

View File

@@ -42,8 +42,6 @@ public class NetworkIO{
try(DataInputStream stream = new DataInputStream(is)){ try(DataInputStream stream = new DataInputStream(is)){
Time.clear(); Time.clear();
state.rules = JsonIO.read(Rules.class, stream.readUTF()); state.rules = JsonIO.read(Rules.class, stream.readUTF());
//campaign is not valid in multiplayer
state.rules.sector = null;
state.map = new Map(SaveIO.getSaveWriter().readStringMap(stream)); state.map = new Map(SaveIO.getSaveWriter().readStringMap(stream));
state.wave = stream.readInt(); state.wave = stream.readInt();

View File

@@ -15,6 +15,7 @@ import arc.util.ArcAnnotate.*;
import mindustry.ai.types.*; import mindustry.ai.types.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.core.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.entities.abilities.*; import mindustry.entities.abilities.*;
@@ -28,6 +29,7 @@ import mindustry.world.*;
import mindustry.world.blocks.environment.*; import mindustry.world.blocks.environment.*;
import mindustry.world.blocks.payloads.*; import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.units.*; import mindustry.world.blocks.units.*;
import mindustry.world.consumers.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@@ -299,6 +301,34 @@ public class UnitType extends UnlockableContent{
} }
} }
@Override
public ItemStack[] researchRequirements(){
ItemStack[] stacks = null;
//calculate costs based on reconstructors or factories found
Block rec = content.blocks().find(b -> b instanceof Reconstructor && Structs.contains(((Reconstructor)b).upgrades, u -> u[1] == this));
if(rec != null && rec.consumes.has(ConsumeType.item) && rec.consumes.get(ConsumeType.item) instanceof ConsumeItems){
stacks = ((ConsumeItems)rec.consumes.get(ConsumeType.item)).items;
}else{
UnitFactory factory = (UnitFactory)content.blocks().find(u -> u instanceof UnitFactory && Structs.contains(((UnitFactory)u).plans, p -> p.unit == this));
if(factory != null){
stacks = Structs.find(factory.plans, p -> p.unit == this).requirements;
}
}
if(stacks != null){
ItemStack[] out = new ItemStack[stacks.length];
for(int i = 0; i < out.length; i++){
out[i] = new ItemStack(stacks[i].item, UI.roundAmount((int)(Math.pow(stacks[i].amount, 1.1) * 50)));
}
return out;
}
return super.researchRequirements();
}
@Override @Override
public ContentType getContentType(){ public ContentType getContentType(){
return ContentType.unit; return ContentType.unit;

View File

@@ -54,7 +54,7 @@ public class MapsDialog extends BaseDialog{
Runnable show = () -> ui.loadAnd(() -> { Runnable show = () -> ui.loadAnd(() -> {
hide(); hide();
ui.editor.show(); ui.editor.show();
ui.editor.editor.getTags().put("name", text); ui.editor.editor.tags.put("name", text);
Events.fire(new MapMakeEvent()); Events.fire(new MapMakeEvent());
}); });

View File

@@ -15,6 +15,7 @@ import arc.util.*;
import arc.util.ArcAnnotate.*; import arc.util.ArcAnnotate.*;
import arc.util.pooling.*; import arc.util.pooling.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.core.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
@@ -615,6 +616,18 @@ public class Block extends UnlockableContent{
} }
} }
@Override
public ItemStack[] researchRequirements(){
ItemStack[] out = new ItemStack[requirements.length];
for(int i = 0; i < out.length; i++){
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20, 10);
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
}
return out;
}
@Override @Override
public void getDependencies(Cons<UnlockableContent> cons){ public void getDependencies(Cons<UnlockableContent> cons){
//just requires items //just requires items

View File

@@ -97,7 +97,7 @@ public class LaunchPad extends Block{
//launch when full and base conditions are met //launch when full and base conditions are met
if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){ if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){
LaunchPayload entity = LaunchPayload.create(); LaunchPayload entity = LaunchPayload.create();
items.each((item, amount) -> entity.stacks().add(new ItemStack(item, amount))); items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
entity.set(this); entity.set(this);
entity.lifetime(120f); entity.lifetime(120f);
entity.team(team); entity.team(team);
@@ -174,9 +174,14 @@ public class LaunchPad extends Block{
@Override @Override
public void remove(){ public void remove(){
if(!state.isCampaign()) return;
//on multiplayer the destination is a the first captured sector (basically random)
Sector destsec = !net.client() ? state.secinfo.origin : state.rules.sector.planet.sectors.find(Sector::hasBase);
//actually launch the items upon removal //actually launch the items upon removal
if(team() == state.rules.defaultTeam && state.secinfo.origin != null){ if(team() == state.rules.defaultTeam && destsec != null){
ItemSeq dest = state.secinfo.origin.getExtraItems(); ItemSeq dest = destsec.getExtraItems();
for(ItemStack stack : stacks){ for(ItemStack stack : stacks){
dest.add(stack); dest.add(stack);
@@ -186,7 +191,7 @@ public class LaunchPad extends Block{
Events.fire(new LaunchItemEvent(stack)); Events.fire(new LaunchItemEvent(stack));
} }
state.secinfo.origin.setExtraItems(dest); destsec.setExtraItems(dest);
} }
} }
} }

View File

@@ -23,6 +23,7 @@ public class ForceProjector extends Block{
public float phaseUseTime = 350f; public float phaseUseTime = 350f;
public float phaseRadiusBoost = 80f; public float phaseRadiusBoost = 80f;
public float phaseShieldBoost = 400f;
public float radius = 101.7f; public float radius = 101.7f;
public float breakage = 550f; public float breakage = 550f;
public float cooldownNormal = 1.75f; public float cooldownNormal = 1.75f;
@@ -59,9 +60,11 @@ public class ForceProjector extends Block{
@Override @Override
public void setStats(){ public void setStats(){
super.setStats(); super.setStats();
stats.add(BlockStat.shieldHealth, breakage, StatUnit.none);
stats.add(BlockStat.cooldownTime, (int) (breakage / cooldownBrokenBase / 60f), StatUnit.seconds);
stats.add(BlockStat.powerUse, basePowerDraw * 60f, StatUnit.powerSecond); stats.add(BlockStat.powerUse, basePowerDraw * 60f, StatUnit.powerSecond);
stats.add(BlockStat.boostEffect, phaseRadiusBoost / tilesize, StatUnit.blocks); stats.add(BlockStat.boostEffect, phaseRadiusBoost / tilesize, StatUnit.blocks);
stats.add(BlockStat.boostEffect, phaseShieldBoost, StatUnit.shieldHealth);
} }
@Override @Override
@@ -130,7 +133,7 @@ public class ForceProjector extends Block{
broken = false; broken = false;
} }
if(buildup >= breakage && !broken){ if(buildup >= breakage + phaseShieldBoost && !broken){
broken = true; broken = true;
buildup = breakage; buildup = breakage;
Fx.shieldBreak.at(x, y, realRadius(), team.color); Fx.shieldBreak.at(x, y, realRadius(), team.color);

View File

@@ -22,7 +22,7 @@ public class PowerTurret extends Turret{
@Override @Override
public void init(){ public void init(){
consumes.powerCond(powerUse, entity -> ((TurretBuild)entity).target != null); consumes.powerCond(powerUse, (TurretBuild entity) -> entity.target != null || (entity.logicControlled() && entity.logicShooting));
super.init(); super.init();
} }

View File

@@ -67,7 +67,7 @@ public class Floor extends Block{
protected TextureRegion[][] edges; protected TextureRegion[][] edges;
protected Seq<Block> blenders = new Seq<>(); protected Seq<Block> blenders = new Seq<>();
protected IntSet blended = new IntSet(); protected Bits blended = new Bits(256);
protected TextureRegion edgeRegion; protected TextureRegion edgeRegion;
public Floor(String name){ public Floor(String name){
@@ -170,30 +170,43 @@ public class Floor extends Block{
return drownTime > 0; return drownTime > 0;
} }
public void drawNonLayer(Tile tile){ public void drawNonLayer(Tile tile, CacheLayer layer){
Mathf.rand.setSeed(tile.pos()); Mathf.rand.setSeed(tile.pos());
drawEdges(tile, true);
}
protected void drawEdges(Tile tile){
drawEdges(tile, false);
}
protected void drawEdges(Tile tile, boolean sameLayer){
blenders.clear(); blenders.clear();
blended.clear(); blended.clear();
for(int i = 0; i < 8; i++){ for(int i = 0; i < 8; i++){
Point2 point = Geometry.d8[i]; Point2 point = Geometry.d8[i];
Tile other = tile.getNearby(point); Tile other = tile.getNearby(point);
if(other != null && doEdge(other.floor(), sameLayer) && other.floor().edges() != null){ if(other != null && other.floor().cacheLayer == layer && other.floor().edges() != null){
if(blended.add(other.floor().id)){ if(!blended.getAndSet(other.floor().id)){
blenders.add(other.floor()); blenders.add(other.floor());
} }
} }
} }
drawBlended(tile);
}
protected void drawEdges(Tile tile){
blenders.clear();
blended.clear();
for(int i = 0; i < 8; i++){
Point2 point = Geometry.d8[i];
Tile other = tile.getNearby(point);
if(other != null && doEdge(other.floor()) && other.floor().cacheLayer == cacheLayer && other.floor().edges() != null){
if(!blended.getAndSet(other.floor().id)){
blenders.add(other.floor());
}
}
}
drawBlended(tile);
}
protected void drawBlended(Tile tile){
blenders.sort(a -> a.id); blenders.sort(a -> a.id);
for(Block block : blenders){ for(Block block : blenders){
@@ -201,23 +214,18 @@ public class Floor extends Block{
Point2 point = Geometry.d8[i]; Point2 point = Geometry.d8[i];
Tile other = tile.getNearby(point); Tile other = tile.getNearby(point);
if(other != null && other.floor() == block){ if(other != null && other.floor() == block){
TextureRegion region = edge((Floor)block, 2 - (point.x + 1), 2 - (point.y + 1)); TextureRegion region = edge((Floor)block, 1 - point.x, 1 - point.y);
Draw.rect(region, tile.worldx(), tile.worldy()); Draw.rect(region, tile.worldx(), tile.worldy());
if(!sameLayer && block.cacheLayer.ordinal() > cacheLayer.ordinal()){
Draw.rect(block.variantRegions()[0], tile.worldx() + point.x*tilesize, tile.worldy() + point.y*tilesize);
}
} }
} }
} }
} }
//'new' style of edges with shadows instead of colors, not used currently //'new' style of edges with shadows instead of colors, not used currently
protected void drawEdgesFlat(Tile tile, boolean sameLayer){ protected void drawEdgesFlat(Tile tile, boolean sameLayer){
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
Tile other = tile.getNearby(i); Tile other = tile.getNearby(i);
if(other != null && doEdge(other.floor(), sameLayer)){ if(other != null && doEdge(other.floor())){
Color color = other.floor().mapColor; Color color = other.floor().mapColor;
Draw.color(color.r, color.g, color.b, 1f); Draw.color(color.r, color.g, color.b, 1f);
Draw.rect(edgeRegion, tile.worldx(), tile.worldy(), i*90); Draw.rect(edgeRegion, tile.worldx(), tile.worldy(), i*90);
@@ -231,8 +239,8 @@ public class Floor extends Block{
return ((Floor)blendGroup).edges; return ((Floor)blendGroup).edges;
} }
protected boolean doEdge(Floor other, boolean sameLayer){ protected boolean doEdge(Floor other){
return (((other.blendGroup.id > blendGroup.id) || edges() == null) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer)); return other.blendGroup.id > blendGroup.id || edges() == null;
} }
TextureRegion edge(Floor block, int x, int y){ TextureRegion edge(Floor block, int x, int y){

View File

@@ -33,8 +33,8 @@ public class ArmoredConduit extends Conduit{
@Override @Override
public boolean acceptLiquid(Building source, Liquid liquid, float amount){ public boolean acceptLiquid(Building source, Liquid liquid, float amount){
return super.acceptLiquid(source, liquid, amount) && (source.block instanceof Conduit) || return super.acceptLiquid(source, liquid, amount) && (source.block instanceof Conduit ||
Edges.getFacingEdge(source.tile(), tile).absoluteRelativeTo(tile.x, tile.y) == rotation; source.tile.absoluteRelativeTo(tile.x, tile.y) == rotation);
} }
} }
} }

View File

@@ -48,6 +48,8 @@ public enum BlockStat{
targetsGround(StatCategory.shooting), targetsGround(StatCategory.shooting),
damage(StatCategory.shooting), damage(StatCategory.shooting),
ammo(StatCategory.shooting), ammo(StatCategory.shooting),
shieldHealth(StatCategory.shooting),
cooldownTime(StatCategory.shooting),
booster(StatCategory.optional), booster(StatCategory.optional),
boostEffect(StatCategory.optional), boostEffect(StatCategory.optional),

View File

@@ -21,6 +21,7 @@ public enum StatUnit{
perMinute, perMinute,
timesSpeed(false), timesSpeed(false),
percent(false), percent(false),
shieldHealth,
none, none,
items; items;

View File

@@ -338,6 +338,7 @@ public class Generators{
outliner.get(type.footRegion); outliner.get(type.footRegion);
outliner.get(type.legBaseRegion); outliner.get(type.legBaseRegion);
outliner.get(type.baseJointRegion); outliner.get(type.baseJointRegion);
if(type.constructor.get() instanceof Legsc) outliner.get(type.legRegion);
Image image = ImagePacker.get(type.region); Image image = ImagePacker.get(type.region);