1
0
Mirror von https://github.com/luanti-org/luanti.git synchronisiert 2025-12-14 19:18:29 +01:00

Formspec: Show a player inventory using core.show_formspec (#15963)

'core.show_formspec' now shows and updates the inventory formspec as if
it was opened using the hotkey on client-side.
Dieser Commit ist enthalten in:
SmallJoker
2025-06-22 22:06:47 +02:00
committet von GitHub
Ursprung d41de3da79
Commit fdc149f316
10 geänderte Dateien mit 59 neuen und 23 gelöschten Zeilen

Datei anzeigen

@@ -902,6 +902,7 @@ void Client::handleCommand_InventoryFormSpec(NetworkPacket* pkt)
// Store formspec in LocalPlayer
player->inventory_formspec = pkt->readLongString();
player->inventory_formspec_override.clear();
}
void Client::handleCommand_DetachedInventory(NetworkPacket* pkt)

Datei anzeigen

@@ -178,6 +178,7 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
{ "TOCLIENT_STOP_SOUND", 0, true }, // 0x40
{ "TOCLIENT_PRIVILEGES", 0, true }, // 0x41
{ "TOCLIENT_INVENTORY_FORMSPEC", 0, true }, // 0x42
// ^ `channel` MUST be the same as TOCLIENT_SHOW_FORMSPEC
{ "TOCLIENT_DETACHED_INVENTORY", 0, true }, // 0x43
{ "TOCLIENT_SHOW_FORMSPEC", 0, true }, // 0x44
{ "TOCLIENT_MOVEMENT", 0, true }, // 0x45