Handheld Mass Scanner (#25526)

* handheld

* Update meta.json

* Update meta.json

* Update cargo.yml

* research

* add to borg

* bruh

* borg to T2

* fix
This commit is contained in:
Ed
2024-02-27 02:19:51 +03:00
committed by GitHub
parent 79df39ed94
commit 7a5f81ddb4
13 changed files with 137 additions and 13 deletions

View File

@@ -3,6 +3,8 @@ using Content.Server.UserInterface;
using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Systems;
using Content.Shared.PowerCell;
using Content.Shared.Movement.Components;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
@@ -30,18 +32,10 @@ public sealed class RadarConsoleSystem : SharedRadarConsoleSystem
EntityCoordinates? coordinates = onGrid ? xform.Coordinates : null;
Angle? angle = onGrid ? xform.LocalRotation : null;
// Use ourself I guess.
if (TryComp<IntrinsicUIComponent>(uid, out var intrinsic))
{
foreach (var uiKey in intrinsic.UIs)
{
if (uiKey.Key?.Equals(RadarConsoleUiKey.Key) == true)
if (component.FollowEntity)
{
coordinates = new EntityCoordinates(uid, Vector2.Zero);
angle = Angle.Zero;
break;
}
}
}
if (_uiSystem.TryGetUi(uid, RadarConsoleUiKey.Key, out var bui))

View File

@@ -19,4 +19,10 @@ public sealed partial class RadarConsoleComponent : Component
[DataField, AutoNetworkedField]
public float MaxRange = 256f;
/// <summary>
/// If true, the radar will be centered on the entity. If not - on the grid on which it is located.
/// </summary>
[DataField]
public bool FollowEntity = false;
}

View File

@@ -19,6 +19,7 @@ research-technology-advanced-tools = Advanced Tools
research-technology-super-powercells = Super Powercells
research-technology-bluespace-storage = Bluespace Storage
research-technology-portable-fission = Portable Fission
research-technology-space-scanning = Space Scanning
research-technology-salvage-weapons = Salvage Weapons
research-technology-draconic-munitions = Draconic Munitions

View File

@@ -12,6 +12,7 @@
- id: OxygenTankFilled
- id: FireExtinguisher
- id: ClothingShoesBootsMag
- id: HandHeldMassScanner
- id: Pickaxe
- id: Welder
- id: Wrench

View File

@@ -66,6 +66,7 @@
title: comms-console-announcement-title-centcom
color: "#228b22"
- type: RadarConsole
followEntity: true
- type: CargoOrderConsole
- type: CrewMonitoringConsole
snap: false

View File

@@ -145,6 +145,7 @@
- type: ItemBorgModule
items:
- HandheldGPSBasic
- HandHeldMassScannerBorg
- HandheldStationMapUnpowered
- type: entity

View File

@@ -0,0 +1,72 @@
- type: entity
name: handheld mass scanner
parent: [ BaseItem, PowerCellSlotSmallItem]
id: HandHeldMassScanner
description: A hand-held mass scanner.
components:
- type: Item
- type: Sprite
sprite: Objects/Tools/handheld_mass_scanner.rsi
state: icon
layers:
- state: icon
- state: scanner
shader: unshaded
visible: true
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
- type: RadarConsole
maxRange: 64
followEntity: true
- type: Appearance
- type: GenericVisualizer
visuals:
enum.PowerCellSlotVisuals.Enabled:
enum.PowerDeviceVisualLayers.Powered:
True: { visible: true }
False: { visible: false }
- type: PowerCellDraw
drawRate: 3
useRate: 100
- type: ActivatableUIRequiresPowerCell
- type: ActivatableUI
key: enum.RadarConsoleUiKey.Key
inHandsOnly: true
singleUser: true
- type: UserInterface
interfaces:
- key: enum.RadarConsoleUiKey.Key
type: RadarConsoleBoundUserInterface
- type: StaticPrice
price: 150
- type: entity
id: HandHeldMassScannerEmpty
parent: HandHeldMassScanner
suffix: Empty
components:
- type: ItemSlots
slots:
cell_slot:
name: power-cell-slot-component-slot-name-default
- type: Sprite
sprite: Objects/Tools/handheld_mass_scanner.rsi
state: icon
layers:
- state: icon
- state: scanner
shader: unshaded
visible: false
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
- type: entity
id: HandHeldMassScannerBorg
parent: HandHeldMassScanner
suffix: Borg
components:
- type: ItemSlots
slots:
cell_slot:
name: power-cell-slot-component-slot-name-default
startingItem: PowerCellMicroreactor
disableEject: true
swap: false

View File

@@ -293,6 +293,7 @@
- SignalTrigger
- VoiceTrigger
- Igniter
- HandHeldMassScanner
- PowerCellMicroreactor
- PowerCellHigh
- WeaponPistolCHIMP
@@ -486,7 +487,6 @@
- SciFlash
- BorgModuleCable
- BorgModuleFireExtinguisher
- BorgModuleGPS
- BorgModuleRadiationDetection
- BorgModuleTool
- BorgModuleAppraisal
@@ -536,6 +536,7 @@
- BorgModuleMining
- BorgModuleGrapplingGun
- BorgModuleAdvancedTool
- BorgModuleGPS
- BorgModuleRCD
- BorgModuleArtifact
- BorgModuleAnomaly

View File

@@ -133,6 +133,15 @@
Steel: 500
Plastic: 250
- type: latheRecipe
id: HandHeldMassScanner
result: HandHeldMassScannerEmpty
category: Tools
completetime: 2
materials:
Steel: 800
Glass: 300
- type: latheRecipe
id: HandheldGPSBasic
result: HandheldGPSBasic

View File

@@ -119,6 +119,20 @@
- WeaponGrapplingGun
- BorgModuleGrapplingGun
- type: technology
id: SpaceScanning
name: research-technology-space-scanning
icon:
sprite: Objects/Tools/handheld_mass_scanner.rsi
state: icon
discipline: Industrial
tier: 2
cost: 7500
recipeUnlocks:
- RadarConsoleCircuitboard
- HandHeldMassScanner
- BorgModuleGPS
- type: technology
id: Shuttlecraft
name: research-technology-shuttlecraft
@@ -130,7 +144,6 @@
cost: 10000
recipeUnlocks:
- ShuttleConsoleCircuitboard
- RadarConsoleCircuitboard
- ThrusterMachineCircuitboard
- GyroscopeMachineCircuitboard
- MiniGravityGeneratorCircuitboard

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Taken from Frontier Station, created by Tem Armoff https://github.com/new-frontiers-14/frontier-station-14/pull/484/files",
"states": [
{
"name": "scanner",
"directions": 1,
"delays": [
[
0.4,
0.4
]
]
},
{
"name": "icon",
"directions": 1
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B