> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-gunsmith/configuration/services.md).

# Service Prices

CAS Gunsmith service prices — how cleaning, wear repair and rust removal are calculated, and the Full Service discount.

Maintenance prices for the Condition tab are in `Config.Services`.

```lua
Config.Services = {
  clean = 3.5,
  repairMin = 6, repairBase = 6, repairPerWear = 30,
  derustBase = 4, derustPerRust = 16,
  bundleDiscount = 0.15,
}
```

## Calculation

Wear (`wear`) and rust (`rust`) are values from 0 to 1, read from the weapon's condition.

| Service      | Formula                                             | Default range |
| ------------ | --------------------------------------------------- | ------------- |
| Clean & Oil  | `clean`                                             | $3.50         |
| Repair Wear  | `max(repairMin, repairBase + wear * repairPerWear)` | $6 to $36     |
| Rust Removal | `derustBase + rust * derustPerRust`                 | $4 to $20     |

Repair and rust removal prices are rounded to $0.50.

If the player has Gun Oil in their inventory, cleaning can be done for free. One Gun Oil is used.

## Full Service discount

If the weapon needs at least two services and the player selects all of the needed ones, a `bundleDiscount` discount is applied to the total of the shop prices. The default is 15 percent. Free cleaning with the player's own Gun Oil is not part of the discount.

To turn the discount off, set `bundleDiscount = 0`.
