2022-05-16 23:48:22 +00:00
############################################
### Programmable Xmas Lights ###
### - Because why the fock not Edition - ###
############################################
default xmas_lights_hue1 = 0
default xmas_lights_hue2 = 0
default xmas_lights_brightness = 0.0
default xmas_lights_alpha = 1.0
label xmas_lights_settings:
menu:
2022-05-20 18:48:05 +00:00
"-Set Animation-":
2022-05-16 23:48:22 +00:00
label .animation:
menu:
2022-05-20 18:48:05 +00:00
"-Static-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_ITEM.room_image = Transform("xmas_lights_static", zoom=xmas_lights_ITEM.room_scale)
$ xmas_lights_ITEM.room_image_hover = xmas_lights_ITEM.room_image
2022-05-20 18:48:05 +00:00
"-Alternate-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_ITEM.room_image = Transform("xmas_lights_alternate", zoom=xmas_lights_ITEM.room_scale)
$ xmas_lights_ITEM.room_image_hover = xmas_lights_ITEM.room_image
2022-05-20 18:48:05 +00:00
"-Cycle-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_ITEM.room_image = Transform("xmas_lights_cycle", zoom=xmas_lights_ITEM.room_scale)
$ xmas_lights_ITEM.room_image_hover = xmas_lights_ITEM.room_image
2022-05-20 18:48:05 +00:00
"-Pulse-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_ITEM.room_image = Transform("xmas_lights_pulse", zoom=xmas_lights_ITEM.room_scale)
$ xmas_lights_ITEM.room_image_hover = xmas_lights_ITEM.room_image
2022-05-20 18:48:05 +00:00
"-Back-":
2022-05-16 23:48:22 +00:00
jump xmas_lights_settings
jump .animation
2022-05-20 18:48:05 +00:00
"-Set Hue-":
2022-05-16 23:48:22 +00:00
label .hue:
menu:
2022-05-20 18:48:05 +00:00
"-Default-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_hue1 = 0
$ xmas_lights_hue2 = 0
2022-05-20 18:48:05 +00:00
"-Blue and Red-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_hue1 = 160
$ xmas_lights_hue2 = 280
2022-05-20 18:48:05 +00:00
"-Orange and Blue-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_hue1 = 330
$ xmas_lights_hue2 = 160
2022-05-20 18:48:05 +00:00
"-Red and Green-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_hue1 = 280
$ xmas_lights_hue2 = 20
2022-05-20 18:48:05 +00:00
"-Custom-":
2022-05-16 23:48:22 +00:00
$ input_val1 = renpy.input("(Enter first hue rotation value between 0 - 360)", xmas_lights_hue1, "1234567890", length=3)
$ xmas_lights_hue1 = clamp(int(input_val1), 0, 360)
$ input_val2 = renpy.input("(Enter second hue rotation value between 0 - 360)", xmas_lights_hue2, "1234567890", length=3)
$ xmas_lights_hue2 = clamp(int(input_val2), 0, 360)
2022-05-20 18:48:05 +00:00
"-Back-":
2022-05-16 23:48:22 +00:00
jump xmas_lights_settings
jump .hue
2022-05-20 18:48:05 +00:00
"-Set Brightness-":
2022-05-16 23:48:22 +00:00
label .brightness:
menu:
2022-05-20 18:48:05 +00:00
"-100%%-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_brightness = 0.0
$ xmas_lights_alpha = 1.0
2022-05-20 18:48:05 +00:00
"-80%%-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_brightness = -0.1
$ xmas_lights_alpha = 0.8
2022-05-20 18:48:05 +00:00
"-60%%-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_brightness = -0.2
$ xmas_lights_alpha = 0.6
2022-05-20 18:48:05 +00:00
"-40%%-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_brightness = -0.3
$ xmas_lights_alpha = 0.4
2022-05-20 18:48:05 +00:00
"-30%%-":
2022-05-16 23:48:22 +00:00
$ xmas_lights_brightness = -0.4
$ xmas_lights_alpha = 0.2
2022-05-20 18:48:05 +00:00
"-Back-":
2022-05-16 23:48:22 +00:00
jump xmas_lights_settings
jump .brightness
2022-05-20 18:48:05 +00:00
"-Exit-":
2022-05-16 23:48:22 +00:00
jump main_room_menu
init python:
def xmas_lights_set1_bulbs(st, at):
2023-03-28 19:11:35 +00:00
d = Transform("images/rooms/main_room/decorations/xmas_lights/bulbset_1.webp", matrixcolor=HueMatrix(xmas_lights_hue1)*BrightnessMatrix(xmas_lights_brightness))
2022-05-16 23:48:22 +00:00
return d, 1.0
def xmas_lights_set2_bulbs(st, at):
2023-03-28 19:11:35 +00:00
d = Transform("images/rooms/main_room/decorations/xmas_lights/bulbset_2.webp", matrixcolor=HueMatrix(xmas_lights_hue2)*BrightnessMatrix(xmas_lights_brightness))
2022-05-16 23:48:22 +00:00
return d, 1.0
def xmas_lights_set1_glow(st, at):
2023-03-28 19:11:35 +00:00
d = Transform("images/rooms/main_room/decorations/xmas_lights/glowset_1.webp", alpha=xmas_lights_alpha, matrixcolor=HueMatrix(xmas_lights_hue1)*BrightnessMatrix(xmas_lights_brightness))
2022-05-16 23:48:22 +00:00
return d, 1.0
def xmas_lights_set2_glow(st, at):
2023-03-28 19:11:35 +00:00
d = Transform("images/rooms/main_room/decorations/xmas_lights/glowset_2.webp", alpha=xmas_lights_alpha, matrixcolor=HueMatrix(xmas_lights_hue2)*BrightnessMatrix(xmas_lights_brightness))
2022-05-16 23:48:22 +00:00
return d, 1.0
image xmas_lights_set1_bulbs = DynamicDisplayable(xmas_lights_set1_bulbs)
image xmas_lights_set2_bulbs = DynamicDisplayable(xmas_lights_set2_bulbs)
image xmas_lights_set1_glow = DynamicDisplayable(xmas_lights_set1_glow)
image xmas_lights_set2_glow = DynamicDisplayable(xmas_lights_set2_glow)