Files
Paradise/code/game/objects/items/weapons/paint.dm
sieve32@gmail.com 459c558898 -Make holodeck eswords a child of obj/item/weapon/holo instead of regular eswords, clumsy check removed as a result, and you can no longer do things like cutting through walls or doors or what have you. (Fixes Issue 665)
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.

r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds

[VGTG]

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-23 00:48:51 +00:00

102 lines
2.4 KiB
Plaintext

//NEVER USE THIS IT SUX -PETETHEGOAT
var/global/list/cached_icons = list()
/obj/item/weapon/paint
name = "Paint Can"
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
color = "FFFFFF"
item_state = "paintcan"
w_class = 3.0
/obj/item/weapon/paint/red
name = "Red paint"
color = "FF0000"
icon_state = "paint_red"
/obj/item/weapon/paint/green
name = "Green paint"
color = "00FF00"
icon_state = "paint_green"
/obj/item/weapon/paint/blue
name = "Blue paint"
color = "0000FF"
icon_state = "paint_blue"
/obj/item/weapon/paint/yellow
name = "Yellow paint"
color = "FFFF00"
icon_state = "paint_yellow"
/obj/item/weapon/paint/violet //no icon
name = "Violet paint"
color = "FF00FF"
icon_state = "paint_neutral"
/obj/item/weapon/paint/black
name = "Black paint"
color = "333333"
icon_state = "paint_black"
/obj/item/weapon/paint/white
name = "White paint"
color = "FFFFFF"
icon_state = "paint_white"
/obj/item/weapon/paint/anycolor
name = "Any color"
icon_state = "paint_neutral"
attack_self(mob/user as mob)
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
switch(t1)
if("red")
color = "FF0000"
if("blue")
color = "0000FF"
if("green")
color = "00FF00"
if("yellow")
color = "FFFF00"
/*
if("violet")
color = "FF00FF"
*/
if("white")
color = "FFFFFF"
if("black")
color = "333333"
icon_state = "paint_[t1]"
add_fingerprint(user)
return
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob)
if(!istype(target) || istype(target, /turf/space))
return
var/ind = "[initial(target.icon)][color]"
if(!cached_icons[ind])
var/icon/overlay = new/icon(initial(target.icon))
overlay.Blend("#[color]",ICON_MULTIPLY)
overlay.SetIntensity(1.4)
target.icon = overlay
cached_icons[ind] = target.icon
else
target.icon = cached_icons[ind]
return
/obj/item/weapon/paint/paint_remover
name = "Paint remover"
icon_state = "paint_neutral"
afterattack(turf/target, mob/user as mob)
if(istype(target) && target.icon != initial(target.icon))
target.icon = initial(target.icon)
return