Kartik Scripts

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

NameTypeRequiredDescription
deftableโœ…A furniture definition (model, label, price, category, โ€ฆ), matching the shape used in shared/furniture/*.lua.

๐Ÿ“ค Returns

TypeDescription
dependsThe 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.

On this page