<commit_before>/obj/item/toy/cards/cardhand
	name = "hand of cards"
	desc = "A number of cards not in a deck, customarily held in ones hand."
	icon = 'icons/obj/playing_cards.dmi'
	icon_state = "none"
	w_class = WEIGHT_CLASS_TINY
	worn_icon_state = "card"

/obj/item/toy/cards/cardhand/Initialize(mapload, list/cards_to_combine)
	. = ..()

	if(!LAZYLEN(cards_to_combine) && (mapload && !LAZYLEN(cards)))
		CRASH("[src] is being made into a cardhand without a list of cards to combine")

	if(mapload && LAZYLEN(cards)) // these cards have not been initialized
		for(var/card_name in cards)
			var/obj/item/toy/singlecard/new_card = new (loc, card_name)
			new_card.update_appearance()
			cards_to_combine += new_card
		cards = list() // reset our cards to an empty list

	for(var/obj/item/toy/singlecard/new_card in cards_to_combine)
		new_card.forceMove(src)
		cards += new_card

	register_context()
	update_appearance()

/obj/item/toy/cards/cardhand/suicide_act(mob/living/carbon/user)
	user.visible_message(span_suicide("[user] is slitting [user.p_their()] wrists with \the [src]! It looks like [user.p_they()] [user.p_have()] a crummy hand!"))
	playsound(src, 'sound/items/cardshuffle.ogg', 50, TRUE)
	return BRUTELOSS

/obj/item/toy/cards/cardhand/examine(mob/user)
	. = ..()<commit_msg>[NO GBP] Fix mapped cardhands not initializing (#66678)<commit_after>/obj/item/toy/cards/cardhand
	name = "hand of cards"
	desc = "A number of cards not in a deck, customarily held in ones hand."
	icon = 'icons/obj/playing_cards.dmi'
	icon_state = "none"
	w_class = WEIGHT_CLASS_TINY
	worn_icon_state = "card"

/obj/item/toy/cards/cardhand/Initialize(mapload, list/cards_to_combine = list())
	. = ..()

	var/has_runtime_spawned_cards = length(cards_to_combine)
	var/has_mapped_spawned_cards = mapload && length(cards)

	if(!has_runtime_spawned_cards && !has_mapped_spawned_cards)
		CRASH("[src] is being made into a cardhand without a list of cards to combine")

	if(has_mapped_spawned_cards) // these cards have not been initialized
		for(var/card_name in cards)
			var/obj/item/toy/singlecard/new_card = new (loc, card_name)
			new_card.update_appearance()
			cards_to_combine += new_card
		cards = list() // reset our cards to an empty list

	for(var/obj/item/toy/singlecard/new_card in cards_to_combine)
		new_card.forceMove(src)
		cards += new_card

	register_context()
	update_appearance()

/obj/item/toy/cards/cardhand/suicide_act(mob/living/carbon/user)
	user.visible_message(span_suicide("[user] is slitting [user.p_their()] wrists with \the [src]! It looks like [user.p_they()] [user.p_have()] a crummy hand!"))
	playsound(src, 'sound/items/cardshuffle.ogg', 50, TRUE)
	return BRUTELOSS

/obj/item/toy/cards/cardhand/examine(mob/user)
	. = ..()
{'fraction_non_alphanumeric': 0.13041894353369762, 'fraction_numerical': 0.003278688524590164, 'mean_word_length': 4.732776617954071, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7532623', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1032, 'n_words': 221}