From f01f00710f4ea0b442d24a16ad12198221496350 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 6 Oct 2019 05:30:16 +0200 Subject: [PATCH] Porting some spraycan fixes. --- code/game/objects/items/crayons.dm | 20 +++++++++++++++++-- .../research/xenobiology/xenobiology.dm | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index db26f643b5..f2531d3dfd 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -234,8 +234,13 @@ paint_mode = PAINT_NORMAL if("select_colour") if(can_change_colour) - paint_color = input(usr,"","Choose Color",paint_color) as color|null - . = TRUE + var/chosen_colour = input(usr,"","Choose Color",paint_color) as color|null + + if (!isnull(chosen_colour)) + paint_color = chosen_colour + . = TRUE + else + . = FALSE if("enter_text") var/txt = stripped_input(usr,"Choose what to write.", "Scribbles",default = text_buffer) @@ -703,12 +708,18 @@ if(isobj(target)) if(actually_paints) + if(color_hex2num(paint_color) < 350 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected + to_chat(usr, "A color that dark on an object like this? Surely not...") + return FALSE + target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY) + if(istype(target, /obj/structure/window)) if(color_hex2num(paint_color) < 255) target.set_opacity(255) else target.set_opacity(initial(target.opacity)) + . = use_charges(user, 2) var/fraction = min(1, . / reagents.maximum_volume) reagents.reaction(target, TOUCH, fraction * volume_multiplier) @@ -819,6 +830,11 @@ if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user)) to_chat(user, "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster.") +/obj/item/toy/crayon/spraycan/infinite + name = "infinite spraycan" + charges = -1 + desc = "Now with 30% more bluespace technology." + #undef RANDOM_GRAFFITI #undef RANDOM_LETTER #undef RANDOM_PUNCTUATION diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 7acbaaac1c..5e872ac299 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -523,7 +523,8 @@ /obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type) switch(activation_type) if(SLIME_ACTIVATE_MINOR) - var/chosen = pick(difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan))) + var/blacklisted_cans = list(/obj/item/toy/crayon/spraycan/borg, /obj/item/toy/crayon/spraycan/infinite) + var/chosen = pick(subtypesof(/obj/item/toy/crayon/spraycan) - blacklisted_cans) var/obj/item/O = new chosen(null) if(!user.put_in_active_hand(O)) O.forceMove(user.drop_location())