Configuration
Services
The company directory in the Services app and how company calls ring.
File: configs/config_services.lua. What players see is on Services.
#Config.Companies
Every entry is one card in the Services app: the job it belongs to, its name, an icon and where it is.
luaConfig.Companies = {
AutoAddJobs = true,
SkipJobs = { 'unemployed' },
{ job = 'police', label = 'Police', icon = 'shield-check', category = 'police', group = 'police',
location = { name = 'Mission Row Police Department', x = 441.2, y = -978.5, z = 30.7 } },
{ job = 'sheriff', group = 'police', category = 'police', hidden = true },
{ job = 'ambulance', label = 'Ambulance', icon = 'heart', category = 'ems',
location = { name = 'Pillbox Hill Medical Center', x = 312.9, y = -594.0, z = 43.3 } },
}
The shipped list is an example. Set it to your server's jobs.
| Setting | Type | Default | What it does |
|---|---|---|---|
Companies.AutoAddJobs |
boolean | true |
Every framework job not listed is added as a plain card with its label |
Companies.SkipJobs |
string list | unemployed plus an example list |
Jobs never added automatically. Put every job that must not be reachable by phone here |
Fields of one entry:
| Field | Type | What it does |
|---|---|---|
job |
string | Job name |
label |
string | Name on the card |
icon |
string | Icon name, see the list below |
location |
{ name, x, y, z } |
Shown with a directions button |
callGrades |
number list | Grades that take the line's calls and messages. Left out: every grade |
group |
string | Jobs sharing a group answer the same line and share its call log |
hidden |
boolean | true: no card of its own. Used for the other jobs of a group, so one card rings every department behind it. A hidden job uses its card's landline; a number set on a hidden entry is ignored while the group has a card with a landline |
category |
string | 'police', 'ems', 'mechanic' or 'other': the directory tab and colour, when the job name does not say it |
number |
string | The line's landline. Left out: made from the job name (Config.Services.Landlines) |
canCall, canMessage |
boolean | false hides that button |
Icon names: shield-check, heart, wrench, briefcase, car, house, fork-knife, storefront, newspaper, megaphone, bank, money, coins, credit-card, shopping-bag, handshake, music-notes, game-controller, television, camera, flame, lightning, drop, tag, globe, airplane, phone, detective, crown.
#Config.Services
| Setting | Type | Default | What it does |
|---|---|---|---|
Services.CallTimeout |
number | 30 |
Seconds a company call rings before it counts as missed |
Services.PreferOnDuty |
boolean | true |
true: only workers on duty receive company calls and messages. false: duty is ignored, workers on duty are still rung first |
Services.RingAll |
boolean | true |
A call to a company rings every worker who can take it at once; the first to answer gets the call and the rest stop ringing. false: it rings one worker at a time, taking turns |
Services.MaxRing |
number | 16 |
At most this many phones ring for one call |
Services.NotifyMissed |
boolean | true |
When nobody answers, the workers it rang get a notification with the caller's number |
Services.Landlines.Enabled |
boolean | true |
Every company that takes calls has a landline |
Services.Landlines.Prefix |
string | '44' |
Digits in front of a generated landline |
Services.Landlines.Digits |
number | 3 |
Digits made from the job name after the prefix |
Services.CallLog.Enabled |
boolean | true |
The line's call log in the Services app, for its workers |
Services.CallLog.Days |
number | 14 |
How long a call stays in the log |
Services.CallLog.ShowName |
boolean | true |
The name the number is registered to is shown next to it. false: the number only |
Services.CallLog.MinGrade |
number or nil |
nil |
Lowest grade that may read the log. nil: everyone who takes calls |
#Landlines
The caller sees the landline and the company's name, never the phone of the worker who answered. Dialling the landline from the keypad rings the line. A generated landline is made from the job name, so it stays the same across restarts. Keep its length different from player numbers (Config.Number).
#Call log
The log shows who rang, who answered, how long the call lasted, and the calls nobody took. Workers can ring back from it as the line.
Emergency numbers such as 911 are mapped to jobs in Config.Sim.EmergencyNumbers: SIM.