Skip to content

Conversation

@spaghetti-squash
Copy link
Contributor

@spaghetti-squash spaghetti-squash commented Nov 11, 2024

From discord:

> js JSON.stringify({ x: Item.get(1) }, (_, value) => value instanceof Item ? "fart" : value)

Returned: {"x":{"id":1,"name":"seal-clubbing club","plural":"seal-clubbing clubs","descid":"868780591","image":"club.gif","smallimage":"club.gif","levelreq":0,"quality":"","adventures":"","muscle":"","mysticality":"","moxie":"","fullness":0,"inebriety":0,"spleen":0,"minhp":0,"maxhp":0,"minmp":0,"maxmp":0,"dailyusesleft":2147483647,"notes":"","quest":false,"gift":false,"tradeable":true,"discardable":true,"combat":false,"combatReusable":false,"usable":false,"reusable":false,"multi":false,"fancy":false,"pasteable":true,"smithable":true,"cookable":false,"mixable":false,"candy":false,"candyType":"none","chocolate":false,"potion":false,"seller":"none","buyer":"none","nameLength":18,"noobSkill":"none","tcrsName":"seal-clubbing club","skill":"none","recipe":"none"}}
> js Item.get(1) instanceof Item

Returned: true

it seems like mafia constants get converted to POJOs before hitting the replacer function

@spaghetti-squash spaghetti-squash marked this pull request as draft November 11, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants