mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4ea51bccc1
@ -182,18 +182,16 @@ public class Annotations{
|
||||
|
||||
/** A set of two booleans, one specifying server and one specifying client. */
|
||||
public enum Loc{
|
||||
/** Method can only be invoked on the client from the server. */
|
||||
/** Server only. */
|
||||
server(true, false),
|
||||
/** Method can only be invoked on the server from the client. */
|
||||
/** Client only. */
|
||||
client(false, true),
|
||||
/** Method can be invoked from anywhere */
|
||||
/** Both server and client. */
|
||||
both(true, true),
|
||||
/** Neither server nor client. */
|
||||
none(false, false);
|
||||
|
||||
/** If true, this method can be invoked ON clients FROM servers. */
|
||||
public final boolean isServer;
|
||||
/** If true, this method can be invoked ON servers FROM clients. */
|
||||
public final boolean isClient;
|
||||
|
||||
Loc(boolean server, boolean client){
|
||||
@ -222,16 +220,16 @@ public class Annotations{
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Remote{
|
||||
/** Specifies the locations from which this method can be invoked. */
|
||||
/** Specifies the locations from which this method can cause remote invocations (This -> Remote) [Default: Server -> Client]. */
|
||||
Loc targets() default Loc.server;
|
||||
|
||||
/** Specifies which methods are generated. Only affects server-to-client methods. */
|
||||
/** Specifies which methods are generated. Only affects server-to-client methods (Server -> Client(s)) [Default: Server -> Client & Server -> All Clients]. */
|
||||
Variant variants() default Variant.all;
|
||||
|
||||
/** The local locations where this method is called locally, when invoked. */
|
||||
/** The locations where this method is called locally, when invoked locally (This -> This) [Default: No local invocations]. */
|
||||
Loc called() default Loc.none;
|
||||
|
||||
/** Whether to forward this packet to all other clients upon receival. Client only. */
|
||||
/** Whether the server should forward this packet to all other clients upon receival from a client (Client -> Server -> Other Clients). [Default: Don't Forward Client Invocations] */
|
||||
boolean forward() default false;
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,7 @@ import mindustry.gen.*;
|
||||
public class DrawArcSmelt extends DrawBlock{
|
||||
public Color flameColor = Color.valueOf("f58349"), midColor = Color.valueOf("f2d585");
|
||||
public float flameRad = 1f, circleSpace = 2f, flameRadiusScl = 3f, flameRadiusMag = 0.3f, circleStroke = 1.5f;
|
||||
|
||||
public float x = 0, y = 0;
|
||||
public float alpha = 0.68f;
|
||||
public int particles = 25;
|
||||
public float particleLife = 40f, particleRad = 7f, particleStroke = 1.1f, particleLen = 3f;
|
||||
@ -26,10 +26,10 @@ public class DrawArcSmelt extends DrawBlock{
|
||||
Draw.blend(blending);
|
||||
|
||||
Draw.color(midColor, a);
|
||||
if(drawCenter) Fill.circle(build.x, build.y, flameRad + si);
|
||||
if(drawCenter) Fill.circle(build.x + x, build.y + y, flameRad + si);
|
||||
|
||||
Draw.color(flameColor, a);
|
||||
if(drawCenter) Lines.circle(build.x, build.y, (flameRad + circleSpace + si) * build.warmup());
|
||||
if(drawCenter) Lines.circle(build.x + x, build.y + y, (flameRad + circleSpace + si) * build.warmup());
|
||||
|
||||
Lines.stroke(particleStroke * build.warmup());
|
||||
|
||||
@ -39,7 +39,7 @@ public class DrawArcSmelt extends DrawBlock{
|
||||
float fin = (rand.random(1f) + base) % 1f, fout = 1f - fin;
|
||||
float angle = rand.random(360f);
|
||||
float len = particleRad * Interp.pow2Out.apply(fin);
|
||||
Lines.lineAngle(build.x + Angles.trnsx(angle, len), build.y + Angles.trnsy(angle, len), angle, particleLen * fout * build.warmup());
|
||||
Lines.lineAngle(build.x + Angles.trnsx(angle, len) + x, build.y + Angles.trnsy(angle, len) + y, angle, particleLen * fout * build.warmup());
|
||||
}
|
||||
|
||||
Draw.blend();
|
||||
|
@ -9,8 +9,7 @@ import mindustry.gen.*;
|
||||
|
||||
public class DrawCrucibleFlame extends DrawBlock{
|
||||
public Color flameColor = Color.valueOf("f58349"), midColor = Color.valueOf("f2d585");
|
||||
public float flameRad = 1f, circleSpace = 2f, flameRadiusScl = 10f, flameRadiusMag = 0.6f, circleStroke = 1.5f;
|
||||
|
||||
public float flameRad = 1f, circleSpace = 2f, flameRadiusScl = 10f, flameRadiusMag = 0.6f, circleStroke = 1.5f, x = 0, y = 0;
|
||||
public float alpha = 0.5f;
|
||||
public int particles = 30;
|
||||
public float particleLife = 70f, particleRad = 7f, particleSize = 3f, fadeMargin = 0.4f, rotateScl = 1.5f;
|
||||
@ -27,10 +26,10 @@ public class DrawCrucibleFlame extends DrawBlock{
|
||||
Draw.blend(Blending.additive);
|
||||
|
||||
Draw.color(midColor, a);
|
||||
Fill.circle(build.x, build.y, flameRad + si);
|
||||
Fill.circle(build.x + x, build.y + y, flameRad + si);
|
||||
|
||||
Draw.color(flameColor, a);
|
||||
Lines.circle(build.x, build.y, (flameRad + circleSpace + si) * build.warmup());
|
||||
Lines.circle(build.x + x, build.y + y, (flameRad + circleSpace + si) * build.warmup());
|
||||
|
||||
float base = (Time.time / particleLife);
|
||||
rand.setSeed(build.id);
|
||||
@ -40,8 +39,8 @@ public class DrawCrucibleFlame extends DrawBlock{
|
||||
float len = particleRad * particleInterp.apply(fout);
|
||||
Draw.alpha(a * (1f - Mathf.curve(fin, 1f - fadeMargin)));
|
||||
Fill.circle(
|
||||
build.x + Angles.trnsx(angle, len),
|
||||
build.y + Angles.trnsy(angle, len),
|
||||
build.x + Angles.trnsx(angle, len) + x,
|
||||
build.y + Angles.trnsy(angle, len) + y,
|
||||
particleSize * fin * build.warmup()
|
||||
);
|
||||
}
|
||||
|
@ -51,7 +51,11 @@ public class DrawRegion extends DrawBlock{
|
||||
@Override
|
||||
public void drawPlan(Block block, BuildPlan plan, Eachable<BuildPlan> list){
|
||||
if(!drawPlan) return;
|
||||
Draw.rect(region, plan.drawx(), plan.drawy(), (buildingRotate ? plan.rotation * 90f : 0));
|
||||
if(spinSprite){
|
||||
Drawf.spinSprite(region, plan.drawx() + x, plan.drawy() + y, (buildingRotate ? plan.rotation * 90f : 0 + rotation));
|
||||
}else{
|
||||
Draw.rect(region, plan.drawx()+ x, plan.drawy() + y, (buildingRotate ? plan.rotation * 90f : 0 + rotation));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user