mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
You can now color boxes using crayons (#30977)
* Americanized spelling * more spelling * spelling + alt click * recoloring box, put it in hand and in bag * in backpack now * remove old comments * updates inventory if backpack is open * place in bags even on floor * null check + checks actual type * added the color tables * added empty subtypes. Fixed movign away bug * lint * mapload + as mob removal * early returning * removed type checks. Added more checks for coloring * added a description + early return on color tables * lint * documentation, formatting, HAS_TRAIT * formatting
This commit is contained in:
@@ -323,7 +323,7 @@
|
||||
return
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
var/new_color = C.colour
|
||||
var/new_color = C.crayon_color
|
||||
var/list/hsl = rgb2hsl(hex2num(copytext(new_color, 2, 4)), hex2num(copytext(new_color, 4, 6)), hex2num(copytext(new_color, 6, 8)))
|
||||
hsl[3] = max(hsl[3], 0.4)
|
||||
var/list/rgb = hsl2rgb(arglist(hsl))
|
||||
@@ -441,7 +441,7 @@
|
||||
/obj/structure/chair/sofa/bench/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
set_cover_color(C.colour)
|
||||
set_cover_color(C.crayon_color)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/chair/sofa/bench/proc/set_cover_color(new_color)
|
||||
|
||||
Reference in New Issue
Block a user