mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-10 22:52:41 +01:00
c716971fb4
- Added walls around casino in space, come on people youre not supposed to spacewalk and steal from it... - A new wall dispenser that gives space cleaner, perfect for janitors on luxury cruisers and casinos - Relay on casino, so finally folks can talk without event manager having to panic about lack of comms >> - Platinum chip can now be flipped like a coin! - Wallets can now hold casino chips and platinum coin, and theres also a casino wallet that can change between 3 designs - Theres now a casino chip exchanger, only accepts cash and doesnt give back change! - Casino now has curtains for some tables so not everyone screams into each others ears - redefined casino manual to include self betting, reduced sentient prize cost, taken out rules with usage of joker card, added group blackjack and Cards against the galaxy.
136 lines
3.7 KiB
Plaintext
136 lines
3.7 KiB
Plaintext
/obj/item/weapon/storage/wallet
|
|
name = "wallet"
|
|
desc = "It can hold a few small and personal things."
|
|
storage_slots = 10
|
|
icon = 'icons/obj/wallet.dmi'
|
|
icon_state = "wallet-orange"
|
|
w_class = ITEMSIZE_SMALL
|
|
can_hold = list(
|
|
/obj/item/weapon/spacecash,
|
|
/obj/item/weapon/card,
|
|
/obj/item/clothing/mask/smokable/cigarette/,
|
|
/obj/item/device/flashlight/pen,
|
|
/obj/item/device/tape,
|
|
/obj/item/weapon/cartridge,
|
|
/obj/item/device/encryptionkey,
|
|
/obj/item/seeds,
|
|
/obj/item/stack/medical,
|
|
/obj/item/weapon/coin,
|
|
/obj/item/weapon/dice,
|
|
/obj/item/weapon/disk,
|
|
/obj/item/weapon/implanter,
|
|
/obj/item/weapon/flame/lighter,
|
|
/obj/item/weapon/flame/match,
|
|
/obj/item/weapon/forensics,
|
|
/obj/item/weapon/glass_extra,
|
|
/obj/item/weapon/haircomb,
|
|
/obj/item/weapon/hand,
|
|
/obj/item/weapon/key,
|
|
/obj/item/weapon/lipstick,
|
|
/obj/item/weapon/paper,
|
|
/obj/item/weapon/pen,
|
|
/obj/item/weapon/photo,
|
|
/obj/item/weapon/reagent_containers/dropper,
|
|
/obj/item/weapon/sample,
|
|
/obj/item/weapon/screwdriver,
|
|
/obj/item/weapon/stamp,
|
|
/obj/item/clothing/accessory/permit,
|
|
/obj/item/clothing/accessory/badge,
|
|
/obj/item/weapon/spacecasinocash,
|
|
/obj/item/weapon/casino_platinum_chip
|
|
)
|
|
cant_hold = list(/obj/item/weapon/screwdriver/power)
|
|
slot_flags = SLOT_ID
|
|
|
|
var/obj/item/weapon/card/id/front_id = null
|
|
|
|
/obj/item/weapon/storage/wallet/remove_from_storage(obj/item/W as obj, atom/new_location)
|
|
. = ..(W, new_location)
|
|
if(.)
|
|
if(W == front_id)
|
|
front_id = null
|
|
name = initial(name)
|
|
update_icon()
|
|
|
|
/obj/item/weapon/storage/wallet/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
|
. = ..(W, prevent_warning)
|
|
if(.)
|
|
if(!front_id && istype(W, /obj/item/weapon/card/id))
|
|
front_id = W
|
|
name = "[name] ([front_id])"
|
|
update_icon()
|
|
|
|
/obj/item/weapon/storage/wallet/update_icon()
|
|
overlays.Cut()
|
|
if(front_id)
|
|
var/tiny_state = "id-generic"
|
|
if("id-"+front_id.icon_state in icon_states(icon))
|
|
tiny_state = "id-"+front_id.icon_state
|
|
var/image/tiny_image = new/image(icon, icon_state = tiny_state)
|
|
tiny_image.appearance_flags = RESET_COLOR
|
|
overlays += tiny_image
|
|
|
|
/obj/item/weapon/storage/wallet/GetID()
|
|
return front_id
|
|
|
|
/obj/item/weapon/storage/wallet/GetAccess()
|
|
var/obj/item/I = GetID()
|
|
if(I)
|
|
return I.GetAccess()
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/weapon/storage/wallet/random/New()
|
|
..()
|
|
var/amount = rand(50, 100) + rand(50, 100) // Triangular distribution from 100 to 200
|
|
var/obj/item/weapon/spacecash/SC = null
|
|
for(var/i in list(100, 50, 20, 10, 5, 1))
|
|
if(amount < i)
|
|
continue
|
|
SC = new(src)
|
|
while(amount >= i)
|
|
amount -= i
|
|
SC.adjust_worth(i, 0)
|
|
SC.update_icon()
|
|
|
|
/obj/item/weapon/storage/wallet/poly
|
|
name = "polychromic wallet"
|
|
desc = "You can recolor it! Fancy! The future is NOW!"
|
|
icon_state = "wallet-white"
|
|
|
|
/obj/item/weapon/storage/wallet/poly/New()
|
|
..()
|
|
verbs |= /obj/item/weapon/storage/wallet/poly/proc/change_color
|
|
color = "#"+get_random_colour()
|
|
update_icon()
|
|
|
|
/obj/item/weapon/storage/wallet/poly/proc/change_color()
|
|
set name = "Change Wallet Color"
|
|
set category = "Object"
|
|
set desc = "Change the color of the wallet."
|
|
set src in usr
|
|
|
|
if(usr.stat || usr.restrained() || usr.incapacitated())
|
|
return
|
|
|
|
var/new_color = input(usr, "Pick a new color", "Wallet Color", color) as color|null
|
|
|
|
if(new_color && (new_color != color))
|
|
color = new_color
|
|
|
|
/obj/item/weapon/storage/wallet/poly/emp_act()
|
|
var/original_state = icon_state
|
|
icon_state = "wallet-emp"
|
|
update_icon()
|
|
|
|
spawn(200)
|
|
if(src)
|
|
icon_state = original_state
|
|
update_icon()
|
|
|
|
/obj/item/weapon/storage/wallet/womens
|
|
name = "women's wallet"
|
|
desc = "A stylish wallet typically used by women."
|
|
icon_state = "girl_wallet"
|
|
item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet")
|