From 5b0bfcde7a52e810e94845f17112b159f242ce13 Mon Sep 17 00:00:00 2001 From: Shadowfire Date: Mon, 2 Mar 2020 22:30:33 +0100 Subject: [PATCH] wip casino1 Made confetti sprite and system Made a confetti grenade Made special casino card deck and sprites that doesnt contain joker made sofa constructible from wood, still needs more work added new casino card decks to casino map --- code/game/machinery/casino_ch.dm | 87 +++++++++++++++--- code/game/objects/effects/effect_system_ch.dm | 64 +++++++++++++ .../weapons/grenades/confetti_grenade.dm | 31 +++++++ code/modules/games/cards.dm | 2 +- code/modules/games/cards_ch.dm | 46 +++++++++ code/modules/materials/material_recipes_ch.dm | 12 ++- icons/effects/effects_ch.dmi | Bin 0 -> 1541 bytes icons/obj/playing_cards_ch.dmi | Bin 0 -> 3577 bytes maps/southern_cross/southern_cross-casino.dmm | 10 +- nano/templates/Casino_prize_dispenser_ch.tmpl | 36 +------- vorestation.dme | 3 + 11 files changed, 238 insertions(+), 53 deletions(-) create mode 100644 code/game/objects/effects/effect_system_ch.dm create mode 100644 code/game/objects/items/weapons/grenades/confetti_grenade.dm create mode 100644 code/modules/games/cards_ch.dm create mode 100644 icons/effects/effects_ch.dmi create mode 100644 icons/obj/playing_cards_ch.dmi diff --git a/code/game/machinery/casino_ch.dm b/code/game/machinery/casino_ch.dm index 34adb38328..65d744abcf 100644 --- a/code/game/machinery/casino_ch.dm +++ b/code/game/machinery/casino_ch.dm @@ -900,7 +900,7 @@ /////////////CASINO PRIZE DISPENSER//////////////////////// - +/* /obj/machinery/casino_prize_dispenser //WIP sprites and variables and prize lists name = "Casino Prize Exchanger" desc = "Exchange your chips to obtain wonderful prizes! Hoepfully you'll get to keep some of them for a while." @@ -920,13 +920,27 @@ var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI var/status_error = 0 // Set to 1 if status_message is an error - var/list/weapons = list() // For each, use the following pattern: - var/list/gear = list() // list(/type/path = amount,/type/path2 = amount2) - var/list/clothing = list() // No specified amount = only one in stock - var/list/misc = list() - var/list/drinks = list() + var/list/list_weapons = list() + var/list/list_gear = list() + var/list/list_clothing = list() + var/list/list_misc = list() + var/list/list_drinks = list() var/list/prices = list() // Prices for each item, list(/type/path = price), items not in the list don't have a price. + var/category_weapons = 1 //For listing categories, if false then prizes of this categories cant be obtained nor bought for post-shift enjoyment + var/category_gear = 1 + var/category_clothing = 1 + var/category_misc = 1 + var/category_drinks = 1 + + var/list/product_categories = list( + list_weapons, + category_gear, + category_clothing, + category_misc, + category_drinks + ) + // List of vending_product items available. var/list/product_records = list() @@ -941,7 +955,7 @@ var/list/log = list() var/req_log_access = access_cargo //default access for checking logs is cargo var/has_logs = 0 //defaults to 0, set to anything else for vendor to have logs - +*/ /* var/list/all_products = list( @@ -952,16 +966,12 @@ list("Booze", CAT_DRINKS)) */ +/* /obj/machinery/casino_prize_dispenser/Initialize() build_inventory() /obj/machinery/casino_prize_dispenser/proc/build_inventory() //WIP - var/list/all_products = list( - list(weapons, CAT_WEAPONS), - list(gear, CAT_GEAR), - list(clothing, CAT_CLOTHING), - list(misc, CAT_MISC), - list(drinks, CAT_DRINKS)) + for(var/current_list in all_products) var/category = current_list[2] @@ -971,7 +981,8 @@ product.price = (entry in prices) ? prices[entry] : 0 product.category = category - +*/ +/* /obj/machinery/casino_prize_dispenser/Destroy() for(var/datum/stored_item/vending_product/R in product_records) qdel(R) @@ -1056,6 +1067,7 @@ "color" = I.display_color))) data["products"] = listed_products + data["categories"] = all_products ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) @@ -1116,4 +1128,49 @@ /obj/machinery/casino_prize_dispenser/proc/do_logging(datum/stored_item/vending_product/R, mob/user, var/vending = 0) //WIP? var/prize_log = "[user.ckey] playing as [user.name] bought a INSERT PORODUCT HERE." log[++log.len] = prize_log - //Currently doesnt have in game way to show, to ensure theres no chance of players ckeys exposed - Jack \ No newline at end of file + //Currently doesnt have in game way to show, to ensure theres no chance of players ckeys exposed - Jack +*/ +/* + + +{{if data.mode == 0}} +

Items available

+
+ {{for data.products}} +
+
+ {{if value.price > 0}} + {{:helper.link('Buy (' + value.price + ')', 'cart', { "vend" : value.key }}} + {{else}} + {{:helper.link('Vend', 'circle-arrow-s', { "vend" : value.key }}} + {{/if}} +
+
+ {{if value.color}}{{:value.name}} + {{else}}{{:value.name}} +
+
+ {{empty}} + No items available! + {{/for}} +
+{{/if}} +{{else data.mode == 1}} +

Item selected

+
+
+
Item selected:
{{:data.product}}
+
Charge:
{{:data.price}}
+
+
+ {{if data.message_err}} {{/if}} {{:data.message}} +
+
+ {{:helper.link('Cancel', 'arrowreturn-1-w', {'cancelpurchase' : 1})}} +
+
+{{/if}} +*/ \ No newline at end of file diff --git a/code/game/objects/effects/effect_system_ch.dm b/code/game/objects/effects/effect_system_ch.dm new file mode 100644 index 0000000000..08e80a19d5 --- /dev/null +++ b/code/game/objects/effects/effect_system_ch.dm @@ -0,0 +1,64 @@ + +///////////////////////////////////////////// +// Confetti and Glitter +// Uses same system as smoke so can have directional travel +///////////////////////////////////////////// + +/obj/effect/effect/confetti + name = "confetti" + icon = 'icons/effects/effects_ch.dmi' + icon_state = "confetti" + opacity = 1 + anchored = 0.0 + mouse_opacity = 0 + var/amount = 6.0 + var/time_to_live = 100 + +/obj/effect/effect/confetti/New() + ..() + if(time_to_live) + spawn (time_to_live) + if(!QDELETED(src)) + qdel(src) + +/datum/effect/effect/system/confetti_spread + var/total_confetti = 0 // To stop it being spammed and lagging! + var/direction + var/confetti_type = /obj/effect/effect/confetti + +/datum/effect/effect/system/confetti_spread/set_up(n = 5, c = 0, loca, direct) + if(n > 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + if(direct) + direction = direct + +/datum/effect/effect/system/confetti_spread/start(var/I) + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/confetti/confetti = new confetti_type(src.location) + src.total_confetti++ + if(I) + confetti.color = I //Allows us to do differently colored confetti + var/direction = src.direction + if(!dire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RS#^JM^;Pa)&q0$ z2uw;nuq=udfGovtgs^fq%Wv z>_|v0WnRBfqgu*p{X!S3=6yoqI0d|{X$o(?;kpTm$Hn{EPnc);4_ckr34om zze_1wP~+1cg5wC#xq#7_`?S%7`?M~oecBuhecBxC>VfOPtK&K#RRsip8P=Y#dSFY! z>bSh{spCpUU&oa~WF40amFl=$D7wFc6ui*najaVb0f!e*mZ*NAZdB_`dhAo-ws1(-00000NkvXXu0mjf6$s~} literal 0 HcmV?d00001 diff --git a/icons/obj/playing_cards_ch.dmi b/icons/obj/playing_cards_ch.dmi new file mode 100644 index 0000000000000000000000000000000000000000..04e7af96fea1bdc28d0be2331143137d33c69f6e GIT binary patch literal 3577 zcmb7{eLU0q`^P_XPia#t$K5tjOteI$#5VT|2^B|3#V8VTKiguOlnA-a%u&k8LDHez zY>wO9ZRlGhlsWE=g<9D5o8NIB=jQkO{qg(b`dshp@xDIq_v3nAuj})8d~Q2BSj)>P z%K-o&Z);=W1OOn!hRKKn0HERFSt$yjj&?4V3 zP*sqb9_A;^G3Wved;x5_-X>aQnOiz) zAGSB9`}ztE41{<*-qO+%i9`mRRDtaB^@4FcSl!B0*=P zU0iQi_=H{x@xOkhQ zY5#|z6mm(POIWtHBBp?7O!sj;$6U*5dj6pv)^V!B!S9U8nUshyx4Us`hXY`o&YvWM zuf%>dI%PusJxP4_oKIsyn0Kw-9q>u%#Mv#)Pk(<@SgJ++ah{96RcVlcHGkZdm~-}k zU&0nQtMmx<_>vrKP+D|hk2xWG39tcoiH&Z3y>D;lXNPYx>HAyKu0M)|FlDBz#InX! zj=uk;pWyn*Z(Dyywvu^|vxU@$=_;T5YVq#V#1vg)72O%Dz~0wV8BgqXM<4LeIeO0W z*`Bt0u9rh^eYcqCp|wBX30oXLZ?*Sc{SU;B)+fA{=g5bSxgQCj-|`xUJwU&2pUim3sC{$nT$?ijSMScHl zKgWpT@oauGRZ7m7x}5O_VkVL*%NeDPRx%@p&ort6R5^mDNab7Z8C7%d= zhZmF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z?vIdx%ME;t?svkY?y+TOz(@j(XV3!PiFU#(u0^eZULJ`)5mN-G=+A*~Q~2uK3bZEd zE2X(fkQzAv-<~pqvaav{fYgSlt%$0X4u)=SfY;2&yool)H{W_HxTtdZ>CHn7d0knW z^8cQLU__yde_6);$PgkY56pm-QdZ4div+3Mr|8SaH^X>=W3d9*dU)FmGx3@@`t+*# zj>l-jf4W9~;p0(U>1(aOeOEV>@h#p59r0rr+6yhcg0myah>)0#EK_uF}y&QYg2H=z%kQv@8HM&ZIowp8$dw^Vhbp2 ztw4!zIka`GnqTta7e22Puw4H*)6i-boCEw^aq~Zlo3I4r#Z~i3QD&q>_ydK3(^eN$ zQbbIoN((NT{87K6X!CzqB)`z^Qrvr{zg>oaWibu*(BT)Je2l(PvP{|kK)`z32Y=oC z|3i{`gkMO{_y-mSbCjO2YM|CqEuw-CI+ow#NVMUKw-g`=iTpY~X_Owe?Hth`IiF1J z8<{%Qg#4FWR!^?oD6J!2y*ok=d%Gj$JzSZ+LMiTr{w1Xi2&efi_keYQ-T8;cbrwcnyR4dLoghv* zO@q5dc4* zBj3Ug!d57Er9} {{if data.mode == 0}} -

Items available

+

Prize categories

- {{for data.products}} -
-
- {{if value.price > 0}} - {{:helper.link('Buy (' + value.price + ')', 'cart', { "vend" : value.key }}} - {{else}} - {{:helper.link('Vend', 'circle-arrow-s', { "vend" : value.key }}} - {{/if}} -
-
- {{if value.color}}{{:value.name}} - {{else}}{{:value.name}} -
+ {{for data.categories}}
{{empty}} No items available! {{/for}}
-{{/if}} -{{else data.mode == 1}} -

Item selected

-
-
-
Item selected:
{{:data.product}}
-
Charge:
{{:data.price}}
-
-
- {{if data.message_err}} {{/if}} {{:data.message}} -
-
- {{:helper.link('Cancel', 'arrowreturn-1-w', {'cancelpurchase' : 1})}} -
-{{/if}} \ No newline at end of file +{{/if}} diff --git a/vorestation.dme b/vorestation.dme index 8bf6899fe9..11dbedfaa2 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -986,6 +986,7 @@ #include "code\game\objects\weapons.dm" #include "code\game\objects\effects\bump_teleporter.dm" #include "code\game\objects\effects\effect_system.dm" +#include "code\game\objects\effects\effect_system_ch.dm" #include "code\game\objects\effects\explosion_particles.dm" #include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" @@ -1215,6 +1216,7 @@ #include "code\game\objects\items\weapons\grenades\anti_photon_grenade.dm" #include "code\game\objects\items\weapons\grenades\chem_grenade.dm" #include "code\game\objects\items\weapons\grenades\concussion.dm" +#include "code\game\objects\items\weapons\grenades\confetti_grenade.dm" #include "code\game\objects\items\weapons\grenades\emgrenade.dm" #include "code\game\objects\items\weapons\grenades\explosive.dm" #include "code\game\objects\items\weapons\grenades\flashbang.dm" @@ -2103,6 +2105,7 @@ #include "code\modules\games\cah_white_cards.dm" #include "code\modules\games\cardemon.dm" #include "code\modules\games\cards.dm" +#include "code\modules\games\cards_ch.dm" #include "code\modules\games\dice.dm" #include "code\modules\games\spaceball_cards.dm" #include "code\modules\games\tarot.dm"