Display hint for patched content (#11551)
* Display hint for patched content * Use icon for patched hint * Add disclaimer / Use file icon * Rename bundle key
This commit is contained in:
@@ -101,6 +101,7 @@ coreattack = < Core is under attack! >
|
|||||||
nearpoint = [[ [scarlet]LEAVE DROP POINT IMMEDIATELY[] ]\nannihilation imminent
|
nearpoint = [[ [scarlet]LEAVE DROP POINT IMMEDIATELY[] ]\nannihilation imminent
|
||||||
database = Core Database
|
database = Core Database
|
||||||
database.button = Database
|
database.button = Database
|
||||||
|
database.patched = Modified by data patches.
|
||||||
viewfields = View Content Fields
|
viewfields = View Content Fields
|
||||||
savegame = Save Game
|
savegame = Save Game
|
||||||
loadgame = Load Game
|
loadgame = Load Game
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ public class DataPatcher{
|
|||||||
return cont;
|
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! */
|
/** 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{
|
public void apply(Seq<String> patchArray) throws Exception{
|
||||||
if(applied){
|
if(applied){
|
||||||
|
|||||||
@@ -46,6 +46,15 @@ public class ContentInfoDialog extends BaseDialog{
|
|||||||
|
|
||||||
table.row();
|
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){
|
if(content.description != null){
|
||||||
var any = content.stats.toMap().size > 0;
|
var any = content.stats.toMap().size > 0;
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,12 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
setColor(Color.scarlet);
|
setColor(Color.scarlet);
|
||||||
touchable = Touchable.disabled;
|
touchable = Touchable.disabled;
|
||||||
}}).size(8 * 4).pad(3);
|
}}).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{
|
}else{
|
||||||
list.add(image).size(8 * 4).pad(3);
|
list.add(image).size(8 * 4).pad(3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user