ShadowDev Posted Saturday at 03:42 PM Share Posted Saturday at 03:42 PM (edited) Count Down (V0.0.2) Its the final countdown SpaceDock: https://spacedock.info/mod/3328/Count Down src: https://github.com/Bit-Studios/CountDown license: MIT Edited 19 hours ago by ShadowDev 0.0.2 Quote Link to comment Share on other sites More sharing options...
LeroyJenkins Posted Saturday at 03:59 PM Share Posted Saturday at 03:59 PM @ShadowDev Thank you for this! I suggested this to the KSP2 Devs. Quote Link to comment Share on other sites More sharing options...
LeroyJenkins Posted yesterday at 03:09 PM Share Posted yesterday at 03:09 PM @ShadowDev Been using this a bit and wanted to provide some feedback and suggestions: (Disclaimer, I am NOT a fully versed programmer, never created a mod, nor coded in C#, so please take my suggestions with a kind heart). 1) At Launch pad, after selecting the "Countdown" button in the apps menu it pops up and immediately vanishes. I'd suggest it stays up, and only goes away after the user toggles the Countdown App button or with launch countdown is complete. -GUILayout.BeginVertical(); if (GUI.Button(new Rect(windowRect.width - 23, 6, 18, 18), "<b>x</b>", new GUIStyle(GUI.skin.button) { fontSize = 10, })) { showUI = false; <--- Change that to true? } 2) The number displayed doesn't need 13 decimal places (see image). A typical count down format T- HH:mm:SS.s. Though here HH;mm doesn't hold value. You could set it to T-00:13.5 for esthetics. Keeping at SS.s, will help with the window resizing every time the last decimal place is zero. Timer = float.Parse(Timer.ToString().Remove(4)); <-- This line of code may be trying to do remove all the decimals. Based on reading up on Remove(), this should be removing everything after the fourth digit, so SS.ss? 3) The voice countdown to the numerical countdown is off by 1 sec. The voice says the numbers (in kerbinese) when the whole number is new, eg 2.9 is 'two', 1.9 is 'one' This should be shifted to 2.0 is 'two', and 1.0, is "one". I couldn't find in the code where this is set. It could be how you are offsetting the StartTimer variable from Game UT. StartTimer = GameManager.Instance.Game.ViewController.universalTime + 13.53; <-- change this to 12.63? I'd go into the src and try to do this myself, but I don't want to mess up the git repo by not knowing exactly how to do things. I hope this helps. Quote Link to comment Share on other sites More sharing options...
ShadowDev Posted 23 hours ago Author Share Posted 23 hours ago I do have a new version, just forgot to push the update to spacedock. The code you see is the update, not what your running. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.