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

Фикс фелинидов #1331

Merged
merged 4 commits into from
Feb 11, 2025
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
4 changes: 3 additions & 1 deletion Content.Server/_Sunrise/Felinid/FelinidSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ private void AddInsertAltVerb(EntityUid uid, FelinidContainerComponent component
private void OnMeleeHit(EntityUid uid, FelinidComponent component, MeleeHitEvent args)
{
if (!args.IsHit ||
!args.HitEntities.Any())
!args.HitEntities.Any() ||
args.User == uid)
{
return;
}

args.HitSoundOverride = component.DamageSound;
args.BonusDamage = component.DamageBonus;
_damageableSystem.TryChangeDamage(uid, component.FelinidDamage);
}
Expand Down
8 changes: 3 additions & 5 deletions Content.Shared/_Sunrise/Felinid/FelinidComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;

namespace Content.Shared._Sunrise.Felinid;
Expand All @@ -18,9 +19,6 @@ public sealed partial class FelinidComponent : Component
[DataField("felinidDamage")]
public DamageSpecifier FelinidDamage = new();

[DataField]
public TimeSpan PopupCooldown = TimeSpan.FromSeconds(3.0);

[DataField]
public TimeSpan? NextPopupTime;
[DataField("damageSound")]
public SoundSpecifier DamageSound = new SoundPathSpecifier("/Audio/Effects/hit_kick.ogg");
}
17 changes: 0 additions & 17 deletions Content.Shared/_Sunrise/Felinid/SharedFelinidSystem.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
using Content.Shared.IdentityManagement;
using Content.Shared.Item;
using Content.Shared.Popups;
using Robust.Shared.Timing;

namespace Content.Shared._Sunrise.Felinid;

public sealed class SharedFelinidSystem : EntitySystem
{
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly IGameTiming _timing = default!;

public override void Initialize()
{
base.Initialize();
Expand All @@ -22,17 +16,6 @@ private void OnPickupAttempt(EntityUid uid, FelinidComponent component, PickupAt
if (!HasComp<FelinidComponent>(args.Item))
return;

ShowPopup((uid, component), args.Item, "Коллапс неизбежен");
args.Cancel();
}

private void ShowPopup(Entity<FelinidComponent> user, EntityUid target, string reason)
{
if (!(_timing.CurTime > user.Comp.NextPopupTime))
return;

var targetName = Identity.Entity(target, EntityManager);
_popup.PopupCursor(Loc.GetString(reason, ("entity", targetName)), user);
user.Comp.NextPopupTime = _timing.CurTime + user.Comp.PopupCooldown;
}
}
4 changes: 2 additions & 2 deletions Resources/Prototypes/Entities/Mobs/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
# Sunrise edit ;3
# Sunrise-Start
- type: FootprintEmitter
- type: Carriable
# Sunrise edit end 0_0
# Sunrise-End


- type: entity
Expand Down
29 changes: 25 additions & 4 deletions Resources/Prototypes/_Sunrise/Entities/Mobs/Species/felinid.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: entity
save: false
name: Urist McFelinid
parent: BaseMobHuman
parent: BaseMobSpeciesOrganic
id: MobFelinidBase
abstract: true
components:
Expand All @@ -12,8 +12,28 @@
allowedEmotes: ['Mew', 'Meow', 'Hisses', 'Purr']
- type: Sprite
scale: 0.72, 0.72
- type: Icon
sprite: Mobs/Species/Human/parts.rsi
state: full
- type: Thirst
- type: Hunger
- type: Butcherable
butcheringType: Spike
spawned:
- id: FoodMeatHuman
amount: 2
- type: HumanoidAppearance
species: Felinid
hideLayersOnEquip:
- Hair
- Snout
- type: Inventory
femaleDisplacements:
jumpsuit:
sizeMaps:
32:
sprite: Mobs/Species/Human/displacement.rsi
state: jumpsuit-female
- type: Fixtures
fixtures:
fix1:
Expand Down Expand Up @@ -74,14 +94,15 @@
types:
Slash: 3
- type: DamageOnHighSpeedImpact
minimumSpeed: 10
minimumSpeed: 5
damage:
types:
Blunt: 300
Blunt: 10
soundHit:
path: /Audio/Effects/hit_kick.ogg
- type: Stamina
critThreshold: 50
- type: FootprintEmitter
- type: Vocal
sounds:
Male: MaleFelinid
Expand Down Expand Up @@ -118,7 +139,6 @@
- type: MovementSpeedModifier
baseWalkSpeed: 2.0
baseSprintSpeed: 4.0
- type: VentCrawler
- type: Item
size: Large
shape:
Expand All @@ -130,6 +150,7 @@
felinidDamage:
types:
Blunt: 5
damageSound: /Audio/Effects/hit_kick.ogg
# - type: DamagedByFlashing
# flashDamage:
# types:
Expand Down
Loading