forked from zer0Kerbal/SimpleLogistics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zer0Kerbal/master
update
- Loading branch information
Showing
15 changed files
with
287 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"MAJOR" : 2, | ||
"MINOR" : 0, | ||
"PATCH" : 3, | ||
"BUILD" : 0 | ||
"BUILD" : 1 | ||
}, | ||
"KSP_VERSION": | ||
{ | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"MAJOR" : 2, | ||
"MINOR" : 0, | ||
"PATCH" : 3, | ||
"BUILD" : 0 | ||
"BUILD" : 1 | ||
}, | ||
"KSP_VERSION": | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
|
||
using System.Reflection; | ||
|
||
[assembly: AssemblyVersion("2.0.3.0")] | ||
[assembly: AssemblyVersion("2.0.3.1")] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.