Jump to content


louitzie's Content

There have been 10 items by louitzie (Search limited from 14-May 20)


By content type

See this member's

Sort by                Order  

#141241 Help Turtleupgrade Working But Turtle Not Appearing In Cctab

Posted by louitzie on 22 August 2013 - 04:41 PM in Peripheral Help and Discussion

oh, I see the permutations make sence, I didnt know that you could have 2 peripherals on a turtle. thanks for the answer.



#141232 Help Turtleupgrade Working But Turtle Not Appearing In Cctab

Posted by louitzie on 22 August 2013 - 01:22 PM in Peripheral Help and Discussion

ok but whats the point of isSecret if it isnt working



#141178 Help Turtleupgrade Working But Turtle Not Appearing In Cctab

Posted by louitzie on 22 August 2013 - 04:43 AM in Peripheral Help and Discussion

package louis.arduino;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import dan200.computer.api.IHostedPeripheral;
import dan200.turtle.api.ITurtleAccess;
import dan200.turtle.api.ITurtleUpgrade;
import dan200.turtle.api.TurtleSide;
import dan200.turtle.api.TurtleUpgradeType;
import dan200.turtle.api.TurtleVerb;
public class ArduinoTurtle implements ITurtleUpgrade {
@Override
public int getUpgradeID()
{
  return 64;
}
@Override
public String getAdjective()
{
  return "Arduino";
}
@Override
public TurtleUpgradeType getType()
{
  return TurtleUpgradeType.Peripheral;
}
@Override
public ItemStack getCraftingItem()
{
  return new ItemStack(Arduino.blockarduino);
}
@Override
public boolean isSecret()
{
  return false;
}
@Override
public IHostedPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side)
{
  return new ArduinoPeripheral();
}
@Override
public boolean useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction)
{
  return false;
}
@Override
public Icon getIcon(ITurtleAccess turtle, TurtleSide side)
{
  return Arduino.blockarduino.getIcon(0, 0);
}
}

thats the turtleUpgrade file

btw this mod is for personal use, i just want to know why its only working with the recipe



#141030 Help Turtleupgrade Working But Turtle Not Appearing In Cctab

Posted by louitzie on 21 August 2013 - 04:36 AM in Peripheral Help and Discussion

my turtleUpgrade is working but its turtle isnt appearing in CCTab and TurtleUpgrade.isSecret() is false

please help me



#54561 screenshot API

Posted by louitzie on 27 November 2012 - 04:14 AM in APIs and Utilities

Quote

Quote

Quote

Thanks you for the pastebin post, with it I see your function are defined with a screen.function. The problem with that is if we use your api as screen api, to call a function we need to enter : screen.screen.function as the screen. is automatically added by the loadApi.
thats not true use
 term.redirect(screen.get()) screen.takeScreenshot(path_to_save_to) 
thats the reason i used screen. before functions
Let me explain you how os.loadAPI() works. os.loadAPI() returns boolean success when trying to load an API. Then you can call that API by the file name. "screen"'s filename would be "screen", for example. Now, the problem I see, without testing, is that you declare it screen.function, and when we use loadAPI we have to use screen.screen.function. Now, the reason, again, I have not tested, you can use screen.function is because you have the API in the same file as the program.

let me explain this a last time.

1 screen is a local table wich you cannot get using screen.screen use screen.get() instead
2 all functions of the screen table are overrides to the term functions (it takes the default term function if the function is not defined in the screen table)
3 use get() function to get the screen table



#54315 screenshot API

Posted by louitzie on 26 November 2012 - 10:37 AM in APIs and Utilities

View Postbjornir90, on 26 November 2012 - 10:15 AM, said:

Thanks you for the pastebin post, with it I see your function are defined with a screen.function. The problem with that is if we use your api as screen api, to call a function we need to enter : screen.screen.function as the screen. is automatically added by the loadApi.
thats not true use
term.redirect(screen.get())
screen.takeScreenshot(path_to_save_to)

thats the reason i used screen. before functions



#54116 screenshot API

Posted by louitzie on 26 November 2012 - 01:06 AM in APIs and Utilities

I recently made an screen api that's able to save screenshots in rtf format

functions

screen.get() returns screen object used for term.redirect()
screen.takeScreenshot(path) to save screenshot to path
viewing in wordpad gives the best quality.

you can optionaly use the startup script to take screenshots using print screen key

enjoy this, I hope this wil be something usefull.

download: screenshotapi

pastebin: screen

please comment



#52431 Advanced function replacement

Posted by louitzie on 22 November 2012 - 10:09 AM in Tutorials

for my new os I want to override shell.run globaly so i can apply the right display settings depending on my own programs or default (rom) programs

tried code

local run=shell.run
_G.shell.run=function(command,...)
--configuration code here
return run(command,...)

i also tried without the _G

but it only changes localy.

any ideas are welcome.

found it.

if you ever want to do this override os.run instead



#28085 [Cc: 1.48] [Mc: 1.4.7] Aperture Science Turtle Upgrades

Posted by louitzie on 27 August 2012 - 09:16 PM in Peripherals and Turtle Upgrades

thanks it worked

how to use setBlock and getBlock for database turtle?



#28054 [Cc: 1.48] [Mc: 1.4.7] Aperture Science Turtle Upgrades

Posted by louitzie on 27 August 2012 - 07:49 PM in Peripherals and Turtle Upgrades

IDetect() always returns false