Drag and Drop + Zoooooooom

Refactored inventory drag & drop to use new global drag & drop management
Enabled Drag & Drop from inventory panel to action bar
Enabled gear and consumable item binding
Fixed stat modifier behavior to allow it to be toggled
Fixed Switch behavior to make it bindable
Added lambda multiplier to aether drive so that stat mod can target it
This commit is contained in:
Reinier Vens 2021-04-21 01:49:07 +01:00
commit 7cfc5cd04f
21 changed files with 352 additions and 323 deletions

View file

@ -14,17 +14,18 @@ public class TypeFormatter : MessagePack.Formatters.IMessagePackFormatter<Type>
public void Serialize(ref MessagePackWriter writer, Type value, MessagePackSerializerOptions options)
{
writer.Write(value.AssemblyQualifiedName);
writer.Write(value == null ? "" : value.AssemblyQualifiedName);
}
public Type Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
{
if (reader.IsNil)
{
throw new InvalidOperationException("typecode is null, struct not supported");
return null; //throw new InvalidOperationException("typecode is null, struct not supported");
}
var assemblyQualifiedName = reader.ReadString();
if (string.IsNullOrEmpty(assemblyQualifiedName)) return null;
return Type.GetType(assemblyQualifiedName);
}