Merge pull request #820 from tigercat2000/Spraycans

Adds spraycans, fixes lipstick, modifies scleaner
This commit is contained in:
ZomgPonies
2015-04-16 16:39:19 -04:00
12 changed files with 112 additions and 43 deletions
+59 -1
View File
@@ -81,4 +81,62 @@
colour = temp
update_window(usr)
else
..()
..()
//Spraycan stuff
/obj/item/toy/crayon/spraycan
icon_state = "spraycan_cap"
desc = "A metallic container containing tasty paint."
var/capped = 1
instant = 1
validSurfaces = list(/turf/simulated/floor,/turf/simulated/wall)
/obj/item/toy/crayon/spraycan/New()
..()
name = "NanoTrasen-brand Rapid Paint Applicator"
update_icon()
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
switch(choice)
if("Toggle Cap")
user << "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>"
capped = capped ? 0 : 1
icon_state = "spraycan[capped ? "_cap" : ""]"
update_icon()
if("Change Drawing")
..()
if("Change Color")
colour = input(user,"Choose Color") as color
update_icon()
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity)
return
if(capped)
return
else
if(iscarbon(target))
if(uses-10 > 0)
uses = uses - 10
var/mob/living/carbon/human/C = target
user.visible_message("<span class='danger'> [user] sprays [src] into the face of [target]!</span>")
if(C.client)
C.eye_blurry = max(C.eye_blurry, 3)
C.eye_blind = max(C.eye_blind, 1)
if(C.eyecheck() <= 0) // no eye protection? ARGH IT BURNS.
C.confused = max(C.confused, 3)
C.Weaken(3)
C.lip_style = "spray_face"
C.lip_color = colour
C.update_body()
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
..()
/obj/item/toy/crayon/spraycan/update_icon()
overlays.Cut()
var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]")
I.color = colour
overlays += I
+7 -5
View File
@@ -451,6 +451,7 @@
var/instant = 0
var/colourName = "red" //for updateIcon purposes
var/dat
var/list/validSurfaces = list(/turf/simulated/floor)
/obj/item/toy/crayon/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</span>")
@@ -497,7 +498,7 @@
if("random_letter")
temp = pick(letters)
if("letter")
temp = input("Choose the letter.", "Crayon scribbles") in letters
temp = input("Choose the letter.", "Scribbles") in letters
if("random_rune")
temp = "rune[rand(1,6)]"
if("random_graffiti")
@@ -511,7 +512,7 @@
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(istype(target,/turf/simulated/floor))
if(is_type_in_list(target,validSurfaces))
var/temp = "rune"
if(letters.Find(drawtype))
temp = "letter"
@@ -524,18 +525,19 @@
if(uses)
uses--
if(!uses)
user << "<span class='danger'>You used up your crayon!</span>"
user << "<span class='danger'>You used up your [src.name]!</span>"
qdel(src)
return
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
var/huffable = istype(src,/obj/item/toy/crayon/spraycan)
if(M == user)
user << "You take a bite of the crayon. Delicious!"
user << "You take a [huffable ? "huff" : "bite"] of the [src.name]. Delicious!"
user.nutrition += 5
if(uses)
uses -= 5
if(uses <= 0)
user << "<span class='danger'>You ate your crayon!</span>"
user << "<span class='danger'>There is no more of [src.name] left!</span>"
qdel(src)
else
..()
+13 -30
View File
@@ -7,35 +7,38 @@
var/colour = "red"
var/open = 0
/obj/item/weapon/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/weapon/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "jade"
colour = "lime"
/obj/item/weapon/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/weapon/lipstick/random
name = "lipstick"
/obj/item/weapon/lipstick/random/New()
colour = pick("red","purple","jade","black")
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
/obj/item/weapon/lipstick/attack_self(mob/user as mob)
overlays.Cut()
user << "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>"
open = !open
if(open)
icon_state = "[initial(icon_state)]_[colour]"
var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color")
colored.color = colour
icon_state = "lipstick_uncap"
overlays += colored
else
icon_state = initial(icon_state)
icon_state = "lipstick"
/obj/item/weapon/lipstick/attack(mob/M as mob, mob/user as mob)
if(!open) return
@@ -50,7 +53,8 @@
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
H.lip_style = colour
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
@@ -58,33 +62,12 @@
if(do_after(user, 20) && do_after(H, 20, 5, 0)) //user needs to keep their active hand, H does not.
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
"<span class='notice'>You apply \the [src].</span>")
H.lip_style = colour
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user << "<span class='notice'>Where are the lips on that?</span>"
//you can wipe off lipstick with paper!
/obj/item/weapon/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(user.zone_sel.selecting == "mouth")
if(!istype(M, /mob)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
user << "<span class='notice'>You wipe off the lipstick with [src].</span>"
H.lip_style = null
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s lipstick.</span>")
if(do_after(user, 10) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
user.visible_message("<span class='notice'>[user] wipes [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/weapon/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
@@ -24,6 +24,7 @@
var/b_skin = 0
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
var/lip_color = "white"
var/age = 30 //Player's age (pure fluff)
var/b_type = "A+" //Player's bloodtype
@@ -332,6 +332,12 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons)
update_icons()
if(lip_style && species && species.flags & HAS_LIPS)
var/icon/lips = icon("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_s")
lips.Blend(lip_color, ICON_ADD)
stand_icon.Blend(lips, ICON_OVERLAY)
//tail
update_tail_showing(0)
+3 -1
View File
@@ -42,7 +42,9 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
var/image/lips = image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[owner.lip_style]_s")
lips.color = owner.lip_color
mob_icon.Blend(lips, ICON_OVERLAY)
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
+10 -6
View File
@@ -114,21 +114,25 @@
"<span class='notice'> [user] holds up a paper and shows it to [M]. </span>")
src.examine(user)
else if(user.zone_sel.selecting == "mouth") // lipstick wiping
else if(user.zone_sel.selecting == "mouth")
if(!istype(M, /mob)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
user << "<span class='notice'>You wipe off the lipstick with [src].</span>"
user << "<span class='notice'>You wipe off your face with [src].</span>"
H.lip_style = null
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s lipstick.</span>")
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s face clean with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s face.</span>")
if(do_after(user, 10) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
user.visible_message("<span class='notice'>[user] wipes [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
user.visible_message("<span class='notice'>[user] wipes [H]'s face clean with \the [src].</span>", \
"<span class='notice'>You wipe off [H]'s face.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/weapon/paper/proc/addtofield(var/id, var/text, var/links = 0)
var/locid = 0
@@ -1075,6 +1075,11 @@ datum
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.lip_style)
H.lip_style = null
H.update_body()
if(C.r_hand)
C.r_hand.clean_blood()
if(C.l_hand)
@@ -98,6 +98,14 @@
build_path = /obj/item/weapon/wrench
category = list("initial","Tools")
/datum/design/spraycan
name = "Spraycan"
id = "spraycan"
build_type = AUTOLATHE
materials = list("$metal" = 100, "$glass" = 100)
build_path = /obj/item/toy/crayon/spraycan
category = list("initial", "Tools")
/datum/design/airalarm_electronics
name = "Air Alarm Electronics"
id = "airalarm_electronics"