Skip to content

Commit

Permalink
Merge pull request #1 from zer0Kerbal/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
linuxgurugamer committed Jan 31, 2020
2 parents b9b210d + 3dca585 commit 53c3644
Show file tree
Hide file tree
Showing 15 changed files with 287 additions and 62 deletions.
16 changes: 16 additions & 0 deletions ChangeLog.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@ KERBALCHANGELOG
showChangelog = True
modName = Simple Logistics Restocked
VERSION
{
version = 2.0.3.1 the LGG update
change = updated toolbars and icons
change = Added Toolbarcontroller and Clickthroughblocker code and as dependencies (thank you linuxgurugamer)
change = corrected localization code for vessel name (thank you linuxgurugamer)
change = Restored all PNG textures because the code was loading files with the png name (thank you linuxgurugamer)
change = updated pallete.cs from png -> dds (thank you linuxgurugamer)
change = Added ClickThroughBlocker (thank you linuxgurugamer)
change = Added ToolbarController (thank you linuxgurugamer)
change = Commented out all stock toolbar code (thank you linuxgurugamer)
change = Commented out all Blizzy toolbar code (thank you linuxgurugamer)
change = Commented out entire ToolbarWrapper.cs file (thank you linuxgurugamer)
change = Added a Localizer.Format to the GUI where the vessel name was being shown (thank you linuxgurugamer)
}
VERSION
{
version = 2.0.3.0
change = updated to KSP 1.8.1
change = updated to .NET 4.8
change = updated to Unity 2019x
change = added to SpaceDock, updated CKAN (thank you linuxgurugamer)
change = Chinese localization by tinygrox. Thank you.
change = Localization code provided by tinygrox. Thank you.
change = update patch to include ":NEEDS"
Expand Down
27 changes: 27 additions & 0 deletions GameData/SimpleLogistics/ChangeLog.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,38 @@ KERBALCHANGELOG
showChangelog = True
modName = Simple Logistics Restocked
VERSION
{
version = 2.0.3.1 the LGG update
change = updated toolbars and icons
change = Added Toolbarcontroller and Clickthroughblocker code and as dependencies (thank you linuxgurugamer)
change = corrected localization code for vessel name (thank you linuxgurugamer)
change = Restored all PNG textures because the code was loading files with the png name (thank you linuxgurugamer)
change = updated pallete.cs from png -> dds (thank you linuxgurugamer)
change = Added ClickThroughBlocker (thank you linuxgurugamer)
change = Added ToolbarController (thank you linuxgurugamer)
change = Commented out all stock toolbar code (thank you linuxgurugamer)
change = Commented out all Blizzy toolbar code (thank you linuxgurugamer)
change = Commented out entire ToolbarWrapper.cs file (thank you linuxgurugamer)
change = Added a Localizer.Format to the GUI where the vessel name was being shown (thank you linuxgurugamer)
}
VERSION
{
version = 2.0.3.0.2 - ¿Conectado?
change = es-es.cfg provided by @fitiales (thank you)
change = SimpleLogistics now speaks three languages (En-Ch-Es)
}
VERSION
{
version = 2.0.3.0.1 - So THAT's where the extra nut goes!
change = added missing UI textures
}
VERSION
{
version = 2.0.3.0
change = updated to KSP 1.8.1
change = updated to .NET 4.8
change = updated to Unity 2019x
change = added to SpaceDock, updated CKAN (thank you linuxgurugamer)
change = Chinese localization by tinygrox. Thank you.
change = Localization code provided by tinygrox. Thank you.
change = update patch to include ":NEEDS"
Expand Down
19 changes: 19 additions & 0 deletions GameData/SimpleLogistics/Localization/es-es.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Localization
{
es-es
{
#SimpleLogistics_Module_Plugged = ¿Conectado?
#SimpleLogistics_Module_PluggedNet = Conectar a la red
#SimpleLogistics_Module_Getinfo = Módulo de logística para compartir recursos fácilmente.
#SimpleLogistics_WindowTitle = Red de logística
#SimpleLogistics_Label1 = Nave actual
#SimpleLogistics_Label2 = Conectado
#SimpleLogistics_Label3 = Desconectado
#SimpleLogistics_Label4 = Alternar Enchufe
#SimpleLogistics_Label5 = Fondo de recursos:
#SimpleLogistics_Label6 = Solicitar recursos
#SimpleLogistics_Label7 = Cerrar
#SimpleLogistics_msg1 = Debe aterrizar para usar logística
#SimpleLogistics_msg2 = Debe aterrizar para usar logística
}
}
48 changes: 20 additions & 28 deletions GameData/SimpleLogistics/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Readme.md v1.1.1.1
<!-- Readme.md v1.1.1.2
Simple Logistics (SL)
created: 11 Aug 18
updated: 16 Jan 20 -->
updated: 18 Jan 20 -->

<!-- Download on SpaceDock or Github or Curseforge. Also available on CKAN. -->

Expand All @@ -10,39 +10,31 @@ KSP Simple Logistics
Simple resource sharing among landed vessels.
originally by RealGecko

![Mod Version](https://img.shields.io/github/v/release/zer0Kerbal/SimpleLogistics?include_prereleases)
![KSP 1.8.x](https://img.shields.io/badge/KSP%20version-1.8.x-66ccff.svg?style=flat-square)
![CKAN listed](https://img.shields.io/badge/CKAN-Indexed-brightgreen.svg)
![Software License GPLv3](https://img.shields.io/badge/SoftwareLicense-GPLv3-red)
![Mod Version](https://img.shields.io/github/v/release/zer0Kerbal/SimpleLogistics?include_prereleases)
![KSP 1.8.x](https://img.shields.io/badge/KSP%20version-1.8.x-66ccff.svg?style=flat-square)
![CKAN listed](https://img.shields.io/badge/CKAN-Indexed-brightgreen.svg)
![Software License GPLv3](https://img.shields.io/badge/SoftwareLicense-GPLv3-red)
![NonSoftware License CC 4.0 BY-NC-SA](https://img.shields.io/badge/NonSoftwareLicense-CC--4.0--BY--SA-lightgrey)

![SimpleLogistics](https://spacedock.info/content/RealGecko_4471/SimpleLogistics/SimpleLogistics-1479979364.054124.png)

## Changelog
### Version 2.0.3.0
- Recompile for KSP 1.8.1/ .NET 4.8 / Unity 2019
- Added localization for US-EN and ZH-CN ( thank you @tinygrox)
- change = update patch to include ":NEEDS"
- Code clean, update pass
- moved Changelog into separate file

## Dependencies
* Kerbal Space Program
* Module Manager

## Suggests
## Dependencies
* [Kerbal Space Program]()
* [Module Manager]()
* [NEW] [ToolbarController]()
* [NEW] [ClickThroughBlocker]()

## Suggests
* [On Demand Fuel Cells (ODFC)](https://forum.kerbalspaceprogram.com/index.php?/topic/187625-*)
* Field Training Facility (FTF)
* Field Training Lab (FTL)

## License
* [Field Training Facility (FTF)]()
* [Field Training Lab (FTL)]()
* [B9 Stock Switches (BSS)]()
* [HotBeverages!]()

## License
- ![GPLv3](https://www.gnu.org/graphics/gplv3-or-later-sm.png) [Software and Sourcecode Only License. This only covers the software and sourcecode. Original license.](https://www.gnu.org/licenses/gpl-3.0.html)
- ![CC BY-NC-SA 4.0.](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png) [Non-Software or Sourcecode (All other/General) License. All other/General License content licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.](https://creativecommons.org/licenses/by-nc-sa/4.0)

`You may modify for personal use. You may redistribute content with attribution to original author zer0Kerbal, plus any other attribution where required. You must redistribute under identical license, CC BY-NC-SA 4.0.`

*Be Kind: Lithobrake, not jakebrake! Keep your Module Manager up to date*

📌v2.0.3.0

###### v2.0.3.0 original: 11 Aug 2018 0K updated: 15 Dec 2020 zed'K
###### 📌 v2.0.3.1 original: 11 Aug 2018 0K updated: 15 Dec 2020 zed'K
2 changes: 1 addition & 1 deletion GameData/SimpleLogistics/SimpleLogistics.version
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"MAJOR" : 2,
"MINOR" : 0,
"PATCH" : 3,
"BUILD" : 0
"BUILD" : 1
},
"KSP_VERSION":
{
Expand Down
Binary file removed GameData/SimpleLogistics/Textures/button-back.png
Binary file not shown.
Binary file removed GameData/SimpleLogistics/Textures/button-hover-back.png
Binary file not shown.
Binary file removed GameData/SimpleLogistics/Textures/window-back.png
Binary file not shown.
52 changes: 24 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Readme.md v1.1.1.1
<!-- Readme.md v1.1.1.2
Simple Logistics (SL)
created: 11 Aug 18
updated: 16 Jan 20 -->
updated: 18 Jan 20 -->

<!-- Download on SpaceDock or Github or Curseforge. Also available on CKAN. -->

Expand All @@ -10,39 +10,35 @@ KSP Simple Logistics
Simple resource sharing among landed vessels.
originally by RealGecko

![Mod Version](https://img.shields.io/github/v/release/zer0Kerbal/SimpleLogistics?include_prereleases)
![KSP 1.8.x](https://img.shields.io/badge/KSP%20version-1.8.x-66ccff.svg?style=flat-square)
![CKAN listed](https://img.shields.io/badge/CKAN-Indexed-brightgreen.svg)
![Software License GPLv3](https://img.shields.io/badge/SoftwareLicense-GPLv3-red)
![Mod Version](https://img.shields.io/github/v/release/zer0Kerbal/SimpleLogistics?include_prereleases)
![KSP 1.8.x](https://img.shields.io/badge/KSP%20version-1.8.x-66ccff.svg?style=flat-square)
![CKAN listed](https://img.shields.io/badge/CKAN-Indexed-brightgreen.svg)
![Software License GPLv3](https://img.shields.io/badge/SoftwareLicense-GPLv3-red)
![NonSoftware License CC 4.0 BY-NC-SA](https://img.shields.io/badge/NonSoftwareLicense-CC--4.0--BY--SA-lightgrey)

## Looking for translators!
### SimpleLogistics now speaks six languages:
#### English, Spanish, French, German, Chinese, and Japanese

![SimpleLogistics](https://spacedock.info/content/RealGecko_4471/SimpleLogistics/SimpleLogistics-1479979364.054124.png)

## Changelog
### Version 2.0.3.0
- Recompile for KSP 1.8.1/ .NET 4.8 / Unity 2019
- Added localization for US-EN and ZH-CN ( thank you @tinygrox)
- change = update patch to include ":NEEDS"
- Code clean, update pass
- moved Changelog into separate file

## Dependencies
* Kerbal Space Program
* Module Manager

## Suggests
## Dependencies
* [Kerbal Space Program]()
* [Module Manager]()
* [NEW] [ToolbarController]()
* [NEW] [ClickThroughBlocker]()

## Suggests
* [On Demand Fuel Cells (ODFC)](https://forum.kerbalspaceprogram.com/index.php?/topic/187625-*)
* Field Training Facility (FTF)
* Field Training Lab (FTL)

## License
* [Field Training Facility (FTF)]()
* [Field Training Lab (FTL)]()
* [B9 Stock Switches (BSS)]()
* [HotBeverages!]()

## License
- ![GPLv3](https://www.gnu.org/graphics/gplv3-or-later-sm.png) [Software and Sourcecode Only License. This only covers the software and sourcecode. Original license.](https://www.gnu.org/licenses/gpl-3.0.html)
- ![CC BY-NC-SA 4.0.](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png) [Non-Software or Sourcecode (All other/General) License. All other/General License content licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.](https://creativecommons.org/licenses/by-nc-sa/4.0)

`You may modify for personal use. You may redistribute content with attribution to original author zer0Kerbal, plus any other attribution where required. You must redistribute under identical license, CC BY-NC-SA 4.0.`

*Be Kind: Lithobrake, not jakebrake! Keep your Module Manager up to date*

📌v2.0.3.0

###### v2.0.3.0 original: 11 Aug 2018 0K updated: 15 Dec 2020 zed'K
###### 📌 v2.0.3.1 original: 11 Aug 2018 0K updated: 15 Dec 2020 zed'K
2 changes: 1 addition & 1 deletion SimpleLogistics.version
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"MAJOR" : 2,
"MINOR" : 0,
"PATCH" : 3,
"BUILD" : 0
"BUILD" : 1
},
"KSP_VERSION":
{
Expand Down
2 changes: 1 addition & 1 deletion Source/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

using System.Reflection;

[assembly: AssemblyVersion("2.0.3.0")]
[assembly: AssemblyVersion("2.0.3.1")]

133 changes: 133 additions & 0 deletions Source/Log.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using UnityEngine;

namespace SimpleLogistics
{
class Log
{
/// <summary>
/// sends the specific message to ingame mail and screen if Debug is defined
/// For debugging use only.
/// </summary>
/// <param name="msg">The MSG.</param>
/// <param name="params">The parameters.</param>
[ConditionalAttribute("DEBUG")]
internal static void dbg(string msg, params object[] @params)
{
if (0 != @params.Length) msg = string.Format(msg, @params);
ScreenMessages.PostScreenMessage(msg, 1, ScreenMessageStyle.UPPER_CENTER, true);
UnityEngine.Debug.Log("[SimpleLogistics] " + msg);
}
}
internal static class Logg
{
public enum LEVEL
{
OFF = 0,
ERROR = 1,
WARNING = 2,
INFO = 3,
DETAIL = 4,
TRACE = 5
};

public static LEVEL level = LEVEL.INFO;

private static readonly String PREFIX = "SimpleLogistics" + ": ";

public static LEVEL GetLevel()
{
return level;
}

public static void SetLevel(LEVEL level)
{
UnityEngine.Debug.Log("log level " + level);
Log.level = level;
}

public static LEVEL GetLogLevel()
{
return level;
}

private static bool IsLevel(LEVEL level)
{
return level == Log.level;
}

public static bool IsLogable(LEVEL level)
{
return level <= Log.level;
}

public static void Trace(String msg)
{
if (IsLogable(LEVEL.TRACE))
{
UnityEngine.Debug.Log(PREFIX + msg);
}
}

public static void Detail(String msg)
{
if (IsLogable(LEVEL.DETAIL))
{
UnityEngine.Debug.Log(PREFIX + msg);
}
}

[ConditionalAttribute("DEBUG")]
public static void Info(String msg)
{
if (IsLogable(LEVEL.INFO))
{
UnityEngine.Debug.Log(PREFIX + msg);
}
}

[ConditionalAttribute("DEBUG")]
public static void Test(String msg)
{
//if (IsLogable(LEVEL.INFO))
{
UnityEngine.Debug.LogWarning(PREFIX + "TEST:" + msg);
}
}

public static void Warning(String msg)
{
if (IsLogable(LEVEL.WARNING))
{
UnityEngine.Debug.LogWarning(PREFIX + msg);
}
}

public static void Error(String msg)
{
if (IsLogable(LEVEL.ERROR))
{
UnityEngine.Debug.LogError(PREFIX + msg);
}
}

public static void Debug(bool debugMode, String msg)
{
if (debugMode)
{
UnityEngine.Debug.LogError(PREFIX + msg);
}
else
Log.Info(msg);
}

public static void Exception(Exception e)
{
Log.Error("exception caught: " + e.GetType() + ": " + e.Message);
}
}
}
Loading

0 comments on commit 53c3644

Please sign in to comment.