Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+14 -15
View File
@@ -9,9 +9,9 @@
/obj/item/weapon/deck
name = "deck of cards"
desc = "A simple deck of playing cards."
icon = 'icons/obj/playing_cards.dmi'
icon = 'playing_cards.dmi'
icon_state = "deck"
w_class = WEIGHT_CLASS_SMALL
w_class = 2
flags = NOBLUDGEON
var/list/cards = list()
@@ -19,19 +19,17 @@
/obj/item/weapon/deck/New()
. = ..()
var/cardcolor
var/color
var/datum/playingcard/card
for (var/suit in list("spades", "clubs", "diamonds", "hearts"))
if (suit == "spades" || suit == "clubs")
cardcolor = "black_"
else
cardcolor = "red_"
if (suit == "spades" || suit == "clubs") color = "black_"
else color = "red_"
for (var/number in list("ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[cardcolor]num"
card.card_icon = "[color]num"
card.suit = suit
card.number = number
@@ -40,7 +38,7 @@
for (var/number in list("jack", "queen", "king"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[cardcolor]col"
card.card_icon = "[color]col"
card.suit = suit
card.number = number
@@ -83,7 +81,7 @@
if(flag)
return //It's adjacent, is the user, or is on the user's person
if(isliving(A))
if (istype(A, /mob/living))
src.dealTo(A, user)
else
return ..()
@@ -119,15 +117,15 @@
/obj/item/weapon/hand
name = "hand of cards"
desc = "Some playing cards."
icon = 'icons/obj/playing_cards.dmi'
icon = 'playing_cards.dmi'
icon_state = "empty"
w_class = WEIGHT_CLASS_TINY
w_class = 1
var/concealed = 0
var/blank = 0
var/list/cards = list()
var/datum/html_interface/hi
resistance_flags = FLAMMABLE
burn_state = FLAMMABLE
/obj/item/weapon/hand/New(loc)
. = ..()
@@ -266,8 +264,9 @@
if (istype(hclient))
switch (href_list["action"])
if ("play_card")
var/datum/playingcard/card = locate(href_list["card"]) in cards
if (card && istype(card))
var/datum/playingcard/card = locate(href_list["card"])
if (card in src.cards)
src.discard(card)
if ("toggle_conceal")
src.toggle_conceal()
+1 -2
View File
@@ -29,7 +29,6 @@ var/global/list/cards_against_space
card_text_file = "strings/cas_black.txt"
/obj/item/toy/cards/deck/cas/New()
..()
if(!cards_against_space) //saves loading from the files every single time a new deck is created, but still lets each deck have a random assortment, it's purely an optimisation
cards_against_space = list("cas_white" = file2list("strings/cas_white.txt"),"cas_black" = file2list("strings/cas_black.txt"))
allcards = cards_against_space[card_face]
@@ -126,7 +125,7 @@ var/global/list/cards_against_space
flipped = !flipped
update_icon()
/obj/item/toy/cards/singlecard/cas/AltClick(mob/living/user)
obj/item/toy/cards/singlecard/cas/AltClick(mob/living/user)
if(!user.canUseTopic(src,1))
return
Flip()