Skip to content

Commit

Permalink
Weyland Yutani Trading Cards™ (#5665)
Browse files Browse the repository at this point in the history
# About the pull request

Adds Weyland Yutani Trading Cards™ to the rec vendor
Adds Weyland Yutani Trading Cards™ packs of five to the rec vendor
Adds Weyland Yutani Trading Cards Gold™ cigarette packs to the rec
vendor and colony cigarette machines (that exist soley to break the
lucky strikes military tobacco monopoly)

# Explain why it's good for the game

Adds some funny cards for marines to collect and to fight each other
over

# Testing Photographs and Procedure

<details>
<summary>Screenshots & Videos</summary>


https://cdn.discordapp.com/attachments/745447048261795890/1203903068756906016/2024-02-05_03-17-17.mp4?ex=65d2c91b&is=65c0541b&hm=13a9bbf4e63e9c3f8f14f02233ea9d43eaa62862957474677171dddde10efdf7&

</details>


# Changelog

:cl:
add: Added WeyYu Trading Cards (they come in packs of 5, single, or in
special packs of WeyYu Gold) buyable at rec vendor (and/or colony
tobacco vendors in the case of the special cigarette packs)
imageadd: Added sprites of the WeyYu Trading Cards, trading card packs,
and special WeyYu Gold cigarette packs.
/:cl:

---------

Co-authored-by: harryob <[email protected]>
  • Loading branch information
Warfan1815 and harryob committed Feb 23, 2024
1 parent d41da32 commit 772e5bf
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 2 deletions.
17 changes: 15 additions & 2 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,30 @@
/obj/item/storage/fancy/cigarettes/arcturian_ace = 15,
/obj/item/storage/fancy/cigarettes/emeraldgreen = 15,
/obj/item/storage/fancy/cigarettes/wypacket = 15,
/obj/item/storage/fancy/cigarettes/trading_card = 15,
/obj/item/storage/fancy/cigarettes/lady_finger = 15,
/obj/item/storage/fancy/cigarettes/blackpack = 10,
/obj/item/storage/fancy/cigar/tarbacks = 5,

/obj/item/storage/box/matches = 10,
/obj/item/tool/lighter/random = 20,
/obj/item/tool/lighter/zippo = 5,

)

prices = list(
/obj/item/storage/fancy/cigarettes/kpack = 40,
/obj/item/storage/fancy/cigarettes/arcturian_ace = 25,
/obj/item/storage/fancy/cigarettes/emeraldgreen = 35,
/obj/item/storage/fancy/cigarettes/wypacket = 35,
/obj/item/storage/fancy/cigarettes/wypacket = 30,
/obj/item/storage/fancy/cigarettes/trading_card = 35,
/obj/item/storage/fancy/cigarettes/lady_finger = 30,
/obj/item/storage/fancy/cigarettes/blackpack = 75,
/obj/item/storage/fancy/cigar/tarbacks = 35,
/obj/item/storage/box/matches = 1,
/obj/item/tool/lighter/random = 10,
/obj/item/tool/lighter/zippo = 25,

)

/obj/structure/machinery/vending/security
Expand Down Expand Up @@ -407,7 +412,7 @@
name = "\improper Rec-Vend"
desc = "Contains Weyland-Yutani approved recreational items, like Walkmans and Cards."
icon_state = "walkman"
product_ads = "The only place to have fun in the entire Marine Corps!;You'll find no better music from here to Arcturus!;Instructions not included with decks of cards!;No volume controls - you don't need them!;All products responsibly made by people having just as much fun as you will be!"
product_ads = "The only place to have fun in the entire Marine Corps!;You'll find no better music from here to Arcturus!;Instructions not included with decks of cards!;No volume controls - you don't need them!;All products responsibly made by people having just as much fun as you will be!;Say goodbye to the lucky strike military tobacco monopoly, with the new Weyland Yutani Military Trading Card Gold cigarette pack!"
vend_delay = 0.5 SECONDS
idle_power_usage = 200

Expand Down Expand Up @@ -436,6 +441,10 @@
/obj/item/tool/pen/blue = 10,
/obj/item/tool/pen/red = 10,
/obj/item/tool/pen/fountain = 3,
/obj/item/storage/fancy/cigarettes/trading_card = 20,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 50,

)

contraband = list(/obj/item/toy/sword = 2)
Expand Down Expand Up @@ -463,6 +472,10 @@
/obj/item/tool/pen/blue = 2,
/obj/item/tool/pen/red = 2,
/obj/item/tool/pen/fountain = 30,
/obj/item/storage/fancy/cigarettes/trading_card = 30,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 5,

)
product_type = VENDOR_PRODUCT_TYPE_RECREATIONAL

Expand Down
110 changes: 110 additions & 0 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,46 @@
default_cig_type = /obj/item/clothing/mask/cigarette/ucigarette
storage_slots = 4

/obj/item/storage/fancy/cigarettes/trading_card
name = "\improper WeyYu Gold Military Trading Card packet"
desc = "Gotta collect 'em all, and smoke 'em all! This fancy military trading card version of Weyland Yutani Gold cigarette packs has one card that is apart of the 3 available 5-card sets."
icon_state = "collectpacket"
item_state = "collectpacket"
storage_slots = 21
can_hold = list(
/obj/item/clothing/mask/cigarette,
/obj/item/clothing/mask/cigarette/ucigarette,
/obj/item/clothing/mask/cigarette/bcigarette,
/obj/item/tool/lighter,
/obj/item/toy/trading_card,
)
var/obj/item/toy/trading_card/trading_card

/obj/item/storage/fancy/cigarettes/trading_card/fill_preset_inventory()
flags_atom |= NOREACT
for(var/i = 1 to (storage_slots-1))
new default_cig_type(src)
trading_card = new(src)

/obj/item/storage/fancy/cigarettes/trading_card/attack_hand(mob/user, mods)
if(trading_card?.loc == src && loc == user)
user.visible_message(SPAN_NOTICE("You pull a [trading_card.collection_color] trading card out of the cigarette pack."))
//have to take two disparate systems n' ram 'em together
remove_from_storage(trading_card, user.loc)
user.put_in_hands(trading_card)
trading_card = null

return ..()

/obj/item/storage/fancy/cigarettes/trading_card/attackby(obj/item/attacked_by_item, mob/user)
if(istype(attacked_by_item, /obj/item/toy/trading_card))
trading_card = attacked_by_item

return ..()

/////////////
//CIGAR BOX//
/////////////
// CIGAR BOX

/obj/item/storage/fancy/cigar
Expand Down Expand Up @@ -409,3 +449,73 @@
/obj/item/storage/lockbox/vials/attackby(obj/item/W as obj, mob/user as mob)
..()
update_icon()

// Trading Card Pack

/obj/item/storage/fancy/trading_card
name = "pack of Red WeyYu Military Trading Cards"
desc = "A 5 pack of Red Weyland Yutani Military Trading Cards."
icon = 'icons/obj/items/playing_cards.dmi'
icon_state = "trading_red_pack_closed"
storage_slots = 5
icon_type = "trading card"
can_hold = list(/obj/item/toy/trading_card)
foldable = /obj/item/stack/sheet/cardboard
var/collection_color = null
var/obj/item/toy/trading_card/top_trading_card

/obj/item/storage/fancy/trading_card/Initialize()
if(!collection_color)
collection_color = pick("red", "green", "blue") // because of vodoo shenanigans with fill_preset_inventory happening during parent's initalize this'll have to run prior to that

. = ..()

name = "pack of [capitalize(collection_color)] WeyYu Military Trading Cards"
desc = "A 5 pack of [capitalize(collection_color)] Weyland Yutani Military Trading Cards."
icon_state = "trading_[collection_color]_pack_closed"


/obj/item/storage/fancy/trading_card/fill_preset_inventory()

for(var/i in 1 to storage_slots)
top_trading_card = new /obj/item/toy/trading_card(src)

/obj/item/storage/fancy/trading_card/update_icon()
if(!(top_trading_card))
icon_state = "trading_[collection_color]_pack_empty"
return
if(length(contents) == storage_slots)
icon_state = "trading_[collection_color]_pack_closed"
return
icon_state = "trading_[collection_color]_pack_open"

/obj/item/storage/fancy/trading_card/attack_hand(mob/user, mods)
if(top_trading_card?.loc == src && loc == user)
user.visible_message(SPAN_NOTICE("You pull a [top_trading_card.collection_color] trading card out of the pack."))
//have to take two disparate systems n' ram 'em together
remove_from_storage(top_trading_card, user.loc)
user.put_in_hands(top_trading_card)
if(!(length(contents)))
top_trading_card = null
update_icon()
return
top_trading_card = contents[(length(contents))]
update_icon()
return

return ..()

/obj/item/storage/fancy/trading_card/attackby(obj/item/attacked_by_item, mob/user)
if(istype(attacked_by_item, /obj/item/toy/trading_card))
top_trading_card = attacked_by_item

return ..()

/obj/item/storage/fancy/trading_card/red
collection_color = "red"

/obj/item/storage/fancy/trading_card/green
collection_color = "green"

/obj/item/storage/fancy/trading_card/blue
collection_color = "blue"
61 changes: 61 additions & 0 deletions code/game/objects/items/toys/trading_cards.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/obj/item/toy/trading_card
name = "WeyYu Military Trading Card"
icon = 'icons/obj/items/playing_cards.dmi'
icon_state = "trading_red"
w_class = SIZE_TINY

var/trading_card_number = "1"
var/picture_description = "barrel charger"
var/collection_color
var/is_front = FALSE
var/back_name = "Red WeyYu Military Trading Card"
var/front_name = "Red WeyYu Military Trading Card Number One"
var/back_description = "The back of a red trading card with the text: WeyYu Military Trading Cards! GOTTA COLLECT EM ALL!"
var/front_description = "A red trading card with a picture of the United Americas flag emblazoned on it. It is number one out of the five red cards."
var/back_icon_state = "trading_red"
var/front_icon_state = "trading_red_one"
var/picture_descriptions = list("5" = list("red" = "a Holy Order of the HEFA cultist", "green" = "General Delyla S. Vaughn (the Assistant Commandant of the United States Colonial Marines)", "blue" = "the Weyland Yutani logo"),
"4" = list("red" = "a UPPA officer", "green" = "General Diego Dellamarggio (the Commandant of the United States Colonial Marines)", "blue" = "the Independent Core System Colonies logo"),
"3" = list("red" = "a UPPA minigunner", "green" = "Generale d'armee Felix Couture (the Commandant of the Canadian Colonial Armed Forces)", "blue" = "the Three World Empire flag"),
"2" = list("red" = "a UPPA soldier", "green" = "Marechal-do-ar Enzo Gabriel Lurdes (the Chief of Naval Operations of the Latin American Colonial Navy)", "blue" = "the Union of Progressive Peoples flag"),
"1" = list("red" = "a fanatical colonial seditionist", "green" = "Almirante Joelle De La Cruz (the United Americas Secretary of Defense)", "blue" = "the United Americas flag",)
)

/obj/item/toy/trading_card/Initialize()
. = ..()

if(istype(loc, /obj/item/storage/fancy/trading_card))
var/obj/item/storage/fancy/trading_card/packet = loc
collection_color = packet.collection_color

if(!collection_color)
collection_color = pick("red", "green", "blue")
trading_card_number = pick_weight(list("5" = 25, "4" = 20, "3" = 15, "2" = 10, "1" = 5))
picture_description = picture_descriptions[trading_card_number][collection_color]

name = "[capitalize(collection_color)] WeyYu Military Trading Card"
back_name = "[capitalize(collection_color)] WeyYu Military Trading Card"
front_name = "[capitalize(collection_color)] WeyYu Military Trading Card #[trading_card_number]"

desc = "The back of a [collection_color] trading card with the text: WeyYu Military Trading Cards! GOTTA COLLECT EM ALL!"
back_description = "The back of a [collection_color] trading card with the text: WeyYu Military Trading Cards! GOTTA COLLECT EM ALL!"
front_description = "A [collection_color] trading card with a picture of [picture_description] emblazoned on it. It is #[trading_card_number] out of the five [collection_color] cards."

icon_state = "trading_[collection_color]"
back_icon_state = "trading_[collection_color]"
front_icon_state = "trading_[collection_color]_[trading_card_number]"

/obj/item/toy/trading_card/attack_self(mob/user)
if(loc == user)
if(is_front)
name = back_name
desc = back_description
icon_state = back_icon_state
is_front = FALSE
else
to_chat(user, SPAN_NOTICE("You reveal the card. It has a picture of [picture_description] on it!"))
name = front_name
desc = front_description
icon_state = front_icon_state
is_front = TRUE
return ..()
8 changes: 8 additions & 0 deletions code/modules/client/preferences_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ GLOBAL_LIST_EMPTY(gear_datums_by_name)
display_name = "Card, Uno Reverse - yellow"
path = /obj/item/toy/handcard/uno_reverse_yellow

/datum/gear/toy/card/trading_card
display_name = "Card, random WeyYu Trading"
path = /obj/item/toy/trading_card

/datum/gear/toy/deck
display_name = "Deck of cards, regular"
path = /obj/item/toy/deck
Expand All @@ -523,6 +527,10 @@ GLOBAL_LIST_EMPTY(gear_datums_by_name)
display_name = "Deck of cards, Uno"
path = /obj/item/toy/deck/uno

/datum/gear/toy/trading_card
display_name = "Trading Card Packet"
path = /obj/item/storage/fancy/trading_card

/datum/gear/toy/d6
display_name = "Die, 6 sides"
path = /obj/item/toy/dice
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@
#include "code\game\objects\items\toys\crayons.dm"
#include "code\game\objects\items\toys\toy_weapons.dm"
#include "code\game\objects\items\toys\toys.dm"
#include "code\game\objects\items\toys\trading_cards.dm"
#include "code\game\objects\items\weapons\blades.dm"
#include "code\game\objects\items\weapons\energy.dm"
#include "code\game\objects\items\weapons\misc.dm"
Expand Down
Binary file modified icons/obj/items/cigarettes.dmi
Binary file not shown.
Binary file modified icons/obj/items/playing_cards.dmi
Binary file not shown.

0 comments on commit 772e5bf

Please sign in to comment.