obj.prototype - #1559
Open
nh6574 wants to merge 5 commits into
Open
obj.prototype#1559nh6574 wants to merge 5 commits into
obj.prototype#1559nh6574 wants to merge 5 commits into
Conversation
Collaborator
|
What if |
Member
Author
|
|
Member
Author
|
Ok, scrap that (after some careful consideration in the shadows of the SMODS discord) This is how it works now: Each SMODS class with a corresponding game object now has a For example:
To keep the practicality of the earlier implementation each game object gets a Some notes on this:
|
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.
Adds an easy want to find prototype object from game objects (i.e. the SMODS.Center of a card, the SMODS.Rank of a card, SMODS.Tag of a tag, or the vanilla equivalents)
Added:
card.prototype==card.config.centerblind.prototype==blind.config.blinddeck.prototype==deck.effect.centertag.prototype==G.P_TAGS[tag.key]tag_sprite.prototype==G.P_TAGS[tag_sprite.config.tag.key]G.stake_prototype==G.P_CENTER_POOLS.Stake[G.GAME.stake]card.rank_prototype==SMODS.Ranks[card.base.value](nilif none)card.suit_prototype==SMODS.Suits[card.base.suit](nilif none)card.edition_prototype==G.P_CENTERS[card.edition.key](nilif none)card.seal_prototype==G.P_SEALS[card.seal](nilif none)Additionally I added
card.stickersas a key-indexed table with all of the cards stickers that gets saved to the card (except when it gets applied directly and not using one of the functions, which meanscard.pinnedwill practically never be here... I can solve that with a bunch of patches if it's wanted. Also DebugPlus doesn't use the functions either.).card.sticker_prototypesis similar but it contains each prototype object and doesn't get saved. Maybe it can be just one table that just gets the prototypes removed on save.Not changed:
G.GAME.challenge_tab: The challenge's prototype.card.config.card: The card object prototype. This one I don't know where it would be used and it's not that hard to access.Also while the term prototype has been used before (I think by some of my other PRs) this is a good time to standardize it so if we don't like this one we can change it to something else.
Additional Info: