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
When a arm t2 bot con finishes, I detect a repair call
A repair call, with a single parameter of 12614 (targetID), which returns 'nil' when I try to look up it's UnitDefID. Seems like an erronous repair call. I tested with other cons and butlers, it only seems to happen with t2 arm bot con (armack), maybe it's a scripting issue?
Even if I load up a new game the number is still 12614
Expected Behaviour
No repair command, unless it's from the factory guide setting, in that case it should targeting be the lab
Actual Behaviour
When a arm t2 bot con finishes, I detect a repair call with a strange target
Reproduction steps
Insert the below code into any gadget that is enabled. I used "unit_geo_upgrade_reclaimer"
Start a new game
enable cheats
create a t2 arm bot lab with /give armalab
give yourself sufficient resources
make a t2 arm bot con
when the t2 bot con finishes, observe the console
function gadget:AllowCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced)
if (cmdID == CMD.REPAIR and #cmdParams == 1) then
local targetID = cmdParams[1]
local targetTeam = Spring.GetUnitTeam(targetID)
local b = UnitDefs[Spring.GetUnitDefID(unitID)].name
Spring.Echo("repair called with", "unitID:", unitID, "name", b, "targetId: ", targetID, "targetUnitDefID:", Spring.GetUnitDefID(targetID))
end
return true
end
Other
It just breaks code that assumes repair is called correctly with valid targetID
The text was updated successfully, but these errors were encountered:
Rimilel
changed the title
When t2 arm bot con finishes building, a strange invalid(?) repair call occuring to unitID 12614
When t2 arm bot con finishes building, a strange invalid repair call occuring
Dec 14, 2024
Rimilel
changed the title
When t2 arm bot con finishes building, a strange invalid repair call occuring
When t2 arm bot con finishes building, strange invalid repair call occuring
Dec 14, 2024
Rimilel
changed the title
When t2 arm bot con finishes building, strange invalid repair call occuring
When t2 arm bot con completes, strange invalid repair call occuring
Dec 14, 2024
Description
Seems to only occur with the arm t2 con.
When a arm t2 bot con finishes, I detect a repair call
A repair call, with a single parameter of 12614 (targetID), which returns 'nil' when I try to look up it's UnitDefID. Seems like an erronous repair call. I tested with other cons and butlers, it only seems to happen with t2 arm bot con (armack), maybe it's a scripting issue?
Even if I load up a new game the number is still 12614
Expected Behaviour
No repair command, unless it's from the factory guide setting, in that case it should targeting be the lab
Actual Behaviour
When a arm t2 bot con finishes, I detect a repair call with a strange target
Reproduction steps
function gadget:AllowCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced)
if (cmdID == CMD.REPAIR and #cmdParams == 1) then
local targetID = cmdParams[1]
local targetTeam = Spring.GetUnitTeam(targetID)
local b = UnitDefs[Spring.GetUnitDefID(unitID)].name
Spring.Echo("repair called with", "unitID:", unitID, "name", b, "targetId: ", targetID, "targetUnitDefID:", Spring.GetUnitDefID(targetID))
end
return true
end
Other
It just breaks code that assumes repair is called correctly with valid targetID
The text was updated successfully, but these errors were encountered: