mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #7686 from ShadowLarkens/mcomputer_overlay
Allow separate overlays file for modular computers
This commit is contained in:
@@ -42,6 +42,8 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/item/modular_computer/Initialize()
|
/obj/item/modular_computer/Initialize()
|
||||||
|
if(!overlay_icon)
|
||||||
|
overlay_icon = icon
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
install_default_hardware()
|
install_default_hardware()
|
||||||
if(hard_drive)
|
if(hard_drive)
|
||||||
@@ -72,20 +74,20 @@
|
|||||||
|
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
if(bsod)
|
if(bsod)
|
||||||
overlays.Add("bsod")
|
overlays += image(icon = overlay_icon, icon_state = "bsod")
|
||||||
return
|
return
|
||||||
if(!enabled)
|
if(!enabled)
|
||||||
if(icon_state_screensaver)
|
if(icon_state_screensaver)
|
||||||
overlays.Add(icon_state_screensaver)
|
overlays += image(icon = overlay_icon, icon_state = icon_state_screensaver)
|
||||||
set_light(0)
|
set_light(0)
|
||||||
return
|
return
|
||||||
set_light(light_strength)
|
set_light(light_strength)
|
||||||
if(active_program)
|
if(active_program)
|
||||||
overlays.Add(active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu)
|
overlays += image(icon = overlay_icon, icon_state = active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu)
|
||||||
if(active_program.program_key_state)
|
if(active_program.program_key_state)
|
||||||
overlays.Add(active_program.program_key_state)
|
overlays += image(icon = overlay_icon, icon_state = active_program.program_key_state)
|
||||||
else
|
else
|
||||||
overlays.Add(icon_state_menu)
|
overlays += image(icon = overlay_icon, icon_state = icon_state_menu)
|
||||||
|
|
||||||
/obj/item/modular_computer/proc/turn_on(var/mob/user)
|
/obj/item/modular_computer/proc/turn_on(var/mob/user)
|
||||||
if(bsod)
|
if(bsod)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
// If you create a program which is limited to Laptops and Consoles you don't have to add it's icon_state overlay for Tablets too, for example.
|
// If you create a program which is limited to Laptops and Consoles you don't have to add it's icon_state overlay for Tablets too, for example.
|
||||||
|
|
||||||
icon = null // This thing isn't meant to be used on it's own. Subtypes should supply their own icon.
|
icon = null // This thing isn't meant to be used on it's own. Subtypes should supply their own icon.
|
||||||
|
var/overlay_icon = null // Icon file used for overlays
|
||||||
icon_state = null
|
icon_state = null
|
||||||
center_of_mass = null // No pixelshifting by placing on tables, etc.
|
center_of_mass = null // No pixelshifting by placing on tables, etc.
|
||||||
randpixel = 0 // And no random pixelshifting on-creation either.
|
randpixel = 0 // And no random pixelshifting on-creation either.
|
||||||
|
|||||||
Reference in New Issue
Block a user