Files
Bubberstation/code/game/objects/items/weapons/gift.dm
phil235 15d8e0a96f I refactored how a mob resisting out of a closet that is itself inside something is done.
Fixes not being able to resist out of an unlocked unwelded locker. Now both moving and the resist button  work (except for the cardboard box).
You can no longer spam breakingout message ouf of a closet by moving while inside.
Wrapping and unwrapping a locker no longer unwelds it magically.
I refactored closet/crate/item package wrapping.
You can packagewrap belts and other storage items in which the package wrap item doesn't fit.(it does currently have the unintended side effect of giving you the "doesn't fit in X" message when wrapping there storage items though).
2016-03-03 20:20:34 +01:00

83 lines
2.6 KiB
Plaintext

/* Gifts and wrapping paper
* Contains:
* Gifts
* Wrapping Paper
*/
/*
* Gifts
*/
/obj/item/weapon/a_gift
name = "gift"
desc = "PRESENTS!!!! eek!"
icon = 'icons/obj/storage.dmi'
icon_state = "giftcrate3"
item_state = "gift1"
burn_state = FLAMMABLE
/obj/item/weapon/a_gift/New()
..()
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
icon_state = "giftcrate[rand(1,5)]"
/obj/item/weapon/a_gift/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] peeks inside the [src.name] and cries \himself to death! It looks like they were on the naughty list...</span>")
return (BRUTELOSS)
/obj/item/weapon/a_gift/attack_self(mob/M)
if(M && M.mind && M.mind.special_role == "Santa")
M << "<span class='warning'>You're supposed to be spreading gifts, not opening them yourself!</span>"
return
var/gift_type_list = list(/obj/item/weapon/sord,
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/photo_album,
/obj/item/weapon/storage/box/snappops,
/obj/item/weapon/storage/crayons,
/obj/item/weapon/storage/backpack/holding,
/obj/item/weapon/storage/belt/champion,
/obj/item/weapon/soap/deluxe,
/obj/item/weapon/pickaxe/diamond,
/obj/item/weapon/pen/invisible,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grown/corncob,
/obj/item/weapon/poster/contraband,
/obj/item/weapon/poster/legit,
/obj/item/weapon/book/manual/barman_recipes,
/obj/item/weapon/book/manual/chef_recipes,
/obj/item/weapon/bikehorn,
/obj/item/toy/beach_ball,
/obj/item/toy/beach_ball/holoball,
/obj/item/weapon/banhammer,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/device/paicard,
/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible,
/obj/item/clothing/suit/jacket/leather,
/obj/item/clothing/suit/jacket/leather/overcoat,
/obj/item/clothing/suit/poncho,
/obj/item/clothing/suit/poncho/green,
/obj/item/clothing/suit/poncho/red,
/obj/item/clothing/suit/snowman,
/obj/item/clothing/head/snowman)
gift_type_list += subtypesof(/obj/item/clothing/head/collectable)
gift_type_list += subtypesof(/obj/item/toy) - (((typesof(/obj/item/toy/cards) - /obj/item/toy/cards/deck) + /obj/item/toy/figure + /obj/item/toy/ammo)) //All toys, except for abstract types and syndicate cards.
var/gift_type = pick(gift_type_list)
if(!ispath(gift_type,/obj/item))
return
var/obj/item/I = new gift_type(M)
M.unEquip(src, 1)
M.put_in_hands(I)
I.add_fingerprint(M)
qdel(src)
return