diff --git a/annotations/src/main/resources/revisions/Bullet/1.json b/annotations/src/main/resources/revisions/Bullet/1.json new file mode 100644 index 0000000000..bdb86498f2 --- /dev/null +++ b/annotations/src/main/resources/revisions/Bullet/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/Bullet/2.json b/annotations/src/main/resources/revisions/Bullet/2.json new file mode 100644 index 0000000000..b28c91f9a7 --- /dev/null +++ b/annotations/src/main/resources/revisions/Bullet/2.json @@ -0,0 +1 @@ +{version:2,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/EffectState/1.json b/annotations/src/main/resources/revisions/EffectState/1.json new file mode 100644 index 0000000000..530155f361 --- /dev/null +++ b/annotations/src/main/resources/revisions/EffectState/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:color,type:arc.graphics.Color,size:-1},{name:data,type:java.lang.Object,size:-1},{name:effect,type:mindustry.entities.Effect,size:-1},{name:lifetime,type:float,size:4},{name:offsetX,type:float,size:4},{name:offsetY,type:float,size:4},{name:parent,type:Posc,size:-1},{name:rotation,type:float,size:4},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/EffectState/2.json b/annotations/src/main/resources/revisions/EffectState/2.json new file mode 100644 index 0000000000..a1ea72acf0 --- /dev/null +++ b/annotations/src/main/resources/revisions/EffectState/2.json @@ -0,0 +1 @@ +{version:2,fields:[{name:color,type:arc.graphics.Color,size:-1},{name:data,type:java.lang.Object,size:-1},{name:effect,type:mindustry.entities.Effect,size:-1},{name:lifetime,type:float,size:4},{name:offsetX,type:float,size:4},{name:offsetY,type:float,size:4},{name:parent,type:mindustry.gen.Posc,size:-1},{name:rotation,type:float,size:4},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 370cdc0986..a44c86953c 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1862,8 +1862,9 @@ public class Blocks implements ContentList{ consumes.power(4f); }}; + //TODO remove launchPadLarge = new LaunchPad("launch-pad-large"){{ - requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.titanium, 200, Items.silicon, 150, Items.lead, 250, Items.plastanium, 75)); + //requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.titanium, 200, Items.silicon, 150, Items.lead, 250, Items.plastanium, 75)); size = 4; itemCapacity = 300; launchTime = 60f * 35; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 4c2fef44c5..82d40986a8 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -538,7 +538,7 @@ public class UnitTypes implements ContentList{ mineTier = 1; buildSpeed = 0.5f; drag = 0.05f; - speed = 2.4f; + speed = 2.6f; rotateSpeed = 15f; accel = 0.1f; range = 70f; @@ -573,7 +573,7 @@ public class UnitTypes implements ContentList{ mineTier = 1; buildSpeed = 0.5f; drag = 0.05f; - speed = 2.4f; + speed = 2.9f; rotateSpeed = 15f; accel = 0.1f; range = 70f; @@ -608,7 +608,7 @@ public class UnitTypes implements ContentList{ mineTier = 1; buildSpeed = 0.5f; drag = 0.05f; - speed = 2.4f; + speed = 3.4f; rotateSpeed = 15f; accel = 0.1f; range = 70f; diff --git a/core/src/mindustry/type/Sector.java b/core/src/mindustry/type/Sector.java index d5c72b754d..f694358e9b 100644 --- a/core/src/mindustry/type/Sector.java +++ b/core/src/mindustry/type/Sector.java @@ -149,7 +149,7 @@ public class Sector{ //TODO this should be stored in a more efficient structure, and be updated each turn public Seq getRecievedItems(){ - return Core.settings.getJson(key("recieved-items"),Seq.class, ItemStack.class, Seq::new); + return Core.settings.getJson(key("recieved-items"), Seq.class, ItemStack.class, Seq::new); } public void setRecievedItems(Seq stacks){ diff --git a/core/src/mindustry/ui/Styles.java b/core/src/mindustry/ui/Styles.java index 39a19bd8d8..88fde61aab 100644 --- a/core/src/mindustry/ui/Styles.java +++ b/core/src/mindustry/ui/Styles.java @@ -194,8 +194,8 @@ public class Styles{ down = flatDown; up = none; over = flatOver; - disabled = black8; - imageDisabledColor = Color.lightGray; + disabled = none; + imageDisabledColor = Color.gray; imageUpColor = Color.white; }}; clearPartial2i = new ImageButtonStyle(){{ diff --git a/core/src/mindustry/world/blocks/campaign/LaunchPad.java b/core/src/mindustry/world/blocks/campaign/LaunchPad.java index cb3bad20bf..9bf9d6bc2b 100644 --- a/core/src/mindustry/world/blocks/campaign/LaunchPad.java +++ b/core/src/mindustry/world/blocks/campaign/LaunchPad.java @@ -7,7 +7,6 @@ import arc.math.*; import arc.math.geom.*; import arc.struct.*; import arc.util.*; -import mindustry.*; import mindustry.annotations.Annotations.*; import mindustry.content.*; import mindustry.entities.*; @@ -19,6 +18,8 @@ import mindustry.ui.*; import mindustry.world.*; import mindustry.world.meta.*; +import static mindustry.Vars.*; + public class LaunchPad extends Block{ public final int timerLaunch = timers++; /** Time inbetween launches. */ @@ -54,7 +55,7 @@ public class LaunchPad extends Block{ public void draw(){ super.draw(); - if(!Vars.state.isCampaign()) return; + if(!state.isCampaign()) return; if(lightRegion.found()){ Draw.color(lightColor); @@ -91,7 +92,7 @@ public class LaunchPad extends Block{ @Override public void updateTile(){ - if(!Vars.state.isCampaign()) return; + if(!state.isCampaign()) return; //launch when full and base conditions are met if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){ @@ -175,12 +176,23 @@ public class LaunchPad extends Block{ public void remove(){ //actually launch the items upon removal - if(team() == Vars.state.rules.defaultTeam){ + if(team() == state.rules.defaultTeam && state.secinfo.origin != null){ + Seq dest = state.secinfo.origin.getRecievedItems(); + for(ItemStack stack : stacks){ - //TODO where do the items go? - //Vars.data.addItem(stack.item, stack.amount); + ItemStack sto = dest.find(i -> i.item == stack.item); + if(sto != null){ + sto.amount += stack.amount; + }else{ + dest.add(stack); + } + + //update export + state.secinfo.handleItemExport(stack); Events.fire(new LaunchItemEvent(stack)); } + + state.secinfo.origin.setRecievedItems(dest); } } }