mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 12:56:10 +01:00
Bodybag and buckling layer fixes (#20174)
This PR is mostly about fixing body/cryo bag layering issues. Currently live and annoying to try and treat around:  Currently, bags are are below roller beds when first deployed. If buckled and unbuckled, they are then above, because of the + 0.1 on buckling. If buckled on a roller bed, dragged, and then unbuckled, they are then above player mobs, because of the `layer + 1` on roller bed `Move()` proc, which also doesn't get reset. I removed this +1 on Move() because it was older than the +0.1 and seems to serve the same purpose. The +0.1 did not have a method of reverting to the original buckled atom's layer, so I added a var and check to handle that. I also changed bullet casing's layer to `BELOW_TABLE_LAYER` with the intent of not having them on top of stasis bags and roller beds, because it causes issues as someone trying to treat wounded after a firefight. Changing bullet casing's layer does have a consequence of putting bullets underneath, for example, the soil in the public garden. Putting the soil on `BELOW_TABLE_LAYER` would fix this, but with the consequence of having the bushes be on top, making clicking the soil difficult for farming purposes. Adding bushes to that layer causes consequences with side window layering (like on deck three outside the public lounge.) For this PR I only adjusted the bullet casing layer. I'm sure it has other unintended layering interactions. Let me know if it would be better to leave them where they are or on some other layer. Current changes in PR: Bullets under soil/roller beds/stasis bags.  (Example of why making bullets on top of soil is difficult) Screenshot shows both bullets and the soil being `BELOW_TABLE_LAYER` with bushes on top, as a reference. PR Currently has bullets underneath soil. 
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -523,7 +523,6 @@
|
||||
if(buckled)
|
||||
if(buckled.buckled_to == src)
|
||||
buckled.forceMove(src.loc)
|
||||
buckled.layer = src.layer + 1
|
||||
else
|
||||
buckled = null
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user