Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into 2023-12-31-CrimeApp
  • Loading branch information
dvir001 committed May 3, 2024
2 parents 2cf3b2f + cea9235 commit b1678fc
Show file tree
Hide file tree
Showing 173 changed files with 87,750 additions and 19,482 deletions.
38 changes: 25 additions & 13 deletions Content.Client/_NF/Latejoin/VesselListControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,43 @@ protected override void Dispose(bool disposing)

private int DefaultComparison(NetEntity x, NetEntity y)
{
var xContainsHop = _gameTicker.JobsAvailable[x].ContainsKey("HeadOfPersonnel");
var yContainsHop = _gameTicker.JobsAvailable[y].ContainsKey("HeadOfPersonnel");
var xContainsSR = _gameTicker.JobsAvailable[x].ContainsKey("StationRepresentative");
var yContainsSR = _gameTicker.JobsAvailable[y].ContainsKey("StationRepresentative");

var xContainsHos = _gameTicker.JobsAvailable[x].ContainsKey("HeadOfSecurity");
var yContainsHos = _gameTicker.JobsAvailable[y].ContainsKey("HeadOfSecurity");
var xContainsSheriff = _gameTicker.JobsAvailable[x].ContainsKey("Sheriff");
var yContainsSheriff = _gameTicker.JobsAvailable[y].ContainsKey("Sheriff");

// Prioritize "HeadOfPersonnel"
switch (xContainsHop)
var xContainsPirateCaptain = _gameTicker.JobsAvailable[x].ContainsKey("PirateCaptain");
var yContainsPirateCaptain = _gameTicker.JobsAvailable[y].ContainsKey("PirateCaptain");

// Prioritize "StationRepresentative"
switch (xContainsSR)
{
case true when !yContainsSR:
return -1;
case false when yContainsSR:
return 1;
}

// If both or neither contain "StationRepresentative", prioritize "Sheriff"
switch (xContainsSheriff)
{
case true when !yContainsHop:
case true when !yContainsSheriff:
return -1;
case false when yContainsHop:
case false when yContainsSheriff:
return 1;
}

// If both or neither contain "HeadOfPersonnel", prioritize "HeadOfSecurity"
switch (xContainsHos)
// If both or neither contain "StationRepresentative", "Sheriff" prioritize "PirateCaptain"
switch (xContainsPirateCaptain)
{
case true when !yContainsHos:
case true when !yContainsPirateCaptain:
return -1;
case false when yContainsHos:
case false when yContainsPirateCaptain:
return 1;
}

// If both or neither contain "HeadOfPersonnel" and "HeadOfSecurity", sort by jobCountComparison
// If both or neither contain "StationRepresentative" and "Sheriff", sort by jobCountComparison
var jobCountComparison = -(int) (_gameTicker.JobsAvailable[x].Values.Sum(a => a ?? 0) -
_gameTicker.JobsAvailable[y].Values.Sum(b => b ?? 0));
var nameComparison = string.Compare(_gameTicker.StationNames[x], _gameTicker.StationNames[y], StringComparison.Ordinal);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Server.Mail.Components
{
[RegisterComponent]
public sealed partial class MailDisabledComponent : Component
{}
}
7 changes: 7 additions & 0 deletions Content.Server/Nyanotrasen/Mail/MailSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public sealed class MailSystem : EntitySystem
[Dependency] private readonly ItemSystem _itemSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly MetaDataSystem _metaDataSystem = default!;
[Dependency] private readonly IEntityManager _entManager = default!; // Frontier

private ISawmill _sawmill = default!;

Expand Down Expand Up @@ -579,6 +580,12 @@ public bool TryGetMailRecipientForReceiver(MailReceiverComponent receiver, [NotN
return false;
}

if (_entManager.TryGetComponent<MailDisabledComponent>(receiver.Owner, out var antag))
{
recipient = null;
return false;
}

var accessTags = access.Tags;

var mayReceivePriorityMail = !(_mindSystem.GetMind(receiver.Owner) == null);
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Salvage/SalvageSystem.Expeditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed partial class SalvageSystem
* Handles setup / teardown of salvage expeditions.
*/

private const int MissionLimit = 4;
private const int MissionLimit = 5;
[Dependency] private readonly StationSystem _stationSystem = default!;

private readonly JobQueue _salvageQueue = new();
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Shuttles/Components/ThrusterComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public sealed partial class ThrusterComponent : Component
public string MachinePartThrust = "Capacitor";

[DataField("partRatingThrustMultiplier")]
public float PartRatingThrustMultiplier = 1.5f;
public float PartRatingThrustMultiplier = 1.15f; // Frontier - PR #1292 1.5f<1.15f

[DataField("thrusterIgnoreEmp")]
public bool ThrusterIgnoreEmp = false;
Expand Down
14 changes: 9 additions & 5 deletions Content.Server/StationEvents/Events/IonStormRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,19 @@ protected override void Started(EntityUid uid, IonStormRuleComponent comp, GameR
{
base.Started(uid, comp, gameRule, args);

if (!TryGetRandomStation(out var chosenStation))
return;
// Frontier - Affect all silicon beings in the sector, not just on-station.
// if (!TryGetRandomStation(out var chosenStation))
// return;
// End Frontier

var query = EntityQueryEnumerator<SiliconLawBoundComponent, TransformComponent, IonStormTargetComponent>();
while (query.MoveNext(out var ent, out var lawBound, out var xform, out var target))
{
// only affect law holders on the station
if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station != chosenStation)
continue;
// Frontier - Affect all silicon beings in the sector, not just on-station.
// // only affect law holders on the station
// if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station != chosenStation)
// continue;
// End Frontier

if (!RobustRandom.Prob(target.Chance))
continue;
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_NF/Contraband/Systems/ContrabandSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private bool CanSell(EntityUid uid, TransformComponent xform)
{
if (_mobQuery.HasComponent(uid))
{
if (_mobQuery.GetComponent(uid).CurrentState == MobState.Alive)
if (_mobQuery.GetComponent(uid).CurrentState == MobState.Dead) // Allow selling alive prisoners
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Robust.Shared.GameStates;

namespace Content.Shared.StepTrigger.Components;


[RegisterComponent, NetworkedComponent]
public sealed partial class NoShoesSilentFootstepsComponent : Component
{
}
10 changes: 10 additions & 0 deletions Content.Shared/Movement/Systems/SharedMoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using PullableComponent = Content.Shared.Movement.Pulling.Components.PullableComponent;
using Content.Shared.StepTrigger.Components; // Delta V-NoShoesSilentFootstepsComponent

namespace Content.Shared.Movement.Systems
{
Expand All @@ -46,6 +47,7 @@ public abstract partial class SharedMoverController : VirtualController
[Dependency] protected readonly SharedPhysicsSystem Physics = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly TagSystem _tags = default!;
[Dependency] private readonly IEntityManager _entities = default!; // Delta V-NoShoesSilentFootstepsComponent

protected EntityQuery<InputMoverComponent> MoverQuery;
protected EntityQuery<MobMoverComponent> MobMoverQuery;
Expand Down Expand Up @@ -438,6 +440,14 @@ private bool TryGetSound(
sound = moverModifier.FootstepSoundCollection;
return true;
}

// If got the component in yml and no shoes = no sound. Delta V
if (_entities.TryGetComponent(uid, out NoShoesSilentFootstepsComponent? _) &
!_inventory.TryGetSlotEntity(uid, "shoes", out var _))
{
return false;
}
// Delta V NoShoesSilentFootsteps till here.

if (_inventory.TryGetSlotEntity(uid, "shoes", out var shoes) &&
TryComp<FootstepModifierComponent>(shoes, out var modifier))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ public sealed class SalvageTimeMod : IPrototype, ISalvageMod

/// <summary>
/// Cost for difficulty modifiers.
/// Frontier: expedition timer min set to 900 and max to 930
/// </summary>
[DataField("cost")]
public float Cost { get; private set; }

[DataField("minDuration")]
public int MinDuration = 630;
public int MinDuration = 900;

[DataField("maxDuration")]
public int MaxDuration = 570;
public int MaxDuration = 930;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Content.Shared.Salvage.Expeditions;

[Prototype("salvageFaction")]
public sealed partial class SalvageFactionPrototype : IPrototype
public sealed partial class SalvageFactionPrototype : IPrototype, ISalvageMod
{
[IdDataField] public string ID { get; } = default!;

Expand Down
27 changes: 14 additions & 13 deletions Content.Shared/Salvage/SharedSalvageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ public int GetDifficulty(DifficultyRating rating)
switch (rating)
{
case DifficultyRating.Minimal:
return 1;
return 4;
case DifficultyRating.Minor:
return 2;
return 6;
case DifficultyRating.Moderate:
return 4;
case DifficultyRating.Hazardous:
return 8;
case DifficultyRating.Hazardous:
return 10;
case DifficultyRating.Extreme:
return 16;
return 12;
default:
throw new ArgumentOutOfRangeException(nameof(rating), rating, null);
}
Expand Down Expand Up @@ -100,12 +100,10 @@ public SalvageMission GetMission(SalvageMissionType config, DifficultyRating dif
// - Biome
// - Lighting
// - Atmos
var faction = GetMod<SalvageFactionPrototype>(rand, ref rating);
var biome = GetMod<SalvageBiomeMod>(rand, ref rating);
var air = GetBiomeMod<SalvageAirMod>(biome.ID, rand, ref rating);
var dungeon = GetBiomeMod<SalvageDungeonModPrototype>(biome.ID, rand, ref rating);
var factionProtos = _proto.EnumeratePrototypes<SalvageFactionPrototype>().ToList();
factionProtos.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal));
var faction = factionProtos[rand.Next(factionProtos.Count)];

var mods = new List<string>();

Expand Down Expand Up @@ -196,24 +194,27 @@ private List<string> GetRewards(DifficultyRating difficulty, System.Random rand)

/// <summary>
/// Get a list of WeightedRandomEntityPrototype IDs with the rewards for a certain difficulty.
/// Frontier: added uncommon and legendary reward tiers, limited amount of rewards to 1 per difficulty rating
/// </summary>
private string[] RewardsForDifficulty(DifficultyRating rating)
{
var common = "SalvageRewardCommon";
var uncommon = "SalvageRewardUncommon";
var rare = "SalvageRewardRare";
var epic = "SalvageRewardEpic";
var legendary = "SalvageRewardLegendary";
switch (rating)
{
case DifficultyRating.Minimal:
return new string[] { common, common, common };
return new string[] { common };
case DifficultyRating.Minor:
return new string[] { common, common, rare };
return new string[] { uncommon };
case DifficultyRating.Moderate:
return new string[] { common, rare, rare };
return new string[] { rare };
case DifficultyRating.Hazardous:
return new string[] { rare, rare, rare, epic };
return new string[] { epic };
case DifficultyRating.Extreme:
return new string[] { rare, rare, epic, epic, epic };
return new string[] { legendary };
default:
throw new NotImplementedException();
}
Expand Down
14 changes: 7 additions & 7 deletions Resources/Audio/_NF/Voice/Goblin/attributions.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, lowered amplitudes) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-chatter-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/)"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (converted to mono) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/)"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/), edited (converted to mono) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
Binary file modified Resources/Audio/_NF/Voice/Goblin/goblin-cackle-01.ogg
Binary file not shown.
Binary file modified Resources/Audio/_NF/Voice/Goblin/goblin-cackle-02.ogg
Binary file not shown.
Binary file modified Resources/Audio/_NF/Voice/Goblin/goblin-cackle-03.ogg
Binary file not shown.
Binary file modified Resources/Audio/_NF/Voice/Goblin/goblin-cackle-04.ogg
Binary file not shown.
Binary file modified Resources/Audio/_NF/Voice/Goblin/goblin-cackle-05.ogg
Binary file not shown.
18 changes: 9 additions & 9 deletions Resources/Audio/_NF/Voice/Goblin/license.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, lowered amplitudes) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC BY 4.0"
license: "CC-BY-4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-chatter-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/)"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (converted to mono) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC BY 4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/)"
license: "CC-BY-4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/), edited (converted to mono) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
Loading

0 comments on commit b1678fc

Please sign in to comment.