This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
louitzie's profile picture

Help Turtleupgrade Working But Turtle Not Appearing In Cctab

Started by louitzie, 21 August 2013 - 03:36 AM
louitzie #1
Posted 21 August 2013 - 05:36 AM
my turtleUpgrade is working but its turtle isnt appearing in CCTab and TurtleUpgrade.isSecret() is false

please help me
Tiin57 #2
Posted 21 August 2013 - 10:37 PM
Post code? We can't really help unless we have more info.
louitzie #3
Posted 22 August 2013 - 05:43 AM

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
GopherAtl #4
Posted 22 August 2013 - 12:13 PM
Pretty sure they're not supposed to appear automatically, you'll just have to add the peripheral to a creative tab. Adding a turtle with the peripheral directly, I'm not positive, but I would think it would require reflection, which is generally discouraged.
louitzie #5
Posted 22 August 2013 - 02:22 PM
ok but whats the point of isSecret if it isnt working
GopherAtl #6
Posted 22 August 2013 - 02:59 PM
Easter eggs in vanilla CC. Also, it used to auto-add them all, until the possible permutations of turtles with a lot of peripheral mods installed got completely out of control, especially since the change to allow dual peripherals if the turtle didn't have a tool.
louitzie #7
Posted 22 August 2013 - 05:41 PM
oh, I see the permutations make sence, I didnt know that you could have 2 peripherals on a turtle. thanks for the answer.
electrodude512 #8
Posted 22 August 2013 - 11:12 PM
How were the amount of permutations out of control? I have ~80 mods and 3-4 pages of upgrade permutations isn't terrible. You can just search through them with creative search.
GopherAtl #9
Posted 23 August 2013 - 03:14 AM
I stopped counting turtle upgrades at 20 in miscp, without getting to the end of the list. So 20 basic types for just turtle + that peripheral. Combined with 5 different basic tools, that's 60 peripheral+tool turtle types. Combined with the 2 vanilla cc turtle peripherals, that's another 40, for 100. Combined with /each other/, as any two of them also make a valid combination, that's 19+18+17+….+1, or 190 more, for a grand total of 310 permutations added by MiscPeripherals alone. And it gets exponentially worse for each addon after that.

Sure, if you know exactly what you're looking for, then you filter by the name of it. Great for you. People who know exactly what they're looking for are the minority; though. The more general case is someone who doesn't know what they're looking for, and a list of peripherals is a lot less overwhelming to them than a list of all the hundreds of possible permutations of those peripherals with turtles.