AddFurnitureItem
exports['kartik-properties']:AddFurnitureItem(def)๐น Description
Registers a furniture definition into the catalogue at runtime, so other resources can extend the furniture store without editing the shared furniture files. The definition is added to the in-memory catalogue used by the modeler and store.
๐ง Parameters
| Name | Type | Required | Description |
|---|---|---|---|
def | table | โ | A furniture definition (model, label, price, category, โฆ), matching the shape used in shared/furniture/*.lua. |
๐ค Returns
| Type | Description |
|---|---|
| depends | The result of the internal registration call. |
๐ง Example Usage
exports['kartik-properties']:AddFurnitureItem({
model = 'prop_couch_04',
label = 'Modern Sofa',
price = 1200,
category = 'seating',
})๐ Notes
- Definitions added this way are not persisted, register them on resource start so they survive restarts.
- Refer to the files under
shared/furniture/for the exact field set each category expects.