Обновление говнокрада (#283)
* real? * ok * real 2 * one more thing that i forgot to port part 2 * i am dumb * mofo og * waaaagh * some rework placeholders * porting part 2 * bruh. * bruh 2 * bruh 3. * Update ChangelingRuleSystem.cs * Update AdminVerbSystem.Antags.cs * говнокрад это SubGamemode * тяжело... * пу-пу-пу * mf og * Update radio_channels.yml --------- Co-authored-by: whateverusername0 <whateveremail> Co-authored-by: username <113782077+whateverusername0@users.noreply.github.com>
This commit is contained in:
parent
141520c2a8
commit
9f179a447d
1 changed files with 15 additions and 4 deletions
|
|
@ -20,12 +20,23 @@ public sealed partial class ChangelingSystem : EntitySystem
|
|||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue