Skip to content

Commit

Permalink
Aliens greeting text
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai518 committed May 17, 2024
1 parent c55e06a commit f473692
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Content.Server/Aliens/Systems/AlienInfectedSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
using Content.Shared.Gibbing.Components;
using Content.Shared.Gibbing.Events;
using Content.Shared.Gibbing.Systems;
using Content.Shared.Inventory.Events;
using Content.Shared.Mobs;
using Content.Shared.Random;
using Content.Shared.StatusIcon;
using Content.Shared.StatusIcon.Components;
using FastAccessors;
using Robust.Shared.Containers;
using Robust.Shared.Random;
Expand All @@ -33,9 +36,7 @@ public sealed class AlienInfectedSystem : EntitySystem
[Dependency] private readonly BodySystem _body = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly GhostRoleSystem _ghostRole = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] protected readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
public override void Initialize()
{
base.Initialize();
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Aliens/Systems/AlienQueenSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void OnRoyalLarva(EntityUid uid, AlienQueenComponent component, RoyalLarv
HasComp<QueenEvolutionComponent>(args.Target) ||
HasComp<AlienQueenComponent>(args.Target))
{
_popup.PopupEntity(Loc.GetString("alien-evolution-fail"), uid, uid);
_popup.PopupEntity(Loc.GetString("alien-promotion-fail"), uid, uid);
return;
}

Expand Down
43 changes: 43 additions & 0 deletions Content.Server/Aliens/Systems/AlienSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
using Content.Server.Actions;
using Content.Server.Aliens.Systems;
using Content.Server.Animals.Components;
using Content.Server.Chat.Managers;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Mind;
using Content.Server.NPC.HTN;
using Content.Server.Popups;
using Content.Server.Roles;
using Content.Shared.Aliens;
using Content.Shared.Aliens.Components;
using Content.Shared.Aliens.Systems;
Expand All @@ -13,12 +18,16 @@
using Content.Shared.DoAfter;
using Content.Shared.Item;
using Content.Shared.Maps;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Physics;
using Content.Shared.Players;
using Content.Shared.Tag;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Player;
using AlienComponent = Content.Shared.Aliens.Components.AlienComponent;

namespace Content.Server.Aliens.Systems;
Expand All @@ -36,6 +45,9 @@ public sealed class AlienSystem : EntitySystem
[Dependency] private readonly IMapManager _mapMan = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedPlasmaVesselSystem _plasmaVessel = default!;
[Dependency] private readonly RoleSystem _role = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] private readonly IChatManager _chatMan = default!;

/// <inheritdoc/>
public override void Initialize()
Expand All @@ -45,12 +57,43 @@ public override void Initialize()
SubscribeLocalEvent<AlienComponent, PickupAttemptEvent>(OnPickup);
SubscribeLocalEvent<AlienComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<AlienComponent, WeednodeActionEvent>(OnNode);
SubscribeLocalEvent<AlienComponent, PlayerAttachedEvent>(OnTakeRole);
}

private void OnMapInit(EntityUid uid, AlienComponent component, MapInitEvent args)
{
_actions.AddAction(uid, ref component.ToggleLightingActionEntity, component.ToggleLightingAction);
_actions.AddAction(uid, ref component.WeednodeActionEntity, component.WeednodeAction);

}

private void OnTakeRole(EntityUid uid, AlienComponent component, PlayerAttachedEvent args)
{
switch (component.Caste)
{
case "larva":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-role-greeting"));
break;
case "drone":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-drone-greeting"));
break;
case "sentinel":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-sentinel-greeting"));
break;
case "hunter":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-hunter-greeting"));
break;
case "praetorian":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-praetorian-greeting"));
break;
case "queen":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-queen-greeting"));
break;
case "maid":
_chatMan.DispatchServerMessage(args.Player, Loc.GetString("alien-maid-greeting"));
break;
}

}

private void OnPickup(EntityUid uid, AlienComponent component, PickupAttemptEvent args)
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Aliens/Components/AlienComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public sealed partial class AlienComponent : Component
[DataField("nodeAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? WeednodeAction = "ActionAlienNode";


[DataField]
public string Caste;

[DataField("nodeActionEntity")] public EntityUid? WeednodeActionEntity;

Expand Down
12 changes: 12 additions & 0 deletions Content.Shared/Aliens/Components/AlienRoleComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Content.Shared.Roles;

namespace Content.Shared.Aliens.Components;

/// <summary>
/// This is used for...
/// </summary>
[RegisterComponent, ExclusiveAntagonist]
public sealed partial class AlienRoleComponent : AntagonistRoleComponent
{

}
3 changes: 1 addition & 2 deletions Content.Shared/Aliens/Systems/SharedPlasmaVesselSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public bool ChangePlasmaAmount(EntityUid uid, FixedPoint2 amount, PlasmaVesselCo
}
if(amount != component.PlasmaUnmodified && amount != component.WeedModifier)
{
_popup.PopupEntity(Loc.GetString("alien-left-plasma-part1") + component.Plasma + Loc.GetString("alien-left-plama-part2"),
uid);
_popup.PopupEntity(Loc.GetString("alien-plasma-left", ("value", component.Plasma)), uid, uid);
}

_alerts.ShowAlert(uid, AlertType.PlasmaCounter, (short) Math.Clamp(Math.Round(component.Plasma.Float() / 50f), 0, 10));
Expand Down
5 changes: 3 additions & 2 deletions Resources/Locale/en-US/abilities/alien.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ action-tail-lash-desc = Stun nearby enemies with your tail.
action-transfer-plasma-alien = Transfer plasma
action-transfer-plasma-alien-desc = Transfer 50 plasma to nearby sister.
alien-left-plasma-part1 = You have
alien-left-plama-part2 = plasma left for use.
alien-left-plasma = You have {$value} left for use.
alien-create-structure-failed = You can't create structure here.
alien-action-fail-plasma = You don't have enough plasma to make this.
Expand All @@ -66,3 +65,5 @@ action-alien-jump = Leap
action-alien-jump-desc = Leap onto your enemies stunning them.
alien-evolution-fail = There is a royal xenomorph alreagy.
alerts-promotion-fail = This daughter is already a royal xenomorph.
12 changes: 12 additions & 0 deletions Resources/Locale/en-US/aliens/alien.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,15 @@ station-event-alien-infestation-anouncement = Unidentified lifesigns detected co
hud-chatbox-select-channel-XenoHivemind = Hivemind
ghost-role-information-alien-larva-inside-description = Become an alien larva that is going to burst out.
alien-role-greeting = You are an alien larva. Help your hive to expand. You can contact your hive adding "a" to beginning of your message. If you are first alien - find place for a new hive and evolve into drone.
alien-hunter-greeting = You are an alien hunter. Find facehuggers, throw them at your preys. Devour people and get them to your hive.
alien-drone-greeting = You are an alien drone. Build your hive, evolve into praetorian, if you are first.
alien-sentinel-greeting = You are an alien sentinel. Defend your hive, fight off intruders.
alien-praetorian-greeting = You are an alien praetorian. Defend your queen. Help build new hives. Evolve into queen if there isn't one yet.
alien-queen-greeting = You are an alien queen. Command your hive, lay eggs. STAY FUKKEN' ALIVE.
alien-maid-greeting = You are an alien maid. Be lusty. Do most important job in your hive - seduce fellow spaceman.
alerts-plasma-name = Plasma
alerts-plasma-desc = Your body is syntesizing plasma, that you can use for your abilities
14 changes: 13 additions & 1 deletion Resources/Prototypes/Entities/Mobs/Player/aliens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
- Critical
- Dead
- type: Alien
caste: larva
weedHeal:
groups:
Burn: -5
Expand Down Expand Up @@ -351,6 +352,7 @@
- Critical
- Dead
- type: Alien
caste: drone
weedHeal:
groups:
Burn: -5
Expand Down Expand Up @@ -424,6 +426,8 @@
id: MobAlienSentinel
parent: MobAlienBase
components:
- type: Alien
caste: sentinel
- type: AlienStalk
- type: AcidMaker
action: ActionMakeAcid
Expand Down Expand Up @@ -495,6 +499,8 @@
id: MobAlienPraetorian
parent: MobAlienBase
components:
- type: Alien
caste: praetorian
- type: AcidMaker
action: ActionMakeAcid
entityProduced: AlienAcid
Expand Down Expand Up @@ -573,6 +579,8 @@
id: MobAlienHunter
parent: MobAlienBase
components:
- type: Alien
caste: hunter
- type: Sprite
drawdepth: Mobs
sprite: Mobs/Aliens/Xenos/alien.rsi
Expand Down Expand Up @@ -647,6 +655,8 @@
id: MobAlienQueen
parent: MobAlienBase
components:
- type: Alien
caste: queen
- type: Sprite
drawdepth: Mobs
sprite: Mobs/Aliens/Xenos/alienqueen.rsi
Expand Down Expand Up @@ -716,11 +726,13 @@
- type: TailLash

- type: entity
name: Lusty alien maiden
name: Lusty alien maid
description: Don't ask it to lay eggs in you.
id: MobAlieMaiden
parent: MobAlienBase
components:
- type: Alien
caste: maid
- type: PlasmaVessel
plasmaPerSecond: 5
plasmaModified: 40
Expand Down

0 comments on commit f473692

Please sign in to comment.