Scrap Fleet (working now@last post)
Posted: Tue Nov 12, 2019 11:51 am
I'm trying to make a button that scrap current fleet. With my limited understanding, this is as far as I can go. How do I make this work?
\Lua state\GUI\~GalaxyMap\@FleetShips.lua
\Lua state\GUI\~GalaxyMap\@FleetShips.lua
Code: Select all
local el = med_tooltip_icon(hover_id, icon,cx,cy)
--scrap.fleet
local scrap_icon = notification_icons.misc.recycle
local scrap_el = med_tooltip_icon(scrap_hover_id, scrap_icon,cx,bottom_bar.height*.45)
scrap_el.on_click = scrap_fleet
local function scrap_fleet()
for scrap_ship ; fleet.ships
fleet:scrap(scrap_ship)
end
end
--scrap.fleet.end
--local color = can_command_fleet(fleet) and blue or grey