Skip to content
Open
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
6 changes: 6 additions & 0 deletions Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared._MACRO.Atmos.Components;
using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components;
using Content.Server.Stunnable;
Expand Down Expand Up @@ -294,6 +295,11 @@ public void SetFireStacks(EntityUid uid, float stacks, FlammableComponent? flamm
if (!Resolve(uid, ref flammable))
return;

// MACRO start: firestack modifier
if (TryComp<FireStackModifierComponent>(uid, out var fireStackModifier))
stacks *= fireStackModifier.Modifier;
// MACRO end

flammable.FireStacks = MathF.Min(MathF.Max(flammable.MinimumFireStacks, stacks), flammable.MaximumFireStacks);

if (flammable.FireStacks <= 0)
Expand Down
14 changes: 14 additions & 0 deletions Content.Shared/Bed/Sleep/SleepingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared._MACRO.Bed.Sleep;
using Content.Shared.Actions;
using Content.Shared.Actions.Components;
using Content.Shared.Buckle.Components;
Expand Down Expand Up @@ -287,6 +288,19 @@ private void OnStatusMobStateChanged(Entity<ForcedSleepingStatusEffectComponent>

private void OnStatusEffectApplied(Entity<ForcedSleepingStatusEffectComponent> ent, ref StatusEffectAppliedEvent args)
{
// MACRO start: SleepTimeModifier to modify force sleep duration
// IF YOU ARE HERE TO ADD MORE TRYCOMPS: dont. make a new event instead.
if (TryComp<SleepTimeModifierComponent>(args.Target, out var sleepTimeModifier) &&
_statusEffect.TryGetTime(args.Target, StatusEffectForcedSleeping, out var initTime))
{
var time = initTime.EndEffectTime - initTime.StartEffectTime;
_statusEffect.TryUpdateStatusEffectDuration(
args.Target,
StatusEffectForcedSleeping,
time * sleepTimeModifier.Modifier);
}
// MACRO end

// Applying state check needed so we don't add SleepingComp during
// entity reset due to the status effect getting inserted
if (!_gameTiming.ApplyingState)
Expand Down
14 changes: 13 additions & 1 deletion Content.Shared/Interaction/InteractionPopupSystem.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using Content.Shared._MACRO.Interaction;
using Content.Shared.Bed.Sleep;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Popups;
using Content.Shared.Whitelist; // MACRO: Add petting chance modifier
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
Expand All @@ -16,6 +18,7 @@ namespace Content.Shared.Interaction;

public sealed partial class InteractionPopupSystem : EntitySystem
{
[Dependency] private EntityWhitelistSystem _entityWhitelist = null!; // MACRO: Add petting chance modifier
[Dependency] private IGameTiming _gameTiming = default!;
[Dependency] private IRobustRandom _random = default!;
[Dependency] private MobStateSystem _mobStateSystem = default!;
Expand Down Expand Up @@ -91,7 +94,16 @@ private void SharedInteract(
if (_netMan.IsClient && !predict)
return;

if (_random.Prob(component.SuccessChance))
// MACRO start: Add petting chance modifier
var successChance = component.SuccessChance;

if (TryComp<PettingChanceModifierComponent>(uid, out var pettingChance)
&& _entityWhitelist.IsWhitelistPassOrNull(pettingChance.TargetWhitelist, target)
&& _entityWhitelist.IsWhitelistFailOrNull(pettingChance.TargetBlacklist, target))
successChance *= pettingChance.Modifier;
// MACRO end

if (_random.Prob(successChance)) // MACRO: Add petting chance modifier
{
if (component.InteractSuccessString != null)
msg = Loc.GetString(component.InteractSuccessString, ("target", Identity.Entity(uid, EntityManager))); // Success message (localized).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public bool CanAccessSolution(EntityUid ingested,

// TODO: Relay this event to solutions using solution relay
var ev = new EdibleEvent(user);
RaiseLocalEvent(ingested, ref ev);
RaiseLocalEvent(ingested, ref ev, true); // DeltaV - Set broadcast to true for DVEatTimeModifier subscription

solution = ev.Solution;
time = ev.Time;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Content.Shared._MACRO.Atmos.Components;

/// <summary>
/// This is used for modifying fire stacks.
/// </summary>
[RegisterComponent]
public sealed partial class FireStackModifierComponent : Component
{
/// <summary>
/// The modifier to multiply the fire stacks by.
/// </summary>
[DataField]
public float Modifier { get; set; } = 1f;
}
20 changes: 20 additions & 0 deletions Content.Shared/_MACRO/Bed/Sleep/SleepTimeModifierComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Robust.Shared.GameStates;

namespace Content.Shared._MACRO.Bed.Sleep;

/// <summary>
/// Component that modifies an entity's sleep wakeup cooldown
/// by a multiplier.
/// </summary>
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
public sealed partial class SleepTimeModifierComponent : Component
{
/// <summary>
/// When this entity is put to sleep, the cooldown before
/// an attached player can wake the entity up will be
/// multiplied by this value.
/// </summary>
[DataField, AutoNetworkedField]
public float Modifier = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Content.Shared.Interaction.Components;
using Content.Shared.Whitelist;

namespace Content.Shared._MACRO.Interaction;

/// <summary>
/// Allows any entity with this component to have a different success rate when petting mobs with <see cref="InteractionPopupComponent"/>.
/// </summary>
[RegisterComponent]
public sealed partial class PettingChanceModifierComponent : Component
{
/// <summary>
/// Modifier of the chance to successfully pet a mob.
/// </summary>
[DataField]
public float Modifier = 1;

/// <summary>
/// If not null, the target must succeed the whitelist.
/// </summary>
[DataField]
public EntityWhitelist? TargetWhitelist { get; set; }

/// <summary>
/// If not null, the target must not pass the blacklist.
/// </summary>
[DataField]
public EntityWhitelist? TargetBlacklist { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Robust.Shared.GameStates;

namespace Content.Shared._MACRO.Nutrition.Components;

/// <summary>
/// This component is used to modify the time to eat food by a specific modifier.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class EatTimeModifierComponent : Component
{
/// <summary>
/// The amount you would like to multiply the delay on the eating doAfter
/// </summary>
[DataField]
public float Modifier = 1f;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Content.Shared._MACRO.Nutrition.Components;
using Content.Shared.Nutrition;
using Content.Shared.Nutrition.EntitySystems;

namespace Content.Shared._MACRO.Nutrition.EntitySystems;

/// <summary>
/// Handles the time modification of the eaten food
/// </summary>
public sealed class EatTimeModifierSystem : EntitySystem
{
/// <inheritdoc/>
public override void Initialize()
{
SubscribeLocalEvent<EdibleEvent>(OnEdible, after: [typeof(IngestionSystem)]);
}

private void OnEdible(ref EdibleEvent args)
{
var user = args.User;

if (args.Cancelled)
return;

if (!TryComp<EatTimeModifierComponent>(user, out var eatTimeModifier))
return;

args.Time *= eatTimeModifier.Modifier;
}
}
36 changes: 36 additions & 0 deletions Resources/Audio/_MACRO/Voice/Ovinia/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#Attributions for Ovinia Baa's and Moo's

- files: ["ovinia_baa1.ogg"]
copyright: "created by saha213131, Modified by 'sheepmera', The original audio was shortened and converted from stereo to mono"
license: "CC0-1.0"
source: "https://freesound.org/people/saha213131/sounds/683259/"

- files: ["ovinia_baa2.ogg"]
copyright: "created by saha213131, Modified by 'sheepmera', The original audio was converted from stereo to mono"
license: "CC0-1.0"
source: "https://freesound.org/people/saha213131/sounds/691476/"

- files: ["ovinia_baa3.ogg"]
copyright: "created by michaelperfect, Modified by 'sheepmera', The original audio was shortened and converted from stereo to mono "
license: "CC0-1.0"
source: "https://freesound.org/people/michaelperfect/sounds/710299/"

- files: ["ovinia_scream.ogg"]
copyright: "created by saha213131, Modified by 'sheepmera', The original audio was pitch shifted and converted from stereo to mono "
license: "CC0-1.0"
source: "https://freesound.org/people/michaelperfect/sounds/710300/"

- files: ["ovinia_moo1.ogg"]
copyright: "created by Zozzy, Modified by 'Darklyac', The original audio was converted from WAV to OGG format"
license: "CC0-1.0"
source: "https://freesound.org/people/Zozzy/sounds/59245/"

- files: ["ovinia_moo2.ogg, ovinia_moo3.ogg"]
copyright: "created by JarredGibb, Modified by 'Darklyac', the original audio was converted from WAV to OGG format"
license: "CC0-1.0"
source: "https://freesound.org/people/JarredGibb/sounds/233145/"

- files: ["ovinia_moo4.ogg"]
copyright: "created by JarredGibb, Modified by 'Darklyac', the original audio was converted from WAV to OGG format"
license: "CC0-1.0"
source: "https://freesound.org/people/JarredGibb/sounds/233130/"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Resources/Locale/en-US/_MACRO/chat/chat-managers.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
chat-speech-verb-name-ovinia = Ovinia
chat-speech-verb-ovinia-1 = baas
chat-speech-verb-ovinia-2 = bleats
chat-speech-verb-ovinia-3 = maas
chat-speech-verb-ovinia-4 = mehs
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/_MACRO/chat/emotes.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Names
chat-emote-name-baa = Baa
chat-emote-name-moo = Moo

# Message
chat-emote-msg-baa = baas.
chat-emote-msg-moo = moos.
49 changes: 49 additions & 0 deletions Resources/Locale/en-US/_MACRO/datasets/names/ovinia.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
names-ovinia-first-1 = Myrail
names-ovinia-first-2 = Vaeluun
names-ovinia-first-3 = Thallinn
names-ovinia-first-4 = Meavallei
names-ovinia-first-5 = Vaalev
names-ovinia-first-6 = Ruth
names-ovinia-first-7 = Baareivelaa
names-ovinia-first-8 = Maalun
names-ovinia-first-9 = Lethaavul
names-ovinia-first-10 = Keephai
names-ovinia-first-11 = Ehhmchole
names-ovinia-first-12 = Ailuuth
names-ovinia-first-13 = Ruuna
names-ovinia-first-14 = Lua
names-ovinia-first-15 = luura
names-ovinia-first-16 = Lumia
names-ovinia-first-17 = Maeria
names-ovinia-first-18 = Luumara
names-ovinia-first-19 = Baalu
names-ovinia-first-20 = Maamea
names-ovinia-first-21 = Ruulune
names-ovinia-first-22 = Thaeluu
names-ovinia-first-23 = Rhumelaah
names-ovinia-first-24 = Thairulune
names-ovinia-first-25 = Lylymea
names-ovinia-first-26 = Myvaine
names-ovinia-first-27 = Lymehlune
names-ovinia-first-28 = Jayluvai
names-ovinia-first-29 = Tyean
names-ovinia-first-30 = Meva
names-ovinia-first-31 = Vyre
names-ovinia-first-32 = Mera

names-ovinia-last-1 = Juvayelean
names-ovinia-last-2 = Lunae
names-ovinia-last-3 = Vuulae
names-ovinia-last-4 = Rohmaae
names-ovinia-last-5 = Phaelarune
names-ovinia-last-6 = Invae
names-ovinia-last-7 = Meathall
names-ovinia-last-8 = Mehhvaa
names-ovinia-last-9 = Laalaene
names-ovinia-last-10 = Baahlathruu
names-ovinia-last-11 = Thyrunia
names-ovinia-last-12 = Vylune
names-ovinia-last-13 = Rhymehelai
names-ovinia-last-14 = Veythavai
names-ovinia-last-15 = Yvalueth
names-ovinia-last-16 = Lyvahlia
Loading
Loading