mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge pull request #820 from tigercat2000/Spraycans
Adds spraycans, fixes lipstick, modifies scleaner
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user