Files
Polaris/code/game/objects/items/weapons/paint.dm
Neerti 828dacf485 Centralizes weight class definitions
A lot of new defines are now in inventory_sizes.dm, which contains;
All the size identifiers (the thing that tells the game if something is bulky, or w/e).
Storage costs for all the sizes, which are exponents of two, as previously.
A few constants for inventory size.

Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it.  This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files.  In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke.

The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
2016-09-22 00:51:51 -04:00

71 lines
1.7 KiB
Plaintext

//NEVER USE THIS IT SUX -PETETHEGOAT
//THE GOAT WAS RIGHT - RKF
var/global/list/cached_icons = list()
/obj/item/weapon/reagent_containers/glass/paint
desc = "It's a paint bucket."
name = "paint bucket"
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_state = "paintcan"
matter = list(DEFAULT_WALL_MATERIAL = 200)
w_class = ITEMSIZE_NORMAL
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,60)
volume = 60
unacidable = 0
flags = OPENCONTAINER
var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
else
return ..()
New()
if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
reagents.handle_reactions()
red
icon_state = "paint_red"
paint_type = "red"
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
green
icon_state = "paint_green"
paint_type = "green"
blue
icon_state = "paint_blue"
paint_type = "blue"
purple
icon_state = "paint_violet"
paint_type = "purple"
black
icon_state = "paint_black"
paint_type = "black"
white
icon_state = "paint_white"
paint_type = "white"