diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm index 1be71d3b8a8..210d381f45e 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm @@ -132,7 +132,7 @@ /area/ruin/powered/beach) "ax" = ( /obj/machinery/disco/immobile, -/turf/simulated/floor/light/colour_cycle, +/turf/simulated/floor/light, /area/ruin/powered/beach) "ay" = ( /obj/machinery/door/airlock/sandstone{ diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 007be9d3535..4eb77144528 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -106,8 +106,8 @@ name = "light tiles" gender = PLURAL singular_name = "light floor tile" - desc = "A floor tile, made out off glass. Use a multitool on it to change its color." - icon_state = "tile_light blue" + desc = "A floor tile made of glass, with an integrated light. Use a multitool on it to change its color." + icon_state = "tile_white" force = 3 throwforce = 5 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 3ba2e638099..c9fbd4df113 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -1,12 +1,9 @@ //This is so damaged or burnt tiles or platings don't get remembered as the default tile GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","damaged3","damaged4", "damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", - "platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2", - "warnplate", "warnplatecorner","metalfoam", "ironfoam", - "light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken", - "light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4", - "asteroid","asteroid_dug", - "asteroid0","asteroid1","asteroid2","asteroid3","asteroid4", + "platingdmg3","plating","light_on","warnplate", "warnplatecorner","metalfoam", "ironfoam", + "light_off","wall_thermite","grass1","grass2","grass3","grass4", + "asteroid","asteroid_dug","asteroid0","asteroid1","asteroid2","asteroid3","asteroid4", "asteroid5","asteroid6","asteroid7","asteroid8","asteroid9","asteroid10","asteroid11","asteroid12", "oldburning","light-on-r","light-on-y","light-on-g","light-on-b", "wood", "wood-broken", "carpet", "carpetcorner", "carpetside", "carpet", "ironsand1", "ironsand2", "ironsand3", "ironsand4", "ironsand5", diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 0d27e02537f..6264fb366ab 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -1,23 +1,14 @@ -#define LIGHTFLOOR_ON 1 -#define LIGHTFLOOR_WHITE 2 -#define LIGHTFLOOR_RED 3 -#define LIGHTFLOOR_GREEN 4 -#define LIGHTFLOOR_YELLOW 5 -#define LIGHTFLOOR_BLUE 6 -#define LIGHTFLOOR_PURPLE 7 - -#define LIGHTFLOOR_GENERICCYCLE 8 -#define LIGHTFLOOR_CYCLEA 9 -#define LIGHTFLOOR_CYCLEB 10 - /turf/simulated/floor/light name = "\improper light floor" light_range = 5 icon_state = "light_on" floor_tile = /obj/item/stack/tile/light - broken_states = list("light_broken") + broken_states = list("light_off") + /// Are we on var/on = TRUE - var/state = LIGHTFLOOR_ON + /// Are we broken + var/light_broken = FALSE + /// Can we modify a colour var/can_modify_colour = TRUE /turf/simulated/floor/light/Initialize(mapload) @@ -27,43 +18,11 @@ /turf/simulated/floor/light/update_icon() ..() if(on) - switch(state) - if(LIGHTFLOOR_ON) - icon_state = "light_on" - set_light(5, null,LIGHT_COLOR_LIGHTBLUE) - if(LIGHTFLOOR_WHITE) - icon_state = "light_on-w" - set_light(5, null,LIGHT_COLOR_WHITE) - if(LIGHTFLOOR_RED) - icon_state = "light_on-r" - set_light(5, null,LIGHT_COLOR_RED) - if(LIGHTFLOOR_GREEN) - icon_state = "light_on-g" - set_light(5, null,LIGHT_COLOR_PURE_GREEN) - if(LIGHTFLOOR_YELLOW) - icon_state = "light_on-y" - set_light(5, null,"#FFFF00") - if(LIGHTFLOOR_BLUE) - icon_state = "light_on-b" - set_light(5, null,LIGHT_COLOR_DARKBLUE) - if(LIGHTFLOOR_PURPLE) - icon_state = "light_on-p" - set_light(5, null,LIGHT_COLOR_PURPLE) - if(LIGHTFLOOR_GENERICCYCLE) - icon_state = "light_on-cycle_all" - set_light(5, null,LIGHT_COLOR_WHITE) - if(LIGHTFLOOR_CYCLEA) - icon_state = "light_on-dancefloor_A" - set_light(5,null,LIGHT_COLOR_RED) - if(LIGHTFLOOR_CYCLEB) - icon_state = "light_on-dancefloor_B" - set_light(5, null,LIGHT_COLOR_DARKBLUE) - else - icon_state = "light_off" - set_light(0) + icon_state = "light_on" + set_light(5, null, color) else - set_light(0) icon_state = "light_off" + set_light(0) /turf/simulated/floor/light/BeforeChange() set_light(0) @@ -76,9 +35,9 @@ /turf/simulated/floor/light/attackby(obj/item/C, mob/user, params) if(istype(C, /obj/item/light/bulb)) //only for light tiles - if(!state) + if(!light_broken) qdel(C) - state = LIGHTFLOOR_ON + light_broken = FALSE update_icon() to_chat(user, "You replace the light bulb.") else @@ -92,11 +51,21 @@ return if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - if(state != 0) - if(state < LIGHTFLOOR_PURPLE) - state++ - else - state = LIGHTFLOOR_ON + if(!light_broken) + var/new_color = input(user, "Select a bulb color", "Select a bulb color", color) as color|null + if(!new_color) + return + + // Cancel if they walked away + if(!Adjacent(user, src)) + return + + // Now lets make sure it cant go fully black. Yes I know this is more dense than my skull. + var/list/hsl = rgb2hsl(hex2num(copytext(new_color, 2, 4)), hex2num(copytext(new_color, 4, 6)), hex2num(copytext(new_color, 6, 8))) + hsl[3] = max(hsl[3], 0.4) + var/list/rgb = hsl2rgb(arglist(hsl)) + color = "#[num2hex(rgb[1], 2)][num2hex(rgb[2], 2)][num2hex(rgb[3], 2)]" + to_chat(user, "You change [src]'s light bulb color.") update_icon() else @@ -111,33 +80,3 @@ /turf/simulated/floor/light/extinguish_light() toggle_light(FALSE) visible_message("[src] flickers and falls dark.") - -//Cycles through all of the colours -/turf/simulated/floor/light/colour_cycle - state = LIGHTFLOOR_GENERICCYCLE - can_modify_colour = FALSE - -//Two different "dancefloor" types so that you can have a checkered pattern -// (also has a longer delay than colour_cycle between cycling colours) -/turf/simulated/floor/light/colour_cycle/dancefloor_a - name = "dancefloor" - desc = "Funky floor." - state = LIGHTFLOOR_CYCLEA - -/turf/simulated/floor/light/colour_cycle/dancefloor_b - name = "dancefloor" - desc = "Funky floor." - state = LIGHTFLOOR_CYCLEB - - -#undef LIGHTFLOOR_ON -#undef LIGHTFLOOR_WHITE -#undef LIGHTFLOOR_RED -#undef LIGHTFLOOR_GREEN -#undef LIGHTFLOOR_YELLOW -#undef LIGHTFLOOR_BLUE -#undef LIGHTFLOOR_PURPLE - -#undef LIGHTFLOOR_GENERICCYCLE -#undef LIGHTFLOOR_CYCLEA -#undef LIGHTFLOOR_CYCLEB diff --git a/icons/obj/tiles.dmi b/icons/obj/tiles.dmi index 2ee30c21399..027f074a790 100644 Binary files a/icons/obj/tiles.dmi and b/icons/obj/tiles.dmi differ diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi index 223f5ccddd0..7e087e01b7b 100644 Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ