diff --git a/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm b/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm index 21675dc006..cb27f19b8a 100644 --- a/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_fluffitems_vr.dm @@ -1463,6 +1463,12 @@ ckeywhitelist = list("yecrowbarman") character_name = list("Lemon Yellow", "Lemon Gettler Yellow", "Lemon Lee Yellow", "Lemon Jade Yellow") //different sleeves, same char +/datum/gear/fluff/cephyra_d6 + path = /obj/item/weapon/dice/loaded/ceph + display_name = "engraved d6" + ckeywhitelist = list("yeehawguvnah") + character_name = list("Cephyra") + // Z CKEYS /datum/gear/fluff/tachika_medal path = /obj/item/clothing/accessory/medal/conduct diff --git a/code/modules/economy/vending_machines_vr.dm b/code/modules/economy/vending_machines_vr.dm index 58d01d002e..cfc09e2e3e 100644 --- a/code/modules/economy/vending_machines_vr.dm +++ b/code/modules/economy/vending_machines_vr.dm @@ -1165,7 +1165,8 @@ /obj/item/weapon/deck/schnapsen = 100, /obj/item/weapon/deck/egy = 100) premium = list(/obj/item/toy/bosunwhistle = 1) - contraband = list(/obj/item/toy/katana = 1) + contraband = list(/obj/item/toy/katana = 1, + /obj/item/weapon/dice/loaded = 5) /obj/machinery/vending/loadout/overwear name = "Big D's Best" diff --git a/code/modules/games/dice.dm b/code/modules/games/dice.dm index 9b796995c5..b91fb73d1e 100644 --- a/code/modules/games/dice.dm +++ b/code/modules/games/dice.dm @@ -6,11 +6,48 @@ w_class = ITEMSIZE_TINY var/sides = 6 var/result = 6 + var/loaded = null //Set to an integer when the die is loaded + var/cheater = FALSE //TRUE if the die is able to be weighted by hand + var/tamper_proof = FALSE //Set to TRUE if the die needs to be unable to be weighted, such as for events attack_verb = list("diced") /obj/item/weapon/dice/New() icon_state = "[name][rand(1,sides)]" +/obj/item/weapon/dice/attackby(obj/item/weapon/W, mob/user) + ..() + if(istype(W, /obj/item/weapon/weldingtool) || istype(W, /obj/item/weapon/flame/lighter)) + if(cheater) + to_chat(user, "Wait, this [name] is already weighted!") + else if(tamper_proof) + to_chat(user, "This [name] is proofed against tampering!") + else + var/to_weight = input("What should the [name] be weighted towards? You can't undo this later, only change the number!","Set the desired result") as null|num + if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides)) //You must input a number higher than 0 and no greater than the number of sides + return 0 + else + to_chat(user, "You partially melt the [name], weighting it towards [to_weight]...") + desc = "[initial(desc)] It looks a little misshapen, somehow..." + loaded = to_weight + +/obj/item/weapon/dice/AltClick(mob/user) + ..() + if(cheater) + if(!loaded) + var/to_weight = input("What should the [name] be weighted towards?","Set the desired result") as null|num + if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides) ) //You must input a number higher than 0 and no greater than the number of sides + return 0 + else + to_chat(user, "You sneakily set the [name] to land on [to_weight]...") + loaded = to_weight + else + to_chat(user, "You set the [name] to roll randomly again.") + loaded = null + +/obj/item/weapon/dice/loaded + description_info = "This is a loaded die! To change the number it's weighted to, alt-click it. To put it back to normal, alt-click it again." + cheater = TRUE + /obj/item/weapon/dice/d4 name = "d4" desc = "A dice with four sides." @@ -58,6 +95,12 @@ /obj/item/weapon/dice/proc/rollDice(mob/user as mob, var/silent = 0) result = rand(1, sides) + if(loaded) + if(cheater) + if(prob(90)) + result = loaded + else if(prob(75)) //makeshift weighted dice don't always work + result = loaded icon_state = "[name][result]" if(!silent) @@ -158,4 +201,4 @@ /obj/item/weapon/storage/dicecup/loaded/New() ..() for(var/i = 1 to 5) - new /obj/item/weapon/dice( src ) \ No newline at end of file + new /obj/item/weapon/dice( src ) diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index ba24dccabd..ee91f280cb 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -1556,3 +1556,17 @@ playsound(src, 'sound/items/drop/plushie.ogg', 25, 0) visible_message("[src] says, \"[pokephrase]\"") last_message = world.time + +//Yeehawguvnah - Cephyra + +/obj/item/weapon/dice/loaded/ceph + name = "engraved d6" + desc = "A die with six sides. It's fairly well-made, made of an unclear black material with silver pips. If you were to touch it, your hands tingle slightly as though from static. On closer inspection, it's finely engraved with curving, fractal patterns." + icon_state = "ceph_d66" + +/obj/item/weapon/dice/loaded/ceph/rollDice(mob/user, silent) + ..() + icon_state = "ceph_d6[result]" + +/obj/item/weapon/dice/loaded/ceph/New() + icon_state = "ceph_d6[rand(1,sides)]" diff --git a/icons/obj/dice.dmi b/icons/obj/dice.dmi index 17a3c64cd4..c017e2d082 100644 Binary files a/icons/obj/dice.dmi and b/icons/obj/dice.dmi differ