Skip to content

containers.ron

Which furniture holds things, and how long a search takes. Read by the game’s rules: a change here changes how the game plays, and a world remembers the content it was made with.

File: assets/data/containers.ron

Furniture that holds things. Schema: zombye_sim::containers::ContainerData (validated on load; unknown fields are refused). All names and numbers are our own.

containers are the kinds of container: room in litres, how long the first search takes (seconds; x1.5 when sneaking, which is quieter), and the noise opening it makes (metres). What they hold is in loot.ron, by room type and container kind: a container is filled from its table the first time anyone opens it, from a hash of the world seed and the container’s id.

furniture maps (furniture kind, room type) to a container kind. room: "any" is the fallback for a kind in any other room; a kind with no entry isn’t a container (beds, sofas, tables…).

“corpse” is a dead zombie’s body (zombye_sim::corpses): searched where it lies, it holds what the zombie wore (population.ron’s outfits) and what its pockets hold (loot.ron’s corpse table). Its room only matters for what’s in its pockets; nothing can be put on a body.

The file is one ContainerData.

The whole of containers.ron. Empty by default: no furniture holds anything.

Field Type What it is
containers Vec<ContainerDef>
furniture Vec<FurnitureContainer>

One kind of container.

Field Type What it is
id String
name String
room_l f32 Room inside, in litres.
search_secs f32 Seconds the first search takes (×CarryTuning::sneak_search_mult when sneaking).
noise_m f32 Radius of the noise opening it makes (halved when sneaking).

One line of the furniture map: furniture furniture in a room of type room (or any) is a container.

Field Type What it is
furniture String
room String
container String
The whole file as shipped
// Furniture that holds things. Schema: zombye_sim::containers::ContainerData (validated on load;
// unknown fields are refused). All names and numbers are our own.
//
// `containers` are the kinds of container: room in litres, how long the first search takes
// (seconds; x1.5 when sneaking, which is quieter), and the noise opening it makes (metres). What
// they hold is in loot.ron, by room type and container kind: a container is filled from its table
// the first time anyone opens it, from a hash of the world seed and the container's id.
//
// `furniture` maps (furniture kind, room type) to a container kind. `room: "any"` is the fallback
// for a kind in any other room; a kind with no entry isn't a container (beds, sofas, tables...).
//
// "corpse" is a dead zombie's body (zombye_sim::corpses): searched where it lies, it holds what
// the zombie wore (population.ron's outfits) and what its pockets hold (loot.ron's corpse table).
// Its room only matters for what's in its pockets; nothing can be put on a body.
(
containers: [
(id: "corpse", name: "Body", room_l: 40.0, search_secs: 2.5, noise_m: 2.0),
(id: "fridge", name: "Fridge", room_l: 60.0, search_secs: 1.0, noise_m: 3.0),
(id: "kitchen_cupboard", name: "Kitchen cupboard", room_l: 40.0, search_secs: 1.5, noise_m: 4.0),
(id: "oven", name: "Oven", room_l: 20.0, search_secs: 0.8, noise_m: 4.0),
(id: "under_sink", name: "Under-sink cupboard", room_l: 25.0, search_secs: 1.2, noise_m: 4.0),
(id: "bathroom_cabinet", name: "Bathroom cabinet", room_l: 12.0, search_secs: 0.8, noise_m: 4.0),
(id: "wardrobe", name: "Wardrobe", room_l: 80.0, search_secs: 2.0, noise_m: 4.0),
(id: "coat_cupboard", name: "Coat cupboard", room_l: 60.0, search_secs: 1.5, noise_m: 4.0),
(id: "desk_drawers", name: "Desk drawers", room_l: 20.0, search_secs: 1.2, noise_m: 4.0),
(id: "drawer", name: "Drawer", room_l: 8.0, search_secs: 0.8, noise_m: 4.0),
(id: "drum", name: "Drum", room_l: 15.0, search_secs: 0.8, noise_m: 3.0),
(id: "tv_shelf", name: "TV stand shelf", room_l: 10.0, search_secs: 0.8, noise_m: 3.0),
(id: "shelves", name: "Shelves", room_l: 30.0, search_secs: 1.0, noise_m: 3.0),
(id: "workbench", name: "Bench and drawers", room_l: 40.0, search_secs: 1.5, noise_m: 4.0),
],
furniture: [
(furniture: "fridge", room: "any", container: "fridge"),
(furniture: "counter", room: "any", container: "kitchen_cupboard"),
(furniture: "stove", room: "any", container: "oven"),
(furniture: "sink", room: "bathroom", container: "bathroom_cabinet"),
(furniture: "sink", room: "any", container: "under_sink"),
(furniture: "wardrobe", room: "hall", container: "coat_cupboard"),
(furniture: "wardrobe", room: "any", container: "wardrobe"),
(furniture: "desk", room: "any", container: "desk_drawers"),
(furniture: "coffee_table", room: "any", container: "drawer"),
(furniture: "washer", room: "any", container: "drum"),
(furniture: "dryer", room: "any", container: "drum"),
(furniture: "tv", room: "any", container: "tv_shelf"),
(furniture: "shelf", room: "any", container: "shelves"),
(furniture: "workbench", room: "any", container: "workbench"),
],
)