corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | using System; |
2 | using System.Collections.Generic; |
||
3 | using System.Text; |
||
4 | using OpenMetaverse; |
||
5 | using OpenMetaverse.Packets; |
||
6 | |||
7 | namespace OpenMetaverse.TestClient |
||
8 | { |
||
9 | public class TouchCommand: Command |
||
10 | { |
||
11 | public TouchCommand(TestClient testClient) |
||
12 | { |
||
13 | Name = "touch"; |
||
14 | Description = "Attempt to touch a prim with specified UUID"; |
||
15 | Category = CommandCategory.Objects; |
||
16 | } |
||
17 | |||
18 | public override string Execute(string[] args, UUID fromAgentID) |
||
19 | { |
||
20 | UUID target; |
||
21 | |||
22 | if (args.Length != 1) |
||
23 | return "Usage: touch UUID"; |
||
24 | |||
25 | if (UUID.TryParse(args[0], out target)) |
||
26 | { |
||
27 | Primitive targetPrim = Client.Network.CurrentSim.ObjectsPrimitives.Find( |
||
28 | delegate(Primitive prim) |
||
29 | { |
||
30 | return prim.ID == target; |
||
31 | } |
||
32 | ); |
||
33 | |||
34 | if (targetPrim != null) |
||
35 | { |
||
36 | Client.Self.Touch(targetPrim.LocalID); |
||
37 | return "Touched prim " + targetPrim.LocalID; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return "Couldn't find a prim to touch with UUID " + args[0]; |
||
42 | } |
||
43 | } |
||
44 | } |