Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When t2 arm bot con completes, strange invalid repair call occuring #4020

Open
Rimilel opened this issue Dec 14, 2024 · 0 comments
Open

When t2 arm bot con completes, strange invalid repair call occuring #4020

Rimilel opened this issue Dec 14, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@Rimilel
Copy link
Contributor

Rimilel commented 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
spring_ZQwEVgj5Ob
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

@Rimilel Rimilel added the Bug Something isn't working label Dec 14, 2024
@Rimilel 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 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant