diff --git a/code/__DEFINES/_bitfields.dm b/code/__DEFINES/_bitfields.dm new file mode 100644 index 00000000000..1ac7365c725 --- /dev/null +++ b/code/__DEFINES/_bitfields.dm @@ -0,0 +1,4 @@ +#define DEFINE_BITFIELD(v, f) /datum/bitfield/##v { \ + flags = ##f; \ + variable = #v; \ +} diff --git a/code/__DEFINES/_flags/_flags.dm b/code/__DEFINES/_flags/_flags.dm index 047921ef819..77c189a2b59 100644 --- a/code/__DEFINES/_flags/_flags.dm +++ b/code/__DEFINES/_flags/_flags.dm @@ -55,7 +55,7 @@ GLOBAL_LIST_INIT(bitflags, list( #define PREVENT_CLICK_UNDER (1<<19) // Prevent clicking things below it on the same turf eg. doors/ fulltile windows. #define HOLOGRAM (1<<20) #define PREVENT_CONTENTS_EXPLOSION (1<<21) // should not get harmed if this gets caught by an explosion? - +#define HTML_USE_INITAL_ICON (1<<22) ///TURF FLAGS #define NO_JAUNT (1<<0) // This is used in literally one place, turf.dm, to block ethereal jaunt. @@ -67,6 +67,22 @@ GLOBAL_LIST_INIT(bitflags, list( #define NO_LAVA_GEN (1<<5) // Blocks lava rivers being generated on the turf #define NO_RUINS (1<<6) // Blocks ruins spawning on the turf +// 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) + // Flags for pass_flags. - Used in /atom/var/pass_flags #define PASSTABLE (1<<0) #define PASSGLASS (1<<1) diff --git a/code/__DEFINES/controllers/_subsystems.dm b/code/__DEFINES/controllers/_subsystems.dm index bbb0999caeb..5f94b6508e5 100644 --- a/code/__DEFINES/controllers/_subsystems.dm +++ b/code/__DEFINES/controllers/_subsystems.dm @@ -127,6 +127,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_AI -22 #define INIT_ORDER_OPENSPACE -50 #define INIT_ORDER_PERSISTENCE -95 +#define INIT_ORDER_ICON_SMOOTHING -99 #define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. // Subsystem fire priority, from lowest to highest priority @@ -153,6 +154,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define FIRE_PRIORITY_PROJECTILES 150 #define FIRE_PRIORITY_CHAT 400 #define FIRE_PRIORITY_OVERLAYS 500 +#define FIRE_PRIORITY_SMOOTHING 500 #define FIRE_PRIORITY_TIMER 700 #define FIRE_PRIORITY_INPUT 1000 //never drop input diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index c421bb10d44..171434556a7 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -38,15 +38,33 @@ #define EXAMINE_POSITION_BEFORE 2 //End positions #define COMPONENT_EXNAME_CHANGED 1 - -///from base of atom/update_icon(): () +///from base of [/atom/proc/update_appearance]: (updates) +#define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance" + /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name. + #define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME + /// 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" - #define COMSIG_ATOM_NO_UPDATE_ICON_STATE (1<<0) - #define COMSIG_ATOM_NO_UPDATE_OVERLAYS (1<<1) -///from base of atom/update_overlays(): (list/new_overlays) + /// 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) +///from base of [/atom/update_icon]: (signalOut, did_anything) #define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" +///from base of [/atom/proc/smooth_icon]: () +#define COMSIG_ATOM_SMOOTHED_ICON "atom_smoothed_icon" + #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 COMPONENT_ATOM_BLOCK_EXIT 1 diff --git a/code/__DEFINES/directional.dm b/code/__DEFINES/directional.dm new file mode 100644 index 00000000000..bfde544b447 --- /dev/null +++ b/code/__DEFINES/directional.dm @@ -0,0 +1,35 @@ +// Byond direction defines, because I want to put them somewhere. +// #define NORTH 1 +// #define SOUTH 2 +// #define EAST 4 +// #define WEST 8 + +/// North direction as a string "[1]" +#define TEXT_NORTH "[NORTH]" +/// South direction as a string "[2]" +#define TEXT_SOUTH "[SOUTH]" +/// East direction as a string "[4]" +#define TEXT_EAST "[EAST]" +/// West direction as a string "[8]" +#define TEXT_WEST "[WEST]" + +/// Inverse direction, taking into account UP|DOWN if necessary. +#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) ) + +/// Create directional subtypes for a path to simplify mapping. +#define MAPPING_DIRECTIONAL_HELPERS(path, offset) ##path/directional/north {\ + dir = NORTH; \ + pixel_y = offset; \ +} \ +##path/directional/south {\ + dir = SOUTH; \ + pixel_y = -offset; \ +} \ +##path/directional/east {\ + dir = EAST; \ + pixel_x = offset; \ +} \ +##path/directional/west {\ + dir = WEST; \ + pixel_x = -offset; \ +} diff --git a/code/__DEFINES/icon_smoothing.dm b/code/__DEFINES/icon_smoothing.dm new file mode 100644 index 00000000000..5bcdb7184f0 --- /dev/null +++ b/code/__DEFINES/icon_smoothing.dm @@ -0,0 +1,49 @@ +/* smoothing_flags */ +/// Smoothing system in where adjacencies are calculated and used to build an image by mounting each corner at runtime. +#define SMOOTH_CORNERS (1<<0) +/// Smoothing system in where adjacencies are calculated and used to select a pre-baked icon_state, encoded by bitmasking. +#define SMOOTH_BITMASK (1<<1) +/// Atom has diagonal corners, with underlays under them. +#define SMOOTH_DIAGONAL_CORNERS (1<<2) +/// Atom will smooth with the borders of the map. +#define SMOOTH_BORDER (1<<3) +/// Atom is currently queued to smooth. +#define SMOOTH_QUEUED (1<<4) +/// Smooths with objects, and will thus need to scan turfs for contents. +#define SMOOTH_OBJ (1<<5) + +DEFINE_BITFIELD(smoothing_flags, list( + "SMOOTH_CORNERS" = SMOOTH_CORNERS, + "SMOOTH_BITMASK" = SMOOTH_BITMASK, + "SMOOTH_DIAGONAL_CORNERS" = SMOOTH_DIAGONAL_CORNERS, + "SMOOTH_BORDER" = SMOOTH_BORDER, + "SMOOTH_QUEUED" = SMOOTH_QUEUED, + "SMOOTH_OBJ" = SMOOTH_OBJ, +)) + +/*smoothing macros*/ + +#define QUEUE_SMOOTH(thing_to_queue) if(thing_to_queue.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) {SSicon_smooth.add_to_queue(thing_to_queue)} + +#define QUEUE_SMOOTH_NEIGHBORS(thing_to_queue) for(var/neighbor in orange(1, thing_to_queue)) {var/atom/atom_neighbor = neighbor; QUEUE_SMOOTH(atom_neighbor)} + + +/**SMOOTHING GROUPS + * Groups of things to smooth with. + * * Contained in the `list/smoothing_groups` variable. + * * Matched with the `list/canSmoothWith` variable to check whether smoothing is possible or not. + */ + +#define S_TURF(num) ((24 * 0) + num) //Not any different from the number itself, but kept this way in case someone wants to expand it by adding stuff before it. +/* /turf only */ + +// empty for now +#define MAX_S_TURF S_TURF(0) //Always match this value with the one above it. + + +#define S_OBJ(num) (MAX_S_TURF + 1 + num) +/* /obj included */ + +#define SMOOTH_GROUP_SANDBAGS S_OBJ(0) ///obj/structure/sandbag + +#define MAX_S_OBJ SMOOTH_GROUP_SANDBAGS //Always match this value with the one above it. diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 298af71b063..4d8a9fb7e80 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -1,14 +1,3 @@ -// Byond direction defines, because I want to put them somewhere. -// #define NORTH 1 -// #define SOUTH 2 -// #define EAST 4 -// #define WEST 8 - -#define TEXT_NORTH "[NORTH]" -#define TEXT_SOUTH "[SOUTH]" -#define TEXT_EAST "[EAST]" -#define TEXT_WEST "[WEST]" - /// world.icon_size #define PIXELS 32 diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm index 176677c15b4..8e6403c499a 100644 --- a/code/__DEFINES/vv.dm +++ b/code/__DEFINES/vv.dm @@ -81,6 +81,8 @@ #define VV_HK_ADD_REAGENT "addreagent" #define VV_HK_TRIGGER_EMP "empulse" #define VV_HK_TRIGGER_EXPLOSION "explode" +#define VV_HK_EDIT_FILTERS "edit_filters" +#define VV_HK_EDIT_COLOR_MATRIX "edit_color_matrix" /* // /obj diff --git a/code/__HELPERS/filters.dm b/code/__HELPERS/filters.dm new file mode 100644 index 00000000000..7be7ca5d732 --- /dev/null +++ b/code/__HELPERS/filters.dm @@ -0,0 +1,319 @@ +#define ICON_NOT_SET "Not Set" + +//This is stored as a nested list instead of datums or whatever because it json encodes nicely for usage in tgui +GLOBAL_LIST_INIT(master_filter_info, list( + "alpha" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "icon" = ICON_NOT_SET, + "render_source" = "", + "flags" = 0 + ), + "flags" = list( + "MASK_INVERSE" = MASK_INVERSE, + "MASK_SWAP" = MASK_SWAP + ) + ), + "angular_blur" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = 1 + ) + ), + /* Not supported because making a proper matrix editor on the frontend would be a huge dick pain. + Uncomment if you ever implement it + "color" = list( + "defaults" = list( + "color" = matrix(), + "space" = FILTER_COLOR_RGB + ) + ), + */ + "displace" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = null, + "icon" = ICON_NOT_SET, + "render_source" = "" + ) + ), + "drop_shadow" = list( + "defaults" = list( + "x" = 1, + "y" = -1, + "size" = 1, + "offset" = 0, + "color" = COLOR_HALF_TRANSPARENT_BLACK + ) + ), + "blur" = list( + "defaults" = list( + "size" = 1 + ) + ), + "layer" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "icon" = ICON_NOT_SET, + "render_source" = "", + "flags" = FILTER_OVERLAY, + "color" = "", + "transform" = null, + "blend_mode" = BLEND_DEFAULT + ) + ), + "motion_blur" = list( + "defaults" = list( + "x" = 0, + "y" = 0 + ) + ), + "outline" = list( + "defaults" = list( + "size" = 0, + "color" = COLOR_BLACK, + "flags" = NONE + ), + "flags" = list( + "OUTLINE_SHARP" = OUTLINE_SHARP, + "OUTLINE_SQUARE" = OUTLINE_SQUARE + ) + ), + "radial_blur" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = 0.01 + ) + ), + "rays" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = 16, + "color" = COLOR_WHITE, + "offset" = 0, + "density" = 10, + "threshold" = 0.5, + "factor" = 0, + "flags" = FILTER_OVERLAY | FILTER_UNDERLAY + ), + "flags" = list( + "FILTER_OVERLAY" = FILTER_OVERLAY, + "FILTER_UNDERLAY" = FILTER_UNDERLAY + ) + ), + "ripple" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = 1, + "repeat" = 2, + "radius" = 0, + "falloff" = 1, + "flags" = NONE + ), + "flags" = list( + "WAVE_BOUNDED" = WAVE_BOUNDED + ) + ), + "wave" = list( + "defaults" = list( + "x" = 0, + "y" = 0, + "size" = 1, + "offset" = 0, + "flags" = NONE + ), + "flags" = list( + "WAVE_SIDEWAYS" = WAVE_SIDEWAYS, + "WAVE_BOUNDED" = WAVE_BOUNDED + ) + ) +)) + +#undef ICON_NOT_SET + +//Helpers to generate lists for filter helpers +//This is the only practical way of writing these that actually produces sane lists +/proc/alpha_mask_filter(x, y, icon/icon, render_source, flags) + . = list("type" = "alpha") + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(icon)) + .["icon"] = icon + if(!isnull(render_source)) + .["render_source"] = render_source + if(!isnull(flags)) + .["flags"] = flags + +/proc/angular_blur_filter(x, y, size) + . = list("type" = "angular_blur") + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(size)) + .["size"] = size + +/proc/color_matrix_filter(matrix/in_matrix, space) + . = list("type" = "color") + .["color"] = in_matrix + if(!isnull(space)) + .["space"] = space + +/proc/displacement_map_filter(icon, render_source, x, y, size = 32) + . = list("type" = "displace") + if(!isnull(icon)) + .["icon"] = icon + if(!isnull(render_source)) + .["render_source"] = render_source + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(size)) + .["size"] = size + +/proc/drop_shadow_filter(x, y, size, offset, color) + . = list("type" = "drop_shadow") + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(size)) + .["size"] = size + if(!isnull(offset)) + .["offset"] = offset + if(!isnull(color)) + .["color"] = color + +/proc/gauss_blur_filter(size) + . = list("type" = "blur") + if(!isnull(size)) + .["size"] = size + +/proc/layering_filter(icon, render_source, x, y, flags, color, transform, blend_mode) + . = list("type" = "layer") + if(!isnull(icon)) + .["icon"] = icon + if(!isnull(render_source)) + .["render_source"] = render_source + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(color)) + .["color"] = color + if(!isnull(flags)) + .["flags"] = flags + if(!isnull(transform)) + .["transform"] = transform + if(!isnull(blend_mode)) + .["blend_mode"] = blend_mode + +/proc/motion_blur_filter(x, y) + . = list("type" = "motion_blur") + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + +/proc/outline_filter(size, color, flags) + . = list("type" = "outline") + if(!isnull(size)) + .["size"] = size + if(!isnull(color)) + .["color"] = color + if(!isnull(flags)) + .["flags"] = flags + +/proc/radial_blur_filter(size, x, y) + . = list("type" = "radial_blur") + if(!isnull(size)) + .["size"] = size + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + +/proc/rays_filter(size, color, offset, density, threshold, factor, x, y, flags) + . = list("type" = "rays") + if(!isnull(size)) + .["size"] = size + if(!isnull(color)) + .["color"] = color + if(!isnull(offset)) + .["offset"] = offset + if(!isnull(density)) + .["density"] = density + if(!isnull(threshold)) + .["threshold"] = threshold + if(!isnull(factor)) + .["factor"] = factor + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(flags)) + .["flags"] = flags + +/proc/ripple_filter(radius, size, falloff, repeat, x, y, flags) + . = list("type" = "ripple") + if(!isnull(radius)) + .["radius"] = radius + if(!isnull(size)) + .["size"] = size + if(!isnull(falloff)) + .["falloff"] = falloff + if(!isnull(repeat)) + .["repeat"] = repeat + if(!isnull(flags)) + .["flags"] = flags + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + +/proc/wave_filter(x, y, size, offset, flags) + . = list("type" = "wave") + if(!isnull(size)) + .["size"] = size + if(!isnull(x)) + .["x"] = x + if(!isnull(y)) + .["y"] = y + if(!isnull(offset)) + .["offset"] = offset + if(!isnull(flags)) + .["flags"] = flags + +/proc/apply_wibbly_filters(atom/in_atom, length) + for(var/i in 1 to 7) + //This is a very baffling and strange way of doing this but I am just preserving old functionality + var/X + var/Y + var/rsq + do + X = 60*rand() - 30 + Y = 60*rand() - 30 + rsq = X*X + Y*Y + while(rsq<100 || rsq>900) // Yeah let's just loop infinitely due to bad luck what's the worst that could happen? + var/random_roll = rand() + in_atom.add_filter("wibbly-[i]", 5, wave_filter(x = X, y = Y, size = rand() * 2.5 + 0.5, offset = random_roll)) + var/filter = in_atom.get_filter("wibbly-[i]") + animate(filter, offset = random_roll, time = 0, loop = -1, flags = ANIMATION_PARALLEL) + animate(offset = random_roll - 1, time = rand() * 20 + 10) + +/proc/remove_wibbly_filters(atom/in_atom) + var/filter + for(var/i in 1 to 7) + filter = in_atom.get_filter("wibbly-[i]") + animate(filter) + in_atom.remove_filter("wibbly-[i]") diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 8b013064f77..b4d4e615e2e 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -436,7 +436,7 @@ proc/isInSight(var/atom/A, var/atom/B) return candidates /proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480) - if(!isobj(O)) O = new /obj/screen/text() + if(!isobj(O)) O = new /atom/movable/screen/text() O.maptext = maptext O.maptext_height = maptext_height O.maptext_width = maptext_width diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm new file mode 100644 index 00000000000..de6dbbe01b1 --- /dev/null +++ b/code/__HELPERS/icon_smoothing.dm @@ -0,0 +1,519 @@ + +//generic (by snowflake) tile smoothing code; smooth your icons with this! +/* + Each tile is divided in 4 corners, each corner has an appearance associated to it; the tile is then overlayed by these 4 appearances + To use this, just set your atom's 'smoothing_flags' var to 1. If your atom can be moved/unanchored, set its 'can_be_unanchored' var to 1. + If you don't want your atom's icon to smooth with anything but atoms of the same type, set the list 'canSmoothWith' to null; + Otherwise, put all the smoothing groups you want the atom icon to smooth with in 'canSmoothWith', including the group of the atom itself. + Smoothing groups are just shared flags between objects. If one of the 'canSmoothWith' of A matches one of the `smoothing_groups` of B, then A will smooth with B. + + Each atom has its own icon file with all the possible corner states. See 'smooth_wall.dmi' for a template. + + DIAGONAL SMOOTHING INSTRUCTIONS + To make your atom smooth diagonally you need all the proper icon states (see 'smooth_wall.dmi' for a template) and + to add the 'SMOOTH_DIAGONAL_CORNERS' flag to the atom's smoothing_flags var (in addition to either SMOOTH_TRUE or SMOOTH_MORE). + + For turfs, what appears under the diagonal corners depends on the turf that was in the same position previously: if you make a wall on + a plating floor, you will see plating under the diagonal wall corner, if it was space, you will see space. + + If you wish to map a diagonal wall corner with a fixed underlay, you must configure the turf's 'fixed_underlay' list var, like so: + fixed_underlay = list("icon"='icon_file.dmi', "icon_state"="iconstatename") + A non null 'fixed_underlay' list var will skip copying the previous turf appearance and always use the list. If the list is + not set properly, the underlay will default to regular floor plating. + + To see an example of a diagonal wall, see '/turf/closed/wall/mineral/titanium' and its subtypes. +*/ + +//Redefinitions of the diagonal directions so they can be stored in one var without conflicts +#define NORTH_JUNCTION NORTH //(1<<0) +#define SOUTH_JUNCTION SOUTH //(1<<1) +#define EAST_JUNCTION EAST //(1<<2) +#define WEST_JUNCTION WEST //(1<<3) +#define NORTHEAST_JUNCTION (1<<4) +#define SOUTHEAST_JUNCTION (1<<5) +#define SOUTHWEST_JUNCTION (1<<6) +#define NORTHWEST_JUNCTION (1<<7) + +DEFINE_BITFIELD(smoothing_junction, list( + "NORTH_JUNCTION" = NORTH_JUNCTION, + "SOUTH_JUNCTION" = SOUTH_JUNCTION, + "EAST_JUNCTION" = EAST_JUNCTION, + "WEST_JUNCTION" = WEST_JUNCTION, + "NORTHEAST_JUNCTION" = NORTHEAST_JUNCTION, + "SOUTHEAST_JUNCTION" = SOUTHEAST_JUNCTION, + "SOUTHWEST_JUNCTION" = SOUTHWEST_JUNCTION, + "NORTHWEST_JUNCTION" = NORTHWEST_JUNCTION, +)) + + +#define NO_ADJ_FOUND 0 +#define ADJ_FOUND 1 +#define NULLTURF_BORDER 2 + +#define DEFAULT_UNDERLAY_ICON 'icons/turf/floors.dmi' +#define DEFAULT_UNDERLAY_ICON_STATE "plating" + + +#define SET_ADJ_IN_DIR(source, junction, direction, direction_flag) \ + do { \ + var/turf/neighbor = get_step(source, direction); \ + if(!neighbor) { \ + if(source.smoothing_flags & SMOOTH_BORDER) { \ + junction |= direction_flag; \ + }; \ + }; \ + else { \ + if(!isnull(neighbor.smoothing_groups)) { \ + for(var/target in source.canSmoothWith) { \ + if(!(source.canSmoothWith[target] & neighbor.smoothing_groups[target])) { \ + continue; \ + }; \ + junction |= direction_flag; \ + break; \ + }; \ + }; \ + if(!(junction & direction_flag) && source.smoothing_flags & SMOOTH_OBJ) { \ + for(var/obj/thing in neighbor) { \ + if(!thing.anchored || isnull(thing.smoothing_groups)) { \ + continue; \ + }; \ + for(var/target in source.canSmoothWith) { \ + if(!(source.canSmoothWith[target] & thing.smoothing_groups[target])) { \ + continue; \ + }; \ + junction |= direction_flag; \ + break; \ + }; \ + if(junction & direction_flag) { \ + break; \ + }; \ + }; \ + }; \ + }; \ + } while(FALSE) + + +///Scans all adjacent turfs to find targets to smooth with. +/atom/proc/calculate_adjacencies() + . = NONE + + if(!loc) + return + + for(var/direction in GLOB.cardinal) + switch(find_type_in_direction(direction)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= direction //BYOND and smooth dirs are the same for cardinals + if(ADJ_FOUND) + . |= direction //BYOND and smooth dirs are the same for cardinals + + if(. & NORTH_JUNCTION) + if(. & WEST_JUNCTION) + switch(find_type_in_direction(NORTHWEST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= NORTHWEST_JUNCTION + if(ADJ_FOUND) + . |= NORTHWEST_JUNCTION + + if(. & EAST_JUNCTION) + switch(find_type_in_direction(NORTHEAST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= NORTHEAST_JUNCTION + if(ADJ_FOUND) + . |= NORTHEAST_JUNCTION + + if(. & SOUTH_JUNCTION) + if(. & WEST_JUNCTION) + switch(find_type_in_direction(SOUTHWEST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= SOUTHWEST_JUNCTION + if(ADJ_FOUND) + . |= SOUTHWEST_JUNCTION + + if(. & EAST_JUNCTION) + switch(find_type_in_direction(SOUTHEAST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= SOUTHEAST_JUNCTION + if(ADJ_FOUND) + . |= SOUTHEAST_JUNCTION + + +/atom/movable/calculate_adjacencies() + if(can_be_unanchored && !anchored) + return NONE + return ..() + + +///do not use, use QUEUE_SMOOTH(atom) +/atom/proc/smooth_icon() + smoothing_flags &= ~SMOOTH_QUEUED + flags |= HTML_USE_INITAL_ICON + if (!z) + CRASH("[type] called smooth_icon() without being on a z-level") + if(smoothing_flags & SMOOTH_CORNERS) + if(smoothing_flags & SMOOTH_DIAGONAL_CORNERS) + corners_diagonal_smooth(calculate_adjacencies()) + else + corners_cardinal_smooth(calculate_adjacencies()) + else if(smoothing_flags & SMOOTH_BITMASK) + bitmask_smooth() + else + CRASH("smooth_icon called for [src] with smoothing_flags == [smoothing_flags]") + SEND_SIGNAL(src, COMSIG_ATOM_SMOOTHED_ICON) + update_appearance(~UPDATE_SMOOTHING) + + +/atom/proc/corners_diagonal_smooth(adjacencies) + switch(adjacencies) + if(NORTH_JUNCTION|WEST_JUNCTION) + replace_smooth_overlays("d-se","d-se-0") + if(NORTH_JUNCTION|EAST_JUNCTION) + replace_smooth_overlays("d-sw","d-sw-0") + if(SOUTH_JUNCTION|WEST_JUNCTION) + replace_smooth_overlays("d-ne","d-ne-0") + if(SOUTH_JUNCTION|EAST_JUNCTION) + replace_smooth_overlays("d-nw","d-nw-0") + + if(NORTH_JUNCTION|WEST_JUNCTION|NORTHWEST_JUNCTION) + replace_smooth_overlays("d-se","d-se-1") + if(NORTH_JUNCTION|EAST_JUNCTION|NORTHEAST_JUNCTION) + replace_smooth_overlays("d-sw","d-sw-1") + if(SOUTH_JUNCTION|WEST_JUNCTION|SOUTHWEST_JUNCTION) + replace_smooth_overlays("d-ne","d-ne-1") + if(SOUTH_JUNCTION|EAST_JUNCTION|SOUTHEAST_JUNCTION) + replace_smooth_overlays("d-nw","d-nw-1") + + else + corners_cardinal_smooth(adjacencies) + return FALSE + + icon_state = "" + return TRUE + + +/atom/proc/corners_cardinal_smooth(adjacencies) + var/mutable_appearance/temp_ma + + //NW CORNER + var/nw = "1-i" + if((adjacencies & NORTH_JUNCTION) && (adjacencies & WEST_JUNCTION)) + if(adjacencies & NORTHWEST_JUNCTION) + nw = "1-f" + else + nw = "1-nw" + else + if(adjacencies & NORTH_JUNCTION) + nw = "1-n" + else if(adjacencies & WEST_JUNCTION) + nw = "1-w" + temp_ma = mutable_appearance(icon, nw) + nw = temp_ma.appearance + + //NE CORNER + var/ne = "2-i" + if((adjacencies & NORTH_JUNCTION) && (adjacencies & EAST_JUNCTION)) + if(adjacencies & NORTHEAST_JUNCTION) + ne = "2-f" + else + ne = "2-ne" + else + if(adjacencies & NORTH_JUNCTION) + ne = "2-n" + else if(adjacencies & EAST_JUNCTION) + ne = "2-e" + temp_ma = mutable_appearance(icon, ne) + ne = temp_ma.appearance + + //SW CORNER + var/sw = "3-i" + if((adjacencies & SOUTH_JUNCTION) && (adjacencies & WEST_JUNCTION)) + if(adjacencies & SOUTHWEST_JUNCTION) + sw = "3-f" + else + sw = "3-sw" + else + if(adjacencies & SOUTH_JUNCTION) + sw = "3-s" + else if(adjacencies & WEST_JUNCTION) + sw = "3-w" + temp_ma = mutable_appearance(icon, sw) + sw = temp_ma.appearance + + //SE CORNER + var/se = "4-i" + if((adjacencies & SOUTH_JUNCTION) && (adjacencies & EAST_JUNCTION)) + if(adjacencies & SOUTHEAST_JUNCTION) + se = "4-f" + else + se = "4-se" + else + if(adjacencies & SOUTH_JUNCTION) + se = "4-s" + else if(adjacencies & EAST_JUNCTION) + se = "4-e" + temp_ma = mutable_appearance(icon, se) + se = temp_ma.appearance + + var/list/new_overlays + + if(top_left_corner != nw) + cut_overlay(top_left_corner) + top_left_corner = nw + LAZYADD(new_overlays, nw) + + if(top_right_corner != ne) + cut_overlay(top_right_corner) + top_right_corner = ne + LAZYADD(new_overlays, ne) + + if(bottom_right_corner != sw) + cut_overlay(bottom_right_corner) + bottom_right_corner = sw + LAZYADD(new_overlays, sw) + + if(bottom_left_corner != se) + cut_overlay(bottom_left_corner) + bottom_left_corner = se + LAZYADD(new_overlays, se) + + if(new_overlays) + add_overlay(new_overlays) + + +///Scans direction to find targets to smooth with. +/atom/proc/find_type_in_direction(direction) + var/turf/target_turf = get_step(src, direction) + if(!target_turf) + return NULLTURF_BORDER + + var/area/target_area = get_area(target_turf) + var/area/source_area = get_area(src) + if((source_area.area_limited_icon_smoothing && !istype(target_area, source_area.area_limited_icon_smoothing)) || (target_area.area_limited_icon_smoothing && !istype(source_area, target_area.area_limited_icon_smoothing))) + return NO_ADJ_FOUND + + if(isnull(canSmoothWith)) //special case in which it will only smooth with itself + if(isturf(src)) + return (type == target_turf.type) ? ADJ_FOUND : NO_ADJ_FOUND + var/atom/matching_obj = locate(type) in target_turf + return (matching_obj && matching_obj.type == type) ? ADJ_FOUND : NO_ADJ_FOUND + + if(!isnull(target_turf.smoothing_groups)) + for(var/target in canSmoothWith) + if(!(canSmoothWith[target] & target_turf.smoothing_groups[target])) + continue + return ADJ_FOUND + + if(smoothing_flags & SMOOTH_OBJ) + for(var/am in target_turf) + var/atom/movable/thing = am + if(!thing.anchored || isnull(thing.smoothing_groups)) + continue + for(var/target in canSmoothWith) + if(!(canSmoothWith[target] & thing.smoothing_groups[target])) + continue + return ADJ_FOUND + + return NO_ADJ_FOUND + + +/** + * Basic smoothing proc. The atom checks for adjacent directions to smooth with and changes the icon_state based on that. + * + * Returns the previous smoothing_junction state so the previous state can be compared with the new one after the proc ends, and see the changes, if any. + * +*/ +/atom/proc/bitmask_smooth() + var/new_junction = NONE + + for(var/direction in GLOB.cardinal) //Cardinal case first. + SET_ADJ_IN_DIR(src, new_junction, direction, direction) + + if(!(new_junction & (NORTH|SOUTH)) || !(new_junction & (EAST|WEST))) + set_smoothed_icon_state(new_junction) + return + + if(new_junction & NORTH_JUNCTION) + if(new_junction & WEST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, NORTHWEST, NORTHWEST_JUNCTION) + + if(new_junction & EAST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, NORTHEAST, NORTHEAST_JUNCTION) + + if(new_junction & SOUTH_JUNCTION) + if(new_junction & WEST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, SOUTHWEST, SOUTHWEST_JUNCTION) + + if(new_junction & EAST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, SOUTHEAST, SOUTHEAST_JUNCTION) + + set_smoothed_icon_state(new_junction) + + +///Changes the icon state based on the new junction bitmask. Returns the old junction value. +/atom/proc/set_smoothed_icon_state(new_junction) + . = smoothing_junction + smoothing_junction = new_junction + icon_state = "[base_icon_state]-[smoothing_junction]" + +/turf/set_smoothed_icon_state(new_junction) + . = ..() + if(!density) // we only do underlays for walls atm + return + if(smoothing_flags & SMOOTH_DIAGONAL_CORNERS) + switch(new_junction) + if( + NORTH_JUNCTION|WEST_JUNCTION, + NORTH_JUNCTION|EAST_JUNCTION, + SOUTH_JUNCTION|WEST_JUNCTION, + SOUTH_JUNCTION|EAST_JUNCTION, + NORTH_JUNCTION|WEST_JUNCTION|NORTHWEST_JUNCTION, + NORTH_JUNCTION|EAST_JUNCTION|NORTHEAST_JUNCTION, + SOUTH_JUNCTION|WEST_JUNCTION|SOUTHWEST_JUNCTION, + SOUTH_JUNCTION|EAST_JUNCTION|SOUTHEAST_JUNCTION + ) + icon_state = "[base_icon_state]-[smoothing_junction]-d" + if(!fixed_underlay && new_junction != .) // Mutable underlays? + var/junction_dir = reverse_ndir(smoothing_junction) + var/turned_adjacency = REVERSE_DIR(junction_dir) + var/turf/neighbor_turf = get_step(src, turned_adjacency & (NORTH|SOUTH)) + var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER, plane = TURF_PLANE) + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + neighbor_turf = get_step(src, turned_adjacency & (EAST|WEST)) + + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + neighbor_turf = get_step(src, turned_adjacency) + + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + if(!get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) //if all else fails, ask our own turf + underlay_appearance.icon = DEFAULT_UNDERLAY_ICON + underlay_appearance.icon_state = DEFAULT_UNDERLAY_ICON_STATE + underlays += underlay_appearance + +//Icon smoothing helpers +/proc/smooth_zlevel(zlevel, now = FALSE) + var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)) + for(var/V in away_turfs) + var/turf/T = V + if(T.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + if(now) + T.smooth_icon() + else + QUEUE_SMOOTH(T) + for(var/R in T) + var/atom/A = R + if(A.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + if(now) + A.smooth_icon() + else + QUEUE_SMOOTH(A) + + +/atom/proc/clear_smooth_overlays() + cut_overlay(top_left_corner) + top_left_corner = null + cut_overlay(top_right_corner) + top_right_corner = null + cut_overlay(bottom_right_corner) + bottom_right_corner = null + cut_overlay(bottom_left_corner) + bottom_left_corner = null + +/// Internal: Takes icon states as text to replace smoothing corner overlays +/atom/proc/replace_smooth_overlays(nw, ne, sw, se) + clear_smooth_overlays() + var/mutable_appearance/temp_ma + + temp_ma = mutable_appearance(icon, nw) + nw = temp_ma.appearance + + temp_ma = mutable_appearance(icon, ne) + ne = temp_ma.appearance + + temp_ma = mutable_appearance(icon, sw) + sw = temp_ma.appearance + + temp_ma = mutable_appearance(icon, se) + se = temp_ma.appearance + + var/list/new_overlays = list() + + top_left_corner = nw + new_overlays += nw + + top_right_corner = ne + new_overlays += ne + + bottom_left_corner = sw + new_overlays += sw + + bottom_right_corner = se + new_overlays += se + + add_overlay(new_overlays) + + +/proc/reverse_ndir(ndir) + switch(ndir) + if(NORTH_JUNCTION) + return NORTH + if(SOUTH_JUNCTION) + return SOUTH + if(WEST_JUNCTION) + return WEST + if(EAST_JUNCTION) + return EAST + if(NORTHWEST_JUNCTION) + return NORTHWEST + if(NORTHEAST_JUNCTION) + return NORTHEAST + if(SOUTHEAST_JUNCTION) + return SOUTHEAST + if(SOUTHWEST_JUNCTION) + return SOUTHWEST + if(NORTH_JUNCTION | WEST_JUNCTION) + return NORTHWEST + if(NORTH_JUNCTION | EAST_JUNCTION) + return NORTHEAST + if(SOUTH_JUNCTION | WEST_JUNCTION) + return SOUTHWEST + if(SOUTH_JUNCTION | EAST_JUNCTION) + return SOUTHEAST + if(NORTH_JUNCTION | WEST_JUNCTION | NORTHWEST_JUNCTION) + return NORTHWEST + if(NORTH_JUNCTION | EAST_JUNCTION | NORTHEAST_JUNCTION) + return NORTHEAST + if(SOUTH_JUNCTION | WEST_JUNCTION | SOUTHWEST_JUNCTION) + return SOUTHWEST + if(SOUTH_JUNCTION | EAST_JUNCTION | SOUTHEAST_JUNCTION) + return SOUTHEAST + else + return NONE + +/turf/proc/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) + underlay_appearance.icon = icon + underlay_appearance.icon_state = icon_state + underlay_appearance.dir = adjacency_dir + return TRUE + +#undef NORTH_JUNCTION +#undef SOUTH_JUNCTION +#undef EAST_JUNCTION +#undef WEST_JUNCTION +#undef NORTHEAST_JUNCTION +#undef NORTHWEST_JUNCTION +#undef SOUTHEAST_JUNCTION +#undef SOUTHWEST_JUNCTION + +#undef NO_ADJ_FOUND +#undef ADJ_FOUND +#undef NULLTURF_BORDER + +#undef DEFAULT_UNDERLAY_ICON +#undef DEFAULT_UNDERLAY_ICON_STATE + +#undef SET_ADJ_IN_DIR diff --git a/code/__HELPERS/lists/bitflags.dm b/code/__HELPERS/lists/bitflags.dm new file mode 100644 index 00000000000..8e37949d691 --- /dev/null +++ b/code/__HELPERS/lists/bitflags.dm @@ -0,0 +1,25 @@ +GLOBAL_LIST_EMPTY(bitflag_lists) + +/** + * System for storing bitflags past the 24 limit, making use of an associative list. + * + * Macro converts a list of integers into an associative list of bitflag entries for quicker comparison. + * Example: list(0, 4, 26, 32)) => list( "0" = ( (1<<0) | (1<<4) ), "1" = ( (1<<2) | (1<<8) ) ) + * Lists are cached into a global list of lists to avoid identical duplicates. + * This system makes value comparisons faster than pairing every element of one list with every element of the other for evaluation. + * + * Arguments: + * * target - List of integers. + */ +#define SET_BITFLAG_LIST(target) \ + do { \ + var/txt_signature = target.Join("-"); \ + if(!GLOB.bitflag_lists[txt_signature]) { \ + var/list/new_bitflag_list = list(); \ + for(var/value in target) { \ + new_bitflag_list["[round(value / 24)]"] |= (1 << (value % 24)); \ + }; \ + GLOB.bitflag_lists[txt_signature] = new_bitflag_list; \ + }; \ + target = GLOB.bitflag_lists[txt_signature]; \ + } while (FALSE) diff --git a/code/__HELPERS/sorts/comparators.dm b/code/__HELPERS/sorts/comparators.dm index f591a66979e..4d62d7aba13 100644 --- a/code/__HELPERS/sorts/comparators.dm +++ b/code/__HELPERS/sorts/comparators.dm @@ -59,6 +59,9 @@ GLOBAL_VAR_INIT(cmp_field, "name") /proc/cmp_subsystem_priority(datum/controller/subsystem/a, datum/controller/subsystem/b) return a.priority - b.priority +/proc/cmp_filter_data_priority(list/A, list/B) + return A["priority"] - B["priority"] + /proc/cmp_timer(datum/timedevent/a, datum/timedevent/b) return a.timeToRun - b.timeToRun diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index cbf240e5625..51ae8c30b33 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1632,39 +1632,39 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /proc/get_tgui_plane_masters() . = list() // 'Utility' planes - . += new /obj/screen/plane_master/fullbright //Lighting system (lighting_overlay objects) - . += new /obj/screen/plane_master/lighting //Lighting system (but different!) - . += new /obj/screen/plane_master/ghosts //Ghosts! - . += new /obj/screen/plane_master{plane = PLANE_AI_EYE} //AI Eye! + . += new /atom/movable/screen/plane_master/fullbright //Lighting system (lighting_overlay objects) + . += new /atom/movable/screen/plane_master/lighting //Lighting system (but different!) + . += new /atom/movable/screen/plane_master/ghosts //Ghosts! + . += new /atom/movable/screen/plane_master{plane = PLANE_AI_EYE} //AI Eye! - . += new /obj/screen/plane_master{plane = PLANE_CH_STATUS} //Status is the synth/human icon left side of medhuds - . += new /obj/screen/plane_master{plane = PLANE_CH_HEALTH} //Health bar - . += new /obj/screen/plane_master{plane = PLANE_CH_LIFE} //Alive-or-not icon - . += new /obj/screen/plane_master{plane = PLANE_CH_ID} //Job ID icon - . += new /obj/screen/plane_master{plane = PLANE_CH_WANTED} //Wanted status - . += new /obj/screen/plane_master{plane = PLANE_CH_IMPLOYAL} //Loyalty implants - . += new /obj/screen/plane_master{plane = PLANE_CH_IMPTRACK} //Tracking implants - . += new /obj/screen/plane_master{plane = PLANE_CH_IMPCHEM} //Chemical implants - . += new /obj/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff - . += new /obj/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS} //Status is the synth/human icon left side of medhuds + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_HEALTH} //Health bar + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_LIFE} //Alive-or-not icon + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_ID} //Job ID icon + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_WANTED} //Wanted status + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPLOYAL} //Loyalty implants + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPTRACK} //Tracking implants + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPCHEM} //Chemical implants + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD - . += new /obj/screen/plane_master{plane = PLANE_ADMIN1} //For admin use - . += new /obj/screen/plane_master{plane = PLANE_ADMIN2} //For admin use - . += new /obj/screen/plane_master{plane = PLANE_ADMIN3} //For admin use + . += new /atom/movable/screen/plane_master{plane = PLANE_ADMIN1} //For admin use + . += new /atom/movable/screen/plane_master{plane = PLANE_ADMIN2} //For admin use + . += new /atom/movable/screen/plane_master{plane = PLANE_ADMIN3} //For admin use - . += new /obj/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings. - // . += new /obj/screen/plane_master{plane = PLANE_BUILDMODE} //Things that only show up while in build mode + . += new /atom/movable/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings. + // . += new /atom/movable/screen/plane_master{plane = PLANE_BUILDMODE} //Things that only show up while in build mode // Real tangible stuff planes - . += new /obj/screen/plane_master/main{plane = TURF_PLANE} - . += new /obj/screen/plane_master/main{plane = OBJ_PLANE} - . += new /obj/screen/plane_master/main{plane = MOB_PLANE} - // . += new /obj/screen/plane_master/cloaked //Cloaked atoms! + . += new /atom/movable/screen/plane_master/main{plane = TURF_PLANE} + . += new /atom/movable/screen/plane_master/main{plane = OBJ_PLANE} + . += new /atom/movable/screen/plane_master/main{plane = MOB_PLANE} + // . += new /atom/movable/screen/plane_master/cloaked //Cloaked atoms! //VOREStation Add - Random other plane masters - . += new /obj/screen/plane_master{plane = PLANE_CH_STATUS_R} //Right-side status icon - . += new /obj/screen/plane_master{plane = PLANE_CH_HEALTH_VR} //Health bar but transparent at 100 - . += new /obj/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status - . += new /obj/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags - . += new /obj/screen/plane_master{plane = PLANE_AUGMENTED} //Augmented reality + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS_R} //Right-side status icon + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_HEALTH_VR} //Health bar but transparent at 100 + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status + . += new /atom/movable/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags + . += new /atom/movable/screen/plane_master{plane = PLANE_AUGMENTED} //Augmented reality //VOREStation Add End diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 8f07647f147..beac764efe9 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -1,5 +1,22 @@ +GLOBAL_LIST_INIT(bitfields, generate_bitfields()) + +/datum/bitfield + /// The variable name that contains the bitfield + var/variable + + /// An associative list of the readable flag and its true value + var/list/flags + +/// Turns /datum/bitfield subtypes into a list for use in debugging +/proc/generate_bitfields() + var/list/bitfields = list() + for (var/_bitfield in subtypesof(/datum/bitfield)) + var/datum/bitfield/bitfield = new _bitfield + bitfields[bitfield.variable] = bitfield.flags + // sue me i haven't slept in 18 hours + // tl;dr convert these into DEFINE_BITFIELD's later #define FLAG(flag) "[#flag]" = flag -GLOBAL_LIST_INIT(bitfields, list( + return bitfields + list( "appearance_flags" = list( "LONG_GLIDE" = LONG_GLIDE, "RESET_COLOR" = RESET_COLOR, @@ -226,6 +243,6 @@ GLOBAL_LIST_INIT(bitfields, list( ) */ - )) + ) #undef FLAG diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index cc2ae4540dd..2708a1e10d1 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -365,22 +365,22 @@ if(direction != dir) setDir(direction) -/obj/screen/click_catcher +/atom/movable/screen/click_catcher icon = 'icons/mob/screen_gen.dmi' icon_state = "click_catcher" plane = CLICKCATCHER_PLANE mouse_opacity = 2 screen_loc = "CENTER-7,CENTER-7" -/obj/screen/click_catcher/proc/MakeGreed() +/atom/movable/screen/click_catcher/proc/MakeGreed() . = list() for(var/i = 0, i<15, i++) for(var/j = 0, j<15, j++) - var/obj/screen/click_catcher/CC = new() + var/atom/movable/screen/click_catcher/CC = new() CC.screen_loc = "NORTH-[i],EAST-[j]" . += CC -/obj/screen/click_catcher/Click(location, control, params) +/atom/movable/screen/click_catcher/Click(location, control, params) var/list/modifiers = params2list(params) if(modifiers["middle"] && istype(usr, /mob/living/carbon)) var/mob/living/carbon/C = usr diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index 2c50a74bbfb..aec4f102041 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -103,10 +103,10 @@ /atom/proc/IsAutoclickable() . = 1 -/obj/screen/IsAutoclickable() +/atom/movable/screen/IsAutoclickable() . = 0 -/obj/screen/click_catcher/IsAutoclickable() +/atom/movable/screen/click_catcher/IsAutoclickable() . = 1 //Please don't roast me too hard diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index 2f246959f93..0fa326b9997 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -1,8 +1,8 @@ -/obj/screen/movable/ability_master +/atom/movable/screen/movable/ability_master name = "Abilities" icon = 'icons/mob/screen_spells.dmi' icon_state = "grey_spell_ready" - var/list/obj/screen/ability/ability_objects = list() + var/list/atom/movable/screen/ability/ability_objects = list() var/showing = 0 // If we're 'open' or not. var/open_state = "master_open" // What the button looks like when it's 'open', showing the other buttons. @@ -12,7 +12,7 @@ var/mob/my_mob = null // The mob that possesses this hud object. -/obj/screen/movable/ability_master/Initialize(mapload) +/atom/movable/screen/movable/ability_master/Initialize(mapload) . = ..() var/mob/owner = ismob(loc) && loc if(owner) @@ -21,7 +21,7 @@ else message_admins("ERROR: ability_master's New() was not given an owner argument. This is a bug.") -/obj/screen/movable/ability_master/Destroy() +/atom/movable/screen/movable/ability_master/Destroy() . = ..() //Get rid of the ability objects. remove_all_abilities() @@ -34,22 +34,22 @@ my_mob.client.screen -= src my_mob = null -/obj/screen/movable/ability_master/MouseDrop() +/atom/movable/screen/movable/ability_master/MouseDrop() if(showing) return return ..() -/obj/screen/movable/ability_master/Click() +/atom/movable/screen/movable/ability_master/Click() if(!ability_objects.len) // If we're empty for some reason. // qdel(src) return toggle_open() -/obj/screen/movable/ability_master/proc/toggle_open(var/forced_state = 0) +/atom/movable/screen/movable/ability_master/proc/toggle_open(var/forced_state = 0) if(showing && (forced_state != 2)) // We are closing the ability master, hide the abilities. - for(var/obj/screen/ability/O in ability_objects) + for(var/atom/movable/screen/ability/O in ability_objects) if(my_mob && my_mob.client) my_mob.client.screen -= O // O.handle_icon_updates = 0 @@ -64,7 +64,7 @@ overlays.Add(open_state) update_icon() -/obj/screen/movable/ability_master/proc/open_ability_master() +/atom/movable/screen/movable/ability_master/proc/open_ability_master() var/list/screen_loc_xy = splittext(screen_loc,",") //Create list of X offsets @@ -78,7 +78,7 @@ var/y_pix = screen_loc_Y[2] for(var/i = 1; i <= ability_objects.len; i++) - var/obj/screen/ability/A = ability_objects[i] + var/atom/movable/screen/ability/A = ability_objects[i] var/xpos = x_position + (x_position < 8 ? 1 : -1)*(i%7) var/ypos = y_position + (y_position < 8 ? round(i/7) : -round(i/7)) A.screen_loc = "[encode_screen_X(xpos)]:[x_pix],[encode_screen_Y(ypos)]:[y_pix]" @@ -86,25 +86,25 @@ my_mob.client.screen += A // A.handle_icon_updates = 1 -/obj/screen/movable/ability_master/proc/update_abilities(forced = 0, mob/user) +/atom/movable/screen/movable/ability_master/proc/update_abilities(forced = 0, mob/user) update_icon() if(user && user.client) if(!(src in user.client.screen)) user.client.screen += src var/i = 1 - for(var/obj/screen/ability/ability in ability_objects) + for(var/atom/movable/screen/ability/ability in ability_objects) ability.update_icon(forced) ability.index = i ability.maptext = "[ability.index]" // Slot number i++ -/obj/screen/movable/ability_master/update_icon() +/atom/movable/screen/movable/ability_master/update_icon() if(ability_objects.len) invisibility = 0 else invisibility = 101 -/obj/screen/movable/ability_master/proc/add_ability(var/name_given) +/atom/movable/screen/movable/ability_master/proc/add_ability(var/name_given) if(!name) return // if(spell.connected_button) //we have one already, for some reason @@ -119,7 +119,7 @@ // if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one // return - var/obj/screen/ability/new_button = new /obj/screen/ability + var/atom/movable/screen/ability/new_button = new /atom/movable/screen/ability new_button.ability_master = src // new_button.spell = spell @@ -139,7 +139,7 @@ if(my_mob.client) toggle_open(2) //forces the icons to refresh on screen -/obj/screen/movable/ability_master/proc/remove_ability(var/obj/screen/ability/ability) +/atom/movable/screen/movable/ability_master/proc/remove_ability(var/atom/movable/screen/ability/ability) if(!ability) return ability_objects.Remove(ability) @@ -152,24 +152,24 @@ // else // qdel(src) -/obj/screen/movable/ability_master/proc/remove_all_abilities() - for(var/obj/screen/ability/A in ability_objects) +/atom/movable/screen/movable/ability_master/proc/remove_all_abilities() + for(var/atom/movable/screen/ability/A in ability_objects) remove_ability(A) -/obj/screen/movable/ability_master/proc/get_ability_by_name(name_to_search) - for(var/obj/screen/ability/A in ability_objects) +/atom/movable/screen/movable/ability_master/proc/get_ability_by_name(name_to_search) + for(var/atom/movable/screen/ability/A in ability_objects) if(A.name == name_to_search) return A return null -/obj/screen/movable/ability_master/proc/get_ability_by_proc_ref(proc_ref) - for(var/obj/screen/ability/verb_based/V in ability_objects) +/atom/movable/screen/movable/ability_master/proc/get_ability_by_proc_ref(proc_ref) + for(var/atom/movable/screen/ability/verb_based/V in ability_objects) if(V.verb_to_call == proc_ref) return V return null -/obj/screen/movable/ability_master/proc/get_ability_by_instance(var/obj/instance/) - for(var/obj/screen/ability/obj_based/O in ability_objects) +/atom/movable/screen/movable/ability_master/proc/get_ability_by_instance(var/obj/instance/) + for(var/atom/movable/screen/ability/obj_based/O in ability_objects) if(O.object == instance) return O return null @@ -183,12 +183,12 @@ /mob/Initialize(mapload) . = ..() if(!ability_master) //VOREStation Edit: S H A D E K I N - ability_master = new /obj/screen/movable/ability_master(src) + ability_master = new /atom/movable/screen/movable/ability_master(src) ///////////ACTUAL ABILITIES//////////// //This is what you click to do things// /////////////////////////////////////// -/obj/screen/ability +/atom/movable/screen/ability icon = 'icons/mob/screen_spells.dmi' icon_state = "grey_spell_base" maptext_x = 3 @@ -197,11 +197,11 @@ var/index = 0 // var/spell/spell = null - var/obj/screen/movable/ability_master/ability_master + var/atom/movable/screen/movable/ability_master/ability_master // var/icon/last_charged_icon -/obj/screen/ability/Destroy() +/atom/movable/screen/ability/Destroy() if(ability_master) ability_master.ability_objects -= src if(ability_master.my_mob && ability_master.my_mob.client) @@ -212,7 +212,7 @@ ability_master = null ..() -/obj/screen/ability/update_icon() +/atom/movable/screen/ability/update_icon() // if(!spell) // qdel(src) // return @@ -252,7 +252,7 @@ // if(spell.silenced) // overlays += "silence" -/obj/screen/ability/Click() +/atom/movable/screen/ability/Click() if(!usr) // qdel(src) return @@ -260,23 +260,23 @@ // spell.perform(usr) activate() -/obj/screen/ability/MouseDrop(var/atom/A) +/atom/movable/screen/ability/MouseDrop(var/atom/A) if(!A || A == src) return - if(istype(A, /obj/screen/ability)) - var/obj/screen/ability/ability = A + if(istype(A, /atom/movable/screen/ability)) + var/atom/movable/screen/ability/ability = A if(ability.ability_master && ability.ability_master == src.ability_master) ability_master.ability_objects.Swap(src.index, ability.index) ability_master.toggle_open(2) // To update the UI. // Makes the ability be triggered. The subclasses of this are responsible for carrying it out in whatever way it needs to. -/obj/screen/ability/proc/activate() +/atom/movable/screen/ability/proc/activate() to_chat(world, "[src] had activate() called.") return // This checks if the ability can be used. -/obj/screen/ability/proc/can_activate() +/atom/movable/screen/ability/proc/can_activate() return 1 /client/verb/activate_ability(var/slot as num) @@ -291,19 +291,19 @@ return // No abilities. if(slot > mob.ability_master.ability_objects.len || slot <= 0) return // Out of bounds. - var/obj/screen/ability/A = mob.ability_master.ability_objects[slot] + var/atom/movable/screen/ability/A = mob.ability_master.ability_objects[slot] A.activate() //////////Verb Abilities////////// //Buttons to trigger verbs/procs// ////////////////////////////////// -/obj/screen/ability/verb_based +/atom/movable/screen/ability/verb_based var/verb_to_call = null var/object_used = null var/arguments_to_use = list() -/obj/screen/ability/verb_based/activate() +/atom/movable/screen/ability/verb_based/activate() if(object_used && verb_to_call) call(object_used,verb_to_call)(arguments_to_use) // call(object_used,verb_to_call)(arguments_to_use) @@ -313,14 +313,14 @@ // else // message_admins("ERROR: activate() on [ability_master.my_mob]'s [src] failed the hascall([object_used],[verb_to_call]) check.") -/obj/screen/movable/ability_master/proc/add_verb_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) +/atom/movable/screen/movable/ability_master/proc/add_verb_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) if(!object_given) message_admins("ERROR: add_verb_ability() was not given an object in its arguments.") if(!verb_given) message_admins("ERROR: add_verb_ability() was not given a verb/proc in its arguments.") if(get_ability_by_proc_ref(verb_given)) return // Duplicate - var/obj/screen/ability/verb_based/A = new /obj/screen/ability/verb_based() + var/atom/movable/screen/ability/verb_based/A = new /atom/movable/screen/ability/verb_based() A.ability_master = src A.object_used = object_given A.verb_to_call = verb_given @@ -333,18 +333,18 @@ toggle_open(2) //forces the icons to refresh on screen //Changeling Abilities -/obj/screen/ability/verb_based/changeling +/atom/movable/screen/ability/verb_based/changeling icon_state = "ling_spell_base" background_base_state = "ling" -/obj/screen/movable/ability_master/proc/add_ling_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) +/atom/movable/screen/movable/ability_master/proc/add_ling_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) if(!object_given) message_admins("ERROR: add_ling_ability() was not given an object in its arguments.") if(!verb_given) message_admins("ERROR: add_ling_ability() was not given a verb/proc in its arguments.") if(get_ability_by_proc_ref(verb_given)) return // Duplicate - var/obj/screen/ability/verb_based/changeling/A = new /obj/screen/ability/verb_based/changeling() + var/atom/movable/screen/ability/verb_based/changeling/A = new /atom/movable/screen/ability/verb_based/changeling() A.ability_master = src A.object_used = object_given A.verb_to_call = verb_given @@ -361,24 +361,24 @@ //Buttons to trigger objects// ////////////////////////////// -/obj/screen/ability/obj_based +/atom/movable/screen/ability/obj_based var/obj/object = null -/obj/screen/ability/obj_based/activate() +/atom/movable/screen/ability/obj_based/activate() if(object) object.Click() // Technomancer -/obj/screen/ability/obj_based/technomancer +/atom/movable/screen/ability/obj_based/technomancer icon_state = "wiz_spell_base" background_base_state = "wiz" -/obj/screen/movable/ability_master/proc/add_technomancer_ability(var/obj/object_given, var/ability_icon_given) +/atom/movable/screen/movable/ability_master/proc/add_technomancer_ability(var/obj/object_given, var/ability_icon_given) if(!object_given) message_admins("ERROR: add_technomancer_ability() was not given an object in its arguments.") if(get_ability_by_instance(object_given)) return // Duplicate - var/obj/screen/ability/obj_based/technomancer/A = new /obj/screen/ability/obj_based/technomancer() + var/atom/movable/screen/ability/obj_based/technomancer/A = new /atom/movable/screen/ability/obj_based/technomancer() A.ability_master = src A.object = object_given A.ability_icon_state = ability_icon_given diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 9789fb3d0c9..c7f099c1f7c 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -18,7 +18,7 @@ var/check_flags = 0 var/processing = 0 var/active = 0 - var/obj/screen/movable/action_button/button = null + var/atom/movable/screen/movable/action_button/button = null var/button_icon = 'icons/mob/actions.dmi' var/button_icon_state = "default" var/background_icon_state = "bg_default" @@ -111,11 +111,11 @@ /datum/action/proc/UpdateName() return name -/obj/screen/movable/action_button +/atom/movable/screen/movable/action_button var/datum/action/owner screen_loc = "WEST,NORTH" -/obj/screen/movable/action_button/Click(location,control,params) +/atom/movable/screen/movable/action_button/Click(location,control,params) var/list/modifiers = params2list(params) if(modifiers["shift"]) moved = 0 @@ -125,7 +125,7 @@ owner.Trigger() return 1 -/obj/screen/movable/action_button/proc/UpdateIcon() +/atom/movable/screen/movable/action_button/proc/UpdateIcon() if(!owner) return icon = owner.button_icon @@ -148,13 +148,13 @@ color = rgb(255,255,255,255) //Hide/Show Action Buttons ... Button -/obj/screen/movable/action_button/hide_toggle +/atom/movable/screen/movable/action_button/hide_toggle name = "Hide Buttons" icon = 'icons/mob/actions.dmi' icon_state = "bg_default" var/hidden = 0 -/obj/screen/movable/action_button/hide_toggle/Click() +/atom/movable/screen/movable/action_button/hide_toggle/Click() usr.hud_used.action_buttons_hidden = !usr.hud_used.action_buttons_hidden hidden = usr.hud_used.action_buttons_hidden @@ -166,7 +166,7 @@ usr.update_action_buttons() -/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user) +/atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user) if(isalien(user)) icon_state = "bg_alien" else @@ -174,7 +174,7 @@ UpdateIcon() return -/obj/screen/movable/action_button/hide_toggle/UpdateIcon() +/atom/movable/screen/movable/action_button/hide_toggle/UpdateIcon() overlays.Cut() var/image/img = image(icon,src,hidden?"show":"hide") overlays += img @@ -197,7 +197,7 @@ var/coord_row_offset = AB_NORTH_OFFSET return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]" -/datum/hud/proc/SetButtonCoords(var/obj/screen/button,var/number) +/datum/hud/proc/SetButtonCoords(var/atom/movable/screen/button,var/number) var/row = round((number-1)/AB_MAX_COLUMNS) var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1 var/x_offset = 32*(col-1) + AB_WEST_OFFSET + 2*col diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index c9e7e09faa3..84396fcad39 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -2,10 +2,10 @@ adding = list() other = list() - var/obj/screen/using + var/atom/movable/screen/using //AI core - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "AI Core" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "ai_core" @@ -14,7 +14,7 @@ adding += using //Camera list - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Show Camera List" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "camera" @@ -23,7 +23,7 @@ adding += using //Track - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Track With Camera" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "track" @@ -32,7 +32,7 @@ adding += using //Camera light - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Toggle Camera Light" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "camera_light" @@ -41,7 +41,7 @@ adding += using //Crew Monitoring - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Crew Monitoring" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "crew_monitor" @@ -50,7 +50,7 @@ adding += using //Crew Manifest - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Show Crew Manifest" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "manifest" @@ -59,7 +59,7 @@ adding += using //Alerts - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Show Alerts" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "alerts" @@ -68,7 +68,7 @@ adding += using //Announcement - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Announcement" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "announcement" @@ -77,7 +77,7 @@ adding += using //Shuttle - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Call Emergency Shuttle" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "call_shuttle" @@ -86,7 +86,7 @@ adding += using //Laws - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "State Laws" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "state_laws" @@ -95,7 +95,7 @@ adding += using //PDA message - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "PDA - Send Message" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "pda_send" @@ -104,7 +104,7 @@ adding += using //PDA log - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "PDA - Show Message Log" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "pda_receive" @@ -113,7 +113,7 @@ adding += using //Take image - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "Take Image" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "take_picture" @@ -122,7 +122,7 @@ adding += using //View images - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "View Images" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "view_images" diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 4fe3d89fe72..2898eb70038 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -16,7 +16,7 @@ if(!category) return - var/obj/screen/alert/alert + var/atom/movable/screen/alert/alert if(alerts[category]) alert = alerts[category] if(new_master && new_master != alert.master) @@ -56,13 +56,13 @@ alert.timeout = world.time + alert.timeout - world.tick_lag return alert -/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) clear_alert(category) // Proc to clear an existing alert. /mob/proc/clear_alert(category) - var/obj/screen/alert/alert = alerts[category] + var/atom/movable/screen/alert/alert = alerts[category] if(!alert) return 0 @@ -72,7 +72,7 @@ client.screen -= alert qdel(alert) -/obj/screen/alert +/atom/movable/screen/alert icon = 'icons/mob/screen_alert.dmi' icon_state = "default" name = "Alert" @@ -84,187 +84,187 @@ var/no_underlay // Don't underlay the UI style's blank template icon under this -/obj/screen/alert/MouseEntered(location,control,params) +/atom/movable/screen/alert/MouseEntered(location,control,params) openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle) -/obj/screen/alert/MouseExited() +/atom/movable/screen/alert/MouseExited() closeToolTip(usr) //Gas alerts -/obj/screen/alert/not_enough_oxy +/atom/movable/screen/alert/not_enough_oxy 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." icon_state = "not_enough_oxy" -/obj/screen/alert/too_much_oxy +/atom/movable/screen/alert/too_much_oxy 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!" icon_state = "too_much_oxy" -/obj/screen/alert/not_enough_nitro +/atom/movable/screen/alert/not_enough_nitro name = "Choking (No N)" desc = "You're not getting enough nitrogen. Find some good air before you pass out!" icon_state = "not_enough_nitro" -/obj/screen/alert/too_much_nitro +/atom/movable/screen/alert/too_much_nitro name = "Choking (N)" 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" -/obj/screen/alert/not_enough_co2 +/atom/movable/screen/alert/not_enough_co2 name = "Choking (No CO2)" desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!" icon_state = "not_enough_co2" -/obj/screen/alert/too_much_co2 +/atom/movable/screen/alert/too_much_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!" icon_state = "too_much_co2" -/obj/screen/alert/too_much_co2/plant +/atom/movable/screen/alert/too_much_co2/plant name = "Livin' the good life" desc = "There's so much carbon dioxide in the air, you're in fucking heaven. Watch out for passed out fleshies, though." icon_state = "too_much_co2" -/obj/screen/alert/not_enough_tox +/atom/movable/screen/alert/not_enough_tox name = "Choking (No Phoron)" desc = "You're not getting enough phoron. Find some good air before you pass out!" icon_state = "not_enough_tox" -/obj/screen/alert/tox_in_air +/atom/movable/screen/alert/tox_in_air name = "Choking (Phoron)" desc = "There's highly flammable, toxic phoron 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" -/obj/screen/alert/not_enough_fuel +/atom/movable/screen/alert/not_enough_fuel name = "Choking (No Volatile fuel)" desc = "You're not getting enough volatile fuel. Find some good air before you pass out!" icon_state = "not_enough_tox" -/obj/screen/alert/not_enough_n2o +/atom/movable/screen/alert/not_enough_n2o name = "Choking (No Sleeping Gas)" desc = "You're not getting enough sleeping gas. Find some good air before you pass out!" icon_state = "not_enough_tox" //End gas alerts -/obj/screen/alert/fat +/atom/movable/screen/alert/fat name = "Fat" desc = "You ate too much food, lardass. Run around the station and lose some weight." icon_state = "fat" -/obj/screen/alert/fat/vampire +/atom/movable/screen/alert/fat/vampire desc = "You drank too much blood, lardass. Run around the station and lose some weight." icon_state = "v_fat" -/obj/screen/alert/fat/synth +/atom/movable/screen/alert/fat/synth desc = "Your battery is full! Don't overvolt it." icon_state = "c_fat" -/obj/screen/alert/hungry +/atom/movable/screen/alert/hungry name = "Hungry" desc = "Some food would be good right about now." icon_state = "hungry" -/obj/screen/alert/hungry/vampire +/atom/movable/screen/alert/hungry/vampire desc = "You could use a bloodsnack or two." icon_state = "v_hungry" -/obj/screen/alert/hungry/synth +/atom/movable/screen/alert/hungry/synth desc = "Battery's running a bit low, could use a topoff." icon_state = "c_hungry" -/obj/screen/alert/starving +/atom/movable/screen/alert/starving name = "Starving" desc = "You're severely malnourished. The hunger pains make moving around a chore." icon_state = "starving" -/obj/screen/alert/starving/vampire +/atom/movable/screen/alert/starving/vampire desc = "You *need* blood; go rip out someone's throat already!" icon_state = "v_starving" -/obj/screen/alert/starving/synth +/atom/movable/screen/alert/starving/synth desc = "Your battery is about to die! Charge it ASAP!" icon_state = "c_starving" -/obj/screen/alert/hot +/atom/movable/screen/alert/hot name = "Too Hot" desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit." icon_state = "hot" -/obj/screen/alert/hot/robot +/atom/movable/screen/alert/hot/robot desc = "The air around you is too hot for a humanoid. Be careful to avoid exposing them to this enviroment." -/obj/screen/alert/cold +/atom/movable/screen/alert/cold name = "Too Cold" desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit." icon_state = "cold" -/obj/screen/alert/cold/robot +/atom/movable/screen/alert/cold/robot desc = "The air around you is too cold for a humanoid. Be careful to avoid exposing them to this enviroment." -/obj/screen/alert/lowpressure +/atom/movable/screen/alert/lowpressure name = "Low Pressure" desc = "The air around you is hazardously thin. A space suit would protect you." icon_state = "lowpressure" -/obj/screen/alert/highpressure +/atom/movable/screen/alert/highpressure name = "High Pressure" desc = "The air around you is hazardously thick. A fire suit would protect you." icon_state = "highpressure" -/obj/screen/alert/blind +/atom/movable/screen/alert/blind name = "Blind" desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \ or something covering your eyes." icon_state = "blind" -/obj/screen/alert/stunned +/atom/movable/screen/alert/stunned name = "Stunned" desc = "You're temporarily stunned! You'll have trouble moving or performing actions, but it should clear up on it's own." icon_state = "stun" -/obj/screen/alert/paralyzed +/atom/movable/screen/alert/paralyzed name = "Paralyzed" desc = "You're paralyzed! This could be due to drugs or serious injury. You'll be unable to move or perform actions." icon_state = "paralysis" -/obj/screen/alert/weakened +/atom/movable/screen/alert/weakened name = "Weakened" desc = "You're weakened! This could be a temporary issue due to injury or the result of drugs or drinking." icon_state = "weaken" -/obj/screen/alert/confused +/atom/movable/screen/alert/confused name = "Confused" desc = "You're confused, and may stumble into things! This may be from concussive effects, drugs, or dizzyness. Walking will help reduce incidents." icon_state = "confused" -/obj/screen/alert/high +/atom/movable/screen/alert/high name = "High" desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already." icon_state = "high" -/obj/screen/alert/embeddedobject +/atom/movable/screen/alert/embeddedobject 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. \ If you're feeling frisky, right click on yourself and select \"Remove embedded object\" to pull the object out." icon_state = "embeddedobject" -/obj/screen/alert/embeddedobject/Click() +/atom/movable/screen/alert/embeddedobject/Click() if(isliving(usr)) var/mob/living/carbon/human/M = usr return M.help_shake_act(M) -/obj/screen/alert/asleep +/atom/movable/screen/alert/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." icon_state = "asleep" -/obj/screen/alert/weightless +/atom/movable/screen/alert/weightless name = "Weightless" 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 \ @@ -272,12 +272,12 @@ 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." icon_state = "weightless" -/obj/screen/alert/fire +/atom/movable/screen/alert/fire name = "On Fire" desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area." icon_state = "fire" -/obj/screen/alert/fire/Click() +/atom/movable/screen/alert/fire/Click() if(isliving(usr)) var/mob/living/L = usr return L.resist() @@ -285,20 +285,20 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." //ALIENS -/obj/screen/alert/alien_tox +/atom/movable/screen/alert/alien_tox name = "Plasma" desc = "There's flammable plasma in the air. If it lights up, you'll be toast." icon_state = "alien_tox" 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 name = "Too Hot" 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" alerttooltipstyle = "alien" -/obj/screen/alert/alien_vulnerable +/atom/movable/screen/alert/alien_vulnerable 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." icon_state = "alien_noqueen" @@ -306,7 +306,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." //BLOBS -/obj/screen/alert/nofactory +/atom/movable/screen/alert/nofactory name = "No Factory" desc = "You have no factory, and are slowly dying!" icon_state = "blobbernaut_nofactory" @@ -314,37 +314,37 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." //SILICONS -/obj/screen/alert/nocell +/atom/movable/screen/alert/nocell name = "Missing Power Cell" desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance." icon_state = "nocell" -/obj/screen/alert/emptycell +/atom/movable/screen/alert/emptycell name = "Out of Power" 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." icon_state = "emptycell" -/obj/screen/alert/lowcell +/atom/movable/screen/alert/lowcell name = "Low Charge" desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite." icon_state = "lowcell" //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" desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any." icon_state = "hacked" no_underlay = TRUE -/obj/screen/alert/locked +/atom/movable/screen/alert/locked name = "Locked Down" desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \ office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary." icon_state = "locked" no_underlay = TRUE -/obj/screen/alert/newlaw +/atom/movable/screen/alert/newlaw name = "Law Update" 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." @@ -354,7 +354,7 @@ so as to remain in compliance with the most up-to-date laws." //MECHS -/obj/screen/alert/low_mech_integrity +/atom/movable/screen/alert/low_mech_integrity name = "Mech Damaged" desc = "Mech integrity is low." icon_state = "low_mech_integrity" @@ -362,18 +362,18 @@ so as to remain in compliance with the most up-to-date laws." //GHOSTS //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" desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!" icon_state = "template" timeout = 300 -/obj/screen/alert/notify_cloning/Click() +/atom/movable/screen/alert/notify_cloning/Click() if(!usr || !usr.client) return var/mob/observer/dead/G = usr G.reenter_corpse() -// /obj/screen/alert/notify_jump +// /atom/movable/screen/alert/notify_jump // name = "Body created" // desc = "A body was created. You can enter it." // icon_state = "template" @@ -381,7 +381,7 @@ so as to remain in compliance with the most up-to-date laws." // var/atom/jump_target = null // var/attack_not_jump = null -// /obj/screen/alert/notify_jump/Click() +// /atom/movable/screen/alert/notify_jump/Click() // if(!usr || !usr.client) return // if(!jump_target) return // var/mob/dead/observer/G = usr @@ -395,19 +395,19 @@ so as to remain in compliance with the most up-to-date laws." //OBJECT-BASED -/obj/screen/alert/restrained/buckled +/atom/movable/screen/alert/restrained/buckled name = "Buckled" desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed." -/obj/screen/alert/restrained/handcuffed +/atom/movable/screen/alert/restrained/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." -/obj/screen/alert/restrained/legcuffed +/atom/movable/screen/alert/restrained/legcuffed name = "Legcuffed" 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() if(isliving(usr)) var/mob/living/L = usr return L.resist() @@ -421,7 +421,7 @@ so as to remain in compliance with the most up-to-date laws." mymob.client.screen -= alerts[alerts[i]] return 1 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 in icon_states(ui_style)) alert.icon = ui_style @@ -450,9 +450,9 @@ so as to remain in compliance with the most up-to-date laws." return 1 /mob - var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly + var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly -/obj/screen/alert/Click(location, control, params) +/atom/movable/screen/alert/Click(location, control, params) if(!usr || !usr.client) return var/paramslist = params2list(params) @@ -462,7 +462,7 @@ so as to remain in compliance with the most up-to-date laws." if(master) return usr.client.Click(master, location, control, params) -/obj/screen/alert/Destroy() +/atom/movable/screen/alert/Destroy() ..() severity = 0 master = null diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 9b860f5d074..47634390a0e 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -3,9 +3,9 @@ src.adding = list() src.other = list() - var/obj/screen/using + var/atom/movable/screen/using - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "mov_intent" using.setDir(SOUTHWEST) using.icon = 'icons/mob/screen1_alien.dmi' @@ -15,13 +15,13 @@ src.adding += using move_intent = using - mymob.healths = new /obj/screen() + mymob.healths = new /atom/movable/screen() mymob.healths.icon = 'icons/mob/screen1_alien.dmi' mymob.healths.icon_state = "health0" mymob.healths.name = "health" mymob.healths.screen_loc = ui_alien_health - mymob.fire = new /obj/screen() + mymob.fire = new /atom/movable/screen() mymob.fire.icon = 'icons/mob/screen1_alien.dmi' mymob.fire.icon_state = "fire0" mymob.fire.name = "fire" diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index c772d2836ea..1a7ecd02133 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -5,7 +5,7 @@ condition ? overlay_fullscreen(screen_name, screen_type, arg) : clear_fullscreen(screen_name) /mob/proc/overlay_fullscreen(category, type, severity) - var/obj/screen/fullscreen/screen = screens[category] + var/atom/movable/screen/fullscreen/screen = screens[category] if(screen) if(screen.type != type) @@ -26,7 +26,7 @@ return screen /mob/proc/clear_fullscreen(category, animated = 10) - var/obj/screen/fullscreen/screen = screens[category] + var/atom/movable/screen/fullscreen/screen = screens[category] if(!screen) return @@ -58,7 +58,7 @@ for(var/category in screens) client.screen |= screens[category] -/obj/screen/fullscreen +/atom/movable/screen/fullscreen icon = 'icons/mob/screen_full.dmi' icon_state = "default" screen_loc = "CENTER-7,CENTER-7" @@ -67,60 +67,60 @@ mouse_opacity = 0 var/severity = 0 -/obj/screen/fullscreen/Destroy() +/atom/movable/screen/fullscreen/Destroy() severity = 0 return ..() -/obj/screen/fullscreen/brute +/atom/movable/screen/fullscreen/brute icon_state = "brutedamageoverlay" layer = DAMAGE_SCREEN_LAYER -/obj/screen/fullscreen/oxy +/atom/movable/screen/fullscreen/oxy icon_state = "oxydamageoverlay" layer = DAMAGE_SCREEN_LAYER -/obj/screen/fullscreen/crit +/atom/movable/screen/fullscreen/crit icon_state = "passage" layer = CRIT_LAYER -/obj/screen/fullscreen/blind +/atom/movable/screen/fullscreen/blind icon_state = "blackimageoverlay" layer = BLIND_LAYER -/obj/screen/fullscreen/impaired +/atom/movable/screen/fullscreen/impaired icon_state = "impairedoverlay" -/obj/screen/fullscreen/blurry +/atom/movable/screen/fullscreen/blurry icon = 'icons/mob/screen1.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" icon_state = "blurry" -/obj/screen/fullscreen/flash +/atom/movable/screen/fullscreen/flash icon = 'icons/mob/screen1.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" icon_state = "flash_static" -/obj/screen/fullscreen/flash/noise +/atom/movable/screen/fullscreen/flash/noise icon_state = "noise" -/obj/screen/fullscreen/high +/atom/movable/screen/fullscreen/high icon = 'icons/mob/screen1.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" icon_state = "druggy" -/obj/screen/fullscreen/noise +/atom/movable/screen/fullscreen/noise icon = 'icons/effects/static.dmi' icon_state = "1 light" screen_loc = ui_entire_screen layer = FULLSCREEN_LAYER -/obj/screen/fullscreen/scanline +/atom/movable/screen/fullscreen/scanline icon = 'icons/effects/static.dmi' icon_state = "scanlines" screen_loc = ui_entire_screen alpha = 50 layer = FULLSCREEN_LAYER -/obj/screen/fullscreen/fishbed +/atom/movable/screen/fullscreen/fishbed icon_state = "fishbed" diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index ae8a849f89b..ea936f061cf 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -1,92 +1,92 @@ -/obj/screen/ghost +/atom/movable/screen/ghost icon = 'icons/mob/screen_ghost.dmi' -/obj/screen/ghost/MouseEntered(location,control,params) +/atom/movable/screen/ghost/MouseEntered(location,control,params) flick(icon_state + "_anim", src) openToolTip(usr, src, params, title = name, content = desc) -/obj/screen/ghost/MouseExited() +/atom/movable/screen/ghost/MouseExited() closeToolTip(usr) -/obj/screen/ghost/Click() +/atom/movable/screen/ghost/Click() closeToolTip(usr) -/obj/screen/ghost/returntomenu +/atom/movable/screen/ghost/returntomenu name = "Respawn" desc = "Return to the title screen menu." icon_state = "returntomenu" -/obj/screen/ghost/returntomenu/Click() +/atom/movable/screen/ghost/returntomenu/Click() ..() var/mob/observer/dead/G = usr G.abandon_mob() -/obj/screen/ghost/jumptomob +/atom/movable/screen/ghost/jumptomob name = "Jump to mob" desc = "Pick a mob from a list to jump to." icon_state = "jumptomob" -/obj/screen/ghost/jumptomob/Click() +/atom/movable/screen/ghost/jumptomob/Click() ..() var/mob/observer/dead/G = usr G.jumptomob() -/obj/screen/ghost/orbit +/atom/movable/screen/ghost/orbit name = "Orbit" desc = "Pick a mob to follow and orbit." icon_state = "orbit" -/obj/screen/ghost/orbit/Click() +/atom/movable/screen/ghost/orbit/Click() ..() var/mob/observer/dead/G = usr G.follow() -/obj/screen/ghost/reenter_corpse +/atom/movable/screen/ghost/reenter_corpse name = "Reenter corpse" desc = "Only applicable if you HAVE a corpse..." icon_state = "reenter_corpse" -/obj/screen/ghost/reenter_corpse/Click() +/atom/movable/screen/ghost/reenter_corpse/Click() ..() var/mob/observer/dead/G = usr G.reenter_corpse() -/obj/screen/ghost/teleport +/atom/movable/screen/ghost/teleport name = "Teleport" desc = "Pick an area to teleport to." icon_state = "teleport" -/obj/screen/ghost/teleport/Click() +/atom/movable/screen/ghost/teleport/Click() ..() var/mob/observer/dead/G = usr G.dead_tele() -/obj/screen/ghost/pai +/atom/movable/screen/ghost/pai name = "pAI Alert" desc = "Ping all the unoccupied pAI devices in the world." icon_state = "pai" -/obj/screen/ghost/pai/Click() +/atom/movable/screen/ghost/pai/Click() ..() var/mob/observer/dead/G = usr G.paialert() -/obj/screen/ghost/up +/atom/movable/screen/ghost/up name = "Move Upwards" desc = "Move up a z-level." icon_state = "up" -/obj/screen/ghost/up/Click() +/atom/movable/screen/ghost/up/Click() ..() var/mob/observer/dead/G = usr G.zMove(UP) -/obj/screen/ghost/down +/atom/movable/screen/ghost/down name = "Move Downwards" desc = "Move down a z-level." icon_state = "down" -/obj/screen/ghost/down/Click() +/atom/movable/screen/ghost/down/Click() ..() var/mob/observer/dead/G = usr G.zMove(DOWN) @@ -95,43 +95,43 @@ var/list/adding = list() - var/obj/screen/using - using = new /obj/screen/ghost/returntomenu() + var/atom/movable/screen/using + using = new /atom/movable/screen/ghost/returntomenu() using.screen_loc = ui_ghost_returntomenu using.hud = src adding += using - using = new /obj/screen/ghost/jumptomob() + using = new /atom/movable/screen/ghost/jumptomob() using.screen_loc = ui_ghost_jumptomob using.hud = src adding += using - using = new /obj/screen/ghost/orbit() + using = new /atom/movable/screen/ghost/orbit() using.screen_loc = ui_ghost_orbit using.hud = src adding += using - using = new /obj/screen/ghost/reenter_corpse() + using = new /atom/movable/screen/ghost/reenter_corpse() using.screen_loc = ui_ghost_reenter_corpse using.hud = src adding += using - using = new /obj/screen/ghost/teleport() + using = new /atom/movable/screen/ghost/teleport() using.screen_loc = ui_ghost_teleport using.hud = src adding += using - using = new /obj/screen/ghost/pai() + using = new /atom/movable/screen/ghost/pai() using.screen_loc = ui_ghost_pai using.hud = src adding += using - using = new /obj/screen/ghost/up() + using = new /atom/movable/screen/ghost/up() using.screen_loc = ui_ghost_updown using.hud = src adding += using - using = new /obj/screen/ghost/down() + using = new /atom/movable/screen/ghost/down() using.screen_loc = ui_ghost_updown using.hud = src adding += using diff --git a/code/_onclick/hud/gun_mode.dm b/code/_onclick/hud/gun_mode.dm index e5d1fbce37d..85b4f7cf605 100644 --- a/code/_onclick/hud/gun_mode.dm +++ b/code/_onclick/hud/gun_mode.dm @@ -1,20 +1,20 @@ -/obj/screen/gun +/atom/movable/screen/gun name = "gun" icon = 'icons/mob/screen1.dmi' master = null dir = 2 -/obj/screen/gun/Click(location, control, params) +/atom/movable/screen/gun/Click(location, control, params) if(!usr) return return 1 -/obj/screen/gun/move +/atom/movable/screen/gun/move name = "Allow Movement" icon_state = "no_walk0" screen_loc = ui_gun2 -/obj/screen/gun/move/Click(location, control, params) +/atom/movable/screen/gun/move/Click(location, control, params) if(..()) var/mob/living/user = usr if(istype(user)) @@ -23,12 +23,12 @@ return 1 return 0 -/obj/screen/gun/item +/atom/movable/screen/gun/item name = "Allow Item Use" icon_state = "no_item0" screen_loc = ui_gun1 -/obj/screen/gun/item/Click(location, control, params) +/atom/movable/screen/gun/item/Click(location, control, params) if(..()) var/mob/living/user = usr if(istype(user)) @@ -37,12 +37,12 @@ return 1 return 0 -/obj/screen/gun/mode +/atom/movable/screen/gun/mode name = "Toggle Gun Mode" icon_state = "gun0" screen_loc = ui_gun_select -/obj/screen/gun/mode/Click(location, control, params) +/atom/movable/screen/gun/mode/Click(location, control, params) if(..()) var/mob/living/user = usr if(istype(user)) @@ -51,12 +51,12 @@ return 1 return 0 -/obj/screen/gun/radio +/atom/movable/screen/gun/radio name = "Allow Radio Use" icon_state = "no_radio0" screen_loc = ui_gun4 -/obj/screen/gun/radio/Click(location, control, params) +/atom/movable/screen/gun/radio/Click(location, control, params) if(..()) var/mob/living/user = usr if(istype(user)) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index f268b902c91..410fd5f5628 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -6,33 +6,33 @@ GLOBAL_DATUM_INIT(global_hud, /datum/global_hud, new) /datum/hud - var/obj/screen/grab_intent - var/obj/screen/hurt_intent - var/obj/screen/disarm_intent - var/obj/screen/help_intent + var/atom/movable/screen/grab_intent + var/atom/movable/screen/hurt_intent + var/atom/movable/screen/disarm_intent + var/atom/movable/screen/help_intent /datum/global_hud - var/obj/screen/druggy - var/obj/screen/blurry - var/obj/screen/whitense + var/atom/movable/screen/druggy + var/atom/movable/screen/blurry + var/atom/movable/screen/whitense var/list/vimpaired var/list/darkMask - var/obj/screen/centermarker - var/obj/screen/darksight - var/obj/screen/nvg - var/obj/screen/thermal - var/obj/screen/meson - var/obj/screen/science - var/obj/screen/material - var/obj/screen/yellow - var/obj/screen/blue - var/obj/screen/pink - var/obj/screen/beige - var/obj/screen/orange - var/obj/screen/holomap + var/atom/movable/screen/centermarker + var/atom/movable/screen/darksight + var/atom/movable/screen/nvg + var/atom/movable/screen/thermal + var/atom/movable/screen/meson + var/atom/movable/screen/science + var/atom/movable/screen/material + var/atom/movable/screen/yellow + var/atom/movable/screen/blue + var/atom/movable/screen/pink + var/atom/movable/screen/beige + var/atom/movable/screen/orange + var/atom/movable/screen/holomap /datum/global_hud/proc/setup_overlay(var/icon_state) - var/obj/screen/screen = new /obj/screen() + var/atom/movable/screen/screen = new /atom/movable/screen() screen.screen_loc = "1,1" screen.icon = 'icons/obj/hud_full.dmi' screen.icon_state = icon_state @@ -42,39 +42,39 @@ GLOBAL_DATUM_INIT(global_hud, /datum/global_hud, new) return screen -/obj/screen/global_screen +/atom/movable/screen/global_screen screen_loc = ui_entire_screen plane = PLANE_FULLSCREEN mouse_opacity = 0 /datum/global_hud/New() //420erryday psychedellic colours screen overlay for when you are high - druggy = new /obj/screen/global_screen() + druggy = new /atom/movable/screen/global_screen() druggy.icon_state = "druggy" //that white blurry effect you get when you eyes are damaged - blurry = new /obj/screen/global_screen() + blurry = new /atom/movable/screen/global_screen() blurry.icon_state = "blurry" //static overlay effect for cameras and the like - whitense = new /obj/screen/global_screen() + whitense = new /atom/movable/screen/global_screen() whitense.icon = 'icons/effects/static.dmi' whitense.icon_state = "1 light" //darksight 'hanger' for attached icons - darksight = new /obj/screen() + darksight = new /atom/movable/screen() darksight.icon = null darksight.screen_loc = "1,1" darksight.plane = PLANE_LIGHTING //Marks the center of the screen, for things like ventcrawl - centermarker = new /obj/screen() + centermarker = new /atom/movable/screen() centermarker.icon = 'icons/mob/screen1.dmi' centermarker.icon_state = "centermarker" centermarker.screen_loc = "CENTER,CENTER" //Marks the center of the screen, for things like ventcrawl - centermarker = new /obj/screen() + centermarker = new /atom/movable/screen() centermarker.icon = 'icons/mob/screen1.dmi' centermarker.icon_state = "centermarker" centermarker.screen_loc = "CENTER,CENTER" @@ -96,16 +96,16 @@ GLOBAL_DATUM_INIT(global_hud, /datum/global_hud, new) // Why do they work this way? I don't know really, that is how /vg designed them, but since they DO // work this way, we can take advantage of their immutability by making them part of // the global_hud (something we have and /vg doesn't) instead of an instance per mob. - holomap = new /obj/screen() + holomap = new /atom/movable/screen() holomap.name = "holomap" holomap.icon = null holomap.screen_loc = ui_holomap holomap.mouse_opacity = 0 - var/obj/screen/O + var/atom/movable/screen/O var/i //that nasty looking dither you get when you're short-sighted - vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen) + vimpaired = newlist(/atom/movable/screen,/atom/movable/screen,/atom/movable/screen,/atom/movable/screen) O = vimpaired[1] O.screen_loc = "1,1 to 5,15" O.plane = PLANE_FULLSCREEN @@ -120,7 +120,7 @@ GLOBAL_DATUM_INIT(global_hud, /datum/global_hud, new) O.plane = PLANE_FULLSCREEN //welding mask overlay black/dither - darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen) + darkMask = newlist(/atom/movable/screen, /atom/movable/screen, /atom/movable/screen, /atom/movable/screen, /atom/movable/screen, /atom/movable/screen, /atom/movable/screen, /atom/movable/screen) O = darkMask[1] O.screen_loc = "WEST+2,SOUTH+2 to WEST+4,NORTH-2" O = darkMask[2] @@ -169,24 +169,24 @@ GLOBAL_DATUM_INIT(global_hud, /datum/global_hud, new) var/show_intent_icons = 0 var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons) - var/obj/screen/lingchemdisplay - var/obj/screen/wiz_instability_display - var/obj/screen/wiz_energy_display - var/obj/screen/blobpwrdisplay - var/obj/screen/blobhealthdisplay - var/obj/screen/r_hand_hud_object - var/obj/screen/l_hand_hud_object - var/obj/screen/action_intent - var/obj/screen/move_intent + var/atom/movable/screen/lingchemdisplay + var/atom/movable/screen/wiz_instability_display + var/atom/movable/screen/wiz_energy_display + var/atom/movable/screen/blobpwrdisplay + var/atom/movable/screen/blobhealthdisplay + var/atom/movable/screen/r_hand_hud_object + var/atom/movable/screen/l_hand_hud_object + var/atom/movable/screen/action_intent + var/atom/movable/screen/move_intent var/list/static_inventory = list() //the screen objects which are static var/list/adding var/list/other var/list/miniobjs - var/list/obj/screen/hotkeybuttons + var/list/atom/movable/screen/hotkeybuttons - 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 = 0 var/list/slot_info diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 2a3761efe0f..9e59c606f35 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -17,14 +17,14 @@ src.slot_info = list() var/list/hud_elements = list() - var/obj/screen/using - var/obj/screen/inventory/inv_box + var/atom/movable/screen/using + var/atom/movable/screen/inventory/inv_box // Draw the various inventory equipment slots. var/has_hidden_gear for(var/gear_slot in hud_data.gear) - inv_box = new /obj/screen/inventory() + inv_box = new /atom/movable/screen/inventory() inv_box.icon = ui_style inv_box.color = ui_color inv_box.alpha = ui_alpha @@ -46,7 +46,7 @@ src.adding += inv_box if(has_hidden_gear) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "toggle" using.icon = ui_style using.icon_state = "other" @@ -59,7 +59,7 @@ // Draw the attack intent dialogue. if(hud_data.has_a_intent) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "act_intent" using.icon = ui_style using.icon_state = "intent_"+mymob.a_intent @@ -77,7 +77,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height()) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_HELP using.icon = ico using.screen_loc = ui_acti @@ -89,7 +89,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height()) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_DISARM using.icon = ico using.screen_loc = ui_acti @@ -101,7 +101,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_GRAB using.icon = ico using.screen_loc = ui_acti @@ -113,7 +113,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_HARM using.icon = ico using.screen_loc = ui_acti @@ -124,7 +124,7 @@ //end intent small hud objects if(hud_data.has_m_intent) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "mov_intent" using.icon = ui_style using.icon_state = (mymob.m_intent == "run" ? "running" : "walking") @@ -135,7 +135,7 @@ move_intent = using if(hud_data.has_drop) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "drop" using.icon = ui_style using.icon_state = "act_drop" @@ -146,7 +146,7 @@ if(hud_data.has_hands) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "equip" using.icon = ui_style using.icon_state = "act_equip" @@ -155,7 +155,7 @@ using.alpha = ui_alpha src.adding += using - inv_box = new /obj/screen/inventory/hand() + inv_box = new /atom/movable/screen/inventory/hand() inv_box.hud = src inv_box.name = "r_hand" inv_box.icon = ui_style @@ -170,7 +170,7 @@ src.adding += inv_box slot_info["[slot_r_hand]"] = inv_box.screen_loc - inv_box = new /obj/screen/inventory/hand() + inv_box = new /atom/movable/screen/inventory/hand() inv_box.hud = src inv_box.name = "l_hand" inv_box.icon = ui_style @@ -185,7 +185,7 @@ src.adding += inv_box slot_info["[slot_l_hand]"] = inv_box.screen_loc - using = new /obj/screen/inventory() + using = new /atom/movable/screen/inventory() using.name = "hand" using.icon = ui_style using.icon_state = "hand1" @@ -194,7 +194,7 @@ using.alpha = ui_alpha src.adding += using - using = new /obj/screen/inventory() + using = new /atom/movable/screen/inventory() using.name = "hand" using.icon = ui_style using.icon_state = "hand2" @@ -204,7 +204,7 @@ src.adding += using if(hud_data.has_resist) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "resist" using.icon = ui_style using.icon_state = "act_resist" @@ -214,7 +214,7 @@ src.hotkeybuttons += using if(hud_data.has_throw) - mymob.throw_icon = new /obj/screen() + mymob.throw_icon = new /atom/movable/screen() mymob.throw_icon.icon = ui_style mymob.throw_icon.icon_state = "act_throw_off" mymob.throw_icon.name = "throw" @@ -224,7 +224,7 @@ src.hotkeybuttons += mymob.throw_icon hud_elements |= mymob.throw_icon - mymob.pullin = new /obj/screen() + mymob.pullin = new /atom/movable/screen() mymob.pullin.icon = ui_style mymob.pullin.icon_state = "pull0" mymob.pullin.name = "pull" @@ -233,7 +233,7 @@ hud_elements |= mymob.pullin if(hud_data.has_internals) - mymob.internals = new /obj/screen() + mymob.internals = new /atom/movable/screen() mymob.internals.icon = ui_style mymob.internals.icon_state = "internal[target?.internal? 1 : 0]" mymob.internals.name = "internal" @@ -241,28 +241,28 @@ hud_elements |= mymob.internals if(hud_data.has_warnings) - mymob.oxygen = new /obj/screen() + mymob.oxygen = new /atom/movable/screen() mymob.oxygen.icon = ui_style mymob.oxygen.icon_state = "oxy0" mymob.oxygen.name = "oxygen" mymob.oxygen.screen_loc = ui_oxygen hud_elements |= mymob.oxygen - mymob.toxin = new /obj/screen() + mymob.toxin = new /atom/movable/screen() mymob.toxin.icon = ui_style mymob.toxin.icon_state = "tox0" mymob.toxin.name = "toxin" mymob.toxin.screen_loc = ui_toxin hud_elements |= mymob.toxin - mymob.fire = new /obj/screen() + mymob.fire = new /atom/movable/screen() mymob.fire.icon = ui_style mymob.fire.icon_state = "fire0" mymob.fire.name = "fire" mymob.fire.screen_loc = ui_fire hud_elements |= mymob.fire - mymob.healths = new /obj/screen() + mymob.healths = new /atom/movable/screen() mymob.healths.icon = ui_style mymob.healths.icon_state = "health0" mymob.healths.name = "health" @@ -270,7 +270,7 @@ hud_elements |= mymob.healths if(hud_data.has_pressure) - mymob.pressure = new /obj/screen() + mymob.pressure = new /atom/movable/screen() mymob.pressure.icon = ui_style mymob.pressure.icon_state = "pressure0" mymob.pressure.name = "pressure" @@ -278,7 +278,7 @@ hud_elements |= mymob.pressure if(hud_data.has_bodytemp) - mymob.bodytemp = new /obj/screen() + mymob.bodytemp = new /atom/movable/screen() mymob.bodytemp.icon = ui_style mymob.bodytemp.icon_state = "temp1" mymob.bodytemp.name = "body temperature" @@ -286,14 +286,14 @@ hud_elements |= mymob.bodytemp if(target.isSynthetic()) //are we a synth? - mymob.synthbattery_icon = new /obj/screen() + mymob.synthbattery_icon = new /atom/movable/screen() mymob.synthbattery_icon.icon = 'icons/mob/screen1_robot.dmi' //dont define a new ui_style when we are only changing a single entry mymob.synthbattery_icon.icon_state = "charge0" //use the power cell icons for robots; burger icons OUT mymob.synthbattery_icon.name = "cell" mymob.synthbattery_icon.screen_loc = ui_nutrition hud_elements |= mymob.synthbattery_icon else //resume business as usual otherwise - mymob.nutrition_icon = new /obj/screen() + mymob.nutrition_icon = new /atom/movable/screen() mymob.nutrition_icon.icon = ui_style mymob.nutrition_icon.icon_state = "nutrition0" mymob.nutrition_icon.name = "nutrition" @@ -301,41 +301,41 @@ hud_elements |= mymob.nutrition_icon //VOREStation Addition begin - mymob.shadekin_dark_display = new /obj/screen/shadekin/darkness() + mymob.shadekin_dark_display = new /atom/movable/screen/shadekin/darkness() mymob.shadekin_dark_display.screen_loc = ui_shadekin_dark_display mymob.shadekin_dark_display.icon_state = "dark" hud_elements |= mymob.shadekin_dark_display - mymob.shadekin_energy_display = new /obj/screen/shadekin/energy() + mymob.shadekin_energy_display = new /atom/movable/screen/shadekin/energy() mymob.shadekin_energy_display.screen_loc = ui_shadekin_energy_display mymob.shadekin_energy_display.icon_state = "energy0" hud_elements |= mymob.shadekin_energy_display - mymob.xenochimera_danger_display = new /obj/screen/xenochimera/danger_level() + mymob.xenochimera_danger_display = new /atom/movable/screen/xenochimera/danger_level() mymob.xenochimera_danger_display.screen_loc = ui_xenochimera_danger_display mymob.xenochimera_danger_display.icon_state = "danger00" hud_elements |= mymob.xenochimera_danger_display //VOREStation Addition end - mymob.ling_chem_display = new /obj/screen/ling/chems() + mymob.ling_chem_display = new /atom/movable/screen/ling/chems() mymob.ling_chem_display.screen_loc = ui_ling_chemical_display mymob.ling_chem_display.icon_state = "ling_chems" hud_elements |= mymob.ling_chem_display - mymob.wiz_instability_display = new /obj/screen/wizard/instability() + mymob.wiz_instability_display = new /atom/movable/screen/wizard/instability() mymob.wiz_instability_display.screen_loc = ui_wiz_instability_display mymob.wiz_instability_display.icon_state = "wiz_instability_none" hud_elements |= mymob.wiz_instability_display - mymob.wiz_energy_display = new/obj/screen/wizard/energy() + mymob.wiz_energy_display = new/atom/movable/screen/wizard/energy() mymob.wiz_energy_display.screen_loc = ui_wiz_energy_display mymob.wiz_energy_display.icon_state = "wiz_energy" hud_elements |= mymob.wiz_energy_display - mymob.pain = new /obj/screen( null ) + mymob.pain = new /atom/movable/screen( null ) - mymob.zone_sel = new /obj/screen/zone_sel( null ) + mymob.zone_sel = new /atom/movable/screen/zone_sel( null ) mymob.zone_sel.icon = ui_style mymob.zone_sel.color = ui_color mymob.zone_sel.alpha = ui_alpha @@ -344,7 +344,7 @@ hud_elements |= mymob.zone_sel /* - mymob.crafting = new /obj/screen/crafting(null) + mymob.crafting = new /atom/movable/screen/crafting(null) mymob.crafting.icon = ui_style mymob.crafting.color = ui_color mymob.crafting.alpha = ui_alpha @@ -352,23 +352,23 @@ */ //Handle the gun settings buttons - mymob.gun_setting_icon = new /obj/screen/gun/mode(null) + mymob.gun_setting_icon = new /atom/movable/screen/gun/mode(null) mymob.gun_setting_icon.icon = ui_style mymob.gun_setting_icon.color = ui_color mymob.gun_setting_icon.alpha = ui_alpha hud_elements |= mymob.gun_setting_icon - mymob.item_use_icon = new /obj/screen/gun/item(null) + mymob.item_use_icon = new /atom/movable/screen/gun/item(null) mymob.item_use_icon.icon = ui_style mymob.item_use_icon.color = ui_color mymob.item_use_icon.alpha = ui_alpha - mymob.gun_move_icon = new /obj/screen/gun/move(null) + mymob.gun_move_icon = new /atom/movable/screen/gun/move(null) mymob.gun_move_icon.icon = ui_style mymob.gun_move_icon.color = ui_color mymob.gun_move_icon.alpha = ui_alpha - mymob.radio_use_icon = new /obj/screen/gun/radio(null) + mymob.radio_use_icon = new /atom/movable/screen/gun/radio(null) mymob.radio_use_icon.icon = ui_style mymob.radio_use_icon.color = ui_color mymob.radio_use_icon.alpha = ui_alpha @@ -403,21 +403,21 @@ all_underwear.Cut() regenerate_icons() -/obj/screen/ling +/atom/movable/screen/ling invisibility = 101 -/obj/screen/ling/chems +/atom/movable/screen/ling/chems name = "chemical storage" icon_state = "power_display" -/obj/screen/wizard +/atom/movable/screen/wizard invisibility = 101 -/obj/screen/wizard/instability +/atom/movable/screen/wizard/instability name = "instability" icon_state = "instability-1" invisibility = 0 -/obj/screen/wizard/energy +/atom/movable/screen/wizard/energy name = "energy" icon_state = "wiz_energy" diff --git a/code/_onclick/hud/map_popups.dm b/code/_onclick/hud/map_popups.dm index aae5c808c97..43104ce92c7 100644 --- a/code/_onclick/hud/map_popups.dm +++ b/code/_onclick/hud/map_popups.dm @@ -3,11 +3,11 @@ * Assoc list with all the active maps - when a screen obj is added to * a map, it's put in here as well. * - * Format: list( = list(/obj/screen)) + * Format: list( = list(/atom/movable/screen)) */ var/list/screen_maps = list() -/obj/screen +/atom/movable/screen /** * Map name assigned to this object. * Automatically set by /client/proc/register_map_obj. @@ -26,7 +26,7 @@ * 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". */ -/obj/screen/map_view +/atom/movable/screen/map_view icon_state = "blank" // Map view has to be on the lowest plane to enable proper lighting layer = SPACE_PLANE @@ -37,7 +37,7 @@ * It is also implicitly used to allocate a rectangle on the map, which will * be used for auto-scaling the map. */ -/obj/screen/background +/atom/movable/screen/background name = "background" icon = 'icons/mob/map_backgrounds.dmi' icon_state = "clear" @@ -50,7 +50,7 @@ * * 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) screen_loc = "[assigned_map]:[x]:[px],[y]:[py]" else @@ -61,7 +61,7 @@ * * 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) screen_loc = "[assigned_map]:[x1],[y1] to [x2],[y2]" else @@ -71,7 +71,7 @@ * Registers screen obj with the client, which makes it visible on the * 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) CRASH("Can't register [screen_obj] without 'assigned_map' property.") if(!screen_maps[screen_obj.assigned_map]) @@ -93,7 +93,7 @@ /client/proc/clear_map(map_name) if(!map_name || !(map_name in screen_maps)) 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 if(screen_obj.del_on_map_removal) qdel(screen_obj) @@ -147,7 +147,7 @@ var/y_value = world.icon_size * tilesize * height 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.fill_rect(1, 1, width, height) if(bg_icon) diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm index 3602a524811..26584c62cd4 100644 --- a/code/_onclick/hud/movable_screen_objects.dm +++ b/code/_onclick/hud/movable_screen_objects.dm @@ -8,18 +8,18 @@ //Movable Screen Object //Not tied to the grid, places it's center where the cursor is -/obj/screen/movable +/atom/movable/screen/movable var/snap2grid = FALSE var/moved = FALSE //Snap Screen Object //Tied to the grid, snaps to the nearest turf -/obj/screen/movable/snap +/atom/movable/screen/movable/snap 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) var/list/PM = params2list(params) //No screen-loc information? abort. @@ -44,7 +44,7 @@ var/pix_Y = text2num(screen_loc_Y[2]) - 16 screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]" -/obj/screen/movable/proc/encode_screen_X(X) +/atom/movable/screen/movable/proc/encode_screen_X(X) var/view_dist = world.view if(view_dist) view_dist = view_dist @@ -55,7 +55,7 @@ else . = "CENTER" -/obj/screen/movable/proc/decode_screen_X(X) +/atom/movable/screen/movable/proc/decode_screen_X(X) var/view_dist = world.view if(view_dist) view_dist = view_dist @@ -73,7 +73,7 @@ else if(findtext(X,"CENTER")) . = view_dist+1 -/obj/screen/movable/proc/encode_screen_Y(Y) +/atom/movable/screen/movable/proc/encode_screen_Y(Y) var/view_dist = world.view if(view_dist) view_dist = view_dist @@ -84,7 +84,7 @@ else . = "CENTER" -/obj/screen/movable/proc/decode_screen_Y(Y) +/atom/movable/screen/movable/proc/decode_screen_Y(Y) var/view_dist = world.view if(view_dist) view_dist = view_dist @@ -106,7 +106,7 @@ set category = "Debug" 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.icon_state = "block" M.maptext = "Movable" @@ -125,7 +125,7 @@ set category = "Debug" 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.icon_state = "block" S.maptext = "Snap" diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index bb1f9fbb8b2..b9145331656 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -4,13 +4,13 @@ /datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi') - blobpwrdisplay = new /obj/screen() + blobpwrdisplay = new /atom/movable/screen() blobpwrdisplay.name = "blob power" blobpwrdisplay.icon_state = "block" blobpwrdisplay.screen_loc = ui_health blobpwrdisplay.layer = HUD_LAYER - blobhealthdisplay = new /obj/screen() + blobhealthdisplay = new /atom/movable/screen() blobhealthdisplay.name = "blob health" blobhealthdisplay.icon_state = "block" blobhealthdisplay.screen_loc = ui_internal @@ -25,9 +25,9 @@ src.adding = list() - var/obj/screen/using + var/atom/movable/screen/using - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "act_intent" using.setDir(SOUTHWEST) using.icon = ui_style @@ -43,7 +43,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height()) - using = new /obj/screen( src ) + using = new /atom/movable/screen( src ) using.name = "help" using.icon = ico using.screen_loc = ui_zonesel @@ -54,7 +54,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height()) - using = new /obj/screen( src ) + using = new /atom/movable/screen( src ) using.name = "disarm" using.icon = ico using.screen_loc = ui_zonesel @@ -65,7 +65,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2) - using = new /obj/screen( src ) + using = new /atom/movable/screen( src ) using.name = "grab" using.icon = ico using.screen_loc = ui_zonesel @@ -76,7 +76,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2) - using = new /obj/screen( src ) + using = new /atom/movable/screen( src ) using.name = INTENT_HARM using.icon = ico using.screen_loc = ui_zonesel diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 3690cdd9955..b9efc932922 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -5,50 +5,50 @@ GLOBAL_LIST_EMPTY(radial_menus) // Ported from TG -/obj/screen/radial +/atom/movable/screen/radial icon = 'icons/mob/radial.dmi' layer = LAYER_HUD_ABOVE plane = PLANE_PLAYER_HUD_ABOVE var/datum/radial_menu/parent -/obj/screen/radial/slice +/atom/movable/screen/radial/slice icon_state = "radial_slice" var/choice var/next_page = FALSE var/tooltips = FALSE -/obj/screen/radial/slice/MouseEntered(location, control, params) +/atom/movable/screen/radial/slice/MouseEntered(location, control, params) . = ..() icon_state = "radial_slice_focus" if(tooltips) 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" if(tooltips) 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(next_page) parent.next_page() else parent.element_chosen(choice,usr) -/obj/screen/radial/center +/atom/movable/screen/radial/center name = "Close Menu" 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" -/obj/screen/radial/center/MouseExited(location, control, params) +/atom/movable/screen/radial/center/MouseExited(location, control, params) . = ..() 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) parent.finished = TRUE @@ -60,8 +60,8 @@ GLOBAL_LIST_EMPTY(radial_menus) var/selected_choice - var/list/obj/screen/elements = list() - var/obj/screen/radial/center/close_button + var/list/atom/movable/screen/elements = list() + var/atom/movable/screen/radial/center/close_button var/client/current_user var/atom/anchor var/image/menu_holder @@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(radial_menus) if(elements.len < max_elements) var/elements_to_add = max_elements - elements.len 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.parent = src elements += new_element @@ -155,14 +155,14 @@ GLOBAL_LIST_EMPTY(radial_menus) var/list/page_choices = page_data[current_page] var/angle_per_element = round(zone / page_choices.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) if(i > page_choices.len) HideElement(E) else 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.alpha = 0 E.name = "None" @@ -171,7 +171,7 @@ GLOBAL_LIST_EMPTY(radial_menus) E.choice = null 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 var/py = round(cos(angle) * radius) + py_shift var/px = round(sin(angle) * radius) diff --git a/code/_onclick/hud/radial_persistent.dm b/code/_onclick/hud/radial_persistent.dm index feaf17c1b20..cdcd11d4666 100644 --- a/code/_onclick/hud/radial_persistent.dm +++ b/code/_onclick/hud/radial_persistent.dm @@ -2,19 +2,19 @@ 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" 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) 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" -/obj/screen/radial/persistent/center/MouseExited(location, control, params) +/atom/movable/screen/radial/persistent/center/MouseExited(location, control, params) . = ..() icon_state = "radial_center" @@ -25,7 +25,7 @@ var/datum/callback/select_proc_callback /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 diff --git a/code/_onclick/hud/rigmech.dm b/code/_onclick/hud/rigmech.dm index 31d3dbe43b1..4c1264d43d8 100644 --- a/code/_onclick/hud/rigmech.dm +++ b/code/_onclick/hud/rigmech.dm @@ -38,10 +38,10 @@ // Specific types /datum/mini_hud/rig var/obj/item/rig/owner_rig - var/obj/screen/rig/power/power - var/obj/screen/rig/health/health - var/obj/screen/rig/air/air - var/obj/screen/rig/airtoggle/airtoggle + var/atom/movable/screen/rig/power/power + var/atom/movable/screen/rig/health/health + var/atom/movable/screen/rig/air/air + var/atom/movable/screen/rig/airtoggle/airtoggle needs_processing = TRUE @@ -53,13 +53,13 @@ airtoggle = new () screenobjs = list(power, health, air, airtoggle) - screenobjs += new /obj/screen/rig/deco1 - screenobjs += new /obj/screen/rig/deco2 - screenobjs += new /obj/screen/rig/deco1_f - screenobjs += new /obj/screen/rig/deco2_f + screenobjs += new /atom/movable/screen/rig/deco1 + screenobjs += new /atom/movable/screen/rig/deco2 + screenobjs += new /atom/movable/screen/rig/deco1_f + screenobjs += new /atom/movable/screen/rig/deco2_f for(var/scr in screenobjs) - var/obj/screen/S = scr + var/atom/movable/screen/S = scr S.master = owner_rig ..() @@ -88,10 +88,10 @@ /datum/mini_hud/mech var/obj/mecha/owner_mech - var/obj/screen/mech/power/power - var/obj/screen/mech/health/health - var/obj/screen/mech/air/air - var/obj/screen/mech/airtoggle/airtoggle + var/atom/movable/screen/mech/power/power + var/atom/movable/screen/mech/health/health + var/atom/movable/screen/mech/air/air + var/atom/movable/screen/mech/airtoggle/airtoggle needs_processing = TRUE @@ -103,13 +103,13 @@ airtoggle = new () screenobjs = list(power, health, air, airtoggle) - screenobjs += new /obj/screen/mech/deco1 - screenobjs += new /obj/screen/mech/deco2 - screenobjs += new /obj/screen/mech/deco1_f - screenobjs += new /obj/screen/mech/deco2_f + screenobjs += new /atom/movable/screen/mech/deco1 + screenobjs += new /atom/movable/screen/mech/deco2 + screenobjs += new /atom/movable/screen/mech/deco1_f + screenobjs += new /atom/movable/screen/mech/deco2_f for(var/scr in screenobjs) - var/obj/screen/S = scr + var/atom/movable/screen/S = scr S.master = owner_mech ..() @@ -138,50 +138,50 @@ airtoggle.icon_state = "airon[air_on]" // Screen objects -/obj/screen/rig +/atom/movable/screen/rig icon = 'icons/mob/screen_rigmech.dmi' -/obj/screen/rig/deco1 +/atom/movable/screen/rig/deco1 name = "RIG Status" icon_state = "frame1_1" screen_loc = ui_rig_deco1 -/obj/screen/rig/deco2 +/atom/movable/screen/rig/deco2 name = "RIG Status" icon_state = "frame1_2" screen_loc = ui_rig_deco2 -/obj/screen/rig/deco1_f +/atom/movable/screen/rig/deco1_f name = "RIG Status" icon_state = "frame1_1_far" screen_loc = ui_rig_deco1_f -/obj/screen/rig/deco2_f +/atom/movable/screen/rig/deco2_f name = "RIG Status" icon_state = "frame1_2_far" screen_loc = ui_rig_deco2_f -/obj/screen/rig/power +/atom/movable/screen/rig/power name = "Charge Level" icon_state = "pwr5" screen_loc = ui_rig_pwr -/obj/screen/rig/health +/atom/movable/screen/rig/health name = "Integrity Level" icon_state = "health5" screen_loc = ui_rig_health -/obj/screen/rig/air +/atom/movable/screen/rig/air name = "Air Storage" icon_state = "air5" screen_loc = ui_rig_air -/obj/screen/rig/airtoggle +/atom/movable/screen/rig/airtoggle name = "Toggle Air" icon_state = "airoff" screen_loc = ui_rig_airtoggle -/obj/screen/rig/airtoggle/Click() +/atom/movable/screen/rig/airtoggle/Click() var/mob/living/carbon/human/user = usr if(!istype(user) || user.stat || user.incapacitated()) return @@ -190,50 +190,50 @@ return user.toggle_internals() -/obj/screen/mech +/atom/movable/screen/mech icon = 'icons/mob/screen_rigmech.dmi' -/obj/screen/mech/deco1 +/atom/movable/screen/mech/deco1 name = "Mech Status" icon_state = "frame1_1" screen_loc = ui_mech_deco1 -/obj/screen/mech/deco2 +/atom/movable/screen/mech/deco2 name = "Mech Status" icon_state = "frame1_2" screen_loc = ui_mech_deco2 -/obj/screen/mech/deco1_f +/atom/movable/screen/mech/deco1_f name = "Mech Status" icon_state = "frame1_1_far" screen_loc = ui_mech_deco1_f -/obj/screen/mech/deco2_f +/atom/movable/screen/mech/deco2_f name = "Mech Status" icon_state = "frame1_2_far" screen_loc = ui_mech_deco2_f -/obj/screen/mech/power +/atom/movable/screen/mech/power name = "Charge Level" icon_state = "pwr5" screen_loc = ui_mech_pwr -/obj/screen/mech/health +/atom/movable/screen/mech/health name = "Integrity Level" icon_state = "health5" screen_loc = ui_mech_health -/obj/screen/mech/air +/atom/movable/screen/mech/air name = "Air Storage" icon_state = "air5" screen_loc = ui_mech_air -/obj/screen/mech/airtoggle +/atom/movable/screen/mech/airtoggle name = "Toggle Air" icon_state = "airoff" screen_loc = ui_mech_airtoggle -/obj/screen/mech/airtoggle/Click() +/atom/movable/screen/mech/airtoggle/Click() var/mob/living/carbon/human/user = usr if(!istype(user) || user.stat || user.incapacitated()) return @@ -248,16 +248,16 @@ var/list/adding = list() HUD.adding = adding - var/obj/screen/using - using = new /obj/screen/ghost/jumptomob() + var/atom/movable/screen/using + using = new /atom/movable/screen/ghost/jumptomob() using.screen_loc = ui_ghost_jumptomob using.hud = src adding += using - using = new /obj/screen/ghost/orbit() + using = new /atom/movable/screen/ghost/orbit() using.screen_loc = ui_ghost_orbit using.hud = src adding += using - using = new /obj/screen/ghost/reenter_corpse() + using = new /atom/movable/screen/ghost/reenter_corpse() using.screen_loc = ui_ghost_reenter_corpse using.hud = src adding += using diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 077893e6638..242541142c3 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -1,4 +1,4 @@ -var/obj/screen/robot_inventory +var/atom/movable/screen/robot_inventory /* /mob/living/silicon/robot/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha) HUD.robot_hud(ui_style, ui_color, ui_alpha, src)*/ @@ -19,10 +19,10 @@ var/obj/screen/robot_inventory src.adding = list() src.other = list() - var/obj/screen/using + var/atom/movable/screen/using //Radio - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "radio" using.setDir(SOUTHWEST) using.icon = ui_style @@ -35,7 +35,7 @@ var/obj/screen/robot_inventory //Module select - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "module1" using.setDir(SOUTHWEST) using.icon = ui_style @@ -47,7 +47,7 @@ var/obj/screen/robot_inventory src.adding += using mymob:inv1 = using - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "module2" using.setDir(SOUTHWEST) using.icon = ui_style @@ -59,7 +59,7 @@ var/obj/screen/robot_inventory src.adding += using mymob:inv2 = using - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "module3" using.setDir(SOUTHWEST) using.icon = ui_style @@ -74,7 +74,7 @@ var/obj/screen/robot_inventory //End of module select //Intent - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "act_intent" using.setDir(SOUTHWEST) using.icon = ui_style @@ -86,7 +86,7 @@ var/obj/screen/robot_inventory action_intent = using //Cell - using = new /obj/screen() + using = new /atom/movable/screen() using.icon = ui_style using.icon_state = "charge-empty" using.alpha = ui_alpha @@ -96,7 +96,7 @@ var/obj/screen/robot_inventory target.cells = using //Health - mymob.healths = new /obj/screen() + mymob.healths = new /atom/movable/screen() mymob.healths.icon = ui_style mymob.healths.icon_state = "health0" mymob.healths.alpha = ui_alpha @@ -105,7 +105,7 @@ var/obj/screen/robot_inventory src.other += mymob.healths //Installed Module - mymob.hands = new /obj/screen() + mymob.hands = new /atom/movable/screen() mymob.hands.icon = ui_style mymob.hands.icon_state = "nomod" mymob.hands.alpha = ui_alpha @@ -114,7 +114,7 @@ var/obj/screen/robot_inventory src.other += mymob.hands //Module Panel - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "panel" using.icon = ui_style using.icon_state = "panel" @@ -124,7 +124,7 @@ var/obj/screen/robot_inventory src.adding += using //Store - mymob.throw_icon = new /obj/screen() + mymob.throw_icon = new /atom/movable/screen() mymob.throw_icon.icon = ui_style mymob.throw_icon.icon_state = "store" mymob.throw_icon.alpha = ui_alpha @@ -134,7 +134,7 @@ var/obj/screen/robot_inventory src.other += mymob.throw_icon //Inventory - robot_inventory = new /obj/screen() + robot_inventory = new /atom/movable/screen() robot_inventory.name = "inventory" robot_inventory.icon = ui_style robot_inventory.icon_state = "inventory" @@ -144,12 +144,12 @@ var/obj/screen/robot_inventory src.other += robot_inventory //Temp - mymob.bodytemp = new /obj/screen() + mymob.bodytemp = new /atom/movable/screen() mymob.bodytemp.icon_state = "temp0" mymob.bodytemp.name = "body temperature" mymob.bodytemp.screen_loc = ui_temp - mymob.oxygen = new /obj/screen() + mymob.oxygen = new /atom/movable/screen() mymob.oxygen.icon = ui_style mymob.oxygen.icon_state = "oxy0" mymob.oxygen.alpha = ui_alpha @@ -157,7 +157,7 @@ var/obj/screen/robot_inventory mymob.oxygen.screen_loc = ui_oxygen src.other += mymob.oxygen - mymob.fire = new /obj/screen() + mymob.fire = new /atom/movable/screen() mymob.fire.icon = ui_style mymob.fire.icon_state = "fire0" mymob.fire.alpha = ui_alpha @@ -165,7 +165,7 @@ var/obj/screen/robot_inventory mymob.fire.screen_loc = ui_fire src.other += mymob.fire - mymob.pullin = new /obj/screen() + mymob.pullin = new /atom/movable/screen() mymob.pullin.icon = ui_style mymob.pullin.icon_state = "pull0" mymob.pullin.alpha = ui_alpha @@ -174,23 +174,23 @@ var/obj/screen/robot_inventory mymob.pullin.screen_loc = ui_borg_pull src.other += mymob.pullin - mymob.zone_sel = new /obj/screen/zone_sel() + mymob.zone_sel = new /atom/movable/screen/zone_sel() mymob.zone_sel.icon = ui_style mymob.zone_sel.alpha = ui_alpha mymob.zone_sel.overlays.Cut() mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]") //Handle the gun settings buttons - mymob.gun_setting_icon = new /obj/screen/gun/mode(null) + mymob.gun_setting_icon = new /atom/movable/screen/gun/mode(null) mymob.gun_setting_icon.icon = ui_style mymob.gun_setting_icon.alpha = ui_alpha - mymob.item_use_icon = new /obj/screen/gun/item(null) + mymob.item_use_icon = new /atom/movable/screen/gun/item(null) mymob.item_use_icon.icon = ui_style mymob.item_use_icon.alpha = ui_alpha - mymob.gun_move_icon = new /obj/screen/gun/move(null) + mymob.gun_move_icon = new /atom/movable/screen/gun/move(null) mymob.gun_move_icon.icon = ui_style mymob.gun_move_icon.alpha = ui_alpha - mymob.radio_use_icon = new /obj/screen/gun/radio(null) + mymob.radio_use_icon = new /atom/movable/screen/gun/radio(null) mymob.radio_use_icon.icon = ui_style mymob.radio_use_icon.alpha = ui_alpha diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index b31ac8e933f..e516875f485 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -6,21 +6,20 @@ 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. */ -/obj/screen +/atom/movable/screen name = "" icon = 'icons/mob/screen1.dmi' appearance_flags = TILE_BOUND|PIXEL_SCALE|NO_CLIENT_COLOR layer = LAYER_HUD_BASE plane = PLANE_PLAYER_HUD - unacidable = 1 var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. var/datum/hud/hud = null // A reference to the owner HUD, if any. -/obj/screen/Destroy() +/atom/movable/screen/Destroy() master = null return ..() -/obj/screen/text +/atom/movable/screen/text icon = null icon_state = null mouse_opacity = 0 @@ -29,14 +28,14 @@ maptext_width = 480 -/obj/screen/inventory +/atom/movable/screen/inventory var/slot_id //The indentifier for the slot. It has nothing to do with ID cards. -/obj/screen/close +/atom/movable/screen/close name = "close" -/obj/screen/close/Click() +/atom/movable/screen/close/Click() if(master) if(istype(master, /obj/item/storage)) var/obj/item/storage/S = master @@ -44,14 +43,14 @@ return 1 -/obj/screen/item_action +/atom/movable/screen/item_action var/obj/item/owner -/obj/screen/item_action/Destroy() +/atom/movable/screen/item_action/Destroy() . = ..() owner = null -/obj/screen/item_action/Click() +/atom/movable/screen/item_action/Click() if(!usr || !owner) return 1 if(!usr.canClick()) @@ -66,25 +65,25 @@ owner.ui_action_click() return 1 -/obj/screen/grab +/atom/movable/screen/grab name = "grab" -/obj/screen/grab/Click() +/atom/movable/screen/grab/Click() var/obj/item/grab/G = master G.s_click(src) return 1 -/obj/screen/grab/attack_hand() +/atom/movable/screen/grab/attack_hand() return -/obj/screen/grab/attackby() +/atom/movable/screen/grab/attackby() return -/obj/screen/storage +/atom/movable/screen/storage name = "storage" -/obj/screen/storage/Click() +/atom/movable/screen/storage/Click() if(!usr.canClick()) return 1 if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) @@ -97,13 +96,13 @@ usr.ClickOn(master) return 1 -/obj/screen/zone_sel +/atom/movable/screen/zone_sel name = "damage zone" icon_state = "zone_sel" screen_loc = ui_zonesel var/selecting = BP_TORSO -/obj/screen/zone_sel/Click(location, control,params) +/atom/movable/screen/zone_sel/Click(location, control,params) var/list/PL = params2list(params) var/icon_x = text2num(PL["icon-x"]) var/icon_y = text2num(PL["icon-y"]) @@ -164,28 +163,28 @@ update_icon() return 1 -/obj/screen/zone_sel/proc/set_selected_zone(bodypart) +/atom/movable/screen/zone_sel/proc/set_selected_zone(bodypart) var/old_selecting = selecting selecting = bodypart if(old_selecting != selecting) update_icon() -/obj/screen/zone_sel/update_icon() +/atom/movable/screen/zone_sel/update_icon() overlays.Cut() overlays += image('icons/mob/zone_sel.dmi', "[selecting]") //Crafting Screen Port -/obj/screen/craft +/atom/movable/screen/craft name = "crafting menu" icon = 'icons/mob/screen/midnight.dmi' icon_state = "craft" screen_loc = ui_crafting -/obj/screen/craft/Click(location, control, params) +/atom/movable/screen/craft/Click(location, control, params) var/datum/component/personal_crafting/C = usr.GetComponent(/datum/component/personal_crafting) C?.ui_interact(usr) -/obj/screen/Click(location, control, params) +/atom/movable/screen/Click(location, control, params) if(!usr) return 1 switch(name) if("toggle") @@ -465,7 +464,7 @@ return attempt_vr(src,"Click_vr",list(location,control,params)) //VOREStation Add - Additional things. return 1 -/obj/screen/inventory/Click() +/atom/movable/screen/inventory/Click() // 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 if(!usr.canClick()) @@ -494,10 +493,10 @@ return 1 // Hand slots are special to handle the handcuffs overlay -/obj/screen/inventory/hand +/atom/movable/screen/inventory/hand var/image/handcuff_overlay -/obj/screen/inventory/hand/update_icon() +/atom/movable/screen/inventory/hand/update_icon() ..() if(!hud) return @@ -512,7 +511,7 @@ //VR FILE MERGE -/obj/screen/proc/Click_vr(location, control, params) +/atom/movable/screen/proc/Click_vr(location, control, params) if(!usr) return 1 switch(name) @@ -568,18 +567,18 @@ // Character setup stuff -/obj/screen/setup_preview +/atom/movable/screen/setup_preview var/datum/preferences/pref -/obj/screen/setup_preview/Destroy() +/atom/movable/screen/setup_preview/Destroy() pref = null return ..() // Background 'floor' -/obj/screen/setup_preview/bg +/atom/movable/screen/setup_preview/bg mouse_over_pointer = MOUSE_HAND_POINTER -/obj/screen/setup_preview/bg/Click(params) +/atom/movable/screen/setup_preview/bg/Click(params) pref?.bgstate = next_list_item(pref.bgstate, pref.bgstate_options) pref?.update_preview_icon() diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm index ffaf019a3a0..763bc34cbb5 100644 --- a/code/_onclick/hud/skybox.dm +++ b/code/_onclick/hud/skybox.dm @@ -3,7 +3,7 @@ #define SKYBOX_TURFS (SKYBOX_PIXELS/WORLD_ICON_SIZE) // Skybox screen object. -/obj/screen/skybox +/atom/movable/screen/skybox name = "skybox" icon = null appearance_flags = TILE_BOUND|PIXEL_SCALE @@ -15,7 +15,7 @@ blend_mode = BLEND_MULTIPLY // You actually need to do it this way or you see it in occlusion. // Adjust transform property to scale for client's view var. We assume the skybox is 736x736 px -/obj/screen/skybox/proc/scale_to_view(var/view) +/atom/movable/screen/skybox/proc/scale_to_view(var/view) var/matrix/M = matrix() // Translate to center the icon over us! M.Translate(-(SKYBOX_PIXELS - WORLD_ICON_SIZE) / 2) @@ -25,7 +25,7 @@ src.transform = M /client - var/obj/screen/skybox/skybox + var/atom/movable/screen/skybox/skybox /client/proc/update_skybox(rebuild) if(!skybox) diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm index 8f702cd4124..89554d82d21 100644 --- a/code/_onclick/hud/spell_screen_objects.dm +++ b/code/_onclick/hud/spell_screen_objects.dm @@ -1,8 +1,8 @@ -/obj/screen/movable/spell_master +/atom/movable/screen/movable/spell_master name = "Spells" icon = 'icons/mob/screen_spells.dmi' icon_state = "wiz_spell_ready" - var/list/obj/screen/spell/spell_objects = list() + var/list/atom/movable/screen/spell/spell_objects = list() var/showing = 0 var/open_state = "master_open" @@ -12,9 +12,9 @@ var/mob/spell_holder -/obj/screen/movable/spell_master/Destroy() +/atom/movable/screen/movable/spell_master/Destroy() . = ..() - for(var/obj/screen/spell/spells in spell_objects) + for(var/atom/movable/screen/spell/spells in spell_objects) spells.spellmaster = null spell_objects.Cut() if(spell_holder) @@ -23,22 +23,22 @@ spell_holder.client.screen -= src spell_holder = null -/obj/screen/movable/spell_master/MouseDrop() +/atom/movable/screen/movable/spell_master/MouseDrop() if(showing) return return ..() -/obj/screen/movable/spell_master/Click() +/atom/movable/screen/movable/spell_master/Click() if(!spell_objects.len) qdel(src) return toggle_open() -/obj/screen/movable/spell_master/proc/toggle_open(var/forced_state = 0) +/atom/movable/screen/movable/spell_master/proc/toggle_open(var/forced_state = 0) if(showing && (forced_state != 2)) - for(var/obj/screen/spell/O in spell_objects) + for(var/atom/movable/screen/spell/O in spell_objects) if(spell_holder && spell_holder.client) spell_holder.client.screen -= O O.handle_icon_updates = 0 @@ -52,7 +52,7 @@ overlays.len = 0 overlays.Add(open_state) -/obj/screen/movable/spell_master/proc/open_spellmaster() +/atom/movable/screen/movable/spell_master/proc/open_spellmaster() var/list/screen_loc_xy = splittext(screen_loc,",") //Create list of X offsets @@ -66,7 +66,7 @@ var/y_pix = screen_loc_Y[2] for(var/i = 1; i <= spell_objects.len; i++) - var/obj/screen/spell/S = spell_objects[i] + var/atom/movable/screen/spell/S = spell_objects[i] var/xpos = x_position + (x_position < 8 ? 1 : -1)*(i%7) var/ypos = y_position + (y_position < 8 ? round(i/7) : -round(i/7)) if(spell_holder && spell_holder.client) @@ -74,7 +74,7 @@ spell_holder.client.screen += S S.handle_icon_updates = 1 -/obj/screen/movable/spell_master/proc/add_spell(var/spell/spell) +/atom/movable/screen/movable/spell_master/proc/add_spell(var/spell/spell) if(!spell) return if(spell.connected_button) //we have one already, for some reason @@ -89,7 +89,7 @@ if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one return - var/obj/screen/spell/newscreen = new /obj/screen/spell() + var/atom/movable/screen/spell/newscreen = new /atom/movable/screen/spell() newscreen.spellmaster = src newscreen.spell = spell @@ -108,7 +108,7 @@ if(spell_holder.client) toggle_open(2) //forces the icons to refresh on screen -/obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell) +/atom/movable/screen/movable/spell_master/proc/remove_spell(var/spell/spell) qdel(spell.connected_button) spell.connected_button = null @@ -118,19 +118,19 @@ else qdel(src) -/obj/screen/movable/spell_master/proc/silence_spells(var/amount) - for(var/obj/screen/spell/spell in spell_objects) +/atom/movable/screen/movable/spell_master/proc/silence_spells(var/amount) + for(var/atom/movable/screen/spell/spell in spell_objects) spell.spell.silenced = amount spell.update_charge(1) -/obj/screen/movable/spell_master/proc/update_spells(forced = 0, mob/user) +/atom/movable/screen/movable/spell_master/proc/update_spells(forced = 0, mob/user) if(user && user.client) if(!(src in user.client.screen)) user.client.screen += src - for(var/obj/screen/spell/spell in spell_objects) + for(var/atom/movable/screen/spell/spell in spell_objects) spell.update_charge(forced) -/obj/screen/movable/spell_master/genetic +/atom/movable/screen/movable/spell_master/genetic name = "Mutant Powers" icon_state = "genetic_spell_ready" @@ -139,7 +139,7 @@ screen_loc = ui_genetic_master -/obj/screen/movable/spell_master/swarm +/atom/movable/screen/movable/spell_master/swarm name = "Swarm Abilities" icon_state = "nano_spell_ready" @@ -149,7 +149,7 @@ //////////////ACTUAL SPELLS////////////// //This is what you click to cast things// ///////////////////////////////////////// -/obj/screen/spell +/atom/movable/screen/spell icon = 'icons/mob/screen_spells.dmi' icon_state = "wiz_spell_base" var/spell_base = "wiz" @@ -157,11 +157,11 @@ var/spell/spell = null var/handle_icon_updates = 0 - var/obj/screen/movable/spell_master/spellmaster + var/atom/movable/screen/movable/spell_master/spellmaster var/icon/last_charged_icon -/obj/screen/spell/Destroy() +/atom/movable/screen/spell/Destroy() . = ..() spell = null last_charged_icon = null @@ -173,7 +173,7 @@ qdel(spellmaster) spellmaster = null -/obj/screen/spell/proc/update_charge(var/forced_update = 0) +/atom/movable/screen/spell/proc/update_charge(var/forced_update = 0) if(!spell) qdel(src) return @@ -211,7 +211,7 @@ if(spell.silenced) overlays += "silence" -/obj/screen/spell/Click() +/atom/movable/screen/spell/Click() if(!usr || !spell) qdel(src) return @@ -222,7 +222,7 @@ //Xenochimera, literally just different icons -/obj/screen/movable/spell_master/chimera +/atom/movable/screen/movable/spell_master/chimera name = "Chimera Abilities" icon_state = "cult_spell_ready" open_state = "genetics_open" diff --git a/code/controllers/subsystems/icon_smooth.dm b/code/controllers/subsystems/icon_smooth.dm new file mode 100644 index 00000000000..53bcdab3464 --- /dev/null +++ b/code/controllers/subsystems/icon_smooth.dm @@ -0,0 +1,83 @@ +SUBSYSTEM_DEF(icon_smooth) + name = "Icon Smoothing" + init_order = INIT_ORDER_ICON_SMOOTHING + wait = 1 + priority = FIRE_PRIORITY_SMOOTHING + flags = SS_TICKER + + ///Blueprints assemble an image of what pipes/manifolds/wires look like on initialization, and thus should be taken after everything's been smoothed + // var/list/blueprint_queue = list() + var/list/smooth_queue = list() + var/list/deferred = list() + +/datum/controller/subsystem/icon_smooth/fire() + var/list/cached = smooth_queue + while(length(cached)) + var/atom/smoothing_atom = cached[length(cached)] + cached.len-- + if(QDELETED(smoothing_atom) || !(smoothing_atom.smoothing_flags & SMOOTH_QUEUED)) + continue + if(smoothing_atom.flags & INITIALIZED) + smoothing_atom.smooth_icon() + else + deferred += smoothing_atom + if (MC_TICK_CHECK) + return + + if (!cached.len) + if (deferred.len) + smooth_queue = deferred + deferred = cached + else + can_fire = FALSE + +/datum/controller/subsystem/icon_smooth/Initialize() + // clear + smooth_queue = list() + deferred = list() + + // smooth everything + for(var/i in 1 to world.maxz) + smooth_zlevel(i, TRUE) + + // smooth_zlevel(1, TRUE) + // smooth_zlevel(2, TRUE) + + // var/list/queue = smooth_queue + // smooth_queue = list() + + // while(length(queue)) + // var/atom/smoothing_atom = queue[length(queue)] + // queue.len-- + // if(QDELETED(smoothing_atom) || !(smoothing_atom.smoothing_flags & SMOOTH_QUEUED) || smoothing_atom.z <= 2) + // continue + // smoothing_atom.smooth_icon() + // CHECK_TICK + + // queue = blueprint_queue + // blueprint_queue = null + + // for(var/item in queue) + // var/atom/movable/movable_item = item + // if(!isturf(movable_item.loc)) + // continue + // var/turf/item_loc = movable_item.loc + // item_loc.add_blueprints(movable_item) + + return ..() + + +/datum/controller/subsystem/icon_smooth/proc/add_to_queue(atom/thing) + if(thing.smoothing_flags & SMOOTH_QUEUED) + return + thing.smoothing_flags |= SMOOTH_QUEUED + smooth_queue += thing + if(!can_fire) + can_fire = TRUE + +/datum/controller/subsystem/icon_smooth/proc/remove_from_queues(atom/thing) + thing.smoothing_flags &= ~SMOOTH_QUEUED + smooth_queue -= thing + // if(blueprint_queue) + // blueprint_queue -= thing + deferred -= thing diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index eeaa1307a66..e65e4c4911b 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -51,7 +51,7 @@ SUBSYSTEM_DEF(ticker) //station_explosion used to be a variable for every mob's hud. Which was a waste! //Now we have a general cinematic centrally held within the gameticker....far more efficient! - var/obj/screen/cinematic = null + var/atom/movable/screen/cinematic = null var/static/round_start_time var/static/list/round_start_events diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 1e329441878..e38a8a685a8 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -5,10 +5,10 @@ /datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL) var/datum/hud/H = user.hud_used for(var/huds in H.static_inventory) - if(istype(huds, /obj/screen/craft)) + if(istype(huds, /atom/movable/screen/craft)) return //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 H.static_inventory += C CL.screen += C @@ -320,7 +320,7 @@ Deletion.Cut(Deletion.len) 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) ui_interact(user) diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index ca2ab5aae21..2ca417e582c 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -10,8 +10,8 @@ var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets 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/obj/screen/mood/screen_obj - var/obj/screen/sanity/screen_obj_sanity + var/atom/movable/screen/mood/screen_obj + var/atom/movable/screen/sanity/screen_obj_sanity /datum/component/mood/Initialize() if(!isliving(parent)) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index f823ef3d1ac..88b4d4924cb 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -42,8 +42,8 @@ var/display_numerical_stacking = FALSE //stack things of the same type and show as a single object with a number. - var/obj/screen/storage/boxes //storage display object - var/obj/screen/close/closer //close button object + var/atom/movable/screen/storage/boxes //storage display object + var/atom/movable/screen/close/closer //close button object var/allow_big_nesting = FALSE //allow storage objects of the same or greater size. @@ -549,14 +549,14 @@ // this must come before the screen objects only block, dunno why it wasn't before if(over_object == M) user_show_to_mob(M) - if(!istype(over_object, /obj/screen)) + if(!istype(over_object, /atom/movable/screen)) dump_content_at(over_object, M) return if(A.loc != M) return playsound(A, "rustle", 50, TRUE, -5) - if(istype(over_object, /obj/screen/inventory/hand)) - var/obj/screen/inventory/hand/H = over_object + if(istype(over_object, /atom/movable/screen/inventory/hand)) + var/atom/movable/screen/inventory/hand/H = over_object M.putItemFromInventoryInHandIfPossible(A, H.held_index) return A.add_fingerprint(M) diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 0337ac646e6..b9a6b790c65 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -10,8 +10,8 @@ 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/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/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists + var/alert_type = /atom/movable/screen/alert/status_effect //the alert thrown by the status effect, contains name and description + 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 var/status_type = STATUS_EFFECT_UNIQUE @@ -30,7 +30,7 @@ duration = world.time + duration next_tick = world.time + tick_interval // 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 // linked_alert = A //so we can reference the alert, if we need to START_PROCESSING(SSstatus_effects, src) @@ -90,7 +90,7 @@ // ALERT HOOK // //////////////// -/obj/screen/alert/status_effect +/atom/movable/screen/alert/status_effect name = "Curse of Mundanity" desc = "You don't feel any different..." var/datum/status_effect/attached_effect diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index 4ee0bdfc9b6..f498344cb30 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -127,7 +127,7 @@ for(var/mob/dead/observer/O in GLOB.player_list) if(O.key == expected_key) if(O.client) - new /obj/screen/splash(O.client, TRUE) + new /atom/movable/screen/splash(O.client, TRUE) break /datum/world_topic/adminmsg diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index d8df831eecd..58efd58ba3a 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -58,6 +58,9 @@ /// Color on minimaps, if it's null (which is default) it makes one at random. var/minimap_color + ///Typepath to limit the areas (subtypes included) that atoms in this area can smooth with. Used for shuttles. + var/area/area_limited_icon_smoothing + /** * Called when an area loads * diff --git a/code/game/atom_vv.dm b/code/game/atom_vv.dm index fad071c88fa..861055a51f2 100644 --- a/code/game/atom_vv.dm +++ b/code/game/atom_vv.dm @@ -12,13 +12,32 @@ /atom/vv_edit_var(var_name, var_value) if(!GLOB.Debug2) flags |= ADMIN_SPAWNED + switch(var_name) + if(NAMEOF(src, smoothing_junction)) + set_smoothed_icon_state(var_value) + . = TRUE + if(NAMEOF(src, opacity)) + set_opacity(var_value) + . = TRUE + if(NAMEOF(src, base_pixel_x)) + set_base_pixel_x(var_value) + . = TRUE + if(NAMEOF(src, base_pixel_y)) + set_base_pixel_y(var_value) + . = TRUE + + if(!isnull(.)) + datum_flags |= DF_VAR_EDITED + return + + if(!GLOB.Debug2) + flags |= ADMIN_SPAWNED + . = ..() - /* + switch(var_name) - if("color") + if(NAMEOF(src, color)) add_atom_colour(color, ADMIN_COLOUR_PRIORITY) - */ - switch(var_name) if(NAMEOF(src, base_layer), NAMEOF(src, layer)) set_base_layer(var_value) if(NAMEOF(src, relative_layer)) @@ -46,6 +65,8 @@ VV_DROPDOWN_OPTION(VV_HK_ADD_REAGENT, "Add Reagent") VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EMP, "EMP Pulse") VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EXPLOSION, "Explosion") + VV_DROPDOWN_OPTION(VV_HK_EDIT_FILTERS, "Edit Filters") + VV_DROPDOWN_OPTION(VV_HK_EDIT_COLOR_MATRIX, "Edit Color as Matrix") /atom/vv_do_topic(list/href_list) . = ..() @@ -104,6 +125,13 @@ var/angle = input(usr, "Choose angle to rotate","Transform Mod") as null|num if(!isnull(angle)) transform = M.Turn(angle) + if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT)) + var/client/C = usr.client + C?.open_filter_editor(src) + + if(href_list[VV_HK_EDIT_COLOR_MATRIX] && check_rights(R_VAREDIT)) + var/client/C = usr.client + C?.open_color_matrix_editor(src) /atom/vv_get_header() . = ..() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index ce308999f6a..90c8c264f49 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -37,9 +37,36 @@ ///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc var/list/managed_overlays + var/list/filter_data //For handling persistent filters + /// The orbiter comopnent if we're being orbited. var/datum/component/orbiter/orbiters - ///Chemistry. + + ///Default pixel x shifting for the atom's icon. + var/base_pixel_x = 0 + ///Default pixel y shifting for the atom's icon. + var/base_pixel_y = 0 + ///Used for changing icon states for different base sprites. + var/base_icon_state + + ///Icon-smoothing behavior. + var/smoothing_flags = NONE + ///What directions this is currently smoothing with. IMPORTANT: This uses the smoothing direction flags as defined in icon_smoothing.dm, instead of the BYOND flags. + var/smoothing_junction = null //This starts as null for us to know when it's first set, but after that it will hold a 8-bit mask ranging from 0 to 255. + ///Smoothing variable + var/top_left_corner + ///Smoothing variable + var/top_right_corner + ///Smoothing variable + var/bottom_left_corner + ///Smoothing variable + var/bottom_right_corner + ///What smoothing groups does this atom belongs to, to match canSmoothWith. If null, nobody can smooth with it. + var/list/smoothing_groups = null + ///List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself. + var/list/canSmoothWith = null + + /// Chemistry. var/datum/reagents/reagents = null //var/chem_is_open_container = 0 @@ -85,6 +112,8 @@ // Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE // Must return an Initialize hint. Defined in code/__defines/subsystems.dm /atom/proc/Initialize(mapload, ...) + // SHOULD_NOT_SLEEP(TRUE) + // SHOULD_CALL_PARENT(TRUE) if(flags & INITIALIZED) stack_trace("Warning: [src]([type]) initialized multiple times!") flags |= INITIALIZED @@ -96,6 +125,15 @@ if(light_power && light_range) update_light() + if (length(smoothing_groups)) + sortTim(smoothing_groups) //In case it's not properly ordered, let's avoid duplicate entries with the same values. + SET_BITFLAG_LIST(smoothing_groups) + if (length(canSmoothWith)) + sortTim(canSmoothWith) + if(canSmoothWith[length(canSmoothWith)] > MAX_S_TURF) //If the last element is higher than the maximum turf-only value, then it must scan turf contents for smoothing targets. + smoothing_flags |= SMOOTH_OBJ + SET_BITFLAG_LIST(canSmoothWith) + if(opacity && isturf(loc)) var/turf/T = loc T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guranteed to be on afterwards anyways. @@ -288,34 +326,70 @@ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) +/** + * 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 -/atom/proc/update_icon() +/atom/proc/update_icon(updates=ALL) SIGNAL_HANDLER + // SHOULD_CALL_PARENT(TRUE) - var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON) - . = 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() - . = TRUE + . |= UPDATE_ICON_STATE - if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS)) + if(updates & UPDATE_OVERLAYS) if(LAZYLEN(managed_vis_overlays)) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - var/list/new_overlays = update_overlays() + var/list/new_overlays = update_overlays(updates) if(managed_overlays) cut_overlay(managed_overlays) managed_overlays = null if(length(new_overlays)) - managed_overlays = new_overlays + if (length(new_overlays) == 1) + managed_overlays = new_overlays[1] + else + managed_overlays = 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 /atom/proc/update_icon_state() + SHOULD_CALL_PARENT(TRUE) + return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE) /// Updates the overlays of the atom /atom/proc/update_overlays() @@ -725,6 +799,25 @@ color = C return +///Setter for the `base_pixel_x` variable to append behavior related to its changing. +/atom/proc/set_base_pixel_x(new_value) + if(base_pixel_x == new_value) + return + . = base_pixel_x + base_pixel_x = new_value + + pixel_x = pixel_x + base_pixel_x - . + + +///Setter for the `base_pixel_y` variable to append behavior related to its changing. +/atom/proc/set_base_pixel_y(new_value) + if(base_pixel_y == new_value) + return + . = base_pixel_y + base_pixel_y = new_value + + pixel_y = pixel_y + base_pixel_y - . + /** * Returns true if this atom has gravity for the passed in turf * @@ -845,6 +938,68 @@ /atom/proc/is_drainable() return reagents && (reagents.reagents_holder_flags & DRAINABLE) +/atom/proc/add_filter(name,priority,list/params) + LAZYINITLIST(filter_data) + var/list/copied_parameters = params.Copy() + copied_parameters["priority"] = priority + filter_data[name] = copied_parameters + update_filters() + +/atom/proc/update_filters() + filters = null + filter_data = sortTim(filter_data, /proc/cmp_filter_data_priority, TRUE) + for(var/f in filter_data) + var/list/data = filter_data[f] + var/list/arguments = data.Copy() + arguments -= "priority" + filters += filter(arglist(arguments)) + UNSETEMPTY(filter_data) + +/atom/proc/transition_filter(name, time, list/new_params, easing, loop) + var/filter = get_filter(name) + if(!filter) + return + + var/list/old_filter_data = filter_data[name] + + var/list/params = old_filter_data.Copy() + for(var/thing in new_params) + params[thing] = new_params[thing] + + animate(filter, new_params, time = time, easing = easing, loop = loop) + for(var/param in params) + filter_data[name][param] = params[param] + +/atom/proc/change_filter_priority(name, new_priority) + if(!filter_data || !filter_data[name]) + return + + filter_data[name]["priority"] = new_priority + update_filters() + +// /obj/item/update_filters() +// . = ..() +// update_action_buttons() + +/atom/proc/get_filter(name) + if(filter_data && filter_data[name]) + return filters[filter_data.Find(name)] + +/atom/proc/remove_filter(name_or_names) + if(!filter_data) + return + + var/list/names = islist(name_or_names) ? name_or_names : list(name_or_names) + + for(var/name in names) + if(filter_data[name]) + filter_data -= name + update_filters() + +/atom/proc/clear_filters() + filter_data = null + filters = null + /** * set the new base layer we should be on */ diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 8ddd3a0f541..f635a6602ec 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -25,6 +25,8 @@ var/movement_type = GROUND /// The orbiter component of the thing we're orbiting. var/datum/component/orbiter/orbiting + ///Used for the calculate_adjacencies proc for icon smoothing. + var/can_be_unanchored = FALSE /// Our default glide_size. var/default_glide_size = 0 diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index f5958394a72..8ee07438582 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -87,7 +87,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E src.verbs += P.verbpath if(P.make_hud_button) if(!src.ability_master) - src.ability_master = new /obj/screen/movable/ability_master(src) + src.ability_master = new /atom/movable/screen/movable/ability_master(src) src.ability_master.add_ling_ability( object_given = src, verb_given = P.verbpath, @@ -112,7 +112,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E for(var/datum/power/changeling/P in mind.changeling.purchased_powers) if(P.isVerb) verbs -= P.verbpath - var/obj/screen/ability/verb_based/changeling/C = ability_master.get_ability_by_proc_ref(P.verbpath) + var/atom/movable/screen/ability/verb_based/changeling/C = ability_master.get_ability_by_proc_ref(P.verbpath) if(C) ability_master.remove_ability(C) diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index 2c4211c0aa2..7a3ec7979f5 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -344,7 +344,7 @@ var/list/datum/power/changeling/powerinstances = list() if(Thepower.make_hud_button && Thepower.isVerb) if(!M.current.ability_master) - M.current.ability_master = new /obj/screen/movable/ability_master(M.current) + M.current.ability_master = new /atom/movable/screen/movable/ability_master(M.current) M.current.ability_master.add_ling_ability( object_given = M.current, verb_given = Thepower.verbpath, diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 78f2a316e12..ff43b4d5afe 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -54,7 +54,7 @@ // Removes the spell buttons from the HUD. /obj/item/technomancer_core/dropped(mob/user) - for(var/obj/screen/ability/obj_based/technomancer/A in wearer.ability_master.ability_objects) + for(var/atom/movable/screen/ability/obj_based/technomancer/A in wearer.ability_master.ability_objects) wearer.ability_master.remove_ability(A) wearer = null ..() @@ -192,7 +192,7 @@ if(spell_to_remove in spells) spells.Remove(spell_to_remove) if(wearer) - var/obj/screen/ability/obj_based/technomancer/A = wearer.ability_master.get_ability_by_instance(spell_to_remove) + var/atom/movable/screen/ability/obj_based/technomancer/A = wearer.ability_master.get_ability_by_instance(spell_to_remove) if(A) wearer.ability_master.remove_ability(A) qdel(spell_to_remove) diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index df5a0afe10a..6c0900946a1 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -46,6 +46,7 @@ ..(severity) /obj/machinery/portable_atmospherics/powered/scrubber/update_icon_state() + . = ..() if(on && cell && cell.charge) icon_state = "pscrubber:1" else diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 1f0121ade41..85d482f0627 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -43,9 +43,9 @@ /obj/machinery/camera/apply_visual(mob/living/carbon/human/M) if(!M.client) return - M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed) - M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline) - M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise) + M.overlay_fullscreen("fishbed",/atom/movable/screen/fullscreen/fishbed) + M.overlay_fullscreen("scanlines",/atom/movable/screen/fullscreen/scanline) + M.overlay_fullscreen("whitenoise",/atom/movable/screen/fullscreen/noise) M.machine_visual = src return 1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9affc337868..879110fd667 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -211,7 +211,7 @@ anchored = 1 dir = WEST - var/base_icon_state = "cryopod_0" //VOREStation Edit - New Icon + base_icon_state = "cryopod_0" //VOREStation Edit - New Icon var/occupied_icon_state = "cryopod_1" //VOREStation Edit - New Icon var/on_store_message = "has entered long-term storage." var/on_store_name = "Cryogenic Oversight" diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 0065fcdff8b..885dd3f28d4 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -130,6 +130,7 @@ Barricades update_icon() /obj/machinery/deployable/barrier/update_icon_state() + . = ..() icon_state = "barrier[locked]" /obj/machinery/deployable/barrier/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 121326c70d1..408cc6211f6 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -189,7 +189,7 @@ frame_style = FRAME_STYLE_WALL x_offset = 24 y_offset = 24 - + /datum/frame/frame_types/arfgs name = "ARF Generator" frame_class = FRAME_CLASS_MACHINE @@ -223,10 +223,11 @@ if(circuit) . += "It has \a [circuit] installed." -/obj/structure/frame/proc/update_desc() +/obj/structure/frame/update_desc() + . = ..() var/D if(req_components) - var/list/component_list = new + var/list/component_list = list() for(var/I in req_components) if(req_components[I] > 0) component_list += "[num2text(req_components[I])] [req_component_names[I]]" diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index 599e98200b7..c225f648fb7 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -149,7 +149,7 @@ user.mapobjs = list() for(var/i=0; iTip of the day:
[tip]") - var/obj/screen/loader = new(target) + var/atom/movable/screen/loader = new(target) loader.name = "Autosaving..." loader.desc = "A disc icon that represents your game autosaving. Please wait." loader.icon = 'icons/obj/discs_vr.dmi' diff --git a/code/modules/admin/view_variables/color_matrix_editor.dm b/code/modules/admin/view_variables/color_matrix_editor.dm new file mode 100644 index 00000000000..519c2e44670 --- /dev/null +++ b/code/modules/admin/view_variables/color_matrix_editor.dm @@ -0,0 +1,129 @@ +INITIALIZE_IMMEDIATE(/atom/movable/screen/color_matrix_proxy_view) + +/atom/movable/screen/color_matrix_proxy_view + name = "color_matrix_proxy_view" + del_on_map_removal = FALSE + layer = OBJ_PLANE + plane = OBJ_PLANE + + var/list/plane_masters = list() + + /// The client that is watching this view + var/client/client + +/atom/movable/screen/color_matrix_proxy_view/Initialize(mapload) + . = ..() + + assigned_map = "color_matrix_proxy_[REF(src)]" + set_position(1, 1) + +/atom/movable/screen/color_matrix_proxy_view/Destroy() + for (var/plane_master in plane_masters) + client?.screen -= plane_master + qdel(plane_master) + + client?.clear_map(assigned_map) + + client = null + plane_masters = null + + return ..() + +/atom/movable/screen/color_matrix_proxy_view/proc/register_to_client(client/client) + QDEL_LIST(plane_masters) + + src.client = client + + if (!client) + return + + for (var/plane_master_type in subtypesof(/atom/movable/screen/plane_master)) // - /atom/movable/screen/plane_master/blackness) + var/atom/movable/screen/plane_master/plane_master = new plane_master_type() + plane_master.screen_loc = "[assigned_map]:CENTER" + client?.screen |= plane_master + + plane_masters += plane_master + + client?.register_map_obj(src) + +/datum/color_matrix_editor + var/client/owner + var/datum/weakref/target + var/atom/movable/screen/color_matrix_proxy_view/proxy_view + var/list/current_color + var/closed + +/datum/color_matrix_editor/New(user, atom/_target = null) + owner = CLIENT_FROM_VAR(user) + if(islist(_target?.color)) + current_color = _target.color + else if(istext(_target?.color)) + current_color = color_hex2color_matrix(_target.color) + else + current_color = color_matrix_identity() + proxy_view = new + if(_target) + target = WEAKREF(_target) + proxy_view.appearance = image(_target) + else + proxy_view.appearance = image('icons/misc/colortest.dmi', "colors") + + proxy_view.color = current_color + proxy_view.register_to_client(owner) + +/datum/color_matrix_editor/Destroy(force, ...) + QDEL_NULL(proxy_view) + return ..() + +/datum/color_matrix_editor/ui_state(mob/user) + return GLOB.admin_state + +/datum/color_matrix_editor/ui_static_data(mob/user) + var/list/data = list() + data["mapRef"] = proxy_view.assigned_map + + return data + +/datum/color_matrix_editor/ui_data(mob/user) + var/list/data = list() + data["currentColor"] = current_color + + return data + +/datum/color_matrix_editor/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "ColorMatrixEditor") + ui.open() + +/datum/color_matrix_editor/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + switch(action) + if("transition_color") + current_color = params["color"] + animate(proxy_view, time = 4, color = current_color) + if("confirm") + on_confirm() + SStgui.close_uis(src) + +/datum/color_matrix_editor/ui_close(mob/user) + . = ..() + closed = TRUE + +/datum/color_matrix_editor/proc/on_confirm() + var/atom/target_atom = target?.resolve() + if(istype(target_atom)) + target_atom.vv_edit_var("color", current_color) + +/datum/color_matrix_editor/proc/wait() + while(!closed) + stoplag(1) + +/client/proc/open_color_matrix_editor(atom/in_atom) + var/datum/color_matrix_editor/editor = new /datum/color_matrix_editor(src, in_atom) + editor.ui_interact(mob) + editor.wait() + . = editor.current_color + qdel(editor) diff --git a/code/modules/admin/view_variables/filteriffic.dm b/code/modules/admin/view_variables/filteriffic.dm new file mode 100644 index 00000000000..e9feeb49848 --- /dev/null +++ b/code/modules/admin/view_variables/filteriffic.dm @@ -0,0 +1,102 @@ +/datum/filter_editor + var/atom/target + +/datum/filter_editor/New(atom/target) + src.target = target + +/datum/filter_editor/ui_state(mob/user) + return GLOB.admin_state + +/datum/filter_editor/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Filteriffic") + ui.open() + +/datum/filter_editor/ui_static_data(mob/user) + var/list/data = list() + data["filter_info"] = GLOB.master_filter_info + return data + +/datum/filter_editor/ui_data() + var/list/data = list() + data["target_name"] = target.name + data["target_filter_data"] = target.filter_data + return data + +/datum/filter_editor/ui_act(action, list/params) + . = ..() + if(.) + return + + switch(action) + if("add_filter") + var/target_name = params["name"] + while(target.filter_data && target.filter_data[target_name]) + target_name = "[target_name]-dupe" + target.add_filter(target_name, params["priority"], list("type" = params["type"])) + . = TRUE + if("remove_filter") + target.remove_filter(params["name"]) + . = TRUE + if("rename_filter") + var/list/filter_data = target.filter_data[params["name"]] + target.remove_filter(params["name"]) + target.add_filter(params["new_name"], filter_data["priority"], filter_data) + . = TRUE + if("edit_filter") + target.remove_filter(params["name"]) + target.add_filter(params["name"], params["priority"], params["new_filter"]) + . = TRUE + if("change_priority") + var/new_priority = params["new_priority"] + target.change_filter_priority(params["name"], new_priority) + . = TRUE + if("transition_filter_value") + target.transition_filter(params["name"], 4, params["new_data"]) + . = TRUE + if("modify_filter_value") + var/list/old_filter_data = target.filter_data[params["name"]] + var/list/new_filter_data = old_filter_data.Copy() + for(var/entry in params["new_data"]) + new_filter_data[entry] = params["new_data"][entry] + for(var/entry in new_filter_data) + if(entry == GLOB.master_filter_info[old_filter_data["type"]]["defaults"][entry]) + new_filter_data.Remove(entry) + target.remove_filter(params["name"]) + target.add_filter(params["name"], old_filter_data["priority"], new_filter_data) + . = TRUE + if("modify_color_value") + var/new_color = input(usr, "Pick new filter color", "Filteriffic Colors!") as color|null + if(new_color) + target.transition_filter(params["name"], 4, list("color" = new_color)) + . = TRUE + if("modify_icon_value") + var/icon/new_icon = input("Pick icon:", "Icon") as null|icon + if(new_icon) + target.filter_data[params["name"]]["icon"] = new_icon + target.update_filters() + . = TRUE + if("mass_apply") + if(!check_rights(R_FUN)) + to_chat(usr, SPAN_DANGER("Stay in your lane, jannie.")) + return + var/target_path = text2path(params["path"]) + if(!target_path) + return + var/filters_to_copy = target.filters + var/filter_data_to_copy = target.filter_data + var/count = 0 + for(var/thing in world.contents) + if(istype(thing, target_path)) + var/atom/thing_at = thing + thing_at.filters = filters_to_copy + thing_at.filter_data = filter_data_to_copy + count += 1 + message_admins("LOCAL CLOWN [usr.ckey] JUST MASS FILTER EDITED [count] WITH PATH OF [params["path"]]!") + log_admin("LOCAL CLOWN [usr.ckey] JUST MASS FILTER EDITED [count] WITH PATH OF [params["path"]]!") + +/client/proc/open_filter_editor(atom/in_atom) + if(holder) + holder.filteriffic = new /datum/filter_editor(in_atom) + holder.filteriffic.ui_interact(mob) diff --git a/code/modules/atmospherics/mainspipe.dm b/code/modules/atmospherics/mainspipe.dm index ffe5d047580..58956d25c8e 100644 --- a/code/modules/atmospherics/mainspipe.dm +++ b/code/modules/atmospherics/mainspipe.dm @@ -144,6 +144,7 @@ setDir(4) /obj/machinery/atmospherics/mains_pipe/simple/update_icon_state() + . = ..() if(nodes[1] && nodes[2]) icon_state = "intact[invisibility ? "-f" : "" ]" @@ -249,6 +250,7 @@ update_icon() /obj/machinery/atmospherics/mains_pipe/manifold/update_icon_state() + . = ..() icon_state = "manifold[invisibility ? "-f" : "" ]" /obj/machinery/atmospherics/mains_pipe/manifold/hidden @@ -299,6 +301,7 @@ update_icon() /obj/machinery/atmospherics/mains_pipe/manifold4w/update_icon_state() + . = ..() icon_state = "manifold4w[invisibility ? "-f" : "" ]" /obj/machinery/atmospherics/mains_pipe/manifold4w/hidden @@ -360,6 +363,7 @@ update_icon() /obj/machinery/atmospherics/mains_pipe/split/update_icon_state() + . = ..() icon_state = "split-[icon_type][invisibility ? "-f" : "" ]" /obj/machinery/atmospherics/mains_pipe/split/return_network(A) diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index aa1be03ba1e..d4880e44a86 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -57,7 +57,7 @@ preload_rsc = PRELOAD_RSC - var/global/obj/screen/click_catcher/void + var/global/atom/movable/screen/click_catcher/void var/lastping = 0 var/avgping = 0 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 32ec969fb1e..bfe35eaeb03 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -87,7 +87,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/antag_vis = "Hidden" //How visible antag association is to others. //Mob preview - var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen. + var/list/char_render_holders //Should only be a key-value list of north/south/east/west = atom/movable/screen. var/static/list/preview_screen_locs = list( "1" = "character_preview_map:2,7", "2" = "character_preview_map:2,5", @@ -295,7 +295,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(!client) return - var/obj/screen/setup_preview/bg/BG= LAZYACCESS(char_render_holders, "BG") + var/atom/movable/screen/setup_preview/bg/BG= LAZYACCESS(char_render_holders, "BG") if(!BG) BG = new BG.plane = TURF_PLANE @@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) BG.screen_loc = preview_screen_locs["BG"] for(var/D in GLOB.cardinal) - var/obj/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]") + var/atom/movable/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]") if(!O) O = new O.pref = src @@ -325,7 +325,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) /datum/preferences/proc/clear_character_previews() for(var/index in char_render_holders) - var/obj/screen/S = char_render_holders[index] + var/atom/movable/screen/S = char_render_holders[index] client?.screen -= S qdel(S) char_render_holders = null diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index 4659d1aeb73..7696b62c9df 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -67,7 +67,7 @@ var/global/list/all_tooltip_styles = list( if(isrobot(usr)) ic = all_ui_styles_robot[UI_style_new] - for(var/obj/screen/I in icons) + for(var/atom/movable/screen/I in icons) if(I.name in list(INTENT_HELP, INTENT_HARM, INTENT_DISARM, INTENT_GRAB)) continue I.icon = ic I.color = UI_style_color_new diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index b23bc08ee6a..1e56cf9fdd6 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -25,7 +25,7 @@ BLIND // can't see anything var/off_state = "degoggles" var/active = 1 var/activation_sound = 'sound/items/goggles_charge.ogg' - var/obj/screen/overlay = null + var/atom/movable/screen/overlay = null var/list/away_planes //Holder for disabled planes drop_sound = 'sound/items/drop/accessory.ogg' pickup_sound = 'sound/items/pickup/accessory.ogg' diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm index b56c4d324ea..897a1d723e0 100644 --- a/code/modules/clothing/head/pilot_helmet.dm +++ b/code/modules/clothing/head/pilot_helmet.dm @@ -18,7 +18,7 @@ w_class = ITEMSIZE_NORMAL var/obj/machinery/computer/shuttle_control/shuttle_comp - var/obj/screen/pilot_hud + var/atom/movable/screen/pilot_hud var/list/images var/list/raw_images var/last_status diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 87d52e7d83d..3db2b184025 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -304,8 +304,8 @@ var/seal_target = !canremove var/failed_to_seal - var/obj/screen/rig_booting/booting_L = new - var/obj/screen/rig_booting/booting_R = new + var/atom/movable/screen/rig_booting/booting_L = new + var/atom/movable/screen/rig_booting/booting_R = new if(!seal_target) booting_L.icon_state = "boot_left" @@ -1159,7 +1159,7 @@ return null //Boot animation screen objects -/obj/screen/rig_booting +/atom/movable/screen/rig_booting screen_loc = "1,1" icon = 'icons/obj/rig_boot.dmi' icon_state = "" @@ -1170,7 +1170,7 @@ //Shows cell charge on screen, ideally. -var/obj/screen/cells = null +var/atom/movable/screen/cells = null // update the status screen display /obj/item/rig/Stat() diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index af6f81a7daf..bdf34649e13 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -61,7 +61,8 @@ . = ..() update_name() -/obj/item/reagent_containers/glass/rag/proc/update_name() +/obj/item/reagent_containers/glass/rag/update_name() + . = ..() if(on_fire) name = "burning [initial(name)]" else if(reagents.total_volume) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index bb3adbd8d2b..7c6996f0a43 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -61,12 +61,12 @@ force = 1 catalogue_data = seed.catalog_data_grown -/obj/item/reagent_containers/food/snacks/grown/proc/update_desc() - +/obj/item/reagent_containers/food/snacks/grown/update_desc() + . = ..() if(!seed) return if(!plant_controller) - sleep(250) // ugly hack, should mean roundstart plants are fine. + addtimer(CALLBACK(src, /atom/proc/update_desc), 250) // ugly hack, should mean roundstart plants are fine. if(!plant_controller) to_chat(world, "Plant controller does not exist and [src] requires it. Aborting.") qdel(src) diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 2598b664230..e9f676e27e3 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -24,8 +24,10 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds) update_appearance() //Updates strings and icon appropriately based on seed datum. -/obj/item/seeds/proc/update_appearance() - if(!seed) return +/obj/item/seeds/update_appearance() + . = ..() + if(!seed) + return // Update icon. overlays.Cut() diff --git a/code/modules/mining/kinetic_crusher.dm b/code/modules/mining/kinetic_crusher.dm index feee5d43a6b..f7f901fe40a 100644 --- a/code/modules/mining/kinetic_crusher.dm +++ b/code/modules/mining/kinetic_crusher.dm @@ -226,6 +226,7 @@ set_light(0) /obj/item/kinetic_crusher/update_icon_state() + . = ..() if(update_item_state) item_state = "crusher[wielded]" // this is not icon_state and not supported by 2hcomponent diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 501b5f06749..e231f2d9425 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -126,12 +126,12 @@ if ( stat != 2) if ((blinded)) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else clear_fullscreen("blind") - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) - set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry) - set_fullscreen(druggy, "high", /obj/screen/fullscreen/high) + set_fullscreen(disabilities & NEARSIGHTED, "impaired", /atom/movable/screen/fullscreen/impaired, 1) + set_fullscreen(eye_blurry, "blurry", /atom/movable/screen/fullscreen/blurry) + set_fullscreen(druggy, "high", /atom/movable/screen/fullscreen/high) if(machine) if(machine.check_eye(src) < 0) reset_view(null) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index a310320a86b..e6a396fd0d7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -179,12 +179,12 @@ if (stat != 2) if ((blinded)) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else clear_fullscreen("blind") - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) - set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry) - set_fullscreen(druggy, "high", /obj/screen/fullscreen/high) + set_fullscreen(disabilities & NEARSIGHTED, "impaired", /atom/movable/screen/fullscreen/impaired, 1) + set_fullscreen(eye_blurry, "blurry", /atom/movable/screen/fullscreen/blurry) + set_fullscreen(druggy, "high", /atom/movable/screen/fullscreen/high) if (machine) if (!( machine.check_eye(src) )) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 899b9332d5d..5a89be8fb74 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -227,7 +227,7 @@ /mob/living/carbon/proc/eyecheck() return 0 -/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) +/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) if(eyecheck() < intensity || override_blindness_check) return ..() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5ebf6f803ad..2f8785a1d40 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -679,7 +679,7 @@ I.additional_flash_effects(number) return number -/mob/living/carbon/human/flash_eyes(var/intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) +/mob/living/carbon/human/flash_eyes(var/intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) if(internal_organs_by_name[O_EYES]) // Eyes are fucked, not a 'weak point'. var/obj/item/organ/internal/eyes/I = internal_organs_by_name[O_EYES] I.additional_flash_effects(intensity) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 702e351bbac..af8fb50b92a 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1187,7 +1187,7 @@ if(-90 to -80) severity = 8 if(-95 to -90) severity = 9 if(-INFINITY to -95) severity = 10 - overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity) + overlay_fullscreen("crit", /atom/movable/screen/fullscreen/crit, severity) else //Alive clear_fullscreen("crit") //Oxygen damage overlay @@ -1201,7 +1201,7 @@ if(35 to 40) severity = 5 if(40 to 45) severity = 6 if(45 to INFINITY) severity = 7 - overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity) + overlay_fullscreen("oxy", /atom/movable/screen/fullscreen/oxy, severity) else clear_fullscreen("oxy") @@ -1217,7 +1217,7 @@ if(55 to 70) severity = 4 if(70 to 85) severity = 5 if(85 to INFINITY) severity = 6 - overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity) + overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity) else clear_fullscreen("brute") @@ -1339,13 +1339,13 @@ else bodytemp.icon_state = "temp0" if(blinded) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else clear_fullscreens() if(blinded) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else if(!machine) clear_fullscreens() @@ -1354,12 +1354,12 @@ if(glasses) //to every /obj/item var/obj/item/clothing/glasses/G = glasses if(!G.prescription) - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) + set_fullscreen(disabilities & NEARSIGHTED, "impaired", /atom/movable/screen/fullscreen/impaired, 1) else if (!nif || !nif.flag_check(NIF_V_CORRECTIVE,NIF_FLAGS_VISION)) //VOREStation Edit - NIF - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) + set_fullscreen(disabilities & NEARSIGHTED, "impaired", /atom/movable/screen/fullscreen/impaired, 1) - set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry) - set_fullscreen(druggy, "high", /obj/screen/fullscreen/high) + set_fullscreen(eye_blurry, "blurry", /atom/movable/screen/fullscreen/blurry) + set_fullscreen(druggy, "high", /atom/movable/screen/fullscreen/high) if(config_legacy.welder_vision) var/found_welder diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm index fea79138229..c5807518479 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm @@ -131,9 +131,9 @@ add_shadekin_abilities(H) /datum/species/shadekin/proc/add_shadekin_abilities(var/mob/living/carbon/human/H) - if(!H.ability_master || !istype(H.ability_master, /obj/screen/movable/ability_master/shadekin)) + if(!H.ability_master || !istype(H.ability_master, /atom/movable/screen/movable/ability_master/shadekin)) H.ability_master = null - H.ability_master = new /obj/screen/movable/ability_master/shadekin(H) + H.ability_master = new /atom/movable/screen/movable/ability_master/shadekin(H) for(var/datum/power/shadekin/P in shadekin_ability_datums) if(!(P.verbpath in H.verbs)) H.verbs += P.verbpath diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm index fa17ab33a51..38b49173258 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_hud.dm @@ -1,13 +1,13 @@ -/obj/screen/shadekin +/atom/movable/screen/shadekin icon = 'icons/mob/shadekin_hud.dmi' invisibility = 101 -/obj/screen/shadekin/darkness +/atom/movable/screen/shadekin/darkness name = "darkness" icon_state = "dark" alpha = 150 -/obj/screen/shadekin/energy +/atom/movable/screen/shadekin/energy name = "energy" icon_state = "energy0" alpha = 150 @@ -15,7 +15,7 @@ -/obj/screen/movable/ability_master/shadekin +/atom/movable/screen/movable/ability_master/shadekin name = "Shadekin Abilities" icon = 'icons/mob/screen_spells.dmi' icon_state = "grey_spell_ready" @@ -27,26 +27,26 @@ screen_loc = ui_spell_master -/obj/screen/movable/ability_master/shadekin/update_abilities(forced = 0, mob/user) //Different proc to prevent indexing +/atom/movable/screen/movable/ability_master/shadekin/update_abilities(forced = 0, mob/user) //Different proc to prevent indexing update_icon() if(user && user.client) if(!(src in user.client.screen)) user.client.screen += src - for(var/obj/screen/ability/ability in ability_objects) + for(var/atom/movable/screen/ability/ability in ability_objects) ability.update_icon(forced) -/obj/screen/ability/verb_based/shadekin +/atom/movable/screen/ability/verb_based/shadekin icon_state = "grey_spell_base" background_base_state = "grey" -/obj/screen/movable/ability_master/proc/add_shadekin_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) +/atom/movable/screen/movable/ability_master/proc/add_shadekin_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments) if(!object_given) message_admins("ERROR: add_shadekin_ability() was not given an object in its arguments.") if(!verb_given) message_admins("ERROR: add_shadekin_ability() was not given a verb/proc in its arguments.") if(get_ability_by_proc_ref(verb_given)) return // Duplicate - var/obj/screen/ability/verb_based/shadekin/A = new /obj/screen/ability/verb_based/shadekin() + var/atom/movable/screen/ability/verb_based/shadekin/A = new /atom/movable/screen/ability/verb_based/shadekin() A.ability_master = src A.object_used = object_given A.verb_to_call = verb_given diff --git a/code/modules/mob/living/carbon/human/species/station/station_special.dm b/code/modules/mob/living/carbon/human/species/station/station_special.dm index 316904962e2..1da3ca81d33 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special.dm @@ -175,8 +175,8 @@ ..() /datum/species/shapeshifter/xenochimera/add_inherent_spells(var/mob/living/carbon/human/H) - var/master_type = /obj/screen/movable/spell_master/chimera - var/obj/screen/movable/spell_master/chimera/new_spell_master = new master_type + var/master_type = /atom/movable/screen/movable/spell_master/chimera + var/atom/movable/screen/movable/spell_master/chimera/new_spell_master = new master_type if(!H.spell_masters) H.spell_masters = list() @@ -193,7 +193,7 @@ /datum/species/shapeshifter/xenochimera/proc/add_feral_spells(var/mob/living/carbon/human/H) if(!has_feral_spells) var/check = FALSE - var/master_type = /obj/screen/movable/spell_master/chimera + var/master_type = /atom/movable/screen/movable/spell_master/chimera for(var/spell/S as anything in feral_spells) var/spell/spell_to_add = new S(H) check = H.add_spell(spell_to_add, "cult", master_type) @@ -472,11 +472,11 @@ return -/obj/screen/xenochimera +/atom/movable/screen/xenochimera icon = 'icons/mob/chimerahud.dmi' invisibility = 101 -/obj/screen/xenochimera/danger_level +/atom/movable/screen/xenochimera/danger_level name = "danger level" icon_state = "danger00" //first number is bool of whether or not we're in danger, second is whether or not we're feral alpha = 200 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 53e6281987f..fcf6f0f5895 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -798,7 +798,7 @@ default behaviour is: update_canmove() //called when the mob receives a bright flash -/mob/living/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) +/mob/living/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) if(override_blindness_check || !(disabilities & BLIND)) overlay_fullscreen("flash", type) spawn(25) @@ -1100,7 +1100,7 @@ default behaviour is: src.throw_mode_off() if(usr.stat || !target) return - if(target.type == /obj/screen) return + if(target.type == /atom/movable/screen) return var/atom/movable/item = src.get_active_hand() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index c600af80b89..651235dc9da 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -528,11 +528,11 @@ for(var/datum/action/A in actions) button_number++ if(A.button == null) - var/obj/screen/movable/action_button/N = new(hud_used) + var/atom/movable/screen/movable/action_button/N = new(hud_used) N.owner = A A.button = N - var/obj/screen/movable/action_button/B = A.button + var/atom/movable/screen/movable/action_button/B = A.button B.UpdateIcon() diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index fc7692d0f39..b5846faafde 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -31,7 +31,7 @@ m_intent = MOVE_INTENT_RUN /* if(hud_used && hud_used.static_inventory) - for(var/obj/screen/mov_intent/selector in hud_used.static_inventory) + for(var/atom/movable/screen/mov_intent/selector in hud_used.static_inventory) selector.update_icon() */ // nah, vorecode bad. diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 5080273f13e..82969559ff7 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -80,7 +80,7 @@ //Blind the AI updateicon() - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) src.sight = src.sight&~SEE_TURFS src.sight = src.sight&~SEE_MOBS src.sight = src.sight&~SEE_OBJS @@ -121,9 +121,9 @@ break if (!theAPC) switch(PRP) - if (1) + if (1) to_chat(src, "Unable to locate APC!") - else + else to_chat(src, "Lost connection with the APC!") src:aiRestorePowerRoutine = 2 return @@ -134,11 +134,11 @@ clear_fullscreen("blind") //This, too, is a fix to issue 603 return switch(PRP) - if (1) + if (1) to_chat(src, "APC located. Optimizing route to APC to avoid needless power waste.") - if (2) + if (2) to_chat(src, "Best route identified. Hacking offline APC power port.") - if (3) + if (3) to_chat(src, "Power port upload access confirmed. Loading control program into APC power port software.") if (4) to_chat(src, "Transfer complete. Forcing APC to execute program.") diff --git a/code/modules/mob/living/silicon/robot/drone/swarm.dm b/code/modules/mob/living/silicon/robot/drone/swarm.dm index e2fe41777b1..d9c3735e2e3 100644 --- a/code/modules/mob/living/silicon/robot/drone/swarm.dm +++ b/code/modules/mob/living/silicon/robot/drone/swarm.dm @@ -57,7 +57,7 @@ add_language(LANGUAGE_SWARMBOT, 1) for(var/spell in spell_setup) - src.add_spell(new spell, "nano_spell_ready", /obj/screen/movable/spell_master/swarm) + src.add_spell(new spell, "nano_spell_ready", /atom/movable/screen/movable/spell_master/swarm) /mob/living/silicon/robot/drone/swarm/init() ..() diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 063918c853b..d7b48f37fdb 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -284,12 +284,12 @@ if(stat != 2) if(blinded) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else clear_fullscreen("blind") - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) - set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry) - set_fullscreen(druggy, "high", /obj/screen/fullscreen/high) + set_fullscreen(disabilities & NEARSIGHTED, "impaired", /atom/movable/screen/fullscreen/impaired, 1) + set_fullscreen(eye_blurry, "blurry", /atom/movable/screen/fullscreen/blurry) + set_fullscreen(druggy, "high", /atom/movable/screen/fullscreen/high) if (src.machine) if (src.machine.check_eye(src) < 0) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 972fda856c5..2be258fad0b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -70,13 +70,13 @@ //Hud stuff - var/obj/screen/cells = null - var/obj/screen/inv1 = null - var/obj/screen/inv2 = null - var/obj/screen/inv3 = null + var/atom/movable/screen/cells = null + var/atom/movable/screen/inv1 = null + var/atom/movable/screen/inv2 = null + var/atom/movable/screen/inv3 = null var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not - var/obj/screen/robot_modules_background + var/atom/movable/screen/robot_modules_background //3 Modules can be activated at any one time. var/obj/item/robot_module/module = null diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 03d568c5c8e..01f9fb8e8fd 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -406,7 +406,7 @@ if(cameraFollow) cameraFollow = null -/mob/living/silicon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) +/mob/living/silicon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) if(affect_silicon) return ..() diff --git a/code/modules/mob/living/simple_mob/simple_hud.dm b/code/modules/mob/living/simple_mob/simple_hud.dm index 019673d55fb..32d72402199 100644 --- a/code/modules/mob/living/simple_mob/simple_hud.dm +++ b/code/modules/mob/living/simple_mob/simple_hud.dm @@ -19,13 +19,13 @@ hud.hotkeybuttons = hotkeybuttons var/list/hud_elements = list() - var/obj/screen/using - var/obj/screen/inventory/inv_box + var/atom/movable/screen/using + var/atom/movable/screen/inventory/inv_box var/has_hidden_gear if(LAZYLEN(hud_gears)) for(var/gear_slot in hud_gears) - inv_box = new /obj/screen/inventory() + inv_box = new /atom/movable/screen/inventory() inv_box.icon = ui_style inv_box.color = ui_color inv_box.alpha = ui_alpha @@ -47,7 +47,7 @@ adding += inv_box if(has_hidden_gear) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "toggle" using.icon = ui_style using.icon_state = "other" @@ -58,7 +58,7 @@ adding += using //Intent Backdrop - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "act_intent" using.icon = ui_style using.icon_state = "intent_"+a_intent @@ -76,7 +76,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height()) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_HELP using.icon = ico using.screen_loc = ui_acti @@ -88,7 +88,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height()) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_DISARM using.icon = ico using.screen_loc = ui_acti @@ -100,7 +100,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_GRAB using.icon = ico using.screen_loc = ui_acti @@ -112,7 +112,7 @@ ico = new(ui_style, "black") ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1) ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = INTENT_HARM using.icon = ico using.screen_loc = ui_acti @@ -122,7 +122,7 @@ hud.hurt_intent = using //Move intent (walk/run) - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "mov_intent" using.icon = ui_style using.icon_state = (m_intent == "run" ? "running" : "walking") @@ -133,7 +133,7 @@ hud.move_intent = using //Resist button - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "resist" using.icon = ui_style using.icon_state = "act_resist" @@ -143,7 +143,7 @@ hud.hotkeybuttons += using //Pull button - pullin = new /obj/screen() + pullin = new /atom/movable/screen() pullin.icon = ui_style pullin.icon_state = "pull0" pullin.name = "pull" @@ -152,7 +152,7 @@ hud_elements |= pullin //Health status - healths = new /obj/screen() + healths = new /atom/movable/screen() healths.icon = ui_style healths.icon_state = "health0" healths.name = "health" @@ -160,7 +160,7 @@ hud_elements |= healths //Oxygen dep icon - oxygen = new /obj/screen() + oxygen = new /atom/movable/screen() oxygen.icon = ui_style oxygen.icon_state = "oxy0" oxygen.name = "oxygen" @@ -168,7 +168,7 @@ hud_elements |= oxygen //Toxins present icon - toxin = new /obj/screen() + toxin = new /atom/movable/screen() toxin.icon = ui_style toxin.icon_state = "tox0" toxin.name = "toxin" @@ -176,7 +176,7 @@ hud_elements |= toxin //Fire warning - fire = new /obj/screen() + fire = new /atom/movable/screen() fire.icon = ui_style fire.icon_state = "fire0" fire.name = "fire" @@ -184,7 +184,7 @@ hud_elements |= fire //Pressure warning - pressure = new /obj/screen() + pressure = new /atom/movable/screen() pressure.icon = ui_style pressure.icon_state = "pressure0" pressure.name = "pressure" @@ -192,7 +192,7 @@ hud_elements |= pressure //Body temp warning - bodytemp = new /obj/screen() + bodytemp = new /atom/movable/screen() bodytemp.icon = ui_style bodytemp.icon_state = "temp0" bodytemp.name = "body temperature" @@ -200,16 +200,16 @@ hud_elements |= bodytemp //Nutrition status - nutrition_icon = new /obj/screen() + nutrition_icon = new /atom/movable/screen() nutrition_icon.icon = ui_style nutrition_icon.icon_state = "nutrition0" nutrition_icon.name = "nutrition" nutrition_icon.screen_loc = ui_nutrition hud_elements |= nutrition_icon - pain = new /obj/screen( null ) + pain = new /atom/movable/screen( null ) - zone_sel = new /obj/screen/zone_sel( null ) + zone_sel = new /atom/movable/screen/zone_sel( null ) zone_sel.icon = ui_style zone_sel.color = ui_color zone_sel.alpha = ui_alpha @@ -220,7 +220,7 @@ //Hand things if(has_hands) //Drop button - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "drop" using.icon = ui_style using.icon_state = "act_drop" @@ -230,7 +230,7 @@ hud.hotkeybuttons += using //Equip detail - using = new /obj/screen() + using = new /atom/movable/screen() using.name = "equip" using.icon = ui_style using.icon_state = "act_equip" @@ -240,7 +240,7 @@ hud.adding += using //Hand slots themselves - inv_box = new /obj/screen/inventory/hand() + inv_box = new /atom/movable/screen/inventory/hand() inv_box.hud = src inv_box.name = "r_hand" inv_box.icon = ui_style @@ -255,7 +255,7 @@ hud.adding += inv_box slot_info["[slot_r_hand]"] = inv_box.screen_loc - inv_box = new /obj/screen/inventory/hand() + inv_box = new /atom/movable/screen/inventory/hand() inv_box.hud = src inv_box.name = "l_hand" inv_box.icon = ui_style @@ -271,7 +271,7 @@ slot_info["[slot_l_hand]"] = inv_box.screen_loc //Swaphand titlebar - using = new /obj/screen/inventory() + using = new /atom/movable/screen/inventory() using.name = "hand" using.icon = ui_style using.icon_state = "hand1" @@ -280,7 +280,7 @@ using.alpha = ui_alpha hud.adding += using - using = new /obj/screen/inventory() + using = new /atom/movable/screen/inventory() using.name = "hand" using.icon = ui_style using.icon_state = "hand2" @@ -290,7 +290,7 @@ hud.adding += using //Throw button - throw_icon = new /obj/screen() + throw_icon = new /atom/movable/screen() throw_icon.icon = ui_style throw_icon.icon_state = "act_throw_off" throw_icon.name = "throw" diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm index 2f1b87698a8..7488c1a3fa5 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm @@ -107,7 +107,8 @@ update_icon() update_name() -/mob/living/simple_mob/slime/xenobio/proc/update_name() +/mob/living/simple_mob/slime/xenobio/update_name() + . = ..() if(harmless) // Docile slimes are generally named, so we shouldn't mess with it. return name = "[slime_color] [is_adult ? "adult" : "baby"] [initial(name)] ([number])" diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm index 6db7932438b..b2f61d72004 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm @@ -50,7 +50,7 @@ var/morph_time = 0 var/our_size_multiplier = 1 var/static/list/blacklist_typecache = typecacheof(list( - /obj/screen, + /atom/movable/screen, /obj/singularity, /mob/living/simple_mob/vore/hostile/morph, /obj/effect)) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm index 93c60bcc230..80859e8985f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm @@ -72,8 +72,8 @@ var/energy_adminbuse = FALSE //For adminbuse infinite energy var/dark_gains = 0 //Last tick's change in energy var/ability_flags = 0 //Flags for active abilities - var/obj/screen/darkhud //Holder to update this icon - var/obj/screen/energyhud //Holder to update this icon + var/atom/movable/screen/darkhud //Holder to update this icon + var/atom/movable/screen/energyhud //Holder to update this icon var/list/shadekin_abilities @@ -418,7 +418,7 @@ //Special hud elements for darkness and energy gains /mob/living/simple_mob/shadekin/extra_huds(var/datum/hud/hud,var/icon/ui_style,var/list/hud_elements) //Darkness hud - darkhud = new /obj/screen() + darkhud = new /atom/movable/screen() darkhud.icon = ui_style darkhud.icon_state = "dark" darkhud.name = "darkness" @@ -427,7 +427,7 @@ hud_elements |= darkhud //Energy hud - energyhud = new /obj/screen() + energyhud = new /atom/movable/screen() energyhud.icon = ui_style energyhud.icon_state = "energy0" energyhud.name = "energy" diff --git a/code/modules/mob/login_vr.dm b/code/modules/mob/login_vr.dm index ac2344d5c6f..cc67709f333 100644 --- a/code/modules/mob/login_vr.dm +++ b/code/modules/mob/login_vr.dm @@ -5,5 +5,5 @@ for(var/datum/alternate_appearance/AA in viewing_alternate_appearances) AA.display_to(list(src)) - var/obj/screen/plane_master/augmented/aug = plane_holder.plane_masters[VIS_AUGMENTED] + var/atom/movable/screen/plane_master/augmented/aug = plane_holder.plane_masters[VIS_AUGMENTED] aug.apply() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 50b8b1285de..af0b2faba63 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -6,7 +6,7 @@ qdel(hud_used) clear_fullscreen() if(client) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) qdel(spell_master) remove_screen_obj_references() client.screen = list() @@ -1126,7 +1126,7 @@ mob/proc/yank_out_object() exploit_record += exploitmsg /client/proc/check_has_body_select() - return mob && mob.hud_used && istype(mob.zone_sel, /obj/screen/zone_sel) + return mob && mob.hud_used && istype(mob.zone_sel, /atom/movable/screen/zone_sel) /client/verb/body_toggle_head() set name = "body-toggle-head" @@ -1166,7 +1166,7 @@ mob/proc/yank_out_object() /client/proc/toggle_zone_sel(list/zones) if(!check_has_body_select()) return - var/obj/screen/zone_sel/selector = mob.zone_sel + var/atom/movable/screen/zone_sel/selector = mob.zone_sel selector.set_selected_zone(next_list_item(mob.zone_sel.selecting,zones)) // This handles setting the client's color variable, which makes everything look a specific color. diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e2b38c52560..8af86f75aae 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -21,39 +21,39 @@ //Not in use yet var/obj/effect/organstructure/organStructure = null - var/obj/screen/hands = null - var/obj/screen/pullin = null - var/obj/screen/purged = null - var/obj/screen/internals = null - var/obj/screen/oxygen = null - var/obj/screen/i_select = null - var/obj/screen/m_select = null - var/obj/screen/toxin = null - var/obj/screen/fire = null - var/obj/screen/bodytemp = null - var/obj/screen/healths = null - var/obj/screen/throw_icon = null - var/obj/screen/nutrition_icon = null - var/obj/screen/synthbattery_icon = null - var/obj/screen/pressure = null - var/obj/screen/pain = null - var/obj/screen/crafting = null - var/obj/screen/gun/item/item_use_icon = null - var/obj/screen/gun/radio/radio_use_icon = null - var/obj/screen/gun/move/gun_move_icon = null - var/obj/screen/gun/run/gun_run_icon = null - var/obj/screen/gun/mode/gun_setting_icon = null - var/obj/screen/ling/chems/ling_chem_display = null - var/obj/screen/wizard/energy/wiz_energy_display = null - var/obj/screen/wizard/instability/wiz_instability_display = null + var/atom/movable/screen/hands = null + var/atom/movable/screen/pullin = null + var/atom/movable/screen/purged = null + var/atom/movable/screen/internals = null + var/atom/movable/screen/oxygen = null + var/atom/movable/screen/i_select = null + var/atom/movable/screen/m_select = null + var/atom/movable/screen/toxin = null + var/atom/movable/screen/fire = null + var/atom/movable/screen/bodytemp = null + var/atom/movable/screen/healths = null + var/atom/movable/screen/throw_icon = null + var/atom/movable/screen/nutrition_icon = null + var/atom/movable/screen/synthbattery_icon = null + var/atom/movable/screen/pressure = null + var/atom/movable/screen/pain = null + var/atom/movable/screen/crafting = null + var/atom/movable/screen/gun/item/item_use_icon = null + var/atom/movable/screen/gun/radio/radio_use_icon = null + var/atom/movable/screen/gun/move/gun_move_icon = null + var/atom/movable/screen/gun/run/gun_run_icon = null + var/atom/movable/screen/gun/mode/gun_setting_icon = null + var/atom/movable/screen/ling/chems/ling_chem_display = null + var/atom/movable/screen/wizard/energy/wiz_energy_display = null + var/atom/movable/screen/wizard/instability/wiz_instability_display = null var/datum/plane_holder/plane_holder = null var/list/vis_enabled = null // List of vision planes that should be graphically visible (list of their VIS_ indexes). var/list/planes_visible = null // List of atom planes that are logically visible/interactable (list of actual plane numbers). //spells hud icons - this interacts with add_spell and remove_spell - var/list/obj/screen/movable/spell_master/spell_masters = null - var/obj/screen/movable/ability_master/ability_master = null + var/list/atom/movable/screen/movable/spell_master/spell_masters = null + var/atom/movable/screen/movable/ability_master/ability_master = null /*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob. A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such. @@ -61,7 +61,7 @@ I'll make some notes on where certain variable defines should probably go. Changing this around would probably require a good look-over the pre-existing code. */ - var/obj/screen/zone_sel/zone_sel = null + var/atom/movable/screen/zone_sel/zone_sel = null var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot var/damageoverlaytemp = 0 diff --git a/code/modules/mob/mob_defines_vr.dm b/code/modules/mob/mob_defines_vr.dm index f8f832dbde7..d2238bd03d3 100644 --- a/code/modules/mob/mob_defines_vr.dm +++ b/code/modules/mob/mob_defines_vr.dm @@ -5,6 +5,6 @@ var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping - var/obj/screen/shadekin/darkness/shadekin_dark_display = null - var/obj/screen/shadekin/energy/shadekin_energy_display = null - var/obj/screen/xenochimera/danger_level/xenochimera_danger_display = null + var/atom/movable/screen/shadekin/darkness/shadekin_dark_display = null + var/atom/movable/screen/shadekin/energy/shadekin_energy_display = null + var/atom/movable/screen/xenochimera/danger_level/xenochimera_danger_display = null diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 401784e5bbc..27283a0006a 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -20,7 +20,7 @@ icon = 'icons/mob/screen1.dmi' icon_state = "reinforce" flags = 0 - var/obj/screen/grab/hud = null + var/atom/movable/screen/grab/hud = null var/mob/living/affecting = null var/mob/living/carbon/human/assailant = null var/state = GRAB_PASSIVE @@ -51,7 +51,7 @@ affecting.reveal("You are revealed as [assailant] grabs you.") assailant.reveal("You reveal yourself as you grab [affecting].") - hud = new /obj/screen/grab(src) + hud = new /atom/movable/screen/grab(src) hud.icon_state = "reinforce" icon_state = "grabbed" hud.name = "reinforce grab" @@ -224,7 +224,7 @@ if(EAST) animate(affecting, pixel_x =-shift, pixel_y = initial(affecting.pixel_y), 5, 1, LINEAR_EASING) -/obj/item/grab/proc/s_click(obj/screen/S) +/obj/item/grab/proc/s_click(atom/movable/screen/S) if(QDELETED(src)) return if(!affecting) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 32123f8bff0..43a37f71404 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -526,7 +526,7 @@ var/list/global/organ_rel_size = list( "r_foot" = 10, ) -/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) +/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash) return //Recalculates what planes this mob can see using their plane_holder, for humans this is checking slots, for others, could be whatever. diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index d19cb1c4dc5..d6dff0997c7 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -13,35 +13,35 @@ //It'd be nice to lazy init these but some of them are important to just EXIST. Like without ghost planemaster, you can see ghosts. Go figure. // 'Utility' planes - plane_masters[VIS_FULLBRIGHT] = new /obj/screen/plane_master/fullbright //Lighting system (lighting_overlay objects) - plane_masters[VIS_LIGHTING] = new /obj/screen/plane_master/lighting //Lighting system (but different!) - plane_masters[VIS_GHOSTS] = new /obj/screen/plane_master/ghosts //Ghosts! - plane_masters[VIS_AI_EYE] = new /obj/screen/plane_master{plane = PLANE_AI_EYE} //AI Eye! + plane_masters[VIS_FULLBRIGHT] = new /atom/movable/screen/plane_master/fullbright //Lighting system (lighting_overlay objects) + plane_masters[VIS_LIGHTING] = new /atom/movable/screen/plane_master/lighting //Lighting system (but different!) + plane_masters[VIS_GHOSTS] = new /atom/movable/screen/plane_master/ghosts //Ghosts! + plane_masters[VIS_AI_EYE] = new /atom/movable/screen/plane_master{plane = PLANE_AI_EYE} //AI Eye! - plane_masters[VIS_CH_STATUS] = new /obj/screen/plane_master{plane = PLANE_CH_STATUS} //Status is the synth/human icon left side of medhuds - plane_masters[VIS_CH_HEALTH] = new /obj/screen/plane_master{plane = PLANE_CH_HEALTH} //Health bar - plane_masters[VIS_CH_LIFE] = new /obj/screen/plane_master{plane = PLANE_CH_LIFE} //Alive-or-not icon - plane_masters[VIS_CH_ID] = new /obj/screen/plane_master{plane = PLANE_CH_ID} //Job ID icon - plane_masters[VIS_CH_WANTED] = new /obj/screen/plane_master{plane = PLANE_CH_WANTED} //Wanted status - plane_masters[VIS_CH_IMPLOYAL] = new /obj/screen/plane_master{plane = PLANE_CH_IMPLOYAL} //Loyalty implants - plane_masters[VIS_CH_IMPTRACK] = new /obj/screen/plane_master{plane = PLANE_CH_IMPTRACK} //Tracking implants - plane_masters[VIS_CH_IMPCHEM] = new /obj/screen/plane_master{plane = PLANE_CH_IMPCHEM} //Chemical implants - plane_masters[VIS_CH_SPECIAL] = new /obj/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff - plane_masters[VIS_CH_STATUS_OOC]= new /obj/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD + plane_masters[VIS_CH_STATUS] = new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS} //Status is the synth/human icon left side of medhuds + plane_masters[VIS_CH_HEALTH] = new /atom/movable/screen/plane_master{plane = PLANE_CH_HEALTH} //Health bar + plane_masters[VIS_CH_LIFE] = new /atom/movable/screen/plane_master{plane = PLANE_CH_LIFE} //Alive-or-not icon + plane_masters[VIS_CH_ID] = new /atom/movable/screen/plane_master{plane = PLANE_CH_ID} //Job ID icon + plane_masters[VIS_CH_WANTED] = new /atom/movable/screen/plane_master{plane = PLANE_CH_WANTED} //Wanted status + plane_masters[VIS_CH_IMPLOYAL] = new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPLOYAL} //Loyalty implants + plane_masters[VIS_CH_IMPTRACK] = new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPTRACK} //Tracking implants + plane_masters[VIS_CH_IMPCHEM] = new /atom/movable/screen/plane_master{plane = PLANE_CH_IMPCHEM} //Chemical implants + plane_masters[VIS_CH_SPECIAL] = new /atom/movable/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff + plane_masters[VIS_CH_STATUS_OOC]= new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD - plane_masters[VIS_STATUS] = new /obj/screen/plane_master{plane = PLANE_STATUS} //Status indicators that show over mob heads. + plane_masters[VIS_STATUS] = new /atom/movable/screen/plane_master{plane = PLANE_STATUS} //Status indicators that show over mob heads. - plane_masters[VIS_ADMIN1] = new /obj/screen/plane_master{plane = PLANE_ADMIN1} //For admin use - plane_masters[VIS_ADMIN2] = new /obj/screen/plane_master{plane = PLANE_ADMIN2} //For admin use - plane_masters[VIS_ADMIN3] = new /obj/screen/plane_master{plane = PLANE_ADMIN3} //For admin use + plane_masters[VIS_ADMIN1] = new /atom/movable/screen/plane_master{plane = PLANE_ADMIN1} //For admin use + plane_masters[VIS_ADMIN2] = new /atom/movable/screen/plane_master{plane = PLANE_ADMIN2} //For admin use + plane_masters[VIS_ADMIN3] = new /atom/movable/screen/plane_master{plane = PLANE_ADMIN3} //For admin use - plane_masters[VIS_MESONS] = new /obj/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings. + plane_masters[VIS_MESONS] = new /atom/movable/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings. // Real tangible stuff planes - plane_masters[VIS_TURFS] = new /obj/screen/plane_master/main{plane = TURF_PLANE} - plane_masters[VIS_OBJS] = new /obj/screen/plane_master/main{plane = OBJ_PLANE} - plane_masters[VIS_MOBS] = new /obj/screen/plane_master/main{plane = MOB_PLANE} - plane_masters[VIS_CLOAKED] = new /obj/screen/plane_master/cloaked //Cloaked atoms! + plane_masters[VIS_TURFS] = new /atom/movable/screen/plane_master/main{plane = TURF_PLANE} + plane_masters[VIS_OBJS] = new /atom/movable/screen/plane_master/main{plane = OBJ_PLANE} + plane_masters[VIS_MOBS] = new /atom/movable/screen/plane_master/main{plane = MOB_PLANE} + plane_masters[VIS_CLOAKED] = new /atom/movable/screen/plane_master/cloaked //Cloaked atoms! ..() @@ -52,7 +52,7 @@ /datum/plane_holder/proc/set_vis(var/which = null, var/state = FALSE) ASSERT(which) - var/obj/screen/plane_master/PM = plane_masters[which] + var/atom/movable/screen/plane_master/PM = plane_masters[which] if(!PM) stack_trace("Tried to alter [which] in plane_holder on [my_mob]!") @@ -73,7 +73,7 @@ /* /datum/plane_holder/proc/set_desired_alpha(var/which = null, var/new_alpha) ASSERT(which) - var/obj/screen/plane_master/PM = plane_masters[which] + var/atom/movable/screen/plane_master/PM = plane_masters[which] if(!PM) stack_trace("Tried to alter [which] in plane_holder on [my_mob]!") PM.set_desired_alpha(new_alpha) @@ -85,7 +85,7 @@ /datum/plane_holder/proc/set_ao(var/which = null, var/enabled = FALSE) ASSERT(which) - var/obj/screen/plane_master/PM = plane_masters[which] + var/atom/movable/screen/plane_master/PM = plane_masters[which] if(!PM) stack_trace("Tried to set_ao [which] in plane_holder on [my_mob]!") PM.set_ambient_occlusion(enabled) @@ -96,7 +96,7 @@ /datum/plane_holder/proc/alter_values(var/which = null, var/list/values = null) ASSERT(which) - var/obj/screen/plane_master/PM = plane_masters[which] + var/atom/movable/screen/plane_master/PM = plane_masters[which] if(!PM) stack_trace("Tried to alter [which] in plane_holder on [my_mob]!") PM.alter_plane_values(arglist(values)) @@ -108,7 +108,7 @@ //////////////////// // The Plane Master //////////////////// -/obj/screen/plane_master +/atom/movable/screen/plane_master screen_loc = "1,1" plane = -100 //Dodge just in case someone instantiates one of these accidentally, don't end up on 0 with plane_master appearance_flags = PLANE_MASTER @@ -118,13 +118,13 @@ var/invis_toggle = FALSE var/list/sub_planes -/obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha) +/atom/movable/screen/plane_master/proc/set_desired_alpha(var/new_alpha) if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255) desired_alpha = new_alpha if(alpha) //If we're already visible, update it now. alpha = new_alpha -/obj/screen/plane_master/proc/set_visibility(var/want = FALSE) +/atom/movable/screen/plane_master/proc/set_visibility(var/want = FALSE) //Invisibility-managed if(invis_toggle) if(want && invisibility) @@ -140,17 +140,17 @@ alpha = 0 mouse_opacity = 0 -/obj/screen/plane_master/proc/set_alpha(var/new_alpha = 255) +/atom/movable/screen/plane_master/proc/set_alpha(var/new_alpha = 255) if(new_alpha != alpha) new_alpha = sanitize_integer(new_alpha, 0, 255, 255) alpha = new_alpha -/obj/screen/plane_master/proc/set_ambient_occlusion(var/enabled = FALSE) +/atom/movable/screen/plane_master/proc/set_ambient_occlusion(var/enabled = FALSE) filters -= AMBIENT_OCCLUSION if(enabled) filters += AMBIENT_OCCLUSION -/obj/screen/plane_master/proc/alter_plane_values() +/atom/movable/screen/plane_master/proc/alter_plane_values() return //Stub //////////////////// @@ -159,7 +159,7 @@ ///////////////// //Lighting is weird and has matrix shenanigans. Think of this as turning on/off darkness. -/obj/screen/plane_master/fullbright +/atom/movable/screen/plane_master/fullbright plane = PLANE_LIGHTING layer = LAYER_HUD_BASE+1 // This MUST be above the lighting plane_master color = null //To break lighting when visible (this is sorta backwards) @@ -167,26 +167,26 @@ invisibility = 101 invis_toggle = TRUE -/obj/screen/plane_master/lighting +/atom/movable/screen/plane_master/lighting plane = PLANE_LIGHTING blend_mode = BLEND_MULTIPLY alpha = 255 ///////////////// //Ghosts has a special alpha level -/obj/screen/plane_master/ghosts +/atom/movable/screen/plane_master/ghosts plane = PLANE_GHOSTS desired_alpha = 127 //When enabled, they're like half-transparent ///////////////// //Cloaked atoms are visible to ghosts (or for other reasons?) -/obj/screen/plane_master/cloaked +/atom/movable/screen/plane_master/cloaked plane = CLOAKED_PLANE desired_alpha = 80 color = "#0000FF" ///////////////// //The main game planes start normal and visible -/obj/screen/plane_master/main +/atom/movable/screen/plane_master/main alpha = 255 mouse_opacity = 1 diff --git a/code/modules/mob/mob_planes_vr.dm b/code/modules/mob/mob_planes_vr.dm index a44a55ce75d..93829b6128a 100644 --- a/code/modules/mob/mob_planes_vr.dm +++ b/code/modules/mob/mob_planes_vr.dm @@ -1,33 +1,33 @@ /datum/plane_holder/New(mob/this_guy) ..() - plane_masters[VIS_CH_STATUS_R] = new /obj/screen/plane_master{plane = PLANE_CH_STATUS_R} //Right-side status icon - plane_masters[VIS_CH_HEALTH_VR] = new /obj/screen/plane_master{plane = PLANE_CH_HEALTH_VR} //Health bar but transparent at 100 - plane_masters[VIS_CH_BACKUP] = new /obj/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status - plane_masters[VIS_CH_VANTAG] = new /obj/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags + plane_masters[VIS_CH_STATUS_R] = new /atom/movable/screen/plane_master{plane = PLANE_CH_STATUS_R} //Right-side status icon + plane_masters[VIS_CH_HEALTH_VR] = new /atom/movable/screen/plane_master{plane = PLANE_CH_HEALTH_VR} //Health bar but transparent at 100 + plane_masters[VIS_CH_BACKUP] = new /atom/movable/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status + plane_masters[VIS_CH_VANTAG] = new /atom/movable/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags - plane_masters[VIS_AUGMENTED] = new /obj/screen/plane_master/augmented(null, my_mob) //Augmented reality + plane_masters[VIS_AUGMENTED] = new /atom/movable/screen/plane_master/augmented(null, my_mob) //Augmented reality ///////////////// //AR planemaster does some special image handling -/obj/screen/plane_master/augmented +/atom/movable/screen/plane_master/augmented plane = PLANE_AUGMENTED var/state = FALSE //Saves cost with the lists var/mob/my_mob -/obj/screen/plane_master/augmented/Initialize(mapload, mob/new_mob) +/atom/movable/screen/plane_master/augmented/Initialize(mapload, mob/new_mob) . = ..() my_mob = new_mob -/obj/screen/plane_master/augmented/Destroy() +/atom/movable/screen/plane_master/augmented/Destroy() my_mob = null return ..() -/obj/screen/plane_master/augmented/set_visibility(var/want = FALSE) +/atom/movable/screen/plane_master/augmented/set_visibility(var/want = FALSE) . = ..() state = want apply() -/obj/screen/plane_master/augmented/proc/apply() +/atom/movable/screen/plane_master/augmented/proc/apply() if(!my_mob.client) return diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index a867f805d84..2edbc13728e 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -324,7 +324,7 @@ if(ext_blind) eye_blind = 5 client.screen.Remove(GLOB.global_hud.whitense) - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind) else eye_blind = 0 clear_fullscreens() diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 2b6c1f0018e..a3be164dea3 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -18,7 +18,7 @@ /obj/item/clipboard/MouseDrop(obj/over_object as obj) //Quick clipboard fix. -Agouri if(ishuman(usr)) var/mob/M = usr - if(!(istype(over_object, /obj/screen) )) + if(!(istype(over_object, /atom/movable/screen) )) return ..() if(!M.restrained() && !M.stat) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index ee98846a6b9..a5b2ee275ba 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -95,7 +95,7 @@ var/global/photo_count = 0 if((istype(usr, /mob/living/carbon/human))) var/mob/living/carbon/human/M = usr - if(!( istype(over_object, /obj/screen) )) + if(!( istype(over_object, /atom/movable/screen) )) return ..() playsound(loc, "rustle", 50, 1, -5) if((!( M.restrained() ) && !( M.stat ) && M.back == src)) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index d28b09982f6..6bd4d93608f 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -49,7 +49,7 @@ var/gasefficency = 0.25 - var/base_icon_state = "darkmatter" + base_icon_state = "darkmatter" var/damage = 0 var/damage_archived = 0 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 702ceaa8c70..5c5017a1774 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -71,7 +71,7 @@ var/wielded_item_state var/one_handed_penalty = 0 // Penalty applied if someone fires a two-handed gun with one hand. - var/obj/screen/auto_target/auto_target + var/atom/movable/screen/auto_target/auto_target var/shooting = 0 var/next_fire_time = 0 @@ -349,7 +349,7 @@ if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? return - if (!( istype(over_object, /obj/screen) )) + if (!( istype(over_object, /atom/movable/screen) )) return ..() //makes sure that the thing is equipped, so that we can't drag it into our hand from miles away. @@ -360,7 +360,7 @@ if (( usr.restrained() ) || ( usr.stat )) return - if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) + if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src)) return switch(over_object.name) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 54bd9062742..03824506063 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -668,7 +668,7 @@ var/health = 10 // health points 0-10 plane = PLATING_PLANE layer = DISPOSAL_LAYER // slightly lower than wires and other pipes - var/base_icon_state // initial icon state on map + base_icon_state // initial icon state on map var/sortType = "" var/subtype = 0 // new pipe, set the icon_state as on map diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 4ab16b6df24..6e84c82fca2 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -52,7 +52,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now var/hud_state = "" //name of the icon used in generating the spell hud object var/override_base = "" - var/obj/screen/connected_button + var/atom/movable/screen/connected_button /////////////////////// ///SETUP AND PROCESS/// diff --git a/code/modules/spells/spells.dm b/code/modules/spells/spells.dm index 850e90ca0e4..bb791a30b38 100644 --- a/code/modules/spells/spells.dm +++ b/code/modules/spells/spells.dm @@ -4,13 +4,13 @@ /mob/Life() ..() if(spell_masters && spell_masters.len) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) spell_master.update_spells(0, src) /mob/Login() ..() if(spell_masters) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) spell_master.toggle_open(1) client.screen -= spell_master @@ -33,17 +33,17 @@ for(var/spell/spell_to_add in H.mind.learned_spells) H.add_spell(spell_to_add) -/mob/proc/add_spell(var/spell/spell_to_add, var/spell_base = "wiz_spell_ready", var/master_type = /obj/screen/movable/spell_master) +/mob/proc/add_spell(var/spell/spell_to_add, var/spell_base = "wiz_spell_ready", var/master_type = /atom/movable/screen/movable/spell_master) if(!spell_masters) spell_masters = list() if(spell_masters.len) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) if(spell_master.type == master_type) spell_list.Add(spell_to_add) spell_master.add_spell(spell_to_add) return 1 - var/obj/screen/movable/spell_master/new_spell_master = new master_type //we're here because either we didn't find our type, or we have no spell masters to attach to + var/atom/movable/screen/movable/spell_master/new_spell_master = new master_type //we're here because either we didn't find our type, or we have no spell masters to attach to if(client) src.client.screen += new_spell_master new_spell_master.spell_holder = src @@ -72,7 +72,7 @@ if(mind && mind.learned_spells) mind.learned_spells.Remove(spell_to_remove) spell_list.Remove(spell_to_remove) - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) spell_master.remove_spell(spell_to_remove) return 1 @@ -83,5 +83,5 @@ if(!spell_masters || !spell_masters.len) return - for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) spell_master.silence_spells(amount) diff --git a/code/modules/spells/targeted/chimera_spells.dm b/code/modules/spells/targeted/chimera_spells.dm index 21bca836107..9d053d3188c 100644 --- a/code/modules/spells/targeted/chimera_spells.dm +++ b/code/modules/spells/targeted/chimera_spells.dm @@ -230,7 +230,7 @@ H.visible_message(" [H] looks ready to burst!") to_chat(H,"We are ready.") var/spell/targeted/chimera/hatch_pop/S = new /spell/targeted/chimera/hatch_pop(H) - var/master_type = /obj/screen/movable/spell_master/chimera + var/master_type = /atom/movable/screen/movable/spell_master/chimera H.add_spell(S, "cult", master_type) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index abb57a16812..c58883f90a8 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -234,7 +234,8 @@ var/list/table_icon_cache = list() update_icon() update_material() -/obj/structure/table/proc/update_desc() +/obj/structure/table/update_desc() + . = ..() if(material) name = "[material.display_name] table" else diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 89353181760..9c967e96249 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -16,10 +16,10 @@ // Stuff needed to render the map var/map_name - var/obj/screen/map_view/cam_screen + var/atom/movable/screen/map_view/cam_screen var/list/cam_plane_masters - var/obj/screen/background/cam_background - var/obj/screen/skybox/local_skybox + var/atom/movable/screen/background/cam_background + var/atom/movable/screen/skybox/local_skybox // Stuff for moving cameras var/turf/last_camera_turf @@ -46,7 +46,7 @@ cam_plane_masters = get_tgui_plane_masters() for(var/plane in cam_plane_masters) - var/obj/screen/instance = plane + var/atom/movable/screen/instance = plane instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index e1ccbfc0572..c2eb1c7f1f8 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -12,12 +12,12 @@ // Stuff needed to render the map var/map_name var/const/default_map_size = 15 - var/obj/screen/map_view/cam_screen + var/atom/movable/screen/map_view/cam_screen /// All the plane masters that need to be applied. var/list/cam_plane_masters - var/obj/screen/background/cam_background - var/obj/screen/background/cam_foreground - var/obj/screen/skybox/local_skybox + var/atom/movable/screen/background/cam_background + var/atom/movable/screen/background/cam_foreground + var/atom/movable/screen/skybox/local_skybox // Stuff for moving cameras var/turf/last_camera_turf @@ -38,7 +38,7 @@ cam_plane_masters = get_tgui_plane_masters() for(var/plane in cam_plane_masters) - var/obj/screen/instance = plane + var/atom/movable/screen/instance = plane instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm index c2a2a472646..2eb26436216 100644 --- a/code/modules/tgui/modules/ntos-only/uav.dm +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -223,11 +223,11 @@ if(!M.client) return if(weakref(M) in viewers) - M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed) - M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline) + M.overlay_fullscreen("fishbed",/atom/movable/screen/fullscreen/fishbed) + M.overlay_fullscreen("scanlines",/atom/movable/screen/fullscreen/scanline) if(signal_strength <= 1) - M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise) + M.overlay_fullscreen("whitenoise",/atom/movable/screen/fullscreen/noise) else M.clear_fullscreen("whitenoise", 0) else diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm index 3f7fb158aa3..ab38a69d5bd 100644 --- a/code/modules/tooltip/tooltip.dm +++ b/code/modules/tooltip/tooltip.dm @@ -13,7 +13,7 @@ Configuration: Usage: - Define mouse event procs on your (probably HUD) object and simply call the show and hide procs respectively: -/obj/screen/hud +/atom/movable/screen/hud MouseEntered(location, control, params) usr.client.tooltip.show(params, title = src.name, content = src.desc) diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 43489fe82ec..226ff41e035 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -10,7 +10,7 @@ var/list/ventcrawl_machinery = list( /obj/item/holder, /obj/machinery/camera, /obj/belly, - /obj/screen + /atom/movable/screen ) //VOREStation Edit : added /obj/belly, to this list, travis is complaining about this in his indentation check //mob/living/simple_mob/borer, //VORESTATION AI TEMPORARY REMOVAL REPLACE BACK IN LIST WHEN RESOLVED //VOREStation Edit diff --git a/icons/misc/colortest.dmi b/icons/misc/colortest.dmi new file mode 100644 index 00000000000..0f74685ebc2 Binary files /dev/null and b/icons/misc/colortest.dmi differ diff --git a/icons/obj/structures/sandbags.dmi b/icons/obj/structures/sandbags.dmi new file mode 100644 index 00000000000..76a41c0a120 Binary files /dev/null and b/icons/obj/structures/sandbags.dmi differ diff --git a/tgui/packages/tgui/interfaces/ColorMatrixEditor.js b/tgui/packages/tgui/interfaces/ColorMatrixEditor.js new file mode 100644 index 00000000000..bcd6c7a2720 --- /dev/null +++ b/tgui/packages/tgui/interfaces/ColorMatrixEditor.js @@ -0,0 +1,82 @@ +import { useBackend } from '../backend'; +import { toFixed } from 'common/math'; +import { Box, Stack, Section, ByondUi, NumberInput, Button } from '../components'; +import { Window } from '../layouts'; + +export const ColorMatrixEditor = (props, context) => { + const { act, data } = useBackend(context); + const { mapRef, currentColor } = data; + const [ + [rr, rg, rb, ra], + [gr, gg, gb, ga], + [br, bg, bb, ba], + [ar, ag, ab, aa], + [cr, cg, cb, ca], + ] = currentColor; + const prefixes = ['r', 'g', 'b', 'a', 'c']; + return ( + + + + + + + +
+ + {[0, 1, 2, 3].map((col, key) => ( + + + {[0, 1, 2, 3, 4].map((row, key) => ( + + + {`${prefixes[row]}${prefixes[col]}:`} + + toFixed(value, 2)} + onDrag={(e, value) => { + let retColor = currentColor; + retColor[row*4+col] = value; + act("transition_color", { color: retColor }); + }} /> + + ))} + + + ))} + +
+
+ + + act("confirm")} /> + +
+
+ + + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/Filteriffic.js b/tgui/packages/tgui/interfaces/Filteriffic.js index 39695ea54c8..2662c6e68fa 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic.js +++ b/tgui/packages/tgui/interfaces/Filteriffic.js @@ -1,10 +1,9 @@ -import { useBackend, useLocalState } from "../backend"; -import { Fragment } from 'inferno'; -import { Box, Button, Collapsible, ColorBox, Dropdown, Input, LabeledList, NoticeBox, NumberInput, Section } from '../components'; -import { Window } from '../layouts'; import { map } from 'common/collections'; import { toFixed } from 'common/math'; -import { numberOfDecimalDigits } from "../../common/math"; +import { numberOfDecimalDigits } from '../../common/math'; +import { useBackend, useLocalState } from '../backend'; +import { Box, Button, Collapsible, ColorBox, Dropdown, Input, LabeledList, NoticeBox, NumberInput, Section } from '../components'; +import { Window } from '../layouts'; const FilterIntegerEntry = (props, context) => { const { value, name, filterName } = props; @@ -30,7 +29,7 @@ const FilterFloatEntry = (props, context) => { const { act } = useBackend(context); const [step, setStep] = useLocalState(context, `${filterName}-${name}`, 0.01); return ( - + <> { format={value => toFixed(value, 4)} width="70px" onChange={(e, value) => setStep(value)} /> - + ); }; @@ -82,7 +81,7 @@ const FilterColorEntry = (props, context) => { const { value, filterName, name } = props; const { act } = useBackend(context); return ( - + <>