Departmental Economy (#36445)

* Cargo Accounts, Request Consoles, and lock boxes

* Funding Allocation Computer

* final changes

* test fix

* remove dumb code

* ScarKy0 review

* first cour

* second cour

* Update machines.yml

* review

---------

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: Milon <milonpl.git@proton.me>
This commit is contained in:
Nemanja
2025-04-13 09:22:36 -04:00
committed by GitHub
parent 5f78b72763
commit 12b75beeab
62 changed files with 2106 additions and 331 deletions

View File

@@ -0,0 +1,49 @@
- type: cargoProduct
id: CrateLockBoxEngineering
icon:
sprite: Structures/Storage/Crates/lockbox.rsi
state: icon
product: CrateLockBoxEngineering
cost: 100
category: cargoproduct-category-name-engineering
group: market
- type: cargoProduct
id: CrateLockBoxMedical
icon:
sprite: Structures/Storage/Crates/lockbox.rsi
state: icon
product: CrateLockBoxMedical
cost: 100
category: cargoproduct-category-name-medical
group: market
- type: cargoProduct
id: CrateLockBoxScience
icon:
sprite: Structures/Storage/Crates/lockbox.rsi
state: icon
product: CrateLockBoxScience
cost: 100
category: cargoproduct-category-name-science
group: market
- type: cargoProduct
id: CrateLockBoxSecurity
icon:
sprite: Structures/Storage/Crates/lockbox.rsi
state: icon
product: CrateLockBoxSecurity
cost: 100
category: cargoproduct-category-name-security
group: market
- type: cargoProduct
id: CrateLockBoxService
icon:
sprite: Structures/Storage/Crates/lockbox.rsi
state: icon
product: CrateLockBoxService
cost: 100
category: cargoproduct-category-name-service
group: market

View File

@@ -130,6 +130,8 @@
- id: DoorRemoteService
- id: HoPIDCard
- id: IDComputerCircuitboard
- id: FundingAllocationComputerCircuitboard
- id: CargoRequestServiceComputerCircuitboard
- id: RubberStampApproved
- id: RubberStampDenied
- id: RubberStampHop
@@ -160,6 +162,7 @@
- id: ClothingHandsGlovesColorYellow
- id: ClothingHeadsetAltEngineering
- id: DoorRemoteEngineering
- id: CargoRequestEngineeringComputerCircuitboard
- id: RCD
- id: RCDAmmo
- id: RubberStampCE
@@ -218,6 +221,7 @@
- id: HandheldCrewMonitor
- id: Hypospray
- id: MedicalTechFabCircuitboard
- id: CargoRequestMedicalComputerCircuitboard
- id: MedkitFilled
- id: RubberStampCMO
- id: MedTekCartridge
@@ -271,6 +275,7 @@
- id: HandTeleporter
- id: ProtolatheMachineCircuitboard
- id: ResearchComputerCircuitboard
- id: CargoRequestScienceComputerCircuitboard
- id: RubberStampRd
# Hardsuit table, used for suit storage as well
@@ -328,6 +333,7 @@
- id: HoloprojectorSecurity
- id: RubberStampHos
- id: SecurityTechFabCircuitboard
- id: CargoRequestSecurityComputerCircuitboard
- id: WeaponDisabler
- id: WantedListCartridge
- id: DrinkHosFlask

View File

@@ -0,0 +1,42 @@
- type: cargoAccount
id: Cargo
name: cargo-account-cargo-name
code: cargo-account-cargo-code
color: "#b48b57"
radioChannel: Supply
- type: cargoAccount
id: Engineering
name: cargo-account-engineering-name
code: cargo-account-engineering-code
color: "#ff733c"
radioChannel: Engineering
- type: cargoAccount
id: Medical
name: cargo-account-medical-name
code: cargo-account-medical-code
color: "#57b8f0"
radioChannel: Medical
- type: cargoAccount
id: Science
name: cargo-account-science-name
code: cargo-account-science-code
color: "#cd7ccd"
radioChannel: Science
- type: cargoAccount
id: Security
name: cargo-account-security-name
code: cargo-account-security-code
color: "#ff4242"
radioChannel: Security
- type: cargoAccount
id: Service
name: cargo-account-service-name
code: cargo-account-service-code
color: "#539c00"
radioChannel: Service

View File

@@ -77,7 +77,6 @@
- type: RadarConsole
followEntity: true
- type: CargoOrderConsole
- type: BankClient
- type: CrewMonitoringConsole
- type: GeneralStationRecordConsole
canDeleteEntries: true

View File

@@ -97,6 +97,84 @@
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoRequestEngineeringComputerCircuitboard
name: engineering request computer board
description: A computer printed circuit board for an engineering request computer.
components:
- type: Sprite
state: cpu_engineering
- type: ComputerBoard
prototype: ComputerCargoOrdersEngineering
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoRequestMedicalComputerCircuitboard
name: medical request computer board
description: A computer printed circuit board for a medical request computer.
components:
- type: Sprite
state: cpu_medical
- type: ComputerBoard
prototype: ComputerCargoOrdersMedical
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoRequestScienceComputerCircuitboard
name: science request computer board
description: A computer printed circuit board for a science request computer.
components:
- type: Sprite
state: cpu_science
- type: ComputerBoard
prototype: ComputerCargoOrdersScience
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoRequestSecurityComputerCircuitboard
name: security request computer board
description: A computer printed circuit board for a security request computer.
components:
- type: Sprite
state: cpu_security
- type: ComputerBoard
prototype: ComputerCargoOrdersSecurity
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoRequestServiceComputerCircuitboard
name: service request computer board
description: A computer printed circuit board for a service request computer.
components:
- type: Sprite
state: cpu_service
- type: ComputerBoard
prototype: ComputerCargoOrdersService
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: FundingAllocationComputerCircuitboard
name: funding allocation computer board
description: A computer printed circuit board for a funding allocation card console.
components:
- type: Sprite
state: cpu_command
- type: ComputerBoard
prototype: ComputerFundingAllocation
- type: StaticPrice
price: 750
- type: entity
parent: BaseComputerCircuitboard
id: CargoSaleComputerCircuitboard

View File

@@ -599,7 +599,7 @@
tags:
- Write
- type: CargoOrderConsole
- type: BankClient
removeLimitAccess: [ "Quartermaster" ]
- type: ActivatableUI
verbText: qm-clipboard-computer-verb-text
key: enum.CargoConsoleUiKey.Orders

View File

@@ -10,6 +10,13 @@
components:
- type: StationBankAccount
- type: StationCargoOrderDatabase
orders:
Cargo: [ ]
Engineering: [ ]
Medical: [ ]
Science: [ ]
Security: [ ]
Service: [ ]
- type: StationCargoBountyDatabase
- type: entity

View File

@@ -906,11 +906,11 @@
- map: ["computerLayerScreen"]
state: request
- map: ["computerLayerKeys"]
state: tech_key
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
- type: BankClient
removeLimitAccess: [ "Quartermaster" ]
- type: ActiveRadio
channels:
- Supply
@@ -943,6 +943,167 @@
guides:
- Cargo
# Request console variants.
- type: entity
id: ComputerCargoOrdersEngineering
parent: ComputerCargoOrders
name: engineering request computer
description: Used by the engineering department to order supplies.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request-eng
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
account: Engineering
announcementChannel: Engineering
removeLimitAccess: [ "ChiefEngineer" ]
- type: ActiveRadio
channels:
- Engineering
- type: Computer
board: CargoRequestEngineeringComputerCircuitboard
- type: PointLight
color: "#c9c042"
- type: AccessReader
access: [["Engineering"]]
- type: entity
id: ComputerCargoOrdersMedical
parent: ComputerCargoOrders
name: medical request computer
description: Used by the medical department to order supplies.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request-med
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
account: Medical
announcementChannel: Medical
removeLimitAccess: [ "ChiefMedicalOfficer" ]
- type: ActiveRadio
channels:
- Medical
- type: Computer
board: CargoRequestMedicalComputerCircuitboard
- type: PointLight
color: "#41e0fc"
- type: AccessReader
access: [["Medical"]]
- type: entity
id: ComputerCargoOrdersScience
parent: ComputerCargoOrders
name: science request computer
description: Used by the science department to order supplies.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request-sci
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
account: Science
announcementChannel: Science
removeLimitAccess: [ "ResearchDirector" ]
- type: ActiveRadio
channels:
- Science
- type: Computer
board: CargoRequestScienceComputerCircuitboard
- type: PointLight
color: "#b53ca1"
- type: AccessReader
access: [["Research"]]
- type: entity
id: ComputerCargoOrdersSecurity
parent: ComputerCargoOrders
name: security request computer
description: Used by the security department to order supplies.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request-sec
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
account: Security
announcementChannel: Security
removeLimitAccess: [ "HeadOfSecurity" ]
- type: ActiveRadio
channels:
- Security
- type: Computer
board: CargoRequestSecurityComputerCircuitboard
- type: PointLight
color: "#d11d00"
- type: AccessReader
access: [["Security"]]
- type: entity
id: ComputerCargoOrdersService
parent: ComputerCargoOrders
name: service request computer
description: Used by the service department to order supplies.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request-srv
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: CargoOrderConsole
account: Service
announcementChannel: Service
removeLimitAccess: [ "HeadOfPersonnel" ]
- type: ActiveRadio
channels:
- Service
- type: Computer
board: CargoRequestServiceComputerCircuitboard
- type: PointLight
color: "#afe837"
- type: AccessReader
access: [["Service"]]
- type: entity
id: ComputerCargoBounty
parent: BaseComputerAiAccess
@@ -983,6 +1144,43 @@
- CargoBounties
- Cargo
- type: entity
parent: BaseComputerAiAccess
id: ComputerFundingAllocation
name: funding allocation computer
description: Terminal for controlling the distribution of funds and pay to departments.
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: allocate # ALLOCATION !!!
- map: ["computerLayerKeys"]
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: FundingAllocationConsole
- type: ActivatableUI
key: enum.FundingAllocationConsoleUiKey.Key
- type: ActivatableUIRequiresAccess
- type: AccessReader
access: [["HeadOfPersonnel"]]
- type: UserInterface
interfaces:
enum.FundingAllocationConsoleUiKey.Key:
type: FundingAllocationConsoleBoundUserInterface
enum.WiresUiKey.Key:
type: WiresBoundUserInterface
- type: Computer
board: FundingAllocationComputerCircuitboard
- type: PointLight
radius: 1.5
energy: 1.6
color: "#3c5eb5"
- type: entity
parent: BaseComputerAiAccess
id: ComputerCloningConsole
@@ -1182,9 +1380,9 @@
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request
state: transfer
- map: ["computerLayerKeys"]
state: tech_key
state: generic_keys
- map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
state: generic_panel_open
- type: Anchorable

View File

@@ -426,6 +426,194 @@
- type: StaticPrice
price: 75
- type: entity
id: CrateBaseLockBox
parent: CrateBaseSecure
name: lock box
description: "A secure lock box. Funds from its sale will be distributed back to the department. Just remember: Cargo always takes a cut."
abstract: true
components:
- type: Sprite
sprite: Structures/Storage/Crates/lockbox.rsi
- type: GenericVisualizer
visuals:
enum.PaperLabelVisuals.HasLabel:
enum.PaperLabelVisuals.Layer:
True: { visible: true }
False: { visible: false }
enum.PaperLabelVisuals.LabelType:
enum.PaperLabelVisuals.Layer:
Paper: { state: paper }
Bounty: { state: bounty }
CaptainsPaper: { state: captains_paper }
Invoice: { state: invoice }
enum.StorageVisuals.Open:
lid_overlay:
True: { visible: false }
False: { visible: true }
- type: OverrideSell
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.4,0.3,0.19"
density: 50
mask:
- CrateMask #this is so they can go under plastic flaps
layer:
- MachineLayer
- type: entity
id: CrateLockBoxEngineering
parent: CrateBaseLockBox
name: engineering lock box
components:
- type: Sprite
layers:
- state: base
- state: overlay
color: "#ad8c27"
- state: closed
map: ["enum.StorageVisualLayers.Door"]
- state: overlay-closed
color: "#ad8c27"
map: [ lid_overlay ]
- state: welded
visible: false
map: ["enum.WeldableLayers.BaseWelded"]
- state: locked
map: ["enum.LockVisualLayers.Lock"]
shader: unshaded
- state: paper
sprite: Structures/Storage/Crates/labels.rsi
offset: "-0.46875,0.03125"
map: ["enum.PaperLabelVisuals.Layer"]
- type: OverrideSell
overrideAccount: Engineering
- type: AccessReader
access: [["Engineering"]]
- type: entity
id: CrateLockBoxMedical
parent: CrateBaseLockBox
name: medical lock box
components:
- type: Sprite
layers:
- state: base
- state: overlay
color: "#92c7e8"
- state: closed
map: ["enum.StorageVisualLayers.Door"]
- state: overlay-closed
color: "#92c7e8"
map: [ lid_overlay ]
- state: welded
visible: false
map: ["enum.WeldableLayers.BaseWelded"]
- state: locked
map: ["enum.LockVisualLayers.Lock"]
shader: unshaded
- state: paper
sprite: Structures/Storage/Crates/labels.rsi
offset: "-0.46875,0.03125"
map: ["enum.PaperLabelVisuals.Layer"]
- type: OverrideSell
overrideAccount: Medical
- type: AccessReader
access: [["Medical"]]
- type: entity
id: CrateLockBoxScience
parent: CrateBaseLockBox
name: science lock box
components:
- type: Sprite
layers:
- state: base
- state: overlay
color: "#ba4bf0"
- state: closed
map: ["enum.StorageVisualLayers.Door"]
- state: overlay-closed
color: "#ba4bf0"
map: [ lid_overlay ]
- state: welded
visible: false
map: ["enum.WeldableLayers.BaseWelded"]
- state: locked
map: ["enum.LockVisualLayers.Lock"]
shader: unshaded
- state: paper
sprite: Structures/Storage/Crates/labels.rsi
offset: "-0.46875,0.03125"
map: ["enum.PaperLabelVisuals.Layer"]
- type: OverrideSell
overrideAccount: Science
- type: AccessReader
access: [["Research"]]
- type: entity
id: CrateLockBoxSecurity
parent: CrateBaseLockBox
name: security lock box
components:
- type: Sprite
layers:
- state: base
- state: overlay
color: "#c12d30"
- state: closed
map: ["enum.StorageVisualLayers.Door"]
- state: overlay-closed
color: "#c12d30"
map: [ lid_overlay ]
- state: welded
visible: false
map: ["enum.WeldableLayers.BaseWelded"]
- state: locked
map: ["enum.LockVisualLayers.Lock"]
shader: unshaded
- state: paper
sprite: Structures/Storage/Crates/labels.rsi
offset: "-0.46875,0.03125"
map: ["enum.PaperLabelVisuals.Layer"]
- type: OverrideSell
overrideAccount: Security
- type: AccessReader
access: [["Security"]]
- type: entity
id: CrateLockBoxService
parent: CrateBaseLockBox
name: service lock box
components:
- type: Sprite
layers:
- state: base
- state: overlay
color: "#53b723"
- state: closed
map: ["enum.StorageVisualLayers.Door"]
- state: overlay-closed
color: "#53b723"
map: [ lid_overlay ]
- state: welded
visible: false
map: ["enum.WeldableLayers.BaseWelded"]
- state: locked
map: ["enum.LockVisualLayers.Lock"]
shader: unshaded
- state: paper
sprite: Structures/Storage/Crates/labels.rsi
offset: "-0.46875,0.03125"
map: ["enum.PaperLabelVisuals.Layer"]
- type: OverrideSell
overrideAccount: Service
- type: AccessReader
access: [["Service"]]
- type: entity
parent: CrateGeneric
id: CratePirate

View File

@@ -0,0 +1,14 @@
- type: soundCollection
id: CargoPing
files:
- /Audio/Effects/Cargo/ping.ogg
- type: soundCollection
id: CargoError
files:
- /Audio/Effects/Cargo/buzz_sigh.ogg
- type: soundCollection
id: CargoToggleLimit
files:
- /Audio/Machines/quickbeep.ogg