mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Adds H.E.C.K. suits, spraycan_paintable component, and reworks item's attackby() (#30525)
* 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
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/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>")
|
||||
Reference in New Issue
Block a user