2022-01-30 13:49:56 +13:00
|
|
|
using Content.Shared.Doors.Components;
|
|
|
|
|
using Content.Shared.Doors.Systems;
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
using Content.Shared.SprayPainter.Prototypes;
|
2023-04-22 02:18:16 -07:00
|
|
|
using Robust.Client.Animations;
|
2021-11-04 02:43:10 +13:00
|
|
|
using Robust.Client.GameObjects;
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-02-12 07:02:14 -08:00
|
|
|
|
2022-01-30 13:49:56 +13:00
|
|
|
namespace Content.Client.Doors;
|
|
|
|
|
|
|
|
|
|
public sealed class DoorSystem : SharedDoorSystem
|
2021-02-12 07:02:14 -08:00
|
|
|
{
|
2023-04-22 02:18:16 -07:00
|
|
|
[Dependency] private readonly AnimationPlayerSystem _animationSystem = default!;
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
|
|
|
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
2025-05-16 23:02:36 -04:00
|
|
|
[Dependency] private readonly SpriteSystem _sprite = default!;
|
2023-04-22 02:18:16 -07:00
|
|
|
|
|
|
|
|
public override void Initialize()
|
2021-02-12 07:02:14 -08:00
|
|
|
{
|
2023-04-22 02:18:16 -07:00
|
|
|
base.Initialize();
|
|
|
|
|
SubscribeLocalEvent<DoorComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-19 12:34:31 -07:00
|
|
|
protected override void OnComponentInit(Entity<DoorComponent> ent, ref ComponentInit args)
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
2023-10-19 12:34:31 -07:00
|
|
|
var comp = ent.Comp;
|
2025-01-31 12:46:35 +00:00
|
|
|
comp.OpenSpriteStates = new List<(DoorVisualLayers, string)>(2);
|
|
|
|
|
comp.ClosedSpriteStates = new List<(DoorVisualLayers, string)>(2);
|
2023-04-22 02:18:16 -07:00
|
|
|
|
|
|
|
|
comp.OpenSpriteStates.Add((DoorVisualLayers.Base, comp.OpenSpriteState));
|
|
|
|
|
comp.ClosedSpriteStates.Add((DoorVisualLayers.Base, comp.ClosedSpriteState));
|
|
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
comp.OpeningAnimation = new Animation
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
Length = TimeSpan.FromSeconds(comp.OpeningAnimationTime),
|
|
|
|
|
AnimationTracks =
|
|
|
|
|
{
|
2025-01-31 12:46:35 +00:00
|
|
|
new AnimationTrackSpriteFlick
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
LayerKey = DoorVisualLayers.Base,
|
2025-01-31 12:46:35 +00:00
|
|
|
KeyFrames =
|
|
|
|
|
{
|
|
|
|
|
new AnimationTrackSpriteFlick.KeyFrame(comp.OpeningSpriteState, 0f),
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-04-22 02:18:16 -07:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
comp.ClosingAnimation = new Animation
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
Length = TimeSpan.FromSeconds(comp.ClosingAnimationTime),
|
|
|
|
|
AnimationTracks =
|
|
|
|
|
{
|
2025-01-31 12:46:35 +00:00
|
|
|
new AnimationTrackSpriteFlick
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
LayerKey = DoorVisualLayers.Base,
|
2025-01-31 12:46:35 +00:00
|
|
|
KeyFrames =
|
|
|
|
|
{
|
|
|
|
|
new AnimationTrackSpriteFlick.KeyFrame(comp.ClosingSpriteState, 0f),
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-04-22 02:18:16 -07:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
comp.EmaggingAnimation = new Animation
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
Length = TimeSpan.FromSeconds(comp.EmaggingAnimationTime),
|
|
|
|
|
AnimationTracks =
|
|
|
|
|
{
|
2025-01-31 12:46:35 +00:00
|
|
|
new AnimationTrackSpriteFlick
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
|
|
|
|
LayerKey = DoorVisualLayers.BaseUnlit,
|
2025-01-31 12:46:35 +00:00
|
|
|
KeyFrames =
|
|
|
|
|
{
|
|
|
|
|
new AnimationTrackSpriteFlick.KeyFrame(comp.EmaggingSpriteState, 0f),
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-04-22 02:18:16 -07:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
private void OnAppearanceChange(Entity<DoorComponent> entity, ref AppearanceChangeEvent args)
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
2024-02-22 18:01:31 -05:00
|
|
|
if (args.Sprite == null)
|
2022-01-30 13:49:56 +13:00
|
|
|
return;
|
2021-02-12 07:02:14 -08:00
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
if (!AppearanceSystem.TryGetData<DoorState>(entity, DoorVisuals.State, out var state, args.Component))
|
2023-04-22 02:18:16 -07:00
|
|
|
state = DoorState.Closed;
|
|
|
|
|
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
if (AppearanceSystem.TryGetData<string>(entity, PaintableVisuals.Prototype, out var prototype, args.Component))
|
|
|
|
|
UpdateSpriteLayers((entity.Owner, args.Sprite), prototype);
|
2023-04-30 18:09:52 +12:00
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
if (_animationSystem.HasRunningAnimation(entity, DoorComponent.AnimationKey))
|
|
|
|
|
_animationSystem.Stop(entity.Owner, DoorComponent.AnimationKey);
|
2021-12-30 03:12:04 +01:00
|
|
|
|
2025-01-31 12:46:35 +00:00
|
|
|
UpdateAppearanceForDoorState(entity, args.Sprite, state);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateAppearanceForDoorState(Entity<DoorComponent> entity, SpriteComponent sprite, DoorState state)
|
|
|
|
|
{
|
2025-05-16 23:02:36 -04:00
|
|
|
_sprite.SetDrawDepth((entity.Owner, sprite), state is DoorState.Open ? entity.Comp.OpenDrawDepth : entity.Comp.ClosedDrawDepth);
|
2025-01-31 12:46:35 +00:00
|
|
|
|
|
|
|
|
switch (state)
|
2021-02-12 07:02:14 -08:00
|
|
|
{
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Open:
|
2025-01-31 12:46:35 +00:00
|
|
|
foreach (var (layer, layerState) in entity.Comp.OpenSpriteStates)
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
2025-05-16 23:02:36 -04:00
|
|
|
_sprite.LayerSetRsiState((entity.Owner, sprite), layer, layerState);
|
2023-04-22 02:18:16 -07:00
|
|
|
}
|
2025-01-31 12:46:35 +00:00
|
|
|
|
|
|
|
|
return;
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Closed:
|
2025-01-31 12:46:35 +00:00
|
|
|
foreach (var (layer, layerState) in entity.Comp.ClosedSpriteStates)
|
2023-04-22 02:18:16 -07:00
|
|
|
{
|
2025-05-16 23:02:36 -04:00
|
|
|
_sprite.LayerSetRsiState((entity.Owner, sprite), layer, layerState);
|
2023-04-22 02:18:16 -07:00
|
|
|
}
|
2025-01-31 12:46:35 +00:00
|
|
|
|
|
|
|
|
return;
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Opening:
|
2025-01-31 12:46:35 +00:00
|
|
|
if (entity.Comp.OpeningAnimationTime == 0.0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
_animationSystem.Play(entity, (Animation)entity.Comp.OpeningAnimation, DoorComponent.AnimationKey);
|
|
|
|
|
|
|
|
|
|
return;
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Closing:
|
2025-01-31 12:46:35 +00:00
|
|
|
if (entity.Comp.ClosingAnimationTime == 0.0 || entity.Comp.CurrentlyCrushing.Count != 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
_animationSystem.Play(entity, (Animation)entity.Comp.ClosingAnimation, DoorComponent.AnimationKey);
|
|
|
|
|
|
|
|
|
|
return;
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Denying:
|
2025-01-31 12:46:35 +00:00
|
|
|
_animationSystem.Play(entity, (Animation)entity.Comp.DenyingAnimation, DoorComponent.AnimationKey);
|
|
|
|
|
|
|
|
|
|
return;
|
2023-04-22 02:18:16 -07:00
|
|
|
case DoorState.Emagging:
|
2025-01-31 12:46:35 +00:00
|
|
|
_animationSystem.Play(entity, (Animation)entity.Comp.EmaggingAnimation, DoorComponent.AnimationKey);
|
|
|
|
|
|
|
|
|
|
return;
|
2021-02-12 07:02:14 -08:00
|
|
|
}
|
2022-01-30 13:49:56 +13:00
|
|
|
}
|
2025-01-31 12:46:35 +00:00
|
|
|
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
private void UpdateSpriteLayers(Entity<SpriteComponent> sprite, string targetProto)
|
2025-01-31 12:46:35 +00:00
|
|
|
{
|
2025-09-09 18:17:56 +02:00
|
|
|
if (!_prototypeManager.Resolve(targetProto, out var target))
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!target.TryGetComponent(out SpriteComponent? targetSprite, _componentFactory))
|
2025-01-31 12:46:35 +00:00
|
|
|
return;
|
|
|
|
|
|
Make more objects spray paintable (Reviving #31328) (#37341)
* PaintableAirlockComponent and AirlockGroupPrototype have been replaced
* Slightly redesigned SprayPainterSystem for greater versatility
* Added handling of changes to the appearance of doors and storages
* PaintableGroup prototypes have been created
* Generating tabs with styles in the UI
* Fix error with undiscovered layer
* Slight improvement
* Removed unnecessary property
* The category for `PaintableGroup` was allocated to a separate prototype so that the engine itself would check if the category existed
* Added canisters, but repainting doesn't work
* Added localization to styles
* Fix sprite changing
* Added the ability to paint canisters
* slight ui improvement
* Fix yamllinter errors
* Fix test
* The UI now remembers which tab was open
* Fix build (?)
* Rename
* Charges have been added to the spray painter
* Added a charge texture for the spray painter
* Now spray painter can paint decals
* Increased number of charges
* Spawning dummy objects has been replaced by PrototypeManager
* added a signature about the painting of the object
* fix
* Code commenting
* Fix upstream
* Update Content.Shared/SprayPainter/Components/SprayPainterAmmo.cs
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* review
* Now decals can only be painted if the corresponding tab in the menu is open.
* Fixed a bug with pipe and decal tabs not being remembered
* Update EntityStorageVisualizerSystem.cs
* record
* loc
* Cleanup
* Revert electrified visuals
* more cleanup, fix charges, del ammo4
* no empty file, remove meta component
* closet exceptions, storage visualizer fixes
* enable/disable decal through alt-verb
* Fix missed merge conflicts
* fix snap offset, button event handlers
* simpler order, fix snap loc string
* Remove PaintableViz.BaseRSI, no decal item, A-Z
* State-respecting UI, BUI updates, FTL fixes
* revert DecalPlacerWindow changes
* revert unwanted changes, cleanup function order
* Limit SprayPainterAmmo write access to AmmoSystem
* Remove PaintedSystem
* spray paint ammo lathe recipe, youtool listing
* category as a list, groups as subtabs
* Restore inhand copyright in meta.json
* empty spray painter, recipe produces an empty one
* allow alpha on spray painter decals
* add comments
* paintable wall lockers
* Restrict painting more objects
* Suggested event changes, event cleanup
* component comments, fix ammo inhands
* uncleanable decals, dirty styles on mapinit
* organize paintables, separate emergency/closet grp
* fix categories newline at EOF
* airlock group whitespace cleanup
* realphabetize
* Clean up EntityStorageViz merge conflict markers
* Apply requested changes
* Apply suggestions from sowelipililimute's review
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* betrayal most foul
* Remove members from EntityPaintedEvent
* No emerg. group, steelsec to secure, locker/closet
* Enable repainting the medical wall locker
* comments, no flags on PaintableVisuals
* Remove locked variants from closets/wall closets
* removable decals
* off value consistency
* can't paint away those bones
* fix precedence
* Remove AirlockDepartment, AirlockGroup protos
Both unused.
* whitelist consistency re: ammo component
* add standing emergency closet styles
* alphabetize the spray painter listings
---------
Co-authored-by: Ertanic <black.ikra.14@gmail.com>
Co-authored-by: Эдуард <36124833+Ertanic@users.noreply.github.com>
Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
2025-07-10 20:36:57 -04:00
|
|
|
_sprite.SetBaseRsi(sprite.AsNullable(), targetSprite.BaseRSI);
|
2025-01-31 12:46:35 +00:00
|
|
|
}
|
2021-02-12 07:02:14 -08:00
|
|
|
}
|