Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vox spawn with correct tank/mask pref #22827

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
if(outfit_override || outfit)
H.equipOutfit(outfit_override ? outfit_override : outfit, visualsOnly)

H.dna.species.after_equip_job(src, H, visualsOnly)
H.dna.species.after_equip_job(src, H, preference_source)

if(!visualsOnly && announce)
announce(H)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
/datum/species/proc/before_equip_job(datum/job/J, mob/living/carbon/human/H)
return

/datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H)
/datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H, client/preference_source)
H.update_mutant_bodyparts()

// Do species-specific reagent handling here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@
soon_added_items += pick(possible_masks)
..()

/datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE) // Don't forget your voxygen tank
/datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H, client/preference_source) // Don't forget your voxygen tank
if(!H.can_breathe_mask())
var/obj/item/clothing/mask/current_mask = H.get_item_by_slot(ITEM_SLOT_MASK)
if(!H.equip_to_slot_if_possible(current_mask, ITEM_SLOT_BACKPACK, disable_warning = TRUE))
H.put_in_hands(current_mask)
var/obj/item/clothing/mask/vox_mask
var/mask_pref = H.client?.prefs?.read_preference(/datum/preference/choiced/vox_mask)
var/mask_pref = preference_source?.prefs?.read_preference(/datum/preference/choiced/vox_mask)
if(mask_pref == "Respirator")
vox_mask = new /obj/item/clothing/mask/breath/vox/respirator
else
vox_mask = new /obj/item/clothing/mask/breath/vox
H.equip_to_slot_or_del(vox_mask, ITEM_SLOT_MASK)
var/obj/item/tank/internals_tank
var/tank_pref = H.client?.prefs?.read_preference(/datum/preference/choiced/vox_tank_type)
var/tank_pref = preference_source?.prefs?.read_preference(/datum/preference/choiced/vox_tank_type)
if(tank_pref == "Large")
internals_tank = new /obj/item/tank/internals/nitrogen
else
Expand Down
Loading