}
// typically you'd divide by two, but since the textures are half a tile, this is done implicitly
- var iconPosition = new Vector2((boundingGrid.Width + 1) * size.X ,
- (boundingGrid.Height + 1) * size.Y);
+ var iconPosition = new Vector2((boundingGrid.Width + 1) * size.X + itemComponent.StoredOffset.X * 2,
+ (boundingGrid.Height + 1) * size.Y + itemComponent.StoredOffset.Y * 2);
var iconRotation = Location.Rotation + Angle.FromDegrees(itemComponent.StoredRotation);
if (itemComponent.StoredSprite is { } storageSprite)
/// </summary>
[DataField, AutoNetworkedField]
public float StoredRotation = 0;
+
+ /// <summary>
+ /// An additional offset, in pixels, applied to the visual depiction of the item when displayed in the storage UI.
+ /// </summary>
+ [DataField, AutoNetworkedField]
+ public Vector2i StoredOffset;
}
/// <summary>
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate
+ - type: Item
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-6
- type: DamageOnLand
damage:
types:
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate-trash
+ - type: Item
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-6
- type: Tag
tags:
- Trash
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate-small
+ - type: Item
+ storedOffset: 0,-3
# Needs the full thing because inherting is dumb sometimes.
- type: Destructible
thresholds:
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate-small-trash
+ - type: Item
+ storedOffset: 0,-3
# Plastic Plate
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate-plastic
+ - type: Item
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-6
- type: Tag
tags:
- Trash
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: plate-small-plastic
+ - type: Item
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-3
- type: Tag
tags:
- Trash
- type: Sprite
sprite: Objects/Consumable/Food/plates.rsi
state: tin
+ - type: Item
+ size: Small
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-3
- type: Tag
tags:
- Trash
name: spesos
description: You gotta have money.
components:
+ - type: Item
+ shape:
+ - 0,0,1,0
+ storedOffset: 0,-2
- type: Material
- type: PhysicalComposition
materialComposition: