mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 22:18:52 +03:00
* bingle * text change * flash stuff * make self heal noticable * remove catwalk blacklist * added ion damage * bingle floor * added tile spawn, but its not working correctly * bingle pit gets more healt. for got i set it low for testing. chenges to take structual damge. added passinv healing * bingles have less hp * bingles have 5% less damage resistance * added updater to sprite * the bingle pit will now embrace its dead bingles for new life and you now need to keep humans alive for more points * change to bingle point. bunus point if alive or crit * sprite fix combat mode * fix ghostrole not stacking * for players aswell * changed the whole upbrade to a polymorf action * sprite for amrored dead * bingle plushie * bingle tile spread * cleanup * normal bingle no2 have 10% armor ,upgraded 20% * more cleanup * coderabbit recomendations * yml linter error * added antirotting to pit * stuff * removed unused code --------- Co-authored-by: Fishbait <Fishbait@git.ml> Co-authored-by: Aidenkrz <aiden@djkraz.com> (cherry picked from commit 2c28b55a90f735955210b24ae4b3cdf295f0b5e4)
43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using Robust.Client.GameObjects;
|
|
using Content.Shared._Goobstation.Bingle;
|
|
using Content.Shared.CombatMode;
|
|
|
|
namespace Content.Client._Goobstation.Bingle;
|
|
|
|
/// <summary>
|
|
/// Handles the appearance of bingles.
|
|
/// </summary>
|
|
public sealed class BingleSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly AppearanceSystem _appearance = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<BingleComponent, ToggleCombatActionEvent>(OnCombatToggle);
|
|
SubscribeLocalEvent<BingleComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Makes the eyes glow red when combat mode is engaged.
|
|
/// </summary>
|
|
private void OnCombatToggle(EntityUid uid, BingleComponent component, ToggleCombatActionEvent args)
|
|
{
|
|
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
|
return;
|
|
_appearance.OnChangeData(uid, sprite);
|
|
}
|
|
|
|
public void OnAppearanceChange(EntityUid uid, BingleComponent component, ref AppearanceChangeEvent args)
|
|
{
|
|
var sprite = args.Sprite;
|
|
if (sprite == null)
|
|
return;
|
|
if (!TryComp<CombatModeComponent>(uid, out var combat))
|
|
return;
|
|
if (!sprite.LayerMapTryGet(BingleVisual.Combat, out var layer))
|
|
return;
|
|
sprite.LayerSetVisible(layer, combat.IsInCombatMode);
|
|
}
|
|
}
|