@@ -1,7 +1,9 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Hands.Systems;
|
||||
using Content.Server.White.Other;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Item;
|
||||
using Robust.Server.Audio;
|
||||
@@ -90,6 +92,8 @@ public sealed class RandomGiftSystem : EntitySystem
|
||||
var itemCompName = _componentFactory.GetComponentName(typeof(ItemComponent));
|
||||
var mapGridCompName = _componentFactory.GetComponentName(typeof(MapGridComponent));
|
||||
var physicsCompName = _componentFactory.GetComponentName(typeof(PhysicsComponent));
|
||||
var giftIgnoreCompName = _componentFactory.GetComponentName(typeof(GiftIgnoreComponent)); // WD
|
||||
var unremovableCompName = _componentFactory.GetComponentName(typeof(UnremoveableComponent)); // WD
|
||||
|
||||
foreach (var proto in _prototype.EnumeratePrototypes<EntityPrototype>())
|
||||
{
|
||||
@@ -98,7 +102,9 @@ public sealed class RandomGiftSystem : EntitySystem
|
||||
|
||||
_possibleGiftsUnsafe.Add(proto.ID);
|
||||
|
||||
if (!proto.Components.ContainsKey(itemCompName) || proto.SetSuffix is "DEBUG" or "Admeme") // WD EDIT
|
||||
if (!proto.Components.ContainsKey(itemCompName) || proto.Components.ContainsKey(giftIgnoreCompName) ||
|
||||
proto.Components.ContainsKey(unremovableCompName) || proto.SetSuffix != null &&
|
||||
(proto.SetSuffix.Contains("DEBUG") || proto.SetSuffix.Contains("Admeme"))) // WD EDIT
|
||||
continue;
|
||||
|
||||
_possibleGiftsSafe.Add(proto.ID);
|
||||
|
||||
9
Content.Server/White/Animations/DancingComponent.cs
Normal file
9
Content.Server/White/Animations/DancingComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Content.Server.Animations;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class DancingComponent : Component
|
||||
{
|
||||
public float AccumulatedFrametime;
|
||||
|
||||
public float NextDelay;
|
||||
}
|
||||
54
Content.Server/White/Animations/DancingSystem.cs
Normal file
54
Content.Server/White/Animations/DancingSystem.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Content.Shared.Animations;
|
||||
using Content.Shared.Bed.Sleep;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Animations;
|
||||
|
||||
public sealed class DancingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly EmoteAnimationSystem _emoteAnimation = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
|
||||
private readonly string[] _emoteList = {"EmoteFlip", "EmoteTurn"};
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<DancingComponent, ComponentInit>(OnInit);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, DancingComponent component, ComponentInit args)
|
||||
{
|
||||
ResetDelay(component);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
var query = EntityQueryEnumerator<DancingComponent, EmoteAnimationComponent, MobStateComponent>();
|
||||
|
||||
while (query.MoveNext(out var uid, out var dancing, out var emote, out var mobState))
|
||||
{
|
||||
if (!_mobState.IsAlive(uid, mobState) || HasComp<SleepingComponent>(uid))
|
||||
continue;
|
||||
|
||||
dancing.AccumulatedFrametime += frameTime;
|
||||
|
||||
if (dancing.AccumulatedFrametime < dancing.NextDelay)
|
||||
continue;
|
||||
|
||||
dancing.AccumulatedFrametime -= dancing.NextDelay;
|
||||
|
||||
ResetDelay(dancing);
|
||||
|
||||
_emoteAnimation.PlayEmoteAnimation(uid, emote, _random.Pick(_emoteList));
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetDelay(DancingComponent component)
|
||||
{
|
||||
component.NextDelay = _random.NextFloat() + 0.2f;
|
||||
}
|
||||
}
|
||||
@@ -18,14 +18,14 @@ public sealed class BombassAspect : AspectSystem<BombassAspectComponent>
|
||||
|
||||
private void SpawnMines()
|
||||
{
|
||||
var minMines = _random.Next(35, 100);
|
||||
var minMines = _random.Next(30, 50);
|
||||
|
||||
for (var i = 0; i < minMines; i++)
|
||||
{
|
||||
if (!TryFindRandomTile(out _, out _, out _, out var targetCoords))
|
||||
break;
|
||||
|
||||
EntityManager.SpawnEntity("LandMineExplosive", targetCoords);
|
||||
EntityManager.SpawnEntity("LandMineAspectExplosive", targetCoords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Server.White.AspectsSystem.Aspects.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class DancingAspectComponent : Component
|
||||
{
|
||||
}
|
||||
45
Content.Server/White/AspectsSystem/Aspects/DancingAspect.cs
Normal file
45
Content.Server/White/AspectsSystem/Aspects/DancingAspect.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Content.Server.Animations;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.White.AspectsSystem.Aspects.Components;
|
||||
using Content.Server.White.AspectsSystem.Base;
|
||||
using Content.Shared.Animations;
|
||||
using Content.Shared.Mobs.Components;
|
||||
|
||||
namespace Content.Server.White.AspectsSystem.Aspects;
|
||||
|
||||
public sealed class DancingAspect : AspectSystem<DancingAspectComponent>
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<PlayerSpawnCompleteEvent>(HandleLateJoin);
|
||||
}
|
||||
|
||||
protected override void Started(EntityUid uid, DancingAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
||||
{
|
||||
base.Started(uid, component, gameRule, args);
|
||||
var query = EntityQueryEnumerator<EmoteAnimationComponent, MobStateComponent>();
|
||||
while (query.MoveNext(out var ent, out _, out _))
|
||||
{
|
||||
EnsureComp<DancingComponent>(ent);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleLateJoin(PlayerSpawnCompleteEvent ev)
|
||||
{
|
||||
var query = EntityQueryEnumerator<DancingAspectComponent, GameRuleComponent>();
|
||||
while (query.MoveNext(out var ruleEntity, out _, out var gameRule))
|
||||
{
|
||||
if (!GameTicker.IsGameRuleAdded(ruleEntity, gameRule))
|
||||
continue;
|
||||
|
||||
if (!ev.LateJoin)
|
||||
return;
|
||||
|
||||
var mob = ev.Mob;
|
||||
|
||||
EnsureComp<DancingComponent>(mob);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public sealed class PresentAspect : AspectSystem<PresentAspectComponent>
|
||||
|
||||
private void SpawnPresents()
|
||||
{
|
||||
var minPresents = _random.Next(70, 200);
|
||||
var minPresents = _random.Next(150, 200);
|
||||
|
||||
for (var i = 0; i < minPresents; i++)
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Content.Server.White.AspectsSystem.Aspects
|
||||
}
|
||||
}
|
||||
|
||||
_chatSystem.DispatchGlobalAnnouncement(msg, "Мяукиман Крысус");
|
||||
_chatSystem.DispatchGlobalAnnouncement(msg, "Мяукиман Крысус", colorOverride: Color.Aquamarine);
|
||||
|
||||
ForceEndSelf(uid, rule);
|
||||
}
|
||||
|
||||
6
Content.Server/White/Other/GiftIgnoreComponent.cs
Normal file
6
Content.Server/White/Other/GiftIgnoreComponent.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Content.Server.White.Other;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class GiftIgnoreComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -812,7 +812,7 @@
|
||||
damageCoefficient: 0.2
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitDeathsquad
|
||||
|
||||
- type: GiftIgnore
|
||||
|
||||
#CBURN Hardsuit
|
||||
- type: entity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- type: entity
|
||||
- type: entity
|
||||
id: BaseLandMine
|
||||
abstract: true
|
||||
components:
|
||||
@@ -67,8 +67,22 @@
|
||||
- type: ExplodeOnTrigger
|
||||
- type: Explosive
|
||||
explosionType: Default
|
||||
maxIntensity: 3
|
||||
intensitySlope: 1
|
||||
totalIntensity: 120
|
||||
maxIntensity: 10
|
||||
intensitySlope: 3
|
||||
totalIntensity: 120 # about a ~4 tile radius
|
||||
canCreateVacuum: false
|
||||
- type: DeleteOnTrigger
|
||||
|
||||
- type: entity
|
||||
name: мина аспекта
|
||||
parent: BaseLandMine
|
||||
id: LandMineAspectExplosive
|
||||
components:
|
||||
- type: ExplodeOnTrigger
|
||||
- type: Explosive
|
||||
explosionType: Default
|
||||
maxIntensity: 4
|
||||
intensitySlope: 2
|
||||
totalIntensity: 25
|
||||
canCreateVacuum: false
|
||||
- type: DeleteOnTrigger
|
||||
|
||||
@@ -192,3 +192,16 @@
|
||||
startAudio:
|
||||
path: /Audio/White/Aspects/accent.ogg
|
||||
- type: PresentAspect
|
||||
|
||||
- type: entity
|
||||
id: DancingAspect
|
||||
parent: BaseGameRule
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: Aspect
|
||||
name: "Dance"
|
||||
description: "Танцуют все!"
|
||||
weight: 3
|
||||
startAudio:
|
||||
path: /Audio/White/Aspects/accent.ogg
|
||||
- type: DancingAspect
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
sprite: White/Fluff/centurion/deathsquad.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetCapDeathSquadFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitCap
|
||||
@@ -37,6 +38,7 @@
|
||||
sprite: White/Fluff/centurion/deathsquad.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitEngineeringWhiteDeathSquadFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitEngineeringWhite
|
||||
@@ -63,6 +65,7 @@
|
||||
sprite: White/Fluff/centurion/deathsquad.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitMedicalDeathSquadFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitMedical
|
||||
@@ -89,6 +92,7 @@
|
||||
sprite: White/Fluff/centurion/deathsquad.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitSecurityRedDeathSquadFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitSecurityRed
|
||||
@@ -115,6 +119,7 @@
|
||||
sprite: White/Fluff/centurion/deathsquad.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitRdDeathSquadFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
# Utilizator
|
||||
- type: entity
|
||||
@@ -129,6 +134,7 @@
|
||||
sprite: White/Fluff/centurion/breacher.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitSalvageCenturion
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitSalvage
|
||||
@@ -140,6 +146,7 @@
|
||||
sprite: White/Fluff/centurion/breacher-helmet.rsi
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/centurion/breacher-helmet.rsi
|
||||
- type: GiftIgnore
|
||||
|
||||
# Security
|
||||
- type: entity
|
||||
@@ -154,6 +161,7 @@
|
||||
sprite: White/Fluff/centurion/breacher.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitSecurityCenturion
|
||||
- type: GiftIgnore
|
||||
|
||||
# poxuy
|
||||
|
||||
@@ -176,6 +184,7 @@
|
||||
sprite: White/Fluff/centurion/breacher-helmet.rsi
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/centurion/breacher-helmet.rsi
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitRd
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
toggleable-clothing: !type:ContainerSlot {}
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterHardsuitEVA
|
||||
@@ -35,6 +36,7 @@
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
toggleable-clothing: !type:ContainerSlot { }
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetEVA
|
||||
@@ -46,6 +48,7 @@
|
||||
sprite: White/Fluff/DOOMMAX/helmetglamour.rsi
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/DOOMMAX/helmetglamour.rsi
|
||||
- type: GiftIgnore
|
||||
|
||||
# Maury
|
||||
- type: entity
|
||||
@@ -134,6 +137,7 @@
|
||||
sprite: White/Fluff/YouWellLeer/hoshardsuit.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: LeerHelmet
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitSecurityRed
|
||||
@@ -146,6 +150,7 @@
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/YouWellLeer/hoshelmet.rsi
|
||||
- type: PointLight
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingUniformJumpsuitHoS
|
||||
@@ -351,6 +356,7 @@
|
||||
damageCoefficient: 0.90
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitHskveezAtmos
|
||||
- type: GiftIgnore
|
||||
|
||||
|
||||
#Hskveez Atmospherics Hardsuit
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
toggleable-clothing: !type:ContainerSlot {}
|
||||
- type: GiftIgnore
|
||||
|
||||
#CAP
|
||||
- type: entity
|
||||
@@ -32,6 +33,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertleader.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitERTLeader
|
||||
- type: GiftIgnore
|
||||
|
||||
#CE
|
||||
- type: entity
|
||||
@@ -45,6 +47,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertengineer.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitERTEngineer
|
||||
- type: GiftIgnore
|
||||
|
||||
#CMO
|
||||
- type: entity
|
||||
@@ -58,6 +61,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertmedical.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitERTMedical
|
||||
- type: GiftIgnore
|
||||
|
||||
#SEC
|
||||
- type: entity
|
||||
@@ -71,6 +75,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertsecurity.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitERTSecurity
|
||||
- type: GiftIgnore
|
||||
|
||||
# RD
|
||||
- type: entity
|
||||
@@ -84,6 +89,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertjanitor.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitERTJanitor
|
||||
- type: GiftIgnore
|
||||
|
||||
# other
|
||||
- type: entity
|
||||
@@ -98,6 +104,7 @@
|
||||
sprite: Clothing/OuterClothing/Hardsuits/wizard.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetHardsuitWizard
|
||||
- type: GiftIgnore
|
||||
|
||||
|
||||
# Penis
|
||||
@@ -114,6 +121,7 @@
|
||||
sprite: White/Fluff/serbwo/suits/ertleader.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingOuterParamedicHelmetFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHardsuitWithLightBase
|
||||
@@ -125,6 +133,7 @@
|
||||
sprite: White/Fluff/serbwo/helmets/ertleader.rsi
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/serbwo/helmets/ertleader.rsi
|
||||
- type: GiftIgnore
|
||||
|
||||
|
||||
- type: entity
|
||||
@@ -139,6 +148,7 @@
|
||||
sprite: White/Fluff/serbwo/suits/ertmedical.rsi
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingOuterCargoHelmetFluff
|
||||
- type: GiftIgnore
|
||||
|
||||
- type: entity
|
||||
parent: ClothingHeadHelmetHardsuitSalvage
|
||||
@@ -150,6 +160,7 @@
|
||||
sprite: White/Fluff/serbwo/helmets/ertmedical.rsi
|
||||
- type: Clothing
|
||||
sprite: White/Fluff/serbwo/helmets/ertmedical.rsi
|
||||
- type: GiftIgnore
|
||||
|
||||
# KILL ME PLEASE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user