Твики всего и вся
This commit is contained in:
@@ -4,7 +4,7 @@ namespace Content.Server._White.ChangeTemperatureOnCollide;
|
|||||||
public sealed partial class ClothingTemperatureAdjustComponent : Component
|
public sealed partial class ClothingTemperatureAdjustComponent : Component
|
||||||
{
|
{
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float Rate = 1f;
|
public float Rate = 2f;
|
||||||
|
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float TargetTemperature = 310.15f;
|
public float TargetTemperature = 310.15f;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public sealed partial class CultSystem
|
|||||||
|
|
||||||
if (comp.SelectedEmpowers.Count >= 1)
|
if (comp.SelectedEmpowers.Count >= 1)
|
||||||
{
|
{
|
||||||
_popupSystem.PopupEntity(Loc.GetString("verb-spell-create-too-much"), ent);
|
_popupSystem.PopupEntity(Loc.GetString("verb-spell-create-too-much"), ent, ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ public sealed partial class CultSystem
|
|||||||
{
|
{
|
||||||
if (ent.Comp.SelectedEmpowers.Count == 0)
|
if (ent.Comp.SelectedEmpowers.Count == 0)
|
||||||
{
|
{
|
||||||
_popupSystem.PopupEntity(Loc.GetString("verb-spell-remove-no-spells"), ent);
|
_popupSystem.PopupEntity(Loc.GetString("verb-spell-remove-no-spells"), ent, ent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ public sealed partial class StaminaDamageOnCollideComponent : Component
|
|||||||
[ViewVariables(VVAccess.ReadWrite), DataField("damage")]
|
[ViewVariables(VVAccess.ReadWrite), DataField("damage")]
|
||||||
public float Damage = 55f;
|
public float Damage = 55f;
|
||||||
|
|
||||||
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||||
|
public bool IgnoreResistances = true;
|
||||||
|
|
||||||
[DataField("sound")]
|
[DataField("sound")]
|
||||||
public SoundSpecifier? Sound;
|
public SoundSpecifier? Sound;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Content.Shared._White.StaminaProtection;
|
||||||
using Content.Shared.Administration.Logs;
|
using Content.Shared.Administration.Logs;
|
||||||
using Content.Shared.Alert;
|
using Content.Shared.Alert;
|
||||||
using Content.Shared.CombatMode;
|
using Content.Shared.CombatMode;
|
||||||
@@ -204,7 +205,18 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
if (ev.Cancelled)
|
if (ev.Cancelled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TakeStaminaDamage(target, component.Damage, source: uid, sound: component.Sound);
|
// WD EDIT START
|
||||||
|
var damage = component.Damage;
|
||||||
|
|
||||||
|
if (!component.IgnoreResistances)
|
||||||
|
{
|
||||||
|
var modifyEv = new StaminaDamageModifyEvent {Damage = damage};
|
||||||
|
RaiseLocalEvent(target, modifyEv);
|
||||||
|
damage = modifyEv.Damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
TakeStaminaDamage(target, damage, source: uid, sound: component.Sound);
|
||||||
|
// WD EDIT END
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetStaminaAlert(EntityUid uid, StaminaComponent? component = null)
|
private void SetStaminaAlert(EntityUid uid, StaminaComponent? component = null)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Shared._White.StaminaProtection;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.Electrocution;
|
using Content.Shared.Electrocution;
|
||||||
@@ -27,6 +28,7 @@ public partial class InventorySystem
|
|||||||
SubscribeLocalEvent<InventoryComponent, SeeIdentityAttemptEvent>(RelayInventoryEvent);
|
SubscribeLocalEvent<InventoryComponent, SeeIdentityAttemptEvent>(RelayInventoryEvent);
|
||||||
SubscribeLocalEvent<InventoryComponent, ModifyChangedTemperatureEvent>(RelayInventoryEvent);
|
SubscribeLocalEvent<InventoryComponent, ModifyChangedTemperatureEvent>(RelayInventoryEvent);
|
||||||
SubscribeLocalEvent<InventoryComponent, AdjustTemperatureEvent>(RelayInventoryEvent); // WD
|
SubscribeLocalEvent<InventoryComponent, AdjustTemperatureEvent>(RelayInventoryEvent); // WD
|
||||||
|
SubscribeLocalEvent<InventoryComponent, StaminaDamageModifyEvent>(RelayInventoryEvent); // WD
|
||||||
SubscribeLocalEvent<InventoryComponent, GetDefaultRadioChannelEvent>(RelayInventoryEvent);
|
SubscribeLocalEvent<InventoryComponent, GetDefaultRadioChannelEvent>(RelayInventoryEvent);
|
||||||
|
|
||||||
// by-ref events
|
// by-ref events
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Content.Shared.Armor;
|
||||||
|
using Content.Shared.Inventory;
|
||||||
|
|
||||||
|
namespace Content.Shared._White.StaminaProtection;
|
||||||
|
|
||||||
|
public sealed class StaminaProtectionSystem : EntitySystem
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
SubscribeLocalEvent<ArmorComponent, InventoryRelayedEvent<StaminaDamageModifyEvent>>(OnDamageModify);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDamageModify(Entity<ArmorComponent> ent, ref InventoryRelayedEvent<StaminaDamageModifyEvent> args)
|
||||||
|
{
|
||||||
|
var modifiers = ent.Comp.Modifiers;
|
||||||
|
|
||||||
|
if (modifiers.FlatReduction.TryGetValue("Blunt", out var flat))
|
||||||
|
args.Args.Damage = MathF.Max(0f, args.Args.Damage - flat);
|
||||||
|
|
||||||
|
if (modifiers.Coefficients.TryGetValue("Blunt", out var coefficient))
|
||||||
|
args.Args.Damage *= coefficient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class StaminaDamageModifyEvent : EntityEventArgs, IInventoryRelayEvent
|
||||||
|
{
|
||||||
|
public SlotFlags TargetSlots => ~SlotFlags.POCKET;
|
||||||
|
|
||||||
|
public float Damage;
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
GrenadeStinger: 4
|
GrenadeStinger: 4
|
||||||
Flash: 5
|
Flash: 5
|
||||||
Tourniquet: 5
|
Tourniquet: 5
|
||||||
|
Bola: 5
|
||||||
FlashlightSeclite: 5
|
FlashlightSeclite: 5
|
||||||
ClothingEyesGlassesSunglasses: 2
|
ClothingEyesGlassesSunglasses: 2
|
||||||
ClothingEyesHudSecurity: 2
|
ClothingEyesHudSecurity: 2
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
components:
|
components:
|
||||||
- Hands # prevent mouse buying grenade penguin since its not telepathic
|
- Hands # prevent mouse buying grenade penguin since its not telepathic
|
||||||
- type: Store
|
- type: Store
|
||||||
preset: StorePresetUplink
|
preset: StorePresetUplinkNoDiscounts
|
||||||
balance:
|
balance:
|
||||||
Telecrystal: 0
|
Telecrystal: 0
|
||||||
- type: UserInterface
|
- type: UserInterface
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
- type: CanPenetrate
|
- type: CanPenetrate
|
||||||
penetrationLayer: MobLayer
|
penetrationLayer: MobLayer
|
||||||
- type: StaminaDamageOnCollide
|
- type: StaminaDamageOnCollide
|
||||||
damage: 55
|
ignoreResistances: false
|
||||||
|
damage: 70
|
||||||
- type: TimedDespawn
|
- type: TimedDespawn
|
||||||
lifetime: 0.25
|
lifetime: 0.25
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
types:
|
types:
|
||||||
Blunt: 3
|
Blunt: 3
|
||||||
- type: StaminaDamageOnCollide
|
- type: StaminaDamageOnCollide
|
||||||
|
ignoreResistances: false
|
||||||
damage: 35 # 3 hits to stun cuz revolver
|
damage: 35 # 3 hits to stun cuz revolver
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -26,7 +26,8 @@
|
|||||||
types:
|
types:
|
||||||
Blunt: 10
|
Blunt: 10
|
||||||
- type: StaminaDamageOnCollide
|
- type: StaminaDamageOnCollide
|
||||||
damage: 40 # 3 hits to stun
|
ignoreResistances: false
|
||||||
|
damage: 70
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PelletShotgun
|
id: PelletShotgun
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
soundHit:
|
soundHit:
|
||||||
path: /Audio/Weapons/Guns/Hits/snap.ogg
|
path: /Audio/Weapons/Guns/Hits/snap.ogg
|
||||||
- type: StaminaDamageOnCollide
|
- type: StaminaDamageOnCollide
|
||||||
|
ignoreResistances: false
|
||||||
damage: 22 # 5 hits to stun sounds reasonable
|
damage: 22 # 5 hits to stun sounds reasonable
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -1350,7 +1351,8 @@
|
|||||||
bounds: "-0.15,-0.3,0.15,0.3"
|
bounds: "-0.15,-0.3,0.15,0.3"
|
||||||
hard: false
|
hard: false
|
||||||
mask:
|
mask:
|
||||||
- Opaque
|
- Impassable
|
||||||
|
- BulletImpassable
|
||||||
fly-by: *flybyfixture
|
fly-by: *flybyfixture
|
||||||
- type: Ammo
|
- type: Ammo
|
||||||
muzzleFlash: null
|
muzzleFlash: null
|
||||||
|
|||||||
@@ -24,6 +24,24 @@
|
|||||||
maxItems: 10
|
maxItems: 10
|
||||||
salesCategory: UplinkSales
|
salesCategory: UplinkSales
|
||||||
|
|
||||||
|
- type: storePreset
|
||||||
|
id: StorePresetUplinkNoDiscounts
|
||||||
|
storeName: Uplink
|
||||||
|
categories:
|
||||||
|
- UplinkWeapons
|
||||||
|
- UplinkAmmo
|
||||||
|
- UplinkExplosives
|
||||||
|
- UplinkMisc
|
||||||
|
- UplinkBundles
|
||||||
|
- UplinkTools
|
||||||
|
- UplinkUtility
|
||||||
|
- UplinkImplants
|
||||||
|
- UplinkJob
|
||||||
|
- UplinkArmor
|
||||||
|
- UplinkPointless
|
||||||
|
currencyWhitelist:
|
||||||
|
- Telecrystal
|
||||||
|
|
||||||
- type: storePreset
|
- type: storePreset
|
||||||
id: StorePresetChangeling
|
id: StorePresetChangeling
|
||||||
storeName: Evolution Shop
|
storeName: Evolution Shop
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
Blunt: 0.8
|
Blunt: 0.85
|
||||||
Slash: 0.8
|
Slash: 0.85
|
||||||
Piercing: 0.95
|
Piercing: 0.95
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
- type: Armor
|
- type: Armor
|
||||||
modifiers:
|
modifiers:
|
||||||
coefficients:
|
coefficients:
|
||||||
Blunt: 0.4
|
Blunt: 0.5
|
||||||
Slash: 0.4
|
Slash: 0.5
|
||||||
Piercing: 0.9
|
Piercing: 0.9
|
||||||
Heat: 0.5
|
Heat: 0.5
|
||||||
- type: ClothingSpeedModifier
|
- type: ClothingSpeedModifier
|
||||||
|
|||||||
Reference in New Issue
Block a user