Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Emitters to use vars #73028

Merged
merged 5 commits into from May 7, 2024
Merged

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented Apr 14, 2024

Summary

None

Purpose of change

Fix #65993

Describe the solution

Describe alternatives you've considered

Testing

Used this json

  {
    "id": "emit_toxic_belch",
    "type": "emit",
    "//": "Large cloud of toxic gas emitted infrequently",
    "field": { "global_val": "field", "default_str":"fd_toxic_gas" } ,
    "intensity": { "global_val": "int", "default":3 },
    "chance": { "global_val": "chance", "default":1} ,
    "qty": { "global_val": "qty", "default":25 }
  },

Additional context

If there are any other places you want variables just ask.

@github-actions github-actions bot added Bionics CBM (Compact Bionic Modules) Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Apr 14, 2024
@GuardianDll
Copy link
Contributor

May i ask you to check how hard would be to implement #72891?

@Ramza13
Copy link
Contributor Author

Ramza13 commented Apr 14, 2024

Ha I looked at that and was debating doing it instead. I'll work on it next.

What context are you seeing this in? What kind of eoc are you using in it? I'm assuming its not a item activation since that would be alpha talker, is this a spell?

@GuardianDll
Copy link
Contributor

Initially i planned to use it with terrain/furniture, but they can't store variables at all, so i moved to the items. What i tried to do is to store the time_since_cataclysm inside the item upon activation (and some another value), and then future activations would check is the value stored, and is specific amount of time passed
I think it was in context of the mod Karol worked, they would need a machine that would produce calorie slurry out of items that are put into machine, so i planned to wrap it as:
User activates the item, inventory EoC searches all items with amount of calories (functionality was added by Karol itself with the help of Renech), user picks all food they want to put into machine;
After pick, EoC is run on all picked items, calorie value (I'll try to make code, so math could return calorie amount, on my own) of all food is added to a single variable, then this variable is stored inside the item, with the day when it happened.
Some amount of time later player activates the item again, time check is passed, and EoC generate X amount of slurry
Thinking now, it probably won't work because there is no way to confirm the machine were powered all this time

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 16, 2024
@Maleclypse
Copy link
Member

Please resolve conflict

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 20, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 5, 2024
@Maleclypse Maleclypse merged commit f859222 into CleverRaven:master May 7, 2024
23 of 26 checks passed
@Ramza13 Ramza13 deleted the var-emitter branch May 15, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Monsters Monsters both friendly and unfriendly. Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement variable objects as possible inputs for emitters
3 participants