trying to add documentation and split source into logical files

This commit is contained in:
2026-04-20 18:31:32 -06:00
parent 8c3a15a73f
commit b824bf8c0c
4 changed files with 162 additions and 107 deletions
+11
View File
@@ -28,3 +28,14 @@ code, so issues are being tracked *in* the repo - here.
2. ✅ Resource points. The player can hold a button to collect those resources and store them on their ship.
3. ✅ The resources collected by the player can be spent on something, like improving the ship. Speed, capacity, collection speed, etc.
4. Imagine why you are out there collecting resources. Is someone directing you? Are you a freelancer? Is the universe dead? Are you preparing for something? Etc.
## Documentation
### Cargo Handling
- `transfer_cargo(source_object, destination_object, cargo_type, cargo_amount)`: Returns actual amount transferred. Source/Destination can be nil to create/destroy resources.
- `check_cargo_amount(source_object, cargo_type, cargo_amount)`: true/false Does that object have that amount of that cargo?
### Finding Objects
- `get_closest_object(object_list, current_object)`: Requires `position_x` and `position_y` on objects. Returns an object and distance squared to it.
- `get_closest_orbit(object_list, current_object)`: Deprecated.
- `get_closest_orbit2(current_object)`: Uses `parent_object` and `orbital_radius` to find the closest orbit to `current_object`'s orbit.