From 1f2e6865022470db586c5bbffd3647618794be43 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 8 Dec 2024 17:28:48 +0200
Subject: [PATCH 01/16] init
---
.../Body/Components/StomachComponent.cs | 6 +++++
.../Nutrition/EntitySystems/FoodSystem.cs | 15 ++++++++++++-
.../Prototypes/Body/Organs/Animal/animal.yml | 12 ++++++++++
.../Body/Prototypes/Animal/animal.yml | 22 +++++++++++++++++++
.../Prototypes/Entities/Mobs/NPCs/animals.yml | 2 ++
.../Prototypes/Entities/Mobs/Species/base.yml | 12 +++++++++-
Resources/Prototypes/tags.yml | 3 +++
7 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs
index d541ca4d7c4..6d08062e6d9 100644
--- a/Content.Server/Body/Components/StomachComponent.cs
+++ b/Content.Server/Body/Components/StomachComponent.cs
@@ -47,6 +47,12 @@ public sealed partial class StomachComponent : Component
[DataField]
public EntityWhitelist? SpecialDigestible = null;
+ ///
+ /// If true, whitelist from the top will only be used as an addition to the already digestible by default food
+ ///
+ [DataField("isDigestibleAddition")]
+ public bool IsDigestibleAddition = false;
+
///
/// Used to track how long each reagent has been in the stomach
///
diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
index 158c7f4955c..4a34239db4a 100644
--- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
@@ -335,10 +335,20 @@ public void DeleteAndSpawnTrash(FoodComponent component, EntityUid food, EntityU
RaiseLocalEvent(food, ev);
if (ev.Cancelled)
return;
-
var dev = new DestructionEventArgs();
RaiseLocalEvent(food, dev);
+ if (TryComp(food, out InventoryComponent? inventory))
+ {
+ foreach (SlotDefinition sl in inventory.Slots)
+ {
+ _inventory.TryUnequip(food, sl.Name, out EntityUid? item);
+ if (!TryComp(item, out TransformComponent? transform))
+ continue;
+ _transform.DropNextTo((EntityUid)item, food);
+ }
+ }
+
if (component.Trash.Count == 0)
{
QueueDel(food);
@@ -433,6 +443,9 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List
Date: Sun, 8 Dec 2024 19:20:10 +0200
Subject: [PATCH 02/16] fixes
---
Content.Server/Body/Components/StomachComponent.cs | 4 ++++
Content.Server/Nutrition/EntitySystems/FoodSystem.cs | 6 ++++++
Resources/Prototypes/Body/Organs/Animal/animal.yml | 8 ++++++--
Resources/Prototypes/Body/Prototypes/Animal/animal.yml | 4 ++++
Resources/Prototypes/Entities/Mobs/NPCs/animals.yml | 2 ++
Resources/Prototypes/Entities/Mobs/Species/base.yml | 4 ++--
Resources/Prototypes/tags.yml | 3 ---
7 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs
index 6d08062e6d9..a96dcd139d3 100644
--- a/Content.Server/Body/Components/StomachComponent.cs
+++ b/Content.Server/Body/Components/StomachComponent.cs
@@ -47,12 +47,16 @@ public sealed partial class StomachComponent : Component
[DataField]
public EntityWhitelist? SpecialDigestible = null;
+ //Sunrise-start
+
///
/// If true, whitelist from the top will only be used as an addition to the already digestible by default food
///
[DataField("isDigestibleAddition")]
public bool IsDigestibleAddition = false;
+ //Sunrise-end
+
///
/// Used to track how long each reagent has been in the stomach
///
diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
index 4a34239db4a..29f53060b4a 100644
--- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs
@@ -338,6 +338,8 @@ public void DeleteAndSpawnTrash(FoodComponent component, EntityUid food, EntityU
var dev = new DestructionEventArgs();
RaiseLocalEvent(food, dev);
+ //Sunrise-start
+
if (TryComp(food, out InventoryComponent? inventory))
{
foreach (SlotDefinition sl in inventory.Slots)
@@ -349,6 +351,8 @@ public void DeleteAndSpawnTrash(FoodComponent component, EntityUid food, EntityU
}
}
+ //Sunrise-end
+
if (component.Trash.Count == 0)
{
QueueDel(food);
@@ -443,9 +447,11 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List
Date: Sun, 8 Dec 2024 20:08:02 +0200
Subject: [PATCH 03/16] fixes
---
Content.Server/Body/Components/StomachComponent.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs
index a96dcd139d3..a21af34147a 100644
--- a/Content.Server/Body/Components/StomachComponent.cs
+++ b/Content.Server/Body/Components/StomachComponent.cs
@@ -52,7 +52,7 @@ public sealed partial class StomachComponent : Component
///
/// If true, whitelist from the top will only be used as an addition to the already digestible by default food
///
- [DataField("isDigestibleAddition")]
+ [DataField]
public bool IsDigestibleAddition = false;
//Sunrise-end
From 6440c322762afeb1e6c7c460a5905531ddef7e2b Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 8 Dec 2024 22:52:25 +0200
Subject: [PATCH 04/16] balance changes
---
Resources/Prototypes/Entities/Mobs/Species/base.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml
index 6413a23db42..93bb92cd3ae 100644
--- a/Resources/Prototypes/Entities/Mobs/Species/base.yml
+++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml
@@ -235,10 +235,10 @@
- type: SolutionContainerManager
solutions:
food:
- maxVol: 30
+ maxVol: 50
reagents:
- ReagentId: UncookedAnimalProteins
- Quantity: 30
+ Quantity: 50
- type: Food
requiresSpecialDigestion: true
# Sunrise-End
From fdd89c54a016ba1a00ddb20e8c646710eee24313 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Tue, 17 Dec 2024 22:06:13 +0200
Subject: [PATCH 05/16] saw added
---
.../EntitySystems/AnimalHusbandrySystem.cs | 17 +++-
Content.Server/Saw/SawComponent.cs | 14 +++
Content.Server/Saw/SawSystem.cs | 96 +++++++++++++++++++
.../AnimalHusbandry/ReproductiveComponent.cs | 5 +-
.../Prototypes/Entities/Mobs/NPCs/animals.yml | 14 +++
5 files changed, 143 insertions(+), 3 deletions(-)
create mode 100644 Content.Server/Saw/SawComponent.cs
create mode 100644 Content.Server/Saw/SawSystem.cs
diff --git a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
index e5f590a3626..78ad1ae75f4 100644
--- a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
@@ -68,6 +68,9 @@ public bool TryReproduceNearby(EntityUid uid, ReproductiveComponent? component =
if (!Resolve(uid, ref component))
return false;
+ if (!component.IsPartnerNeed)
+ return TryReproduce(uid, uid, component);
+
var xform = Transform(uid);
var partners = new HashSet>();
@@ -98,13 +101,13 @@ public bool TryReproduce(EntityUid uid, EntityUid partner, ReproductiveComponent
if (!Resolve(uid, ref component))
return false;
- if (uid == partner)
+ if (uid == partner && component.IsPartnerNeed)
return false;
if (!CanReproduce(uid, component))
return false;
- if (!IsValidPartner(uid, partner, component))
+ if (!IsValidPartner(uid, partner, component) && component.IsPartnerNeed)
return false;
// if the partner is valid, yet it fails the random check
@@ -181,6 +184,8 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
if (!Resolve(uid, ref component))
return;
+ BirthEvent birthEvent = new BirthEvent();
+
// this is kinda wack but it's the only sound associated with most animals
if (TryComp(uid, out var interactionPopup))
_audio.PlayPvs(interactionPopup.InteractSuccessSound, uid);
@@ -190,6 +195,7 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
foreach (var spawn in spawns)
{
var offspring = Spawn(spawn, xform.Coordinates.Offset(_random.NextVector2(0.3f)));
+ birthEvent.Spawns.Add(offspring);
_transform.AttachToGridOrMap(offspring);
if (component.MakeOffspringInfant)
{
@@ -205,6 +211,8 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
component.Gestating = false;
component.GestationEndTime = null;
+
+ RaiseLocalEvent(uid, birthEvent);
}
public override void Update(float frameTime)
@@ -249,3 +257,8 @@ public override void Update(float frameTime)
}
}
}
+
+public sealed class BirthEvent : EntityEventArgs
+{
+ public List Spawns = new List();
+}
diff --git a/Content.Server/Saw/SawComponent.cs b/Content.Server/Saw/SawComponent.cs
new file mode 100644
index 00000000000..3d8b9d0f90b
--- /dev/null
+++ b/Content.Server/Saw/SawComponent.cs
@@ -0,0 +1,14 @@
+using Content.Shared.FixedPoint;
+
+namespace Content.Server.Saw;
+
+
+[RegisterComponent]
+public sealed partial class SawComponent : Component
+{
+ [DataField, ViewVariables(VVAccess.ReadWrite)]
+ public EntityUid? EatenMind = null;
+
+ [DataField]
+ public FixedPoint2 HungerToThresholdModifier = 1;
+}
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
new file mode 100644
index 00000000000..9b365522c12
--- /dev/null
+++ b/Content.Server/Saw/SawSystem.cs
@@ -0,0 +1,96 @@
+using Content.Server.Nutrition;
+using Content.Server.Nutrition.Components;
+using Content.Shared.IdentityManagement.Components;
+using Content.Shared.Nutrition.AnimalHusbandry;
+using Content.Server.Mind;
+using Robust.Shared.Prototypes;
+using Content.Shared.Mind;
+using Content.Shared.Mind.Components;
+using Content.Server.Nutrition.EntitySystems;
+using Content.Shared.Preferences;
+using Content.Server.Humanoid;
+using Content.Shared.Dataset;
+using Content.Shared.Humanoid.Prototypes;
+using Content.Shared.Mobs.Components;
+using Content.Shared.Mobs;
+using Content.Shared.FixedPoint;
+using Content.Server.Destructible.Thresholds;
+using Content.Shared.Mobs.Systems;
+using Content.Server._Sunrise.Mood;
+using Content.Shared.Nutrition.Components;
+
+
+namespace Content.Server.Saw;
+
+public sealed class SawSystem : EntitySystem
+{
+ [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
+ [Dependency] private readonly MindSystem _mindSystem = default!;
+ [Dependency] private readonly MetaDataSystem _metaData = default!;
+ [Dependency] private readonly HumanoidAppearanceSystem _humanoid = default!;
+ [Dependency] private readonly MobThresholdSystem _thresholdSystem = default!;
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent(OnBeforeFullyEaten);
+ SubscribeLocalEvent(SawInit);
+ SubscribeLocalEvent(OnBirth);
+ }
+
+ private void OnBeforeFullyEaten(Entity food, ref BeforeFullyEatenEvent args)
+ {
+ if (!TryComp(args.User, out SawComponent? sawComp) ||
+ !TryComp(args.User, out ReproductiveComponent? reproductive) ||
+ !TryComp(food, out MindContainerComponent? mind) ||
+ !HasComp(food))
+ return;
+
+ EntityUid? foodMind = _mindSystem.GetMind(food);
+ sawComp.EatenMind = foodMind;
+
+ if (_prototypeManager.Index("MobSaw").Components.TryGetComponent("Reproductive", out var defaultReproductive))
+ reproductive.Gestating = false;
+ }
+
+ private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
+ {
+ if (TryComp(ent, out ReproductiveComponent? reproductive))
+ reproductive.Gestating = true;
+ }
+
+ private void OnBirth(Entity saw, ref BirthEvent args)
+ {
+ if (TryComp(saw, out ReproductiveComponent? reproductive))
+ reproductive.Gestating = true;
+ EntityUid child = args.Spawns[0];
+ EntityUid? eatenMind = Comp(saw).EatenMind;
+ saw.Comp.EatenMind = null;
+ if (eatenMind == null)
+ return;
+ if (!TryComp(saw, out var hungerComp))
+ return;
+
+ if (TryComp(child, out var thresholds))
+ {
+ FixedPoint2 thresholdModifier = hungerComp.CurrentHunger * saw.Comp.HungerToThresholdModifier;
+
+ _thresholdSystem.SetMobStateThreshold(child, _thresholdSystem.GetThresholdForState(child, MobState.Critical) + thresholdModifier, MobState.Critical);
+ _thresholdSystem.SetMobStateThreshold(child, _thresholdSystem.GetThresholdForState(child, MobState.Dead) + thresholdModifier, MobState.Dead);
+ if (TryComp(child, out var mood))
+ mood.CritThresholdBeforeModify = _thresholdSystem.GetThresholdForState(child, MobState.Critical);
+ }
+
+ _mindSystem.TransferTo((EntityUid) eatenMind, child);
+
+ var profile = HumanoidCharacterProfile.RandomWithSpecies("Swine");
+ _humanoid.LoadProfile(args.Spawns[0], profile);
+ //_metaData.SetEntityName(args.Spawns[0], profile.Name);
+ //Logger.Log(LogLevel.Debug, profile.Name);
+ //_metaData.SetEntityName(args.Spawns[0], "PRIVET");
+ //if (_prototypeManager.TryIndex("EventHumanoid", out var prototype))
+ // _metaData.SetEntityName(args.Spawns[0], prototype.RandomizeName ? profile.Name : name);
+
+ }
+
+}
diff --git a/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs b/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
index 8d128f547e6..162a07699f8 100644
--- a/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
+++ b/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.Storage;
+using Content.Shared.Storage;
using Content.Shared.Whitelist;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
@@ -12,6 +12,9 @@ namespace Content.Shared.Nutrition.AnimalHusbandry;
[RegisterComponent, AutoGenerateComponentPause]
public sealed partial class ReproductiveComponent : Component
{
+ [DataField]
+ public bool IsPartnerNeed = true;
+
///
/// The next time when breeding will be attempted.
///
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
index 767308976a7..b331fb84792 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
@@ -3413,6 +3413,20 @@
- type: Body
prototype: ManeaterAnimal
# Sunrise-end
+
+- type: entity
+ name: saw
+ parent: MobPig
+ id: MobSaw
+ description: The Mother.
+ components:
+ - type: Saw
+ - type: Reproductive
+ offspring:
+ - id: MobSwine
+ capacity: 6
+ isPartnerNeed: false
+
- type: entity
name: diona nymph
From 308c4c5d68169fa78a93c42baf893685c1e8488e Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sat, 21 Dec 2024 02:56:23 +0200
Subject: [PATCH 06/16] some fixes facecast added
---
Content.Server/Bible/BibleSystem.cs | 27 +++++++++++++++++++
.../EntitySystems/AnimalHusbandrySystem.cs | 6 ++---
Content.Server/Saw/SawSystem.cs | 21 ++++++++++-----
.../entities/clothing/masks/masks.ftl | 2 ++
.../nutrition/components/animal-husbandry.ftl | 2 +-
.../Entities/Clothing/Masks/masks.yml | 17 ++++++++++++
6 files changed, 65 insertions(+), 10 deletions(-)
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index c193578f822..4ffbc600477 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -1,6 +1,7 @@
using Content.Server.Bible.Components;
using Content.Server.Ghost.Roles.Events;
using Content.Server.Popups;
+using Content.Server.Saw;
using Content.Shared._Sunrise.Mood;
using Content.Shared.ActionBlocker;
using Content.Shared.Actions;
@@ -8,27 +9,35 @@
using Content.Shared.Damage;
using Content.Shared.Ghost.Roles.Components;
using Content.Shared.IdentityManagement;
+using Content.Shared.IdentityManagement.Components;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Systems;
+using Content.Shared.Nutrition.AnimalHusbandry;
using Content.Shared.Popups;
+using Content.Shared.Prayer;
using Content.Shared.Stunnable;
using Content.Shared.Timing;
using Content.Shared.Vampire.Components;
using Content.Shared.Verbs;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Player;
+using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
+using System.Linq;
namespace Content.Server.Bible
{
public sealed class BibleSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
+ [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
+ [Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly InventorySystem _invSystem = default!;
@@ -39,6 +48,8 @@ public sealed class BibleSystem : EntitySystem
[Dependency] private readonly UseDelaySystem _delay = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedStunSystem _stun = default!;
+ [Dependency] private readonly EntityLookupSystem _lookUp = default!;
+ [Dependency] private readonly MetaDataSystem _metaData = default!;
public override void Initialize()
{
@@ -150,6 +161,22 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
return;
}
+ if (TryPrototype((EntityUid) args.Target, out var prototype)
+ && prototype.ID == "MobPig"
+ && !HasComp(args.Target))
+ {
+ if (_lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count > 4
+ && _lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count > 0)
+ {
+ _entityManager.AddComponents((EntityUid) args.Target, _prototypeManager.Index("MobSaw").Components, false);
+ _metaData.SetEntityName((EntityUid)args.Target, "свиноматерь");
+ _popupSystem.PopupEntity(Loc.GetString("bible-saw-transformation"), (EntityUid) args.Target);
+ _audio.PlayPvs(component.HealSoundPath, (EntityUid) args.Target);
+
+ }
+ return;
+ }
+
// This only has a chance to fail if the target is not wearing anything on their head and is not a familiar..
if (!_invSystem.TryGetSlotEntity(args.Target.Value, "head", out var _) && !HasComp(args.Target.Value))
{
diff --git a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
index 78ad1ae75f4..5d65c1546ed 100644
--- a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
@@ -68,9 +68,6 @@ public bool TryReproduceNearby(EntityUid uid, ReproductiveComponent? component =
if (!Resolve(uid, ref component))
return false;
- if (!component.IsPartnerNeed)
- return TryReproduce(uid, uid, component);
-
var xform = Transform(uid);
var partners = new HashSet>();
@@ -79,6 +76,9 @@ public bool TryReproduceNearby(EntityUid uid, ReproductiveComponent? component =
if (partners.Count >= component.Capacity)
return false;
+ if (!component.IsPartnerNeed)
+ return TryReproduce(uid, uid, component);
+
foreach (var comp in partners)
{
var partner = comp.Owner;
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
index 9b365522c12..7c9543c4e69 100644
--- a/Content.Server/Saw/SawSystem.cs
+++ b/Content.Server/Saw/SawSystem.cs
@@ -50,19 +50,28 @@ private void OnBeforeFullyEaten(Entity food, ref BeforeFullyEaten
sawComp.EatenMind = foodMind;
if (_prototypeManager.Index("MobSaw").Components.TryGetComponent("Reproductive", out var defaultReproductive))
- reproductive.Gestating = false;
+ reproductive.Capacity = 6;
+ //reproductive.Gestating = false;
}
private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
{
if (TryComp(ent, out ReproductiveComponent? reproductive))
- reproductive.Gestating = true;
+ {
+ reproductive.Capacity = 0;
+ reproductive.Gestating = false;
+ reproductive.GestationEndTime = null;
+ reproductive.IsPartnerNeed = false;
+ }
+ //reproductive.Gestating = true;
+
}
private void OnBirth(Entity saw, ref BirthEvent args)
{
if (TryComp(saw, out ReproductiveComponent? reproductive))
- reproductive.Gestating = true;
+ reproductive.Capacity = 0;
+ //reproductive.Gestating = true;
EntityUid child = args.Spawns[0];
EntityUid? eatenMind = Comp(saw).EatenMind;
saw.Comp.EatenMind = null;
@@ -83,9 +92,9 @@ private void OnBirth(Entity saw, ref BirthEvent args)
_mindSystem.TransferTo((EntityUid) eatenMind, child);
- var profile = HumanoidCharacterProfile.RandomWithSpecies("Swine");
- _humanoid.LoadProfile(args.Spawns[0], profile);
- //_metaData.SetEntityName(args.Spawns[0], profile.Name);
+ //var profile = HumanoidCharacterProfile.RandomWithSpecies("Swine");
+ //_humanoid.LoadProfile(args.Spawns[0], profile);
+ _metaData.SetEntityName(args.Spawns[0], "троттин");
//Logger.Log(LogLevel.Debug, profile.Name);
//_metaData.SetEntityName(args.Spawns[0], "PRIVET");
//if (_prototypeManager.TryIndex("EventHumanoid", out var prototype))
diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/clothing/masks/masks.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/clothing/masks/masks.ftl
index 881bfd7a160..ed424a5b6ea 100644
--- a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/clothing/masks/masks.ftl
+++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/clothing/masks/masks.ftl
@@ -18,3 +18,5 @@ ent-ClothingBreathMaskCMO = медицинский респиратор
.desc = Качественный респиратор.
ent-ClothingMaskGasCE = противогаз старшего инженера
.desc = Очень прочный и стильный белый противогаз с зелёной полосой на лобной части. Позволит исправить последствия работы атмосферных техников с купленными дипломами.
+ent-ClothingMaskFaceCast = слепок лица
+ .desc = Он может украсть твою личность...
diff --git a/Resources/Locale/ru-RU/_strings/nutrition/components/animal-husbandry.ftl b/Resources/Locale/ru-RU/_strings/nutrition/components/animal-husbandry.ftl
index 10bc16aed72..44315a0c2b8 100644
--- a/Resources/Locale/ru-RU/_strings/nutrition/components/animal-husbandry.ftl
+++ b/Resources/Locale/ru-RU/_strings/nutrition/components/animal-husbandry.ftl
@@ -1,3 +1,3 @@
-infant-name-prefix = детёныш { $name }
+infant-name-prefix = детёныш { $baseName }
reproductive-birth-popup = { CAPITALIZE($parent) } родила!
reproductive-laid-egg-popup = { CAPITALIZE($parent) } отложила яйцо!
diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
index 34f27cfc45a..1d3961bdbc7 100644
--- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
+++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
@@ -285,6 +285,23 @@
- type: HideLayerClothing
slots:
- Snout
+
+- type: entity
+ parent: ClothingMaskBase
+ id: ClothingMaskFaceCast
+ name: face cast
+ description: It can steal your personality!
+ components:
+ - type: Sprite
+ sprite: Clothing/Mask/facecast.rsi
+ - type: Clothing
+ sprite: Clothing/Mask/facecast.rsi
+ - type: BreathMask
+ - type: Tag
+ - type: HideLayerClothing
+ slots:
+ - Snout
+ - type: FaceCast
- type: entity
parent: ClothingMaskPullableBase
From d34a58e921b00daee790a9c434f023ea2afb9645 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sat, 21 Dec 2024 03:12:36 +0200
Subject: [PATCH 07/16] sunrise marking fixes added forgotten not versioned
files from last commit
---
Content.Server/Bible/BibleSystem.cs | 6 +-
Content.Server/FaceCast/FaceCastComponent.cs | 14 ++++
Content.Server/FaceCast/FaceCastSystem.cs | 75 ++++++++++++++++++
.../EntitySystems/AnimalHusbandrySystem.cs | 17 ++--
.../AnimalHusbandry/ReproductiveComponent.cs | 2 +-
.../_sunrise/entities/mobs/npcs/animals.ftl | 2 +
.../ru-RU/_strings/_sunrise/chapel/bible.ftl | 18 +++++
.../Prototypes/Body/Organs/Animal/animal.yml | 16 ----
.../Body/Prototypes/Animal/animal.yml | 26 ------
.../Entities/Clothing/Masks/masks.yml | 17 ----
.../Prototypes/Entities/Mobs/NPCs/animals.yml | 14 ----
.../_Sunrise/Body/Organs/animal.yml | 11 +++
.../_Sunrise/Body/Prototypes/animal.yml | 21 +++++
.../Entities/Clothing/Masks/masks.yml | 17 ++++
.../_Sunrise/Entities/Mobs/NPCs/animals.yml | 12 +++
.../Mask/facecast.rsi/equipped-MASK.png | Bin 0 -> 446 bytes
.../Clothing/Mask/facecast.rsi/icon.png | Bin 0 -> 285 bytes
.../Clothing/Mask/facecast.rsi/meta.json | 18 +++++
18 files changed, 204 insertions(+), 82 deletions(-)
create mode 100644 Content.Server/FaceCast/FaceCastComponent.cs
create mode 100644 Content.Server/FaceCast/FaceCastSystem.cs
create mode 100644 Resources/Locale/ru-RU/_prototypes/_sunrise/entities/mobs/npcs/animals.ftl
create mode 100644 Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
create mode 100644 Resources/Prototypes/_Sunrise/Body/Organs/animal.yml
create mode 100644 Resources/Prototypes/_Sunrise/Body/Prototypes/animal.yml
create mode 100644 Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
create mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png
create mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/icon.png
create mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 4ffbc600477..674f308fcd3 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -35,9 +35,9 @@ namespace Content.Server.Bible
{
public sealed class BibleSystem : EntitySystem
{
- [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
+ [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly InventorySystem _invSystem = default!;
@@ -161,6 +161,8 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
return;
}
+ //Sunrise-start
+
if (TryPrototype((EntityUid) args.Target, out var prototype)
&& prototype.ID == "MobPig"
&& !HasComp(args.Target))
@@ -177,6 +179,8 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
return;
}
+ //Sunrise-end
+
// This only has a chance to fail if the target is not wearing anything on their head and is not a familiar..
if (!_invSystem.TryGetSlotEntity(args.Target.Value, "head", out var _) && !HasComp(args.Target.Value))
{
diff --git a/Content.Server/FaceCast/FaceCastComponent.cs b/Content.Server/FaceCast/FaceCastComponent.cs
new file mode 100644
index 00000000000..1c6595f9a22
--- /dev/null
+++ b/Content.Server/FaceCast/FaceCastComponent.cs
@@ -0,0 +1,14 @@
+
+using Content.Shared.FixedPoint;
+
+namespace Content.Server.FaceCast;
+
+[RegisterComponent]
+public sealed partial class FaceCastComponent : Component
+{
+ public TimeSpan? StartCastingTime = null;
+
+ public EntityUid? Equiper = null;
+
+ public Double TimeToCast = 5;
+}
diff --git a/Content.Server/FaceCast/FaceCastSystem.cs b/Content.Server/FaceCast/FaceCastSystem.cs
new file mode 100644
index 00000000000..948f8321eea
--- /dev/null
+++ b/Content.Server/FaceCast/FaceCastSystem.cs
@@ -0,0 +1,75 @@
+using Content.Server.NPC.HTN.PrimitiveTasks.Operators.Interactions;
+using Content.Shared.Inventory.Events;
+using Content.Shared.Sound.Components;
+using Content.Shared.Inventory.Events;
+using Content.Shared.Timing;
+using Robust.Shared.Timing;
+using Linguini.Bundle.Errors;
+using Content.Shared.IdentityManagement;
+using Content.Shared.IdentityManagement.Components;
+using Content.Shared.Clothing.Components;
+using Content.Shared.Inventory;
+using Content.Shared.Nutrition.AnimalHusbandry;
+
+namespace Content.Server.FaceCast;
+
+public sealed class FaceCastSystem : EntitySystem
+{
+ [Dependency] private readonly IGameTiming _timing = default!;
+ [Dependency] private readonly MetaDataSystem _metaData = default!;
+ [Dependency] private readonly InventorySystem _inventory = default!;
+ public override void Initialize()
+ {
+ SubscribeLocalEvent(OnEquip);
+ SubscribeLocalEvent(OnUnequip);
+ }
+
+ private void OnEquip(EntityUid ent, FaceCastComponent faceCast, ref GotEquippedEvent args)
+ {
+ if (!HasComp(args.Equipee))
+ return;
+ faceCast.Equiper = args.Equipee;
+ if (HasComp(args.Equipee))
+ return;
+ faceCast.StartCastingTime = _timing.CurTime;
+ }
+
+ private void OnUnequip(EntityUid ent, FaceCastComponent faceCast, ref GotUnequippedEvent args)
+ {
+ faceCast.StartCastingTime = null;
+ faceCast.Equiper = null;
+ }
+
+ public override void Update(float frameTime)
+ {
+ base.Update(frameTime);
+
+ var query = EntityQueryEnumerator();
+ while (query.MoveNext(out var uid, out var faceCast))
+ {
+ if (!TryComp(uid, out var cloth))
+ continue;
+
+ if (faceCast.Equiper == null)
+ continue;
+
+ if (!HasComp(faceCast.Equiper) && faceCast.StartCastingTime == null)
+ {
+ if (Name(uid) != Loc.GetEntityData("ClothingMaskFaceCast").Name)
+ _metaData.SetEntityName((EntityUid) faceCast.Equiper, Name(uid));
+ faceCast.StartCastingTime = _timing.CurTime;
+ continue;
+ }
+
+ if (faceCast.StartCastingTime == null)
+ continue;
+
+ if ((_timing.CurTime - faceCast.StartCastingTime) >= TimeSpan.FromSeconds(faceCast.TimeToCast))
+ {
+ _metaData.SetEntityName(uid, Name((EntityUid)faceCast.Equiper));
+ faceCast.StartCastingTime = _timing.CurTime;
+ }
+
+ }
+ }
+}
diff --git a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
index 5d65c1546ed..e7c33acbd8b 100644
--- a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
@@ -76,8 +76,8 @@ public bool TryReproduceNearby(EntityUid uid, ReproductiveComponent? component =
if (partners.Count >= component.Capacity)
return false;
- if (!component.IsPartnerNeed)
- return TryReproduce(uid, uid, component);
+ if (!component.IsPartnerNeed) //Sunrise
+ return TryReproduce(uid, uid, component); //Sunrise
foreach (var comp in partners)
{
@@ -101,13 +101,13 @@ public bool TryReproduce(EntityUid uid, EntityUid partner, ReproductiveComponent
if (!Resolve(uid, ref component))
return false;
- if (uid == partner && component.IsPartnerNeed)
+ if (uid == partner && component.IsPartnerNeed) //Sunrise: component.IsPartnerNeed
return false;
if (!CanReproduce(uid, component))
return false;
- if (!IsValidPartner(uid, partner, component) && component.IsPartnerNeed)
+ if (!IsValidPartner(uid, partner, component) && component.IsPartnerNeed) //Sunrise: component.IsPartnerNeed
return false;
// if the partner is valid, yet it fails the random check
@@ -184,7 +184,7 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
if (!Resolve(uid, ref component))
return;
- BirthEvent birthEvent = new BirthEvent();
+ BirthEvent birthEvent = new BirthEvent(); //Sunrise
// this is kinda wack but it's the only sound associated with most animals
if (TryComp(uid, out var interactionPopup))
@@ -195,7 +195,7 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
foreach (var spawn in spawns)
{
var offspring = Spawn(spawn, xform.Coordinates.Offset(_random.NextVector2(0.3f)));
- birthEvent.Spawns.Add(offspring);
+ birthEvent.Spawns.Add(offspring); //Sunrise
_transform.AttachToGridOrMap(offspring);
if (component.MakeOffspringInfant)
{
@@ -212,7 +212,7 @@ public void Birth(EntityUid uid, ReproductiveComponent? component = null)
component.Gestating = false;
component.GestationEndTime = null;
- RaiseLocalEvent(uid, birthEvent);
+ RaiseLocalEvent(uid, birthEvent); //Sunrise
}
public override void Update(float frameTime)
@@ -258,7 +258,10 @@ public override void Update(float frameTime)
}
}
+//Sunrise-start
+
public sealed class BirthEvent : EntityEventArgs
{
public List Spawns = new List();
}
+//Sunrise-end
diff --git a/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs b/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
index 162a07699f8..a25ddcecb67 100644
--- a/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
+++ b/Content.Shared/Nutrition/AnimalHusbandry/ReproductiveComponent.cs
@@ -13,7 +13,7 @@ namespace Content.Shared.Nutrition.AnimalHusbandry;
public sealed partial class ReproductiveComponent : Component
{
[DataField]
- public bool IsPartnerNeed = true;
+ public bool IsPartnerNeed = true; //Sunrise
///
/// The next time when breeding will be attempted.
diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/mobs/npcs/animals.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/mobs/npcs/animals.ftl
new file mode 100644
index 00000000000..6b4b674774c
--- /dev/null
+++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/mobs/npcs/animals.ftl
@@ -0,0 +1,2 @@
+ent-MobSaw = свиноматерь
+ .desc = Хрю.
\ No newline at end of file
diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
new file mode 100644
index 00000000000..491fafddbc3
--- /dev/null
+++ b/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
@@ -0,0 +1,18 @@
+bible-heal-success-self = Вы ударяете { $target } с помощью { $bible }, и его раны закрываются во вспышке святого света!
+bible-heal-success-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и его раны закрываются во вспышке святого света!
+bible-heal-success-none-self = Вы ударяете { $target } с помощью { $bible }, но раны которые можно излечить отсутствуют!
+bible-heal-success-none-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }!
+bible-damage-unholy-self = Вы ударяете { THE($target) } с помощью { THE($bible) }, и его сжигает вспышка священного огня!
+bible-damage-unholy-others = { CAPITALIZE(THE($user)) } ударяет { THE($target) } с помощью { THE($bible) }, и его сжигает вспышка священного огня!
+bible-heal-fail-self = Вы ударяете { $target } с помощью { $bible }, и { $bible }, с печальным стуком, оказывает ошеломляющий эффект!
+bible-heal-fail-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и { $bible }, с печальным стуком, оказывает ошеломляющий эффект!
+bible-sizzle = Книга шипит в ваших руках!
+bible-summon-verb = Призвать фамильяра
+bible-summon-verb-desc = Призовите фамильяра, который станет помогать вам и обретёт человекоподобный интеллект после вселения в него души.
+bible-summon-requested = Ваш фамильяр явится, как только появится желающая душа.
+bible-summon-respawn-ready = { CAPITALIZE($book) } наполняется неземной энергией. Обитатель { CAPITALIZE($book) } вернулся домой.
+necro-heal-success-self = Вы ударяете { $target } с помощью { $bible }, и кожа { $target } начинает кукожиться и плавиться!
+necro-heal-success-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и кожа { $target } начинает кукожиться и плавиться!
+necro-heal-fail-self = Вы ударяете { $target } с помощью { $bible }, но удар отдаётся печальным стуком, не сумев поразить { $target }.
+necro-heal-fail-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, но удар отдаётся печальным стуком, не сумев поразить { $target }.
+bible-saw-transformation = Свинья божественным чудом превращается в свиноматерь.
\ No newline at end of file
diff --git a/Resources/Prototypes/Body/Organs/Animal/animal.yml b/Resources/Prototypes/Body/Organs/Animal/animal.yml
index be7f5635239..e59aad9da3f 100644
--- a/Resources/Prototypes/Body/Organs/Animal/animal.yml
+++ b/Resources/Prototypes/Body/Organs/Animal/animal.yml
@@ -92,22 +92,6 @@
- type: Item
size: Small
heldPrefix: stomach
-
-# Sunrise-start
-
-- type: entity
- id: OrganManeaterAnimalStomach
- parent: OrganAnimalStomach
- name: maneater stomach
- categories: [ HideSpawnMenu ]
- components:
- - type: Stomach
- specialDigestible:
- components:
- - Identity
- isDigestibleAddition: true
-
-# Sunrise-end
- type: entity
id: OrganMouseStomach
diff --git a/Resources/Prototypes/Body/Prototypes/Animal/animal.yml b/Resources/Prototypes/Body/Prototypes/Animal/animal.yml
index 015409d31b7..a8c81f9eb60 100644
--- a/Resources/Prototypes/Body/Prototypes/Animal/animal.yml
+++ b/Resources/Prototypes/Body/Prototypes/Animal/animal.yml
@@ -19,32 +19,6 @@
- feet
feet:
part: FeetAnimal
-
-# Sunrise-start
-
-- type: body
- id: ManeaterAnimal
- name: "maneater animal"
- root: torso
- slots:
- torso:
- part: TorsoAnimal
- connections:
- - legs
- organs:
- lungs: OrganAnimalLungs
- stomach: OrganManeaterAnimalStomach
- liver: OrganAnimalLiver
- heart: OrganAnimalHeart
- kidneys: OrganAnimalKidneys
- legs:
- part: LegsAnimal
- connections:
- - feet
- feet:
- part: FeetAnimal
-
-# Sunrise-end
- type: body
id: Mouse
diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
index 1d3961bdbc7..34f27cfc45a 100644
--- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
+++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml
@@ -285,23 +285,6 @@
- type: HideLayerClothing
slots:
- Snout
-
-- type: entity
- parent: ClothingMaskBase
- id: ClothingMaskFaceCast
- name: face cast
- description: It can steal your personality!
- components:
- - type: Sprite
- sprite: Clothing/Mask/facecast.rsi
- - type: Clothing
- sprite: Clothing/Mask/facecast.rsi
- - type: BreathMask
- - type: Tag
- - type: HideLayerClothing
- slots:
- - Snout
- - type: FaceCast
- type: entity
parent: ClothingMaskPullableBase
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
index b331fb84792..767308976a7 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
@@ -3413,20 +3413,6 @@
- type: Body
prototype: ManeaterAnimal
# Sunrise-end
-
-- type: entity
- name: saw
- parent: MobPig
- id: MobSaw
- description: The Mother.
- components:
- - type: Saw
- - type: Reproductive
- offspring:
- - id: MobSwine
- capacity: 6
- isPartnerNeed: false
-
- type: entity
name: diona nymph
diff --git a/Resources/Prototypes/_Sunrise/Body/Organs/animal.yml b/Resources/Prototypes/_Sunrise/Body/Organs/animal.yml
new file mode 100644
index 00000000000..68e43c63b15
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Body/Organs/animal.yml
@@ -0,0 +1,11 @@
+- type: entity
+ id: OrganManeaterAnimalStomach
+ parent: OrganAnimalStomach
+ name: maneater stomach
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: Stomach
+ specialDigestible:
+ components:
+ - Identity
+ isDigestibleAddition: true
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Body/Prototypes/animal.yml b/Resources/Prototypes/_Sunrise/Body/Prototypes/animal.yml
new file mode 100644
index 00000000000..d60ee2f7edb
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Body/Prototypes/animal.yml
@@ -0,0 +1,21 @@
+- type: body
+ id: ManeaterAnimal
+ name: "maneater animal"
+ root: torso
+ slots:
+ torso:
+ part: TorsoAnimal
+ connections:
+ - legs
+ organs:
+ lungs: OrganAnimalLungs
+ stomach: OrganManeaterAnimalStomach
+ liver: OrganAnimalLiver
+ heart: OrganAnimalHeart
+ kidneys: OrganAnimalKidneys
+ legs:
+ part: LegsAnimal
+ connections:
+ - feet
+ feet:
+ part: FeetAnimal
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
index 9dd3197b5fc..810c914ae63 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
@@ -129,3 +129,20 @@
sprite: _Sunrise/Clothing/Mask/cemask.rsi
- type: BreathMask
- type: IngestionBlocker
+
+- type: entity
+ parent: ClothingMaskBase
+ id: ClothingMaskFaceCast
+ name: face cast
+ description: It can steal your personality!
+ components:
+ - type: Sprite
+ sprite: Clothing/Mask/facecast.rsi
+ - type: Clothing
+ sprite: Clothing/Mask/facecast.rsi
+ - type: BreathMask
+ - type: Tag
+ - type: HideLayerClothing
+ slots:
+ - Snout
+ - type: FaceCast
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
new file mode 100644
index 00000000000..02407df7b70
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
@@ -0,0 +1,12 @@
+- type: entity
+ name: saw
+ parent: MobPig
+ id: MobSaw
+ description: The Mother.
+ components:
+ - type: Saw
+ - type: Reproductive
+ offspring:
+ - id: MobSwine
+ capacity: 6
+ isPartnerNeed: false
\ No newline at end of file
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png b/Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png
new file mode 100644
index 0000000000000000000000000000000000000000..a231b2aee2d876f3a7100b050a5bd6df335c7017
GIT binary patch
literal 446
zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zD?D8sLn`LH
zy``An>>$Ga!TvPMPM?s3bBfig7I7U^U-_h1QC;mft6AfLoFw6FSJqV$EGjJ~FNKz^
z%T(W0AY+pAf4=jbz2*Jx0^b=H)t@zt{POSH4YRWkzv#4dA1zAVa((UH(%1$3`Yqf`
zYd9V*%H;d;ry{G}qab50_k#O1mt{8G7hnE-)vC8?W|PjbGB9Y`vLrr{>5u0)bYkMA
z&2z73yz>=L+g)ls+g9QBTJ@X1W(BhUQJrg@u=%V)3-^OhyYJ^1XM6UZd~toMT48lv
zg6Vg`mWwL&&Br{Kd)EB=w!ErB2?2~IgVcl@OtlDm$97pIZ|Ro>Q}UB{ub%QraVdMW
z>x)>1xgPVxHBLWFXF0XWZJxOJ#@`z*F;>MnsGBXZ(O+{;MdCdBACqfy8m7#<8WCod
z&|_{Na^@Z@(5V+cGo9C8zgPHIZ=YgI_S3LiUhF#4w3n~STCo#k!IeAip;sr%o>qpt
cW!K95gp4ku>RFVdQ&MBb@0Ah8(U;qFB
literal 0
HcmV?d00001
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/icon.png b/Resources/Textures/Clothing/Mask/facecast.rsi/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..d44cd6141e0ebd618c8f0133000f10e77828737a
GIT binary patch
literal 285
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}*F9YvLn2y}
z6C_v{Cy4Zv9PsE{cJ=h_|BJg@-NGiNik+Mlrl0>`Us<_L@!yk^+M8q?C$&9pfBr8$
zAt7PH6p@1ys{j4rWd?%grMX6)X+{$lNlbtGOp6lkmx
z%YOlGu6mqXyU?
a3=A74heXV{l-&*VB7>)^pUXO@geCx1AZqRa
literal 0
HcmV?d00001
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json b/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
new file mode 100644
index 00000000000..372f749307c
--- /dev/null
+++ b/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
@@ -0,0 +1,18 @@
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Created for Sunrise ss14 repo https://github.com/space-sunrise/space-station-14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-MASK",
+ "directions": 4
+ }
+ ]
+}
From ccfd8aaa14e19596e7ecf35d6329d6d6f9e91af9 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sat, 21 Dec 2024 03:14:45 +0200
Subject: [PATCH 08/16] space
---
Content.Server/Bible/BibleSystem.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 674f308fcd3..77e35c4be79 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -174,7 +174,6 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
_metaData.SetEntityName((EntityUid)args.Target, "свиноматерь");
_popupSystem.PopupEntity(Loc.GetString("bible-saw-transformation"), (EntityUid) args.Target);
_audio.PlayPvs(component.HealSoundPath, (EntityUid) args.Target);
-
}
return;
}
From 96e22e471c6521d916b8e803a02897dfc01f09c5 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sat, 21 Dec 2024 03:51:52 +0200
Subject: [PATCH 09/16] minor refactoring
---
Content.Server/Bible/BibleSystem.cs | 3 ---
Content.Server/FaceCast/FaceCastSystem.cs | 6 ------
Content.Server/Saw/SawSystem.cs | 19 +------------------
3 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 77e35c4be79..5bd38d98211 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -14,14 +14,12 @@
using Content.Shared.Inventory;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Systems;
-using Content.Shared.Nutrition.AnimalHusbandry;
using Content.Shared.Popups;
using Content.Shared.Prayer;
using Content.Shared.Stunnable;
using Content.Shared.Timing;
using Content.Shared.Vampire.Components;
using Content.Shared.Verbs;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
@@ -29,7 +27,6 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
-using System.Linq;
namespace Content.Server.Bible
{
diff --git a/Content.Server/FaceCast/FaceCastSystem.cs b/Content.Server/FaceCast/FaceCastSystem.cs
index 948f8321eea..fa1f91b4705 100644
--- a/Content.Server/FaceCast/FaceCastSystem.cs
+++ b/Content.Server/FaceCast/FaceCastSystem.cs
@@ -1,11 +1,5 @@
-using Content.Server.NPC.HTN.PrimitiveTasks.Operators.Interactions;
using Content.Shared.Inventory.Events;
-using Content.Shared.Sound.Components;
-using Content.Shared.Inventory.Events;
-using Content.Shared.Timing;
using Robust.Shared.Timing;
-using Linguini.Bundle.Errors;
-using Content.Shared.IdentityManagement;
using Content.Shared.IdentityManagement.Components;
using Content.Shared.Clothing.Components;
using Content.Shared.Inventory;
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
index 7c9543c4e69..9ce1cef4f07 100644
--- a/Content.Server/Saw/SawSystem.cs
+++ b/Content.Server/Saw/SawSystem.cs
@@ -4,17 +4,12 @@
using Content.Shared.Nutrition.AnimalHusbandry;
using Content.Server.Mind;
using Robust.Shared.Prototypes;
-using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Server.Nutrition.EntitySystems;
-using Content.Shared.Preferences;
using Content.Server.Humanoid;
-using Content.Shared.Dataset;
-using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs;
using Content.Shared.FixedPoint;
-using Content.Server.Destructible.Thresholds;
using Content.Shared.Mobs.Systems;
using Content.Server._Sunrise.Mood;
using Content.Shared.Nutrition.Components;
@@ -44,14 +39,13 @@ private void OnBeforeFullyEaten(Entity food, ref BeforeFullyEaten
!TryComp(args.User, out ReproductiveComponent? reproductive) ||
!TryComp(food, out MindContainerComponent? mind) ||
!HasComp(food))
- return;
+ return;
EntityUid? foodMind = _mindSystem.GetMind(food);
sawComp.EatenMind = foodMind;
if (_prototypeManager.Index("MobSaw").Components.TryGetComponent("Reproductive", out var defaultReproductive))
reproductive.Capacity = 6;
- //reproductive.Gestating = false;
}
private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
@@ -63,15 +57,12 @@ private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
reproductive.GestationEndTime = null;
reproductive.IsPartnerNeed = false;
}
- //reproductive.Gestating = true;
-
}
private void OnBirth(Entity saw, ref BirthEvent args)
{
if (TryComp(saw, out ReproductiveComponent? reproductive))
reproductive.Capacity = 0;
- //reproductive.Gestating = true;
EntityUid child = args.Spawns[0];
EntityUid? eatenMind = Comp(saw).EatenMind;
saw.Comp.EatenMind = null;
@@ -91,15 +82,7 @@ private void OnBirth(Entity saw, ref BirthEvent args)
}
_mindSystem.TransferTo((EntityUid) eatenMind, child);
-
- //var profile = HumanoidCharacterProfile.RandomWithSpecies("Swine");
- //_humanoid.LoadProfile(args.Spawns[0], profile);
_metaData.SetEntityName(args.Spawns[0], "троттин");
- //Logger.Log(LogLevel.Debug, profile.Name);
- //_metaData.SetEntityName(args.Spawns[0], "PRIVET");
- //if (_prototypeManager.TryIndex("EventHumanoid", out var prototype))
- // _metaData.SetEntityName(args.Spawns[0], prototype.RandomizeName ? profile.Name : name);
-
}
}
From 55ddcb48b3644e436bc4a95df199028538b582dd Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 22 Dec 2024 19:26:16 +0200
Subject: [PATCH 10/16] facecast box added minor fixes
---
Content.Server/Bible/BibleSystem.cs | 4 ++--
Content.Server/Saw/SawSystem.cs | 16 ++++++----------
.../VendingMachines/Inventories/chapel.yml | 1 +
.../Entities/Clothing/Masks/masks.yml | 4 ++--
.../Mask/facecast.rsi/equipped-MASK.png | Bin 446 -> 0 bytes
.../Clothing/Mask/facecast.rsi/icon.png | Bin 285 -> 0 bytes
.../Clothing/Mask/facecast.rsi/meta.json | 18 ------------------
.../Objects/Storage/boxes.rsi/meta.json | 5 ++++-
8 files changed, 15 insertions(+), 33 deletions(-)
delete mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png
delete mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/icon.png
delete mode 100644 Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 5bd38d98211..7e7be1b9505 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -158,7 +158,7 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
return;
}
- //Sunrise-start
+ //Sunrise-start
if (TryPrototype((EntityUid) args.Target, out var prototype)
&& prototype.ID == "MobPig"
@@ -175,7 +175,7 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
return;
}
- //Sunrise-end
+ //Sunrise-end
// This only has a chance to fail if the target is not wearing anything on their head and is not a familiar..
if (!_invSystem.TryGetSlotEntity(args.Target.Value, "head", out var _) && !HasComp(args.Target.Value))
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
index 9ce1cef4f07..db251ebdc28 100644
--- a/Content.Server/Saw/SawSystem.cs
+++ b/Content.Server/Saw/SawSystem.cs
@@ -14,15 +14,14 @@
using Content.Server._Sunrise.Mood;
using Content.Shared.Nutrition.Components;
-
namespace Content.Server.Saw;
public sealed class SawSystem : EntitySystem
{
+ [Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
- [Dependency] private readonly HumanoidAppearanceSystem _humanoid = default!;
[Dependency] private readonly MobThresholdSystem _thresholdSystem = default!;
public override void Initialize()
{
@@ -50,13 +49,11 @@ private void OnBeforeFullyEaten(Entity food, ref BeforeFullyEaten
private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
{
- if (TryComp(ent, out ReproductiveComponent? reproductive))
- {
- reproductive.Capacity = 0;
- reproductive.Gestating = false;
- reproductive.GestationEndTime = null;
- reproductive.IsPartnerNeed = false;
- }
+ if (HasComp(ent))
+ RemComp(ent);
+
+ _entityManager.AddComponents(ent, _prototypeManager.Index("MobSaw").Components, false);
+
}
private void OnBirth(Entity saw, ref BirthEvent args)
@@ -84,5 +81,4 @@ private void OnBirth(Entity saw, ref BirthEvent args)
_mindSystem.TransferTo((EntityUid) eatenMind, child);
_metaData.SetEntityName(args.Spawns[0], "троттин");
}
-
}
diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml
index 636ecda05eb..fd75568b18a 100644
--- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml
+++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml
@@ -21,6 +21,7 @@
ClothingNeckStoleTallit: 1 # Sunrise
BoxCandle: 2
BoxCandleSmall: 2
+ BoxFacecast: 2 # Sunrise
Urn: 5
Bible: 1
RedFlowers: 3 # Sunrise
diff --git a/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
index 810c914ae63..133685f79c6 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Clothing/Masks/masks.yml
@@ -137,9 +137,9 @@
description: It can steal your personality!
components:
- type: Sprite
- sprite: Clothing/Mask/facecast.rsi
+ sprite: _Sunrise/Clothing/Mask/facecast.rsi
- type: Clothing
- sprite: Clothing/Mask/facecast.rsi
+ sprite: _Sunrise/Clothing/Mask/facecast.rsi
- type: BreathMask
- type: Tag
- type: HideLayerClothing
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png b/Resources/Textures/Clothing/Mask/facecast.rsi/equipped-MASK.png
deleted file mode 100644
index a231b2aee2d876f3a7100b050a5bd6df335c7017..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 446
zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zD?D8sLn`LH
zy``An>>$Ga!TvPMPM?s3bBfig7I7U^U-_h1QC;mft6AfLoFw6FSJqV$EGjJ~FNKz^
z%T(W0AY+pAf4=jbz2*Jx0^b=H)t@zt{POSH4YRWkzv#4dA1zAVa((UH(%1$3`Yqf`
zYd9V*%H;d;ry{G}qab50_k#O1mt{8G7hnE-)vC8?W|PjbGB9Y`vLrr{>5u0)bYkMA
z&2z73yz>=L+g)ls+g9QBTJ@X1W(BhUQJrg@u=%V)3-^OhyYJ^1XM6UZd~toMT48lv
zg6Vg`mWwL&&Br{Kd)EB=w!ErB2?2~IgVcl@OtlDm$97pIZ|Ro>Q}UB{ub%QraVdMW
z>x)>1xgPVxHBLWFXF0XWZJxOJ#@`z*F;>MnsGBXZ(O+{;MdCdBACqfy8m7#<8WCod
z&|_{Na^@Z@(5V+cGo9C8zgPHIZ=YgI_S3LiUhF#4w3n~STCo#k!IeAip;sr%o>qpt
cW!K95gp4ku>RFVdQ&MBb@0Ah8(U;qFB
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/icon.png b/Resources/Textures/Clothing/Mask/facecast.rsi/icon.png
deleted file mode 100644
index d44cd6141e0ebd618c8f0133000f10e77828737a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 285
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}*F9YvLn2y}
z6C_v{Cy4Zv9PsE{cJ=h_|BJg@-NGiNik+Mlrl0>`Us<_L@!yk^+M8q?C$&9pfBr8$
zAt7PH6p@1ys{j4rWd?%grMX6)X+{$lNlbtGOp6lkmx
z%YOlGu6mqXyU?
a3=A74heXV{l-&*VB7>)^pUXO@geCx1AZqRa
diff --git a/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json b/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
deleted file mode 100644
index 372f749307c..00000000000
--- a/Resources/Textures/Clothing/Mask/facecast.rsi/meta.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "version": 1,
- "license": "CC-BY-SA-3.0",
- "copyright": "Created for Sunrise ss14 repo https://github.com/space-sunrise/space-station-14",
- "size": {
- "x": 32,
- "y": 32
- },
- "states": [
- {
- "name": "icon"
- },
- {
- "name": "equipped-MASK",
- "directions": 4
- }
- ]
-}
diff --git a/Resources/Textures/Objects/Storage/boxes.rsi/meta.json b/Resources/Textures/Objects/Storage/boxes.rsi/meta.json
index 46db5062cac..fa2bdaaf0c1 100644
--- a/Resources/Textures/Objects/Storage/boxes.rsi/meta.json
+++ b/Resources/Textures/Objects/Storage/boxes.rsi/meta.json
@@ -235,6 +235,9 @@
},
{
"name": "agrichemkit"
- }
+ },
+ {
+ "name": "facecast"
+ }
]
}
From fdaa95931bbd4a0a93735002c25d6174541ed9f5 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 22 Dec 2024 20:06:49 +0200
Subject: [PATCH 11/16] minor fixes added forgotten non versioned files from
last commit
---
Content.Server/Bible/BibleSystem.cs | 4 ++--
Content.Server/Saw/SawSystem.cs | 2 +-
.../_sunrise/catalog/fills/boxes/misc.ftl | 2 ++
.../_Sunrise/Catalog/Fills/Boxes/misc.yml | 17 +++++++++++++++++
.../Objects/Storage/boxes.rsi/facecast.png | Bin 0 -> 168 bytes
.../Mask/facecast.rsi/equipped-MASK.png | Bin 0 -> 446 bytes
.../Clothing/Mask/facecast.rsi/icon.png | Bin 0 -> 285 bytes
.../Clothing/Mask/facecast.rsi/meta.json | 18 ++++++++++++++++++
8 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 Resources/Locale/ru-RU/_prototypes/_sunrise/catalog/fills/boxes/misc.ftl
create mode 100644 Resources/Prototypes/_Sunrise/Catalog/Fills/Boxes/misc.yml
create mode 100644 Resources/Textures/Objects/Storage/boxes.rsi/facecast.png
create mode 100644 Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/equipped-MASK.png
create mode 100644 Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/icon.png
create mode 100644 Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/meta.json
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 7e7be1b9505..7b74a59757d 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -164,8 +164,8 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
&& prototype.ID == "MobPig"
&& !HasComp(args.Target))
{
- if (_lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count > 4
- && _lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count > 0)
+ if (_lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count >= 5
+ && _lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count >= 2)
{
_entityManager.AddComponents((EntityUid) args.Target, _prototypeManager.Index("MobSaw").Components, false);
_metaData.SetEntityName((EntityUid)args.Target, "свиноматерь");
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
index db251ebdc28..eb6b8da27de 100644
--- a/Content.Server/Saw/SawSystem.cs
+++ b/Content.Server/Saw/SawSystem.cs
@@ -53,7 +53,7 @@ private void SawInit(EntityUid ent, SawComponent saw, ComponentInit args)
RemComp(ent);
_entityManager.AddComponents(ent, _prototypeManager.Index("MobSaw").Components, false);
-
+ Comp(ent).Capacity = 0;
}
private void OnBirth(Entity saw, ref BirthEvent args)
diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/catalog/fills/boxes/misc.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/catalog/fills/boxes/misc.ftl
new file mode 100644
index 00000000000..e01c2291e29
--- /dev/null
+++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/catalog/fills/boxes/misc.ftl
@@ -0,0 +1,2 @@
+ent-BoxFacecast = коробка лицевых слепков
+ .desc = Она заполнена лицами.
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Catalog/Fills/Boxes/misc.yml b/Resources/Prototypes/_Sunrise/Catalog/Fills/Boxes/misc.yml
new file mode 100644
index 00000000000..a09671db905
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Catalog/Fills/Boxes/misc.yml
@@ -0,0 +1,17 @@
+- type: entity
+ name: face casts box
+ parent: BoxCardboard
+ id: BoxFacecast
+ description: This box is full of faces.
+ components:
+ - type: Sprite
+ layers:
+ - state: box
+ - state: facecast
+ - type: Storage
+ grid:
+ - 0,0,4,1
+ - type: StorageFill
+ contents:
+ - id: ClothingMaskFaceCast
+ amount: 5
\ No newline at end of file
diff --git a/Resources/Textures/Objects/Storage/boxes.rsi/facecast.png b/Resources/Textures/Objects/Storage/boxes.rsi/facecast.png
new file mode 100644
index 0000000000000000000000000000000000000000..2597b8026c7864007447e76131b61fe324c1fb0c
GIT binary patch
literal 168
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}NuDl_ArY;~
z2@%(h_P|9-d0JTo*3k2G6L
zORA{4O32;0>9I{x#Im8WvGL)Tm)RmO>$Ga!TvPMPM?s3bBfig7I7U^U-_h1QC;mft6AfLoFw6FSJqV$EGjJ~FNKz^
z%T(W0AY+pAf4=jbz2*Jx0^b=H)t@zt{POSH4YRWkzv#4dA1zAVa((UH(%1$3`Yqf`
zYd9V*%H;d;ry{G}qab50_k#O1mt{8G7hnE-)vC8?W|PjbGB9Y`vLrr{>5u0)bYkMA
z&2z73yz>=L+g)ls+g9QBTJ@X1W(BhUQJrg@u=%V)3-^OhyYJ^1XM6UZd~toMT48lv
zg6Vg`mWwL&&Br{Kd)EB=w!ErB2?2~IgVcl@OtlDm$97pIZ|Ro>Q}UB{ub%QraVdMW
z>x)>1xgPVxHBLWFXF0XWZJxOJ#@`z*F;>MnsGBXZ(O+{;MdCdBACqfy8m7#<8WCod
z&|_{Na^@Z@(5V+cGo9C8zgPHIZ=YgI_S3LiUhF#4w3n~STCo#k!IeAip;sr%o>qpt
cW!K95gp4ku>RFVdQ&MBb@0Ah8(U;qFB
literal 0
HcmV?d00001
diff --git a/Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/icon.png b/Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..d44cd6141e0ebd618c8f0133000f10e77828737a
GIT binary patch
literal 285
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}*F9YvLn2y}
z6C_v{Cy4Zv9PsE{cJ=h_|BJg@-NGiNik+Mlrl0>`Us<_L@!yk^+M8q?C$&9pfBr8$
zAt7PH6p@1ys{j4rWd?%grMX6)X+{$lNlbtGOp6lkmx
z%YOlGu6mqXyU?
a3=A74heXV{l-&*VB7>)^pUXO@geCx1AZqRa
literal 0
HcmV?d00001
diff --git a/Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/meta.json b/Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/meta.json
new file mode 100644
index 00000000000..372f749307c
--- /dev/null
+++ b/Resources/Textures/_Sunrise/Clothing/Mask/facecast.rsi/meta.json
@@ -0,0 +1,18 @@
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Created for Sunrise ss14 repo https://github.com/space-sunrise/space-station-14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-MASK",
+ "directions": 4
+ }
+ ]
+}
From a383bf58c24ecd9ec914025f86f9b2eabe66fdac Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 22 Dec 2024 20:48:54 +0200
Subject: [PATCH 12/16] balance changes
---
Content.Server/Saw/SawComponent.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Content.Server/Saw/SawComponent.cs b/Content.Server/Saw/SawComponent.cs
index 3d8b9d0f90b..3ff2f976687 100644
--- a/Content.Server/Saw/SawComponent.cs
+++ b/Content.Server/Saw/SawComponent.cs
@@ -6,9 +6,9 @@ namespace Content.Server.Saw;
[RegisterComponent]
public sealed partial class SawComponent : Component
{
- [DataField, ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public EntityUid? EatenMind = null;
[DataField]
- public FixedPoint2 HungerToThresholdModifier = 1;
+ public FixedPoint2 HungerToThresholdModifier = 1.5;
}
From 7c99017b95d3a3df54a063c1331b9dd2f36c8638 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Sun, 22 Dec 2024 21:04:21 +0200
Subject: [PATCH 13/16] merge conflicts resolved
---
Content.Server/Saw/SawSystem.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Content.Server/Saw/SawSystem.cs b/Content.Server/Saw/SawSystem.cs
index eb6b8da27de..a77f68e1cfd 100644
--- a/Content.Server/Saw/SawSystem.cs
+++ b/Content.Server/Saw/SawSystem.cs
@@ -1,4 +1,3 @@
-using Content.Server.Nutrition;
using Content.Server.Nutrition.Components;
using Content.Shared.IdentityManagement.Components;
using Content.Shared.Nutrition.AnimalHusbandry;
@@ -6,13 +5,14 @@
using Robust.Shared.Prototypes;
using Content.Shared.Mind.Components;
using Content.Server.Nutrition.EntitySystems;
-using Content.Server.Humanoid;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs;
using Content.Shared.FixedPoint;
using Content.Shared.Mobs.Systems;
using Content.Server._Sunrise.Mood;
using Content.Shared.Nutrition.Components;
+using Content.Shared.Nutrition;
+using Content.Shared.Nutrition.EntitySystems;
namespace Content.Server.Saw;
@@ -23,6 +23,7 @@ public sealed class SawSystem : EntitySystem
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly MobThresholdSystem _thresholdSystem = default!;
+ [Dependency] private readonly HungerSystem _hungerSystem = default!;
public override void Initialize()
{
base.Initialize();
@@ -70,7 +71,7 @@ private void OnBirth(Entity saw, ref BirthEvent args)
if (TryComp(child, out var thresholds))
{
- FixedPoint2 thresholdModifier = hungerComp.CurrentHunger * saw.Comp.HungerToThresholdModifier;
+ FixedPoint2 thresholdModifier = _hungerSystem.GetHunger(hungerComp) * saw.Comp.HungerToThresholdModifier;
_thresholdSystem.SetMobStateThreshold(child, _thresholdSystem.GetThresholdForState(child, MobState.Critical) + thresholdModifier, MobState.Critical);
_thresholdSystem.SetMobStateThreshold(child, _thresholdSystem.GetThresholdForState(child, MobState.Dead) + thresholdModifier, MobState.Dead);
From ec96367612b02a18c3cef0277bf55bcf4b3648f4 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Mon, 23 Dec 2024 15:10:22 +0200
Subject: [PATCH 14/16] ftl fixea
---
.../ru-RU/_strings/_sunrise/chapel/bible.ftl | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
index 491fafddbc3..9d3e7031929 100644
--- a/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
+++ b/Resources/Locale/ru-RU/_strings/_sunrise/chapel/bible.ftl
@@ -1,18 +1 @@
-bible-heal-success-self = Вы ударяете { $target } с помощью { $bible }, и его раны закрываются во вспышке святого света!
-bible-heal-success-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и его раны закрываются во вспышке святого света!
-bible-heal-success-none-self = Вы ударяете { $target } с помощью { $bible }, но раны которые можно излечить отсутствуют!
-bible-heal-success-none-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }!
-bible-damage-unholy-self = Вы ударяете { THE($target) } с помощью { THE($bible) }, и его сжигает вспышка священного огня!
-bible-damage-unholy-others = { CAPITALIZE(THE($user)) } ударяет { THE($target) } с помощью { THE($bible) }, и его сжигает вспышка священного огня!
-bible-heal-fail-self = Вы ударяете { $target } с помощью { $bible }, и { $bible }, с печальным стуком, оказывает ошеломляющий эффект!
-bible-heal-fail-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и { $bible }, с печальным стуком, оказывает ошеломляющий эффект!
-bible-sizzle = Книга шипит в ваших руках!
-bible-summon-verb = Призвать фамильяра
-bible-summon-verb-desc = Призовите фамильяра, который станет помогать вам и обретёт человекоподобный интеллект после вселения в него души.
-bible-summon-requested = Ваш фамильяр явится, как только появится желающая душа.
-bible-summon-respawn-ready = { CAPITALIZE($book) } наполняется неземной энергией. Обитатель { CAPITALIZE($book) } вернулся домой.
-necro-heal-success-self = Вы ударяете { $target } с помощью { $bible }, и кожа { $target } начинает кукожиться и плавиться!
-necro-heal-success-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, и кожа { $target } начинает кукожиться и плавиться!
-necro-heal-fail-self = Вы ударяете { $target } с помощью { $bible }, но удар отдаётся печальным стуком, не сумев поразить { $target }.
-necro-heal-fail-others = { CAPITALIZE($user) } ударяет { $target } с помощью { $bible }, но удар отдаётся печальным стуком, не сумев поразить { $target }.
bible-saw-transformation = Свинья божественным чудом превращается в свиноматерь.
\ No newline at end of file
From ffb4e13730f4bc2f70739f33a46227df671bbb3a Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Mon, 23 Dec 2024 15:35:31 +0200
Subject: [PATCH 15/16] balance changes
---
Resources/Prototypes/Entities/Mobs/Species/base.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml
index 3f862b92349..8ff2c96bcda 100644
--- a/Resources/Prototypes/Entities/Mobs/Species/base.yml
+++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml
@@ -235,10 +235,10 @@
- type: SolutionContainerManager
solutions:
food:
- maxVol: 50
+ maxVol: 25
reagents:
- ReagentId: UncookedAnimalProteins
- Quantity: 50
+ Quantity: 25
- type: Food
requiresSpecialDigestion: true
# Sunrise-End
From 91fdcb8612120b5e3f34c76c861d6b3c398c95c5 Mon Sep 17 00:00:00 2001
From: Svinthefirst <115838204+Svinthefirst@users.noreply.github.com>
Date: Thu, 26 Dec 2024 20:01:17 +0200
Subject: [PATCH 16/16] Alexandre fixes
---
Content.Server/Bible/BibleSystem.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs
index 7b74a59757d..78d59cc1184 100644
--- a/Content.Server/Bible/BibleSystem.cs
+++ b/Content.Server/Bible/BibleSystem.cs
@@ -27,6 +27,7 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
+using System.Linq;
namespace Content.Server.Bible
{
@@ -161,7 +162,7 @@ private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInter
//Sunrise-start
if (TryPrototype((EntityUid) args.Target, out var prototype)
- && prototype.ID == "MobPig"
+ && (prototype.ID == "MobPig" || (prototype.Parents != null && prototype.Parents.Contains("MobPig")))
&& !HasComp(args.Target))
{
if (_lookUp.GetEntitiesInRange(Transform(uid).Coordinates, 5).Count >= 5