mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Port current /tg/ lighting system
This commit is contained in:
@@ -138,13 +138,13 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/update_icons()
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
if(P)
|
||||
overlays += image('icons/obj/singularity.dmi', "ptank")
|
||||
add_overlay("ptank")
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
overlays += image('icons/obj/singularity.dmi', "on")
|
||||
add_overlay("on")
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/toggle_power()
|
||||
|
||||
@@ -38,19 +38,19 @@ field_generator power level display
|
||||
|
||||
|
||||
/obj/machinery/field_generator/update_icon()
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
if(!active)
|
||||
if(warming_up)
|
||||
overlays += "+a[warming_up]"
|
||||
add_overlay("+a[warming_up]")
|
||||
if(fields.len)
|
||||
overlays += "+on"
|
||||
add_overlay("+on")
|
||||
// Power level indicator
|
||||
// Scale % power to % num_power_levels and truncate value
|
||||
var/level = round(num_power_levels * power / field_generator_max_power)
|
||||
// Clamp between 0 and num_power_levels for out of range power values
|
||||
level = between(0, level, num_power_levels)
|
||||
if(level)
|
||||
overlays += "+p[level]"
|
||||
add_overlay("+p[level]")
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -465,15 +465,15 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
move_self = 0
|
||||
switch (current_size)
|
||||
if(STAGE_ONE)
|
||||
overlays += image('icons/obj/singularity.dmi',"chain_s1")
|
||||
add_overlay(image('icons/obj/singularity.dmi',"chain_s1"))
|
||||
if(STAGE_TWO)
|
||||
overlays += image('icons/effects/96x96.dmi',"chain_s3")
|
||||
add_overlay(image('icons/effects/96x96.dmi',"chain_s3"))
|
||||
if(STAGE_THREE)
|
||||
overlays += image('icons/effects/160x160.dmi',"chain_s5")
|
||||
add_overlay(image('icons/effects/160x160.dmi',"chain_s5"))
|
||||
if(STAGE_FOUR)
|
||||
overlays += image('icons/effects/224x224.dmi',"chain_s7")
|
||||
add_overlay(image('icons/effects/224x224.dmi',"chain_s7"))
|
||||
if(STAGE_FIVE)
|
||||
overlays += image('icons/effects/288x288.dmi',"chain_s9")
|
||||
add_overlay(image('icons/effects/288x288.dmi',"chain_s9"))
|
||||
|
||||
/obj/singularity/proc/on_release()
|
||||
chained = 0
|
||||
|
||||
Reference in New Issue
Block a user