Skip to content

Commit

Permalink
Embed updating now actually properly adds the embed element and embed…
Browse files Browse the repository at this point in the history
… type (tgstation#86097)

## About The Pull Request

I can guarantee to you this was never tested with either the original PR
or the tgstation#85096 PR. Well now I fixed it

## Why It's Good For The Game

Makes the sticky tapes actually work, and whatever else may have been
broken. I actually tested this and got no runtimes and the kitchen knife
in question did embed


![image](https://github.com/user-attachments/assets/6e032c60-9ed0-4a94-9cf6-2b05f180deef)

## Changelog

:cl:
fix: Embed updating now actually updates embeds
/:cl:
  • Loading branch information
Majkl-J authored Sep 5, 2024
1 parent 66fc65d commit 37b3827
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1746,9 +1746,11 @@
/obj/item/proc/set_embed(datum/embed_data/embed)
if(embed_data == embed)
return
if(isnull(get_embed())) // Add embed on objects that did not have it added
AddElement(/datum/element/embed)
if(!GLOB.embed_by_type[embed_data?.type])
qdel(embed_data)
embed_data = ispath(embed) ? get_embed_by_type(armor) : embed
embed_data = ispath(embed) ? get_embed_by_type(embed) : embed
SEND_SIGNAL(src, COMSIG_ITEM_EMBEDDING_UPDATE)

/**
Expand Down

0 comments on commit 37b3827

Please sign in to comment.