-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🆑 april and Fox - tweak: Glacier has been updated to a newer version, bringing back the atmosphere and removing the ground. - add: Biogenerators have been added and currently only exist on Glacier! --------- Co-authored-by: deltanedas <[email protected]> Co-authored-by: Nemanja <[email protected]>
- Loading branch information
1 parent
2836715
commit 1279871
Showing
28 changed files
with
12,315 additions
and
10,308 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
Content.Server/Materials/Components/ProduceMaterialExtractorComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Content.Shared.Chemistry.Reagent; | ||
using Content.Shared.Materials; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.Materials.Components; | ||
|
||
/// <summary> | ||
/// This is used for a machine that turns produce into a specified material. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(ProduceMaterialExtractorSystem))] | ||
public sealed partial class ProduceMaterialExtractorComponent : Component | ||
{ | ||
/// <summary> | ||
/// The material that produce is converted into | ||
/// </summary> | ||
[DataField] | ||
public ProtoId<MaterialPrototype> ExtractedMaterial = "Biomass"; | ||
|
||
/// <summary> | ||
/// List of reagents that determines how much material is yielded from a produce. | ||
/// </summary> | ||
[DataField] | ||
public List<ProtoId<ReagentPrototype>> ExtractionReagents = new() | ||
{ | ||
"Nutriment" | ||
}; | ||
|
||
[DataField] | ||
public SoundSpecifier? ExtractSound = new SoundPathSpecifier("/Audio/Effects/waterswirl.ogg"); | ||
} |
48 changes: 48 additions & 0 deletions
48
Content.Server/Materials/ProduceMaterialExtractorSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System.Linq; | ||
using Content.Server.Botany.Components; | ||
using Content.Server.Materials.Components; | ||
using Content.Server.Power.EntitySystems; | ||
using Content.Shared.Chemistry.EntitySystems; | ||
using Content.Shared.Interaction; | ||
using Robust.Server.Audio; | ||
|
||
namespace Content.Server.Materials; | ||
|
||
public sealed class ProduceMaterialExtractorSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly AudioSystem _audio = default!; | ||
[Dependency] private readonly MaterialStorageSystem _materialStorage = default!; | ||
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; | ||
|
||
/// <inheritdoc/> | ||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<ProduceMaterialExtractorComponent, AfterInteractUsingEvent>(OnInteractUsing); | ||
} | ||
|
||
private void OnInteractUsing(Entity<ProduceMaterialExtractorComponent> ent, ref AfterInteractUsingEvent args) | ||
{ | ||
if (args.Handled) | ||
return; | ||
|
||
if (!this.IsPowered(ent, EntityManager)) | ||
return; | ||
|
||
if (!TryComp<ProduceComponent>(args.Used, out var produce)) | ||
return; | ||
|
||
if (!_solutionContainer.TryGetSolution(args.Used, produce.SolutionName, out var solution)) | ||
return; | ||
|
||
// Can produce even have fractional amounts? Does it matter if they do? | ||
// Questions man was never meant to answer. | ||
var matAmount = solution.Value.Comp.Solution.Contents | ||
.Where(r => ent.Comp.ExtractionReagents.Contains(r.Reagent.Prototype)) | ||
.Sum(r => r.Quantity.Float()); | ||
_materialStorage.TryChangeMaterialAmount(ent, ent.Comp.ExtractedMaterial, (int) matAmount); | ||
|
||
_audio.PlayPvs(ent.Comp.ExtractSound, ent); | ||
QueueDel(args.Used); | ||
args.Handled = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
lathe-component-upgrade-speed = speed | ||
lathe-component-upgrade-material-use = material use | ||
lathe-component-output-slot-beaker-name = Beaker slot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
- type: accessLevel | ||
id: Mantis | ||
name: id-card-access-level-mantis # Custom access level for the Mantis so they can have their own locker and maybe doors | ||
|
||
- type: accessLevel | ||
id: Robotics | ||
name: id-card-access-level-robotics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Resources/Prototypes/DeltaV/Entities/Objects/Devices/Electronics/door_access.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- type: entity | ||
parent: DoorElectronics | ||
id: DoorElectronicsRobotics | ||
suffix: Robotics, Locked | ||
components: | ||
- type: AccessReader | ||
access: [["Research"]] # Uses research access until the job is added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Resources/Prototypes/DeltaV/Entities/Structures/Doors/Shutter/blast_door.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- type: entity | ||
parent: BlastDoor | ||
id: BlastDoorUnlinkedRobotics | ||
suffix: Robotics | ||
components: | ||
- type: AccessReader | ||
access: [["Robotics"]] | ||
|
||
- type: entity | ||
parent: BlastDoorOpen | ||
id: BlastDoorUnlinkedRoboticsOpen | ||
suffix: Open, Robotics | ||
components: | ||
- type: AccessReader | ||
access: [["Robotics"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Resources/Prototypes/DeltaV/Entities/Structures/Wallmounts/switch.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- type: entity | ||
parent: LockableButton | ||
suffix: Robotics | ||
id: LockableButtonRobotics | ||
components: | ||
- type: AccessReader | ||
access: [["Robotics"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.