MerlinofMines / EasyCommands

Github Repository for Ingame Scripts built by MerlinofMines. Uses MDK to Deploy to SpaceEngineerse
GNU General Public License v3.0
8 stars 3 forks source link

Planet Gravity #155

Closed MerlinofMines closed 2 years ago

MerlinofMines commented 2 years ago

Currently Gravity for Chutes and Cockpits is only total. It'd be nice to have all gravity types available.

This could be done by adding separate properties for "planetGravity", "totalGravity", "artificialGravity", or by changing the returned type to a list or vector with all of the gravity types available. Not sure which is best yet

MerlinofMines commented 2 years ago

I'm tempted to convert the gravity property to a list of keyed vector values.

print "My Cockpit" gravity
#["Natural"->9.8:0:0, "Artificial"->1:0:0, "Total"->10.8:0:0]

print "My Cockpit" gravity["Natural"]
print "My Cockpit" gravity["Artificial"]
print "My Cockpit" gravity["Total"]
MerlinofMines commented 2 years ago

I decided this approach isn't as useful as I originally thought, and it's actually quite a few more chars to implement.

Instead I propose adding new properties for NATURAL_GRAVITY and ARTIFICIAL_GRAVITY and binding them directly.

print "My Cockpit" gravity
#10.8:0:0

print "My Cockpit" naturalGravity
#9.8:0:0

print "My Cockpit" artificialGravity
#1:0:0