46920eeb39
-Removes the unused/dumb access stuff from space cash. -Fixes a bug where dice would vanish if you used a hand labeller on them. -Moves space cash/coins/mint sprites into their own file, economy.dmi. Moves mineral sheets into mining.dmi. -Coins are flippable! Features unique flipping sprites and sound effects, and two-headed coins. -Oh and better sprites for wooden closets too.
28 lines
915 B
Plaintext
28 lines
915 B
Plaintext
/obj/item/weapon/dice
|
|
name = "d6"
|
|
desc = "A dice with six sides."
|
|
icon = 'icons/obj/dice.dmi'
|
|
icon_state = "d6"
|
|
w_class = 1
|
|
var/sides = 6
|
|
|
|
/obj/item/weapon/dice/New()
|
|
icon_state = "[initial(icon_state)][rand(sides)]"
|
|
|
|
/obj/item/weapon/dice/d20
|
|
name = "d20"
|
|
desc = "A dice with twenty sides."
|
|
icon_state = "d20"
|
|
sides = 20
|
|
|
|
/obj/item/weapon/dice/attack_self(mob/user as mob)
|
|
var/result = rand(1, sides)
|
|
var/comment = ""
|
|
if(sides == 20 && result == 20)
|
|
comment = "Nat 20!"
|
|
else if(sides == 20 && result == 1)
|
|
comment = "Ouch, bad luck."
|
|
icon_state = "[initial(icon_state)][result]"
|
|
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
|
|
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
|
|
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>") |