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

Commit 99a257a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into add-lockers-to-animate-blacklist
2 parents 9f6e212 + 17c73d2 commit 99a257a

9 files changed

Lines changed: 91 additions & 262 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Content.Shared.Actions;
2+
using Content.Shared.Damage;
3+
4+
namespace Content.Shared.Magic.Events;
5+
6+
public sealed partial class CellularSmiteSpellEvent : EntityTargetActionEvent
7+
{
8+
//<summary>
9+
// Damage that the smite spell will do.
10+
//</summary>
11+
[DataField]
12+
public DamageSpecifier smiteDamage = new();
13+
}

Content.Shared/Magic/SharedMagicSystem.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
using Content.Shared.Body.Components;
33
using Content.Shared.Body.Systems;
44
using Content.Shared.Coordinates.Helpers;
5+
using Content.Shared.Damage;
6+
using Content.Shared.Damage.Systems;
57
using Content.Shared.Doors.Components;
68
using Content.Shared.Doors.Systems;
79
using Content.Shared.Hands.Components;
810
using Content.Shared.Hands.EntitySystems;
911
using Content.Shared.Interaction;
1012
using Content.Shared.Inventory;
13+
using Content.Shared.Jittering;
1114
using Content.Shared.Lock;
1215
using Content.Shared.Magic.Components;
1316
using Content.Shared.Magic.Events;
1417
using Content.Shared.Maps;
1518
using Content.Shared.Mind;
19+
using Content.Shared.Mobs;
20+
using Content.Shared.Mobs.Components;
21+
using Content.Shared.Mobs.Systems;
1622
using Content.Shared.Physics;
1723
using Content.Shared.Popups;
1824
using Content.Shared.Speech.Muting;
@@ -52,16 +58,19 @@ public abstract class SharedMagicSystem : EntitySystem
5258
[Dependency] private readonly INetManager _net = default!;
5359
[Dependency] private readonly SharedBodySystem _body = default!;
5460
[Dependency] private readonly EntityLookupSystem _lookup = default!;
61+
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
5562
[Dependency] private readonly SharedDoorSystem _door = default!;
5663
[Dependency] private readonly InventorySystem _inventory = default!;
5764
[Dependency] private readonly SharedPopupSystem _popup = default!;
5865
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
66+
[Dependency] private readonly SharedJitteringSystem _jittering = default!;
5967
[Dependency] private readonly LockSystem _lock = default!;
6068
[Dependency] private readonly SharedHandsSystem _hands = default!;
6169
[Dependency] private readonly TagSystem _tag = default!;
6270
[Dependency] private readonly SharedAudioSystem _audio = default!;
6371
[Dependency] private readonly SharedMindSystem _mind = default!;
6472
[Dependency] private readonly SharedStunSystem _stun = default!;
73+
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
6574

6675
private static readonly ProtoId<TagPrototype> InvalidForGlobalSpawnSpellTag = "InvalidForGlobalSpawnSpell";
6776

@@ -76,6 +85,7 @@ public override void Initialize()
7685
SubscribeLocalEvent<ProjectileSpellEvent>(OnProjectileSpell);
7786
SubscribeLocalEvent<ChangeComponentsSpellEvent>(OnChangeComponentsSpell);
7887
SubscribeLocalEvent<SmiteSpellEvent>(OnSmiteSpell);
88+
SubscribeLocalEvent<CellularSmiteSpellEvent>(OnCellularSmiteSpell);
7989
SubscribeLocalEvent<KnockSpellEvent>(OnKnockSpell);
8090
SubscribeLocalEvent<ChargeSpellEvent>(OnChargeSpell);
8191
SubscribeLocalEvent<RandomGlobalSpawnSpellEvent>(OnRandomGlobalSpawnSpell);
@@ -391,6 +401,31 @@ private void OnSmiteSpell(SmiteSpellEvent ev)
391401
_body.GibBody(ev.Target, true, body);
392402
}
393403

404+
private void OnCellularSmiteSpell(CellularSmiteSpellEvent ev)
405+
{
406+
//Stacking genetic damage on people who are already downed or dead is cringe
407+
if (TryComp<DamageableComponent>(ev.Target, out var damageable) &&
408+
HasComp<MobStateComponent>(ev.Target)){
409+
if(_mobStateSystem.IsCritical(ev.Target))
410+
return;
411+
if(_mobStateSystem.IsDead(ev.Target))
412+
return;
413+
}
414+
if (ev.Handled || !PassesSpellPrerequisites(ev.Action, ev.Performer))
415+
return;
416+
417+
ev.Handled = true;
418+
419+
// Given that this was intended to blow gibs everywhere, not suitable for this version of the spell (gets people stuck in walls)
420+
// var direction = _transform.GetMapCoordinates(ev.Target, Transform(ev.Target)).Position - _transform.GetMapCoordinates(ev.Performer, Transform(ev.Performer)).Position;
421+
// var impulseVector = direction * 5000;
422+
423+
//_physics.ApplyLinearImpulse(ev.Target, impulseVector);
424+
425+
_jittering.DoJitter(ev.Target, TimeSpan.FromSeconds(1f), false, 80f, 8f, true);
426+
_damageableSystem.TryChangeDamage(ev.Target, ev.smiteDamage, true);
427+
}
428+
394429
// End Touch Spells
395430
#endregion
396431
#region Knock Spells

Resources/Locale/en-US/store/spellbook-catalog.ftl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ spellbook-animate-description = Bring an inanimate object to life!
4141
spellbook-smite-name = Smite
4242
spellbook-smite-desc = Don't like them? EXPLODE them into giblets! Requires Wizard Robe & Hat.
4343
44+
spellbook-cellular-smite-name = Smite
45+
spellbook-cellular-smite-desc = Don't like them? Smite em! Requires Wizard Robe & Hat.
46+
4447
spellbook-cluwne-name = Cluwne's Curse
4548
spellbook-cluwne-desc = For when you really hate someone and Smite isn't enough. Requires Wizard Robe & Hat.
4649

Resources/Maps/Ronstation/atlas-2.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ entities:
6060
- type: Transform
6161
- type: Map
6262
mapPaused: True
63-
- type: PhysicsMap
6463
- type: GridTree
65-
- type: MovedGrids
6664
- type: Broadphase
6765
- type: OccluderTree
6866
- uid: 30

Resources/Maps/_Ronstation/atlas-2.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ entities:
6060
- type: Transform
6161
- type: Map
6262
mapPaused: True
63-
- type: PhysicsMap
6463
- type: GridTree
65-
- type: MovedGrids
6664
- type: Broadphase
6765
- type: OccluderTree
6866
- uid: 30

Resources/Maps/_Ronstation/cluster-2.yml

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -6088,9 +6088,7 @@ entities:
60886088
- type: Transform
60896089
- type: Map
60906090
mapPaused: True
6091-
- type: PhysicsMap
60926091
- type: GridTree
6093-
- type: MovedGrids
60946092
- type: Broadphase
60956093
- type: OccluderTree
60966094
- proto: AcousticGuitarInstrument
@@ -6100,75 +6098,6 @@ entities:
61006098
- type: Transform
61016099
pos: 3.5402613,7.6028175
61026100
parent: 1
6103-
- proto: ActionToggleBlock
6104-
entities:
6105-
- uid: 10629
6106-
mapInit: true
6107-
paused: true
6108-
components:
6109-
- type: Transform
6110-
parent: 10628
6111-
- type: InstantAction
6112-
originalIconColor: '#FFFFFFFF'
6113-
container: 10628
6114-
- proto: ActionToggleInternals
6115-
entities:
6116-
- uid: 797
6117-
mapInit: true
6118-
paused: true
6119-
components:
6120-
- type: Transform
6121-
parent: 795
6122-
- type: InstantAction
6123-
originalIconColor: '#FFFFFFFF'
6124-
container: 795
6125-
- uid: 826
6126-
mapInit: true
6127-
paused: true
6128-
components:
6129-
- type: Transform
6130-
parent: 824
6131-
- type: InstantAction
6132-
originalIconColor: '#FFFFFFFF'
6133-
container: 824
6134-
- uid: 966
6135-
mapInit: true
6136-
paused: true
6137-
components:
6138-
- type: Transform
6139-
parent: 960
6140-
- type: InstantAction
6141-
originalIconColor: '#FFFFFFFF'
6142-
container: 960
6143-
- proto: ActionToggleJetpack
6144-
entities:
6145-
- uid: 796
6146-
mapInit: true
6147-
paused: true
6148-
components:
6149-
- type: Transform
6150-
parent: 795
6151-
- type: InstantAction
6152-
originalIconColor: '#FFFFFFFF'
6153-
container: 795
6154-
- uid: 825
6155-
mapInit: true
6156-
paused: true
6157-
components:
6158-
- type: Transform
6159-
parent: 824
6160-
- type: InstantAction
6161-
originalIconColor: '#FFFFFFFF'
6162-
container: 824
6163-
- uid: 965
6164-
mapInit: true
6165-
paused: true
6166-
components:
6167-
- type: Transform
6168-
parent: 960
6169-
- type: InstantAction
6170-
originalIconColor: '#FFFFFFFF'
6171-
container: 960
61726101
- proto: AirAlarm
61736102
entities:
61746103
- uid: 2084
@@ -63924,49 +63853,16 @@ entities:
6392463853
- type: Transform
6392563854
pos: 27.287785,23.77419
6392663855
parent: 1
63927-
- type: GasTank
63928-
toggleActionEntity: 797
63929-
- type: Jetpack
63930-
toggleActionEntity: 796
63931-
- type: ActionsContainer
63932-
- type: ContainerContainer
63933-
containers:
63934-
actions: !type:Container
63935-
ents:
63936-
- 796
63937-
- 797
6393863856
- uid: 824
6393963857
components:
6394063858
- type: Transform
6394163859
pos: 27.298203,23.440857
6394263860
parent: 1
63943-
- type: GasTank
63944-
toggleActionEntity: 826
63945-
- type: Jetpack
63946-
toggleActionEntity: 825
63947-
- type: ActionsContainer
63948-
- type: ContainerContainer
63949-
containers:
63950-
actions: !type:Container
63951-
ents:
63952-
- 825
63953-
- 826
6395463861
- uid: 960
6395563862
components:
6395663863
- type: Transform
6395763864
pos: 27.339869,23.576273
6395863865
parent: 1
63959-
- type: GasTank
63960-
toggleActionEntity: 966
63961-
- type: Jetpack
63962-
toggleActionEntity: 965
63963-
- type: ActionsContainer
63964-
- type: ContainerContainer
63965-
containers:
63966-
actions: !type:Container
63967-
ents:
63968-
- 965
63969-
- 966
6397063866
- proto: KitchenMicrowave
6397163867
entities:
6397263868
- uid: 1813
@@ -74434,14 +74330,6 @@ entities:
7443474330
- type: Transform
7443574331
pos: 26.350285,23.71169
7443674332
parent: 1
74437-
- type: Blocking
74438-
blockingToggleActionEntity: 10629
74439-
- type: ActionsContainer
74440-
- type: ContainerContainer
74441-
containers:
74442-
actions: !type:Container
74443-
ents:
74444-
- 10629
7444574333
- proto: RubberStampApproved
7444674334
entities:
7444774335
- uid: 4013

0 commit comments

Comments
 (0)