diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index 92a0f4bf5f0..6a2295efa36 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -160,6 +160,95 @@ GLOBAL_LIST_INIT(global_vore_egg_types, list( "Spotted Pink" )) +// Global associated list of common items people might prefer to be item TF'd into +GLOBAL_LIST_INIT(item_tf_options, list( + // Accessories + "Accessory - Necklace (metal)" = /obj/item/clothing/accessory/tronket, + "Accessory - Ring" = /obj/item/clothing/accessory/ring, + "Accessory - Sweater" = /obj/item/clothing/accessory/sweater, + "Accessory - Sweater (keyhole)" = /obj/item/clothing/accessory/sweater/keyhole, + // Under slot items + "Top - Bunny suit" = /obj/item/clothing/under/bunnysuit, + "Top - Bunny suit (maid)" = /obj/item/clothing/under/bunnysuit_maid, + "Top - Bunny suit (maid, top-only)" = /obj/item/clothing/under/reverse_bunnytop_maid, + "Top - Bunny suit (reverse)" = /obj/item/clothing/under/reverse_bunnysuit, + "Top - Bunny suit (reverse, maid)" = /obj/item/clothing/under/reverse_bunnysuit_maid, + "Top - Bunny suit (reverse, top-only)" = /obj/item/clothing/under/reverse_bunnytop, + "Top - Maid outfit (costume)" = /obj/item/clothing/under/dress/maid, + "Top - Maid outfit (latex)" = /obj/item/clothing/under/fluff/latexmaid, + "Top - Maid outfit (uniform)" = /obj/item/clothing/under/dress/maid/janitor, + "Top - Swimsuit (black)" = /obj/item/clothing/under/swimsuit/black, + "Top - Swimsuit (blue)" = /obj/item/clothing/under/swimsuit/blue, + "Top - Swimsuit (cow print)" = /obj/item/clothing/under/swimsuit/cowbikini, + "Top - Swimsuit (earthen)" = /obj/item/clothing/under/swimsuit/earth, + "Top - Swimsuit (green)" = /obj/item/clothing/under/swimsuit/green, + "Top - Swimsuit (high class)" = /obj/item/clothing/under/swimsuit/highclass, + "Top - Swimsuit (purple)" = /obj/item/clothing/under/swimsuit/purple, + "Top - Swimsuit (red)" = /obj/item/clothing/under/swimsuit/red, + "Top - Swimsuit (revealing, pink)" = /obj/item/clothing/under/swimsuit/stripper, + "Top - Swimsuit (risque)" = /obj/item/clothing/under/swimsuit/risque, + "Top - Swimsuit (streamlined)" = /obj/item/clothing/under/swimsuit/streamlined, + "Top - Swimsuit (striped)" = /obj/item/clothing/under/swimsuit/striped, + "Top - Swimsuit (white)" = /obj/item/clothing/under/swimsuit/white, + // Foot slot items + "Footwear - Flip-flops" = /obj/item/clothing/shoes/flipflop, + "Footwear - Footwraps" = /obj/item/clothing/shoes/footwraps, + "Footwear - High heels" = /obj/item/clothing/shoes/heels, + "Footwear - Jackboots" = /obj/item/clothing/shoes/boots/jackboots, + "Footwear - Jackboots (toe-less)" = /obj/item/clothing/shoes/boots/jackboots/toeless, + "Footwear - Shoes (black)" = /obj/item/clothing/shoes/black, + "Footwear - Workboots" = /obj/item/clothing/shoes/boots/workboots, + "Footwear - Workboots (toe-less)" = /obj/item/clothing/shoes/boots/workboots/toeless, + // Hand slot items + "Gloves - Evening" = /obj/item/clothing/gloves/evening, + "Gloves - Black" = /obj/item/clothing/gloves/black, + // Suit slot items + "Overwear - Kimono (blue)" = /obj/item/clothing/suit/kimono/blue, + "Overwear - Kimono (earth)" = /obj/item/clothing/suit/kimono/blue, + "Overwear - Kimono (green)" = /obj/item/clothing/suit/kimono/green, + "Overwear - Kimono (orange)" = /obj/item/clothing/suit/kimono/orange, + "Overwear - Kimono (pink)" = /obj/item/clothing/suit/kimono/pink, + "Overwear - Kimono (purple)" = /obj/item/clothing/suit/kimono/purple, + "Overwear - Kimono (red)" = /obj/item/clothing/suit/kimono/red, + "Overwear - Kimono (violet)" = /obj/item/clothing/suit/kimono/violet, + "Overwear - Kimono (white, traditional)" = /obj/item/clothing/suit/kimono, + "Overwear - T-shirt (oversized)" = /obj/item/clothing/suit/oversize, + // Misc. items + "Item - Bar stool" = /obj/item/stool/padded, + "Item - Inflatable Duck" = /obj/item/inflatable_duck, + "Item - Plushie (carp)" = /obj/item/toy/plushie/carp, + "Item - Plushie (cat, black)" = /obj/item/toy/plushie/black_cat, + "Item - Plushie (cat, calico)" = /obj/item/toy/plushie/kitten, + "Item - Plushie (cat, grey)" = /obj/item/toy/plushie/grey_cat, + "Item - Plushie (cat, orange)" = /obj/item/toy/plushie/orange_cat, + "Item - Plushie (cat, tabby)" = /obj/item/toy/plushie/tabby_cat, + "Item - Plushie (cat, tuxedo)" = /obj/item/toy/plushie/tuxedo_cat, + "Item - Plushie (cat, white)" = /obj/item/toy/plushie/white_cat, + "Item - Plushie (corgi)" = /obj/item/toy/plushie/corgi, + "Item - Plushie (corgi, girly)" = /obj/item/toy/plushie/girly_corgi, + "Item - Plushie (deer)" = /obj/item/toy/plushie/deer, + "Item - Plushie (fox, black)" = /obj/item/toy/plushie/black_fox, + "Item - Plushie (fox, blue)" = /obj/item/toy/plushie/blue_fox, + "Item - Plushie (fox, coffee)" = /obj/item/toy/plushie/coffee_fox, + "Item - Plushie (fox, crimson)" = /obj/item/toy/plushie/crimson_fox, + "Item - Plushie (fox, marble)" = /obj/item/toy/plushie/marble_fox, + "Item - Plushie (fox, orange)" = /obj/item/toy/plushie/orange_fox, + "Item - Plushie (fox, pink)" = /obj/item/toy/plushie/pink_fox, + "Item - Plushie (fox, purple)" = /obj/item/toy/plushie/purple_fox, + "Item - Plushie (fox, red)" = /obj/item/toy/plushie/red_fox, + "Item - Plushie (fumo)" = /obj/item/toy/plushie/fumo, + "Item - Plushie (lizard)" = /obj/item/toy/plushie/lizard, + "Item - Plushie (lizard, kobold)" = /obj/item/toy/plushie/lizardplushie/kobold, + "Item - Plushie (moth)" = /obj/item/toy/plushie/moth, + "Item - Plushie (mouse)" = /obj/item/toy/plushie/mouse, + "Item - Plushie (shark)" = /obj/item/toy/plushie/shark, + "Item - Plushie (slime)" = /obj/item/toy/plushie/slimeplushie, + "Item - Plushie (snake)" = /obj/item/toy/plushie/snakeplushie, + "Item - Plushie (spider)" = /obj/item/toy/plushie/spider, + "Item - Plushie (vox)" = /obj/item/toy/plushie/vox, + "Item - Towel" = /obj/item/towel + )) + GLOBAL_LIST_INIT(tf_vore_egg_types, list( "Unathi" = /obj/item/storage/vore_egg/unathi, "Tajara" = /obj/item/storage/vore_egg/tajaran, diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index 7b070bd182e..09d3bc59c31 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -581,6 +581,7 @@ to_chat(user, span_notice("Name: [selected_collar.sentientprizename]")) to_chat(user, span_notice("Description: [selected_collar.sentientprizeflavor]")) to_chat(user, span_notice("OOC: [selected_collar.sentientprizeooc]")) + to_chat(user, span_notice("Allows item prize TF: [selected_collar.sentientprizeitemtf ? "Yes (you may choose to turn your prize into an item when claiming!)" : "No"]")) if(selected_collar.ownername != null) to_chat(user, span_warning("This prize is already owned by [selected_collar.ownername]")) @@ -601,6 +602,10 @@ var/confirm = tgui_alert(user, "Are you sure you want to become a sentient prize?", "Confirm Sentient Prize", list("Yes", "No")) if(confirm != "Yes") return + var/confirmitemtf = tgui_alert(user, "Would you like to allow others to turn you into an item upon claiming you if they choose to?", "Confirm Item TF Preference", list("Yes", "No")) + var/allowitemtf = FALSE + if(confirmitemtf != "No") + allowitemtf = TRUE to_chat(user, span_warning("You are now a prize!")) if(safety_ckey in sentientprizes_ckeys_list) to_chat(user, span_warning("The SPASM beeps in an upset manner, you already have a collar!")) @@ -611,6 +616,7 @@ C.sentientprizeckey = "[user.ckey]" C.sentientprizeflavor = user.flavor_text C.sentientprizeooc = user.ooc_notes + C.sentientprizeitemtf = allowitemtf C.name = "Sentient Prize Collar: Available! [user.name] purchaseable at the SPASM!" C.desc = "SPASM collar. The tags shows in flashy colorful text the wearer is [user.name] and is currently available to buy at the Sentient Prize Automated Sales Machinery!" C.icon_state = "casinoslave_available" @@ -719,6 +725,35 @@ if("Change Prize Value") setprice(user) +/obj/machinery/casinosentientprize_handler/proc/do_item_tf(mob/living/sentient_prize, var/target_item_name) + var/item_type = GLOB.item_tf_options[target_item_name] + var/obj/item/newitem = new item_type(null) // Starts off in nullspace while we customize! + var/item_color = newitem.color + + var/item_name = tgui_input_text(sentient_prize, "Choose your item name for \the [newitem] (Leave blank or cancel to use its default name)", "TF Item Name") + + var/item_desc = tgui_input_text(sentient_prize, "Choose your item description for \the [newitem] (Leave blank or cancel to use its default description)", "TF Item Description") + + var/choice_color = tgui_alert(sentient_prize, "Do you want to customize your item's color?", "Item TF Color", list("Yes", "No")) + if(choice_color == "Yes") + item_color = tgui_color_picker(sentient_prize, "Choose the color for \the [newitem].", "Item TF Color", newitem.color) + + // Sanity check in case the item got garbage collected or something while customizing + if(!newitem) + newitem = new item_type(get_turf(sentient_prize)) + + // We apply the customization options afterward for the same reason as the sanity check. + if(LAZYLEN(item_name)) + newitem.name = item_name + if(LAZYLEN(item_desc)) + newitem.desc = item_desc + newitem.color = item_color + + // Once that's all done, TF the prize up! + newitem.forceMove(get_turf(sentient_prize)) // This might be a bad idea, but if the prize is in something/someone it would be potentially diastrous to use loc. Better to move 'em out than move it in! + sentient_prize.tf_into(newitem, TRUE, item_name) + return newitem + /obj/machinery/casinosentientprize_handler/proc/insert_chip(var/obj/item/spacecasinocash/cashmoney, mob/user, var/buystate) if(cashmoney.worth < casinosentientprize_price) to_chat(user,span_notice("You dont have enough chips to pay for the sentient prize!")) @@ -745,6 +780,23 @@ if(buystate == "buy") to_chat(user,span_notice("You put [casinosentientprize_price] credits worth of chips into the SPASM and it pings to inform you bought [selected_collar.sentientprizename]!")) + // If the sentient prize opted in to be TF'd into an item.... + if(selected_collar.sentientprizeitemtf) + // ... prompt the buyer asking if they want to do that! + var/confirm_item_tf_claim = tgui_alert(user, "This prize has opted in to being transformed into an item! Would you like to claim your prize as an item?", "Confirm Prize Item Transformation", list("Yes", "No")) + if(confirm_item_tf_claim == "Yes") + // Show the claimer a list of options to turn their prize into. + var/item_choice = tgui_input_list(user, "Choose the item to claim your prize as. (Cancelling will default you to claiming your prize without transformation!)", "Choose Sentient Prize Item", GLOB.item_tf_options) + if(LAZYLEN(item_choice)) + var/mob/living/sentient_prize = selected_collar.wearer.resolve() + if(sentient_prize) + do_item_tf(selected_collar.wearer, item_choice) + else + log_runtime(EXCEPTION("Casino sentient prize collar \"[selected_collar]\" didn't have a living mob as its wearer and couldn't item TF!")) + to_chat(user,span_warning("\The [src] couldn't transform your prize due to the prize's collar not being able to resolve its wearer as a living mob. Contact a coder.")) + to_chat(user,span_infoplain("Falling back to claiming your prize as normal. An admin can help transform your prize!")) + else + to_chat(user,span_notice("You decided to claim your prize without transformation.")) selected_collar.icon_state = "casinoslave_owned" selected_collar.update_icon() selected_collar.ownername = user.name diff --git a/code/modules/clothing/accessories/accessory_vr.dm b/code/modules/clothing/accessories/accessory_vr.dm index 3172ea72bda..7f1c996ff95 100644 --- a/code/modules/clothing/accessories/accessory_vr.dm +++ b/code/modules/clothing/accessories/accessory_vr.dm @@ -628,6 +628,7 @@ var/sentientprizeckey = null //Ckey for system to check who is the person and ensure no abuse of system or errors var/sentientprizeflavor = null //Description to show on the SPASM var/sentientprizeooc = null //OOC text to show on the SPASM + var/sentientprizeitemtf = FALSE //Whether the person opted in to allowing themselves to be item TF'd as a prize /obj/item/clothing/accessory/collar/casinosentientprize/attack_self(mob/user as mob) //keeping it blank so people don't tag and reset collar status