beyond-all-reason/Beyond-All-Reason

keybind air_plants command bind issue

Open

#2917 aperta il 3 mag 2024

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Lua (592 fork)batch import
BugGood First Issue

Metriche repository

Star
 (3922 star)
Metriche merge PR
 (Merge medio 4g 13h) (265 PR mergiate in 30 g)

Descrizione

Description

tested in Game: BAR-25920-750c2fe Engine: 105.11-2303-g5f26a29105 Chobby: 3224 ca0dlal

i tried to find the binds for altering airplants when aircrafts leave them

Note:these are separate binds from the aircraft ones , as those work for the aircraft: bind Any+sc_i idlemode // Sets the state on what the aircraft will do when idle bind Any+sc_h autorepairlevel // Set at which HP % this aircraft retreats to nearest air repair pad

so i tried to find separate binds for the airplants and found: in Beyond-All-Reason/luarules/gadgets/unit_air_plants.lua lines 63 to 79

local landCmd = { id = 34569, name = "apLandAt", action = "apLandAt", type = CMDTYPE.ICON_MODE, tooltip = "setting for Aircraft leaving the plant", params = { '1', ' Fly ', 'Land' } }

local airCmd = { id = 34570, name = "apAirRepair", action = "apAirRepair", type = CMDTYPE.ICON_MODE, tooltip = "return to base and land on air repair pad below this health percentage", params = { '1', 'LandAt 0', 'LandAt 30', 'LandAt 50', 'LandAt 80' } }

I tried to bind these actions to

bind Any+sc_i apLandAt // setting for Aircraft leaving the plant

bind Any+sc_h apAirRepair // return to base and land on air repair pad below this health percent

Expected Behaviour

pressing the i key would cycle : Fly, and Land when an aircraft plant is selected

pressing the h key would cycle : No Retreat, Retreat 30%, Retreat 50%, and Retreat 80% when an aircraft plant is selected

Actual Behaviour

the binds do not work

Reproduction steps

just bind the actions

bind Any+sc_i apLandAt // setting for Aircraft leaving the plant

bind Any+sc_h apAirRepair // return to base and land on air repair pad below this health percent

then select an aircraft plant and press them

Other

this may be the completely wrong binds, or the actions are case sensitive and the actions may need to be changed in lowercase, like so:

local landCmd = { id = 34569, name = "apLandAt", action = "aplandat", type = CMDTYPE.ICON_MODE, tooltip = "setting for Aircraft leaving the plant", params = { '1', ' Fly ', 'Land' } }

local airCmd = { id = 34570, name = "apAirRepair", action = "apairrepair", type = CMDTYPE.ICON_MODE, tooltip = "return to base and land on air repair pad below this health percentage", params = { '1', 'LandAt 0', 'LandAt 30', 'LandAt 50', 'LandAt 80' } }

as a final note, any keys that are bound even if the actions are upper-cased, will still be a lower-cased action

Guida contributor