Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using Robust.Shared.GameStates;

namespace Content.Goobstation.Shared.StationRadio.Components;
Expand All @@ -8,7 +9,7 @@ public sealed partial class StationRadioReceiverComponent : Component
/// <summary>
/// The sound entity being played
/// </summary>
[DataField, AutoNetworkedField]
[NonSerialized]
public EntityUid? SoundEntity;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Robust.Shared.GameStates;
using System;

namespace Content.Goobstation.Shared.StationRadio.Components;

[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[RegisterComponent]
public sealed partial class VinylPlayerComponent : Component
{
/// <summary>
Expand All @@ -14,6 +14,6 @@ public sealed partial class VinylPlayerComponent : Component
/// <summary>
/// The sound entity being played
/// </summary>
[DataField, AutoNetworkedField]
[NonSerialized]
public EntityUid? SoundEntity;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public sealed class VinylPlayerSystem : EntitySystem
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedPowerReceiverSystem _power = default!;
[Dependency] private readonly SharedDeviceLinkSystem _deviceLinkSystem = default!;

public override void Initialize()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Server.Movement.Components;

[RegisterComponent]
public sealed partial class JumpCollisionKnockbackComponent : Component
{
[DataField("throwForce")]
public float ThrowForce = 10f;
}
46 changes: 46 additions & 0 deletions Content.Server/Movement/Systems/JumpCollisionKnockbackSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Content.Server.Movement.Components;
using Content.Shared.Mobs.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Throwing;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;

namespace Content.Server.Movement.Systems;

public sealed class JumpCollisionKnockbackSystem : EntitySystem
{
[Dependency] private readonly ThrowingSystem _throwing = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<JumpCollisionKnockbackComponent, StartCollideEvent>(OnStartCollide);
}

private void OnStartCollide(Entity<JumpCollisionKnockbackComponent> ent, ref StartCollideEvent args)
{
if (!HasComp<ActiveLeaperComponent>(ent))
return;

if (!TryComp<ThrownItemComponent>(ent, out var thrown) || thrown.Landed)
return;

var other = args.OtherEntity;
if (HasComp<MapGridComponent>(other) || HasComp<MapComponent>(other))
return;

if (!HasComp<MobStateComponent>(other))
return;

if (!TryComp<PhysicsComponent>(other, out var physics) || !physics.Hard)
return;

var ourPos = _transform.GetWorldPosition(ent);
var otherPos = _transform.GetWorldPosition(other);

_throwing.TryThrow(other, otherPos - ourPos, baseThrowSpeed: ent.Comp.ThrowForce, user: ent);
}
}
10 changes: 10 additions & 0 deletions Content.Server/Radiation/Components/RadiationHealingComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Robust.Shared.GameStates;

namespace Content.Server.Radiation.Components;

[RegisterComponent]
public sealed partial class RadiationHealingComponent : Component
{
[DataField("healPerRad")]
public float HealPerRad = 1f;
}
53 changes: 53 additions & 0 deletions Content.Server/Radiation/Systems/RadiationHealingSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using Content.Server.Radiation.Components;
using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Content.Shared.Radiation.Events;

namespace Content.Server.Radiation.Systems;

public sealed class RadiationHealingSystem : EntitySystem
{
[Dependency] private readonly DamageableSystem _damageable = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RadiationHealingComponent, OnIrradiatedEvent>(OnIrradiated);
}

private void OnIrradiated(Entity<RadiationHealingComponent> ent, ref OnIrradiatedEvent args)
{
if (!TryComp<DamageableComponent>(ent, out var damageable))
return;

if (damageable.TotalDamage <= 0)
return;

var remainingHealing = args.TotalRads * ent.Comp.HealPerRad;
if (remainingHealing <= 0f)
return;

var healing = new DamageSpecifier();

foreach (var (type, amount) in damageable.Damage.DamageDict)
{
if (remainingHealing <= 0f)
break;

if (amount <= 0)
continue;

var healAmount = FixedPoint2.New(-Math.Min(amount.Float(), remainingHealing));
if (healAmount == FixedPoint2.Zero)
continue;

healing.DamageDict[type] = healAmount;
remainingHealing += healAmount.Float();
}

if (healing.DamageDict.Count == 0)
return;

_damageable.TryChangeDamage(ent, healing, true, false, damageable, origin: args.Origin, canSever: false);
}
}
Binary file added Resources/Audio/_HL/Effects/smallerthud.ogg
Binary file not shown.
3 changes: 2 additions & 1 deletion Resources/Locale/en-US/metabolism/metabolizer-types.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ metabolizer-type-vampire = Vampire
metabolizer-type-avali = Avali
metabolizer-type-resomi = Resomi
# HardLight
metabolizer-type-synth = Synth
metabolizer-type-synth = Synth
metabolizer-type-dreadtalon = Dreadtalon
17 changes: 14 additions & 3 deletions Resources/Prototypes/Body/Prototypes/Friendshaped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@
torso:
part: TorsoAnimal
connections:
- hands
- right arm
- left arm
- legs
organs:
lungs: OrganAnimalLungs
stomach: OrganFriendStomach
liver: OrganAnimalLiver
heart: OrganAnimalHeart
kidneys: OrganAnimalKidneys
hands:
part: HandsAnimal
right arm:
part: RightArmHuman
connections:
- right hand
left arm:
part: LeftArmHuman
connections:
- left hand
right hand:
part: RightHandHuman
left hand:
part: LeftHandHuman
legs:
part: LegsAnimal
connections:
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Chemistry/metabolizer_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@
- type: metabolizerType # HardLight
id: Synth
name: metabolizer-type-synth

- type: metabolizerType # HardLight
id: Dreadtalon
name: metabolizer-type-dreadtalon
3 changes: 3 additions & 0 deletions Resources/Prototypes/Damage/modifier_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,6 @@
id: Dreadtalon
coefficients:
Radiation: -1.0
Blunt: 0.8
Slash: 0.8
Piercing: 0.8
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
type: BorgBoundUserInterface
enum.StrippingUiKey.Key:
type: StrippableBoundUserInterface
enum.SurgeryUIKey.Key:
type: SurgeryBui
#enum.SurgeryUIKey.Key: # Disabled: borgs are silicon, not surgery targets
# type: SurgeryBui
- type: ActivatableUI
key: enum.BorgUiKey.Key
- type: Targeting # Shitmed Change
Expand Down
21 changes: 15 additions & 6 deletions Resources/Prototypes/GameRules/pests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,18 @@
duration: 50
- type: RadCrittersRule
entries:
- id: MobMouseCancer
prob: 0.02
- id: MobCockroach
prob: 0.015
- id: MobMothroach
prob: 0.008
- id: dreadtalonbase
prob: 0.012
- id: BlueTalon
prob: 0.01
- id: LavaTalon
prob: 0.01
- id: PlasmaTalon
prob: 0.01
- id: TriTalon
prob: 0.01
specialEntries:
- id: SuperTalon
prob: 0.001
- id: GravTalon
prob: 0.001
27 changes: 27 additions & 0 deletions Resources/Prototypes/Reagents/elements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,23 @@
color: "#00ff04"
meltingPoint: 700.0
boilingPoint: 1737.0
metabolisms:
Poison:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
damage:
groups:
Burn: -3
Toxin: -3
Airloss: -3
Brute: -3
- !type:HealthChange
damage:
types:
Radiation: 2

- type: reagent
id: Silicon
Expand Down Expand Up @@ -404,6 +421,16 @@
metabolisms:
Poison:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
damage:
groups:
Burn: -3
Toxin: -3
Airloss: -3
Brute: -3
- !type:HealthChange
damage:
types:
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/Reagents/gases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@
metabolisms:
Poison:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
damage:
groups:
Burn: -3
Toxin: -3
Airloss: -3
Brute: -3
- !type:HealthChange
damage:
types:
Expand Down
23 changes: 23 additions & 0 deletions Resources/Prototypes/Reagents/medicine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -680,18 +680,41 @@
metabolismRate: 0.1
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
shouldHave: false
damage:
types:
Cellular: -0.3
Radiation: 0.15
Caustic: 0.15
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
damage:
groups:
Burn: -3
Toxin: -3
Airloss: -3
Brute: -3
- !type:HealthChange
conditions:
- !type:ReagentThreshold
min: 11
damage:
types:
Radiation: 0.2
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
- !type:ReagentThreshold
min: 11
damage:
types:
Radiation: -0.2
- !type:HealthChange
conditions:
- !type:ReagentThreshold
Expand Down
14 changes: 14 additions & 0 deletions Resources/Prototypes/Reagents/toxins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,20 @@
Poison:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
damage:
groups:
Burn: -3
Toxin: -3
Airloss: -3
Brute: -3
- !type:HealthChange
conditions:
- !type:OrganType
type: Dreadtalon
shouldHave: false
damage:
types:
Radiation: 3
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/SoundCollections/footsteps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@
id: FootstepThud
files:
- /Audio/Effects/Footsteps/largethud.ogg

- type: soundCollection
id: FootstepSmallThud
files:
- /Audio/_HL/Effects/smallerthud.ogg

- type: soundCollection
id: FootstepSnake
Expand Down
Loading
Loading