diff --git a/code/_onclick/hud/_defines_vr.dm b/code/_onclick/hud/_defines_vr.dm index 2b4f4fb85e..b419c6bd7f 100644 --- a/code/_onclick/hud/_defines_vr.dm +++ b/code/_onclick/hud/_defines_vr.dm @@ -1,3 +1,2 @@ -#define ui_shadekin_dark_display "EAST-1:28,CENTER-3:15" -#define ui_shadekin_energy_display "EAST-1:28,CENTER-4:15" +#define ui_shadekin_display "EAST-1:28,CENTER-3:15" #define ui_xenochimera_danger_display "EAST-1:28,CENTER-3:15" \ No newline at end of file diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 4c605d4b03..071fc9af06 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -14,7 +14,7 @@ var/other = list() var/hotkeybuttons = list() var/slot_info = list() - + HUD.adding = adding HUD.other = other HUD.hotkeybuttons = hotkeybuttons //These can be disabled for hotkey users @@ -258,15 +258,10 @@ hud_elements |= healths //VOREStation Addition begin - shadekin_dark_display = new /obj/screen/shadekin/darkness() - shadekin_dark_display.screen_loc = ui_shadekin_dark_display - shadekin_dark_display.icon_state = "dark" - hud_elements |= shadekin_dark_display - - shadekin_energy_display = new /obj/screen/shadekin/energy() - shadekin_energy_display.screen_loc = ui_shadekin_energy_display - shadekin_energy_display.icon_state = "energy0" - hud_elements |= shadekin_energy_display + shadekin_display = new /obj/screen/shadekin() + shadekin_display.screen_loc = ui_shadekin_display + shadekin_display.icon_state = "shadekin" + hud_elements |= shadekin_display xenochimera_danger_display = new /obj/screen/xenochimera/danger_level() xenochimera_danger_display.screen_loc = ui_xenochimera_danger_display diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm index 247ac126b9..f87970b59c 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm @@ -223,34 +223,37 @@ /datum/species/shadekin/proc/update_shadekin_hud(var/mob/living/carbon/human/H) var/turf/T = get_turf(H) - if(!T) - return - if(H.shadekin_energy_display) - H.shadekin_energy_display.invisibility = 0 + if(H.shadekin_display) + var/l_icon = 0 + var/e_icon = 0 + + H.shadekin_display.invisibility = 0 + if(T) + var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0 + var/darkness = 1-brightness //Invert + switch(darkness) + if(0.80 to 1.00) + l_icon = 0 + if(0.60 to 0.80) + l_icon = 1 + if(0.40 to 0.60) + l_icon = 2 + if(0.20 to 0.40) + l_icon = 3 + if(0.00 to 0.20) + l_icon = 4 + switch(get_energy(H)) + if(0 to 24) + e_icon = 0 + if(25 to 49) + e_icon = 1 + if(50 to 74) + e_icon = 2 + if(75 to 99) + e_icon = 3 if(100 to INFINITY) - H.shadekin_energy_display.icon_state = "energy0" - if(75 to 100) - H.shadekin_energy_display.icon_state = "energy1" - if(50 to 75) - H.shadekin_energy_display.icon_state = "energy2" - if(25 to 50) - H.shadekin_energy_display.icon_state = "energy3" - if(0 to 25) - H.shadekin_energy_display.icon_state = "energy4" - if(H.shadekin_dark_display) - H.shadekin_dark_display.invisibility = 0 - var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0 - var/darkness = 1-brightness //Invert - switch(darkness) - if(0.80 to 1.00) - H.shadekin_dark_display.icon_state = "dark2" - if(0.60 to 0.80) - H.shadekin_dark_display.icon_state = "dark1" - if(0.40 to 0.60) - H.shadekin_dark_display.icon_state = "dark" - if(0.20 to 0.40) - H.shadekin_dark_display.icon_state = "dark-1" - if(0.00 to 0.20) - H.shadekin_dark_display.icon_state = "dark-2" + e_icon = 4 + + H.shadekin_display.icon_state = "shadekin-[l_icon]-[e_icon]" return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm index 5017cff724..23c23b0df8 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm @@ -1,17 +1,8 @@ /obj/screen/shadekin + name = "shadekin status" icon = 'icons/mob/shadekin_hud.dmi' invisibility = 101 -/obj/screen/shadekin/darkness - name = "darkness" - icon_state = "dark" - alpha = 150 - -/obj/screen/shadekin/energy - name = "energy" - icon_state = "energy0" - alpha = 150 - diff --git a/code/modules/mob/mob_defines_vr.dm b/code/modules/mob/mob_defines_vr.dm index 1c6e19ac78..41c27a41d0 100644 --- a/code/modules/mob/mob_defines_vr.dm +++ b/code/modules/mob/mob_defines_vr.dm @@ -5,8 +5,7 @@ var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping - var/obj/screen/shadekin/darkness/shadekin_dark_display = null - var/obj/screen/shadekin/energy/shadekin_energy_display = null + var/obj/screen/shadekin/shadekin_display = null var/obj/screen/xenochimera/danger_level/xenochimera_danger_display = null /mob/drop_location() diff --git a/icons/mob/shadekin_hud.dmi b/icons/mob/shadekin_hud.dmi index 707feea2a9..a1340290e1 100644 Binary files a/icons/mob/shadekin_hud.dmi and b/icons/mob/shadekin_hud.dmi differ