diff --git a/Content.Server/Mech/Systems/MechSystem.cs b/Content.Server/Mech/Systems/MechSystem.cs
index d849df50f7..7c7cc73223 100644
--- a/Content.Server/Mech/Systems/MechSystem.cs
+++ b/Content.Server/Mech/Systems/MechSystem.cs
@@ -33,6 +33,8 @@ using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.Player;
using Content.Shared.Whitelist;
+using Content.Shared.Access.Components;
+using Content.Shared.Access.Systems;
namespace Content.Server.Mech.Systems;
@@ -54,6 +56,7 @@ public sealed partial class MechSystem : SharedMechSystem
[Dependency] private readonly SharedHandsSystem _hands = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
+ [Dependency] private readonly AccessReaderSystem _accessReader = default!;
///
public override void Initialize()
@@ -249,7 +252,14 @@ public sealed partial class MechSystem : SharedMechSystem
_popup.PopupEntity(Loc.GetString("mech-no-enter", ("item", uid)), args.User);
return;
}
-
+
+ if (TryComp(uid, out var accessReader))
+ if (!_accessReader.IsAllowed(args.Args.User, uid, accessReader))
+ {
+ _popup.PopupEntity(Loc.GetString("mech-no-access", ("item", uid)), args.User);
+ return;
+ }
+
if (TryComp(args.Args.User, out var handsComponent))
foreach (var hand in _hands.EnumerateHands(args.Args.User, handsComponent))
_hands.DoDrop(args.Args.User, hand, true, handsComponent);
diff --git a/Resources/Locale/en-US/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl b/Resources/Locale/en-US/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
index a71495e614..5c8ed38ae4 100644
--- a/Resources/Locale/en-US/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
+++ b/Resources/Locale/en-US/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
@@ -1,2 +1,2 @@
ent-MechSecPod = Security Pod
- .desc = While lightly armored, the Gygax has incredible mobility thanks to its ability that lets it smash through walls at high speeds.
+ .desc = Despite its size, the Security Pod has incredible mobility in space thanks to its engines.
\ No newline at end of file
diff --git a/Resources/Locale/en-US/_prototypes/entities/markers/spawners/mechs.ftl b/Resources/Locale/en-US/_prototypes/entities/markers/spawners/mechs.ftl
index 44c7c8e2c5..3a337f5d39 100644
--- a/Resources/Locale/en-US/_prototypes/entities/markers/spawners/mechs.ftl
+++ b/Resources/Locale/en-US/_prototypes/entities/markers/spawners/mechs.ftl
@@ -38,3 +38,6 @@ ent-SpawnMechMaulerSyndie = Mauler Spawner
ent-SpawnMechMaulerSyndieFilled = Mauler Spawner
.suffix = Filled
.desc = { ent-MarkerBase.desc }
+ent-SpawnMechSecPodFilled = Sec Pod Spawner
+ .suffix = Filled
+ .desc = { ent-MarkerBase.desc }
\ No newline at end of file
diff --git a/Resources/Locale/en-US/_strings/mech/mech.ftl b/Resources/Locale/en-US/_strings/mech/mech.ftl
index 7fac0387ed..c6b60dedc2 100644
--- a/Resources/Locale/en-US/_strings/mech/mech.ftl
+++ b/Resources/Locale/en-US/_strings/mech/mech.ftl
@@ -17,5 +17,6 @@ mech-energy-missing = Energy: MISSING
mech-slot-display = Open Slots: {$amount}
mech-no-enter = You cannot pilot this.
+mech-no-access = You do not have access to pilot this.
mech-eject-pilot-alert = {$user} is pulling the pilot out of the {$item}!
\ No newline at end of file
diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
index 73ce6147e4..30ae337e34 100644
--- a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
+++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/specific/mech/mechs.ftl
@@ -6,3 +6,5 @@ ent-MechMolotBattery = { ent-MechMolot }
ent-MechMolotFilled = { ent-MechMolotBattery }
.desc = { ent-MechMolotBattery.desc }
.suffix = Батарея, Заполнен
+ent-MechSecPod = Патрульный Под
+ .desc = Несмотря на свои габариты, Охранный Под обладает невероятной мобильностью в космосе благодаря своим двигателям.
\ No newline at end of file
diff --git a/Resources/Locale/ru-RU/_prototypes/entities/markers/spawners/mechs.ftl b/Resources/Locale/ru-RU/_prototypes/entities/markers/spawners/mechs.ftl
index 56bb79dd26..9a5f4947ce 100644
--- a/Resources/Locale/ru-RU/_prototypes/entities/markers/spawners/mechs.ftl
+++ b/Resources/Locale/ru-RU/_prototypes/entities/markers/spawners/mechs.ftl
@@ -38,3 +38,6 @@ ent-SpawnMechMaulerSyndie = спавнер Маулер
ent-SpawnMechMaulerSyndieFilled = спавнер Маулер
.desc = { ent-MarkerBase.desc }
.suffix = Заполнен
+ent-SpawnMechSecPodFilled = спавнер Патрульного Пода
+ .suffix = Filled
+ .desc = { ent-MarkerBase.desc }
\ No newline at end of file
diff --git a/Resources/Locale/ru-RU/_strings/mech/mech.ftl b/Resources/Locale/ru-RU/_strings/mech/mech.ftl
index 59b1207ccc..ead90d2a69 100644
--- a/Resources/Locale/ru-RU/_strings/mech/mech.ftl
+++ b/Resources/Locale/ru-RU/_strings/mech/mech.ftl
@@ -11,4 +11,5 @@ mech-energy-display = Энергия: { $amount }%
mech-energy-missing = Энергия: ОТСУТСТВУЕТ
mech-slot-display = Доступно слотов: { $amount }
mech-no-enter = Вы не можете пилотировать это.
+mech-no-access = У вас нет доступа для пилотирования.
mech-eject-pilot-alert = { $user } вытягивает пилота из { $item }!
diff --git a/Resources/Prototypes/Entities/Markers/Spawners/mechs.yml b/Resources/Prototypes/Entities/Markers/Spawners/mechs.yml
index 1897faee99..0a24451518 100644
--- a/Resources/Prototypes/Entities/Markers/Spawners/mechs.yml
+++ b/Resources/Prototypes/Entities/Markers/Spawners/mechs.yml
@@ -240,4 +240,19 @@
state: mauler
- type: ConditionalSpawner
prototypes:
- - MechMaulerSyndieFilled
\ No newline at end of file
+ - MechMaulerSyndieFilled
+
+- type: entity
+ name: Sec Pod Spawner
+ suffix: Filled
+ id: SpawnMechSecPodFilled
+ parent: MarkerBase
+ components:
+ - type: Sprite
+ layers:
+ - state: green
+ - sprite: _Sunrise/Objects/Specific/Mech/sec_pod.rsi
+ state: sec_pod
+ - type: ConditionalSpawner
+ prototypes:
+ - MechSecPod
\ No newline at end of file
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
index dcd9f81d14..7dddbe9352 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
@@ -178,6 +178,7 @@
autoRot: true
radius: 4
netsync: false
+ - type: AccessReader
# Ripley MK-I
- type: entity
@@ -860,6 +861,8 @@
- DoorBumpOpener
- FootstepSound
- Gygax
+ - type: AccessReader
+ access: [["CentralCommand"]]
- type: entity
id: MechNTGygaxBattery
@@ -938,6 +941,8 @@
800: Critical
showOverlays: false
allowRevives: true
+ - type: AccessReader
+ access: [["CentralCommand"]]
- type: entity
id: MechMarauderBattery
@@ -1016,6 +1021,8 @@
800: Critical
showOverlays: false
allowRevives: true
+ - type: AccessReader
+ access: [["CentralCommand"]]
- type: entity
id: MechSeraphBattery
@@ -1102,6 +1109,8 @@
- DoorBumpOpener
- FootstepSound
- Gygax
+ - type: AccessReader
+ access: [["NuclearOperative"]]
- type: entity
id: MechGygaxSyndieBattery
@@ -1178,6 +1187,8 @@
780: Critical
showOverlays: false
allowRevives: true
+ - type: AccessReader
+ access: [["NuclearOperative"]]
- type: entity
id: MechRoverSyndieBattery
@@ -1259,6 +1270,8 @@
800: Critical
showOverlays: false
allowRevives: true
+ - type: AccessReader
+ access: [["NuclearOperative"]]
- type: entity
id: MechMaulerSyndieBattery
diff --git a/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/Mech/mechs.yml b/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/Mech/mechs.yml
index 452aba8a0f..2cd6854ec0 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/Mech/mechs.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/Mech/mechs.yml
@@ -1,45 +1,71 @@
- type: entity
- id: MechSecPod
- parent: [ BaseMech, CombatMech, BaseRestrictedContraband ]
- name: Security Pod
- description: While lightly armored, the Gygax has incredible mobility thanks to its ability that lets it smash through walls at high speeds.
+ id: BaseMechPod
+ save: false
+ abstract: true
components:
- - type: Sprite
- drawdepth: Mobs
- noRot: true
- sprite: _Sunrise/Objects/Specific/Mech/sec_pod.rsi
- scale: 1.08, 1.08
- layers:
- - map: [ "enum.MechVisualLayers.Base" ]
- state: sec_pod
- - type: FootstepModifier
- footstepSoundCollection:
- path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
+ - type: MobMover
- type: Mech
- baseState: sec_pod
- openState: sec_pod
- brokenState: sec_pod
- mechToPilotDamageMultiplier: 0.3
- airtight: true
- pilotWhitelist:
- components:
- - HumanoidAppearance
- - type: MeleeWeapon
- hidden: true
- attackRate: 1
+ - type: MechAir
+ - type: AirFilter
+ # everything except oxygen and nitrogen
+ gases:
+ - CarbonDioxide
+ - Plasma
+ - Tritium
+ - WaterVapor
+ - Ammonia
+ - NitrousOxide
+ - Frezon
+ #- Helium3 TODO: fusion
+ # remove everything except oxygen to maintain oxygen ratio
+ overflowGases:
+ - Nitrogen
+ - CarbonDioxide
+ - Plasma
+ - Tritium
+ - WaterVapor
+ - Ammonia
+ - NitrousOxide
+ - Frezon
+ #- Helium3 TODO: fusion
+ - type: AirIntake
+ # for intake and filter to work
+ - type: AtmosDevice
+ requireAnchored: false
+ joinSystem: true
+ - type: DoAfter
+ - type: Repairable
+ doAfterDelay: 2
damage:
types:
- Blunt: 0
- Structural: 0
+ Blunt: -15
+ Slash: -15
+ Piercing: -15
+ - type: UserInterface
+ interfaces:
+ enum.MechUiKey.Key:
+ type: MechBoundUserInterface
+ - type: Puller
+ needsHands: false
+ - type: InputMover
+ - type: InteractionOutline
- type: MovementSpeedModifier
- baseWalkSpeed: 2.5
+ baseWalkSpeed: 2
baseSprintSpeed: 3
- - type: Reflect
- reflectProb: 0.25
- spread: 180
- soundOnReflect: /Audio/Weapons/block_metal1.ogg
- reflects:
- - NonEnergy
+ friction: 5
+ weightlessFriction: 5
+ weightlessAcceleration: 4
+ weightlessModifier: 2.8
+ - type: MovementAlwaysTouching
+ - type: Pullable
+ - type: Clickable
+ - type: WiresPanel
+ - type: Physics
+ bodyType: Dynamic
+ - type: MobState
+ allowedStates:
+ - Alive
+ - Critical
- type: MobThresholds
currentThresholdState : Alive
thresholds:
@@ -47,4 +73,109 @@
300: Critical
showOverlays: false
allowRevives: true
- - type: Tag
\ No newline at end of file
+ - type: HealthExaminable
+ examinableTypes:
+ - Blunt
+ - Slash
+ - Piercing
+ - Heat
+ - Shock
+ locPrefix: mech
+ - type: Appearance
+ - type: ContainerContainer
+ containers:
+ mech-pilot-slot: !type:ContainerSlot
+ mech-equipment-container: !type:Container
+ mech-battery-slot: !type:ContainerSlot
+ - type: Damageable
+ damageContainer: Mech
+ damageModifierSet: LightArmor
+ - type: GuideHelp
+ guides:
+ - Robotics
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 900
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: MetalBreak
+ - !type:ChangeConstructionNodeBehavior
+ node: start
+ - !type:DoActsBehavior
+ acts: ["Destruction"]
+ - type: StatusIcon
+ bounds: "-0.6,-0.6, 0.6, 0.6"
+ - type: PointLight
+ enabled: false
+ mask: /Textures/Effects/LightMasks/cone.png
+ autoRot: true
+ radius: 9
+ netsync: false
+
+- type: entity
+ id: MechSecPod
+ parent: [ BaseMechPod, BaseRestrictedContraband ]
+ name: Security Pod
+ description: Despite its size, the Security Pod has incredible mobility in space thanks to its engines.
+ suffix: Filled
+ components:
+ - type: Sprite
+ drawdepth: Mobs
+ sprite: _Sunrise/Objects/Specific/Mech/sec_pod.rsi
+ scale: 1.08, 1.08
+ layers:
+ - state: sec_pod
+ map: ["enum.MechVisualLayers.Base"]
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeCircle
+ radius: 0.9
+ density: 1000
+ mask:
+ - FlyingMobMask
+ layer:
+ - FlyingMobLayer
+ - type: AmbientSound
+ range: 4
+ volume: -4
+ sound:
+ path: /Audio/Effects/shuttle_thruster.ogg
+ - type: Mech
+ baseState: sec_pod
+ openState: sec_pod_open
+ brokenState: sec_pod_broken
+ mechToPilotDamageMultiplier: 0.3
+ maxEquipmentAmount: 2
+ airtight: true
+ pilotWhitelist:
+ components:
+ - HumanoidAppearance
+ equipmentWhitelist:
+ tags:
+ - CombatMech
+ startingEquipment:
+ - WeaponMechCombatSolarisLaser
+ - type: Reflect
+ reflectProb: 0.2
+ spread: 180
+ soundOnReflect: /Audio/Weapons/block_metal1.ogg
+ reflects:
+ - NonEnergy
+ - type: MobThresholds
+ currentThresholdState: Alive
+ thresholds:
+ 0: Alive
+ 450: Critical
+ showOverlays: false
+ allowRevives: true
+ - type: ContainerFill
+ containers:
+ mech-battery-slot:
+ - PowerCageMedium
+ - type: AccessReader
+ access: [["Security"]]
\ No newline at end of file
diff --git a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/meta.json b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/meta.json
index 4fee9929dd..20b96ce54d 100644
--- a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/meta.json
+++ b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/meta.json
@@ -3,13 +3,18 @@
"license" : "CC-BY-SA-3.0",
"version": 1,
"size": {
- "x": 32,
- "y": 32
+ "x": 64,
+ "y": 64
},
"states": [
{
- "name": "sec_pod",
- "directions": 4
+ "name": "sec_pod"
+ },
+ {
+ "name": "sec_pod_broken"
+ },
+ {
+ "name": "sec_pod_open"
}
]
}
diff --git a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod.png b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod.png
index 6366d28acd..f4bfec3f08 100644
Binary files a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod.png and b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod.png differ
diff --git a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_broken.png b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_broken.png
new file mode 100644
index 0000000000..4ee4f2defa
Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_broken.png differ
diff --git a/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_open.png b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_open.png
new file mode 100644
index 0000000000..df01ee3aa2
Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Specific/Mech/sec_pod.rsi/sec_pod_open.png differ