Campfires, stoves, a placeable campfire, and crafting anywhere

Crafting at props

A location can have props instead of (or as well as) fixed spots. The prompt then shows next to any matching object in the world, titled with that object's name:

["campfire"] = {
    label = "Campfire",
    props = {                            -- [model] = prompt title
        ["p_campfire05x"] = "Campfire",
        ["p_stove04x"] = "Stove",
    },
    categories = { ... },
},

The player turns to face the object instead of walking to a spot. Keep the list short: tr-crafting checks for each model near the player every half second.

The placeable campfire

Using the campfire item places a campfire in front of the player. Its model is a crafting prop like any other (add it to a location's props), and whoever placed it gets a Put Out prompt.

Config.PlaceableCampfire = {
    item = "campfire",         -- leave out to turn this off
    model = "p_campfire05x",
    animation = "campfire",    -- while lighting it
    placeTime = 4000,          -- ms
    max = 1,                   -- how many one player can have burning
    burnTime = 30,             -- minutes until it burns out (0 = until put out)
    -- jobs = { { name = "hunter" } },
}

The item is taken before the fire is placed, so a campfire is never free.

Field crafting

A location with no spots can be opened anywhere, with a command:

["field"] = {
    label = "Crafting",
    command = "crafting",      -- /crafting opens it
    categories = { ... },
},

Or from another script, on the client:

exports["tr-crafting"]:openCrafting("field")