Computers are now overlay based.

Computers now use an overlay based system, instead of demanding a full set of icons (on, off, broken) for every different computer.
Partially ports ParadiseSS13/Paradise#1468 which is a port of tgstation/-tg-station#9931.
This commit is contained in:
PsiOmegaDelta
2015-07-07 17:23:49 +02:00
committed by PsiOmega
parent 13eddc7b42
commit 87d4cf4f68
42 changed files with 202 additions and 341 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
/obj/machinery/computer/HolodeckControl
name = "holodeck control console"
desc = "A computer used to control a nearby holodeck."
icon_state = "holocontrol"
icon_keyboard = "tech_key"
icon_screen = "holocontrol"
use_power = 1
active_power_usage = 8000 //8kW for the scenery + 500W per holoitem
@@ -4,7 +4,7 @@
icon = 'icons/obj/computer.dmi'
icon_state = "power"
req_access = list(access_engine_equip)
circuit = "/obj/item/weapon/circuitboard/drone_control"
circuit = /obj/item/weapon/circuitboard/drone_control
//Used when pinging drones.
var/drone_call_area = "Engineering"
+3 -2
View File
@@ -1,7 +1,8 @@
/obj/machinery/computer/shuttle_control
name = "shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
icon_keyboard = "atmos_key"
icon_screen = "shuttle"
circuit = null
var/shuttle_tag // Used to coordinate data in shuttle controller.
@@ -15,7 +16,7 @@
if(!allowed(user))
user << "\red Access Denied."
return 1
ui_interact(user)
/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+17 -16
View File
@@ -34,12 +34,12 @@
destination_dock_controllers[destination] = docking_controller
else
var/datum/computer/file/embedded_program/docking/C = locate(controller_tag)
if(!istype(C))
world << "<span class='danger'>warning: shuttle with docking tag [controller_tag] could not find it's controller!</span>"
else
destination_dock_controllers[destination] = C
//might as well set this up here.
if(origin) last_departed = origin
last_location = start_location
@@ -70,7 +70,8 @@
/obj/machinery/computer/shuttle_control/multi
icon_state = "syndishuttle"
icon_keyboard = "syndie_key"
icon_screen = "syndishuttle"
/obj/machinery/computer/shuttle_control/multi/attack_hand(user as mob)
@@ -99,7 +100,7 @@
dat += "<br><b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><br>"
dat += "<b><A href='?src=\ref[src];move_multi=[1]'>Move ship</A></b><br>"
dat += "<b><A href='?src=\ref[src];start=[1]'>Return to base</A></b></center>"
//Docking
dat += "<center><br><br>"
if(MS.skip_docking_checks())
@@ -107,7 +108,7 @@
else
var/override_en = MS.docking_controller.override_enabled
var/docking_status = MS.docking_controller.get_docking_status()
dat += "Docking Status: "
switch(docking_status)
if("undocked")
@@ -118,11 +119,11 @@
dat += "<font color='[override_en? "red" : "yellow"]'>Undocking</font>"
if("docked")
dat += "<font color='[override_en? "red" : "green"]'>Docked</font>"
if(override_en) dat += " <font color='red'>(Override Enabled)</font>"
dat += ". <A href='?src=\ref[src];refresh=[1]'>\[Refresh\]</A><br><br>"
switch(docking_status)
if("undocked")
dat += "<b><A href='?src=\ref[src];dock_command=[1]'>Dock</A></b></center>"
@@ -139,11 +140,11 @@
var/choice = alert("The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch")
if(choice == "Cancel")
return 0
choice = alert("Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", "Force Launch", "Cancel")
if(choice == "Cancel")
return 0
return 1
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
@@ -165,11 +166,11 @@
if (MS.moving_status != SHUTTLE_IDLE)
usr << "\blue [shuttle_tag] vessel is moving."
return
if(href_list["dock_command"])
MS.dock()
return
if(href_list["undock_command"])
MS.undock()
return
@@ -178,7 +179,7 @@
if(MS.at_origin)
usr << "\red You are already at your home base."
return
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
return
@@ -186,7 +187,7 @@
if(!check_docking(MS))
updateUsrDialog()
return
if(!MS.return_warning)
usr << "\red Returning to your home base will end your mission. If you are sure, press the button again."
//TODO: Actually end the mission.
@@ -207,11 +208,11 @@
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
return
if(!check_docking(MS))
updateUsrDialog()
return
var/choice = input("Select a destination.") as null|anything in MS.destinations
if(!choice) return
+2 -1
View File
@@ -1,7 +1,8 @@
/obj/machinery/computer/diseasesplicer
name = "disease splicer"
icon = 'icons/obj/computer.dmi'
icon_state = "crew"
icon_keyboard = "med_key"
icon_screen = "crew"
var/datum/disease2/effectholder/memorybank = null
var/list/species_buffer = null