Fixes cigarette animations and matches now have lit/unlit inhand sprites (#4480)

This commit is contained in:
Swept
2021-08-17 16:26:35 -07:00
committed by GitHub
parent 73849a5f52
commit ff44b83fd6
15 changed files with 267 additions and 201 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Interaction;
using Content.Shared.Smoking;
using Content.Shared.Sound;
using Content.Shared.Temperature;
using Content.Server.Items;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
@@ -55,6 +56,19 @@ namespace Content.Server.Light.Components
_pointLightComponent.Enabled = _currentState == SharedBurningStates.Lit;
}
if (Owner.TryGetComponent(out ItemComponent? item))
{
switch (_currentState)
{
case SharedBurningStates.Lit:
item.EquippedPrefix = "lit";
break;
default:
item.EquippedPrefix = "unlit";
break;
}
}
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
{
appearance.SetData(SmokingVisuals.Smoking, _currentState);