-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
🔡 Unsigned integer 4,8,12,16,20,24 to hexadecimal #2153
Conversation
What part of UUID generation would this be necessary for? I can only see the utility for log output, where it's maybe a bit much given that decimal output would mostly work. I also struggle to see a case where you'd use most of the functions, so one 256-entry lookup table and 16+24 bit output functions seems like plenty of functionality. I don't think this is worth a first-level folder on its own either (think of the poor newbies trying to navigate the codebase), maybe a subfolder under utility using the According to https://community.bistudio.com/wiki/Initialization_Order, preinit is unscheduled anyway so there's no point in the isNil wrapper here. |
For UUIDs longer than the 24bits or made from multiple pieces of information, working with them as strings makes it far easier to stick pieces together. Yeah, I could cut the 4096 entry lookup table. However, the 16 entry one will still be needed to avoid needing to trim zero's afterwards. These are good points. |
Okay, the changes have been made but I'm unable to test as Arma dropped a big S.O.G. update and I don't have the internet for it. |
Ah, so you're intending to generate with random (maybe in multiple parts) but then convert immediately to string for transfer & storage? That makes sense with SQF. Are you sure you need all the output functions though? Struggling to see what you'd ever need the short ones for. |
They might be handy. I think that's a fair justification for 3-4 lines per function. |
The mini-functions don't actually benefit from the #include, do they? Seems that they're redundant with the preinit. |
It's in case it gets called by another pre-init function. |
|
That might be necessary in the future, but I think I'm ok with unordered pre-init at the moment, and then create a central function if we need it later. |
@jaj22 pull request approved? Required for merge. |
Weren't you going to remove the #includes? If you're giving me a hard choice between the includes and a centralized ordered preinit then I'll go for the centralized pre-init. For now though I feel like it's fine to have a condition that pre-init doesn't have dependencies on other pre-init. |
@jaj22 Are the new files to your liking. The removal of |
Environment: Unscheduled | ||
Public: Yes | ||
*/ | ||
#include "Includes\common.inc" |
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.
Doesn't this one have to be relative in case someone is running the mission unzipped?
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.
Oh, probably needs ..\..\
regardless. initServer.sqf and init.sqf don't need all the double-dot stuff because they're actually in the root.
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.
Ah copy-paste caught.
What type of PR is this.
What have you changed and why?
Please verify the following and ensure all checks are completed.
Is further testing or are further changes required?
How can the changes be tested?