Skip to content

Chip-Mult Operator API#776

Closed
balt-dev wants to merge 0 commit into
Steamodded:mainfrom
balt-dev:feat/operator-api
Closed

Chip-Mult Operator API#776
balt-dev wants to merge 0 commit into
Steamodded:mainfrom
balt-dev:feat/operator-api

Conversation

@balt-dev
Copy link
Copy Markdown
Contributor

@balt-dev balt-dev commented Jun 23, 2025

Additional Info:

  • I didn't modify api's or I've made a PR to the wiki repo.
  • I didn't modify api's or I've updated lsp definitions.
  • I didn't make new lovely files or all new lovely files have appropriate priority.

@balt-dev
Copy link
Copy Markdown
Contributor Author

Meant to mark as a draft PR. :P

@balt-dev
Copy link
Copy Markdown
Contributor Author

Wiki PR made!

@balt-dev
Copy link
Copy Markdown
Contributor Author

Obviously, this is inspired by Jen's Almanac doing this first. I didn't take any code from it, however, so we're good on the code licensing front.

@balt-dev balt-dev reopened this Jun 24, 2025
@lord-ruby
Copy link
Copy Markdown
Contributor

there should be a way to change what the operator displays as without defining node_func, with the option to define node_func still if you need something more complicated. having to do node func for every single operator seems like a bit much

@PizzaTowerFanGD
Copy link
Copy Markdown

i think this should be added

@balt-dev
Copy link
Copy Markdown
Contributor Author

there should be a way to change what the operator displays as without defining node_func, with the option to define node_func still if you need something more complicated. having to do node func for every single operator seems like a bit much

I could add an alternative way of specifying it that makes one for you, like for example

text = "X",
colour = G.C.UI_MULT

would autogenerate a node_func for that

@balt-dev
Copy link
Copy Markdown
Contributor Author

there should be a way to change what the operator displays as without defining node_func, with the option to define node_func still if you need something more complicated. having to do node func for every single operator seems like a bit much

@lord-ruby You can now do this:

SMODS.Operator {
    key = "base",
    func = function(chips, mult) return chips * mult end,
    node_func = SMODS.operator_func("X", G.C.UI_MULT)
}

@lord-ruby
Copy link
Copy Markdown
Contributor

Im looking back onto this and one other thing that this could do with in passing self (aka the current operator) into both the node func and the regular func so that one operator could vary and so that a generic operators that change based on unpredictable things can be created more easily, base could be renamed to multiplication to make it more clear even if its pretty clear already

@lord-ruby
Copy link
Copy Markdown
Contributor

and some way to pass arguments into set_operator thats standardized get passed onto the operator itself for this same purpose would be pretty good too although idk how this will actually manifest

@balt-dev balt-dev closed this Jul 10, 2025
@balt-dev
Copy link
Copy Markdown
Contributor Author

Why did it close.

@balt-dev
Copy link
Copy Markdown
Contributor Author

Why are my changes no longer updating here. What is happening.

@balt-dev
Copy link
Copy Markdown
Contributor Author

Okay, I guess I somehow broke the PR entirely. Let me make a new one.

@balt-dev
Copy link
Copy Markdown
Contributor Author

See PR #809.

@balt-dev balt-dev mentioned this pull request Jul 10, 2025
3 tasks
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.

3 participants