mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 01:51:50 +00:00
* Adds hostile environiment suits * NOBODY SAW THIS * the CURSE * c * No more stun removal * fix * a * in the chest * back * Fixes * duh * fucking helmets fucking secbots fucking past coders * yeah * REEEEE * revert to here * this better work * cyberboss * Update effects.dm * check for charges * B U L K * spraycans * READY * the if, man * why the fuck did it convert to spaces * Fix it
30 lines
1012 B
Plaintext
30 lines
1012 B
Plaintext
/datum/component/spraycan_paintable
|
|
var/current_paint
|
|
|
|
/datum/component/spraycan_paintable/Initialize()
|
|
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/Repaint)
|
|
|
|
/datum/component/spraycan_paintable/Destroy()
|
|
RemoveCurrentCoat()
|
|
return ..()
|
|
|
|
/datum/component/spraycan_paintable/proc/RemoveCurrentCoat()
|
|
var/atom/A = parent
|
|
A.remove_atom_colour(FIXED_COLOUR_PRIORITY, current_paint)
|
|
|
|
/datum/component/spraycan_paintable/proc/Repaint(obj/item/toy/crayon/spraycan/spraycan, mob/living/user)
|
|
if(!istype(spraycan) || user.a_intent == INTENT_HARM)
|
|
return FALSE
|
|
. = TRUE
|
|
if(spraycan.is_capped)
|
|
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
|
return
|
|
RemoveCurrentCoat()
|
|
if(spraycan.use_charges(user, 2))
|
|
var/colour = spraycan.paint_color
|
|
current_paint = colour
|
|
var/atom/A = parent
|
|
A.add_atom_colour(colour, FIXED_COLOUR_PRIORITY)
|
|
playsound(spraycan, 'sound/effects/spray.ogg', 5, 1, 5)
|
|
to_chat(user, "<span class='notice'>You spray [spraycan] on [A], painting it.</span>")
|