Mod Release: OpenPeripheral

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

mikeemoo

New Member
Jul 29, 2019
117
0
0
Back on topic..

A couple of new features I'll be launching in 0.1.8:

The PIM


The Peripheral Proxy:

 

mikeemoo

New Member
Jul 29, 2019
117
0
0
So yesterday 0.1.8 was released.

http://www.computercraft.info/forums2/index.php?/topic/13063-mc-152-cc-153-openperipheral

Here's the change log:

Added a Ticket Machine for the new railcraft
- methods are "lock()", "unlock()", and "createTicket(destination)". You need to put paper in one slot, then any ink/dye in the other slot.
Added a Peripheral Proxy
- this lets you connect wired modems to non-solid blocks. Arrows must point towards the block you want to use as a peripehral. Connect a wired modem to the back or sides and interact with it as you would any other remote peripheral.
Added a "PIM" inventory manager
- If you stand on this, your player inventory gets synced with the pressure plate, so you can then start pumping items out of yourself (or into yourself) using any standard method (turtles, pipes, whatever)
Bug fixes
- Fixed getWidth() and getStringWidth() methods on the terminal glasses
Improved support for SGCraft
- added isConnected(), isInitiator() and getDialledAddress()
Improved support for forestry bees
- getQueen() and getDrone() now return a full table of information about the bee.
- I've also added getBeeInSlot() for bee chests.
Improved support for GregTech
- Mostly bug fixes
- Added setX/Y/Z, getX/Y/Z methods to the teleporter
Improved support for Applied Energistics
- You can now perform crafting requests! call "requestCrafting" and pass in a small table like this: p.requestCrafting({id=54,qty=2})
- I've fleshed out the methods a lot: getTotalBytes, getFreeBytes, getUsedBytes, getUnusedItemCount, canHoldNewItem, isPreformatted, isFuzzyPreformatted, getName, getStoredItemTypes, getRemainingItemCount, getRemainingItemTypes, getTotalItemTypes
Improved Buildcraft support
- getCurrentOutput()
- fleshed out some more methods: getActivationEnergy, getLatency, getMinEnergyReceived, getMaxEnergyReceived, getMaxEnergyStored, getEnergyStored
Improved Thermal Expansion support
- setFrequency is more stable
- added getMode()
- added setMode() - pass in "SEND", "RECEIVE" or "BOTH"
 

natnif36

New Member
Jul 29, 2019
623
0
0
That PIM things looks pretty dang neat.

Being able to pump items in to players - XD who would have though!

Perhaps add some method for automatic extraction of items such as the stuff contained in a backpack - I dunno, not even the most useful thing in regards, until you see below, more so adding a possibility that we don't yet have.

Daftcraft loot bags.
These items are non unique and even stackable until being placed, installed in a players inventory, upon which their contents are randomly generated.
Currently, one must manually sift through them all as one cannot do this automatically - your new PIM plate can generate the contents, but AFAIK we cannot remove items from them without player interaction, nor will they even generate or be opened automatically.
Something to do this may be a nice project for a Saturday afternoon, if your not busy.

And come-on - if dart craft thinks it balanced, for now, no reason why we can't!
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
I'm going to release 0.1.9 earlier than expected, I think, because I forgot to add a crafting recipe for the PIM. Derp!

However, 0.1.9 has some pretty neat new features...

The main one is the new inventory management methods. These methods work for ANY inventory (so any machine, any chest..etc.etc.)


And of course, it works against the PIM too.

So you can write a script which waits for you to stand on the PIM, then pulls all of your junk out of your own inventory, sorts your inventory and condenses it down. Potentially some very cool stuff can be made with this..
 

BhrandonOwnz1

New Member
Jul 29, 2019
11
0
0
I'm going to release 0.1.9 earlier than expected, I think, because I forgot to add a crafting recipe for the PIM. Derp!

However, 0.1.9 has some pretty neat new features...

The main one is the new inventory management methods. These methods work for ANY inventory (so any machine, any chest..etc.etc.)


And of course, it works against the PIM too.

So you can write a script which waits for you to stand on the PIM, then pulls all of your junk out of your own inventory, sorts your inventory and condenses it down. Potentially some very cool stuff can be made with this..

These updates get neater and neater everytime!
And news of this mod in particular being added to any of the packs?
 

natnif36

New Member
Jul 29, 2019
623
0
0
It's in the (currently WIP/Waiting on perms from people like Azanor :/) pack of Resonant_Rise.

According to FTB, being able to control your base via computer is "OP".
 

natnif36

New Member
Jul 29, 2019
623
0
0
That wasn't a direct quote.
But whenever this has been asked, someone mentioned something along the lines that the team had deemed it OP.

I guess I could look...
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
I've heard the contrary, so if you're able to find a source that'd be really helpful to me as it'd clear things up.
 

natnif36

New Member
Jul 29, 2019
623
0
0
Do rumours, gossip and possibly not-quite-heard-in-context discussions count? :3
'Cause that's all I've got.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Hey Mikee I was dicking around with this and MFR, I haven't tested much, but the bioreactor returns nill instead of an array when you do getStackInSlot on it.

Could you pretty please look into that? I tried asking power crystals and
Ask the OP guy to support it? He's been super responsive from what I've seen and tell him to bug me if he needs an MFR thingy to do what you want.

so you shouldn't have much trouble :).

Will test more shortly.
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
Hey Mikee I was dicking around with this and MFR, I haven't tested much, but the bioreactor returns nill instead of an array when you do getStackInSlot on it.

Could you pretty please look into that? I tried asking power crystals and


so you shouldn't have much trouble :).

Will test more shortly.



How are you calling the method? It should just work..

p = peripheral.wrap("left")
print(textutils.serialize(p.getStackInSlot(0)))

getStackInSlot is currently 0-indexed (as opposed to lua's normal 1-index). It'll be changing with I release 0.2.0 so that all getStackInSlot calls are 1-indexed.

If that makes sense! :)

To list everything in a machine you can do:

for i=0,p.getSizeInventory()-1 do
print(textutils.serialize(p.getStackInSlot(i)))
end
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Well, I made a table of all the bioreactors in my cable network and wrapped them in that table, but then it's just

Code:
table = peripherals[i].getStackInSlot(n)

if table == nill then print("it's nill") else print(textutils.serialize(table)) end

always nill.
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
It sounds more like a lua error to me.

Try a very simple test:

put a computer down, put a bioreactor next to it. Execute the following:

p = peripheral.wrap("right")
print(textutils.serialize(p.getStackInSlot(0)))

If that's definitely not working I'll take a look at the mod code to check, but getStackInSlot() is a shared method used by most mods, so i'm pretty sure it works fine.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
It sounds more like a lua error to me.

Try a very simple test:

put a computer down, put a bioreactor next to it. Execute the following:

p = peripheral.wrap("right")
print(textutils.serialize(p.getStackInSlot(0)))

If that's definitely not working I'll take a look at the mod code to check, but getStackInSlot() is a shared method used by most mods, so i'm pretty sure it works fine.

Nill.

I heard that mfr doesn't expose the slots properly.
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
I've just tested..

It all works correctly. slot 0 - 8 are the grid of slots in the top left. Slots 9 - 17 are the remaining slots listed along the bottom.

Code:
p = peripheral.wrap("right")
for i=0, p.getSizeInventory()-1 do
  stack = p.getStackInSlot(i)
  if stack ~= nil then
    print("Stack ".. i .." id: ".. stack.id)
  else
   print("Nothing in slot ".. i)
  end
end