You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the fix to #2641 introduced a new bug that rejects a valid mex build order if the placement is exactly on the metal spot and the command is inserted at the beginning of the command queue (holding space bar, or whatever hotkey you use).
Additionally, issuing a mex build order at an invalid spot with the prepend key held down correctly snaps to the proper location, but the rest of the queued orders are removed. (This is a related, but different issue. I will open a new issue for this.)
Expected Behaviour
A command to place a mex directly on top of a metal spot should be allowed even when the build command is prepended (holding space bar).
Actual Behaviour
A prepended mex build command directly on top of a metal spot will be denied with the warning "Extractors cannot be placed off of metal spots"
Reproduction steps
To replicate: Issue a mex build order exactly on the metal spot while holding spacebar (or whatever your hotkey is for "insert command"/prepend command). The order will be denied.
Other
There seem to be a number of bugs that cause this issue:
bx, bx=cmdParams[4], cmdParams[6] -- this is where the cmd position is placed in prepended commands with commandinsert
end
will never execute.
I don't have time to test and issue a PR right now, but I think something like this should work for the main placement issue.
if cmdID == CMD_INSERT then
adjustedCmdID = cmdParams[2]
end
if not isMex[-adjustedCmdID] then
return true
end
local bx, bz = cmdParams[1], cmdParams[3]
if cmdID == CMD_INSERT then
bx, bz = cmdParams[4], cmdParams[6]
end
The text was updated successfully, but these errors were encountered:
Description
It appears that the fix to #2641 introduced a new bug that rejects a valid mex build order if the placement is exactly on the metal spot and the command is inserted at the beginning of the command queue (holding space bar, or whatever hotkey you use).
Additionally, issuing a mex build order at an invalid spot with the prepend key held down correctly snaps to the proper location, but the rest of the queued orders are removed.(This is a related, but different issue. I will open a new issue for this.)Expected Behaviour
A command to place a mex directly on top of a metal spot should be allowed even when the build command is prepended (holding space bar).
Actual Behaviour
A prepended mex build command directly on top of a metal spot will be denied with the warning "Extractors cannot be placed off of metal spots"
Reproduction steps
To replicate: Issue a mex build order exactly on the metal spot while holding spacebar (or whatever your hotkey is for "insert command"/prepend command). The order will be denied.
Other
There seem to be a number of bugs that cause this issue:
This line
Beyond-All-Reason/luarules/gadgets/cmd_mex_denier.lua
Line 50 in c488447
bx, bz = cmdParams[4], cmdParams[6]
Additionally,
Beyond-All-Reason/luarules/gadgets/cmd_mex_denier.lua
Lines 40 to 42 in c488447
Beyond-All-Reason/luarules/gadgets/cmd_mex_denier.lua
Lines 49 to 51 in c488447
I don't have time to test and issue a PR right now, but I think something like this should work for the main placement issue.
The text was updated successfully, but these errors were encountered: