Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -62,6 +62,10 @@ public class DataPatcher{
|
||||
return cont;
|
||||
}
|
||||
|
||||
public boolean isPatched(Object object){
|
||||
return usedpatches.contains(object);
|
||||
}
|
||||
|
||||
/** Applies the specified patches. If patches were already applied, the previous ones are un-applied - they do not stack! */
|
||||
public void apply(Seq<String> patchArray) throws Exception{
|
||||
if(applied){
|
||||
|
||||
@@ -46,6 +46,15 @@ public class ContentInfoDialog extends BaseDialog{
|
||||
|
||||
table.row();
|
||||
|
||||
if(state.isGame() && state.patcher.isPatched(content)){
|
||||
table.table(t -> {
|
||||
t.image(Icon.info).color(Pal.lightishGray);
|
||||
t.add("@database.patched").color(Pal.lightishGray).padLeft(4f);
|
||||
}).pad(4f).left();
|
||||
|
||||
table.row();
|
||||
}
|
||||
|
||||
if(content.description != null){
|
||||
var any = content.stats.toMap().size > 0;
|
||||
|
||||
|
||||
@@ -179,6 +179,12 @@ public class DatabaseDialog extends BaseDialog{
|
||||
setColor(Color.scarlet);
|
||||
touchable = Touchable.disabled;
|
||||
}}).size(8 * 4).pad(3);
|
||||
}else if(state.isGame() && state.patcher.isPatched(unlock)){
|
||||
list.stack(image, new Table(){{
|
||||
right().bottom().touchable = Touchable.disabled;
|
||||
// Interpolated color (lerp lightishGray and white) for better contrast
|
||||
image(Icon.fileSmall).size(12f).color(Tmp.c1.set(Color.white).a(0.5f));
|
||||
}}).size(8 * 4).pad(3);
|
||||
}else{
|
||||
list.add(image).size(8 * 4).pad(3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user