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

FEAT: Bulk recycle command, for compacting devices once you're done. #499

Merged
merged 9 commits into from
Feb 18, 2024

Conversation

chipsams
Copy link
Collaborator

@chipsams chipsams commented Jan 14, 2024

do /bulkrecycle to recycle every item possible to recycle, without removing the last of an item from your inventory. /bulkrecycle all recycles as much as it can.

tested:

  • multiple different device types at once
  • multiple fragment items, adding up exactly to a full device
  • multiple fragment items, not adding up to a full device
  • multiple fragment items, adding up to multiple full devices, but with some left over
  • an inventory full of random garbage

everything works like a charm, i'm pretty sure? one thing that might need fixing later is the "leave one of an item" feature for rolling up multiple fragment items of the same type, although spread out items like that are rare, and fragment items are a very small part of the kit, so it's good enough for now.

@@ -6,7 +6,7 @@ if (
) {
let deviceDefinitions = [
{
tag: "forge:device/network",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to also update the hammer script as it uses the changed tags

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chipsams can you take a look and change the hmer script and others that use the tags you changed?

kubejs/server_scripts/base/featrues/bulkrecycle-command.js Outdated Show resolved Hide resolved
Copy link
Member

@Yarden-zamir Yarden-zamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the changed tags in other places in the code base

@Yarden-zamir
Copy link
Member

still relevant

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

is there anything broken with it or have I just not committed it

@Yarden-zamir
Copy link
Member

just need to go over and change the tags in other places too, also need to fix the conflicts

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

ohh wait this one isn't done right

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

I'll try and finish it when im done at 12 my time

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

i think i did the tag thing

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

sorry for not doing that before, it's gotta be done for chapter 2

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

oh yeah yarden.zamir given that devices happen in startup only, why can't we just put devices in a global for the hammer to work with

@chipsams
Copy link
Collaborator Author

@Yarden-zamir hey, this all good?

@Discord-Github-Bridge
Copy link
Collaborator

yarden.zamir on Discord says

we can yes. We can also probably use the same code as your command for the hammer function no?

@Discord-Github-Bridge
Copy link
Collaborator

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

it might not work well with ae2 potentially

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

like multiparts

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

we're probably never adding a multi part that isn't a network device at least

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

so wait, was this accepted yarden.zamir

@Discord-Github-Bridge
Copy link
Collaborator

autistic.sack.of.friends on Discord says

i can't remember

@Discord-Github-Bridge
Copy link
Collaborator

yarden.zamir on Discord says

yes, can you write in the pr body the things you tested though? the code looks good

@Discord-Github-Bridge
Copy link
Collaborator

@Discord-Github-Bridge
Copy link
Collaborator

@Yarden-zamir Yarden-zamir merged commit 92c21b6 into game-design-driven:main Feb 18, 2024
@Discord-Github-Bridge
Copy link
Collaborator

yarden.zamir on Discord says

merged

@Discord-Github-Bridge
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a command to quickly recycle everything in the inventory possible
3 participants