Class MySafeZone
Inheritance
System.Object
MySafeZone
Assembly: Sandbox.Game.dll
Syntax
[MyEntityType]
public class MySafeZone : MyEntity, IMyEntity, IMyEntity, IMyEventProxy, IMyEventOwner, IMyProjectileDetector
Constructors
MySafeZone()
Declaration
Fields
Entities
Declaration
public HashSet<long> Entities
Field Value
Type |
Description |
System.Collections.Generic.HashSet<System.Int64> |
|
Factions
Declaration
public List<MyFaction> Factions
Field Value
Type |
Description |
System.Collections.Generic.List<Sandbox.Game.World.MyFaction> |
|
m_containedEntities
Declaration
protected readonly MyConcurrentHashSet<long> m_containedEntities
Field Value
MAX_RADIUS
Declaration
public static readonly float MAX_RADIUS
Field Value
Type |
Description |
System.Single |
|
MIN_RADIUS
Declaration
public static readonly float MIN_RADIUS
Field Value
Type |
Description |
System.Single |
|
Players
Declaration
public List<long> Players
Field Value
Type |
Description |
System.Collections.Generic.List<System.Int64> |
|
Radius
Declaration
Field Value
Type |
Description |
System.Single |
|
Properties
AccessTypeFactions
Declaration
public MySafeZoneAccess AccessTypeFactions { get; set; }
Property Value
AccessTypeFloatingObjects
Declaration
public MySafeZoneAccess AccessTypeFloatingObjects { get; set; }
Property Value
AccessTypeGrids
Declaration
public MySafeZoneAccess AccessTypeGrids { get; set; }
Property Value
AccessTypePlayers
Declaration
public MySafeZoneAccess AccessTypePlayers { get; set; }
Property Value
AllowedActions
Declaration
public MySafeZoneAction AllowedActions { get; set; }
Property Value
Type |
Description |
VRage.Game.ObjectBuilders.Components.MySafeZoneAction |
|
CurrentTexture
Declaration
public MyStringHash CurrentTexture { get; }
Property Value
DetectorAABB
Declaration
public BoundingBoxD DetectorAABB { get; }
Property Value
Enabled
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
HitEntity
Declaration
public IMyEntity HitEntity { get; }
Property Value
IsDetectorEnabled
Declaration
public bool IsDetectorEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsStatic
Static safe zone is any which cannot move (for example for safe zone block).
Declaration
public bool IsStatic { get; }
Property Value
Type |
Description |
System.Boolean |
|
ModelColor
Declaration
public Color ModelColor { get; }
Property Value
SafeZoneBlockId
Entity id of the safezone block associated with the safezone. If 0 than safezone is not associated to any block.
Declaration
public long SafeZoneBlockId { get; }
Property Value
Type |
Description |
System.Int64 |
|
Shape
Declaration
public MySafeZoneShape Shape { get; set; }
Property Value
Size
Declaration
public Vector3 Size { get; set; }
Property Value
Methods
AddContainedToList()
Declaration
public void AddContainedToList()
AddShape(List<MyOrientedBoundingBoxD>, List<BoundingSphereD>)
Declaration
public void AddShape(List<MyOrientedBoundingBoxD> safeZonesObb, List<BoundingSphereD> safeZonesSpheres)
Parameters
CheckAdminIgnoreSafezones(UInt64)
Declaration
public static bool CheckAdminIgnoreSafezones(ulong id)
Parameters
Type |
Name |
Description |
System.UInt64 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
Closing()
Declaration
protected override void Closing()
Overrides
Contains(BoundingBoxD)
Declaration
public bool Contains(BoundingBoxD aabb)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Contains(BoundingSphereD, ContainmentType)
Declaration
public bool Contains(BoundingSphereD boundingSphere, ContainmentType containmentType)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Contains(Vector3D)
Declaration
public bool Contains(Vector3D point)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetDetectorIntersectionWithLine(ref LineD, out Nullable<Vector3D>)
Declaration
public bool GetDetectorIntersectionWithLine(ref LineD line, out Nullable<Vector3D> hit)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetIntersectionWithLine(ref LineD, out Nullable<Vector3D>, Boolean, IntersectionFlags)
Declaration
public override bool GetIntersectionWithLine(ref LineD line, out Nullable<Vector3D> v, bool useCollisionModel = true, IntersectionFlags flags)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
GetObjectBuilder(Boolean)
Declaration
public override MyObjectBuilder_EntityBase GetObjectBuilder(bool copy = false)
Parameters
Type |
Name |
Description |
System.Boolean |
copy |
|
Returns
Overrides
Init(MyObjectBuilder_EntityBase)
Declaration
public override void Init(MyObjectBuilder_EntityBase objectBuilder)
Parameters
Overrides
IsActionAllowed(MyEntity, MySafeZoneAction, Int64)
Declaration
public bool IsActionAllowed(MyEntity entity, MySafeZoneAction action, long sourceEntityId = 0L)
Parameters
Type |
Name |
Description |
MyEntity |
entity |
|
VRage.Game.ObjectBuilders.Components.MySafeZoneAction |
action |
|
System.Int64 |
sourceEntityId |
|
Returns
Type |
Description |
System.Boolean |
|
IsActionAllowed(MySafeZoneAction, Int64, Nullable<BoundingBoxD>, Nullable<BoundingSphereD>, Nullable<Vector3D>)
Declaration
public bool IsActionAllowed(MySafeZoneAction action, long sourceEntityId, Nullable<BoundingBoxD> aabb = null, Nullable<BoundingSphereD> boundingSphere = null, Nullable<Vector3D> point = null)
Parameters
Type |
Name |
Description |
VRage.Game.ObjectBuilders.Components.MySafeZoneAction |
action |
|
System.Int64 |
sourceEntityId |
|
System.Nullable<BoundingBoxD> |
aabb |
|
System.Nullable<BoundingSphereD> |
boundingSphere |
|
System.Nullable<Vector3D> |
point |
|
Returns
Type |
Description |
System.Boolean |
|
IsEmpty()
Declaration
Returns
Type |
Description |
System.Boolean |
|
IsEntityInsideAlone(Int64)
Declaration
public bool IsEntityInsideAlone(long entityId)
Parameters
Type |
Name |
Description |
System.Int64 |
entityId |
|
Returns
Type |
Description |
System.Boolean |
|
OnAddedToScene(Object)
Declaration
public override void OnAddedToScene(object source)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
Overrides
OnRemovedFromScene(Object)
Declaration
public override void OnRemovedFromScene(object source)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
Overrides
RecreatePhysics(Boolean, Boolean)
When physics are recreated (shape / size), this should be triggered so entities would be re-added
Declaration
public void RecreatePhysics(bool insertEntities = true, bool triggerNotification = true)
Parameters
Type |
Name |
Description |
System.Boolean |
insertEntities |
Should be true
|
System.Boolean |
triggerNotification |
Does nothing, kept for Mods
|
RefreshGraphics()
Declaration
public void RefreshGraphics()
UpdateBeforeSimulation()
Declaration
public override void UpdateBeforeSimulation()
Overrides
UpdateOnceBeforeFrame()
Declaration
public override void UpdateOnceBeforeFrame()
Overrides
Implements
Extension Methods