This commit is contained in:
SoulliesOfficial
2025-10-24 09:11:22 -04:00
parent 61a397dd4c
commit 76157e3cb1
329 changed files with 8609 additions and 4549 deletions

View File

@@ -69,12 +69,13 @@ namespace Continentis.MainGame.Equipment
{
public static EquipmentBase GenerateEquipment(EquipmentData data, CharacterBase character = null)
{
Type logicType = data.haveCustomClass ? ModManager.GetType(data.classFullName) : typeof(EquipmentBase);
string typeID = "NoFunctionEquipment";
Type logicType = typeof(EquipmentBase);
if(logicType == null)
if (data.haveCustomClass)
{
Debug.LogError($"Card class '{data.classFullName}' not found in assemblies.");
return null;
typeID = ModManager.GetTypeID(data.modName, "Equipments", data.className);
logicType = ModManager.GetType(typeID);
}
if (Activator.CreateInstance(logicType) is EquipmentBase equipment)
@@ -85,7 +86,7 @@ namespace Continentis.MainGame.Equipment
return equipment;
}
Debug.LogError($"Failed to create equipment of type {data.classFullName}");
Debug.LogError($"Failed to create equipment of type {typeID}");
return null;
}
}