Scuba Job - Crash Fix
version 1.1
=====================

A community fix and polish update for MNHC's Scuba Job mod. The original
1.0 release shipped with a few bugs that made the mission unplayable for
a chunk of users:

  - "All crates salvaged!" notification fired immediately on Start Job,
    completing the mission before you could collect anything.
  - The Press E to sell prompt never appeared inside the pablito_pawnshop
    MLO, because player position swaps to interior coords once you walk
    through the door.
  - No clear hint how to un-anchor the boat after exiting it in water.
  - World coordinates (boss, boat spawn, sell location) were hardcoded,
    blocking compatibility with custom maps like Sunshine Dream or
    San Fierro Remix.

This package replaces only the Scuba Job.dll. The original mod by MNHC
remains the source of all art, animation, and gameplay design. Big shout
to MNHC for shipping the mod in the first place.


Contents
--------
Scuba Job.dll      Patched script. Replace the v1.0 dll in your /scripts
                   folder with this one.
Scuba Job.ini      Updated configuration with the new [World] section.
                   You can keep your existing ini if you prefer, missing
                   keys fall back to safe defaults.
Scuba Job.pdb      Debug symbols (optional).
README.txt         This file.
CHANGELOG.txt      Per version notes.


Requirements
------------
- The original Scuba Job 1.0 ini and asset expectations:
  https://www.gta5-mods.com/scripts/scuba-job
- ScriptHookV
- ScriptHookVDotNet 3 (Enhanced 1.1.0.5 confirmed working on patch
  1.0.3788.0 and newer).
- LemonUI.SHVDN3 in your /scripts folder.
- MLO Pawnshop Interior is OPTIONAL. The vanilla SellLocation is at the
  outdoor Strawberry pawn shop entrance and works without any MLO. If
  you have the MLO installed and want to sell inside, set
  ENABLE_INTERIOR_SELL=true and edit InteriorSellLocation in the ini.


Installation
------------
1. Install ScriptHookV, ScriptHookVDotNet 3, and LemonUI.SHVDN3 if you
   do not have them yet.
2. Replace the existing Scuba Job.dll in
   ...\Grand Theft Auto V\scripts\
   with the Scuba Job.dll from this package.
3. Optional: replace Scuba Job.ini, or copy the new [World] section into
   your existing ini.
4. Launch the game. No save migration required.


What is fixed in version 1.1
----------------------------
Stability
- Start Job now aborts cleanly with an in-game notification if no
  underwater locations are loaded (broken ini, missing [Locations]
  section, prop spawn failures). v1.0 happily started, spawned nothing,
  and then completed the mission on the next tick. That was the source
  of every "All crates salvaged!" report.
- Mission completion is now gated on an initialCrateCount > 0 check.
  An empty crate list at the moment of Start Job no longer counts as
  success.
- Boat spawn failure also aborts cleanly instead of NRE crashing later.

Pawn shop sell
- Sell trigger now accepts an optional second coordinate
  (InteriorSellLocation) for users with the pablito_pawnshop MLO.
- Default SellRadius bumped from 1.5 m to 2.5 m so the prompt is less
  finicky on uneven ground.

Boat un-anchor discoverability
- When the player is in water near an anchored mission boat, the help
  text "Get back in the boat to un-anchor and sail away" now appears,
  closing the loop on the original "I anchored my boat, can not move it"
  complaint.

Configurability
- BossLocation, BoatSpawn, BoatSpawnHeading, SellLocation, SellRadius,
  InteriorSellLocation, and the interior toggle are all in a new
  [World] section of Scuba Job.ini. Custom map authors can now relocate
  the entire job without touching the dll.

Robustness
- Scuba Job.ini path resolves relative to the script assembly location
  instead of the current working directory, so the script always finds
  its own ini regardless of how the game was launched.


Troubleshooting
---------------
Starts the mission and immediately says "All crates salvaged!"
   Fixed in 1.1. Either your [Locations] section is empty, your prop
   model fails to load, or your ini is missing entirely. v1.1 catches
   all three and refuses to start with a clear notification.

Press E does nothing inside the pawn shop MLO.
   Open Scuba Job.ini, [World] section, set ENABLE_INTERIOR_SELL=true,
   set InteriorSellLocation to an X,Y,Z coord inside the MLO where you
   want the sell prompt to fire. Reload the script.

I anchored my boat in the water and now I cannot move it.
   Walk up to the boat (you will see "Get back in the boat to un-anchor
   and sail away") and press F / your Enter Vehicle bind. The boat
   un-anchors as soon as you sit down.

Running on a custom map (Sunshine Dream, San Fierro Remix, etc).
   Use the [World] section to point BossLocation, BoatSpawn and
   SellLocation at coordinates that exist on your map. The default
   coords assume vanilla Los Santos.

I do not have the MLO and seungwooson said the pawn shop doesn't appear.
   The MLO is OPTIONAL. The default SellLocation is at the outdoor
   Strawberry pawn shop entrance. Walk up to the orange marker. If you
   want the inside-the-shop experience, install pablito_pawnshop MLO.


Credits
-------
Original mod:        Scuba Job by MNHC
                     https://www.gta5-mods.com/scripts/scuba-job
Crash fix and update: chris22622

Thanks to the community testers and reporters:
elpedron, O-MATIX, DOC_X, DiNagano, seungwooson,
The_Moon_Truther, Q404, Starfox1993, primetimeslime4, VICTINHLNS.
