Merge; internal changes

This commit is contained in:
Anuken
2020-01-10 11:30:42 -05:00
161 changed files with 7865 additions and 5181 deletions

View File

@@ -49,7 +49,7 @@ public class Blocks implements ContentList{
melter, separator, sporePress, pulverizer, incinerator, coalCentrifuge,
//sandbox
powerSource, powerVoid, itemSource, itemVoid, liquidSource, message, illuminator,
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, message, illuminator,
//defense
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
@@ -258,9 +258,7 @@ public class Blocks implements ContentList{
}};
ice = new Floor("ice"){{
//TODO fix drag/speed
dragMultiplier = 1f;
speedMultiplier = 1f;
dragMultiplier = 0.6f;
attributes.set(Attribute.water, 0.4f);
}};
@@ -898,10 +896,11 @@ public class Blocks implements ContentList{
}};
junction = new Junction("junction"){{
requirements(Category.distribution, ItemStack.with(Items.copper, 1), true);
requirements(Category.distribution, ItemStack.with(Items.copper, 2), true);
speed = 26;
capacity = 12;
health = 30;
buildCostMultiplier = 6f;
}};
itemBridge = new BufferedItemBridge("bridge-conveyor"){{
@@ -921,16 +920,18 @@ public class Blocks implements ContentList{
sorter = new Sorter("sorter"){{
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 2));
buildCostMultiplier = 3f;
}};
invertedSorter = new Sorter("inverted-sorter"){{
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 2));
buildCostMultiplier = 3f;
invert = true;
}};
router = new Router("router"){{
requirements(Category.distribution, ItemStack.with(Items.copper, 3));
buildCostMultiplier = 2f;
}};
distributor = new Router("distributor"){{
@@ -940,6 +941,7 @@ public class Blocks implements ContentList{
overflowGate = new OverflowGate("overflow-gate"){{
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 4));
buildCostMultiplier = 3f;
}};
massDriver = new MassDriver("mass-driver"){{
@@ -1234,7 +1236,7 @@ public class Blocks implements ContentList{
//region storage
coreShard = new CoreBlock("core-shard"){{
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with(Items.titanium, 4000));
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
alwaysUnlocked = true;
health = 1100;
@@ -1244,7 +1246,7 @@ public class Blocks implements ContentList{
}};
coreFoundation = new CoreBlock("core-foundation"){{
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with(Items.titanium, 400, Items.silicon, 3000));
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
health = 2000;
itemCapacity = 9000;
@@ -1253,7 +1255,7 @@ public class Blocks implements ContentList{
}};
coreNucleus = new CoreBlock("core-nucleus"){{
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with(Items.titanium, 4000, Items.silicon, 2000, Items.surgealloy, 3000));
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
health = 4000;
itemCapacity = 13000;
@@ -1824,6 +1826,11 @@ public class Blocks implements ContentList{
alwaysUnlocked = true;
}};
liquidVoid = new LiquidVoid("liquid-void"){{
requirements(Category.liquid, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
message = new MessageBlock("message"){{
requirements(Category.effect, ItemStack.with(Items.graphite, 5));
}};

View File

@@ -3,8 +3,6 @@ package mindustry.content;
import mindustry.ctype.*;
import mindustry.game.*;
import java.io.*;
public class Loadouts implements ContentList{
public static Schematic
basicShard,
@@ -14,13 +12,9 @@ public class Loadouts implements ContentList{
@Override
public void load(){
try{
basicShard = Schematics.readBase64("bXNjaAB4nD2K2wqAIBiD5ymibnoRn6YnEP1BwUMoBL19FuJ2sbFvUFgYZDaJsLeQrkinN9UJHImsNzlYE7WrIUastuSbnlKx2VJJt+8IQGGKdfO/8J5yrGJSMegLg+YUIA==");
advancedShard = Schematics.readBase64("bXNjaAB4nD2LjQqAIAyET7OMIOhFfJqeYMxBgSkYCL199gu33fFtB4tOwUTaBCP5QpHFzwtl32DahBeKK1NwPq8hoOcUixwpY+CUxe3XIwBbB/pa6tadVCUP02hgHvp5vZq/0b7pBHPYFOQ=");
basicFoundation = Schematics.readBase64("bXNjaAB4nD1OSQ6DMBBzFhVu8BG+0X8MQyoiJTNSukj8nlCi2Adbtg/GA4OBF8oB00rvyE/9ykafqOIw58A7SWRKy1ZiShhZ5RcOLZhYS1hefQ1gRIeptH9jq/qW2lvc1d2tgWsOfVX/tOwE86AYBA==");
basicNucleus = Schematics.readBase64("bXNjaAB4nD2MUQqAIBBEJy0s6qOLdJXuYNtCgikYBd2+LNmdj308hkGHtkId7M4YFns4mk/yfB4a48602eDI+mlNznu0FMPFd0wYKCaewl8F0EOueqM+yKSLVfJrNKWnSw/FZGzEGXFG9sy/px4gEBW1");
}catch(IOException e){
throw new RuntimeException(e);
}
basicShard = Schematics.readBase64("bXNjaAB4nD2K2wqAIBiD5ymibnoRn6YnEP1BwUMoBL19FuJ2sbFvUFgYZDaJsLeQrkinN9UJHImsNzlYE7WrIUastuSbnlKx2VJJt+8IQGGKdfO/8J5yrGJSMegLg+YUIA==");
advancedShard = Schematics.readBase64("bXNjaAB4nD2LjQqAIAyET7OMIOhFfJqeYMxBgSkYCL199gu33fFtB4tOwUTaBCP5QpHFzwtl32DahBeKK1NwPq8hoOcUixwpY+CUxe3XIwBbB/pa6tadVCUP02hgHvp5vZq/0b7pBHPYFOQ=");
basicFoundation = Schematics.readBase64("bXNjaAB4nD1OSQ6DMBBzFhVu8BG+0X8MQyoiJTNSukj8nlCi2Adbtg/GA4OBF8oB00rvyE/9ykafqOIw58A7SWRKy1ZiShhZ5RcOLZhYS1hefQ1gRIeptH9jq/qW2lvc1d2tgWsOfVX/tOwE86AYBA==");
basicNucleus = Schematics.readBase64("bXNjaAB4nD2MUQqAIBBEJy0s6qOLdJXuYNtCgikYBd2+LNmdj308hkGHtkId7M4YFns4mk/yfB4a48602eDI+mlNznu0FMPFd0wYKCaewl8F0EOueqM+yKSLVfJrNKWnSw/FZGzEGXFG9sy/px4gEBW1");
}
}

View File

@@ -70,7 +70,7 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
public void update(Player player){
if(player.timer.get(Player.timerAbility, healReload)){
if(indexer.eachBlock(player, healRange, other -> other.entity.damaged(), other -> {
other.entity.healBy(other.entity.maxHealth() * healPercent / 100f);
@@ -116,7 +116,7 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
public void update(Player player){
player.healBy(Time.delta() * 0.09f);
}
@@ -185,7 +185,7 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
public void update(Player player){
if(player.timer.get(Player.timerAbility, healReload)){
wasHealed = false;
@@ -253,7 +253,7 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
public void update(Player player){
float scl = 1f - player.shootHeat / 2f*Time.delta();
player.velocity().scl(scl);
}
@@ -303,8 +303,8 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
super.updateAlt(player);
public void update(Player player){
super.update(player);
if(player.timer.get(Player.timerAbility, effectReload)){
@@ -361,7 +361,7 @@ public class Mechs implements ContentList{
}
@Override
public void updateAlt(Player player){
public void update(Player player){
float scl = scld(player);
if(Mathf.chance(Time.delta() * (0.15 * scl))){
Effects.effect(Fx.hitLancer, Pal.lancerLaser, player.x, player.y);

View File

@@ -1,9 +1,10 @@
package mindustry.content;
import arc.struct.Array;
import mindustry.ctype.ContentList;
import mindustry.type.ItemStack;
import mindustry.world.Block;
import arc.math.*;
import arc.struct.*;
import mindustry.ctype.*;
import mindustry.type.*;
import mindustry.world.*;
import static mindustry.content.Blocks.*;
@@ -318,7 +319,7 @@ public class TechTree implements ContentList{
private static TechNode node(Block block, Runnable children){
ItemStack[] requirements = new ItemStack[block.requirements.length];
for(int i = 0; i < requirements.length; i++){
requirements[i] = new ItemStack(block.requirements[i].item, 30 + block.requirements[i].amount * 6);
requirements[i] = new ItemStack(block.requirements[i].item, 40 + Mathf.round(Mathf.pow(block.requirements[i].amount, 1.25f) * 6, 10));
}
return new TechNode(block, requirements, children);