Cult stuff (#249)
* - tweak: Change sounds. * - tweak: Update stun desc. * - add: Add hint. * - tweak: Change juggernaut ability. * - add: Constructs can't harm allies. * - add: Name identifier for constructs. * - add: Pylon now produces oxygen. * - tweak: Change sledgehammer sound. * - tweak: Increase conceal presence audio max distance.
This commit is contained in:
@@ -79,6 +79,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
private void OnGetBriefing(Entity<CultistRoleComponent> ent, ref GetBriefingEvent args)
|
||||
{
|
||||
args.Append(Loc.GetString("cult-role-briefing-short"));
|
||||
args.Append(Loc.GetString("cult-role-briefing-hint"));
|
||||
}
|
||||
|
||||
private void OnCultistsStateChanged(EntityUid uid, CultistComponent component, MobStateChangedEvent ev)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Atmos.Piping.Other.Components;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Maps;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -11,7 +11,6 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Pylon;
|
||||
using Content.Shared._White.Cult.Systems;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -55,9 +54,7 @@ public sealed class PylonSystem : EntitySystem
|
||||
|
||||
private void OnConceal(Entity<SharedPylonComponent> ent, ref ConcealEvent args)
|
||||
{
|
||||
ent.Comp.Activated = !args.Conceal;
|
||||
UpdateAppearance(ent, ent.Comp);
|
||||
_pointLight.SetEnabled(ent, !args.Conceal);
|
||||
SetActivated(ent, ent.Comp, !args.Conceal);
|
||||
_physics.SetCanCollide(ent, !args.Conceal);
|
||||
}
|
||||
|
||||
@@ -229,12 +226,7 @@ public sealed class PylonSystem : EntitySystem
|
||||
|
||||
if (HasComp<CultistComponent>(user))
|
||||
{
|
||||
comp.Activated = !comp.Activated;
|
||||
|
||||
UpdateAppearance(uid, comp);
|
||||
|
||||
_pointLight.SetEnabled(uid, comp.Activated);
|
||||
|
||||
SetActivated(uid, comp, !comp.Activated);
|
||||
var toggleMsg = Loc.GetString(comp.Activated ? "pylon-toggle-on" : "pylon-toggle-off");
|
||||
_popupSystem.PopupEntity(toggleMsg, uid);
|
||||
return;
|
||||
@@ -272,4 +264,16 @@ public sealed class PylonSystem : EntitySystem
|
||||
|
||||
_appearance.SetData(uid, PylonVisuals.Activated, comp.Activated, appearance);
|
||||
}
|
||||
|
||||
private void SetActivated(EntityUid uid, SharedPylonComponent comp, bool activated)
|
||||
{
|
||||
comp.Activated = activated;
|
||||
|
||||
if (TryComp(uid, out GasMinerComponent? miner))
|
||||
miner.Enabled = activated;
|
||||
|
||||
UpdateAppearance(uid, comp);
|
||||
|
||||
_pointLight.SetEnabled(uid, activated);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ public partial class CultSystem
|
||||
if (success)
|
||||
{
|
||||
_audio.PlayPvs(conceal ? "/Audio/White/Cult/smoke.ogg" : "/Audio/White/Cult/enter_blood.ogg", uid,
|
||||
AudioParams.Default.WithMaxDistance(2f));
|
||||
AudioParams.Default.WithMaxDistance(5f));
|
||||
_bloodstreamSystem.TryModifyBloodLevel(uid, -2, bloodstream, createPuddle: false);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using System.Linq;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared._White.Cult.UI;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -19,6 +22,13 @@ public partial class CultSystem
|
||||
SubscribeLocalEvent<ConstructShellComponent, ComponentInit>(OnShellInit);
|
||||
SubscribeLocalEvent<ConstructShellComponent, ComponentRemove>(OnShellRemove);
|
||||
SubscribeLocalEvent<ConstructShellComponent, ConstructFormSelectedEvent>(OnShellSelected);
|
||||
SubscribeLocalEvent<ConstructComponent, MeleeHitEvent>(OnMeleeHit);
|
||||
}
|
||||
|
||||
private void OnMeleeHit(Entity<ConstructComponent> ent, ref MeleeHitEvent args)
|
||||
{
|
||||
if (args.HitEntities.Any(e => HasComp<CultistComponent>(e) || HasComp<ConstructComponent>(e)))
|
||||
args.BonusDamage = -args.BaseDamage;
|
||||
}
|
||||
|
||||
private void OnShellSelected(EntityUid uid, ConstructShellComponent component, ConstructFormSelectedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user