Adding the ability to paint on floors with brushes, and also the ability to use multiple crayons from a box while floorpainting (#35367)

* Update painting_brush.dm

* Update custom_painting_datum.dm

* Update code/modules/html_interface/paintTool/custom_painting_datum.dm

Sounds good

Co-authored-by: jellyveggie2 <78439377+jellyveggie2@users.noreply.github.com>

---------

Co-authored-by: jellyveggie2 <78439377+jellyveggie2@users.noreply.github.com>
This commit is contained in:
Volttekka
2023-11-18 15:08:58 -08:00
committed by GitHub
parent 8b9b209409
commit a0aab1af6e
2 changed files with 19 additions and 0 deletions

View File

@@ -31,6 +31,15 @@
// Painting with a crayon
if (istype(held_item, /obj/item/toy/crayon))
for (var/obj/item/weapon/storage/fancy/crayons/box in user.held_items)
for (var/crayon in box)
var/obj/item/toy/crayon/c = crayon
max_strength = PENCIL_STRENGTH_MAX
min_strength = PENCIL_STRENGTH_MIN
palette += c.mainColour
palette += c.shadeColour
base_color = c.mainColour
var/obj/item/toy/crayon/c = held_item
max_strength = PENCIL_STRENGTH_MAX
min_strength = PENCIL_STRENGTH_MIN

View File

@@ -55,3 +55,13 @@
paint_color = rgb(paint_color_rgb[1], paint_color_rgb[2], paint_color_rgb[3], mix_alpha_from_reagents(target.reagents.reagent_list))
to_chat(user, "<span class='notice'>You dip \the [name] in \the [target.name].</span>")
update_icon()
//presumably this will allow painting on the floor, credit to Anonymous user No.453861032
if(istype(target, /turf/simulated))
var/turf/simulated/the_turf = target
var/datum/painting_utensil/p = new(user, src)
if (!the_turf.advanced_graffiti)
var/datum/custom_painting/advanced_graffiti = new(the_turf, 32, 32, base_color = "#00000000")
the_turf.advanced_graffiti = advanced_graffiti
the_turf.advanced_graffiti.interact(user, p)
return