Skip to content

Commit

Permalink
Update light.dm
Browse files Browse the repository at this point in the history
Hmm today I will completely mess up making a commit from my phone
  • Loading branch information
BeagleGaming1 authored Oct 10, 2023
1 parent 4c7feae commit a5d2686
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions code/game/turfs/light.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#define LIGHT_FLOOR_COLOR_BLUE 0
#define LIGHT_FLOOR_COLOR_RED 1
#define LIGHT_FLOOR_COLOR_GREEN 2
#define LIGHT_FLOOR_COLOR_YELLOW 3
#define LIGHT_FLOOR_COLOR_PURPLE 4
#define LIGHT_FLOOR_COLOR_WHITE 5

/turf/open/floor/light
name = "light floor"
desc = "Beware of breakdancing on these tiles, glass shards embedded in the head is not a fun time."
icon_state = "light_on"
tile_type = /obj/item/stack/tile/light
var/on = TRUE
var/state = 0
var/state = LIGHT_FLOOR_COLOR_BLUE

/turf/open/floor/light/get_examine_text(mob/user)
. = ..()
Expand All @@ -17,22 +24,22 @@
. = ..()
if(on && !broken) //manages color, I feel like this switch is a sin.
switch(state)
if(0)
if(LIGHT_FLOOR_COLOR_BLUE)
icon_state = "light_on"
set_light(5)
if(1)
if(LIGHT_FLOOR_COLOR_RED)
icon_state = "light_on-r"
set_light(5)
if(2)
if(LIGHT_FLOOR_COLOR_GREEN)
icon_state = "light_on-g"
set_light(5)
if(3)
if(LIGHT_FLOOR_COLOR_YELLOW)
icon_state = "light_on-y"
set_light(5)
if(4)
if(LIGHT_FLOOR_COLOR_PURPLE)
icon_state = "light_on-p"
set_light(5)
if(5,-1)
if(LIGHT_FLOOR_COLOR_WHITE,-1) //change this later
icon_state = "light_on-w"
set_light(5)
state = -1
Expand Down Expand Up @@ -92,58 +99,65 @@

/turf/open/floor/light/red
icon_state = "light_on-r"
state = 1
state = LIGHT_FLOOR_COLOR_RED

/turf/open/floor/light/green
icon_state = "light_on-g"
state = 2
state = LIGHT_FLOOR_COLOR_GREEN

/turf/open/floor/light/yellow
icon_state = "light_on-y"
state = 3
state = LIGHT_FLOOR_COLOR_YELLOW

/turf/open/floor/light/purple
icon_state = "light_on-p"
state = 4
state = LIGHT_FLOOR_COLOR_PURPLE

/turf/open/floor/light/white
icon_state = "light_on-w"
state = 5
state = LIGHT_FLOOR_COLOR_WHITE

/turf/open/floor/light/off
icon_state = "light_off"
on = FALSE

/turf/open/floor/light/off/red
state = 1
state = LIGHT_FLOOR_COLOR_RED

/turf/open/floor/light/off/green
state = 2
state = LIGHT_FLOOR_COLOR_GREEN

/turf/open/floor/light/off/yellow
state = 3
state = LIGHT_FLOOR_COLOR_YELLOW

/turf/open/floor/light/off/purple
state = 4
state = LIGHT_FLOOR_COLOR_PURPLE

/turf/open/floor/light/off/white
state = 5
state = LIGHT_FLOOR_COLOR_WHITE

/turf/open/floor/light/broken
icon_state = "light_broken"
broken = TRUE

/turf/open/floor/light/broken/red
state = 1
state = LIGHT_FLOOR_COLOR_RED

/turf/open/floor/light/broken/green
state = 2
state = LIGHT_FLOOR_COLOR_GREEN

/turf/open/floor/light/broken/yellow
state = 3
state = LIGHT_FLOOR_COLOR_YELLOW

/turf/open/floor/light/broken/purple
state = 4
state = LIGHT_FLOOR_COLOR_PURPLE

/turf/open/floor/light/broken/white
state = 5
state = LIGHT_FLOOR_COLOR_WHITE

#undef LIGHT_FLOOR_COLOR_BLUE
#undef LIGHT_FLOOR_COLOR_RED
#undef LIGHT_FLOOR_COLOR_GREEN
#undef LIGHT_FLOOR_COLOR_YELLOW
#undef LIGHT_FLOOR_COLOR_PURPLE
#undef LIGHT_FLOOR_COLOR_WHITE

0 comments on commit a5d2686

Please sign in to comment.