Icon smoothing for asteroid rocks (#8058)
Co-authored-by: Tomeno <tomeno@lulzsec.co.uk>
@@ -1,39 +0,0 @@
|
|||||||
using Content.Shared.Mining;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Robust.Client.GameObjects;
|
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
|
||||||
|
|
||||||
namespace Content.Client.Mining
|
|
||||||
{
|
|
||||||
[UsedImplicitly]
|
|
||||||
public sealed class AsteroidRockVisualizer : AppearanceVisualizer
|
|
||||||
{
|
|
||||||
[DataField("layer")]
|
|
||||||
private int Layer { get; } = 0;
|
|
||||||
|
|
||||||
public override void InitializeEntity(EntityUid entity)
|
|
||||||
{
|
|
||||||
base.InitializeEntity(entity);
|
|
||||||
|
|
||||||
IoCManager.Resolve<IEntityManager>().GetComponentOrNull<SpriteComponent>(entity)?.LayerMapReserveBlank(Layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnChangeData(AppearanceComponent component)
|
|
||||||
{
|
|
||||||
base.OnChangeData(component);
|
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out SpriteComponent? sprite))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (component.TryGetData(AsteroidRockVisuals.State, out string state))
|
|
||||||
{
|
|
||||||
sprite.LayerMapReserveBlank(Layer);
|
|
||||||
sprite.LayerSetState(0, state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Robust.Shared.Serialization;
|
|
||||||
|
|
||||||
namespace Content.Shared.Mining
|
|
||||||
{
|
|
||||||
[Serializable, NetSerializable]
|
|
||||||
public enum AsteroidRockVisuals
|
|
||||||
{
|
|
||||||
State
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -76,9 +76,6 @@
|
|||||||
- type: MovementSpeedModifier
|
- type: MovementSpeedModifier
|
||||||
baseWalkSpeed : 7
|
baseWalkSpeed : 7
|
||||||
baseSprintSpeed : 7
|
baseSprintSpeed : 7
|
||||||
- type: RandomAppearance
|
|
||||||
# relic
|
|
||||||
key: enum.AsteroidRockVisuals.State
|
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: Mobs
|
drawdepth: Mobs
|
||||||
layers:
|
layers:
|
||||||
@@ -414,7 +411,6 @@
|
|||||||
normal: crab
|
normal: crab
|
||||||
crit: dead
|
crit: dead
|
||||||
dead: dead
|
dead: dead
|
||||||
- type: AsteroidRockVisualizer
|
|
||||||
- type: Butcherable
|
- type: Butcherable
|
||||||
spawned:
|
spawned:
|
||||||
- id: FoodMeatCrab
|
- id: FoodMeatCrab
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
name: asteroid rock
|
name: asteroid rock
|
||||||
description: An asteroid.
|
description: An asteroid.
|
||||||
components:
|
components:
|
||||||
- type: RandomAppearance
|
|
||||||
key: enum.AsteroidRockVisuals.State
|
|
||||||
- type: Mineable
|
- type: Mineable
|
||||||
ores:
|
ores:
|
||||||
- id: SteelOre1
|
- id: SteelOre1
|
||||||
@@ -28,7 +26,7 @@
|
|||||||
orGroup: Asteroid
|
orGroup: Asteroid
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Structures/Walls/asteroid_rock.rsi
|
sprite: Structures/Walls/asteroid_rock.rsi
|
||||||
state: 0
|
state: full
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
damageContainer: Inorganic
|
damageContainer: Inorganic
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
@@ -43,9 +41,6 @@
|
|||||||
sizeX: 32
|
sizeX: 32
|
||||||
sizeY: 32
|
sizeY: 32
|
||||||
- type: Airtight
|
- type: Airtight
|
||||||
- type: Appearance
|
|
||||||
visuals:
|
|
||||||
- type: AsteroidRockVisualizer
|
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
fixtures:
|
fixtures:
|
||||||
- shape:
|
- shape:
|
||||||
@@ -59,3 +54,6 @@
|
|||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
- VaultImpassable
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
|
- type: IconSmooth
|
||||||
|
key: rock
|
||||||
|
base: rock_
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 947 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 899 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 923 B |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/full.png
Normal file
|
After Width: | Height: | Size: 924 B |
@@ -1 +1 @@
|
|||||||
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "0", "delays": [[1.0]]}, {"name": "1", "delays": [[1.0]]}, {"name": "2", "delays": [[1.0]]}, {"name": "3", "delays": [[1.0]]}, {"name": "4", "delays": [[1.0]]}]}
|
{"version": 1, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/commit/a0c067f688288aeb167157203e2170b14cfa9d7f", "size": {"x": 32, "y": 32}, "states": [{"name": "rock_0", "directions": 4}, {"name": "rock_1", "directions": 4}, {"name": "rock_2", "directions": 4}, {"name": "rock_3", "directions": 4}, {"name": "rock_4", "directions": 4}, {"name": "rock_5", "directions": 4}, {"name": "rock_6", "directions": 4}, {"name": "rock_7", "directions": 4}, {"name": "full"}]}
|
||||||
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_0.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_1.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_3.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_4.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_5.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_6.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Resources/Textures/Structures/Walls/asteroid_rock.rsi/rock_7.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |