Add new EnsureEntity variants (#4586)

This commit is contained in:
Leon Friedrich
2023-11-20 19:44:36 +13:00
committed by GitHub
parent 96cb52e5d2
commit 202182e3d4
4 changed files with 36 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ namespace Robust.Shared.CompNetworkGenerator
getStateInit.Append($@"
{name} = GetNetEntitySet(component.{name}),");
handleStateSetters.Append($@"
component.{name} = EnsureEntitySet<{componentName}>(state.{name}, uid);");
EnsureEntitySet<{componentName}>(state.{name}, uid, component.{name});");
break;
case GlobalEntityUidListName:
@@ -177,7 +177,7 @@ namespace Robust.Shared.CompNetworkGenerator
getStateInit.Append($@"
{name} = GetNetEntityList(component.{name}),");
handleStateSetters.Append($@"
component.{name} = EnsureEntityList<{componentName}>(state.{name}, uid);");
EnsureEntityList<{componentName}>(state.{name}, uid, component.{name});");
break;
default: