diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 1eb8a13c4009..12ebb391d22d 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -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] @@ -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]")) diff --git a/code/datums/quirks/_quirk.dm b/code/datums/quirks/_quirk.dm index 3c5460201d99..b470ad4d4f48 100644 --- a/code/datums/quirks/_quirk.dm +++ b/code/datums/quirks/_quirk.dm @@ -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 diff --git a/code/modules/antagonists/pirate/pirate_roles.dm b/code/modules/antagonists/pirate/pirate_roles.dm index 1c2a3fc10d57..ed3cfc15e345 100644 --- a/code/modules/antagonists/pirate/pirate_roles.dm +++ b/code/modules/antagonists/pirate/pirate_roles.dm @@ -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. diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index dd773b11ffeb..bdaeb7bbf752 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -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, drop_location()) + //END OF EDIT + var/not_handled = FALSE //Added in case we make this type path deeper one day switch(slot) if(ITEM_SLOT_BELT) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index a552c8a07974..378cc4121a81 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -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) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7c7b24e72984..978be4255fca 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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)) @@ -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 /** diff --git a/code/modules/mob_spawn/ghost_roles/away_roles.dm b/code/modules/mob_spawn/ghost_roles/away_roles.dm index 4891cf1e0089..320193985d09 100644 --- a/code/modules/mob_spawn/ghost_roles/away_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/away_roles.dm @@ -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) . = ..() @@ -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) . = ..() diff --git a/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm b/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm index e44013c10640..c949b6be1b6c 100644 --- a/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm @@ -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) . = ..() diff --git a/code/modules/mob_spawn/ghost_roles/golem_roles.dm b/code/modules/mob_spawn/ghost_roles/golem_roles.dm index d66e19653097..5cd6b36fab95 100644 --- a/code/modules/mob_spawn/ghost_roles/golem_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/golem_roles.dm @@ -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) diff --git a/code/modules/mob_spawn/ghost_roles/mining_roles.dm b/code/modules/mob_spawn/ghost_roles/mining_roles.dm index 27734b0c861a..d6136cc7e04e 100644 --- a/code/modules/mob_spawn/ghost_roles/mining_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/mining_roles.dm @@ -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) . = ..() @@ -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) . = ..() @@ -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 diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index 806ec6cb7d80..16979f1e368b 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -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 @@ -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) @@ -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) @@ -231,8 +248,36 @@ 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) + spawned_human.get_language_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() + 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) . = ..() @@ -306,6 +351,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" diff --git a/monkestation/code/modules/loadouts/items/_loadout_datum.dm b/monkestation/code/modules/loadouts/items/_loadout_datum.dm index e71190b3d3d3..9f8604b1d086 100644 --- a/monkestation/code/modules/loadouts/items/_loadout_datum.dm +++ b/monkestation/code/modules/loadouts/items/_loadout_datum.dm @@ -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() @@ -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]. @@ -128,3 +128,12 @@ 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 + new item_path_to_spawn(equipper.drop_location()) diff --git a/monkestation/code/modules/loadouts/items/accessories.dm b/monkestation/code/modules/loadouts/items/accessories.dm index 88f1bf8b8ef0..e42657d74121 100644 --- a/monkestation/code/modules/loadouts/items/accessories.dm +++ b/monkestation/code/modules/loadouts/items/accessories.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/belts.dm b/monkestation/code/modules/loadouts/items/belts.dm index eaca1035a276..b333e99fda51 100644 --- a/monkestation/code/modules/loadouts/items/belts.dm +++ b/monkestation/code/modules/loadouts/items/belts.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/ears.dm b/monkestation/code/modules/loadouts/items/ears.dm index 81c1b149480d..264635d44471 100644 --- a/monkestation/code/modules/loadouts/items/ears.dm +++ b/monkestation/code/modules/loadouts/items/ears.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/glasses.dm b/monkestation/code/modules/loadouts/items/glasses.dm index b807850e3145..b865975ca2a0 100644 --- a/monkestation/code/modules/loadouts/items/glasses.dm +++ b/monkestation/code/modules/loadouts/items/glasses.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/gloves.dm b/monkestation/code/modules/loadouts/items/gloves.dm index b2fa97abfeb9..39aa345b8c84 100644 --- a/monkestation/code/modules/loadouts/items/gloves.dm +++ b/monkestation/code/modules/loadouts/items/gloves.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/heads.dm b/monkestation/code/modules/loadouts/items/heads.dm index 6f9b75a6eb00..1bc2a68fe58b 100644 --- a/monkestation/code/modules/loadouts/items/heads.dm +++ b/monkestation/code/modules/loadouts/items/heads.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/inhand.dm b/monkestation/code/modules/loadouts/items/inhand.dm index 8419fe02fdce..b2c39c61760e 100644 --- a/monkestation/code/modules/loadouts/items/inhand.dm +++ b/monkestation/code/modules/loadouts/items/inhand.dm @@ -12,7 +12,7 @@ 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) @@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(loadout_inhand_items, generate_loadout_items(/datum/loadout_ite 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 diff --git a/monkestation/code/modules/loadouts/items/masks.dm b/monkestation/code/modules/loadouts/items/masks.dm index 5fd381d68f66..853fdcb961ca 100644 --- a/monkestation/code/modules/loadouts/items/masks.dm +++ b/monkestation/code/modules/loadouts/items/masks.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/neck.dm b/monkestation/code/modules/loadouts/items/neck.dm index beee28c7683b..93e74c0194cf 100644 --- a/monkestation/code/modules/loadouts/items/neck.dm +++ b/monkestation/code/modules/loadouts/items/neck.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/shoes.dm b/monkestation/code/modules/loadouts/items/shoes.dm index d70290341873..d4e7e6b229f6 100644 --- a/monkestation/code/modules/loadouts/items/shoes.dm +++ b/monkestation/code/modules/loadouts/items/shoes.dm @@ -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 @@ -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 */ diff --git a/monkestation/code/modules/loadouts/items/suits.dm b/monkestation/code/modules/loadouts/items/suits.dm index 396f90a1c6f1..6ea0c39ca85d 100644 --- a/monkestation/code/modules/loadouts/items/suits.dm +++ b/monkestation/code/modules/loadouts/items/suits.dm @@ -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 diff --git a/monkestation/code/modules/loadouts/items/under/under.dm b/monkestation/code/modules/loadouts/items/under/under.dm index b5e5646c0f2f..602f9cf26119 100644 --- a/monkestation/code/modules/loadouts/items/under/under.dm +++ b/monkestation/code/modules/loadouts/items/under/under.dm @@ -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 diff --git a/monkestation/code/modules/syndicate_ghostroles/depot.dm b/monkestation/code/modules/syndicate_ghostroles/depot.dm index c5e625c67cf7..0ae58cd2c456 100644 --- a/monkestation/code/modules/syndicate_ghostroles/depot.dm +++ b/monkestation/code/modules/syndicate_ghostroles/depot.dm @@ -51,6 +51,10 @@ ears = /obj/item/radio/headset/syndicate/alt/leader suit = /obj/item/clothing/suit/armor/vest/capcarapace/syndicate back = /obj/item/storage/backpack/satchel/leather + backpack_contents = list( + /obj/item/gun/ballistic/automatic/pistol/aps = 1 + ) + head = /obj/item/clothing/head/hats/hos/beret/syndicate l_pocket = /obj/item/melee/energy/sword/saber r_pocket = /obj/item/flashlight/lantern/syndicate