Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024 09 blueprint printing #4

Closed
wants to merge 14 commits into from
26 changes: 26 additions & 0 deletions Content.Server/Fax/FaxSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,13 @@ public void Copy(EntityUid uid, FaxMachineComponent? component, FaxCopyMessage a
// Don't play component.SendSound - it clashes with the printing sound, which
// will start immediately.

// Frontier: check if paper should be destroyed on sending.
if (paper.DestroyOnFax)
{
DeleteFax(uid, sendEntity.Value, paper);
}
// End Frontier

UpdateUserInterface(uid, component);

_adminLogger.Add(LogType.Action,
Expand Down Expand Up @@ -550,6 +557,13 @@ public void Send(EntityUid uid, FaxMachineComponent? component, FaxSendMessage a

_audioSystem.PlayPvs(component.SendSound, uid);

// Frontier: check if paper should be destroyed on sending.
if (paper.DestroyOnFax)
{
DeleteFax(uid, sendEntity.Value, paper);
}
// End Frontier

UpdateUserInterface(uid, component);
}

Expand Down Expand Up @@ -616,4 +630,16 @@ private void NotifyAdmins(string faxName)
_chat.SendAdminAnnouncement(Loc.GetString("fax-machine-chat-notify", ("fax", faxName)));
_audioSystem.PlayGlobal("/Audio/Machines/high_tech_confirm.ogg", Filter.Empty().AddPlayers(_adminManager.ActiveAdmins), false, AudioParams.Default.WithVolume(-8f));
}

// Frontier: delete sensitive items on fax to prevent duplication
private void DeleteFax(EntityUid faxMachine, EntityUid itemToFax, PaperComponent paper)
{
if (paper.DestroyMessage != null)
{
_popupSystem.PopupEntity(Loc.GetString(paper.DestroyMessage), faxMachine);
}

Del(itemToFax);
}
// End Frontier
}
11 changes: 11 additions & 0 deletions Content.Shared/Paper/PaperComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ public sealed partial class PaperComponent : Component
[DataField("sound")]
public SoundSpecifier? Sound { get; private set; } = new SoundCollectionSpecifier("PaperScribbles", AudioParams.Default.WithVariation(0.1f));

// Frontier:
/// <summary>
/// Sound played after writing to the paper.
/// </summary>
[DataField]
public bool DestroyOnFax { get; private set; }

[DataField]
public string? DestroyMessage { get; private set; }
// End Frontier

[Serializable, NetSerializable]
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
{
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_NF/fax/fax.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fax-delete-paper-intellectual-property = NT intellectual property detected, destroying original document.
3 changes: 2 additions & 1 deletion Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@
- StationAnchorCircuitboard
- SalvageMagnetMachineCircuitboard
- SalvageTechFabCircuitboardNF # Frontier
- BlueprintLithographMachineCircuitboard # Frontier
dynamicRecipes:
- ThermomachineFreezerMachineCircuitBoard
- HellfireFreezerMachineCircuitBoard
Expand Down Expand Up @@ -972,7 +973,7 @@

- type: entity
id: MedicalTechFab
parent: BaseLatheLube
parent: [ BaseLatheLube, BlueprintReceiverBase ] # Frontier: added BlueprintReceiverBase
name: medical techfab
description: Prints equipment for use by the medbay.
components:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- type: entity
parent: BaseLatheLube # Frontier: Protolathe<BaseLatheLube
parent: [ BaseLatheLube, BlueprintReceiverBase ] # Frontier: Protolathe<BaseLatheLube, added BlueprintReceiverBase
id: ScienceTechFab
name: science techfab
description: Prints equipment for use by the epistemics department.
Expand Down Expand Up @@ -109,7 +109,7 @@
- Ingot

- type: entity
parent: BaseLatheLube # Frontier: Protolathe<BaseLatheLube
parent: [ BaseLatheLube, BlueprintReceiverBase ] # Frontier: Protolathe<BaseLatheLube, added BlueprintReceiverBase
id: ServiceTechFab
name: service techfab
description: Prints equipment for service staff.
Expand Down Expand Up @@ -268,7 +268,7 @@
- Ingot

- type: entity
parent: BaseLatheLube # Frontier: Protolathe<BaseLatheLube
parent: [ BaseLatheLube, BlueprintReceiverBase ] # Frontier: Protolathe<BaseLatheLube, added BlueprintReceiverBase
id: EngineeringTechFab
name: engineering techfab
description: Prints equipment for engineers.
Expand Down
6 changes: 5 additions & 1 deletion Resources/Prototypes/Research/arsenal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
- FlashPayload
- ExplosivePayload
- ChemicalPayload
- NFBlueprintSignallerAdvanced # Frontier

- type: technology
id: SpecialMeans
Expand Down Expand Up @@ -197,9 +198,11 @@
tier: 3
cost: 15000
recipeUnlocks:
- WeaponAntiqueLaserNF # Frontier
- WeaponAdvancedLaser
- PortableRecharger
- WeaponAntiqueLaserNF # Frontier
- NFBlueprintWeaponAntiqueLaser # Frontier
- NFBlueprintPortableRecharger # Frontier

- type: technology
id: ExperimentalBatteryAmmo
Expand All @@ -212,6 +215,7 @@
cost: 15000
recipeUnlocks:
- WeaponLaserSvalinn
- NFBlueprintWeaponLaserSvalinn # Frontier

- type: technology
id: AdvancedShuttleWeapon
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Research/civilianservices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
- HydroponicsTrayMachineCircuitboard
- ReagentGrinderIndustrialMachineCircuitboard
- PlantAnalyzer # Frontier
- NFBlueprintPlantAnalyzerEmpty # Frontier
- NFBlueprintPlantBagOfHolding # Frontier

- type: technology
id: CritterMechs
Expand Down Expand Up @@ -177,6 +179,7 @@
recipeUnlocks:
- AdvMopItem
- MegaSprayBottle
- NFBlueprintAdvMopItem # Frontier

- type: technology
id: HONKMech
Expand Down Expand Up @@ -250,3 +253,6 @@
- BluespaceBeaker
- SyringeBluespace
- VialBluespace # Frontier
- NFBlueprintBluespaceBeaker # Frontier
- NFBlueprintSyringeBluespace # Frontier
- NFBlueprintVialBluespace # Frontier
2 changes: 2 additions & 0 deletions Resources/Prototypes/Research/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
technologyPrerequisites:
- BasicAnomalousResearch

# TODO: migrate this tech to an _NF folder
- type: technology
id: RapidPartExchange
name: research-technology-rped
Expand All @@ -137,6 +138,7 @@
cost: 7500
recipeUnlocks:
- RPED
- NFBlueprintRped # Frontier

# - type: technology
# id: DeterrenceTechnologies
Expand Down
16 changes: 14 additions & 2 deletions Resources/Prototypes/Research/industrial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
- UtilityBeltChiefEngineer
- BorgModuleAdvancedTool
- BorgModuleRCD
- NFBlueprintPowerDrill # Frontier
- NFBlueprintJawsOfLife # Frontier
- NFBlueprintWelderExperimental # Frontier

- type: technology
id: MassExcavation
Expand All @@ -187,6 +190,9 @@
- OreBagOfHolding
- MiningDrillDiamond
- AdvancedMineralScannerEmpty
- NFBlueprintOreBagOfHolding # Frontier
- NFBlueprintMiningDrillDiamond # Frontier
- NFBlueprintAdvancedMineralScannerEmpty # Frontier

# Tier 3

Expand All @@ -204,6 +210,10 @@
- ClothingBackpackSatchelHolding
- ClothingBackpackDuffelHolding
- ClothingBackpackMessengerHolding # Frontier
- NFBlueprintClothingBackpackHolding # Frontier
- NFBlueprintClothingBackpackSatchelHolding # Frontier
- NFBlueprintClothingBackpackDuffelHolding # Frontier
- NFBlueprintClothingBackpackMessengerHolding # Frontier

- type: technology
id: PortableFission
Expand All @@ -216,6 +226,7 @@
cost: 10000
recipeUnlocks:
- PowerCellMicroreactor
- NFBlueprintPowerCellMicroreactor # Frontier
technologyPrerequisites:
- AdvancedPowercells

Expand All @@ -229,5 +240,6 @@
tier: 2
cost: 10000
recipeUnlocks:
- ShipyardRCD
- ShipyardRCDAmmo
- ShipyardRCD # Frontier
- ShipyardRCDAmmo # Frontier
- NFBlueprintShipyardRCDAmmo # Frontier
1 change: 1 addition & 0 deletions Resources/Prototypes/_NF/Catalog/Fills/Crates/science.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- id: ExosuitFabricatorFlatpack
- id: MachineAnomalyVesselFlatpack
- id: CircuitImprinterFlatpack
- id: BlueprintLithographFlatpack
- id: ResearchAndDevelopmentServerFlatpack
- id: ComputerResearchAndDevelopmentFlatpack
- id: MachineArtifactAnalyzerFlatpack
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

- type: entity
parent: WeaponCaseShortDocuments
id: WeaponCaseShortDocumentsFilled
suffix: Dungeon, Blueprints
categories: [ HideSpawnMenu ]
components:
- type: StorageFill
contents:
- id: NFBlueprintBoxShotgunUranium
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxRifleUranium
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxLightRifleUranium
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxMagnumUranium
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxPistolUranium
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintBoxShotgunIncendiary
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxRifleIncendiary
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintMagazineBoxMagnumIncendiary
prob: 0.2
orGroup:
- id: NFBlueprintWeaponLaserCannon
prob: 0.2
orGroup: Blueprints
- id: NFBlueprintWeaponXrayCannon
prob: 0.2
orGroup: Blueprints
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
CircuitImprinterFlatpack: 4294967295 # Infinite
ResearchAndDevelopmentServerFlatpack: 4294967295 # Infinite
ComputerResearchAndDevelopmentFlatpack: 4294967295 # Infinite
BlueprintLithographFlatpack: 4294967295 # Infinite
ScienceTechFabFlatpack: 4294967295 # Infinite
EngineeringTechFabFlatpack: 4294967295 # Infinite
SalvageTechfabNFFlatpack: 4294967295 # Infinite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
rarePrototypes:
- TechnologyDiskRare
- ResearchDisk10000
- WeaponCaseShortDocumentsFilled
rareChance: 0.05

- type: entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@
- type: Flatpack
entity: MachineAnomalyGenerator

- type: entity
parent: ExosuitFabricatorFlatpack
id: BlueprintLithographFlatpack
name: blueprint lithograph flatpack
description: A flatpack used for constructing a blueprint lithograph.
components:
- type: Flatpack
entity: BlueprintLithograph

# Service
- type: entity
parent: BaseNFFlatpack
Expand Down
17 changes: 17 additions & 0 deletions Resources/Prototypes/_NF/Entities/Objects/Devices/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,23 @@
- type: StaticPrice
price: 40

- type: entity
id: BlueprintLithographMachineCircuitboard
parent: BaseMachineCircuitboard
name: blueprint lithograph machine board
components:
- type: Sprite
state: science
- type: MachineBoard
prototype: BlueprintLithograph
requirements:
MatterBin: 1
Manipulator: 1
tagRequirements:
GlassBeaker:
amount: 2
defaultPrototype: Beaker

# Removed from upstream definitions
- type: entity
id: MaterialReclaimerMachineCircuitboard
Expand Down
21 changes: 21 additions & 0 deletions Resources/Prototypes/_NF/Entities/Objects/Storage/weapon_cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@
- type: Item
sprite: _NF/Objects/Storage/Cases/explosivescaseshort.rsi

- type: entity
name: document case
parent: WeaponCaseShortExplosives
id: WeaponCaseShortDocuments
description: A reinforced casing for storing important documents.
suffix: Short
components:
- type: Sprite
sprite: _NF/Objects/Storage/Cases/documentcaseshort.rsi
- type: Item
sprite: _NF/Objects/Storage/Cases/documentcaseshort.rsi
- type: Storage
maxItemSize: Normal
grid:
- 0,0,1,1
whitelist:
tags:
- BlueprintAutolathe
- Document
- Paper

- type: entity
name: weapon case
parent: WeaponCaseLong
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

- type: entity
parent: NFBaseBlueprintArmory
id: NFBlueprintWeaponAntiqueLaser
name: antique laser blueprint
description: A blueprint with a schematic of an antique laser. It can be inserted into an autolathe or a techfab.
components:
- type: Blueprint
providedRecipes:
- WeaponAntiqueLaserNF

- type: entity
parent: NFBaseBlueprintArmory
id: NFBlueprintWeaponLaserSvalinn
name: svalinn pistol blueprint
description: A blueprint with a schematic of a svalinn pistol. It can be inserted into an autolathe or a techfab.
components:
- type: Blueprint
providedRecipes:
- WeaponLaserSvalinn

- type: entity
parent: NFBaseBlueprintArmory
id: NFBlueprintPortableRecharger
name: portable recharger blueprint
description: A blueprint with a schematic of a portable recharger. It can be inserted into an autolathe or a techfab.
components:
- type: Blueprint
providedRecipes:
- PortableRecharger

- type: entity
parent: NFBaseBlueprintArmory
id: BlueprintClothingOuterHardsuitScaf
name: scaf hardsuit blueprint
description: A blueprint with a schematic of a scaf hardsuit. It can be inserted into an autolathe or a techfab.
components:
- type: Blueprint
providedRecipes:
- ClothingOuterHardsuitScaf
Loading
Loading