mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
17 lines
13 KiB
HTML
17 lines
13 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/obj/item/deck - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="obj/item/deck.html#var">Var Details</a> - <a href="obj/item/deck.html#proc">Proc Details</a></header><main><h1>deck <aside>/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/deck.html">deck</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L17"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 17"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/item/deck.html#var/card_attack_verb">card_attack_verb</a></th><td>Inherited card verbs</td></tr><tr><th><a href="obj/item/deck.html#var/card_force">card_force</a></th><td>Inherited card force</td></tr><tr><th><a href="obj/item/deck.html#var/card_hitsound">card_hitsound</a></th><td>Inherited card hit sound</td></tr><tr><th><a href="obj/item/deck.html#var/card_resistance_flags">card_resistance_flags</a></th><td>Inherited card resistance</td></tr><tr><th><a href="obj/item/deck.html#var/card_style">card_style</a></th><td>Styling for the cards, if they have multiple sets of sprites</td></tr><tr><th><a href="obj/item/deck.html#var/card_throw_range">card_throw_range</a></th><td>Inherited card throw range</td></tr><tr><th><a href="obj/item/deck.html#var/card_throw_speed">card_throw_speed</a></th><td>Inherited card throw speed</td></tr><tr><th><a href="obj/item/deck.html#var/card_throwforce">card_throwforce</a></th><td>Inherited card throw force</td></tr><tr><th><a href="obj/item/deck.html#var/deck_size">deck_size</a></th><td>How many copies of the base deck (built in build_deck()) should be added?</td></tr><tr><th><a href="obj/item/deck.html#var/deck_style">deck_style</a></th><td>Styling for the deck, it they has multiple sets of sprites</td></tr><tr><th><a href="obj/item/deck.html#var/deck_total">deck_total</a></th><td>The number of cards in a full deck. Set on init after all cards are created/added.</td></tr><tr><th><a href="obj/item/deck.html#var/last_player_action">last_player_action</a></th><td>The action that the last player made. Should be in the form of "played a card", "drew a card."</td></tr><tr><th><a href="obj/item/deck.html#var/last_player_name">last_player_name</a></th><td>The name of the last player to interact with this deck.</td></tr><tr><th><a href="obj/item/deck.html#var/main_deck_id">main_deck_id</a></th><td>ID used to track the decks and cardhands that can be combined into one another.</td></tr><tr><th><a href="obj/item/deck.html#var/shuffle_cooldown">shuffle_cooldown</a></th><td>How often the deck can be shuffled.</td></tr><tr><th><a href="obj/item/deck.html#var/simple_deck">simple_deck</a></th><td>For decks without a full set of sprites</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/item/deck.html#proc/build_deck">build_deck</a></th><td>Stub, override this to define how a base deck should be filled and built.</td></tr><tr><th><a href="obj/item/deck.html#proc/build_decks">build_decks</a></th><td>Fill the deck with all the specified cards.
|
|
Uses deck_size to determine how many times to call build_deck()</td></tr><tr><th><a href="obj/item/deck.html#proc/draw_card">draw_card</a></th><td>Draw a card from this deck.
|
|
Arguments:</td></tr><tr><th><a href="obj/item/deck.html#proc/return_cards">return_cards</a></th><td>Return a number of cards to a deck.</td></tr><tr><th><a href="obj/item/deck.html#proc/return_hand_click">return_hand_click</a></th><td>Return a single card to the deck.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/card_attack_verb"><aside class="declaration">var </aside>card_attack_verb <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L50"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 50"></a></h3><p>Inherited card verbs</p><h3 id="var/card_force"><aside class="declaration">var </aside>card_force <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L42"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 42"></a></h3><p>Inherited card force</p><h3 id="var/card_hitsound"><aside class="declaration">var </aside>card_hitsound <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L40"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 40"></a></h3><p>Inherited card hit sound</p><h3 id="var/card_resistance_flags"><aside class="declaration">var </aside>card_resistance_flags <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L52"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 52"></a></h3><p>Inherited card resistance</p><h3 id="var/card_style"><aside class="declaration">var </aside>card_style <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L34"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 34"></a></h3><p>Styling for the cards, if they have multiple sets of sprites</p><h3 id="var/card_throw_range"><aside class="declaration">var </aside>card_throw_range <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L48"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 48"></a></h3><p>Inherited card throw range</p><h3 id="var/card_throw_speed"><aside class="declaration">var </aside>card_throw_speed <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L46"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 46"></a></h3><p>Inherited card throw speed</p><h3 id="var/card_throwforce"><aside class="declaration">var </aside>card_throwforce <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L44"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 44"></a></h3><p>Inherited card throw force</p><h3 id="var/deck_size"><aside class="declaration">var </aside>deck_size <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L30"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 30"></a></h3><p>How many copies of the base deck (built in build_deck()) should be added?</p><h3 id="var/deck_style"><aside class="declaration">var </aside>deck_style <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L36"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 36"></a></h3><p>Styling for the deck, it they has multiple sets of sprites</p><h3 id="var/deck_total"><aside class="declaration">var </aside>deck_total <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L32"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 32"></a></h3><p>The number of cards in a full deck. Set on init after all cards are created/added.</p><h3 id="var/last_player_action"><aside class="declaration">var </aside>last_player_action <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L58"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 58"></a></h3><p>The action that the last player made. Should be in the form of "played a card", "drew a card."</p><h3 id="var/last_player_name"><aside class="declaration">var </aside>last_player_name <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L56"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 56"></a></h3><p>The name of the last player to interact with this deck.</p><h3 id="var/main_deck_id"><aside class="declaration">var </aside>main_deck_id <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L54"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 54"></a></h3><p>ID used to track the decks and cardhands that can be combined into one another.</p><h3 id="var/shuffle_cooldown"><aside class="declaration">var </aside>shuffle_cooldown <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L28"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 28"></a></h3><p>How often the deck can be shuffled.</p><h3 id="var/simple_deck"><aside class="declaration">var </aside>simple_deck <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L38"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 38"></a></h3><p>For decks without a full set of sprites</p><h2 id="proc">Proc Details</h2><h3 id="proc/build_deck"><aside class="declaration">proc </aside>build_deck<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L123"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 123"></a></aside></h3><p>Stub, override this to define how a base deck should be filled and built.</p><h3 id="proc/build_decks"><aside class="declaration">proc </aside>build_decks<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L114"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 114"></a></aside></h3><p>Fill the deck with all the specified cards.
|
|
Uses deck_size to determine how many times to call build_deck()</p><h3 id="proc/draw_card"><aside class="declaration">proc </aside>draw_card<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/user, public, draw_from_top) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L352"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 352"></a></aside></h3><p>Draw a card from this deck.
|
|
Arguments:</p>
|
|
<ul>
|
|
<li>user - The mob drawing the card.</li>
|
|
<li>public - If true, the drawn card will be displayed to people around the table.</li>
|
|
<li>draw_from_top - If true, the card will be drawn from the top of the deck.</li>
|
|
</ul><h3 id="proc/return_cards"><aside class="declaration">proc </aside>return_cards<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/user, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/cardhand.html">cardhand</a>/hand, place_on_top, chosen_cards) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L251"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 251"></a></aside></h3><p>Return a number of cards to a deck.</p>
|
|
<p>Arguments:</p>
|
|
<ul>
|
|
<li>user - The mob returning the cards.</li>
|
|
<li>hand - The hand from which the cards are being returned.</li>
|
|
<li>place_on_top - If true, cards will be placed on the top of the deck. Otherwise, they'll be placed on the bottom.</li>
|
|
<li>chosen_cards - If not empty, will essentially override any selection dialogs and force these cards to be returned.</li>
|
|
</ul><h3 id="proc/return_hand_click"><aside class="declaration">proc </aside>return_hand_click<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/user, on_top) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/games/cards.dm#L213"><img src="git.png" width="16" height="16" title="code/modules/games/cards.dm 213"></a></aside></h3><p>Return a single card to the deck.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/776b9861f70566b1e6a0763a465ef22f7920a3d6">776b986</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |