feat: Add computer label handling and status broadcasting on rename command

This commit is contained in:
MayaTheShy
2026-02-20 02:33:25 -05:00
parent 11c289a3ed
commit 2a0a90892c

View File

@@ -260,6 +260,7 @@ local function broadcastStatus()
facing = state.facing,
surroundings = surroundings,
evalSupported = true,
label = os.getComputerLabel(),
}
modem.transmit(STATUS_CHANNEL, CHANNEL_RECEIVE, statusPacket)
@@ -471,6 +472,11 @@ local function processMessage(channel, message)
state.homePosition = message.homePosition
print("Home confirmed by server")
end
elseif message.type == "rename" and message.name then
os.setComputerLabel(message.name)
print("Renamed to: " .. message.name)
broadcastStatus()
elseif message.command then
processLegacyCommand(message)