Plates & Cash gridinv visuals (#24075)
@@ -157,8 +157,8 @@ public sealed class ItemGridPiece : Control
|
|||||||
}
|
}
|
||||||
|
|
||||||
// typically you'd divide by two, but since the textures are half a tile, this is done implicitly
|
// 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 ,
|
var iconPosition = new Vector2((boundingGrid.Width + 1) * size.X + itemComponent.StoredOffset.X * 2,
|
||||||
(boundingGrid.Height + 1) * size.Y);
|
(boundingGrid.Height + 1) * size.Y + itemComponent.StoredOffset.Y * 2);
|
||||||
var iconRotation = Location.Rotation + Angle.FromDegrees(itemComponent.StoredRotation);
|
var iconRotation = Location.Rotation + Angle.FromDegrees(itemComponent.StoredRotation);
|
||||||
|
|
||||||
if (itemComponent.StoredSprite is { } storageSprite)
|
if (itemComponent.StoredSprite is { } storageSprite)
|
||||||
|
|||||||
@@ -54,6 +54,12 @@ public sealed partial class ItemComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, AutoNetworkedField]
|
[DataField, AutoNetworkedField]
|
||||||
public float StoredRotation = 0;
|
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>
|
/// <summary>
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate
|
state: plate
|
||||||
|
- type: Item
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-6
|
||||||
- type: DamageOnLand
|
- type: DamageOnLand
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
@@ -60,6 +64,10 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate-trash
|
state: plate-trash
|
||||||
|
- type: Item
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-6
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Trash
|
- Trash
|
||||||
@@ -76,6 +84,8 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate-small
|
state: plate-small
|
||||||
|
- type: Item
|
||||||
|
storedOffset: 0,-3
|
||||||
# Needs the full thing because inherting is dumb sometimes.
|
# Needs the full thing because inherting is dumb sometimes.
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -106,6 +116,8 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate-small-trash
|
state: plate-small-trash
|
||||||
|
- type: Item
|
||||||
|
storedOffset: 0,-3
|
||||||
|
|
||||||
# Plastic Plate
|
# Plastic Plate
|
||||||
|
|
||||||
@@ -118,6 +130,10 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate-plastic
|
state: plate-plastic
|
||||||
|
- type: Item
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-6
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Trash
|
- Trash
|
||||||
@@ -131,6 +147,10 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: plate-small-plastic
|
state: plate-small-plastic
|
||||||
|
- type: Item
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-3
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Trash
|
- Trash
|
||||||
@@ -146,6 +166,11 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Consumable/Food/plates.rsi
|
sprite: Objects/Consumable/Food/plates.rsi
|
||||||
state: tin
|
state: tin
|
||||||
|
- type: Item
|
||||||
|
size: Small
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-3
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Trash
|
- Trash
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
name: spesos
|
name: spesos
|
||||||
description: You gotta have money.
|
description: You gotta have money.
|
||||||
components:
|
components:
|
||||||
|
- type: Item
|
||||||
|
shape:
|
||||||
|
- 0,0,1,0
|
||||||
|
storedOffset: 0,-2
|
||||||
- type: Material
|
- type: Material
|
||||||
- type: PhysicalComposition
|
- type: PhysicalComposition
|
||||||
materialComposition:
|
materialComposition:
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 299 B |