Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Щиткоддинг Tsd develop #774

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
88715bd
одготовил супер-пупер крутой эффект спавна Тайм патруля
Schrodinger71 Apr 11, 2024
ee7599f
заготовки под сущность и экипу
Schrodinger71 Apr 11, 2024
d58f230
опять заготовки в экиппу
Schrodinger71 Apr 11, 2024
f8cf02c
New action electronnic
Schrodinger71 Apr 11, 2024
34dcb1a
Правим код
Schrodinger71 Apr 11, 2024
3ffb4c0
a
Schrodinger71 Apr 11, 2024
2cb6c05
Снова щиткод
Schrodinger71 Apr 11, 2024
c5d9904
Снова щиткод2
Schrodinger71 Apr 11, 2024
ca1d036
Снова щиткод3
Schrodinger71 Apr 11, 2024
dc9987c
Снова щиткод4
Schrodinger71 Apr 11, 2024
450712a
Щит код 5
Schrodinger71 Apr 12, 2024
ed236f9
правим YAML
Schrodinger71 Apr 12, 2024
24a156e
нащиткодил и сделал много костылей
Schrodinger71 Apr 12, 2024
f07b72a
берите у меня мастер-класс по щиткоду
Schrodinger71 Apr 13, 2024
64c429e
Опять правим
Schrodinger71 Apr 13, 2024
5860758
много ЩИТ КОДА ШО ПИЗДЕЦ
Schrodinger71 Apr 13, 2024
e47c17b
to
Schrodinger71 Apr 14, 2024
cdba627
d
Schrodinger71 Apr 14, 2024
b8dba5e
опять заготовки под скаф
Schrodinger71 Apr 14, 2024
b1d7b61
Закинул скаф
Schrodinger71 Apr 18, 2024
d0f0e15
Звуки
Schrodinger71 Apr 21, 2024
8526bc0
поправка исчезновения
Schrodinger71 Apr 21, 2024
cb3dee4
Закинул текстурки оружия, переводы
Schrodinger71 Apr 28, 2024
558621d
Мелкий фикс, меняем abstract: true на noSpawn
Schrodinger71 Apr 28, 2024
a1a74e4
Merge branch 'master' into tsd_develop
Schrodinger71 Apr 28, 2024
3d787a4
mind flusher
modern-nm Jun 24, 2024
c2ea6cf
Merge branch 'master' into tsd_develop
Schrodinger71 Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions Content.Client/ADT/ShowMessageOnItemUse/AdtAmnesiaEui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
using System.Numerics;
using Content.Client.Eui;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using static Robust.Client.UserInterface.Controls.BoxContainer;

public sealed partial class AdtAmnesiaEui : BaseEui
{
private readonly AdtAmnesiaWindow _window;

public AdtAmnesiaEui()
{
_window = new();
_window.OkButton.OnPressed += _ =>
{
_window.Close();
};
}

public override void Opened()
{
IoCManager.Resolve<IClyde>().RequestWindowAttention();
_window.OpenCentered();
base.Opened();
}

public override void Closed()
{
_window.Close();
}
}

public sealed class AdtAmnesiaWindow : DefaultWindow
{
public readonly Button OkButton;

public AdtAmnesiaWindow()
{
Title = Loc.GetString("accept-adt_amnesia-window-title");

Contents.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new Label()
{
Text = Loc.GetString("adt_amnesia-window-prompt-text-part")
},
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children =
{
(OkButton = new Button
{
Text = "OK",
}),

new Control()
{
MinSize = new Vector2(20, 0)
},
}
},
}
},
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,49 @@
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Robust.Shared.Containers;
using Content.Server.Electrocution;
using Content.Server.Lightning;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components;
using Content.Shared.StatusEffect;
using Robust.Shared.Timing;
using Content.Server.Anomaly.Effects;
using Content.Shared.Actions.Events;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Content.Server.Electrocution;
using Content.Server.Emp;
using Content.Server.Lightning;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects.Components;
using Content.Shared.StatusEffect;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Content.Server.Spawners.Components;
using Robust.Shared.Spawners;
using Content.Server.Spawners.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Content.Server.Chat;
using Content.Server.Chat.Systems;
using Content.Shared.Chat.Prototypes;
using Content.Shared.Singularity.EntitySystems;
using Robust.Shared.GameStates;
using Content.Shared.Singularity.Components;
using Content.Shared.ADT.PointLightColorBlue;
using Content.Shared.Interaction.Components;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using System.Timers;
using System.ComponentModel;
using System.Linq;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.Server.GameObjects;


namespace Content.Server.ComponentalActions.EntitySystems;

Expand Down Expand Up @@ -94,6 +137,12 @@ public sealed partial class ComponentalActionsSystem
[Dependency] private readonly ClothingSpeedModifierSystem _clothingSpeedModifier = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly LightningSystem _lightning = default!;
[Dependency] private readonly ElectrocutionSystem _electrocution = default!;
[Dependency] private readonly SpawnOnDespawnSystem _timeDespawnUid = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly PointLightSystem _light = default!;
private void InitializeCompAbilities()
{
SubscribeLocalEvent<TeleportActComponent, CompTeleportActionEvent>(OnTeleport);
Expand All @@ -103,9 +152,7 @@ private void InitializeCompAbilities()
SubscribeLocalEvent<StasisHealActComponent, CompStasisHealActionEvent>(OnStasisHeal);
SubscribeLocalEvent<InvisibilityActComponent, CompInvisibilityActionEvent>(OnInvisibility);
SubscribeLocalEvent<LevitationActComponent, CompGravitationActionEvent>(OnMagGravity);
// SubscribeLocalEvent<LevitationActComponent, GetVerbsEvent<ActivationVerb>>(AddToggleVerb);
// SubscribeLocalEvent<LevitationActComponent, InventoryRelayedEvent<SlipAttemptEvent>>(OnSlipAttempt);
// SubscribeLocalEvent<LevitationActComponent, GetItemActionsEvent>(OnGetActions);
SubscribeLocalEvent<ElectrionPulseActComponent, CompElectrionPulseActionEvent>(OnElectrionPulse);
}

public override void Update(float frameTime)
Expand Down Expand Up @@ -364,4 +411,30 @@ private void ToggleLevitation(EntityUid uid, LevitationActComponent component)
}
}

private void OnElectrionPulse(EntityUid uid, ElectrionPulseActComponent component, CompElectrionPulseActionEvent args)
{
if (args.Handled)
return;
_chat.TrySendInGameICMessage(uid, "щёлкает пальцами", InGameICChatType.Emote, ChatTransmitRange.Normal);

// Создаем таймер для задержки
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 3000; // 3 секунды
timer.AutoReset = false; // Для однократного срабатывания
timer.Elapsed += (sender, e) =>
{
//AddComp<SingularityDistortionComponent>(uid);
AddComp<PointLightComponent>(uid);
_light.SetEnabled(uid, true);
_light.SetColor(uid, Color.FromHex("#a83da8"));
_light.SetRadius(uid, 1.7f);
_light.SetEnergy(uid, 160f);
_audio.PlayPvs(component.IgniteSound, uid);
var despawn = AddComp<TimedDespawnComponent>(uid);
despawn.Lifetime = 0.7f;
};
timer.Start();

args.Handled = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public override void Initialize()
SubscribeLocalEvent<LevitationActComponent, MapInitEvent>(OnMagGravInit);
SubscribeLocalEvent<LevitationActComponent, ComponentShutdown>(OnMagGravShutdown);

SubscribeLocalEvent<ElectrionPulseActComponent, MapInitEvent>(OnElectrionPulseInit);
SubscribeLocalEvent<ElectrionPulseActComponent, ComponentShutdown>(OnElectrionPulseShutdown);

InitializeCompAbilities();
}

Expand Down Expand Up @@ -148,4 +151,15 @@ private void OnMagGravShutdown(EntityUid uid, LevitationActComponent component,
{
_action.RemoveAction(uid, component.ActionEntity);
}

private void OnElectrionPulseInit(EntityUid uid, ElectrionPulseActComponent component, MapInitEvent args)
{
_action.AddAction(uid, ref component.ActionEntity, component.Action);
}
private void OnElectrionPulseShutdown(EntityUid uid, ElectrionPulseActComponent component, ComponentShutdown args)
{
_action.RemoveAction(uid, component.ActionEntity);
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Content.Server.Administration.Commands;
using Content.Server.Popups;
using Content.Shared.Popups;
using Content.Shared.Mobs;
using Content.Server.Chat;
using Content.Server.Chat.Systems;
using Content.Shared.Chat.Prototypes;
using Robust.Shared.Random;
using Content.Shared.Stunnable;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Damage;
using Robust.Shared.Prototypes;
using Content.Server.Emoting.Systems;
using Content.Server.Speech.EntitySystems;
using Content.Shared.ADT.PointLightColorBlue;
using Content.Shared.Interaction.Components;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using System.Timers;
using System.ComponentModel;
using System.Linq;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;

public sealed class PointLightColorBlueSystem : EntitySystem
{
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly PointLightSystem _light = default!;

//[Dependency] private readonly PointLightComponent _lightCom = = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PointLightColorBlueComponent, ComponentStartup>(OnComponentStartup);
//SubscribeLocalEvent<PointLightColorBlueComponent, MobStateChangedEvent>(OnMobState);
}
// /// <summary>
// /// On death removes active comps.
// /// </summary>
// private void OnMobState(EntityUid uid, PointLightColorBlueComponent component, MobStateChangedEvent args)
// {
// if (args.NewMobState == MobState.Dead || component == null)
// {
// RemComp<PointLightColorBlueComponent>(uid);
// //var damageSpec = new DamageSpecifier(_prototypeManager.Index<DamageGroupPrototype>("Genetic"), 300);
// //_damageableSystem.TryChangeDamage(uid, damageSpec);
// }
// }
private void OnComponentStartup(EntityUid uid, PointLightColorBlueComponent component, ComponentStartup args)
{
AddComp<PointLightComponent>(uid);
_light.SetEnabled(uid, true);
_light.SetColor(uid, Color.FromHex("#005f9e"));
_light.SetRadius(uid, 1.2f);
_light.SetEnergy(uid, 160f);
_audioSystem.PlayPvs(component.Sound, uid); //, AudioParams.Default.WithVolume(component.Sound));
//_light.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using Content.Server.EUI;
using Content.Server.Mind;
using Content.Shared.Charges.Components;
using Content.Shared.Charges.Systems;
using Content.Shared.Flash;
using Content.Shared.Interaction.Events;
using Content.Shared.Mind.Components;

namespace Content.Server.ADT.ShowMessageOnItemUse;

public sealed partial class ShowMessageOnItemUseSystem : EntitySystem
{
[Dependency] private readonly EuiManager _euiManager = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly SharedChargesSystem _charges = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MindFlushComponent, UseInHandEvent>(ItemUsed);
}

private void ItemUsed(EntityUid uid, MindFlushComponent component, UseInHandEvent args)
{
if (TryComp<LimitedChargesComponent>(uid, out var charges))
if (_charges.IsEmpty(uid, charges))
return;

var transform = EntityManager.GetComponent<TransformComponent>(uid);
var flashableQuery = GetEntityQuery<FlashableComponent>();

foreach (var entity in _entityLookup.GetEntitiesInRange(transform.Coordinates, component.Range))
{
if (!flashableQuery.TryGetComponent(entity, out var _))
continue;
if (entity == args.User)
continue;
if (TryComp<MindContainerComponent>(entity, out var mindContainer))
{
if (_mind.TryGetSession(mindContainer.Mind, out var session))
{
_euiManager.OpenEui(new AdtAmnesiaEui(), session);
Console.WriteLine($"entity {entity} mind was flushed.");
}
}

}
}
}

public sealed class AdtAmnesiaEui : BaseEui
{
}
Loading
Loading