Jump to content

Winbots home coordinates on boats.


Kondr_
  • Pending

Winbots  when deployed on boat remember coordinates at world (global coordinates), so when you move boat away you need to redeploy them to recharge them or make them stop moving away. They should remember not global coordinates but boat's one.

p.s. making first issue. do not know how to navigate through existing ones so it maybe is duplicate


Steps to Reproduce

place on boat a chest and deploy winbot. move a boat to different place. make winbot work(place some items on boat and same item into chest)

current behavior: winbot will do his job and then will try to return to original place where boat was when it was deployed.

expected behavior: winbot will do his job and then will go to sleep mode where it was deployed on boat like if boat has not beed moved.

  • Like 1



User Feedback


Yeah, it simply seems to be because Winbots don't wait a frame/update before updating their spawn point after being deployed, unlike Wobot after beind dropped.

This causes them to think they're not on a platform in that specific moment. So they don't get to properly save local coordinates.

For reference:

local function DoOnDroppedLogic(inst)
    if inst.components.drownable:ShouldDrown() then
        inst:PushEvent("onsink")

        return
    end

    StorageRobotCommon.UpdateSpawnPoint(inst)
    inst:OnInventoryChange()

    inst.sg:GoToState(inst.components.fueled:IsEmpty() and "idle_broken" or "idle", true)
end

local function OnDropped(inst)
    -- Wait for the platform to be set up.
    inst:DoTaskInTime(0, DoOnDroppedLogic)
end

 

Edited by hoxi

Share this comment


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

×
  • Create New...