diff options
* Added prototypical AvatarFactory module interface to load avatar parameters
* Added dump_assets_to_file option to enable asset dumping for debug
* normalized some namespaces
* InventoryFolder renamed to InventoryFolderImpl to
Diffstat (limited to 'OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs new file mode 100644 index 0000000..f825b7a --- /dev/null +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs | |||
@@ -0,0 +1,57 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using Nini.Config; | ||
6 | using OpenSim.Framework.Types; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | using OpenSim.Region.Environment.Scenes; | ||
9 | |||
10 | namespace OpenSim.Region.Environment.Modules | ||
11 | { | ||
12 | public class AvatarFactoryModule : IAvatarFactory | ||
13 | { | ||
14 | public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams) | ||
15 | { | ||
16 | GetDefaultAvatarAppearance(out wearables, out visualParams); | ||
17 | return true; | ||
18 | } | ||
19 | |||
20 | public void Initialise(Scene scene, IConfigSource source) | ||
21 | { | ||
22 | scene.RegisterModuleInterface<IAvatarFactory>(this); | ||
23 | } | ||
24 | |||
25 | public void PostInitialise() | ||
26 | { | ||
27 | } | ||
28 | |||
29 | public void Close() | ||
30 | { | ||
31 | } | ||
32 | |||
33 | public string Name | ||
34 | { | ||
35 | get { return "Default Avatar Factory"; } | ||
36 | } | ||
37 | |||
38 | public bool IsSharedModule | ||
39 | { | ||
40 | get { return true; } | ||
41 | } | ||
42 | |||
43 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) | ||
44 | { | ||
45 | visualParams = new byte[218]; | ||
46 | for (int i = 0; i < 218; i++) | ||
47 | { | ||
48 | visualParams[i] = 100; | ||
49 | } | ||
50 | |||
51 | wearables = AvatarWearable.DefaultWearables; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | |||
56 | |||
57 | } | ||