Placement config code cleanup

This commit is contained in:
Anuken
2020-09-05 20:41:50 -04:00
parent c483ae2c23
commit f87bd78674
14 changed files with 67 additions and 92 deletions
+8 -1
View File
@@ -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);
}
}