Fixes initial floating action buttons failing to properly position (#67068)

Also cleans up artificer stuff a bit, their rune button should align
with their spells.

Basically, when we grant someone a button, it gets positioned in its
default location. If the button's floating, their location var becomes
an invalid arg to position_action. Then we called position action with
their location var.

Big fucky.

I've cleaned up the logic a bit, and ensured that you can never position
to FLOATING directly, since it's a marker rather then a real position on
the screen
This commit is contained in:
LemonInTheDark
2022-05-18 11:50:00 -04:00
committed by GitHub
parent f8d30f5ba8
commit 32dbaf33aa
2 changed files with 9 additions and 2 deletions
@@ -63,6 +63,8 @@
spellnum++
if(runetype)
var/pos = 2+spellnum*31
if(construct_spells.len >= 4)
pos -= 31*(construct_spells.len - 4)
our_rune = new runetype(src)
our_rune.default_button_position = "6:[pos],4:-2" // Set the default position to this random position
our_rune.Grant(src)