mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Crayon boxes are now storage items. I have no idea why they weren't storage items to being with but now they are.
6 storage slots, can only hold crayons. Icon_state is properly updated when crayons are taken out as well as when crayons are put in. Updated uterus and 2.0.8 with the new type path, which is /obj/item/weapon/storage/crayonbox git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3082 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -955,20 +955,6 @@
|
||||
new /obj/item/weapon/glass( src )
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/cupbox
|
||||
name = "Paper-cup Box"
|
||||
icon_state = "box"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
|
||||
@@ -56,6 +56,21 @@
|
||||
|
||||
/obj/item/weapon/storage/box/syndicate
|
||||
|
||||
/obj/item/weapon/storage/cupbox
|
||||
name = "Paper-cup Box"
|
||||
icon_state = "box"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
|
||||
/obj/item/weapon/storage/pillbottlebox
|
||||
name = "pill bottles"
|
||||
desc = "A box of pill bottles."
|
||||
|
||||
@@ -239,12 +239,16 @@
|
||||
user.Weaken(5)
|
||||
return
|
||||
|
||||
/obj/item/toy/crayonbox
|
||||
/obj/item/weapon/storage/crayonbox
|
||||
name = "box of crayons"
|
||||
desc = "A box of crayons for all your rune drawing needs."
|
||||
icon = 'crayons.dmi'
|
||||
icon_state = "crayonbox"
|
||||
w_class = 2.0
|
||||
storage_slots = 6
|
||||
can_hold = list(
|
||||
"/obj/item/toy/crayon"
|
||||
)
|
||||
|
||||
/obj/item/toy/crayon
|
||||
name = "crayon"
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
H.equip_if_possible(new /obj/item/weapon/bikehorn(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/weapon/stamp/clown(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/toy/crayon/rainbow(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/toy/crayonbox(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/crayonbox(H), H.slot_in_backpack)
|
||||
H.mutations |= CLOWN
|
||||
return 1
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
new /obj/item/clothing/suit/syndicatefake(src.loc)
|
||||
new /obj/item/clothing/head/syndicatefake(src.loc)
|
||||
if(8)
|
||||
new /obj/item/toy/crayonbox(src.loc)
|
||||
new /obj/item/weapon/storage/crayonbox(src.loc)
|
||||
if(9)
|
||||
new /obj/item/toy/spinningtoy(src.loc)
|
||||
if(10)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
return
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
/obj/item/weapon/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(isrobot(user))
|
||||
user << "\blue You're a robot. No."
|
||||
|
||||
+16
-34
@@ -2,7 +2,7 @@
|
||||
//CONTAINS
|
||||
CRAYONS
|
||||
--------*/
|
||||
/obj/item/toy/crayonbox/New()
|
||||
/obj/item/weapon/storage/crayonbox/New()
|
||||
..()
|
||||
new /obj/item/toy/crayon/red(src)
|
||||
new /obj/item/toy/crayon/orange(src)
|
||||
@@ -12,13 +12,13 @@ CRAYONS
|
||||
new /obj/item/toy/crayon/purple(src)
|
||||
updateIcon()
|
||||
|
||||
/obj/item/toy/crayonbox/proc/updateIcon()
|
||||
/obj/item/weapon/storage/crayonbox/proc/updateIcon()
|
||||
overlays = list() //resets list
|
||||
overlays += image('crayons.dmi',"crayonbox")
|
||||
for(var/obj/item/toy/crayon/crayon in contents)
|
||||
overlays += image('crayons.dmi',crayon.colourName)
|
||||
|
||||
/obj/item/toy/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/storage/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/toy/crayon))
|
||||
switch(W:colourName)
|
||||
if("mime")
|
||||
@@ -27,38 +27,12 @@ CRAYONS
|
||||
if("rainbow")
|
||||
usr << "This crayon is too powerful to be contained in this box."
|
||||
return
|
||||
else
|
||||
usr << "You add the crayon to the box."
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
updateIcon()
|
||||
return
|
||||
else
|
||||
..()
|
||||
..()
|
||||
updateIcon()
|
||||
|
||||
/obj/item/toy/crayonbox/attack_hand(mob/user as mob)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!contents.len)
|
||||
user << "\red You're out of crayons!"
|
||||
return
|
||||
else
|
||||
var/crayon = pick(contents)
|
||||
user.contents += crayon
|
||||
if(user.hand)
|
||||
user.l_hand = crayon
|
||||
else
|
||||
user.r_hand = crayon
|
||||
crayon:layer = 20
|
||||
user << "You take the [crayon:colourName] crayon out of the box."
|
||||
updateIcon()
|
||||
else
|
||||
return ..()
|
||||
icon_state = "crayonbox[contents.len]"
|
||||
return
|
||||
/obj/item/weapon/storage/crayonbox/attack_hand(mob/user as mob)
|
||||
updateIcon()
|
||||
..()
|
||||
|
||||
/obj/item/toy/crayon/red
|
||||
icon_state = "crayonred"
|
||||
@@ -160,6 +134,14 @@ CRAYONS
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/toy/crayon/attack_hand(mob/user as mob)
|
||||
var/obj/item/weapon/storage/crayonbox/CB
|
||||
if(istype(src.loc, /obj/item/weapon/storage/crayonbox))
|
||||
CB = src.loc
|
||||
..()
|
||||
if(CB)
|
||||
CB.updateIcon()
|
||||
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "A rune drawn in crayon."
|
||||
|
||||
Reference in New Issue
Block a user