- 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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user