Machinery technical debt cleanup #18493
AffectedArc07
announced in
Projects
Replies: 3 comments 1 reply
-
Claimed voodoo doll through #18500 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just noting that the pipe dispenser is still used by the ancient cryo station ruins and I've used it before to restore the oxygen supply. Would be an improvement still to replace with an RPD. Maybe an ancient variant with a downside to fit the theme? Limited amount of devices? |
Beta Was this translation helpful? Give feedback.
1 reply
-
claiming merch computer as part of econ rework |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right so, before the days of NanoUI and TGUI, we had a system where mobs held a ref to the machine you're currently interacting with. This is then what would have
Interact
called on it every so often to update the UI you are looking at.As you can already imagine, this system is old and awful, for the following reasons:
Let me elaborate on that last point
Technical ramble
This is the tick usage of gas canisters before I optimised them.The
updateDialog
proc isn't actually defined on the canister, and it has no "work" associated with it, its just a call to natives to get hearers and other mobs in range to decide who needs to update. Its horrible and uses 570us.That sounds like a tiny amount right? Less than 1ms? Pathetic right? Wrong. Let me put that into context.
Our server runs at 20TPS, meaning we can easily get a tick duration with 1000 / 20 to get 50ms for the tick duration. However, that isn't the entire story. This tick has to handle running our code, as well as sending map updates to clients. Given that in highpop, maptick can reach upwards of 50-60% of the entire tick just to send map updates to players, the amount of time we have to do actual work gets a lot lower.
If we assume 50% of the tick is being used on map sending, we can then halve our 50ms to get 25ms of time for actual processing. That 570us of wasted CPU now accounts to 2.28% of the entire tick, which still doesn't sound like much, until you realise that this tick also has to handle the rest of atmospherics, machinery, player input, mob breathing, background database checks, everything.
Wasting a full 2% of the tick on absolutely nothing is awful, and needs to be handled
List of machines that need refactoring to use TGUI to kill this inane system off:
/obj/machinery/abductor/console
/obj/machinery/abductor/gland_dispenser
/obj/machinery/abductor/experiment
/obj/machinery/computer/cryopod
(Converts cryo storage console to TGUI #19540)/obj/machinery/disco
/obj/machinery/hologram/holopad
- Make this just just analert()
selector forRequest AI
orHolocall
/obj/machinery/magnetic_controller
- AA has plans for this/obj/machinery/navbeacon
- These have UIs?!/obj/machinery/gameboard
/obj/machinery/space_heater
/obj/machinery/computer/arcade/battle
/obj/machinery/computer/general_air_control
- AA IS WORKING ON THIS/obj/machinery/computer/prisoner
([TGUI] Labor Camp Points Manager #18505)/obj/machinery/computer/merch
/obj/machinery/pipedispenser
- Can probably remove this now that we have RPDs (Removes the machinery pipe dispenser from the codebase #18763)/obj/machinery/implantchair
/obj/machinery/arcade
- TGUIing this might be hard/obj/machinery/arcade/claw
- OH GOD/obj/machinery/computer/area_atmos
/obj/machinery/bottler
/obj/machinery/icemachine
/obj/machinery/juicer
- WHY DOES NONE OF THE KITCHEN STUFF HAVE A PROPER UI (Removes the juicer from the codebase #18764)/obj/machinery/kitchen_machine
/obj/machinery/plantgenes
/obj/machinery/mineral/processing_unit_console
- Smelting console/obj/machinery/mineral/stacking_unit_console
- These can both be removed now that we have the ORM/obj/machinery/mineral/mint
/obj/machinery/computer/turbine_computer
/obj/machinery/particle_accelerator
/obj/machinery/computer/pandemic
/obj/machinery/reagentgrinder
/obj/machinery/computer/telescience
/obj/machinery/computer/rdservercontrol
- Being done in the R&D rework/obj/machinery/r_n_d/experimentor
- I am just gonna remove this in the R&D reworkList of misc stuff that uses this wack system:
*I should point out that the var on mobs is casted to
/obj/machine
so all these existing is already a sin/obj/item/voodoo
- Dont think this is necessary (Removes the voodoo/wicker doll item #18500)/obj/item/spellbook
- Same here/obj/item/paicard
- TGUI required/obj/item/stack
- Crafting needs TGUIing/obj/item/teleportation_scroll
- Why isnt this just an area popup (Refactors wiz teleport scroll #18495)/obj/item/implantpad
- TGUI ([TGUI] Implant Pad + Implanter Related Sprites + Slight Implant refactor #18556)/obj/item/storage/secure
- TGUI/obj/structure/engineeringcart
- Make this aninput()
selector forSelect item to remove
/obj/structure/janitorialcart
- Ditto/obj/structure/noticeboard
- TGUI with options toShow
andRemove
documents/obj/item/assembly
- Timers / igniters / stuff. I am 99% sure this is only used by timers./obj/item/assembly/infra
/obj/item/cardhand
/obj/structure/ore_box
show_inv()
)/obj/item/newspaper
/obj/structure/filingcabinet
- See further up for noticeboards. Alternatively why not make those subtypes of this?/obj/item/gun/energy/temperature
There are definitely some things I have missed here, but anyone who contributes to this list will get major GBP gains. I want this stuff out my codebase before 2022 ends.
Beta Was this translation helpful? Give feedback.
All reactions