RLVWearables.Add(new RLVWearable() { Name = "shape", Type = WearableType.Shape });
RLVWearables.Add(new RLVWearable() { Name = "alpha", Type = WearableType.Alpha });
RLVWearables.Add(new RLVWearable() { Name = "tattoo", Type = WearableType.Tattoo });
+ RLVWearables.Add(new RLVWearable() { Name = "physics", Type = WearableType.Physics });
RLVAttachments = new List<RLVAttachment>();
RLVAttachments.Add(new RLVAttachment() { Name = "none", Point = AttachmentPoint.Default });
int chan = 0;
if (int.TryParse(rule.Param, out chan) && chan > 0)
{
- client.Self.Chat("RestrainedLife viewer v1.23 (" + Properties.Resources.RadegastTitle + "." + RadegastBuild.CurrentRev + ")", chan, ChatType.Normal);
+ Respond(chan, "RestrainedLife viewer v1.23 (" + Properties.Resources.RadegastTitle + "." + RadegastBuild.CurrentRev + ")");
}
break;
chan = 0;
if (int.TryParse(rule.Param, out chan) && chan > 0)
{
- client.Self.Chat("RestrainedLove viewer v1.23 (" + Properties.Resources.RadegastTitle + "." + RadegastBuild.CurrentRev + ")", chan, ChatType.Normal);
+ Respond(chan, "RestrainedLove viewer v1.23 (" + Properties.Resources.RadegastTitle + "." + RadegastBuild.CurrentRev + ")");
}
break;
case "versionnum":
if (int.TryParse(rule.Param, out chan) && chan > 0)
{
- client.Self.Chat("1230100", chan, ChatType.Normal);
+ Respond(chan, "1230100");
}
break;
UUID gid = client.Self.ActiveGroup;
if (instance.Groups.ContainsKey(gid))
{
- client.Self.Chat(instance.Groups[gid].Name, chan, ChatType.Normal);
+ Respond(chan, instance.Groups[gid].Name);
}
}
break;
Primitive seat;
if (client.Network.CurrentSim.ObjectsPrimitives.TryGetValue(me.ParentID, out seat))
{
- client.Self.Chat(seat.ID.ToString(), chan, ChatType.Normal);
+ Respond(chan, seat.ID.ToString());
break;
}
}
}
- client.Self.Chat(UUID.Zero.ToString(), chan, ChatType.Normal);
+ Respond(chan, UUID.Zero.ToString());
}
break;
res += ":" + objRule.Option;
}
});
- client.Self.Chat(res, chan, ChatType.Normal);
+ Respond(chan, res);
}
}
break;
}
}
- client.Self.Chat(res, chan, ChatType.Normal);
+ Respond(chan, res);
}
break;
}
- client.Self.Chat(res, chan, ChatType.Normal);
+ Respond(chan, res);
}
break;
instance.COF.Detach((InventoryItem)client.Inventory.Store.Items[CurrentOutfitFolder.GetAttachmentItem(attachment)].Data);
}
}
+ else
+ {
+ InventoryNode folder = FindFolder(rule.Option);
+ if (folder != null)
+ {
+ var outfit = new List<InventoryItem>();
+ foreach (var item in folder.Nodes.Values)
+ {
+ if (CurrentOutfitFolder.CanBeWorn(item.Data))
+ {
+ outfit.Add((InventoryItem)(item.Data));
+ }
+ }
+ instance.COF.RemoveFromOutfit(outfit);
+ }
+ }
}
else
{
}
}
break;
+
+ case "remoutfit":
+ if (rule.Param == "force")
+ {
+ if (!string.IsNullOrEmpty(rule.Option))
+ {
+ var w = RLVWearables.Find(a => a.Name == rule.Option);
+ if (w.Name == rule.Option)
+ {
+ var items = instance.COF.GetWornAt(w.Type);
+ instance.COF.RemoveFromOutfit(items);
+ }
+ }
+ }
+ break;
+
+ case "attach":
+ case "attachoverorreplace":
+ case "attachover":
+ if (rule.Param == "force")
+ {
+ if (!string.IsNullOrEmpty(rule.Option))
+ {
+ InventoryNode folder = FindFolder(rule.Option);
+ if (folder != null)
+ {
+ List<InventoryItem> outfit = new List<InventoryItem>();
+ foreach (var item in folder.Nodes.Values)
+ {
+ if (CurrentOutfitFolder.CanBeWorn(item.Data))
+ {
+ outfit.Add((InventoryItem)item.Data);
+ }
+ }
+ if (rule.Behaviour == "attachover")
+ {
+ instance.COF.AddToOutfit(outfit, false);
+ }
+ else
+ {
+ instance.COF.AddToOutfit(outfit, true);
+ }
+ }
+ }
+ }
+ break;
case "getinv":
if (int.TryParse(rule.Param, out chan) && chan > 0)
}
}
- client.Self.Chat(res.TrimEnd(','), chan, ChatType.Normal);
+ Respond(chan, res.TrimEnd(','));
}
break;
}
}
- client.Self.Chat(res.TrimEnd(','), chan, ChatType.Normal);
+ Respond(chan, res.TrimEnd(','));
}
break;
return true;
}
+ private void Respond(int chan, string msg)
+ {
+#if DEBUG
+ instance.TabConsole.DisplayNotificationInChat(string.Format("{0}: {1}", chan, msg), ChatBufferTextStyle.OwnerSay);
+#endif
+ client.Self.Chat(msg, chan, ChatType.Normal);
+ }
+
public void AllSubfolderWearables(InventoryNode root, ref List<InventoryItem> WearableItems)
{