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

Computercraft / RS Bridge - isFluidCraftable, isFluidCrafting, getFluid #83

Open
Peekofwar opened this issue May 6, 2024 · 12 comments
Open
Labels
1.19x 1.20.1 Added in dev area-Bridges ME/RS Bridge or other heavy networks

Comments

@Peekofwar
Copy link

Peekofwar commented May 6, 2024

Describe your idea

I recently noticed that the RS bridge is missing certain functions for fluid. With items, we have getItem(), isItemCraftable(), and isItemCrafting() for example, however there are no fluid variants of these functions for fluid.

I want to see fluid variants of these functions such as getFluid(), isFluidCraftable() and isFluidCrafting().

Describe alternatives you've considered if any

In theory I might be able to look through the fluid table or something to figure out if a pattern exists for an item or not, but then I'd have to add extra code that isn't needed for items. Implementing fluid support into my program would be much simpler if I could just use fluid variants of the functions I'm already using for items.

However, this method won't work if there is no way to detect if a fluid is already being crafted. This would result in hundreds of requests for the same fluid.

Additional context

Advanced Peripherals (v0.7.39r)
Computercraft: Tweaked (v1.110.2)
Forge (v47.2.21)

Linked Issues

No response

@Peekofwar Peekofwar changed the title Computercraft / RS Bridge - isFluidCraftable, isFluidCrafting, rs.getFluid Computercraft / RS Bridge - isFluidCraftable, isFluidCrafting, getFluid May 6, 2024
@zyxkad zyxkad added the area-Bridges ME/RS Bridge or other heavy networks label May 6, 2024
@zyxkad
Copy link
Collaborator

zyxkad commented May 6, 2024

They should exists in latest 1.19 & 1.20

@Peekofwar
Copy link
Author

Peekofwar commented May 6, 2024

Let me check if I'm up to date here...

This is the latest version.

@Peekofwar
Copy link
Author

Peekofwar commented May 6, 2024

They should exists in latest 1.19 & 1.20

I couldn't find them on the WIKI page, and they don't exist in-game.

@zyxkad
Copy link
Collaborator

zyxkad commented May 6, 2024

But they are in the code and commited three months ago. The wiki did not update for a long time yeah, but they should exists in game

@Peekofwar
Copy link
Author

But they are in the code and commited three months ago. The wiki did not update for a long time yeah, but they should exists in game

Well, I checked in a live Lua prompt, and couldn't find them.

@Peekofwar
Copy link
Author

Peekofwar commented May 6, 2024

But they are in the code and commited three months ago. The wiki did not update for a long time yeah, but they should exists in game

You linked to exportFluid, and a CTFL+F search didn't reveal anything for isFluid.

I'm specifically looking for the following functions: getFluid, isFluidCraftable and isFluidCrafting.

@zyxkad
Copy link
Collaborator

zyxkad commented May 6, 2024

I'm specifically looking for the following functions: getFluid, isFluidCraftable and isFluidCrafting.

getFluid should be exportFluid if that's what you want

the other two is a problem, maybe they'll be there in the next release

@Peekofwar
Copy link
Author

Peekofwar commented May 6, 2024

I'm specifically looking for the following functions: getFluid, isFluidCraftable and isFluidCrafting.

getFluid should be exportFluid if that's what you want

the other two is a problem, maybe they'll be there in the next release

Are you sure? That sounds more like moving fluids which is not what I'm looking for. getFluid() would retrieve data about the fluid similar to what getItem() does. Also, exportFluid doesn't' seem to exist on the WIKI.

@zyxkad
Copy link
Collaborator

zyxkad commented May 6, 2024

Ok, so there is listFluid and listCraftableFluid methods you can use to replace getFluid and isFluidCraftable

@Peekofwar
Copy link
Author

Peekofwar commented May 6, 2024

Ok, so there is listFluid and listCraftableFluid methods you can use to replace getFluid and isFluidCraftable

The only problem with listCraftableFluid is that I have to add a whole new section of code to parse a table, I can't just OR it into an existing condition in my code.

Ideally I'd just OR rs.isItemCraftable({name=item.name}) or rs.isFluidCraftable({name=item.name}) for example.

@zyxkad
Copy link
Collaborator

zyxkad commented May 6, 2024

So it just an alternative solution, until the methods you want is added

@Peekofwar
Copy link
Author

Ok, so there is listFluid and listCraftableFluid methods you can use to replace getFluid and isFluidCraftable

Problem, this function returns nil despite the fact that lava is craftable in my RS system.

image
image

Also unsure if it reports if the fluid is already being crafted. That's another issue, is that my program needs to know if a fluid is already being crafted, otherwise you will end up with hundreds of requests for the same fluid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.19x 1.20.1 Added in dev area-Bridges ME/RS Bridge or other heavy networks
Projects
Status: To Be Released
Development

No branches or pull requests

3 participants