Disposal mailing (#2194)

* Implement device networking

* Implement device configuration menu

* Fix device network

* Implement disposal mailing unit

* Implement base network connection
Implement wired and wireless network connection
Implement device network metadata

* Fix dereference null error

* Fix wired network null checks

* Change BaseNetworks enum to NetworkUtils class
Add PingResponse function to NetworkUtils
Change device network file structure

* Add doc comments

* Apply suggestions from code review

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Add tag validation to disposal mailing unit

* Add tag validation to the mailing unit component

* Address reviews
Change WiredNetwork can connect check
Change device networking string literals to constants

* Address reviews
Revert changes to PowerProvider and PowerReceiver
Add new NodeGroup
WELP

* Fix recursive access to Owner property

* Integrate suggested changes

* Fix TryGetWireNet acting on NullPowerProvider
Fix network connections not checking if their owner has been deleted

* Close device network connection when the owning entity got deleted
Fix mailing unit not closing the device network connection on remove

* Remove GetWireNet from NullPowerProvider

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Julian Giebel
2020-10-30 01:16:26 +01:00
committed by GitHub
parent 1b3cbd4d3a
commit 45b610f933
31 changed files with 2450 additions and 13 deletions

View File

@@ -41,6 +41,8 @@
nodes:
- !type:AdjacentNode
nodeGroupID: HVPower
- !type:AdjacentNode
nodeGroupID: WireNet
- type: Wire
wireDroppedOnCutPrototype: HVWireStack1
wireType: HighVoltage
@@ -71,6 +73,8 @@
nodes:
- !type:AdjacentNode
nodeGroupID: MVPower
- !type:AdjacentNode
nodeGroupID: WireNet
- type: Wire
wireDroppedOnCutPrototype: MVWireStack1
wireType: MediumVoltage
@@ -101,6 +105,8 @@
nodes:
- !type:AdjacentNode
nodeGroupID: Apc
- !type:AdjacentNode
nodeGroupID: WireNet
- type: PowerProvider
voltage: Apc
- type: Wire

View File

@@ -330,3 +330,74 @@
- !type:PhysShapeAabb
bounds: "-0.5,-0.5,0.25,0.25"
layer: [ Underplating ]
- type: entity
id: DisposalMailingUnit
name: disposal mailing unit
description: A pneumatic waste disposal unit
placement:
mode: SnapgridCenter
snap:
- Disposal
components:
- type: Sprite
netsync: false
sprite: Constructible/Power/disposal.rsi
layers:
- state: condisposal
map: ["enum.DisposalUnitVisualLayers.Base"]
- state: dispover-handle
map: ["enum.DisposalUnitVisualLayers.Handle"]
- state: dispover-ready
map: ["enum.DisposalUnitVisualLayers.Light"]
- type: PowerReceiver
- type: Configuration
keys:
- Tag
- type: DisposalMailingUnit
flushTime: 2
- type: Clickable
- type: InteractionOutline
- type: Physics
anchored: true
shapes:
- !type:PhysShapeAabb
bounds: "-0.35,-0.3,0.35,0.3"
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
- type: SnapGrid
offset: Center
- type: Anchorable
- type: Destructible
thresholdvalue: 100
resistances: metallicResistances
- type: Appearance
visuals:
- type: DisposalUnitVisualizer
state_unanchored: condisposal
state_anchored: disposal
state_charging: disposal-charging
overlay_charging: dispover-charge
overlay_ready: dispover-ready
overlay_full: dispover-full
overlay_engaged: dispover-handle
state_flush: disposal-flush
flush_sound: /Audio/Machines/disposalflush.ogg
flush_time: 2
- type: UserInterface
interfaces:
- key: enum.DisposalMailingUnitUiKey.Key
type: DisposalMailingUnitBoundUserInterface
- key: enum.ConfigurationUiKey.Key
type: ConfigurationBoundUserInterface
- type: Pullable