Fix NetworkManager, add more entity management, default command permission level to "Admin"
This commit is contained in:
29
Torch.Server/Views/Converters/Vector3DConverter.cs
Normal file
29
Torch.Server/Views/Converters/Vector3DConverter.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using VRageMath;
|
||||
|
||||
namespace Torch.Server.Views.Converters
|
||||
{
|
||||
public class Vector3DConverter : IValueConverter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return ((Vector3D)value).ToString();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (Vector3D.TryParse((string)value, out Vector3D vec))
|
||||
return vec;
|
||||
|
||||
throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user