Interface IBlockEntity
Interface that makes the entity behave like a block from map. This will make the entity become a block item for ItemSystem.
Properties
AllowBeingEmbedAsElement
True if this entity can be embed as a element in map (like putting a coin into a launcher in SMM2 and this entity would be the coin)
Declaration
bool AllowBeingEmbedAsElement { get; }
EmbedEntityAsElement
True if this entity can embed other entity as a element in map (like putting a coin into a launcher in SMM2 and this entity would be the launcher)
Declaration
bool EmbedEntityAsElement { get; }
MaxStackCount
Max item stack count as a block item.
Declaration
int MaxStackCount { get; }
Methods
IsIgnoreEmbedAsElement(int)
True if the given type of entity do not take other entity as embed element
Declaration
public static bool IsIgnoreEmbedAsElement(int blockEntityID)
OnEntityPicked()
This function is called when this entity being picked as a block by a pick-tool
Declaration
void OnEntityPicked()
OnEntityPut()
This function is called when this entity being put into the map as a block
Declaration
void OnEntityPut()
OnEntityRefresh()
This function is called when there are map changes happens nearby and the entity needs to refresh itself
Declaration
void OnEntityRefresh()
RefreshBlockEntitiesNearby(Int2, Entity)
Refresh all block entity instances near the given position.
Declaration
public static void RefreshBlockEntitiesNearby(Int2 centerUnitPos, Entity ignore = null)
Parameters
Type | Name | Description |
---|---|---|
Int2 | centerUnitPos | This position is in unit space |
Entity | ignore | Do not refresh this entity |