Class UserTexture
Holds the texture bytes for saving and displaying user textures, used by ViewTextureToImage on the client to display texture on UI.
Inheritance
System.Object
UserTexture
Implements
System.ComponentModel.INotifyPropertyChanged
ISuffixName
Assembly: Eco.Gameplay.dll
Syntax
public class UserTexture : SimpleEntry, ILinkableParameterized<bool>, ILinkableParameterized<SimpleEntry.NamingOptions>, ILinkable, IValidity, ICachesValidity, IHasID, INamed, IReInitializable, IHasReferenceableSerializableID, IHasSerializableID, INotifyPropertyChanged, IDescribable, ISuffixName, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasReputation, IReputationAssociated, IController, IViewController, IHasUniversalID, IGeneratesCulture
Constructors
UserTexture(Byte[], User, Boolean)
Declaration
public UserTexture(byte[] bytes, User user, bool allowEmbeddingInText)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
|
User |
user |
|
System.Boolean |
allowEmbeddingInText |
|
Fields
FileName
Declaration
Field Value
Type |
Description |
System.String |
|
Init
Declaration
Field Value
Properties
AllowEmbeddingInText
Declaration
public bool AllowEmbeddingInText { get; }
Property Value
Type |
Description |
System.Boolean |
|
CachedArtworkValue
The value when placed in its current settlement. If no settlement is assigned, it stays at zero.
Declaration
public ValResult<float> CachedArtworkValue { get; set; }
Property Value
Holder
Declaration
public WorldObject Holder { set; }
Property Value
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsReviewed
Declaration
public bool IsReviewed { get; }
Property Value
Type |
Description |
System.Boolean |
|
NeedTMPIcon
Declaration
public bool NeedTMPIcon { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Reputation
Declaration
public float Reputation { get; }
Property Value
Type |
Description |
System.Single |
|
ReviewState
Declaration
public TextureReviewState ReviewState { get; }
Property Value
TextureData
Declaration
public byte[] TextureData { get; }
Property Value
Type |
Description |
System.Byte[] |
|
TextureHolder
Declaration
public WorldObject TextureHolder { get; }
Property Value
TexturePreview
Declaration
public byte[] TexturePreview { get; }
Property Value
Type |
Description |
System.Byte[] |
|
Methods
ComputeArtworkValue(Player, Settlement)
Do a query to see what the value of this texture would be in the given settlement, since value depends on citizenship of the reputation givers.
Declaration
public LocString ComputeArtworkValue(Player player, Settlement settlement)
Parameters
Returns
Delete()
Declaration
Destroyed()
Declaration
public override void Destroyed()
Overrides
Initialize()
Declaration
public override void Initialize()
Overrides
OnPostLoad()
Declaration
Reset()
Resets texture bytes and approval state, useful for replacing portrait images without creating a new texture.
Declaration
SetReviewState(TextureReviewState)
Declaration
public void SetReviewState(TextureReviewState state)
Parameters
SetTextureData(Byte[])
Declaration
public void SetTextureData(byte[] textureData)
Parameters
Type |
Name |
Description |
System.Byte[] |
textureData |
|
Tooltip()
Declaration
[NewTooltip]
public LocString Tooltip()
Returns
UILinkContent()
Declaration
public override LocString UILinkContent()
Returns
Overrides
Explicit Interface Implementations
IGeneratesCulture.CultureGenerated
Declaration
float IGeneratesCulture.CultureGenerated { get; }
Returns
Type |
Description |
System.Single |
|
IHasReputation.CanGiveReputation(User)
Declaration
Result IHasReputation.CanGiveReputation(User giver)
Parameters
Type |
Name |
Description |
User |
giver |
|
Returns
IHasReputation.UserSource
Declaration
User IHasReputation.UserSource { get; }
Returns
Implements
System.ComponentModel.INotifyPropertyChanged
ISuffixName
Extension Methods