Add housing storage, guest permissions, and timed key destruction

This commit is contained in:
dingo
2026-09-10 05:47:22 -04:00
parent 454f3300ca
commit 6903d5ece8
41 changed files with 2386 additions and 183 deletions
+162 -82
View File
@@ -8,6 +8,8 @@ type Protocol struct {
CatalogResult *ContentResult `json:"catalogResult,omitempty"`
CraftRequest *CraftRequest `json:"craftRequest,omitempty"`
CraftResult *CraftResult `json:"craftResult,omitempty"`
HouseRequest *HouseRequest `json:"houseRequest,omitempty"`
HouseState *HouseState `json:"houseState,omitempty"`
Intent Intent `json:"intent"`
Snapshot Snapshot `json:"snapshot"`
}
@@ -18,6 +20,7 @@ type ContentCatalog struct {
Crafting *CraftingContent `json:"crafting,omitempty"`
EffectSets []EffectSet `json:"effectSets,omitempty"`
Gathering *GatheringContent `json:"gathering,omitempty"`
HousingVersion *int64 `json:"housingVersion,omitempty"`
Items []ItemDefinition `json:"items"`
Powers *PowerContent `json:"powers,omitempty"`
RequirementSets []RequirementSet `json:"requirementSets,omitempty"`
@@ -228,18 +231,19 @@ type ResourceDefinition struct {
}
type ItemDefinition struct {
AttackID *string `json:"attackId,omitempty"`
CraftPool []CraftStat `json:"craftPool,omitempty"`
CraftRolls *int64 `json:"craftRolls,omitempty"`
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
ID string `json:"id"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
AttackID *string `json:"attackId,omitempty"`
CraftPool []CraftStat `json:"craftPool,omitempty"`
CraftRolls *int64 `json:"craftRolls,omitempty"`
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
Furniture *FurnitureProfile `json:"furniture,omitempty"`
ID string `json:"id"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
}
type CraftStat struct {
@@ -250,6 +254,12 @@ type CraftStat struct {
Weight float64 `json:"weight"`
}
type FurnitureProfile struct {
Container bool `json:"container"`
Depth float64 `json:"depth"`
Width float64 `json:"width"`
}
type ItemRequirements struct {
Level int64 `json:"level"`
Stats map[string]float64 `json:"stats"`
@@ -438,18 +448,19 @@ type EffectSetDraft struct {
}
type ItemDraft struct {
AttackID *string `json:"attackId,omitempty"`
CraftPool []CraftStat `json:"craftPool,omitempty"`
CraftRolls *int64 `json:"craftRolls,omitempty"`
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
ID *string `json:"id,omitempty"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
AttackID *string `json:"attackId,omitempty"`
CraftPool []CraftStat `json:"craftPool,omitempty"`
CraftRolls *int64 `json:"craftRolls,omitempty"`
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
Furniture *FurnitureProfile `json:"furniture,omitempty"`
ID *string `json:"id,omitempty"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
}
type LootTableDraft struct {
@@ -580,6 +591,126 @@ type KnownRecipe struct {
Recipe CraftRecipe `json:"recipe"`
}
type HouseRequest struct {
HouseID *string `json:"houseId,omitempty"`
Item *string `json:"item,omitempty"`
Name *string `json:"name,omitempty"`
Op string `json:"op"`
Permissions map[string]bool `json:"permissions,omitempty"`
Quantity *int64 `json:"quantity,omitempty"`
RequestID string `json:"requestId"`
Revision *int64 `json:"revision,omitempty"`
Role *string `json:"role,omitempty"`
Target *string `json:"target,omitempty"`
X *float64 `json:"x,omitempty"`
Z *float64 `json:"z,omitempty"`
}
type HouseState struct {
Effective map[string]bool `json:"effective"`
Houses []HouseSummary `json:"houses"`
People []Entity `json:"people"`
Role string `json:"role"`
Room *House `json:"room,omitempty"`
}
type HouseSummary struct {
Creator bool `json:"creator"`
ID string `json:"id"`
Keys int64 `json:"keys"`
Name string `json:"name"`
RecoveryWorld string `json:"recoveryWorld"`
Role string `json:"role"`
State string `json:"state"`
}
type Entity struct {
Depth *float64 `json:"depth,omitempty"`
HP float64 `json:"hp"`
Height *float64 `json:"height,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
MaxHP float64 `json:"maxHp"`
Model *string `json:"model,omitempty"`
Name string `json:"name"`
Position Vec3 `json:"position"`
Radius *float64 `json:"radius,omitempty"`
RequiredLevel *int64 `json:"requiredLevel,omitempty"`
ResourceID *string `json:"resourceId,omitempty"`
SkillID *string `json:"skillId,omitempty"`
State string `json:"state"`
Width *float64 `json:"width,omitempty"`
}
type Vec3 struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Z float64 `json:"z"`
}
type House struct {
Floor HouseInventory `json:"floor"`
Furniture map[string]HouseFurniture `json:"furniture"`
ID string `json:"id"`
Name string `json:"name"`
Overrides map[string]map[string]bool `json:"overrides"`
Permissions map[string]bool `json:"permissions"`
Revision int64 `json:"revision"`
Roles map[string]string `json:"roles"`
Size float64 `json:"size"`
State string `json:"state"`
}
type HouseInventory struct {
CraftedStacks []CraftedStack `json:"craftedStacks"`
Inventory map[string]int64 `json:"inventory"`
Items []ItemInstance `json:"items"`
StackNames map[string]string `json:"stackNames"`
}
type CraftedStack struct {
ID string `json:"id"`
Item string `json:"item"`
Provenance CraftProvenance `json:"provenance"`
Quantity int64 `json:"quantity"`
}
type CraftProvenance struct {
At float64 `json:"at"`
CharacterID string `json:"characterId"`
CrafterName string `json:"crafterName"`
Level int64 `json:"level"`
Profession string `json:"profession"`
RecipeID string `json:"recipeId"`
RecipeRevision int64 `json:"recipeRevision"`
WorldID string `json:"worldId"`
}
type ItemInstance struct {
Attack *CombatAttack `json:"attack,omitempty"`
DefinitionID string `json:"definitionId"`
Description string `json:"description"`
Equippable bool `json:"equippable"`
Furniture *FurnitureProfile `json:"furniture,omitempty"`
HouseID *string `json:"houseId,omitempty"`
ID string `json:"id"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Provenance *CraftProvenance `json:"provenance,omitempty"`
RequirementMessage string `json:"requirementMessage"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
}
type HouseFurniture struct {
Contents HouseInventory `json:"contents"`
Item ItemInstance `json:"item"`
X float64 `json:"x"`
Z float64 `json:"z"`
}
type Intent struct {
Op string `json:"op"`
Seq int64 `json:"seq"`
@@ -616,30 +747,6 @@ type Chunk struct {
Z int64 `json:"z"`
}
type Entity struct {
Depth *float64 `json:"depth,omitempty"`
HP float64 `json:"hp"`
Height *float64 `json:"height,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
MaxHP float64 `json:"maxHp"`
Model *string `json:"model,omitempty"`
Name string `json:"name"`
Position Vec3 `json:"position"`
Radius *float64 `json:"radius,omitempty"`
RequiredLevel *int64 `json:"requiredLevel,omitempty"`
ResourceID *string `json:"resourceId,omitempty"`
SkillID *string `json:"skillId,omitempty"`
State string `json:"state"`
Width *float64 `json:"width,omitempty"`
}
type Vec3 struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Z float64 `json:"z"`
}
type GatheringRisk struct {
Allowed bool `json:"allowed"`
Damage float64 `json:"damage"`
@@ -669,6 +776,7 @@ type Character struct {
Consumables []GatheringConsumable `json:"consumables,omitempty"`
CraftedStacks []CraftedStack `json:"craftedStacks,omitempty"`
Crafting map[string]CraftProgress `json:"crafting,omitempty"`
DestroyKey *KeyDestruction `json:"destroyKey,omitempty"`
DiscoveredRecipes map[string]KnownRecipe `json:"discoveredRecipes,omitempty"`
Entity Entity `json:"entity"`
Equipment map[string]string `json:"equipment"`
@@ -679,6 +787,7 @@ type Character struct {
GatheringEffects []TimedGatheringEffect `json:"gatheringEffects,omitempty"`
HasKeystone bool `json:"hasKeystone"`
HealthChoices int64 `json:"healthChoices"`
HouseID *string `json:"houseId,omitempty"`
Inventory map[string]int64 `json:"inventory"`
Items []ItemInstance `json:"items"`
Kills int64 `json:"kills"`
@@ -698,24 +807,6 @@ type Character struct {
Weapons map[string]WeaponProgress `json:"weapons,omitempty"`
}
type CraftedStack struct {
ID string `json:"id"`
Item string `json:"item"`
Provenance CraftProvenance `json:"provenance"`
Quantity int64 `json:"quantity"`
}
type CraftProvenance struct {
At float64 `json:"at"`
CharacterID string `json:"characterId"`
CrafterName string `json:"crafterName"`
Level int64 `json:"level"`
Profession string `json:"profession"`
RecipeID string `json:"recipeId"`
RecipeRevision int64 `json:"recipeRevision"`
WorldID string `json:"worldId"`
}
type CraftProgress struct {
ID string `json:"id"`
Level int64 `json:"level"`
@@ -725,6 +816,11 @@ type CraftProgress struct {
XPToNextLevel int64 `json:"xpToNextLevel"`
}
type KeyDestruction struct {
FinishesAt float64 `json:"finishesAt"`
KeyID string `json:"keyId"`
}
type SkillProgress struct {
EffectiveLevel int64 `json:"effectiveLevel"`
Experience StatValue `json:"experience"`
@@ -751,22 +847,6 @@ type TimedGatheringEffect struct {
Source string `json:"source"`
}
type ItemInstance struct {
Attack *CombatAttack `json:"attack,omitempty"`
DefinitionID string `json:"definitionId"`
Description string `json:"description"`
Equippable bool `json:"equippable"`
ID string `json:"id"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Provenance *CraftProvenance `json:"provenance,omitempty"`
RequirementMessage string `json:"requirementMessage"`
Requirements ItemRequirements `json:"requirements"`
Slot string `json:"slot"`
WeaponType *string `json:"weaponType,omitempty"`
Weight float64 `json:"weight"`
}
type LearnedPower struct {
Attack CombatAttack `json:"attack"`
Definition PowerDefinition `json:"definition"`