1
This commit is contained in:
13
Src/Core/Item/ItemObject.cs
Normal file
13
Src/Core/Item/ItemObject.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public interface IWorldItemObject
|
||||
{
|
||||
public IBasicItem Item { get; set; }
|
||||
public event Action<IBasicItem> OnSetItem;
|
||||
}
|
||||
}
|
||||
|
11
Src/Core/Item/ItemObject.cs.meta
Normal file
11
Src/Core/Item/ItemObject.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0adbb35ce4784342a0ed37ac4a56200
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -36,8 +37,8 @@ namespace BITKit.Modification
|
||||
/// </summary>
|
||||
public interface IModifyElement
|
||||
{
|
||||
IModifyElement[] Require { get; }
|
||||
IModifyElement[] Incompatible { get; }
|
||||
IModifyElement[] Require => Array.Empty<IModifyElement>();
|
||||
IModifyElement[] Incompatible => Array.Empty<IModifyElement>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 改装管理器
|
||||
|
@@ -119,11 +119,16 @@ namespace BITKit
|
||||
}
|
||||
public bool TryRemoveProperty<T>()
|
||||
{
|
||||
if(properties.TryGetValue(typeof(T).FullName, out var x))
|
||||
foreach (var pair in properties.Where(x=>x.Value is T))
|
||||
{
|
||||
properties.Remove(typeof(T).Name);
|
||||
properties.Remove(pair.Key);
|
||||
return true;
|
||||
}
|
||||
// if(properties.TryGetValue(typeof(T).FullName, out var x))
|
||||
// {
|
||||
// properties.Remove(typeof(T).Name);
|
||||
// return true;
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
public bool TrySetProperty<T>(T value)
|
||||
|
Reference in New Issue
Block a user