Merge branch '6.0' of https://github.com/Anuken/Mindustry into object-config
# Conflicts: # core/src/mindustry/entities/traits/BuilderTrait.java # core/src/mindustry/entities/type/TileEntity.java # core/src/mindustry/game/EventType.java # core/src/mindustry/game/Schematics.java # core/src/mindustry/input/InputHandler.java # core/src/mindustry/io/TypeIO.java # core/src/mindustry/world/Block.java # core/src/mindustry/world/blocks/distribution/Sorter.java
This commit is contained in:
@@ -232,10 +232,14 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc{
|
||||
return proximity;
|
||||
}
|
||||
|
||||
/** Tile configuration. Defaults to 0. Used for block rebuilding. */
|
||||
@Override
|
||||
public int config(){
|
||||
return 0;
|
||||
/** Tile configuration. Defaults to null. Used for block rebuilding. */
|
||||
public Object config(){
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Sets the config object and casts it. Does nothing by default. */
|
||||
public void setConfig(Object config){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public class BuildRequest{
|
||||
/** Whether this request comes with a config int. If yes, any blocks placed with this request will not call playerPlaced.*/
|
||||
public boolean hasConfig;
|
||||
/** Config int. Not used unless hasConfig is true.*/
|
||||
public int config;
|
||||
public Object config;
|
||||
/** Original position, only used in schematics.*/
|
||||
public int originalX, originalY, originalWidth, originalHeight;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class BuildRequest{
|
||||
return y*tilesize + block.offset();
|
||||
}
|
||||
|
||||
public BuildRequest configure(int config){
|
||||
public BuildRequest configure(Object config){
|
||||
this.config = config;
|
||||
this.hasConfig = true;
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user