diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 49aec27f2fa..cd4bff185f1 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -85,6 +85,7 @@ #define ABOVE_WINDOW_LAYER 2.78 #define BELOW_OBJ_LAYER 2.89 #define STRUCTURE_LAYER 2.9 + #define ABOVE_STRUCTURE_LAYER 2.91 //OBJ_LAYER 3 #define ABOVE_OBJ_LAYER 3.01 #define MOB_SHADOW_LAYER 3.011 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 15bae559e97..1bf2e09d833 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -55,6 +55,7 @@ buckling_atom.anchored = TRUE post_buckle(buckling_atom) + buckled_original_layer = buckling_atom.layer buckling_atom.layer = layer + 0.1 return TRUE @@ -63,6 +64,9 @@ if(MA && MA.buckled_to == src) . = MA MA.buckled_to = null + if(buckled_original_layer) + MA.layer = buckled_original_layer + buckled_original_layer = null MA.anchored = initial(MA.anchored) buckled = null if(istype(MA, /mob/living)) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index b7a0e9a296c..f8c9d66801a 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -53,6 +53,7 @@ icon_state = "bodybag" open_sound = 'sound/items/zip.ogg' close_sound = 'sound/items/zip.ogg' + layer = ABOVE_STRUCTURE_LAYER density = FALSE storage_capacity = 30 var/item_path = /obj/item/bodybag diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 5ffd74be80b..c4d5c0d7142 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -49,6 +49,14 @@ var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1 var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes var/atom/movable/buckled = null + /** + * Stores the original layer of a buckled atom. + * + * Set in `/obj/proc/buckle` when the atom's layer is adjusted. + * + * Used in `/unbuckle()` to restore the original layer. + */ + var/buckled_original_layer = null var/buckle_delay = 0 //How much extra time to buckle someone to this object. /* END BUCKLING VARS */ diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 635bc2a4bc6..31238406d76 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -523,7 +523,6 @@ if(buckled) if(buckled.buckled_to == src) buckled.forceMove(src.loc) - buckled.layer = src.layer + 1 else buckled = null diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 9398bf85a35..da1a6706149 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -7,6 +7,7 @@ obj_flags = OBJ_FLAG_CONDUCTABLE slot_flags = SLOT_BELT | SLOT_EARS throwforce = 1 + layer = BELOW_TABLE_LAYER w_class = WEIGHT_CLASS_TINY var/leaves_residue = 1 diff --git a/html/changelogs/AlaunusLux-bodybag-and-buckling-layer-fixes.yml b/html/changelogs/AlaunusLux-bodybag-and-buckling-layer-fixes.yml new file mode 100644 index 00000000000..96c44f07a84 --- /dev/null +++ b/html/changelogs/AlaunusLux-bodybag-and-buckling-layer-fixes.yml @@ -0,0 +1,61 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: AlaunusLux + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Body/Cryo bags will now be above roller beds when deployed." + - bugfix: "Body/Cryo bags will no longer be above player mobs after being buckled and dragged." + - bugfix: "Bullets will no longer be on top of roller beds and body/cryo bags." + - bugfix: "A buckled atom's layer will now be reset upon being unbuckled."