This issue is probably medium difficulty but is a good intro to the dark heart of the physics engine
Currently, the habitat engine's maximum thrust is defined in common.craft_capabilities. This is a bit hacky, because there is no clean way to transmit this info over the network as there is for every other piece of data in a PhysicsState (e.g. fuel is easily sent, but not the hab's max thrust).
Usually it doesn't matter because the hab's max thrust doesn't change, but when the compat client is running, the state of OrbitV engineering will change the habitat's max thrust. Currently, only the physics_server will know about this change in max thrust, but we also want to easily let the hab_flight client know about the change.
To do this, we should add something like hab_max_thrust and ayse_max_thrust to orbitx/orbitx.proto. Then, update all uses of craft_capabilities to use the PhysicsState. Probably also have to set default values of max_thrust somewhere, which will probably have to happen somewhere in the savefile loading code. Definitely we'll also have to change some stuff in physics/engine.py, for example using self._last_physical_state.hab_max_thrust. Also in data_structures.py, to expose hab_max_thrust.
If you want to take this issue on to get a better understanding of the physics engine, I foresee many questions and debugging, so don't hesitate to ask.
This issue is probably medium difficulty but is a good intro to the dark heart of the physics engine
Currently, the habitat engine's maximum thrust is defined in common.craft_capabilities. This is a bit hacky, because there is no clean way to transmit this info over the network as there is for every other piece of data in a PhysicsState (e.g. fuel is easily sent, but not the hab's max thrust).
Usually it doesn't matter because the hab's max thrust doesn't change, but when the compat client is running, the state of OrbitV engineering will change the habitat's max thrust. Currently, only the physics_server will know about this change in max thrust, but we also want to easily let the hab_flight client know about the change.
To do this, we should add something like
hab_max_thrust
andayse_max_thrust
toorbitx/orbitx.proto
. Then, update all uses ofcraft_capabilities
to use the PhysicsState. Probably also have to set default values of max_thrust somewhere, which will probably have to happen somewhere in the savefile loading code. Definitely we'll also have to change some stuff in physics/engine.py, for example usingself._last_physical_state.hab_max_thrust
. Also in data_structures.py, to exposehab_max_thrust
.If you want to take this issue on to get a better understanding of the physics engine, I foresee many questions and debugging, so don't hesitate to ask.