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
|
||||
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)
|
||||
|
||||
@@ -54,6 +54,12 @@ public sealed partial class ItemComponent : Component
|
||||
/// </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>
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/plates.rsi
|
||||
state: plate
|
||||
- type: Item
|
||||
shape:
|
||||
- 0,0,1,0
|
||||
storedOffset: 0,-6
|
||||
- type: DamageOnLand
|
||||
damage:
|
||||
types:
|
||||
@@ -60,6 +64,10 @@
|
||||
- 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
|
||||
@@ -76,6 +84,8 @@
|
||||
- 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:
|
||||
@@ -106,6 +116,8 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/plates.rsi
|
||||
state: plate-small-trash
|
||||
- type: Item
|
||||
storedOffset: 0,-3
|
||||
|
||||
# Plastic Plate
|
||||
|
||||
@@ -118,6 +130,10 @@
|
||||
- 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
|
||||
@@ -131,6 +147,10 @@
|
||||
- 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
|
||||
@@ -146,6 +166,11 @@
|
||||
- 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
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
name: spesos
|
||||
description: You gotta have money.
|
||||
components:
|
||||
- type: Item
|
||||
shape:
|
||||
- 0,0,1,0
|
||||
storedOffset: 0,-2
|
||||
- type: Material
|
||||
- type: PhysicalComposition
|
||||
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 |