mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Adds a flag that lets mobs be colored with spraycans, and adds said flag to the hygienebot (#65891)
This commit is contained in:
@@ -86,3 +86,6 @@
|
||||
///From base of mob/living/ZImpactDamage() (mob/living, levels, turf/t)
|
||||
#define COMSIG_LIVING_Z_IMPACT "living_z_impact"
|
||||
#define NO_Z_IMPACT_DAMAGE (1<<0)
|
||||
|
||||
///From obj/item/toy/crayon/spraycan
|
||||
#define COMSIG_LIVING_MOB_PAINTED "living_mob_painted"
|
||||
|
||||
@@ -357,6 +357,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_ELITE_CHALLENGER "elite_challenger"
|
||||
/// For living mobs. It signals that the mob shouldn't have their data written in an external json for persistence.
|
||||
#define TRAIT_DONT_WRITE_MEMORY "dont_write_memory"
|
||||
/// This mob can be painted with the spraycan
|
||||
#define TRAIT_SPRAY_PAINTABLE "spray_paintable"
|
||||
|
||||
#define TRAIT_NOBLEED "nobleed" //This carbon doesn't bleed
|
||||
/// This atom can ignore the "is on a turf" check for simple AI datum attacks, allowing them to attack from bags or lockers as long as any other conditions are met
|
||||
|
||||
@@ -749,6 +749,19 @@
|
||||
|
||||
return
|
||||
|
||||
if(ismob(target) && (HAS_TRAIT(target, TRAIT_SPRAY_PAINTABLE)))
|
||||
if(actually_paints)
|
||||
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
SEND_SIGNAL(target, COMSIG_LIVING_MOB_PAINTED)
|
||||
. = use_charges(user, 2, requires_full = FALSE)
|
||||
reagents.trans_to(target, ., volume_multiplier, transfered_by = user, methods = VAPOR)
|
||||
|
||||
if(pre_noise || post_noise)
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, TRUE, 5)
|
||||
user.visible_message(span_notice("[user] coats [target] with spray paint!"), span_notice("You coat [target] with spray paint."))
|
||||
return .
|
||||
|
||||
|
||||
if(isobj(target) && !(target.flags_1 & UNPAINTABLE_1))
|
||||
if(actually_paints)
|
||||
var/color_is_dark = is_color_dark(paint_color)
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
ADD_TRAIT(src, TRAIT_SPRAY_PAINTABLE, INNATE_TRAIT)
|
||||
|
||||
/mob/living/simple_animal/bot/hygienebot/explode()
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
|
||||
@@ -92,6 +94,8 @@
|
||||
if(washing)
|
||||
do_wash(loc)
|
||||
for(var/AM in loc)
|
||||
if (AM == src)
|
||||
continue
|
||||
do_wash(AM)
|
||||
if(isopenturf(loc) && !(bot_cover_flags & BOT_COVER_EMAGGED))
|
||||
var/turf/open/tile = loc
|
||||
|
||||
Reference in New Issue
Block a user