refactor: complete server-first item schema wiring and plugin contract checks
This commit is contained in:
@@ -42,7 +42,7 @@ class PingPacket(BasePacket):
|
||||
|
||||
class ItemAddPacket(BasePacket):
|
||||
type: Literal["item_add"]
|
||||
itemType: Literal["radio_station", "dice", "wheel", "clock", "widget", "piano"]
|
||||
itemType: str = Field(min_length=1)
|
||||
|
||||
|
||||
class ItemPickupPacket(BasePacket):
|
||||
@@ -173,7 +173,7 @@ class NicknameResultPacket(BasePacket):
|
||||
|
||||
class WorldItem(BaseModel):
|
||||
id: str
|
||||
type: Literal["radio_station", "dice", "wheel", "clock", "widget", "piano"]
|
||||
type: str = Field(min_length=1)
|
||||
title: str
|
||||
x: int
|
||||
y: int
|
||||
@@ -191,7 +191,7 @@ class WorldItem(BaseModel):
|
||||
class PersistedWorldItem(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
id: str
|
||||
type: Literal["radio_station", "dice", "wheel", "clock", "widget", "piano"]
|
||||
type: str = Field(min_length=1)
|
||||
title: str
|
||||
x: int
|
||||
y: int
|
||||
|
||||
Reference in New Issue
Block a user