本文整理汇总了C#中Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的典型用法代码示例。如果您正苦于以下问题:C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的具体用法?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString怎么用?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类属于命名空间,在下文中一共展示了Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: aaQueryDatabase
public LSL_List aaQueryDatabase(LSL_String key, LSL_String token)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AAQueryDatabase", m_host, "AA", m_itemID))
return new LSL_List();
List<string> query = AssetConnector.FindLSLData(token.m_string, key.m_string);
LSL_List list = new LSL_List(query.ToArray());
return list;
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:9,代码来源:AA_API.cs
示例2: osEjectFromGroup
/// <summary>
/// Eject user from the group this object is set to
/// </summary>
/// <param name="agentId"></param>
/// <returns></returns>
public LSL_Integer osEjectFromGroup(LSL_Key agentId)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.VeryLow, "osInviteToGroup", m_host, "OSSL", m_itemID))
return new LSL_Integer();
UUID agent = new UUID((string) agentId);
// groups module is required
IGroupsModule groupsModule = World.RequestModuleInterface<IGroupsModule>();
if (groupsModule == null) return ScriptBaseClass.FALSE;
// object has to be set to a group, but not group owned
if (m_host.GroupID == UUID.Zero || m_host.GroupID == m_host.OwnerID) return ScriptBaseClass.FALSE;
// object owner has to be in that group and required permissions
GroupMembershipData member = groupsModule.GetMembershipData(m_host.GroupID, m_host.OwnerID);
if (member == null || (member.GroupPowers & (ulong) GroupPowers.Eject) == 0) return ScriptBaseClass.FALSE;
// agent has to be in that group
//member = groupsModule.GetMembershipData(agent, m_host.GroupID, agent);
//if (member == null) return ScriptBaseClass.FALSE;
// ejectee can be offline
groupsModule.EjectGroupMember(null, m_host.OwnerID, m_host.GroupID, agent);
return ScriptBaseClass.TRUE;
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:25,代码来源:OSSL_Api.cs
示例3: AADeserializeXMLValues
public LSL_List AADeserializeXMLValues(LSL_String xmlFile)
{
return m_AA_Functions.AADeserializeXMLValues(xmlFile);
}
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:AA_Stub.cs
示例4: AAUpdateDatabase
public void AAUpdateDatabase(LSL_String key, LSL_String value, LSL_String token)
{
m_AA_Functions.AAUpdateDatabase(key, value, token);
}
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:AA_Stub.cs
示例5: aaSetEnv
public void aaSetEnv(LSL_String name, LSL_List value)
{
if (name == ScriptBaseClass.ENABLE_GRAVITY)
{
LSL_Integer enabled = value.GetLSLIntegerItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(enabled == 1, grav[0], grav[1], grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_X)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, (float) f.value, grav[1], grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_Y)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, grav[0], (float) f.value, grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_Z)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, grav[0], grav[1], (float) f.value);
}
else if (name == ScriptBaseClass.ADD_GRAVITY_POINT)
{
LSL_Vector pos = value.GetVector3Item(0);
LSL_Float gravForce = value.GetLSLFloatItem(1);
LSL_Float radius = value.GetLSLFloatItem(2);
LSL_Integer ident = value.GetLSLIntegerItem(3);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.AddGravityPoint(false,
new Vector3((float) pos.x, (float) pos.y,
(float) pos.z),
0, 0, 0, (float) gravForce.value,
(float) radius.value, ident.value);
}
else if (name == ScriptBaseClass.ADD_GRAVITY_FORCE)
{
LSL_Vector pos = value.GetVector3Item(0);
LSL_Float xForce = value.GetLSLFloatItem(1);
LSL_Float yForce = value.GetLSLFloatItem(2);
LSL_Float zForce = value.GetLSLFloatItem(3);
LSL_Float radius = value.GetLSLFloatItem(4);
LSL_Integer ident = value.GetLSLIntegerItem(5);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.AddGravityPoint(true,
new Vector3((float) pos.x, (float) pos.y,
(float) pos.z),
(float) xForce, (float) yForce, (float) zForce, 0,
(float) radius.value, ident.value);
}
else if (name == ScriptBaseClass.START_TIME_REVERSAL_SAVING)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StartSavingPhysicsTimeReversalStates();
}
else if (name == ScriptBaseClass.STOP_TIME_REVERSAL_SAVING)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StopSavingPhysicsTimeReversalStates();
}
else if (name == ScriptBaseClass.START_TIME_REVERSAL)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StartPhysicsTimeReversal();
}
else if (name == ScriptBaseClass.STOP_TIME_REVERSAL)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StopPhysicsTimeReversal();
}
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:79,代码来源:AA_API.cs
示例6: aaGetHealth
public LSL_Float aaGetHealth(LSL_Key uuid)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "AAGetHealth", m_host, "AA", m_itemID))
return new LSL_Float();
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence cp = SP.RequestModuleInterface<ICombatPresence>();
return new LSL_Float(cp.Health);
}
}
return new LSL_Float(-1);
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:16,代码来源:AA_API.cs
示例7: aaGetTeamMembers
public LSL_List aaGetTeamMembers(LSL_String team)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAGetTeamMembers", m_host, "AA", m_itemID))
return new LSL_List();
List<UUID> Members = new List<UUID>();
ICombatModule module = World.RequestModuleInterface<ICombatModule>();
if (module != null)
{
Members = module.GetTeammates(team);
}
LSL_List members = new LSL_List();
foreach (UUID member in Members)
members.Add(new LSL_Key(member.ToString()));
return members;
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:15,代码来源:AA_API.cs
示例8: AADeserializeXMLKeys
public LSL_List AADeserializeXMLKeys(LSL_String xmlFile)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AADeserializeXMLKeys", m_host, "AA");
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlFile.m_string);
XmlNodeList children = doc.ChildNodes;
LSL_List keys = new LSL_Types.list();
foreach (XmlNode node in children)
{
keys.Add(node.Name);
}
return keys;
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:13,代码来源:AA_API.cs
示例9: AAJoinCombatTeam
public void AAJoinCombatTeam(LSL_String team)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAJoinCombatTeam", m_host, "AA");
ScenePresence SP = World.GetScenePresence(m_host.OwnerID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
if (team.m_string == "No Team")
{
SP.ControllingClient.SendAlertMessage("You cannot join this team.");
return;
}
CP.Team = team.m_string;
}
}
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:18,代码来源:AA_API.cs
示例10: llRequestDisplayName
public LSL_Key llRequestDisplayName(LSL_Key uuid)
{
UUID userID = UUID.Zero;
if (!UUID.TryParse(uuid, out userID))
{
// => complain loudly, as specified by the LSL docs
ShoutError("Failed to parse uuid for avatar.");
return (LSL_Key)UUID.Zero.ToString();
}
DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());
Util.FireAndForget(delegate(object o)
{
string name = "";
IProfileConnector connector = Aurora.DataManager.DataManager.RequestPlugin<IProfileConnector>();
if (connector != null)
{
IUserProfileInfo info = connector.GetUserProfile(userID);
if (info != null)
name = info.DisplayName;
}
dataserverPlugin.AddReply(uuid.ToString(),
name, 100);
});
ScriptSleep(100);
return (LSL_Key)tid.ToString();
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:32,代码来源:LSL_Api.cs
示例11: llGetEnv
public LSL_String llGetEnv(LSL_String name)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL");
if (name == "sim_channel")
return "Aurora-Sim Server";
else if (name == "sim_version")
return World.RequestModuleInterface<ISimulationBase>().Version;
return "";
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:10,代码来源:LSL_Api.cs
示例12: llRequestUsername
public LSL_Key llRequestUsername(LSL_Key uuid)
{
UUID userID = UUID.Zero;
if (!UUID.TryParse(uuid, out userID))
{
// => complain loudly, as specified by the LSL docs
ShoutError("Failed to parse uuid for avatar.");
return (LSL_Key)UUID.Zero.ToString();
}
DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());
Util.FireAndForget(delegate(object o)
{
string name = "";
UserAccount info = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, userID);
if (info != null)
name = info.Name;
dataserverPlugin.AddReply(uuid.ToString(),
name, 100);
});
ScriptSleep(100);
return (LSL_Key)tid.ToString();
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:28,代码来源:LSL_Api.cs
示例13: llRegionSayTo
public void llRegionSayTo (LSL_Key toID, int channelID, string text)
{
ScriptProtection.CheckThreatLevel (ThreatLevel.None, "LSL", m_host, "LSL");
IChatModule chatModule = World.RequestModuleInterface<IChatModule> ();
if (text.Length > 1023)
text = text.Substring (0, 1023);
if (channelID == 0)
{
IScenePresence presence = World.GetScenePresence (UUID.Parse (toID.m_string));
if (presence != null)
{
if (chatModule != null)
chatModule.TrySendChatMessage (presence, m_host.AbsolutePosition, m_host.AbsolutePosition,
m_host.UUID, m_host.Name, ChatTypeEnum.Say, text, ChatSourceType.Object, 10000);
}
}
if (m_comms != null)
m_comms.DeliverMessage (ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, UUID.Parse (toID.m_string), text);
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:22,代码来源:LSL_Api.cs
示例14: osGetPrimitiveParams
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams", m_host, "OSSL", m_itemID))
return new LSL_List();
InitLSL();
return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:8,代码来源:OSSL_Api.cs
示例15: aaJoinCombatTeam
public void aaJoinCombatTeam(LSL_Key uuid, LSL_String team)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAJoinCombatTeam", m_host, "AA", m_itemID)) return;
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
if (team.m_string == "No Team")
{
SP.ControllingClient.SendAlertMessage("You cannot join this team.");
return;
}
CP.Team = team.m_string;
}
}
}
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:22,代码来源:AA_API.cs
示例16: AAGetLastOwner
public LSL_String AAGetLastOwner(LSL_String PrimID)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.None, "AAGetLastOwner", m_host, "AA");
SceneObjectPart part = m_host.ParentGroup.Scene.GetSceneObjectPart(UUID.Parse(PrimID.m_string));
if (part != null)
return new LSL_String(part.LastOwnerID.ToString());
else
return ScriptBaseClass.NULL_KEY;
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:9,代码来源:AA_API.cs
示例17: aaJoinCombat
public void aaJoinCombat(LSL_Key uuid)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAJoinCombat", m_host, "AA", m_itemID)) return;
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
CP.JoinCombat();
}
}
}
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:17,代码来源:AA_API.cs
示例18: llHTTPResponse
public void llHTTPResponse(LSL_Key id, int status, string body)
{
// Partial implementation: support for parameter flags needed
// see http://wiki.secondlife.com/wiki/llHTTPResponse
ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL");
if (m_UrlModule != null)
m_UrlModule.HttpResponse(new UUID(id), status,body);
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:11,代码来源:LSL_Api.cs
示例19: aaGetTeam
public LSL_String aaGetTeam(LSL_Key uuid)
{
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAGetTeam", m_host, "AA", m_itemID))
return new LSL_String();
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
return CP.Team;
}
}
}
return "No Team";
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:19,代码来源:AA_API.cs
示例20: SetPrimitiveParamsEx
public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams", m_host, "OSSL");
SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
if (obj == null)
return;
if (obj.OwnerID != m_host.OwnerID)
return;
SetPrimParams(obj, rules);
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:12,代码来源:LSL_Api.cs
注:本文中的Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论