Show / Hide Table of Contents

Class MySafeZone

Inheritance
System.Object
MyEntity
MySafeZone
Implements
IMyEntity
IMyEntity
IMyProjectileDetector
Inherited Members
MyEntity.m_contactPoint
MyEntity.DefinitionId
MyEntity.DebugAsyncLoading
MyEntity.m_hudParams
MyEntity.m_positionResetFromServer
MyEntity.m_modelCollision
MyEntity.GamePruningProxyId
MyEntity.TopMostPruningProxyId
MyEntity.StaticForPruningStructure
MyEntity.TargetPruningProxyId
MyEntity.IsPreviewChanged
MyEntity.ReadyForReplicationAction
MyEntity.PropagateSubpartRotationThroughHieerarchy
MyEntity.ReplicationStarted
MyEntity.ReplicationEnded
MyEntity.OnEntityCloseRequest
MyEntity.InstantiateSubpartOverrideFunc
MyEntity.AddToGamePruningStructureExtCallBack
MyEntity.RemoveFromGamePruningStructureExtCallBack
MyEntity.UpdateGamePruningStructureExtCallBack
MyEntity.MyEntityFactoryCreateObjectBuilderExtCallback
MyEntity.CreateDefaultSyncEntityExtCallback
MyEntity.MyWeldingGroupsAddNodeExtCallback
MyEntity.MyWeldingGroupsRemoveNodeExtCallback
MyEntity.MyWeldingGroupsGetGroupNodesExtCallback
MyEntity.MyWeldingGroupsGroupExistsExtCallback
MyEntity.MyProceduralWorldGeneratorTrackEntityExtCallback
MyEntity.CreateStandardRenderComponentsExtCallback
MyEntity.InitComponentsExtCallback
MyEntity.MyEntitiesCreateFromObjectBuilderExtCallback
MyEntity.DebugDraw()
MyEntity.DebugDrawInvalidTriangles()
MyEntity.AddDebugRenderComponent(MyDebugRenderComponentBase)
MyEntity.ContainsDebugRenderComponent(Type)
MyEntity.TryGetDebugRenderComponent<T>(T)
MyEntity.RemoveDebugRenderComponent(Type)
MyEntity.RemoveDebugRenderComponent(MyDebugRenderComponentBase)
MyEntity.ClearDebugRenderComponents()
MyEntity.GetTopMostParent(Type)
MyEntity.GetHudParams(Boolean)
MyEntity.CanBeAddedToRender()
MyEntity.InitComponents()
MyEntity.InitComponentsForTesting()
MyEntity.Components_ComponentAdded(Type, IMyEntityComponentBase)
MyEntity.Components_ComponentRemoved(Type, IMyEntityComponentBase)
MyEntity.OnCreateSync()
MyEntity.CreateSync()
MyEntity.GetSubpart(String)
MyEntity.TryGetSubpart(String, MyEntitySubpart)
MyEntity.Simulate()
MyEntity.UpdateAfterSimulation()
MyEntity.UpdatingStopped()
MyEntity.UpdateBeforeSimulation10()
MyEntity.UpdateAfterSimulation10()
MyEntity.UpdateBeforeSimulation100()
MyEntity.UpdateAfterSimulation100()
MyEntity.GetFriendlyName()
MyEntity.GetViewMatrix()
MyEntity.Teleport(MatrixD, Object, Boolean)
MyEntity.DebugDrawPhysics()
MyEntity.GetIntersectionWithLine(LineD, Nullable<MyIntersectionResultLineTriangleEx>, IntersectionFlags)
MyEntity.GetIntersectionWithLineAndBoundingSphere(LineD, Single)
MyEntity.GetIntersectionWithSphere(BoundingSphereD)
MyEntity.GetIntersectionWithAABB(BoundingBoxD)
MyEntity.GetTrianglesIntersectingSphere(BoundingSphere, Nullable<Vector3>, Nullable<Single>, List<MyTriangle_Vertex_Normals>, Int32)
MyEntity.DoOverlapSphereTest(Single, Vector3D)
MyEntity.GetSmallestDistanceBetweenCameraAndBoundingSphere()
MyEntity.GetLargestDistanceBetweenCameraAndBoundingSphere()
MyEntity.GetDistanceBetweenCameraAndBoundingSphere()
MyEntity.GetDistanceBetweenPlayerPositionAndBoundingSphere()
MyEntity.GetDistanceBetweenCameraAndPosition()
MyEntity.GetBaseEntity()
MyEntity.OnReplicationStarted()
MyEntity.OnReplicationEnded()
MyEntity.SetFadeOut(Boolean)
MyEntity.AddToGamePruningStructure()
MyEntity.RemoveFromGamePruningStructure()
MyEntity.UpdateGamePruningStructure()
MyEntity.RaisePhysicsChanged()
MyEntity.BeforeGameLogicInit()
MyEntity.ClampToWorld()
MyEntity.Init(StringBuilder, String, MyEntity, Nullable<Single>, String)
MyEntity.RefreshModels(String, String)
MyEntity.Delete()
MyEntity.BeforeDelete()
MyEntity.Close()
MyEntity.BeforeSave()
MyEntity.PrepareForDraw()
MyEntity.BeforePaste()
MyEntity.AfterPaste()
MyEntity.SetEmissiveParts(String, Color, Single)
MyEntity.SetEmissivePartsForSubparts(String, Color, Single)
MyEntity.UpdateNamedEmissiveParts(UInt32, String, Color, Single)
MyEntity.InstantiateSubpart(MyModelDummy, MyEntitySubpart.Data)
MyEntity.GetCubeBlockParent(MyEntity)
MyEntity.ToString()
MyEntity.GetInventoryBase(Int32)
MyEntity.GetInventoryBase()
MyEntity.OnInventoryComponentAdded(MyInventoryBase)
MyEntity.OnInventoryComponentRemoved(MyInventoryBase)
MyEntity.SerializeControls(BitStream)
MyEntity.DeserializeControls(BitStream, Boolean)
MyEntity.ApplyLastControls()
MyEntity.ResetControls()
MyEntity.Pin()
MyEntity.Unpin()
MyEntity.UpdateSoundContactPoint(Int64, Vector3, Vector3, Vector3, Single)
MyEntity.IMyEntity.GetTopMostParent(Type)
MyEntity.IMyEntity.GetChildren(List<IMyEntity>, Func<IMyEntity, Boolean>)
MyEntity.IMyEntity.GetFriendlyName()
MyEntity.IMyEntity.Close()
MyEntity.IMyEntity.Delete()
MyEntity.IMyEntity.GetDiffuseColor()
MyEntity.IMyEntity.GetDistanceBetweenCameraAndBoundingSphere()
MyEntity.IMyEntity.GetDistanceBetweenCameraAndPosition()
MyEntity.IMyEntity.GetLargestDistanceBetweenCameraAndBoundingSphere()
MyEntity.IMyEntity.GetSmallestDistanceBetweenCameraAndBoundingSphere()
MyEntity.IMyEntity.GetIntersectionWithLineAndBoundingSphere(LineD, Single)
MyEntity.IMyEntity.GetIntersectionWithSphere(BoundingSphereD)
MyEntity.IMyEntity.GetInventory()
MyEntity.IMyEntity.GetInventory(Int32)
MyEntity.IMyEntity.GetTrianglesIntersectingSphere(BoundingSphere, Nullable<Vector3>, Nullable<Single>, List<MyTriangle_Vertex_Normals>, Int32)
MyEntity.IMyEntity.DoOverlapSphereTest(Single, Vector3D)
MyEntity.IMyEntity.GetObjectBuilder(Boolean)
MyEntity.IMyEntity.IsVisible()
MyEntity.IMyEntity.GetViewMatrix()
MyEntity.IMyEntity.GetWorldMatrixNormalizedInv()
MyEntity.IMyEntity.SetLocalMatrix(Matrix, Object)
MyEntity.IMyEntity.SetWorldMatrix(MatrixD, Object)
MyEntity.IMyEntity.SetPosition(Vector3D)
MyEntity.IMyEntity.EnableColorMaskForSubparts(Boolean)
MyEntity.IMyEntity.SetColorMaskForSubparts(Vector3)
MyEntity.IMyEntity.SetTextureChangesForSubparts(Dictionary<String, MyTextureChange>)
MyEntity.IMyEntity.SetTextureChangesForSubparts(Dictionary<MyStringId, MyTextureChange>)
MyEntity.IMyEntity.SetEmissiveParts(String, Color, Single)
MyEntity.IMyEntity.SetEmissivePartsForSubparts(String, Color, Single)
MyEntity.IMyEntity.GetInventory()
MyEntity.IMyEntity.GetInventory(Int32)
MyEntity.IMyEntity.GetPosition()
MyEntity.Components
MyEntity.Name
MyEntity.PositionComp
MyEntity.Render
MyEntity.GameLogic
MyEntity.EntityId
MyEntity.SyncObject
MyEntity.Storage
MyEntity.EntityStorage
MyEntity.Closed
MyEntity.MarkedForClose
MyEntity.MaxGlassDistSq
MyEntity.Save
MyEntity.IsPreview
MyEntity.IsReadyForReplication
MyEntity.NeedsUpdate
MyEntity.WorldMatrix
MyEntity.Parent
MyEntity.Hierarchy
MyEntity.IMyEntity.Hierarchy
MyEntity.IMyEntity.Physics
MyEntity.Physics
MyEntity.InvalidateOnMove
MyEntity.SyncFlag
MyEntity.NeedsWorldMatrix
MyEntity.InScene
MyEntity.IsVolumetric
MyEntity.LocationForHudMarker
MyEntity.Model
MyEntity.ModelCollision
MyEntity.DisplayName
MyEntity.DebugName
MyEntity.Subparts
MyEntity.IsCCDForProjectiles
MyEntity.Pinned
MyEntity.UpdateDuration
MyEntity.IsReplicated
MyEntity.InventoryCount
MyEntity.HasInventory
MyEntity.DisplayNameText
MyEntity.LastSnapshotFlags
MyEntity.Flags
MyEntity.IMyEntity.Parent
MyEntity.IMyEntity.Name
MyEntity.IMyEntity.DebugAsyncLoading
MyEntity.IMyEntity.DisplayName
MyEntity.IMyEntity.MarkedForClose
MyEntity.IMyEntity.Closed
MyEntity.IMyEntity.Model
MyEntity.IMyEntity.GameLogic
MyEntity.IMyEntity.NeedsUpdate
MyEntity.IMyEntity.NearFlag
MyEntity.IMyEntity.CastShadows
MyEntity.IMyEntity.FastCastShadowResolve
MyEntity.IMyEntity.NeedsResolveCastShadow
MyEntity.IMyEntity.MaxGlassDistSq
MyEntity.IMyEntity.NeedsDraw
MyEntity.IMyEntity.NeedsDrawFromParent
MyEntity.IMyEntity.Transparent
MyEntity.IMyEntity.ShadowBoxLod
MyEntity.IMyEntity.SkipIfTooSmall
MyEntity.IMyEntity.Storage
MyEntity.IMyEntity.Visible
MyEntity.IMyEntity.Save
MyEntity.IMyEntity.PersistentFlags
MyEntity.IMyEntity.InScene
MyEntity.IMyEntity.InvalidateOnMove
MyEntity.IMyEntity.IsCCDForProjectiles
MyEntity.IMyEntity.IsVolumetric
MyEntity.IMyEntity.LocalAABB
MyEntity.IMyEntity.LocalAABBHr
MyEntity.IMyEntity.LocalMatrix
MyEntity.IMyEntity.LocalVolume
MyEntity.IMyEntity.LocalVolumeOffset
MyEntity.IMyEntity.LocationForHudMarker
MyEntity.IMyEntity.Synchronized
MyEntity.IMyEntity.WorldMatrix
MyEntity.IMyEntity.WorldMatrixInvScaled
MyEntity.IMyEntity.WorldMatrixNormalizedInv
MyEntity.IMyEntity.ModelCollision
MyEntity.IMyEntity.HasInventory
MyEntity.IMyEntity.InventoryCount
MyEntity.IMyEntity.DisplayName
MyEntity.IMyEntity.Name
MyEntity.IMyEntity.WorldAABB
MyEntity.IMyEntity.WorldAABBHr
MyEntity.IMyEntity.WorldMatrix
MyEntity.IMyEntity.WorldVolume
MyEntity.IMyEntity.WorldVolumeHr
MyEntity.StopPhysicsActivation
MyEntity.OnMarkForClose
MyEntity.OnClose
MyEntity.OnClosing
MyEntity.OnModelRefresh
MyEntity.OnUpdateOnceBeforeNextFrame
MyEntity.OnDebugDraw
MyEntity.OnPhysicsChanged
MyEntity.OnPhysicsComponentChanged
MyEntity.AddedToScene
MyEntity.RemovedFromScene
MyEntity.OnTeleported
MyEntity.IMyEntity.OnClose
MyEntity.IMyEntity.OnClosing
MyEntity.IMyEntity.OnMarkForClose
MyEntity.IMyEntity.OnPhysicsChanged
Namespace: Sandbox.Game.Entities
Assembly: Sandbox.Game.dll
Syntax
[MyEntityType]
public class MySafeZone : MyEntity, IMyEntity, IMyEntity, IMyEventProxy, IMyEventOwner, IMyProjectileDetector

Constructors

MySafeZone()

Declaration
public MySafeZone()

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
Type Description
MyConcurrentHashSet<System.Int64>

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
public float Radius
Field Value
Type Description
System.Single

Properties

AccessTypeFactions

Declaration
public MySafeZoneAccess AccessTypeFactions { get; set; }
Property Value
Type Description
MySafeZoneAccess

AccessTypeFloatingObjects

Declaration
public MySafeZoneAccess AccessTypeFloatingObjects { get; set; }
Property Value
Type Description
MySafeZoneAccess

AccessTypeGrids

Declaration
public MySafeZoneAccess AccessTypeGrids { get; set; }
Property Value
Type Description
MySafeZoneAccess

AccessTypePlayers

Declaration
public MySafeZoneAccess AccessTypePlayers { get; set; }
Property Value
Type Description
MySafeZoneAccess

AllowedActions

Declaration
public MySafeZoneAction AllowedActions { get; set; }
Property Value
Type Description
VRage.Game.ObjectBuilders.Components.MySafeZoneAction

CurrentTexture

Declaration
public MyStringHash CurrentTexture { get; }
Property Value
Type Description
MyStringHash

DetectorAABB

Declaration
public BoundingBoxD DetectorAABB { get; }
Property Value
Type Description
BoundingBoxD

Enabled

Declaration
public bool Enabled { get; set; }
Property Value
Type Description
System.Boolean

HitEntity

Declaration
public IMyEntity HitEntity { get; }
Property Value
Type Description
IMyEntity

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
Type Description
Color

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
Type Description
MySafeZoneShape

Size

Declaration
public Vector3 Size { get; set; }
Property Value
Type Description
Vector3

Methods

AddContainedToList()

Declaration
public void AddContainedToList()

AddShape(List<MyOrientedBoundingBoxD>, List<BoundingSphereD>)

Declaration
public void AddShape(List<MyOrientedBoundingBoxD> safeZonesObb, List<BoundingSphereD> safeZonesSpheres)
Parameters
Type Name Description
System.Collections.Generic.List<MyOrientedBoundingBoxD> safeZonesObb
System.Collections.Generic.List<BoundingSphereD> safeZonesSpheres

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
MyEntity.Closing()

Contains(BoundingBoxD)

Declaration
public bool Contains(BoundingBoxD aabb)
Parameters
Type Name Description
BoundingBoxD aabb
Returns
Type Description
System.Boolean

Contains(BoundingSphereD, ContainmentType)

Declaration
public bool Contains(BoundingSphereD boundingSphere, ContainmentType containmentType)
Parameters
Type Name Description
BoundingSphereD boundingSphere
ContainmentType containmentType
Returns
Type Description
System.Boolean

Contains(Vector3D)

Declaration
public bool Contains(Vector3D point)
Parameters
Type Name Description
Vector3D point
Returns
Type Description
System.Boolean

GetDetectorIntersectionWithLine(ref LineD, out Nullable<Vector3D>)

Declaration
public bool GetDetectorIntersectionWithLine(ref LineD line, out Nullable<Vector3D> hit)
Parameters
Type Name Description
LineD line
System.Nullable<Vector3D> hit
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
Type Name Description
LineD line
System.Nullable<Vector3D> v
System.Boolean useCollisionModel
IntersectionFlags flags
Returns
Type Description
System.Boolean
Overrides
MyEntity.GetIntersectionWithLine(ref LineD, out Nullable<Vector3D>, Boolean, IntersectionFlags)

GetObjectBuilder(Boolean)

Declaration
public override MyObjectBuilder_EntityBase GetObjectBuilder(bool copy = false)
Parameters
Type Name Description
System.Boolean copy
Returns
Type Description
MyObjectBuilder_EntityBase
Overrides
MyEntity.GetObjectBuilder(Boolean)

Init(MyObjectBuilder_EntityBase)

Declaration
public override void Init(MyObjectBuilder_EntityBase objectBuilder)
Parameters
Type Name Description
MyObjectBuilder_EntityBase objectBuilder
Overrides
MyEntity.Init(MyObjectBuilder_EntityBase)

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
public bool IsEmpty()
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
MyEntity.OnAddedToScene(Object)

OnRemovedFromScene(Object)

Declaration
public override void OnRemovedFromScene(object source)
Parameters
Type Name Description
System.Object source
Overrides
MyEntity.OnRemovedFromScene(Object)

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
MyEntity.UpdateBeforeSimulation()

UpdateOnceBeforeFrame()

Declaration
public override void UpdateOnceBeforeFrame()
Overrides
MyEntity.UpdateOnceBeforeFrame()

Implements

IMyEntity
IMyEntity
IMyProjectileDetector

Extension Methods

MyEntityInventoryOwnerExtensions.InventoryOwnerType(MyEntity)
MyEntityExtensions.GetPhysicsBody(MyEntity)
MyEntityExtensions.UpdateGamePruningStructure(MyEntity)
MyEntityExtensions.AddToGamePruningStructure(MyEntity)
MyEntityExtensions.RemoveFromGamePruningStructure(MyEntity)
MyEntityExtensions.EntityFactoryCreateObjectBuilder(MyEntity)
MyEntityExtensions.CreateDefaultSyncEntity(MyEntity)
MyEntityExtensions.AddNodeToWeldingGroups(MyEntity)
MyEntityExtensions.RemoveNodeFromWeldingGroups(MyEntity)
MyEntityExtensions.GetWeldingGroupNodes(MyEntity, List<MyEntity>)
MyEntityExtensions.WeldingGroupExists(MyEntity)
MyEntityExtensions.ProceduralWorldGeneratorTrackEntity(MyEntity)
MyEntityExtensions.TryGetInventory(MyEntity, out MyInventoryBase)
MyEntityExtensions.TryGetInventory(MyEntity, out MyInventory)
MyEntityExtensions.GetInventory(MyEntity, Int32)
MyEntityContainerEventExtensions.RaiseEntityEvent(MyEntity, MyStringHash, MyEntityContainerEventExtensions.EntityEventParams)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾