Jump to content
McKay Development

language files in your GC modules


Recommended Posts

Hey,

I was just wondering why you make a languages.js file for your GC modules (node-tf2, node-globaloffensive). Is it just so you know which ones your module supports, or because you like the cleaner names? I can see it aiding performance because you can grab the value straight away without having to loop through heaps of enum objects.

Was just curious as to why, I wanted to work on my own GC module and wanted to hear your thoughts! Cheers.

Link to post
Share on other sites

I'm not sure I really ever put any significant thought into how that particular part of the module architecture is designed. Thinking back, it may not have been so simple to access enums out of protobufs back when I first wrote node-tf2, and I guess I also liked having all the message names in one place rather than split throughout a bunch of protobuf files.

node-globaloffensive is really just a port of node-tf2 over to CS:GO. I probably would have done it differently had I written it from scratch.

Edited by Dr. McKay
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...