Adds even more smites and a bunch of tools. (#9825)
* Adds three new smites, headstand, locker stuff, and reptilian species swap. * Localize all the smites. * save work * More smites... * Final tweaks. * oops * !PLEH * Adds disarm prone and improved hand removal options. * fix chances. * take out the trash. * Add some admin TRICKS instead of more smites. * oop * Implements the admin test arena and associated trick. * Tricks for granting/revoking access. * e * mfw * Implement quick dialogs, for when you don't want to spend 20 minutes writing a simple dialog prompt. * Forgot the rejuv icon. * E * docs * augh * Add rename/redescribe buttons. * Adds objects menu, implements a couple tricks for stations. * 1984 * Adds a trick for effectively infinite power. * fixes some icon uggo. * a * HALT! * Pause/unpause buttons. * Forgor the textures. * they broke every bone in their body. * i added more * more battery actions, touch up battery icon. * Address reviews.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Actions.Events;
|
||||
using Content.Server.Administration.Components;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.CombatMode.Disarm;
|
||||
using Content.Server.Hands.Components;
|
||||
@@ -100,7 +101,7 @@ namespace Content.Server.CombatMode
|
||||
SoundSystem.Play(component.DisarmSuccessSound.GetSound(), filterAll, args.Performer, AudioHelpers.WithVariation(0.025f));
|
||||
_adminLogger.Add(LogType.DisarmedAction, $"{ToPrettyString(args.Performer):user} used disarm on {ToPrettyString(args.Target):target}");
|
||||
|
||||
var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = chance };
|
||||
var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = HasComp<DisarmProneComponent>(args.Target) ? 1.0f : chance };
|
||||
RaiseLocalEvent(args.Target, eventArgs, true);
|
||||
}
|
||||
|
||||
@@ -108,6 +109,13 @@ namespace Content.Server.CombatMode
|
||||
private float CalculateDisarmChance(EntityUid disarmer, EntityUid disarmed, EntityUid? inTargetHand, SharedCombatModeComponent disarmerComp)
|
||||
{
|
||||
float healthMod = 0;
|
||||
|
||||
if (HasComp<DisarmProneComponent>(disarmer))
|
||||
return 1.0f;
|
||||
|
||||
if (HasComp<DisarmProneComponent>(disarmed))
|
||||
return 0.0f;
|
||||
|
||||
if (TryComp<DamageableComponent>(disarmer, out var disarmerDamage) && TryComp<DamageableComponent>(disarmed, out var disarmedDamage))
|
||||
{
|
||||
// I wanted this to consider their mob state thresholds too but I'm not touching that shitcode after having a go at this.
|
||||
|
||||
Reference in New Issue
Block a user