Fixes & Tweaks (#356)
* Revert "captains sword reflect chance (#18133)"
This reverts commit e393eedd09.
* Mirror shield passive reflect
* Traitor stuff fixes and tweaks
* Connected dispenser click sound
* No medipen heavy attack
* Slice sound for blades
* Crossbow & material stacking fixes
* Hypospray fixes
* Chenge crossbow damage type
* Fix penetrating on land
* Antispam tweak
This commit is contained in:
@@ -216,9 +216,9 @@ namespace Content.Server.Chat.Managers
|
|||||||
_utkaSocketWrapper.SendMessageToAll(asayEventMessage);
|
_utkaSocketWrapper.SendMessageToAll(asayEventMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TrySendNewMessage(ICommonSession session, string newMessage)
|
public bool TrySendNewMessage(ICommonSession session, string newMessage, bool checkLength = false)
|
||||||
{
|
{
|
||||||
if (!_antispam || newMessage.Length < _antispamMinLength)
|
if (!_antispam || checkLength && newMessage.Length < _antispamMinLength)
|
||||||
{
|
{
|
||||||
_lastMessages.Remove(session.Data.UserId);
|
_lastMessages.Remove(session.Data.UserId);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Content.Server.Chat.Managers
|
|||||||
|
|
||||||
// WD-EDIT
|
// WD-EDIT
|
||||||
void SendHookAdminChat(string sender, string message);
|
void SendHookAdminChat(string sender, string message);
|
||||||
bool TrySendNewMessage(ICommonSession session, string newMessage);
|
bool TrySendNewMessage(ICommonSession session, string newMessage, bool checkLength = false);
|
||||||
// WD-EDIT
|
// WD-EDIT
|
||||||
|
|
||||||
void SendAdminAnnouncement(string message);
|
void SendAdminAnnouncement(string message);
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (desiredType != InGameICChatType.Emote && player is not null &&
|
if (desiredType != InGameICChatType.Emote && player is not null &&
|
||||||
!_chatManager.TrySendNewMessage(player, message)) // WD
|
!_chatManager.TrySendNewMessage(player, message, true)) // WD
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// This message may have a radio prefix, and should then be whispered to the resolved radio channel
|
// This message may have a radio prefix, and should then be whispered to the resolved radio channel
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
|
|
||||||
bufferSolution.Value.Comp.Solution.AddReagent(message.ReagentId, FixedPoint2.New((int)reagentDispenser.Comp.DispenseAmount));
|
bufferSolution.Value.Comp.Solution.AddReagent(message.ReagentId, FixedPoint2.New((int)reagentDispenser.Comp.DispenseAmount));
|
||||||
_chemMasterSystem.UpdateUiState((chemMasterUid.Value, chemMaster));
|
_chemMasterSystem.UpdateUiState((chemMasterUid.Value, chemMaster));
|
||||||
|
ClickSound(reagentDispenser);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} // WD EDIT END
|
} // WD EDIT END
|
||||||
|
|||||||
106
Content.Server/Objectives/Conditions/KillDepartmentCondition.cs
Normal file
106
Content.Server/Objectives/Conditions/KillDepartmentCondition.cs
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Content.Server.Mind;
|
||||||
|
using Content.Server.Mind.Components;
|
||||||
|
using Content.Server.Objectives.Interfaces;
|
||||||
|
using Content.Server.Roles;
|
||||||
|
using Content.Shared.Mobs.Components;
|
||||||
|
using Content.Shared.Mobs.Systems;
|
||||||
|
using Content.Shared.Roles;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
namespace Content.Server.Objectives.Conditions;
|
||||||
|
|
||||||
|
public abstract class KillDepartmentCondition : IObjectiveCondition
|
||||||
|
{
|
||||||
|
private IEntityManager EntityManager => IoCManager.Resolve<IEntityManager>();
|
||||||
|
private IPrototypeManager PrototypeManager => IoCManager.Resolve<IPrototypeManager>();
|
||||||
|
private MobStateSystem MobStateSystem => EntityManager.EntitySysManager.GetEntitySystem<MobStateSystem>();
|
||||||
|
private MindSystem MindSystem => EntityManager.EntitySysManager.GetEntitySystem<MindSystem>();
|
||||||
|
|
||||||
|
protected abstract string TitleHeader { get; }
|
||||||
|
public abstract IObjectiveCondition GetAssigned(Mind.Mind mind);
|
||||||
|
|
||||||
|
protected List<Mind.Mind?>? Targets;
|
||||||
|
|
||||||
|
protected List<Mind.Mind?> GetTargets(Mind.Mind mind, string department)
|
||||||
|
{
|
||||||
|
var dep = PrototypeManager.Index<DepartmentPrototype>(department);
|
||||||
|
var allMinds = EntityManager.EntityQuery<MindContainerComponent>(true).Where(mc =>
|
||||||
|
{
|
||||||
|
var entity = mc.Mind?.OwnedEntity;
|
||||||
|
|
||||||
|
if (entity == default || mc.Mind == mind)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var isTargetJob = mc.Mind?.AllRoles.OfType<Job>().Any(job => dep.Roles.Contains(job.Prototype.ID));
|
||||||
|
|
||||||
|
if (isTargetJob is false)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return EntityManager.TryGetComponent(entity, out MobStateComponent? mobState) &&
|
||||||
|
MobStateSystem.IsAlive(entity.Value, mobState);
|
||||||
|
|
||||||
|
}).Select(mc => mc.Mind).ToList();
|
||||||
|
|
||||||
|
return allMinds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Title
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var title = TitleHeader;
|
||||||
|
if (Targets == null)
|
||||||
|
return title;
|
||||||
|
|
||||||
|
foreach (var target in Targets)
|
||||||
|
{
|
||||||
|
if (target?.OwnedEntity is { Valid: true } owned)
|
||||||
|
{
|
||||||
|
title += $"\n - {EntityManager.GetComponent<MetaDataComponent>(owned).EntityName}, " +
|
||||||
|
$"{target?.CurrentJob?.Name ?? "Unknown"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Description => Loc.GetString("objective-condition-department-description");
|
||||||
|
|
||||||
|
public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon");
|
||||||
|
|
||||||
|
public float Progress
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Targets == null)
|
||||||
|
return 1f;
|
||||||
|
|
||||||
|
var deadTargetsCount = Targets.Count(target => target != null && MindSystem.IsCharacterDeadIc(target));
|
||||||
|
|
||||||
|
return Math.Min(1f / Targets.Count * deadTargetsCount, 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float Difficulty => 5f;
|
||||||
|
public bool Equals(IObjectiveCondition? other)
|
||||||
|
{
|
||||||
|
return other is KillDepartmentCondition kdc && Equals(Targets, kdc.Targets);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj))
|
||||||
|
return false;
|
||||||
|
if (ReferenceEquals(this, obj))
|
||||||
|
return true;
|
||||||
|
return obj.GetType() == GetType() && Equals((KillDepartmentCondition) obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return Targets?.GetHashCode() ?? 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.Damage.Prototypes;
|
using Content.Shared.Damage.Prototypes;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
|
using Content.Shared.Mobs.Systems;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Weapons.Melee.Events;
|
using Content.Shared.Weapons.Melee.Events;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
@@ -18,6 +19,7 @@ public sealed class CritSystem : EntitySystem
|
|||||||
[Dependency] private readonly PopupSystem _popup = default!;
|
[Dependency] private readonly PopupSystem _popup = default!;
|
||||||
[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
|
[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
|
||||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||||
|
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -44,7 +46,7 @@ public sealed class CritSystem : EntitySystem
|
|||||||
if (!IsCriticalHit(component))
|
if (!IsCriticalHit(component))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!TryComp<MobStateComponent>(target, out _))
|
if (!TryComp<MobStateComponent>(target, out var mobState) || _mobState.IsDead(target, mobState))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var damage = args.BaseDamage.Total * component.CritMultiplier;
|
var damage = args.BaseDamage.Total * component.CritMultiplier;
|
||||||
@@ -55,12 +57,14 @@ public sealed class CritSystem : EntitySystem
|
|||||||
var damageGroup = _prototypeManager.Index<DamageGroupPrototype>("Brute");
|
var damageGroup = _prototypeManager.Index<DamageGroupPrototype>("Brute");
|
||||||
|
|
||||||
_bloodstream.TryModifyBloodLevel(target, -ohio);
|
_bloodstream.TryModifyBloodLevel(target, -ohio);
|
||||||
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(damageGroup, -ohio));
|
_bloodstream.TryModifyBloodLevel(args.User, ohio);
|
||||||
|
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(damageGroup, -ohio * 2));
|
||||||
|
|
||||||
damage = args.BaseDamage.Total * component.CritMultiplier + ohio;
|
damage = args.BaseDamage.Total * component.CritMultiplier + ohio;
|
||||||
}
|
}
|
||||||
|
|
||||||
args.BonusDamage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"), damage);
|
args.BonusDamage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"),
|
||||||
|
damage - args.BaseDamage.Total);
|
||||||
|
|
||||||
_popup.PopupEntity($@"Crit! {damage}", args.User, PopupType.MediumCaution);
|
_popup.PopupEntity($@"Crit! {damage}", args.User, PopupType.MediumCaution);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: BaseAnimalOrgan
|
id: BaseAnimalOrgan
|
||||||
parent: BaseItem
|
parent: BaseItem
|
||||||
abstract: true
|
abstract: true
|
||||||
|
|||||||
@@ -367,6 +367,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- WhitelistChameleon
|
- WhitelistChameleon
|
||||||
- HighRiskItem
|
- HighRiskItem
|
||||||
|
- Hardsuit
|
||||||
- type: ToggleableClothing
|
- type: ToggleableClothing
|
||||||
clothingPrototype: ClothingHeadHelmetHardsuitRd
|
clothingPrototype: ClothingHeadHelmetHardsuitRd
|
||||||
- type: StaticPrice
|
- type: StaticPrice
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
path: /Audio/Weapons/guitarsmash.ogg
|
path: /Audio/Weapons/guitarsmash.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 2
|
min: 2
|
||||||
max: 4
|
max: 4
|
||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 0
|
Blunt: 0
|
||||||
|
ignoreResistances: true
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: rods
|
state: rods
|
||||||
- type: Stack
|
- type: Stack
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
sound: /Audio/Effects/metalbreak.ogg
|
sound: /Audio/Effects/metalbreak.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 5
|
min: 5
|
||||||
max: 5
|
max: 5
|
||||||
- type: StaticPrice
|
- type: StaticPrice
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Slash: 12
|
Slash: 12
|
||||||
|
soundHit:
|
||||||
|
path: /Audio/Weapons/bladeslice.ogg
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Normal
|
size: Normal
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
@@ -38,6 +40,8 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Slash: 16
|
Slash: 16
|
||||||
|
soundHit:
|
||||||
|
path: /Audio/Weapons/bladeslice.ogg
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Normal
|
size: Normal
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Slash: 10.5
|
Slash: 10.5
|
||||||
|
soundHit:
|
||||||
|
path: /Audio/Weapons/bladeslice.ogg
|
||||||
- type: Item
|
- type: Item
|
||||||
size: 20
|
size: 20
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
@@ -23,6 +25,3 @@
|
|||||||
critChance: 20
|
critChance: 20
|
||||||
critMultiplier: 2.2
|
critMultiplier: 2.2
|
||||||
isBloodDagger: true
|
isBloodDagger: true
|
||||||
- type: Reflect
|
|
||||||
reflectProb: 0.15
|
|
||||||
enabled: true
|
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
Slash: 17 #cmon, it has to be at least BETTER than the rest.
|
Slash: 17 #cmon, it has to be at least BETTER than the rest.
|
||||||
soundHit:
|
soundHit:
|
||||||
path: /Audio/Weapons/bladeslice.ogg
|
path: /Audio/Weapons/bladeslice.ogg
|
||||||
- type: Reflect
|
|
||||||
enabled: true
|
|
||||||
reflectProb: .5
|
|
||||||
spread: 90
|
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Normal
|
size: Normal
|
||||||
sprite: Objects/Weapons/Melee/captain_sabre.rsi
|
sprite: Objects/Weapons/Melee/captain_sabre.rsi
|
||||||
|
|||||||
@@ -414,7 +414,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 1
|
min: 1
|
||||||
max: 1
|
max: 1
|
||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
@@ -449,7 +449,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 1
|
min: 1
|
||||||
max: 1
|
max: 1
|
||||||
MaterialCloth1:
|
MaterialCloth1:
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 1
|
min: 1
|
||||||
max: 5
|
max: 5
|
||||||
MaterialCloth1:
|
MaterialCloth1:
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 1
|
min: 1
|
||||||
max: 5
|
max: 5
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 2
|
min: 2
|
||||||
max: 3
|
max: 3
|
||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
|
|||||||
@@ -194,7 +194,7 @@
|
|||||||
path: /Audio/Effects/woodhit.ogg
|
path: /Audio/Effects/woodhit.ogg
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialWoodPlank:
|
MaterialWoodPlank1:
|
||||||
min: 1
|
min: 1
|
||||||
max: 1
|
max: 1
|
||||||
- type: Tag
|
- type: Tag
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
behaviors:
|
behaviors:
|
||||||
- !type:SpawnEntitiesBehavior
|
- !type:SpawnEntitiesBehavior
|
||||||
spawn:
|
spawn:
|
||||||
MaterialBananium:
|
MaterialBananium1:
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
|
|||||||
@@ -21,5 +21,5 @@
|
|||||||
minMultiplier: 0.01
|
minMultiplier: 0.01
|
||||||
maxMultiplier: 0.99
|
maxMultiplier: 0.99
|
||||||
minItems: 3
|
minItems: 3
|
||||||
maxItems: 8
|
maxItems: 10
|
||||||
salesCategory: UplinkSales
|
salesCategory: UplinkSales
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
quickEquip: false
|
quickEquip: false
|
||||||
slots:
|
slots:
|
||||||
- Back
|
- Back
|
||||||
|
- SuitStorage
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Huge
|
size: Huge
|
||||||
sprite: White/Objects/Weapons/crossbow.rsi
|
sprite: White/Objects/Weapons/crossbow.rsi
|
||||||
@@ -46,12 +47,12 @@
|
|||||||
offset: 0.2,0.2
|
offset: 0.2,0.2
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 15
|
Piercing: 15
|
||||||
- type: Powered
|
- type: Powered
|
||||||
charge: 180
|
charge: 180
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 10
|
Piercing: 10
|
||||||
Heat: 10
|
Heat: 10
|
||||||
- type: Construction
|
- type: Construction
|
||||||
deconstructionTarget: null
|
deconstructionTarget: null
|
||||||
@@ -74,6 +75,7 @@
|
|||||||
quickEquip: false
|
quickEquip: false
|
||||||
slots:
|
slots:
|
||||||
- Back
|
- Back
|
||||||
|
- SuitStorage
|
||||||
- type: Construction
|
- type: Construction
|
||||||
deconstructionTarget: null
|
deconstructionTarget: null
|
||||||
graph: WeaponPoweredCrossbowGraph
|
graph: WeaponPoweredCrossbowGraph
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
quickEquip: false
|
quickEquip: false
|
||||||
slots:
|
slots:
|
||||||
- Back
|
- Back
|
||||||
|
- SuitStorage
|
||||||
- type: Gun
|
- type: Gun
|
||||||
cameraRecoilScalar: 0
|
cameraRecoilScalar: 0
|
||||||
fireRate: 2
|
fireRate: 2
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
quickEquip: false
|
quickEquip: false
|
||||||
slots:
|
slots:
|
||||||
- Back
|
- Back
|
||||||
|
- SuitStorage
|
||||||
- type: Construction
|
- type: Construction
|
||||||
deconstructionTarget: null
|
deconstructionTarget: null
|
||||||
graph: WeaponFlamethrowerGraph
|
graph: WeaponFlamethrowerGraph
|
||||||
|
|||||||
Reference in New Issue
Block a user