--# Basic ones
exturtle.turtle=oldturtle --acces to basic turtle in case i overwrite basic turtle with this api useing os.loadAPI("turtle")
exturtle.version="TurtleExtended By Wojbie"
--# Taglist functions
--There are special tags that are not removeable from api
--#All is given to all blocks always
--#Modname - where Modname is name of mod adding block - for easy itendification. #minecraft is for all minecraft blocks, #ComputerCraft for all computercraft block ect
--Also on load 6 Tags are created
--#DigBlacklist --used by dig functions
--#DigWhitelist --used by dig functions
--#PlaceBlacklist --used by place functions
--#PlaceWhitelist --used by place functions
--#Blacklist --Child of both blacklist tags from up - for blacklisting place and dig at same time
--#Whitelist --Like blacklist but with whitelist
--This version contains some tag definitions that are in the progress of finalizing like #tree or #liquidSourceBlock
--There are planned patchfiles for mods that will add moditems to definition lists. Will make them only for mods i play with sorry.
exturtle.addTag(Tag) --Creates tag for use in Tag system
exturtle.removeTag(Tag) --Deletes tag and all its contents
exturtle.addBlockToTag(Tag,Block,Meta) --Adds Block to Tag Definition. if Meta if not specified any meta is valid
exturtle.addChildToTag(Tag,Child) --Adds Child tags to Tag Definition. Any blocks tagged with Child will get tagged with This TAG too.
exturtle.listTag(Tag) -- Lists all lines from Tag Definition
exturtle.delTag(Tag,num) --Removes line from Tag Definition, removing Block or tag defined there
exturtle.saveTag(A) --Saves All tags into file A, if A not specified saves to /tag.log
exturtle.loadTag(A) --Saves All tags from file A and removes all currently set tags. if A not specified loads from /tag.log
--# POSITIONING
--turtle position is saved as table with keys
pos = {x=0,y=0,z=0,xd=1,zd=0,f=?}
--x,y,z are coords of turtle
--xd,zd are direction its facing
--f is minecraft facing direction divined from xd,za
exturtle.savePos(A) --Saves postion into file A, if A not specified saves to /gps.log
exturtle.loadPos(A) --Loads postion from file A and sets turtle pos to that value, if A not specified loads from /gps.log
exturtle.loadPoint(A) --Loads postion from file A and returns it as table., if A not specified loads from /gps.log
exturtle.setPos(x,y,z,xd,zd) --set position to provided parameters
exturtle.getPos() --get static table with current position
exturtle.getDynamicPos() --get table that always contains current position. Warning - messing with this table can cause turtle to go Bonkers..
--# basic movement
-- all fucntion make sure to update current position after beaing called.
exturtle.turnRight()
exturtle.turnLeft()
exturtle.up()
exturtle.down()
exturtle.forward()
exturtle.back()
--# getting position
exturtle.gpsPos(A) --gets pos from GPS -- will get lost in process sometimes.
--# /POSITIONING
--# ENTHANCMENTS
--# Inspection
--Adds key "tags" that containg lookup table full of tags. per example table.tags["#ComputerCraft"] will be true for all computercraft blocks and items
exturtle.inspect()
exturtle.inspectUp()
exturtle.inspectDown()
exturtle.getItemDetail(A)
--# Comparing utility
-- allows to easly compare with item from slot by accepting slow value, if value not added it will compare selected slot like normal.
exturtle.compare(slot)
exturtle.compareUp(slot)
exturtle.compareDown(slot)
--# Fuel information
exturtle.getFuelLevel() --if turtles dont need fuel on the server it returns getFuelLimit value. Never "unlimited"
exturtle.getFuelLimit() --How mutch turtle will be able to refuel to
exturtle.getFuelPercent() --number from 0-1 where 0 is empty and 1 - full
exturtle.getFuelSpace() --how mutch space for fuel is left.
--# Smart Refuel
exturtle.refuel(A) --limit aware refuel - will never overfuel even if ordered to.
--# /ENTHANCMENTS
--# BLACKLIST AND WHITELIST IMPLEMENTATION
--All dig functions look for tags #DigWhitelist and #DigBlacklist
--iF block is whitelisted blacklist is not considered
--if block is blacklisted it will not be mined
--On loadAPI all computercraft block (using tag "#ComputerCraft") and monster_stawners anre blacklisted.
exturtle.dig() return di("") end
exturtle.digUp() return di("Up") end
exturtle.digDown() return di("Down") end
--All place functions look for tags #PlaceWhitelist and #PlaceBlacklist
--iF block is whitelisted blacklist is not considered
--if block is blacklisted it will not be placed
--On loadAPI Bedrock anre blacklisted.
exturtle.place(A) return pi("",A) end
exturtle.placeUp() return pi("Up") end
exturtle.placeDown() return pi("Down") end
--# /BLACKLIST AND WHITELIST IMPLEMENTATION
--# GOTO --direct with no pathfinding
exturtle.face(A,
/> --makes turtle face ditection A,B - they are directions xd znd zd from point definition.
exturtle.fromTo(...) --Distance between 2 points. If given more than 2 points it will claculate minimal fuel to go from first to last in order given
exturtle.goto(A) --turtle attempts to take most direct route to the point. No pathfinging included just goed from where he is to point A.
--# /GOTO
--# UNIMPLEMENTED
--PATHFINGING1 --blind turtle stumble
exturtle.upP()
exturtle.downP()
exturtle.forwardP()
exturtle.backP()
--/PATHFINGING1
--PATHFINGING2 --map based - to add later
--/PATHFINGING2