Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weyland Yutani Trading Cards™ #5665

Merged
merged 23 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 /obj/item/toy/trading_card(src)
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

/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

. = ..()
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/storage/fancy/cigarettes/trading_card/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/toy/trading_card))
trading_card = W
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

. = ..()
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

/////////////
//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 = 1, i <= storage_slots, i++)
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved
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) == 5)
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved
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

. = ..()
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/storage/fancy/trading_card/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/toy/trading_card))
top_trading_card = W
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

. = ..()
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved

/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 a barrel charger 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" = "red dot sight", "green" = "protein bar", "blue" = "m2c ammo box"),
"4" = list("red" = "suppressor", "green" = "onigiri", "blue" = "m37 shotgun buckshot"),
"3" = list("red" = "magnetic harness", "green" = "sushi roll", "blue" = "m4ra magazine"),
"2" = list("red" = "angled grip", "green" = "chicken ribs", "blue" = "m4a1 magazine"),
"1" = list("red" = "barrel charger", "green" = "burger", "blue" = "m39 hollowpoint magazine")
)

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

if(istype(src.loc, /obj/item/storage/fancy/trading_card))
var/obj/item/storage/fancy/trading_card/packet = src.loc
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved
collection_color = packet.collection_color

if(!collection_color)
collection_color = pick("red", "green", "blue")
trading_card_number = pick_weight(list("5" = 2, "4" = 2, "3" = 2, "2" = 2, "1" = 1))
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 a [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>You reveal the card. It has a picture of a [picture_description] on it!</span>")
name = front_name
desc = front_description
icon_state = front_icon_state
is_front = TRUE
. = ..()
Warfan1815 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,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.
Loading