mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Bugfixes
This commit is contained in:
parent
46bc2207ff
commit
df08498d70
@ -41,10 +41,7 @@ void main() {
|
|||||||
vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y);
|
vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y);
|
||||||
|
|
||||||
vec4 c = texture2D(u_texture, v_texCoord.xy);
|
vec4 c = texture2D(u_texture, v_texCoord.xy);
|
||||||
|
float alpha = c.a;
|
||||||
if(1.0-abs(coords.x - 0.5)*2.0 < 1.0-u_progress){
|
|
||||||
// c = vec4(0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
c.a *= u_progress;
|
c.a *= u_progress;
|
||||||
|
|
||||||
@ -57,5 +54,7 @@ void main() {
|
|||||||
c = mix(c, u_color, f * u_color.a);
|
c = mix(c, u_color, f * u_color.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.a *= alpha;
|
||||||
|
|
||||||
gl_FragColor = c * v_color;
|
gl_FragColor = c * v_color;
|
||||||
}
|
}
|
||||||
|
@ -1672,7 +1672,7 @@ public class Blocks implements ContentList{
|
|||||||
groundFactory = new UnitFactory("ground-factory"){{
|
groundFactory = new UnitFactory("ground-factory"){{
|
||||||
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
|
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
|
||||||
plans = new UnitPlan[]{
|
plans = new UnitPlan[]{
|
||||||
new UnitPlan(UnitTypes.dagger, 500f, ItemStack.with(Items.silicon, 10)),
|
new UnitPlan(UnitTypes.dagger, 200f, ItemStack.with(Items.silicon, 10)),
|
||||||
new UnitPlan(UnitTypes.titan, 800f, ItemStack.with(Items.silicon, 20, Items.titanium, 10)),
|
new UnitPlan(UnitTypes.titan, 800f, ItemStack.with(Items.silicon, 20, Items.titanium, 10)),
|
||||||
};
|
};
|
||||||
size = 3;
|
size = 3;
|
||||||
@ -1706,6 +1706,7 @@ public class Blocks implements ContentList{
|
|||||||
consumes.power(3f);
|
consumes.power(3f);
|
||||||
consumes.items(ItemStack.with(Items.silicon, 30, Items.graphite, 30));
|
consumes.items(ItemStack.with(Items.silicon, 30, Items.graphite, 30));
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
|
constructTime = 200f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
repairPoint = new RepairPoint("repair-point"){{
|
repairPoint = new RepairPoint("repair-point"){{
|
||||||
|
@ -5,13 +5,12 @@ import arc.math.*;
|
|||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
import mindustry.entities.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.type.*;
|
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.blocks.payloads.*;
|
import mindustry.world.blocks.payloads.*;
|
||||||
import mindustry.world.consumers.*;
|
|
||||||
|
|
||||||
import static mindustry.Vars.state;
|
import static mindustry.Vars.state;
|
||||||
|
|
||||||
@ -104,7 +103,8 @@ public class Reconstructor extends UnitBlock{
|
|||||||
if(progress >= constructTime){
|
if(progress >= constructTime){
|
||||||
payload.unit = payload.unit.type().upgrade.create(payload.unit.team());
|
payload.unit = payload.unit.type().upgrade.create(payload.unit.team());
|
||||||
progress = 0;
|
progress = 0;
|
||||||
Fx.unitSpawn.at(this);
|
Effects.shake(2f, 3f, this);
|
||||||
|
Fx.producesmoke.at(this);
|
||||||
consume();
|
consume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import arc.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
@ -36,6 +37,9 @@ public class UnitBlock extends PayloadAcceptor{
|
|||||||
public void spawned(){
|
public void spawned(){
|
||||||
progress = 0f;
|
progress = 0f;
|
||||||
|
|
||||||
|
Tmp.v1.trns(rotdeg(), size * tilesize/2f);
|
||||||
|
Fx.smeltsmoke.at(x + Tmp.v1.x, y + Tmp.v1.y);
|
||||||
|
|
||||||
if(!net.client() && payload != null){
|
if(!net.client() && payload != null){
|
||||||
Unitc unit = payload.unit;
|
Unitc unit = payload.unit;
|
||||||
unit.set(x, y);
|
unit.set(x, y);
|
||||||
@ -48,6 +52,7 @@ public class UnitBlock extends PayloadAcceptor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
payload = null;
|
payload = null;
|
||||||
|
payloadPos = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void outputPayload(){
|
public void outputPayload(){
|
||||||
|
@ -198,6 +198,7 @@ public class UnitFactory extends UnitBlock{
|
|||||||
|
|
||||||
payloadPos = 0f;
|
payloadPos = 0f;
|
||||||
payload = new UnitPayload(plan.unit.create(team));
|
payload = new UnitPayload(plan.unit.create(team));
|
||||||
|
payVector.setZero();
|
||||||
consume();
|
consume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=84c3889593afe0fc98a5f9f9efde501899338d76
|
archash=88bbf067bd128651ebfa797ba64425658258e2c7
|
||||||
|
Loading…
Reference in New Issue
Block a user