Disco Science


Makes science labs light up with the colours of the science packs they are consuming.

Tweaks
3 years ago
0.17 - 1.1
167K

i [Implemented] Compatible with Biglab

4 years ago
(updated 4 years ago)

So I don't know if there is a way to do this for everyone, but compatibility with biglab is really, really cool.

I went ahead and edited the compatible labs file to just be 'big-lab' so it only affects the big one. Then I adjusted the animation file thusly:

animations.labStorm =
{
type = "animation",
name = "discoscience/lab-storm",
filename = "DiscoScience/graphics/lab-storm.png",
width = 98,
height = 87,
frame_count = 33,
line_length = 11,
scale = 6,
animation_speed = 1 / 3,
premul_alpha = false,
shift = util.by_pixel(0, 1.5),
hr_version =
{
filename = "DiscoScience/graphics/hr-lab-storm.png",
width = 194,
height = 174,
frame_count = 33,
line_length = 11,
animation_speed = 1 / 3,
premul_alpha = false,
shift = util.by_pixel(0, 1.5),
scale = 3
}
}

All that was changed was the addition of a scale to the first part and an adjustment of the scale in the second. This causes the disco effect to work perfectly with the big labs and it looks reeeeeaaaaaally fucking cool. I don't know if there's a way to adjust the scale for only big labs and allow everyone to have this, but it would totally be worth the work if you can.

4 years ago

Thank you! I really appreciate the animation data. I can probably adapt this so that it's compatible with other labs.

4 years ago

Done. I ended up doing it differently: draw_animation() lets you scale the an animation when you spawn it. This means I can reuse the same prototype for all labs. Enjoy! πŸ˜ƒ

New response