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

Turtle light source

Started by elektronemulo, 29 August 2015 - 02:39 PM
elektronemulo #1
Posted 29 August 2015 - 04:39 PM
I would like to recommend that the turtle be able to turn internal lights on and off. Perhaps it would be best to reserve the feature for Advanced turtles or Diamond turtles (suggested in another thread on this forum).

Here's my suggested use-case: I would program a quarry program to have the turtle emit light when it runs in to an error, like running out of fuel and must stop. I would be able to find the turtle in a massive empty dark quarry cavern quite easily.

Perhaps, to prevent lighting bugs, the turtle should only emit light when stationary. The help file/wiki should warn programmers to use caution when using this command to avoid creating too much lag.

The API should allow the following functions:
  • Set light level: define how much light the turtle is emitting.
  • Blink (min level, max level, rate): API function to blink the turtle with a default of full brightness and a default rate. Setting the rate or pulse variables would change from default. Perhaps limit this to a maximum rate to reduce lag (editable in a config file?). Min level and max level would set the "on" level and "off" level (default minLevel is 0, default maxLevel is 15)
  • Pulse (min level, max level, steps, rate): similar to Blink but increments/decrements emitted light level in steps of 1 (default) to get from minLevel to maxLevel or vice versa.
  • anything else?
The config file should allow server operators to:
  • Block light emission, completely,
  • Set minimum time between lighting updates,
  • Light level requires redstone lamp peripheral or is built in to turtle.
  • anything else?
I'd rather that this function be built in to the turtle but if dan200 prefers, this could be handled by a peripheral of a redstone lamp (since peripherals can be mounted, unmounted).

EDIT: "glowstone lamp" -> redstone lamp
Edited on 29 August 2015 - 03:46 PM
SquidDev #2
Posted 29 August 2015 - 05:35 PM
This isn't strictly relevant, but an alternative take on a similar problem. One of the things I'm currently adding for CCTweaks is a turtle wand. This functions similarly to EnderIO's travel anchors/staff of travelling - turtles are rendered through walls and scale upwards when looking at them. This originated from an older version (maybe 1.6?) where turtle's labels were always rendered - so you could display notifications through the text above the turtle. This means you can look at a turtle from anywhere and read it's label, seeing its current status.

I'm not sure a peripheral will work, IIRC you can only set block light from the block itself.
elektronemulo #3
Posted 29 August 2015 - 05:45 PM
Ooh, I like the turtle wand idea; I really, really love it. Nothing sucks like a lost turtle which has your only 3 diamonds.

The redstone lamp peripheral would cause the whole turtle to emit light (since a light source lights the whole block evenly).

I'm thinking that this would be a turtle-only peripheral since a redstone lamp emits a light level of either 0 or 15 (and the additional features would not be available when placed next to a computer). EDIT: Of course, that's only if it's implemented as a peripheral. I would rather this be built in and I think I'd rather it be restricted to Advanced Turtles (to give an additional incentive to used the advanced version of the turtle).
Edited on 29 August 2015 - 03:49 PM
Waitdev_ #4
Posted 25 October 2015 - 04:49 AM
that would be an awesome idea ;)/>
as a peripheral, it would work great.