Merge pull request #14971 from Arturlang/nanite_updates

Ports update appearance
This commit is contained in:
silicons
2021-08-08 04:06:18 -07:00
committed by GitHub
218 changed files with 2251 additions and 1898 deletions
+1
View File
@@ -24,6 +24,7 @@
#define COLOR_BEIGE "#CEB689" #define COLOR_BEIGE "#CEB689"
#define COLOR_BLUE_GRAY "#75A2BB" #define COLOR_BLUE_GRAY "#75A2BB"
#define COLOR_BROWN "#BA9F6D" #define COLOR_BROWN "#BA9F6D"
#define COLOR_SOFT_RED "#FA8282"
#define COLOR_DARK_BROWN "#997C4F" #define COLOR_DARK_BROWN "#997C4F"
#define COLOR_DARK_ORANGE "#C3630C" #define COLOR_DARK_ORANGE "#C3630C"
#define COLOR_GREEN_GRAY "#99BB76" #define COLOR_GREEN_GRAY "#99BB76"
+16
View File
@@ -83,3 +83,19 @@
#define COMBAT_MODE_ACTIVE (1<<1) #define COMBAT_MODE_ACTIVE (1<<1)
/// combat mode is not active /// combat mode is not active
#define COMBAT_MODE_INACTIVE (1<<2) #define COMBAT_MODE_INACTIVE (1<<2)
// Update flags for [/atom/proc/update_appearance]
/// Update the atom's name
#define UPDATE_NAME (1<<0)
/// Update the atom's desc
#define UPDATE_DESC (1<<1)
/// Update the atom's icon state
#define UPDATE_ICON_STATE (1<<2)
/// Update the atom's overlays
#define UPDATE_OVERLAYS (1<<3)
/// Update the atom's greyscaling
#define UPDATE_GREYSCALE (1<<4)
/// Update the atom's smoothing. (More accurately, queue it for an update)
#define UPDATE_SMOOTHING (1<<5)
/// Update the atom's icon
#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS)
+56 -7
View File
@@ -74,11 +74,30 @@
#define EXAMINE_POSITION_BEFORE (1<<1) #define EXAMINE_POSITION_BEFORE (1<<1)
//End positions //End positions
#define COMPONENT_EXNAME_CHANGED (1<<0) #define COMPONENT_EXNAME_CHANGED (1<<0)
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): () ///from base of [/atom/proc/update_appearance]: (updates)
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1 #define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance"
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2 /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name.
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays) #define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" //from base of atom/update_icon(): (signalOut, did_anything) /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its desc.
#define COMSIG_ATOM_NO_UPDATE_DESC UPDATE_DESC
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its icon.
#define COMSIG_ATOM_NO_UPDATE_ICON UPDATE_ICON
///from base of [/atom/proc/update_name]: (updates)
#define COMSIG_ATOM_UPDATE_NAME "atom_update_name"
///from base of [/atom/proc/update_desc]: (updates)
#define COMSIG_ATOM_UPDATE_DESC "atom_update_desc"
///from base of [/atom/update_icon]: ()
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon"
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its icon state.
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays.
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS
///from base of [atom/update_icon_state]: ()
#define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state"
///from base of [/atom/update_overlays]: (list/new_overlays)
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays"
///from base of [/atom/update_icon]: (signalOut, did_anything)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon"
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom) #define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) #define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMPONENT_ATOM_BLOCK_EXIT 1 #define COMPONENT_ATOM_BLOCK_EXIT 1
@@ -112,8 +131,6 @@
///from obj/machinery/bsa/full/proc/fire(): () ///from obj/machinery/bsa/full/proc/fire(): ()
#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass" #define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass"
#define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0) #define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0)
///from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"
///from base of atom/setDir(): (old_dir, new_dir). Called before the direction changes. ///from base of atom/setDir(): (old_dir, new_dir). Called before the direction changes.
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" #define COMSIG_ATOM_DIR_CHANGE "atom_dir_change"
///from base of atom/handle_atom_del(): (atom/deleted) ///from base of atom/handle_atom_del(): (atom/deleted)
@@ -278,6 +295,32 @@
///from base of mob/AltClickOn(): (atom/A) ///from base of mob/AltClickOn(): (atom/A)
#define COMSIG_MOB_ALTCLICKON "mob_altclickon" #define COMSIG_MOB_ALTCLICKON "mob_altclickon"
// Lighting:
///from base of [atom/proc/set_light]: (l_range, l_power, l_color, l_on)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"
/// Blocks [/atom/proc/set_light], [/atom/proc/set_light_power], [/atom/proc/set_light_range], [/atom/proc/set_light_color], [/atom/proc/set_light_on], and [/atom/proc/set_light_flags].
#define COMPONENT_BLOCK_LIGHT_UPDATE (1<<0)
///Called right before the atom changes the value of light_power to a different one, from base [atom/proc/set_light_power]: (new_power)
#define COMSIG_ATOM_SET_LIGHT_POWER "atom_set_light_power"
///Called right after the atom changes the value of light_power to a different one, from base of [/atom/proc/set_light_power]: (old_power)
#define COMSIG_ATOM_UPDATE_LIGHT_POWER "atom_update_light_power"
///Called right before the atom changes the value of light_range to a different one, from base [atom/proc/set_light_range]: (new_range)
#define COMSIG_ATOM_SET_LIGHT_RANGE "atom_set_light_range"
///Called right after the atom changes the value of light_range to a different one, from base of [/atom/proc/set_light_range]: (old_range)
#define COMSIG_ATOM_UPDATE_LIGHT_RANGE "atom_update_light_range"
///Called right before the atom changes the value of light_color to a different one, from base [atom/proc/set_light_color]: (new_color)
#define COMSIG_ATOM_SET_LIGHT_COLOR "atom_set_light_color"
///Called right after the atom changes the value of light_color to a different one, from base of [/atom/proc/set_light_color]: (old_color)
#define COMSIG_ATOM_UPDATE_LIGHT_COLOR "atom_update_light_color"
///Called right before the atom changes the value of light_on to a different one, from base [atom/proc/set_light_on]: (new_value)
#define COMSIG_ATOM_SET_LIGHT_ON "atom_set_light_on"
///Called right after the atom changes the value of light_on to a different one, from base of [/atom/proc/set_light_on]: (old_value)
#define COMSIG_ATOM_UPDATE_LIGHT_ON "atom_update_light_on"
///Called right before the atom changes the value of light_flags to a different one, from base [atom/proc/set_light_flags]: (new_flags)
#define COMSIG_ATOM_SET_LIGHT_FLAGS "atom_set_light_flags"
///Called right after the atom changes the value of light_flags to a different one, from base of [/atom/proc/set_light_flags]: (old_flags)
#define COMSIG_ATOM_UPDATE_LIGHT_FLAGS "atom_update_light_flags"
// /client signals // /client signals
#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client) #define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client)
#define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client) #define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client)
@@ -361,6 +404,12 @@
// /machinery signals // /machinery signals
#define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant) #define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant)
///from base power_change() when power is lost
#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost"
///from base power_change() when power is restored
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored"
///from /obj/machinery/obj_break(damage_flag): (damage_flag)
#define COMSIG_MACHINERY_BROKEN "machinery_broken"
// /obj/item signals // /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user) #define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
+5 -1
View File
@@ -124,16 +124,20 @@
#define EMISSIVE_PLANE 13 #define EMISSIVE_PLANE 13
#define EMISSIVE_LAYER 13 #define EMISSIVE_LAYER 13
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
#define EMISSIVE_UNBLOCKABLE_PLANE 14 #define EMISSIVE_UNBLOCKABLE_PLANE 14
#define EMISSIVE_UNBLOCKABLE_LAYER 14 #define EMISSIVE_UNBLOCKABLE_LAYER 14
#define EMISSIVE_LAYER_UNBLOCKABLE 14
#define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE" #define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE"
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
#define LIGHTING_PLANE 15 #define LIGHTING_PLANE 15
#define LIGHTING_LAYER 15 #define LIGHTING_LAYER 15
#define LIGHTING_RENDER_TARGET "LIGHT_PLANE" #define LIGHTING_RENDER_TARGET "LIGHT_PLANE"
#define O_LIGHTING_VISUAL_PLANE 110
#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE"
#define RAD_TEXT_LAYER 15.1 #define RAD_TEXT_LAYER 15.1
#define ABOVE_LIGHTING_PLANE 16 #define ABOVE_LIGHTING_PLANE 16
+13
View File
@@ -84,11 +84,24 @@
#define FLASH_LIGHT_POWER 3 #define FLASH_LIGHT_POWER 3
#define FLASH_LIGHT_RANGE 3.8 #define FLASH_LIGHT_RANGE 3.8
// Emissive blocking.
/// Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all. /// Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
#define EMISSIVE_BLOCK_GENERIC 1 #define EMISSIVE_BLOCK_GENERIC 1
/// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans. /// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
#define EMISSIVE_BLOCK_UNIQUE 2 #define EMISSIVE_BLOCK_UNIQUE 2
/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR].
#define EMISSIVE_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0)
/// A globaly cached version of [EMISSIVE_COLOR] for quick access.
GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR)
/// The color matrix applied to all emissive blockers. Should be solely dependent on alpha and not have RGB overlap with [EMISSIVE_COLOR].
#define EM_BLOCK_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
/// A globaly cached version of [EM_BLOCK_COLOR] for quick access.
GLOBAL_LIST_INIT(em_block_color, EM_BLOCK_COLOR)
/// The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of [EMISSIVE_COLOR], and be independant of the RGB value of [EM_BLOCK_COLOR].
#define EM_MASK_MATRIX list(0,0,0,1/3, 0,0,0,1/3, 0,0,0,1/3, 0,0,0,0, 1,1,1,0)
/// A globaly cached version of [EM_MASK_MATRIX] for quick access.
GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)
/// Returns the red part of a #RRGGBB hex sequence as number /// Returns the red part of a #RRGGBB hex sequence as number
#define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4)) #define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4))
+5
View File
@@ -1,3 +1,8 @@
#define SOLAR_TRACK_OFF 0 #define SOLAR_TRACK_OFF 0
#define SOLAR_TRACK_TIMED 1 #define SOLAR_TRACK_TIMED 1
#define SOLAR_TRACK_AUTO 2 #define SOLAR_TRACK_AUTO 2
///conversion ratio from joules to watts
#define WATTS / 0.002
///conversion ratio from watts to joules
#define JOULES * 0.002
+1 -1
View File
@@ -395,7 +395,7 @@
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480) /proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
if(!isobj(O)) if(!isobj(O))
O = new /obj/screen/text() O = new /atom/movable/screen/text()
O.maptext = maptext O.maptext = maptext
O.maptext_height = maptext_height O.maptext_height = maptext_height
O.maptext_width = maptext_width O.maptext_width = maptext_width
+5
View File
@@ -0,0 +1,5 @@
/// Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the [EMISSIVE_COLOR].
/proc/emissive_appearance(icon, icon_state = "", layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE)
var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, EMISSIVE_PLANE, alpha, appearance_flags)
appearance.color = GLOB.emissive_color
return appearance
+1 -1
View File
@@ -25,7 +25,7 @@
if(multicam_on) if(multicam_on)
var/turf/T = get_turf(A) var/turf/T = get_turf(A)
if(T) if(T)
for(var/obj/screen/movable/pic_in_pic/ai/P in T.vis_locs) for(var/atom/movable/screen/movable/pic_in_pic/ai/P in T.vis_locs)
if(P.ai == src) if(P.ai == src)
P.Click(params) P.Click(params)
break break
+4 -4
View File
@@ -429,14 +429,14 @@
setDir(WEST, ismousemovement) setDir(WEST, ismousemovement)
//debug //debug
/obj/screen/proc/scale_to(x1,y1) /atom/movable/screen/proc/scale_to(x1,y1)
if(!y1) if(!y1)
y1 = x1 y1 = x1
var/matrix/M = new var/matrix/M = new
M.Scale(x1,y1) M.Scale(x1,y1)
transform = M transform = M
/obj/screen/click_catcher /atom/movable/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
icon_state = "catcher" icon_state = "catcher"
plane = CLICKCATCHER_PLANE plane = CLICKCATCHER_PLANE
@@ -446,7 +446,7 @@
#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size) #define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose. #define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15) /atom/movable/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher") var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x) var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y) var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
@@ -461,7 +461,7 @@
M.Scale(px/sx, py/sy) M.Scale(px/sx, py/sy)
transform = M transform = M
/obj/screen/click_catcher/Click(location, control, params) /atom/movable/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params) var/list/modifiers = params2list(params)
if(modifiers["middle"] && iscarbon(usr)) if(modifiers["middle"] && iscarbon(usr))
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
+2 -2
View File
@@ -80,10 +80,10 @@
/atom/proc/IsAutoclickable() /atom/proc/IsAutoclickable()
. = 1 . = 1
/obj/screen/IsAutoclickable() /atom/movable/screen/IsAutoclickable()
. = 0 . = 0
/obj/screen/click_catcher/IsAutoclickable() /atom/movable/screen/click_catcher/IsAutoclickable()
. = 1 . = 1
//Please don't roast me too hard //Please don't roast me too hard
+18 -18
View File
@@ -1,6 +1,6 @@
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default" #define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
/obj/screen/movable/action_button /atom/movable/screen/movable/action_button
var/datum/action/linked_action var/datum/action/linked_action
var/actiontooltipstyle = "" var/actiontooltipstyle = ""
screen_loc = null screen_loc = null
@@ -11,7 +11,7 @@
var/id var/id
var/ordered = TRUE //If the button gets placed into the default bar var/ordered = TRUE //If the button gets placed into the default bar
/obj/screen/movable/action_button/proc/can_use(mob/user) /atom/movable/screen/movable/action_button/proc/can_use(mob/user)
if (linked_action) if (linked_action)
return linked_action.owner == user return linked_action.owner == user
else if (isobserver(user)) else if (isobserver(user))
@@ -20,14 +20,14 @@
else else
return TRUE return TRUE
/obj/screen/movable/action_button/MouseDrop(over_object) /atom/movable/screen/movable/action_button/MouseDrop(over_object)
if(!can_use(usr)) if(!can_use(usr))
return return
if((istype(over_object, /obj/screen/movable/action_button) && !istype(over_object, /obj/screen/movable/action_button/hide_toggle))) if((istype(over_object, /atom/movable/screen/movable/action_button) && !istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle)))
if(locked) if(locked)
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>") to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
return return
var/obj/screen/movable/action_button/B = over_object var/atom/movable/screen/movable/action_button/B = over_object
var/list/actions = usr.actions var/list/actions = usr.actions
actions.Swap(actions.Find(src.linked_action), actions.Find(B.linked_action)) actions.Swap(actions.Find(src.linked_action), actions.Find(B.linked_action))
moved = FALSE moved = FALSE
@@ -38,7 +38,7 @@
else else
return ..() return ..()
/obj/screen/movable/action_button/Click(location,control,params) /atom/movable/screen/movable/action_button/Click(location,control,params)
if (!can_use(usr)) if (!can_use(usr))
return return
@@ -60,7 +60,7 @@
return TRUE return TRUE
//Hide/Show Action Buttons ... Button //Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle /atom/movable/screen/movable/action_button/hide_toggle
name = "Hide Buttons" name = "Hide Buttons"
desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions." desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions.dmi' icon = 'icons/mob/actions.dmi'
@@ -72,7 +72,7 @@
var/mutable_appearance/hide_appearance var/mutable_appearance/hide_appearance
var/mutable_appearance/show_appearance var/mutable_appearance/show_appearance
/obj/screen/movable/action_button/hide_toggle/Initialize() /atom/movable/screen/movable/action_button/hide_toggle/Initialize()
. = ..() . = ..()
var/static/list/icon_cache = list() var/static/list/icon_cache = list()
@@ -86,7 +86,7 @@
if(!show_appearance) if(!show_appearance)
show_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, show_state) show_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, show_state)
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params) /atom/movable/screen/movable/action_button/hide_toggle/Click(location,control,params)
if (!can_use(usr)) if (!can_use(usr))
return return
@@ -107,7 +107,7 @@
if(modifiers["alt"]) if(modifiers["alt"])
for(var/V in usr.actions) for(var/V in usr.actions)
var/datum/action/A = V var/datum/action/A = V
var/obj/screen/movable/action_button/B = A.button var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE B.moved = FALSE
if(B.id && usr.client) if(B.id && usr.client)
usr.client.prefs.action_buttons_screen_locs["[B.name]_[B.id]"] = null usr.client.prefs.action_buttons_screen_locs["[B.name]_[B.id]"] = null
@@ -129,10 +129,10 @@
update_icon() update_icon()
usr.update_action_buttons() usr.update_action_buttons()
/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user) /atom/movable/screen/movable/action_button/hide_toggle/AltClick(mob/user)
for(var/V in user.actions) for(var/V in user.actions)
var/datum/action/A = V var/datum/action/A = V
var/obj/screen/movable/action_button/B = A.button var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE B.moved = FALSE
if(moved) if(moved)
moved = FALSE moved = FALSE
@@ -141,7 +141,7 @@
return TRUE return TRUE
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud) /atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
var/settings = owner_hud.get_action_buttons_icons() var/settings = owner_hud.get_action_buttons_icons()
icon = settings["bg_icon"] icon = settings["bg_icon"]
icon_state = settings["bg_state"] icon_state = settings["bg_state"]
@@ -150,7 +150,7 @@
show_state = settings["toggle_show"] show_state = settings["toggle_show"]
update_icon() update_icon()
/obj/screen/movable/action_button/hide_toggle/update_overlays() /atom/movable/screen/movable/action_button/hide_toggle/update_overlays()
. = ..() . = ..()
if(hidden) if(hidden)
. += show_appearance . += show_appearance
@@ -158,12 +158,12 @@
. += hide_appearance . += hide_appearance
/obj/screen/movable/action_button/MouseEntered(location,control,params) /atom/movable/screen/movable/action_button/MouseEntered(location,control,params)
if(!QDELETED(src)) if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle) openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle)
/obj/screen/movable/action_button/MouseExited() /atom/movable/screen/movable/action_button/MouseExited()
closeToolTip(usr) closeToolTip(usr)
/datum/hud/proc/get_action_buttons_icons() /datum/hud/proc/get_action_buttons_icons()
@@ -203,7 +203,7 @@
else else
for(var/datum/action/A in actions) for(var/datum/action/A in actions)
A.UpdateButtonIcon() A.UpdateButtonIcon()
var/obj/screen/movable/action_button/B = A.button var/atom/movable/screen/movable/action_button/B = A.button
if(B.ordered) if(B.ordered)
button_number++ button_number++
if(B.moved) if(B.moved)
@@ -235,7 +235,7 @@
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6" return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"
/datum/hud/proc/SetButtonCoords(obj/screen/button,number, supportedcolumns) /datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number, supportedcolumns)
var/row = round((number-1)/supportedcolumns) var/row = round((number-1)/supportedcolumns)
var/col = ((number - 1)%(supportedcolumns)) + 1 var/col = ((number - 1)%(supportedcolumns)) + 1
var/x_offset = 32*(col-1) + 4 + 2*col var/x_offset = 32*(col-1) + 4 + 2*col
+55 -55
View File
@@ -1,136 +1,136 @@
/obj/screen/ai /atom/movable/screen/ai
icon = 'icons/mob/screen_ai.dmi' icon = 'icons/mob/screen_ai.dmi'
/obj/screen/ai/Click() /atom/movable/screen/ai/Click()
if(isobserver(usr) || usr.incapacitated()) if(isobserver(usr) || usr.incapacitated())
return TRUE return TRUE
/obj/screen/ai/aicore /atom/movable/screen/ai/aicore
name = "AI core" name = "AI core"
icon_state = "ai_core" icon_state = "ai_core"
/obj/screen/ai/aicore/Click() /atom/movable/screen/ai/aicore/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.view_core() AI.view_core()
/obj/screen/ai/camera_list /atom/movable/screen/ai/camera_list
name = "Show Camera List" name = "Show Camera List"
icon_state = "camera" icon_state = "camera"
/obj/screen/ai/camera_list/Click() /atom/movable/screen/ai/camera_list/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.show_camera_list() AI.show_camera_list()
/obj/screen/ai/camera_track /atom/movable/screen/ai/camera_track
name = "Track With Camera" name = "Track With Camera"
icon_state = "track" icon_state = "track"
/obj/screen/ai/camera_track/Click() /atom/movable/screen/ai/camera_track/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs() var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
AI.ai_camera_track(target_name) AI.ai_camera_track(target_name)
/obj/screen/ai/camera_light /atom/movable/screen/ai/camera_light
name = "Toggle Camera Light" name = "Toggle Camera Light"
icon_state = "camera_light" icon_state = "camera_light"
/obj/screen/ai/camera_light/Click() /atom/movable/screen/ai/camera_light/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.toggle_camera_light() AI.toggle_camera_light()
/obj/screen/ai/crew_monitor /atom/movable/screen/ai/crew_monitor
name = "Crew Monitoring Console" name = "Crew Monitoring Console"
icon_state = "crew_monitor" icon_state = "crew_monitor"
/obj/screen/ai/crew_monitor/Click() /atom/movable/screen/ai/crew_monitor/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
GLOB.crewmonitor.show(AI,AI) GLOB.crewmonitor.show(AI,AI)
/obj/screen/ai/crew_manifest /atom/movable/screen/ai/crew_manifest
name = "Crew Manifest" name = "Crew Manifest"
icon_state = "manifest" icon_state = "manifest"
/obj/screen/ai/crew_manifest/Click() /atom/movable/screen/ai/crew_manifest/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.ai_roster() AI.ai_roster()
/obj/screen/ai/alerts /atom/movable/screen/ai/alerts
name = "Show Alerts" name = "Show Alerts"
icon_state = "alerts" icon_state = "alerts"
/obj/screen/ai/alerts/Click() /atom/movable/screen/ai/alerts/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.ai_alerts() AI.ai_alerts()
/obj/screen/ai/announcement /atom/movable/screen/ai/announcement
name = "Make Vox Announcement" name = "Make Vox Announcement"
icon_state = "announcement" icon_state = "announcement"
/obj/screen/ai/announcement/Click() /atom/movable/screen/ai/announcement/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.announcement() AI.announcement()
/obj/screen/ai/call_shuttle /atom/movable/screen/ai/call_shuttle
name = "Call Emergency Shuttle" name = "Call Emergency Shuttle"
icon_state = "call_shuttle" icon_state = "call_shuttle"
/obj/screen/ai/call_shuttle/Click() /atom/movable/screen/ai/call_shuttle/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.ai_call_shuttle() AI.ai_call_shuttle()
/obj/screen/ai/state_laws /atom/movable/screen/ai/state_laws
name = "State Laws" name = "State Laws"
icon_state = "state_laws" icon_state = "state_laws"
/obj/screen/ai/state_laws/Click() /atom/movable/screen/ai/state_laws/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.checklaws() AI.checklaws()
/obj/screen/ai/pda_msg_send /atom/movable/screen/ai/pda_msg_send
name = "PDA - Send Message" name = "PDA - Send Message"
icon_state = "pda_send" icon_state = "pda_send"
/obj/screen/ai/pda_msg_send/Click() /atom/movable/screen/ai/pda_msg_send/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.cmd_send_pdamesg(usr) AI.cmd_send_pdamesg(usr)
/obj/screen/ai/pda_msg_show /atom/movable/screen/ai/pda_msg_show
name = "PDA - Show Message Log" name = "PDA - Show Message Log"
icon_state = "pda_receive" icon_state = "pda_receive"
/obj/screen/ai/pda_msg_show/Click() /atom/movable/screen/ai/pda_msg_show/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.cmd_show_message_log(usr) AI.cmd_show_message_log(usr)
/obj/screen/ai/image_take /atom/movable/screen/ai/image_take
name = "Take Image" name = "Take Image"
icon_state = "take_picture" icon_state = "take_picture"
/obj/screen/ai/image_take/Click() /atom/movable/screen/ai/image_take/Click()
if(..()) if(..())
return return
if(isAI(usr)) if(isAI(usr))
@@ -140,11 +140,11 @@
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.aicamera.toggle_camera_mode(usr) R.aicamera.toggle_camera_mode(usr)
/obj/screen/ai/image_view /atom/movable/screen/ai/image_view
name = "View Images" name = "View Images"
icon_state = "view_images" icon_state = "view_images"
/obj/screen/ai/image_view/Click() /atom/movable/screen/ai/image_view/Click()
if(..()) if(..())
return return
if(isAI(usr)) if(isAI(usr))
@@ -154,31 +154,31 @@
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.aicamera.viewpictures(usr) R.aicamera.viewpictures(usr)
/obj/screen/ai/sensors /atom/movable/screen/ai/sensors
name = "Sensor Augmentation" name = "Sensor Augmentation"
icon_state = "ai_sensor" icon_state = "ai_sensor"
/obj/screen/ai/sensors/Click() /atom/movable/screen/ai/sensors/Click()
if(..()) if(..())
return return
var/mob/living/silicon/S = usr var/mob/living/silicon/S = usr
S.toggle_sensors() S.toggle_sensors()
/obj/screen/ai/multicam /atom/movable/screen/ai/multicam
name = "Multicamera Mode" name = "Multicamera Mode"
icon_state = "multicam" icon_state = "multicam"
/obj/screen/ai/multicam/Click() /atom/movable/screen/ai/multicam/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.toggle_multicam() AI.toggle_multicam()
/obj/screen/ai/add_multicam /atom/movable/screen/ai/add_multicam
name = "New Camera" name = "New Camera"
icon_state = "new_cam" icon_state = "new_cam"
/obj/screen/ai/add_multicam/Click() /atom/movable/screen/ai/add_multicam/Click()
if(..()) if(..())
return return
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
@@ -190,112 +190,112 @@
/datum/hud/ai/New(mob/owner) /datum/hud/ai/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
// Language menu // Language menu
using = new /obj/screen/language_menu using = new /atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu using.screen_loc = ui_borg_language_menu
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//AI core //AI core
using = new /obj/screen/ai/aicore() using = new /atom/movable/screen/ai/aicore()
using.screen_loc = ui_ai_core using.screen_loc = ui_ai_core
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Camera list //Camera list
using = new /obj/screen/ai/camera_list() using = new /atom/movable/screen/ai/camera_list()
using.screen_loc = ui_ai_camera_list using.screen_loc = ui_ai_camera_list
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Track //Track
using = new /obj/screen/ai/camera_track() using = new /atom/movable/screen/ai/camera_track()
using.screen_loc = ui_ai_track_with_camera using.screen_loc = ui_ai_track_with_camera
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Camera light //Camera light
using = new /obj/screen/ai/camera_light() using = new /atom/movable/screen/ai/camera_light()
using.screen_loc = ui_ai_camera_light using.screen_loc = ui_ai_camera_light
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Crew Monitoring //Crew Monitoring
using = new /obj/screen/ai/crew_monitor() using = new /atom/movable/screen/ai/crew_monitor()
using.screen_loc = ui_ai_crew_monitor using.screen_loc = ui_ai_crew_monitor
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Crew Manifest //Crew Manifest
using = new /obj/screen/ai/crew_manifest() using = new /atom/movable/screen/ai/crew_manifest()
using.screen_loc = ui_ai_crew_manifest using.screen_loc = ui_ai_crew_manifest
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Alerts //Alerts
using = new /obj/screen/ai/alerts() using = new /atom/movable/screen/ai/alerts()
using.screen_loc = ui_ai_alerts using.screen_loc = ui_ai_alerts
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Announcement //Announcement
using = new /obj/screen/ai/announcement() using = new /atom/movable/screen/ai/announcement()
using.screen_loc = ui_ai_announcement using.screen_loc = ui_ai_announcement
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Shuttle //Shuttle
using = new /obj/screen/ai/call_shuttle() using = new /atom/movable/screen/ai/call_shuttle()
using.screen_loc = ui_ai_shuttle using.screen_loc = ui_ai_shuttle
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Laws //Laws
using = new /obj/screen/ai/state_laws() using = new /atom/movable/screen/ai/state_laws()
using.screen_loc = ui_ai_state_laws using.screen_loc = ui_ai_state_laws
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//PDA message //PDA message
using = new /obj/screen/ai/pda_msg_send() using = new /atom/movable/screen/ai/pda_msg_send()
using.screen_loc = ui_ai_pda_send using.screen_loc = ui_ai_pda_send
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//PDA log //PDA log
using = new /obj/screen/ai/pda_msg_show() using = new /atom/movable/screen/ai/pda_msg_show()
using.screen_loc = ui_ai_pda_log using.screen_loc = ui_ai_pda_log
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Take image //Take image
using = new /obj/screen/ai/image_take() using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_ai_take_picture using.screen_loc = ui_ai_take_picture
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//View images //View images
using = new /obj/screen/ai/image_view() using = new /atom/movable/screen/ai/image_view()
using.screen_loc = ui_ai_view_images using.screen_loc = ui_ai_view_images
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Medical/Security sensors //Medical/Security sensors
using = new /obj/screen/ai/sensors() using = new /atom/movable/screen/ai/sensors()
using.screen_loc = ui_ai_sensor using.screen_loc = ui_ai_sensor
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Multicamera mode //Multicamera mode
using = new /obj/screen/ai/multicam() using = new /atom/movable/screen/ai/multicam()
using.screen_loc = ui_ai_multicam using.screen_loc = ui_ai_multicam
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Add multicamera camera //Add multicamera camera
using = new /obj/screen/ai/add_multicam() using = new /atom/movable/screen/ai/add_multicam()
using.screen_loc = ui_ai_add_multicam using.screen_loc = ui_ai_add_multicam
using.hud = src using.hud = src
static_inventory += using static_inventory += using
+87 -87
View File
@@ -18,7 +18,7 @@
if(!category || QDELETED(src)) if(!category || QDELETED(src))
return return
var/obj/screen/alert/thealert var/atom/movable/screen/alert/thealert
if(alerts[category]) if(alerts[category])
thealert = alerts[category] thealert = alerts[category]
if(thealert.override_alerts) if(thealert.override_alerts)
@@ -69,13 +69,13 @@
thealert.timeout = world.time + thealert.timeout - world.tick_lag thealert.timeout = world.time + thealert.timeout - world.tick_lag
return thealert return thealert
/mob/proc/alert_timeout(obj/screen/alert/alert, category) /mob/proc/alert_timeout(atom/movable/screen/alert/alert, category)
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout) if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
clear_alert(category) clear_alert(category)
// Proc to clear an existing alert. // Proc to clear an existing alert.
/mob/proc/clear_alert(category, clear_override = FALSE) /mob/proc/clear_alert(category, clear_override = FALSE)
var/obj/screen/alert/alert = alerts[category] var/atom/movable/screen/alert/alert = alerts[category]
if(!alert) if(!alert)
return 0 return 0
if(alert.override_alerts && !clear_override) if(alert.override_alerts && !clear_override)
@@ -87,7 +87,7 @@
client.screen -= alert client.screen -= alert
qdel(alert) qdel(alert)
/obj/screen/alert /atom/movable/screen/alert
icon = 'icons/mob/screen_alert.dmi' icon = 'icons/mob/screen_alert.dmi'
icon_state = "default" icon_state = "default"
name = "Alert" name = "Alert"
@@ -100,72 +100,72 @@
var/mob/mob_viewer //the mob viewing this alert var/mob/mob_viewer //the mob viewing this alert
/obj/screen/alert/MouseEntered(location,control,params) /atom/movable/screen/alert/MouseEntered(location,control,params)
if(!QDELETED(src)) if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle) openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle)
/obj/screen/alert/MouseExited() /atom/movable/screen/alert/MouseExited()
closeToolTip(usr) closeToolTip(usr)
//Gas alerts //Gas alerts
/obj/screen/alert/not_enough_oxy /atom/movable/screen/alert/not_enough_oxy
name = "Choking (No O2)" name = "Choking (No O2)"
desc = "You're not getting enough oxygen. Find some good air before you pass out! The box in your backpack has an oxygen tank and breath mask in it." desc = "You're not getting enough oxygen. Find some good air before you pass out! The box in your backpack has an oxygen tank and breath mask in it."
icon_state = "not_enough_oxy" icon_state = "not_enough_oxy"
/obj/screen/alert/too_much_oxy /atom/movable/screen/alert/too_much_oxy
name = "Choking (O2)" name = "Choking (O2)"
desc = "There's too much oxygen in the air, and you're breathing it in! Find some good air before you pass out!" desc = "There's too much oxygen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_oxy" icon_state = "too_much_oxy"
/obj/screen/alert/not_enough_nitro /atom/movable/screen/alert/not_enough_nitro
name = "Choking (No N2)" name = "Choking (No N2)"
desc = "You're not getting enough nitrogen. Find some good air before you pass out!" desc = "You're not getting enough nitrogen. Find some good air before you pass out!"
icon_state = "not_enough_nitro" icon_state = "not_enough_nitro"
/obj/screen/alert/too_much_nitro /atom/movable/screen/alert/too_much_nitro
name = "Choking (N2)" name = "Choking (N2)"
desc = "There's too much nitrogen in the air, and you're breathing it in! Find some good air before you pass out!" desc = "There's too much nitrogen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_nitro" icon_state = "too_much_nitro"
/obj/screen/alert/not_enough_co2 /atom/movable/screen/alert/not_enough_co2
name = "Choking (No CO2)" name = "Choking (No CO2)"
desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!" desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!"
icon_state = "not_enough_co2" icon_state = "not_enough_co2"
/obj/screen/alert/too_much_co2 /atom/movable/screen/alert/too_much_co2
name = "Choking (CO2)" name = "Choking (CO2)"
desc = "There's too much carbon dioxide in the air, and you're breathing it in! Find some good air before you pass out!" desc = "There's too much carbon dioxide in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_co2" icon_state = "too_much_co2"
/obj/screen/alert/not_enough_tox /atom/movable/screen/alert/not_enough_tox
name = "Choking (No Plasma)" name = "Choking (No Plasma)"
desc = "You're not getting enough plasma. Find some good air before you pass out!" desc = "You're not getting enough plasma. Find some good air before you pass out!"
icon_state = "not_enough_tox" icon_state = "not_enough_tox"
/obj/screen/alert/too_much_tox /atom/movable/screen/alert/too_much_tox
name = "Choking (Plasma)" name = "Choking (Plasma)"
desc = "There's highly flammable, toxic plasma in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it." desc = "There's highly flammable, toxic plasma in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "too_much_tox" icon_state = "too_much_tox"
/obj/screen/alert/not_enough_ch4 /atom/movable/screen/alert/not_enough_ch4
name = "Choking (No CH4)" name = "Choking (No CH4)"
desc = "You're not getting enough methane. Find some good air before you pass out!" desc = "You're not getting enough methane. Find some good air before you pass out!"
icon_state = "not_enough_ch4" icon_state = "not_enough_ch4"
/obj/screen/alert/too_much_ch4 /atom/movable/screen/alert/too_much_ch4
name = "Choking (CH4)" name = "Choking (CH4)"
desc = "There's too much methane in the air, and you're breathing it in! Find some good air before you pass out!" desc = "There's too much methane in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_ch4" icon_state = "too_much_ch4"
/obj/screen/alert/not_enough_ch3br /atom/movable/screen/alert/not_enough_ch3br
name = "Choking (No CH3Br)" name = "Choking (No CH3Br)"
desc = "You're not getting enough methyl bromide. Find some good air before you pass out!" desc = "You're not getting enough methyl bromide. Find some good air before you pass out!"
icon_state = "not_enough_tox" icon_state = "not_enough_tox"
/obj/screen/alert/too_much_ch3br /atom/movable/screen/alert/too_much_ch3br
name = "Choking (CH3Br)" name = "Choking (CH3Br)"
desc = "There's highly toxic methyl bromide in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it." desc = "There's highly toxic methyl bromide in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "too_much_tox" icon_state = "too_much_tox"
@@ -173,109 +173,109 @@
//End gas alerts //End gas alerts
/obj/screen/alert/fat /atom/movable/screen/alert/fat
name = "Fat" name = "Fat"
desc = "You ate too much food, lardass. Run around the station and lose some weight." desc = "You ate too much food, lardass. Run around the station and lose some weight."
icon_state = "fat" icon_state = "fat"
/obj/screen/alert/hungry /atom/movable/screen/alert/hungry
name = "Hungry" name = "Hungry"
desc = "Some food would be good right about now." desc = "Some food would be good right about now."
icon_state = "hungry" icon_state = "hungry"
/obj/screen/alert/starving /atom/movable/screen/alert/starving
name = "Starving" name = "Starving"
desc = "You're severely malnourished. The hunger pains make moving around a chore." desc = "You're severely malnourished. The hunger pains make moving around a chore."
icon_state = "starving" icon_state = "starving"
/obj/screen/alert/gross /atom/movable/screen/alert/gross
name = "Grossed out." name = "Grossed out."
desc = "That was kind of gross..." desc = "That was kind of gross..."
icon_state = "gross" icon_state = "gross"
/obj/screen/alert/verygross /atom/movable/screen/alert/verygross
name = "Very grossed out." name = "Very grossed out."
desc = "You're not feeling very well..." desc = "You're not feeling very well..."
icon_state = "gross2" icon_state = "gross2"
/obj/screen/alert/disgusted /atom/movable/screen/alert/disgusted
name = "DISGUSTED" name = "DISGUSTED"
desc = "ABSOLUTELY DISGUSTIN'" desc = "ABSOLUTELY DISGUSTIN'"
icon_state = "gross3" icon_state = "gross3"
/obj/screen/alert/hot /atom/movable/screen/alert/hot
name = "Too Hot" name = "Too Hot"
desc = "The air around you is pretty toasty! Consider putting on some insulating clothing, or moving to a cooler area." desc = "The air around you is pretty toasty! Consider putting on some insulating clothing, or moving to a cooler area."
icon_state = "hot" icon_state = "hot"
/obj/screen/alert/cold /atom/movable/screen/alert/cold
name = "Too Cold" name = "Too Cold"
desc = "The air around you is pretty cold! Consider wearing a coat, or moving to a warmer area." desc = "The air around you is pretty cold! Consider wearing a coat, or moving to a warmer area."
icon_state = "cold" icon_state = "cold"
/obj/screen/alert/sweat /atom/movable/screen/alert/sweat
name = "Sweating" name = "Sweating"
desc = "You're sweating! Get somewhere cooler and take off any insulating clothing like a fire suit." desc = "You're sweating! Get somewhere cooler and take off any insulating clothing like a fire suit."
icon_state = "sweat" icon_state = "sweat"
/obj/screen/alert/shiver /atom/movable/screen/alert/shiver
name = "Shivering" name = "Shivering"
desc = "You're shivering! Get somewhere warmer and take off any insulating clothing like a space suit." desc = "You're shivering! Get somewhere warmer and take off any insulating clothing like a space suit."
/obj/screen/alert/lowpressure /atom/movable/screen/alert/lowpressure
name = "Low Pressure" name = "Low Pressure"
desc = "The air around you is hazardously thin. A space suit would protect you." desc = "The air around you is hazardously thin. A space suit would protect you."
icon_state = "lowpressure" icon_state = "lowpressure"
/obj/screen/alert/highpressure /atom/movable/screen/alert/highpressure
name = "High Pressure" name = "High Pressure"
desc = "The air around you is hazardously thick. A fire suit would protect you." desc = "The air around you is hazardously thick. A fire suit would protect you."
icon_state = "highpressure" icon_state = "highpressure"
/obj/screen/alert/blind /atom/movable/screen/alert/blind
name = "Blind" name = "Blind"
desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \ desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \
or something covering your eyes." or something covering your eyes."
icon_state = "blind" icon_state = "blind"
/obj/screen/alert/high /atom/movable/screen/alert/high
name = "High" name = "High"
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already." desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
icon_state = "high" icon_state = "high"
/obj/screen/alert/mind_control /atom/movable/screen/alert/mind_control
name = "Mind Control" name = "Mind Control"
desc = "Your mind has been hijacked! Click to view the mind control command." desc = "Your mind has been hijacked! Click to view the mind control command."
icon_state = "mind_control" icon_state = "mind_control"
var/command var/command
/obj/screen/alert/mind_control/Click() /atom/movable/screen/alert/mind_control/Click()
var/mob/living/L = usr var/mob/living/L = usr
to_chat(L, "<span class='mind_control'>[command]</span>") to_chat(L, "<span class='mind_control'>[command]</span>")
/obj/screen/alert/hypnosis /atom/movable/screen/alert/hypnosis
name = "Hypnosis" name = "Hypnosis"
desc = "Something's hypnotizing you, but you're not really sure about what." desc = "Something's hypnotizing you, but you're not really sure about what."
icon_state = "hypnosis" icon_state = "hypnosis"
var/phrase var/phrase
/obj/screen/alert/drunk //Not implemented /atom/movable/screen/alert/drunk //Not implemented
name = "Drunk" name = "Drunk"
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it." desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
icon_state = "drunk" icon_state = "drunk"
/obj/screen/alert/embeddedobject /atom/movable/screen/alert/embeddedobject
name = "Embedded Object" name = "Embedded Object"
desc = "Something got lodged into your flesh and is causing major bleeding. It might fall out with time, but surgery is the safest way. \ desc = "Something got lodged into your flesh and is causing major bleeding. It might fall out with time, but surgery is the safest way. \
If you're feeling frisky, examine yourself and click the underlined item to pull the object out." If you're feeling frisky, examine yourself and click the underlined item to pull the object out."
icon_state = "embeddedobject" icon_state = "embeddedobject"
/obj/screen/alert/embeddedobject/Click() /atom/movable/screen/alert/embeddedobject/Click()
if(isliving(usr)) if(isliving(usr))
var/mob/living/carbon/M = usr var/mob/living/carbon/M = usr
return M.help_shake_act(M) return M.help_shake_act(M)
/obj/screen/alert/weightless /atom/movable/screen/alert/weightless
name = "Weightless" name = "Weightless"
desc = "Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a \ desc = "Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a \
wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of \ wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of \
@@ -283,22 +283,22 @@ magboots would let you walk around normally on the floor. Barring those, you can
or shoot a gun to move around via Newton's 3rd Law of Motion." or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "weightless" icon_state = "weightless"
/obj/screen/alert/highgravity /atom/movable/screen/alert/highgravity
name = "High Gravity" name = "High Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed." desc = "You're getting crushed by high gravity, picking up items and movement will be slowed."
icon_state = "paralysis" icon_state = "paralysis"
/obj/screen/alert/veryhighgravity /atom/movable/screen/alert/veryhighgravity
name = "Crushing Gravity" name = "Crushing Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed. You'll also accumulate brute damage!" desc = "You're getting crushed by high gravity, picking up items and movement will be slowed. You'll also accumulate brute damage!"
icon_state = "paralysis" icon_state = "paralysis"
/obj/screen/alert/fire /atom/movable/screen/alert/fire
name = "On Fire" name = "On Fire"
desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area." desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area."
icon_state = "fire" icon_state = "fire"
/obj/screen/alert/fire/Click() /atom/movable/screen/alert/fire/Click()
var/mob/living/L = usr var/mob/living/L = usr
if(!istype(L) || !L.can_resist()) if(!istype(L) || !L.can_resist())
return return
@@ -306,7 +306,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(CHECK_MOBILITY(L, MOBILITY_MOVE)) if(CHECK_MOBILITY(L, MOBILITY_MOVE))
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt. return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
/obj/screen/alert/give // information set when the give alert is made /atom/movable/screen/alert/give // information set when the give alert is made
icon_state = "default" icon_state = "default"
var/mob/living/carbon/giver var/mob/living/carbon/giver
var/obj/item/receiving var/obj/item/receiving
@@ -321,7 +321,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
* * giver - The person giving the alert and item * * giver - The person giving the alert and item
* * receiving - The item being given by the giver * * receiving - The item being given by the giver
*/ */
/obj/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving) /atom/movable/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving)
name = "[giver] is offering [receiving]" name = "[giver] is offering [receiving]"
desc = "[giver] is offering [receiving]. Click this alert to take it." desc = "[giver] is offering [receiving]. Click this alert to take it."
icon_state = "template" icon_state = "template"
@@ -331,31 +331,31 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
src.giver = giver src.giver = giver
RegisterSignal(taker, COMSIG_MOVABLE_MOVED, .proc/removeAlert) RegisterSignal(taker, COMSIG_MOVABLE_MOVED, .proc/removeAlert)
/obj/screen/alert/give/proc/removeAlert() /atom/movable/screen/alert/give/proc/removeAlert()
to_chat(usr, "<span class='warning'>You moved out of range of [giver]!</span>") to_chat(usr, "<span class='warning'>You moved out of range of [giver]!</span>")
usr.clear_alert("[giver]") usr.clear_alert("[giver]")
/obj/screen/alert/give/Click(location, control, params) /atom/movable/screen/alert/give/Click(location, control, params)
. = ..() . = ..()
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
C.take(giver, receiving) C.take(giver, receiving)
//ALIENS //ALIENS
/obj/screen/alert/alien_tox /atom/movable/screen/alert/alien_tox
name = "Plasma" name = "Plasma"
desc = "There's flammable plasma in the air. If it lights up, you'll be toast." desc = "There's flammable plasma in the air. If it lights up, you'll be toast."
icon_state = "alien_tox" icon_state = "alien_tox"
alerttooltipstyle = "alien" alerttooltipstyle = "alien"
/obj/screen/alert/alien_fire /atom/movable/screen/alert/alien_fire
// This alert is temporarily gonna be thrown for all hot air but one day it will be used for literally being on fire // This alert is temporarily gonna be thrown for all hot air but one day it will be used for literally being on fire
name = "Too Hot" name = "Too Hot"
desc = "It's too hot! Flee to space or at least away from the flames. Standing on weeds will heal you." desc = "It's too hot! Flee to space or at least away from the flames. Standing on weeds will heal you."
icon_state = "alien_fire" icon_state = "alien_fire"
alerttooltipstyle = "alien" alerttooltipstyle = "alien"
/obj/screen/alert/alien_vulnerable /atom/movable/screen/alert/alien_vulnerable
name = "Severed Matriarchy" name = "Severed Matriarchy"
desc = "Your queen has been killed, you will suffer movement penalties and loss of hivemind. A new queen cannot be made until you recover." desc = "Your queen has been killed, you will suffer movement penalties and loss of hivemind. A new queen cannot be made until you recover."
icon_state = "alien_noqueen" icon_state = "alien_noqueen"
@@ -363,7 +363,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//BLOBS //BLOBS
/obj/screen/alert/nofactory /atom/movable/screen/alert/nofactory
name = "No Factory" name = "No Factory"
desc = "You have no factory, and are slowly dying!" desc = "You have no factory, and are slowly dying!"
icon_state = "blobbernaut_nofactory" icon_state = "blobbernaut_nofactory"
@@ -371,7 +371,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// BLOODCULT // BLOODCULT
/obj/screen/alert/bloodsense /atom/movable/screen/alert/bloodsense
name = "Blood Sense" name = "Blood Sense"
desc = "Allows you to sense blood that is manipulated by dark magicks." desc = "Allows you to sense blood that is manipulated by dark magicks."
icon_state = "cult_sense" icon_state = "cult_sense"
@@ -380,17 +380,17 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/angle = 0 var/angle = 0
var/mob/living/simple_animal/hostile/construct/Cviewer = null var/mob/living/simple_animal/hostile/construct/Cviewer = null
/obj/screen/alert/bloodsense/Initialize() /atom/movable/screen/alert/bloodsense/Initialize()
. = ..() . = ..()
narnar = new('icons/mob/screen_alert.dmi', "mini_nar") narnar = new('icons/mob/screen_alert.dmi', "mini_nar")
START_PROCESSING(SSprocessing, src) START_PROCESSING(SSprocessing, src)
/obj/screen/alert/bloodsense/Destroy() /atom/movable/screen/alert/bloodsense/Destroy()
Cviewer = null Cviewer = null
STOP_PROCESSING(SSprocessing, src) STOP_PROCESSING(SSprocessing, src)
return ..() return ..()
/obj/screen/alert/bloodsense/process() /atom/movable/screen/alert/bloodsense/process()
var/atom/blood_target var/atom/blood_target
if(!mob_viewer.mind) if(!mob_viewer.mind)
@@ -480,15 +480,15 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// CLOCKCULT // CLOCKCULT
/obj/screen/alert/clockwork /atom/movable/screen/alert/clockwork
alerttooltipstyle = "clockcult" alerttooltipstyle = "clockcult"
/obj/screen/alert/clockwork/infodump /atom/movable/screen/alert/clockwork/infodump
name = "Global Records" name = "Global Records"
desc = "You shouldn't be seeing this description, because it should be dynamically generated." desc = "You shouldn't be seeing this description, because it should be dynamically generated."
icon_state = "clockinfo" icon_state = "clockinfo"
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params) /atom/movable/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
if(GLOB.ratvar_awakens) if(GLOB.ratvar_awakens)
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>" desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>"
else else
@@ -520,19 +520,19 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//GUARDIANS //GUARDIANS
/obj/screen/alert/cancharge /atom/movable/screen/alert/cancharge
name = "Charge Ready" name = "Charge Ready"
desc = "You are ready to charge at a location!" desc = "You are ready to charge at a location!"
icon_state = "guardian_charge" icon_state = "guardian_charge"
alerttooltipstyle = "parasite" alerttooltipstyle = "parasite"
/obj/screen/alert/canstealth /atom/movable/screen/alert/canstealth
name = "Stealth Ready" name = "Stealth Ready"
desc = "You are ready to enter stealth!" desc = "You are ready to enter stealth!"
icon_state = "guardian_canstealth" icon_state = "guardian_canstealth"
alerttooltipstyle = "parasite" alerttooltipstyle = "parasite"
/obj/screen/alert/instealth /atom/movable/screen/alert/instealth
name = "In Stealth" name = "In Stealth"
desc = "You are in stealth and your next attack will do bonus damage!" desc = "You are in stealth and your next attack will do bonus damage!"
icon_state = "guardian_instealth" icon_state = "guardian_instealth"
@@ -540,52 +540,52 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//SILICONS //SILICONS
/obj/screen/alert/nocell /atom/movable/screen/alert/nocell
name = "Missing Power Cell" name = "Missing Power Cell"
desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance." desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance."
icon_state = "nocell" icon_state = "nocell"
/obj/screen/alert/emptycell /atom/movable/screen/alert/emptycell
name = "Out of Power" name = "Out of Power"
desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \ desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \
Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "emptycell" icon_state = "emptycell"
/obj/screen/alert/lowcell /atom/movable/screen/alert/lowcell
name = "Low Charge" name = "Low Charge"
desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "lowcell" icon_state = "lowcell"
/obj/screen/alert/etherealcharge /atom/movable/screen/alert/etherealcharge
name = "Low Blood Charge" name = "Low Blood Charge"
desc = "Your blood's electric charge is running low, find a source of charge for your blood. Use a recharging station found in robotics or the dormitory bathrooms, or eat some Ethereal-friendly food." desc = "Your blood's electric charge is running low, find a source of charge for your blood. Use a recharging station found in robotics or the dormitory bathrooms, or eat some Ethereal-friendly food."
icon_state = "etherealcharge" icon_state = "etherealcharge"
/obj/screen/alert/ethereal_overcharge /atom/movable/screen/alert/ethereal_overcharge
name = "Blood Overcharge" name = "Blood Overcharge"
desc = "Your blood's electric charge is becoming dangerously high, find an outlet for your energy. Use Grab Intent on an APC to channel your energy into it." desc = "Your blood's electric charge is becoming dangerously high, find an outlet for your energy. Use Grab Intent on an APC to channel your energy into it."
icon_state = "ethereal_overcharge" icon_state = "ethereal_overcharge"
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg //Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
/obj/screen/alert/hacked /atom/movable/screen/alert/hacked
name = "Hacked" name = "Hacked"
desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any." 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" icon_state = "hacked"
/obj/screen/alert/locked /atom/movable/screen/alert/locked
name = "Locked Down" name = "Locked Down"
desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \ 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." office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary."
icon_state = "locked" icon_state = "locked"
/obj/screen/alert/newlaw /atom/movable/screen/alert/newlaw
name = "Law Update" name = "Law Update"
desc = "Laws have potentially been uploaded to or removed from this unit. Please be aware of any changes \ desc = "Laws have potentially been uploaded to or removed from this unit. Please be aware of any changes \
so as to remain in compliance with the most up-to-date laws." so as to remain in compliance with the most up-to-date laws."
icon_state = "newlaw" icon_state = "newlaw"
timeout = 300 timeout = 300
/obj/screen/alert/hackingapc /atom/movable/screen/alert/hackingapc
name = "Hacking APC" name = "Hacking APC"
desc = "An Area Power Controller is being hacked. When the process is \ desc = "An Area Power Controller is being hacked. When the process is \
complete, you will have exclusive control of it, and you will gain \ complete, you will have exclusive control of it, and you will gain \
@@ -594,7 +594,7 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 600 timeout = 600
var/atom/target = null var/atom/target = null
/obj/screen/alert/hackingapc/Click() /atom/movable/screen/alert/hackingapc/Click()
if(!usr || !usr.client) if(!usr || !usr.client)
return return
if(!target) if(!target)
@@ -606,7 +606,7 @@ so as to remain in compliance with the most up-to-date laws."
//MECHS //MECHS
/obj/screen/alert/low_mech_integrity /atom/movable/screen/alert/low_mech_integrity
name = "Mech Damaged" name = "Mech Damaged"
desc = "Mech integrity is low." desc = "Mech integrity is low."
icon_state = "low_mech_integrity" icon_state = "low_mech_integrity"
@@ -614,19 +614,19 @@ so as to remain in compliance with the most up-to-date laws."
//GHOSTS //GHOSTS
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages //TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
/obj/screen/alert/notify_cloning /atom/movable/screen/alert/notify_cloning
name = "Revival" name = "Revival"
desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!" desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!"
icon_state = "template" icon_state = "template"
timeout = 300 timeout = 300
/obj/screen/alert/notify_cloning/Click() /atom/movable/screen/alert/notify_cloning/Click()
if(!usr || !usr.client) if(!usr || !usr.client)
return return
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.reenter_corpse() G.reenter_corpse()
/obj/screen/alert/notify_action /atom/movable/screen/alert/notify_action
name = "Body created" name = "Body created"
desc = "A body was created. You can enter it." desc = "A body was created. You can enter it."
icon_state = "template" icon_state = "template"
@@ -634,7 +634,7 @@ so as to remain in compliance with the most up-to-date laws."
var/atom/target = null var/atom/target = null
var/action = NOTIFY_JUMP var/action = NOTIFY_JUMP
/obj/screen/alert/notify_action/Click() /atom/movable/screen/alert/notify_action/Click()
if(!usr || !usr.client) if(!usr || !usr.client)
return return
if(!target) if(!target)
@@ -654,44 +654,44 @@ so as to remain in compliance with the most up-to-date laws."
//OBJECT-BASED //OBJECT-BASED
/obj/screen/alert/restrained/buckled /atom/movable/screen/alert/restrained/buckled
name = "Buckled" name = "Buckled"
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed." desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
icon_state = "buckled" icon_state = "buckled"
/obj/screen/alert/restrained/handcuffed /atom/movable/screen/alert/restrained/handcuffed
name = "Handcuffed" name = "Handcuffed"
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself." desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
/obj/screen/alert/restrained/legcuffed /atom/movable/screen/alert/restrained/legcuffed
name = "Legcuffed" name = "Legcuffed"
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself." desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/restrained/Click() /atom/movable/screen/alert/restrained/Click()
var/mob/living/L = usr var/mob/living/L = usr
if(!istype(L) || !L.can_resist()) if(!istype(L) || !L.can_resist())
return return
L.MarkResistTime() L.MarkResistTime()
return L.resist_restraints() return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click() /atom/movable/screen/alert/restrained/buckled/Click()
var/mob/living/L = usr var/mob/living/L = usr
if(!istype(L) || !L.can_resist()) if(!istype(L) || !L.can_resist())
return return
L.MarkResistTime() L.MarkResistTime()
return L.resist_buckle() return L.resist_buckle()
/obj/screen/alert/shoes/untied /atom/movable/screen/alert/shoes/untied
name = "Untied Shoes" name = "Untied Shoes"
desc = "Your shoes are untied! Click the alert or your shoes to tie them." desc = "Your shoes are untied! Click the alert or your shoes to tie them."
icon_state = "shoealert" icon_state = "shoealert"
/obj/screen/alert/shoes/knotted /atom/movable/screen/alert/shoes/knotted
name = "Knotted Shoes" name = "Knotted Shoes"
desc = "Someone tied your shoelaces together! Click the alert or your shoes to undo the knot." desc = "Someone tied your shoelaces together! Click the alert or your shoes to undo the knot."
icon_state = "shoealert" icon_state = "shoealert"
/obj/screen/alert/shoes/Click() /atom/movable/screen/alert/shoes/Click()
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes) if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes)
return return
@@ -708,7 +708,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen -= alerts[alerts[i]] mymob.client.screen -= alerts[alerts[i]]
return 1 return 1
for(var/i = 1, i <= alerts.len, i++) for(var/i = 1, i <= alerts.len, i++)
var/obj/screen/alert/alert = alerts[alerts[i]] var/atom/movable/screen/alert/alert = alerts[alerts[i]]
if(alert.icon_state == "template") if(alert.icon_state == "template")
alert.icon = ui_style alert.icon = ui_style
switch(i) switch(i)
@@ -728,7 +728,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen |= alert mymob.client.screen |= alert
return 1 return 1
/obj/screen/alert/Click(location, control, params) /atom/movable/screen/alert/Click(location, control, params)
if(!usr || !usr.client) if(!usr || !usr.client)
return return
var/paramslist = params2list(params) var/paramslist = params2list(params)
@@ -738,7 +738,7 @@ so as to remain in compliance with the most up-to-date laws."
if(master) if(master)
return usr.client.Click(master, location, control, params) return usr.client.Click(master, location, control, params)
/obj/screen/alert/Destroy() /atom/movable/screen/alert/Destroy()
. = ..() . = ..()
severity = 0 severity = 0
master = null master = null
+20 -20
View File
@@ -1,23 +1,23 @@
/obj/screen/alien /atom/movable/screen/alien
icon = 'icons/mob/screen_alien.dmi' icon = 'icons/mob/screen_alien.dmi'
/obj/screen/alien/leap /atom/movable/screen/alien/leap
name = "toggle leap" name = "toggle leap"
icon_state = "leap_off" icon_state = "leap_off"
/obj/screen/alien/leap/Click() /atom/movable/screen/alien/leap/Click()
if(isalienhunter(usr)) if(isalienhunter(usr))
var/mob/living/carbon/alien/humanoid/hunter/AH = usr var/mob/living/carbon/alien/humanoid/hunter/AH = usr
AH.toggle_leap() AH.toggle_leap()
/obj/screen/alien/plasma_display /atom/movable/screen/alien/plasma_display
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
icon_state = "power_display2" icon_state = "power_display2"
name = "plasma stored" name = "plasma stored"
screen_loc = ui_alienplasmadisplay screen_loc = ui_alienplasmadisplay
/obj/screen/alien/alien_queen_finder /atom/movable/screen/alien/alien_queen_finder
icon = 'icons/mob/screen_alien.dmi' icon = 'icons/mob/screen_alien.dmi'
icon_state = "queen_finder" icon_state = "queen_finder"
name = "queen sense" name = "queen sense"
@@ -30,7 +30,7 @@
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner) /datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
//equippable shit //equippable shit
@@ -39,55 +39,55 @@
//begin buttons //begin buttons
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_1" using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1) using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_2" using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2) using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
action_intent = new /obj/screen/act_intent/alien() action_intent = new /atom/movable/screen/act_intent/alien()
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
if(isalienhunter(mymob)) if(isalienhunter(mymob))
var/mob/living/carbon/alien/humanoid/hunter/H = mymob var/mob/living/carbon/alien/humanoid/hunter/H = mymob
H.leap_icon = new /obj/screen/alien/leap() H.leap_icon = new /atom/movable/screen/alien/leap()
H.leap_icon.screen_loc = ui_alien_storage_r H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon static_inventory += H.leap_icon
using = new/obj/screen/language_menu using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu using.screen_loc = ui_alien_language_menu
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/drop() using = new /atom/movable/screen/drop()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_drop_throw using.screen_loc = ui_drop_throw
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/resist() using = new /atom/movable/screen/resist()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_pull_resist using.screen_loc = ui_pull_resist
using.hud = src using.hud = src
hotkeybuttons += using hotkeybuttons += using
throw_icon = new /obj/screen/throw_catch() throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src throw_icon.hud = src
hotkeybuttons += throw_icon hotkeybuttons += throw_icon
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
@@ -96,25 +96,25 @@
//begin indicators //begin indicators
healths = new /obj/screen/healths/alien() healths = new /atom/movable/screen/healths/alien()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
alien_plasma_display = new /obj/screen/alien/plasma_display() alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
alien_plasma_display.hud = src alien_plasma_display.hud = src
infodisplay += alien_plasma_display infodisplay += alien_plasma_display
if(!isalienqueen(mymob)) if(!isalienqueen(mymob))
alien_queen_finder = new /obj/screen/alien/alien_queen_finder alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder
alien_queen_finder.hud = src alien_queen_finder.hud = src
infodisplay += alien_queen_finder infodisplay += alien_queen_finder
zone_select = new /obj/screen/zone_sel/alien() zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
inv.hud = src inv.hud = src
inv_slots[inv.slot_id] = inv inv_slots[inv.slot_id] = inv
+7 -7
View File
@@ -3,34 +3,34 @@
/datum/hud/larva/New(mob/owner) /datum/hud/larva/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
action_intent = new /obj/screen/act_intent/alien() action_intent = new /atom/movable/screen/act_intent/alien()
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
healths = new /obj/screen/healths/alien() healths = new /atom/movable/screen/healths/alien()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
alien_queen_finder = new /obj/screen/alien/alien_queen_finder() alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder()
alien_queen_finder.hud = src alien_queen_finder.hud = src
infodisplay += alien_queen_finder infodisplay += alien_queen_finder
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_alien.dmi' pull_icon.icon = 'icons/mob/screen_alien.dmi'
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist pull_icon.screen_loc = ui_pull_resist
hotkeybuttons += pull_icon hotkeybuttons += pull_icon
using = new/obj/screen/language_menu using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu using.screen_loc = ui_alien_language_menu
using.hud = src using.hud = src
static_inventory += using static_inventory += using
zone_select = new /obj/screen/zone_sel/alien() zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
+35 -35
View File
@@ -1,39 +1,39 @@
/obj/screen/blob /atom/movable/screen/blob
icon = 'icons/mob/blob.dmi' icon = 'icons/mob/blob.dmi'
/obj/screen/blob/MouseEntered(location,control,params) /atom/movable/screen/blob/MouseEntered(location,control,params)
openToolTip(usr,src,params,title = name,content = desc, theme = "blob") openToolTip(usr,src,params,title = name,content = desc, theme = "blob")
/obj/screen/blob/MouseExited() /atom/movable/screen/blob/MouseExited()
closeToolTip(usr) closeToolTip(usr)
/obj/screen/blob/BlobHelp /atom/movable/screen/blob/BlobHelp
icon_state = "ui_help" icon_state = "ui_help"
name = "Blob Help" name = "Blob Help"
desc = "Help on playing blob!" desc = "Help on playing blob!"
/obj/screen/blob/BlobHelp/Click() /atom/movable/screen/blob/BlobHelp/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.blob_help() B.blob_help()
/obj/screen/blob/JumpToNode /atom/movable/screen/blob/JumpToNode
icon_state = "ui_tonode" icon_state = "ui_tonode"
name = "Jump to Node" name = "Jump to Node"
desc = "Moves your camera to a selected blob node." desc = "Moves your camera to a selected blob node."
/obj/screen/blob/JumpToNode/Click() /atom/movable/screen/blob/JumpToNode/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.jump_to_node() B.jump_to_node()
/obj/screen/blob/JumpToCore /atom/movable/screen/blob/JumpToCore
icon_state = "ui_tocore" icon_state = "ui_tocore"
name = "Jump to Core" name = "Jump to Core"
desc = "Moves your camera to your blob core." desc = "Moves your camera to your blob core."
/obj/screen/blob/JumpToCore/MouseEntered(location,control,params) /atom/movable/screen/blob/JumpToCore/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob)) if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob var/mob/camera/blob/B = hud.mymob
if(!B.placed) if(!B.placed)
@@ -44,59 +44,59 @@
desc = initial(desc) desc = initial(desc)
..() ..()
/obj/screen/blob/JumpToCore/Click() /atom/movable/screen/blob/JumpToCore/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
if(!B.placed) if(!B.placed)
B.place_blob_core(0) B.place_blob_core(0)
B.transport_core() B.transport_core()
/obj/screen/blob/Blobbernaut /atom/movable/screen/blob/Blobbernaut
icon_state = "ui_blobbernaut" icon_state = "ui_blobbernaut"
name = "Produce Blobbernaut (40)" name = "Produce Blobbernaut (40)"
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores." desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores."
/obj/screen/blob/Blobbernaut/Click() /atom/movable/screen/blob/Blobbernaut/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.create_blobbernaut() B.create_blobbernaut()
/obj/screen/blob/ResourceBlob /atom/movable/screen/blob/ResourceBlob
icon_state = "ui_resource" icon_state = "ui_resource"
name = "Produce Resource Blob (40)" name = "Produce Resource Blob (40)"
desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds." desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds."
/obj/screen/blob/ResourceBlob/Click() /atom/movable/screen/blob/ResourceBlob/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.create_resource() B.create_resource()
/obj/screen/blob/NodeBlob /atom/movable/screen/blob/NodeBlob
icon_state = "ui_node" icon_state = "ui_node"
name = "Produce Node Blob (50)" name = "Produce Node Blob (50)"
desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs." desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
/obj/screen/blob/NodeBlob/Click() /atom/movable/screen/blob/NodeBlob/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.create_node() B.create_node()
/obj/screen/blob/FactoryBlob /atom/movable/screen/blob/FactoryBlob
icon_state = "ui_factory" icon_state = "ui_factory"
name = "Produce Factory Blob (60)" name = "Produce Factory Blob (60)"
desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds." desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds."
/obj/screen/blob/FactoryBlob/Click() /atom/movable/screen/blob/FactoryBlob/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.create_factory() B.create_factory()
/obj/screen/blob/ReadaptStrain /atom/movable/screen/blob/ReadaptStrain
icon_state = "ui_chemswap" icon_state = "ui_chemswap"
name = "Readapt Strain (40)" name = "Readapt Strain (40)"
desc = "Allows you to choose a new strain from 4 random choices for 40 resources." desc = "Allows you to choose a new strain from 4 random choices for 40 resources."
/obj/screen/blob/ReadaptStrain/MouseEntered(location,control,params) /atom/movable/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob)) if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob var/mob/camera/blob/B = hud.mymob
if(B.free_strain_rerolls) if(B.free_strain_rerolls)
@@ -107,26 +107,26 @@
desc = initial(desc) desc = initial(desc)
..() ..()
/obj/screen/blob/ReadaptStrain/Click() /atom/movable/screen/blob/ReadaptStrain/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.strain_reroll() B.strain_reroll()
/obj/screen/blob/RelocateCore /atom/movable/screen/blob/RelocateCore
icon_state = "ui_swap" icon_state = "ui_swap"
name = "Relocate Core (80)" name = "Relocate Core (80)"
desc = "Swaps a node and your core for 80 resources." desc = "Swaps a node and your core for 80 resources."
/obj/screen/blob/RelocateCore/Click() /atom/movable/screen/blob/RelocateCore/Click()
if(isovermind(usr)) if(isovermind(usr))
var/mob/camera/blob/B = usr var/mob/camera/blob/B = usr
B.relocate_core() B.relocate_core()
/datum/hud/blob_overmind/New(mob/owner) /datum/hud/blob_overmind/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
blobpwrdisplay = new /obj/screen() blobpwrdisplay = new /atom/movable/screen()
blobpwrdisplay.name = "blob power" blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block" blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health blobpwrdisplay.screen_loc = ui_health
@@ -136,51 +136,51 @@
blobpwrdisplay.hud = src blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob() healths = new /atom/movable/screen/healths/blob()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
using = new /obj/screen/blob/BlobHelp() using = new /atom/movable/screen/blob/BlobHelp()
using.screen_loc = "WEST:6,NORTH:-3" using.screen_loc = "WEST:6,NORTH:-3"
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/JumpToNode() using = new /atom/movable/screen/blob/JumpToNode()
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/JumpToCore() using = new /atom/movable/screen/blob/JumpToCore()
using.screen_loc = ui_zonesel using.screen_loc = ui_zonesel
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/Blobbernaut() using = new /atom/movable/screen/blob/Blobbernaut()
using.screen_loc = ui_belt using.screen_loc = ui_belt
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/ResourceBlob() using = new /atom/movable/screen/blob/ResourceBlob()
using.screen_loc = ui_back using.screen_loc = ui_back
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/NodeBlob() using = new /atom/movable/screen/blob/NodeBlob()
using.screen_loc = ui_hand_position(2) using.screen_loc = ui_hand_position(2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/FactoryBlob() using = new /atom/movable/screen/blob/FactoryBlob()
using.screen_loc = ui_hand_position(1) using.screen_loc = ui_hand_position(1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/ReadaptStrain() using = new /atom/movable/screen/blob/ReadaptStrain()
using.screen_loc = ui_storage1 using.screen_loc = ui_storage1
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/blob/RelocateCore() using = new /atom/movable/screen/blob/RelocateCore()
using.screen_loc = ui_storage2 using.screen_loc = ui_storage2
using.hud = src using.hud = src
static_inventory += using static_inventory += using
+2 -2
View File
@@ -2,10 +2,10 @@
/datum/hud/blobbernaut/New(mob/owner) /datum/hud/blobbernaut/New(mob/owner)
..() ..()
blobpwrdisplay = new /obj/screen/healths/blob/naut/core() blobpwrdisplay = new /atom/movable/screen/healths/blob/naut/core()
blobpwrdisplay.hud = src blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob/naut() healths = new /atom/movable/screen/healths/blob/naut()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
+10 -10
View File
@@ -1,20 +1,20 @@
/datum/hud/marauder /datum/hud/marauder
var/obj/screen/hosthealth var/atom/movable/screen/hosthealth
var/obj/screen/blockchance var/atom/movable/screen/blockchance
var/obj/screen/counterchance var/atom/movable/screen/counterchance
/datum/hud/marauder/New(mob/living/simple_animal/hostile/clockwork/guardian/owner) /datum/hud/marauder/New(mob/living/simple_animal/hostile/clockwork/guardian/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
healths = new /obj/screen/healths/clock() healths = new /atom/movable/screen/healths/clock()
infodisplay += healths infodisplay += healths
hosthealth = new /obj/screen/healths/clock() hosthealth = new /atom/movable/screen/healths/clock()
hosthealth.screen_loc = ui_internal hosthealth.screen_loc = ui_internal
infodisplay += hosthealth infodisplay += hosthealth
using = new /obj/screen/marauder/emerge() using = new /atom/movable/screen/marauder/emerge()
using.screen_loc = ui_zonesel using.screen_loc = ui_zonesel
static_inventory += using static_inventory += using
@@ -28,15 +28,15 @@
if(client && !hud_used) if(client && !hud_used)
hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style)) hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style))
/obj/screen/marauder /atom/movable/screen/marauder
icon = 'icons/mob/clockwork_mobs.dmi' icon = 'icons/mob/clockwork_mobs.dmi'
/obj/screen/marauder/emerge /atom/movable/screen/marauder/emerge
icon_state = "clockguard_emerge" icon_state = "clockguard_emerge"
name = "Emerge/Return" name = "Emerge/Return"
desc = "Emerge or Return." desc = "Emerge or Return."
/obj/screen/marauder/emerge/Click() /atom/movable/screen/marauder/emerge/Click()
if(istype(usr, /mob/living/simple_animal/hostile/clockwork/guardian)) if(istype(usr, /mob/living/simple_animal/hostile/clockwork/guardian))
var/mob/living/simple_animal/hostile/clockwork/guardian/G = usr var/mob/living/simple_animal/hostile/clockwork/guardian/G = usr
if(G.is_in_host()) if(G.is_in_host())
+2 -2
View File
@@ -3,13 +3,13 @@
/datum/hud/constructs/New(mob/owner) /datum/hud/constructs/New(mob/owner)
..() ..()
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
pull_icon.screen_loc = ui_construct_pull pull_icon.screen_loc = ui_construct_pull
static_inventory += pull_icon static_inventory += pull_icon
healths = new /obj/screen/healths/construct() healths = new /atom/movable/screen/healths/construct()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
+5 -5
View File
@@ -18,7 +18,7 @@
for(var/I in credit_order_for_this_round) for(var/I in credit_order_for_this_round)
if(!credits) if(!credits)
return return
_credits += new /obj/screen/credit(null, I, src, credits_icon) _credits += new /atom/movable/screen/credit(null, I, src, credits_icon)
sleep(CREDIT_SPAWN_SPEED) sleep(CREDIT_SPAWN_SPEED)
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED) sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
remove_verb(src, /client/proc/ClearCredits) remove_verb(src, /client/proc/ClearCredits)
@@ -31,7 +31,7 @@
QDEL_LIST(credits) QDEL_LIST(credits)
credits = null credits = null
/obj/screen/credit /atom/movable/screen/credit
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 0 alpha = 0
screen_loc = "12,1" screen_loc = "12,1"
@@ -39,7 +39,7 @@
var/client/parent var/client/parent
var/matrix/target var/matrix/target
/obj/screen/credit/Initialize(mapload, credited, client/P, icon/I) /atom/movable/screen/credit/Initialize(mapload, credited, client/P, icon/I)
. = ..() . = ..()
icon = I icon = I
parent = P parent = P
@@ -57,7 +57,7 @@
QDEL_IN(src, CREDIT_ROLL_SPEED) QDEL_IN(src, CREDIT_ROLL_SPEED)
P.screen += src P.screen += src
/obj/screen/credit/Destroy() /atom/movable/screen/credit/Destroy()
var/client/P = parent var/client/P = parent
P.screen -= src P.screen -= src
icon = null icon = null
@@ -65,5 +65,5 @@
parent = null parent = null
return ..() return ..()
/obj/screen/credit/proc/FadeOut() /atom/movable/screen/credit/proc/FadeOut()
animate(src, alpha = 0, transform = target, time = CREDIT_EASE_DURATION) animate(src, alpha = 0, transform = target, time = CREDIT_EASE_DURATION)
+8 -8
View File
@@ -4,15 +4,15 @@
/datum/hud/devil/New(mob/owner) /datum/hud/devil/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
using = new /obj/screen/drop() using = new /atom/movable/screen/drop()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_drone_drop using.screen_loc = ui_drone_drop
using.hud = src using.hud = src
static_inventory += using static_inventory += using
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
@@ -21,7 +21,7 @@
build_hand_slots() build_hand_slots()
using = new /obj/screen/inventory() using = new /atom/movable/screen/inventory()
using.name = "hand" using.name = "hand"
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_1_m" using.icon_state = "swap_1_m"
@@ -31,7 +31,7 @@
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/inventory() using = new /atom/movable/screen/inventory()
using.name = "hand" using.name = "hand"
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_2" using.icon_state = "swap_2"
@@ -41,15 +41,15 @@
using.hud = src using.hud = src
static_inventory += using static_inventory += using
zone_select = new /obj/screen/zone_sel() zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style zone_select.icon = ui_style
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
lingchemdisplay = new /obj/screen/ling/chems() lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src lingchemdisplay.hud = src
devilsouldisplay = new /obj/screen/devil/soul_counter devilsouldisplay = new /atom/movable/screen/devil/soul_counter
devilsouldisplay.hud = src devilsouldisplay.hud = src
infodisplay += devilsouldisplay infodisplay += devilsouldisplay
+4 -4
View File
@@ -1,8 +1,8 @@
/datum/hud/dextrous/drone/New(mob/owner) /datum/hud/dextrous/drone/New(mob/owner)
..() ..()
var/obj/screen/inventory/inv_box var/atom/movable/screen/inventory/inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage" inv_box.name = "internal storage"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "suit_storage" inv_box.icon_state = "suit_storage"
@@ -11,7 +11,7 @@
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head/mask" inv_box.name = "head/mask"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "mask" inv_box.icon_state = "mask"
@@ -20,7 +20,7 @@
inv_box.slot_id = SLOT_HEAD inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box static_inventory += inv_box
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
inv.hud = src inv.hud = src
inv_slots[inv.slot_id] = inv inv_slots[inv.slot_id] = inv
+28 -28
View File
@@ -1,5 +1,5 @@
/mob/proc/overlay_fullscreen(category, type, severity) /mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen = screens[category] var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type) if (!screen || screen.type != type)
// needs to be recreated // needs to be recreated
clear_fullscreen(category, FALSE) clear_fullscreen(category, FALSE)
@@ -17,7 +17,7 @@
return screen return screen
/mob/proc/clear_fullscreen(category, animated = 10) /mob/proc/clear_fullscreen(category, animated = 10)
var/obj/screen/fullscreen/screen = screens[category] var/atom/movable/screen/fullscreen/screen = screens[category]
if(!screen) if(!screen)
return return
@@ -31,7 +31,7 @@
client.screen -= screen client.screen -= screen
qdel(screen) qdel(screen)
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen) /mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen)
if(client) if(client)
client.screen -= screen client.screen -= screen
qdel(screen) qdel(screen)
@@ -47,7 +47,7 @@
/mob/proc/reload_fullscreen() /mob/proc/reload_fullscreen()
if(client) if(client)
var/obj/screen/fullscreen/screen var/atom/movable/screen/fullscreen/screen
for(var/category in screens) for(var/category in screens)
screen = screens[category] screen = screens[category]
if(screen.should_show_to(src)) if(screen.should_show_to(src))
@@ -56,7 +56,7 @@
else else
client.screen -= screen client.screen -= screen
/obj/screen/fullscreen /atom/movable/screen/fullscreen
icon = 'icons/mob/screen_full.dmi' icon = 'icons/mob/screen_full.dmi'
icon_state = "default" icon_state = "default"
screen_loc = "CENTER-7,CENTER-7" screen_loc = "CENTER-7,CENTER-7"
@@ -67,89 +67,89 @@
var/severity = 0 var/severity = 0
var/show_when_dead = FALSE var/show_when_dead = FALSE
/obj/screen/fullscreen/proc/update_for_view(client_view) /atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view) if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view) var/list/actualview = getviewsize(client_view)
view = client_view view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0) transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/obj/screen/fullscreen/proc/should_show_to(mob/mymob) /atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD) if(!show_when_dead && mymob.stat == DEAD)
return FALSE return FALSE
return TRUE return TRUE
/obj/screen/fullscreen/Destroy() /atom/movable/screen/fullscreen/Destroy()
severity = 0 severity = 0
. = ..() . = ..()
/obj/screen/fullscreen/brute /atom/movable/screen/fullscreen/brute
icon_state = "brutedamageoverlay" icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/oxy /atom/movable/screen/fullscreen/oxy
icon_state = "oxydamageoverlay" icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit /atom/movable/screen/fullscreen/crit
icon_state = "passage" icon_state = "passage"
layer = CRIT_LAYER layer = CRIT_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit/vision /atom/movable/screen/fullscreen/crit/vision
icon_state = "oxydamageoverlay" icon_state = "oxydamageoverlay"
layer = BLIND_LAYER layer = BLIND_LAYER
/obj/screen/fullscreen/blind /atom/movable/screen/fullscreen/blind
icon_state = "blackimageoverlay" icon_state = "blackimageoverlay"
layer = BLIND_LAYER layer = BLIND_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/curse /atom/movable/screen/fullscreen/curse
icon_state = "curse" icon_state = "curse"
layer = CURSE_LAYER layer = CURSE_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/impaired /atom/movable/screen/fullscreen/impaired
icon_state = "impairedoverlay" icon_state = "impairedoverlay"
/obj/screen/fullscreen/blurry /atom/movable/screen/fullscreen/blurry
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "blurry" icon_state = "blurry"
/obj/screen/fullscreen/flash /atom/movable/screen/fullscreen/flash
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash" icon_state = "flash"
/obj/screen/fullscreen/flash/static /atom/movable/screen/fullscreen/flash/static
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise" icon_state = "noise"
/obj/screen/fullscreen/high /atom/movable/screen/fullscreen/high
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy" icon_state = "druggy"
/obj/screen/fullscreen/color_vision /atom/movable/screen/fullscreen/color_vision
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash" icon_state = "flash"
alpha = 80 alpha = 80
/obj/screen/fullscreen/color_vision/green /atom/movable/screen/fullscreen/color_vision/green
color = "#00ff00" color = "#00ff00"
/obj/screen/fullscreen/color_vision/red /atom/movable/screen/fullscreen/color_vision/red
color = "#ff0000" color = "#ff0000"
/obj/screen/fullscreen/color_vision/blue /atom/movable/screen/fullscreen/color_vision/blue
color = "#0000ff" color = "#0000ff"
/obj/screen/fullscreen/cinematic_backdrop /atom/movable/screen/fullscreen/cinematic_backdrop
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH" screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash" icon_state = "flash"
@@ -158,7 +158,7 @@
color = "#000000" color = "#000000"
show_when_dead = TRUE show_when_dead = TRUE
/obj/screen/fullscreen/lighting_backdrop /atom/movable/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash" icon_state = "flash"
transform = matrix(200, 0, 0, 0, 200, 0) transform = matrix(200, 0, 0, 0, 200, 0)
@@ -167,18 +167,18 @@
show_when_dead = TRUE show_when_dead = TRUE
//Provides darkness to the back of the lighting plane //Provides darkness to the back of the lighting plane
/obj/screen/fullscreen/lighting_backdrop/lit /atom/movable/screen/fullscreen/lighting_backdrop/lit
invisibility = INVISIBILITY_LIGHTING invisibility = INVISIBILITY_LIGHTING
layer = BACKGROUND_LAYER+21 layer = BACKGROUND_LAYER+21
color = "#000" color = "#000"
show_when_dead = TRUE show_when_dead = TRUE
//Provides whiteness in case you don't see lights so everything is still visible //Provides whiteness in case you don't see lights so everything is still visible
/obj/screen/fullscreen/lighting_backdrop/unlit /atom/movable/screen/fullscreen/lighting_backdrop/unlit
layer = BACKGROUND_LAYER+20 layer = BACKGROUND_LAYER+20
show_when_dead = TRUE show_when_dead = TRUE
/obj/screen/fullscreen/see_through_darkness /atom/movable/screen/fullscreen/see_through_darkness
icon_state = "nightvision" icon_state = "nightvision"
plane = LIGHTING_PLANE plane = LIGHTING_PLANE
layer = LIGHTING_LAYER layer = LIGHTING_LAYER
+10 -10
View File
@@ -1,15 +1,15 @@
//Used for normal mobs that have hands. //Used for normal mobs that have hands.
/datum/hud/dextrous/New(mob/living/owner) /datum/hud/dextrous/New(mob/living/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
using = new /obj/screen/drop() using = new /atom/movable/screen/drop()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_drone_drop using.screen_loc = ui_drone_drop
using.hud = src using.hud = src
static_inventory += using static_inventory += using
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
@@ -18,14 +18,14 @@
build_hand_slots() build_hand_slots()
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_1_m" using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1) using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_2" using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2) using.screen_loc = ui_swaphand_position(owner,2)
@@ -35,29 +35,29 @@
if(mymob.possible_a_intents) if(mymob.possible_a_intents)
if(mymob.possible_a_intents.len == 4) if(mymob.possible_a_intents.len == 4)
// All possible intents - full intent selector // All possible intents - full intent selector
action_intent = new /obj/screen/act_intent/segmented action_intent = new /atom/movable/screen/act_intent/segmented
else else
action_intent = new /obj/screen/act_intent action_intent = new /atom/movable/screen/act_intent
action_intent.icon = ui_style action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
zone_select = new /obj/screen/zone_sel() zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style zone_select.icon = ui_style
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
using = new /obj/screen/area_creator using = new /atom/movable/screen/area_creator
using.icon = ui_style using.icon = ui_style
using.hud = src using.hud = src
static_inventory += using static_inventory += using
mymob.client.screen = list() mymob.client.screen = list()
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
inv.hud = src inv.hud = src
inv_slots[inv.slot_id] = inv inv_slots[inv.slot_id] = inv
+19 -19
View File
@@ -1,79 +1,79 @@
/obj/screen/ghost /atom/movable/screen/ghost
icon = 'icons/mob/screen_ghost.dmi' icon = 'icons/mob/screen_ghost.dmi'
/obj/screen/ghost/MouseEntered() /atom/movable/screen/ghost/MouseEntered()
flick(icon_state + "_anim", src) flick(icon_state + "_anim", src)
/obj/screen/ghost/jumptomob /atom/movable/screen/ghost/jumptomob
name = "Jump to mob" name = "Jump to mob"
icon_state = "jumptomob" icon_state = "jumptomob"
/obj/screen/ghost/jumptomob/Click() /atom/movable/screen/ghost/jumptomob/Click()
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.jumptomob() G.jumptomob()
/obj/screen/ghost/orbit /atom/movable/screen/ghost/orbit
name = "Orbit" name = "Orbit"
icon_state = "orbit" icon_state = "orbit"
/obj/screen/ghost/orbit/Click() /atom/movable/screen/ghost/orbit/Click()
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.follow() G.follow()
/obj/screen/ghost/reenter_corpse /atom/movable/screen/ghost/reenter_corpse
name = "Reenter corpse" name = "Reenter corpse"
icon_state = "reenter_corpse" icon_state = "reenter_corpse"
/obj/screen/ghost/reenter_corpse/Click() /atom/movable/screen/ghost/reenter_corpse/Click()
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.reenter_corpse() G.reenter_corpse()
/obj/screen/ghost/teleport /atom/movable/screen/ghost/teleport
name = "Teleport" name = "Teleport"
icon_state = "teleport" icon_state = "teleport"
/obj/screen/ghost/teleport/Click() /atom/movable/screen/ghost/teleport/Click()
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.dead_tele() G.dead_tele()
/obj/screen/ghost/spawners /atom/movable/screen/ghost/spawners
name = "Ghost role spawners" name = "Ghost role spawners"
icon_state = "spawners" icon_state = "spawners"
/obj/screen/ghost/spawners/Click() /atom/movable/screen/ghost/spawners/Click()
var/mob/dead/observer/G = usr var/mob/dead/observer/G = usr
G.open_spawners_menu() G.open_spawners_menu()
/datum/hud/ghost/New(mob/owner) /datum/hud/ghost/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
using = new /obj/screen/ghost/jumptomob() using = new /atom/movable/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob using.screen_loc = ui_ghost_jumptomob
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/ghost/orbit() using = new /atom/movable/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit using.screen_loc = ui_ghost_orbit
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/ghost/reenter_corpse() using = new /atom/movable/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse using.screen_loc = ui_ghost_reenter_corpse
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/ghost/teleport() using = new /atom/movable/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport using.screen_loc = ui_ghost_teleport
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/ghost/spawners() using = new /atom/movable/screen/ghost/spawners()
using.screen_loc = ui_ghost_spawners using.screen_loc = ui_ghost_spawners
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/language_menu using = new /atom/movable/screen/language_menu
using.icon = ui_style using.icon = ui_style
using.hud = src using.hud = src
static_inventory += using static_inventory += using
+28 -28
View File
@@ -1,18 +1,18 @@
/datum/hud/guardian/New(mob/living/simple_animal/hostile/guardian/owner) /datum/hud/guardian/New(mob/living/simple_animal/hostile/guardian/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
healths = new /obj/screen/healths/guardian() healths = new /atom/movable/screen/healths/guardian()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
using = new /obj/screen/guardian/Manifest() using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_hand_position(2) using.screen_loc = ui_hand_position(2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/guardian/Recall() using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_hand_position(1) using.screen_loc = ui_hand_position(1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
@@ -22,23 +22,23 @@
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/guardian/ToggleLight() using = new /atom/movable/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/guardian/Communicate() using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_back using.screen_loc = ui_back
using.hud = src using.hud = src
static_inventory += using static_inventory += using
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian /datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian
..() ..()
var/obj/screen/using var/atom/movable/screen/using
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous)) if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
var/obj/screen/inventory/inv_box var/atom/movable/screen/inventory/inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage" inv_box.name = "internal storage"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "suit_storage" inv_box.icon_state = "suit_storage"
@@ -46,24 +46,24 @@
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
static_inventory += inv_box static_inventory += inv_box
using = new /obj/screen/guardian/Communicate() using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_sstore1 using.screen_loc = ui_sstore1
static_inventory += using static_inventory += using
else else
using = new /obj/screen/guardian/Communicate() using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_id using.screen_loc = ui_id
static_inventory += using static_inventory += using
healths = new /obj/screen/healths/guardian() healths = new /atom/movable/screen/healths/guardian()
infodisplay += healths infodisplay += healths
using = new /obj/screen/guardian/Manifest() using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_belt using.screen_loc = ui_belt
static_inventory += using static_inventory += using
using = new /obj/screen/guardian/Recall() using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_back using.screen_loc = ui_back
static_inventory += using static_inventory += using
@@ -71,7 +71,7 @@
using.screen_loc = ui_storage2 using.screen_loc = ui_storage2
static_inventory += using static_inventory += using
using = new /obj/screen/guardian/ToggleLight() using = new /atom/movable/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
static_inventory += using static_inventory += using
@@ -91,65 +91,65 @@
..() ..()
/obj/screen/guardian /atom/movable/screen/guardian
icon = 'icons/mob/guardian.dmi' icon = 'icons/mob/guardian.dmi'
/obj/screen/guardian/Manifest /atom/movable/screen/guardian/Manifest
icon_state = "manifest" icon_state = "manifest"
name = "Manifest" name = "Manifest"
desc = "Spring forth into battle!" desc = "Spring forth into battle!"
/obj/screen/guardian/Manifest/Click() /atom/movable/screen/guardian/Manifest/Click()
if(isguardian(usr)) if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr var/mob/living/simple_animal/hostile/guardian/G = usr
G.Manifest() G.Manifest()
/obj/screen/guardian/Recall /atom/movable/screen/guardian/Recall
icon_state = "recall" icon_state = "recall"
name = "Recall" name = "Recall"
desc = "Return to your user." desc = "Return to your user."
/obj/screen/guardian/Recall/Click() /atom/movable/screen/guardian/Recall/Click()
if(isguardian(usr)) if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr var/mob/living/simple_animal/hostile/guardian/G = usr
G.Recall() G.Recall()
/obj/screen/guardian/ToggleMode /atom/movable/screen/guardian/ToggleMode
icon_state = "toggle" icon_state = "toggle"
name = "Toggle Mode" name = "Toggle Mode"
desc = "Switch between ability modes." desc = "Switch between ability modes."
/obj/screen/guardian/ToggleMode/Click() /atom/movable/screen/guardian/ToggleMode/Click()
if(isguardian(usr)) if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleMode() G.ToggleMode()
/obj/screen/guardian/ToggleMode/Inactive /atom/movable/screen/guardian/ToggleMode/Inactive
icon_state = "notoggle" //greyed out so it doesn't look like it'll work icon_state = "notoggle" //greyed out so it doesn't look like it'll work
/obj/screen/guardian/ToggleMode/Assassin /atom/movable/screen/guardian/ToggleMode/Assassin
icon_state = "stealth" icon_state = "stealth"
name = "Toggle Stealth" name = "Toggle Stealth"
desc = "Enter or exit stealth." desc = "Enter or exit stealth."
/obj/screen/guardian/Communicate /atom/movable/screen/guardian/Communicate
icon_state = "communicate" icon_state = "communicate"
name = "Communicate" name = "Communicate"
desc = "Communicate telepathically with your user." desc = "Communicate telepathically with your user."
/obj/screen/guardian/Communicate/Click() /atom/movable/screen/guardian/Communicate/Click()
if(isguardian(usr)) if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr var/mob/living/simple_animal/hostile/guardian/G = usr
G.Communicate() G.Communicate()
/obj/screen/guardian/ToggleLight /atom/movable/screen/guardian/ToggleLight
icon_state = "light" icon_state = "light"
name = "Toggle Light" name = "Toggle Light"
desc = "Glow like star dust." desc = "Glow like star dust."
/obj/screen/guardian/ToggleLight/Click() /atom/movable/screen/guardian/ToggleLight/Click()
if(isguardian(usr)) if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleLight() G.ToggleLight()
+29 -29
View File
@@ -25,38 +25,38 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
var/inventory_shown = FALSE //Equipped item inventory var/inventory_shown = FALSE //Equipped item inventory
var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons) var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/ling/chems/lingchemdisplay var/atom/movable/screen/ling/chems/lingchemdisplay
var/obj/screen/ling/sting/lingstingdisplay var/atom/movable/screen/ling/sting/lingstingdisplay
var/obj/screen/blobpwrdisplay var/atom/movable/screen/blobpwrdisplay
var/obj/screen/alien_plasma_display var/atom/movable/screen/alien_plasma_display
var/obj/screen/alien_queen_finder var/atom/movable/screen/alien_queen_finder
var/obj/screen/devil/soul_counter/devilsouldisplay var/atom/movable/screen/devil/soul_counter/devilsouldisplay
var/obj/screen/action_intent var/atom/movable/screen/action_intent
var/obj/screen/zone_select var/atom/movable/screen/zone_select
var/obj/screen/pull_icon var/atom/movable/screen/pull_icon
var/obj/screen/rest_icon var/atom/movable/screen/rest_icon
var/obj/screen/throw_icon var/atom/movable/screen/throw_icon
var/obj/screen/module_store_icon var/atom/movable/screen/module_store_icon
var/list/static_inventory = list() //the screen objects which are static var/list/static_inventory = list() //the screen objects which are static
var/list/toggleable_inventory = list() //the screen objects which can be hidden var/list/toggleable_inventory = list() //the screen objects which can be hidden
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys var/list/atom/movable/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...) var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...) var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
var/list/inv_slots[SLOTS_AMT] // /obj/screen/inventory objects, ordered by their slot ID. var/list/inv_slots[SLOTS_AMT] // /atom/movable/screen/inventory objects, ordered by their slot ID.
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = FALSE var/action_buttons_hidden = FALSE
var/obj/screen/healths var/atom/movable/screen/healths
var/obj/screen/healthdoll var/atom/movable/screen/healthdoll
var/obj/screen/internals var/atom/movable/screen/internals
// subtypes can override this to force a specific UI style // subtypes can override this to force a specific UI style
var/ui_style var/ui_style
@@ -75,8 +75,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_slots = list() hand_slots = list()
for(var/mytype in subtypesof(/obj/screen/plane_master)) for(var/mytype in subtypesof(/atom/movable/screen/plane_master))
var/obj/screen/plane_master/instance = new mytype() var/atom/movable/screen/plane_master/instance = new mytype()
plane_masters["[instance.plane]"] = instance plane_masters["[instance.plane]"] = instance
instance.backdrop(mymob) instance.backdrop(mymob)
@@ -169,7 +169,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay //These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
for(var/h in hand_slots) for(var/h in hand_slots)
var/obj/screen/hand = hand_slots[h] var/atom/movable/screen/hand = hand_slots[h]
if(hand) if(hand)
screenmob.client.screen += hand screenmob.client.screen += hand
if(action_intent) if(action_intent)
@@ -207,7 +207,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
/datum/hud/proc/plane_masters_update() /datum/hud/proc/plane_masters_update()
// Plane masters are always shown to OUR mob, never to observers // Plane masters are always shown to OUR mob, never to observers
for(var/thing in plane_masters) for(var/thing in plane_masters)
var/obj/screen/plane_master/PM = plane_masters[thing] var/atom/movable/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob) PM.backdrop(mymob)
mymob.client.screen += PM mymob.client.screen += PM
@@ -261,13 +261,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//9/10 this is only called once per mob and only for 2 hands //9/10 this is only called once per mob and only for 2 hands
/datum/hud/proc/build_hand_slots() /datum/hud/proc/build_hand_slots()
for(var/h in hand_slots) for(var/h in hand_slots)
var/obj/screen/inventory/hand/H = hand_slots[h] var/atom/movable/screen/inventory/hand/H = hand_slots[h]
if(H) if(H)
static_inventory -= H static_inventory -= H
hand_slots = list() hand_slots = list()
var/obj/screen/inventory/hand/hand_box var/atom/movable/screen/inventory/hand/hand_box
for(var/i in 1 to mymob.held_items.len) for(var/i in 1 to mymob.held_items.len)
hand_box = new /obj/screen/inventory/hand() hand_box = new /atom/movable/screen/inventory/hand()
hand_box.name = mymob.get_held_index_name(i) hand_box.name = mymob.get_held_index_name(i)
hand_box.icon = ui_style hand_box.icon = ui_style
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]" hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
@@ -279,10 +279,10 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_box.update_icon() hand_box.update_icon()
var/i = 1 var/i = 1
for(var/obj/screen/swap_hand/SH in static_inventory) for(var/atom/movable/screen/swap_hand/SH in static_inventory)
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1) SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
i++ i++
for(var/obj/screen/human/equip/E in static_inventory) for(var/atom/movable/screen/human/equip/E in static_inventory)
E.screen_loc = ui_equip_position(mymob) E.screen_loc = ui_equip_position(mymob)
if(ismob(mymob) && mymob.hud_used == src) if(ismob(mymob) && mymob.hud_used == src)
+66 -66
View File
@@ -1,11 +1,11 @@
/obj/screen/human /atom/movable/screen/human
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
/obj/screen/human/toggle /atom/movable/screen/human/toggle
name = "toggle" name = "toggle"
icon_state = "toggle" icon_state = "toggle"
/obj/screen/human/toggle/Click() /atom/movable/screen/human/toggle/Click()
var/mob/targetmob = usr var/mob/targetmob = usr
@@ -23,26 +23,26 @@
targetmob.hud_used.hidden_inventory_update(usr) targetmob.hud_used.hidden_inventory_update(usr)
/obj/screen/human/equip /atom/movable/screen/human/equip
name = "equip" name = "equip"
icon_state = "act_equip" icon_state = "act_equip"
/obj/screen/human/equip/Click() /atom/movable/screen/human/equip/Click()
if(ismecha(usr.loc)) // stops inventory actions in a mech if(ismecha(usr.loc)) // stops inventory actions in a mech
return 1 return 1
var/mob/living/carbon/human/H = usr var/mob/living/carbon/human/H = usr
H.quick_equip() H.quick_equip()
/obj/screen/devil /atom/movable/screen/devil
invisibility = INVISIBILITY_ABSTRACT invisibility = INVISIBILITY_ABSTRACT
/obj/screen/devil/soul_counter /atom/movable/screen/devil/soul_counter
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
name = "souls owned" name = "souls owned"
icon_state = "Devil-6" icon_state = "Devil-6"
screen_loc = ui_devilsouldisplay screen_loc = ui_devilsouldisplay
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0) /atom/movable/screen/devil/soul_counter/proc/update_counter(souls = 0)
invisibility = 0 invisibility = 0
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>" maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
switch(souls) switch(souls)
@@ -59,53 +59,53 @@
else else
icon_state = "Devil-6" icon_state = "Devil-6"
/obj/screen/devil/soul_counter/proc/clear() /atom/movable/screen/devil/soul_counter/proc/clear()
invisibility = INVISIBILITY_ABSTRACT invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling /atom/movable/screen/ling
invisibility = INVISIBILITY_ABSTRACT invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling/sting /atom/movable/screen/ling/sting
name = "current sting" name = "current sting"
screen_loc = ui_lingstingdisplay screen_loc = ui_lingstingdisplay
/obj/screen/ling/sting/Click() /atom/movable/screen/ling/sting/Click()
if(isobserver(usr)) if(isobserver(usr))
return return
var/mob/living/carbon/U = usr var/mob/living/carbon/U = usr
U.unset_sting() U.unset_sting()
/obj/screen/ling/chems /atom/movable/screen/ling/chems
name = "chemical storage" name = "chemical storage"
icon_state = "power_display" icon_state = "power_display"
screen_loc = ui_lingchemdisplay screen_loc = ui_lingchemdisplay
/datum/hud/human/New(mob/living/carbon/human/owner) /datum/hud/human/New(mob/living/carbon/human/owner)
..() ..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness) owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
widescreenlayout = TRUE // CIT CHANGE - ditto widescreenlayout = TRUE // CIT CHANGE - ditto
var/obj/screen/using var/atom/movable/screen/using
var/obj/screen/inventory/inv_box var/atom/movable/screen/inventory/inv_box
using = new/obj/screen/language_menu using = new/atom/movable/screen/language_menu
using.icon = ui_style using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxlang // CIT CHANGE using.screen_loc = ui_boxlang // CIT CHANGE
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/area_creator using = new /atom/movable/screen/area_creator
using.icon = ui_style using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxarea // CIT CHANGE using.screen_loc = ui_boxarea // CIT CHANGE
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/voretoggle() //We fancy Vore now using = new /atom/movable/screen/voretoggle() //We fancy Vore now
using.icon = tg_ui_icon_to_cit_ui(ui_style) using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_voremode using.screen_loc = ui_voremode
if(!widescreenlayout) if(!widescreenlayout)
@@ -113,7 +113,7 @@
using.hud = src using.hud = src
static_inventory += using static_inventory += using
action_intent = new /obj/screen/act_intent/segmented action_intent = new /atom/movable/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
@@ -132,13 +132,13 @@
resistdelay.screen_loc = ui_resistdelay resistdelay.screen_loc = ui_resistdelay
static_inventory += resistdelay static_inventory += resistdelay
using = new /obj/screen/drop() using = new /atom/movable/screen/drop()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_drop_throw using.screen_loc = ui_drop_throw
using.hud = src using.hud = src
static_inventory += using static_inventory += using
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "i_clothing" inv_box.name = "i_clothing"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.slot_id = SLOT_W_UNIFORM inv_box.slot_id = SLOT_W_UNIFORM
@@ -146,7 +146,7 @@
inv_box.screen_loc = ui_iclothing inv_box.screen_loc = ui_iclothing
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "o_clothing" inv_box.name = "o_clothing"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.slot_id = SLOT_WEAR_SUIT inv_box.slot_id = SLOT_WEAR_SUIT
@@ -156,21 +156,21 @@
build_hand_slots() build_hand_slots()
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_1" using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1) using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_2" using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2) using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "id" inv_box.name = "id"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "id" inv_box.icon_state = "id"
@@ -178,7 +178,7 @@
inv_box.slot_id = SLOT_WEAR_ID inv_box.slot_id = SLOT_WEAR_ID
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask" inv_box.name = "mask"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "mask" inv_box.icon_state = "mask"
@@ -186,7 +186,7 @@
inv_box.slot_id = SLOT_WEAR_MASK inv_box.slot_id = SLOT_WEAR_MASK
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck" inv_box.name = "neck"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "neck" inv_box.icon_state = "neck"
@@ -194,7 +194,7 @@
inv_box.slot_id = SLOT_NECK inv_box.slot_id = SLOT_NECK
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back" inv_box.name = "back"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "back" inv_box.icon_state = "back"
@@ -202,7 +202,7 @@
inv_box.slot_id = SLOT_BACK inv_box.slot_id = SLOT_BACK
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage1" inv_box.name = "storage1"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "pocket" inv_box.icon_state = "pocket"
@@ -210,7 +210,7 @@
inv_box.slot_id = SLOT_L_STORE inv_box.slot_id = SLOT_L_STORE
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage2" inv_box.name = "storage2"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "pocket" inv_box.icon_state = "pocket"
@@ -218,7 +218,7 @@
inv_box.slot_id = SLOT_R_STORE inv_box.slot_id = SLOT_R_STORE
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "suit storage" inv_box.name = "suit storage"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "suit_storage" inv_box.icon_state = "suit_storage"
@@ -226,32 +226,32 @@
inv_box.slot_id = SLOT_S_STORE inv_box.slot_id = SLOT_S_STORE
static_inventory += inv_box static_inventory += inv_box
using = new /obj/screen/resist() using = new /atom/movable/screen/resist()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_overridden_resist // CIT CHANGE - changes this to overridden resist using.screen_loc = ui_overridden_resist // CIT CHANGE - changes this to overridden resist
using.hud = src using.hud = src
hotkeybuttons += using hotkeybuttons += using
using = new /obj/screen/rest() using = new /atom/movable/screen/rest()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_pull_resist using.screen_loc = ui_pull_resist
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//END OF CIT CHANGES //END OF CIT CHANGES
using = new /obj/screen/human/toggle() using = new /atom/movable/screen/human/toggle()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/human/equip() using = new /atom/movable/screen/human/equip()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_equip_position(mymob) using.screen_loc = ui_equip_position(mymob)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "gloves" inv_box.name = "gloves"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "gloves" inv_box.icon_state = "gloves"
@@ -259,7 +259,7 @@
inv_box.slot_id = SLOT_GLOVES inv_box.slot_id = SLOT_GLOVES
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "eyes" inv_box.name = "eyes"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "glasses" inv_box.icon_state = "glasses"
@@ -267,7 +267,7 @@
inv_box.slot_id = SLOT_GLASSES inv_box.slot_id = SLOT_GLASSES
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "ears" inv_box.name = "ears"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "ears" inv_box.icon_state = "ears"
@@ -275,7 +275,7 @@
inv_box.slot_id = SLOT_EARS inv_box.slot_id = SLOT_EARS
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head" inv_box.name = "head"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "head" inv_box.icon_state = "head"
@@ -283,7 +283,7 @@
inv_box.slot_id = SLOT_HEAD inv_box.slot_id = SLOT_HEAD
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "shoes" inv_box.name = "shoes"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "shoes" inv_box.icon_state = "shoes"
@@ -291,7 +291,7 @@
inv_box.slot_id = SLOT_SHOES inv_box.slot_id = SLOT_SHOES
toggleable_inventory += inv_box toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "belt" inv_box.name = "belt"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "belt" inv_box.icon_state = "belt"
@@ -300,72 +300,72 @@
inv_box.slot_id = SLOT_BELT inv_box.slot_id = SLOT_BELT
static_inventory += inv_box static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch() throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src throw_icon.hud = src
hotkeybuttons += throw_icon hotkeybuttons += throw_icon
internals = new /obj/screen/internals() internals = new /atom/movable/screen/internals()
internals.hud = src internals.hud = src
infodisplay += internals infodisplay += internals
healths = new /obj/screen/healths() healths = new /atom/movable/screen/healths()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
staminas = new /obj/screen/staminas() staminas = new /atom/movable/screen/staminas()
staminas.hud = src staminas.hud = src
infodisplay += staminas infodisplay += staminas
if(!CONFIG_GET(flag/disable_stambuffer)) if(!CONFIG_GET(flag/disable_stambuffer))
staminabuffer = new /obj/screen/staminabuffer() staminabuffer = new /atom/movable/screen/staminabuffer()
staminabuffer.hud = src staminabuffer.hud = src
infodisplay += staminabuffer infodisplay += staminabuffer
//END OF CIT CHANGES //END OF CIT CHANGES
healthdoll = new /obj/screen/healthdoll() healthdoll = new /atom/movable/screen/healthdoll()
healthdoll.hud = src healthdoll.hud = src
infodisplay += healthdoll infodisplay += healthdoll
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist pull_icon.screen_loc = ui_pull_resist
static_inventory += pull_icon static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems() lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src lingchemdisplay.hud = src
infodisplay += lingchemdisplay infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting() lingstingdisplay = new /atom/movable/screen/ling/sting()
lingstingdisplay.hud = src lingstingdisplay.hud = src
infodisplay += lingstingdisplay infodisplay += lingstingdisplay
devilsouldisplay = new /obj/screen/devil/soul_counter devilsouldisplay = new /atom/movable/screen/devil/soul_counter
devilsouldisplay.hud = src devilsouldisplay.hud = src
infodisplay += devilsouldisplay infodisplay += devilsouldisplay
blood_display = new /obj/screen/bloodsucker/blood_counter // Blood Volume blood_display = new /atom/movable/screen/bloodsucker/blood_counter // Blood Volume
blood_display.hud = src blood_display.hud = src
infodisplay += blood_display infodisplay += blood_display
vamprank_display = new /obj/screen/bloodsucker/rank_counter // Bloodsucker Rank vamprank_display = new /atom/movable/screen/bloodsucker/rank_counter // Bloodsucker Rank
vamprank_display.hud = src vamprank_display.hud = src
infodisplay += vamprank_display infodisplay += vamprank_display
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter // Sunlight sunlight_display = new /atom/movable/screen/bloodsucker/sunlight_counter // Sunlight
sunlight_display.hud = src sunlight_display.hud = src
infodisplay += sunlight_display infodisplay += sunlight_display
zone_select = new /obj/screen/zone_sel() zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style zone_select.icon = ui_style
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
inv.hud = src inv.hud = src
inv_slots[inv.slot_id] = inv inv_slots[inv.slot_id] = inv
@@ -374,12 +374,12 @@
update_locked_slots() update_locked_slots()
/datum/hud/human/proc/assert_move_intent_ui(mob/living/carbon/human/owner = mymob, on_new = FALSE) /datum/hud/human/proc/assert_move_intent_ui(mob/living/carbon/human/owner = mymob, on_new = FALSE)
var/obj/screen/using var/atom/movable/screen/using
// delete old ones // delete old ones
var/list/obj/screen/victims = list() var/list/atom/movable/screen/victims = list()
victims += locate(/obj/screen/mov_intent) in static_inventory victims += locate(/atom/movable/screen/mov_intent) in static_inventory
victims += locate(/obj/screen/sprintbutton) in static_inventory victims += locate(/atom/movable/screen/sprintbutton) in static_inventory
victims += locate(/obj/screen/sprint_buffer) in static_inventory victims += locate(/atom/movable/screen/sprint_buffer) in static_inventory
if(victims) if(victims)
static_inventory -= victims static_inventory -= victims
if(mymob?.client) if(mymob?.client)
@@ -388,7 +388,7 @@
// make new ones // make new ones
// walk/run // walk/run
using = new /obj/screen/mov_intent using = new /atom/movable/screen/mov_intent
using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon
using.screen_loc = ui_movi using.screen_loc = ui_movi
using.hud = src using.hud = src
@@ -401,7 +401,7 @@
return return
// sprint button // sprint button
using = new /obj/screen/sprintbutton using = new /atom/movable/screen/sprintbutton
using.icon = tg_ui_icon_to_cit_ui(ui_style) using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint") using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint")
using.screen_loc = ui_movi using.screen_loc = ui_movi
@@ -411,7 +411,7 @@
owner?.client?.screen += using owner?.client?.screen += using
// same as above but buffer. // same as above but buffer.
sprint_buffer = new /obj/screen/sprint_buffer sprint_buffer = new /atom/movable/screen/sprint_buffer
sprint_buffer.screen_loc = ui_sprintbufferloc sprint_buffer.screen_loc = ui_sprintbufferloc
sprint_buffer.hud = src sprint_buffer.hud = src
static_inventory += sprint_buffer static_inventory += sprint_buffer
@@ -425,7 +425,7 @@
if(!istype(H) || !H.dna.species) if(!istype(H) || !H.dna.species)
return return
var/datum/species/S = H.dna.species var/datum/species/S = H.dna.species
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
if(inv.slot_id in S.no_equip) if(inv.slot_id in S.no_equip)
inv.alpha = 128 inv.alpha = 128
+2 -2
View File
@@ -4,13 +4,13 @@
/datum/hud/lavaland_elite/New(mob/living/simple_animal/hostile/asteroid/elite) /datum/hud/lavaland_elite/New(mob/living/simple_animal/hostile/asteroid/elite)
..() ..()
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull pull_icon.screen_loc = ui_living_pull
static_inventory += pull_icon static_inventory += pull_icon
healths = new /obj/screen/healths/lavaland_elite() healths = new /atom/movable/screen/healths/lavaland_elite()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
+7 -7
View File
@@ -2,7 +2,7 @@
* A screen object, which acts as a container for turfs and other things * A screen object, which acts as a container for turfs and other things
* you want to show on the map, which you usually attach to "vis_contents". * you want to show on the map, which you usually attach to "vis_contents".
*/ */
/obj/screen/map_view /atom/movable/screen/map_view
// Map view has to be on the lowest plane to enable proper lighting // Map view has to be on the lowest plane to enable proper lighting
layer = GAME_PLANE layer = GAME_PLANE
plane = GAME_PLANE plane = GAME_PLANE
@@ -12,7 +12,7 @@
* It is also implicitly used to allocate a rectangle on the map, which will * It is also implicitly used to allocate a rectangle on the map, which will
* be used for auto-scaling the map. * be used for auto-scaling the map.
*/ */
/obj/screen/background /atom/movable/screen/background
name = "background" name = "background"
icon = 'icons/mob/map_backgrounds.dmi' icon = 'icons/mob/map_backgrounds.dmi'
icon_state = "clear" icon_state = "clear"
@@ -25,7 +25,7 @@
* *
* If applicable, "assigned_map" has to be assigned before this proc call. * If applicable, "assigned_map" has to be assigned before this proc call.
*/ */
/obj/screen/proc/set_position(x, y, px = 0, py = 0) /atom/movable/screen/proc/set_position(x, y, px = 0, py = 0)
if(assigned_map) if(assigned_map)
screen_loc = "[assigned_map]:[x]:[px],[y]:[py]" screen_loc = "[assigned_map]:[x]:[px],[y]:[py]"
else else
@@ -36,7 +36,7 @@
* *
* If applicable, "assigned_map" has to be assigned before this proc call. * If applicable, "assigned_map" has to be assigned before this proc call.
*/ */
/obj/screen/proc/fill_rect(x1, y1, x2, y2) /atom/movable/screen/proc/fill_rect(x1, y1, x2, y2)
if(assigned_map) if(assigned_map)
screen_loc = "[assigned_map]:[x1],[y1] to [x2],[y2]" screen_loc = "[assigned_map]:[x1],[y1] to [x2],[y2]"
else else
@@ -46,7 +46,7 @@
* Registers screen obj with the client, which makes it visible on the * Registers screen obj with the client, which makes it visible on the
* assigned map, and becomes a part of the assigned map's lifecycle. * assigned map, and becomes a part of the assigned map's lifecycle.
*/ */
/client/proc/register_map_obj(obj/screen/screen_obj) /client/proc/register_map_obj(atom/movable/screen/screen_obj)
if(!screen_obj.assigned_map) if(!screen_obj.assigned_map)
CRASH("Can't register [screen_obj] without 'assigned_map' property.") CRASH("Can't register [screen_obj] without 'assigned_map' property.")
if(!screen_maps[screen_obj.assigned_map]) if(!screen_maps[screen_obj.assigned_map])
@@ -68,7 +68,7 @@
/client/proc/clear_map(map_name) /client/proc/clear_map(map_name)
if(!map_name || !(map_name in screen_maps)) if(!map_name || !(map_name in screen_maps))
return FALSE return FALSE
for(var/obj/screen/screen_obj in screen_maps[map_name]) for(var/atom/movable/screen/screen_obj in screen_maps[map_name])
screen_maps[map_name] -= screen_obj screen_maps[map_name] -= screen_obj
if(screen_obj.del_on_map_removal) if(screen_obj.del_on_map_removal)
qdel(screen_obj) qdel(screen_obj)
@@ -122,7 +122,7 @@
var/y_value = world.icon_size * tilesize * height var/y_value = world.icon_size * tilesize * height
var/map_name = create_popup(popup_name, x_value, y_value) var/map_name = create_popup(popup_name, x_value, y_value)
var/obj/screen/background/background = new var/atom/movable/screen/background/background = new
background.assigned_map = map_name background.assigned_map = map_name
background.fill_rect(1, 1, width, height) background.fill_rect(1, 1, width, height)
if(bg_icon) if(bg_icon)
+21 -21
View File
@@ -1,28 +1,28 @@
/datum/hud/monkey/New(mob/living/carbon/monkey/owner) /datum/hud/monkey/New(mob/living/carbon/monkey/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
var/obj/screen/inventory/inv_box var/atom/movable/screen/inventory/inv_box
action_intent = new /obj/screen/act_intent() action_intent = new /atom/movable/screen/act_intent()
action_intent.icon = ui_style action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.screen_loc = ui_acti action_intent.screen_loc = ui_acti
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
using = new /obj/screen/mov_intent() using = new /atom/movable/screen/mov_intent()
using.icon = ui_style using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi using.screen_loc = ui_movi
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new/obj/screen/language_menu using = new/atom/movable/screen/language_menu
using.icon = ui_style using.icon = ui_style
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/drop() using = new /atom/movable/screen/drop()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_drop_throw using.screen_loc = ui_drop_throw
using.hud = src using.hud = src
@@ -30,21 +30,21 @@
build_hand_slots() build_hand_slots()
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_1_m" //extra wide! using.icon_state = "swap_1_m" //extra wide!
using.screen_loc = ui_swaphand_position(owner,1) using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swap_hand() using = new /atom/movable/screen/swap_hand()
using.icon = ui_style using.icon = ui_style
using.icon_state = "swap_2" using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2) using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask" inv_box.name = "mask"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "mask" inv_box.icon_state = "mask"
@@ -53,7 +53,7 @@
inv_box.slot_id = SLOT_WEAR_MASK inv_box.slot_id = SLOT_WEAR_MASK
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck" inv_box.name = "neck"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "neck" inv_box.icon_state = "neck"
@@ -62,7 +62,7 @@
inv_box.slot_id = SLOT_NECK inv_box.slot_id = SLOT_NECK
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head" inv_box.name = "head"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "head" inv_box.icon_state = "head"
@@ -71,7 +71,7 @@
inv_box.slot_id = SLOT_HEAD inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box static_inventory += inv_box
inv_box = new /obj/screen/inventory() inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back" inv_box.name = "back"
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.icon_state = "back" inv_box.icon_state = "back"
@@ -79,37 +79,37 @@
inv_box.slot_id = SLOT_BACK inv_box.slot_id = SLOT_BACK
static_inventory += inv_box static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch() throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src throw_icon.hud = src
hotkeybuttons += throw_icon hotkeybuttons += throw_icon
internals = new /obj/screen/internals() internals = new /atom/movable/screen/internals()
internals.hud = src internals.hud = src
infodisplay += internals infodisplay += internals
healths = new /obj/screen/healths() healths = new /atom/movable/screen/healths()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.screen_loc = ui_pull_resist pull_icon.screen_loc = ui_pull_resist
pull_icon.hud = src pull_icon.hud = src
pull_icon.update_icon() pull_icon.update_icon()
static_inventory += pull_icon static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems() lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src lingchemdisplay.hud = src
infodisplay += lingchemdisplay infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting() lingstingdisplay = new /atom/movable/screen/ling/sting()
lingstingdisplay.hud = src lingstingdisplay.hud = src
infodisplay += lingstingdisplay infodisplay += lingstingdisplay
zone_select = new /obj/screen/zone_sel() zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style zone_select.icon = ui_style
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
@@ -117,13 +117,13 @@
mymob.client.screen = list() mymob.client.screen = list()
using = new /obj/screen/resist() using = new /atom/movable/screen/resist()
using.icon = ui_style using.icon = ui_style
using.screen_loc = ui_pull_resist using.screen_loc = ui_pull_resist
using.hud = src using.hud = src
hotkeybuttons += using hotkeybuttons += using
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id) if(inv.slot_id)
inv.hud = src inv.hud = src
inv_slots[inv.slot_id] = inv inv_slots[inv.slot_id] = inv
+5 -5
View File
@@ -8,7 +8,7 @@
//Movable Screen Object //Movable Screen Object
//Not tied to the grid, places it's center where the cursor is //Not tied to the grid, places it's center where the cursor is
/obj/screen/movable /atom/movable/screen/movable
var/snap2grid = FALSE var/snap2grid = FALSE
var/moved = FALSE var/moved = FALSE
var/locked = FALSE var/locked = FALSE
@@ -18,11 +18,11 @@
//Snap Screen Object //Snap Screen Object
//Tied to the grid, snaps to the nearest turf //Tied to the grid, snaps to the nearest turf
/obj/screen/movable/snap /atom/movable/screen/movable/snap
snap2grid = TRUE snap2grid = TRUE
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params) /atom/movable/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
if(locked) //no! I am locked! begone! if(locked) //no! I am locked! begone!
return return
var/list/PM = params2list(params) var/list/PM = params2list(params)
@@ -56,7 +56,7 @@
set category = "Debug" set category = "Debug"
set name = "Spawn Movable UI Object" set name = "Spawn Movable UI Object"
var/obj/screen/movable/M = new() var/atom/movable/screen/movable/M = new()
M.name = "Movable UI Object" M.name = "Movable UI Object"
M.icon_state = "block" M.icon_state = "block"
M.maptext = "Movable" M.maptext = "Movable"
@@ -75,7 +75,7 @@
set category = "Debug" set category = "Debug"
set name = "Spawn Snap UI Object" set name = "Spawn Snap UI Object"
var/obj/screen/movable/snap/S = new() var/atom/movable/screen/movable/snap/S = new()
S.name = "Snap UI Object" S.name = "Snap UI Object"
S.icon_state = "block" S.icon_state = "block"
S.maptext = "Snap" S.maptext = "Snap"
+26 -26
View File
@@ -7,12 +7,12 @@
if(!length(C.parallax_layers_cached)) if(!length(C.parallax_layers_cached))
C.parallax_layers_cached = list() C.parallax_layers_cached = list()
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view) C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view) C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view) C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, C.view)
if(SSparallax.random_layer) if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view) C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy() C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -20,9 +20,9 @@
C.parallax_layers.len = C.parallax_layers_max C.parallax_layers.len = C.parallax_layers_max
C.screen |= (C.parallax_layers) C.screen |= (C.parallax_layers)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"] var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob) if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM C.screen += PM
PM.color = list( PM.color = list(
0, 0, 0, 0, 0, 0, 0, 0,
@@ -37,9 +37,9 @@
var/mob/screenmob = viewmob || mymob var/mob/screenmob = viewmob || mymob
var/client/C = screenmob.client var/client/C = screenmob.client
C.screen -= (C.parallax_layers_cached) C.screen -= (C.parallax_layers_cached)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"] var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob) if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM C.screen += PM
PM.color = initial(PM.color) PM.color = initial(PM.color)
C.parallax_layers = null C.parallax_layers = null
@@ -90,7 +90,7 @@
if(new_parallax_movedir == FALSE) if(new_parallax_movedir == FALSE)
var/animate_time = 0 var/animate_time = 0
for(var/thing in C.parallax_layers) for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing var/atom/movable/screen/parallax_layer/L = thing
L.icon_state = initial(L.icon_state) L.icon_state = initial(L.icon_state)
L.update_o(C.view) L.update_o(C.view)
var/T = PARALLAX_LOOP_TIME / L.speed var/T = PARALLAX_LOOP_TIME / L.speed
@@ -113,7 +113,7 @@
var/shortesttimer var/shortesttimer
if(!skip_windups) if(!skip_windups)
for(var/thing in C.parallax_layers) for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing var/atom/movable/screen/parallax_layer/L = thing
var/T = PARALLAX_LOOP_TIME / L.speed var/T = PARALLAX_LOOP_TIME / L.speed
if (isnull(shortesttimer)) if (isnull(shortesttimer))
@@ -141,7 +141,7 @@
return return
C.parallax_animate_timer = FALSE C.parallax_animate_timer = FALSE
for(var/thing in C.parallax_layers) for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing var/atom/movable/screen/parallax_layer/L = thing
if (!new_parallax_movedir) if (!new_parallax_movedir)
animate(L) animate(L)
continue continue
@@ -188,7 +188,7 @@
C.last_parallax_shift = world.time C.last_parallax_shift = world.time
for(var/thing in C.parallax_layers) for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing var/atom/movable/screen/parallax_layer/L = thing
L.update_status(mymob) L.update_status(mymob)
if (L.view_sized != C.view) if (L.view_sized != C.view)
L.update_o(C.view) L.update_o(C.view)
@@ -233,7 +233,7 @@
var/area/areaobj = get_area(client.eye) var/area/areaobj = get_area(client.eye)
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE) hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)
/obj/screen/parallax_layer /atom/movable/screen/parallax_layer
icon = 'icons/effects/parallax.dmi' icon = 'icons/effects/parallax.dmi'
var/speed = 1 var/speed = 1
var/offset_x = 0 var/offset_x = 0
@@ -246,13 +246,13 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/parallax_layer/Initialize(mapload, view) /atom/movable/screen/parallax_layer/Initialize(mapload, view)
. = ..() . = ..()
if (!view) if (!view)
view = world.view view = world.view
update_o(view) update_o(view)
/obj/screen/parallax_layer/proc/update_o(view) /atom/movable/screen/parallax_layer/proc/update_o(view)
if (!view) if (!view)
view = world.view view = world.view
@@ -271,52 +271,52 @@
add_overlay(new_overlays) add_overlay(new_overlays)
view_sized = view view_sized = view
/obj/screen/parallax_layer/proc/update_status(mob/M) /atom/movable/screen/parallax_layer/proc/update_status(mob/M)
return return
/obj/screen/parallax_layer/layer_1 /atom/movable/screen/parallax_layer/layer_1
icon_state = "layer1" icon_state = "layer1"
speed = 0.6 speed = 0.6
layer = 1 layer = 1
/obj/screen/parallax_layer/layer_2 /atom/movable/screen/parallax_layer/layer_2
icon_state = "layer2" icon_state = "layer2"
speed = 1 speed = 1
layer = 2 layer = 2
/obj/screen/parallax_layer/layer_3 /atom/movable/screen/parallax_layer/layer_3
icon_state = "layer3" icon_state = "layer3"
speed = 1.4 speed = 1.4
layer = 3 layer = 3
/obj/screen/parallax_layer/random /atom/movable/screen/parallax_layer/random
blend_mode = BLEND_OVERLAY blend_mode = BLEND_OVERLAY
speed = 3 speed = 3
layer = 3 layer = 3
/obj/screen/parallax_layer/random/space_gas /atom/movable/screen/parallax_layer/random/space_gas
icon_state = "space_gas" icon_state = "space_gas"
/obj/screen/parallax_layer/random/space_gas/Initialize(mapload, view) /atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
. = ..() . = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY) src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
/obj/screen/parallax_layer/random/asteroids /atom/movable/screen/parallax_layer/random/asteroids
icon_state = "asteroids" icon_state = "asteroids"
/obj/screen/parallax_layer/planet /atom/movable/screen/parallax_layer/planet
icon_state = "planet" icon_state = "planet"
blend_mode = BLEND_OVERLAY blend_mode = BLEND_OVERLAY
absolute = TRUE //Status of seperation absolute = TRUE //Status of seperation
speed = 3 speed = 3
layer = 30 layer = 30
/obj/screen/parallax_layer/planet/update_status(mob/M) /atom/movable/screen/parallax_layer/planet/update_status(mob/M)
var/client/C = M.client var/client/C = M.client
var/turf/posobj = get_turf(C.eye) var/turf/posobj = get_turf(C.eye)
if(!posobj) if(!posobj)
return return
invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT
/obj/screen/parallax_layer/planet/update_o() /atom/movable/screen/parallax_layer/planet/update_o()
return //Shit won't move return //Shit won't move
+19 -19
View File
@@ -1,4 +1,4 @@
/obj/screen/movable/pic_in_pic /atom/movable/screen/movable/pic_in_pic
name = "Picture-in-picture" name = "Picture-in-picture"
screen_loc = "CENTER" screen_loc = "CENTER"
plane = FLOOR_PLANE plane = FLOOR_PLANE
@@ -7,18 +7,18 @@
var/height = 0 var/height = 0
var/list/shown_to = list() var/list/shown_to = list()
var/list/viewing_turfs = list() var/list/viewing_turfs = list()
var/obj/screen/component_button/button_x var/atom/movable/screen/component_button/button_x
var/obj/screen/component_button/button_expand var/atom/movable/screen/component_button/button_expand
var/obj/screen/component_button/button_shrink var/atom/movable/screen/component_button/button_shrink
var/mutable_appearance/standard_background var/mutable_appearance/standard_background
var/const/max_dimensions = 10 var/const/max_dimensions = 10
/obj/screen/movable/pic_in_pic/Initialize() /atom/movable/screen/movable/pic_in_pic/Initialize()
. = ..() . = ..()
make_backgrounds() make_backgrounds()
/obj/screen/movable/pic_in_pic/Destroy() /atom/movable/screen/movable/pic_in_pic/Destroy()
for(var/C in shown_to) for(var/C in shown_to)
unshow_to(C) unshow_to(C)
QDEL_NULL(button_x) QDEL_NULL(button_x)
@@ -26,7 +26,7 @@
QDEL_NULL(button_expand) QDEL_NULL(button_expand)
return ..() return ..()
/obj/screen/movable/pic_in_pic/component_click(obj/screen/component_button/component, params) /atom/movable/screen/movable/pic_in_pic/component_click(atom/movable/screen/component_button/component, params)
if(component == button_x) if(component == button_x)
qdel(src) qdel(src)
else if(component == button_expand) else if(component == button_expand)
@@ -34,13 +34,13 @@
else if(component == button_shrink) else if(component == button_shrink)
set_view_size(width-1, height-1) set_view_size(width-1, height-1)
/obj/screen/movable/pic_in_pic/proc/make_backgrounds() /atom/movable/screen/movable/pic_in_pic/proc/make_backgrounds()
standard_background = new /mutable_appearance() standard_background = new /mutable_appearance()
standard_background.icon = 'icons/misc/pic_in_pic.dmi' standard_background.icon = 'icons/misc/pic_in_pic.dmi'
standard_background.icon_state = "background" standard_background.icon_state = "background"
standard_background.layer = SPACE_LAYER standard_background.layer = SPACE_LAYER
/obj/screen/movable/pic_in_pic/proc/add_buttons() /atom/movable/screen/movable/pic_in_pic/proc/add_buttons()
var/static/mutable_appearance/move_tab var/static/mutable_appearance/move_tab
if(!move_tab) if(!move_tab)
move_tab = new /mutable_appearance() move_tab = new /mutable_appearance()
@@ -55,7 +55,7 @@
add_overlay(move_tab) add_overlay(move_tab)
if(!button_x) if(!button_x)
button_x = new /obj/screen/component_button(null, src) button_x = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance() var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "close" MA.name = "close"
MA.icon = 'icons/misc/pic_in_pic.dmi' MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -68,7 +68,7 @@
vis_contents += button_x vis_contents += button_x
if(!button_expand) if(!button_expand)
button_expand = new /obj/screen/component_button(null, src) button_expand = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance() var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "expand" MA.name = "expand"
MA.icon = 'icons/misc/pic_in_pic.dmi' MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -81,7 +81,7 @@
vis_contents += button_expand vis_contents += button_expand
if(!button_shrink) if(!button_shrink)
button_shrink = new /obj/screen/component_button(null, src) button_shrink = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance() var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "shrink" MA.name = "shrink"
MA.icon = 'icons/misc/pic_in_pic.dmi' MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -93,7 +93,7 @@
button_shrink.transform = M button_shrink.transform = M
vis_contents += button_shrink vis_contents += button_shrink
/obj/screen/movable/pic_in_pic/proc/add_background() /atom/movable/screen/movable/pic_in_pic/proc/add_background()
if((width > 0) && (height > 0)) if((width > 0) && (height > 0))
var/matrix/M = matrix() var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5) M.Scale(width + 0.5, height + 0.5)
@@ -101,7 +101,7 @@
standard_background.transform = M standard_background.transform = M
add_overlay(standard_background) add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE) /atom/movable/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
width = clamp(width, 0, max_dimensions) width = clamp(width, 0, max_dimensions)
height = clamp(height, 0, max_dimensions) height = clamp(height, 0, max_dimensions)
src.width = width src.width = width
@@ -115,19 +115,19 @@
if(do_refresh) if(do_refresh)
refresh_view() refresh_view()
/obj/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE) /atom/movable/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE)
center = target center = target
if(do_refresh) if(do_refresh)
refresh_view() refresh_view()
/obj/screen/movable/pic_in_pic/proc/refresh_view() /atom/movable/screen/movable/pic_in_pic/proc/refresh_view()
vis_contents -= viewing_turfs vis_contents -= viewing_turfs
if(!width || !height) if(!width || !height)
return return
viewing_turfs = get_visible_turfs() viewing_turfs = get_visible_turfs()
vis_contents += viewing_turfs vis_contents += viewing_turfs
/obj/screen/movable/pic_in_pic/proc/get_visible_turfs() /atom/movable/screen/movable/pic_in_pic/proc/get_visible_turfs()
var/turf/T = get_turf(center) var/turf/T = get_turf(center)
if(!T) if(!T)
return list() return list()
@@ -135,12 +135,12 @@
var/turf/upperright = locate(min(world.maxx, lowerleft.x + width - 1), min(world.maxy, lowerleft.y + height - 1), lowerleft.z) var/turf/upperright = locate(min(world.maxx, lowerleft.x + width - 1), min(world.maxy, lowerleft.y + height - 1), lowerleft.z)
return block(lowerleft, upperright) return block(lowerleft, upperright)
/obj/screen/movable/pic_in_pic/proc/show_to(client/C) /atom/movable/screen/movable/pic_in_pic/proc/show_to(client/C)
if(C) if(C)
shown_to[C] = 1 shown_to[C] = 1
C.screen += src C.screen += src
/obj/screen/movable/pic_in_pic/proc/unshow_to(client/C) /atom/movable/screen/movable/pic_in_pic/proc/unshow_to(client/C)
if(C) if(C)
shown_to -= C shown_to -= C
C.screen -= src C.screen -= src
+50 -70
View File
@@ -1,4 +1,4 @@
/obj/screen/plane_master /atom/movable/screen/plane_master
screen_loc = "CENTER" screen_loc = "CENTER"
icon_state = "blank" icon_state = "blank"
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
@@ -6,25 +6,25 @@
var/show_alpha = 255 var/show_alpha = 255
var/hide_alpha = 0 var/hide_alpha = 0
/obj/screen/plane_master/proc/Show(override) /atom/movable/screen/plane_master/proc/Show(override)
alpha = override || show_alpha alpha = override || show_alpha
/obj/screen/plane_master/proc/Hide(override) /atom/movable/screen/plane_master/proc/Hide(override)
alpha = override || hide_alpha alpha = override || hide_alpha
//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928 //Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong. //Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob) /atom/movable/screen/plane_master/proc/backdrop(mob/mymob)
///Things rendered on "openspace"; holes in multi-z ///Things rendered on "openspace"; holes in multi-z
/obj/screen/plane_master/openspace /atom/movable/screen/plane_master/openspace
name = "open space plane master" name = "open space plane master"
plane = OPENSPACE_BACKDROP_PLANE plane = OPENSPACE_BACKDROP_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY blend_mode = BLEND_MULTIPLY
alpha = 255 alpha = 255
/obj/screen/plane_master/openspace/Initialize() /atom/movable/screen/plane_master/openspace/Initialize()
. = ..() . = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE) filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
@@ -32,163 +32,143 @@
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20) filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
/obj/screen/plane_master/proc/outline(_size, _color) /atom/movable/screen/plane_master/proc/outline(_size, _color)
filters += filter(type = "outline", size = _size, color = _color) filters += filter(type = "outline", size = _size, color = _color)
/obj/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA") /atom/movable/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset) filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset)
///Contains just the floor ///Contains just the floor
/obj/screen/plane_master/floor /atom/movable/screen/plane_master/floor
name = "floor plane master" name = "floor plane master"
plane = FLOOR_PLANE plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/wall /atom/movable/screen/plane_master/wall
name = "wall plane master" name = "wall plane master"
plane = WALL_PLANE plane = WALL_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
/obj/screen/plane_master/wall/backdrop(mob/mymob) /atom/movable/screen/plane_master/wall/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion) if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA"))
else else
remove_filter("ambient_occlusion") remove_filter("ambient_occlusion")
/obj/screen/plane_master/above_wall /atom/movable/screen/plane_master/above_wall
name = "above wall plane master" name = "above wall plane master"
plane = ABOVE_WALL_PLANE plane = ABOVE_WALL_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
/obj/screen/plane_master/above_wall/Initialize() /atom/movable/screen/plane_master/above_wall/Initialize()
. = ..() . = ..()
add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE))
/obj/screen/plane_master/above_wall/backdrop(mob/mymob) /atom/movable/screen/plane_master/above_wall/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion) if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64")) add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64"))
else else
remove_filter("ambient_occlusion") remove_filter("ambient_occlusion")
///Contains most things in the game world ///Contains most things in the game world
/obj/screen/plane_master/game_world /atom/movable/screen/plane_master/game_world
name = "game world plane master" name = "game world plane master"
plane = GAME_PLANE plane = GAME_PLANE
appearance_flags = PLANE_MASTER //should use client color appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/Initialize() /atom/movable/screen/plane_master/game_world/Initialize()
. = ..() . = ..()
add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE))
/obj/screen/plane_master/game_world/backdrop(mob/mymob) /atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion) if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA"))
else else
remove_filter("ambient_occlusion") remove_filter("ambient_occlusion")
///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners. ///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners.
/obj/screen/plane_master/field_of_vision /atom/movable/screen/plane_master/field_of_vision
name = "field of vision mask plane master" name = "field of vision mask plane master"
plane = FIELD_OF_VISION_PLANE plane = FIELD_OF_VISION_PLANE
render_target = FIELD_OF_VISION_RENDER_TARGET render_target = FIELD_OF_VISION_RENDER_TARGET
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/field_of_vision/Initialize() /atom/movable/screen/plane_master/field_of_vision/Initialize()
. = ..() . = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE) filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
///Used to display the owner and its adjacent surroundings through the FoV plane mask. ///Used to display the owner and its adjacent surroundings through the FoV plane mask.
/obj/screen/plane_master/field_of_vision_blocker /atom/movable/screen/plane_master/field_of_vision_blocker
name = "field of vision blocker plane master" name = "field of vision blocker plane master"
plane = FIELD_OF_VISION_BLOCKER_PLANE plane = FIELD_OF_VISION_BLOCKER_PLANE
render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
///Stores the visible portion of the FoV shadow cone. ///Stores the visible portion of the FoV shadow cone.
/obj/screen/plane_master/field_of_vision_visual /atom/movable/screen/plane_master/field_of_vision_visual
name = "field of vision visual plane master" name = "field of vision visual plane master"
plane = FIELD_OF_VISION_VISUAL_PLANE plane = FIELD_OF_VISION_VISUAL_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/field_of_vision_visual/Initialize() /atom/movable/screen/plane_master/field_of_vision_visual/Initialize()
. = ..() . = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE) filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
///Contains all lighting objects ///Contains all lighting objects
/obj/screen/plane_master/lighting /atom/movable/screen/plane_master/lighting
name = "lighting plane master" name = "lighting plane master"
plane = LIGHTING_PLANE plane = LIGHTING_PLANE
blend_mode = BLEND_MULTIPLY blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/backdrop(mob/mymob) /atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit) mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit) mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/lighting_backdrop/unlit)
/obj/screen/plane_master/lighting/Initialize() /*!
* This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
*
* Emissive overlays are pasted with an atom color that converts them to be entirely some specific color.
* Emissive blockers are pasted with an atom color that converts them to be entirely some different color.
* Emissive overlays and emissive blockers are put onto the same plane.
* The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects.
* A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is.
* This is then used to alpha mask the lighting plane.
*/
/atom/movable/screen/plane_master/lighting/Initialize()
. = ..() . = ..()
filters += filter(type="alpha", render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE) add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE))
filters += filter(type="alpha", render_source = EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE) add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE))
/** /**
* Things placed on this mask the lighting plane. Doesn't render directly. * Handles emissive overlays and emissive blockers.
* */
* Gets masked by blocking plane. Use for things that you want blocked by /atom/movable/screen/plane_master/emissive
* mobs, items, etc.
*/
/obj/screen/plane_master/emissive
name = "emissive plane master" name = "emissive plane master"
plane = EMISSIVE_PLANE plane = EMISSIVE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_RENDER_TARGET render_target = EMISSIVE_RENDER_TARGET
/obj/screen/plane_master/emissive/Initialize() /atom/movable/screen/plane_master/emissive/Initialize()
. = ..() . = ..()
filters += filter(type="alpha", render_source=EMISSIVE_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE) add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix))
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this always mask the lighting plane. Doesn't render directly.
*
* Always masks the light plane, isn't blocked by anything (except Field of Vision). Use for on mob glows,
* magic stuff, etc.
*/
/obj/screen/plane_master/emissive_unblockable
name = "unblockable emissive plane master"
plane = EMISSIVE_UNBLOCKABLE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_UNBLOCKABLE_RENDER_TARGET
/obj/screen/plane_master/emissive_unblockable/Initialize()
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this layer mask the emissive layer. Doesn't render directly
*
* You really shouldn't be directly using this, use atom helpers instead
*/
/obj/screen/plane_master/emissive_blocker
name = "emissive blocker plane master"
plane = EMISSIVE_BLOCKER_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
///Contains space parallax ///Contains space parallax
/obj/screen/plane_master/parallax /atom/movable/screen/plane_master/parallax
name = "parallax plane master" name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX plane = PLANE_SPACE_PARALLAX
blend_mode = BLEND_MULTIPLY blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/parallax_white /atom/movable/screen/plane_master/parallax_white
name = "parallax whitifier plane master" name = "parallax whitifier plane master"
plane = PLANE_SPACE plane = PLANE_SPACE
/obj/screen/plane_master/camera_static /atom/movable/screen/plane_master/camera_static
name = "camera static plane master" name = "camera static plane master"
plane = CAMERA_STATIC_PLANE plane = CAMERA_STATIC_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
@@ -196,7 +176,7 @@
//Reserved to chat messages, so they are still displayed above the field of vision masking. //Reserved to chat messages, so they are still displayed above the field of vision masking.
/obj/screen/plane_master/chat_messages /atom/movable/screen/plane_master/chat_messages
name = "runechat plane master" name = "runechat plane master"
plane = CHAT_PLANE plane = CHAT_PLANE
appearance_flags = PLANE_MASTER appearance_flags = PLANE_MASTER
+15 -15
View File
@@ -3,49 +3,49 @@
GLOBAL_LIST_EMPTY(radial_menus) GLOBAL_LIST_EMPTY(radial_menus)
/obj/screen/radial /atom/movable/screen/radial
icon = 'icons/mob/radial.dmi' icon = 'icons/mob/radial.dmi'
layer = ABOVE_HUD_LAYER layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE plane = ABOVE_HUD_PLANE
var/datum/radial_menu/parent var/datum/radial_menu/parent
/obj/screen/radial/slice /atom/movable/screen/radial/slice
icon_state = "radial_slice" icon_state = "radial_slice"
var/choice var/choice
var/next_page = FALSE var/next_page = FALSE
/obj/screen/radial/slice/MouseEntered(location, control, params) /atom/movable/screen/radial/slice/MouseEntered(location, control, params)
. = ..() . = ..()
icon_state = "radial_slice_focus" icon_state = "radial_slice_focus"
if(tooltips) if(tooltips)
openToolTip(usr, src, params, title = name) openToolTip(usr, src, params, title = name)
/obj/screen/radial/slice/MouseExited(location, control, params) /atom/movable/screen/radial/slice/MouseExited(location, control, params)
. = ..() . = ..()
icon_state = "radial_slice" icon_state = "radial_slice"
if(tooltips) if(tooltips)
closeToolTip(usr) closeToolTip(usr)
/obj/screen/radial/slice/Click(location, control, params) /atom/movable/screen/radial/slice/Click(location, control, params)
if(usr.client == parent.current_user) if(usr.client == parent.current_user)
if(next_page) if(next_page)
parent.next_page() parent.next_page()
else else
parent.element_chosen(choice,usr) parent.element_chosen(choice,usr)
/obj/screen/radial/center /atom/movable/screen/radial/center
name = "Close Menu" name = "Close Menu"
icon_state = "radial_center" icon_state = "radial_center"
/obj/screen/radial/center/MouseEntered(location, control, params) /atom/movable/screen/radial/center/MouseEntered(location, control, params)
. = ..() . = ..()
icon_state = "radial_center_focus" icon_state = "radial_center_focus"
/obj/screen/radial/center/MouseExited(location, control, params) /atom/movable/screen/radial/center/MouseExited(location, control, params)
. = ..() . = ..()
icon_state = "radial_center" icon_state = "radial_center"
/obj/screen/radial/center/Click(location, control, params) /atom/movable/screen/radial/center/Click(location, control, params)
if(usr.client == parent.current_user) if(usr.client == parent.current_user)
parent.finished = TRUE parent.finished = TRUE
@@ -57,8 +57,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/selected_choice var/selected_choice
var/list/obj/screen/elements = list() var/list/atom/movable/screen/elements = list()
var/obj/screen/radial/center/close_button var/atom/movable/screen/radial/center/close_button
var/client/current_user var/client/current_user
var/atom/anchor var/atom/anchor
var/image/menu_holder var/image/menu_holder
@@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
if(elements.len < max_elements) if(elements.len < max_elements)
var/elements_to_add = max_elements - elements.len var/elements_to_add = max_elements - elements.len
for(var/i in 1 to elements_to_add) //Create all elements for(var/i in 1 to elements_to_add) //Create all elements
var/obj/screen/radial/slice/new_element = new /obj/screen/radial/slice var/atom/movable/screen/radial/slice/new_element = new /atom/movable/screen/radial/slice
new_element.tooltips = use_tooltips new_element.tooltips = use_tooltips
new_element.parent = src new_element.parent = src
elements += new_element elements += new_element
@@ -152,14 +152,14 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/list/page_choices = page_data[current_page] var/list/page_choices = page_data[current_page]
var/angle_per_element = round(zone / page_choices.len) var/angle_per_element = round(zone / page_choices.len)
for(var/i in 1 to elements.len) for(var/i in 1 to elements.len)
var/obj/screen/radial/E = elements[i] var/atom/movable/screen/radial/E = elements[i]
var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360) var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360)
if(i > page_choices.len) if(i > page_choices.len)
HideElement(E) HideElement(E)
else else
SetElement(E,page_choices[i],angle,anim = anim,anim_order = i) SetElement(E,page_choices[i],angle,anim = anim,anim_order = i)
/datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E) /datum/radial_menu/proc/HideElement(atom/movable/screen/radial/slice/E)
E.cut_overlays() E.cut_overlays()
E.alpha = 0 E.alpha = 0
E.name = "None" E.name = "None"
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
E.choice = null E.choice = null
E.next_page = FALSE E.next_page = FALSE
/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E,choice_id,angle,anim,anim_order) /datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E,choice_id,angle,anim,anim_order)
//Position //Position
var/py = round(cos(angle) * radius) + py_shift var/py = round(cos(angle) * radius) + py_shift
var/px = round(sin(angle) * radius) var/px = round(sin(angle) * radius)
+5 -5
View File
@@ -2,19 +2,19 @@
A derivative of radial menu which persists onscreen until closed and invokes a callback each time an element is clicked A derivative of radial menu which persists onscreen until closed and invokes a callback each time an element is clicked
*/ */
/obj/screen/radial/persistent/center /atom/movable/screen/radial/persistent/center
name = "Close Menu" name = "Close Menu"
icon_state = "radial_center" icon_state = "radial_center"
/obj/screen/radial/persistent/center/Click(location, control, params) /atom/movable/screen/radial/persistent/center/Click(location, control, params)
if(usr.client == parent.current_user) if(usr.client == parent.current_user)
parent.element_chosen(null,usr) parent.element_chosen(null,usr)
/obj/screen/radial/persistent/center/MouseEntered(location, control, params) /atom/movable/screen/radial/persistent/center/MouseEntered(location, control, params)
. = ..() . = ..()
icon_state = "radial_center_focus" icon_state = "radial_center_focus"
/obj/screen/radial/persistent/center/MouseExited(location, control, params) /atom/movable/screen/radial/persistent/center/MouseExited(location, control, params)
. = ..() . = ..()
icon_state = "radial_center" icon_state = "radial_center"
@@ -25,7 +25,7 @@
var/datum/callback/select_proc_callback var/datum/callback/select_proc_callback
/datum/radial_menu/persistent/New() /datum/radial_menu/persistent/New()
close_button = new /obj/screen/radial/persistent/center close_button = new /atom/movable/screen/radial/persistent/center
close_button.parent = src close_button.parent = src
+1 -1
View File
@@ -2,6 +2,6 @@
/datum/hud/revenant/New(mob/owner) /datum/hud/revenant/New(mob/owner)
..() ..()
healths = new /obj/screen/healths/revenant() healths = new /atom/movable/screen/healths/revenant()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
+45 -45
View File
@@ -1,15 +1,15 @@
/obj/screen/robot /atom/movable/screen/robot
icon = 'icons/mob/screen_cyborg.dmi' icon = 'icons/mob/screen_cyborg.dmi'
/obj/screen/robot/module /atom/movable/screen/robot/module
name = "cyborg module" name = "cyborg module"
icon_state = "nomod" icon_state = "nomod"
/obj/screen/robot/Click() /atom/movable/screen/robot/Click()
if(isobserver(usr)) if(isobserver(usr))
return 1 return 1
/obj/screen/robot/module/Click() /atom/movable/screen/robot/module/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
@@ -18,51 +18,51 @@
return 1 return 1
R.pick_module() R.pick_module()
/obj/screen/robot/module1 /atom/movable/screen/robot/module1
name = "module1" name = "module1"
icon_state = "inv1" icon_state = "inv1"
/obj/screen/robot/module1/Click() /atom/movable/screen/robot/module1/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.toggle_module(1) R.toggle_module(1)
/obj/screen/robot/module2 /atom/movable/screen/robot/module2
name = "module2" name = "module2"
icon_state = "inv2" icon_state = "inv2"
/obj/screen/robot/module2/Click() /atom/movable/screen/robot/module2/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.toggle_module(2) R.toggle_module(2)
/obj/screen/robot/module3 /atom/movable/screen/robot/module3
name = "module3" name = "module3"
icon_state = "inv3" icon_state = "inv3"
/obj/screen/robot/module3/Click() /atom/movable/screen/robot/module3/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.toggle_module(3) R.toggle_module(3)
/obj/screen/robot/radio /atom/movable/screen/robot/radio
name = "radio" name = "radio"
icon_state = "radio" icon_state = "radio"
/obj/screen/robot/radio/Click() /atom/movable/screen/robot/radio/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.radio.interact(R) R.radio.interact(R)
/obj/screen/robot/store /atom/movable/screen/robot/store
name = "store" name = "store"
icon_state = "store" icon_state = "store"
/obj/screen/robot/store/Click() /atom/movable/screen/robot/store/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
@@ -75,35 +75,35 @@
..() ..()
// i, Robit // i, Robit
var/mob/living/silicon/robot/robit = mymob var/mob/living/silicon/robot/robit = mymob
var/obj/screen/using var/atom/movable/screen/using
using = new/obj/screen/language_menu using = new/atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu using.screen_loc = ui_borg_language_menu
static_inventory += using static_inventory += using
//Radio //Radio
using = new /obj/screen/robot/radio() using = new /atom/movable/screen/robot/radio()
using.screen_loc = ui_borg_radio using.screen_loc = ui_borg_radio
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Module select //Module select
if(!robit.inv1) if(!robit.inv1)
robit.inv1 = new /obj/screen/robot/module1() robit.inv1 = new /atom/movable/screen/robot/module1()
robit.inv1.screen_loc = ui_inv1 robit.inv1.screen_loc = ui_inv1
robit.inv1.hud = src robit.inv1.hud = src
static_inventory += robit.inv1 static_inventory += robit.inv1
if(!robit.inv2) if(!robit.inv2)
robit.inv2 = new /obj/screen/robot/module2() robit.inv2 = new /atom/movable/screen/robot/module2()
robit.inv2.screen_loc = ui_inv2 robit.inv2.screen_loc = ui_inv2
robit.inv2.hud = src robit.inv2.hud = src
static_inventory += robit.inv2 static_inventory += robit.inv2
if(!robit.inv3) if(!robit.inv3)
robit.inv3 = new /obj/screen/robot/module3() robit.inv3 = new /atom/movable/screen/robot/module3()
robit.inv3.screen_loc = ui_inv3 robit.inv3.screen_loc = ui_inv3
robit.inv3.hud = src robit.inv3.hud = src
@@ -111,73 +111,73 @@
//End of module select //End of module select
using = new /obj/screen/robot/lamp() using = new /atom/movable/screen/robot/lamp()
using.screen_loc = ui_borg_lamp using.screen_loc = ui_borg_lamp
using.hud = src using.hud = src
static_inventory += using static_inventory += using
robit.lampButton = using robit.lampButton = using
var/obj/screen/robot/lamp/lampscreen = using var/atom/movable/screen/robot/lamp/lampscreen = using
lampscreen.robot = robit lampscreen.robot = robit
//Photography stuff //Photography stuff
using = new /obj/screen/ai/image_take() using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_borg_camera using.screen_loc = ui_borg_camera
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Sec/Med HUDs //Sec/Med HUDs
using = new /obj/screen/robot/sensors() using = new /atom/movable/screen/robot/sensors()
using.screen_loc = ui_borg_sensor using.screen_loc = ui_borg_sensor
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Borg Integrated Tablet //Borg Integrated Tablet
using = new /obj/screen/robot/modPC() using = new /atom/movable/screen/robot/modPC()
using.screen_loc = ui_borg_tablet using.screen_loc = ui_borg_tablet
using.hud = src using.hud = src
static_inventory += using static_inventory += using
robit.interfaceButton = using robit.interfaceButton = using
if(robit.modularInterface) if(robit.modularInterface)
using.vis_contents += robit.modularInterface using.vis_contents += robit.modularInterface
var/obj/screen/robot/modPC/tabletbutton = using var/atom/movable/screen/robot/modPC/tabletbutton = using
tabletbutton.robot = robit tabletbutton.robot = robit
//Alerts //Alerts
using = new /obj/screen/robot/alerts() using = new /atom/movable/screen/robot/alerts()
using.screen_loc = ui_borg_alerts using.screen_loc = ui_borg_alerts
using.hud = src using.hud = src
static_inventory += using static_inventory += using
//Thrusters //Thrusters
using = new /obj/screen/robot/thrusters() using = new /atom/movable/screen/robot/thrusters()
using.screen_loc = ui_borg_thrusters using.screen_loc = ui_borg_thrusters
using.hud = src using.hud = src
static_inventory += using static_inventory += using
robit.thruster_button = using robit.thruster_button = using
//Intent //Intent
action_intent = new /obj/screen/act_intent/robot() action_intent = new /atom/movable/screen/act_intent/robot()
action_intent.icon_state = mymob.a_intent action_intent.icon_state = mymob.a_intent
action_intent.hud = src action_intent.hud = src
static_inventory += action_intent static_inventory += action_intent
//Health //Health
healths = new /obj/screen/healths/robot() healths = new /atom/movable/screen/healths/robot()
healths.hud = src healths.hud = src
infodisplay += healths infodisplay += healths
//Installed Module //Installed Module
robit.hands = new /obj/screen/robot/module() robit.hands = new /atom/movable/screen/robot/module()
robit.hands.screen_loc = ui_borg_module robit.hands.screen_loc = ui_borg_module
robit.hands.hud = src robit.hands.hud = src
static_inventory += robit.hands static_inventory += robit.hands
//Store //Store
module_store_icon = new /obj/screen/robot/store() module_store_icon = new /atom/movable/screen/robot/store()
module_store_icon.screen_loc = ui_borg_store module_store_icon.screen_loc = ui_borg_store
module_store_icon.hud = src module_store_icon.hud = src
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_cyborg.dmi' pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
pull_icon.screen_loc = ui_borg_pull pull_icon.screen_loc = ui_borg_pull
pull_icon.hud = src pull_icon.hud = src
@@ -185,7 +185,7 @@
hotkeybuttons += pull_icon hotkeybuttons += pull_icon
zone_select = new /obj/screen/zone_sel/robot() zone_select = new /atom/movable/screen/zone_sel/robot()
zone_select.hud = src zone_select.hud = src
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
@@ -283,61 +283,61 @@
for(var/obj/item/I in R.held_items) for(var/obj/item/I in R.held_items)
screenmob.client.screen -= I screenmob.client.screen -= I
/obj/screen/robot/lamp /atom/movable/screen/robot/lamp
name = "headlamp" name = "headlamp"
icon_state = "lamp_off" icon_state = "lamp_off"
var/mob/living/silicon/robot/robot var/mob/living/silicon/robot/robot
/obj/screen/robot/lamp/Click() /atom/movable/screen/robot/lamp/Click()
. = ..() . = ..()
if(.) if(.)
return return
robot?.toggle_headlamp() robot?.toggle_headlamp()
update_icon() update_icon()
/obj/screen/robot/lamp/update_icon() /atom/movable/screen/robot/lamp/update_icon()
if(robot?.lamp_enabled) if(robot?.lamp_enabled)
icon_state = "lamp_on" icon_state = "lamp_on"
else else
icon_state = "lamp_off" icon_state = "lamp_off"
/obj/screen/robot/alerts /atom/movable/screen/robot/alerts
name = "Alert Panel" name = "Alert Panel"
icon = 'icons/mob/screen_ai.dmi' icon = 'icons/mob/screen_ai.dmi'
icon_state = "alerts" icon_state = "alerts"
/obj/screen/robot/alerts/Click() /atom/movable/screen/robot/alerts/Click()
. = ..() . = ..()
if(.) if(.)
return return
var/mob/living/silicon/robot/borgo = usr var/mob/living/silicon/robot/borgo = usr
borgo.robot_alerts() borgo.robot_alerts()
/obj/screen/robot/thrusters /atom/movable/screen/robot/thrusters
name = "ion thrusters" name = "ion thrusters"
icon_state = "ionpulse0" icon_state = "ionpulse0"
/obj/screen/robot/thrusters/Click() /atom/movable/screen/robot/thrusters/Click()
if(..()) if(..())
return return
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.toggle_ionpulse() R.toggle_ionpulse()
/obj/screen/robot/sensors /atom/movable/screen/robot/sensors
name = "Sensor Augmentation" name = "Sensor Augmentation"
icon_state = "cyborg_sensor" icon_state = "cyborg_sensor"
/obj/screen/robot/sensors/Click() /atom/movable/screen/robot/sensors/Click()
if(..()) if(..())
return return
var/mob/living/silicon/S = usr var/mob/living/silicon/S = usr
S.toggle_sensors() S.toggle_sensors()
/obj/screen/robot/modPC /atom/movable/screen/robot/modPC
name = "Modular Interface" name = "Modular Interface"
icon_state = "template" icon_state = "template"
var/mob/living/silicon/robot/robot var/mob/living/silicon/robot/robot
/obj/screen/robot/modPC/Click() /atom/movable/screen/robot/modPC/Click()
. = ..() . = ..()
if(.) if(.)
return return
+81 -85
View File
@@ -6,12 +6,11 @@
They are used with the client/screen list and the screen_loc var. They are used with the client/screen list and the screen_loc var.
For more information, see the byond documentation on the screen_loc and screen vars. For more information, see the byond documentation on the screen_loc and screen vars.
*/ */
/obj/screen /atom/movable/screen
name = "" name = ""
icon = 'icons/mob/screen_gen.dmi' icon = 'icons/mob/screen_gen.dmi'
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
animate_movement = SLIDE_STEPS animate_movement = SLIDE_STEPS
speech_span = SPAN_ROBOT speech_span = SPAN_ROBOT
vis_flags = VIS_INHERIT_PLANE vis_flags = VIS_INHERIT_PLANE
@@ -34,24 +33,21 @@
*/ */
var/del_on_map_removal = TRUE var/del_on_map_removal = TRUE
/obj/screen/take_damage() /atom/movable/screen/Destroy()
return
/obj/screen/Destroy()
master = null master = null
hud = null hud = null
return ..() return ..()
/obj/screen/examine(mob/user) /atom/movable/screen/examine(mob/user)
return list() return list()
/obj/screen/orbit() /atom/movable/screen/orbit()
return return
/obj/screen/proc/component_click(obj/screen/component_button/component, params) /atom/movable/screen/proc/component_click(atom/movable/screen/component_button/component, params)
return return
/obj/screen/text /atom/movable/screen/text
icon = null icon = null
icon_state = null icon_state = null
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -59,12 +55,12 @@
maptext_height = 480 maptext_height = 480
maptext_width = 480 maptext_width = 480
/obj/screen/swap_hand /atom/movable/screen/swap_hand
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
name = "swap hand" name = "swap hand"
/obj/screen/swap_hand/Click() /atom/movable/screen/swap_hand/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else // At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click // We don't even know if it's a middle click
// if(world.time <= usr.next_move) // if(world.time <= usr.next_move)
@@ -78,19 +74,19 @@
M.swap_hand() M.swap_hand()
return 1 return 1
/obj/screen/craft /atom/movable/screen/craft
name = "crafting menu" name = "crafting menu"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "craft" icon_state = "craft"
screen_loc = ui_crafting screen_loc = ui_crafting
/obj/screen/area_creator /atom/movable/screen/area_creator
name = "create new area" name = "create new area"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "area_edit" icon_state = "area_edit"
screen_loc = ui_building screen_loc = ui_building
/obj/screen/area_creator/Click() /atom/movable/screen/area_creator/Click()
if(usr.incapacitated() || (isobserver(usr) && !IsAdminGhost(usr))) if(usr.incapacitated() || (isobserver(usr) && !IsAdminGhost(usr)))
return TRUE return TRUE
var/area/A = get_area(usr) var/area/A = get_area(usr)
@@ -99,18 +95,18 @@
return TRUE return TRUE
create_area(usr) create_area(usr)
/obj/screen/language_menu /atom/movable/screen/language_menu
name = "language menu" name = "language menu"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "talk_wheel" icon_state = "talk_wheel"
screen_loc = ui_language_menu screen_loc = ui_language_menu
/obj/screen/language_menu/Click() /atom/movable/screen/language_menu/Click()
var/mob/M = usr var/mob/M = usr
var/datum/language_holder/H = M.get_language_holder() var/datum/language_holder/H = M.get_language_holder()
H.open_language_menu(usr) H.open_language_menu(usr)
/obj/screen/inventory /atom/movable/screen/inventory
/// The identifier for the slot. It has nothing to do with ID cards. /// The identifier for the slot. It has nothing to do with ID cards.
var/slot_id var/slot_id
/// Icon when empty. For now used only by humans. /// Icon when empty. For now used only by humans.
@@ -122,7 +118,7 @@
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
/obj/screen/inventory/Click(location, control, params) /atom/movable/screen/inventory/Click(location, control, params)
// At this point in client Click() code we have passed the 1/10 sec check and little else // At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click // We don't even know if it's a middle click
// if(world.time <= usr.next_move) // if(world.time <= usr.next_move)
@@ -142,16 +138,16 @@
usr.update_inv_hands() usr.update_inv_hands()
return TRUE return TRUE
/obj/screen/inventory/MouseEntered() /atom/movable/screen/inventory/MouseEntered()
..() ..()
add_overlays() add_overlays()
/obj/screen/inventory/MouseExited() /atom/movable/screen/inventory/MouseExited()
..() ..()
cut_overlay(object_overlays) cut_overlay(object_overlays)
object_overlays.Cut() object_overlays.Cut()
/obj/screen/inventory/update_icon_state() /atom/movable/screen/inventory/update_icon_state()
if(!icon_empty) if(!icon_empty)
icon_empty = icon_state icon_empty = icon_state
@@ -161,7 +157,7 @@
else else
icon_state = icon_empty icon_state = icon_empty
/obj/screen/inventory/proc/add_overlays() /atom/movable/screen/inventory/proc/add_overlays()
var/mob/user = hud?.mymob var/mob/user = hud?.mymob
if(!user || !slot_id) if(!user || !slot_id)
@@ -184,12 +180,12 @@
// object_overlay = item_overlay // object_overlay = item_overlay
add_overlay(object_overlays) add_overlay(object_overlays)
/obj/screen/inventory/hand /atom/movable/screen/inventory/hand
var/mutable_appearance/handcuff_overlay var/mutable_appearance/handcuff_overlay
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked") var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
var/held_index = 0 var/held_index = 0
/obj/screen/inventory/hand/update_overlays() /atom/movable/screen/inventory/hand/update_overlays()
. = ..() . = ..()
if(!handcuff_overlay) if(!handcuff_overlay)
@@ -212,7 +208,7 @@
. += "hand_active" . += "hand_active"
/obj/screen/inventory/hand/Click(location, control, params) /atom/movable/screen/inventory/hand/Click(location, control, params)
// At this point in client Click() code we have passed the 1/10 sec check and little else // At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click // We don't even know if it's a middle click
var/mob/user = hud?.mymob var/mob/user = hud?.mymob
@@ -234,26 +230,26 @@
return TRUE return TRUE
/obj/screen/drop /atom/movable/screen/drop
name = "drop" name = "drop"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_drop" icon_state = "act_drop"
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
/obj/screen/drop/Click() /atom/movable/screen/drop/Click()
if(usr.stat == CONSCIOUS) if(usr.stat == CONSCIOUS)
usr.dropItemToGround(usr.get_active_held_item()) usr.dropItemToGround(usr.get_active_held_item())
/obj/screen/act_intent /atom/movable/screen/act_intent
name = "intent" name = "intent"
icon_state = "help" icon_state = "help"
screen_loc = ui_acti screen_loc = ui_acti
/obj/screen/act_intent/Click(location, control, params) /atom/movable/screen/act_intent/Click(location, control, params)
usr.a_intent_change(INTENT_HOTKEY_RIGHT) usr.a_intent_change(INTENT_HOTKEY_RIGHT)
/obj/screen/act_intent/segmented/Click(location, control, params) /atom/movable/screen/act_intent/segmented/Click(location, control, params)
if(usr.client.prefs.toggles & INTENT_STYLE) if(usr.client.prefs.toggles & INTENT_STYLE)
var/_x = text2num(params2list(params)["icon-x"]) var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"]) var/_y = text2num(params2list(params)["icon-y"])
@@ -272,20 +268,20 @@
else else
return ..() return ..()
/obj/screen/act_intent/alien /atom/movable/screen/act_intent/alien
icon = 'icons/mob/screen_alien.dmi' icon = 'icons/mob/screen_alien.dmi'
screen_loc = ui_movi screen_loc = ui_movi
/obj/screen/act_intent/robot /atom/movable/screen/act_intent/robot
icon = 'icons/mob/screen_cyborg.dmi' icon = 'icons/mob/screen_cyborg.dmi'
screen_loc = ui_borg_intents screen_loc = ui_borg_intents
/obj/screen/internals /atom/movable/screen/internals
name = "toggle internals" name = "toggle internals"
icon_state = "internal0" icon_state = "internal0"
screen_loc = ui_internal screen_loc = ui_internal
/obj/screen/internals/Click() /atom/movable/screen/internals/Click()
if(!iscarbon(usr)) if(!iscarbon(usr))
return return
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
@@ -346,71 +342,71 @@
return return
C.update_action_buttons_icon() C.update_action_buttons_icon()
/obj/screen/mov_intent /atom/movable/screen/mov_intent
name = "run/walk toggle" name = "run/walk toggle"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "running" icon_state = "running"
/obj/screen/mov_intent/Initialize(mapload) /atom/movable/screen/mov_intent/Initialize(mapload)
. = ..() . = ..()
update_icon() update_icon()
/obj/screen/mov_intent/Click() /atom/movable/screen/mov_intent/Click()
toggle(usr) toggle(usr)
/obj/screen/mov_intent/update_icon_state() /atom/movable/screen/mov_intent/update_icon_state()
switch(hud?.mymob?.m_intent) switch(hud?.mymob?.m_intent)
if(MOVE_INTENT_WALK) if(MOVE_INTENT_WALK)
icon_state = CONFIG_GET(flag/sprint_enabled)? "walking" : "walking_nosprint" icon_state = CONFIG_GET(flag/sprint_enabled)? "walking" : "walking_nosprint"
if(MOVE_INTENT_RUN) if(MOVE_INTENT_RUN)
icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint" icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint"
/obj/screen/mov_intent/proc/toggle(mob/user) /atom/movable/screen/mov_intent/proc/toggle(mob/user)
if(isobserver(user)) if(isobserver(user))
return return
user.toggle_move_intent(user) user.toggle_move_intent(user)
/obj/screen/pull /atom/movable/screen/pull
name = "stop pulling" name = "stop pulling"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "pull" icon_state = "pull"
/obj/screen/pull/Click() /atom/movable/screen/pull/Click()
if(isobserver(usr)) if(isobserver(usr))
return return
usr.stop_pulling() usr.stop_pulling()
/obj/screen/pull/update_icon_state() /atom/movable/screen/pull/update_icon_state()
if(hud?.mymob?.pulling) if(hud?.mymob?.pulling)
icon_state = "pull" icon_state = "pull"
else else
icon_state = "pull0" icon_state = "pull0"
/obj/screen/resist /atom/movable/screen/resist
name = "resist" name = "resist"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist" icon_state = "act_resist"
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
/obj/screen/resist/Click() /atom/movable/screen/resist/Click()
if(isliving(usr)) if(isliving(usr))
var/mob/living/L = usr var/mob/living/L = usr
L.resist() L.resist()
/obj/screen/rest /atom/movable/screen/rest
name = "rest" name = "rest"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_rest" icon_state = "act_rest"
layer = HUD_LAYER layer = HUD_LAYER
plane = HUD_PLANE plane = HUD_PLANE
/obj/screen/rest/Click() /atom/movable/screen/rest/Click()
if(isliving(usr)) if(isliving(usr))
var/mob/living/L = usr var/mob/living/L = usr
L.lay_down() L.lay_down()
/obj/screen/rest/update_icon_state() /atom/movable/screen/rest/update_icon_state()
var/mob/living/user = hud?.mymob var/mob/living/user = hud?.mymob
if(!istype(user)) if(!istype(user))
return return
@@ -419,17 +415,17 @@
else else
icon_state = "act_rest0" icon_state = "act_rest0"
/obj/screen/throw_catch /atom/movable/screen/throw_catch
name = "throw/catch" name = "throw/catch"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_throw_off" icon_state = "act_throw_off"
/obj/screen/throw_catch/Click() /atom/movable/screen/throw_catch/Click()
if(iscarbon(usr)) if(iscarbon(usr))
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
C.toggle_throw_mode() C.toggle_throw_mode()
/obj/screen/zone_sel /atom/movable/screen/zone_sel
name = "damage zone" name = "damage zone"
icon_state = "zone_sel" icon_state = "zone_sel"
screen_loc = ui_zonesel screen_loc = ui_zonesel
@@ -437,7 +433,7 @@
var/static/list/hover_overlays_cache = list() var/static/list/hover_overlays_cache = list()
var/hovering var/hovering
/obj/screen/zone_sel/Click(location, control,params) /atom/movable/screen/zone_sel/Click(location, control,params)
if(isobserver(usr)) if(isobserver(usr))
return return
@@ -450,10 +446,10 @@
return set_selected_zone(choice, usr) return set_selected_zone(choice, usr)
/obj/screen/zone_sel/MouseEntered(location, control, params) /atom/movable/screen/zone_sel/MouseEntered(location, control, params)
MouseMove(location, control, params) MouseMove(location, control, params)
/obj/screen/zone_sel/MouseMove(location, control, params) /atom/movable/screen/zone_sel/MouseMove(location, control, params)
if(isobserver(usr)) if(isobserver(usr))
return return
@@ -482,12 +478,12 @@
layer = ABOVE_HUD_LAYER layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE plane = ABOVE_HUD_PLANE
/obj/screen/zone_sel/MouseExited(location, control, params) /atom/movable/screen/zone_sel/MouseExited(location, control, params)
if(!isobserver(usr) && hovering) if(!isobserver(usr) && hovering)
vis_contents -= hover_overlays_cache[hovering] vis_contents -= hover_overlays_cache[hovering]
hovering = null hovering = null
/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y) /atom/movable/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y) switch(icon_y)
if(1 to 9) //Legs if(1 to 9) //Legs
switch(icon_x) switch(icon_x)
@@ -525,7 +521,7 @@
return BODY_ZONE_PRECISE_EYES return BODY_ZONE_PRECISE_EYES
return BODY_ZONE_HEAD return BODY_ZONE_HEAD
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user) /atom/movable/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
if(user != hud?.mymob) if(user != hud?.mymob)
return return
@@ -535,21 +531,21 @@
return TRUE return TRUE
/obj/screen/zone_sel/update_overlays() /atom/movable/screen/zone_sel/update_overlays()
. = ..() . = ..()
if(!hud?.mymob) if(!hud?.mymob)
return return
. += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]") . += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]")
/obj/screen/zone_sel/alien /atom/movable/screen/zone_sel/alien
icon = 'icons/mob/screen_alien.dmi' icon = 'icons/mob/screen_alien.dmi'
overlay_icon = 'icons/mob/screen_alien.dmi' overlay_icon = 'icons/mob/screen_alien.dmi'
/obj/screen/zone_sel/robot /atom/movable/screen/zone_sel/robot
icon = 'icons/mob/screen_cyborg.dmi' icon = 'icons/mob/screen_cyborg.dmi'
/obj/screen/flash /atom/movable/screen/flash
name = "flash" name = "flash"
icon_state = "blank" icon_state = "blank"
blend_mode = BLEND_ADD blend_mode = BLEND_ADD
@@ -557,7 +553,7 @@
layer = FLASH_LAYER layer = FLASH_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/damageoverlay /atom/movable/screen/damageoverlay
icon = 'icons/mob/screen_full.dmi' icon = 'icons/mob/screen_full.dmi'
icon_state = "oxydamageoverlay0" icon_state = "oxydamageoverlay0"
name = "dmg" name = "dmg"
@@ -567,87 +563,87 @@
layer = UI_DAMAGE_LAYER layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE plane = FULLSCREEN_PLANE
/obj/screen/healths /atom/movable/screen/healths
name = "health" name = "health"
icon_state = "health0" icon_state = "health0"
screen_loc = ui_health screen_loc = ui_health
/obj/screen/healths/alien /atom/movable/screen/healths/alien
icon = 'icons/mob/screen_alien.dmi' icon = 'icons/mob/screen_alien.dmi'
screen_loc = ui_alien_health screen_loc = ui_alien_health
/obj/screen/healths/robot /atom/movable/screen/healths/robot
icon = 'icons/mob/screen_cyborg.dmi' icon = 'icons/mob/screen_cyborg.dmi'
screen_loc = ui_borg_health screen_loc = ui_borg_health
/obj/screen/healths/blob /atom/movable/screen/healths/blob
name = "blob health" name = "blob health"
icon_state = "block" icon_state = "block"
screen_loc = ui_internal screen_loc = ui_internal
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/blob/naut /atom/movable/screen/healths/blob/naut
name = "health" name = "health"
icon = 'icons/mob/blob.dmi' icon = 'icons/mob/blob.dmi'
icon_state = "nauthealth" icon_state = "nauthealth"
/obj/screen/healths/blob/naut/core /atom/movable/screen/healths/blob/naut/core
name = "overmind health" name = "overmind health"
screen_loc = ui_health screen_loc = ui_health
icon_state = "corehealth" icon_state = "corehealth"
/obj/screen/healths/guardian /atom/movable/screen/healths/guardian
name = "summoner health" name = "summoner health"
icon = 'icons/mob/guardian.dmi' icon = 'icons/mob/guardian.dmi'
icon_state = "base" icon_state = "base"
screen_loc = ui_health screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/clock /atom/movable/screen/healths/clock
icon = 'icons/mob/actions.dmi' icon = 'icons/mob/actions.dmi'
icon_state = "bg_clock" icon_state = "bg_clock"
screen_loc = ui_health screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/clock/gear /atom/movable/screen/healths/clock/gear
icon = 'icons/mob/clockwork_mobs.dmi' icon = 'icons/mob/clockwork_mobs.dmi'
icon_state = "bg_gear" icon_state = "bg_gear"
screen_loc = ui_internal screen_loc = ui_internal
/obj/screen/healths/revenant /atom/movable/screen/healths/revenant
name = "essence" name = "essence"
icon = 'icons/mob/actions.dmi' icon = 'icons/mob/actions.dmi'
icon_state = "bg_revenant" icon_state = "bg_revenant"
screen_loc = ui_health screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/construct /atom/movable/screen/healths/construct
icon = 'icons/mob/screen_construct.dmi' icon = 'icons/mob/screen_construct.dmi'
icon_state = "artificer_health0" icon_state = "artificer_health0"
screen_loc = ui_construct_health screen_loc = ui_construct_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/lavaland_elite /atom/movable/screen/healths/lavaland_elite
icon = 'icons/mob/screen_elite.dmi' icon = 'icons/mob/screen_elite.dmi'
icon_state = "elite_health0" icon_state = "elite_health0"
screen_loc = ui_health screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healthdoll /atom/movable/screen/healthdoll
name = "health doll" name = "health doll"
screen_loc = ui_healthdoll screen_loc = ui_healthdoll
/obj/screen/healthdoll/living /atom/movable/screen/healthdoll/living
icon_state = "fullhealth0" icon_state = "fullhealth0"
screen_loc = ui_living_healthdoll screen_loc = ui_living_healthdoll
var/filtered = FALSE //so we don't repeatedly create the mask of the mob every update var/filtered = FALSE //so we don't repeatedly create the mask of the mob every update
/obj/screen/mood /atom/movable/screen/mood
name = "mood" name = "mood"
icon_state = "mood5" icon_state = "mood5"
screen_loc = ui_mood screen_loc = ui_mood
/obj/screen/splash /atom/movable/screen/splash
icon = 'icons/blank_title.png' icon = 'icons/blank_title.png'
icon_state = "" icon_state = ""
screen_loc = "1,1" screen_loc = "1,1"
@@ -655,7 +651,7 @@
plane = SPLASHSCREEN_PLANE plane = SPLASHSCREEN_PLANE
var/client/holder var/client/holder
/obj/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy /atom/movable/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
. = ..() . = ..()
holder = C holder = C
@@ -674,7 +670,7 @@
holder.screen += src holder.screen += src
/obj/screen/splash/proc/Fade(out, qdel_after = TRUE) /atom/movable/screen/splash/proc/Fade(out, qdel_after = TRUE)
if(QDELETED(src)) if(QDELETED(src))
return return
if(out) if(out)
@@ -685,20 +681,20 @@
if(qdel_after) if(qdel_after)
QDEL_IN(src, 30) QDEL_IN(src, 30)
/obj/screen/splash/Destroy() /atom/movable/screen/splash/Destroy()
if(holder) if(holder)
holder.screen -= src holder.screen -= src
holder = null holder = null
return ..() return ..()
/obj/screen/component_button /atom/movable/screen/component_button
var/obj/screen/parent var/atom/movable/screen/parent
/obj/screen/component_button/Initialize(mapload, obj/screen/parent) /atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/parent)
. = ..() . = ..()
src.parent = parent src.parent = parent
/obj/screen/component_button/Click(params) /atom/movable/screen/component_button/Click(params)
if(parent) if(parent)
parent.component_click(src, params) parent.component_click(src, params)
+12 -12
View File
@@ -1,37 +1,37 @@
/obj/screen/action_bar /atom/movable/screen/action_bar
/obj/screen/action_bar/Destroy() /atom/movable/screen/action_bar/Destroy()
STOP_PROCESSING(SShuds, src) STOP_PROCESSING(SShuds, src)
return ..() return ..()
/obj/screen/action_bar/proc/mark_dirty() /atom/movable/screen/action_bar/proc/mark_dirty()
var/mob/living/L = hud?.mymob var/mob/living/L = hud?.mymob
if(L?.client && update_to_mob(L)) if(L?.client && update_to_mob(L))
START_PROCESSING(SShuds, src) START_PROCESSING(SShuds, src)
/obj/screen/action_bar/process() /atom/movable/screen/action_bar/process()
var/mob/living/L = hud?.mymob var/mob/living/L = hud?.mymob
if(!L?.client || !update_to_mob(L)) if(!L?.client || !update_to_mob(L))
return PROCESS_KILL return PROCESS_KILL
/obj/screen/action_bar/proc/update_to_mob(mob/living/L) /atom/movable/screen/action_bar/proc/update_to_mob(mob/living/L)
return FALSE return FALSE
/datum/hud/var/obj/screen/action_bar/clickdelay/clickdelay /datum/hud/var/atom/movable/screen/action_bar/clickdelay/clickdelay
/obj/screen/action_bar/clickdelay /atom/movable/screen/action_bar/clickdelay
name = "click delay" name = "click delay"
icon = 'icons/effects/progessbar.dmi' icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100" icon_state = "prog_bar_100"
layer = 20 // under hand buttons layer = 20 // under hand buttons
/obj/screen/action_bar/clickdelay/Initialize() /atom/movable/screen/action_bar/clickdelay/Initialize()
. = ..() . = ..()
var/matrix/M = new var/matrix/M = new
M.Scale(2, 1) M.Scale(2, 1)
transform = M transform = M
/obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L) /atom/movable/screen/action_bar/clickdelay/update_to_mob(mob/living/L)
var/estimated = L.EstimatedNextActionTime() var/estimated = L.EstimatedNextActionTime()
var/diff = estimated - L.last_action var/diff = estimated - L.last_action
var/left = estimated - world.time var/left = estimated - world.time
@@ -41,14 +41,14 @@
icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]" icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]"
return TRUE return TRUE
/datum/hud/var/obj/screen/action_bar/resistdelay/resistdelay /datum/hud/var/atom/movable/screen/action_bar/resistdelay/resistdelay
/obj/screen/action_bar/resistdelay /atom/movable/screen/action_bar/resistdelay
name = "resist delay" name = "resist delay"
icon = 'icons/effects/progessbar.dmi' icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100" icon_state = "prog_bar_100"
/obj/screen/action_bar/resistdelay/update_to_mob(mob/living/L) /atom/movable/screen/action_bar/resistdelay/update_to_mob(mob/living/L)
var/diff = L.next_resist - L.last_resist var/diff = L.next_resist - L.last_resist
var/left = L.next_resist - world.time var/left = L.next_resist - world.time
if(left < 0 || diff < 0) if(left < 0 || diff < 0)
+9 -9
View File
@@ -1,19 +1,19 @@
/obj/screen/mov_intent /atom/movable/screen/mov_intent
icon = 'modular_citadel/icons/ui/screen_midnight.dmi' icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
/obj/screen/sprintbutton /atom/movable/screen/sprintbutton
name = "toggle sprint" name = "toggle sprint"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi' icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "act_sprint" icon_state = "act_sprint"
layer = ABOVE_HUD_LAYER - 0.1 layer = ABOVE_HUD_LAYER - 0.1
var/mutable_appearance/flashy var/mutable_appearance/flashy
/obj/screen/sprintbutton/Click() /atom/movable/screen/sprintbutton/Click()
if(ishuman(usr)) if(ishuman(usr))
var/mob/living/carbon/human/H = usr var/mob/living/carbon/human/H = usr
H.default_toggle_sprint() H.default_toggle_sprint()
/obj/screen/sprintbutton/update_icon_state() /atom/movable/screen/sprintbutton/update_icon_state()
var/mob/living/user = hud?.mymob var/mob/living/user = hud?.mymob
if(!istype(user)) if(!istype(user))
return return
@@ -24,7 +24,7 @@
else else
icon_state = "act_sprint" icon_state = "act_sprint"
/obj/screen/sprintbutton/update_overlays() /atom/movable/screen/sprintbutton/update_overlays()
. = ..() . = ..()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
if(!istype(user) || !user.client) if(!istype(user) || !user.client)
@@ -38,20 +38,20 @@
. += flashy . += flashy
//Sprint buffer onscreen code. //Sprint buffer onscreen code.
/datum/hud/var/obj/screen/sprint_buffer/sprint_buffer /datum/hud/var/atom/movable/screen/sprint_buffer/sprint_buffer
/obj/screen/sprint_buffer /atom/movable/screen/sprint_buffer
name = "sprint buffer" name = "sprint buffer"
icon = 'icons/effects/progessbar.dmi' icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100" icon_state = "prog_bar_100"
/obj/screen/sprint_buffer/Click() /atom/movable/screen/sprint_buffer/Click()
if(isliving(usr)) if(isliving(usr))
var/mob/living/L = usr var/mob/living/L = usr
to_chat(L, "<span class='boldnotice'>Your sprint buffer's maximum capacity is [L.sprint_buffer_max]. It is currently at [L.sprint_buffer], regenerating at [L.sprint_buffer_regen_ds * 10] per second. \ to_chat(L, "<span class='boldnotice'>Your sprint buffer's maximum capacity is [L.sprint_buffer_max]. It is currently at [L.sprint_buffer], regenerating at [L.sprint_buffer_regen_ds * 10] per second. \
Sprinting while this is empty will incur a [L.sprint_stamina_cost] stamina cost per tile.</span>") Sprinting while this is empty will incur a [L.sprint_stamina_cost] stamina cost per tile.</span>")
/obj/screen/sprint_buffer/proc/update_to_mob(mob/living/L) /atom/movable/screen/sprint_buffer/proc/update_to_mob(mob/living/L)
var/amount = 0 var/amount = 0
if(L.sprint_buffer_max > 0) if(L.sprint_buffer_max > 0)
amount = round(clamp((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5) amount = round(clamp((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5)
+12 -12
View File
@@ -1,21 +1,21 @@
/datum/hud/var/obj/screen/staminas/staminas /datum/hud/var/atom/movable/screen/staminas/staminas
/datum/hud/var/obj/screen/staminabuffer/staminabuffer /datum/hud/var/atom/movable/screen/staminabuffer/staminabuffer
/obj/screen/staminas /atom/movable/screen/staminas
icon = 'modular_citadel/icons/ui/screen_gen.dmi' icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina" name = "stamina"
icon_state = "stamina0" icon_state = "stamina0"
screen_loc = ui_stamina screen_loc = ui_stamina
mouse_opacity = 1 mouse_opacity = 1
/obj/screen/staminas/Click(location,control,params) /atom/movable/screen/staminas/Click(location,control,params)
if(isliving(usr)) if(isliving(usr))
var/mob/living/L = usr var/mob/living/L = usr
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max) CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max)
to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>\ to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>\
<br>Your stamina buffer is <b>[round((L.stamina_buffer / buffer_max) * 100, 0.1)]%</b> full.</span>") <br>Your stamina buffer is <b>[round((L.stamina_buffer / buffer_max) * 100, 0.1)]%</b> full.</span>")
/obj/screen/staminas/update_icon_state() /atom/movable/screen/staminas/update_icon_state()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
if(!user) if(!user)
return return
@@ -26,21 +26,21 @@
else else
icon_state = "stamina[clamp(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]" icon_state = "stamina[clamp(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
/obj/screen/staminas/update_overlays() /atom/movable/screen/staminas/update_overlays()
. = ..() . = ..()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
if(!user) if(!user)
return return
var/percent = user.getStaminaLoss() / STAMINA_CRIT var/percent = user.getStaminaLoss() / STAMINA_CRIT
if((user.stat == DEAD) || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2)) if((user.stat == DEAD) || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2))
. += list("stamina_alert3") . += list("stamina_alert3")
else if(percent >= 0.85) else if(percent >= 0.85)
. += list("stamina_alert2") . += list("stamina_alert2")
else if(percent >= 0.7) else if(percent >= 0.7)
. += list("stamina_alert1") . += list("stamina_alert1")
//stam buffer //stam buffer
/obj/screen/staminabuffer /atom/movable/screen/staminabuffer
icon = 'modular_citadel/icons/ui/screen_gen.dmi' icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina buffer" name = "stamina buffer"
icon_state = "stambuffer0" icon_state = "stambuffer0"
@@ -48,19 +48,19 @@
layer = ABOVE_HUD_LAYER + 0.1 layer = ABOVE_HUD_LAYER + 0.1
mouse_opacity = 0 mouse_opacity = 0
/obj/screen/staminabuffer/proc/mark_dirty() /atom/movable/screen/staminabuffer/proc/mark_dirty()
if(update_to_mob()) if(update_to_mob())
START_PROCESSING(SShuds, src) START_PROCESSING(SShuds, src)
/obj/screen/staminabuffer/process() /atom/movable/screen/staminabuffer/process()
if(!update_to_mob()) if(!update_to_mob())
return PROCESS_KILL return PROCESS_KILL
/obj/screen/staminabuffer/Destroy() /atom/movable/screen/staminabuffer/Destroy()
STOP_PROCESSING(SShuds, src) STOP_PROCESSING(SShuds, src)
return ..() return ..()
/obj/screen/staminabuffer/proc/update_to_mob() /atom/movable/screen/staminabuffer/proc/update_to_mob()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
user.UpdateStaminaBuffer(FALSE) user.UpdateStaminaBuffer(FALSE)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max) CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max)
+42 -42
View File
@@ -1,12 +1,12 @@
/obj/screen/storage /atom/movable/screen/storage
name = "storage" name = "storage"
var/insertion_click = FALSE var/insertion_click = FALSE
/obj/screen/storage/Initialize(mapload, new_master) /atom/movable/screen/storage/Initialize(mapload, new_master)
. = ..() . = ..()
master = new_master master = new_master
/obj/screen/storage/Click(location, control, params) /atom/movable/screen/storage/Click(location, control, params)
if(!insertion_click) if(!insertion_click)
return ..() return ..()
if(hud?.mymob && (hud.mymob != usr)) if(hud?.mymob && (hud.mymob != usr))
@@ -18,7 +18,7 @@
master.attackby(null, I, usr, params) master.attackby(null, I, usr, params)
return TRUE return TRUE
/obj/screen/storage/boxes /atom/movable/screen/storage/boxes
name = "storage" name = "storage"
icon_state = "block" icon_state = "block"
screen_loc = "7,7 to 10,8" screen_loc = "7,7 to 10,8"
@@ -26,83 +26,83 @@
plane = HUD_PLANE plane = HUD_PLANE
insertion_click = TRUE insertion_click = TRUE
/obj/screen/storage/close /atom/movable/screen/storage/close
name = "close" name = "close"
layer = ABOVE_HUD_LAYER layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE plane = ABOVE_HUD_PLANE
icon_state = "backpack_close" icon_state = "backpack_close"
/obj/screen/storage/close/Click() /atom/movable/screen/storage/close/Click()
var/datum/component/storage/S = master var/datum/component/storage/S = master
S.close(usr) S.close(usr)
return TRUE return TRUE
/obj/screen/storage/left /atom/movable/screen/storage/left
icon_state = "storage_start" icon_state = "storage_start"
insertion_click = TRUE insertion_click = TRUE
/obj/screen/storage/right /atom/movable/screen/storage/right
icon_state = "storage_end" icon_state = "storage_end"
insertion_click = TRUE insertion_click = TRUE
/obj/screen/storage/continuous /atom/movable/screen/storage/continuous
icon_state = "storage_continue" icon_state = "storage_continue"
insertion_click = TRUE insertion_click = TRUE
/obj/screen/storage/volumetric_box /atom/movable/screen/storage/volumetric_box
icon_state = "stored_continue" icon_state = "stored_continue"
layer = VOLUMETRIC_STORAGE_BOX_LAYER layer = VOLUMETRIC_STORAGE_BOX_LAYER
plane = VOLUMETRIC_STORAGE_BOX_PLANE plane = VOLUMETRIC_STORAGE_BOX_PLANE
var/obj/item/our_item var/obj/item/our_item
/obj/screen/storage/volumetric_box/Initialize(mapload, new_master, obj/item/our_item) /atom/movable/screen/storage/volumetric_box/Initialize(mapload, new_master, obj/item/our_item)
src.our_item = our_item src.our_item = our_item
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_ENTER, .proc/on_item_mouse_enter) RegisterSignal(our_item, COMSIG_ITEM_MOUSE_ENTER, .proc/on_item_mouse_enter)
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_EXIT, .proc/on_item_mouse_exit) RegisterSignal(our_item, COMSIG_ITEM_MOUSE_EXIT, .proc/on_item_mouse_exit)
return ..() return ..()
/obj/screen/storage/volumetric_box/Destroy() /atom/movable/screen/storage/volumetric_box/Destroy()
makeItemInactive() makeItemInactive()
our_item = null our_item = null
return ..() return ..()
/obj/screen/storage/volumetric_box/Click(location, control, params) /atom/movable/screen/storage/volumetric_box/Click(location, control, params)
return our_item.Click(location, control, params) return our_item.Click(location, control, params)
/obj/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) /atom/movable/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
return our_item.MouseDrop(over, src_location, over_location, src_control, over_control, params) return our_item.MouseDrop(over, src_location, over_location, src_control, over_control, params)
/obj/screen/storage/volumetric_box/MouseExited(location, control, params) /atom/movable/screen/storage/volumetric_box/MouseExited(location, control, params)
makeItemInactive() makeItemInactive()
/obj/screen/storage/volumetric_box/MouseEntered(location, control, params) /atom/movable/screen/storage/volumetric_box/MouseEntered(location, control, params)
makeItemActive() makeItemActive()
/obj/screen/storage/volumetric_box/proc/on_item_mouse_enter() /atom/movable/screen/storage/volumetric_box/proc/on_item_mouse_enter()
makeItemActive() makeItemActive()
/obj/screen/storage/volumetric_box/proc/on_item_mouse_exit() /atom/movable/screen/storage/volumetric_box/proc/on_item_mouse_exit()
makeItemInactive() makeItemInactive()
/obj/screen/storage/volumetric_box/proc/makeItemInactive() /atom/movable/screen/storage/volumetric_box/proc/makeItemInactive()
return return
/obj/screen/storage/volumetric_box/proc/makeItemActive() /atom/movable/screen/storage/volumetric_box/proc/makeItemActive()
return return
/obj/screen/storage/volumetric_box/center /atom/movable/screen/storage/volumetric_box/center
icon_state = "stored_continue" icon_state = "stored_continue"
var/obj/screen/storage/volumetric_edge/stored_left/left var/atom/movable/screen/storage/volumetric_edge/stored_left/left
var/obj/screen/storage/volumetric_edge/stored_right/right var/atom/movable/screen/storage/volumetric_edge/stored_right/right
var/obj/screen/storage/item_holder/holder var/atom/movable/screen/storage/item_holder/holder
var/pixel_size var/pixel_size
/obj/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item) /atom/movable/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item)
left = new(null, src, our_item) left = new(null, src, our_item)
right = new(null, src, our_item) right = new(null, src, our_item)
return ..() return ..()
/obj/screen/storage/volumetric_box/center/Destroy() /atom/movable/screen/storage/volumetric_box/center/Destroy()
QDEL_NULL(left) QDEL_NULL(left)
QDEL_NULL(right) QDEL_NULL(right)
vis_contents.Cut() vis_contents.Cut()
@@ -110,13 +110,13 @@
QDEL_NULL(holder) QDEL_NULL(holder)
return ..() return ..()
/obj/screen/storage/volumetric_box/center/proc/on_screen_objects() /atom/movable/screen/storage/volumetric_box/center/proc/on_screen_objects()
return list(src) return list(src)
/** /**
* Sets the size of this box screen object and regenerates its left/right borders. This includes the actual border's size! * Sets the size of this box screen object and regenerates its left/right borders. This includes the actual border's size!
*/ */
/obj/screen/storage/volumetric_box/center/proc/set_pixel_size(pixels) /atom/movable/screen/storage/volumetric_box/center/proc/set_pixel_size(pixels)
if(pixel_size == pixels) if(pixel_size == pixels)
return return
pixel_size = pixels pixel_size = pixels
@@ -139,59 +139,59 @@
add_overlay(left) add_overlay(left)
add_overlay(right) add_overlay(right)
/obj/screen/storage/volumetric_box/center/makeItemInactive() /atom/movable/screen/storage/volumetric_box/center/makeItemInactive()
if(!holder) if(!holder)
return return
holder.layer = VOLUMETRIC_STORAGE_ITEM_LAYER holder.layer = VOLUMETRIC_STORAGE_ITEM_LAYER
holder.plane = VOLUMETRIC_STORAGE_ITEM_PLANE holder.plane = VOLUMETRIC_STORAGE_ITEM_PLANE
/obj/screen/storage/volumetric_box/center/makeItemActive() /atom/movable/screen/storage/volumetric_box/center/makeItemActive()
if(!holder) if(!holder)
return return
holder.our_item.layer = VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER //make sure we display infront of the others! holder.our_item.layer = VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER //make sure we display infront of the others!
holder.our_item.plane = VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE holder.our_item.plane = VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE
/obj/screen/storage/volumetric_edge /atom/movable/screen/storage/volumetric_edge
layer = VOLUMETRIC_STORAGE_BOX_LAYER layer = VOLUMETRIC_STORAGE_BOX_LAYER
plane = VOLUMETRIC_STORAGE_BOX_PLANE plane = VOLUMETRIC_STORAGE_BOX_PLANE
/obj/screen/storage/volumetric_edge/Initialize(mapload, master, our_item) /atom/movable/screen/storage/volumetric_edge/Initialize(mapload, master, our_item)
src.master = master src.master = master
return ..() return ..()
/obj/screen/storage/volumetric_edge/Click(location, control, params) /atom/movable/screen/storage/volumetric_edge/Click(location, control, params)
return master.Click(location, control, params) return master.Click(location, control, params)
/obj/screen/storage/volumetric_edge/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) /atom/movable/screen/storage/volumetric_edge/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
return master.MouseDrop(over, src_location, over_location, src_control, over_control, params) return master.MouseDrop(over, src_location, over_location, src_control, over_control, params)
/obj/screen/storage/volumetric_edge/MouseExited(location, control, params) /atom/movable/screen/storage/volumetric_edge/MouseExited(location, control, params)
return master.MouseExited(location, control, params) return master.MouseExited(location, control, params)
/obj/screen/storage/volumetric_edge/MouseEntered(location, control, params) /atom/movable/screen/storage/volumetric_edge/MouseEntered(location, control, params)
return master.MouseEntered(location, control, params) return master.MouseEntered(location, control, params)
/obj/screen/storage/volumetric_edge/stored_left /atom/movable/screen/storage/volumetric_edge/stored_left
icon_state = "stored_start" icon_state = "stored_start"
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM // Yes I know RESET_TRANSFORM is in APPEARANCE_UI but we're hard-asserting this incase someone changes it. appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM // Yes I know RESET_TRANSFORM is in APPEARANCE_UI but we're hard-asserting this incase someone changes it.
/obj/screen/storage/volumetric_edge/stored_right /atom/movable/screen/storage/volumetric_edge/stored_right
icon_state = "stored_end" icon_state = "stored_end"
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM
/obj/screen/storage/item_holder /atom/movable/screen/storage/item_holder
var/obj/item/our_item var/obj/item/our_item
vis_flags = NONE vis_flags = NONE
/obj/screen/storage/item_holder/Initialize(mapload, new_master, obj/item/I) /atom/movable/screen/storage/item_holder/Initialize(mapload, new_master, obj/item/I)
. = ..() . = ..()
our_item = I our_item = I
vis_contents += I vis_contents += I
/obj/screen/storage/item_holder/Destroy() /atom/movable/screen/storage/item_holder/Destroy()
vis_contents.Cut() vis_contents.Cut()
our_item = null our_item = null
return ..() return ..()
/obj/screen/storage/item_holder/Click(location, control, params) /atom/movable/screen/storage/item_holder/Click(location, control, params)
return our_item.Click(location, control, params) return our_item.Click(location, control, params)
+3 -3
View File
@@ -1,9 +1,9 @@
/obj/screen/voretoggle /atom/movable/screen/voretoggle
name = "toggle vore mode" name = "toggle vore mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi' icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "nom_off" icon_state = "nom_off"
/obj/screen/voretoggle/Click() /atom/movable/screen/voretoggle/Click()
if(usr != hud.mymob) if(usr != hud.mymob)
return return
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
@@ -12,7 +12,7 @@
return return
C.toggle_vore_mode() C.toggle_vore_mode()
/obj/screen/voretoggle/update_icon_state() /atom/movable/screen/voretoggle/update_icon_state()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
if(!istype(user)) if(!istype(user))
return return
+2 -2
View File
@@ -2,7 +2,7 @@
ui_style = 'icons/mob/screen_gen.dmi' ui_style = 'icons/mob/screen_gen.dmi'
/datum/hud/living/simple_animal/New(mob/living/owner) /datum/hud/living/simple_animal/New(mob/living/owner)
..() ..()
pull_icon = new /obj/screen/pull() pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style pull_icon.icon = ui_style
pull_icon.update_icon() pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull pull_icon.screen_loc = ui_living_pull
@@ -10,6 +10,6 @@
static_inventory += pull_icon static_inventory += pull_icon
//mob health doll! assumes whatever sprite the mob is //mob health doll! assumes whatever sprite the mob is
healthdoll = new /obj/screen/healthdoll/living() healthdoll = new /atom/movable/screen/healthdoll/living()
healthdoll.hud = src healthdoll.hud = src
infodisplay += healthdoll infodisplay += healthdoll
+20 -20
View File
@@ -1,98 +1,98 @@
/obj/screen/swarmer /atom/movable/screen/swarmer
icon = 'icons/mob/swarmer.dmi' icon = 'icons/mob/swarmer.dmi'
/obj/screen/swarmer/FabricateTrap /atom/movable/screen/swarmer/FabricateTrap
icon_state = "ui_trap" icon_state = "ui_trap"
name = "Create trap (Costs 5 Resources)" name = "Create trap (Costs 5 Resources)"
desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it. (Costs 5 resources)" desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it. (Costs 5 resources)"
/obj/screen/swarmer/FabricateTrap/Click() /atom/movable/screen/swarmer/FabricateTrap/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateTrap() S.CreateTrap()
/obj/screen/swarmer/Barricade /atom/movable/screen/swarmer/Barricade
icon_state = "ui_barricade" icon_state = "ui_barricade"
name = "Create barricade (Costs 5 Resources)" name = "Create barricade (Costs 5 Resources)"
desc = "Creates a destructible barricade that will stop any non swarmer from passing it. Also allows disabler beams to pass through. (Costs 5 resources)" desc = "Creates a destructible barricade that will stop any non swarmer from passing it. Also allows disabler beams to pass through. (Costs 5 resources)"
/obj/screen/swarmer/Barricade/Click() /atom/movable/screen/swarmer/Barricade/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateBarricade() S.CreateBarricade()
/obj/screen/swarmer/Replicate /atom/movable/screen/swarmer/Replicate
icon_state = "ui_replicate" icon_state = "ui_replicate"
name = "Replicate (Costs 50 Resources)" name = "Replicate (Costs 50 Resources)"
desc = "Creates another of our kind." desc = "Creates another of our kind."
/obj/screen/swarmer/Replicate/Click() /atom/movable/screen/swarmer/Replicate/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateSwarmer() S.CreateSwarmer()
/obj/screen/swarmer/RepairSelf /atom/movable/screen/swarmer/RepairSelf
icon_state = "ui_self_repair" icon_state = "ui_self_repair"
name = "Repair self" name = "Repair self"
desc = "Repairs damage to our body." desc = "Repairs damage to our body."
/obj/screen/swarmer/RepairSelf/Click() /atom/movable/screen/swarmer/RepairSelf/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.RepairSelf() S.RepairSelf()
/obj/screen/swarmer/ToggleLight /atom/movable/screen/swarmer/ToggleLight
icon_state = "ui_light" icon_state = "ui_light"
name = "Toggle light" name = "Toggle light"
desc = "Toggles our inbuilt light on or off." desc = "Toggles our inbuilt light on or off."
/obj/screen/swarmer/ToggleLight/Click() /atom/movable/screen/swarmer/ToggleLight/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ToggleLight() S.ToggleLight()
/obj/screen/swarmer/ContactSwarmers /atom/movable/screen/swarmer/ContactSwarmers
icon_state = "ui_contact_swarmers" icon_state = "ui_contact_swarmers"
name = "Contact swarmers" name = "Contact swarmers"
desc = "Sends a message to all other swarmers, should they exist." desc = "Sends a message to all other swarmers, should they exist."
/obj/screen/swarmer/ContactSwarmers/Click() /atom/movable/screen/swarmer/ContactSwarmers/Click()
if(isswarmer(usr)) if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ContactSwarmers() S.ContactSwarmers()
/datum/hud/swarmer/New(mob/owner) /datum/hud/swarmer/New(mob/owner)
..() ..()
var/obj/screen/using var/atom/movable/screen/using
using = new /obj/screen/swarmer/FabricateTrap() using = new /atom/movable/screen/swarmer/FabricateTrap()
using.screen_loc = ui_hand_position(2) using.screen_loc = ui_hand_position(2)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swarmer/Barricade() using = new /atom/movable/screen/swarmer/Barricade()
using.screen_loc = ui_hand_position(1) using.screen_loc = ui_hand_position(1)
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swarmer/Replicate() using = new /atom/movable/screen/swarmer/Replicate()
using.screen_loc = ui_zonesel using.screen_loc = ui_zonesel
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swarmer/RepairSelf() using = new /atom/movable/screen/swarmer/RepairSelf()
using.screen_loc = ui_storage1 using.screen_loc = ui_storage1
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swarmer/ToggleLight() using = new /atom/movable/screen/swarmer/ToggleLight()
using.screen_loc = ui_back using.screen_loc = ui_back
using.hud = src using.hud = src
static_inventory += using static_inventory += using
using = new /obj/screen/swarmer/ContactSwarmers() using = new /atom/movable/screen/swarmer/ContactSwarmers()
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
using.hud = src using.hud = src
static_inventory += using static_inventory += using
+1 -1
View File
@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(parallax)
/datum/controller/subsystem/parallax/PreInit() /datum/controller/subsystem/parallax/PreInit()
. = ..() . = ..()
if(prob(70)) //70% chance to pick a special extra layer if(prob(70)) //70% chance to pick a special extra layer
random_layer = pick(/obj/screen/parallax_layer/random/space_gas, /obj/screen/parallax_layer/random/asteroids) random_layer = pick(/atom/movable/screen/parallax_layer/random/space_gas, /atom/movable/screen/parallax_layer/random/asteroids)
random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. [COLOR_SILVER] random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. [COLOR_SILVER]
planet_y_offset = rand(100, 160) planet_y_offset = rand(100, 160)
planet_x_offset = rand(100, 160) planet_x_offset = rand(100, 160)
-2
View File
@@ -59,5 +59,3 @@ SUBSYSTEM_DEF(sun)
/datum/controller/subsystem/sun/proc/complete_movement() /datum/controller/subsystem/sun/proc/complete_movement()
SEND_SIGNAL(src, COMSIG_SUN_MOVED, primary_sun, suns) SEND_SIGNAL(src, COMSIG_SUN_MOVED, primary_sun, suns)
#undef OCCLUSION_DISTANCE
+1 -1
View File
@@ -421,7 +421,7 @@ SUBSYSTEM_DEF(ticker)
if (living.client.prefs && living.client.prefs.auto_ooc) if (living.client.prefs && living.client.prefs.auto_ooc)
if (living.client.prefs.chat_toggles & CHAT_OOC) if (living.client.prefs.chat_toggles & CHAT_OOC)
living.client.prefs.chat_toggles ^= CHAT_OOC living.client.prefs.chat_toggles ^= CHAT_OOC
var/obj/screen/splash/S = new(living.client, TRUE) var/atom/movable/screen/splash/S = new(living.client, TRUE)
S.Fade(TRUE) S.Fade(TRUE)
living.client.init_verbs() living.client.init_verbs()
livings += living livings += living
+1 -1
View File
@@ -57,7 +57,7 @@ SUBSYSTEM_DEF(title)
for(var/thing in GLOB.clients) for(var/thing in GLOB.clients)
if(!thing) if(!thing)
continue continue
var/obj/screen/splash/S = new(thing, FALSE) var/atom/movable/screen/splash/S = new(thing, FALSE)
S.Fade(FALSE,FALSE) S.Fade(FALSE,FALSE)
/datum/controller/subsystem/title/Recover() /datum/controller/subsystem/title/Recover()
+3 -3
View File
@@ -11,7 +11,7 @@
var/check_flags = 0 var/check_flags = 0
var/required_mobility_flags = MOBILITY_USE var/required_mobility_flags = MOBILITY_USE
var/processing = FALSE var/processing = FALSE
var/obj/screen/movable/action_button/button = null var/atom/movable/screen/movable/action_button/button = null
var/buttontooltipstyle = "" var/buttontooltipstyle = ""
var/transparent_when_unavailable = TRUE var/transparent_when_unavailable = TRUE
var/use_target_appearance = FALSE var/use_target_appearance = FALSE
@@ -159,7 +159,7 @@
button.color = rgb(255,255,255,255) button.color = rgb(255,255,255,255)
return 1 return 1
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE) /datum/action/proc/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force = FALSE)
if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force)) if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force))
current_button.cut_overlays() current_button.cut_overlays()
current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state)) current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state))
@@ -821,7 +821,7 @@
icon_icon = 'icons/mob/actions/actions_items.dmi' icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "storage_gather_switch" button_icon_state = "storage_gather_switch"
/datum/action/item_action/storage_gather_mode/ApplyIcon(obj/screen/movable/action_button/current_button) /datum/action/item_action/storage_gather_mode/ApplyIcon(atom/movable/screen/movable/action_button/current_button)
. = ..() . = ..()
var/old_layer = target.layer var/old_layer = target.layer
var/old_plane = target.plane var/old_plane = target.plane
+1 -1
View File
@@ -47,7 +47,7 @@
"These words keep echoing in your mind. You find yourself completely fascinated by them.")]</span>") "These words keep echoing in your mind. You find yourself completely fascinated by them.")]</span>")
to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so,\ to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so,\
as long as you act like the words are your highest priority.</span>") as long as you act like the words are your highest priority.</span>")
var/obj/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /obj/screen/alert/hypnosis) var/atom/movable/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /atom/movable/screen/alert/hypnosis)
hypno_alert.desc = "\"[hypnotic_phrase]\"... your mind seems to be fixated on this concept." hypno_alert.desc = "\"[hypnotic_phrase]\"... your mind seems to be fixated on this concept."
..() ..()
+4 -4
View File
@@ -18,7 +18,7 @@
playing.play(watcher) playing.play(watcher)
qdel(playing) qdel(playing)
/obj/screen/cinematic /atom/movable/screen/cinematic
icon = 'icons/effects/station_explosion.dmi' icon = 'icons/effects/station_explosion.dmi'
icon_state = "station_intact" icon_state = "station_intact"
plane = SPLASHSCREEN_PLANE plane = SPLASHSCREEN_PLANE
@@ -32,7 +32,7 @@
var/list/watching = list() //List of clients watching this var/list/watching = list() //List of clients watching this
var/list/locked = list() //Who had mob_transforming set during the cinematic var/list/locked = list() //Who had mob_transforming set during the cinematic
var/is_global = FALSE //Global cinematics will override mob-specific ones var/is_global = FALSE //Global cinematics will override mob-specific ones
var/obj/screen/cinematic/screen var/atom/movable/screen/cinematic/screen
var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc) var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc)
var/cleanup_time = 300 //How long for the final screen to remain var/cleanup_time = 300 //How long for the final screen to remain
var/stop_ooc = TRUE //Turns off ooc when played globally. var/stop_ooc = TRUE //Turns off ooc when played globally.
@@ -74,7 +74,7 @@
ooc_toggled = TRUE ooc_toggled = TRUE
toggle_ooc(FALSE) toggle_ooc(FALSE)
//Place /obj/screen/cinematic into everyone's screens, prevent them from moving //Place /atom/movable/screen/cinematic into everyone's screens, prevent them from moving
for(var/MM in watchers) for(var/MM in watchers)
var/mob/M = MM var/mob/M = MM
show_to(M, M.client) show_to(M, M.client)
@@ -101,7 +101,7 @@
if(!C) if(!C)
return return
watching += C watching += C
M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop) M.overlay_fullscreen("cinematic",/atom/movable/screen/fullscreen/cinematic_backdrop)
C.screen += screen C.screen += screen
//Sound helper //Sound helper
+5 -5
View File
@@ -7,7 +7,7 @@
var/mode_flags = COMBAT_MODE_INACTIVE var/mode_flags = COMBAT_MODE_INACTIVE
var/combatmessagecooldown var/combatmessagecooldown
var/lastmousedir var/lastmousedir
var/obj/screen/combattoggle/hud_icon var/atom/movable/screen/combattoggle/hud_icon
var/hud_loc var/hud_loc
/datum/component/combat_mode/Initialize(hud_loc = ui_combat_toggle) /datum/component/combat_mode/Initialize(hud_loc = ui_combat_toggle)
@@ -178,18 +178,18 @@
safe_disable_combat_mode(source) safe_disable_combat_mode(source)
/// The screen button. /// The screen button.
/obj/screen/combattoggle /atom/movable/screen/combattoggle
name = "toggle combat mode" name = "toggle combat mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi' icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "combat_off" icon_state = "combat_off"
var/mutable_appearance/flashy var/mutable_appearance/flashy
var/combat_on = FALSE ///Wheter combat mode is enabled or not, so we don't have to store a reference. var/combat_on = FALSE ///Wheter combat mode is enabled or not, so we don't have to store a reference.
/obj/screen/combattoggle/Click() /atom/movable/screen/combattoggle/Click()
if(hud && usr == hud.mymob) if(hud && usr == hud.mymob)
SEND_SIGNAL(hud.mymob, COMSIG_TOGGLE_COMBAT_MODE) SEND_SIGNAL(hud.mymob, COMSIG_TOGGLE_COMBAT_MODE)
/obj/screen/combattoggle/update_icon_state() /atom/movable/screen/combattoggle/update_icon_state()
var/mob/living/user = hud?.mymob var/mob/living/user = hud?.mymob
if(!user) if(!user)
return return
@@ -200,7 +200,7 @@
else else
icon_state = "combat_off" icon_state = "combat_off"
/obj/screen/combattoggle/update_overlays() /atom/movable/screen/combattoggle/update_overlays()
. = ..() . = ..()
var/mob/living/carbon/user = hud?.mymob var/mob/living/carbon/user = hud?.mymob
if(!(user?.client)) if(!(user?.client))
+3 -3
View File
@@ -5,10 +5,10 @@
/datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL) /datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL)
var/datum/hud/H = user.hud_used var/datum/hud/H = user.hud_used
for(var/huds in H.static_inventory) for(var/huds in H.static_inventory)
if(istype(huds, /obj/screen/craft)) if(istype(huds, /atom/movable/screen/craft))
return return
//We don't want to be stacking multiple crafting huds on relogs //We don't want to be stacking multiple crafting huds on relogs
var/obj/screen/craft/C = new() var/atom/movable/screen/craft/C = new()
C.icon = H.ui_style C.icon = H.ui_style
H.static_inventory += C H.static_inventory += C
CL.screen += C CL.screen += C
@@ -323,7 +323,7 @@
Deletion.Cut(Deletion.len) Deletion.Cut(Deletion.len)
qdel(DL) qdel(DL)
/datum/component/personal_crafting/proc/component_ui_interact(obj/screen/craft/image, location, control, params, user) /datum/component/personal_crafting/proc/component_ui_interact(atom/movable/screen/craft/image, location, control, params, user)
if(user == parent) if(user == parent)
ui_interact(user) ui_interact(user)
+1 -1
View File
@@ -142,7 +142,7 @@
if(harmful) if(harmful)
victim.visible_message("<span class='danger'>[weapon] embeds itself in [victim]'s [limb.name]!</span>",ignored_mobs=victim) victim.visible_message("<span class='danger'>[weapon] embeds itself in [victim]'s [limb.name]!</span>",ignored_mobs=victim)
to_chat(victim, "<span class='userdanger'>[weapon] embeds itself in your [limb.name]!</span>") to_chat(victim, "<span class='userdanger'>[weapon] embeds itself in your [limb.name]!</span>")
victim.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) victim.throw_alert("embeddedobject", /atom/movable/screen/alert/embeddedobject)
playsound(victim,'sound/weapons/bladeslice.ogg', 40) playsound(victim,'sound/weapons/bladeslice.ogg', 40)
weapon.add_mob_blood(victim)//it embedded itself in you, of course it's bloody! weapon.add_mob_blood(victim)//it embedded itself in you, of course it's bloody!
damage = weapon.w_class * impact_pain_mult damage = weapon.w_class * impact_pain_mult
+1 -1
View File
@@ -13,7 +13,7 @@
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
var/list/datum/mood_event/mood_events = list() var/list/datum/mood_event/mood_events = list()
var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much? var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much?
var/obj/screen/mood/screen_obj var/atom/movable/screen/mood/screen_obj
var/datum/skill_modifier/bad_mood/malus var/datum/skill_modifier/bad_mood/malus
var/datum/skill_modifier/great_mood/bonus var/datum/skill_modifier/great_mood/bonus
var/static/malus_id = 0 var/static/malus_id = 0
+3 -3
View File
@@ -435,15 +435,15 @@
RevenantThrow(over_object, M, source) RevenantThrow(over_object, M, source)
return return
if(!M.incapacitated()) if(!M.incapacitated())
if(!istype(over_object, /obj/screen)) if(!istype(over_object, /atom/movable/screen))
dump_content_at(over_object, M) dump_content_at(over_object, M)
return return
if(A.loc != M) if(A.loc != M)
return return
playsound(A, "rustle", 50, 1, -5) playsound(A, "rustle", 50, 1, -5)
A.do_jiggle() A.do_jiggle()
if(istype(over_object, /obj/screen/inventory/hand)) if(istype(over_object, /atom/movable/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(A, H.held_index) M.putItemFromInventoryInHandIfPossible(A, H.held_index)
return return
A.add_fingerprint(M) A.add_fingerprint(M)
+11 -11
View File
@@ -20,8 +20,8 @@
. = list() . = list()
var/list/accessible_contents = accessible_items() var/list/accessible_contents = accessible_items()
var/adjusted_contents = length(accessible_contents) var/adjusted_contents = length(accessible_contents)
var/obj/screen/storage/close/ui_close var/atom/movable/screen/storage/close/ui_close
var/obj/screen/storage/boxes/ui_boxes var/atom/movable/screen/storage/boxes/ui_boxes
//Numbered contents display //Numbered contents display
var/list/datum/numbered_display/numbered_contents var/list/datum/numbered_display/numbered_contents
@@ -62,7 +62,7 @@
for(var/obj/O in accessible_items()) for(var/obj/O in accessible_items())
if(QDELETED(O)) if(QDELETED(O))
continue continue
var/obj/screen/storage/item_holder/D = new(null, src, O) var/atom/movable/screen/storage/item_holder/D = new(null, src, O)
D.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip" D.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
D.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]" D.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]"
O.maptext = "" O.maptext = ""
@@ -81,9 +81,9 @@
*/ */
/datum/component/storage/proc/orient2hud_volumetric(mob/user, maxcolumns) /datum/component/storage/proc/orient2hud_volumetric(mob/user, maxcolumns)
. = list() . = list()
var/obj/screen/storage/left/ui_left var/atom/movable/screen/storage/left/ui_left
var/obj/screen/storage/continuous/ui_continuous var/atom/movable/screen/storage/continuous/ui_continuous
var/obj/screen/storage/close/ui_close var/atom/movable/screen/storage/close/ui_close
// Generate ui_item_blocks for missing ones and render+orient. // Generate ui_item_blocks for missing ones and render+orient.
var/list/atom/contents = accessible_items() var/list/atom/contents = accessible_items()
@@ -137,7 +137,7 @@
for(var/i in percentage_by_item) for(var/i in percentage_by_item)
I = i I = i
var/percent = percentage_by_item[I] var/percent = percentage_by_item[I]
var/obj/screen/storage/volumetric_box/center/B = new /obj/screen/storage/volumetric_box/center(null, src, I) var/atom/movable/screen/storage/volumetric_box/center/B = new /atom/movable/screen/storage/volumetric_box/center(null, src, I)
var/pixels_to_use = overrun? MINIMUM_PIXELS_PER_ITEM : max(using_horizontal_pixels * percent, MINIMUM_PIXELS_PER_ITEM) var/pixels_to_use = overrun? MINIMUM_PIXELS_PER_ITEM : max(using_horizontal_pixels * percent, MINIMUM_PIXELS_PER_ITEM)
var/addrow = FALSE var/addrow = FALSE
if(CEILING(pixels_to_use, 1) >= FLOOR(horizontal_pixels - current_pixel - VOLUMETRIC_STORAGE_EDGE_PADDING, 1)) if(CEILING(pixels_to_use, 1) >= FLOOR(horizontal_pixels - current_pixel - VOLUMETRIC_STORAGE_EDGE_PADDING, 1))
@@ -255,22 +255,22 @@
* Gets our ui_boxes, making it if it doesn't exist. * Gets our ui_boxes, making it if it doesn't exist.
*/ */
/datum/component/storage/proc/get_ui_boxes() /datum/component/storage/proc/get_ui_boxes()
return new /obj/screen/storage/boxes(null, src) return new /atom/movable/screen/storage/boxes(null, src)
/** /**
* Gets our ui_left, making it if it doesn't exist. * Gets our ui_left, making it if it doesn't exist.
*/ */
/datum/component/storage/proc/get_ui_left() /datum/component/storage/proc/get_ui_left()
return new /obj/screen/storage/left(null, src) return new /atom/movable/screen/storage/left(null, src)
/** /**
* Gets our ui_close, making it if it doesn't exist. * Gets our ui_close, making it if it doesn't exist.
*/ */
/datum/component/storage/proc/get_ui_close() /datum/component/storage/proc/get_ui_close()
return new /obj/screen/storage/close(null, src) return new /atom/movable/screen/storage/close(null, src)
/** /**
* Gets our ui_continuous, making it if it doesn't exist. * Gets our ui_continuous, making it if it doesn't exist.
*/ */
/datum/component/storage/proc/get_ui_continuous() /datum/component/storage/proc/get_ui_continuous()
return new /obj/screen/storage/continuous(null, src) return new /atom/movable/screen/storage/continuous(null, src)
+3 -3
View File
@@ -370,7 +370,7 @@
user.emote("scream") user.emote("scream")
user.gain_trauma(/datum/brain_trauma/severe/paralysis/spinesnapped) // oopsie indeed! user.gain_trauma(/datum/brain_trauma/severe/paralysis/spinesnapped) // oopsie indeed!
shake_camera(user, 7, 7) shake_camera(user, 7, 7)
user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
user.clear_fullscreen("flash", 4.5) user.clear_fullscreen("flash", 4.5)
if(94 to 98) if(94 to 98)
@@ -381,7 +381,7 @@
user.gain_trauma_type(BRAIN_TRAUMA_MILD) user.gain_trauma_type(BRAIN_TRAUMA_MILD)
user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
shake_camera(user, 6, 6) shake_camera(user, 6, 6)
user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
user.clear_fullscreen("flash", 3.5) user.clear_fullscreen("flash", 3.5)
if(84 to 93) if(84 to 93)
@@ -394,7 +394,7 @@
user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
user.DefaultCombatKnockdown(40) user.DefaultCombatKnockdown(40)
shake_camera(user, 5, 5) shake_camera(user, 5, 5)
user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
user.clear_fullscreen("flash", 2.5) user.clear_fullscreen("flash", 2.5)
if(64 to 83) if(64 to 83)
+4 -1
View File
@@ -10,11 +10,14 @@
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var
// Helper similar to image() // Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, color = "#FFFFFF") /proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color = "#FFFFFF")
var/mutable_appearance/MA = new() var/mutable_appearance/MA = new()
MA.icon = icon MA.icon = icon
MA.icon_state = icon_state MA.icon_state = icon_state
MA.layer = layer MA.layer = layer
MA.plane = plane MA.plane = plane
MA.alpha = alpha
MA.appearance_flags |= appearance_flags
MA.color = color MA.color = color
return MA return MA
+1 -1
View File
@@ -6,5 +6,5 @@
/datum/numbered_display/New(obj/item/sample, _number = 1, datum/component/storage/parent) /datum/numbered_display/New(obj/item/sample, _number = 1, datum/component/storage/parent)
if(!istype(sample)) if(!istype(sample))
qdel(src) qdel(src)
sample_object = new /obj/screen/storage/item_holder(null, parent, sample) sample_object = new /atom/movable/screen/storage/item_holder(null, parent, sample)
number = _number number = _number
+30 -30
View File
@@ -3,9 +3,9 @@
/datum/status_effect/shadow_mend /datum/status_effect/shadow_mend
id = "shadow_mend" id = "shadow_mend"
duration = 30 duration = 30
alert_type = /obj/screen/alert/status_effect/shadow_mend alert_type = /atom/movable/screen/alert/status_effect/shadow_mend
/obj/screen/alert/status_effect/shadow_mend /atom/movable/screen/alert/status_effect/shadow_mend
name = "Shadow Mend" name = "Shadow Mend"
desc = "Shadowy energies wrap around your wounds, sealing them at a price. After healing, you will slowly lose health every three seconds for thirty seconds." desc = "Shadowy energies wrap around your wounds, sealing them at a price. After healing, you will slowly lose health every three seconds for thirty seconds."
icon_state = "shadow_mend" icon_state = "shadow_mend"
@@ -29,9 +29,9 @@
id = "void_price" id = "void_price"
duration = 300 duration = 300
tick_interval = 30 tick_interval = 30
alert_type = /obj/screen/alert/status_effect/void_price alert_type = /atom/movable/screen/alert/status_effect/void_price
/obj/screen/alert/status_effect/void_price /atom/movable/screen/alert/status_effect/void_price
name = "Void Price" name = "Void Price"
desc = "Black tendrils cinch tightly against you, digging wicked barbs into your flesh." desc = "Black tendrils cinch tightly against you, digging wicked barbs into your flesh."
icon_state = "shadow_mend" icon_state = "shadow_mend"
@@ -46,17 +46,17 @@
duration = 200 duration = 200
tick_interval = 0 //tick as fast as possible tick_interval = 0 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/vanguard alert_type = /atom/movable/screen/alert/status_effect/vanguard
var/datum/progressbar/progbar var/datum/progressbar/progbar
var/stamhealed = 0 //How much stamina did we regenerate? var/stamhealed = 0 //How much stamina did we regenerate?
/obj/screen/alert/status_effect/vanguard /atom/movable/screen/alert/status_effect/vanguard
name = "Vanguard" name = "Vanguard"
desc = "You're absorbing stuns aswell as quickly regenerating stamina, but be careful: 50% of stamina restored and 25% of stuns absorbed will affect you after this effect ends." desc = "You're absorbing stuns aswell as quickly regenerating stamina, but be careful: 50% of stamina restored and 25% of stuns absorbed will affect you after this effect ends."
icon_state = "vanguard" icon_state = "vanguard"
alerttooltipstyle = "clockcult" alerttooltipstyle = "clockcult"
/obj/screen/alert/status_effect/vanguard/MouseEntered(location,control,params) /atom/movable/screen/alert/status_effect/vanguard/MouseEntered(location,control,params)
var/mob/living/L = usr var/mob/living/L = usr
var/datum/status_effect/vanguard_shield/E = attached_effect var/datum/status_effect/vanguard_shield/E = attached_effect
if(istype(L)) //this is probably more safety than actually needed if(istype(L)) //this is probably more safety than actually needed
@@ -118,9 +118,9 @@
/datum/status_effect/inathneqs_endowment /datum/status_effect/inathneqs_endowment
id = "inathneqs_endowment" id = "inathneqs_endowment"
duration = 150 duration = 150
alert_type = /obj/screen/alert/status_effect/inathneqs_endowment alert_type = /atom/movable/screen/alert/status_effect/inathneqs_endowment
/obj/screen/alert/status_effect/inathneqs_endowment /atom/movable/screen/alert/status_effect/inathneqs_endowment
name = "Inath-neq's Endowment" name = "Inath-neq's Endowment"
desc = "Adrenaline courses through you as the Resonant Cogwheel's energy shields you from all harm!" desc = "Adrenaline courses through you as the Resonant Cogwheel's energy shields you from all harm!"
icon_state = "inathneqs_endowment" icon_state = "inathneqs_endowment"
@@ -149,7 +149,7 @@
/datum/status_effect/cyborg_power_regen /datum/status_effect/cyborg_power_regen
id = "power_regen" id = "power_regen"
duration = 100 duration = 100
alert_type = /obj/screen/alert/status_effect/power_regen alert_type = /atom/movable/screen/alert/status_effect/power_regen
var/power_to_give = 0 //how much power is gained each tick var/power_to_give = 0 //how much power is gained each tick
/datum/status_effect/cyborg_power_regen/on_creation(mob/living/new_owner, new_power_per_tick) /datum/status_effect/cyborg_power_regen/on_creation(mob/living/new_owner, new_power_per_tick)
@@ -157,7 +157,7 @@
if(. && isnum(new_power_per_tick)) if(. && isnum(new_power_per_tick))
power_to_give = new_power_per_tick power_to_give = new_power_per_tick
/obj/screen/alert/status_effect/power_regen /atom/movable/screen/alert/status_effect/power_regen
name = "Power Regeneration" name = "Power Regeneration"
desc = "You are quickly regenerating power!" desc = "You are quickly regenerating power!"
icon_state = "power_regen" icon_state = "power_regen"
@@ -174,16 +174,16 @@
id = "his_grace" id = "his_grace"
duration = -1 duration = -1
tick_interval = 4 tick_interval = 4
alert_type = /obj/screen/alert/status_effect/his_grace alert_type = /atom/movable/screen/alert/status_effect/his_grace
var/bloodlust = 0 var/bloodlust = 0
/obj/screen/alert/status_effect/his_grace /atom/movable/screen/alert/status_effect/his_grace
name = "His Grace" name = "His Grace"
desc = "His Grace hungers, and you must feed Him." desc = "His Grace hungers, and you must feed Him."
icon_state = "his_grace" icon_state = "his_grace"
alerttooltipstyle = "hisgrace" alerttooltipstyle = "hisgrace"
/obj/screen/alert/status_effect/his_grace/MouseEntered(location,control,params) /atom/movable/screen/alert/status_effect/his_grace/MouseEntered(location,control,params)
desc = initial(desc) desc = initial(desc)
var/datum/status_effect/his_grace/HG = attached_effect var/datum/status_effect/his_grace/HG = attached_effect
desc += "<br><font size=3><b>Current Bloodthirst: [HG.bloodlust]</b></font>\ desc += "<br><font size=3><b>Current Bloodthirst: [HG.bloodlust]</b></font>\
@@ -225,7 +225,7 @@
/datum/status_effect/wish_granters_gift //Fully revives after ten seconds. /datum/status_effect/wish_granters_gift //Fully revives after ten seconds.
id = "wish_granters_gift" id = "wish_granters_gift"
duration = 50 duration = 50
alert_type = /obj/screen/alert/status_effect/wish_granters_gift alert_type = /atom/movable/screen/alert/status_effect/wish_granters_gift
/datum/status_effect/wish_granters_gift/on_apply() /datum/status_effect/wish_granters_gift/on_apply()
to_chat(owner, "<span class='notice'>Death is not your end! The Wish Granter's energy suffuses you, and you begin to rise...</span>") to_chat(owner, "<span class='notice'>Death is not your end! The Wish Granter's energy suffuses you, and you begin to rise...</span>")
@@ -236,7 +236,7 @@
owner.revive(full_heal = TRUE, admin_revive = TRUE) owner.revive(full_heal = TRUE, admin_revive = TRUE)
owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>") owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>")
/obj/screen/alert/status_effect/wish_granters_gift /atom/movable/screen/alert/status_effect/wish_granters_gift
name = "Wish Granter's Immortality" name = "Wish Granter's Immortality"
desc = "You are being resurrected!" desc = "You are being resurrected!"
icon_state = "wish_granter" icon_state = "wish_granter"
@@ -274,7 +274,7 @@
id = "blooddrunk" id = "blooddrunk"
duration = 10 duration = 10
tick_interval = 0 tick_interval = 0
alert_type = /obj/screen/alert/status_effect/blooddrunk alert_type = /atom/movable/screen/alert/status_effect/blooddrunk
var/last_health = 0 var/last_health = 0
var/last_bruteloss = 0 var/last_bruteloss = 0
var/last_fireloss = 0 var/last_fireloss = 0
@@ -283,7 +283,7 @@
var/last_cloneloss = 0 var/last_cloneloss = 0
var/last_staminaloss = 0 var/last_staminaloss = 0
/obj/screen/alert/status_effect/blooddrunk /atom/movable/screen/alert/status_effect/blooddrunk
name = "Blood-Drunk" name = "Blood-Drunk"
desc = "You are drunk on blood! Your pulse thunders in your ears! Nothing can harm you!" //not true, and the item description mentions its actual effect desc = "You are drunk on blood! Your pulse thunders in your ears! Nothing can harm you!" //not true, and the item description mentions its actual effect
icon_state = "blooddrunk" icon_state = "blooddrunk"
@@ -430,7 +430,7 @@
/datum/status_effect/fleshmend /datum/status_effect/fleshmend
id = "fleshmend" id = "fleshmend"
duration = 100 duration = 100
alert_type = /obj/screen/alert/status_effect/fleshmend alert_type = /atom/movable/screen/alert/status_effect/fleshmend
/datum/status_effect/fleshmend/tick() /datum/status_effect/fleshmend/tick()
if(owner.on_fire) if(owner.on_fire)
@@ -453,7 +453,7 @@
QDEL_LIST(C.all_scars) QDEL_LIST(C.all_scars)
/obj/screen/alert/status_effect/fleshmend /atom/movable/screen/alert/status_effect/fleshmend
name = "Fleshmend" name = "Fleshmend"
desc = "Our wounds are rapidly healing. <i>This effect is prevented if we are on fire.</i>" desc = "Our wounds are rapidly healing. <i>This effect is prevented if we are on fire.</i>"
icon_state = "fleshmend" icon_state = "fleshmend"
@@ -562,7 +562,7 @@
var/mob/living/simple_animal/SM = L var/mob/living/simple_animal/SM = L
SM.adjustHealth(-3.5, forced = TRUE) SM.adjustHealth(-3.5, forced = TRUE)
/obj/screen/alert/status_effect/regenerative_core /atom/movable/screen/alert/status_effect/regenerative_core
name = "Reinforcing Tendrils" name = "Reinforcing Tendrils"
desc = "You can move faster than your broken body could normally handle!" desc = "You can move faster than your broken body could normally handle!"
icon_state = "regenerative_core" icon_state = "regenerative_core"
@@ -572,7 +572,7 @@
id = "Regenerative Core" id = "Regenerative Core"
duration = 1 MINUTES duration = 1 MINUTES
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/regenerative_core alert_type = /atom/movable/screen/alert/status_effect/regenerative_core
var/heal_amount = 25 var/heal_amount = 25
/datum/status_effect/regenerative_core/on_apply() /datum/status_effect/regenerative_core/on_apply()
@@ -597,9 +597,9 @@
id = "Anatomic Panacea" id = "Anatomic Panacea"
duration = 100 duration = 100
tick_interval = 10 tick_interval = 10
alert_type = /obj/screen/alert/status_effect/panacea alert_type = /atom/movable/screen/alert/status_effect/panacea
/obj/screen/alert/status_effect/panacea /atom/movable/screen/alert/status_effect/panacea
name = "Panacea" name = "Panacea"
desc = "We purge the impurities from our body." desc = "We purge the impurities from our body."
icon_state = "panacea" icon_state = "panacea"
@@ -774,7 +774,7 @@
status_type = STATUS_EFFECT_REFRESH status_type = STATUS_EFFECT_REFRESH
duration = 15 SECONDS duration = 15 SECONDS
examine_text = "<span class='notice'>They don't seem to be all here.</span>" examine_text = "<span class='notice'>They don't seem to be all here.</span>"
alert_type = /obj/screen/alert/status_effect/crucible_soul alert_type = /atom/movable/screen/alert/status_effect/crucible_soul
var/turf/location var/turf/location
/datum/status_effect/crucible_soul/on_apply() /datum/status_effect/crucible_soul/on_apply()
@@ -796,7 +796,7 @@
id = "Blessing of Dusk and Dawn" id = "Blessing of Dusk and Dawn"
status_type = STATUS_EFFECT_REFRESH status_type = STATUS_EFFECT_REFRESH
duration = 60 SECONDS duration = 60 SECONDS
alert_type =/obj/screen/alert/status_effect/duskndawn alert_type =/atom/movable/screen/alert/status_effect/duskndawn
/datum/status_effect/duskndawn/on_apply() /datum/status_effect/duskndawn/on_apply()
. = ..() . = ..()
@@ -813,7 +813,7 @@
status_type = STATUS_EFFECT_REFRESH status_type = STATUS_EFFECT_REFRESH
duration = 60 SECONDS duration = 60 SECONDS
tick_interval = 1 SECONDS tick_interval = 1 SECONDS
alert_type = /obj/screen/alert/status_effect/marshal alert_type = /atom/movable/screen/alert/status_effect/marshal
/datum/status_effect/marshal/on_apply() /datum/status_effect/marshal/on_apply()
. = ..() . = ..()
@@ -849,17 +849,17 @@
carbie.blood_volume += carbie.blood_volume >= BLOOD_VOLUME_NORMAL ? 0 : heal_amt*3 carbie.blood_volume += carbie.blood_volume >= BLOOD_VOLUME_NORMAL ? 0 : heal_amt*3
/obj/screen/alert/status_effect/crucible_soul /atom/movable/screen/alert/status_effect/crucible_soul
name = "Blessing of Crucible Soul" name = "Blessing of Crucible Soul"
desc = "You phased through the reality, you are halfway to your final destination..." desc = "You phased through the reality, you are halfway to your final destination..."
icon_state = "crucible" icon_state = "crucible"
/obj/screen/alert/status_effect/duskndawn /atom/movable/screen/alert/status_effect/duskndawn
name = "Blessing of Dusk and Dawn" name = "Blessing of Dusk and Dawn"
desc = "Many things hide beyond the horizon, with Owl's help i managed to slip past sun's guard and moon's watch." desc = "Many things hide beyond the horizon, with Owl's help i managed to slip past sun's guard and moon's watch."
icon_state = "duskndawn" icon_state = "duskndawn"
/obj/screen/alert/status_effect/marshal /atom/movable/screen/alert/status_effect/marshal
name = "Blessing of Wounded Soldier" name = "Blessing of Wounded Soldier"
desc = "Some people seek power through redemption, one thing many people don't know is that battle is the ultimate redemption and wounds let you bask in eternal glory." desc = "Some people seek power through redemption, one thing many people don't know is that battle is the ultimate redemption and wounds let you bask in eternal glory."
icon_state = "wounded_soldier" icon_state = "wounded_soldier"
+20 -20
View File
@@ -58,7 +58,7 @@
//SLEEPING //SLEEPING
/datum/status_effect/incapacitating/sleeping /datum/status_effect/incapacitating/sleeping
id = "sleeping" id = "sleeping"
alert_type = /obj/screen/alert/status_effect/asleep alert_type = /atom/movable/screen/alert/status_effect/asleep
needs_update_stat = TRUE needs_update_stat = TRUE
var/mob/living/carbon/carbon_owner var/mob/living/carbon/carbon_owner
var/mob/living/carbon/human/human_owner var/mob/living/carbon/human/human_owner
@@ -122,7 +122,7 @@
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance) owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance)
return ..() return ..()
/obj/screen/alert/status_effect/asleep /atom/movable/screen/alert/status_effect/asleep
name = "Asleep" name = "Asleep"
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are." desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
icon_state = "asleep" icon_state = "asleep"
@@ -139,7 +139,7 @@
/datum/status_effect/mesmerize /datum/status_effect/mesmerize
id = "Mesmerize" id = "Mesmerize"
alert_type = /obj/screen/alert/status_effect/mesmerized alert_type = /atom/movable/screen/alert/status_effect/mesmerized
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration) /datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
. = ..() . = ..()
@@ -156,7 +156,7 @@
duration = set_duration duration = set_duration
. = ..() . = ..()
/obj/screen/alert/status_effect/mesmerized /atom/movable/screen/alert/status_effect/mesmerized
name = "Mesmerized" name = "Mesmerized"
desc = "You can't tear your sight from who is in front of you... their gaze is simply too enthralling.." desc = "You can't tear your sight from who is in front of you... their gaze is simply too enthralling.."
icon = 'icons/mob/actions/bloodsucker.dmi' icon = 'icons/mob/actions/bloodsucker.dmi'
@@ -222,9 +222,9 @@
id = "his_wrath" id = "his_wrath"
duration = -1 duration = -1
tick_interval = 4 tick_interval = 4
alert_type = /obj/screen/alert/status_effect/his_wrath alert_type = /atom/movable/screen/alert/status_effect/his_wrath
/obj/screen/alert/status_effect/his_wrath /atom/movable/screen/alert/status_effect/his_wrath
name = "His Wrath" name = "His Wrath"
desc = "You fled from His Grace instead of feeding Him, and now you suffer." desc = "You fled from His Grace instead of feeding Him, and now you suffer."
icon_state = "his_grace" icon_state = "his_grace"
@@ -243,11 +243,11 @@
duration = 70 duration = 70
tick_interval = 0 //tick as fast as possible tick_interval = 0 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/belligerent alert_type = /atom/movable/screen/alert/status_effect/belligerent
var/leg_damage_on_toggle = 2 //damage on initial application and when the owner tries to toggle to run var/leg_damage_on_toggle = 2 //damage on initial application and when the owner tries to toggle to run
var/cultist_damage_on_toggle = 10 //damage on initial application and when the owner tries to toggle to run, but to cultists var/cultist_damage_on_toggle = 10 //damage on initial application and when the owner tries to toggle to run, but to cultists
/obj/screen/alert/status_effect/belligerent /atom/movable/screen/alert/status_effect/belligerent
name = "Belligerent" name = "Belligerent"
desc = "<b><font color=#880020>Kneel, her-eti'c.</font></b>" desc = "<b><font color=#880020>Kneel, her-eti'c.</font></b>"
icon_state = "belligerent" icon_state = "belligerent"
@@ -768,7 +768,7 @@
/datum/status_effect/necropolis_curse/proc/apply_curse(set_curse) /datum/status_effect/necropolis_curse/proc/apply_curse(set_curse)
curse_flags |= set_curse curse_flags |= set_curse
if(curse_flags & CURSE_BLINDING) if(curse_flags & CURSE_BLINDING)
owner.overlay_fullscreen("curse", /obj/screen/fullscreen/curse, 1) owner.overlay_fullscreen("curse", /atom/movable/screen/fullscreen/curse, 1)
/datum/status_effect/necropolis_curse/proc/remove_curse(remove_curse) /datum/status_effect/necropolis_curse/proc/remove_curse(remove_curse)
if(remove_curse & CURSE_BLINDING) if(remove_curse & CURSE_BLINDING)
@@ -827,7 +827,7 @@
status_type = STATUS_EFFECT_UNIQUE status_type = STATUS_EFFECT_UNIQUE
tick_interval = 5 tick_interval = 5
duration = 100 duration = 100
alert_type = /obj/screen/alert/status_effect/kindle alert_type = /atom/movable/screen/alert/status_effect/kindle
var/old_health var/old_health
var/old_oxyloss var/old_oxyloss
@@ -856,7 +856,7 @@
owner.visible_message("<span class='warning'>The light in [owner]'s eyes fades!</span>", \ owner.visible_message("<span class='warning'>The light in [owner]'s eyes fades!</span>", \
"<span class='boldannounce'>You snap out of your daze!</span>") "<span class='boldannounce'>You snap out of your daze!</span>")
/obj/screen/alert/status_effect/kindle /atom/movable/screen/alert/status_effect/kindle
name = "Dazzling Lights" name = "Dazzling Lights"
desc = "Blinding light dances in your vision, stunning and silencing you. <i>Any damage taken will shorten the light's effects!</i>" desc = "Blinding light dances in your vision, stunning and silencing you. <i>Any damage taken will shorten the light's effects!</i>"
icon_state = "kindle" icon_state = "kindle"
@@ -869,7 +869,7 @@
status_type = STATUS_EFFECT_UNIQUE status_type = STATUS_EFFECT_UNIQUE
duration = 600 duration = 600
examine_text = "<span class='warning'>SUBJECTPRONOUN is drenched in thick, blue ichor!</span>" examine_text = "<span class='warning'>SUBJECTPRONOUN is drenched in thick, blue ichor!</span>"
alert_type = /obj/screen/alert/status_effect/ichorial_stain alert_type = /atom/movable/screen/alert/status_effect/ichorial_stain
/datum/status_effect/ichorial_stain/on_apply() /datum/status_effect/ichorial_stain/on_apply()
. = ..() . = ..()
@@ -882,7 +882,7 @@
owner.visible_message("<span class='danger'>The blue ichor on [owner]'s body dries out!</span>", \ owner.visible_message("<span class='danger'>The blue ichor on [owner]'s body dries out!</span>", \
"<span class='boldnotice'>The ichor on your body is dry - you can now be revived by vitality matrices again!</span>") "<span class='boldnotice'>The ichor on your body is dry - you can now be revived by vitality matrices again!</span>")
/obj/screen/alert/status_effect/ichorial_stain /atom/movable/screen/alert/status_effect/ichorial_stain
name = "Ichorial Stain" name = "Ichorial Stain"
desc = "Your body is covered in blue ichor! You can't be revived by vitality matrices." desc = "Your body is covered in blue ichor! You can't be revived by vitality matrices."
icon_state = "ichorial_stain" icon_state = "ichorial_stain"
@@ -908,7 +908,7 @@
/datum/status_effect/strandling //get it, strand as in durathread strand + strangling = strandling hahahahahahahahahahhahahaha i want to die /datum/status_effect/strandling //get it, strand as in durathread strand + strangling = strandling hahahahahahahahahahhahahaha i want to die
id = "strandling" id = "strandling"
status_type = STATUS_EFFECT_UNIQUE status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/strandling alert_type = /atom/movable/screen/alert/status_effect/strandling
/datum/status_effect/strandling/on_apply() /datum/status_effect/strandling/on_apply()
ADD_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron") ADD_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron")
@@ -918,13 +918,13 @@
REMOVE_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron") REMOVE_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron")
return ..() return ..()
/obj/screen/alert/status_effect/strandling /atom/movable/screen/alert/status_effect/strandling
name = "Choking strand" name = "Choking strand"
desc = "A magical strand of Durathread is wrapped around your neck, preventing you from breathing! Click this icon to remove the strand." desc = "A magical strand of Durathread is wrapped around your neck, preventing you from breathing! Click this icon to remove the strand."
icon_state = "his_grace" icon_state = "his_grace"
alerttooltipstyle = "hisgrace" alerttooltipstyle = "hisgrace"
/obj/screen/alert/status_effect/strandling/Click(location, control, params) /atom/movable/screen/alert/status_effect/strandling/Click(location, control, params)
. = ..() . = ..()
to_chat(mob_viewer, "<span class='notice'>You attempt to remove the durathread strand from around your neck.</span>") to_chat(mob_viewer, "<span class='notice'>You attempt to remove the durathread strand from around your neck.</span>")
if(do_after(mob_viewer, 35, null, mob_viewer)) if(do_after(mob_viewer, 35, null, mob_viewer))
@@ -961,9 +961,9 @@
tick_interval = 10 tick_interval = 10
examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>" examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>"
var/stun = TRUE var/stun = TRUE
alert_type = /obj/screen/alert/status_effect/trance alert_type = /atom/movable/screen/alert/status_effect/trance
/obj/screen/alert/status_effect/trance /atom/movable/screen/alert/status_effect/trance
name = "Trance" name = "Trance"
desc = "Everything feels so distant, and you can feel your thoughts forming loops inside your head..." desc = "Everything feels so distant, and you can feel your thoughts forming loops inside your head..."
icon_state = "high" icon_state = "high"
@@ -1069,7 +1069,7 @@
id = "dna_melt" id = "dna_melt"
duration = 600 duration = 600
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/dna_melt alert_type = /atom/movable/screen/alert/status_effect/dna_melt
var/kill_either_way = FALSE //no amount of removing mutations is gonna save you now var/kill_either_way = FALSE //no amount of removing mutations is gonna save you now
/datum/status_effect/dna_melt/on_creation(mob/living/new_owner, set_duration, updating_canmove) /datum/status_effect/dna_melt/on_creation(mob/living/new_owner, set_duration, updating_canmove)
@@ -1084,7 +1084,7 @@
H.something_horrible(kill_either_way) H.something_horrible(kill_either_way)
return ..() return ..()
/obj/screen/alert/status_effect/dna_melt /atom/movable/screen/alert/status_effect/dna_melt
name = "Genetic Breakdown" name = "Genetic Breakdown"
desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate." desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate."
icon_state = "dna_melt" icon_state = "dna_melt"
+2 -2
View File
@@ -2,11 +2,11 @@
id = "frozen" id = "frozen"
duration = 100 duration = 100
status_type = STATUS_EFFECT_UNIQUE status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/freon alert_type = /atom/movable/screen/alert/status_effect/freon
var/icon/cube var/icon/cube
var/can_melt = TRUE var/can_melt = TRUE
/obj/screen/alert/status_effect/freon /atom/movable/screen/alert/status_effect/freon
name = "Frozen Solid" name = "Frozen Solid"
desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!" desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!"
icon_state = "frozen" icon_state = "frozen"
+2 -2
View File
@@ -48,7 +48,7 @@
get_kill() get_kill()
return ..() return ..()
/obj/screen/alert/status_effect/in_love /atom/movable/screen/alert/status_effect/in_love
name = "In Love" name = "In Love"
desc = "You feel so wonderfully in love!" desc = "You feel so wonderfully in love!"
icon_state = "in_love" icon_state = "in_love"
@@ -57,7 +57,7 @@
id = "in_love" id = "in_love"
duration = -1 duration = -1
status_type = STATUS_EFFECT_UNIQUE status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/in_love alert_type = /atom/movable/screen/alert/status_effect/in_love
var/mob/living/date var/mob/living/date
/datum/status_effect/in_love/on_creation(mob/living/new_owner, mob/living/love_interest) /datum/status_effect/in_love/on_creation(mob/living/new_owner, mob/living/love_interest)
+4 -4
View File
@@ -12,10 +12,10 @@
var/mob/living/owner //The mob affected by the status effect. var/mob/living/owner //The mob affected by the status effect.
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description var/alert_type = /atom/movable/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
/// If this is TRUE, the user will have sprint forcefully disabled while this is active. /// If this is TRUE, the user will have sprint forcefully disabled while this is active.
var/blocks_sprint = FALSE var/blocks_sprint = FALSE
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists var/atom/movable/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
/// How many of the effect can be on one mob, and what happens when you try to add another /// How many of the effect can be on one mob, and what happens when you try to add another
var/status_type = STATUS_EFFECT_UNIQUE var/status_type = STATUS_EFFECT_UNIQUE
@@ -34,7 +34,7 @@
duration = world.time + duration duration = world.time + duration
next_tick = world.time + tick_interval next_tick = world.time + tick_interval
if(alert_type) if(alert_type)
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type) var/atom/movable/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to A.attached_effect = src //so the alert can reference us, if it needs to
linked_alert = A //so we can reference the alert, if we need to linked_alert = A //so we can reference the alert, if we need to
START_PROCESSING(SSstatus_effects, src) START_PROCESSING(SSstatus_effects, src)
@@ -100,7 +100,7 @@
// ALERT HOOK // // ALERT HOOK //
//////////////// ////////////////
/obj/screen/alert/status_effect /atom/movable/screen/alert/status_effect
name = "Curse of Mundanity" name = "Curse of Mundanity"
desc = "You don't feel any different..." desc = "You don't feel any different..."
var/datum/status_effect/attached_effect var/datum/status_effect/attached_effect
+6 -6
View File
@@ -1,13 +1,13 @@
// The shattered remnants of your broken limbs fill you with determination! // The shattered remnants of your broken limbs fill you with determination!
/obj/screen/alert/status_effect/determined /atom/movable/screen/alert/status_effect/determined
name = "Determined" name = "Determined"
desc = "The serious wounds you've sustained have put your body into fight-or-flight mode! Now's the time to look for an exit!" desc = "The serious wounds you've sustained have put your body into fight-or-flight mode! Now's the time to look for an exit!"
icon_state = "regenerative_core" icon_state = "regenerative_core"
/datum/status_effect/determined /datum/status_effect/determined
id = "determined" id = "determined"
alert_type = /obj/screen/alert/status_effect/determined alert_type = /atom/movable/screen/alert/status_effect/determined
/datum/status_effect/determined/on_apply() /datum/status_effect/determined/on_apply()
. = ..() . = ..()
@@ -21,7 +21,7 @@
id = "limp" id = "limp"
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
tick_interval = 10 tick_interval = 10
alert_type = /obj/screen/alert/status_effect/limp alert_type = /atom/movable/screen/alert/status_effect/limp
var/msg_stage = 0//so you dont get the most intense messages immediately var/msg_stage = 0//so you dont get the most intense messages immediately
/// The left leg of the limping person /// The left leg of the limping person
var/obj/item/bodypart/l_leg/left var/obj/item/bodypart/l_leg/left
@@ -49,7 +49,7 @@
UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB)) UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB))
return ..() return ..()
/obj/screen/alert/status_effect/limp /atom/movable/screen/alert/status_effect/limp
name = "Limping" name = "Limping"
desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least splinted!" desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least splinted!"
@@ -99,11 +99,11 @@
///////////////////////// /////////////////////////
// wound alert // wound alert
/obj/screen/alert/status_effect/wound /atom/movable/screen/alert/status_effect/wound
name = "Wounded" name = "Wounded"
desc = "Your body has sustained serious damage, click here to inspect yourself." desc = "Your body has sustained serious damage, click here to inspect yourself."
/obj/screen/alert/status_effect/wound/Click() /atom/movable/screen/alert/status_effect/wound/Click()
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
C.check_self_for_injuries() C.check_self_for_injuries()
+1 -1
View File
@@ -124,7 +124,7 @@
for(var/mob/dead/observer/O in GLOB.player_list) for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == expected_key) if(O.key == expected_key)
if(O.client?.address == addr) if(O.client?.address == addr)
new /obj/screen/splash(O.client, TRUE) new /atom/movable/screen/splash(O.client, TRUE)
break break
/datum/world_topic/adminmsg /datum/world_topic/adminmsg
+1 -1
View File
@@ -136,7 +136,7 @@
SEND_SIGNAL(victim, COMSIG_CARBON_GAIN_WOUND, src, limb) SEND_SIGNAL(victim, COMSIG_CARBON_GAIN_WOUND, src, limb)
victim.emote("pain") victim.emote("pain")
if(!victim.alerts["wound"]) // only one alert is shared between all of the wounds if(!victim.alerts["wound"]) // only one alert is shared between all of the wounds
victim.throw_alert("wound", /obj/screen/alert/status_effect/wound) victim.throw_alert("wound", /atom/movable/screen/alert/status_effect/wound)
var/demoted var/demoted
if(old_wound) if(old_wound)
+1 -1
View File
@@ -553,7 +553,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
A.power_equip = power_equip A.power_equip = power_equip
A.power_environ = power_environ A.power_environ = power_environ
INVOKE_ASYNC(A, .proc/power_change) INVOKE_ASYNC(A, .proc/power_change)
update_icon() update_appearance()
/area/proc/usage(chan) /area/proc/usage(chan)
switch(chan) switch(chan)
+52 -11
View File
@@ -103,6 +103,9 @@
/// A luminescence-shifted value of the last color calculated for chatmessage overlays /// A luminescence-shifted value of the last color calculated for chatmessage overlays
var/chat_color_darkened var/chat_color_darkened
///Used for changing icon states for different base sprites.
var/base_icon_state
///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy() ///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy()
var/list/targeted_by var/list/targeted_by
@@ -531,37 +534,75 @@
if(!LAZYLEN(.)) // lol ..length if(!LAZYLEN(.)) // lol ..length
return list("<span class='notice'><i>You examine [src] closer, but find nothing of interest...</i></span>") return list("<span class='notice'><i>You examine [src] closer, but find nothing of interest...</i></span>")
/**
* Updates the appearence of the icon
*
* Mostly delegates to update_name, update_desc, and update_icon
*
* Arguments:
* - updates: A set of bitflags dictating what should be updated. Defaults to [ALL]
*/
/atom/proc/update_appearance(updates=ALL)
//SHOULD_NOT_SLEEP(TRUE)
//SHOULD_CALL_PARENT(TRUE)
. = NONE
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_APPEARANCE, updates)
if(updates & UPDATE_NAME)
. |= update_name(updates)
if(updates & UPDATE_DESC)
. |= update_desc(updates)
if(updates & UPDATE_ICON)
. |= update_icon(updates)
/// Updates the name of the atom
/atom/proc/update_name(updates=ALL)
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_NAME, updates)
/// Updates the description of the atom
/atom/proc/update_desc(updates=ALL)
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_DESC, updates)
/// Updates the icon of the atom /// Updates the icon of the atom
/atom/proc/update_icon() /atom/proc/update_icon(updates=ALL)
// I expect we're going to need more return flags and options in this proc SIGNAL_HANDLER
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON) //SHOULD_CALL_PARENT(TRUE)
. = FALSE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE)) . = NONE
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON, updates)
if(updates & UPDATE_ICON_STATE)
update_icon_state() update_icon_state()
. = TRUE . |= UPDATE_ICON_STATE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS)) if(updates & UPDATE_OVERLAYS)
var/list/new_overlays = update_overlays() if(LAZYLEN(managed_vis_overlays))
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/list/new_overlays = update_overlays(updates)
if(managed_overlays) if(managed_overlays)
cut_overlay(managed_overlays) cut_overlay(managed_overlays)
managed_overlays = null managed_overlays = null
if(length(new_overlays)) if(length(new_overlays))
managed_overlays = new_overlays managed_overlays = new_overlays
add_overlay(new_overlays) add_overlay(new_overlays)
. = TRUE . |= UPDATE_OVERLAYS
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .) . |= SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, updates, .)
/// Updates the icon state of the atom /// Updates the icon state of the atom
/atom/proc/update_icon_state() /atom/proc/update_icon_state()
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE)
/// Updates the overlays of the atom /// Updates the overlays of the atom
/atom/proc/update_overlays() /atom/proc/update_overlays()
SHOULD_CALL_PARENT(TRUE) //SHOULD_CALL_PARENT(TRUE)
. = list() . = list()
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .) SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
/atom/proc/relaymove(mob/living/user) /atom/proc/relaymove(mob/living/user)
if(!istype(user)) if(!istype(user))
return //why are you buckling nonliving mobs to atoms? return //why are you buckling nonliving mobs to atoms?
+22 -8
View File
@@ -66,7 +66,11 @@
. = ..() . = ..()
switch(blocks_emissive) switch(blocks_emissive)
if(EMISSIVE_BLOCK_GENERIC) if(EMISSIVE_BLOCK_GENERIC)
update_emissive_block() var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = EMISSIVE_PLANE, alpha = src.alpha)
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
add_overlay(list(gen_emissive_blocker))
if(EMISSIVE_BLOCK_UNIQUE) if(EMISSIVE_BLOCK_UNIQUE)
render_target = ref(src) render_target = ref(src)
em_block = new(src, render_target) em_block = new(src, render_target)
@@ -111,13 +115,23 @@
/atom/movable/proc/update_emissive_block() /atom/movable/proc/update_emissive_block()
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC) if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
return return
if(length(managed_vis_overlays)) else if (blocks_emissive == EMISSIVE_BLOCK_GENERIC)
for(var/a in managed_vis_overlays) var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = EMISSIVE_PLANE, alpha = src.alpha)
var/obj/effect/overlay/vis/vs gen_emissive_blocker.color = GLOB.em_block_color
if(vs.plane == EMISSIVE_BLOCKER_PLANE) gen_emissive_blocker.dir = dir
SSvis_overlays.remove_vis_overlay(src, list(vs)) gen_emissive_blocker.appearance_flags |= appearance_flags
break return gen_emissive_blocker
SSvis_overlays.add_vis_overlay(src, icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE, dir) else if(blocks_emissive == EMISSIVE_BLOCK_UNIQUE)
if(!em_block)
render_target = ref(src)
em_block = new(src, render_target)
return em_block
/atom/movable/update_overlays()
. = ..()
var/emissive_block = update_emissive_block()
if(emissive_block)
. += emissive_block
/atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction) /atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction)
if(!direction) if(!direction)
+20 -2
View File
@@ -148,11 +148,15 @@ Class Procs:
START_PROCESSING(SSmachines, src) START_PROCESSING(SSmachines, src)
else else
START_PROCESSING(SSfastprocess, src) START_PROCESSING(SSfastprocess, src)
power_change()
RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change) RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change)
if (occupant_typecache) if (occupant_typecache)
occupant_typecache = typecacheof(occupant_typecache) occupant_typecache = typecacheof(occupant_typecache)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/LateInitialize()
. = ..()
power_change()
/obj/machinery/Destroy() /obj/machinery/Destroy()
GLOB.machines.Remove(src) GLOB.machines.Remove(src)
@@ -176,6 +180,17 @@ Class Procs:
/obj/machinery/proc/process_atmos()//If you dont use process why are you here /obj/machinery/proc/process_atmos()//If you dont use process why are you here
return PROCESS_KILL return PROCESS_KILL
///Called when we want to change the value of the stat variable. Holds bitflags.
/obj/machinery/proc/set_machine_stat(new_value)
if(new_value == stat)
return
. = stat
stat = new_value
on_machine_stat_update(stat)
/obj/machinery/proc/on_machine_stat_update(stat)
return
/obj/machinery/emp_act(severity) /obj/machinery/emp_act(severity)
. = ..() . = ..()
if(use_power && !stat && !(. & EMP_PROTECT_SELF)) if(use_power && !stat && !(. & EMP_PROTECT_SELF))
@@ -383,8 +398,11 @@ Class Procs:
M.icon_state = "box_1" M.icon_state = "box_1"
/obj/machinery/obj_break(damage_flag) /obj/machinery/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1)) . = ..()
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN stat |= BROKEN
SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag)
update_appearance()
return TRUE return TRUE
/obj/machinery/contents_explosion(severity, target) /obj/machinery/contents_explosion(severity, target)
+1 -1
View File
@@ -407,7 +407,7 @@
/obj/machinery/camera/get_remote_view_fullscreens(mob/user) /obj/machinery/camera/get_remote_view_fullscreens(mob/user)
if(view_range == short_range) //unfocused if(view_range == short_range) //unfocused
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/obj/machinery/camera/update_remote_sight(mob/living/user) /obj/machinery/camera/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
+2 -2
View File
@@ -57,8 +57,8 @@
var/overlay_state = icon_screen var/overlay_state = icon_screen
if(stat & BROKEN) if(stat & BROKEN)
overlay_state = "[icon_state]_broken" overlay_state = "[icon_state]_broken"
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir) . += mutable_appearance(icon, overlay_state)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha=128) . += emissive_appearance(icon, overlay_state)
/obj/machinery/computer/power_change() /obj/machinery/computer/power_change()
..() ..()
+4 -4
View File
@@ -16,10 +16,10 @@
// Stuff needed to render the map // Stuff needed to render the map
var/map_name var/map_name
var/obj/screen/map_view/cam_screen var/atom/movable/screen/map_view/cam_screen
/// All the plane masters that need to be applied. /// All the plane masters that need to be applied.
var/list/cam_plane_masters var/list/cam_plane_masters
var/obj/screen/background/cam_background var/atom/movable/screen/background/cam_background
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_SET_MACHINE //| INTERACT_MACHINE_REQUIRES_SIGHT interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_SET_MACHINE //| INTERACT_MACHINE_REQUIRES_SIGHT
@@ -40,8 +40,8 @@
cam_screen.del_on_map_removal = FALSE cam_screen.del_on_map_removal = FALSE
cam_screen.screen_loc = "[map_name]:1,1" cam_screen.screen_loc = "[map_name]:1,1"
cam_plane_masters = list() cam_plane_masters = list()
for(var/plane in subtypesof(/obj/screen/plane_master)) for(var/plane in subtypesof(/atom/movable/screen/plane_master))
var/obj/screen/instance = new plane() var/atom/movable/screen/instance = new plane()
instance.assigned_map = map_name instance.assigned_map = map_name
instance.del_on_map_removal = FALSE instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER" instance.screen_loc = "[map_name]:CENTER"
@@ -275,7 +275,7 @@
if(final) if(final)
playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0) playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
remote_eye.setLoc(get_turf(final)) remote_eye.setLoc(get_turf(final))
C.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static) C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console! C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console!
else else
playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0) playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
@@ -123,7 +123,7 @@
var/list/this_pad = list() var/list/this_pad = list()
this_pad["name"] = pad.display_name this_pad["name"] = pad.display_name
this_pad["id"] = i this_pad["id"] = i
if(pad.machine_stat & NOPOWER) if(pad.stat & NOPOWER)
this_pad["inactive"] = TRUE this_pad["inactive"] = TRUE
pad_list += list(this_pad) pad_list += list(this_pad)
else else
@@ -135,7 +135,7 @@
var/obj/machinery/mechpad/current_pad = mechpads[selected_id] var/obj/machinery/mechpad/current_pad = mechpads[selected_id]
data["pad_name"] = current_pad.display_name data["pad_name"] = current_pad.display_name
data["selected_pad"] = current_pad data["selected_pad"] = current_pad
if(QDELETED(current_pad) || (current_pad.machine_stat & NOPOWER)) if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
data["pad_active"] = FALSE data["pad_active"] = FALSE
return data return data
data["pad_active"] = TRUE data["pad_active"] = TRUE
+2 -6
View File
@@ -9,6 +9,7 @@
layer = OPEN_DOOR_LAYER layer = OPEN_DOOR_LAYER
power_channel = ENVIRON power_channel = ENVIRON
max_integrity = 350 max_integrity = 350
damage_deflection = 10
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70) armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
CanAtmosPass = ATMOS_PASS_DENSITY CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1 flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
@@ -38,7 +39,7 @@
var/locked = FALSE //whether the door is bolted or not. var/locked = FALSE //whether the door is bolted or not.
var/assemblytype //the type of door frame to drop during deconstruction var/assemblytype //the type of door frame to drop during deconstruction
var/datum/effect_system/spark_spread/spark_system var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block var/real_explosion_block //ignore this, just use explosion_block
var/red_alert_access = FALSE //if TRUE, this door will always open on red alert var/red_alert_access = FALSE //if TRUE, this door will always open on red alert
var/poddoor = FALSE var/poddoor = FALSE
@@ -223,11 +224,6 @@
return 1 return 1
return ..() return ..()
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
. = ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) /obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..() . = ..()
if(. && obj_integrity > 0) if(. && obj_integrity > 0)
+15 -5
View File
@@ -79,23 +79,33 @@
if(is_station_level(z)) if(is_station_level(z))
. += "fire_[GLOB.security_level]" . += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir) . += mutable_appearance(icon, "fire_[GLOB.security_level]")
. += emissive_appearance(icon, "fire_[GLOB.security_level]")
else else
. += "fire_[SEC_LEVEL_GREEN]" . += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir) . += mutable_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
. += emissive_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
var/area/A = src.loc var/area/A = src.loc
A = A.loc A = A.loc
if(!detecting || !A.fire) if(!detecting || !A.fire)
. += "fire_off" . += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", EMISSIVE_LAYER, EMISSIVE_PLANE, dir) . += mutable_appearance(icon, "fire_off")
. += emissive_appearance(icon, "fire_off")
else if(obj_flags & EMAGGED) else if(obj_flags & EMAGGED)
. += "fire_emagged" . += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", EMISSIVE_LAYER, EMISSIVE_PLANE, dir) . += mutable_appearance(icon, "fire_emagged")
. += emissive_appearance(icon, "fire_emagged")
else else
. += "fire_on" . += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", EMISSIVE_LAYER, EMISSIVE_PLANE, dir) . += mutable_appearance(icon, "fire_on")
. += emissive_appearance(icon, "fire_on")
if(!panel_open && detecting) //It just looks horrible with the panel open
. += "fire_detected"
. += mutable_appearance(icon, "fire_detected")
. += emissive_appearance(icon, "fire_detected") //Pain
/obj/machinery/firealarm/emp_act(severity) /obj/machinery/firealarm/emp_act(severity)
. = ..() . = ..()
+41 -23
View File
@@ -1,52 +1,70 @@
// the light switch /// The light switch. Can have multiple per area.
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
/obj/machinery/light_switch /obj/machinery/light_switch
name = "light switch" name = "light switch"
icon = 'icons/obj/power.dmi' icon = 'icons/obj/power.dmi'
icon_state = "light1" icon_state = "light1"
plane = ABOVE_WALL_PLANE base_icon_state = "light"
desc = "Make dark." desc = "Make dark."
var/on = TRUE
var/area/area = null var/area/area = null
var/otherarea = null var/otherarea = null
/obj/machinery/light_switch/directional/north
dir = SOUTH
pixel_y = 26
/obj/machinery/light_switch/directional/south
dir = NORTH
pixel_y = -26
/obj/machinery/light_switch/directional/east
dir = WEST
pixel_x = 26
/obj/machinery/light_switch/directional/west
dir = EAST
pixel_x = -26
/obj/machinery/light_switch/Initialize() /obj/machinery/light_switch/Initialize()
. = ..() . = ..()
area = get_area(src) if(istext(area))
area = text2path(area)
if(ispath(area))
area = GLOB.areas_by_type[area]
if(otherarea) if(otherarea)
area = locate(text2path("/area/[otherarea]")) area = locate(text2path("/area/[otherarea]"))
if(!area)
area = get_area(src)
if(!name) if(!name)
name = "light switch ([area.name])" name = "light switch ([area.name])"
on = area.lightswitch /obj/machinery/light_switch/update_appearance(updates=ALL)
update_icon() . = ..()
luminosity = (stat & NOPOWER) ? 0 : 1
/obj/machinery/light_switch/update_icon_state() /obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "light-p" icon_state = "[base_icon_state]-p"
else return ..()
if(on) icon_state = "[base_icon_state][area.lightswitch ? 1 : 0]"
icon_state = "light1" return ..()
else
icon_state = "light0" /obj/machinery/light_switch/update_overlays()
. = ..()
if(!(stat & NOPOWER))
. += emissive_appearance(icon, "[base_icon_state]-glow", alpha = src.alpha)
/obj/machinery/light_switch/examine(mob/user) /obj/machinery/light_switch/examine(mob/user)
. = ..() . = ..()
. += "It is [on? "on" : "off"]." . += "It is [area.lightswitch ? "on" : "off"]."
/obj/machinery/light_switch/interact(mob/user) /obj/machinery/light_switch/interact(mob/user)
. = ..() . = ..()
on = !on
area.lightswitch = on area.lightswitch = !area.lightswitch
area.update_icon() area.update_appearance()
for(var/obj/machinery/light_switch/L in area) for(var/obj/machinery/light_switch/L in area)
L.on = on L.update_appearance()
L.update_icon()
area.power_change() area.power_change()
@@ -58,7 +76,7 @@
else else
stat |= NOPOWER stat |= NOPOWER
update_icon() update_appearance()
/obj/machinery/light_switch/emp_act(severity) /obj/machinery/light_switch/emp_act(severity)
. = ..() . = ..()
@@ -30,7 +30,7 @@
integrity_failure = 0.5 integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
/// Base turret icon state /// Base turret icon state
var/base_icon_state = "standard" base_icon_state = "standard"
/// Scan range of the turret for locating targets /// Scan range of the turret for locating targets
var/scan_range = 7 var/scan_range = 7
/// For turrets inside other objects /// For turrets inside other objects
+25 -11
View File
@@ -2,6 +2,7 @@
name = "recharger" name = "recharger"
icon = 'icons/obj/stationobjs.dmi' icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0" icon_state = "recharger0"
base_icon_state = "recharger"
desc = "A charging dock for energy based weaponry." desc = "A charging dock for energy based weaponry."
use_power = IDLE_POWER_USE use_power = IDLE_POWER_USE
idle_power_usage = 4 idle_power_usage = 4
@@ -187,16 +188,29 @@
if(B.cell) if(B.cell)
B.cell.charge = 0 B.cell.charge = 0
/obj/machinery/recharger/update_appearance(updates)
. = ..()
if((stat & (NOPOWER|BROKEN)) || panel_open || !anchored)
luminosity = 0
return
luminosity = 1
/obj/machinery/recharger/update_icon_state() /obj/machinery/recharger/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN) || !anchored) if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff" return
else if(panel_open) if(panel_open)
icon_state = "rechargeropen" . += mutable_appearance(icon, "[base_icon_state]-open", alpha = src.alpha)
else if(charging) return
if(using_power)
icon_state = "recharger1" if(!charging)
else . += mutable_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
icon_state = "recharger2" . += emissive_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
else return
icon_state = "recharger0" if(using_power)
. += mutable_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
return
. += mutable_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
@@ -12,7 +12,7 @@
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg" var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
var/ammo_type var/ammo_type
/obj/item/mecha_ammo/proc/update_name() /obj/item/mecha_ammo/update_name()
if(!rounds) if(!rounds)
name = "empty ammo box" name = "empty ammo box"
desc = "An exosuit ammuniton box that has since been emptied. Please recycle." desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
+7 -7
View File
@@ -357,22 +357,22 @@
if(0.75 to INFINITY) if(0.75 to INFINITY)
occupant.clear_alert("charge") occupant.clear_alert("charge")
if(0.5 to 0.75) if(0.5 to 0.75)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 1) occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5) if(0.25 to 0.5)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 2) occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25) if(0.01 to 0.25)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 3) occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 3)
else else
occupant.throw_alert("charge", /obj/screen/alert/emptycell) occupant.throw_alert("charge", /atom/movable/screen/alert/emptycell)
var/integrity = obj_integrity/max_integrity*100 var/integrity = obj_integrity/max_integrity*100
switch(integrity) switch(integrity)
if(30 to 45) if(30 to 45)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1) occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 1)
if(15 to 35) if(15 to 35)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 2) occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 2)
if(-INFINITY to 15) if(-INFINITY to 15)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 3) occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 3)
else else
occupant.clear_alert("mech damage") occupant.clear_alert("mech damage")
var/atom/checking = occupant.loc var/atom/checking = occupant.loc
+1 -1
View File
@@ -73,7 +73,7 @@
M.setDir(dir) M.setDir(dir)
buckled_mobs |= M buckled_mobs |= M
M.update_mobility() M.update_mobility()
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled) M.throw_alert("buckled", /atom/movable/screen/alert/restrained/buckled)
post_buckle_mob(M) post_buckle_mob(M)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force) SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force)
+3 -3
View File
@@ -99,8 +99,8 @@
. = ..() . = ..()
if(!. && ismob(loc) && loc == usr) if(!. && ismob(loc) && loc == usr)
var/mob/M = loc var/mob/M = loc
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand)) if(!M.incapacitated() && istype(over_object, /atom/movable/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index) M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params) /obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
@@ -283,7 +283,7 @@
var/combat = FALSE //If it penetrates armor and gives additional functionality var/combat = FALSE //If it penetrates armor and gives additional functionality
var/grab_ghost = FALSE var/grab_ghost = FALSE
var/tlimit = DEFIB_TIME_LIMIT * 10 var/tlimit = DEFIB_TIME_LIMIT * 10
var/base_icon_state = "defibpaddles" base_icon_state = "defibpaddles"
var/disarm_shock_time = 10 var/disarm_shock_time = 10
var/wielded = FALSE // track wielded status on item var/wielded = FALSE // track wielded status on item
+2 -2
View File
@@ -184,7 +184,7 @@
/obj/item/multitool/ai_detect/proc/show_hud(mob/user) /obj/item/multitool/ai_detect/proc/show_hud(mob/user)
if(user && hud_type) if(user && hud_type)
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"] var/atom/movable/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
PM.alpha = 150 PM.alpha = 150
var/datum/atom_hud/H = GLOB.huds[hud_type] var/datum/atom_hud/H = GLOB.huds[hud_type]
if(!H.hudusers[user]) if(!H.hudusers[user])
@@ -194,7 +194,7 @@
/obj/item/multitool/ai_detect/proc/remove_hud(mob/user) /obj/item/multitool/ai_detect/proc/remove_hud(mob/user)
if(user && hud_type) if(user && hud_type)
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"] var/atom/movable/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
PM.alpha = 255 PM.alpha = 255
var/datum/atom_hud/H = GLOB.huds[hud_type] var/datum/atom_hud/H = GLOB.huds[hud_type]
H.remove_hud_from(user) H.remove_hud_from(user)
@@ -130,8 +130,8 @@
. = ..() . = ..()
if(ismob(loc)) if(ismob(loc))
var/mob/M = loc var/mob/M = loc
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand)) if(!M.incapacitated() && istype(over_object, /atom/movable/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index) M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/storage/portable_chem_mixer/ui_interact(mob/user, datum/tgui/ui) /obj/item/storage/portable_chem_mixer/ui_interact(mob/user, datum/tgui/ui)
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_LIST_INIT(gift_item_blacklist, typecacheof(list(
/obj/mafia_game_board, /obj/mafia_game_board,
/obj/docking_port, /obj/docking_port,
/obj/shapeshift_holder, /obj/shapeshift_holder,
/obj/screen /atom/movable/screen
))) )))
GLOBAL_LIST_EMPTY(possible_gifts) GLOBAL_LIST_EMPTY(possible_gifts)
+1 -1
View File
@@ -446,7 +446,7 @@
mood_message = null mood_message = null
cheer_up() cheer_up()
/obj/item/toy/plush/proc/update_desc() /obj/item/toy/plush/update_desc()
desc = normal_desc desc = normal_desc
if(mood_message) if(mood_message)
desc += mood_message desc += mood_message
+1 -1
View File
@@ -548,7 +548,7 @@
force = 3 force = 3
throwforce = 3 throwforce = 3
throw_speed = 3 throw_speed = 3
var/base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted
var/on_force = 10 var/on_force = 10
var/on_throwforce = 8 var/on_throwforce = 8
var/on_throw_speed = 2 var/on_throw_speed = 2
+1 -1
View File
@@ -18,7 +18,7 @@
. = ..() . = ..()
update_desc() update_desc()
/obj/item/stack/spacecash/proc/update_desc() /obj/item/stack/spacecash/update_desc()
var/total_worth = get_item_credit_value() var/total_worth = get_item_credit_value()
desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]" desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]"
+2 -2
View File
@@ -80,8 +80,8 @@
/obj/item/watertank/MouseDrop(obj/over_object) /obj/item/watertank/MouseDrop(obj/over_object)
var/mob/M = loc var/mob/M = loc
if(istype(M) && istype(over_object, /obj/screen/inventory/hand)) if(istype(M) && istype(over_object, /atom/movable/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index) M.putItemFromInventoryInHandIfPossible(src, H.held_index)
return ..() return ..()
+2 -2
View File
@@ -889,8 +889,8 @@
M.put_in_hands(src) M.put_in_hands(src)
to_chat(usr, "<span class='notice'>You pick up the deck.</span>") to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
else if(istype(over_object, /obj/screen/inventory/hand)) else if(istype(over_object, /atom/movable/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object var/atom/movable/screen/inventory/hand/H = over_object
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index)) if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
to_chat(usr, "<span class='notice'>You pick up the deck.</span>") to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
+2
View File
@@ -22,6 +22,8 @@
//returns the damage value of the attack after processing the obj's various armor protections //returns the damage value of the attack after processing the obj's various armor protections
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0) /obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
if(damage_flag == MELEE && damage_amount < damage_deflection)
return 0
switch(damage_type) switch(damage_type)
if(BRUTE) if(BRUTE)
if(BURN) if(BURN)
+3
View File
@@ -20,6 +20,9 @@
var/max_integrity = 500 var/max_integrity = 500
var/integrity_failure = 0 //0 if we have no special broken behavior, otherwise is a percentage of at what point the obj breaks. 0.5 being 50% var/integrity_failure = 0 //0 if we have no special broken behavior, otherwise is a percentage of at what point the obj breaks. 0.5 being 50%
///Damage under this value will be completely ignored
var/damage_deflection = 0
var/resistance_flags = NONE // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF var/resistance_flags = NONE // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset. var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.

Some files were not shown because too many files have changed in this diff Show More