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

Reconfigures 'plastic_molding' recipes to be more accurate #74080

Merged
merged 15 commits into from
Jun 3, 2024
Merged

Reconfigures 'plastic_molding' recipes to be more accurate #74080

merged 15 commits into from
Jun 3, 2024

Conversation

TealcOneill
Copy link
Contributor

@TealcOneill TealcOneill commented May 25, 2024

Summary

Bugfixes "Removes unnecessary use of 'surface_heat' from recipes with 'plastic_molding'"

Purpose of change

Closes #69598

Describe the solution

In all of these recipes the only real possible use for 'surface_heat' was for molding the plastic but 'plastic_molding' already has 'surface_heat' built into it. As such I removed the unnecessary extra use of it.
I also balanced the charges of 'plastic_molding' to get it closer to the 1 use per 70g of plastic as possible.
I fixed small recipes with the assumption of some waste of plastic and so didn't account for the weight of the polycarbonate sheet from the 'plastic_molding' requirement.
For bigger items like the 30gallon drum and plastic boat hulls I did account for the weight of the sheets since it seemed like they would make up a larger amount of the item being easier to turn into a large flat/curved surface.

Describe alternatives you've considered

Using C++ to add the charges of the two requirements together as Guardian suggested

Testing

Just json changes. Loaded it up and looked to make sure it was correct.

Additional context

image

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding Vehicles Vehicles, parts, mechanics & interactions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Aftershock Anything to do with the Aftershock mod Items: Containers Things that hold other things Items: Armor / Clothing Armor and clothing labels May 25, 2024
@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions labels May 25, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label May 25, 2024
@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label May 25, 2024
@TealcOneill TealcOneill marked this pull request as draft May 25, 2024 14:52
@TealcOneill
Copy link
Contributor Author

I thought I did a really careful job on this and it didn't really need linting but obviously that's not the case. I'll go through and lint all the files tonight after I get back from work.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label May 25, 2024
@TealcOneill TealcOneill marked this pull request as ready for review May 26, 2024 00:02
the retractable telescope no longer matches the criteria for this test.
@github-actions github-actions bot added the Code: Tests Measurement, self-control, statistics, balancing. label May 26, 2024
Tests to see if the test is failing because of lack of components. If this fails I will increase the tool_with_ammo( "popcan_stove" 30 ) to tool_with_ammo( "popcan_stove" 60 ) because 30 charges shouldn't be enough to craft this recipe.
@github-actions github-actions bot added the [C++] Changes (can be) made in C++. Previously named `Code` label May 27, 2024
This is a shot in the dark and I don't think it will work. Either way I'm going to talk to people in the discord to understand the issue
@TealcOneill
Copy link
Contributor Author

I'm going to talk to someone on the discord tomorrow to get a hand with this. I'm not absolutely sure it's caused by my changes to the carver since it did finish making it. The first Test test commit is good, the recipe definitely needs that but the second one I think needs to be reverted.

@Maleclypse
Copy link
Member

I've made changes to kick the tests. If they still come back with charges going wrong it's probably something in this PR.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions and removed json-styled JSON lint passed, label assigned by github actions labels May 29, 2024
@Maleclypse
Copy link
Member

(~[slow] ~[.],starting_items)=> 12:00:00PM: You wield your in progress electric carver (off) (0%).
(~[slow] ~[.],starting_items)=> 12:00:00PM: Wielding - in progress electric carver (off) (0%)
(~[slow] ~[.],starting_items)=> 12:00:00PM: You start working on the in progress electric carver (off) (0%).
(~[slow] ~[.],starting_items)=> 12:00:00PM: You wield your electric carver (off).
(~[slow] ~[.],starting_items)=> 12:00:00PM: Wielding - electric carver (off)
(~[slow] ~[.],starting_items)=> 12:00:00PM: You craft electric carver (off) from memory.

Electric carver uses plastic molding the test confirms that electric carver requires the number of charges set in the test. You'll need to adjust the number the test is looking for.

@TealcOneill
Copy link
Contributor Author

I misunderstood how the multiple tools with enough charges section worked when I changed it in the 'Testing Test 2' commit.
I think that's where Basic Build is failing now so I'll fix that and let the test run to see where the actual issue is.
Thanks for taking a look Maleclypse 👌

I misunderstood this before and as such doubled the amount of charges the recipe needed which opened up a new error. Clearing this so I can find the original error.
@TealcOneill
Copy link
Contributor Author

I think that fixed everything! All failing tests look unrelated

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 30, 2024
@Maleclypse Maleclypse merged commit 26960ee into CleverRaven:master Jun 3, 2024
23 of 27 checks passed
@TealcOneill TealcOneill deleted the plastic_molding_fix branch June 8, 2024 20:26
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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Armor / Clothing Armor and clothing Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mods: Aftershock Anything to do with the Aftershock mod Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retractable telescope has 2 copies of required tools
2 participants