mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Don't show 'place yes' and 'delete yes' for selected block description in inventory.
But still show 'place no' and 'delete no'
This commit is contained in:
parent
91a88ce049
commit
21d96f1de1
@ -187,13 +187,10 @@ namespace ClassicalSharp.Gui.Widgets {
|
|||||||
buffer.Append(BlockInfo.Name[block]);
|
buffer.Append(BlockInfo.Name[block]);
|
||||||
if (game.ClassicMode) return;
|
if (game.ClassicMode) return;
|
||||||
|
|
||||||
buffer.Append(" (ID ");
|
buffer.Append(" (ID ").AppendNum(block).Append("&f");
|
||||||
buffer.AppendNum(block);
|
if (!BlockInfo.CanPlace[block]) { buffer.Append( ", place &cNo&f"); }
|
||||||
buffer.Append("&f, place ");
|
if (!BlockInfo.CanDelete[block]) { buffer.Append(", delete &cNo&f"); }
|
||||||
buffer.Append(BlockInfo.CanPlace[block] ? "&aYes" : "&cNo");
|
buffer.Append(')');
|
||||||
buffer.Append("&f, delete ");
|
|
||||||
buffer.Append(BlockInfo.CanDelete[block] ? "&aYes" : "&cNo");
|
|
||||||
buffer.Append("&f)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int lastCreatedIndex = -1000;
|
int lastCreatedIndex = -1000;
|
||||||
|
@ -558,9 +558,10 @@ static void TableWidget_MakeBlockDesc(STRING_TRANSIENT String* desc, BlockID blo
|
|||||||
String_AppendString(desc, &name);
|
String_AppendString(desc, &name);
|
||||||
if (Game_ClassicMode) return;
|
if (Game_ClassicMode) return;
|
||||||
|
|
||||||
const UInt8* place = Block_CanPlace[block] ? "&aYes" : "&cNo";
|
String_Format1(desc, " (ID %b&f", &block);
|
||||||
const UInt8* del = Block_CanDelete[block] ? "&aYes" : "&cNo";
|
if (!Block_CanPlace[block]) { String_AppendConst(desc, ", place &cNo&f"); }
|
||||||
String_Format3(desc, " (ID %b&f, place %c&f, delete %c&f)", &block, place, del);
|
if (!Block_CanDelete[block]) { String_AppendConst(desc, ", delete &cNo&f"); }
|
||||||
|
String_Append(desc, ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TableWidget_UpdateDescTexPos(TableWidget* widget) {
|
static void TableWidget_UpdateDescTexPos(TableWidget* widget) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user