I initially thought this to be a bug with my implementation, but am seeing the same results when using any of the default tools, such as "Balloons" in my example.
Steps to replicate:
Start Single Player instance
Open Balloons tool and create a couple of presets.
disconnect, and re-create Single Player instance.
Presets saved successfully. Delete 1 or more of the presets.
disconnect, and re-create Single Player instance again.
I searched and found the previous issue https://github.com/Facepunch/garrysmod-issues/issues/3479, but appears this wasn't able to be replicated. If there is any further details I can provide, please let me know and I'll be happy to do so.
I've implemented a "presets" menu into my tool, as per the examples in tools such as https://github.com/Facepunch/garrysmod/blob/394ae745df8f8f353ea33c8780f012fc000f4f56/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/ballsocket.lua, but am having issues when deleting presets - they keep returning after I rejoin the game. This was brought to my attention by a user reporting the bug to me: https://steamcommunity.com/workshop/filedetails/discussion/109643223/1741106440032200586/. I was able to replicate the issue in a Single Player game, using the latest
dev
branch.I initially thought this to be a bug with my implementation, but am seeing the same results when using any of the default tools, such as "Balloons" in my example.
Steps to replicate:
disconnect
, and re-create Single Player instance.disconnect
, and re-create Single Player instance again.I followed the code back to https://github.com/Facepunch/garrysmod/blob/394ae745df8f8f353ea33c8780f012fc000f4f56/garrysmod/lua/includes/modules/presets.lua, and can confirm that
Remove
is being called with the expected arguments, as isSavePresets
. This function doesn't appear to be open source though, so I couldn't investigate any further.I searched and found the previous issue https://github.com/Facepunch/garrysmod-issues/issues/3479, but appears this wasn't able to be replicated. If there is any further details I can provide, please let me know and I'll be happy to do so.