Skip to content

Commit

Permalink
science head health added + version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
JustMarfix committed Aug 16, 2024
1 parent d317083 commit 72b5c0d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ public class Config : IConfig
}
}
};

public Dictionary<string, float> ScienceHealth { get; set; } = new Dictionary<string, float>
{
{
"Глава",
200f
}
};
[Description("Список вещей для Рабочих (Dictionary<string, List<ItemType>>)")]
public Dictionary<string, List<ItemType>> WorkersItems { get; set; } = new Dictionary<string, List<ItemType>>
{
Expand Down
12 changes: 9 additions & 3 deletions VeryUsualDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class VeryUsualDay : Plugin<Config>
public override string Author => "JustMarfix";
public override string Name => "VeryUsualDay (FX Version)";

public override Version Version => new Version(4, 4, 0);
public override Version Version => new Version(4, 5, 0);

public bool IsEnabledInRound { get; set; }
public bool IsLunchtimeActive { get; set; }
Expand Down Expand Up @@ -334,6 +334,12 @@ private async void SetUserRole(Exiled.API.Features.Player player)
{
player.AddItem(item);
}

if (Instance.Config.ScienceHealth.ContainsKey(json[4]))
{
player.MaxHealth = Instance.Config.ScienceHealth[json[4]];
player.Health = Instance.Config.ScienceHealth[json[4]];
}
player.Teleport(_civilianPersonnelTowerCoords);
});
break;
Expand All @@ -350,8 +356,8 @@ private async void SetUserRole(Exiled.API.Features.Player player)
player.EnableEffect(pair.Key);
player.ChangeEffectIntensity(pair.Key, pair.Value);
}
player.MaxHealth = Instance.Config.SecurityHealth[json[4]];
player.Health = Instance.Config.SecurityHealth[json[4]];
player.MaxHealth = Instance.Config.WorkersHealth[json[4]];
player.Health = Instance.Config.WorkersHealth[json[4]];
player.Teleport(_civilianPersonnelTowerCoords);
});
break;
Expand Down

0 comments on commit 72b5c0d

Please sign in to comment.