mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Graffitis now take into account where on the tile you click (#8982)
This commit is contained in:
@@ -5,27 +5,40 @@
|
||||
plane = DIRTY_PLANE
|
||||
layer = DIRTY_LAYER
|
||||
anchored = TRUE
|
||||
// CHOMPEdit Start - Pretty much all of this file changed
|
||||
var/art_type
|
||||
var/art_color
|
||||
var/art_shade
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
|
||||
..()
|
||||
loc = location
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(var/ml, main = "#FFFFFF",shade = "#000000",var/type = "rune")
|
||||
. = ..(ml, 0) // mapload, age
|
||||
name = type
|
||||
desc = "A [type] drawn in crayon."
|
||||
|
||||
// Persistence vars.
|
||||
art_type = type
|
||||
art_color = main
|
||||
art_shade = shade
|
||||
|
||||
switch(type)
|
||||
if("rune")
|
||||
type = "rune[rand(1,6)]"
|
||||
if("graffiti")
|
||||
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
|
||||
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
|
||||
update_icon()
|
||||
|
||||
mainOverlay.Blend(main,ICON_ADD)
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
add_hiddenprint(usr)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/update_icon()
|
||||
cut_overlays()
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[art_type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[art_type]s",2.1)
|
||||
|
||||
mainOverlay.Blend(art_color,ICON_ADD)
|
||||
shadeOverlay.Blend(art_shade,ICON_ADD)
|
||||
|
||||
add_overlay(mainOverlay)
|
||||
add_overlay(shadeOverlay)
|
||||
|
||||
add_hiddenprint(usr)
|
||||
return
|
||||
// CHOMPEdit End
|
||||
|
||||
Reference in New Issue
Block a user