/* * /obj/machinery/computer/hologram_comp - Hologram computer * * /obj/machinery/holograp_proj - Hologram projector * * /obj/projection - Hologram projection * * Used to display a mob with variable skin colour, hair, etc. */ /* * The hologram computer */ obj/machinery/computer/hologram_comp name = "Hologram Computer" icon = 'stationobjs.dmi' icon_state = "holo_console0" var obj/machinery/hologram_proj/projector = null // the projector object associated with this computer temp = null // temporary text for interaction window (not used) lumens = 0.0 // brightness of the hologram skin image h_r = 245.0 // h_g = 245.0 // RGB settings for the hologram hair h_b = 245.0 // // Create a new computer // After world has finished loading, located the hologram projector to the north New() ..() spawn( 10 ) src.projector = locate(/obj/machinery/hologram_proj, get_step(src.loc, NORTH)) // Interact when double clicked // Possibly using this instead of usual attack_hand() because its designed to be used before game starts // However this doesn't seem to be necessary in the current code DblClick() if (get_dist(src, usr) > 1) return 0 src.show_console(usr) // Render a human male with the current settings // Set the projector to use the resulting icon proc/render() var/icon/I = new /icon( 'human.dmi', "male" ) if (src.lumens >= 0) I.Blend(rgb(src.lumens, src.lumens, src.lumens), 0) else I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), 1) I.Blend(new /icon( 'human.dmi', "mouth" ), 3) var/icon/U = new /icon( 'human.dmi', "diaper" ) U.Blend(U, 3) U = new /icon( 'mob.dmi', "hair_a" ) U.Blend(rgb(src.h_r, src.h_g, src.h_b), 0) I.Blend(U, 3) src.projector.projection.icon = I // Show interaction window proc/show_console(var/mob/user) var/dat user.machine = src if (src.temp) dat = "[temp]

Clear" else dat = {"Hologram Status:
Power: [(src.projector.projection ? "On" : "Off")]
Hologram Control:
Color Luminosity: [-src.lumens + 35]/220 \[Reset\]
Lighten: 1 10
Darken: 1 10

Hair Color: ([h_r],[h_g],[h_b]) \[Reset\]
Red (0-255): \[0\] -10 -1 [h_r] 1 10 \[255\]
Green (0-255): \[0\] -10 -1 [h_g] 1 10 \[255\]
Blue (0-255): \[0\] -10 -1 [h_b] 1 10 \[255\]
"} user.client_mob() << browse(dat, "window=hologram_console") // Handle topic links from window Topic(href, href_list) ..() if (get_dist(src, usr) <= 1) flick("holo_console1", src) if (href_list["power"]) if (src.projector.projection) // remove the current projection src.projector.icon_state = "hologram0" del(src.projector.projection) else // create a new projection src.projector.projection = new /obj/projection( src.projector.loc ) src.projector.projection.icon = 'human.dmi' src.projector.projection.icon_state = "male" src.projector.icon_state = "hologram1" src.render() else if (href_list["h_r"]) if (src.projector.projection) src.h_r += text2num(href_list["h_r"]) src.h_r = min(max(src.h_r, 0), 255) render() else if (href_list["h_g"]) if (src.projector.projection) src.h_g += text2num(href_list["h_g"]) src.h_g = min(max(src.h_g, 0), 255) render() else if (href_list["h_b"]) if (src.projector.projection) src.h_b += text2num(href_list["h_b"]) src.h_b = min(max(src.h_b, 0), 255) render() else if (href_list["light"]) if (src.projector.projection) src.lumens += text2num(href_list["light"]) src.lumens = min(max(src.lumens, -185.0), 35) render() else if (href_list["reset"]) if (src.projector.projection) src.lumens = 0 render() else if (href_list["temp"]) src.temp = null for(var/mob/M in viewers(1, src)) if ((M.client && M.machine == src)) src.show_console(M) /* * The hologram projector */ obj/machinery/hologram_proj name = "Hologram Projector" icon = 'stationobjs.dmi' icon_state = "hologram0" anchored = 1 var obj/projection/projection = null // the projection object /* * The projected hologram */ /obj/projection name = "Projection" anchored = 1.0