Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cmss13-devs/cmss13 into c…
Browse files Browse the repository at this point in the history
…odecov
  • Loading branch information
johndoe2013 committed Jun 17, 2024
2 parents 7fddc8f + 73f6430 commit be283d1
Show file tree
Hide file tree
Showing 56 changed files with 440 additions and 270 deletions.
8 changes: 4 additions & 4 deletions code/datums/medal_awards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_ME
return TRUE

/proc/open_medal_panel(mob/living/carbon/human/user, obj/printer)
var/obj/item/card/id/card = user.wear_id
var/obj/item/card/id/card = user?.get_idcard()
if(!card)
to_chat(user, SPAN_WARNING("You must have an authenticated ID Card to award medals."))
return
Expand Down Expand Up @@ -580,9 +580,9 @@ GLOBAL_DATUM_INIT(ic_medals_panel, /datum/ic_medal_panel, new)
. = ..()
if(.)
return
var/mob/living/carbon/human/user = usr
var/obj/item/card/id/card = user.wear_id
if(!card)
var/mob/living/carbon/human/user = ui.user
var/obj/item/card/id/card = user?.get_idcard()
if(card)
to_chat(user, SPAN_WARNING("You must have an authenticated ID Card to award medals."))
return

Expand Down
3 changes: 2 additions & 1 deletion code/defines/procs/announcement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
continue

// If they have iff AND a marine headset they will recieve announcements
if ((FACTION_MARINE in H.wear_id?.faction_group) && (istype(H.wear_l_ear, /obj/item/device/radio/headset/almayer) || istype(H.wear_r_ear, /obj/item/device/radio/headset/almayer)))
var/obj/item/card/id/card = H.get_idcard()
if ((FACTION_MARINE in card?.faction_group) && (istype(H.wear_l_ear, /obj/item/device/radio/headset/almayer) || istype(H.wear_r_ear, /obj/item/device/radio/headset/almayer)))
continue

if((H.faction != faction_to_display && !add_PMCs) || (H.faction != faction_to_display && add_PMCs && !(H.faction in FACTION_LIST_WY)) && !(faction_to_display in H.faction_group)) //faction checks
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
var/datum/money_account/generated_account
//Give them an account in the database.
if(!(flags_startup_parameters & ROLE_NO_ACCOUNT))
var/obj/item/card/id/card = account_user.wear_id
var/obj/item/card/id/card = account_user.get_idcard()
var/user_has_preexisting_account = account_user.mind?.initial_account
if(card && !user_has_preexisting_account)
var/datum/paygrade/account_paygrade = GLOB.paygrades[card.paygrade]
Expand Down
10 changes: 5 additions & 5 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@

var/obj/item/card/id/C = ID
if(!C)
C = M.wear_id
C = M.get_idcard()
if(!C)
C = M.get_active_hand()
if(!istype(C))
Expand Down Expand Up @@ -554,7 +554,7 @@
return //not assigned to the correct squad
var/obj/item/card/id/C = ID
if(!istype(C))
C = M.wear_id
C = M.get_idcard()
if(!istype(C))
return FALSE //Abort, no ID found

Expand Down Expand Up @@ -637,9 +637,9 @@
R.keys -= key
qdel(key)
R.recalculateChannels()
if(istype(old_lead.wear_id, /obj/item/card/id))
var/obj/item/card/id/ID = old_lead.wear_id
ID.access -= ACCESS_MARINE_LEADER
var/obj/item/card/id/card = old_lead.get_idcard()
if(card)
card.access -= ACCESS_MARINE_LEADER
REMOVE_TRAITS_IN(old_lead, TRAIT_SOURCE_SQUAD_LEADER)
old_lead.hud_set_squad()
old_lead.update_inv_head() //updating marine helmet leader overlays
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else if(operator.wear_id)
idcard = operator.wear_id
if(istype(idcard))
idcard = operator.get_idcard()
if(idcard)
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/ARES/ARES_interface_apollo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else if(user.wear_id)
idcard = user.wear_id
if(istype(idcard))
idcard = user.get_idcard()
if(idcard)
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else
Expand Down Expand Up @@ -317,8 +317,8 @@
if(istype(idcard))
has_id = TRUE
else if(user.wear_id)
idcard = user.wear_id
if(istype(idcard))
idcard = user.get_idcard()
if(idcard)
has_id = TRUE
if(!has_id)
to_chat(user, SPAN_WARNING("You require an ID card to request an access ticket!"))
Expand Down
11 changes: 5 additions & 6 deletions code/game/machinery/ARES/ARES_step_triggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
return FALSE
if(ishuman(passer))
var/mob/living/carbon/human/trespasser = passer
if(pass_accesses && (trespasser.wear_id))
var/obj/item/card/id/card = trespasser.get_idcard()
if(pass_accesses && card)
for(var/tag in pass_accesses)
if(tag in trespasser.wear_id.access)
if(tag in card.access)
return FALSE
Trigger(passer)
return TRUE
Expand Down Expand Up @@ -123,11 +124,9 @@
var/check_contents = TRUE
if(ishuman(passer))
var/mob/living/carbon/human/human_passer = passer
idcard = human_passer.wear_id
if(istype(idcard))
idcard = human_passer.get_idcard()
if(idcard)
check_contents = FALSE
else
idcard = null

if(istype(passer, /obj/item/card/id))
idcard = passer
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/ARES/apollo_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else if(user.wear_id)
idcard = user.wear_id
if(istype(idcard))
idcard = user.get_idcard()
if(idcard)
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else
Expand Down Expand Up @@ -343,8 +343,8 @@
if(istype(idcard))
has_id = TRUE
else if(user.wear_id)
idcard = user.wear_id
if(istype(idcard))
idcard = user.get_idcard()
if(idcard)
has_id = TRUE
if(!has_id)
to_chat(user, SPAN_WARNING("You require an ID card to request an access ticket!"))
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/computer/almayer_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
idcard = human_user.get_idcard()
if(!istype(idcard))
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
Expand Down Expand Up @@ -198,8 +198,8 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
if(!istype(idcard))
idcard = human_user.get_idcard()
if(!idcard)
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
bio_fail = TRUE
Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
if(ACCESS_MARINE_SENIOR in I.access)
authenticated = 2
else
I = C.wear_id
if(istype(I))
I = C.get_idcard()
if(I)
if(check_access(I)) authenticated = 1
if(ACCESS_MARINE_SENIOR in I.access)
authenticated = 2
Expand Down Expand Up @@ -117,8 +117,8 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
if(!istype(idcard))
idcard = human_user.get_idcard()
if(idcard)
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
bio_fail = TRUE
Expand Down Expand Up @@ -171,8 +171,8 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
if(!istype(idcard))
idcard = human_user.get_idcard()
if(!idcard)
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
bio_fail = TRUE
Expand Down
3 changes: 2 additions & 1 deletion code/game/machinery/computer/dropship_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@
. = list()
var/datum/cas_iff_group/cas_group = GLOB.cas_groups[faction]
for(var/datum/cas_signal/LT as anything in cas_group.cas_signals)
if(!istype(LT) || !LT.valid_signal())
var/obj/object = LT.signal_loc
if(!istype(LT) || !LT.valid_signal() || !is_ground_level(object.z))
continue
var/area/laser_area = get_area(LT.signal_loc)
. += list(
Expand Down
19 changes: 9 additions & 10 deletions code/game/machinery/computer/groundside_operations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,11 @@
if(A)
area_name = sanitize_area(A.name)

var/obj/item/card/id/card = H.get_idcard()
if(H.job)
role = H.job
else if(istype(H.wear_id, /obj/item/card/id)) //decapitated marine is mindless,
var/obj/item/card/id/ID = H.wear_id //we use their ID to get their role.
if(ID.rank)
role = ID.rank
else if(card?.rank) //decapitated marine is mindless,
role = card.rank

switch(H.stat)
if(CONSCIOUS)
Expand Down Expand Up @@ -216,8 +215,8 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
if(!istype(idcard))
idcard = human_user.get_idcard()
if(!idcard)
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
bio_fail = TRUE
Expand All @@ -244,8 +243,8 @@
var/signed = null
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/obj/item/card/id/id = H.wear_id
if(istype(id))
var/obj/item/card/id/id = H.get_idcard()
if(id)
var/paygrade = get_paygrades(id.paygrade, FALSE, H.gender)
signed = "[paygrade] [id.registered_name]"

Expand Down Expand Up @@ -322,8 +321,8 @@
var/obj/item/card/id/idcard = human_user.get_active_hand()
var/bio_fail = FALSE
if(!istype(idcard))
idcard = human_user.wear_id
if(!istype(idcard))
idcard = human_user.get_idcard()
if(!idcard)
bio_fail = TRUE
else if(!idcard.check_biometrics(human_user))
bio_fail = TRUE
Expand Down
5 changes: 5 additions & 0 deletions code/game/machinery/cryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
var/is_on = on && operable()
icon_state = "[icon_state]-[is_on ? "on" : "off"]-[occupant ? "occupied" : "empty"]"

/obj/structure/machinery/cryo_cell/Destroy()
if(occupant)
go_out()
. = ..()

/obj/structure/machinery/cryo_cell/proc/process_occupant()
if(!occupant)
return
Expand Down
17 changes: 9 additions & 8 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ GLOBAL_LIST_EMPTY(vending_products)
to_chat(user, SPAN_WARNING("That set is already taken."))
vend_fail()
return FALSE
var/obj/item/card/id/ID = human_user.wear_id
if(!istype(ID) || !ID.check_biometrics(user))
var/obj/item/card/id/card = human_user.get_idcard()
if(!card?.check_biometrics(user))
to_chat(user, SPAN_WARNING("You must be wearing your [SPAN_INFO("dog tags")] to select a specialization!"))
return FALSE
var/specialist_assignment
Expand Down Expand Up @@ -604,8 +604,8 @@ GLOBAL_LIST_EMPTY(vending_products)
to_chat(user, SPAN_WARNING("<b>Something bad occurred with [src], tell a Dev.</b>"))
vend_fail()
return FALSE
ID.set_assignment((human_user.assigned_squad ? (human_user.assigned_squad.name + " ") : "") + JOB_SQUAD_SPECIALIST + " ([specialist_assignment])")
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), ID.assignment)
card.set_assignment((human_user.assigned_squad ? (human_user.assigned_squad.name + " ") : "") + JOB_SQUAD_SPECIALIST + " ([specialist_assignment])")
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), card.assignment)
GLOB.available_specialist_sets -= p_name
else if(vendor_role.Find(JOB_SYNTH))
if(user.job != JOB_SYNTH)
Expand Down Expand Up @@ -807,8 +807,8 @@ GLOBAL_LIST_EMPTY(vending_products)
return FALSE

var/mob/living/carbon/human/human_user = user
var/obj/item/card/id/idcard = human_user.wear_id
if(!istype(idcard))
var/obj/item/card/id/idcard = human_user.get_idcard()
if(!idcard)
if(display)
to_chat(user, SPAN_WARNING("Access denied. No ID card detected"))
vend_fail()
Expand Down Expand Up @@ -1406,10 +1406,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
if(vend_flags & VEND_UNIFORM_RANKS)
if(insignas_override)
var/obj/item/clothing/under/underclothes = new_item
var/obj/item/card/id/card = user.get_idcard()

//Gives ranks to the ranked
if(istype(underclothes) && user.wear_id && user.wear_id.paygrade)
var/rankpath = get_rank_pins(user.wear_id.paygrade)
if(istype(underclothes) && card?.paygrade)
var/rankpath = get_rank_pins(card.paygrade)
if(rankpath)
var/obj/item/clothing/accessory/ranks/rank_insignia = new rankpath()
var/obj/item/clothing/accessory/patch/uscmpatch = new()
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
desc = "An automated gear rack hooked up to a colossal storage of various medical and engineering supplies. Can be accessed only by synthetic units."
icon_state = "gear"
req_access = list(ACCESS_MARINE_SYNTH)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR, JOB_UPP_SUPPORT_SYNTH, JOB_CMB_SYN, JOB_PMC_SYNTH)

listed_products = list(
list("ENGINEER SUPPLIES", 0, null, null, null),
Expand Down Expand Up @@ -178,7 +178,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth, list(
name = "\improper ColMarTech Synthetic Equipment Rack"
desc = "An automated rack hooked up to a colossal storage of various equipment. Can be accessed only by synthetic units."
req_access = list(ACCESS_MARINE_SYNTH)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR, JOB_UPP_SUPPORT_SYNTH, JOB_CMB_SYN, JOB_PMC_SYNTH)

/obj/structure/machinery/cm_vending/clothing/synth/get_listed_products(mob/user)
return GLOB.cm_vending_clothing_synth
Expand Down Expand Up @@ -337,7 +337,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list(
use_snowflake_points = TRUE
vendor_theme = VENDOR_THEME_COMPANY
req_access = list(ACCESS_MARINE_SYNTH)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR, JOB_WORKING_JOE)
vendor_role = list(JOB_SYNTH, JOB_SYNTH_SURVIVOR, JOB_WORKING_JOE, JOB_UPP_SUPPORT_SYNTH, JOB_CMB_SYN, JOB_PMC_SYNTH)

vend_delay = 1 SECONDS

Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/vending/vendor_types/dress.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
return

var/mob/living/carbon/human/H = user
var/obj/item/card/id/id_card = H.wear_id
var/obj/item/card/id/id_card = H.get_idcard()
var/list/role_specific_uniforms
var/list/vended_items
var/list/display_list = list()
if(istype(id_card))
if(id_card)
role_specific_uniforms = id_card.uniform_sets
vended_items = id_card.vended_items
for(var/category_type in GLOB.uniform_categories)
Expand Down Expand Up @@ -83,9 +83,9 @@
/obj/structure/machinery/cm_vending/clothing/dress/ui_data(mob/user)

var/mob/living/carbon/human/H = user
var/obj/item/card/id/id_card = H.wear_id
var/obj/item/card/id/id_card = H.get_idcard()
var/list/vended_items
if(istype(id_card))
if(id_card)
vended_items = id_card.vended_items

var/list/data = list()
Expand Down Expand Up @@ -120,9 +120,9 @@

var/item_path = L[3]

var/obj/item/card/id/id_card = H.wear_id
var/obj/item/card/id/id_card = H.get_idcard()

if(!istype(id_card)) //not wearing an ID
if(!id_card) //not wearing an ID
to_chat(H, SPAN_WARNING("Access denied. No ID card detected"))
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list(
GLOBAL_LIST_INIT(cm_vending_clothing_medic, list(
list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null),
list("Standard Marine Apparel", 0, list(/obj/item/clothing/under/marine/medic, /obj/item/clothing/shoes/marine/knife, /obj/item/clothing/gloves/marine, /obj/item/device/radio/headset/almayer/marine, /obj/item/clothing/head/helmet/marine/medic), MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY),
list("Combat Sterile Gloves", 0, /obj/item/clothing/gloves/marine/medical, MARINE_CAN_BUY_KIT, VENDOR_ITEM_REGULAR),
list("Combat Sterile Gloves", 0, /obj/item/clothing/gloves/marine/medical, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_REGULAR),
list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY),
list("Map", 0, /obj/item/map/current_map, MARINE_CAN_BUY_KIT, VENDOR_ITEM_MANDATORY),

Expand Down
Loading

0 comments on commit be283d1

Please sign in to comment.