Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes/Reduces Delays and Cooldowns on some things #8

Merged
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
2 changes: 1 addition & 1 deletion Content.Server/Nutrition/Components/FoodComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public sealed partial class FoodComponent : Component
/// How long it takes to eat the food personally.
/// </summary>
[DataField]
public float Delay = 1;
public float Delay = 0;

/// <summary>
/// This is how many seconds it takes to force feed someone this food.
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Nutrition/Components/DrinkComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed partial class DrinkComponent : Component
/// How long it takes to drink this yourself.
/// </summary>
[DataField, AutoNetworkedField]
public float Delay = 1;
public float Delay = 0;

[DataField, AutoNetworkedField]
public bool Examinable = true;
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Standing/LayingDownComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Content.Shared.Standing;
public sealed partial class LayingDownComponent : Component
{
[DataField, AutoNetworkedField]
public TimeSpan StandingUpTime = TimeSpan.FromSeconds(1);
public TimeSpan StandingUpTime = TimeSpan.FromSeconds(0);

[DataField, AutoNetworkedField]
public float LyingSpeedModifier = 0.35f,
Expand Down
4 changes: 3 additions & 1 deletion Content.Shared/Standing/SharedLayingDownSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ public bool TryStandUp(EntityUid uid, LayingDownComponent? layingDown = null, St
if (!_doAfter.TryStartDoAfter(args))
return false;

standingState.CurrentState = StandingState.GettingUp;
// In case the DoAfter immediately finishes.
if (standingState.CurrentState != StandingState.Standing)
standingState.CurrentState = StandingState.GettingUp;
layingDown.IsCrawlingUnder = false;
return true;
}
Expand Down
4 changes: 3 additions & 1 deletion Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

[ValidatePrototypeId<ItemSizePrototype>]
public const string DefaultStorageMaxItemSize = "Normal";

as

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid token 'as' in class, record, struct, or interface member declaration

Check failure on line 70 in Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid token 'as' in class, record, struct, or interface member declaration
public const float AreaInsertDelayPerItem = 0.075f;
private static AudioParams _audioParams = AudioParams.Default
.WithMaxDistance(7f)
Expand All @@ -83,6 +83,7 @@
private readonly List<ItemSizePrototype> _sortedSizes = new();
private FrozenDictionary<string, ItemSizePrototype> _nextSmallest = FrozenDictionary<string, ItemSizePrototype>.Empty;

private const string DefaultDelayId = "default";
private const string QuickInsertUseDelayID = "quickInsert";
private const string OpenUiUseDelayID = "storage";

Expand Down Expand Up @@ -148,6 +149,7 @@

private void OnMapInit(Entity<StorageComponent> entity, ref MapInitEvent args)
{
UseDelay.SetLength(entity.Owner, entity.Comp.OpenUiCooldown, DefaultDelayId);
UseDelay.SetLength(entity.Owner, entity.Comp.QuickInsertCooldown, QuickInsertUseDelayID);
UseDelay.SetLength(entity.Owner, entity.Comp.OpenUiCooldown, OpenUiUseDelayID);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Storage/StorageComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public sealed partial class StorageComponent : Component
/// Minimum delay between quick/area insert actions.
/// </summary>
/// <remarks>Used to prevent autoclickers spamming server with individual pickup actions.</remarks>
public TimeSpan QuickInsertCooldown = TimeSpan.FromSeconds(0.5);
public TimeSpan QuickInsertCooldown = TimeSpan.FromSeconds(0.1);

/// <summary>
/// Minimum delay between UI open actions.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Clothing/Back/backpacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
type: StorageBoundUserInterface
# to prevent bag open/honk spam
- type: UseDelay
delay: 0.5
delay: 0.1
- type: ExplosionResistance
damageCoefficient: 0.9
- type: AllowsSleepInside # DeltaV - enable sleeping inside bags
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Entities/Clothing/base_clothing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
- type: StaticPrice
price: 10
- type: Clothing
equipDelay: 0.5
unequipDelay: 0.5
equipDelay: 0
unequipDelay: 0

- type: entity
abstract: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- type: HealthAnalyzer
scanningEndSound:
path: "/Audio/Items/Medical/healthscanner.ogg"
scanDelay: 0
- type: Tag
tags:
- DiscreteHealthAnalyzer
Expand Down
Loading