Skip to content

Commit

Permalink
Животных можно брать на руки, фелиниды еще легче
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jan 17, 2025
1 parent 038b3c1 commit a691ef9
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Content.Server/_Sunrise/Carrying/CarryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ namespace Content.Server._Sunrise.Carrying
{
public sealed class CarryingSystem : EntitySystem
{
private readonly float _maxThrowSpeed = 15f;

[Dependency] private readonly SharedVirtualItemSystem _virtualItemSystem = default!;
[Dependency] private readonly CarryingSlowdownSystem _slowdown = default!;
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
Expand Down Expand Up @@ -129,7 +131,9 @@ private void OnThrow(EntityUid uid, CarryingComponent component, BeforeThrowEven

var multiplier = MassContest(uid, virtItem.BlockingEntity);

_throwingSystem.TryThrow(virtItem.BlockingEntity, args.Direction, 3f * multiplier, uid);
var throwSpeed = 3f * multiplier > _maxThrowSpeed ? _maxThrowSpeed : 3f * multiplier;

_throwingSystem.TryThrow(virtItem.BlockingEntity, args.Direction, throwSpeed, uid);
}

private void OnParentChanged(EntityUid uid, CarryingComponent component, ref EntParentChangedMessage args)
Expand Down
64 changes: 64 additions & 0 deletions Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
- type: NpcFactionMember
factions:
- Passive
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
parent: MobChicken
Expand Down Expand Up @@ -673,6 +677,10 @@
- type: NpcFactionMember
factions:
- Passive
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: white duck #Quack
Expand Down Expand Up @@ -928,6 +936,10 @@
task: RuminantCompound
- type: Body
prototype: AnimalHemocyanin
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: goat
Expand Down Expand Up @@ -1030,6 +1042,10 @@
- type: HTN
rootTask:
task: RuminantHostileCompound
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

# Note that we gotta make this bitch vomit someday when you feed it anthrax or sumthin. Needs to be a small item thief too and aggressive if attacked.
- type: entity
Expand Down Expand Up @@ -1079,6 +1095,10 @@
- type: NpcFactionMember
factions:
- Passive
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: gorilla
Expand Down Expand Up @@ -1382,6 +1402,10 @@
Burn: 3
clumsySound:
path: /Audio/Animals/monkey_scream.ogg
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end


- type: entity
Expand Down Expand Up @@ -1965,6 +1989,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end


- type: entity
Expand Down Expand Up @@ -2189,6 +2217,10 @@
heatDamage:
types:
Heat : 0.2 #per second, scales with temperature & other constants
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: grenade penguin
Expand Down Expand Up @@ -2410,6 +2442,8 @@
- type: CollectiveMind
minds:
- Arachnids
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
Expand Down Expand Up @@ -2590,6 +2624,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: possum
Expand Down Expand Up @@ -2664,6 +2702,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: fox
Expand Down Expand Up @@ -2742,6 +2784,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: corgi
Expand Down Expand Up @@ -2803,6 +2849,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: corrupted corgi
Expand Down Expand Up @@ -2960,9 +3010,13 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: NightVision #Sunrise - Night vision
isToggle: true
color: "#808080"
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: calico cat
Expand Down Expand Up @@ -3178,6 +3232,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: ferret
Expand Down Expand Up @@ -3232,6 +3290,10 @@
- type: Tag
tags:
- VimPilot
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: hamster
Expand Down Expand Up @@ -3449,6 +3511,8 @@
# Sunrise-start
- type: Body
prototype: ManeaterAnimal
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
Expand Down
12 changes: 12 additions & 0 deletions Resources/Prototypes/Entities/Mobs/NPCs/pets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@
- VimPilot
- type: StealTarget
stealGroup: AnimalNamedCat
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: McGriff
Expand Down Expand Up @@ -327,6 +331,10 @@
- VimPilot
- type: StealTarget
stealGroup: AnimalMcGriff
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: Paperwork
Expand Down Expand Up @@ -421,6 +429,10 @@
- VimPilot
- type: StealTarget
stealGroup: AnimalWalter
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: Morty
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
speechSounds: Slime
- type: TypingIndicator
proto: slime
# Sunrise-start
- type: Carriable
- type: CanEscapeInventory
# Sunrise-end

- type: entity
name: basic slime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
- type: MovementSpeedModifier
baseWalkSpeed: 2.0
baseSprintSpeed: 4.0
- type: Carriable
freeHandsRequired: 1
# - type: DamagedByFlashing
# flashDamage:
# types:
Expand Down

0 comments on commit a691ef9

Please sign in to comment.