Skip to content

Commit

Permalink
Blueprints (new-frontiers-14#2114)
Browse files Browse the repository at this point in the history
* Printable blueprints

* tweaks

* fixes

* more fixes

* stampable, edible, scaf blueprint

* exped loot

* hid

* exped blueprints pricing

* Delete sensitive documents on fax (no dupes)

* NF prefix for blueprints

* Fix Antique laser (NF suffix)

* PaperVis missing layer

* Shaded in-hand blueprint sprites

* fix bluespace vial blueprint name

* Cleanup

---------

Co-authored-by: Whatstone <[email protected]>
Co-authored-by: Dvir <[email protected]>
Co-authored-by: Dvir <[email protected]>
  • Loading branch information
4 people authored Oct 3, 2024
1 parent 56b290b commit a77cbd1
Show file tree
Hide file tree
Showing 53 changed files with 1,403 additions and 25 deletions.
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 @@ -505,6 +505,7 @@
- StationAnchorCircuitboard
- SalvageMagnetMachineCircuitboard
- SalvageTechFabCircuitboardNF # Frontier
- BlueprintLithographMachineCircuitboard # Frontier
dynamicRecipes:
- ThermomachineFreezerMachineCircuitBoard
- HellfireFreezerMachineCircuitBoard
Expand Down Expand Up @@ -971,7 +972,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
12 changes: 0 additions & 12 deletions Resources/Prototypes/Research/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,6 @@
technologyPrerequisites:
- BasicAnomalousResearch

- type: technology
id: RapidPartExchange
name: research-technology-rped
icon:
sprite: Objects/Specific/Research/rped.rsi
state: icon
discipline: Experimental
tier: 2
cost: 7500
recipeUnlocks:
- RPED

# - type: technology
# id: DeterrenceTechnologies
# name: research-technology-deterrence
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 # While funny I think we should move this to events
# 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: Blueprints
- 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
description: A Rapid Part Exchange Device, perfect for quickly upgrading machines.
components:
- type: Sprite
sprite: Objects/Specific/Research/rped.rsi
sprite: _NF/Objects/Specific/Research/rped.rsi
state: icon
- type: Item
sprite: Objects/Specific/Research/rped.rsi
sprite: _NF/Objects/Specific/Research/rped.rsi
size: Normal
- type: PartExchanger
- type: Storage
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
Loading

0 comments on commit a77cbd1

Please sign in to comment.