-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
Reworks multitool buffer into a component #9473
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this 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)) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
early return
There was a problem hiding this comment.
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
Most of these are just copy and pastes of the existing behaviours to not risk any accidental changes |
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
Cloning
Didn't even know this was a think to be honest.
Operating Computer + Stasis Beds
I have since fixed the issue with hitting the computer during linking
Launchpad
Portable Turret Controller + Turret Cover
Telecommunications
Teleporter
Hitting has since been fixed.
Pirate Console
Xenobiology (Monkey Recycler + Camera)
Processing Unit
Runtime has since been fixed.
Stacking Machine
Made this one slightly more intuative by letting it have links on both ways.
Conveyor Belt + Switch
Bluespace Artillery
Why does this even have multitool linking?
Changelog
🆑
code: Refactors multitool buffers to use a component, removing some hard-delete potential.
/:cl: