Skip to content
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

InitCallSign : First caract need to be in upper case #2124

Closed
docbrownd opened this issue May 4, 2024 · 2 comments
Closed

InitCallSign : First caract need to be in upper case #2124

docbrownd opened this issue May 4, 2024 · 2 comments
Assignees

Comments

@docbrownd
Copy link

docbrownd commented May 4, 2024

Hi,
when using SPAWN:InitCallSign, callsign in F10 view is in full lower case. But if you use editor, first caract is in uppser case -> enfield1-1 versus Enfield-1-1
Possible to change this line code :
self.SpawnInitCallSignName=string.lower(Name)or"enfield"
by
self.SpawnInitCallSignName=string.lower(Name):gsub("^%l", string.upper) or "Enfield"

Btw, if Name is null, string.lower return an exception, not null value. so may be it's better to have a local var like :
local Name = Name or 'Enfield'

Finally InitCallSign became :

function SPAWN:InitCallSign(ID,Name,Minor,Major) local Name = Name or "Enfield" self.SpawnInitCallSign=true self.SpawnInitCallSignID=ID or 1 self.SpawnInitCallSignMinor=Minor or 1 self.SpawnInitCallSignMajor=Major or 1 self.SpawnInitCallSignName=string.lower(Name):gsub("^%l", string.upper) return self end

Thanks

@docbrownd docbrownd changed the title InitCallSign : First caract need to me in upper case InitCallSign : First caract need to be in upper case May 4, 2024
@Applevangelist Applevangelist self-assigned this May 4, 2024
@Applevangelist
Copy link
Contributor

Sure. 044fb66

@docbrownd
Copy link
Author

Sure. 044fb66

thanks you,
best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants