- npcs wont try grab items from other characters' inventories

- fixed lightcomponent LightSprites "twitching" when the sub is moving
- fixed null reference exceptions in Hull.Render if no submarine has been loaded
- submarine descriptions
- emergency sirens in Aegir & Vellamo
- changed the required item for fabricating a wire from "Copper" to "Copper Bar"
This commit is contained in:
Regalis
2016-03-18 17:48:25 +02:00
parent 8df9864db9
commit fc8b30c974
18 changed files with 158 additions and 82 deletions
+10
View File
@@ -302,6 +302,16 @@ namespace Barotrauma
return floatArray;
}
public static string LimitString(string str, int maxCharacters)
{
if (str == null || maxCharacters < 0) return null;
if (maxCharacters < 4 || str.Length <= maxCharacters) return str;
return str.Substring(0, maxCharacters-3) + "...";
}
public static string RandomSeed(int length)
{
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";