mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 06:22:38 +00:00
Port lots of things that had to wait on alerts
Adds a HUD for observers Adds a HUD for rigs and mechs Adds up/down buttons for AI hud Add more tg style alerts Fix some bugs with the tg alerts Improve icon_states usage by caching it Redo how respawning works, add a button to ghost hud for it
This commit is contained in:
@@ -75,8 +75,9 @@
|
||||
#define ui_ai_pda_log "SOUTH:6,WEST+11:16"
|
||||
#define ui_ai_take_picture "SOUTH:6,WEST+12:16"
|
||||
#define ui_ai_view_images "SOUTH:6,WEST+13:16"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+13"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+14"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+11:16"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+12:16"
|
||||
#define ui_ai_updown "SOUTH+1:6,WEST+13:16"
|
||||
|
||||
//Upper-middle right (alerts)
|
||||
#define ui_alert1 "EAST-1:28,CENTER+5:27"
|
||||
@@ -150,3 +151,32 @@
|
||||
|
||||
#define ui_spell_master "EAST-2:16,NORTH-1:26"
|
||||
#define ui_genetic_master "EAST-1:16,NORTH-3:16"
|
||||
|
||||
// Ghost ones
|
||||
#define ui_ghost_returntomenu "SOUTH:6,CENTER-3:24"
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6,CENTER+2:24"
|
||||
#define ui_ghost_updown "SOUTH: 6,CENTER+3:24"
|
||||
|
||||
// Rig panel
|
||||
#define ui_rig_deco1 "WEST:-7, SOUTH+5"
|
||||
#define ui_rig_deco2 "WEST:-7, SOUTH+6"
|
||||
#define ui_rig_pwr "WEST+1:-7, SOUTH+6"
|
||||
#define ui_rig_health "WEST+1:-7, SOUTH+6"
|
||||
#define ui_rig_air "WEST+1:-7, SOUTH+5"
|
||||
#define ui_rig_airtoggle "WEST+1:-7, SOUTH+5"
|
||||
#define ui_rig_deco1_f "WEST+2:-7, SOUTH+5"
|
||||
#define ui_rig_deco2_f "WEST+2:-7, SOUTH+6"
|
||||
|
||||
// Mech panel
|
||||
#define ui_mech_deco1 "WEST:-7, SOUTH+8"
|
||||
#define ui_mech_deco2 "WEST:-7, SOUTH+9"
|
||||
#define ui_mech_pwr "WEST+1:-7, SOUTH+9"
|
||||
#define ui_mech_health "WEST+1:-7, SOUTH+9"
|
||||
#define ui_mech_air "WEST+1:-7, SOUTH+8"
|
||||
#define ui_mech_airtoggle "WEST+1:-7, SOUTH+8"
|
||||
#define ui_mech_deco1_f "WEST+2:-7, SOUTH+8"
|
||||
#define ui_mech_deco2_f "WEST+2:-7, SOUTH+9"
|
||||
|
||||
@@ -1,169 +1,195 @@
|
||||
/obj/screen/ai/multicam
|
||||
name = "Multicamera Mode"
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
icon_state = "multicam"
|
||||
|
||||
/obj/screen/ai/multicam/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_multicam()
|
||||
|
||||
/obj/screen/ai/add_multicam
|
||||
name = "New Camera"
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
icon_state = "new_cam"
|
||||
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_multicam()
|
||||
|
||||
/obj/screen/ai/add_multicam/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.drop_new_multicam()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.drop_new_multicam()
|
||||
|
||||
/datum/hud/proc/ai_hud()
|
||||
adding = list()
|
||||
other = list()
|
||||
/obj/screen/ai/up/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.zMove(UP)
|
||||
|
||||
/obj/screen/ai/down/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.zMove(DOWN)
|
||||
|
||||
/mob/living/silicon/ai/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
HUD.ui_style = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
HUD.adding = list()
|
||||
HUD.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
//AI core
|
||||
using = new /obj/screen()
|
||||
using.name = "AI Core"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "ai_core"
|
||||
using.screen_loc = ui_ai_core
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Camera list
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Camera List"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "camera"
|
||||
using.screen_loc = ui_ai_camera_list
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Track
|
||||
using = new /obj/screen()
|
||||
using.name = "Track With Camera"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "track"
|
||||
using.screen_loc = ui_ai_track_with_camera
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Camera light
|
||||
using = new /obj/screen()
|
||||
using.name = "Toggle Camera Light"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "camera_light"
|
||||
using.screen_loc = ui_ai_camera_light
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Crew Monitoring
|
||||
using = new /obj/screen()
|
||||
using.name = "Crew Monitoring"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "crew_monitor"
|
||||
using.screen_loc = ui_ai_crew_monitor
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Crew Manifest
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Crew Manifest"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "manifest"
|
||||
using.screen_loc = ui_ai_crew_manifest
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Alerts
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Alerts"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "alerts"
|
||||
using.screen_loc = ui_ai_alerts
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Announcement
|
||||
using = new /obj/screen()
|
||||
using.name = "Announcement"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "announcement"
|
||||
using.screen_loc = ui_ai_announcement
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Shuttle
|
||||
using = new /obj/screen()
|
||||
using.name = "Call Emergency Shuttle"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "call_shuttle"
|
||||
using.screen_loc = ui_ai_shuttle
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Laws
|
||||
using = new /obj/screen()
|
||||
using.name = "State Laws"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "state_laws"
|
||||
using.screen_loc = ui_ai_state_laws
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//PDA message
|
||||
using = new /obj/screen()
|
||||
using.name = "PDA - Send Message"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "pda_send"
|
||||
using.screen_loc = ui_ai_pda_send
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//PDA log
|
||||
using = new /obj/screen()
|
||||
using.name = "PDA - Show Message Log"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "pda_receive"
|
||||
using.screen_loc = ui_ai_pda_log
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Take image
|
||||
using = new /obj/screen()
|
||||
using.name = "Take Image"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "take_picture"
|
||||
using.screen_loc = ui_ai_take_picture
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//View images
|
||||
using = new /obj/screen()
|
||||
using.name = "View Images"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "view_images"
|
||||
using.screen_loc = ui_ai_view_images
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Multicamera mode
|
||||
using = new /obj/screen/ai/multicam()
|
||||
using.screen_loc = ui_ai_multicam
|
||||
adding += using
|
||||
using = new /obj/screen/ai/multicam() // special
|
||||
using.name = "Multicamera Mode"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "multicam"
|
||||
using.screen_loc = ui_ai_multicam
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
//Add multicamera camera
|
||||
using = new /obj/screen/ai/add_multicam()
|
||||
using.screen_loc = ui_ai_add_multicam
|
||||
adding += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += adding + other
|
||||
mymob.client.screen += mymob.client.void
|
||||
using = new /obj/screen/ai/add_multicam() // special
|
||||
using.name = "New Camera"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "new_cam"
|
||||
using.screen_loc = ui_ai_add_multicam
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
return
|
||||
//Up and Down
|
||||
using = new /obj/screen/ai/up() // special
|
||||
using.name = "Move Upwards"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "up"
|
||||
using.screen_loc = ui_ai_updown
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
using = new /obj/screen/ai/down() // special
|
||||
using.name = "Move Downwards"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "down"
|
||||
using.screen_loc = ui_ai_updown
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
@@ -36,14 +36,10 @@
|
||||
alert = new type
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
var/old_plane = new_master.plane
|
||||
new_master.layer = LAYER_HUD_ABOVE
|
||||
new_master.plane = PLANE_PLAYER_HUD_ABOVE
|
||||
alert.overlays += new_master
|
||||
new_master.layer = old_layer
|
||||
new_master.plane = old_plane
|
||||
alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
|
||||
alert.icon_state = "itembased"
|
||||
var/image/I = image(icon = new_master.icon, icon_state = new_master.icon_state, dir = SOUTH)
|
||||
I.plane = PLANE_PLAYER_HUD_ABOVE
|
||||
alert.add_overlay(I)
|
||||
alert.master = new_master
|
||||
else
|
||||
alert.icon_state = "[initial(alert.icon_state)][severity]"
|
||||
@@ -85,6 +81,7 @@
|
||||
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
|
||||
var/severity = 0
|
||||
var/alerttooltipstyle = ""
|
||||
var/no_underlay // Don't underlay the UI style's blank template icon under this
|
||||
|
||||
|
||||
/obj/screen/alert/MouseEntered(location,control,params)
|
||||
@@ -226,6 +223,26 @@ The box in your backpack has an oxygen tank and gas mask in it."
|
||||
or something covering your eyes."
|
||||
icon_state = "blind"
|
||||
|
||||
/obj/screen/alert/stunned
|
||||
name = "Stunned"
|
||||
desc = "You're temporarily stunned! You'll have trouble moving or performing actions, but it should clear up on it's own."
|
||||
icon_state = "stun"
|
||||
|
||||
/obj/screen/alert/paralyzed
|
||||
name = "Paralyzed"
|
||||
desc = "You're paralyzed! This could be due to drugs or serious injury. You'll be unable to move or perform actions."
|
||||
icon_state = "paralysis"
|
||||
|
||||
/obj/screen/alert/weakened
|
||||
name = "Weakened"
|
||||
desc = "You're weakened! This could be a temporary issue due to injury or the result of drugs or drinking."
|
||||
icon_state = "weaken"
|
||||
|
||||
/obj/screen/alert/confused
|
||||
name = "Confused"
|
||||
desc = "You're confused, and may stumble into things! This may be from concussive effects, drugs, or dizzyness. Walking will help reduce incidents."
|
||||
icon_state = "confused"
|
||||
|
||||
/obj/screen/alert/high
|
||||
name = "High"
|
||||
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
|
||||
@@ -318,12 +335,14 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
|
||||
name = "Hacked"
|
||||
desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any."
|
||||
icon_state = "hacked"
|
||||
no_underlay = TRUE
|
||||
|
||||
/obj/screen/alert/locked
|
||||
name = "Locked Down"
|
||||
desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \
|
||||
office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary."
|
||||
icon_state = "locked"
|
||||
no_underlay = TRUE
|
||||
|
||||
/obj/screen/alert/newlaw
|
||||
name = "Law Update"
|
||||
@@ -331,6 +350,7 @@ office by your AI master or any qualified human may resolve this matter. Robotic
|
||||
so as to remain in compliance with the most up-to-date laws."
|
||||
icon_state = "newlaw"
|
||||
timeout = 300
|
||||
no_underlay = TRUE
|
||||
|
||||
//MECHS
|
||||
|
||||
@@ -396,17 +416,21 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
/datum/hud/proc/reorganize_alerts()
|
||||
var/list/alerts = mymob.alerts
|
||||
var/icon_pref
|
||||
if(!hud_shown)
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
mymob.client.screen -= alerts[alerts[i]]
|
||||
return 1
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
var/obj/screen/alert/alert = alerts[alerts[i]]
|
||||
if(alert.icon_state == "template")
|
||||
if(!icon_pref)
|
||||
icon_pref = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
alert.icon = icon_pref
|
||||
|
||||
if(alert.icon_state in cached_icon_states(ui_style))
|
||||
alert.icon = ui_style
|
||||
else if(!alert.no_underlay)
|
||||
var/image/I = image(icon = ui_style, icon_state = "template")
|
||||
I.color = ui_color
|
||||
I.alpha = ui_alpha
|
||||
alert.underlays = list(I)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
. = ui_alert1
|
||||
@@ -421,7 +445,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
else
|
||||
. = ""
|
||||
alert.screen_loc = .
|
||||
mymob.client.screen |= alert
|
||||
mymob?.client?.screen |= alert
|
||||
return 1
|
||||
|
||||
/mob
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
/datum/hud/proc/larva_hud()
|
||||
/mob/living/carbon/alien/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
HUD.ui_style = 'icons/mob/screen1_alien.dmi'
|
||||
|
||||
HUD.adding = list()
|
||||
HUD.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = (m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
HUD.adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += list( mymob.healths) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
mymob.client.screen += mymob.client.void
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += list(healths)
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
176
code/_onclick/hud/ghost.dm
Normal file
176
code/_onclick/hud/ghost.dm
Normal file
@@ -0,0 +1,176 @@
|
||||
/obj/screen/ghost
|
||||
icon = 'icons/mob/screen_ghost.dmi'
|
||||
|
||||
/obj/screen/ghost/MouseEntered(location,control,params)
|
||||
flick(icon_state + "_anim", src)
|
||||
openToolTip(usr, src, params, title = name, content = desc)
|
||||
|
||||
/obj/screen/ghost/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
/obj/screen/ghost/Click()
|
||||
closeToolTip(usr)
|
||||
|
||||
/obj/screen/ghost/returntomenu
|
||||
name = "Return to menu"
|
||||
desc = "Return to the title screen menu."
|
||||
icon_state = "returntomenu"
|
||||
|
||||
/obj/screen/ghost/returntomenu/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.abandon_mob()
|
||||
|
||||
/obj/screen/ghost/jumptomob
|
||||
name = "Jump to mob"
|
||||
desc = "Pick a mob from a list to jump to."
|
||||
icon_state = "jumptomob"
|
||||
|
||||
/obj/screen/ghost/jumptomob/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.jumptomob()
|
||||
|
||||
/obj/screen/ghost/orbit
|
||||
name = "Orbit"
|
||||
desc = "Pick a mob to follow and orbit."
|
||||
icon_state = "orbit"
|
||||
|
||||
/obj/screen/ghost/orbit/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.follow()
|
||||
|
||||
/obj/screen/ghost/reenter_corpse
|
||||
name = "Reenter corpse"
|
||||
desc = "Only applicable if you HAVE a corpse..."
|
||||
icon_state = "reenter_corpse"
|
||||
|
||||
/obj/screen/ghost/reenter_corpse/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/ghost/teleport
|
||||
name = "Teleport"
|
||||
desc = "Pick an area to teleport to."
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/ghost/teleport/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Alert"
|
||||
desc = "Ping all the unoccupied pAI devices in the world."
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.paialert()
|
||||
|
||||
/obj/screen/ghost/up
|
||||
name = "Move Upwards"
|
||||
desc = "Move up a z-level."
|
||||
icon_state = "up"
|
||||
|
||||
/obj/screen/ghost/up/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.zMove(UP)
|
||||
|
||||
/obj/screen/ghost/down
|
||||
name = "Move Downwards"
|
||||
desc = "Move down a z-level."
|
||||
icon_state = "down"
|
||||
|
||||
/obj/screen/ghost/down/Click()
|
||||
..()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.zMove(DOWN)
|
||||
|
||||
/mob/observer/dead/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
var/list/adding = list()
|
||||
HUD.adding = adding
|
||||
|
||||
var/obj/screen/using
|
||||
using = new /obj/screen/ghost/returntomenu()
|
||||
using.screen_loc = ui_ghost_returntomenu
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/teleport()
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/up()
|
||||
using.screen_loc = ui_ghost_updown
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/down()
|
||||
using.screen_loc = ui_ghost_updown
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
/*
|
||||
using = new /obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
adding += using
|
||||
*/
|
||||
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += HUD.adding
|
||||
client.screen += client.void
|
||||
|
||||
/* I wish we had this. Not yet, though.
|
||||
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
|
||||
// don't show this HUD if observing; show the HUD of the observee
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
plane_masters_update()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client.prefs.ghost_hud)
|
||||
screenmob.client.screen -= static_inventory
|
||||
else
|
||||
screenmob.client.screen += static_inventory
|
||||
|
||||
//We should only see observed mob alerts.
|
||||
/datum/hud/ghost/reorganize_alerts(mob/viewmob)
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
return
|
||||
. = ..()
|
||||
*/
|
||||
@@ -178,12 +178,19 @@ var/list/global_huds = list(
|
||||
|
||||
var/list/adding
|
||||
var/list/other
|
||||
var/list/miniobjs
|
||||
var/list/obj/screen/hotkeybuttons
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
var/list/slot_info
|
||||
|
||||
var/icon/ui_style
|
||||
var/ui_color
|
||||
var/ui_alpha
|
||||
|
||||
var/list/minihuds = list()
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
instantiate()
|
||||
@@ -209,6 +216,7 @@ datum/hud/New(mob/owner)
|
||||
hotkeybuttons = null
|
||||
// item_action_list = null // ?
|
||||
mymob = null
|
||||
qdel_null(minihuds)
|
||||
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
if(!mymob) return
|
||||
@@ -297,34 +305,43 @@ datum/hud/New(mob/owner)
|
||||
|
||||
|
||||
/datum/hud/proc/instantiate()
|
||||
if(!ismob(mymob)) return 0
|
||||
if(!mymob.client) return 0
|
||||
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
var/ui_color = mymob.client.prefs.UI_style_color
|
||||
var/ui_alpha = mymob.client.prefs.UI_style_alpha
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
|
||||
else if(isrobot(mymob))
|
||||
robot_hud(ui_style, ui_color, ui_alpha, mymob)
|
||||
else if(isbrain(mymob))
|
||||
mymob.instantiate_hud(src)
|
||||
else if(isalien(mymob))
|
||||
larva_hud()
|
||||
else if(isAI(mymob))
|
||||
ai_hud()
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
else
|
||||
mymob.instantiate_hud(src)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
|
||||
mymob.create_mob_hud(src)
|
||||
|
||||
persistant_inventory_update()
|
||||
mymob.reload_fullscreen() // Reload any fullscreen overlays this mob has.
|
||||
mymob.update_action_buttons()
|
||||
reorganize_alerts()
|
||||
|
||||
/mob/proc/instantiate_hud(var/datum/hud/HUD)
|
||||
return
|
||||
/mob/proc/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
if(!client)
|
||||
return 0
|
||||
|
||||
HUD.ui_style = ui_style2icon(client?.prefs?.UI_style)
|
||||
HUD.ui_color = client?.prefs?.UI_style_color
|
||||
HUD.ui_alpha = client?.prefs?.UI_style_alpha
|
||||
|
||||
/datum/hud/proc/apply_minihud(var/datum/mini_hud/MH)
|
||||
if(MH in minihuds)
|
||||
return
|
||||
minihuds += MH
|
||||
if(mymob.client)
|
||||
mymob.client.screen -= miniobjs
|
||||
miniobjs += MH.get_screen_objs()
|
||||
if(mymob.client)
|
||||
mymob.client.screen += miniobjs
|
||||
|
||||
/datum/hud/proc/remove_minihud(var/datum/mini_hud/MH)
|
||||
if(!(MH in minihuds))
|
||||
return
|
||||
minihuds -= MH
|
||||
if(mymob.client)
|
||||
mymob.client.screen -= miniobjs
|
||||
miniobjs -= MH.get_screen_objs()
|
||||
if(mymob.client)
|
||||
mymob.client.screen += miniobjs
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12(var/full = 0 as null)
|
||||
@@ -333,61 +350,66 @@ datum/hud/New(mob/owner)
|
||||
|
||||
if(!hud_used)
|
||||
to_chat(usr, "<span class='warning'>This mob type does not use a HUD.</span>")
|
||||
return
|
||||
|
||||
if(!ishuman(src))
|
||||
to_chat(usr, "<span class='warning'>Inventory hiding is currently only supported for human mobs, sorry.</span>")
|
||||
return
|
||||
|
||||
if(!client) return
|
||||
return FALSE
|
||||
if(!client)
|
||||
return FALSE
|
||||
if(client.view != world.view)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
toggle_hud_vis(full)
|
||||
|
||||
/mob/proc/toggle_hud_vis(full)
|
||||
if(hud_used.hud_shown)
|
||||
hud_used.hud_shown = 0
|
||||
if(src.hud_used.adding)
|
||||
src.client.screen -= src.hud_used.adding
|
||||
if(src.hud_used.other)
|
||||
src.client.screen -= src.hud_used.other
|
||||
if(src.hud_used.hotkeybuttons)
|
||||
src.client.screen -= src.hud_used.hotkeybuttons
|
||||
|
||||
//Due to some poor coding some things need special treatment:
|
||||
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
|
||||
if(!full)
|
||||
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
|
||||
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
|
||||
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
|
||||
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
else
|
||||
src.client.screen -= src.healths
|
||||
src.client.screen -= src.internals
|
||||
src.client.screen -= src.gun_setting_icon
|
||||
|
||||
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
||||
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
|
||||
|
||||
if(hud_used.adding)
|
||||
client.screen -= hud_used.adding
|
||||
if(hud_used.other)
|
||||
client.screen -= hud_used.other
|
||||
if(hud_used.hotkeybuttons)
|
||||
client.screen -= hud_used.hotkeybuttons
|
||||
else
|
||||
hud_used.hud_shown = 1
|
||||
if(src.hud_used.adding)
|
||||
src.client.screen += src.hud_used.adding
|
||||
if(src.hud_used.other && src.hud_used.inventory_shown)
|
||||
src.client.screen += src.hud_used.other
|
||||
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
|
||||
src.client.screen += src.hud_used.hotkeybuttons
|
||||
if(src.healths)
|
||||
src.client.screen |= src.healths
|
||||
if(src.internals)
|
||||
src.client.screen |= src.internals
|
||||
if(src.gun_setting_icon)
|
||||
src.client.screen |= src.gun_setting_icon
|
||||
if(hud_used.adding)
|
||||
client.screen += hud_used.adding
|
||||
if(hud_used.other && hud_used.inventory_shown)
|
||||
client.screen += hud_used.other
|
||||
if(hud_used.hotkeybuttons && !hud_used.hotkey_ui_hidden)
|
||||
client.screen += hud_used.hotkeybuttons
|
||||
if(healths)
|
||||
client.screen |= healths
|
||||
if(internals)
|
||||
client.screen |= internals
|
||||
if(gun_setting_icon)
|
||||
client.screen |= gun_setting_icon
|
||||
|
||||
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
|
||||
src.client.screen += src.zone_sel //This one is a special snowflake
|
||||
hud_used?.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
|
||||
client.screen += zone_sel //This one is a special snowflake
|
||||
|
||||
hud_used.hidden_inventory_update()
|
||||
hud_used.persistant_inventory_update()
|
||||
update_action_buttons()
|
||||
hud_used.reorganize_alerts()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/toggle_hud_vis(full)
|
||||
..()
|
||||
|
||||
// Prevents humans from hiding a few hud elements
|
||||
if(!hud_used.hud_shown) // transitioning to hidden
|
||||
//Due to some poor coding some things need special treatment:
|
||||
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
|
||||
if(!full)
|
||||
client.screen += hud_used.l_hand_hud_object //we want the hands to be visible
|
||||
client.screen += hud_used.r_hand_hud_object //we want the hands to be visible
|
||||
client.screen += hud_used.action_intent //we want the intent swticher visible
|
||||
hud_used?.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
else
|
||||
client.screen -= healths
|
||||
client.screen -= internals
|
||||
client.screen -= gun_setting_icon
|
||||
|
||||
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
||||
client.screen -= zone_sel //zone_sel is a mob variable for some reason.
|
||||
|
||||
//Similar to button_pressed_F12() but keeps zone_sel, gun_setting_icon, and healths.
|
||||
/mob/proc/toggle_zoom_hud()
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
/mob/living/carbon/human/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
||||
HUD.human_hud(ui_style, ui_color, ui_alpha, src)
|
||||
/mob/living/carbon/human/create_mob_hud(datum/hud/HUD)
|
||||
..()
|
||||
|
||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
||||
var/datum/hud_data/hud_data
|
||||
if(!istype(target))
|
||||
hud_data = new()
|
||||
if(species?.hud)
|
||||
hud_data = species.hud
|
||||
else
|
||||
hud_data = target.species.hud
|
||||
hud_data = new ()
|
||||
|
||||
if(hud_data.icon)
|
||||
ui_style = hud_data.icon
|
||||
if(hud_data.icon) // Species wants a specific dmi for the HUD
|
||||
HUD.ui_style = hud_data.icon
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
src.hotkeybuttons = list() //These can be disabled for hotkey users
|
||||
src.slot_info = list()
|
||||
var/adding = list()
|
||||
var/other = list()
|
||||
var/hotkeybuttons = list()
|
||||
var/slot_info = list()
|
||||
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
HUD.hotkeybuttons = hotkeybuttons //These can be disabled for hotkey users
|
||||
HUD.slot_info = slot_info
|
||||
|
||||
var/list/hud_elements = list()
|
||||
var/obj/screen/using
|
||||
@@ -25,10 +29,10 @@
|
||||
for(var/gear_slot in hud_data.gear)
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.icon = ui_style
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
inv_box.hud = src
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
inv_box.hud = HUD
|
||||
|
||||
var/list/slot_data = hud_data.gear[gear_slot]
|
||||
inv_box.name = gear_slot
|
||||
@@ -41,277 +45,274 @@
|
||||
inv_box.set_dir(slot_data["dir"])
|
||||
|
||||
if(slot_data["toggle"])
|
||||
src.other += inv_box
|
||||
other += inv_box
|
||||
has_hidden_gear = 1
|
||||
else
|
||||
src.adding += inv_box
|
||||
adding += inv_box
|
||||
|
||||
if(has_hidden_gear)
|
||||
using = new /obj/screen()
|
||||
using.name = "toggle"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "other"
|
||||
using.screen_loc = ui_inventory
|
||||
using.hud_layerise()
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
|
||||
// Draw the attack intent dialogue.
|
||||
if(hud_data.has_a_intent)
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "intent_"+mymob.a_intent
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "intent_"+a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
hud_elements |= using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen()
|
||||
using.name = I_HELP
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM //These sit on the intent box
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
adding += using
|
||||
HUD.help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen()
|
||||
using.name = I_DISARM
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
adding += using
|
||||
HUD.disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen()
|
||||
using.name = I_GRAB
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
adding += using
|
||||
HUD.grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen()
|
||||
using.name = I_HURT
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
adding += using
|
||||
HUD.hurt_intent = using
|
||||
//end intent small hud objects
|
||||
|
||||
if(hud_data.has_m_intent)
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = (m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
if(hud_data.has_drop)
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += using
|
||||
|
||||
if(hud_data.has_hands)
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "equip"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_equip"
|
||||
using.screen_loc = ui_equip
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
inv_box.hud = HUD
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.icon_state = "r_hand_inactive"
|
||||
if(!target.hand) //This being 0 or null means the right hand is in use
|
||||
if(!hand) //This being 0 or null means the right hand is in use
|
||||
inv_box.icon_state = "r_hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
HUD.r_hand_hud_object = inv_box
|
||||
adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
inv_box.hud = HUD
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.icon_state = "l_hand_inactive"
|
||||
if(target.hand) //This being 1 means the left hand is in use
|
||||
if(hand) //This being 1 means the left hand is in use
|
||||
inv_box.icon_state = "l_hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
HUD.l_hand_hud_object = inv_box
|
||||
adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.hud = src
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.hud = HUD
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.hud = src
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.hud = HUD
|
||||
adding += using
|
||||
|
||||
if(hud_data.has_resist)
|
||||
using = new /obj/screen()
|
||||
using.name = "resist"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += using
|
||||
|
||||
if(hud_data.has_throw)
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
src.hotkeybuttons += mymob.throw_icon
|
||||
hud_elements |= mymob.throw_icon
|
||||
throw_icon = new /obj/screen()
|
||||
throw_icon.icon = HUD.ui_style
|
||||
throw_icon.icon_state = "act_throw_off"
|
||||
throw_icon.name = "throw"
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
throw_icon.color = HUD.ui_color
|
||||
throw_icon.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += throw_icon
|
||||
hud_elements |= throw_icon
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
src.hotkeybuttons += mymob.pullin
|
||||
hud_elements |= mymob.pullin
|
||||
pullin = new /obj/screen()
|
||||
pullin.icon = HUD.ui_style
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += pullin
|
||||
hud_elements |= pullin
|
||||
|
||||
if(hud_data.has_internals)
|
||||
mymob.internals = new /obj/screen()
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.icon_state = "internal0"
|
||||
if(istype(target.internal, /obj/item/weapon/tank)) //Internals on already? Iight, prove it
|
||||
mymob.internals.icon_state = "internal1"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
hud_elements |= mymob.internals
|
||||
internals = new /obj/screen()
|
||||
internals.icon = HUD.ui_style
|
||||
internals.icon_state = "internal0"
|
||||
if(istype(internal, /obj/item/weapon/tank)) //Internals on already? Iight, prove it
|
||||
internals.icon_state = "internal1"
|
||||
internals.name = "internal"
|
||||
internals.screen_loc = ui_internal
|
||||
hud_elements |= internals
|
||||
|
||||
if(hud_data.has_warnings)
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
hud_elements |= mymob.healths
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_health
|
||||
hud_elements |= healths
|
||||
|
||||
mymob.ling_chem_display = new /obj/screen/ling/chems()
|
||||
mymob.ling_chem_display.screen_loc = ui_ling_chemical_display
|
||||
mymob.ling_chem_display.icon_state = "ling_chems"
|
||||
hud_elements |= mymob.ling_chem_display
|
||||
ling_chem_display = new /obj/screen/ling/chems()
|
||||
ling_chem_display.screen_loc = ui_ling_chemical_display
|
||||
ling_chem_display.icon_state = "ling_chems"
|
||||
hud_elements |= ling_chem_display
|
||||
|
||||
mymob.wiz_instability_display = new /obj/screen/wizard/instability()
|
||||
mymob.wiz_instability_display.screen_loc = ui_wiz_instability_display
|
||||
mymob.wiz_instability_display.icon_state = "wiz_instability_none"
|
||||
hud_elements |= mymob.wiz_instability_display
|
||||
wiz_instability_display = new /obj/screen/wizard/instability()
|
||||
wiz_instability_display.screen_loc = ui_wiz_instability_display
|
||||
wiz_instability_display.icon_state = "wiz_instability_none"
|
||||
hud_elements |= wiz_instability_display
|
||||
|
||||
mymob.wiz_energy_display = new/obj/screen/wizard/energy()
|
||||
mymob.wiz_energy_display.screen_loc = ui_wiz_energy_display
|
||||
mymob.wiz_energy_display.icon_state = "wiz_energy"
|
||||
hud_elements |= mymob.wiz_energy_display
|
||||
wiz_energy_display = new/obj/screen/wizard/energy()
|
||||
wiz_energy_display.screen_loc = ui_wiz_energy_display
|
||||
wiz_energy_display.icon_state = "wiz_energy"
|
||||
hud_elements |= wiz_energy_display
|
||||
|
||||
|
||||
mymob.pain = new /obj/screen( null )
|
||||
pain = new /obj/screen( null )
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.color = ui_color
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
hud_elements |= mymob.zone_sel
|
||||
zone_sel = new /obj/screen/zone_sel( null )
|
||||
zone_sel.icon = HUD.ui_style
|
||||
zone_sel.color = HUD.ui_color
|
||||
zone_sel.alpha = HUD.ui_alpha
|
||||
zone_sel.overlays.Cut()
|
||||
zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
|
||||
hud_elements |= zone_sel
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.gun_setting_icon.icon = ui_style
|
||||
mymob.gun_setting_icon.color = ui_color
|
||||
mymob.gun_setting_icon.alpha = ui_alpha
|
||||
hud_elements |= mymob.gun_setting_icon
|
||||
gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
gun_setting_icon.icon = HUD.ui_style
|
||||
gun_setting_icon.color = HUD.ui_color
|
||||
gun_setting_icon.alpha = HUD.ui_alpha
|
||||
hud_elements |= gun_setting_icon
|
||||
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
mymob.item_use_icon.icon = ui_style
|
||||
mymob.item_use_icon.color = ui_color
|
||||
mymob.item_use_icon.alpha = ui_alpha
|
||||
item_use_icon = new /obj/screen/gun/item(null)
|
||||
item_use_icon.icon = HUD.ui_style
|
||||
item_use_icon.color = HUD.ui_color
|
||||
item_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
mymob.gun_move_icon.icon = ui_style
|
||||
mymob.gun_move_icon.color = ui_color
|
||||
mymob.gun_move_icon.alpha = ui_alpha
|
||||
gun_move_icon = new /obj/screen/gun/move(null)
|
||||
gun_move_icon.icon = HUD.ui_style
|
||||
gun_move_icon.color = HUD.ui_color
|
||||
gun_move_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.icon = ui_style
|
||||
mymob.radio_use_icon.color = ui_color
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
radio_use_icon.icon = HUD.ui_style
|
||||
radio_use_icon.color = HUD.ui_color
|
||||
radio_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
if(mymob.client)
|
||||
mymob.client.screen = list()
|
||||
if(client)
|
||||
client.screen = list()
|
||||
|
||||
mymob.client.screen += hud_elements
|
||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
inventory_shown = 0
|
||||
|
||||
return
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
HUD.inventory_shown = 0
|
||||
|
||||
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
||||
set category = "OOC"
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
|
||||
/datum/hud/proc/unplayer_hud()
|
||||
return
|
||||
|
||||
/datum/hud/proc/ghost_hud()
|
||||
return
|
||||
|
||||
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||
|
||||
blobpwrdisplay = new /obj/screen()
|
||||
blobpwrdisplay.name = "blob power"
|
||||
blobpwrdisplay.icon_state = "block"
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.layer = HUD_LAYER
|
||||
|
||||
blobhealthdisplay = new /obj/screen()
|
||||
blobhealthdisplay.name = "blob health"
|
||||
blobhealthdisplay.icon_state = "block"
|
||||
blobhealthdisplay.screen_loc = ui_internal
|
||||
blobhealthdisplay.layer = HUD_LAYER
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
||||
mymob.client.screen += mymob.client.void
|
||||
/*
|
||||
/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||
|
||||
src.adding = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.icon_state = "intent_"+mymob.a_intent
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = I_HURT
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += src.adding
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
return
|
||||
*/
|
||||
|
||||
// HUD.construct_hud() //Archaic.
|
||||
/*
|
||||
/datum/hud/proc/construct_hud()
|
||||
var/constructtype
|
||||
|
||||
if(istype(mymob,/mob/living/simple_animal/construct/armoured) || istype(mymob,/mob/living/simple_animal/construct/behemoth))
|
||||
constructtype = "juggernaut"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/builder))
|
||||
constructtype = "artificer"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/wraith))
|
||||
constructtype = "wraith"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/harvester))
|
||||
constructtype = "harvester"
|
||||
|
||||
if(constructtype)
|
||||
|
||||
mymob.fire.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_construct_fire
|
||||
|
||||
mymob.healths.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.healths.icon_state = "[constructtype]_health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_construct_health
|
||||
|
||||
mymob.pullin.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_construct_pull
|
||||
|
||||
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.zone_sel.overlays.len = 0
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
|
||||
mymob.purged.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.purged.icon_state = "purge0"
|
||||
mymob.purged.name = "purged"
|
||||
mymob.purged.screen_loc = ui_construct_purge
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.zone_sel, mymob.purged)
|
||||
mymob.client.screen += mymob.client.void
|
||||
*/
|
||||
267
code/_onclick/hud/rigmech.dm
Normal file
267
code/_onclick/hud/rigmech.dm
Normal file
@@ -0,0 +1,267 @@
|
||||
/datum/mini_hud
|
||||
var/datum/hud/main_hud
|
||||
var/list/screenobjs = list()
|
||||
var/list/types_to_instantiate
|
||||
var/needs_processing = FALSE
|
||||
|
||||
/datum/mini_hud/New(var/datum/hud/other)
|
||||
apply_to_hud(other)
|
||||
if(needs_processing)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/mini_hud/Destroy()
|
||||
main_hud?.remove_minihud(src)
|
||||
main_hud = null
|
||||
if(needs_processing)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
// Apply to a real /datum/hud
|
||||
/datum/mini_hud/proc/apply_to_hud(var/datum/hud/other)
|
||||
if(main_hud)
|
||||
unapply_to_hud(main_hud)
|
||||
main_hud = other
|
||||
main_hud.apply_minihud(src)
|
||||
|
||||
// Remove from a real /datum/hud
|
||||
/datum/mini_hud/proc/unapply_to_hud(var/datum/hud/other)
|
||||
main_hud.remove_minihud(src)
|
||||
|
||||
// Update the hud
|
||||
/datum/mini_hud/process()
|
||||
return PROCESS_KILL // You shouldn't be here!
|
||||
|
||||
// Return a list of screen objects we use
|
||||
/datum/mini_hud/proc/get_screen_objs(var/mob/M)
|
||||
return screenobjs
|
||||
|
||||
// Specific types
|
||||
/datum/mini_hud/rig
|
||||
var/obj/item/weapon/rig/owner_rig
|
||||
var/obj/screen/rig/power/power
|
||||
var/obj/screen/rig/health/health
|
||||
var/obj/screen/rig/air/air
|
||||
var/obj/screen/rig/airtoggle/airtoggle
|
||||
|
||||
needs_processing = TRUE
|
||||
|
||||
/datum/mini_hud/rig/New(var/datum/hud/other, var/obj/item/weapon/rig/owner)
|
||||
owner_rig = owner
|
||||
power = new ()
|
||||
health = new ()
|
||||
air = new ()
|
||||
airtoggle = new ()
|
||||
|
||||
screenobjs = list(power, health, air, airtoggle)
|
||||
screenobjs += new /obj/screen/rig/deco1
|
||||
screenobjs += new /obj/screen/rig/deco2
|
||||
screenobjs += new /obj/screen/rig/deco1_f
|
||||
screenobjs += new /obj/screen/rig/deco2_f
|
||||
|
||||
for(var/scr in screenobjs)
|
||||
var/obj/screen/S = scr
|
||||
S.master = owner_rig
|
||||
..()
|
||||
|
||||
/datum/mini_hud/rig/Destroy()
|
||||
if(owner_rig)
|
||||
//owner_rig.minihud = null
|
||||
owner_rig = null
|
||||
return ..()
|
||||
|
||||
/datum/mini_hud/rig/process()
|
||||
if(!owner_rig)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/cell/rigcell = owner_rig.cell
|
||||
var/obj/item/weapon/tank/rigtank = owner_rig.air_supply
|
||||
|
||||
var/charge_percentage = rigcell ? rigcell.charge / rigcell.maxcharge : 0
|
||||
var/air_percentage = rigtank ? CLAMP(rigtank.air_contents.total_moles / 17.4693, 0, 1) : 0
|
||||
var/air_on = owner_rig.wearer?.internal ? 1 : 0
|
||||
|
||||
power.icon_state = "pwr[round(charge_percentage / 0.2, 1)]"
|
||||
air.icon_state = "air[round(air_percentage / 0.2, 1)]"
|
||||
health.icon_state = owner_rig.malfunctioning ? "health1" : "health5"
|
||||
airtoggle.icon_state = "airon[air_on]"
|
||||
|
||||
/datum/mini_hud/mech
|
||||
var/obj/mecha/owner_mech
|
||||
var/obj/screen/mech/power/power
|
||||
var/obj/screen/mech/health/health
|
||||
var/obj/screen/mech/air/air
|
||||
var/obj/screen/mech/airtoggle/airtoggle
|
||||
|
||||
needs_processing = TRUE
|
||||
|
||||
/datum/mini_hud/mech/New(var/datum/hud/other, var/obj/mecha/owner)
|
||||
owner_mech = owner
|
||||
power = new ()
|
||||
health = new ()
|
||||
air = new ()
|
||||
airtoggle = new ()
|
||||
|
||||
screenobjs = list(power, health, air, airtoggle)
|
||||
screenobjs += new /obj/screen/mech/deco1
|
||||
screenobjs += new /obj/screen/mech/deco2
|
||||
screenobjs += new /obj/screen/mech/deco1_f
|
||||
screenobjs += new /obj/screen/mech/deco2_f
|
||||
|
||||
for(var/scr in screenobjs)
|
||||
var/obj/screen/S = scr
|
||||
S.master = owner_mech
|
||||
..()
|
||||
|
||||
/datum/mini_hud/mech/Destroy()
|
||||
if(owner_mech)
|
||||
owner_mech.minihud = null
|
||||
owner_mech = null
|
||||
return ..()
|
||||
|
||||
/datum/mini_hud/mech/process()
|
||||
if(!owner_mech)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/cell/mechcell = owner_mech.cell
|
||||
var/obj/machinery/portable_atmospherics/canister/mechtank = owner_mech.internal_tank
|
||||
|
||||
var/charge_percentage = mechcell ? mechcell.charge / mechcell.maxcharge : 0
|
||||
var/air_percentage = mechtank ? CLAMP(mechtank.air_contents.total_moles / 1863.47, 0, 1) : 0
|
||||
var/health_percentage = owner_mech.health / owner_mech.maxhealth
|
||||
var/air_on = owner_mech.use_internal_tank
|
||||
|
||||
power.icon_state = "pwr[round(charge_percentage / 0.2, 1)]"
|
||||
air.icon_state = "air[round(air_percentage / 0.2, 1)]"
|
||||
health.icon_state = "health[round(health_percentage / 0.2, 1)]"
|
||||
airtoggle.icon_state = "airon[air_on]"
|
||||
|
||||
// Screen objects
|
||||
/obj/screen/rig
|
||||
icon = 'icons/mob/screen_rigmech.dmi'
|
||||
|
||||
/obj/screen/rig/deco1
|
||||
name = "RIG Status"
|
||||
icon_state = "frame1_1"
|
||||
screen_loc = ui_rig_deco1
|
||||
|
||||
/obj/screen/rig/deco2
|
||||
name = "RIG Status"
|
||||
icon_state = "frame1_2"
|
||||
screen_loc = ui_rig_deco2
|
||||
|
||||
/obj/screen/rig/deco1_f
|
||||
name = "RIG Status"
|
||||
icon_state = "frame1_1_far"
|
||||
screen_loc = ui_rig_deco1_f
|
||||
|
||||
/obj/screen/rig/deco2_f
|
||||
name = "RIG Status"
|
||||
icon_state = "frame1_2_far"
|
||||
screen_loc = ui_rig_deco2_f
|
||||
|
||||
/obj/screen/rig/power
|
||||
name = "Charge Level"
|
||||
icon_state = "pwr5"
|
||||
screen_loc = ui_rig_pwr
|
||||
|
||||
/obj/screen/rig/health
|
||||
name = "Integrity Level"
|
||||
icon_state = "health5"
|
||||
screen_loc = ui_rig_health
|
||||
|
||||
/obj/screen/rig/air
|
||||
name = "Air Storage"
|
||||
icon_state = "air5"
|
||||
screen_loc = ui_rig_air
|
||||
|
||||
/obj/screen/rig/airtoggle
|
||||
name = "Toggle Air"
|
||||
icon_state = "airoff"
|
||||
screen_loc = ui_rig_airtoggle
|
||||
|
||||
/obj/screen/rig/airtoggle/Click()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!istype(user) || user.stat || user.incapacitated())
|
||||
return
|
||||
var/obj/item/weapon/rig/owner_rig = master
|
||||
if(user != owner_rig.wearer)
|
||||
return
|
||||
user.toggle_internals()
|
||||
|
||||
/obj/screen/mech
|
||||
icon = 'icons/mob/screen_rigmech.dmi'
|
||||
|
||||
/obj/screen/mech/deco1
|
||||
name = "Mech Status"
|
||||
icon_state = "frame1_1"
|
||||
screen_loc = ui_mech_deco1
|
||||
|
||||
/obj/screen/mech/deco2
|
||||
name = "Mech Status"
|
||||
icon_state = "frame1_2"
|
||||
screen_loc = ui_mech_deco2
|
||||
|
||||
/obj/screen/mech/deco1_f
|
||||
name = "Mech Status"
|
||||
icon_state = "frame1_1_far"
|
||||
screen_loc = ui_mech_deco1_f
|
||||
|
||||
/obj/screen/mech/deco2_f
|
||||
name = "Mech Status"
|
||||
icon_state = "frame1_2_far"
|
||||
screen_loc = ui_mech_deco2_f
|
||||
|
||||
/obj/screen/mech/power
|
||||
name = "Charge Level"
|
||||
icon_state = "pwr5"
|
||||
screen_loc = ui_mech_pwr
|
||||
|
||||
/obj/screen/mech/health
|
||||
name = "Integrity Level"
|
||||
icon_state = "health5"
|
||||
screen_loc = ui_mech_health
|
||||
|
||||
/obj/screen/mech/air
|
||||
name = "Air Storage"
|
||||
icon_state = "air5"
|
||||
screen_loc = ui_mech_air
|
||||
|
||||
/obj/screen/mech/airtoggle
|
||||
name = "Toggle Air"
|
||||
icon_state = "airoff"
|
||||
screen_loc = ui_mech_airtoggle
|
||||
|
||||
/obj/screen/mech/airtoggle/Click()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!istype(user) || user.stat || user.incapacitated())
|
||||
return
|
||||
var/obj/mecha/owner_mech = master
|
||||
if(user != owner_mech.occupant)
|
||||
return
|
||||
owner_mech.toggle_internal_tank()
|
||||
|
||||
/*
|
||||
/mob/observer/dead/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
var/list/adding = list()
|
||||
HUD.adding = adding
|
||||
|
||||
var/obj/screen/using
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
using.hud = src
|
||||
adding += using
|
||||
*/
|
||||
@@ -1,23 +1,19 @@
|
||||
var/obj/screen/robot_inventory
|
||||
/*
|
||||
/mob/living/silicon/robot/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
||||
HUD.robot_hud(ui_style, ui_color, ui_alpha, src)*/
|
||||
|
||||
/datum/hud/proc/robot_hud(ui_style='icons/mob/screen1_robot.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/silicon/robot/target)
|
||||
/* var/datum/hud_data/hud_data
|
||||
if(!istype(target))
|
||||
hud_data = new()
|
||||
/mob/living/silicon/robot/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
if(hud_data.icon)
|
||||
ui_style = hud_data.icon*/
|
||||
|
||||
if(ui_style == 'icons/mob/screen/minimalist.dmi')
|
||||
ui_style = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
// Don't care about your prefs! Our icon is more important
|
||||
if(HUD.ui_style == 'icons/mob/screen/minimalist.dmi')
|
||||
HUD.ui_style = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
else
|
||||
ui_style = 'icons/mob/screen1_robot.dmi'
|
||||
HUD.ui_style = 'icons/mob/screen1_robot.dmi'
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
var/list/adding = list()
|
||||
var/list/other = list()
|
||||
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -25,51 +21,51 @@ var/obj/screen/robot_inventory
|
||||
using = new /obj/screen()
|
||||
using.name = "radio"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "radio"
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
adding += using
|
||||
|
||||
//Module select
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module1"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv1"
|
||||
using.screen_loc = ui_inv1
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv1 = using
|
||||
adding += using
|
||||
inv1 = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module2"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv2"
|
||||
using.screen_loc = ui_inv2
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv2 = using
|
||||
adding += using
|
||||
inv2 = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module3"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv3"
|
||||
using.screen_loc = ui_inv3
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv3 = using
|
||||
adding += using
|
||||
inv3 = using
|
||||
|
||||
//End of module select
|
||||
|
||||
@@ -77,98 +73,96 @@ var/obj/screen/robot_inventory
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = mymob.a_intent
|
||||
using.icon = HUD.ui_style
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
//Health
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.alpha = ui_alpha
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_borg_health
|
||||
src.other += mymob.healths
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.alpha = HUD.ui_alpha
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_borg_health
|
||||
other += healths
|
||||
|
||||
//Installed Module
|
||||
mymob.hands = new /obj/screen()
|
||||
mymob.hands.icon = ui_style
|
||||
mymob.hands.icon_state = "nomod"
|
||||
mymob.hands.alpha = ui_alpha
|
||||
mymob.hands.name = "module"
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
src.other += mymob.hands
|
||||
hands = new /obj/screen()
|
||||
hands.icon = HUD.ui_style
|
||||
hands.icon_state = "nomod"
|
||||
hands.alpha = HUD.ui_alpha
|
||||
hands.name = "module"
|
||||
hands.screen_loc = ui_borg_module
|
||||
other += hands
|
||||
|
||||
//Module Panel
|
||||
using = new /obj/screen()
|
||||
using.name = "panel"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "panel"
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.screen_loc = ui_borg_panel
|
||||
using.layer = HUD_LAYER-0.01
|
||||
src.adding += using
|
||||
adding += using
|
||||
|
||||
//Store
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "store"
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
src.other += mymob.throw_icon
|
||||
throw_icon = new /obj/screen()
|
||||
throw_icon.icon = HUD.ui_style
|
||||
throw_icon.icon_state = "store"
|
||||
throw_icon.alpha = HUD.ui_alpha
|
||||
throw_icon.color = HUD.ui_color
|
||||
throw_icon.name = "store"
|
||||
throw_icon.screen_loc = ui_borg_store
|
||||
other += throw_icon
|
||||
|
||||
//Inventory
|
||||
robot_inventory = new /obj/screen()
|
||||
robot_inventory.name = "inventory"
|
||||
robot_inventory.icon = ui_style
|
||||
robot_inventory.icon = HUD.ui_style
|
||||
robot_inventory.icon_state = "inventory"
|
||||
robot_inventory.alpha = ui_alpha
|
||||
robot_inventory.color = ui_color
|
||||
robot_inventory.alpha = HUD.ui_alpha
|
||||
robot_inventory.color = HUD.ui_color
|
||||
robot_inventory.screen_loc = ui_borg_inventory
|
||||
src.other += robot_inventory
|
||||
other += robot_inventory
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.alpha = ui_alpha
|
||||
mymob.pullin.color = ui_color
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_borg_pull
|
||||
src.other += mymob.pullin
|
||||
pullin = new /obj/screen()
|
||||
pullin.icon = HUD.ui_style
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.alpha = HUD.ui_alpha
|
||||
pullin.color = HUD.ui_color
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_borg_pull
|
||||
other += pullin
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
zone_sel = new /obj/screen/zone_sel()
|
||||
zone_sel.icon = HUD.ui_style
|
||||
zone_sel.alpha = HUD.ui_alpha
|
||||
zone_sel.overlays.Cut()
|
||||
zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.gun_setting_icon.icon = ui_style
|
||||
mymob.gun_setting_icon.alpha = ui_alpha
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
mymob.item_use_icon.icon = ui_style
|
||||
mymob.item_use_icon.alpha = ui_alpha
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
mymob.gun_move_icon.icon = ui_style
|
||||
mymob.gun_move_icon.alpha = ui_alpha
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.icon = ui_style
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
gun_setting_icon.icon = HUD.ui_style
|
||||
gun_setting_icon.alpha = HUD.ui_alpha
|
||||
item_use_icon = new /obj/screen/gun/item(null)
|
||||
item_use_icon.icon = HUD.ui_style
|
||||
item_use_icon.alpha = HUD.ui_alpha
|
||||
gun_move_icon = new /obj/screen/gun/move(null)
|
||||
gun_move_icon.icon = HUD.ui_style
|
||||
gun_move_icon.alpha = HUD.ui_alpha
|
||||
radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
radio_use_icon.icon = HUD.ui_style
|
||||
radio_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.hands, mymob.healths, mymob.pullin, robot_inventory, mymob.gun_setting_icon)
|
||||
mymob.client.screen += src.adding + src.other
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
return
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += list( throw_icon, zone_sel, hands, healths, pullin, robot_inventory, gun_setting_icon)
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
|
||||
Reference in New Issue
Block a user