Skip to content

Commit

Permalink
access changes
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 21, 2023
1 parent d4e486e commit e85fe2b
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 22 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ most of them are tied into map-placed objects. This should be reworked in the fu
#define ACCESS_MARINE_ASO 37
#define ACCESS_MARINE_CHAPLAIN 38

#define ACCESS_SQUAD_ONE 39
#define ACCESS_SQUAD_TWO 40

// AI Core Accesses
/// Used in temporary passes
#define ACCESS_MARINE_AI_TEMP 90
Expand Down
10 changes: 10 additions & 0 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,13 @@
to_chat(H, FONT_SIZE_HUGE(SPAN_BLUE("You were assigned to [fireteam].")))
H.hud_set_squad()

// I'm not fixing how cursed these strings are, god save us all if someone (or me (https://i.imgur.com/nSy81Bn.png)) has to change these again
if(H.wear_id)
if(fireteam == "SQ1")
H.wear_id.access += ACCESS_SQUAD_ONE
if(fireteam == "SQ2")
H.wear_id.access += ACCESS_SQUAD_TWO

/datum/squad/proc/unassign_fireteam(mob/living/carbon/human/H, upd_ui = TRUE)
fireteams[H.assigned_fireteam].Remove(H)
var/ft = H.assigned_fireteam
Expand All @@ -722,6 +729,9 @@
to_chat(H, FONT_SIZE_HUGE(SPAN_BLUE("You were unassigned from [ft].")))
H.hud_set_squad()

if(H.wear_id)
H.wear_id.access.Remove(ACCESS_SQUAD_ONE, ACCESS_SQUAD_TWO)

/datum/squad/proc/assign_ft_leader(fireteam, mob/living/carbon/human/H, upd_ui = TRUE)
if(fireteam_leaders[fireteam])
unassign_ft_leader(fireteam, FALSE, FALSE)
Expand Down
6 changes: 5 additions & 1 deletion code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
desc = "A slice of encoded compressed fiber glass. Used for identification and access control."
icon_state = "id"
item_state = "card-id"
var/access = list()
var/list/access
var/faction = FACTION_NEUTRAL
var/list/faction_group

Expand Down Expand Up @@ -92,6 +92,10 @@

var/modification_log = list()

/obj/item/card/id/Initialize(mapload, ...)
. = ..()

access = list()

/obj/item/card/id/Destroy()
. = ..()
Expand Down
85 changes: 64 additions & 21 deletions maps/map_files/golden_arrow/golden_arrow.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@
/obj/item/prop/magazine/boots/n054{
pixel_x = 29
},
/obj/structure/closet/secure_closet/smartgunner,
/obj/structure/closet/secure_closet/smartgunner{
req_access_txt = "14;40";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -379,7 +382,8 @@
"cS" = (
/obj/structure/machinery/door/airlock/almayer/medical{
name = "\improper Platoon Medic Office";
req_one_access = list()
req_one_access = list();
req_one_access_txt = "8"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -725,7 +729,8 @@
/obj/structure/machinery/door/airlock/almayer/medical{
dir = 1;
name = "\improper Medical Subsection";
req_one_access = list()
req_one_access = list();
req_one_access_txt = "8"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -1419,7 +1424,10 @@
/area/almayer/squads/alpha/platoon_sergeant)
"lW" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/machinery/cm_vending/sorted/cargo_guns/squad,
/obj/structure/machinery/cm_vending/sorted/cargo_guns/squad{
req_one_access_txt = "12;40";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand All @@ -1438,7 +1446,8 @@
"me" = (
/obj/structure/machinery/door/airlock/almayer/command/reinforced{
dir = 1;
name = "\improper Briefing Room"
name = "\improper Briefing Room";
req_access = list()
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -1493,7 +1502,9 @@
},
/area/almayer/hallways/hangar)
"mD" = (
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic{
req_one_access_txt = "1;12;39"
},
/obj/structure/pipes/standard/simple/hidden/supply{
dir = 4
},
Expand Down Expand Up @@ -1527,7 +1538,8 @@
/area/almayer/living/cryo_cells)
"nb" = (
/obj/structure/machinery/door/airlock/multi_tile/almayer/generic{
name = "\improper Squad Two Armoury"
name = "\improper Squad Two Armoury";
req_one_access_txt = "12;40"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -2697,7 +2709,8 @@
"wV" = (
/obj/structure/machinery/door/airlock/almayer/generic{
dir = 1;
name = "\improper Platoon Sergeants Bunk"
name = "\improper Platoon Sergeants Bunk";
req_one_access_txt = "12"
},
/obj/structure/pipes/standard/simple/hidden/supply,
/turf/open/floor/almayer{
Expand Down Expand Up @@ -2796,7 +2809,10 @@
/area/almayer/living/grunt_rnr)
"xZ" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep,
/obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep{
req_one_access_txt = "12;40";
req_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -2848,7 +2864,10 @@
/area/almayer/living/grunt_rnr)
"yA" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/closet/secure_closet/squad_sergeant,
/obj/structure/closet/secure_closet/squad_sergeant{
req_access_txt = "32;39";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -3064,7 +3083,9 @@
},
/area/almayer/hallways/hangar)
"AH" = (
/obj/structure/closet/secure_closet/engineering_welding,
/obj/structure/closet/secure_closet/engineering_welding{
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "cargo"
},
Expand Down Expand Up @@ -3322,7 +3343,8 @@
/area/almayer/living/cafeteria_port)
"Cu" = (
/obj/structure/machinery/door/airlock/multi_tile/almayer/generic{
name = "\improper Sergeants Room"
name = "\improper Sergeants Room";
req_one_access_txt = "12;32"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -3769,7 +3791,9 @@
/area/almayer/squads/alpha/squad_two)
"Fz" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/machinery/cm_vending/sorted/tech/electronics_storage,
/obj/structure/machinery/cm_vending/sorted/tech/electronics_storage{
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "cargo"
},
Expand Down Expand Up @@ -3995,7 +4019,10 @@
/area/almayer/hallways/hangar)
"GP" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep,
/obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep{
req_one_access_txt = "12;39";
req_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -4054,7 +4081,9 @@
/obj/structure/pipes/standard/simple/hidden/supply{
dir = 4
},
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic{
req_one_access_txt = "1;12;40"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
},
Expand Down Expand Up @@ -4197,7 +4226,9 @@
/area/almayer/squads/alpha/squad_two)
"IN" = (
/obj/effect/decal/cleanable/blood/oil,
/obj/structure/machinery/cm_vending/sorted/tech/comp_storage,
/obj/structure/machinery/cm_vending/sorted/tech/comp_storage{
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "cargo"
},
Expand Down Expand Up @@ -5029,7 +5060,8 @@
/area/almayer/squads/alpha/squad_two)
"Pp" = (
/obj/structure/machinery/door/airlock/multi_tile/almayer/generic{
name = "\improper Squad One Armoury"
name = "\improper Squad One Armoury";
req_one_access_txt = "12;39"
},
/obj/structure/pipes/standard/simple/hidden/supply,
/turf/open/floor/almayer{
Expand Down Expand Up @@ -5102,7 +5134,9 @@
/area/almayer/squads/alpha/platoon_sergeant)
"PW" = (
/obj/structure/machinery/door/airlock/almayer/command/reinforced{
name = "\improper Private Briefing Room"
name = "\improper Private Briefing Room";
req_access = list();
req_one_access_txt = "12;19;32"
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
Expand Down Expand Up @@ -5349,7 +5383,10 @@
},
/area/almayer/squads/alpha/platoon_sergeant)
"Rj" = (
/obj/structure/machinery/cm_vending/sorted/cargo_guns/squad,
/obj/structure/machinery/cm_vending/sorted/cargo_guns/squad{
req_one_access_txt = "12;39";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -5422,7 +5459,10 @@
/area/almayer/living/cryo_cells)
"RO" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/closet/secure_closet/squad_sergeant,
/obj/structure/closet/secure_closet/squad_sergeant{
req_access_txt = "32;40";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down Expand Up @@ -5998,7 +6038,10 @@
/area/almayer/hallways/hangar)
"VK" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/closet/secure_closet/smartgunner,
/obj/structure/closet/secure_closet/smartgunner{
req_access_txt = "14;39";
req_one_access = list()
},
/turf/open/floor/almayer{
icon_state = "plate"
},
Expand Down

0 comments on commit e85fe2b

Please sign in to comment.