GIIJPAXJ2KBPA3OZBMEKJC2ANV7CAK5KPQGKF7M6MBFDYJWUV64AC
XZBGZ5N5P4AMLO2I7PXLBA64FWFU5SPCOJNTKPK4FRGU6ADGQ7GQC
OIZB23GPQYDKBIZPB2TXBDQCJCWQUCWUX3SWPGHXY5HXNVQABBYQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
B3I5MC55KGDCKCCC6VTSZXCTMWULONPWPBL6PKBME7TOCODWONDQC
RKCJBAJPRQAB3PYHETZFU6347F5YQXWYRMDNSVJINLY2EK2DE4EAC
7TQAF4BYIK75EEYCCK7VEUSZHNCWMWIA3HZGQKIILYESUZ5ZZRVQC
FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC
6C3UZDESM2HPFIHAW5YIPUV6VXO4YV5DIEY574HUGP2DGOQNUVOAC
-- pad out one node fully, and all other nodes just enough to keep them from overlapping.
-- We don't want cascading movements to get too chaotic.
prepare_to_move = function(target)
def.hs.x = def.w/2
def.hs.y = def.h/2 + 30
if def == target then
def.hs.x = def.hs.x + 50
def.hs.y = def.hs.y + math.max(30, math.min(def.h/3, 200))
end
def.pos.x = def.x + def.hs.x
def.pos.y = def.y + def.hs.y
for _,def in pairs(Definitions) do
assert(def.w)
assert(def.h)
if def.pos == nil then def.pos = {} end
if def.hs == nil then def.hs = {} end