[MIRROR] Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern. (#4864)

* Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern. (#58236)

About The Pull Request

ID cards when equipped will check the player's living hours if the USE_LOW_LIVING_HOUR_INTERN flag is set. If their living hours is less than the first of the following (checked in order from 1st to 3rd until a valid value is found):

    Config USE_LOW_LIVING_HOUR_INTERN_HOURS
    Config USE_EXP_RESTRICTIONS_HEADS_HOURS
    Hardcoded 15 hours

Then their ID card is tagged as Intern Assignment, unless they're a Head of Staff in which case they become an Assignment-in-Training.

PDAs, Wallets and Tablets also update any ID cards they hold, so equipping a PDA, Tablet or Wallet will also update any ID cards inside it.

This occurs automatically, even if the card does not belong to the owner. This only occurs when the user's assigned_role is a station job.

* Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
SkyratBot
2021-04-13 02:01:42 +01:00
committed by GitHub
co-authored by Timberpoes
parent 90fac14285
commit 4c68e4fe4e
5 changed files with 117 additions and 2 deletions
+4
View File
@@ -18,6 +18,8 @@ SUBSYSTEM_DEF(job)
/// A list of all jobs associated with the station. These jobs also have various icons associated with them including sechud and card trims.
var/list/station_jobs
/// A list of all Head of Staff jobs.
var/list/head_of_staff_jobs
/// A list of additional jobs that have various icons associated with them including sechud and card trims.
var/list/additional_jobs_with_icons
/// A list of jobs associed with Centcom and should use the standard NT Centcom icons.
@@ -828,6 +830,8 @@ SUBSYSTEM_DEF(job)
"Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Paramedic", "Chemist", "Geneticist", "Virologist", "Psychologist", \
"Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer", "Prisoner")
head_of_staff_jobs = list("Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Head of Security", "Captain")
additional_jobs_with_icons = list("Emergency Response Team Commander", "Security Response Officer", "Engineering Response Officer", "Medical Response Officer", \
"Entertainment Response Officer", "Religious Response Officer", "Janitorial Response Officer", "Death Commando", "Security Officer (Engineering)", \
"Security Officer (Cargo)", "Security Officer (Medical)", "Security Officer (Science)")