Merge pull request #9421 from Ghommie/Ghommie-cit218

Porting some spraycan fixes and tweaks.
This commit is contained in:
kevinz000
2019-10-08 00:34:58 -07:00
committed by GitHub
2 changed files with 20 additions and 3 deletions

View File

@@ -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, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
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

View File

@@ -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())