Northstar Gloves (#16021)

* Added Gloves of North Star, no sprite or talking yet...

* Added sprites for the gloves of the north star...

* Replaced more placeholder sprites for northstar gloves...

* Added gloves of the north star to uplink...

* Added speech on hit, not yet configureable

* Not functional yet, but a step in the right direction I hope...

* IT WORKS!!

* Licensing and cleanup

* Reduced attack speed, changed from chat to popup, added some admin logging. It was causing too much adminlog spam otherwise

* Reorganized some files, final build??

* Changed the adminlog type from Verb to new type ItemConfigure

* More cleanup, fix sprite reference maybe

* Keronshb's suggestions, fixed some stuff, made hit sound use the meaty punch sfx

* Adds support for hiding speak/whisper/emote from adminlogs, makes northstar speak again!

* Some file shuffling, some of Keronshb's requests. Might appear a bit funky in github because vscode kept duplicating files for some reason and I had to delete them

* Made it work with the latest changes on Master

* Final? cleanup, upped dmg to 8, made ui not activate on activateinhand, instead you need to right click

* Set value to 0 credits, that's all

* Well that was much easier than I made it out to be. Now you can only activate the gloves with right click, no more mispredicts.

* Update MeleeWeaponSystem.cs

Iunno why this got changed in the first place, but I'm changin it back

* emptycommit

* emptycommit

* The tiny fixening
This commit is contained in:
HerCoyote23
2023-05-23 11:12:30 -07:00
committed by GitHub
parent 7ea1906c27
commit e45dd96af9
28 changed files with 383 additions and 47 deletions

View File

@@ -1,14 +1,16 @@
using System.Linq;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Chat.Systems;
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.EntitySystems;
using Content.Server.CombatMode.Disarm;
using Content.Server.Contests;
using Content.Server.Examine;
using Content.Server.Movement.Systems;
using Content.Shared.Actions.Events;
using Content.Server.Popups;
using Content.Shared.Administration.Components;
using Content.Shared.Actions.Events;
using Content.Shared.CombatMode;
using Content.Shared.Damage;
using Content.Shared.Database;
@@ -17,6 +19,7 @@ using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Inventory;
using Content.Shared.Popups;
using Content.Shared.Speech.Components;
using Content.Shared.StatusEffect;
using Content.Shared.Tag;
using Content.Shared.Verbs;
@@ -42,11 +45,15 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
[Dependency] private readonly LagCompensationSystem _lag = default!;
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MeleeChemicalInjectorComponent, MeleeHitEvent>(OnChemicalInjectorHit);
SubscribeLocalEvent<MeleeSpeechComponent, MeleeHitEvent>(OnSpeechHit);
SubscribeLocalEvent<MeleeWeaponComponent, GetVerbsEvent<ExamineVerb>>(OnMeleeExaminableVerb);
}
@@ -79,7 +86,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
Text = Loc.GetString("damage-examinable-verb-text"),
Message = Loc.GetString("damage-examinable-verb-message"),
Category = VerbCategory.Examine,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
};
args.Verbs.Add(verb);
@@ -189,7 +196,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
("performerName", Identity.Entity(user, EntityManager)),
("targetName", Identity.Entity(target, EntityManager)));
var msgUser = Loc.GetString(msgPrefix + "popup-message-cursor", ("targetName", Identity.Entity(target, EntityManager)));
var msgUser = Loc.GetString(msgPrefix + "popup-message-cursor", ("targetName", Identity.Entity(target, EntityManager)));
PopupSystem.PopupEntity(msgOther, user, filterOther, true);
PopupSystem.PopupEntity(msgUser, target, user);
@@ -200,7 +207,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
var eventArgs = new DisarmedEvent { Target = target, Source = user, PushProbability = 1 - chance };
RaiseLocalEvent(target, eventArgs);
RaiseNetworkEvent(new DamageEffectEvent(Color.Aqua, new List<EntityUid>() {target}));
RaiseNetworkEvent(new DamageEffectEvent(Color.Aqua, new List<EntityUid>() { target }));
return true;
}
@@ -265,6 +272,21 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
RaiseNetworkEvent(new MeleeLungeEvent(user, angle, localPos, animation), filter);
}
private void OnSpeechHit(EntityUid owner, MeleeSpeechComponent comp, MeleeHitEvent args)
{
if (!args.IsHit ||
!args.HitEntities.Any())
{
return;
}
if (comp.Battlecry != null)//If the battlecry is set to empty, doesn't speak
{
_chat.TrySendInGameICMessage(args.User, comp.Battlecry, InGameICChatType.Speak, true, true); //Speech that isn't sent to chat or adminlogs
}
}
private void OnChemicalInjectorHit(EntityUid owner, MeleeChemicalInjectorComponent comp, MeleeHitEvent args)
{
if (!args.IsHit ||