* Initial Commit * Unfinished * Continuing, more abilities * Remove necromicon healing * oops * Continuing * Continuing * Checkpoint incase i need to undo something * Rewrite to use event per power, working passives * refactor fixes * so many fixes * some fixes * some fixes * new textures, status icon * vampire antag role, mind role * проверку на дауна вызывали?(если Null, у сервера ступор головного фатала) * fix 1 * fix 2 * fix fatal, fix build * breafing audio * fix icons style, store in action * clear store things, add gamerule, mid round game rule * some rework * clear any store systems * clear x2 * if you have 150 Blood Essence, you get mutation * upd * some changes * simple mutation menu * я вот сижу, в 12 ночи, пишу какую-то очередную хуйню, вместо приятного сна... * upd * normal mutations menu * actions translate * None type, base actions list * passive abilities * ability earning * fix * translate vampire preset * translate vampire mutations menu * mutations menu textures * disable some * ДРАНЫЙ БРИФ ФАТАЛКУ ПО ПРИКОЛУ БЕЕМ * game preset * mutation can infinity changed * fix * fully rework abilities update system * gargantua info * update ignore list * fix gargantua passives * vampire objectives * new icons * balance * fix * upd objectives * fix metabolizer type, balance 2 * fix metabolizer type 2 * fix syntax * clear translation * xd * update * round end info * fix * drain objective fix * fix * fix syntax * fix * clear --------- Co-authored-by: Rainfey <rainfey0+github@gmail.com>
26 lines
No EOL
836 B
C#
26 lines
No EOL
836 B
C#
using Content.Server.Objectives.Components;
|
|
using Content.Server.Objectives.Systems;
|
|
using Content.Shared.Objectives.Components;
|
|
using Content.Shared.Vampire.Components;
|
|
using Content.Shared.Vampire;
|
|
|
|
namespace Content.Server.Vampire;
|
|
|
|
public sealed partial class VampireSystem
|
|
{
|
|
[Dependency] private readonly NumberObjectiveSystem _number = default!;
|
|
|
|
private void InitializeObjectives()
|
|
{
|
|
|
|
SubscribeLocalEvent<BloodDrainConditionComponent, ObjectiveGetProgressEvent>(OnBloodDrainGetProgress);
|
|
}
|
|
|
|
private void OnBloodDrainGetProgress(EntityUid uid, BloodDrainConditionComponent comp, ref ObjectiveGetProgressEvent args)
|
|
{
|
|
var target = _number.GetTarget(uid);
|
|
if (target != 0)
|
|
args.Progress = MathF.Min(comp.BloodDranked / target, 1f);
|
|
else args.Progress = 1f;
|
|
}
|
|
} |