-
Notifications
You must be signed in to change notification settings - Fork 276
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
feat(content): Add salvage action for metal items #4207
Conversation
The Autofix app has found code style violation and automatically formatted this Pull Request. I locally edit my commits (e.g: git, github desktop)Please choose following options: I'd like to accept the automated commit
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. This PR is complete and I don't want to edit it anymoreIt's safe to ignore this message. I edit this PR through web UIYou can ignore this message and continue working. I have no idea what this message is talking aboutYou can ignore this message and continue working. If you find any problem, please ask for help and ping @scarf005. |
@@ -183,6 +183,7 @@ | |||
"fire_resist": 3, | |||
"elec_resist": 0, | |||
"chip_resist": 11, | |||
"salvaged_into": "steel_chunk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These and related salvaging into chunks of steel instead of scrap
is prolly why some of the behavior you observed during was a touch janky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think scrap metal is too small, you'd be sawing all day to get your item that small. The hacksaw is 20 scrap metal or 4 chunks of steel, so we're increasing the sawing required by a factor of 5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Might be worth testing if making it saw into scrap metal fixes the weird issue of it salvaging super-fast however. If it doesn't then keeping them as steel chunks may be best, who knows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. All salvage action times are bugged, including cotton. Salvaging doesn't consume time? Tested with swiss knife in the dark on the down filled blanket.
https://cdn.discordapp.com/attachments/830916451517857894/1205444025314713601/image.png?ex=65d8643b&is=65c5ef3b&hm=d75cd22bee79309a32451325eff87d75abc4dc3c31fa0fd394ca706497501880&
https://cdn.discordapp.com/attachments/830916451517857894/1205444057279635496/image.png?ex=65d86443&is=65c5ef43&hm=3193dffd85f72e7e01cbaefe934153d4396bee24eb0e9d9ebe19511d4fd427f7&
#4208 Confirmed all salvage actions are bugged and do not use correct time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, far as I can tell this all looks good at a glance aside from the issue that currently has me a touch stumped as to the cause, the toolbox having moves_per_part
massively inflated is basically a hack in my opinion and it seems not even nessecary since salvaging for a lot of items is still instant.
I think what'd be good, probably as a followup PR I'll probably have to work on, would be to figure out how to fix salvaging moves_per_part
to actually work right, and then make it so that the item density of the material being salvaged modifies this time. That way the same JSON value will let you zip through cloth and the like while taking longer to process metals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purpose of change
Allows the hacksaw and toolboxes to salvage a select number of metals by weight so we can avoid a thousand uncrafts (not exaggerating here) and so we can turn useless items into useful scrap.
Describe the solution
In the docs it was known we have a way to do custom salvage actions, so I created one you will see on the hacksaw. I also was required to add "salvaged_into" items for each appropriate metal and went with chunks of steel for iron items. We only allow steel and don't differentiate so I added steel to iron because some steel items are made of iron for some reason. I also was required to add "flags": [ "NO_SALVAGE" ] to each relevant base material because in testing you could saw down chunks of steel into chunks of steel. I added a lot of extra no salvages in case we expand this salvage PR in the future.
Note: I selected just a few appropriate metals but not all possible metals. If we want to we can add it for everything.
Describe alternatives you've considered
An uncraft for every. Single. Item. >:(
Testing
JSON loaded into game, tested. NOTE The screenshot is not fully indicative as I changed time to 10 seconds.
Additional context
HAHAHAHAHAHAHAHAHAHA