Skip to content

Commit

Permalink
fixes max weight on surgery cases (#3881)
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
Makes it so the Circ-Saw and the 7th item can fit in by defining a max
combined weight to the item
(I am aware it's infinity but there is a cap to the amount of items that
can be held. If someone wants to use cases to smuggle 7 circ saws at a
time then be my guest.)

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
So surgery cases work as intended.
<!-- 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:
fix: surgery cases now hold all the items
/: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
Jedi-Toothpaste authored Dec 18, 2024
1 parent 380d225 commit 073ec0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/game/objects/items/storage/cases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
/obj/item/storage/case/surgery/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_w_class = INFINITY //workaround for the differently sized items, case is still limited to 7 items max and to the list.
STR.max_combined_w_class = INFINITY //part of the workaround, not setting a max combined weight defaults to some weird number.
STR.max_items = 7
STR.set_holdable(list(
/obj/item/healthanalyzer,
Expand Down

0 comments on commit 073ec0c

Please sign in to comment.