Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1216,8 +1216,7 @@ public class LExecutor{
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public PackColorI(){
|
||||
}
|
||||
public PackColorI(){}
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
@@ -1225,6 +1224,29 @@ public class LExecutor{
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnpackColorI implements LInstruction{
|
||||
public LVar r, g, b, a, value;
|
||||
|
||||
public UnpackColorI(LVar r, LVar g, LVar b, LVar a, LVar value){
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
this.a = a;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public UnpackColorI(){}
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
var color = Tmp.c1.fromDouble(value.num());
|
||||
r.setnum(color.r);
|
||||
g.setnum(color.g);
|
||||
b.setnum(color.b);
|
||||
a.setnum(color.a);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CutsceneI implements LInstruction{
|
||||
public CutsceneAction action = CutsceneAction.stop;
|
||||
public LVar p1, p2, p3, p4;
|
||||
|
||||
@@ -897,6 +897,35 @@ public class LStatements{
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterStatement("unpackcolor")
|
||||
public static class UnpackColorStatement extends LStatement{
|
||||
public String r = "r", g = "g", b = "b", a = "a", value = "color";
|
||||
|
||||
@Override
|
||||
public void build(Table table){
|
||||
fields(table, r, str -> r = str);
|
||||
fields(table, g, str -> g = str);
|
||||
fields(table, b, str -> b = str);
|
||||
fields(table, a, str -> a = str);
|
||||
|
||||
row(table);
|
||||
|
||||
table.add(" = unpack ");
|
||||
|
||||
fields(table, value, str -> value = str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LInstruction build(LAssembler builder){
|
||||
return new UnpackColorI(builder.var(r), builder.var(g), builder.var(b), builder.var(a), builder.var(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public LCategory category(){
|
||||
return LCategory.operation;
|
||||
}
|
||||
}
|
||||
|
||||
@RegisterStatement("end")
|
||||
public static class EndStatement extends LStatement{
|
||||
@Override
|
||||
|
||||
@@ -239,7 +239,7 @@ public class Map implements Comparable<Map>, Publishable{
|
||||
int modes = Boolean.compare(Gamemode.pvp.valid(this), Gamemode.pvp.valid(map));
|
||||
if(modes != 0) return modes;
|
||||
|
||||
return name().compareTo(map.name());
|
||||
return Strings.stripColors(name()).compareTo(Strings.stripColors(map.name()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user