Refactor: Add convars for defining markers#1892
Merged
thelindat merged 12 commits intoMar 8, 2025
Merged
Conversation
…r determining colour & type
…type and colour correctly -> linked to previous commit
… and colour correctly -> linked to commit 00f55a
…, color and type -> some markers look tiny with the same scale params -> also allows color to be defined in the convar
Member
Author
|
If approved will add it to the documentation |
Member
|
I don't want more convars for people to fuck up the contents of. If you setup error handling for the json convars and ensure they fallback to working defaults (rather than setting the default convar value) then I can merge it. |
Member
Author
|
Sure, Will do when able. |
Member
Author
|
Would this approach satisfy ? client.shopmarker = json.decode(GetConvar('inventory:shopmarker', [[
{
"type": 29,
"colour": [30, 150, 30],
"scale": [0.5, 0.5, 0.5]
}
]])) or fallbackmarkerWith |
Member
Author
Member
Author
|
Will open a PR on docs to add them in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implemented custom marker definitions for evidence/stash, drops, shops and crafting that are modifiable using convars.
Not convinced on the convar structure, will definetly be screwed up by people not knowing json string syntaxing.
Open for changes, improvements, don't mind if it doesn't get merged with V3 in the works.
Added Convars:
setr inventory:dropmarker { "type": 2, "colour": [150, 30, 30], "scale": [0.3, 0.2, 0.15] } setr inventory:shopmarker { "type": 29, "colour": [30, 150, 30], "scale": [0.5, 0.5, 0.5] } setr inventory:evidencemarker { "type": 2, "colour": [30, 30, 150], "scale": [0.3, 0.2, 0.15] } setr inventory:craftingmarker { "type": 2, "colour": [150, 150, 30], "scale": [0.3, 0.2, 0.15] }Same structure for all