Docs · Engineering reference
Law book
docs/features/law.mdEdit on GitHub
- ✅ Law-book codes (#4202): every
LF_CrimeEntryin the crime catalog (Feature/Crime/LF_CrimeCatalog.c) carries a law-book section (m_eLawSection: criminal, road, narcotics, weapons), a stacking group (m_sStackGroup) and a jail-only flag (m_bJailOnly). New and unchanged rows default to criminal, no group, finable, so no save or shipped.confchanges. The owner'scrimesection sets them per code withlawSection,stackGroupandjailOnly; a bad section is refused and logged[LFDebug:Law].LF_LawCodeRules(Feature/Law/) totals a charge list by rule: two codes in one group stack to the higher, codes in different groups (or with no group) add, a jail-only code refuses a fine but its time still counts. Server logic only, no UI yet; the pack's codes come with L2 and the charge sheet with L3. Testlaw/code-stacking. - ✅ Charge sheet rules (#4209):
LF_ChargeSheetRules.Evaluate(Feature/Law/LF_ChargeSheetRules.c) turns the ticked codes into anLF_ChargeSheetResult. The fine stacks by the law book, a code the suspect was already charged with today counts double (fine and time, before the stacking comparison), and the total is clamped to the officer's rank fine cap (pack: $500 patrol to $5,000 lieutenant). A jail-only code on the sheet removes "pay now". Time adds up to 60 minutes. Any on-duty officer signs; an off-duty officer or an empty sheet is refused, and a code ticked twice counts once. Thesergeantladder row and above (the top rank on a ladder without one) may switch a sheet to jail only: the fine drops to 0, the time stays, and[LFDebug:Law]logs it; a lower rank, or a sheet with no time, is refused and logged. Pure server rules, no money moves and no RPC; the booking desk (L5) calls it. Testlaw/charge-sheet-rules. - ✅ Pack law book (#4208):
LF_Everon1989/Configs/Crime/LF_CrimeCatalog_Everon1989.conf(acrimeoverlay, listed in the pack header) sets a section, stacking group, amount and jail-only flag on every Everon code, priced in minutes of a civilian's $8 a minute. Minor road $50 to $75 (speeding up to 15 over, parking, failed inspection), road $150 to $250 (speeding 16 to 30 over, reckless, overloading), serious road $300 to $400 (speeding over 30, crash, dangerous intervention, no driving license); flying without a license $800; minor criminal $50 to $200; property $200 to $600 with 5 to 10 min in the cell as the other way out (theft, vehicle theft, VIN tampering, hit and run, resisting); narcotics A $150, B $600 or 10 min, C jail only; weapons $250 to $800. Robbery, the heists, carjacking, murder, mayhem, hostage taking, deprivation of liberty, narcotics C and an illegal conversion are jail only at 10 to 15 min (the 0.3.0 holding-cell cap). Today's tickets retune (N6): speeding $200 to $150, reckless $500 to $250, brandishing $800 to $400, crash $1,500 to $350. The ticket pad lists every code with a fine, so it is longer until the charge sheet (L5) replaces it. Fines go to the town treasury. Pack testeveron/law-book-amounts. - ✅ Booking desk and the offer (#4420, police L5):
LF_BookingDesk.et(Prefabs/Props/Police/, a vanilla short desk) carries Book suspect for an on-duty officer. The server picks the cuffed suspect beside the officer andLF_BookingDesk.RequestBookre-checks it (the id must resolve to a cuffed character within arrest reach, not the officer), then builds the charge sheet from the suspect's open crime reports throughLF_ChargeSheetRuleswith the officer's rank and duty from the server's own account. The offer goes to the suspect's machine only (an owner RPC on their body) and shows them two scroll actions on the desk: Pay $X now (only when the sheet offers a fine) and Take the time (N min). Taking the time books them throughLF_JailBooking.Bookwith the sheet's share of the jail's own length (#4207 cap). Paying goes throughLF_ChargePayment(#4427). One open offer per suspect for five minutes; a second booking, an off-duty officer or one more than 3 m from the desk is refused in words, and a desk more than 15 m from the jail cell opens no offer (place it in the cell block). An offer is dropped once the suspect is jailed another way or is no longer wanted and logged[LFDebug:Law]. The station placement is L10. Testlaw/booking-desk-offer. - ✅ Pay now (#4427, police L6):
Law/LF_ChargePayment.c. Pay $X now at the booking desk takes the offer's fine (the server's number, never a client's) from carried cash first and the bank for the rest, all or nothing; a wallet that gives back less is put back and logged. The money goes to the town treasury: there is no treasury store yet, so it is a sink logged[LFDebug:Law] treasury +$X, and the booking officer's cash and bank never change. A paid suspect's wanted level drops to 0 (reports and posters come down), the cuffs come off and go back to the booking officer, and the spent offer pays nothing on a second click. A suspect whose cash and bank fall short goes to the cell for the offer's time (LF_JailBooking.Bookwhen the booking officer is at hand, elseLF_Jail.Arreston the officer's booking). A refused fine-only charge costs a minute in the cell per $60 of fine, at least one, at most the jail's 15-minute cap (LF_ChargePayment.RefusedFineSeconds, used by the desk's offer). Testlaw/charge-payment.