Skip to content

Commit

Permalink
Department sec nuke (FUCK YOU!!!!!!)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuacksQ committed Sep 16, 2024
1 parent 5201019 commit 5bb1a38
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 595 deletions.
30 changes: 0 additions & 30 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ SUBSYSTEM_DEF(ticker)


/datum/controller/subsystem/ticker/proc/equip_characters()
GLOB.security_officer_distribution = decide_security_officer_departments(
shuffle(GLOB.new_player_list),
shuffle(GLOB.available_depts),
)

var/captainless = TRUE

Expand Down Expand Up @@ -422,32 +418,6 @@ SUBSYSTEM_DEF(ticker)
to_chat(new_player_mob, span_notice("Captainship not forced on anyone."))
CHECK_TICK


/datum/controller/subsystem/ticker/proc/decide_security_officer_departments(
list/new_players,
list/departments,
)
var/list/officer_mobs = list()
var/list/officer_preferences = list()

for (var/mob/dead/new_player/new_player_mob as anything in new_players)
var/mob/living/carbon/human/character = new_player_mob.new_character
if (istype(character) && is_security_officer_job(character.mind?.assigned_role))
officer_mobs += character

var/datum/client_interface/client = GET_CLIENT(new_player_mob)
var/preference = client?.prefs?.read_preference(/datum/preference/choiced/security_department)
officer_preferences += preference

var/distribution = get_officer_departments(officer_preferences, departments)

var/list/output = list()

for (var/index in 1 to officer_mobs.len)
output[REF(officer_mobs[index])] = distribution[index]

return output

/datum/controller/subsystem/ticker/proc/transfer_characters()
var/list/livings = list()
for(var/i in GLOB.new_player_list)
Expand Down
95 changes: 0 additions & 95 deletions code/datums/id_trim/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -785,98 +785,6 @@
ACCESS_HOS,
)
job = /datum/job/security_officer
/// List of bonus departmental accesses that departmental sec officers get by default.
var/department_access = list()
/// List of bonus departmental accesses that departmental security officers can in relation to how many overall security officers there are if the scaling system is set up. These can otherwise be granted via config settings.
var/elevated_access = list()

/datum/id_trim/job/security_officer/refresh_trim_access()
. = ..()

if(!.)
return

access |= department_access

// Config check for if sec has maint access.
if(CONFIG_GET(flag/security_has_maint_access))
access |= list(ACCESS_MAINT_TUNNELS)

// Scaling access (POPULATION_SCALED_ACCESS) is a system directly tied into calculations derived via a config entered variable, as well as the amount of players in the shift.
// Thus, it makes it possible to judge if departmental security officers should have more access to their department on a lower population shift.
// Server operators can modify config to change it such that security officers can use this system, or alternatively either: A) always give the "elevated" access (ALWAYS_GETS_ACCESS) or B) never give this access (null value).

#define POPULATION_SCALED_ACCESS 1
#define ALWAYS_GETS_ACCESS 2

// If null, then the departmental security officer will not get any elevated access.
if(!CONFIG_GET(number/depsec_access_level))
return

if(CONFIG_GET(number/depsec_access_level) == POPULATION_SCALED_ACCESS)
var/minimal_security_officers = 3 // We do not spawn in any more lockers if there are 5 or less security officers, so let's keep it lower than that number.
var/datum/job/J = SSjob.GetJob(JOB_SECURITY_OFFICER)
if((J.spawn_positions - minimal_security_officers) <= 0)
access |= elevated_access

if(CONFIG_GET(number/depsec_access_level) == ALWAYS_GETS_ACCESS)
access |= elevated_access

/datum/id_trim/job/security_officer/supply
assignment = "Security Officer (Cargo)"
subdepartment_color = COLOR_CARGO_BROWN
department_access = list(
ACCESS_CARGO,
ACCESS_MINING,
ACCESS_SHIPPING,
)
elevated_access = list(
ACCESS_AUX_BASE,
ACCESS_MINING_STATION,
)

/datum/id_trim/job/security_officer/engineering
assignment = "Security Officer (Engineering)"
subdepartment_color = COLOR_ENGINEERING_ORANGE
department_access = list(
ACCESS_ATMOSPHERICS,
ACCESS_ENGINEERING,
)
elevated_access = list(
ACCESS_AUX_BASE,
ACCESS_CONSTRUCTION,
ACCESS_ENGINE_EQUIP,
ACCESS_TCOMMS,
)

/datum/id_trim/job/security_officer/medical
assignment = "Security Officer (Medical)"
subdepartment_color = COLOR_MEDICAL_BLUE
department_access = list(
ACCESS_MEDICAL,
ACCESS_MORGUE,
)
elevated_access = list(
ACCESS_PHARMACY,
ACCESS_SURGERY,
ACCESS_VIROLOGY,
)

/datum/id_trim/job/security_officer/science
assignment = "Security Officer (Science)"
subdepartment_color = COLOR_SCIENCE_PINK
department_access = list(
ACCESS_RESEARCH,
ACCESS_SCIENCE,
)
elevated_access = list(
ACCESS_AUX_BASE,
ACCESS_GENETICS,
ACCESS_ORDNANCE_STORAGE,
ACCESS_ORDNANCE,
ACCESS_ROBOTICS,
ACCESS_XENOBIOLOGY,
)

/datum/id_trim/job/station_engineer
assignment = JOB_STATION_ENGINEER
Expand Down Expand Up @@ -944,6 +852,3 @@
// Config check for if sec has maint access.
if(CONFIG_GET(flag/security_has_maint_access))
access |= list(ACCESS_MAINT_TUNNELS)

#undef POPULATION_SCALED_ACCESS
#undef ALWAYS_GETS_ACCESS
21 changes: 0 additions & 21 deletions code/modules/client/preferences/security_department.dm

This file was deleted.

Loading

0 comments on commit 5bb1a38

Please sign in to comment.