FS25 Container Service - v1.0 Pre-Release TEST

Default controls:
  Left Alt + J : Change nearest service position
                 RIGHT -> LEFT -> FRONT -> REAR -> RIGHT
  Left Alt + K : Container Service mode menu

Modes:
  RP Only   : warning only when site remains full
  Financial : production stays normal; hourly emergency service fee while full
              0-6 h: 250 / h, 6-12 h: 500 / h, 12+ h: 1000 / h
  Gameplay  : production throughput while full
              0-6 h: 75%, 6-12 h: 50%, 12-24 h: 25%, 24+ h: 0%

Console:
  csRescan
  csDebug
  csStatus
  csMode 1|2|3
  csContainers   - diagnose nearby hooklift/container recognition

Container detection v0.2.4:
  - preferred ID: INPUT attacher joint of type hookLift
  - compatibility fallback: hookLiftContainer specialization
  - compatible fill unit must support the site's waste fillType
  - zone intersection can be proven by fill root, hookLift joint, root/component node,
    or the vehicle footprint intersecting the service box
  - getFillUnitAllowsFillType() is no longer used as a pre-filter; custom container
    overrides cannot reject a supported fill type merely because no normal fill trigger is active

Waste mapping:
  WOOD -> WOODCHIPS
  STONE -> DIRT
  food/crop/greenhouse/mushroom/rice-sapling -> ORGANICWASTE

Hard dependency:
  FS25_AdditionalFilltypes

This build intentionally keeps the fast v0.1 waste-generation timing for testing.

v0.2.1 hotfix retained:
- retries client input-action registration after mission load so Alt+J / Alt+K cannot be lost because of load timing.


v0.2.4 detection change:
- primary source: g_currentMission.vehicleSystem.inputAttacherJoints
- only entries with JOINTTYPE_HOOKLIFT are treated as HKL candidates
- candidate vehicle comes directly from the engine registry entry
- fallback vehicle enumeration uses g_currentMission.vehicleSystem.vehicles


v0.2.5 position-control fix:
- uses InputAction.CONTAINER_SERVICE_CHANGE_POSITION explicitly
- re-registers actions whenever FSBaseMission refreshes gameplay action events
- position action is never deactivated; only its F1 text is hidden outside range
- callback recalculates nearest service point when Alt+J is pressed
- on-foot distance uses g_localPlayer:getPosition()
- position key press writes an INPUT diagnostic line to log


v0.2.6 input-context fix:
- removes the FSBaseMission registerActionEvents hook from v0.2.5
- registers custom actions inside PlayerInputComponent.INPUT_CONTEXT_NAME
- also registers the same actions inside Vehicle.INPUT_CONTEXT_NAME
- uses the second return value from registerActionEvent as the event ID
- Alt+J position text is visible only near a service point
- Alt+K settings remains visible in player and vehicle gameplay contexts
- csInput prints context/event diagnostics
- csPosition directly tests the position callback
- csSettings directly tests the settings dialog


v0.3.0 UI / marker test:
- Native FS25 pause-menu page: CONTAINER SERVICE
- Tabs: SERVICE SITES / SETTINGS
- SERVICE SITES: Production, Waste, Buffer, Container, Position, Status
- SETTINGS: service mode + debug-zone display
- Alt+K opens the menu page
- Alt+J changes nearest service position
- Yellow/black marker is cloned from a loaded basegame production warningStripes node
- Marker corners are fitted to the 6 x 10 m service area when identifiable
- Debug wireframe defaults OFF; use csDebug or menu setting to enable


v0.3.1 crash fix:
- replaces TabbedMenu:addPage() with TerraFarm's proven FS25 runtime-page sequence:
  pagingElement:addElement(controller) -> update mapping -> registerPage -> addPageTab -> rebuildTabList
- menu registration is attempted only once after the InGameMenu paging system exists
- removes invalid fs25_subCategoryTab profiles
- removes undefined colorBlackTransparency10 preset
- frame initialize now calls TabbedMenuFrameElement.initialize()


v0.3.2:
- SERVICE SITES column BUFFER renamed to CONTAINER FILL
- detected HKL fill unit now shows live fill: 63%  (7560 / 12000 L)
- no container shows "-"
- status distinguishes CONTAINER FULL from BUFFER FULL
- new transparent white hooklift-container menu icon


v0.3.3:
- fixes pause-menu icon path
- captures g_currentModDirectory during mod source loading
- menu registration later uses the stored absolute mod directory
- no changes to menu layout, container fill display, markers, or service logic


v0.3.4:
- replaces standalone pause-menu DDS with FS25-native GUI texture slice
- registers gui/ui_elements.xml through g_overlayManager
- uses slice id containerService.icon_containerService for addPageTab()
- new 128x128 transparent white outline roll-off-container icon
- old menuIcon_ContainerService.dds removed


v1.0 Pre-Release CONTRACTS:
- new CONTRACTS tab
- all mapped production sites begin as AVAILABLE, with no active marker and no waste generation
- sign a contract with MENU_ACCEPT / double-click
- signing activates the physical service site and pays a one-time startup bonus
- each offer has deterministic startup bonus and EUR/t rate, persisted in containerService.xml
- SERVICE SITES only lists signed contracts
- per-ton income is based only on liters loaded by Container Service and is paid when that container leaves the service zone
- tonnes use FS25 fillType massPerLiter / FillTypeManager.MASS_SCALE
- unpaid hauled liters are persisted across save/reload to avoid losing a pending payout
- contract is exclusive to the signing farm in this first version
- current balance ranges: bonus EUR 8,000-14,000; DIRT EUR 55-85/t; WOODCHIPS EUR 70-110/t; ORGANICWASTE EUR 90-140/t


v1.0 Pre-Release contract lifecycle:
- signed contracts can be cancelled from the CONTRACTS tab
- only the farm that owns a contract can cancel it
- cancelled sites stop generating service waste and their service marker is hidden
- cancelling clears the site's current buffer/pending haul state
- startup bonus is a ONE-TIME entitlement per production
- after cancellation, re-signing restores the same €/t rate but pays NO startup bonus
- startupBonusClaimed is persisted and synced in multiplayer
- v0.4.0 migration: any contract already signed in v0.4.0 is treated as bonus already claimed
- CONTRACTS tab now shows lifetime HAULED tonnes and EARNED total
- EARNED = one-time startup bonus (if claimed) + haul revenue


v1.0 Pre-Release:
- dedicated STATISTICS page
- tabs: SERVICE SITES | CONTRACTS | STATISTICS | SETTINGS
- CONTRACTS is now only for offers/sign/cancel
- STATISTICS:
  Production | Rate | Total Hauled | Haul Revenue | Startup Bonus | Total Earned | Status
- cancelled contracts remain in lifetime statistics
- never-signed contracts are omitted from statistics


v1.0 Pre-Release - container equipment requirements:
- adds player-facing service classes: BULK, WASTE, LIQUID
- actual acceptance still uses the real FS25 fillUnit supported fillTypes
- Contracts page adds CONTAINER TYPE
- Dairy now generates DIGESTATE and requires LIQUID TANK equipment
- DIRT / WOODCHIPS = BULK
- ORGANICWASTE = WASTE
- DIGESTATE = LIQUID TANK
- ordinary hooklift container parked at an incompatible site is shown as WRONG
- status explains the requirement, e.g. LIQUID TANK REQUIRED
- compatible container holding another material is shown as IN USE / EMPTY CONTAINER REQUIRED
- no hard-coded container mod names are used
- DIGESTATE new-contract test rate range: 120-170 EUR/t


v1.0 Pre-Release - persistence fix:
- service IDs no longer contain productionPoints list index
- stable ID is now production name + anchor X/Z
- legacy v0.1-v0.5.0 IDs (NNN_Name_X_Z) are migrated automatically
- coordinate fallback can recover renamed/localized production records
- startup bonus, signed contracts, haul statistics, rates, positions and buffers migrate
- startup bonus is NOT paid again during migration
- persistence protection refuses to overwrite containerService.xml if saved records exist but zero can be matched
- csRescan now saves/reloads current state first instead of restoring stale startup state


v1.0 Pre-Release:
- Discord pre-release identity restored
- proper Container Service / Waste Logistics store icon restored
- includes container requirements: BULK / WASTE / LIQUID TANK
- Dairy uses DIGESTATE / LIQUID TANK
- includes contracts, cancellation, statistics and one-time startup bonuses
- includes v0.5.1 persistence migration/protection fix
