Jump to content

Bath bombs appear at 0,0 & Infinite Trap Starfish Spawning


lakhnish
  • Fixed

As what SplOrange said: Drop bathbombs into the hotsprings and find 0,0.

Spoiler

image.png.a025b950e974edbd7ada2624b7b2ab2e.png

As for the infinite Trap starfish, I don't know how it's happening, just that it is.

Spoiler

 

 


Steps to Reproduce
Drop some bath bombs into some hotsprings and find 0,0. Unknown for starfish variant.



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

This is definitely a bug. I've seen this with some mods before.

local function on_deploy(inst, position, deployer)
    local new_trap_starfish = SpawnPrefab("trap_starfish")
    if new_trap_starfish ~= nil then
        -- Dropped and deployed starfish traps shouldn't spawn in a reset state (or they'll bite the deployer).
        new_trap_starfish.AnimState:PlayAnimation("trap_idle")
        new_trap_starfish.components.mine:Spring()

        new_trap_starfish.Transform:SetPosition(position:Get())
        new_trap_starfish.SoundEmitter:PlaySound("dontstarve/common/plant")
    end
end

There are two separate prefabs for Anenemy Traps, one is "dug_trap_starfish" and the other is "trap_starfish". The dug version is the inventory item, and the normal version is when it's planted. Anenemy Traps have a "deployable" component to them. Whenever a prefab is deployed, it needs its coordinates to be specified. This is usually done by getting the deployer's coordinates.

However, if you look at the code above, deploying a "dug_trap_starfish" spawns a "trap_starfish" when deployed. Going back to the "deployable" component, the "dug_trap_starfish" will attempt to deploy itself at some coordinate. Since there is no coordinate specified, it defaults to the coordinate (0, 0).

A simple fix to this bug would be to add inst:Remove() to the code, which would delete the "dug_trap_starfish" when deployed (which is what we want since it becomes a "trap_starfish" anyway).

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...