From 7d83a629b035cb3a709ff3742d2751b87337f8aa Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 14 Feb 2016 11:28:03 +1030 Subject: [PATCH] Added Cards Against The Galaxy. --- code/modules/games/cah.dm | 28 ++++++++++ code/modules/games/cah_black_cards.dm | 37 +++++++++++++ code/modules/games/cah_white_cards.dm | 75 ++++++++++++++++++++++++++ code/modules/games/cardemon.dm | 1 + code/modules/games/cards.dm | 20 +++++-- code/modules/games/spaceball_cards.dm | 1 + code/modules/games/tarot.dm | 2 - icons/obj/playing_cards.dmi | Bin 1669 -> 1945 bytes polaris.dme | 3 ++ 9 files changed, 160 insertions(+), 7 deletions(-) create mode 100644 code/modules/games/cah.dm create mode 100644 code/modules/games/cah_black_cards.dm create mode 100644 code/modules/games/cah_white_cards.dm diff --git a/code/modules/games/cah.dm b/code/modules/games/cah.dm new file mode 100644 index 0000000000..2b9286a8a3 --- /dev/null +++ b/code/modules/games/cah.dm @@ -0,0 +1,28 @@ +/obj/item/weapon/deck/cah + name = "\improper CAG deck (white)" + desc = "The ever-popular Cards Against The Galaxy word game. Warning: may include traces of broken fourth wall. This is the white deck." + icon_state = "cag_white" + var/blanks = 5 + +/obj/item/weapon/deck/cah/black + name = "\improper CAG deck (black)" + desc = "The ever-popular Cards Against The Galaxy word game. Warning: may include traces of broken fourth wall. This is the black deck." + icon_state = "cag_black" + blanks = 0 + +/obj/item/weapon/deck/cah/New() + ..() + var/datum/playingcard/P + for(var/cardtext in card_text_list) + P = new() + P.name = "[cardtext]" + P.card_icon = "[icon_state]_card" + P.back_icon = "[icon_state]_card_back" + cards += P + if(!blanks) + return + for(var/x=1 to blanks) + P = new() + P.name = "Blank Card" + P.card_icon = "[icon_state]_card_back" + P.back_icon = "[icon_state]_card_back" \ No newline at end of file diff --git a/code/modules/games/cah_black_cards.dm b/code/modules/games/cah_black_cards.dm new file mode 100644 index 0000000000..ec27fa1270 --- /dev/null +++ b/code/modules/games/cah_black_cards.dm @@ -0,0 +1,37 @@ +// Black cards. +/obj/item/weapon/deck/cah/black/card_text_list = list( + "Why am I itchy?", + "Today, Security shot ____.", + "The Chaplain this shift is worshiping _____.", + "Cargo ordered a crate full of _____.", + "An ERT was called due to ______.", + "Alert! The Captain has armed themselves with _____.", + "Current Laws: ________ is your master.", + "Current Laws: ________ is the enemy.", + "_____ vented the entirety of Cargo.", + "Today, science found an anomaly that made people ____ and ____.", + "There was a rap battle between ____ and ____.", + "Caution, ______ have been detected in collision course with the station.", + "Today's kitchen menu includes _______.", + "What did the mercenaries want when they attacked the station?", + "I think the Captain is insane. He just demanded ______ in his office.", + "Fuckin' scientists, they just turned Misc. Research into _______ .", + "What's my fetish?", + "Hello, _______ here with _______", + "No one else was at _______, they wouldn't understand the ______", + "Why am I shivering?", + "What is this world coming to? First, ________, now _______", + "NanoTrasen's labor union decided to use _______ to raise employee morale.", + "The Chemist's drug of choice is ______", + "It is common practice for _______ to ______ on Moghes.", + "Mercurial Colonies are _____.", + "The Skrell are celebrating _____ today.", + "_____ is/are why I'm afraid of the maintenance tunnels.", + "_____ used ____ to create their newest invention, _____!", + "Scientists are not allowed to make Gatling _____.", + "It's not a party until the ____ arrive.", + "No matter how many Tajara you have, _____ is never acceptable.", + "No, the AI's first law is NOT to serve _____.", + "The robots are not disposal bins for your _____.", + "You can never have too many _____ on shift.", + ) \ No newline at end of file diff --git a/code/modules/games/cah_white_cards.dm b/code/modules/games/cah_white_cards.dm new file mode 100644 index 0000000000..2ed8a494db --- /dev/null +++ b/code/modules/games/cah_white_cards.dm @@ -0,0 +1,75 @@ +// White cards. +/obj/item/weapon/deck/cah/var/list/card_text_list = list( + "Those motherfucking carp", + "Having sex in the maintenance tunnels", + "Space 'Nam", + "Space lesbians", + "The Gardener getting SUPER high", + "The Captain thinking they're a badass", + "Being in a cult", + "Racially biased lawsets", + "An Unathi who WON'T STOP FIGHTING", + "Tajara fetishists", + "Bald thirty-year-olds", + "A Chief Engineer who can't setup the engine", + "Being sucked out into space", + "Officer Beepsky", + "Engineering", + "The grey tide.", + "The Research Director", + "Fucking synths", + "Man-eating purple pod plants", + "Chemical sprayers filled with lube", + "Librarians", + "Squids", + "Cats", + "Lizards", + "Apes", + "Trees", + "Supermatter undergarments", + "Bluespace", + "Five hundred rabid spiders", + "Five hundred rabid diona nymphs", + "Cable ties", + "Rampant vending machines", + "Positronic drink coasters", + "Kitchen utensil anomalies", + "Locked lockers", + "Energy spatulas", + "Flashbang gauntlets", + "Carp", + "Space whales", + "Blu-sharks", + "Fax machines", + "Exquisite Pens", + "Dr. Maxman's male enhancements", + "Gyrating slimes", + "Forehead-mounted laser weaponry", + "Pelvis-mounted laser weaponry", + "Cardboard cutouts", + "An obscene amount of rubber ducks", + "Brain cakes", + "A drone's game of life.", + "Anomaly suits", + "A gardener smoking reishi", + "Military-grade baseball bats", + "Barricading the bar", + "An irritatingly chipper robot", + "Androids hanging out in the bar drinking beer", + "Gear harnesses", + "A seventeen-year-old Captain", + "The throbbing erection that the HoS gets at the thought of shooting something", + "Trying to stab someone and hugging them instead", + "Waking up naked in the maintenance tunnels", + "Horrible cloning accidents", + "Licking the supermatter due to a dare", + "A Quartermaster who WON'T STOP ordering guns", + "Teaching a synthetic the Birds and the Bees", + "Unnecessary surgery", + "My addiction to spiders", + "wetskrell.nt", + "DOCTOR MAXMAN!", + "A group of Skrell getting their squish on", + "Enough soporific to put the entire station down", + "Delicious Vietnamese cuisine" + ) diff --git a/code/modules/games/cardemon.dm b/code/modules/games/cardemon.dm index 647b1ff8c7..23e8d6e251 100644 --- a/code/modules/games/cardemon.dm +++ b/code/modules/games/cardemon.dm @@ -4,6 +4,7 @@ icon_state = "card_pack_cardemon" /obj/item/weapon/pack/cardemon/New() + ..() var/datum/playingcard/P var/i for(i=0; i<5; i++) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 368bfdd9a5..1ea1a9a356 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -20,7 +20,6 @@ /obj/item/weapon/deck/cards/New() ..() - var/datum/playingcard/P for(var/suit in list("spades","clubs","diamonds","hearts")) @@ -44,7 +43,6 @@ P.back_icon = "card_back" cards += P - for(var/i = 0,i<2,i++) P = new() P.name = "joker" @@ -135,7 +133,19 @@ H.throw_at(get_step(target,target.dir),10,1,H) /obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob) - if(istype(O,/obj/item/weapon/hand)) + if(cards.len == 1 && istype(O, /obj/item/weapon/pen)) + var/datum/playingcard/P = cards[1] + if(P.name != "Blank Card") + user << "You cannot write on that card." + return + var/cardtext = sanitize(input(user, "What do you wish to write on the card?", "Card Editing") as text|null, MAX_BOOK_MESSAGE_LEN) + if(!cardtext) + return + P.name = cardtext + // SNOWFLAKE FOR CAG, REMOVE IF OTHER CARDS ARE ADDED THAT USE THIS. + P.card_icon = "cag_white_card" + update_icon() + else if(istype(O,/obj/item/weapon/hand)) var/obj/item/weapon/hand/H = O for(var/datum/playingcard/P in cards) H.cards += P @@ -214,7 +224,7 @@ if(!discarding || !to_discard[discarding] || !usr || !src) return var/datum/playingcard/card = to_discard[discarding] - qdel(to_discard) + to_discard.Cut() var/obj/item/weapon/hand/H = new(src.loc) H.cards += card @@ -238,7 +248,7 @@ if((!concealed || src.loc == user) && cards.len) user << "It contains: " for(var/datum/playingcard/P in cards) - user << "The [P.name]." + user << "\The [P.name]." /obj/item/weapon/hand/update_icon(var/direction = 0) diff --git a/code/modules/games/spaceball_cards.dm b/code/modules/games/spaceball_cards.dm index 7e289ad270..9e0bacd2be 100644 --- a/code/modules/games/spaceball_cards.dm +++ b/code/modules/games/spaceball_cards.dm @@ -4,6 +4,7 @@ icon_state = "card_pack_spaceball" /obj/item/weapon/pack/spaceball/New() + ..() var/datum/playingcard/P var/i var/year = 554 + text2num(time2text(world.timeofday, "YYYY")) diff --git a/code/modules/games/tarot.dm b/code/modules/games/tarot.dm index b8e8618af0..f5727a0c43 100644 --- a/code/modules/games/tarot.dm +++ b/code/modules/games/tarot.dm @@ -17,8 +17,6 @@ P.back_icon = "card_back_tarot" cards += P for(var/suit in list("wands","pentacles","cups","swords")) - - for(var/number in list("ace","two","three","four","five","six","seven","eight","nine","ten","page","knight","queen","king")) P = new() P.name = "[number] of [suit]" diff --git a/icons/obj/playing_cards.dmi b/icons/obj/playing_cards.dmi index a5fa632cb3ae0d575f1c9cdf1b6eba210d41354e..04239be49d33ad18c8a015e700563ef5fbbfd38e 100644 GIT binary patch delta 1797 zcmV+g2m1Jh4Ve#+7Y@J(0{{R3WdfWv00027ktKyiqiI7b&MMXs^DJf@XXMKHrZ0(3400001bW%=J06^y0W&i*IBazV* zf0fN{!ypXD&*3Rhd!P1o-DPSu^{{Hv9sm*W8WI8s+~xI0Vd`#+>CKLQ{@`!f+49%@ z+u_J}?+5k`F&Xdp3xB@5XWe2n4%vBnWZeMfG+=cSN`!1~G^lCAI&EUg?gQ(-qMV`H zS4hdIMK9GPP)3h*z9Dl8Qb8}RZHT#8e=vJT3%QLJpT=fU8-qTqMB~nLdsspMq6Xmx z-2!72YFWb_WwD&O1Ew_n#If+lm6QP#>7vTTu<<>=QXtL&21 zT7P?G)j3enwD?HQ8^EDdmN0|MQE539gSVQxVwG)K=94IsA(6{q5a?uSqYNF1!qY_K~#90?VW8`;y4(FTT@z0)1{3>afCro zU}g*WGBamf|Njr$Bz2rGeeSSyS(}PK81!e^nF-d2sfJBct;Z2c3&SSq=t*&Z|mSn$Da0XG237 z*!}_woLiv41s2d+BZ1MV8ja|@sXsI(CJYkWUm$_Y%k#@mNZ{(?3JK`3{XqhitZ0GP z`Y|;Gi6~Sdkihw;^GhIbVFfOLz<4~-C7MDKjlfB6eEqW_wF(mZ`U}-Te;_mhgF!h! z0#Zv!k5HcGCU^DaY25xBNm00EKo{)11_FyXm1zd1m^Fx9{Zr}}tU#ee2LXLzS7`?U z?EvpWd5Y>sQ7=i{8!?%`{dFLwCJ)0f48t%C!!QiPF#l&{*8G?QLo;p6$4RZ&1fBra4Gy9X01v}<;jQsw)B=f1yr(~Y{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wd^5tigz1R|X6ox2b7=~dOhGG7H zC%z#gVM&sd%(L8)y*n@59}va6b4PqDWl4oXD5Z5m9-RN@$m#sXLFb~X>#7oT-ZZ8$ zbbc!TZqZT(wtj&H?k!N@0Sg#okU-ZpT}S7q@)vCz69$Q`Um$_U$NR@mNZ{$=2?>~` z{UCuxHnhNN`7zakL};Z261e|#{|E$s9<0Cv5Lhl(rbbgpq7K}YtuOy>L9K$so`0bx z2!uLNRds~~q>+;DP??o&>B^V4@!Q`>w06sYE^zW12rS}EW;vK*)*yD}-%?+&0$Pa) z0_Mi9(g^~_0j@%2hRTnkG)dfrn9S$D55&~uVHk#C7=~dOhG7`yUq486@EM-+_S7fq>61DUcZh7qQ=e2Le6^0zMB+p=kmr zw*r3u9SHaw2>2Wc`0aI2;H3Nm+y^d9ocjWDvcQS?#mRqjp`2kDhG7_nVHk#Cn7@{( z&wVBv2mNUB)bT@kly9|GTkzyd+X2LcU$E+Ah{%m4oS0K+g0!!QiPFbu;m4D&8R`z}HhecwM{Z64ge zFZ}z3dXNu$oQIBAa?0_i{dcf`FVvUa7chWO`$54xO;ebEm0w}5QZ&93Xwcqcp?2SP z=nN^fM}MFQ2owPUd;At1?*v|uK(BEJdaYmwdYz;R%&|b9Znm3$bV3JuZ9Aaom$O)b zy~25db1MMzZMp?{l)vEZ>yrTeb{pRTnA<4?^Rg`Q_$eAcxPR{j!0T~(tp|m370Ame z#|Q5N&-N-@fcFc{oihx>Fbu;m48weEhGBqtUDto8l6Nr-CQpu=Rgmi<#DdH5gs_ z)Nh5e1cVh>ibHbj17iLC$B)a@7iJ_T&u^Rn`aSIg>iNn)1A8lj lxxJPBp-LErVHoB^@DtB2kKuw2rYZmc002ovPDHLkV1l&y%L)Jh diff --git a/polaris.dme b/polaris.dme index d29063995c..72db1bfb64 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1154,6 +1154,9 @@ #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" #include "code\modules\food\recipes_microwave.dm" +#include "code\modules\games\cah.dm" +#include "code\modules\games\cah_black_cards.dm" +#include "code\modules\games\cah_white_cards.dm" #include "code\modules\games\cardemon.dm" #include "code\modules\games\cards.dm" #include "code\modules\games\spaceball_cards.dm"