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

[CC 1.75] HxCPeripherals: RGB Lights!

Started by wiggle1000, 22 March 2017 - 02:13 AM
wiggle1000 #1
Posted 22 March 2017 - 03:13 AM
Preface and Information


Hello, forums! This post is about my (under the HxCKDMS group) latest mod, HxCPeripherals!

As I'm sure you can assume, this mod adds peripherals.

Currently, this mod is only for CC 1.75 (MC 1.7.10).

So far, there is one peripheral.


Please, Request a Peripheral!


If you submit a peripheral idea and it's added, your name will be credited in

the following list alongside the peripheral of your idea.

I recommend placing suggestions in our GitHub Issues with [Suggestion] in the name.

Leaving a comment would be fine too, but not recommended because I won't check as often.
  • kyahne (KeldonSlayer) - Smart Light
Peripheral Details


Now that you know the names of the peripherals, (from the list above)

let's talk function! After all, it's the most important part of a peripheral.

Just click the appropriate spoiler for the information on each peripheral:

Smart Light

FUNCTIONS:


.set(<R as number 0-255>, <G as number 0-255>, <B as number 0-255>, <brightness* as number 0-255>)

*Brightness is rounded to a Minecraft light level


No Pics No Clicks? NO PROBLEM!


warning: large GIFs

1 Light



3 Lights Over Cable




DOWNLOAD!


Ready to try out the mod? You can get it here on curseforge!

Edited on 24 March 2017 - 11:38 PM
AlexDevs #2
Posted 23 March 2017 - 09:20 PM
Looks nice. But I would suggest using 0-255 instead of 0-1.0
wiggle1000 #3
Posted 23 March 2017 - 09:50 PM
Looks nice. But I would suggest using 0-255 instead of 0-1.0

I did consider that, but then thought it would be easier for the end user to use 0-1. My main reason for believing this was that in most systems (where you would input data from other sources) the data comes in at a scale of 0-1, so by using the same scale, the user wouldn't need to multiply by 255. However, if you find yourself in a situation when you'll need to use such a value, you could always just divide by 255… I may split it into 2 functions: setB and setF (set as byte and set float).
Lupus590 #4
Posted 24 March 2017 - 11:39 AM
the advantage off 0-255 is programmers can increment through the light colours and quickly know how many settings the light can support.

scaling your value to fit within the peripheral is something everyone will likely have to do in any situation
KingofGamesYami #5
Posted 24 March 2017 - 11:47 AM
I'll second 0-255 as an option.
wiggle1000 #6
Posted 24 March 2017 - 12:17 PM
the advantage off 0-255 is programmers can increment through the light colours and quickly know how many settings the light can support.

scaling your value to fit within the peripheral is something everyone will likely have to do in any situation
I'll second 0-255 as an option.

All right, sorry. Looks like I was the minority! I'll push an update soon! ^_^/>
wiggle1000 #7
Posted 25 March 2017 - 12:28 AM
All-right, so I updated the scaling of the values as promised. I just decided to overwrite the existing set function, as it would be a little silly to split it into 2 (as I'd previously posted). In a few minutes the build should be on curse, and I'll update the OP shortly after. PLEASE REMEMBER TO POST SUGGESTIONS! I'M WAITING FOR SOME TO COME IN!

Edit: Post updated with new information, curse should approve the new version (v1.0.1) shortly.
Edited on 24 March 2017 - 11:37 PM
ZagKalidor #8
Posted 08 April 2017 - 04:47 PM
what about different blocks with different looks? Maybe with a frame at the outsides (maybe also with adjustable colour)? Just to give more fancy looks. Maybe different forms?

I like it, nice work…
Zag
wiggle1000 #9
Posted 16 April 2017 - 05:26 AM
what about different blocks with different looks? Maybe with a frame at the outsides (maybe also with adjustable colour)? Just to give more fancy looks. Maybe different forms?

I like it, nice work…
Zag

That sounds like a wonderful idea! I'll start work on it now. Also, as a reminder to all: posting on the github issues page with suggestions will get them replied to quicker! :P/>
DevelopedLogic #10
Posted 29 May 2017 - 05:12 PM
Do you think it'd be possible to create a block with multiple lights on it? This could be great for RGB displays. Another suggestion is another light in a modem form factor which attaches to turtles and computers.