Show / Hide Table of Contents

Interface IMyStoreBlock

Describes store block (mods interface)

Inherited Members
IMyFunctionalBlock.GetFramesFromLastTrigger()
IMyFunctionalBlock.IsUpdateTimerCreated
IMyFunctionalBlock.IsUpdateTimerEnabled
IMyFunctionalBlock.EnabledChanged
IMyFunctionalBlock.UpdateTimerTriggered
IMyTerminalBlock.RefreshCustomInfo()
IMyTerminalBlock.SetDetailedInfoDirty()
IMyTerminalBlock.GetDetailedInfo()
IMyTerminalBlock.ClearDetailedInfo()
IMyTerminalBlock.IsInSameLogicalGroupAs(IMyTerminalBlock)
IMyTerminalBlock.IsSameConstructAs(IMyTerminalBlock)
IMyTerminalBlock.IsDetailedInfoDirty
IMyTerminalBlock.CustomDataChanged
IMyTerminalBlock.CustomNameChanged
IMyTerminalBlock.OwnershipChanged
IMyTerminalBlock.PropertiesChanged
IMyTerminalBlock.ShowOnHUDChanged
IMyTerminalBlock.VisibilityChanged
IMyTerminalBlock.AppendingCustomInfo
IMyCubeBlock.CalcLocalMatrix(Matrix, String)
IMyCubeBlock.CalculateCurrentModel(Matrix)
IMyCubeBlock.GetObjectBuilderCubeBlock(Boolean)
IMyCubeBlock.Init()
IMyCubeBlock.Init(MyObjectBuilder_CubeBlock, IMyCubeGrid)
IMyCubeBlock.OnBuildSuccess(Int64)
IMyCubeBlock.OnBuildSuccess(Int64, Boolean)
IMyCubeBlock.OnDestroy()
IMyCubeBlock.OnModelChange()
IMyCubeBlock.OnRegisteredToGridSystems()
IMyCubeBlock.OnRemovedByCubeBuilder()
IMyCubeBlock.OnUnregisteredFromGridSystems()
IMyCubeBlock.RaycastDetectors(Vector3D, Vector3D)
IMyCubeBlock.ReloadDetectors(Boolean)
IMyCubeBlock.SetDamageEffect(Boolean)
IMyCubeBlock.SetEffect(String, Boolean)
IMyCubeBlock.SetEffect(String, Single, Boolean, Boolean, Boolean)
IMyCubeBlock.RemoveEffect(String, Int32)
IMyCubeBlock.AddUpgradeValue(String, Single)
IMyCubeBlock.CubeGrid
IMyCubeBlock.ResourceSink
IMyCubeBlock.UpgradeValues
IMyCubeBlock.SlimBlock
IMyCubeBlock.CheckConnectionAllowed
IMyCubeBlock.IsWorkingChanged
IMyCubeBlock.OnUpgradeValuesChanged
IMyCubeBlock.CubeGridChanged
IMyEntity.GetFriendlyName()
IMyEntity.Close()
IMyEntity.Delete()
IMyEntity.GetObjectBuilder(Boolean)
IMyEntity.BeforeSave()
IMyEntity.GetTopMostParent(Type)
IMyEntity.SetLocalMatrix(Matrix, Object)
IMyEntity.GetChildren(List<IMyEntity>, Func<IMyEntity, Boolean>)
IMyEntity.GetSubpart(String)
IMyEntity.TryGetSubpart(String, MyEntitySubpart)
IMyEntity.GetDiffuseColor()
IMyEntity.IsVisible()
IMyEntity.DebugDraw()
IMyEntity.DebugDrawInvalidTriangles()
IMyEntity.EnableColorMaskForSubparts(Boolean)
IMyEntity.SetColorMaskForSubparts(Vector3)
IMyEntity.SetTextureChangesForSubparts(Dictionary<MyStringId, MyTextureChange>)
IMyEntity.SetTextureChangesForSubparts(Dictionary<String, MyTextureChange>)
IMyEntity.SetEmissiveParts(String, Color, Single)
IMyEntity.SetEmissivePartsForSubparts(String, Color, Single)
IMyEntity.GetDistanceBetweenCameraAndBoundingSphere()
IMyEntity.GetDistanceBetweenCameraAndPosition()
IMyEntity.GetLargestDistanceBetweenCameraAndBoundingSphere()
IMyEntity.GetSmallestDistanceBetweenCameraAndBoundingSphere()
IMyEntity.OnRemovedFromScene(Object)
IMyEntity.OnAddedToScene(Object)
IMyEntity.GetViewMatrix()
IMyEntity.GetWorldMatrixNormalizedInv()
IMyEntity.SetWorldMatrix(MatrixD, Object)
IMyEntity.SetPosition(Vector3D)
IMyEntity.Teleport(MatrixD, Object, Boolean)
IMyEntity.GetIntersectionWithLine(LineD, Nullable<MyIntersectionResultLineTriangleEx>, IntersectionFlags)
IMyEntity.GetIntersectionWithLineAndBoundingSphere(LineD, Single)
IMyEntity.GetIntersectionWithSphere(BoundingSphereD)
IMyEntity.GetIntersectionWithAABB(BoundingBoxD)
IMyEntity.GetTrianglesIntersectingSphere(BoundingSphere, Nullable<Vector3>, Nullable<Single>, List<MyTriangle_Vertex_Normals>, Int32)
IMyEntity.DoOverlapSphereTest(Single, Vector3D)
IMyEntity.GetInventory()
IMyEntity.GetInventory(Int32)
IMyEntity.AddToGamePruningStructure()
IMyEntity.RemoveFromGamePruningStructure()
IMyEntity.UpdateGamePruningStructure()
IMyEntity.Physics
IMyEntity.PositionComp
IMyEntity.Render
IMyEntity.GameLogic
IMyEntity.Hierarchy
IMyEntity.SyncObject
IMyEntity.Storage
IMyEntity.Flags
IMyEntity.EntityId
IMyEntity.Name
IMyEntity.MarkedForClose
IMyEntity.DebugAsyncLoading
IMyEntity.Save
IMyEntity.PersistentFlags
IMyEntity.Model
IMyEntity.ModelCollision
IMyEntity.Synchronized
IMyEntity.NeedsUpdate
IMyEntity.Parent
IMyEntity.LocalMatrix
IMyEntity.NearFlag
IMyEntity.CastShadows
IMyEntity.FastCastShadowResolve
IMyEntity.NeedsResolveCastShadow
IMyEntity.MaxGlassDistSq
IMyEntity.NeedsDraw
IMyEntity.NeedsDrawFromParent
IMyEntity.Transparent
IMyEntity.ShadowBoxLod
IMyEntity.SkipIfTooSmall
IMyEntity.Visible
IMyEntity.NeedsWorldMatrix
IMyEntity.InScene
IMyEntity.InvalidateOnMove
IMyEntity.WorldMatrix
IMyEntity.WorldMatrixInvScaled
IMyEntity.WorldMatrixNormalizedInv
IMyEntity.IsVolumetric
IMyEntity.LocalAABB
IMyEntity.LocalAABBHr
IMyEntity.LocalVolume
IMyEntity.LocalVolumeOffset
IMyEntity.LocationForHudMarker
IMyEntity.IsCCDForProjectiles
IMyEntity.DisplayName
IMyEntity.StopPhysicsActivation
IMyEntity.OnClose
IMyEntity.OnClosing
IMyEntity.OnMarkForClose
IMyEntity.OnPhysicsChanged
IMyStoreBlock.InsertOffer(MyStoreItemDataSimple, Int64)
IMyStoreBlock.InsertOrder(MyStoreItemDataSimple, Int64)
IMyStoreBlock.CancelStoreItem(Int64)
IMyStoreBlock.GetPlayerStoreItems(List<MyStoreQueryItem>)
IMyFunctionalBlock.RequestEnable(Boolean)
IMyFunctionalBlock.Enabled
IMyTerminalBlock.HasLocalPlayerAccess()
IMyTerminalBlock.HasPlayerAccess(Int64, MyRelationsBetweenPlayerAndBlock)
IMyTerminalBlock.HasNobodyPlayerAccessToBlock()
IMyTerminalBlock.HasPlayerAccessWithNobodyCheck(Int64, Boolean)
IMyTerminalBlock.SetCustomName(String)
IMyTerminalBlock.SetCustomName(StringBuilder)
IMyTerminalBlock.GetActions(List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.SearchActionsOfName(String, List<ITerminalAction>, Func<ITerminalAction, Boolean>)
IMyTerminalBlock.GetActionWithName(String)
IMyTerminalBlock.GetProperty(String)
IMyTerminalBlock.GetProperties(List<ITerminalProperty>, Func<ITerminalProperty, Boolean>)
IMyTerminalBlock.IsSameConstructAs(IMyTerminalBlock)
IMyTerminalBlock.CustomName
IMyTerminalBlock.CustomNameWithFaction
IMyTerminalBlock.DetailedInfo
IMyTerminalBlock.CustomInfo
IMyTerminalBlock.CustomData
IMyTerminalBlock.ShowOnHUD
IMyTerminalBlock.ShowInTerminal
IMyTerminalBlock.ShowInToolbarConfig
IMyTerminalBlock.ShowInInventory
IMyCubeBlock.GetOwnerFactionTag()
IMyCubeBlock.GetPlayerRelationToOwner()
IMyCubeBlock.GetUserRelationToOwner(Int64, MyRelationsBetweenPlayerAndBlock)
IMyCubeBlock.UpdateIsWorking()
IMyCubeBlock.UpdateVisual()
IMyCubeBlock.BlockDefinition
IMyCubeBlock.DefinitionDisplayNameText
IMyCubeBlock.DisassembleRatio
IMyCubeBlock.DisplayNameText
IMyCubeBlock.IsBeingHacked
IMyCubeBlock.IsFunctional
IMyCubeBlock.IsWorking
IMyCubeBlock.Max
IMyCubeBlock.Mass
IMyCubeBlock.Min
IMyCubeBlock.NumberInGrid
IMyCubeBlock.Orientation
IMyCubeBlock.OwnerId
IMyCubeBlock.Position
IMyEntity.GetPosition()
IMyEntity.Components
IMyEntity.HasInventory
IMyEntity.InventoryCount
IMyEntity.Closed
IMyEntity.WorldAABB
IMyEntity.WorldAABBHr
IMyEntity.WorldVolume
IMyEntity.WorldVolumeHr
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyStoreBlock : IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyStoreBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity

Methods

CreateStoreItem(Int32, Int32, StoreItemTypes, ItemTypes)

Creates a store item that allows more control over how the item is setup. This method is suitable for Hydrogen and Oxygen types.

Declaration
IMyStoreItem CreateStoreItem(int amount, int pricePerUnit, StoreItemTypes storeItemType, ItemTypes itemType)
Parameters
Type Name Description
System.Int32 amount

Amount that should be available to buy/sell

System.Int32 pricePerUnit

Individual cost per item

StoreItemTypes storeItemType

Offer (store is selling) or Order (store is buying)

ItemTypes itemType
Returns
Type Description
IMyStoreItem

Result of the creation of the store item.

CreateStoreItem(String, Int32, Int32, Int32)

Creates a store item that sells a Prefab / Grid.

Declaration
IMyStoreItem CreateStoreItem(string prefabName, int amount, int pricePerUnit, int totalPcu)
Parameters
Type Name Description
System.String prefabName

The SubtypeId of a prefab that is being sold

System.Int32 amount

Amount that should be available to buy/sell

System.Int32 pricePerUnit

Individual cost per item

System.Int32 totalPcu

The prefab PCU value

Returns
Type Description
IMyStoreItem

Result of the creation of the store item.

CreateStoreItem(MyDefinitionId, Int32, Int32, StoreItemTypes)

Creates a store item that allows more control over how the item is setup. This method is suitable for PhysicalItem types.

Declaration
IMyStoreItem CreateStoreItem(MyDefinitionId itemId, int amount, int pricePerUnit, StoreItemTypes storeItemType)
Parameters
Type Name Description
MyDefinitionId itemId

Item definition id

System.Int32 amount

Amount that should be available to buy/sell

System.Int32 pricePerUnit

Individual cost per item

StoreItemTypes storeItemType

Offer (store is selling) or Order (store is buying)

Returns
Type Description
IMyStoreItem

Result of the creation of the store item.

CreateStoreItem(MyObjectBuilder_StoreItem)

Creates a store item that allows more control over how the item is setup by using an object builder to initialize the item.

Declaration
IMyStoreItem CreateStoreItem(MyObjectBuilder_StoreItem builder)
Parameters
Type Name Description
MyObjectBuilder_StoreItem builder

The object builder used to init the store item

Returns
Type Description
IMyStoreItem

Result of the creation of the store item.

GetStoreItemById(Int64)

Gets a store item using a provided id.

Declaration
IMyStoreItem GetStoreItemById(long id)
Parameters
Type Name Description
System.Int64 id

The id of the store item being sold

Returns
Type Description
IMyStoreItem

Store item matching provided id. Returns null if not found

GetStoreItems(List<IMyStoreItem>)

Gets all the current items in a store block

Declaration
void GetStoreItems(List<IMyStoreItem> items)
Parameters
Type Name Description
System.Collections.Generic.List<IMyStoreItem> items

A provided list that will be populated with the items in the store

InsertOffer(MyStoreItemData, out Int64)

Creates store item and returns its id.

Declaration
MyStoreInsertResults InsertOffer(MyStoreItemData item, out long id)
Parameters
Type Name Description
MyStoreItemData item

Data defining the store item.

System.Int64 id

Id of the item in the shop. (Ex. needed to remove the item)

Returns
Type Description
MyStoreInsertResults

Result of the creation of the store item.

InsertOrder(MyStoreItemData, out Int64)

Creates store item and returns its id.

Declaration
MyStoreInsertResults InsertOrder(MyStoreItemData item, out long id)
Parameters
Type Name Description
MyStoreItemData item

Data defining the store item.

System.Int64 id

Id of the item in the shop. (Ex. needed to remove the item)

Returns
Type Description
MyStoreInsertResults

Result of the creation of the store item.

InsertStoreItem(IMyStoreItem)

Allows you to add an item to a store block. This is a direct add and does not involve any listing fees, etc.

Declaration
void InsertStoreItem(IMyStoreItem item)
Parameters
Type Name Description
IMyStoreItem item

The item you want to add

RemoveStoreItem(IMyStoreItem)

Allows you to remove an item to a store block.

Declaration
void RemoveStoreItem(IMyStoreItem item)
Parameters
Type Name Description
IMyStoreItem item

The item you want to remove

Extension Methods

TerminalBlockExtentions.GetId(IMyTerminalBlock)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String)
TerminalBlockExtentions.ApplyAction(IMyTerminalBlock, String, List<TerminalActionParameter>)
TerminalBlockExtentions.HasAction(IMyTerminalBlock, String)
TerminalBlockExtentions.HasInventory(IMyTerminalBlock)
TerminalBlockExtentions.GetInventory(IMyTerminalBlock, Int32)
TerminalBlockExtentions.GetInventoryCount(IMyTerminalBlock)
TerminalBlockExtentions.GetUseConveyorSystem(IMyTerminalBlock)
TerminalBlockExtentions.SetUseConveyorSystem(IMyTerminalBlock, Boolean)
TerminalPropertyExtensions.GetValueFloat(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueFloat(IMyTerminalBlock, String, Single)
TerminalPropertyExtensions.GetValueBool(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueBool(IMyTerminalBlock, String, Boolean)
TerminalPropertyExtensions.GetValueColor(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValueColor(IMyTerminalBlock, String, Color)
TerminalPropertyExtensions.GetValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetDefaultValue<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMininum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMinimum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.GetMaximum<T>(IMyTerminalBlock, String)
TerminalPropertyExtensions.SetValue<T>(IMyTerminalBlock, String, T)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾