mt-mods / jumpdrive

Minetest jumpdrive mod
Other
9 stars 10 forks source link

Specify bounds instead of radius #68

Open crabctrl opened 4 years ago

crabctrl commented 4 years ago

It would be handy to be able to specify the exact area of the ship in XYZ instead of just the radius, as this would allow you to fit oblong ships together or against docking ports much more nicely.

BuckarooBanzay commented 4 years ago

Hmm, i thought there was already an issue open about this... 😕

Yes, this would be nice, the ground-work is already there: https://github.com/mt-mods/jumpdrive/blob/a8bf7ad72578101046c90bba4b54c208ec0c59a3/move.lua#L6-L8 The api already supports this but the interface is just not there yet...

I wasn't sure if i would mutilatemodify the existing jumpdrive:engine node or create another one with the additional functionality but i guess multiple engines with various shapes would be the sane option here.

Optimally it would look like this:

The linking with the jumdrive:backbone to a fleet should still be possible then (given there are no overlaps)

S-S-X commented 3 years ago

Linked issue with few comments about what could be done to make this work nicely, proposed solution requires breaking changes to public functions jumpdrive.execute_jump and jumpdrive.simulate_jump. Goal for these changes is to make jumpdrive API more generic and allow a lot more use cases while still providing a lot of similar consistency checks and other validation stuff hidden behind API functions.

It is possible to keep backwards compatibility for those but probably not really required, any known mods actually using those 2 functions?

BuckarooBanzay commented 3 years ago

It is possible to keep backwards compatibility for those but probably not really required, any known mods actually using those 2 functions?

I don't think they are used outside the mod, they were never "official" (and there is no documented api :yum:)