You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -121,7 +123,7 @@ public static IEnumerable<DynamicVariableSpace> GetAvailableSpaces(this Slot slo
121
123
/// <returns>All full Dynamic Variable identities that apply to this <see cref="Slot"/> that the given <see cref="Type"/> can be assigned to.</returns>
/// Gets the <see cref="DynamicVariableHandler{T}"/> of this
@@ -337,7 +339,7 @@ public static IEnumerable<DynamicVariableIdentity> GetVariableIdentities<T>(this
337
339
/// <param name="type">The type that must be assignable to the variables.</param>
338
340
/// <returns>All full Dynamic Variable identities associated with this <paramref name="space"/> that the given <see cref="Type"/> can be assigned to.</returns>
vararg=(componentis not null&&component!=target)?("on "+component.Name+" on "+slot.Name):((slotisnull)?"":("on "+slot.Name));
33
+
return(targetis not SyncElementsyncElement)?$"{target.Name??target.GetType().Name}{arg} ({target.ReferenceID})":$"{syncElement.NameWithPath}{arg} ({target.ReferenceID})";
thrownewInvalidOperationException("An incompatible component is stored under the key "+key+$"\nExisting: {component}");
31
+
32
+
returncomponent;
33
+
}
34
+
35
+
/// <summary>
36
+
/// Tries to <see cref="World.KeyOwner">get</see> or <see cref="World.RequestKey">create</see>
37
+
/// a keyed <typeparamref name="T"/> component, based on the situation and parameters.
38
+
/// </summary>
39
+
/// <remarks><para>
40
+
/// This behavior was adapted from <see cref="ContainerWorker{C}.GetComponentOrAttach{T}(Predicate{T})"/>.
41
+
/// </para><para>
42
+
/// Consider that these component-associations will be saved with the <see cref="World"/>.
43
+
/// Make sure that this is really necessary for what you're attempting to do.
44
+
/// </para></remarks>
45
+
/// <typeparam name="T">The type of the component to get or create.</typeparam>
46
+
/// <param name="slot">The slot to attach the <typeparamref name="T"/> component to when necessary.</param>
47
+
/// <param name="key">The unique key (to) associate(d) with the <typeparamref name="T"/> component.</param>
48
+
/// <param name="component">
49
+
/// The <typeparamref name="T"/> component associated with the given <paramref name="key"/> if this call returns <see langword="true"/>;
50
+
/// otherwise, <see langword="null"/> when an incompatible component is associated with it
51
+
/// and <paramref name="replaceExisting"/> was <see langword="false"/>.
52
+
/// </param>
53
+
/// <param name="onCreated">
54
+
/// The optional configuration action to call when the <typeparamref name="T"/> component had to be created,
55
+
/// or when its saved version is lower than the given <paramref name="version"/> number.
56
+
/// </param>
57
+
/// <param name="version">The version number to associate with the <typeparamref name="T"/> component after this call.</param>
58
+
/// <param name="replaceExisting">Whether to replace a different component associated with the given <paramref name="key"/> with this one.</param>
59
+
/// <param name="updateExisting">
60
+
/// Whether to call <paramref name="onCreated"/> even if the <typeparamref name="T"/> component already exists.<br/>
61
+
/// If the given <paramref name="version"/> number is greater than zero and the saved version is lower, this will always be done.
62
+
/// </param>
63
+
/// <returns><see langword="true"/> if the keyed <typeparamref name="T"/> component was found or created; otherwise, <see langword="false"/>.</returns>
0 commit comments