Access lock lockers and add some more access types (#2389)
* access lock lockers and add some more access * Forgot something
This commit is contained in:
@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.GameObjects.Systems;
|
using Robust.Shared.GameObjects.Systems;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
private void DoUnlock(IEntity user)
|
private void DoUnlock(IEntity user)
|
||||||
{
|
{
|
||||||
if (CheckAccess(user)) return;
|
if (!CheckAccess(user)) return;
|
||||||
|
|
||||||
Locked = false;
|
Locked = false;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_off.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_off.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
||||||
@@ -112,7 +113,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
private void DoLock(IEntity user)
|
private void DoLock(IEntity user)
|
||||||
{
|
{
|
||||||
if (CheckAccess(user)) return;
|
if (!CheckAccess(user)) return;
|
||||||
|
|
||||||
Locked = true;
|
Locked = true;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_on.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_on.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
||||||
@@ -125,11 +126,11 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
if (!reader.IsAllowed(user))
|
if (!reader.IsAllowed(user))
|
||||||
{
|
{
|
||||||
Owner.PopupMessage(user, Loc.GetString("Access denied"));
|
Owner.PopupMessage(user, Loc.GetString("Access denied"));
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Verb]
|
[Verb]
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: Quartermaster
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Cargo
|
id: Cargo
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: ChiefEngineer
|
||||||
|
name: Chief Engineer
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Engineering
|
id: Engineering
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: ChiefMedicalOfficer
|
||||||
|
name: Chief Medical Officer
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Medical
|
id: Medical
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: ResearchDirector
|
||||||
|
name: Research Director
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Research
|
id: Research
|
||||||
|
|||||||
@@ -1,2 +1,12 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: HeadOfSecurity
|
||||||
|
name: Head of Security
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Security
|
id: Security
|
||||||
|
|
||||||
|
- type: accessLevel
|
||||||
|
id: Brig
|
||||||
|
|
||||||
|
- type: accessLevel
|
||||||
|
id: Detective
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
- type: accessLevel
|
||||||
|
id: Bar
|
||||||
|
|
||||||
|
- type: accessLevel
|
||||||
|
id: Kitchen
|
||||||
|
|
||||||
|
- type: accessLevel
|
||||||
|
id: Hydroponics
|
||||||
|
|
||||||
- type: accessLevel
|
- type: accessLevel
|
||||||
id: Service
|
id: Service
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,5 @@
|
|||||||
state: cabinet
|
state: cabinet
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: cabinet_icon
|
state: cabinet_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Bar"]]
|
||||||
|
|||||||
@@ -9,3 +9,5 @@
|
|||||||
state: qm
|
state: qm
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: qm_icon
|
state: qm_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Quartermaster"]]
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
state: cap
|
state: cap
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: cap_icon
|
state: cap_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Captain"]]
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerHeadOfPersonnel
|
id: LockerHeadOfPersonnel
|
||||||
@@ -21,3 +23,5 @@
|
|||||||
state: hop
|
state: hop
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: hop_icon
|
state: hop_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["HeadOfPersonnel"]]
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
state: ce
|
state: ce
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: ce_icon
|
state: ce_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "ChiefEngineer" ] ]
|
||||||
|
|
||||||
# Electrical supplies
|
# Electrical supplies
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -24,6 +26,8 @@
|
|||||||
state_closed: eng_elec_door
|
state_closed: eng_elec_door
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: eng_elec_icon
|
state: eng_elec_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Engineering" ] ]
|
||||||
|
|
||||||
# Welding supplies
|
# Welding supplies
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -38,6 +42,8 @@
|
|||||||
state_closed: eng_weld_door
|
state_closed: eng_weld_door
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: eng_weld_icon
|
state: eng_weld_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Engineering" ] ]
|
||||||
|
|
||||||
# Atmos tech
|
# Atmos tech
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -51,6 +57,8 @@
|
|||||||
state: atmos
|
state: atmos
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: atmos_icon
|
state: atmos_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Engineering" ] ]
|
||||||
|
|
||||||
# Engineer
|
# Engineer
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -64,3 +72,5 @@
|
|||||||
state: eng_secure
|
state: eng_secure
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: eng_secure_icon
|
state: eng_secure_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Engineering" ] ]
|
||||||
|
|||||||
@@ -9,3 +9,5 @@
|
|||||||
state: freezer
|
state: freezer
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: freezer_icon
|
state: freezer_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Service" ] ]
|
||||||
|
|||||||
@@ -9,3 +9,5 @@
|
|||||||
state: hydro
|
state: hydro
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: hydro_icon
|
state: hydro_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Hydroponics" ] ]
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
state: med
|
state: med
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: med_icon
|
state: med_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Medical" ] ]
|
||||||
|
|
||||||
# Medical doctor
|
# Medical doctor
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -24,6 +26,8 @@
|
|||||||
state: med_secure
|
state: med_secure
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: med_secure_icon
|
state: med_secure_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Medical" ] ]
|
||||||
|
|
||||||
# Chemical
|
# Chemical
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -38,6 +42,8 @@
|
|||||||
state_closed: chemical_door
|
state_closed: chemical_door
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: chemical_icon
|
state: chemical_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Medical" ] ]
|
||||||
|
|
||||||
# CMO
|
# CMO
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -51,3 +57,5 @@
|
|||||||
state: cmo
|
state: cmo
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: cmo_icon
|
state: cmo_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "ChiefMedicalOfficer" ] ]
|
||||||
|
|||||||
@@ -9,3 +9,19 @@
|
|||||||
state: rd
|
state: rd
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: rd_icon
|
state: rd_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "ResearchDirector" ] ]
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: LockerResearchDirector
|
||||||
|
parent: LockerSecureBase
|
||||||
|
name: "scientist's locker"
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: StorageVisualizer
|
||||||
|
state: rd
|
||||||
|
- type: Icon
|
||||||
|
state: rd_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [ [ "Research" ] ]
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
state: hos
|
state: hos
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: hos_icon
|
state: hos_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["HeadOfSecurity"]]
|
||||||
|
|
||||||
# Warden
|
# Warden
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -23,6 +25,8 @@
|
|||||||
state: warden
|
state: warden
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: warden_icon
|
state: warden_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Brig"]]
|
||||||
|
|
||||||
# Security Officer
|
# Security Officer
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -36,6 +40,8 @@
|
|||||||
state: sec
|
state: sec
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: sec_icon
|
state: sec_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Security"]]
|
||||||
|
|
||||||
# Detective
|
# Detective
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -49,3 +55,5 @@
|
|||||||
state: cabinet
|
state: cabinet
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: cabinet_icon
|
state: cabinet_icon
|
||||||
|
- type: AccessReader
|
||||||
|
access: [["Detective"]]
|
||||||
|
|||||||
@@ -284,4 +284,26 @@
|
|||||||
- type: IdCard
|
- type: IdCard
|
||||||
jobTitle: Central Commander
|
jobTitle: Central Commander
|
||||||
- type: Access
|
- type: Access
|
||||||
tags: ["Maintenance", "Cargo", "Engineering", "Medical", "Research", "Security", "Service", "Captain", "Command", "External", "HeadOfPersonnel", "Janitor", "Theatre"]
|
#GOD DEAR FUCKING GOD WE NEED AN ALL-ACCESS FLAG
|
||||||
|
tags:
|
||||||
|
- Maintenance
|
||||||
|
- Cargo
|
||||||
|
- Quartermaster
|
||||||
|
- Engineering
|
||||||
|
- ChiefEngineer
|
||||||
|
- Medical
|
||||||
|
- ChiefMedicalOfficer
|
||||||
|
- Research
|
||||||
|
- ResearchDirector
|
||||||
|
- Security
|
||||||
|
- Service
|
||||||
|
- Captain
|
||||||
|
- Command
|
||||||
|
- External
|
||||||
|
- HeadOfSecurity
|
||||||
|
- HeadOfPersonnel
|
||||||
|
- Bar
|
||||||
|
- Hydroponics
|
||||||
|
- Kitchen
|
||||||
|
- Janitor
|
||||||
|
- Theatre
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
icon: "Bartender"
|
icon: "Bartender"
|
||||||
access:
|
access:
|
||||||
- Service
|
- Service
|
||||||
|
- Bar
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
- type: startingGear
|
- type: startingGear
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
icon: "Chef"
|
icon: "Chef"
|
||||||
access:
|
access:
|
||||||
- Service
|
- Service
|
||||||
|
- Kitchen
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
- type: startingGear
|
- type: startingGear
|
||||||
|
|||||||
@@ -10,15 +10,26 @@
|
|||||||
access:
|
access:
|
||||||
# All of em.
|
# All of em.
|
||||||
# Could probably do with some kind of wildcard or whatever to automate this.
|
# Could probably do with some kind of wildcard or whatever to automate this.
|
||||||
|
# HELL FUCKING YEAH WE COULD
|
||||||
- Captain
|
- Captain
|
||||||
- HeadOfPersonnel
|
- HeadOfPersonnel
|
||||||
- Command
|
- Command
|
||||||
- Security
|
- Security
|
||||||
|
- HeadOfSecurity
|
||||||
|
- Brig
|
||||||
|
- Detective
|
||||||
|
- ChiefEngineer
|
||||||
- Engineering
|
- Engineering
|
||||||
|
- ChiefMedicalOfficer
|
||||||
- Medical
|
- Medical
|
||||||
|
- Quartermaster
|
||||||
- Cargo
|
- Cargo
|
||||||
|
- ResearchDirector
|
||||||
- Research
|
- Research
|
||||||
|
- Bar
|
||||||
|
- Kitchen
|
||||||
- Service
|
- Service
|
||||||
|
- Hydroponics
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- External
|
- External
|
||||||
- Janitor
|
- Janitor
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
access:
|
access:
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- Engineering
|
- Engineering
|
||||||
|
- ChiefEngineer
|
||||||
- Command
|
- Command
|
||||||
- External
|
- External
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
icon: "ChiefMedicalOfficer"
|
icon: "ChiefMedicalOfficer"
|
||||||
access:
|
access:
|
||||||
- Medical
|
- Medical
|
||||||
|
- ChiefMedicalOfficer
|
||||||
- Command
|
- Command
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
icon: "ResearchDirector"
|
icon: "ResearchDirector"
|
||||||
access:
|
access:
|
||||||
- Research
|
- Research
|
||||||
|
- ResearchDirector
|
||||||
- Command
|
- Command
|
||||||
- Maintenance
|
- Maintenance
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
icon: "HeadOfSecurity"
|
icon: "HeadOfSecurity"
|
||||||
access:
|
access:
|
||||||
- Command
|
- Command
|
||||||
|
- HeadOfSecurity
|
||||||
|
- Brig
|
||||||
|
- Detective
|
||||||
- Security
|
- Security
|
||||||
- Maintenance
|
- Maintenance
|
||||||
- Service
|
- Service
|
||||||
|
|||||||
Reference in New Issue
Block a user