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

How to modify modem to emit light?

Started by spdkils, 28 October 2013 - 03:55 PM
spdkils #1
Posted 28 October 2013 - 04:55 PM
Title: How to modify modem to emit light?

So turtles are great, and you can have them place torches, do all sorts of fun things, and watch them dig/move/dance for hours of fun. However, it sure is hard to see the turtle when it's digging out the roof. It's hard that there is no visual indicator with 20 mining turtles, and one of them needs attention for fule, or its full, or it's out of floor blocks.

Sure I can send messages, and I have a very rudementry turtle command OS that I've written. Sure I can have them spin infinitly until they get the attention they despratly need.

But what I REALLY want, is flashing lights out of the modem! I know you can't stick a 3rd item onto a turtle, so it seems the simplist method to get light out of these bad boys is to modify the default modem, and just add a method to emit light. (It turns up the RED already, now just let it emit light, based on a setting.)

I have NO clue how to modify it, I can get eclipse, maybe mod the source, maybe add in some methods for java, maybe… But I'm quite a novice and modding minecraft, never done it. Program heavy Java? Never done it. Write scripts to my hearts content… sure.

Is this the right path at all? Is it simple to modify the modem to add a few more methods. (modem.getLight, modem.setLight) and have it light up the turtle?
CCJJSax #2
Posted 28 October 2013 - 06:27 PM
I don't think you can shut off a modem. My best suggestion is to put a redstone lamp underneath it (or whatever side really) and then rs.setOutput(side, true)
TheOddByte #3
Posted 28 October 2013 - 06:35 PM
Well, There isn't anything like letting the modem emit light, You could post a suggestion here about letting the modems emit a small light resource and see if it will be added in any future updates of ComputerCraft.
spdkils #4
Posted 28 October 2013 - 07:29 PM
I realize I could set a stone under it, place a torch, use a glowstone, and various other methods.

The idea is to modify the wireless modem as a periphrial and add in methods to toggle the light emissions of the turtle block itself. The turtle block has a lighting property of some kind, so I figure using forge, computer craft, and maybe pulling out some data, you could wrap the modem to control the metadata of the block or 'something' to toggle the light emissions of the turtle block.

So this really isn't a LUA question, I could do any of the above, I can't mod the modem. Mostly because I have no clue where to start. Or if it is possible.
Lyqyd #5
Posted 28 October 2013 - 07:47 PM
Even if you did, you couldn't distribute your modified version. We're not going to help you do it. Just give it a redstone lamp to use.
spdkils #6
Posted 28 October 2013 - 08:03 PM
???? What about just creating a new modem, with the new methods, and then you have a new periphrial that just inherits everything of the old modem + a "light switch". Then I could distribute it as a periphrial, and it wouldn't really be a mod, but a new peripherial that acts identically to a modem, with 1 added feature?

Why couldn't you help with that, and why couldn't I distribute a periphrial that did that?
campicus #7
Posted 28 October 2013 - 08:24 PM
a new periphrial that just inherits everything of the old modem + a "light switch"

You're just ripping off the original modem. Make a suggestion like Hellkid said.
spdkils #8
Posted 28 October 2013 - 08:34 PM
Well, you can only attach one thing to the turtle that is mobile… a modem. So it makes sense if you want a wireless turtle, that can have "head lights" you would attach a modem, that adds lights. I'm failing to see the issue, and I don't see it as 'ripping off' code, it's just adding functionality to the mod. /shrug
spdkils #9
Posted 28 October 2013 - 09:21 PM
I suppose it could just be a 'normal' turtle mod, just add a redstone lamp to a turtle, to add headlights. Then just add it to a turtle. So then it would just be a new turtle, that you could slap a normal modem on. It just made sense to have it external because the visibility of the red side of the modem gave it a visual queue that it emmited light. I've been reading the forum for about an hour trying ot get a clue, but I'm still clueless. :D/>