mlangsdorf / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.
http://en.cataclysmdda.com/
Other
1 stars 1 forks source link

fixing boat boards #31

Closed mlangsdorf closed 5 years ago

mlangsdorf commented 6 years ago

long term plans to fix boat boards

The Problem

boat boards are funky wheels and the code doesn't handle a vehicle with both wheels and boat boards.

this is stupid and should be fixed.

Vague solution

  1. obsolete boat boards
  2. replace with boat_hull, a new under_location part 2b. boat_hulls can come in multiple materials (light, heavyduty, wooden, wooden light, foldable rubber, etc)
  3. a boat needs boat_hull across all front tiles, all rear tiles, and 80% on the total tiles
  4. a boat displaces its mass in water (no joke)
  5. a boat's water volume is 1/3 length width depth (approximates a rounded hullform) and volume * 1000 kg needs to equal its mass.
  6. a boat's height is 1m if no boards, 1.5m if half-boards, or 3m if full boards
  7. if a boat's depth is greater than it's height, it's a submarine. a submarine without watertight seals on all frames is sunk and destroyed[1]. watertight_seals can be added to a vehicle, but they have to be added to all frames and the vehicle needs to have a full roof, windshields, doors, etc.
  8. if a boat doesn't have sufficient boat_hull, it leaks, adding water weight and potentially damaging engines. recalculate depth appropriately.
  9. if a boat doesn't have boat hull up front, it leaks FAST.
  10. water_drag is speed^2 1/2 water_density depth width

[1] at some point, adding sunken vehicles would be neat for scuba divers.

mlangsdorf commented 5 years ago

Mostly working on this.

mlangsdorf commented 5 years ago

Done!