Merge pull request #7393 from Rykka-Stormheart/shep-dev-tg-alerts-updoot
Port lots of things that had to wait on alerts (Replaces Arokha's PR)
@@ -48,6 +48,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
pipe_color = null
|
||||
init_dir()
|
||||
|
||||
/obj/machinery/atmospherics/examine_icon()
|
||||
return icon(icon=initial(icon),icon_state=initial(icon_state))
|
||||
|
||||
// This is used to set up what directions pipes will connect to. Should be called inside New() and whenever a dir changes.
|
||||
/obj/machinery/atmospherics/proc/init_dir()
|
||||
return
|
||||
|
||||
@@ -27,6 +27,9 @@ var/list/mannequins_
|
||||
// Closets have magic appearances
|
||||
GLOBAL_LIST_EMPTY(closet_appearances)
|
||||
|
||||
// Times that players are allowed to respawn ("ckey" = world.time)
|
||||
GLOBAL_LIST_EMPTY(respawn_timers)
|
||||
|
||||
// Posters
|
||||
var/global/list/poster_designs = list()
|
||||
var/global/list/NT_poster_designs = list()
|
||||
|
||||
@@ -107,7 +107,7 @@ AngleToHue(hue)
|
||||
Converts an angle to a hue in the valid range.
|
||||
RotateHue(hsv, angle)
|
||||
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
|
||||
(Rotating red by 60<EFBFBD> produces yellow.) The result is another HSV or HSVA color with the same saturation and value
|
||||
(Rotating red by 60deg produces yellow.) The result is another HSV or HSVA color with the same saturation and value
|
||||
as the original, but a different hue.
|
||||
GrayScale(rgb)
|
||||
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
|
||||
@@ -679,7 +679,7 @@ proc/ColorTone(rgb, tone)
|
||||
var/curstate = A.icon_state || defstate
|
||||
|
||||
if(!((noIcon = (!curicon))))
|
||||
var/curstates = icon_states(curicon)
|
||||
var/curstates = cached_icon_states(curicon)
|
||||
if(!(curstate in curstates))
|
||||
if("" in curstates)
|
||||
curstate = ""
|
||||
@@ -689,19 +689,16 @@ proc/ColorTone(rgb, tone)
|
||||
var/curdir
|
||||
var/base_icon_dir //We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have
|
||||
|
||||
//These should use the parent's direction (most likely)
|
||||
if(!A.dir || A.dir == SOUTH)
|
||||
curdir = defdir
|
||||
else
|
||||
curdir = A.dir
|
||||
// Use the requested dir or the atom's current dir
|
||||
curdir = defdir || A.dir
|
||||
|
||||
//Try to remove/optimize this section ASAP, CPU hog.
|
||||
//Try to remove/optimize this section ASAP, CPU hog. //Slightly mitigated by implementing caching using cached_icon_states
|
||||
//Determines if there's directionals.
|
||||
if(!noIcon && curdir != SOUTH)
|
||||
var/exist = FALSE
|
||||
var/static/list/checkdirs = list(NORTH, EAST, WEST)
|
||||
for(var/i in checkdirs) //Not using GLOB for a reason.
|
||||
if(length(icon_states(icon(curicon, curstate, i))))
|
||||
if(length(cached_icon_states(icon(curicon, curstate, i))))
|
||||
exist = TRUE
|
||||
break
|
||||
if(!exist)
|
||||
@@ -739,8 +736,8 @@ proc/ColorTone(rgb, tone)
|
||||
continue
|
||||
var/current_layer = current.layer
|
||||
if(current_layer < 0)
|
||||
if(current_layer <= -1000)
|
||||
return flat
|
||||
//if(current_layer <= -1000)
|
||||
//return flat
|
||||
current_layer = process_set + A.layer + current_layer / 1000
|
||||
|
||||
for(var/p in 1 to layers.len)
|
||||
@@ -768,7 +765,7 @@ proc/ColorTone(rgb, tone)
|
||||
curblend = BLEND_OVERLAY
|
||||
add = icon(I.icon, I.icon_state, base_icon_dir)
|
||||
else // 'I' is an appearance object.
|
||||
add = getFlatIcon(image(I), curdir, curicon, curstate, curblend, FALSE, no_anim)
|
||||
add = getFlatIcon(image(I), I.dir||curdir, curicon, curstate, curblend, FALSE, no_anim)
|
||||
if(!add)
|
||||
continue
|
||||
// Find the new dimensions of the flat icon to fit the added overlay
|
||||
@@ -897,6 +894,37 @@ proc/ColorTone(rgb, tone)
|
||||
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
|
||||
return composite
|
||||
|
||||
GLOBAL_LIST_EMPTY(icon_state_lists)
|
||||
/proc/cached_icon_states(var/icon/I)
|
||||
if(!I)
|
||||
return list()
|
||||
var/key = I
|
||||
var/returnlist = GLOB.icon_state_lists[key]
|
||||
if(!returnlist)
|
||||
returnlist = icon_states(I)
|
||||
if(isfile(I)) // It's something that will stick around
|
||||
GLOB.icon_state_lists[key] = returnlist
|
||||
return returnlist
|
||||
|
||||
/proc/expire_states_cache(var/key)
|
||||
if(GLOB.icon_state_lists[key])
|
||||
GLOB.icon_state_lists -= key
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
GLOBAL_LIST_EMPTY(cached_examine_icons)
|
||||
/proc/set_cached_examine_icon(var/atom/A, var/icon/I, var/expiry = 12000)
|
||||
GLOB.cached_examine_icons[weakref(A)] = I
|
||||
if(expiry)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/uncache_examine_icon, weakref(A)), expiry, TIMER_UNIQUE)
|
||||
|
||||
/proc/get_cached_examine_icon(var/atom/A)
|
||||
var/weakref/WR = weakref(A)
|
||||
return GLOB.cached_examine_icons[WR]
|
||||
|
||||
/proc/uncache_examine_icon(var/weakref/WR)
|
||||
GLOB.cached_examine_icons -= WR
|
||||
|
||||
proc/adjust_brightness(var/color, var/value)
|
||||
if (!color) return "#FFFFFF"
|
||||
if (!value) return color
|
||||
|
||||
@@ -94,7 +94,7 @@ proc/age2agedescription(age)
|
||||
else return "unknown"
|
||||
|
||||
/proc/RoundHealth(health)
|
||||
var/list/icon_states = icon_states(ingame_hud_med)
|
||||
var/list/icon_states = cached_icon_states(ingame_hud_med)
|
||||
for(var/icon_state in icon_states)
|
||||
if(health >= text2num(icon_state))
|
||||
return icon_state
|
||||
|
||||
@@ -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
@@ -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
@@ -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()
|
||||
|
||||
@@ -6,83 +6,87 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/nudge_script_path = "nudge.py" // where the nudge.py script is located
|
||||
|
||||
var/log_ooc = 0 // log OOC channel
|
||||
var/log_access = 0 // log login/logout
|
||||
var/log_say = 0 // log client say
|
||||
var/log_admin = 0 // log admin actions
|
||||
var/log_debug = 1 // log debug output
|
||||
var/log_game = 0 // log game events
|
||||
var/log_vote = 0 // log voting
|
||||
var/log_whisper = 0 // log client whisper
|
||||
var/log_emote = 0 // log emotes
|
||||
var/log_attack = 0 // log attack messages
|
||||
var/log_adminchat = 0 // log admin chat messages
|
||||
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/log_runtime = 0 // logs world.log to a file
|
||||
var/log_world_output = 0 // log to_world_log(messages)
|
||||
var/log_graffiti = 0 // logs graffiti
|
||||
var/sql_enabled = 0 // for sql switching
|
||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
var/ert_admin_call_only = 0
|
||||
var/allow_vote_mode = 0 // allow votes to change mode
|
||||
var/allow_admin_jump = 1 // allows admin jumping
|
||||
var/allow_admin_spawning = 1 // allows admin item spawning
|
||||
var/allow_admin_rev = 1 // allows admin revives
|
||||
var/pregame_time = 180 // pregame time in seconds
|
||||
var/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
var/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
|
||||
var/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
|
||||
var/vote_autotransfer_interval = 36000 // length of time before next sequential autotransfer vote
|
||||
var/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100).
|
||||
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
|
||||
var/vote_no_dead = 0 // dead people can't vote (tbi)
|
||||
// var/enable_authentication = 0 // goon authentication
|
||||
var/del_new_on_log = 1 // del's new players if they log before they spawn in
|
||||
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
|
||||
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
|
||||
var/objectives_disabled = 0 //if objectives are disabled or not
|
||||
var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
|
||||
var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
|
||||
var/allow_Metadata = 0 // Metadata is supported.
|
||||
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
|
||||
var/fps = 20
|
||||
var/tick_limit_mc_init = TICK_LIMIT_MC_INIT_DEFAULT //SSinitialization throttling
|
||||
var/Tickcomp = 0
|
||||
var/socket_talk = 0 // use socket_talk to communicate with other processes
|
||||
var/list/resource_urls = null
|
||||
var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
|
||||
var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
|
||||
var/list/mode_names = list()
|
||||
var/list/modes = list() // allowed modes
|
||||
var/list/votable_modes = list() // votable modes
|
||||
var/list/probabilities = list() // relative probability of each mode
|
||||
var/list/player_requirements = list() // Overrides for how many players readied up a gamemode needs to start.
|
||||
var/list/player_requirements_secret = list() // Same as above, but for the secret gamemode.
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/enable_game_master = 0 // enables the 'smart' event system.
|
||||
var/allow_ai = 1 // allow ai job
|
||||
var/allow_ai_shells = FALSE // allow AIs to enter and leave special borg shells at will, and for those shells to be buildable.
|
||||
var/give_free_ai_shell = FALSE // allows a specific spawner object to instantiate a premade AI Shell
|
||||
var/hostedby = null
|
||||
var/respawn = 1
|
||||
var/guest_jobban = 1
|
||||
var/usewhitelist = 0
|
||||
var/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
|
||||
var/show_mods = 0
|
||||
var/show_devs = 0
|
||||
var/show_event_managers = 0
|
||||
var/mods_can_tempban = 0
|
||||
var/mods_can_job_tempban = 0
|
||||
var/mod_tempban_max = 1440
|
||||
var/mod_job_tempban_max = 1440
|
||||
var/load_jobs_from_txt = 0
|
||||
var/ToRban = 0
|
||||
var/automute_on = 0 //enables automuting/spam prevention
|
||||
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
|
||||
var/static/log_ooc = 0 // log OOC channel
|
||||
var/static/log_access = 0 // log login/logout
|
||||
var/static/log_say = 0 // log client say
|
||||
var/static/log_admin = 0 // log admin actions
|
||||
var/static/log_debug = 1 // log debug output
|
||||
var/static/log_game = 0 // log game events
|
||||
var/static/log_vote = 0 // log voting
|
||||
var/static/log_whisper = 0 // log client whisper
|
||||
var/static/log_emote = 0 // log emotes
|
||||
var/static/log_attack = 0 // log attack messages
|
||||
var/static/log_adminchat = 0 // log admin chat messages
|
||||
var/static/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||
var/static/log_pda = 0 // log pda messages
|
||||
var/static/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/static/log_runtime = 0 // logs world.log to a file
|
||||
var/static/log_world_output = 0 // log to_world_log(messages)
|
||||
var/static/log_graffiti = 0 // logs graffiti
|
||||
var/static/sql_enabled = 0 // for sql switching
|
||||
var/static/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/static/allow_vote_restart = 0 // allow votes to restart
|
||||
var/static/ert_admin_call_only = 0
|
||||
var/static/allow_vote_mode = 0 // allow votes to change mode
|
||||
var/static/allow_admin_jump = 1 // allows admin jumping
|
||||
var/static/allow_admin_spawning = 1 // allows admin item spawning
|
||||
var/static/allow_admin_rev = 1 // allows admin revives
|
||||
var/static/pregame_time = 180 // pregame time in seconds
|
||||
var/static/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
var/static/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
|
||||
var/static/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
|
||||
var/static/vote_autotransfer_interval = 36000 // length of time before next sequential autotransfer vote
|
||||
var/static/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100).
|
||||
var/static/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
|
||||
var/static/vote_no_dead = 0 // dead people can't vote (tbi)
|
||||
// var/static/enable_authentication = 0 // goon authentication
|
||||
var/static/del_new_on_log = 1 // del's new players if they log before they spawn in
|
||||
var/static/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
|
||||
var/static/traitor_scaling = 0 //if amount of traitors scales based on amount of players
|
||||
var/static/objectives_disabled = 0 //if objectives are disabled or not
|
||||
var/static/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
|
||||
var/static/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
|
||||
var/static/allow_Metadata = 0 // Metadata is supported.
|
||||
var/static/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
|
||||
var/static/fps = 20
|
||||
var/static/tick_limit_mc_init = TICK_LIMIT_MC_INIT_DEFAULT //SSinitialization throttling
|
||||
var/static/Tickcomp = 0
|
||||
var/static/socket_talk = 0 // use socket_talk to communicate with other processes
|
||||
var/static/list/resource_urls = null
|
||||
var/static/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
|
||||
var/static/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
|
||||
var/static/list/mode_names = list()
|
||||
var/static/list/modes = list() // allowed modes
|
||||
var/static/list/votable_modes = list() // votable modes
|
||||
var/static/list/probabilities = list() // relative probability of each mode
|
||||
var/static/list/player_requirements = list() // Overrides for how many players readied up a gamemode needs to start.
|
||||
var/static/list/player_requirements_secret = list() // Same as above, but for the secret gamemode.
|
||||
var/static/humans_need_surnames = 0
|
||||
var/static/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/static/enable_game_master = 0 // enables the 'smart' event system.
|
||||
var/static/allow_ai = 1 // allow ai job
|
||||
var/static/allow_ai_shells = FALSE // allow AIs to enter and leave special borg shells at will, and for those shells to be buildable.
|
||||
var/static/give_free_ai_shell = FALSE // allows a specific spawner object to instantiate a premade AI Shell
|
||||
var/static/hostedby = null
|
||||
|
||||
var/static/respawn = 1
|
||||
var/static/respawn_time = 3000 // time before a dead player is allowed to respawn (in ds, though the config file asks for minutes, and it's converted below)
|
||||
var/static/respawn_message = "<span class='notice'><B>Make sure to play a different character, and please roleplay correctly!</B></span>"
|
||||
|
||||
var/static/guest_jobban = 1
|
||||
var/static/usewhitelist = 0
|
||||
var/static/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
|
||||
var/static/show_mods = 0
|
||||
var/static/show_devs = 0
|
||||
var/static/show_event_managers = 0
|
||||
var/static/mods_can_tempban = 0
|
||||
var/static/mods_can_job_tempban = 0
|
||||
var/static/mod_tempban_max = 1440
|
||||
var/static/mod_job_tempban_max = 1440
|
||||
var/static/load_jobs_from_txt = 0
|
||||
var/static/ToRban = 0
|
||||
var/static/automute_on = 0 //enables automuting/spam prevention
|
||||
var/static/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
|
||||
|
||||
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
|
||||
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
|
||||
@@ -481,6 +485,13 @@ var/list/gamemode_cache = list()
|
||||
if ("norespawn")
|
||||
config.respawn = 0
|
||||
|
||||
if ("respawn_time")
|
||||
var/raw_minutes = text2num(value)
|
||||
config.respawn_time = raw_minutes MINUTES
|
||||
|
||||
if ("respawn_message")
|
||||
config.respawn_message = value
|
||||
|
||||
if ("servername")
|
||||
config.server_name = value
|
||||
|
||||
|
||||
@@ -210,6 +210,10 @@
|
||||
|
||||
return output
|
||||
|
||||
// Don't make these call bicon or anything, these are what bicon uses. They need to return an icon.
|
||||
/atom/proc/examine_icon()
|
||||
return icon(icon=src.icon, icon_state=src.icon_state, dir=SOUTH, frame=1, moving=0)
|
||||
|
||||
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
|
||||
// see code/modules/mob/mob_movement.dm for more.
|
||||
/atom/proc/relaymove()
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
var/static/image/radial_image_lighttoggle = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_light")
|
||||
var/static/image/radial_image_statpanel = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine2")
|
||||
|
||||
var/datum/mini_hud/mech/minihud
|
||||
|
||||
//Mech actions
|
||||
|
||||
@@ -323,6 +324,7 @@
|
||||
QDEL_NULL(pr_give_air)
|
||||
QDEL_NULL(pr_internal_damage)
|
||||
QDEL_NULL(spark_system)
|
||||
QDEL_NULL(minihud)
|
||||
|
||||
mechas_list -= src //global mech list
|
||||
. = ..()
|
||||
@@ -1884,6 +1886,8 @@
|
||||
verbs -= /obj/mecha/verb/toggle_cloak
|
||||
|
||||
occupant.in_enclosed_vehicle = 1 //Useful for when you need to know if someone is in a mecho.
|
||||
if(occupant.hud_used)
|
||||
minihud = new (occupant.hud_used, src)
|
||||
update_cell_alerts()
|
||||
update_damage_alerts()
|
||||
set_dir(dir_in)
|
||||
@@ -1949,6 +1953,7 @@
|
||||
/obj/mecha/proc/go_out() //Eject/Exit the mech. Yes this is for easier searching.
|
||||
if(!src.occupant) return
|
||||
var/atom/movable/mob_container
|
||||
QDEL_NULL(minihud)
|
||||
if(ishuman(occupant))
|
||||
mob_container = src.occupant
|
||||
RemoveActions(occupant, human_occupant=1)//AEIOU
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
overlays.Cut()
|
||||
if(front_id)
|
||||
var/tiny_state = "id-generic"
|
||||
if("id-"+front_id.icon_state in icon_states(icon))
|
||||
if("id-"+front_id.icon_state in cached_icon_states(icon))
|
||||
tiny_state = "id-"+front_id.icon_state
|
||||
var/image/tiny_image = new/image(icon, icon_state = tiny_state)
|
||||
tiny_image.appearance_flags = RESET_COLOR
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/cult = 0
|
||||
|
||||
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
|
||||
. = icon_states(icon)
|
||||
. = cached_icon_states(icon)
|
||||
. -= "on"
|
||||
. -= "narsiebistro"
|
||||
. -= "empty"
|
||||
|
||||
@@ -114,7 +114,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
|
||||
var/subtraction_icon_state = "[icon_state]-subtract"
|
||||
var/cache_string = "[icon_state]_[T.icon]_[T.icon_state]"
|
||||
if(T && subtraction_icon_state in icon_states(icon))
|
||||
if(T && subtraction_icon_state in cached_icon_states(icon))
|
||||
cut_overlays()
|
||||
// If we've made the same icon before, just recycle it.
|
||||
if(cache_string in GLOB.cliff_icon_cache)
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
else
|
||||
. += "<span class='notice'>There is a thick layer of silicate covering it.</span>"
|
||||
|
||||
/obj/structure/window/examine_icon()
|
||||
return icon(icon=initial(icon),icon_state=initial(icon_state))
|
||||
|
||||
/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
|
||||
var/initialhealth = health
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
I.color = reinf_material.icon_colour
|
||||
add_overlay(I)
|
||||
else
|
||||
if("[reinf_material.icon_reinf]0" in icon_states('icons/turf/wall_masks.dmi'))
|
||||
if("[reinf_material.icon_reinf]0" in cached_icon_states('icons/turf/wall_masks.dmi'))
|
||||
// Directional icon
|
||||
for(var/i = 1 to 4)
|
||||
I = image('icons/turf/wall_masks.dmi', "[reinf_material.icon_reinf][wall_connections[i]]", dir = 1<<(i-1))
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
dismantle_wall(null,null,1)
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/examine_icon()
|
||||
return icon(icon=initial(icon), icon_state=initial(icon_state))
|
||||
|
||||
/turf/simulated/wall/process()
|
||||
// Calling parent will kill processing
|
||||
if(!radiate())
|
||||
|
||||
@@ -265,32 +265,39 @@ Ccomp's first proc.
|
||||
/client/proc/allow_character_respawn()
|
||||
set category = "Special Verbs"
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the wait to respawn or allow them to re-enter their corpse."
|
||||
set desc = "Let a player bypass the wait to respawn or allow them to re-enter their corpse."
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/list/ghosts= get_ghosts(1,1)
|
||||
|
||||
var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts
|
||||
var/target = input("Select a ckey to allow to rejoin", "Allow Respawn Selector") as null|anything in GLOB.respawn_timers
|
||||
if(!target)
|
||||
to_chat(src, "Hrm, appears you didn't select a ghost") // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
return
|
||||
|
||||
if(GLOB.respawn_timers[target] == -1) // Their respawn timer is set to -1, which is 'not allowed to respawn'
|
||||
var/response = alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?","No","Yes")
|
||||
if(response == "No")
|
||||
return
|
||||
|
||||
GLOB.respawn_timers -= target
|
||||
|
||||
var/mob/observer/dead/G = ghosts[target]
|
||||
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
|
||||
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
|
||||
if(response == "No") return
|
||||
G.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb.
|
||||
timeofdeath is used for bodies on autopsy but since we're messing with a ghost I'm pretty sure
|
||||
there won't be an autopsy.
|
||||
*/
|
||||
G.has_enabled_antagHUD = 2
|
||||
G.can_reenter_corpse = 1
|
||||
var/found_client = FALSE
|
||||
for(var/c in GLOB.clients)
|
||||
var/client/C = c
|
||||
if(C.ckey == target)
|
||||
found_client = C
|
||||
to_chat(C, "<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>")
|
||||
if(isobserver(C.mob))
|
||||
var/mob/observer/dead/G = C.mob
|
||||
G.can_reenter_corpse = 1
|
||||
to_chat(C, "<span class='notice'><B>You can also re-enter your corpse, if you still have one!</B></span>")
|
||||
break
|
||||
|
||||
G:show_message(text("<font color='blue'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></font>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the respawn time limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the respawn time limit", 1)
|
||||
if(!found_client)
|
||||
to_chat(src, "<span class='notice'>The associated client didn't appear to be connected, so they couldn't be notified, but they can now respawn if they reconnect.</span>")
|
||||
|
||||
log_admin("[key_name(usr)] allowed [found_client ? key_name(found_client) : target] to bypass the respawn time limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [found_client ? key_name_admin(found_client) : target] to bypass the respawn time limit", 1)
|
||||
|
||||
|
||||
/client/proc/toggle_antagHUD_use()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.hud_used = new /datum/hud(H)
|
||||
H.instantiate_hud(H.hud_used)
|
||||
H.create_mob_hud(H.hud_used)
|
||||
return ..()
|
||||
|
||||
/mob/living/Destroy()
|
||||
|
||||
@@ -210,12 +210,12 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
directions = list(SOUTH)
|
||||
|
||||
var/sprites = list()
|
||||
for (var/icon_state_name in icon_states(I))
|
||||
for (var/icon_state_name in cached_icon_states(I))
|
||||
for (var/direction in directions)
|
||||
var/suffix = (directions.len > 1) ? "-[dir2text(direction)]" : ""
|
||||
var/sprite_name = "[prefix][icon_state_name][suffix]"
|
||||
var/icon/sprite = icon(I, icon_state=icon_state_name, dir=direction, frame=1, moving=FALSE)
|
||||
if (!sprite || !length(icon_states(sprite))) // that direction or state doesn't exist
|
||||
if (!sprite || !length(cached_icon_states(sprite))) // that direction or state doesn't exist
|
||||
continue
|
||||
sprites[sprite_name] = sprite
|
||||
return sprites
|
||||
|
||||
@@ -889,7 +889,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
dat += "<tr>"
|
||||
dat += "<td width = 400>[current_species.blurb]</td>"
|
||||
dat += "<td width = 200 align='center'>"
|
||||
if("preview" in icon_states(current_species.icobase))
|
||||
if("preview" in cached_icon_states(current_species.icobase))
|
||||
usr << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png")
|
||||
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
|
||||
dat += "<b>Language:</b> [current_species.species_language]<br/>"
|
||||
|
||||
@@ -785,7 +785,7 @@
|
||||
|
||||
//autodetect rollability
|
||||
if(rolled_down < 0)
|
||||
if(("[worn_state]_d_s" in icon_states(icon)) || ("[worn_state]_s" in icon_states(rolled_down_icon)) || ("[worn_state]_d_s" in icon_states(icon_override)))
|
||||
if(("[worn_state]_d_s" in cached_icon_states(icon)) || ("[worn_state]_s" in cached_icon_states(rolled_down_icon)) || ("[worn_state]_d_s" in cached_icon_states(icon_override)))
|
||||
rolled_down = 0
|
||||
|
||||
if(rolled_down == -1)
|
||||
@@ -822,11 +822,11 @@
|
||||
under_icon = sprite_sheets[H.species.get_bodytype(H)]
|
||||
else if(item_icons && item_icons[slot_w_uniform_str])
|
||||
under_icon = item_icons[slot_w_uniform_str]
|
||||
else if ("[worn_state]_s" in icon_states(rolled_down_icon))
|
||||
else if ("[worn_state]_s" in cached_icon_states(rolled_down_icon))
|
||||
under_icon = rolled_down_icon
|
||||
|
||||
// The _s is because the icon update procs append it.
|
||||
if((under_icon == rolled_down_icon && "[worn_state]_s" in icon_states(under_icon)) || ("[worn_state]_d_s" in icon_states(under_icon)))
|
||||
if((under_icon == rolled_down_icon && "[worn_state]_s" in cached_icon_states(under_icon)) || ("[worn_state]_d_s" in cached_icon_states(under_icon)))
|
||||
if(rolled_down != 1)
|
||||
rolled_down = 0
|
||||
else
|
||||
@@ -845,13 +845,13 @@
|
||||
under_icon = sprite_sheets[H.species.get_bodytype(H)]
|
||||
else if(item_icons && item_icons[slot_w_uniform_str])
|
||||
under_icon = item_icons[slot_w_uniform_str]
|
||||
else if ("[worn_state]_s" in icon_states(rolled_down_sleeves_icon))
|
||||
else if ("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
|
||||
under_icon = rolled_down_sleeves_icon
|
||||
else if(index)
|
||||
under_icon = new /icon("[INV_W_UNIFORM_DEF_ICON]_[index].dmi")
|
||||
|
||||
// The _s is because the icon update procs append it.
|
||||
if((under_icon == rolled_down_sleeves_icon && "[worn_state]_s" in icon_states(under_icon)) || ("[worn_state]_r_s" in icon_states(under_icon)))
|
||||
if((under_icon == rolled_down_sleeves_icon && "[worn_state]_s" in cached_icon_states(under_icon)) || ("[worn_state]_r_s" in cached_icon_states(under_icon)))
|
||||
if(rolled_sleeves != 1)
|
||||
rolled_sleeves = 0
|
||||
else
|
||||
@@ -935,7 +935,7 @@
|
||||
if(rolled_down)
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
body_parts_covered &= ~(UPPER_TORSO|ARMS)
|
||||
if("[worn_state]_s" in icon_states(rolled_down_icon))
|
||||
if("[worn_state]_s" in cached_icon_states(rolled_down_icon))
|
||||
icon_override = rolled_down_icon
|
||||
item_state_slots[slot_w_uniform_str] = "[worn_state]"
|
||||
else
|
||||
@@ -968,7 +968,7 @@
|
||||
rolled_sleeves = !rolled_sleeves
|
||||
if(rolled_sleeves)
|
||||
body_parts_covered &= ~(ARMS)
|
||||
if("[worn_state]_s" in icon_states(rolled_down_sleeves_icon))
|
||||
if("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
|
||||
icon_override = rolled_down_sleeves_icon
|
||||
item_state_slots[slot_w_uniform_str] = "[worn_state]"
|
||||
else
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
// Wiring! How exciting.
|
||||
var/datum/wires/rig/wires
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
var/datum/mini_hud/rig/minihud
|
||||
|
||||
/obj/item/weapon/rig/examine()
|
||||
. = ..()
|
||||
@@ -187,6 +188,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(minihud) // Just in case we get removed some other way
|
||||
|
||||
// If we've lost any parts, grab them back.
|
||||
var/mob/living/M
|
||||
@@ -362,6 +364,11 @@
|
||||
|
||||
// Success!
|
||||
canremove = seal_target
|
||||
if(M.hud_used)
|
||||
if(canremove)
|
||||
QDEL_NULL(minihud)
|
||||
else
|
||||
minihud = new (M.hud_used, src)
|
||||
to_chat(M, "<span class='notice'><b>Your entire suit [canremove ? "loosens as the components relax" : "tightens around you as the components lock into place"].</b></span>")
|
||||
M.client.screen -= booting_L
|
||||
qdel(booting_L)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(!inv_overlay)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_tie" in icon_states(icon_override))
|
||||
if("[tmp_icon_state]_tie" in cached_icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_tie"
|
||||
inv_overlay = image(icon = icon_override, icon_state = tmp_icon_state, dir = SOUTH)
|
||||
else
|
||||
@@ -48,7 +48,7 @@
|
||||
tmp_icon_state = on_rolled["rolled"]
|
||||
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_mob" in icon_states(icon_override))
|
||||
if("[tmp_icon_state]_mob" in cached_icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
mob_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else if(wearer && sprite_sheets[wearer.species.get_bodytype(wearer)]) //Teshari can finally into webbing, too!
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(!base_icon)
|
||||
base_icon = icon_state
|
||||
|
||||
if(!("[base_icon]_open" in icon_states(icon)))
|
||||
if(!("[base_icon]_open" in cached_icon_states(icon)))
|
||||
to_chat(user, "\The [src] doesn't seem to open.")
|
||||
return
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
var/list/new_item_icons = list()
|
||||
var/list/new_item_state_slots = list()
|
||||
|
||||
var/list/available_states = icon_states(CUSTOM_ITEM_MOB)
|
||||
var/list/available_states = cached_icon_states(CUSTOM_ITEM_MOB)
|
||||
|
||||
//If l_hand or r_hand are not present, preserve them using item_icons/item_state_slots
|
||||
//Then use icon_override to make every other slot use the custom sprites by default.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
This means that this file can be unchecked, along with the other examine files, and can be removed entirely with no effort.
|
||||
*/
|
||||
|
||||
#define EXAMINE_PANEL_PADDING " "
|
||||
#define EXAMINE_PANEL_PADDING " "
|
||||
|
||||
/atom/
|
||||
var/description_info = null //Helpful blue text.
|
||||
@@ -56,7 +56,7 @@
|
||||
description_holders["interactions"] = A.get_description_interaction()
|
||||
|
||||
description_holders["name"] = "[A.name]"
|
||||
description_holders["icon"] = "\icon[A]"
|
||||
description_holders["icon"] = "\icon[A.examine_icon()]"
|
||||
description_holders["desc"] = A.desc
|
||||
|
||||
/mob/Stat()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
var/image/fruit_base = image('icons/obj/hydroponics_products.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]-product")
|
||||
fruit_base.color = "[seed.get_trait(TRAIT_PRODUCT_COLOUR)]"
|
||||
plant_icon.overlays |= fruit_base
|
||||
if("[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf" in icon_states('icons/obj/hydroponics_products.dmi'))
|
||||
if("[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf" in cached_icon_states('icons/obj/hydroponics_products.dmi'))
|
||||
var/image/fruit_leaves = image('icons/obj/hydroponics_products.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf")
|
||||
fruit_leaves.color = "[seed.get_trait(TRAIT_PLANT_COLOUR)]"
|
||||
plant_icon.overlays |= fruit_leaves
|
||||
|
||||
@@ -53,7 +53,7 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
/datum/controller/plants/proc/setup()
|
||||
|
||||
// Build the icon lists.
|
||||
for(var/icostate in icon_states('icons/obj/hydroponics_growing.dmi'))
|
||||
for(var/icostate in cached_icon_states('icons/obj/hydroponics_growing.dmi'))
|
||||
var/split = findtext(icostate,"-")
|
||||
if(!split)
|
||||
// invalid icon_state
|
||||
@@ -71,7 +71,7 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
if(!(base in GLOB.forbidden_plant_growth_sprites))
|
||||
accessible_plant_sprites[base] = ikey
|
||||
|
||||
for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi'))
|
||||
for(var/icostate in cached_icon_states('icons/obj/hydroponics_products.dmi'))
|
||||
var/split = findtext(icostate,"-")
|
||||
var/base = copytext(icostate,1,split)
|
||||
if(split)
|
||||
|
||||
@@ -6,3 +6,6 @@
|
||||
plane_holder.set_vis(VIS_CLOAKED, TRUE)
|
||||
plane_holder.set_vis(VIS_AI_EYE, TRUE)
|
||||
plane = PLANE_GHOSTS
|
||||
if(cleanup_timer)
|
||||
deltimer(cleanup_timer)
|
||||
cleanup_timer = null
|
||||
@@ -3,3 +3,5 @@
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
qdel(src)
|
||||
else
|
||||
cleanup_timer = QDEL_IN(src, 10 MINUTES)
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"Beepsky" = "secbot"
|
||||
)
|
||||
var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners.
|
||||
var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns
|
||||
|
||||
/mob/observer/dead/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
@@ -129,6 +130,7 @@
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
..()
|
||||
|
||||
/mob/observer/dead/Topic(href, href_list)
|
||||
@@ -152,6 +154,13 @@
|
||||
if(new_stat != DEAD)
|
||||
CRASH("It is best if observers stay dead, thank you.")
|
||||
|
||||
/mob/observer/dead/examine_icon()
|
||||
var/icon/I = get_cached_examine_icon(src)
|
||||
if(!I)
|
||||
I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE)
|
||||
set_cached_examine_icon(src, I, 200 SECONDS)
|
||||
return I
|
||||
|
||||
/*
|
||||
Transfer_mind is there to check if mob is being deleted/not going to have a body.
|
||||
Works together with spawning an observer, noted above.
|
||||
@@ -220,6 +229,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
if(ghost)
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
ghost.set_respawn_timer()
|
||||
announce_ghost_joinleave(ghost)
|
||||
|
||||
/mob/observer/dead/can_use_hands() return 0
|
||||
@@ -290,6 +300,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
|
||||
if(response == "No") return
|
||||
can_reenter_corpse = FALSE
|
||||
set_respawn_timer(-1) // Foreeeever
|
||||
if(!has_enabled_antagHUD && !client.holder)
|
||||
has_enabled_antagHUD = TRUE
|
||||
|
||||
@@ -306,6 +317,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
|
||||
if(!A)
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in return_sorted_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
usr.on_mob_jump()
|
||||
|
||||
@@ -314,6 +330,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Follow" // "Haunt"
|
||||
set desc = "Follow and haunt a mob."
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
ManualFollow(target)
|
||||
@@ -347,6 +368,45 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
forceMove(T)
|
||||
sleep(15)
|
||||
|
||||
var/icon/I = icon(target.icon,target.icon_state,target.dir)
|
||||
|
||||
var/orbitsize = (I.Width()+I.Height())*0.5
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
var/rot_seg
|
||||
|
||||
/* We don't have this pref yet
|
||||
switch(ghost_orbit)
|
||||
if(GHOST_ORBIT_TRIANGLE)
|
||||
rot_seg = 3
|
||||
if(GHOST_ORBIT_SQUARE)
|
||||
rot_seg = 4
|
||||
if(GHOST_ORBIT_PENTAGON)
|
||||
rot_seg = 5
|
||||
if(GHOST_ORBIT_HEXAGON)
|
||||
rot_seg = 6
|
||||
else //Circular
|
||||
rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle
|
||||
*/
|
||||
|
||||
orbit(target, orbitsize, FALSE, 20, rot_seg)
|
||||
|
||||
/mob/observer/dead/orbit()
|
||||
set_dir(2) //reset dir so the right directional sprites show up
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/stop_orbit(datum/component/orbiter/orbits)
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
pixel_x = 0
|
||||
transform = null
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
/mob/observer/dead/proc/stop_following()
|
||||
following = null
|
||||
stop_orbit()
|
||||
|
||||
/mob/proc/update_following()
|
||||
. = get_turf(src)
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
@@ -361,7 +421,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/Destroy()
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
M.following = null
|
||||
M.stop_following()
|
||||
following_mobs = null
|
||||
return ..()
|
||||
|
||||
@@ -369,7 +429,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(ismob(following))
|
||||
var/mob/M = following
|
||||
M.following_mobs -= src
|
||||
following = null
|
||||
stop_following()
|
||||
return ..()
|
||||
|
||||
/mob/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
@@ -394,35 +454,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
set desc = "Teleport to a mob"
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
following = null
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
/*
|
||||
/mob/observer/dead/verb/boo()
|
||||
set category = "Ghost"
|
||||
set name = "Boo!"
|
||||
set desc= "Scare your crew members because of boredom!"
|
||||
|
||||
if(bootime > world.time) return
|
||||
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
|
||||
if(L)
|
||||
L.flicker()
|
||||
bootime = world.time + 600
|
||||
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
return
|
||||
//Maybe in the future we can add more <i>spooky</i> code here!
|
||||
return
|
||||
*/
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
stop_following()
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
|
||||
/mob/observer/dead/memory()
|
||||
set hidden = 1
|
||||
@@ -433,7 +486,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
|
||||
|
||||
/mob/observer/dead/Post_Incorpmove()
|
||||
following = null
|
||||
stop_following()
|
||||
|
||||
/mob/observer/dead/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
@@ -801,13 +854,19 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Blank pAI alert"
|
||||
set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope."
|
||||
if(usr.client.prefs.be_special & BE_PAI)
|
||||
|
||||
if(usr.client.prefs?.be_special & BE_PAI)
|
||||
var/count = 0
|
||||
for(var/obj/item/device/paicard/p in all_pai_cards)
|
||||
var/obj/item/device/paicard/PP = p
|
||||
if(PP.pai == null)
|
||||
count++
|
||||
PP.overlays += "pai-ghostalert"
|
||||
spawn(54)
|
||||
PP.overlays.Cut()
|
||||
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
|
||||
else
|
||||
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
|
||||
|
||||
/mob/observer/dead/speech_bubble_appearance()
|
||||
return "ghost"
|
||||
@@ -824,15 +883,7 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
if(message)
|
||||
to_chat(src, "<span class='ghostalert'><font size=4>[message]</font></span>")
|
||||
if(source)
|
||||
var/obj/screen/alert/A = throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning)
|
||||
if(A)
|
||||
if(client && client.prefs && client.prefs.UI_style)
|
||||
A.icon = ui_style2icon(client.prefs.UI_style)
|
||||
A.desc = message
|
||||
var/old_layer = source.layer
|
||||
source.layer = FLOAT_LAYER
|
||||
A.overlays += source
|
||||
source.layer = old_layer
|
||||
throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source)
|
||||
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
|
||||
if(sound)
|
||||
SEND_SOUND(src, sound(sound))
|
||||
|
||||
@@ -100,7 +100,8 @@
|
||||
if(mind) mind.store_memory("Time of death: [stationtime2text()]", 0)
|
||||
living_mob_list -= src
|
||||
dead_mob_list |= src
|
||||
|
||||
|
||||
set_respawn_timer()
|
||||
updateicon()
|
||||
handle_regular_hud_updates()
|
||||
handle_vision()
|
||||
|
||||
@@ -1566,6 +1566,13 @@
|
||||
else
|
||||
layer = HIDING_LAYER
|
||||
|
||||
/mob/living/carbon/human/examine_icon()
|
||||
var/icon/I = get_cached_examine_icon(src)
|
||||
if(!I)
|
||||
I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE)
|
||||
set_cached_examine_icon(src, I, 50 SECONDS)
|
||||
return I
|
||||
|
||||
/mob/living/carbon/human/proc/get_display_species()
|
||||
//Shows species in tooltip
|
||||
//Beepboops get special text if obviously beepboop
|
||||
|
||||
@@ -309,7 +309,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
|
||||
|
||||
//Handle husk overlay.
|
||||
if(husk && ("overlay_husk" in icon_states(species.icobase)))
|
||||
if(husk && ("overlay_husk" in cached_icon_states(species.icobase)))
|
||||
var/icon/mask = new(base_icon)
|
||||
var/icon/husk_over = new(species.icobase,"overlay_husk")
|
||||
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
@@ -127,11 +127,17 @@
|
||||
/mob/living/proc/handle_stunned()
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
throw_alert("stunned", /obj/screen/alert/stunned)
|
||||
else
|
||||
clear_alert("stunned")
|
||||
return stunned
|
||||
|
||||
/mob/living/proc/handle_weakened()
|
||||
if(weakened)
|
||||
AdjustWeakened(-1)
|
||||
throw_alert("weakened", /obj/screen/alert/weakened)
|
||||
else
|
||||
clear_alert("weakened")
|
||||
return weakened
|
||||
|
||||
/mob/living/proc/handle_stuttering()
|
||||
@@ -147,6 +153,9 @@
|
||||
/mob/living/proc/handle_drugged()
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
clear_alert("high")
|
||||
return druggy
|
||||
|
||||
/mob/living/proc/handle_slurring()
|
||||
@@ -157,11 +166,17 @@
|
||||
/mob/living/proc/handle_paralysed()
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
throw_alert("paralyzed", /obj/screen/alert/paralyzed)
|
||||
else
|
||||
clear_alert("paralyzed")
|
||||
return paralysis
|
||||
|
||||
/mob/living/proc/handle_confused()
|
||||
if(confused)
|
||||
AdjustConfused(-1)
|
||||
throw_alert("confused", /obj/screen/alert/confused)
|
||||
else
|
||||
clear_alert("confused")
|
||||
return confused
|
||||
|
||||
/mob/living/proc/handle_disabilities()
|
||||
|
||||
@@ -29,4 +29,5 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
|
||||
|
||||
//Handle job slot/tater cleanup.
|
||||
set_respawn_timer()
|
||||
clear_client()
|
||||
@@ -1,6 +1,5 @@
|
||||
/mob/living/simple_mob/instantiate_hud(var/datum/hud/hud)
|
||||
if(!client)
|
||||
return //Why bother.
|
||||
/mob/living/simple_mob/create_mob_hud(datum/hud/HUD)
|
||||
..()
|
||||
|
||||
var/ui_style = 'icons/mob/screen1_animal.dmi'
|
||||
if(ui_icons)
|
||||
@@ -14,9 +13,9 @@
|
||||
var/list/hotkeybuttons = list()
|
||||
var/list/slot_info = list()
|
||||
|
||||
hud.adding = adding
|
||||
hud.other = other
|
||||
hud.hotkeybuttons = hotkeybuttons
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
HUD.hotkeybuttons = hotkeybuttons
|
||||
|
||||
var/list/hud_elements = list()
|
||||
var/obj/screen/using
|
||||
@@ -65,8 +64,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
hud.action_intent = using
|
||||
HUD.adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
hud_elements |= using
|
||||
|
||||
@@ -82,8 +81,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM //These sit on the intent box
|
||||
hud.adding += using
|
||||
hud.help_intent = using
|
||||
HUD.adding += using
|
||||
HUD.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)
|
||||
@@ -94,8 +93,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.disarm_intent = using
|
||||
HUD.adding += using
|
||||
HUD.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)
|
||||
@@ -106,8 +105,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.grab_intent = using
|
||||
HUD.adding += using
|
||||
HUD.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)
|
||||
@@ -118,8 +117,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.hurt_intent = using
|
||||
HUD.adding += using
|
||||
HUD.hurt_intent = using
|
||||
|
||||
//Move intent (walk/run)
|
||||
using = new /obj/screen()
|
||||
@@ -129,8 +128,8 @@
|
||||
using.screen_loc = ui_movi
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
hud.move_intent = using
|
||||
HUD.adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
//Resist button
|
||||
using = new /obj/screen()
|
||||
@@ -140,7 +139,7 @@
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.hotkeybuttons += using
|
||||
HUD.hotkeybuttons += using
|
||||
|
||||
//Pull button
|
||||
pullin = new /obj/screen()
|
||||
@@ -148,7 +147,7 @@
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_pull_resist
|
||||
hud.hotkeybuttons += pullin
|
||||
HUD.hotkeybuttons += pullin
|
||||
hud_elements |= pullin
|
||||
|
||||
//Health status
|
||||
@@ -159,8 +158,6 @@
|
||||
healths.screen_loc = ui_health
|
||||
hud_elements |= healths
|
||||
|
||||
|
||||
|
||||
pain = new /obj/screen( null )
|
||||
|
||||
zone_sel = new /obj/screen/zone_sel( null )
|
||||
@@ -181,7 +178,7 @@
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.hotkeybuttons += using
|
||||
HUD.hotkeybuttons += using
|
||||
|
||||
//Equip detail
|
||||
using = new /obj/screen()
|
||||
@@ -191,7 +188,7 @@
|
||||
using.screen_loc = ui_equip
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Hand slots themselves
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
@@ -205,8 +202,8 @@
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
hud.r_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
HUD.r_hand_hud_object = inv_box
|
||||
HUD.adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
@@ -220,8 +217,8 @@
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
hud.l_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
HUD.l_hand_hud_object = inv_box
|
||||
HUD.adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
//Swaphand titlebar
|
||||
@@ -232,7 +229,7 @@
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
@@ -241,7 +238,7 @@
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Throw button
|
||||
throw_icon = new /obj/screen()
|
||||
@@ -251,15 +248,13 @@
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
throw_icon.color = ui_color
|
||||
throw_icon.alpha = ui_alpha
|
||||
hud.hotkeybuttons += throw_icon
|
||||
HUD.hotkeybuttons += throw_icon
|
||||
hud_elements |= throw_icon
|
||||
|
||||
extra_huds(hud,ui_style,hud_elements)
|
||||
extra_huds(HUD, HUD.ui_style, hud_elements)
|
||||
|
||||
client.screen = list()
|
||||
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
return
|
||||
if(client)
|
||||
client.screen = list()
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
@@ -333,46 +333,56 @@
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/proc/set_respawn_timer(var/time)
|
||||
// Try to figure out what time to use
|
||||
|
||||
// Special cases, can never respawn
|
||||
if(ticker?.mode?.deny_respawn)
|
||||
time = -1
|
||||
else if(!config.abandon_allowed)
|
||||
time = -1
|
||||
else if(!config.respawn)
|
||||
time = -1
|
||||
|
||||
// Special case for observing before game start
|
||||
else if(ticker?.current_state <= GAME_STATE_SETTING_UP)
|
||||
time = 1 MINUTE
|
||||
|
||||
// Wasn't given a time, use the config time
|
||||
else if(!time)
|
||||
time = config.respawn_time
|
||||
|
||||
var/keytouse = ckey
|
||||
// Try harder to find a key to use
|
||||
if(!keytouse && key)
|
||||
keytouse = ckey(key)
|
||||
else if(!keytouse && mind?.key)
|
||||
keytouse = ckey(mind.key)
|
||||
|
||||
GLOB.respawn_timers[keytouse] = world.time + time
|
||||
|
||||
/mob/observer/dead/set_respawn_timer()
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD)
|
||||
..(-1)
|
||||
else
|
||||
return // Don't set it, no need
|
||||
|
||||
/mob/verb/abandon_mob()
|
||||
set name = "Respawn"
|
||||
set name = "Return to Menu"
|
||||
set category = "OOC"
|
||||
|
||||
if (!( config.abandon_allowed ))
|
||||
to_chat(usr, "<span class='notice'>Respawn is disabled.</span>")
|
||||
return
|
||||
if ((stat != 2 || !( ticker )))
|
||||
if(stat != DEAD || !ticker)
|
||||
to_chat(usr, "<span class='notice'><B>You must be dead to use this!</B></span>")
|
||||
return
|
||||
if (ticker.mode && ticker.mode.deny_respawn) //BS12 EDIT
|
||||
to_chat(usr, "<span class='notice'>Respawn is disabled for this roundtype.</span>")
|
||||
return
|
||||
else
|
||||
var/deathtime = world.time - src.timeofdeath
|
||||
if(istype(src,/mob/observer/dead))
|
||||
var/mob/observer/dead/G = src
|
||||
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
to_chat(usr, "<font color='blue'><B>By using the antagHUD you forfeit the ability to join the round.</B></font>")
|
||||
return
|
||||
var/deathtimeminutes = round(deathtime / 600)
|
||||
var/pluralcheck = "minute"
|
||||
if(deathtimeminutes == 0)
|
||||
pluralcheck = ""
|
||||
else if(deathtimeminutes == 1)
|
||||
pluralcheck = " [deathtimeminutes] minute and"
|
||||
else if(deathtimeminutes > 1)
|
||||
pluralcheck = " [deathtimeminutes] minutes and"
|
||||
var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1)
|
||||
to_chat(usr, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.")
|
||||
|
||||
if ((deathtime < (5 * 600)) && (ticker && ticker.current_state > GAME_STATE_PREGAME))
|
||||
to_chat(usr, "You must wait 5 minutes to respawn!")
|
||||
// Final chance to abort "respawning"
|
||||
if(mind && timeofdeath) // They had spawned before
|
||||
var/choice = alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", "No, wait", "Yes, leave")
|
||||
if(choice == "No, wait")
|
||||
return
|
||||
else
|
||||
to_chat(usr, "You can respawn now, enjoy your new life!")
|
||||
|
||||
log_game("[usr.name]/[usr.key] used abandon mob.")
|
||||
|
||||
to_chat(usr, "<font color='blue'><B>Make sure to play a different character, and please roleplay correctly!</B></font>")
|
||||
|
||||
// Beyond this point, you're going to respawn
|
||||
to_chat(usr, config.respawn_message)
|
||||
|
||||
if(!client)
|
||||
log_game("[usr.key] AM failed due to disconnect.")
|
||||
|
||||
@@ -9,7 +9,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
|
||||
|
||||
/obj/effect/lobby_image/Initialize()
|
||||
icon = using_map.lobby_icon
|
||||
var/known_icon_states = icon_states(icon)
|
||||
var/known_icon_states = cached_icon_states(icon)
|
||||
for(var/lobby_screen in using_map.lobby_screens)
|
||||
if(!(lobby_screen in known_icon_states))
|
||||
error("Lobby screen '[lobby_screen]' did not exist in the icon set [icon].")
|
||||
|
||||
@@ -120,8 +120,9 @@
|
||||
new_player_panel_proc()
|
||||
|
||||
if(href_list["observe"])
|
||||
var/alert_time = ticker?.current_state <= GAME_STATE_SETTING_UP ? 1 : round(config.respawn_time/10/60)
|
||||
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait 5 minutes before being able to respawn!","Player Setup","Yes","No") == "Yes")
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait up to [alert_time] minute\s before being able to spawn into the game!","Player Setup","Yes","No") == "Yes")
|
||||
if(!client) return 1
|
||||
|
||||
//Make a new mannequin quickly, and allow the observer to take the appearance
|
||||
@@ -143,7 +144,6 @@
|
||||
observer.forceMove(O.loc)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.</span>")
|
||||
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
|
||||
|
||||
announce_ghost_joinleave(src)
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
observer.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
observer.key = key
|
||||
observer.set_respawn_timer(time_till_respawn()) // Will keep their existing time if any, or return 0 and pass 0 into set_respawn_timer which will use the defaults
|
||||
qdel(src)
|
||||
|
||||
return 1
|
||||
@@ -163,6 +164,12 @@
|
||||
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
|
||||
to_chat(usr, "<font color='red'>The round is either not ready, or has already finished...</font>")
|
||||
return
|
||||
var/time_till_respawn = time_till_respawn()
|
||||
if(time_till_respawn == -1) // Special case, never allowed to respawn
|
||||
to_chat(usr, "<span class='warning'>Respawning is not allowed!</span>")
|
||||
else if(time_till_respawn) // Nonzero time to respawn
|
||||
to_chat(usr, "<span class='warning'>You can't respawn yet! You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.</span>")
|
||||
return
|
||||
LateChoices()
|
||||
|
||||
if(href_list["manifest"])
|
||||
@@ -331,6 +338,23 @@
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/mob/new_player/proc/time_till_respawn()
|
||||
if(!ckey)
|
||||
return -1 // What?
|
||||
|
||||
var/timer = GLOB.respawn_timers[ckey]
|
||||
// No timer at all
|
||||
if(!timer)
|
||||
return 0
|
||||
// Special case, infinite timer
|
||||
if(timer == -1)
|
||||
return -1
|
||||
// Timer expired
|
||||
if(timer <= world.time)
|
||||
GLOB.respawn_timers -= ckey
|
||||
return 0
|
||||
// Timer still going
|
||||
return timer - world.time
|
||||
|
||||
/mob/new_player/proc/IsJobAvailable(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
/proc/magazine_icondata_cache_add(var/obj/item/ammo_magazine/M)
|
||||
var/list/icon_keys = list()
|
||||
var/list/ammo_states = list()
|
||||
var/list/states = icon_states(M.icon)
|
||||
var/list/states = cached_icon_states(M.icon)
|
||||
for(var/i = 0, i <= M.max_ammo, i++)
|
||||
var/ammo_state = "[M.icon_state]-[i]"
|
||||
if(ammo_state in states)
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
var/item_place = 1 //allows items to be placed on the table, but not on benches.
|
||||
|
||||
/obj/structure/table/examine_icon()
|
||||
return icon(icon=initial(icon), icon_state=initial(icon_state)) //Basically the map preview version
|
||||
|
||||
/obj/structure/table/proc/update_material()
|
||||
var/old_maxhealth = maxhealth
|
||||
if(!material)
|
||||
|
||||
@@ -278,31 +278,45 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
var/list/partial = splittext(iconData, "{")
|
||||
return replacetext(copytext(partial[2], 3, -5), "\n", "")
|
||||
|
||||
/proc/expire_bicon_cache(key)
|
||||
if(GLOB.bicon_cache[key])
|
||||
GLOB.bicon_cache -= key
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
GLOBAL_LIST_EMPTY(bicon_cache) // Cache of the <img> tag results, not the icons
|
||||
/proc/bicon(var/obj, var/use_class = 1, var/custom_classes = "")
|
||||
var/class = use_class ? "class='icon misc [custom_classes]'" : null
|
||||
if (!obj)
|
||||
if(!obj)
|
||||
return
|
||||
|
||||
var/static/list/bicon_cache = list()
|
||||
if (isicon(obj))
|
||||
//Icon refs get reused all the time especially on temporarily made ones like chat tags, too difficult to cache.
|
||||
//if (!bicon_cache["\ref[obj]"]) // Doesn't exist yet, make it.
|
||||
//bicon_cache["\ref[obj]"] = icon2base64(obj)
|
||||
|
||||
// Try to avoid passing bicon an /icon directly. It is better to pass it an atom so it can cache.
|
||||
if(isicon(obj)) // Passed an icon directly, nothing to cache-key on, as icon refs get reused *often*
|
||||
return "<img [class] src='data:image/png;base64,[icon2base64(obj)]'>"
|
||||
|
||||
// Either an atom or somebody fucked up and is gonna get a runtime, which I'm fine with.
|
||||
var/atom/A = obj
|
||||
var/key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]"
|
||||
if (!bicon_cache[key]) // Doesn't exist, make it.
|
||||
var/icon/I = icon(A.icon, A.icon_state, SOUTH, 1)
|
||||
if (ishuman(obj))
|
||||
I = getFlatIcon(obj) //Ugly
|
||||
bicon_cache[key] = icon2base64(I, key)
|
||||
var/key
|
||||
var/changes_often = ishuman(A) || isobserver(A) // If this ends up with more, move it into a proc or var on atom.
|
||||
|
||||
if(changes_often)
|
||||
key = "\ref[A]"
|
||||
else
|
||||
key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]"
|
||||
|
||||
var/base64 = GLOB.bicon_cache[key]
|
||||
// Non-human atom, no cache
|
||||
if(!base64) // Doesn't exist, make it.
|
||||
base64 = icon2base64(A.examine_icon(), key)
|
||||
GLOB.bicon_cache[key] = base64
|
||||
if(changes_often)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/expire_bicon_cache, key), 50 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
// May add a class to the img tag created by bicon
|
||||
if(use_class)
|
||||
class = "class='icon [A.icon_state] [custom_classes]'"
|
||||
|
||||
return "<img [class] src='data:image/png;base64,[bicon_cache[key]]'>"
|
||||
return "<img [class] src='data:image/png;base64,[base64]'>"
|
||||
|
||||
//Checks if the message content is a valid to_chat message
|
||||
/proc/is_valid_tochat_message(message)
|
||||
|
||||
@@ -196,10 +196,15 @@ ANTAG_HUD_RESTRICTED
|
||||
## allow AI job
|
||||
ALLOW_AI
|
||||
|
||||
|
||||
## disable abandon mob
|
||||
## Disable respawning
|
||||
# NORESPAWN
|
||||
|
||||
## set a respawn time (in minutes)
|
||||
# RESPAWN_TIME 5
|
||||
|
||||
## set a message to give to players when they respawn
|
||||
# RESPAWN_MESSAGE Remember to play a different character or something!
|
||||
|
||||
## disables calling del(src) on newmobs if they logout before spawnin in
|
||||
# DONT_DEL_NEWMOB
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 109 KiB |
BIN
icons/mob/screen_ghost.dmi
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
icons/mob/screen_rigmech.dmi
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
@@ -127,14 +127,15 @@
|
||||
#include "code\_onclick\hud\alert.dm"
|
||||
#include "code\_onclick\hud\alien_larva.dm"
|
||||
#include "code\_onclick\hud\fullscreen.dm"
|
||||
#include "code\_onclick\hud\ghost.dm"
|
||||
#include "code\_onclick\hud\gun_mode.dm"
|
||||
#include "code\_onclick\hud\hud.dm"
|
||||
#include "code\_onclick\hud\human.dm"
|
||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||
#include "code\_onclick\hud\other_mobs.dm"
|
||||
#include "code\_onclick\hud\picture_in_picture.dm"
|
||||
#include "code\_onclick\hud\radial.dm"
|
||||
#include "code\_onclick\hud\radial_persistent.dm"
|
||||
#include "code\_onclick\hud\rigmech.dm"
|
||||
#include "code\_onclick\hud\robot.dm"
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
#include "code\_onclick\hud\skybox.dm"
|
||||
|
||||