Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Непростительные баффы клоуна. #3014

Merged
merged 8 commits into from Jan 28, 2019
Merged
48 changes: 0 additions & 48 deletions code/defines/obj/weapon.dm
Expand Up @@ -24,17 +24,6 @@
var/mode = 1
w_class = 3.0

/obj/item/weapon/bananapeel
name = "banana peel"
desc = "A peel from a banana."
icon = 'icons/obj/items.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20

/obj/item/weapon/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
Expand All @@ -46,43 +35,6 @@
throw_speed = 4
throw_range = 20

/obj/item/weapon/soap
name = "soap"
desc = "A cheap bar of soap. Doesn't smell."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "soap"
w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20

/obj/item/weapon/soap/nanotrasen
desc = "A Nanotrasen brand bar of soap. Smells of phoron."
icon_state = "soapnt"

/obj/item/weapon/soap/deluxe
desc = "A deluxe Waffle Co. brand bar of soap. Smells of condoms."
icon_state = "soapdeluxe"

/obj/item/weapon/soap/syndie
desc = "An untrustworthy bar of soap. Smells of fear."
icon_state = "soapsyndie"

/obj/item/weapon/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
throwforce = 3
w_class = 1.0
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
var/spam_flag = 0


/obj/item/weapon/c_tube
name = "cardboard tube"
desc = "A tube... of cardboard."
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/PDA/PDA.dm
Expand Up @@ -1256,7 +1256,7 @@

/obj/item/device/pda/clown/Crossed(mob/living/carbon/C) //Clown PDA is slippery.
if(istype(C))
if (C.slip("the PDA", 4, 2) && ishuman(C) && src.cartridge.charges < 5)
if (C.slip("the PDA", 8, 2) && ishuman(C) && src.cartridge.charges < 5)
cartridge.charges++

/obj/item/device/pda/proc/available_pdas()
Expand Down
91 changes: 90 additions & 1 deletion code/game/objects/items/weapons/clown_items.dm
Expand Up @@ -8,13 +8,48 @@
/*
* Banana Peals
*/

/obj/item/weapon/bananapeel
name = "banana peel"
desc = "A peel from a banana."
icon = 'icons/obj/items.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = 2.0
RichardJones1 marked this conversation as resolved.
Show resolved Hide resolved
throwforce = 0
throw_speed = 4
throw_range = 20

/obj/item/weapon/bananapeel/Crossed(mob/living/carbon/C)
if(istype(C))
C.slip("the [src]", 4, 2)

/*
* Soap
*/
/obj/item/weapon/soap
name = "soap"
desc = "A cheap bar of soap. Doesn't smell."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "soap"
w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20

/obj/item/weapon/soap/nanotrasen
desc = "A Nanotrasen brand bar of soap. Smells of phoron."
icon_state = "soapnt"

/obj/item/weapon/soap/deluxe
desc = "A deluxe Waffle Co. brand bar of soap. Smells of condoms."
icon_state = "soapdeluxe"

/obj/item/weapon/soap/syndie
desc = "An untrustworthy bar of soap. Smells of fear."
icon_state = "soapsyndie"

/obj/item/weapon/soap/Crossed(mob/living/carbon/C) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if(istype(C))
C.slip("the [src]", 4, 2)
Expand Down Expand Up @@ -42,12 +77,30 @@
/*
* Bike Horns
*/

/obj/item/weapon/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
throwforce = 3
w_class = 1.0
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
var/spam_flag = 0

/obj/item/weapon/bikehorn/attack(mob/target, mob/user, def_zone)
. = ..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)

/obj/item/weapon/bikehorn/attack_self(mob/user)
if (spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
src.add_fingerprint(user)
spawn(20)
spawn(8)
RichardJones1 marked this conversation as resolved.
Show resolved Hide resolved
spam_flag = 0
return

Expand All @@ -57,3 +110,39 @@
icon = 'icons/obj/items.dmi'
icon_state = "dogtoy"
item_state = "dogtoy"

//////////////////////////////////////////////////////
// Fake Laugh Button //
//////////////////////////////////////////////////////

/obj/item/toy/laugh_button
name = "laugh button"
desc = "It's a perfect adding to the bad joke."
icon = 'icons/obj/toy.dmi'
icon_state = "laugh_button_on"
var/cooldown = FALSE
w_class = 1

/obj/item/toy/laugh_button/attack_self(mob/user)
if(!cooldown)
user.visible_message("<span class='notice'>[bicon(src)] \the [user] presses \the [src]</span>")
playsound(src.loc, 'sound/items/buttonclick.ogg', 50, 1)
RichardJones1 marked this conversation as resolved.
Show resolved Hide resolved
var/laugh = pick(
'sound/voice/fake_laugh/laugh1.ogg',
'sound/voice/fake_laugh/laugh2.ogg',
'sound/voice/fake_laugh/laugh3.ogg',
)
playsound(src.loc, laugh, 50, 1)
flick("laugh_button_down",src)
icon_state = "laugh_button_off"
cooldown = TRUE
addtimer(CALLBACK(src, .proc/release_cooldown), 50)
RichardJones1 marked this conversation as resolved.
Show resolved Hide resolved
return
..()

/obj/item/toy/laugh_button/proc/release_cooldown()
flick("laugh_button_up",src)
icon_state = "laugh_button_on"
cooldown = FALSE
playsound(src.loc, 'sound/items/buttonclick.ogg', 50, 1)
return
3 changes: 1 addition & 2 deletions code/game/turfs/simulated.dm
Expand Up @@ -64,8 +64,7 @@
var/footstepsound = "footsteps"

if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes))
if(prob(25))
footstepsound = "clownstep"
footstepsound = "clownstep"
LudwigVonChesterfield marked this conversation as resolved.
Show resolved Hide resolved
if(H.shoes.wet)
footstepsound = 'sound/effects/waterstep.ogg'

Expand Down
Binary file modified icons/obj/toy.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions maps/z1.dmm
Expand Up @@ -13159,6 +13159,7 @@
pixel_y = 3
},
/obj/item/weapon/lipstick/jade,
/obj/item/toy/laugh_button,
/turf/simulated/floor/wood,
/area/crew_quarters/theatre)
"avN" = (
Expand Down
Binary file added sound/voice/fake_laugh/laugh1.ogg
Binary file not shown.
Binary file added sound/voice/fake_laugh/laugh2.ogg
Binary file not shown.
Binary file added sound/voice/fake_laugh/laugh3.ogg
Binary file not shown.