Features

Business

The Business app: staff, hiring and firing, the company till, announcements, company bills and the employee's share, rank permissions, and Config.Company.

Business (company) turns a framework job into a company with staff, a till and announcements. A job works here only when it is listed in Config.Company.Jobs. Settings are in apps/company/config.lua (Config.Company) and apps/company/config_server.lua.

#What the player can do

The app has four tabs: Summary, Staff, Till and Notices.

  • Summary: the till balance, recent activity and staff changes, as far as the rank may see them.
  • Staff: employees under rank dividers. Hire a player standing within HireDistance, change a grade, fire. Changes to employees who are offline are queued and applied when they log in (OfflineChanges).
  • Till: deposit and withdraw, open company bills and the ledger. A withdrawal needs a short reason when WithdrawReason = true.
  • Notices: announcements to the staff.
  • Issue a bill in the company's name. The same bills appear in the Ledger.
  • My share: an employee's share of the company bills they issued. The boss sets the percent per business and per employee. With commissionTo = 'wallet' the share waits in the employee's wallet and is withdrawn from the app; with 'bank' it is paid at once.

#What it needs

Need Notes
A job in Config.Company.Jobs Other jobs see that no business is linked to their job
Signal Reading needs receive signal, every change needs send signal

The till is the pocketbook's own company account. Treasury.Bindings in config_server.lua is empty by default.

#Settings

Key Default What it does
Enabled true Turns the app on
UnemployedJob 'unemployed' Job given on firing
HireDistance 5.0 Metres for hiring
MaxAmount 100000 Largest deposit or withdrawal in dollars
HistoryLimit 50 Ledger rows
MaxAnnouncement / AnnounceCooldown 500 / 30 Notice length, seconds between notices
StartingGrade 0 Grade of a new hire (a job may set its own startingGrade)
OfflineChanges { Enabled = true, PollInterval = 5000, BatchSize = 50 } Grade changes and firing of offline employees
Payroll {} Pay per job and grade, shown as a summary only
InvoiceShare { default = 0, min = 0, max = 80, step = 5, commissionTo = 'wallet' } The employee's share of company bills, in percent
WithdrawReason true A till withdrawal needs a reason
Jobs law jobs, newspaper The companies. See below
Permissions see below What each action needs
JobPermissions {} Per job overrides of Permissions
ProtectHigherRanks true Nobody can change a rank equal to or above their own

#Jobs

luaJobs = {
    -- VORP law jobs
    sheriff = { label = 'Şerif Dairesi', bossGrade = 4,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Başyardımcı', [4] = 'Şerif' } },
    deputy = { label = 'Şerif Yardımcıları', bossGrade = 2,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli' } },
    marshal = { label = 'Federal Marshal', bossGrade = 2,
        grades = { [0] = 'Marshal yardımcısı', [1] = 'Marshal', [2] = 'Baş marshal' } },
    police = { label = 'Saint Denis Polisi', bossGrade = 3,
        grades = { [0] = 'Polis', [1] = 'Komiser yardımcısı', [2] = 'Komiser', [3] = 'Emniyet müdürü' } },
    -- RSG law jobs: rsg-core does not define them; use the grade numbers of your shared/jobs.lua
    vallaw = { label = 'Valentine Şerifliği', bossGrade = 3,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Şerif' } },
    rholaw = { label = 'Rhodes Şerifliği', bossGrade = 3,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Şerif' } },
    blklaw = { label = 'Blackwater Polisi', bossGrade = 3,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Şef' } },
    strlaw = { label = 'Strawberry Şerifliği', bossGrade = 3,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Şerif' } },
    stdenlaw = { label = 'Saint Denis Polisi', bossGrade = 3,
        grades = { [0] = 'Memur', [1] = 'Yardımcı', [2] = 'Kıdemli', [3] = 'Şef' } },
    newspaper = { label = 'Gazete Dairesi', bossGrade = 3,
        grades = { [0] = 'Muhabir', [1] = 'Yazar', [2] = 'Editör', [3] = 'Müdür' } },
},

The key is the framework job name. bossGrade is the lowest grade that counts as boss. Match the names and grades to your server's jobs.

rsg-core does not define the RSG law jobs (vallaw, rholaw, blklaw, strlaw, stdenlaw). Use the grade numbers of your own shared/jobs.lua.

Every job in Config.Company.Jobs is a business with its own till. Official Ledger fines are written as bills of the officer's business, so each law job that writes fines must be listed here.

#Permissions

Each action takes 'member' (everyone in the job), 'boss' (grade bossGrade and up) or a grade number.

Action Default What it allows
hire, fire, setGrade 'boss' Staff changes
deposit 'member' Putting money in the till
withdraw 'boss' Taking money out
announce 'boss' Writing notices
history 'boss' Seeing the ledger
balance 'member' Seeing the till balance
shareManage 'boss' Setting the bill share percents
postalRead, postalSend 'member' Reading and sending company telegrams
postalManage 'boss' Managing the company mailbox
postalWork, postalDoors 'member' Post office work and staff doors
luaJobPermissions = { sheriff = { withdraw = 3, history = 2 } },

The postal permissions are used by Telegraph and Post office.