Skip to content

Commit

Permalink
Glacier Port (#277)
Browse files Browse the repository at this point in the history
🆑 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
3 people authored Feb 23, 2025
1 parent 2836715 commit 1279871
Show file tree
Hide file tree
Showing 28 changed files with 12,315 additions and 10,308 deletions.
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 Content.Server/Materials/ProduceMaterialExtractorSystem.cs
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ id-card-access-level-prosecutor = Prosecutor
id-card-access-level-clerk = Clerk
id-card-access-level-justice = Justice
id-card-access-level-corpsman = Corpsman
id-card-access-level-robotics = Robotics
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/lathe/components/lathe-component.ftl
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
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/lathe/lathe-categories.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ lathe-category-robotics = Robotics
lathe-category-tacsuits = Tacsuits
lathe-category-tools = Tools
lathe-category-weapons = Weapons
lathe-category-food = Food
lathe-category-chemicals = Chemicals
lathe-category-materials = Materials
21,989 changes: 11,700 additions & 10,289 deletions Resources/Maps/TheDen/glacier.yml

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Resources/Migrations/denMigrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ PlushieTrystan: PlushieDignifiedVulp
PlushieDino: null
PlushieChillHuman: null
PlushieSlimeTider: null
AirlockMaintRoboticsLocked: null
AirlockRoboticsGlassLocked: null
AirlockRoboticsLocked: null
Biogenerator: null
BoxEnvelope: null
CigPackCandy: null
CigPackPurple: null
Expand Down Expand Up @@ -46,3 +42,6 @@ SpawnPointCargoAssistant: null
ToiletGoldenDirtyWater: null
WoodenKegBeer: null
WoodenKegWine: null
FoodDonutBluePumpkin: FoodDonutBlumpkin
FoodDonutJellyBluePumpkin: FoodDonutJellyBlumpkin
SpawnPointSecurityBorg: null
2 changes: 2 additions & 0 deletions Resources/Prototypes/Access/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- ChiefJustice # DeltaV - Add Chief Justice access
- Prosecutor # DeltaV - Add Prosecutor access
- Clerk # DeltaV - Add Clerk access
- Robotics # DeltaV: Robotics access
- Corpsman # DeltaV - Add Corpsman access
- BlueshieldOfficer # Goobstation - Add BSO Access
- NanotrasenRepresentative # Goobstation - Add NTR Access
Expand Down Expand Up @@ -81,3 +82,4 @@
- Atmospherics
- Library # DeltaV - Add Library access
- Justice # DeltaV - Add Justice dept access
- Robotics # DeltaV: Robotics access
3 changes: 2 additions & 1 deletion Resources/Prototypes/Access/research.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
tags:
- ResearchDirector
- Research
- Mantis # DeltaV - Mantis, see Resources/Prototypes/DeltaV/Access/epistemics.yml
- Mantis # DeltaV - Psionic Mantis, see Resources/Prototypes/DeltaV/Access/epistemics.yml
- Robotics # DeltaV: Robotics access
4 changes: 4 additions & 0 deletions Resources/Prototypes/DeltaV/Access/epistemics.yml
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
1 change: 1 addition & 0 deletions Resources/Prototypes/DeltaV/Access/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Salvage
- Cargo
- Research
- Robotics # would be silly if they couldn't go to robo
- Service
- Maintenance
- External
Expand Down
13 changes: 13 additions & 0 deletions Resources/Prototypes/DeltaV/Entities/Markers/Spawners/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,16 @@
- state: green
- sprite: DeltaV/Markers/jobs.rsi
state: adminassistant

- type: entity
parent: SpawnPointJobBase
id: SpawnPointRoboticist
name: roboticist
components:
- type: SpawnPoint
job_id: Scientist # TODO: change to Roboticist after merged
- type: Sprite
layers:
- state: green
- sprite: DeltaV/Markers/jobs.rsi
state: roboticist
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
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@
- type: GridFill
path: /Maps/Shuttles/DeltaV/sub_escape_pod.yml

- type: entity
parent: AirlockRobotics
id: AirlockRoboticsLocked
suffix: Robotics, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsRobotics ]

#Add airlocks from upstream roles
- type: entity
parent: Airlock
id: AirlockBoxerLocked
Expand Down Expand Up @@ -325,6 +335,15 @@
containers:
board: [ DoorElectronicsPsychologist ]

- type: entity
parent: AirlockRoboticsGlass
id: AirlockRoboticsGlassLocked
suffix: Robotics, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsRobotics ]

# Maintenance Hatches
- type: entity
parent: AirlockMaint
Expand Down Expand Up @@ -407,6 +426,15 @@
containers:
board: [ DoorElectronicsSecurityLawyer ]

- type: entity
parent: AirlockMaintRnDLocked
id: AirlockMaintRoboticsLocked
suffix: Robotics, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsRobotics ]

# Command-locked External airlocks. These don't exist upstream for some reason.
- type: entity
parent: AirlockExternal
Expand Down
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"]]
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,105 @@
- type: ContainerFill
containers:
board: [ DoorElectronicsLawyer ]

- type: entity
parent: WindoorSecure
id: WindoorSecureMantisLocked
suffix: Mantis, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsMantis ]

- type: entity
parent: WindoorSecure
id: WindoorSecureRoboticsLocked
suffix: Robotics, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsRobotics ]

#Add windoors from upstream roles
- type: entity
parent: WindoorSecure
id: WindoorSecureBoxerLocked
suffix: Boxer, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsBoxer ]

- type: entity
parent: WindoorSecure
id: WindoorSecureClownLocked
suffix: Clown, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsClown ]

- type: entity
parent: WindoorSecure
id: WindoorSecureMimeLocked
suffix: Mime, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsMime ]

- type: entity
parent: WindoorSecure
id: WindoorSecureMusicianLocked
suffix: Musician, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsMusician ]

- type: entity
parent: WindoorSecure
id: WindoorSecureReporterLocked
suffix: Reporter, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsReporter ]

- type: entity
parent: WindoorSecure
id: WindoorSecureLibraryLocked
suffix: Library, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsLibrary ]

- type: entity
parent: WindoorSecure
id: WindoorSecureZookeeperLocked
suffix: Zookeeper, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsZookeeper ]

- type: entity
parent: WindoorSecure
id: WindoorSecureCorpsmanLocked
suffix: Corpsman, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsCorpsman ]
- type: Wires
layoutId: AirlockCommand

- type: entity
parent: WindoorSecure
id: WindoorSecurePsychologistLocked
suffix: Psychologist, Locked
components:
- type: ContainerFill
containers:
board: [ DoorElectronicsPsychologist ]
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"]]
12 changes: 0 additions & 12 deletions Resources/Prototypes/Entities/Markers/Spawners/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,18 +475,6 @@
- sprite: DeltaV/Markers/jobs.rsi # DeltaV - Epistemics new labcoats
state: scientist

- type: entity
id: SpawnPointRoboticist
parent: SpawnPointJobBase
name: roboticist
components:
- type: SpawnPoint
job_id: Roboticist
- type: Sprite
layers:
- state: green
- state: roboticist

# Security

- type: entity
Expand Down
Loading

0 comments on commit 1279871

Please sign in to comment.