diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index ebfe0b0028..5e264a9e9d 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -1164,6 +1164,7 @@ GLOBAL_LIST_INIT(area_or_turf_fail_types, typecacheof(list( /obj/item/grown, \ /obj/item/trash, \ /obj/item/reagent_containers/cooking_container, \ + /obj/item/spacecasinocash, \ /obj/item/spacecasinocash_fake, \ /obj/item/deck/cards, \ /obj/item/hand @@ -1183,7 +1184,9 @@ GLOBAL_LIST_INIT(area_or_turf_fail_types, typecacheof(list( /obj/item/petrifier, \ /obj/item/dice, \ /obj/item/casino_platinum_chip, \ - /obj/item/spacecasinocash + /obj/item/spacecasinocash, \ + /obj/item/spacecasinocash_fake, \ + /obj/item/hand #define ORGAN_GRIPPER \ /obj/item/organ, \ diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index b68e91d1f4..b22e1b4023 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -634,3 +634,52 @@ to_chat(user, span_filter_notice("You fail to pick up \the [A] with \the [src].")) return + +// Simple that lets a cyborg roll a collection of die. +/obj/item/robo_dice + name = "random number generator" + desc = "A robot device that allows a synthetic entity to, finally, make random numbers. The future is here." + icon = 'icons/obj/integrated_electronics/electronic_setups.dmi' + icon_state = "setup_device_box" + +/obj/item/robo_dice/attack_self(mob/user) + . = ..() + var/DI = 'icons/obj/dice.dmi' + var/dice_options = list( + "roll a custom die" = image(icon = 'icons/obj/integrated_electronics/electronic_setups.dmi', icon_state = "setup_device_box"), + "roll d4" = image(icon = DI, icon_state = "d44"), + "roll d6" = image(icon = DI, icon_state = "d66"), + "roll d8" = image(icon = DI, icon_state = "d88"), + "roll d10" = image(icon = DI, icon_state = "d1010"), + "roll d12" = image(icon = DI, icon_state = "d1212"), + "roll d20" = image(icon = DI, icon_state = "d2020"), + "roll d100" = image(icon = DI, icon_state = "d10010"), + ) + var/choice = show_radial_menu(user, user, dice_options, radius = 70) + var/sides = 0 + switch(choice) + if("roll d4") + sides = 4 + if("roll d6") + sides = 6 + if("roll d8") + sides = 8 + if("roll d10") + sides = 10 + if("roll d12") + sides = 12 + if("roll d20") + sides = 20 + if("roll d100") + sides = 100 + if("roll a custom die") + sides = tgui_input_number(user, "Enter how many faces you want your virtual dice to have, (no more than 1000 sides):", "Custom Dice Roll", 6, 1000, 0) + if(sides <= 0) + return + var/result = rand(1, sides) + user.visible_message( + span_notice("\The [user] rolls a virtual [sides]-sided die. The result is [result]."), + span_notice("You roll a virtual [sides]-sided die. The result is [result]."), + span_notice("You hear synthesized audio of clattering plastic with a soft ping.")) + user.balloon_alert_visible("rolled: [result]", blind_message = "*clatter, ping!*") + playsound(user, 'sound/effects/diceroll_robotic.ogg', 75, 0) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index 6d3a0f19d9..5da5a7b40f 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -183,6 +183,7 @@ src.modules += new /obj/item/tool/crowbar/cyborg(src) src.modules += new /obj/item/melee/robotic/jaws/small(src) src.modules += new /obj/item/gripper/scene(src) + src.modules += new /obj/item/robo_dice(src) /obj/item/robot_module/robot/standard name = "standard robot module" diff --git a/sound/effects/diceroll_robotic.ogg b/sound/effects/diceroll_robotic.ogg new file mode 100644 index 0000000000..d85c1d83f2 Binary files /dev/null and b/sound/effects/diceroll_robotic.ogg differ