Pryaxis / TSAPI

🛠🌳 The TShock Scaffold API enables developers to build plugins that hook directly into the Terraria game engine.
http://tshock.co/
GNU General Public License v3.0
109 stars 66 forks source link

Add OnSendNetData to hook to OTAPI's SendNetData #190

Closed Stealownz closed 3 years ago

Stealownz commented 3 years ago

SendNetData handles NetModules sent from Server -> Clients. This includes NetTextModule which handles text messages for world events.

hakusaro commented 3 years ago

Seems okay to me. What do you think @DeathCradle? Is there any guidance you want to give with respect to OTAPI hooks like this (should we even continue this convention, and/or do you have an alternative)?

SignatureBeef commented 3 years ago

@hakusaro this appears to be pretty consistent with the other existing hooks (that even predate OTAPI), so provided it works, i dont see a problem in this. wrt otapi2 hooks, it was intended to leave the event delegation up to the consumer (tsapi) which might have a easier to browse API, so this is consistent with that and the other hooks.

i don't think its worth coming up with an alternative for tsapi since ideally that should be work placed into orion+otapi3 instead. otapi3 i am open to the idea of having events instead of a single hook delegate (for those that arent already a monomod hook event).

hakusaro commented 3 years ago

Thank you so much for your input @DeathCradle! I really appreciate it! ✨ ❤️

QuiCM commented 3 years ago

@hakusaro good to merge?