Skip to content

Full Config: Home Panel ​

The complete configs/shared/panel.lua for Advanced Housing (sd-housing): the home panel, its screen, notes, cameras and the mailbox.

TIP

See the configuration guide for what each file controls. Download this file as a reference, and merge changes with the config shipped in your installed version.

Download shared/panel.lua

lua
-- The home panel: a tablet on a wall inside every property. Its screen shows the property at a glance from across the
-- room; aim at it (target) and the view goes up to it, and the property page is on its screen - the locks, the keys,
-- the activity, decorating, moving the panel itself. Its model streams from sd-housing-assets.
return {
    Enabled = true,
    AutoPlace = true, -- a property without a panel gets one beside its front door the first time its owner is inside
    Refit = true, -- a panel whose wall changed under it (the house rebuilt) is slid back onto it, else put by the front door
    Height = 1.45, -- metres above the floor its middle goes (placed by itself)
    Movers = 'owner', -- who may move it: 'owner', or 'decorate' (the owner and the keys that open decorating)

    Interact = {
        Distance = 1.8, -- metres from the panel it can be used from
        Key = 38, -- without a target resource (ox_target, qb-target, qtarget), a prompt on this control (38 = E)
    },

    -- The view at the panel: the camera goes square onto the screen, which fills this much of the display's height.
    Camera = {
        Fov = 34.0, -- degrees (vertical)
        Fill = 0.80, -- 0.3 - 0.95
        Ease = 650, -- ms there and back
        HideRadar = true,
    },

    Screen = {
        Distance = 14.0, -- metres a panel's screen is drawn from (beyond it, the glass is dark)
        Max = 3, -- most screens drawn at once (each is a small browser)
        Accent = '#5cc8d6', -- the screen's accent colour (its status light too, while the house is locked)
        Clock = 'game', -- 'game': the time the world is lit by (its weather and nights match); 'real': the player's own clock
        Clock24 = false, -- 14:05 rather than 2:05 pm
        Glow = true, -- a lit screen throws a little light on the wall round it
        Wake = 3.5, -- metres from the screen it wakes at (the house's plan and its notes in full); further off it dims
        Sounds = true, -- soft clicks and chimes from the screen while it is in use
    },

    -- What the panel adds to the house: the doorbell on its screen, who is home, notes the household leaves each other,
    -- and letting someone in at the front door from the panel.
    Home = {
        Notes = 12, -- notes kept per house (the oldest goes); 0 turns notes off
        NoteLength = 140, -- characters a note can be
        Buzz = 8, -- seconds the front door stays unlocked after letting someone in from the panel, before it locks itself
        Rings = 10, -- rings at the door the panel remembers (since the server started)
    },

    -- Cameras round the house: bought from the panel by the owner and placed by hand - a video doorbell flush on the
    -- wall, or a security camera on an arm, turned to look where it should - with what each will see drawn into the
    -- world as it is placed. Each one's picture plays on the panel's screen (or full screen), the room round the panel
    -- held still meanwhile, since the game looks through one camera at a time.
    Cameras = {
        Enabled = true,
        Price = 2500, -- each, paid from Properties.Account
        Max = 4, -- cameras a house can have
        Reach = 25.0, -- metres from the house's doors (its garages' too) a camera may go
        Watch = 'doors', -- who may watch them besides the owner: 'doors' (a key that opens the doors), 'any' (any key), 'owner'
        Fov = 70.0, -- degrees (vertical) at no zoom: a wide lens
        Pitch = -7.0, -- degrees a doorbell looks down (a security camera is aimed as it is placed)
        Pan = 55.0, -- degrees each turns either way from where it was aimed
        Tilt = 22.0, -- degrees each tips up from there
        TiltDown = 35.0, -- and down (never past looking straight down)
        Zoom = 3.0, -- most each zooms in
        Range = 22.0, -- metres out to which what a camera will see is drawn while it is placed
        Filter = 'colour', -- 'colour' (the picture as it is), 'cctv' (the game's security-camera grade over it)
    },

    -- A mailbox out front: the owner picks one on the panel (Mail) and puts it down by hand near the house. Anyone can
    -- post a letter in it - signed, or not - and, with ox_inventory, a parcel (what they put in a box of their own goes
    -- into the house's mailbox when they close it). The household is told on their phones, checks the mail at the box
    -- or reads it on the panel, and takes parcels out at the box. Other resources deliver too
    -- (exports['sd-housing']:SendMail). Letters and parcels go with the household when the house changes hands; the
    -- mailbox stays with it.
    Mail = {
        Enabled = true,
        Reach = 25.0, -- metres from the house's doors (its garages' too) the mailbox may go
        Styles = { -- the mailboxes there are: model, name on the panel, price (paid from Properties.Account)
            { model = 'prop_letterbox_01', label = 'Classic post', price = 350 },
            { model = 'prop_letterbox_03', label = 'Modern box', price = 450 },
            { model = 'prop_letterbox_04', label = 'Little house', price = 400 },
            { model = 'prop_letterbox_02', label = 'Twin boxes', price = 500 },
        },
        -- A mailbox the map already has out front (one of these) can be taken for the house's instead, for nothing:
        -- the owner aims at it while putting one down. It stays the map's (nothing is put up); it just takes the mail.
        Existing = { 'prop_letterbox_01', 'prop_letterbox_02', 'prop_letterbox_03', 'prop_letterbox_04' },
        Keep = 50, -- letters a house keeps (the oldest read one goes first)
        Subject = 60, -- characters a letter's subject can be
        Length = 1500, -- characters a letter can be
        Gap = 20, -- seconds between two letters (or parcels) from one player
        Parcels = { Enabled = true, Slots = 15, Weight = 60000 }, -- the mailbox's room for parcels (ox_inventory)
        Keyholders = true, -- keyholders read the mail and take parcels out too (the owner always does)
    },
}