Jump to content




TIE [Turtle Inventory Emulator] - Is it useful?


18 replies to this topic

#1 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 12 June 2013 - 02:46 PM

I'm working on a little API that emulates the turtle's inventory.
Now I want to know if it's useful in any way!

So, have you a use for it?

If it isn't useful in any way, I won't make it more complex.

Thanks for reading
-Freack100-

Edit :
Yes, I know that I haven't uploaded it yet.

#2 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 12 June 2013 - 05:53 PM

I can't think of any use for it.

#3 Wiiplay123

  • Members
  • 25 posts

Posted 15 June 2013 - 01:48 PM

If you can put that API into a fighter, you can make a TIE Fighter! *Ba dum tss*
It might be useful for testing turtle programs without doing stuff :D

#4 electrodude512

  • Members
  • 167 posts
  • LocationEastern USA

Posted 15 June 2013 - 06:44 PM

I'd use this for CC-Emu if you uploaded it, but it would also have to partially simulate a whole minecraft world.

#5 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 15 June 2013 - 06:56 PM

View Postelectrodude512, on 15 June 2013 - 06:44 PM, said:

I'd use this for CC-Emu if you uploaded it, but it would also have to partially simulate a whole minecraft world.
You can use it were ever you want :D/>
I hope you know how the "OOP" in the API works :P/>

Examplecode:
os.loadAPI("TIE")
Inv1 = TIE.Inventory.create()
Inv1:select(4):setItem("Stone"):setAmount(30)
print(Inv1:getInformation())
--[[
this code would print "Slot 4 contais 30 Stone"
:D/>/>
]]--


#6 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 16 June 2013 - 09:00 AM

It would not be really useful, sorry :(

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 June 2013 - 11:19 AM

Feel free to use and extend this code. I haven't worked on this is a very long time.

http://www.computerc...n-cc-emu-kinda/

#8 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 16 June 2013 - 11:34 AM

View Posttheoriginalbit, on 16 June 2013 - 11:19 AM, said:

Feel free to use and extend this code. I haven't worked on this is a very long time.

http://www.computerc...n-cc-emu-kinda/
Thx for that.
But I don't think I can use it because your API works very differently than mine ^^
yours overrides the native turtle commands.
Mine uses two tables (one for the name, one for the amount) and edits it ^^

On-Topic:
Now I'm working on a Movement emulation!
In this moment it has a limitation of the area (6*16) but I will add the normal area of the computer (19*51)^_^

#9 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 June 2013 - 11:39 AM

View PostFreack100, on 16 June 2013 - 11:34 AM, said:

Thx for that.
But I don't think I can use it because your API works very differently than mine ^^
yours overrides the native turtle commands.
Mine uses two tables (one for the name, one for the amount) and edits it ^^
Well it actually puts them into the turtle.native and turtle tables. this means that a script, no matter how it is programmed will work without having to change any of the calls to work specifically for the API.

#10 Sorroko

  • Members
  • 87 posts

Posted 16 June 2013 - 11:44 AM

I don't think Freack's api overwrites the native turtle functions (at all), that's what he means.

#11 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 June 2013 - 11:48 AM

View PostSorroko, on 16 June 2013 - 11:44 AM, said:

I don't think Freack's api overwrites the native turtle functions (at all), that's what he means.
There is no turtle.native in CC-Emu. just like there is no turtle in CC-Emu.

Some people in their scripts do use turtle.native in their scripts, so if you're going to make a script to allow testing of turtle code in CC-Emu then you need to allow for all variables.

#12 Sorroko

  • Members
  • 87 posts

Posted 16 June 2013 - 11:49 AM

His actual post never says it for cc-emu :P

#13 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 16 June 2013 - 03:44 PM

^ ^
| |
thats right!

I've got an idea!
This API is quite useful for games ^_^
(It has working Invetorys and some Movement)


#14 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 18 June 2013 - 04:25 PM

If I'm reading this right, you're making a turtle display its inventory on the screen.
This would be useful if you send the info to a computer and then displayed the inventory, but on the turtle it's totally useless.

#15 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 18 June 2013 - 05:00 PM

View PostIcanbreathecode, on 18 June 2013 - 04:25 PM, said:

If I'm reading this right, you're making a turtle display its inventory on the screen.
This would be useful if you send the info to a computer and then displayed the inventory, but on the turtle it's totally useless.
Not realy...
The system behind my API is quite simple.
1. You create a new Inventory
2. You can set/drop/select/whatever the inventory
(3.) Print out informations about the slot

This don't get real data, it creates Virtual Inventorys.

#16 hermanoid

  • Members
  • 15 posts
  • LocationMicroscopic Village in Nebraska.

Posted 18 January 2017 - 03:53 AM

Did anything ever come of this? I have a use for it (my use might be as useful as many claim this to be... We shall see) and would really appreciate a link to whatever you have so far. If it's in GitHub, I'd be glad to contribute.

#17 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 18 January 2017 - 10:04 AM

I'm making this which is similar but it's bugged at the moment.

#18 hermanoid

  • Members
  • 15 posts
  • LocationMicroscopic Village in Nebraska.

Posted 20 January 2017 - 03:02 AM

That's certainly interesting, but would certainly not work for my purposes (Your Inventory-Api.lua is similar to what I'm doing, with the exception of a not being object-oriented) (Why I want Object-Oriented is another story)

If you really want an explanation of what I'm doing... I'm not really sure enough about any specifics to explain it to you. Sorry.

#19 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 20 January 2017 - 01:47 PM

My idea for toetle is it can be as advanced as you want it to be, my end goal is to have it where the programmer (E.G. you) can provide their own handler functions and toetle will map the turtle API to those. Your functions could do a full simulation of the turtle's inventory. But as I said toetle is currently bugged and I don't have the time and knowledge to debug it. (I should probably poke that Ask a Pro thread I made...)

As for the inventory-api.lua, I don't know anything of that (another project member wrote it). It's licensed as MIT so if it's useful to you then just credit the Hive Development Team (or whetever we named ourselves in the License file at the root of the repo)

You may want to look at the inventory management code of this project: http://www.computerc...ers-turtle-api/

Also, why Object-Oriented (OO)? OO in Lua slows down the code.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users