Skip to content

Commit

Permalink
drastic ling changes (Simple-Station#440)
Browse files Browse the repository at this point in the history
* gaming

* real!

* real 3!

* fuck

* great

* ungreat

* gnomes are here.

* g

* fuck

* raaagh cleanup

* fart

* ghfghdfghfbvd

* boobooboo

---------

Co-authored-by: whateverusername0 <whateveremail>
  • Loading branch information
whateverusername0 authored and VMSolidus committed Aug 16, 2024
1 parent 0bab583 commit a43ec3c
Show file tree
Hide file tree
Showing 64 changed files with 1,054 additions and 794 deletions.
19 changes: 15 additions & 4 deletions Content.Client/Goobstation/Changeling/ChangelingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,23 @@ public override void Initialize()

private void OnUpdateAlert(EntityUid uid, ChangelingComponent comp, ref UpdateAlertSpriteEvent args)
{
if (args.Alert.AlertKey.AlertType != "Chemicals")
return;
var stateNormalized = 0f;

var chemicalsNormalised = (int) (comp.Chemicals / comp.MaxChemicals * 16); // hardcoded because uhh umm
// hardcoded because uhh umm i don't know. send help.
switch (args.Alert.AlertKey.AlertType)
{
case "ChangelingChemicals":
stateNormalized = (int) (comp.Chemicals / comp.MaxChemicals * 18);
break;

case "ChangelingBiomass":
stateNormalized = (int) (comp.Biomass / comp.MaxBiomass * 16);
break;
default:
return;
}
var sprite = args.SpriteViewEnt.Comp;
sprite.LayerSetState(AlertVisualLayers.Base, $"{chemicalsNormalised}");
sprite.LayerSetState(AlertVisualLayers.Base, $"{stateNormalized}");
}

private void GetChanglingIcon(Entity<ChangelingComponent> ent, ref GetStatusIconsEvent args)
Expand Down
Loading

0 comments on commit a43ec3c

Please sign in to comment.