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

[BOUNTY] Port Skyrat's feature to be able to play the character we want in a ghost role (using character loadouts #4783

Merged
merged 16 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 14 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
4 changes: 3 additions & 1 deletion code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
hardcore_quirks[quirk_type] += hardcore_value

// Monkestation edit - original: /datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/applied_client)
/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/applied_client, omit_negatives = FALSE, omit_positives = FALSE, omit_neutrals = FALSE)
/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/applied_client, omit_negatives = FALSE, omit_positives = FALSE, omit_neutrals = FALSE, list/blacklist = list())
var/badquirk = FALSE
for(var/quirk_name in applied_client?.prefs?.all_quirks)
var/datum/quirk/quirk_type = quirks[quirk_name]
Expand All @@ -91,6 +91,8 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
var/q_val = initial(quirk_type.value)
if (q_val == 0)
continue
if (quirk_type in blacklist)
continue
// monkestation end
if(user.add_quirk(quirk_type, override_client = applied_client))
SSblackbox.record_feedback("nested tally", "quirks_taken", 1, list("[quirk_name]"))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/quirks/_quirk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@

var/mob/living/carbon/human/human_holder = quirk_holder

var/where = human_holder.equip_in_one_of_slots(quirk_item, valid_slots, qdel_on_fail = FALSE) || default_location
var/where = human_holder.equip_in_one_of_slots(quirk_item, valid_slots, qdel_on_fail = FALSE, move_equipped = TRUE) || default_location //MONKESTATION EDIT - Added 'move_equipped = TRUE'

if(where == LOCATION_BACKPACK)
open_backpack = TRUE
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/pirate/pirate_roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
you_are_text = "You are a space pirate."
flavour_text = "The station refused to pay for your protection, protect the ship, siphon the credits from the station and raid it for even more loot."
spawner_job_path = /datum/job/space_pirate
random_appearance = TRUE
///Rank of the pirate on the ship, it's used in generating pirate names!
var/rank = "Deserter"
///Path of the structure we spawn after creating a pirate.
Expand Down
12 changes: 11 additions & 1 deletion code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,20 @@

//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
// Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
/mob/living/carbon/human/equip_to_slot(obj/item/I, slot, initial = FALSE, redraw_mob = FALSE)
/mob/living/carbon/human/equip_to_slot(obj/item/I, slot, initial = FALSE, redraw_mob = FALSE, move_equipped = FALSE) //MONKESTATION EDIT - Added 'move_equipped = FALSE'
if(!..()) //a check failed or the item has already found its slot
return

//MONKESTATION EDIT - Don't fucking nuke our items, please.
if(move_equipped)
var/obj/item/equipped = get_item_by_slot(slot)
if(equipped)
if(back.atom_storage?.can_insert(equipped, src, FALSE))
back.atom_storage?.attempt_insert(equipped, src)
else
doUnEquip(equipped, FALSE, get_turf(src))
//END OF EDIT

var/not_handled = FALSE //Added in case we make this type path deeper one day
switch(slot)
if(ITEM_SLOT_BELT)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
legcuffed,
)

/mob/living/carbon/proc/equip_in_one_of_slots(obj/item/I, list/slots, qdel_on_fail = 1)
/mob/living/carbon/proc/equip_in_one_of_slots(obj/item/I, list/slots, qdel_on_fail = 1, move_equipped = FALSE) //MONKESTATION EDIT - Added 'move_equipped = FALSE'
for(var/slot in slots)
if(equip_to_slot_if_possible(I, slots[slot], qdel_on_fail = 0, disable_warning = TRUE))
if(equip_to_slot_if_possible(I, slots[slot], qdel_on_fail = 0, disable_warning = TRUE, move_equipped = move_equipped)) //MONKESTATION EDIT - Added 'move_equipped = move_equipped'
return slot
if(qdel_on_fail)
qdel(I)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
*
* Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
*/
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE, initial = FALSE)
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE, initial = FALSE, move_equipped = FALSE) //MONKESTATION EDIT - Added 'move_equipped = FALSE'
if(!istype(W) || QDELETED(W)) //This qdeleted is to prevent stupid behavior with things that qdel during init, like say stacks
return FALSE
if(!W.mob_can_equip(src, slot, disable_warning, bypass_equip_delay_self))
Expand All @@ -434,7 +434,7 @@
else if(!disable_warning)
to_chat(src, span_warning("You are unable to equip that!"))
return FALSE
equip_to_slot(W, slot, initial, redraw_mob) //This proc should not ever fail.
equip_to_slot(W, slot, initial, redraw_mob, move_equipped) //This proc should not ever fail. //MONKESTATION EDIT - Added 'move_equipped'
return TRUE

/**
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob_spawn/ghost_roles/away_roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
you_are_text = "By unknown powers, your skeletal remains have been reanimated!"
flavour_text = "Walk this mortal plane and terrorize all living adventurers who dare cross your path."
spawner_job_path = /datum/job/skeleton
restricted_species = list(/datum/species/skeleton) //if you have a skelly species, on a halloween and this disabled gateway map spawns, I applaud you
loadout_enabled = FALSE
quirks_enabled = TRUE

/obj/effect/mob_spawn/ghost_role/human/skeleton/special(mob/living/new_spawn)
. = ..()
Expand All @@ -29,6 +32,9 @@
spawner_job_path = /datum/job/zombie
you_are_text = "By unknown powers, your rotting remains have been resurrected!"
flavour_text = "Walk this mortal plane and terrorize all living adventurers who dare cross your path."
restricted_species = list(/datum/species/zombie) //if you have a high-functioning zombie, on a halloween and this disabled gateway map spawns, I applaud you
loadout_enabled = FALSE
quirks_enabled = TRUE

/obj/effect/mob_spawn/ghost_role/human/zombie/special(mob/living/new_spawn)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
flavour_text = "Write me some god damn flavor text!" //the flavor text will be the backstory argument called on the antagonist's greet, see hunter.dm for details
show_flavor = FALSE
var/back_story = "error"
loadout_enabled = FALSE

/obj/effect/mob_spawn/ghost_role/human/fugitive/Initialize(mapload)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob_spawn/ghost_roles/golem_roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
var/can_transfer = TRUE
/// Weakref to the creator of this golem shell.
var/datum/weakref/owner_ref
random_appearance = TRUE

/obj/effect/mob_spawn/ghost_role/human/golem/Initialize(mapload, datum/species/golem/species, mob/creator)
if(creator)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob_spawn/ghost_roles/mining_roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
the hostile creatures, and the ash drakes swooping down from the cloudless skies, all you can wish for is the feel of soft grass between your toes and \
the fresh air of Earth. These thoughts are dispelled by yet another recollection of how you got here... "
spawner_job_path = /datum/job/hermit
loadout_enabled = FALSE

/obj/effect/mob_spawn/ghost_role/human/hermit/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -153,6 +154,7 @@
and eventually bring life to this desolate planet while waiting for contact from your creators. \
Estimated time of last contact: Deployment, 5000 millennia ago."
spawner_job_path = /datum/job/lifebringer
random_appearance = TRUE

/obj/effect/mob_spawn/ghost_role/human/seed_vault/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -220,6 +222,7 @@
spawner_job_path = /datum/job/ash_walker
var/datum/team/ashwalkers/team
var/obj/structure/ash_walker_eggshell/eggshell
random_appearance = TRUE

/obj/effect/mob_spawn/ghost_role/human/ash_walker/Destroy()
eggshell = null
Expand Down
56 changes: 53 additions & 3 deletions code/modules/mob_spawn/mob_spawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
faction = string_list(faction)

/// Creates whatever mob the spawner makes. Return FALSE if we want to exit from here without doing that, returning NULL will be logged to admins.
/obj/effect/mob_spawn/proc/create(mob/mob_possessor, newname)
/obj/effect/mob_spawn/proc/create(mob/mob_possessor, newname, is_pref_loaded)
var/mob/living/spawned_mob = new mob_type(get_turf(src)) //living mobs only
name_mob(spawned_mob, newname)
special(spawned_mob, mob_possessor)
equip(spawned_mob)
if(!is_pref_loaded)
equip(spawned_mob)
spawned_mob_ref = WEAKREF(spawned_mob)
return spawned_mob

Expand Down Expand Up @@ -139,6 +140,16 @@
/// Typepath indicating the kind of job datum this ghost role will have. PLEASE inherit this with a new job datum, it's not hard. jobs come with policy configs.
var/spawner_job_path = /datum/job/ghost_role

/// Do we use a random appearance for this ghost role?
var/random_appearance = TRUE
/// Can we use our loadout for this role?
var/loadout_enabled = FALSE
/// Can we use our quirks for this role?
var/quirks_enabled = FALSE
/// Are we limited to a certain species type? LISTED TYPE
var/restricted_species


/obj/effect/mob_spawn/ghost_role/Initialize(mapload)
. = ..()
SSpoints_of_interest.make_point_of_interest(src)
Expand All @@ -163,6 +174,12 @@
var/user_ckey = user.ckey // Just in case shenanigans happen, we always want to remove it from the list.
LAZYADD(ckeys_trying_to_spawn, user_ckey)

if(restricted_species && !(user.client?.prefs?.read_preference(/datum/preference/choiced/species) in restricted_species))
var/incorrect_species = tgui_alert(user, "Current species preference incompatible, proceed with random appearance?", "Incompatible Species", list("Yes", "No"))
if(incorrect_species != "Yes")
LAZYREMOVE(ckeys_trying_to_spawn, user_ckey)
return

if(prompt_ghost)
var/prompt = "Become [prompt_name]?"
if(user.can_reenter_corpse && user.mind)
Expand Down Expand Up @@ -231,8 +248,38 @@
if(!mob_possessor.key) // This is in the scenario that the server is somehow lagging, or someone fucked up their code, and we try to spawn the same person in twice. We'll simply not spawn anything and CRASH(), so that we report what happened.
CRASH("Attempted to create an instance of [type] with a mob that had no ckey attached to it, which isn't supported by ghost role spawners!")

return ..()
var/load_prefs = FALSE
//if we can load our own appearance and its not restricted, try
if(!random_appearance && mob_possessor?.client)
//if we have gotten to this point, they have already waived their species pref.-- they were told they need to use the specific species already
if((restricted_species && (mob_possessor?.client?.prefs?.read_preference(/datum/preference/choiced/species) in restricted_species)) || !restricted_species)
var/appearance_choice = tgui_alert(mob_possessor, "Use currently loaded character preferences?", "Appearance Type", list("Yes", "No"))
if(appearance_choice == "Yes")
load_prefs = TRUE

var/mob/living/carbon/human/spawned_human = ..(mob_possessor, newname, load_prefs)

if(!load_prefs)
var/datum/language_holder/holder = spawned_human.get_language_holder()
holder.get_selected_language() //we need this here so a language starts off selected

return spawned_human

spawned_human?.client?.prefs?.safe_transfer_prefs_to(spawned_human)
spawned_human.dna.update_dna_identity()
if(spawned_human.mind)
spawned_human.mind.name = spawned_human.real_name // the mind gets initialized with the random name given as a result of the parent create() so we need to readjust it
spawned_human.dna.species.give_important_for_life(spawned_human) // make sure they get plasmaman/vox internals etc before anything else

if(loadout_enabled)
spawned_human.equip_outfit_and_loadout(outfit, spawned_human.client.prefs)
else
equip(spawned_human)

if(quirks_enabled)
SSquirks.AssignQuirks(spawned_human, spawned_human.client, blacklist = list(/datum/quirk/stowaway)) //fok of, stowaway

return spawned_human

/obj/effect/mob_spawn/ghost_role/special(mob/living/spawned_mob, mob/mob_possessor)
. = ..()
Expand Down Expand Up @@ -306,6 +353,9 @@
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "sleeper"
mob_type = /mob/living/carbon/human
quirks_enabled = TRUE
random_appearance = FALSE
loadout_enabled = TRUE

/obj/effect/mob_spawn/corpse/human
icon_state = "corpsehuman"
Expand Down
14 changes: 12 additions & 2 deletions monkestation/code/modules/loadouts/items/_loadout_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(all_loadout_datums)
*/
/datum/loadout_item/proc/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(!visuals_only)
LAZYADD(outfit.backpack_contents, item_path)
spawn_in_backpack(outfit, item_path, equipper)

/*
* To be called before insert_path_into_outfit()
Expand All @@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(all_loadout_datums)
*/
/datum/loadout_item/proc/pre_equip_item(datum/outfit/outfit, datum/outfit/outfit_important_for_life, mob/living/carbon/human/equipper, visuals_only = FALSE)
if(!visuals_only)
LAZYADD(outfit.backpack_contents, item_path)
spawn_in_backpack(outfit, item_path, equipper)

/*
* Called When the item is equipped on [equipper].
Expand Down Expand Up @@ -128,3 +128,13 @@ GLOBAL_LIST_EMPTY(all_loadout_datums)
*/
/datum/loadout_item/proc/post_equip_item(datum/preferences/preference_source, mob/living/carbon/human/equipper)
return FALSE

/*
* quick check proc to try spawn in backpack else, spawn them on the floor
*/
/datum/loadout_item/proc/spawn_in_backpack(datum/outfit/outfit_contents, item_path_to_spawn, mob/living/carbon/human/equipper)
if(ispath(outfit_contents.back, /obj/item/storage) || (!outfit_contents.back && (ispath(equipper.back, /obj/item/storage) || !isnull(equipper.backpack))))
LAZYADD(outfit_contents.backpack_contents, item_path_to_spawn)
else
var/obj/item/new_item = new item_path_to_spawn()
new_item.loc = get_turf(equipper)
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_accessory, generate_loadout_items(/datum/loadout_item/a
/datum/loadout_item/accessory/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.accessory)
LAZYADD(outfit.backpack_contents, outfit.accessory)
spawn_in_backpack(outfit, outfit.accessory, equipper)
outfit.accessory = item_path
else
outfit.accessory = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/belts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(loadout_belts, generate_loadout_items(/datum/loadout_item/belts
/datum/loadout_item/belts/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.belt)
LAZYADD(outfit.backpack_contents, outfit.belt)
spawn_in_backpack(outfit, outfit.belt, equipper)
outfit.belt = item_path
else
outfit.belt = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/ears.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_ears, generate_loadout_items(/datum/loadout_item/ears))
/datum/loadout_item/ears/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.ears)
LAZYADD(outfit.backpack_contents, outfit.ears)
spawn_in_backpack(outfit, outfit.ears, equipper)
outfit.ears = item_path
else
outfit.ears = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/glasses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_glasses, generate_loadout_items(/datum/loadout_item/gla
/datum/loadout_item/glasses/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.glasses)
LAZYADD(outfit.backpack_contents, outfit.glasses)
spawn_in_backpack(outfit, outfit.glasses, equipper)
outfit.glasses = item_path
else
outfit.glasses = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_gloves, generate_loadout_items(/datum/loadout_item/glov
/datum/loadout_item/gloves/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.gloves)
LAZYADD(outfit.backpack_contents, outfit.gloves)
spawn_in_backpack(outfit, outfit.gloves, equipper)
outfit.gloves = item_path
else
outfit.gloves = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/heads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_helmets, generate_loadout_items(/datum/loadout_item/hea
/datum/loadout_item/head/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.head)
LAZYADD(outfit.backpack_contents, outfit.head)
spawn_in_backpack(outfit, outfit.head, equipper)
outfit.head = item_path
else
outfit.head = item_path
Expand Down
4 changes: 2 additions & 2 deletions monkestation/code/modules/loadouts/items/inhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ GLOBAL_LIST_INIT(loadout_inhand_items, generate_loadout_items(/datum/loadout_ite
// if no hands are available then put in backpack
if(initial(outfit_important_for_life.r_hand) && initial(outfit_important_for_life.l_hand))
if(!visuals_only)
LAZYADD(outfit.backpack_contents, item_path)
spawn_in_backpack(outfit, item_path, equipper)
return TRUE

/datum/loadout_item/inhand/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(outfit.l_hand && !outfit.r_hand)
outfit.r_hand = item_path
else
if(outfit.l_hand)
LAZYADD(outfit.backpack_contents, outfit.l_hand)
spawn_in_backpack(outfit, outfit.l_hand, equipper)
outfit.l_hand = item_path

/datum/loadout_item/inhand/cane
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/masks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_masks, generate_loadout_items(/datum/loadout_item/mask)
/datum/loadout_item/mask/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.mask)
LAZYADD(outfit.backpack_contents, outfit.mask)
spawn_in_backpack(outfit, outfit.mask, equipper)
outfit.mask = item_path
else
outfit.mask = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/neck.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_necks, generate_loadout_items(/datum/loadout_item/neck)
/datum/loadout_item/neck/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK)
if(outfit.neck)
LAZYADD(outfit.backpack_contents, outfit.neck && !visuals_only)
spawn_in_backpack(outfit, outfit.neck && !visuals_only, equipper)
outfit.neck = item_path
else
outfit.neck = item_path
Expand Down
4 changes: 2 additions & 2 deletions monkestation/code/modules/loadouts/items/shoes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_LIST_INIT(loadout_shoes, generate_loadout_items(/datum/loadout_item/shoes
/datum/loadout_item/shoes/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.shoes)
LAZYADD(outfit.backpack_contents, outfit.shoes)
spawn_in_backpack(outfit, outfit.shoes, equipper)
outfit.shoes = item_path
else
outfit.shoes = item_path
Expand All @@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(loadout_shoes, generate_loadout_items(/datum/loadout_item/shoes
/datum/loadout_item/shoes/swat_replica
name = "Combat boots"
item_path = /obj/item/clothing/shoes/combat/swat_replica

/*
* MISC BOOTS
*/
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/suits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(loadout_exosuits, generate_loadout_items(/datum/loadout_item/su
/datum/loadout_item/suit/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.suit)
LAZYADD(outfit.backpack_contents, outfit.suit)
spawn_in_backpack(outfit, outfit.suit, equipper)
outfit.suit = item_path
else
outfit.suit = item_path
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/loadouts/items/under/under.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GLOBAL_LIST_INIT(loadout_miscunders, generate_loadout_items(/datum/loadout_item/
/datum/loadout_item/under/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only = FALSE, override_items = LOADOUT_OVERRIDE_BACKPACK)
if(override_items == LOADOUT_OVERRIDE_BACKPACK && !visuals_only)
if(outfit.uniform)
LAZYADD(outfit.backpack_contents, outfit.uniform)
spawn_in_backpack(outfit, outfit.uniform, equipper)
outfit.uniform = item_path
else
outfit.uniform = item_path
Expand Down
Loading
Loading