Skip to content

Commit

Permalink
Goodbye get_all_main_access
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 28, 2023
1 parent eb665f1 commit d122a6b
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 70 deletions.
8 changes: 0 additions & 8 deletions code/game/jobs/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,6 @@
ACCESS_UPP_SENIOR_LEAD,
) + get_access(ACCESS_LIST_COLONIAL_ALL) + get_access(ACCESS_LIST_EMERGENCY_RESPONSE)

///Grants standard access for all factions, does not include high restrictions like COs office.
/proc/get_all_main_access()
return get_antagonist_access() + get_access(ACCESS_LIST_COLONIAL_ALL) + get_access(ACCESS_LIST_WY_ALL)

///CLF & UPP, UPP Commandos have global.
/proc/get_antagonist_access()
return get_access(ACCESS_LIST_MARINE_MAIN) + list(ACCESS_ILLEGAL_PIRATE)

/proc/get_region_accesses(code)
switch(code)
if(0)//Everything
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/circuitboards/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

t1 += "<br>"

var/list/accesses = get_all_main_access()
var/list/accesses = get_access(ACCESS_LIST_MARINE_ALL)
for (var/acc in accesses)
var/aname = get_access_desc(acc)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
open()
else
src.req_access = list()
src.req_access += pick(get_all_main_access())
src.req_access += pick(get_access(ACCESS_LIST_MARINE_MAIN))
..()

/obj/structure/closet/secure_closet/proc/togglelock(mob/living/user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
open()
else
src.req_access = list()
src.req_access += pick(get_all_main_access())
src.req_access += pick(get_access(ACCESS_LIST_MARINE_MAIN))
..()


Expand Down
6 changes: 3 additions & 3 deletions code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@

/client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list)
set category = null
set name = "Grant Full Access"
set name = "Grant Global Access"

if(!check_rights(R_DEBUG|R_ADMIN))
return
Expand All @@ -220,7 +220,7 @@
else
var/obj/item/card/id/id = new/obj/item/card/id(M);
id.icon_state = "gold"
id:access = get_all_main_access()
id:access = get_access(ACCESS_LIST_GLOBAL)
id.registered_name = H.real_name
id.registered_ref = WEAKREF(H)
id.assignment = "Captain"
Expand All @@ -230,7 +230,7 @@
else
alert("Invalid mob")

message_admins("[key_name_admin(usr)] has granted [M.key] full access.")
message_admins("[key_name_admin(usr)] has granted [M.key] global access.")

/client/proc/cmd_admin_grantallskills(mob/M in GLOB.mob_list)
set category = null
Expand Down
4 changes: 2 additions & 2 deletions code/modules/cm_marines/marines_consoles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<u>Access:</u><br>
"}

var/known_access_rights = get_all_main_access()
var/known_access_rights = get_access(ACCESS_LIST_MARINE_ALL)
for(var/A in target_id_card.access)
if(A in known_access_rights)
contents += " [get_access_desc(A)]"
Expand Down Expand Up @@ -205,7 +205,7 @@
visible_message("[SPAN_BOLD("[src]")] states, \"DATA ERROR: Can not find next entry in database: [target]\"")
return
new_access = job.get_access()
target_id_card.access -= get_access(ACCESS_LIST_WY_ALL) + get_all_main_access()
target_id_card.access -= get_access(ACCESS_LIST_WY_ALL) + get_access(ACCESS_LIST_MARINE_MAIN)
target_id_card.access |= new_access
target_id_card.assignment = target
target_id_card.rank = target
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/clf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/datum/equipment_preset/clf/New()
. = ..()
access = get_access(ACCESS_LIST_CLF_ALL)
access = get_access(ACCESS_LIST_CLF_ALL) //ACCESS_COME_BACK_TO_ME

/datum/equipment_preset/clf/load_name(mob/living/carbon/human/new_human, randomise)
new_human.gender = pick(60;MALE, 40;FEMALE)
Expand Down
50 changes: 2 additions & 48 deletions code/modules/gear_presets/contractor.dm
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
/datum/equipment_preset/contractor
name = "Military Contractor"

assignment = "VAI Mercenary"
rank = JOB_CONTRACTOR
idtype = /obj/item/card/id/data
faction = FACTION_CONTRACTOR

/datum/equipment_preset/contractor/New()
. = ..()
access = get_all_main_access()

/datum/equipment_preset/contractor/load_name(mob/living/carbon/human/new_human, randomise)
new_human.gender = pick(80;MALE,20;FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance(new_human)
var/random_name
var/static/list/colors = list("BLACK" = list(15, 15, 25), "BROWN" = list(102, 51, 0), "AUBURN" = list(139, 62, 19))
var/static/list/hair_colors = colors.Copy() + list("BLONDE" = list(197, 164, 30), "CARROT" = list(174, 69, 42))
var/hair_color = pick(hair_colors)
new_human.r_hair = hair_colors[hair_color][1]
new_human.g_hair = hair_colors[hair_color][2]
new_human.b_hair = hair_colors[hair_color][3]
new_human.r_facial = hair_colors[hair_color][1]
new_human.g_facial = hair_colors[hair_color][2]
new_human.b_facial = hair_colors[hair_color][3]
var/eye_color = pick(colors)
new_human.r_eyes = colors[eye_color][1]
new_human.g_eyes = colors[eye_color][2]
new_human.b_eyes = colors[eye_color][3]
idtype = /obj/item/card/id/data
if(new_human.gender == MALE)
random_name = "[pick(first_names_male)] [pick(last_names)]"
new_human.h_style = pick("Crewcut", "Shaved Head", "Buzzcut", "Undercut", "Side Undercut", "Pvt. Joker", "Marine Fade", "Low Fade", "Medium Fade", "High Fade", "No Fade", "Coffee House Cut", "Flat Top",)
new_human.f_style = pick("5 O'clock Shadow", "Shaved", "Full Beard", "3 O'clock Moustache", "5 O'clock Shadow", "5 O'clock Moustache", "7 O'clock Shadow", "7 O'clock Moustache",)
else
random_name = "[pick(first_names_female)] [pick(last_names)]"
new_human.h_style = pick("Ponytail 1", "Ponytail 2", "Ponytail 3", "Ponytail 4", "Pvt. Redding", "Pvt. Clarison", "Cpl. Dietrich", "Pvt. Vasquez", "Marine Bun", "Marine Bun 2", "Marine Flat Top",)
new_human.change_real_name(new_human, random_name)
new_human.age = rand(20,45)
new_human.r_hair = rand(15,35)
new_human.g_hair = rand(15,35)
new_human.b_hair = rand(25,45)

//*****************************************************************************************************/

/datum/equipment_preset/contractor
name = "Military Contractor"
faction = FACTION_CONTRACTOR
Expand All @@ -57,10 +11,10 @@

/datum/equipment_preset/contractor/New()
. = ..()
access = get_all_main_access()
access = get_access(ACCESS_LIST_EMERGENCY_RESPONSE)


/datum/equipment_preset/dust_raider/load_name(mob/living/carbon/human/new_human)
/datum/equipment_preset/contractor/load_name(mob/living/carbon/human/new_human)
new_human.gender = pick(60;MALE,40;FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance(new_human)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/corpses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
/datum/equipment_preset/corpse/clown/New()
. = ..()
//As a joke, clown has all access so they can clown everywhere...
access = get_all_main_access()
access = get_access(ACCESS_LIST_DELIVERY)

/datum/equipment_preset/corpse/clown/load_name(mob/living/carbon/human/new_human, randomise)
. = ..() //To load gender, randomise appearance, etc.
Expand Down
6 changes: 3 additions & 3 deletions code/modules/gear_presets/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/datum/equipment_preset/other/freelancer/New()
. = ..()
access = get_all_main_access()
access = get_access(ACCESS_LIST_EMERGENCY_RESPONSE) //ACCESS_COME_BACK_TO_ME

/datum/equipment_preset/other/freelancer/load_name(mob/living/carbon/human/new_human, randomise)
new_human.gender = pick(60;MALE,40;FEMALE)
Expand Down Expand Up @@ -247,7 +247,7 @@

/datum/equipment_preset/other/elite_merc/New()
. = ..()
access = get_all_main_access()
access = get_access(ACCESS_LIST_EMERGENCY_RESPONSE) //ACCESS_COME_BACK_TO_ME

/datum/equipment_preset/other/elite_merc/load_name(mob/living/carbon/human/new_human, randomise)
new_human.gender = pick(70;MALE,30;FEMALE)
Expand Down Expand Up @@ -512,7 +512,7 @@

/datum/equipment_preset/other/business_person/New()
. = ..()
access = get_all_main_access()
access = get_access(ACCESS_LIST_CIVIL_LIAISON)

/datum/equipment_preset/other/business_person/load_gear(mob/living/carbon/human/new_human)
//TODO: add backpacks and satchels
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/datum/equipment_preset/upp/New()
. = ..()
access = get_access(ACCESS_LIST_UPP_ALL)
access = get_access(ACCESS_LIST_UPP_ALL) //ACCESS_COME_BACK_TO_ME

/datum/equipment_preset/upp/load_name(mob/living/carbon/human/new_human, randomise)
new_human.gender = pick(60;MALE,40;FEMALE)
Expand Down

0 comments on commit d122a6b

Please sign in to comment.