Beispiel #1
0
        public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host)
        {
            // UUID should be changed to object owner.
            UUID               owner        = m_scene.RegionInfo.EstateSettings.EstateOwner;
            SEUser             securityUser = new SEUser(owner, "Name Unassigned");
            SecurityCredential creds        = new SecurityCredential(securityUser, m_scene);

            world = new World(m_scene, creds);
            host  = new Host(new SOPObject(m_scene, localID, creds), m_scene, new ExtensionHandler(m_extensions),
                             m_microthreads);
        }
Beispiel #2
0
        internal Script(string script, UUID scriptID, uint localID, IConfigSource config, Scene scene, PolicyLevel policy, ScriptAccessor scriptAccessor, bool error2Console)
        {
            m_hostSOP = scene.GetSceneObjectPart(localID);
            m_asset = m_hostSOP.Inventory.GetInventoryItem(scriptID);
            m_god = scene.UserAccountService.GetUserAccount(UUID.Zero, m_hostSOP.OwnerID);

            m_name = (m_god.Name + "." + m_hostSOP.Name + "." + m_asset.Name).Replace(" ", "");
            m_name = scriptAccessor.AddScript(this);

            m_scene = scene;
            m_config = config;
            m_policy = policy;
            m_error2Console = config.Configs["MRM"].GetBoolean("ErrorToConsole", true);
            m_scriptAccessor = scriptAccessor;
            m_errors = new ArrayList();

            SEUser securityUser = new SEUser(m_god.PrincipalID, m_god.Name, this);
            m_creds = new SecurityCredential(securityUser, m_scene);

            ScriptText = script;
        }