public RegionHandshakeData(RegionHandshake msg) { RegionFlags = msg.RegionFlags; SimAccess = msg.SimAccess; SimName = msg.SimName; IsEstateManager = msg.IsEstateManager; WaterHeight = msg.WaterHeight; BillableFactor = msg.BillableFactor; CacheID = msg.CacheID; TerrainBase0 = msg.TerrainBase0; TerrainBase1 = msg.TerrainBase1; TerrainBase2 = msg.TerrainBase2; TerrainBase3 = msg.TerrainBase3; TerrainDetail0 = msg.TerrainDetail0; TerrainDetail1 = msg.TerrainDetail1; TerrainDetail2 = msg.TerrainDetail2; TerrainDetail3 = msg.TerrainDetail3; TerrainHeightRange00 = msg.TerrainHeightRange00; TerrainHeightRange01 = msg.TerrainHeightRange01; TerrainHeightRange10 = msg.TerrainHeightRange10; TerrainHeightRange11 = msg.TerrainHeightRange11; TerrainStartHeight00 = msg.TerrainStartHeight00; TerrainStartHeight01 = msg.TerrainStartHeight01; TerrainStartHeight10 = msg.TerrainStartHeight10; TerrainStartHeight11 = msg.TerrainStartHeight11; RegionID = msg.RegionID; CPUClassID = msg.CPUClassID; CPURatio = msg.CPURatio; ColoName = msg.ColoName; ProductSKU = msg.ProductSKU; ProductName = msg.ProductName; RegionExtData = msg.RegionExtData; }
/// <summary> /// Updates the access region. /// </summary> /// <param name="tableName">Name of the table.</param> /// <param name="entity">The entity.</param> public void UpdateAccessRegion(string tableName, RegionAccess entity) { if (this.storageAccount == null) { this.storageAccount = this.GetCloudStorageAccount(); } var cloudTable = this.storageAccount.CreateCloudTableClient().GetTableReference(tableName); cloudTable.Execute(TableOperation.InsertOrMerge(entity)); }
public ExperienceInfo(ExperienceInfo info) { ID = info.ID; Description = info.Description; Properties = info.Properties; Creator = new UGUI(info.Creator); Owner = new UGUI(info.Owner); Group = new UGI(info.Group); Maturity = info.Maturity; Marketplace = info.Marketplace; LogoID = info.LogoID; SlUrl = info.SlUrl; }
public void Startup(ConfigurationLoader loader) { m_Scenes = loader.Scenes; m_Loader = loader; m_GatekeeperURI = loader.GatekeeperURI; IConfig config = loader.Config.Configs[GetType().FullName]; /* we use same asset id keying here so to make them compatible with the other scripts */ foreach (string key in config.GetKeys()) { if (UUID.TryParse(key, out m_AssetID)) { m_ScriptFile = config.GetString(key); break; } } m_ObjectPermissionsBase = GetPermissions(config, "ObjectPermisionsBase"); m_ObjectPermissionsOwner = GetPermissions(config, "ObjectPermisionsOwner"); m_ObjectPermissionsGroup = GetPermissions(config, "ObjectPermisionsGroup"); m_ObjectPermissionsNext = GetPermissions(config, "ObjectPermisionsNext"); m_ObjectPermissionsEveryone = GetPermissions(config, "ObjectPermisionsEveryone"); m_ScriptPermissionsBase = GetPermissions(config, "ScriptPermisionsBase"); m_ScriptPermissionsOwner = GetPermissions(config, "ScriptPermisionsOwner"); m_ScriptPermissionsGroup = GetPermissions(config, "ScriptPermisionsGroup"); m_ScriptPermissionsNext = GetPermissions(config, "ScriptPermisionsNext"); m_ScriptPermissionsEveryone = GetPermissions(config, "ScriptPermisionsEveryone"); m_LoadOarFileName = config.GetString("OarFilename", string.Empty); m_TimeoutMs = config.GetInt("RunTimeout", 1000); m_RegionID = UUID.Parse(config.GetString("RegionID")); m_RegionOwner = new UGUIWithName(config.GetString("RegionOwner")) { IsAuthoritative = true }; m_EstateOwner = new UGUIWithName(config.GetString("EstateOwner", m_RegionOwner.ToString())) { IsAuthoritative = true }; m_EstateID = (uint)config.GetInt("EstateID", 100); m_EstateName = config.GetString("EstateName", "My Estate"); m_ObjectID = UUID.Parse(config.GetString("ID", UUID.Random.ToString())); m_RegionName = config.GetString("RegionName", "Testing Region"); m_ProductName = config.GetString("RegionProductName", "Mainland"); m_RegionLocation = new GridVector(config.GetString("RegionLocation", "10000,10000"), 256); m_RegionSize = new GridVector(config.GetString("RegionSize", "1,1"), 256); m_RegionAccess = (RegionAccess)Enum.Parse(typeof(RegionAccess), config.GetString("RegionAccess", "PG")); m_RegionPort = config.GetInt("RegionPort", 9300); m_Runner = loader.GetServicesByValue <TestRunner>()[0]; m_Position = Vector3.Parse(config.GetString("Position", "<128, 128, 23>")); m_Rotation = Quaternion.Parse(config.GetString("Rotation", "<0,0,0,1>")); m_ItemID = UUID.Parse(config.GetString("ScriptItemID", UUID.Random.ToString())); m_RezzingObjID = UUID.Parse(config.GetString("RezzingObjectID", UUID.Zero.ToString())); m_ObjectName = config.GetString("ObjectName", "Object"); m_ScriptName = config.GetString("ScriptName", "Script"); string experienceName = config.GetString("ExperienceName", "My Experience"); UUID experienceID; UUID.TryParse(config.GetString("ExperienceID", UUID.Zero.ToString()), out experienceID); m_ExperienceID = new UEI(experienceID, experienceName, null); m_ObjectDescription = config.GetString("ObjectDescription", ""); m_ScriptDescription = config.GetString("ScriptDescription", ""); m_RegionStorage = loader.GetService <GridServiceInterface>("RegionStorage"); m_SceneFactory = loader.GetService <SceneFactoryInterface>("DefaultSceneImplementation"); m_EstateService = loader.GetService <EstateServiceInterface>("EstateService"); m_AvatarNameService = loader.GetService <AvatarNameServiceInterface>("AvatarNameStorage"); m_UserAccountService = loader.GetService <UserAccountServiceInterface>("UserAccountService"); m_AvatarNameService.Store(m_RegionOwner); m_AvatarNameService.Store(m_EstateOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_RegionOwner, IsLocalToGrid = true, }); } catch { m_Log.Info("UserAccount creation failed for RegionOwner"); } if (!m_EstateOwner.EqualsGrid(m_RegionOwner)) { try { m_UserAccountService.Add(new UserAccount { Principal = m_RegionOwner, IsLocalToGrid = true, }); } catch { m_Log.Info("UserAccount creation failed for EstateOwner"); } } m_ObjectOwner = new UGUIWithName(config.GetString("ObjectOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectOwner); if (config.Contains("ObjectCreator")) { m_ObjectCreator = new UGUIWithName(config.GetString("ObjectCreator")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectCreator); try { m_UserAccountService.Add(new UserAccount { Principal = m_ObjectCreator, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ObjectCreator = m_ObjectOwner; } if (config.Contains("ObjectLastOwner")) { m_ObjectLastOwner = new UGUIWithName(config.GetString("ObjectLastOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ObjectLastOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_ObjectLastOwner, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ObjectLastOwner = m_ObjectOwner; } m_ScriptOwner = new UGUIWithName(config.GetString("ScriptOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptOwner); if (config.Contains("ScriptCreator")) { m_ScriptCreator = new UGUIWithName(config.GetString("ScriptCreator")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptCreator); try { m_UserAccountService.Add(new UserAccount { Principal = m_ScriptCreator, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ScriptCreator = m_ScriptOwner; } if (config.Contains("ScriptLastOwner")) { m_ScriptLastOwner = new UGUIWithName(config.GetString("ScriptLastOwner")) { IsAuthoritative = true }; m_AvatarNameService.Store(m_ScriptLastOwner); try { m_UserAccountService.Add(new UserAccount { Principal = m_ScriptLastOwner, IsLocalToGrid = true, }); } catch { /* intentionally ignored */ } } else { m_ScriptLastOwner = m_ScriptOwner; } m_StartParameter = config.GetInt("StartParameter", 0); if (string.IsNullOrEmpty(m_ScriptFile)) { throw new ArgumentException("Script filename and UUID missing"); } m_AdditionalObjectConfigs = config.GetString("AdditionalObjects", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (m_AdditionalObjectConfigs.Length == 1 && m_AdditionalObjectConfigs[0] == string.Empty) { m_AdditionalObjectConfigs = new string[0]; } m_AdditionalInventoryConfigs = config.GetString("AdditionalInventories", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (m_AdditionalInventoryConfigs.Length == 1 && m_AdditionalInventoryConfigs[0] == string.Empty) { m_AdditionalInventoryConfigs = new string[0]; } m_AssetSourcesConfig = config.GetString("AssetSources", string.Empty); m_ScriptStatesConfig = config.GetString("ScriptStates", string.Empty); CompilerRegistry.ScriptCompilers.DefaultCompilerName = config.GetString("DefaultCompiler"); }