Skip to content

Commit

Permalink
Непростительные баффы клоуна. (#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardJones1 authored and volas committed Jan 28, 2019
1 parent 178e40d commit 9b440a3
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 54 deletions.
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
99 changes: 93 additions & 6 deletions code/game/objects/items/weapons/clown_items.dm
Expand Up @@ -8,14 +8,49 @@
/*
* 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 = ITEM_SIZE_SMALL
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/Crossed(mob/living/carbon/C) // EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
/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 = ITEM_SIZE_SMALL
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 @@ -134,13 +169,29 @@
/*
* 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 = ITEM_SIZE_TINY
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
var/cooldown = FALSE

/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)
if(cooldown <= world.time)
cooldown = world.time + 8
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
src.add_fingerprint(user)
spawn(20)
spam_flag = 0
return

/obj/item/weapon/bikehorn/dogtoy
Expand All @@ -149,3 +200,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 = ITEM_SIZE_TINY

/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, 'sound/items/buttonclick.ogg', 50, 1)
var/laugh = pick(
'sound/voice/fake_laugh/laugh1.ogg',
'sound/voice/fake_laugh/laugh2.ogg',
'sound/voice/fake_laugh/laugh3.ogg',
)
playsound(src, laugh, 50, 1)
flick("laugh_button_down",src)
icon_state = "laugh_button_off"
cooldown = TRUE
addtimer(CALLBACK(src, .proc/release_cooldown), 50)
return
..()

/obj/item/toy/laugh_button/proc/release_cooldown()
flick("laugh_button_up",src)
icon_state = "laugh_button_on"
cooldown = FALSE
playsound(src, 'sound/items/buttonclick.ogg', 50, 1)
return
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.

0 comments on commit 9b440a3

Please sign in to comment.