Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale banana peel size to banana size #15953

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion code/modules/food_and_drink/plants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,14 @@ ABSTRACT_TYPE(/obj/item/reagent_containers/food/snacks/plant)
var/index = findtext(src.name, "unpeeled")
src.name = splicetext(src.name, index, index + 9)
src.icon_state = "banana-fruit"
new /obj/item/bananapeel(user.loc)
var/obj/item/bananapeel/droppeel = new /obj/item/bananapeel(user.loc)
// Scale peel size to banana size
// If banana 80% normal size or larger, directly copy banana's size for the peel
if (src.transform.a >= 0.8)
droppeel.transform = src.transform
// Cap at 80% size so no micro peel from rotten bananas
else
droppeel.transform = matrix(0.8,0,0,0,0.8,0)
else
..()

Expand Down