Visual popup types (#9523)

* Visual popup types

* Pass over `PopupCoordinates` and `PopupCursor`

* `PopupEntity` pass

* Disease and reagent popup pass

* COLOUR
This commit is contained in:
Kara
2022-07-09 02:09:52 -07:00
committed by GitHub
parent 1d3d8efbc9
commit dc28b58468
47 changed files with 272 additions and 117 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.Botany.Components;
using Content.Server.Kitchen.Components;
using Content.Shared.Botany;
using Content.Shared.Examine;
using Content.Shared.Popups;
using Content.Shared.Random.Helpers;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
@@ -106,12 +107,12 @@ public sealed partial class BotanySystem
if (proto.ProductPrototypes.Count == 0 || proto.Yield <= 0)
{
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-fail-message"),
Filter.Entities(user));
Filter.Entities(user), PopupType.Medium);
return Enumerable.Empty<EntityUid>();
}
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-success-message", ("name", proto.DisplayName)),
Filter.Entities(user));
Filter.Entities(user), PopupType.Medium);
return GenerateProduct(proto, Transform(user).Coordinates, yieldMod);
}
@@ -132,7 +133,7 @@ public sealed partial class BotanySystem
if (totalYield > 1 || proto.HarvestRepeat != HarvestType.NoRepeat)
proto.Unique = false;
for (var i = 0; i < totalYield; i++)
{
var product = _robustRandom.Pick(proto.ProductPrototypes);