Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"./tgui-next"
],

"workbench.editorAssociations": [
{
"filenamePattern": "*.dmi",
"viewType": "imagePreview.previewEditor"
}
]
"workbench.editorAssociations": {
"*.dmi": "imagePreview.previewEditor"
}
}
17 changes: 6 additions & 11 deletions _maps/map_files/debug/multiz.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@
/turf/open/openspace,
/area/space)
"av" = (
/obj/structure/stairs{
dir = 1
},
/obj/structure/stairs/north,
/turf/open/floor/plating,
/area/hallway/secondary/service)
"aw" = (
Expand Down Expand Up @@ -910,7 +908,7 @@
"dO" = (
/obj/structure/table,
/obj/machinery/light,
/obj/item/twohanded/fireaxe,
/obj/item/fireaxe,
/obj/item/extinguisher,
/turf/open/floor/plasteel,
/area/storage/primary)
Expand Down Expand Up @@ -1185,8 +1183,7 @@
/turf/open/floor/plating,
/area/space)
"iq" = (
/obj/machinery/power/deck_relay,
/obj/structure/cable,
/obj/structure/cable/multilayer/multiz,
/turf/open/floor/plating,
/area/construction)
"iu" = (
Expand Down Expand Up @@ -1275,8 +1272,7 @@
/turf/open/floor/plasteel,
/area/engine/storage)
"nF" = (
/obj/structure/cable,
/obj/machinery/power/deck_relay,
/obj/structure/cable/multilayer/multiz,
/turf/open/floor/plating,
/area/hallway/secondary/service)
"od" = (
Expand Down Expand Up @@ -1349,7 +1345,7 @@
},
/area/hallway/secondary/service)
"sm" = (
/obj/structure/stairs,
/obj/structure/stairs/south,
/turf/open/floor/plating,
/area/construction)
"su" = (
Expand Down Expand Up @@ -1775,8 +1771,7 @@
/turf/open/floor/plating,
/area/engine/storage)
"Vm" = (
/obj/machinery/power/deck_relay,
/obj/structure/cable,
/obj/structure/cable/multilayer/multiz,
/turf/open/floor/plating,
/area/engine/storage)
"Vn" = (
Expand Down
7 changes: 7 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

/// 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"
20 changes: 20 additions & 0 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define ADMIN_SPAWNED_1 (1<<15) //was this spawned by an admin? used for stat tracking stuff.
/// Is this object currently processing in the atmos object list?
#define ATMOS_IS_PROCESSING_1 (1<<16)
/// Update the atom's icon state

//turf-only flags
#define NOJAUNT_1 (1<<0)
Expand All @@ -60,6 +61,25 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
These defines are used specifically with the atom/pass_flags bitmask
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
*/

/// Update the atom's icon state
#define UPDATE_ICON_STATE (1<<2)
/// 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
#define PASSTABLE (1<<0)
#define PASSGLASS (1<<1)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/power.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define CABLE_LAYER_2 "l2"
#define CABLE_LAYER_3 "l3"

#define MACHINERY_LAYER_1 1

#define SOLAR_TRACK_OFF 0
#define SOLAR_TRACK_TIMED 1
#define SOLAR_TRACK_AUTO 2
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define span_notice(str) ("<span class='notice'>" + str + "</span>")
61 changes: 61 additions & 0 deletions code/datums/elements/undertile.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
///Add to an object if you want to be able to be hidden under tiles
/datum/element/undertile
element_flags = ELEMENT_BESPOKE | COMPONENT_DUPE_HIGHLANDER
id_arg_index = 2

///the invisiblity trait applied, like TRAIT_T_RAY_VISIBLE
var/invisibility_trait
///level of invisibility applied when under a tile. Could be INVISIBILITY_OBSERVER if you still want it to be visible to ghosts
var/invisibility_level
///an overlay for the tile if we wish to apply that
var/tile_overlay
///whether we use alpha or not. TRUE uses ALPHA_UNDERTILE because otherwise we have 200 different instances of this element for different alphas
var/use_alpha
///We will switch between anchored and unanchored. for stuff like satchels that shouldn't be pullable under tiles but are otherwise unanchored
var/use_anchor

/datum/element/undertile/Attach(datum/target, invisibility_trait, invisibility_level = INVISIBILITY_MAXIMUM, tile_overlay, use_alpha = TRUE, use_anchor = FALSE)
. = ..()
if(!ismovable(target))
return ELEMENT_INCOMPATIBLE

RegisterSignal(target, COMSIG_OBJ_HIDE, .proc/hide)

src.invisibility_trait = invisibility_trait
src.invisibility_level = invisibility_level
src.tile_overlay = tile_overlay
src.use_alpha = use_alpha
src.use_anchor = use_anchor

///called when a tile has been covered or uncovered
/datum/element/undertile/proc/hide(atom/movable/source, covered)
SIGNAL_HANDLER

source.invisibility = covered ? invisibility_level : 0

var/turf/T = get_turf(source)

if(covered)
if(invisibility_trait)
ADD_TRAIT(source, invisibility_trait, TRAIT_GENERIC)
if(tile_overlay)
T.add_overlay(tile_overlay)
if(use_alpha)
source.alpha = ALPHA_UNDERTILE
if(use_anchor)
source.set_anchored(TRUE)

else
if(invisibility_trait)
REMOVE_TRAIT(source, invisibility_trait, TRAIT_GENERIC)
if(tile_overlay)
T.overlays -= tile_overlay
if(use_alpha)
source.alpha = 255
if(use_anchor)
source.set_anchored(FALSE)

/datum/element/undertile/Detach(atom/movable/AM, visibility_trait, invisibility_level = INVISIBILITY_MAXIMUM)
. = ..()

hide(AM, FALSE)
13 changes: 13 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
var/rad_flags = NONE // Will move to flags_1 when i can be arsed to
var/rad_insulation = RAD_NO_INSULATION


///The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
///The list referenced by this var can be shared by multiple objects and should not be directly modified. Instead, use [set_custom_materials][/atom/proc/set_custom_materials].
var/list/datum/material/custom_materials
///Bitfield for how the atom handles materials.

/atom/New(loc, ...)
//atom creation method that preloads variables at creation
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
Expand Down Expand Up @@ -770,6 +776,13 @@
var/suffix = forced_by ? " FORCED by [forced_by]" : ""
log_message("[prefix]\"[message]\"[suffix]", message_type, log_globally=log_globally)


/// 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)


// Helper for logging of messages with only one sender and receiver
/proc/log_directed_talk(atom/source, atom/target, message, message_type, tag)
if(!tag)
Expand Down
Loading