[Tweak] Security statuses micro update (#629)
* Tweak: Sec statuses update WIP * fix: Для новых статусов требуется указать причину * Fix: for review
@@ -217,9 +217,19 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
|
||||
}
|
||||
}
|
||||
|
||||
private HashSet<SecurityStatus> AllowedStatusList = new HashSet<SecurityStatus>()
|
||||
{
|
||||
SecurityStatus.Wanted,
|
||||
SecurityStatus.Suspected,
|
||||
SecurityStatus.Demote,
|
||||
SecurityStatus.Monitoring,
|
||||
SecurityStatus.Paroled,
|
||||
SecurityStatus.Execute
|
||||
};
|
||||
|
||||
private void SetStatus(SecurityStatus status)
|
||||
{
|
||||
if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected)
|
||||
if (AllowedStatusList.Contains(status)) // WD end
|
||||
{
|
||||
GetReason(status);
|
||||
return;
|
||||
|
||||
@@ -15,31 +15,43 @@ public sealed class SecurityHudBUI : BoundUserInterface
|
||||
|
||||
private readonly Dictionary<string, string> _names = new()
|
||||
{
|
||||
{ "SecurityIconDischarged", Loc.GetString("criminal-records-status-discharged")},
|
||||
{ "SecurityIconDemote", Loc.GetString("criminal-records-status-demote")}, // WD start
|
||||
{ "SecurityIconParoled", Loc.GetString("criminal-records-status-paroled")},
|
||||
{ "SecurityIconSuspected", Loc.GetString("criminal-records-status-suspected")},
|
||||
{ "SecurityIconWanted", Loc.GetString("criminal-records-status-wanted")},
|
||||
{ "SecurityIconIncarcerated", Loc.GetString("criminal-records-status-detained")},
|
||||
{ "SecurityIconExecute", Loc.GetString("criminal-records-status-execute")},
|
||||
{ "SecurityIconMonitoring", Loc.GetString("criminal-records-status-monitoring")},
|
||||
{ "SecurityIconReleased", Loc.GetString("criminal-records-status-released")},
|
||||
{ "SecurityIconSearch", Loc.GetString("criminal-records-status-search")},
|
||||
{ "CriminalRecordIconRemove", Loc.GetString("security-hud-remove-status") }
|
||||
};
|
||||
|
||||
private readonly Dictionary<string, string> _icons = new()
|
||||
{
|
||||
{ "SecurityIconDischarged", "/Textures/White/Interface/securityhud.rsi/discharged.png" },
|
||||
{ "SecurityIconDemote", "/Textures/White/Interface/securityhud.rsi/demote.png" },
|
||||
{ "SecurityIconParoled", "/Textures/White/Interface/securityhud.rsi/paroled.png" },
|
||||
{ "SecurityIconSuspected", "/Textures/White/Interface/securityhud.rsi/suspected.png" },
|
||||
{ "SecurityIconWanted", "/Textures/White/Interface/securityhud.rsi/wanted.png" },
|
||||
{ "SecurityIconIncarcerated", "/Textures/White/Interface/securityhud.rsi/incarcerated.png" },
|
||||
{ "SecurityIconExecute", "/Textures/White/Interface/securityhud.rsi/execute.png" },
|
||||
{ "SecurityIconMonitoring", "/Textures/White/Interface/securityhud.rsi/monitoring.png" },
|
||||
{ "SecurityIconReleased", "/Textures/White/Interface/securityhud.rsi/released.png" },
|
||||
{ "SecurityIconSearch", "/Textures/White/Interface/securityhud.rsi/search.png" },
|
||||
{ "CriminalRecordIconRemove", "/Textures/White/Interface/securityhud.rsi/remove.png" }
|
||||
};
|
||||
|
||||
private readonly Dictionary<string, SecurityStatus> _status = new()
|
||||
{
|
||||
{ "SecurityIconDischarged", SecurityStatus.Discharged },
|
||||
{ "SecurityIconDemote", SecurityStatus.Demote },
|
||||
{ "SecurityIconParoled", SecurityStatus.Paroled },
|
||||
{ "SecurityIconSuspected", SecurityStatus.Suspected },
|
||||
{ "SecurityIconWanted", SecurityStatus.Wanted },
|
||||
{ "SecurityIconIncarcerated", SecurityStatus.Detained },
|
||||
{ "SecurityIconExecute", SecurityStatus.Execute },
|
||||
{ "SecurityIconMonitoring", SecurityStatus.Monitoring },
|
||||
{ "SecurityIconReleased", SecurityStatus.Released },
|
||||
{ "SecurityIconSearch", SecurityStatus.Search }, // WD end
|
||||
{ "CriminalRecordIconRemove", SecurityStatus.None }
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,11 @@ public sealed class CriminalRecordsConsoleSystem : SharedCriminalRecordsConsoleS
|
||||
{
|
||||
// prevent malf client violating wanted/reason nullability
|
||||
if (msg.Status == SecurityStatus.Wanted != (msg.Reason != null) &&
|
||||
msg.Status == SecurityStatus.Suspected != (msg.Reason != null))
|
||||
msg.Status == SecurityStatus.Suspected != (msg.Reason != null) &&
|
||||
msg.Status == SecurityStatus.Demote != (msg.Reason != null) && // WD start
|
||||
msg.Status == SecurityStatus.Monitoring != (msg.Reason != null) &&
|
||||
msg.Status == SecurityStatus.Paroled != (msg.Reason != null) &&
|
||||
msg.Status == SecurityStatus.Execute != (msg.Reason != null)) // WD end
|
||||
return;
|
||||
|
||||
if (!CheckSelected(ent, msg.Session, out var mob, out var key))
|
||||
@@ -127,10 +131,18 @@ public sealed class CriminalRecordsConsoleSystem : SharedCriminalRecordsConsoleS
|
||||
(_, SecurityStatus.Suspected) => "suspected",
|
||||
// released on parole
|
||||
(_, SecurityStatus.Paroled) => "paroled",
|
||||
// prisoner did their time
|
||||
(_, SecurityStatus.Discharged) => "released",
|
||||
// person was demoted
|
||||
(_, SecurityStatus.Demote) => "demoted", // WD start
|
||||
// going from any other state to wanted, AOS or prisonbreak / lazy secoff never set them to released and they reoffended
|
||||
(_, SecurityStatus.Wanted) => "wanted",
|
||||
// Person is xenos
|
||||
(_, SecurityStatus.Execute) => "execute",
|
||||
// Person requires supervision
|
||||
(_, SecurityStatus.Monitoring) => "monitoring",
|
||||
// Person works in cargo
|
||||
(_, SecurityStatus.Search) => "search",
|
||||
// Released
|
||||
(_, SecurityStatus.Released) => "released",
|
||||
// person is no longer sus
|
||||
(SecurityStatus.Suspected, SecurityStatus.None) => "not-suspected",
|
||||
// going from wanted to none, must have been a mistake
|
||||
@@ -139,6 +151,14 @@ public sealed class CriminalRecordsConsoleSystem : SharedCriminalRecordsConsoleS
|
||||
(SecurityStatus.Detained, SecurityStatus.None) => "released",
|
||||
// criminal is no longer on parole
|
||||
(SecurityStatus.Paroled, SecurityStatus.None) => "not-parole",
|
||||
// person dont require supervision
|
||||
(SecurityStatus.Monitoring, SecurityStatus.None) => "not-monitoring",
|
||||
// person was searched
|
||||
(SecurityStatus.Search, SecurityStatus.None) => "not-search",
|
||||
// person was demoted
|
||||
(SecurityStatus.Demote, SecurityStatus.None) => "not-demoted",
|
||||
// person is not xenos
|
||||
(SecurityStatus.Execute, SecurityStatus.None) => "not-execute", // WD end
|
||||
// this is impossible
|
||||
_ => "not-wanted"
|
||||
};
|
||||
|
||||
@@ -136,8 +136,12 @@ public sealed class SecurityHudSystem : EntitySystem
|
||||
(_, SecurityStatus.Detained) => "detained",
|
||||
(_, SecurityStatus.Suspected) => "suspected",
|
||||
(_, SecurityStatus.Paroled) => "paroled",
|
||||
(_, SecurityStatus.Discharged) => "released",
|
||||
(_, SecurityStatus.Demote) => "demoted", // WD start
|
||||
(_, SecurityStatus.Wanted) => "wanted",
|
||||
(_, SecurityStatus.Monitoring) => "monitoring",
|
||||
(_, SecurityStatus.Released) => "released",
|
||||
(_, SecurityStatus.Search) => "search",
|
||||
(_, SecurityStatus.Execute) => "execute",
|
||||
(SecurityStatus.Suspected, SecurityStatus.None) => "not-suspected",
|
||||
(SecurityStatus.Wanted, SecurityStatus.None) => "not-wanted",
|
||||
(SecurityStatus.Detained, SecurityStatus.None) => "released",
|
||||
|
||||
@@ -41,8 +41,12 @@ public abstract class SharedCriminalRecordsConsoleSystem : EntitySystem
|
||||
SecurityStatus.Paroled => "SecurityIconParoled",
|
||||
SecurityStatus.Wanted => "SecurityIconWanted",
|
||||
SecurityStatus.Detained => "SecurityIconIncarcerated",
|
||||
SecurityStatus.Discharged => "SecurityIconDischarged",
|
||||
SecurityStatus.Demote => "SecurityIconDemote",
|
||||
SecurityStatus.Suspected => "SecurityIconSuspected",
|
||||
SecurityStatus.Execute => "SecurityIconExecute", // WD start
|
||||
SecurityStatus.Released => "SecurityIconReleased",
|
||||
SecurityStatus.Monitoring => "SecurityIconMonitoring",
|
||||
SecurityStatus.Search => "SecurityIconSearch", // WD end
|
||||
_ => record.StatusIcon
|
||||
};
|
||||
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
/// </summary>
|
||||
public enum SecurityStatus : byte
|
||||
{
|
||||
None,
|
||||
Suspected,
|
||||
None, // WD start
|
||||
Wanted,
|
||||
Suspected,
|
||||
Demote,
|
||||
Search,
|
||||
Monitoring,
|
||||
Detained,
|
||||
Paroled,
|
||||
Discharged
|
||||
Released,
|
||||
Execute // WD end
|
||||
}
|
||||
|
||||
@@ -9,13 +9,21 @@ criminal-records-console-no-record-found = Не найдены записи дл
|
||||
criminal-records-console-status = Статус
|
||||
criminal-records-status-none = Нет
|
||||
criminal-records-status-wanted = В розыске
|
||||
criminal-records-status-detained = В заключении
|
||||
criminal-records-status-suspected = Подозреваемый
|
||||
criminal-records-status-discharged = Освобождён
|
||||
criminal-records-status-paroled = Досрочно освобождён
|
||||
criminal-records-status-demote = Подлежит понижению
|
||||
criminal-records-status-search = Обыскать
|
||||
criminal-records-status-monitoring = Установить слежку
|
||||
criminal-records-status-detained = Под стражей
|
||||
criminal-records-status-paroled = Условно-досрочно освобождён
|
||||
criminal-records-status-released = Освобождён
|
||||
criminal-records-status-execute = Ликвидировать
|
||||
|
||||
criminal-records-console-wanted-reason = [color=gray]Причина розыска[/color]
|
||||
criminal-records-console-suspected-reason = [color=gray]Причина подозрения[/color]
|
||||
criminal-records-console-demote-reason = [color=gray]Причина понижения[/color]
|
||||
criminal-records-console-monitoring-reason = [color=gray]Причина слежки[/color]
|
||||
criminal-records-console-paroled-reason = [color=gray]Основание УДО[/color]
|
||||
criminal-records-console-execute-reason = [color=gray]Причина устранения[/color]
|
||||
criminal-records-console-reason = Причина
|
||||
criminal-records-console-reason-placeholder = Например: {$placeholder}
|
||||
|
||||
@@ -37,9 +45,13 @@ criminal-records-console-not-suspected = {$name} больше не под под
|
||||
criminal-records-console-detained = {$name} был задержан {$officer}.
|
||||
criminal-records-console-released = {$name} был освобожден {$officer}.
|
||||
criminal-records-console-not-wanted = {$name} больше не в розыске.
|
||||
criminal-records-console-paroled = {$name} был отпущен условно-досрочно {$officer}.
|
||||
criminal-records-console-not-parole = {$name} больше не условно-досрочно освобождённый.
|
||||
criminal-records-console-unknown-officer = <неизвестный офицер>
|
||||
criminal-records-console-paroled = {$name} был условно-досрочно освобождён {$officer} на основании {$reason}.
|
||||
criminal-records-console-not-parole = {$name} нарушил условия условно-досрочного освобождения.
|
||||
criminal-records-console-search = {$name} требуется обыскать по указу {$officer}.
|
||||
criminal-records-console-monitoring = За {$name} требуется вести наблюдание по причине {$reason}.
|
||||
criminal-records-console-execute = {$name} требуется ликвидировать по приказу {$officer} по причине {$reason}.
|
||||
criminal-records-console-demoted = {$name} должен быть понижен в должности по указу {$officer} по причине {$reason}.
|
||||
criminal-records-console-unknown-officer = <неопознанный офицер>
|
||||
|
||||
|
||||
## Filters
|
||||
|
||||
@@ -9,16 +9,17 @@ criminal-login-in-desc = Войти
|
||||
criminal-login-info = ID: { $user }
|
||||
criminal-login-hint = Вставьте ID карту в консоль, нажав на "{ $name }" (нужно держать ID карту в руке)
|
||||
criminal-login-warn = WARNING: Доступ к системе осуществляется уровнем доступа "службы безопасности"
|
||||
criminal-status-released = Освобожден
|
||||
criminal-status-discharged = Выписан
|
||||
criminal-status-parolled = Закодирован
|
||||
criminal-status-released = Освобождён
|
||||
criminal-status-demote = Понизить
|
||||
criminal-status-parolled = Условно-досрочно освобождён
|
||||
criminal-status-suspected = Подозреваемый
|
||||
criminal-status-wanted = В розыске
|
||||
criminal-status-incarcerated = Заключенный
|
||||
criminal-status-execute = Ликвидировать
|
||||
criminal-status-monitoring = Наблюдать
|
||||
criminal-status-search = Обыскать
|
||||
criminal-targetchannel-set-released = { $target } освобожден(а).
|
||||
criminal-targetchannel-set-released-reason = { $target } освобожден(а). Заметка: { $reason }.
|
||||
criminal-targetchannel-set-discharged = { $target } выписан(а).
|
||||
criminal-targetchannel-set-discharged-reason = { $target } выписан(а). Заметка: { $reason }.
|
||||
criminal-targetchannel-set-parolled = { $target } закодирован(а).
|
||||
criminal-targetchannel-set-parolled-reason = { $target } закодирован(а). Заметка: { $reason }.
|
||||
criminal-targetchannel-set-suspected = { $target } под подозрением.
|
||||
|
||||
@@ -6,44 +6,72 @@
|
||||
locationPreference: Right
|
||||
isShaded: true
|
||||
|
||||
- type: statusIcon
|
||||
- type: statusIcon # WD start
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconDischarged
|
||||
id: SecurityIconDemote
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
state: hud_discharged
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_demote
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconIncarcerated
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_incarcerated
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconParoled
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_paroled
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconSuspected
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_suspected
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconWanted
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_wanted
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconExecute
|
||||
icon:
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_execute
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconMonitoring
|
||||
icon:
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_monitoring
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconReleased
|
||||
icon:
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_released
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: SecurityIconSearch
|
||||
icon:
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_search
|
||||
|
||||
- type: statusIcon
|
||||
parent: SecurityIcon
|
||||
id: CriminalRecordIconRemove
|
||||
icon:
|
||||
sprite: /Textures/Interface/Misc/security_icons.rsi
|
||||
state: hud_discharged
|
||||
sprite: /Textures/White/Interface/records.rsi
|
||||
state: hud_demote # WD end
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
access: [["Security"]]
|
||||
- type: SecurityHud
|
||||
criminalrecords:
|
||||
- SecurityIconDischarged
|
||||
- SecurityIconDemote
|
||||
- SecurityIconParoled
|
||||
- SecurityIconSuspected
|
||||
- SecurityIconWanted
|
||||
- SecurityIconIncarcerated
|
||||
- SecurityIconExecute
|
||||
- SecurityIconMonitoring
|
||||
- SecurityIconSearch
|
||||
- SecurityIconReleased
|
||||
- CriminalRecordIconRemove
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
|
||||
BIN
Resources/Textures/White/Interface/records.rsi/hud_demote.png
Normal file
|
After Width: | Height: | Size: 129 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_execute.png
Normal file
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 149 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_paroled.png
Normal file
|
After Width: | Height: | Size: 157 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_released.png
Normal file
|
After Width: | Height: | Size: 130 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_search.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_suspected.png
Normal file
|
After Width: | Height: | Size: 141 B |
BIN
Resources/Textures/White/Interface/records.rsi/hud_wanted.png
Normal file
|
After Width: | Height: | Size: 158 B |
@@ -5,23 +5,35 @@
|
||||
"size": { "y": 8, "x": 8 },
|
||||
"states": [
|
||||
{
|
||||
"name": "wanted"
|
||||
"name": "hud_demote"
|
||||
},
|
||||
{
|
||||
"name": "suspected"
|
||||
"name": "hud_incarcerated"
|
||||
},
|
||||
{
|
||||
"name": "released"
|
||||
"name": "hud_monitoring"
|
||||
},
|
||||
{
|
||||
"name": "parolled"
|
||||
"name": "hud_paroled"
|
||||
},
|
||||
{
|
||||
"name": "incarcerated"
|
||||
"name": "hud_released"
|
||||
},
|
||||
{
|
||||
"name": "discharged"
|
||||
"name": "hud_search"
|
||||
},
|
||||
{
|
||||
"name": "hud_suspected"
|
||||
},
|
||||
{
|
||||
"name": "hud_wanted"
|
||||
},
|
||||
{
|
||||
"name": "hud_execute",
|
||||
"delays":
|
||||
[
|
||||
[0.5, 0.5, 1.0]
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
BIN
Resources/Textures/White/Interface/securityhud.rsi/demote.png
Normal file
|
After Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 225 B |
BIN
Resources/Textures/White/Interface/securityhud.rsi/execute.png
Normal file
|
After Width: | Height: | Size: 290 B |
@@ -5,19 +5,34 @@
|
||||
"size": { "y": 32, "x": 32 },
|
||||
"states": [
|
||||
{
|
||||
"name": "wanted"
|
||||
"name": "demote"
|
||||
},
|
||||
{
|
||||
"name": "suspected"
|
||||
},
|
||||
{
|
||||
"name": "released"
|
||||
"name": "execute"
|
||||
},
|
||||
{
|
||||
"name": "incarcerated"
|
||||
},
|
||||
{
|
||||
"name": "monitoring"
|
||||
},
|
||||
{
|
||||
"name": "paroled"
|
||||
},
|
||||
{
|
||||
"name": "released"
|
||||
},
|
||||
{
|
||||
"name": "remove"
|
||||
},
|
||||
{
|
||||
"name": "search"
|
||||
},
|
||||
{
|
||||
"name": "suspected"
|
||||
},
|
||||
{
|
||||
"name": "wanted"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 191 B |
BIN
Resources/Textures/White/Interface/securityhud.rsi/search.png
Normal file
|
After Width: | Height: | Size: 289 B |