Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Commit 7de4ec9

Browse files
Merge pull request RonRonstation#357 from RonRonstation/vampirism-comes-to-ronstation
Vampire: The basics
2 parents 06837ef + a01ec3d commit 7de4ec9

29 files changed

Lines changed: 346 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Content.Shared._Ronstation.Vampire.Components;
2+
using Content.Shared._Ronstation.Vampire.EntitySystems;
3+
using Content.Shared.Antag;
4+
using Content.Shared.StatusIcon.Components;
5+
using Robust.Client.Player;
6+
using Robust.Shared.Prototypes;
7+
8+
namespace Content.Client._Ronstation.Vampire.EntitySystems;
9+
10+
public sealed class VampireSystem : SharedVampireSystem
11+
{
12+
[Dependency] private readonly IPlayerManager _playerManager = default!;
13+
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
14+
15+
public override void Initialize()
16+
{
17+
base.Initialize();
18+
}
19+
}

Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// Contains modifications made by Ronstation contributors, therefore this file is subject to MIT sublicensed with AGPL v3.0.
12
using Content.Server.Antag;
23
using Content.Server.GameTicking;
34
using Content.Server.GameTicking.Rules.Components;
45
using Content.Server.Zombies;
6+
using Content.Server._Ronstation.GameTicking.Rules.Components; // Ronstation - modification
57
using Content.Shared.Administration;
68
using Content.Server.Clothing.Systems;
79
using Content.Shared.Database;
@@ -29,6 +31,7 @@ public sealed partial class AdminVerbSystem
2931
private static readonly EntProtoId DefaultThiefRule = "Thief";
3032
private static readonly EntProtoId DefaultChangelingRule = "Changeling";
3133
private static readonly EntProtoId ParadoxCloneRuleId = "ParadoxCloneSpawn";
34+
private static readonly EntProtoId DefaultVampireRule = "Vampire"; // Ronstation - Modification - Uncomment this when testing vampire changes
3235
private static readonly ProtoId<StartingGearPrototype> PirateGearId = "PirateGear";
3336

3437
// All antag verbs have names so invokeverb works.
@@ -191,5 +194,22 @@ private void AddAntagVerbs(GetVerbsEvent<Verb> args)
191194

192195
if (HasComp<HumanoidAppearanceComponent>(args.Target)) // only humanoids can be cloned
193196
args.Verbs.Add(paradox);
197+
198+
// Ronstation modifications start - uncomment this when testing vampire changes
199+
var vampireName = Loc.GetString("admin-verb-make-vampire");
200+
Verb vampire = new()
201+
{
202+
Text = vampireName,
203+
Category = VerbCategory.Antag,
204+
Icon = new SpriteSpecifier.Rsi(new("/Textures/_Ronstation/Interface/Misc/job_icons.rsi"), "Vampire"),
205+
Act = () =>
206+
{
207+
_antag.ForceMakeAntag<VampireRuleComponent>(targetPlayer, DefaultVampireRule);
208+
},
209+
Impact = LogImpact.High,
210+
Message = string.Join(": ", vampireName, Loc.GetString("admin-verb-text-make-vampire")),
211+
};
212+
args.Verbs.Add(vampire);
213+
// Ronstation modifications end
194214
}
195215
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Content.Shared.Random;
2+
using Robust.Shared.Audio;
3+
using Robust.Shared.Prototypes;
4+
5+
namespace Content.Server._Ronstation.GameTicking.Rules.Components;
6+
7+
/// <summary>
8+
/// Game rule for vampires.
9+
/// </summary>
10+
[RegisterComponent, Access(typeof(VampireRuleSystem))]
11+
public sealed partial class VampireRuleComponent : Component;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using Content.Server.Antag;
2+
using Content.Server._Ronstation.GameTicking.Rules.Components;
3+
using Content.Server._Ronstation.Roles;
4+
using Content.Server.GameTicking.Rules;
5+
using Content.Server.GameTicking.Rules.Components;
6+
using Content.Server.Roles;
7+
using Content.Shared.Humanoid;
8+
using Content.Shared.Roles.Components;
9+
using Content.Shared._Ronstation.Vampire.Components;
10+
11+
12+
namespace Content.Server._Ronstation.GameTicking.Rules;
13+
14+
public sealed class VampireRuleSystem : GameRuleSystem<VampireRuleComponent>
15+
{
16+
[Dependency] private readonly AntagSelectionSystem _antagSystem = default!;
17+
public override void Initialize()
18+
{
19+
base.Initialize();
20+
21+
SubscribeLocalEvent<VampireRuleComponent, AfterAntagEntitySelectedEvent>(AfterAntagEntitySelected);
22+
SubscribeLocalEvent<VampireRuleComponent, GetBriefingEvent>(OnGetBriefing);
23+
}
24+
25+
private void AfterAntagEntitySelected(Entity<VampireRuleComponent> mindId, ref AfterAntagEntitySelectedEvent args)
26+
{
27+
var ent = args.EntityUid;
28+
_antagSystem.SendBriefing(ent, MakeBriefing(ent), null, null);
29+
}
30+
31+
// Character screen briefing
32+
private void OnGetBriefing(Entity<VampireRuleComponent> role, ref GetBriefingEvent args)
33+
{
34+
var ent = args.Mind.Comp.OwnedEntity;
35+
36+
if (ent is null)
37+
return;
38+
args.Append(MakeBriefing(ent.Value));
39+
}
40+
41+
private string MakeBriefing(EntityUid ent)
42+
{
43+
var briefing = Loc.GetString("vampire-role-greeting");
44+
45+
return briefing;
46+
}
47+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Content.Shared.Roles.Components;
2+
using Robust.Shared.GameStates;
3+
4+
namespace Content.Server._Ronstation.Roles;
5+
6+
/// <summary>
7+
/// Added to mind role entities to tag that they are a vampire.
8+
/// </summary>
9+
[RegisterComponent]
10+
public sealed partial class VampireRoleComponent : BaseMindRoleComponent;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using Content.Shared._Ronstation.Vampire.EntitySystems;
2+
3+
namespace Content.Server._Ronstation.Vampire.EntitySystems;
4+
5+
public sealed class VampireSystem : SharedVampireSystem;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Content.Shared.StatusIcon;
2+
using Robust.Shared.GameStates;
3+
using Robust.Shared.Prototypes;
4+
5+
namespace Content.Shared._Ronstation.Vampire.Components;
6+
7+
[RegisterComponent, NetworkedComponent]
8+
public sealed partial class VampireComponent : Component
9+
{
10+
11+
public override bool SessionSpecific => true;
12+
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Content.Shared._Ronstation.Vampire.Components;
2+
using Content.Shared.Actions;
3+
using Content.Shared.Antag;
4+
using Robust.Shared.GameStates;
5+
using Robust.Shared.Player;
6+
7+
namespace Content.Shared._Ronstation.Vampire.EntitySystems;
8+
9+
public abstract class SharedVampireSystem : EntitySystem
10+
{
11+
public override void Initialize()
12+
{
13+
base.Initialize();
14+
}
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
admin-verb-text-make-vampire = Make the target into a Vampire (DO NOT USE LIVE, NEEDS TO REMAIN SECRET).
2+
3+
admin-verb-make-vampire = Make Vampire (WIP)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
vampire-round-end-agent-name = vampire
2+
3+
objective-issuer-vampire = [color=mediumvioletred]Vampire[/color]
4+
5+
vampire-round-end = [color=white]{CAPITALIZE($name)}[/color] ([color=gray]{$username}[/color]) was a vampire.[/color]
6+
7+
vampire-role-greeting =
8+
You are a Vampire.
9+
You require the blood of the living to sustain yourself.
10+
11+
vampire-briefing = Sate your hunger, but be cautious not to reveal your presence to the crew.

0 commit comments

Comments
 (0)