spawns now also display archetype* on drawing the data

*to be replaced with actual parent once the class thing is implemented?
This commit is contained in:
lustlion 2022-03-17 00:38:08 +01:00
parent f670f6bc87
commit 11a46e6227

View File

@ -24,7 +24,7 @@ function selectSpawns(rect)
local x, y = rect:getPoints()
local select_rect = Rect:fromPoints(x-{x=Camera.pos.x,y=Camera.pos.y},y-{x=Camera.pos.x,y=Camera.pos.y})
select_rect:fix()
for _, spawn in pairs(LoadedObjects.Spawns) do
local offset_x, offset_y = spawn.archetype.display:getCenteredOffset()
@ -244,7 +244,7 @@ function drawSpawns()
)
if spawn.selected then
local text = spawn.archetype.type.."\n---\nPosition\n["..spawn.args[1]..","..spawn.args[2].."]"
local text = spawn.archetype.type.."\n("..spawn.archetype.supertype..")\n---\nPosition\n["..spawn.args[1]..","..spawn.args[2].."]"
if #spawn.args > 2 then
text = text .. "\n---\nData:\n"
for i=3, #spawn.args do