Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

Update 2.0 Out Now!

Update 2.0 now available! Check out the ton of QoL Features, improvements, captains, new commands and reworked UI!

[1.0.1][Minor][Fix included] Command summary does not display all commands


Paulquappe
 Share

Recommended Posts

The command summary on the galaxy map (lower left corner) does not display all commands correctly. It only displays the respective icon, but no text.

 

Revision: r22541

Steps to reproduce:

- Open galaxy map

- Select sector with controllable ships

- Select controllable ship

- Order Repair (/ Repair Target/ Escort)

 

Cause of failure:

MapRoutes.getOrderDescription in scripts/player/map/maproutes.lua does not handle every OrderType.

 

Fix:

Append following code to the if/else-block:

 

 

    elseif order.action == OrderType.Escort then
        line.ltext = "[${i}] Escort"%_t % {i = i}
        line.rtext = "${craftName}"%_t % {craftName = order.craftName}
    elseif order.action == OrderType.AttackCraft then
        line.ltext = "[${i}] Attack"%_t % {i = i}
        line.rtext = "${craftName}"%_t % {craftName = order.craftName}
    elseif order.action == OrderType.GuardPosition then
        line.ltext = "[${i}] Guard Position"%_t % {i = i}
        line.rtext = math.floor(order.px) .. " : " .. math.floor(order.py) .. " : " .. math.floor(order.pz)
    elseif order.action == OrderType.FlyToPosition then
        line.ltext = "[${i}] Fly To"%_t % {i = i}
        line.rtext = math.floor(order.px) .. " : " .. math.floor(order.py) .. " : " .. math.floor(order.pz)
    elseif order.action == OrderType.Board then
        line.ltext = "[${i}] Board"%_t % {i = i}
        line.rtext = "${craftName}"%_t % {craftName = order.craftName}
    elseif order.action == OrderType.RepairTarget then
        line.ltext = "[${i}] Repair "%_t % {i = i}
        line.rtext = "${craftName}"%_t % {craftName = order.craftName}
    elseif order.action == OrderType.Repair then
        line.ltext = "[${i}] Repair"%_t % {i = i}
    end

 

 

 

This requires the craft name in the order chain (querying it here would result in performance loss, since getOrderDescription is called every frame). I included the name in scripts/entity/orderchain.lua. For example:

 

local order = {action = OrderType.Escort, craftId = craftId.string, craftName = craftName}

 

in OrderChain.addEscortOrder. See the attachment for the full source.

maproutes.lua.txt

orderchain.lua.txt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...