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

Auto Delete Foodless MREs #5761

Merged
merged 6 commits into from
Apr 7, 2024
Merged

Auto Delete Foodless MREs #5761

merged 6 commits into from
Apr 7, 2024

Conversation

Steelpoint
Copy link
Contributor

@Steelpoint Steelpoint commented Feb 20, 2024

About the pull request

MRE's that contain no food will now be automatically deleted.

Explain why it's good for the game

Current MRE's mean the FOB, and frontline where a resupply crate lands, are littered with endless amounts of opened MRE's that are filled with the fluff items. This not only clutters up the area but it means if you are desperate for food, you have to search these half-used MRE's.

With this change, this means that a MRE on the ground will actually contain food instead of matches or water, and this will significantly declutter the FOB and frontline of food items.

Testing Photographs and Procedure

Screenshots & Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑
add: MRE's will now auto-delete if they do not contain and food items when they are discarded.
/:cl:

@github-actions github-actions bot added the Feature Feature coder badge label Feb 20, 2024
@Steelpoint
Copy link
Contributor Author

Whilst I think removing the fluff items from all MREs would completely remove the FOB clutter issue, however I cannot discount the chance some people may use the fluff items in the MREs ergo I've elected to keep the standard issue MRE's the default ones.

@Staykeu
Copy link
Contributor

Staykeu commented Feb 24, 2024

An idea I had a while ago was a sort of mid-way sprite when only fluff items remain in an MRE. That or the regular crushed up sprite being visible when only fluff items remain. I believe this would solve the issue without dialing back the amount of fluff items that are available to more roleplay-centered marines (or those who just like the free smokes (virtual nic addicts)).

I, along with a handful of other people, do enjoy the fluff items included in MREs, but I still think FOB clutter is insanely exponentialized by non-crushed up (basically useless) MREs. Though I do want to have the ability to pick out these fluff items at liberty of my own will, be they from MREs strewn along the ground or one that I dropped with.

@Nanu308
Copy link
Member

Nanu308 commented Feb 25, 2024

I don't think we should remove fluff items, instead, just add a option for one to crumple the MRE pack even if it contains the fluff items

@Steelpoint
Copy link
Contributor Author

The issue with that @Nanu308 is that it would need to be automated as literally no one is going to crumple their MRE manually.

Making it a automatic action is beyond my abilities

Copy link
Contributor

github-actions bot commented Mar 4, 2024

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Mar 4, 2024
@Vicacrov
Copy link
Contributor

Vicacrov commented Mar 4, 2024

The issue with that @Nanu308 is that it would need to be automated as literally no one is going to crumple their MRE manually.

Making it a automatic action is beyond my abilities

Try adding this to /obj/item/storage/box/MRE/Initialize() starting from line 757

	RegisterSignal(src, COMSIG_ITEM_DROPPED, PROC_REF(try_forced_folding))

/obj/item/storage/box/MRE/proc/try_forced_folding(datum/source, mob/user)
	SIGNAL_HANDLER

	for(var/obj/item/reagent_container/food/snacks/packaged_meal/meal in src)
		return

	UnregisterSignal(src, COMSIG_ITEM_DROPPED)
	storage_close(user)
	to_chat(user, SPAN_NOTICE("You throw away [src]."))
	qdel(src)

Your diff should look like this:

image

What this code does is when the package gets dropped, it checks for whether it still has food in it. If it does, nothing happens. If it has none, it closes the interface and deletes the MRE.

@github-actions github-actions bot removed the Stale beg a maintainer to review your PR label Mar 5, 2024
@Drulikar
Copy link
Contributor

Drulikar commented Mar 8, 2024

Try above, that sounds fine.

@Drulikar Drulikar marked this pull request as draft March 8, 2024 20:56
@Steelpoint
Copy link
Contributor Author

I'll get to this sometime next week

Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Mar 22, 2024
@Steelpoint Steelpoint closed this Mar 28, 2024
@Steelpoint Steelpoint reopened this Apr 6, 2024
@Steelpoint Steelpoint changed the title Adds No-Fluff MRE's Auto Destroy Foodless MREs Apr 6, 2024
@Steelpoint Steelpoint changed the title Auto Destroy Foodless MREs Auto Delete Foodless MREs Apr 6, 2024
@Steelpoint Steelpoint marked this pull request as ready for review April 6, 2024 06:06
@Steelpoint
Copy link
Contributor Author

Altered PR to suggested comments.

Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also technically you can open it, drop it with food, remove the food, and then it won't be deleted; but not a big deal. Just figured I'd mention it.

code/game/objects/items/storage/boxes.dm Outdated Show resolved Hide resolved
@Drulikar Drulikar removed the Stale beg a maintainer to review your PR label Apr 6, 2024
@Drulikar Drulikar added this pull request to the merge queue Apr 7, 2024
Merged via the queue into cmss13-devs:master with commit 362d19e Apr 7, 2024
26 checks passed
cm13-github added a commit that referenced this pull request Apr 7, 2024
@Steelpoint Steelpoint deleted the MRE branch April 8, 2024 00:37
github-merge-queue bot pushed a commit that referenced this pull request Sep 1, 2024
# About the pull request

Deletes empty pill packets (the 4 pill packets) when dropped and empty. 
Used code from: #5761

# Explain why it's good for the game

has less pointless garbage on the ground. 
they can't be refilled anyway. 

# Testing Photographs and Procedure

emptied pill packets and a pill bottle. verified pill packet only
deleted when dropped or thrown.

Pill bottles persisted. Packets persisted so long as remained in
inventory. IE put into another pouch.
<details>


https://github.com/user-attachments/assets/1736dedd-4c22-4d7a-9957-29361c320d45

</details>


# Changelog

:cl:
qol: Deletes empty pill packets when dropped. 
/:cl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants