diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index 592ead06e8..e13f9b5024 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -256,7 +256,8 @@ var/global/list/edible_trash = list(/obj/item/broken_device, /obj/item/weapon/folder, /obj/item/weapon/clipboard, /obj/item/weapon/coin, - /obj/item/clothing/ears //chompstation addition end + /obj/item/clothing/ears, //chompstation addition end + //CHOMPedit: disabled because this is in a file we don't use /obj/item/roulette_ball ) var/global/list/contamination_flavors = list( @@ -844,4 +845,4 @@ var/global/list/xenobio_rainbow_extracts = list( /obj/item/slime_extract/ruby = 3, /obj/item/slime_extract/emerald = 3, /obj/item/slime_extract/light_pink = 1, - /obj/item/slime_extract/rainbow = 1) \ No newline at end of file + /obj/item/slime_extract/rainbow = 1) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2ef7d5d2ca..d3d63650dc 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -993,3 +993,6 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen // this gets called when the item gets chucked by the vending machine /obj/item/proc/vendor_action(var/obj/machinery/vending/V) return + +/obj/item/proc/on_holder_escape(var/obj/item/weapon/holder/H) + return diff --git a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm index 45fdb8d39c..deec4b6964 100644 --- a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm +++ b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm @@ -48,15 +48,15 @@ name = "stack of brown carpet" type_to_spawn = /obj/item/stack/tile/carpet/brncarpet -/obj/fiftyspawner/brncarpet +/obj/fiftyspawner/blucarpet2 name = "stack of blue carpet" type_to_spawn = /obj/item/stack/tile/carpet/blucarpet2 -/obj/fiftyspawner/brncarpet +/obj/fiftyspawner/greencarpet name = "stack of green carpet" type_to_spawn = /obj/item/stack/tile/carpet/greencarpet -/obj/fiftyspawner/brncarpet +/obj/fiftyspawner/purplecarpet name = "stack of purple carpet" type_to_spawn = /obj/item/stack/tile/carpet/purplecarpet diff --git a/code/modules/casino/boxes_casino.dm b/code/modules/casino/boxes_casino.dm index 03b6aa9d17..3b4c548056 100644 --- a/code/modules/casino/boxes_casino.dm +++ b/code/modules/casino/boxes_casino.dm @@ -49,4 +49,46 @@ /obj/item/clothing/accessory/holster/hip, /obj/item/clothing/head/cowboy/ranger, /obj/item/clothing/shoes/boots/cowboy/brown - ) \ No newline at end of file + ) + +/obj/item/weapon/storage/box/roulette_balls_normal + name = "roulette ball box" + desc = "A box of spare roulette balls." + icon_state = "balls" + can_hold = list(/obj/item/roulette_ball) + starts_with = list( + /obj/item/roulette_ball = 7, + /obj/item/roulette_ball/hollow = 2) + +/obj/item/weapon/storage/box/roulette_balls_fancy + name = "fancy roulette ball box" + desc = "A box of extra-pretty roulette balls." + icon_state = "balls" + can_hold = list(/obj/item/roulette_ball) + starts_with = list( + /obj/item/roulette_ball, + /obj/item/roulette_ball/hollow, + /obj/item/roulette_ball/red, + /obj/item/roulette_ball/orange, + /obj/item/roulette_ball/yellow, + /obj/item/roulette_ball/green, + /obj/item/roulette_ball/blue, + /obj/item/roulette_ball/purple, + /obj/item/roulette_ball/moon, + /obj/item/roulette_ball/planet, + /obj/item/roulette_ball/gold) + +/obj/item/weapon/storage/box/roulette_balls_cheat + name = "special roulette ball box" + desc = "A box of 'special' roulette balls." + icon_state = "balls" + can_hold = list(/obj/item/roulette_ball) + starts_with = list( + /obj/item/roulette_ball/cheat/first_twelve, + /obj/item/roulette_ball/cheat/second_twelve, + /obj/item/roulette_ball/cheat/third_twelve, + /obj/item/roulette_ball/cheat/red, + /obj/item/roulette_ball/cheat/black, + /obj/item/roulette_ball/cheat/zeros, + /obj/item/roulette_ball/cheat/odd, + /obj/item/roulette_ball/cheat/even) \ No newline at end of file diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index b73ed6990f..a1de440a49 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -7,7 +7,7 @@ // /obj/structure/casino_table name = "casino table" - desc = "this is an unremarkable table for a casino." + desc = "This is an unremarkable table for a casino." icon = 'icons/obj/casino.dmi' icon_state = "roulette_table" density = 1 @@ -26,39 +26,301 @@ /obj/structure/casino_table/roulette_table name = "roulette" - desc = "Spin the roulette to try your luck." + desc = "The roulette. Spin to try your luck." icon_state = "roulette_wheel" + var/spin_state = "roulette_wheel_spinning" + + var/obj/item/roulette_ball/ball + +/obj/structure/casino_table/roulette_table/Initialize() + .=..() + ball = new(src) + return + +/obj/structure/casino_table/roulette_table/examine(mob/user) + .=..() + if(ball) + . += "It's currently using [ball.get_ball_desc()]." + else + . += "It doesn't have a ball." /obj/structure/casino_table/roulette_table/attack_hand(mob/user as mob) - if (busy) + if(busy) to_chat(user,"You cannot spin now! The roulette is already spinning. ") return - visible_message("\ [user] spins the roulette and throws inside little ball.") + if(!ball) + to_chat(user,"This roulette wheel has no ball! ") + return + visible_message("\The [user] spins the roulette and throws [ball.get_ball_desc()] into it.") playsound(src.loc, 'sound/machines/roulette.ogg', 40, 1) busy = 1 - icon_state = "roulette_wheel_spinning" - var/result = rand(0,36) + ball.on_spin() + icon_state = spin_state + var/result = rand(0,37) + if(ball.cheatball) + result = ball.get_cheated_result() var/color = "green" add_fingerprint(user) - if ((result>0 && result<11) || (result>18 && result<29)) - if (result%2) + if((result > 0 && result < 11) || (result > 18 && result < 29)) + if(result % 2) color="red" - else - color="black" - if ( (result>10 && result<19) || (result>28) ) - if (result%2) + else color="black" - else - color="red" + if((result > 10 && result < 19) || (result > 28 && result < 37)) + if(result % 2) + color="black" + else + color="red" + if(result == 37) + result = "00" spawn(5 SECONDS) visible_message("The roulette stops spinning, the ball landing on [result], [color].") - busy=0 - icon_state = "roulette_wheel" + busy = 0 + icon_state = initial(icon_state) + +/obj/structure/casino_table/roulette_table/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/roulette_ball)) + if(!ball) + user.drop_from_inventory(W) + W.forceMove(src) + ball = W + to_chat(user, "You insert [W] into [src].") + return + ..() + +/obj/structure/casino_table/roulette_table/verb/remove_ball() + set name = "Remove Roulette Ball" + set category = "Object" + set src in oview(1) + + if(!usr || !isturf(usr.loc)) + return + if(usr.stat || usr.restrained()) + return + if(ismouse(usr) || (isobserver(usr))) + return + + if(busy) + to_chat(usr, "You cannot remove \the [ball] while [src] is spinning!") + return + + if(ball) + usr.put_in_hands(ball) + to_chat(usr, "You remove \the [ball] from [src].") + ball = null + return + else + to_chat(usr, "There is no ball in [src]!") + return + +/obj/structure/casino_table/roulette_table/long + icon_state = "roulette_wheel_long" + spin_state = "roulette_wheel_long_spinning" + +/obj/structure/casino_table/roulette_long + name = "roulette table" + desc = "Roulette table." + icon_state = "roulette_long" /obj/structure/casino_table/roulette_chart name = "roulette chart" desc = "Roulette chart. Place your bets!" - icon_state = "roulette_table" + icon_state = "roulette_chart" + +/obj/item/roulette_ball + name = "roulette ball" + desc = "A small ball used for roulette wheel. This one is made of regular metal." + var/ball_desc = "a small metal ball" + icon = 'icons/obj/casino.dmi' + icon_state = "roulette_ball" + + var/cheatball = FALSE + +/obj/item/roulette_ball/proc/get_cheated_result() + return rand(0,37) // No cheating by default + +/obj/item/roulette_ball/proc/get_ball_desc() + return ball_desc + +/obj/item/roulette_ball/proc/on_spin() + return + +/obj/item/roulette_ball/gold + name = "golden roulette ball" + desc = "A small ball used for roulette wheel. This one is particularly gaudy." + ball_desc = "a shiny golden ball" + icon_state = "roulette_ball_gold" + +/obj/item/roulette_ball/red + name = "red roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate red." + ball_desc = "a striped red ball" + icon_state = "roulette_ball_red" + +/obj/item/roulette_ball/orange + name = "orange roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate orange." + ball_desc = "a striped orange ball" + icon_state = "roulette_ball_orange" + +/obj/item/roulette_ball/green + name = "green roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate green." + ball_desc = "a smooth green ball" + icon_state = "roulette_ball_green" + +/obj/item/roulette_ball/blue + name = "blue roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate blue." + ball_desc = "a striped blue ball" + icon_state = "roulette_ball_blue" + +/obj/item/roulette_ball/yellow + name = "yellow roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate yellow." + ball_desc = "a smooth yellow ball" + icon_state = "roulette_ball_yellow" + +/obj/item/roulette_ball/purple + name = "purple roulette ball" + desc = "A small ball used for roulette wheel. This one is ornate purple." + ball_desc = "a dotted purple ball" + icon_state = "roulette_ball_purple" + +/obj/item/roulette_ball/planet + name = "planet roulette ball" + desc = "A small ball used for roulette wheel. This one looks like a small earth-like planet." + ball_desc = "a planet-like ball" + icon_state = "roulette_ball_earth" + +/obj/item/roulette_ball/moon + name = "moon roulette ball" + desc = "A small ball used for roulette wheel. This one looks like a small moon." + ball_desc = "a moon-like ball" + icon_state = "roulette_ball_moon" + +/obj/item/roulette_ball/hollow + name = "glass roulette ball" + desc = "A small ball used for roulette wheel. This one is made of glass and seems to be openable." + ball_desc = "a small glass ball" + icon_state = "roulette_ball_glass" + + var/obj/item/weapon/holder/trapped + +/obj/item/roulette_ball/hollow/examine(mob/user) + .=..() + if(trapped) + . += "You can see [trapped] trapped inside!" + else + . += "It appears to be empty." + +/obj/item/roulette_ball/hollow/get_ball_desc() + .=..() + if(trapped && trapped.held_mob) + . += " with [trapped.name] trapped within" + return + +/obj/item/roulette_ball/hollow/attackby(var/obj/item/W, var/mob/user) + if(trapped) + to_chat(user, "This ball already has something trapped in it!") + return + if(istype(W, /obj/item/weapon/holder)) + var/obj/item/weapon/holder/H = W + if(!H.held_mob) + to_chat(user, "This holder has nobody in it? Yell at a developer!") + return + if(H.held_mob.get_effective_size() > 50) + to_chat(user, "\The [H] is too big to fit inside!") + return + user.drop_from_inventory(H) + H.forceMove(src) + trapped = H + to_chat(user, "You trap \the [H] inside the glass roulette ball.") + to_chat(H.held_mob, "\The [user] traps you inside a glass roulette ball!") + update_icon() + +/obj/item/roulette_ball/hollow/update_icon() + if(trapped && trapped.held_mob) + icon_state = "roulette_ball_glass_full" + else + icon_state = "roulette_ball_glass" + +/obj/item/roulette_ball/hollow/attack_self(mob/user as mob) + if(!trapped) + to_chat(user, "\The [src] is empty!") + return + else + user.put_in_hands(trapped) + if(trapped.held_mob) + to_chat(user, "You take \the [trapped] out of the glass roulette ball.") + to_chat(trapped.held_mob, "\The [user] takes you out of a glass roulette ball.") + trapped = null + update_icon() + +/obj/item/roulette_ball/hollow/on_holder_escape() + trapped = null + update_icon() + +/obj/item/roulette_ball/hollow/on_spin() + if(trapped && trapped.held_mob) + to_chat(trapped.held_mob, "THE WHOLE WORLD IS SENT WHIRLING AS THE ROULETTE SPINS!!!") + +/obj/item/roulette_ball/hollow/Destroy() + if(trapped) + trapped.forceMove(src.loc) + trapped = null + return ..() + +/obj/item/roulette_ball/cheat + cheatball = TRUE + +/obj/item/roulette_ball/cheat/first_twelve + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on first 12." + +/obj/item/roulette_ball/cheat/first_twelve/get_cheated_result() + return pick(list(1,2,3,4,5,6,7,8,9,10,11,12)) + +/obj/item/roulette_ball/cheat/second_twelve + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on second 12." + +/obj/item/roulette_ball/cheat/second_twelve/get_cheated_result() + return pick(list(13,14,15,16,17,18,19,20,21,22,23,24)) + +/obj/item/roulette_ball/cheat/third_twelve + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on third 12." + +/obj/item/roulette_ball/cheat/third_twelve/get_cheated_result() + return pick(list(25,26,27,28,29,30,31,32,33,34,35,36)) + +/obj/item/roulette_ball/cheat/zeros + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on 0 or 00." + +/obj/item/roulette_ball/cheat/zeros/get_cheated_result() + return pick(list(0, 37)) + +/obj/item/roulette_ball/cheat/red + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on red." + +/obj/item/roulette_ball/cheat/red/get_cheated_result() + return pick(list(1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36)) + +/obj/item/roulette_ball/cheat/black + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on black." + +/obj/item/roulette_ball/cheat/black/get_cheated_result() + return pick(list(2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35)) + +/obj/item/roulette_ball/cheat/even + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on even." + +/obj/item/roulette_ball/cheat/even/get_cheated_result() + return pick(list(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36)) + +/obj/item/roulette_ball/cheat/odd + desc = "A small ball used for roulette wheel. This one is made of regular metal. Its weighted to only land on odd." + +/obj/item/roulette_ball/cheat/odd/get_cheated_result() + return pick(list(1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35)) // //Blackjack table diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index e835f8c30c..ddd0ff612c 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -262,7 +262,6 @@ return TOPIC_REFRESH else if(href_list["clicked_pos_trait"]) - var/traitpath = text2path(href_list["clicked_pos_trait"]) //CHOMPEdit var/datum/trait/trait = text2path(href_list["clicked_pos_trait"]) var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) if(choice == "Remove") diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 5b718fe0df..9fcf0f9427 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -107,11 +107,13 @@ var/list/holder_mob_icon_cache = list() to_chat(held, "You extricate yourself from [holster].") forceMove(get_turf(src)) held.reset_view(null) - else if(isitem(loc)) + var/obj/item/I = loc to_chat(held, "You struggle free of [loc].") forceMove(get_turf(src)) held.reset_view(null) + if(istype(I)) + I.on_holder_escape(src) //Mob specific holders. /obj/item/weapon/holder/diona diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 7730a6087e..a4bd70c186 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -809,7 +809,7 @@ to_chat(src, "You can taste the flavor of aromatic rolling paper and funny looks.") else if(istype(I,/obj/item/weapon/paper)) to_chat(src, "You can taste the dry flavor of bureaucracy.") - else if(istype(I,/obj/item/weapon/dice)) + else if(istype(I,/obj/item/weapon/dice)) //CHOMPedit: Removed roulette ball because that's not active here. to_chat(src, "You can taste the bitter flavor of cheating.") else if(istype(I,/obj/item/weapon/lipstick)) to_chat(src, "You can taste the flavor of couture and style. Toddler at the make-up bag style.") diff --git a/icons/obj/boxes.dmi b/icons/obj/boxes.dmi index 7978b9a564..4cfbd48c04 100644 Binary files a/icons/obj/boxes.dmi and b/icons/obj/boxes.dmi differ diff --git a/icons/obj/casino.dmi b/icons/obj/casino.dmi index 472e1317d4..6a1bfda2ea 100644 Binary files a/icons/obj/casino.dmi and b/icons/obj/casino.dmi differ