Files
Bubberstation/code/datums/components/plumbing/buffer.dm
T
SyncIt21andGitHub 4271c8bb33 General maintenance for plumbing automatic buffer (#94945)
## About The Pull Request
- Adds examines & screen tips for resetting connections & changing
threshold of plumbing automatic buffer
- Removes `datum/buffer_net` and replaces it with a simple list of
connections for memory savings
- Replaced `attack_by()` attack chain for screwdriver with
`screwdriver_act()`
- Added tgui for plumbing buffer

## Changelog
🆑
refactor: plumbing automatic buffer has been refactored for better
performance & interactions. report bugs on github
/🆑
2026-02-13 14:31:18 +01:00

18 lines
566 B
Plaintext

/datum/component/plumbing/buffer
demand_connects = WEST
supply_connects = EAST
/datum/component/plumbing/buffer/Initialize(ducting_layer)
if(!istype(parent, /obj/machinery/plumbing/buffer))
return COMPONENT_INCOMPATIBLE
return ..()
/datum/component/plumbing/buffer/send_request(dir)
var/obj/machinery/plumbing/buffer/buffer = parent
if(buffer.mode == AB_UNREADY)
return ..()
/datum/component/plumbing/buffer/can_give(amount, reagent, datum/ductnet/net)
var/obj/machinery/plumbing/buffer/buffer = parent
return (buffer.mode == AB_READY) ? ..() : FALSE