Skip to content

Commit 8327e4f

Browse files
committed
return false if no parameters removed
1 parent e0a129c commit 8327e4f

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • CathodeLib/Scripts/CATHODE/CommandsPAK/Components

CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,19 @@ public Parameter AddParameter(ShortGuid id, ParameterData data, ParameterVariant
193193
}
194194

195195
/* Remove a parameter from the entity */
196-
public void RemoveParameter(string name)
196+
public bool RemoveParameter(string name)
197197
{
198198
ShortGuid name_id = ShortGuidUtils.Generate(name);
199-
RemoveParameter(name_id);
199+
return RemoveParameter(name_id);
200200
}
201-
public void RemoveParameter(Parameter param)
201+
public bool RemoveParameter(Parameter param)
202202
{
203-
RemoveParameter(param.name);
203+
return RemoveParameter(param.name);
204204
}
205-
public void RemoveParameter(ShortGuid guid)
205+
public bool RemoveParameter(ShortGuid guid)
206206
{
207-
parameters.RemoveAll(o => o.name == guid);
207+
int count = parameters.RemoveAll(o => o.name == guid);
208+
return count != 0;
208209
}
209210

210211
/* Add a link from a parameter on us out to a parameter on another entity */

0 commit comments

Comments
 (0)