Skip to content

Commit

Permalink
[MIRROR] [NO GBP] fixes item blood overlays "leaking" onto other obje…
Browse files Browse the repository at this point in the history
…cts (#1142)

* [NO GBP] fixes item blood overlays "leaking" onto other objects (#81662)

Looks like KEEP_TOGETHER is necessary after all

before
![Screenshot 2024-02-24
144648](https://github.com/tgstation/tgstation/assets/46101244/e973b372-8391-4678-bc26-28b9d32f05af)

after
![Screenshot 2024-02-24
144001](https://github.com/tgstation/tgstation/assets/46101244/b6c25fcd-9c7f-4f3a-8b8f-69d98b81d424)


## Changelog
:cl:
fix: Blood overlays on items no longer leak onto other objects
/:cl:

* [NO GBP] fixes item blood overlays "leaking" onto other objects

---------

Co-authored-by: 13spacemen <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Feb 26, 2024
1 parent 2cb5f15 commit b3ac3ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/datums/elements/decals/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@

/datum/element/decal/blood/Detach(atom/source)
UnregisterSignal(source, COMSIG_ATOM_GET_EXAMINE_NAME)
if(isitem(source))
var/obj/item/source_item = source
REMOVE_KEEP_TOGETHER(source_item, type)
return ..()

/datum/element/decal/blood/generate_appearance(_icon, _icon_state, _dir, _plane, _layer, _color, _alpha, _smoothing, source)
var/obj/item/I = source
ADD_KEEP_TOGETHER(I, type)
var/icon = I.icon
var/icon_state = I.icon_state
if(!icon || !icon_state)
Expand Down

0 comments on commit b3ac3ee

Please sign in to comment.