I would like to add cata_optional things to veh_type.h, mimicking the structure of itype.h.
What I've got looks good and sensible to me.
But it is crashing with
src/optional.h:45: const T &cata::optional::get() const [T = vpslot_engine]: Assertion `full' failed.
You can't deference pointers that you didn't allocate because you were too lazy to double check you were using the right flag string in the if statement.
I would like to add cata_optional things to veh_type.h, mimicking the structure of itype.h.
What I've got looks good and sensible to me.
But it is crashing with
src/optional.h:45: const T &cata::optional::get() const [T = vpslot_engine]: Assertion `full' failed.