4 posts
Posted 17 March 2013 - 02:19 PM
i have a suggestion for you.
the turtle.getItemCount(number) is good, but if you want to make a crafting turtle that repairs tools like bows it would be nice to have an turtle.getItemDamage(none or number) and i have made myself an code that should go around it but i have problems with it…
it does nothing else then repairing the item and then say "no item crafted" can you help me
<spoiler>repeat
sleep(4)
turtle.select(3)
if(shell.run("craft 1")==false)then
x=turtle.getItemCount(3)
print("false")
if(x=="1")then
print("x=1")
shell.run("redpulse back 1 2")
elseif(x==0)then
print("x=0")
shell.run("redpulse right 2 10")
sleep(10)
end
end
until(false)
</spoiler>
sorry wrong forum
389 posts
Location
Norway
Posted 17 March 2013 - 02:56 PM
Split into new topic to suggestions. Hoping the topic title fits.
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 02:59 PM
I actually like this idea; turtle.getItemDamage that is.
7508 posts
Location
Australia
Posted 17 March 2013 - 03:39 PM
you could always compare it against a fully repaired item. since the damage value of the fully repaired item would be different if the item you are 'fixing' is not fully repaired. that being said it could be a nice addition.
8543 posts
Posted 17 March 2013 - 03:55 PM
To be honest, I don't see this getting added, for reasons similar to why we aren't going to have getBlockID. It is a bit different, though. Only a dev can say!
2447 posts
Posted 17 March 2013 - 04:09 PM
Nah. Too magic.
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 04:19 PM
Nah. Too magic.
Darn! Oh well ^_^/>
7508 posts
Location
Australia
Posted 17 March 2013 - 04:20 PM
Nah. Too magic.
Darn! Oh well ^_^/>
Guess its just down to simple comparisons then. :P/>
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 04:24 PM
Nah. Too magic.
Darn! Oh well ^_^/>
Guess its just down to simple comparisons then. :P/>
Indeed.. Hmm, since the devs rejected the idea, I guess someone might as well make a new API for this kind of thing ^_^/>
7508 posts
Location
Australia
Posted 17 March 2013 - 04:26 PM
Indeed.. Hmm, since the devs rejected the idea, I guess someone might as well make a new API for this kind of thing ^_^/>
Go ahead. :P/>
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 04:27 PM
Indeed.. Hmm, since the devs rejected the idea, I guess someone might as well make a new API for this kind of thing ^_^/>
Go ahead. :P/>
HA! Laugh is what SuicidalSTDz did on the 16 of March as TOBIT insisted he make a new api!
7508 posts
Location
Australia
Posted 17 March 2013 - 04:36 PM
HA! Laugh is what SuicidalSTDz did on the 16 of March as TOBIT insisted he make a new api!
A look of confusion went over BIT's face on the 17th March as Suicidal confused him as to why he didn't want to make it.
1190 posts
Location
RHIT
Posted 17 March 2013 - 04:37 PM
Maybe instead of turtle.getItemDamage, you could get turtle.worstItemDamage(slot1, slot2)? For example, I have a slightly damaged sword in slot 1, and a very damaged sword in slot 2. turtle.worstItemDamage(1,2) –> 2
Still too OP?
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 04:41 PM
A look of confusion went over BIT's face on the 17th March as Suicidal confused him as to why he didn't want to make it.
Heh, Third Person is the best ^_^/> As for the api… I never plan on learning Java :P/>
7508 posts
Location
Australia
Posted 17 March 2013 - 05:28 PM
Heh, Third Person is the best ^_^/> As for the api… I never plan on learning Java :P/>
Oh I thought you meant a Lua API not a peripheral…
1511 posts
Location
Pennsylvania
Posted 17 March 2013 - 05:50 PM
Heh, Third Person is the best ^_^/> As for the api… I never plan on learning Java :P/>
Oh I thought you meant a Lua API not a peripheral…
Wait, why did I say API? I meant to say peripheral… Wow that was a bad derp <_</>