Files
Bubberstation/code/_onclick/hud/fullscreen.dm
MrPerson 5047dd7145 Plane master handling + new chemical Rotatium (#20707)
* Plane master handling + new chemical Rotatium

A whole system to create, store, and access screen master objects from the hud. In case anybody actually wants to do anything relevant with them. Which will probably be me but whatever.

Moves things out to some planes that make sense.
click catcher -99
game 0
lighting 15
fullscreen 18
HUD 19
above HUD 20

Rotatium is more of a demonstration than something I really really love, but it is kinda neat so here you go. It rocks the game plane and lighting planes back and forth and also does light toxin damage. The longer it effects you, the stronger the rocking gets.

No pictures right now, I'll get some later. Sorry.

* Pay no attention to the commit behind the curtain

* Updates travis to 1346, the stable version for 510 for linux
2016-10-18 11:41:23 +02:00

128 lines
3.0 KiB
Plaintext

/mob
var/list/screens = list()
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen
if(screens[category])
screen = screens[category]
if(screen.type != type)
clear_fullscreen(category, FALSE)
return .()
else if(!severity || severity == screen.severity)
return null
else
screen = PoolOrNew(type)
screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
screens[category] = screen
if(client && stat != DEAD)
client.screen += screen
return screen
/mob/proc/clear_fullscreen(category, animated = 10)
var/obj/screen/fullscreen/screen = screens[category]
if(!screen)
return
screens -= category
if(animated)
spawn(0)
animate(screen, alpha = 0, time = animated)
sleep(animated)
if(client)
client.screen -= screen
qdel(screen)
else
if(client)
client.screen -= screen
qdel(screen)
/mob/proc/clear_fullscreens()
for(var/category in screens)
clear_fullscreen(category)
/mob/proc/hide_fullscreens()
if(client)
for(var/category in screens)
client.screen -= screens[category]
/mob/proc/reload_fullscreen()
if(client && stat != DEAD) //dead mob do not see any of the fullscreen overlays that he has.
for(var/category in screens)
client.screen |= screens[category]
/obj/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
plane = FULLSCREEN_PLANE
mouse_opacity = 0
var/severity = 0
/obj/screen/fullscreen/Destroy()
..()
severity = 0
return QDEL_HINT_PUTINPOOL
/obj/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit
icon_state = "passage"
layer = CRIT_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/blind
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/impaired
icon_state = "impairedoverlay"
/obj/screen/fullscreen/blurry
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "blurry"
/obj/screen/fullscreen/flash
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
/obj/screen/fullscreen/flash/noise
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/obj/screen/fullscreen/high
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
/obj/screen/fullscreen/color_vision
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
alpha = 80
/obj/screen/fullscreen/color_vision/green
color = "#00ff00"
/obj/screen/fullscreen/color_vision/red
color = "#ff0000"
/obj/screen/fullscreen/color_vision/blue
color = "#0000ff"