Skip to content

Commit

Permalink
Fixes qdel in new error (#2360)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Fixes that one spurious fail by making sure non-initialised bottles
don't smash

## Why It's Good For The Game
Yes
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
MarkSuckerberg authored Sep 19, 2023
1 parent e6fb67f commit f01a2b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/modules/food_and_drinks/drinks/drinks/bottle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
custom_price = 55

/obj/item/reagent_containers/food/drinks/bottle/smash(mob/living/target, mob/thrower, ranged = FALSE)
if(QDELING(src) || !target || !(flags_1 & INITIALIZED_1)) //Invalid loc
return
//Creates a shattering noise and replaces the bottle with a broken_bottle
if(bartender_check(target) && ranged)
return
Expand Down

0 comments on commit f01a2b8

Please sign in to comment.