Placement config code cleanup
This commit is contained in:
@@ -374,6 +374,13 @@ public class Block extends UnlockableContent{
|
||||
return this;
|
||||
}
|
||||
|
||||
public Object nextConfig(){
|
||||
if(saveConfig && lastConfig != null){
|
||||
return lastConfig;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void drawRequest(BuildPlan req, Eachable<BuildPlan> list, boolean valid){
|
||||
Draw.reset();
|
||||
Draw.mixcol(!valid ? Pal.breakInvalid : Color.white, (!valid ? 0.4f : 0.24f) + Mathf.absin(Time.globalTime(), 6f, 0.28f));
|
||||
@@ -389,7 +396,7 @@ public class Block extends UnlockableContent{
|
||||
TextureRegion reg = getRequestRegion(req, list);
|
||||
Draw.rect(reg, req.drawx(), req.drawy(), !rotate ? 0 : req.rotation * 90);
|
||||
|
||||
if(req.hasConfig){
|
||||
if(req.config != null){
|
||||
drawRequestConfig(req, list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user