Skip to content

Commit

Permalink
Handheld Mass Scanner (#484)
Browse files Browse the repository at this point in the history
* handheld mass scanner

* Add mass scanner to AstroVend

* incorrect slashes for the validator

* fix licensing

* casing

* wrong proto

---------

Co-authored-by: checkraze <jgrigg87@gmail.com>
  • Loading branch information
Temoffy and Cheackraze authored Oct 27, 2023
1 parent 92e0065 commit c96305f
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Content.Server/Shuttles/Systems/RadarConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using Content.Shared.Shuttles.Systems;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Content.Shared.PowerCell;
using Content.Shared.Movement.Components;

namespace Content.Server.Shuttles.Systems;

Expand All @@ -30,6 +32,13 @@ protected override void UpdateState(EntityUid uid, RadarConsoleComponent compone
EntityCoordinates? coordinates = onGrid ? xform.Coordinates : null;
Angle? angle = onGrid ? xform.LocalRotation : null;

//handheld test
if (HasComp<PowerCellDrawComponent>(uid))
{
coordinates = new EntityCoordinates(uid, Vector2.Zero);
angle = Angle.Zero + MathHelper.DegreesToRadians(180);
}

// Use ourself I guess.
if (TryComp<IntrinsicUIComponent>(uid, out var intrinsic))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
- type: entity
name: handheld mass scanner
parent: [ BaseItem, PowerCellSlotSmallItem]
id: HandHeldMassScanner
description: A hand-held mass scanner.
components:
- type: Item
size: 20
- 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
- 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: 500
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
AirTankFilled: 10
JetpackMiniFilled: 10
EncryptionKeyCommand: 30
HandHeldMassScanner: 10
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Frontier Station, Tem Armoff",
"states": [
{
"name": "scanner",
"directions": 1,
"delays": [
[
0.4,
0.4
]
]
},
{
"name": "icon",
"directions": 1
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c96305f

Please sign in to comment.