Files
Paradise/code/modules/games/52card.dm
Vi3trice f4b37b4177 Port TG updating appearances (#17943)
* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
2022-07-21 08:11:59 +02:00

89 lines
2.8 KiB
Plaintext

/obj/item/deck/holder
name = "card box"
desc = "A small leather case to show how classy you are compared to everyone else."
icon_state = "card_holder"
/obj/item/deck/cards
name = "deck of cards"
desc = "A simple deck of playing cards."
icon_state = "deck_nanotrasen_full"
card_style = "nanotrasen"
/obj/item/deck/cards/build_deck()
for(var/suit in list("Spades","Clubs","Diamonds","Hearts"))
var/card_appearance
var/colour
var/rank
if(simple_deck)
if(suit in list("Spades","Clubs"))
colour = "black"
else
colour = "red"
for(var/number in list("Ace","2","3","4","5","6","7","8","9","10","Jack","Queen","King"))
if(simple_deck)
if(number in list("Jack","Queen","King"))
rank = "col"
else
rank = "num"
card_appearance = "sc_[colour]_[rank]_[card_style]"
else
card_appearance = "sc_[number] of [suit]_[card_style]"
cards += new /datum/playingcard("[number] of [suit]", card_appearance, "singlecard_down_[card_style]")
for(var/jokers in 1 to 2)
cards += new /datum/playingcard("Joker", "sc_Joker_[card_style]", "singlecard_down_[card_style]")
/obj/item/deck/cards/update_icon_state()
if(!length(cards))
icon_state = "deck_[card_style]_empty"
return
var/percent = round((length(cards) / deck_total) * 100) // Rounding due to switch freaking out
switch(percent)
if(0 to 20)
icon_state = "deck_[deck_style ? "[deck_style]_" : ""][card_style]_low"
if(21 to 50)
icon_state = "deck_[deck_style ? "[deck_style]_" : ""][card_style]_half"
else
icon_state = "deck_[deck_style ? "[deck_style]_" : ""][card_style]_full"
/obj/item/deck/cards/doublecards
name = "double deck of cards"
icon_state = "deck_double_nanotrasen_full"
desc = "A simple deck of playing cards. Multiplied by two. Does not necessarily come with twice the fun."
deck_size = 2
deck_style = "double"
/obj/item/deck/cards/syndicate
name = "suspicious looking deck of cards"
desc = "A deck of space-grade playing cards. They seem unusually rigid."
icon_state = "deck_syndicate_full"
card_style = "syndicate"
card_hitsound = 'sound/weapons/bladeslice.ogg'
card_force = 5
card_throwforce = 10
card_throw_speed = 3
card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut")
card_resistance_flags = NONE
/obj/item/deck/cards/black
card_style = "black"
/obj/item/deck/cards/syndicate/black
card_style = "black"
/obj/item/deck/cards/tiny
name = "deck of tiny cards"
desc = "A simple deck of tiny playing cards."
icon_state = "deck"
card_style = "simple"
simple_deck = TRUE
/obj/item/deck/cards/tiny/update_icon_state()
return
/obj/item/deck/cards/tiny/doublecards
name = "double deck of tiny cards"
desc = "A simple deck of tiny playing cards. Multiplied by two. Does not necessarily come with twice the fun."
icon_state = "doubledeck"
deck_size = 2