Full Config: Doors
The complete configs/shared/doors.lua for Advanced Housing (sd-housing): the lock prompt, lock sounds, what a sale does to the locks, forcing a lock and the battering ram.
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.
lua
-- The locks on a property's doors. A door is a doorway: a double door's two leaves lock together.
return {
Distance = 1.5, -- metres from a door's middle its lock prompt shows
Key = 38, -- control that turns the lock (38 = E)
StreamRange = 60.0, -- metres within which a property's doors are put in the game's door system (their state applied)
-- How a door shows its lock. 'sprite': a lock floating on the doorway (shut, or open and amber), for anyone near it -
-- and, at the door the player can do something with, the key and what it does beside it. 'textui': ox_lib's text UI
-- box instead (lib.showTextUI), as in earlier versions.
Prompt = 'sprite',
Sprite = {
Range = 4.0, -- metres from a doorway its lock shows (only while the doorway is in sight, not through a wall)
Height = 1.25, -- metres above the bottom of the door it floats
Size = 0.031, -- the lock's width, as a share of the screen's (the pill it unfurls into is wider)
},
-- The lock heard turning, by everyone near the door.
Sound = {
Enabled = true,
Range = 14.0, -- metres from the door it is heard
Volume = 0.6, -- 0..1 (scaled by the player's own sound effects volume; our own sounds only)
-- 'auto': ox_doorlock's deadbolt when ox_doorlock is running, else our own; 'ox': always ox_doorlock's (none
-- without it); 'own': ours (web/build/sounds/lock.wav and unlock.wav: replace them to change them)
Source = 'auto',
},
LockOnPurchase = true, -- a property is bought with its doors locked
OpenHouse = true, -- a property for sale stands unlocked, so it can be viewed; locked again when it sells
LockOnLeave = false, -- lock a property's doors when its last owner or keyholder leaves the server
-- Jobs that may turn any lock, theirs or not (a raid). Job name -> lowest grade, e.g. { police = 2 }.
ForceJobs = {},
ForceTime = 6000, -- ms a forced lock takes (a progress bar), so it is not a free door key
-- The battering ram (the item below, its model and swing in sd-housing-assets): police aim at a locked door - a
-- target resource's option on it, or the door's lock prompt when none runs - and break it down. The camera goes to
-- the side, the ram is swung with the mouse (drawn back, driven forward: the harder and further, the harder the blow),
-- and on the last blow the door comes off its hinges and falls into the house. It stays down - the doorway open, the
-- lock gone with it - until the household puts it back from the doorway (or RepairAfter has passed). A door broken
-- down sets an armed alarm off, and the house's activity says who broke it.
Ram = {
Enabled = true,
Item = 'battering_ram',
-- Jobs that may use it (on duty): job name -> lowest grade. nil: the police jobs config.Security.Police names.
Jobs = nil,
Hits = 3, -- full blows a door takes (a blow counts by how hard it was swung: a full swing is 1, a tap little)
ReinforcedHits = 6, -- a house whose doors were reinforced (the home panel's security page)
RepairTime = 12000, -- ms the household spends hanging it back on its hinges
RepairCost = 0, -- what that costs them (bank)
RepairAfter = 60, -- minutes after which a broken door is back on its hinges anyway (0: only when they repair it)
Range = 35.0, -- metres the blows are heard from
Volume = 0.9, -- 0..1 (scaled by the player's own sound effects volume)
Camera = true, -- the camera goes to the side while it is swung (false: the player's own camera)
Sensitivity = 1.0, -- how far the mouse swings it
},
Animation = { Dict = 'anim@mp_player_intmenu@key_fob@', Name = 'fob_click', Ms = 900 }, -- turning a lock: the key fob
-- The walk-in pack's garage doors (drawn by sd-housing) open and shut from the same prompt: a lock in the opening, shut
-- while the door is down, for whoever may open it (the owner, a key that opens the doors or the garage, an admin).
Garage = {
Distance = 3.0, -- metres from the middle of the opening the prompt shows on foot
Vehicle = 9.0, -- and in a car pulled up to it
},
}