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

Reworks multitool buffer into a component #9473

Merged
merged 9 commits into from
Aug 17, 2023

Conversation

PowerfulBacon
Copy link
Member

@PowerfulBacon PowerfulBacon commented Jul 21, 2023

About The Pull Request

This PR is a dependency for my upcoming mining refactor.

Reworks the multitool buffer into a component.
This component can be applied to any object.
You can listen for the COMSIG_PARENT_RECIEVE_BUFFER on a target to see when someone is using a buffer object on your object.
You can send COMSIG_ITEM_PUSH_BUFFER to push an item to the buffer.
You can send COMSIG_ITEM_FLUSH_BUFFER to flush the buffer.

Adds some defines for quickly adding in the buffer handlers, cause I am lazy but they can be expanded if requested since they might be considered a bit ugly.

Dependancy of my upcoming lavaland rework.

Why It's Good For The Game

Removes some hard-deletes from multitool buffer.

Testing Photographs and Procedure

Provided below is successful testing documentation for every single object that uses the multitool's buffer feature.

Ore silo + Remote Material Containers

image
image
image

Cloning

image
Didn't even know this was a think to be honest.

Operating Computer + Stasis Beds

image
image

I have since fixed the issue with hitting the computer during linking

Launchpad

image

Portable Turret Controller + Turret Cover

image

Telecommunications

image
image
image
image
image

Teleporter

image
Hitting has since been fixed.
image
image

Pirate Console

image
image

Xenobiology (Monkey Recycler + Camera)

image

Processing Unit

image
Runtime has since been fixed.

Stacking Machine

image
Made this one slightly more intuative by letting it have links on both ways.

Conveyor Belt + Switch

image

Bluespace Artillery

image

Why does this even have multitool linking?

Changelog

🆑
code: Refactors multitool buffers to use a component, removing some hard-delete potential.
/:cl:

@PowerfulBacon PowerfulBacon marked this pull request as ready for review July 21, 2023 21:14
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Member

@itsmeow itsmeow left a comment

Choose a reason for hiding this comment

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

a looot of these can use early returns since it amounts to if(x) do a bunch else return none

REGISTER_BUFFER_HANDLER(/obj/machinery/computer/launchpad)

DEFINE_BUFFER_HANDLER(/obj/machinery/computer/launchpad)
if(istype(buffer, /obj/machinery/launchpad))
Copy link
Member

Choose a reason for hiding this comment

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

early return

REGISTER_BUFFER_HANDLER(/obj/machinery/quantumpad)

DEFINE_BUFFER_HANDLER(/obj/machinery/quantumpad)
if (panel_open)
Copy link
Member

Choose a reason for hiding this comment

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

early return

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an early return

@PowerfulBacon
Copy link
Member Author

Most of these are just copy and pastes of the existing behaviours to not risk any accidental changes

@itsmeow itsmeow added this pull request to the merge queue Aug 17, 2023
Merged via the queue into BeeStation:master with commit aa842d6 Aug 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants