Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -39,10 +39,13 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
|
|||||||
### Android
|
### Android
|
||||||
|
|
||||||
1. Install the Android SDK [here.](https://developer.android.com/studio#command-tools) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
1. Install the Android SDK [here.](https://developer.android.com/studio#command-tools) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
||||||
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
2. In the unzipped Android SDK folder, find the cmdline-tools directory. Then create a folder inside of it called `latest` and put all of its contents into the newly created folder.
|
||||||
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
3. In the same directory run the command `sdkmanager --licenses` (or `./sdkmanager --licenses` if on linux/mac)
|
||||||
|
4. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
||||||
|
5. Enable developer mode on your device/emulator. If you are on testing on a phone you can follow [these instructions](https://developer.android.com/studio/command-line/adb#Enabling), otherwise you need to google how to enable your emulator's developer mode specifically.
|
||||||
|
6. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
||||||
|
|
||||||
To debug the application on a connected phone, run `gradlew android:installDebug android:run`.
|
To debug the application on a connected device/emulator, run `gradlew android:installDebug android:run`.
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -122,8 +122,14 @@ dependencies{
|
|||||||
natives "com.github.Anuken.Arc:natives-android:${getArcHash()}"
|
natives "com.github.Anuken.Arc:natives-android:${getArcHash()}"
|
||||||
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
|
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
|
||||||
|
|
||||||
//TODO dynamically find best android platform jar instead of hard-coding to 30
|
def version;
|
||||||
def sdkFile = new File((String)findSdkDir(), "/platforms/android-30/android.jar")
|
def highestVersion;
|
||||||
|
new File((String)findSdkDir(), "/platforms").eachFileMatch ~/android-\d+/, {
|
||||||
|
version = it.name.find(/\d+/).toInteger();
|
||||||
|
highestVersion = version > highestVersion ? version : highestVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
def sdkFile = new File((String)findSdkDir(), "/platforms/android-${highestVersion}/android.jar")
|
||||||
if(sdkFile.exists()) compileOnly files(sdkFile.absolutePath)
|
if(sdkFile.exists()) compileOnly files(sdkFile.absolutePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,14 +97,14 @@ public class StructProcess extends BaseProcessor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//[setter] + [constructor building]
|
//[setter] + [constructor building]
|
||||||
if(varType == TypeName.BOOLEAN){
|
if(isBool){
|
||||||
cons.append(" | (").append(varName).append(" ? ").append("1L << ").append(offset).append("L : 0)");
|
cons.append(" | (").append(varName).append(" ? ").append("1L << ").append(offset).append("L : 0)");
|
||||||
|
|
||||||
//bools: single bit, needs special case to clear things
|
//bools: single bit, needs special case to clear things
|
||||||
setter.beginControlFlow("if(value)");
|
setter.beginControlFlow("if(value)");
|
||||||
setter.addStatement("return ($T)(($L & ~(1L << $LL)))", structType, structParam, offset);
|
|
||||||
setter.nextControlFlow("else");
|
|
||||||
setter.addStatement("return ($T)(($L & ~(1L << $LL)) | (1L << $LL))", structType, structParam, offset, offset);
|
setter.addStatement("return ($T)(($L & ~(1L << $LL)) | (1L << $LL))", structType, structParam, offset, offset);
|
||||||
|
setter.nextControlFlow("else");
|
||||||
|
setter.addStatement("return ($T)(($L & ~(1L << $LL)))", structType, structParam, offset);
|
||||||
setter.endControlFlow();
|
setter.endControlFlow();
|
||||||
}else if(varType == TypeName.FLOAT){
|
}else if(varType == TypeName.FLOAT){
|
||||||
cons.append(" | (").append("(").append(structType).append(")").append("Float.floatToIntBits(").append(varName).append(") << ").append(offset).append("L)");
|
cons.append(" | (").append("(").append(structType).append(")").append("Float.floatToIntBits(").append(varName).append(") << ").append(offset).append("L)");
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -154,7 +154,7 @@ mod.outdatedv7.details = 이 모드는 최신 버전의 게임과 호환되지
|
|||||||
mod.blacklisted.details = 이 모드는 이 버전의 게임에서 충돌 또는 기타 문제를 일으키는 것으로 인해 수동으로 블랙리스트에 올라와 있습니다. 사용하지 마세요.
|
mod.blacklisted.details = 이 모드는 이 버전의 게임에서 충돌 또는 기타 문제를 일으키는 것으로 인해 수동으로 블랙리스트에 올라와 있습니다. 사용하지 마세요.
|
||||||
mod.missingdependencies.details = 이 모드에는 종속성이 없음: {0}
|
mod.missingdependencies.details = 이 모드에는 종속성이 없음: {0}
|
||||||
mod.erroredcontent.details = 이 게임은 로딩하는 동안 오류가 발생했습니다. 모드 작성자에게 수정하도록 요청하세요.
|
mod.erroredcontent.details = 이 게임은 로딩하는 동안 오류가 발생했습니다. 모드 작성자에게 수정하도록 요청하세요.
|
||||||
mod.requiresversion = Requires game version: [red]{0}
|
mod.requiresversion = 필요한 게임 버전: [red]{0}
|
||||||
mod.errors = 콘텐츠를 불러오는 중에 오류가 발생함
|
mod.errors = 콘텐츠를 불러오는 중에 오류가 발생함
|
||||||
mod.noerrorplay = [scarlet]오류가 있는 모드가 있습니다.[] 영향을 받는 모드를 비활성화하거나 플레이하기 전에 오류를 수정하세요.
|
mod.noerrorplay = [scarlet]오류가 있는 모드가 있습니다.[] 영향을 받는 모드를 비활성화하거나 플레이하기 전에 오류를 수정하세요.
|
||||||
mod.nowdisabled = [scarlet]모드 '{0}'에 필요한 종속성이 없습니다:[accent] {1}\n[lightgray]이 모드를 먼저 내려받아야 합니다.\n이 모드는 자동으로 비활성화됩니다.
|
mod.nowdisabled = [scarlet]모드 '{0}'에 필요한 종속성이 없습니다:[accent] {1}\n[lightgray]이 모드를 먼저 내려받아야 합니다.\n이 모드는 자동으로 비활성화됩니다.
|
||||||
@@ -788,13 +788,13 @@ sector.basin.description = {임시}\n\n현재의 마지막 지역. 이 지역은
|
|||||||
sector.marsh.description = 이 지역은 아르키사이트가 풍부하지만 분출구의 수는 한정적입니다.\n[accent]화학적 연소실[]을 건설하여 전력을 생산하시오.
|
sector.marsh.description = 이 지역은 아르키사이트가 풍부하지만 분출구의 수는 한정적입니다.\n[accent]화학적 연소실[]을 건설하여 전력을 생산하시오.
|
||||||
sector.peaks.description = 이 지역의 산악 지형은 대부분의 기체를 무용지물로 만들었습니다. 비행 기체가 필요합니다.\n적의 방공망에 유의하십시오. 일부 시설은 지원 건물을 공격하여 무력화시킬 수 있습니다.
|
sector.peaks.description = 이 지역의 산악 지형은 대부분의 기체를 무용지물로 만들었습니다. 비행 기체가 필요합니다.\n적의 방공망에 유의하십시오. 일부 시설은 지원 건물을 공격하여 무력화시킬 수 있습니다.
|
||||||
sector.ravine.description = 적의 중요한 이동 경로이긴 하지만, 해당 구역에선 적의 코어가 감지되지 않았습니다. 다양한 적군을 맞닥뜨릴 것으로 예상됩니다.\n[accent]설금[]을 생산하십시오. 포탑 [accent]어플릭트[]를 건설하십시오.
|
sector.ravine.description = 적의 중요한 이동 경로이긴 하지만, 해당 구역에선 적의 코어가 감지되지 않았습니다. 다양한 적군을 맞닥뜨릴 것으로 예상됩니다.\n[accent]설금[]을 생산하십시오. 포탑 [accent]어플릭트[]를 건설하십시오.
|
||||||
sector.caldera-erekir.description = The resources detected in this sector are scattered across several islands.\nResearch and deploy drone-based transportation.
|
sector.caldera-erekir.description = 이 지역에서 탐지된 자원은 여러 섬에 분산되어 있습니다 .\n드론을 기반으로 한 운송수단을 연구하고 활용하시오.
|
||||||
sector.stronghold.description = The large enemy encampment in this sector guards significant deposits of [accent]thorium[].\nUse it to develop higher tier units and turrets.
|
sector.stronghold.description = 이 지역의 대규모 적 야영지에는 적들이 지키고 있는 상당한 양의 [accent]토륨[] 매장지가 있습니다.\n더 높은 등급의 기체와 포탑을 연구할 때 사용합니다.
|
||||||
sector.crevice.description = The enemy will send fierce attack forces to take out your base in this sector.\nDeveloping [accent]carbide[] and the [accent]Pyrolysis Generator[] may be imperative for survival.
|
sector.crevice.description = 적들은 이 지역에서 당신의 기지를 제거하기 위해 맹렬한 공격부대를 보낼 것입니다.\n[accent]탄화물[]과 [accent]열분해 발전기[]를 연구하는 것은 살아남기 위해 반드시 필요합니다.
|
||||||
sector.siege.description = This sector features two parallel canyons that will force a two-pronged attack.\nResearch [accent]cyanogen[] to gain the capability to create even stronger tank units.\nCaution: enemy long-range missiles have been detected. The missiles may be shot down before impact.
|
sector.siege.description = 이 지역은 두 갈래의 공격을 강요하는 두 개의 평행 협곡이 특징입니다.\n더 강력한 전차 기체를 만들기 위한 능력을 얻기 위해 [accent]시아노겐[]을 연구하시오.\n주의: 적의 장거리 발사체가 감지되었습니다. 미사일은 충돌 전에 격추될 수 있습니다.
|
||||||
sector.crossroads.description = The enemy bases in this sector have been established in varying terrain. Research different units to adapt.\nAdditionally, some bases are protected by shields. Figure out how they are powered.
|
sector.crossroads.description = 이 지역의 적 기지는 다양한 지형에 설치되어 있습니다. 적응하기 위해 다양한 기체를 연구하시오.\n또한, 일부 기지는 보호막으로 보호되고 있습니다. 그들이 어떻게 전력을 공급받는지 알아보시오.
|
||||||
sector.karst.description = This sector is rich in resources, but will be attacked by the enemy once a new core lands.\nTake advantage of the resources and research [accent]phase fabric[].
|
sector.karst.description = 이 지역은 자원이 풍부하지만, 새로운 코어가 착륙하면 적에게 공격을 받을 것입니다.\n자원의 이점을 활용하고 [accent]메타[]를 연구하시오.
|
||||||
sector.origin.description = The final sector with a significant enemy presence.\nNo probable research opportunities remain - focus solely on destroying all enemy cores.
|
sector.origin.description = 상당한 적이 존재하는 마지막 지역입니다.\n가능한 연구 기회가 남아 있지 않습니다. 오직 모든 적의 코어를 파괴하는 데만 집중하십시오.
|
||||||
|
|
||||||
status.burning.name = 발화
|
status.burning.name = 발화
|
||||||
status.freezing.name = 빙결
|
status.freezing.name = 빙결
|
||||||
@@ -1452,7 +1452,7 @@ block.sorter.name = 필터
|
|||||||
block.inverted-sorter.name = 반전 필터
|
block.inverted-sorter.name = 반전 필터
|
||||||
block.message.name = 메모 블록
|
block.message.name = 메모 블록
|
||||||
block.reinforced-message.name = 보강된 메모 블록
|
block.reinforced-message.name = 보강된 메모 블록
|
||||||
block.world-message.name = 세계 메모 블록
|
block.world-message.name = 월드 메모 블록
|
||||||
block.illuminator.name = 조명
|
block.illuminator.name = 조명
|
||||||
block.overflow-gate.name = 포화 필터
|
block.overflow-gate.name = 포화 필터
|
||||||
block.underflow-gate.name = 불포화 필터
|
block.underflow-gate.name = 불포화 필터
|
||||||
@@ -1706,7 +1706,7 @@ block.payload-mass-driver.name = 화물 매스 드라이버
|
|||||||
block.small-deconstructor.name = 소형 화물 분해기
|
block.small-deconstructor.name = 소형 화물 분해기
|
||||||
block.canvas.name = 도화지
|
block.canvas.name = 도화지
|
||||||
block.world-processor.name = 월드 프로세서
|
block.world-processor.name = 월드 프로세서
|
||||||
block.world-cell.name = 세계 셀
|
block.world-cell.name = 월드 셀
|
||||||
block.tank-fabricator.name = 전차 조립기
|
block.tank-fabricator.name = 전차 조립기
|
||||||
block.mech-fabricator.name = 기계 조립기
|
block.mech-fabricator.name = 기계 조립기
|
||||||
block.ship-fabricator.name = 함선 조립기
|
block.ship-fabricator.name = 함선 조립기
|
||||||
@@ -1770,8 +1770,8 @@ hint.coreUpgrade = 코어는 [accent]상위 코어를 위에 설치[]하여 업
|
|||||||
hint.presetLaunch = [accent]얼어붙은 숲[]과 같은 회색[accent]캠페인 지역[]은 어디에서나 출격해서 올 수 있습니다. 주변 지역을 점령하지 않아도 됩니다.\n\n이와 같은 [accent]네임드 지역[]들은 [accent]선택적[]입니다.
|
hint.presetLaunch = [accent]얼어붙은 숲[]과 같은 회색[accent]캠페인 지역[]은 어디에서나 출격해서 올 수 있습니다. 주변 지역을 점령하지 않아도 됩니다.\n\n이와 같은 [accent]네임드 지역[]들은 [accent]선택적[]입니다.
|
||||||
hint.presetDifficulty = 이 지역은 [scarlet]위험도가 높은[] 지역입니다.\n적절한 기술과 준비 없이 이런 지역들로 출격하는건 [accent]추천하지 않습니다[].
|
hint.presetDifficulty = 이 지역은 [scarlet]위험도가 높은[] 지역입니다.\n적절한 기술과 준비 없이 이런 지역들로 출격하는건 [accent]추천하지 않습니다[].
|
||||||
hint.coreIncinerate = 코어가 자원으로 가득 찬 후에 받는 모든 자원들은 [accent]소각[]될 것입니다.
|
hint.coreIncinerate = 코어가 자원으로 가득 찬 후에 받는 모든 자원들은 [accent]소각[]될 것입니다.
|
||||||
hint.factoryControl = 기체 공장의 [accent]출력 방향[]을 설정하려면, 명령 모드에서 공장 블록을 클릭한 다음, 마우스 오른쪽 버튼으로 위치를 지정합니다.\n생산된 유닛은 자동으로 그곳으로 이동합니다.
|
hint.factoryControl = 기체 공장의 [accent]출력 위치[]를 설정하려면, 명령 모드에서 공장 블록을 클릭한 다음, 마우스 오른쪽 버튼으로 위치를 지정합니다.\n생산된 유닛은 자동으로 그곳으로 이동합니다.
|
||||||
hint.factoryControl.mobile = 기체 공장의 [accent]출력 방향[]을 설정하려면, 명령 모드에서 공장 블록을 클릭한 다음, 눌러서 위치를 지정합니다.\n생산된 유닛은 자동으로 그곳으로 이동합니다.
|
hint.factoryControl.mobile = 기체 공장의 [accent]출력 위치[]를 설정하려면, 명령 모드에서 공장 블록을 클릭한 다음, 눌러서 위치를 지정합니다.\n생산된 유닛은 자동으로 그곳으로 이동합니다.
|
||||||
gz.mine = 주변 바닥에 있는 \uf8c4 [accent]구리 광석[]으로 이동하고, 광석을 눌러서 채굴을 시작하세요.
|
gz.mine = 주변 바닥에 있는 \uf8c4 [accent]구리 광석[]으로 이동하고, 광석을 눌러서 채굴을 시작하세요.
|
||||||
gz.mine.mobile = 주변 바닥에 있는 \uf8c4 [accent]구리 광석[]으로 이동하고, 광석을 눌러서 채굴을 시작하세요.
|
gz.mine.mobile = 주변 바닥에 있는 \uf8c4 [accent]구리 광석[]으로 이동하고, 광석을 눌러서 채굴을 시작하세요.
|
||||||
gz.research = \ue875 연구 기록을 여세요.\n\uf870 [accent]기계식 드릴[]을 연구하고, 그 후 오른쪽 아래에 있는 메뉴에서 선택하세요.\n구리조각 위를 눌러서 배치합니다.
|
gz.research = \ue875 연구 기록을 여세요.\n\uf870 [accent]기계식 드릴[]을 연구하고, 그 후 오른쪽 아래에 있는 메뉴에서 선택하세요.\n구리조각 위를 눌러서 배치합니다.
|
||||||
|
|||||||
@@ -1180,6 +1180,7 @@ public class Blocks{
|
|||||||
craftTime = 10f;
|
craftTime = 10f;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
invertFlip = true;
|
invertFlip = true;
|
||||||
|
group = BlockGroup.liquids;
|
||||||
|
|
||||||
liquidCapacity = 50f;
|
liquidCapacity = 50f;
|
||||||
|
|
||||||
@@ -2470,6 +2471,7 @@ public class Blocks{
|
|||||||
turbineCondenser = new ThermalGenerator("turbine-condenser"){{
|
turbineCondenser = new ThermalGenerator("turbine-condenser"){{
|
||||||
requirements(Category.power, with(Items.beryllium, 60));
|
requirements(Category.power, with(Items.beryllium, 60));
|
||||||
attribute = Attribute.steam;
|
attribute = Attribute.steam;
|
||||||
|
group = BlockGroup.liquids;
|
||||||
displayEfficiencyScale = 1f / 9f;
|
displayEfficiencyScale = 1f / 9f;
|
||||||
minEfficiency = 9f - 0.0001f;
|
minEfficiency = 9f - 0.0001f;
|
||||||
powerProduction = 3f / 9f;
|
powerProduction = 3f / 9f;
|
||||||
@@ -2764,6 +2766,7 @@ public class Blocks{
|
|||||||
ventCondenser = new AttributeCrafter("vent-condenser"){{
|
ventCondenser = new AttributeCrafter("vent-condenser"){{
|
||||||
requirements(Category.production, with(Items.graphite, 20, Items.beryllium, 60));
|
requirements(Category.production, with(Items.graphite, 20, Items.beryllium, 60));
|
||||||
attribute = Attribute.steam;
|
attribute = Attribute.steam;
|
||||||
|
group = BlockGroup.liquids;
|
||||||
minEfficiency = 9f - 0.0001f;
|
minEfficiency = 9f - 0.0001f;
|
||||||
baseEfficiency = 0f;
|
baseEfficiency = 0f;
|
||||||
displayEfficiency = false;
|
displayEfficiency = false;
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}else{
|
}else{
|
||||||
//when already hosting, instantly build everything. this looks bad but it's better than a desync
|
//when already hosting, instantly build everything. this looks bad but it's better than a desync
|
||||||
Fx.coreBuildBlock.at(build.x, build.y, 0f, build.block);
|
Fx.coreBuildBlock.at(build.x, build.y, 0f, build.block);
|
||||||
Fx.placeBlock.at(build.x, build.y, build.block.size);
|
build.block.placeEffect.at(build.x, build.y, build.block.size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -288,7 +288,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
build.dropped();
|
build.dropped();
|
||||||
|
|
||||||
Fx.coreBuildBlock.at(build.x, build.y, 0f, build.block);
|
Fx.coreBuildBlock.at(build.x, build.y, 0f, build.block);
|
||||||
Fx.placeBlock.at(build.x, build.y, build.block.size);
|
build.block.placeEffect.at(build.x, build.y, build.block.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Fx.unitDrop.at(tile);
|
Fx.unitDrop.at(tile);
|
||||||
Fx.placeBlock.at(on.drawx(), on.drawy(), on.block().size);
|
on.block().placeEffect.at(on.drawx(), on.drawy(), on.block().size);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,6 +312,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public float deconstructThreshold = 0f;
|
public float deconstructThreshold = 0f;
|
||||||
/** If true, this block deconstructs immediately. Instant deconstruction implies no resource refund. */
|
/** If true, this block deconstructs immediately. Instant deconstruction implies no resource refund. */
|
||||||
public boolean instantDeconstruct = false;
|
public boolean instantDeconstruct = false;
|
||||||
|
/** Effect for placing the block. Passes size as rotation. */
|
||||||
|
public Effect placeEffect = Fx.placeBlock;
|
||||||
/** Effect for breaking the block. Passes size as rotation. */
|
/** Effect for breaking the block. Passes size as rotation. */
|
||||||
public Effect breakEffect = Fx.breakBlock;
|
public Effect breakEffect = Fx.breakBlock;
|
||||||
/** Effect for destroying the block. */
|
/** Effect for destroying the block. */
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class ConstructBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(fogControl.isVisibleTile(team, tile.x, tile.y)){
|
if(fogControl.isVisibleTile(team, tile.x, tile.y)){
|
||||||
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
block.placeEffect.at(tile.drawx(), tile.drawy(), block.size);
|
||||||
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
|
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class DirectionalUnloader extends Block{
|
|||||||
public DirectionalUnloader(String name){
|
public DirectionalUnloader(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
|
group = BlockGroup.transportation;
|
||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ public class LogicBlock extends Block{
|
|||||||
if(state.rules.disableWorldProcessors && privileged) return;
|
if(state.rules.disableWorldProcessors && privileged) return;
|
||||||
|
|
||||||
if(enabled && executor.initialized()){
|
if(enabled && executor.initialized()){
|
||||||
accumulator += edelta() * ipt * efficiency;
|
accumulator += edelta() * ipt;
|
||||||
|
|
||||||
if(accumulator > maxInstructionScale * ipt) accumulator = maxInstructionScale * ipt;
|
if(accumulator > maxInstructionScale * ipt) accumulator = maxInstructionScale * ipt;
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public abstract class BlockProducer extends PayloadBlock{
|
|||||||
if(progress >= recipe.buildCost){
|
if(progress >= recipe.buildCost){
|
||||||
consume();
|
consume();
|
||||||
payload = new BuildPayload(recipe, team);
|
payload = new BuildPayload(recipe, team);
|
||||||
Fx.placeBlock.at(x, y, payload.size() / tilesize);
|
payload.block().placeEffect.at(x, y, payload.size() / tilesize);
|
||||||
payVector.setZero();
|
payVector.setZero();
|
||||||
progress %= 1f;
|
progress %= 1f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class PayloadConveyor extends Block{
|
|||||||
|
|
||||||
public PayloadConveyor(String name){
|
public PayloadConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
group = BlockGroup.transportation;
|
group = BlockGroup.payloads;
|
||||||
size = 3;
|
size = 3;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
update = true;
|
update = true;
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ import static mindustry.Vars.*;
|
|||||||
public class BeamDrill extends Block{
|
public class BeamDrill extends Block{
|
||||||
protected Rand rand = new Rand();
|
protected Rand rand = new Rand();
|
||||||
|
|
||||||
public @Load("drill-laser") TextureRegion laser;
|
public @Load(value = "@-beam", fallback = "drill-laser") TextureRegion laser;
|
||||||
public @Load("drill-laser-end") TextureRegion laserEnd;
|
public @Load(value = "@-beam-end", fallback = "drill-laser-end") TextureRegion laserEnd;
|
||||||
public @Load("drill-laser-center") TextureRegion laserCenter;
|
public @Load(value = "@-beam-center", fallback = "drill-laser-center") TextureRegion laserCenter;
|
||||||
|
|
||||||
public @Load("drill-laser-boost") TextureRegion laserBoost;
|
public @Load(value = "@-beam-boost", fallback = "drill-laser-boost") TextureRegion laserBoost;
|
||||||
public @Load("drill-laser-boost-end") TextureRegion laserEndBoost;
|
public @Load(value = "@-beam-boost-end", fallback = "drill-laser-boost-end") TextureRegion laserEndBoost;
|
||||||
public @Load("drill-laser-boost-center") TextureRegion laserCenterBoost;
|
public @Load(value = "@-beam-boost-center", fallback = "drill-laser-boost-center") TextureRegion laserCenterBoost;
|
||||||
|
|
||||||
public @Load("@-top") TextureRegion topRegion;
|
public @Load("@-top") TextureRegion topRegion;
|
||||||
public @Load("@-glow") TextureRegion glowRegion;
|
public @Load("@-glow") TextureRegion glowRegion;
|
||||||
@@ -202,6 +202,7 @@ public class BeamDrill extends Block{
|
|||||||
public float time;
|
public float time;
|
||||||
public float warmup, boostWarmup;
|
public float warmup, boostWarmup;
|
||||||
public float lastDrillSpeed;
|
public float lastDrillSpeed;
|
||||||
|
public int facingAmount;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawSelect(){
|
public void drawSelect(){
|
||||||
@@ -222,40 +223,8 @@ public class BeamDrill extends Block{
|
|||||||
if(lasers[0] == null) updateLasers();
|
if(lasers[0] == null) updateLasers();
|
||||||
|
|
||||||
warmup = Mathf.approachDelta(warmup, Mathf.num(efficiency > 0), 1f / 60f);
|
warmup = Mathf.approachDelta(warmup, Mathf.num(efficiency > 0), 1f / 60f);
|
||||||
lastItem = null;
|
|
||||||
boolean multiple = false;
|
updateFacing();
|
||||||
int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation), facingAmount = 0;
|
|
||||||
|
|
||||||
//update facing tiles
|
|
||||||
for(int p = 0; p < size; p++){
|
|
||||||
Point2 l = lasers[p];
|
|
||||||
Tile dest = null;
|
|
||||||
for(int i = 0; i < range; i++){
|
|
||||||
int rx = l.x + dx*i, ry = l.y + dy*i;
|
|
||||||
Tile other = world.tile(rx, ry);
|
|
||||||
if(other != null){
|
|
||||||
if(other.solid()){
|
|
||||||
Item drop = other.wallDrop();
|
|
||||||
if(drop != null && drop.hardness <= tier){
|
|
||||||
facingAmount ++;
|
|
||||||
if(lastItem != drop && lastItem != null){
|
|
||||||
multiple = true;
|
|
||||||
}
|
|
||||||
lastItem = drop;
|
|
||||||
dest = other;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
facing[p] = dest;
|
|
||||||
}
|
|
||||||
|
|
||||||
//when multiple items are present, count that as no item
|
|
||||||
if(multiple){
|
|
||||||
lastItem = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
float multiplier = Mathf.lerp(1f, optionalBoostIntensity, optionalEfficiency);
|
float multiplier = Mathf.lerp(1f, optionalBoostIntensity, optionalEfficiency);
|
||||||
boostWarmup = Mathf.lerpDelta(boostWarmup, optionalEfficiency, 0.1f);
|
boostWarmup = Mathf.lerpDelta(boostWarmup, optionalEfficiency, 0.1f);
|
||||||
@@ -281,7 +250,7 @@ public class BeamDrill extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldConsume(){
|
public boolean shouldConsume(){
|
||||||
return items.total() < itemCapacity && enabled;
|
return items.total() < itemCapacity && lastItem != null && enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -369,15 +338,54 @@ public class BeamDrill extends Block{
|
|||||||
public void onProximityUpdate(){
|
public void onProximityUpdate(){
|
||||||
//when rotated.
|
//when rotated.
|
||||||
updateLasers();
|
updateLasers();
|
||||||
|
updateFacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateLasers(){
|
protected void updateLasers(){
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
if(lasers[i] == null) lasers[i] = new Point2();
|
if(lasers[i] == null) lasers[i] = new Point2();
|
||||||
nearbySide(tileX(), tileY(), rotation, i, lasers[i]);
|
nearbySide(tileX(), tileY(), rotation, i, lasers[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void updateFacing(){
|
||||||
|
lastItem = null;
|
||||||
|
boolean multiple = false;
|
||||||
|
int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation);
|
||||||
|
facingAmount = 0;
|
||||||
|
|
||||||
|
//update facing tiles
|
||||||
|
for(int p = 0; p < size; p++){
|
||||||
|
Point2 l = lasers[p];
|
||||||
|
Tile dest = null;
|
||||||
|
for(int i = 0; i < range; i++){
|
||||||
|
int rx = l.x + dx*i, ry = l.y + dy*i;
|
||||||
|
Tile other = world.tile(rx, ry);
|
||||||
|
if(other != null){
|
||||||
|
if(other.solid()){
|
||||||
|
Item drop = other.wallDrop();
|
||||||
|
if(drop != null && drop.hardness <= tier){
|
||||||
|
facingAmount ++;
|
||||||
|
if(lastItem != drop && lastItem != null){
|
||||||
|
multiple = true;
|
||||||
|
}
|
||||||
|
lastItem = drop;
|
||||||
|
dest = other;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
facing[p] = dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
//when multiple items are present, count that as no item
|
||||||
|
if(multiple){
|
||||||
|
lastItem = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte version(){
|
public byte version(){
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
//finish placement immediately when a block is replaced.
|
//finish placement immediately when a block is replaced.
|
||||||
if(previous instanceof CoreBlock){
|
if(previous instanceof CoreBlock){
|
||||||
tile.setBlock(this, tile.team());
|
tile.setBlock(this, tile.team());
|
||||||
Fx.placeBlock.at(tile, tile.block().size);
|
tile.block().placeEffect.at(tile, tile.block().size);
|
||||||
Fx.upgradeCore.at(tile.drawx(), tile.drawy(), 0f, tile.block());
|
Fx.upgradeCore.at(tile.drawx(), tile.drawy(), 0f, tile.block());
|
||||||
Fx.upgradeCoreBloom.at(tile, tile.block().size);
|
Fx.upgradeCoreBloom.at(tile, tile.block().size);
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ import mindustry.gen.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
public class DrawPistons extends DrawBlock{
|
public class DrawPistons extends DrawBlock{
|
||||||
public float sinMag = 4f, sinScl = 6f, sinOffset = 50f, sideOffset = 0f, lenOffset = -1f;
|
public float sinMag = 4f, sinScl = 6f, sinOffset = 50f, sideOffset = 0f, lenOffset = -1f, angleOffset = 0f;
|
||||||
public int sides = 4;
|
public int sides = 4;
|
||||||
|
public String suffix = "-piston";
|
||||||
public TextureRegion region1, region2, regiont;
|
public TextureRegion region1, region2, regiont;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -22,7 +23,7 @@ public class DrawPistons extends DrawBlock{
|
|||||||
public void draw(Building build){
|
public void draw(Building build){
|
||||||
for(int i = 0; i < sides; i++){
|
for(int i = 0; i < sides; i++){
|
||||||
float len = Mathf.absin(build.totalProgress() + sinOffset + sideOffset * sinScl * i, sinScl, sinMag) + lenOffset;
|
float len = Mathf.absin(build.totalProgress() + sinOffset + sideOffset * sinScl * i, sinScl, sinMag) + lenOffset;
|
||||||
float angle = i * 360f / sides;
|
float angle = angleOffset + i * 360f / sides;
|
||||||
TextureRegion reg =
|
TextureRegion reg =
|
||||||
regiont.found() && (Mathf.equal(angle, 315) || Mathf.equal(angle, 135)) ? regiont :
|
regiont.found() && (Mathf.equal(angle, 315) || Mathf.equal(angle, 135)) ? regiont :
|
||||||
angle >= 135 && angle < 315 ? region2 : region1;
|
angle >= 135 && angle < 315 ? region2 : region1;
|
||||||
@@ -41,8 +42,8 @@ public class DrawPistons extends DrawBlock{
|
|||||||
public void load(Block block){
|
public void load(Block block){
|
||||||
super.load(block);
|
super.load(block);
|
||||||
|
|
||||||
region1 = Core.atlas.find(block.name + "-piston0", block.name + "-piston");
|
region1 = Core.atlas.find(block.name + suffix + "0", block.name + suffix);
|
||||||
region2 = Core.atlas.find(block.name + "-piston1", block.name + "-piston");
|
region2 = Core.atlas.find(block.name + suffix + "1", block.name + suffix);
|
||||||
regiont = Core.atlas.find(block.name + "-piston-t");
|
regiont = Core.atlas.find(block.name + suffix + "-t");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ public class StatUnit{
|
|||||||
blocks = new StatUnit("blocks"),
|
blocks = new StatUnit("blocks"),
|
||||||
blocksSquared = new StatUnit("blocksSquared"),
|
blocksSquared = new StatUnit("blocksSquared"),
|
||||||
tilesSecond = new StatUnit("tilesSecond"),
|
tilesSecond = new StatUnit("tilesSecond"),
|
||||||
powerSecond = new StatUnit("powerSecond"),
|
powerSecond = new StatUnit("powerSecond", "[accent]" + Iconc.power + "[]"),
|
||||||
liquidSecond = new StatUnit("liquidSecond"),
|
liquidSecond = new StatUnit("liquidSecond"),
|
||||||
itemsSecond = new StatUnit("itemsSecond"),
|
itemsSecond = new StatUnit("itemsSecond"),
|
||||||
liquidUnits = new StatUnit("liquidUnits"),
|
liquidUnits = new StatUnit("liquidUnits"),
|
||||||
powerUnits = new StatUnit("powerUnits"),
|
powerUnits = new StatUnit("powerUnits", "[accent]" + Iconc.power + "[]"),
|
||||||
heatUnits = new StatUnit("heatUnits", "[red]" + Iconc.waves + "[]"),
|
heatUnits = new StatUnit("heatUnits", "[red]" + Iconc.waves + "[]"),
|
||||||
degrees = new StatUnit("degrees"),
|
degrees = new StatUnit("degrees"),
|
||||||
seconds = new StatUnit("seconds"),
|
seconds = new StatUnit("seconds"),
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ public class StatValues{
|
|||||||
|
|
||||||
if(type.spawnUnit != null && type.spawnUnit.weapons.size > 0){
|
if(type.spawnUnit != null && type.spawnUnit.weapons.size > 0){
|
||||||
ammo(ObjectMap.of(t, type.spawnUnit.weapons.first().bullet), indent, false).display(table);
|
ammo(ObjectMap.of(t, type.spawnUnit.weapons.first().bullet), indent, false).display(table);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//no point in displaying unit icon twice
|
//no point in displaying unit icon twice
|
||||||
|
|||||||
Reference in New Issue
Block a user