Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits)

Ah you're right.  I was only thinking of simple direct variables.  For cases where a variable loads from various things, it should be pretty much open for one line.  Then handle multi-line and nested dictionaries.

And nope, just blind-vision missed your pastebin originally.   I'll look at it in regex and test/add it in 19a, but given you are using the modding system and *tested* in the online regex already, I'm gonna say your version is the most robust and correct. =D

Iit could be more robust, but at a certain point working with regex's is infuriating... I can think of more valid gdscript syntax this wouldn't currently handle, but shouldn't be the mod system's job to handle everything, only the sane things, like all multilines must be in form:
var blah = {
}

or the same with []'s, and not allow inserting anything extra after the starting or ending []{} characters.  I'm sure at some point someone will write this in a mod though and bitch it doesn't work...
var fizz = { buzz = [
"moo"
]}

What I've proposed though should work with modifying any of the existing code's current bits as they always follow that good standard as far as I've seen.

Though realized one thing I did not update.  I made AddTo work, but did not test RemoveFrom. Best guess, it works but maybe not as expected because the first line will be considered to be the { or [.