Merge pull request #9421 from Ghommie/Ghommie-cit218
Porting some spraycan fixes and tweaks.
This commit is contained in:
@@ -234,8 +234,13 @@
|
|||||||
paint_mode = PAINT_NORMAL
|
paint_mode = PAINT_NORMAL
|
||||||
if("select_colour")
|
if("select_colour")
|
||||||
if(can_change_colour)
|
if(can_change_colour)
|
||||||
paint_color = input(usr,"","Choose Color",paint_color) as color|null
|
var/chosen_colour = input(usr,"","Choose Color",paint_color) as color|null
|
||||||
. = TRUE
|
|
||||||
|
if (!isnull(chosen_colour))
|
||||||
|
paint_color = chosen_colour
|
||||||
|
. = TRUE
|
||||||
|
else
|
||||||
|
. = FALSE
|
||||||
if("enter_text")
|
if("enter_text")
|
||||||
var/txt = stripped_input(usr,"Choose what to write.",
|
var/txt = stripped_input(usr,"Choose what to write.",
|
||||||
"Scribbles",default = text_buffer)
|
"Scribbles",default = text_buffer)
|
||||||
@@ -703,12 +708,18 @@
|
|||||||
|
|
||||||
if(isobj(target))
|
if(isobj(target))
|
||||||
if(actually_paints)
|
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)
|
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||||
|
|
||||||
if(istype(target, /obj/structure/window))
|
if(istype(target, /obj/structure/window))
|
||||||
if(color_hex2num(paint_color) < 255)
|
if(color_hex2num(paint_color) < 255)
|
||||||
target.set_opacity(255)
|
target.set_opacity(255)
|
||||||
else
|
else
|
||||||
target.set_opacity(initial(target.opacity))
|
target.set_opacity(initial(target.opacity))
|
||||||
|
|
||||||
. = use_charges(user, 2)
|
. = use_charges(user, 2)
|
||||||
var/fraction = min(1, . / reagents.maximum_volume)
|
var/fraction = min(1, . / reagents.maximum_volume)
|
||||||
reagents.reaction(target, TOUCH, fraction * volume_multiplier)
|
reagents.reaction(target, TOUCH, fraction * volume_multiplier)
|
||||||
@@ -819,6 +830,11 @@
|
|||||||
if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user))
|
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.")
|
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_GRAFFITI
|
||||||
#undef RANDOM_LETTER
|
#undef RANDOM_LETTER
|
||||||
#undef RANDOM_PUNCTUATION
|
#undef RANDOM_PUNCTUATION
|
||||||
|
|||||||
@@ -523,7 +523,8 @@
|
|||||||
/obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
/obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||||
switch(activation_type)
|
switch(activation_type)
|
||||||
if(SLIME_ACTIVATE_MINOR)
|
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)
|
var/obj/item/O = new chosen(null)
|
||||||
if(!user.put_in_active_hand(O))
|
if(!user.put_in_active_hand(O))
|
||||||
O.forceMove(user.drop_location())
|
O.forceMove(user.drop_location())
|
||||||
|
|||||||
Reference in New Issue
Block a user