Skip to content

Commit

Permalink
rubber pigs (ChaoticOnyx#3040)
Browse files Browse the repository at this point in the history
- Two pigs added to IA's closet;
- Added a new supply package (contains 2 pigs, 4 cups of tea, 1 carton of milk, 1 bottle of vodka, 1 pack of cigars, and 1 zippo);
  • Loading branch information
TobyThorne authored Aug 1, 2020
1 parent 3e266af commit 04a31c0
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 2 deletions.
11 changes: 11 additions & 0 deletions code/datums/supplypacks/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,17 @@
cost = 10
containername = "\improper Chaplain equipment crate"

/decl/hierarchy/supply_pack/miscellaneous/discussions
name = "Discussions equipment"
contains = list(/obj/item/toy/pig = 2,
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka,
/obj/item/weapon/reagent_containers/food/drinks/tea = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream,
/obj/item/weapon/storage/fancy/cigar,
/obj/item/weapon/flame/lighter/zippo)
cost = 30
containername = "\improper Demagogue Crate"

/decl/hierarchy/supply_pack/miscellaneous/mousetrap
num_contained = 3
contains = list(/obj/item/weapon/storage/box/mousetraps)
Expand Down
60 changes: 59 additions & 1 deletion code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Marshalling wand
* Ring bell
* BANana
* Rubber pigs
*/


Expand Down Expand Up @@ -947,7 +948,7 @@

/obj/item/toy/banbanana/attack_self(mob/user)
for(var/mob/M in viewers(user, null))
if (M.client)
if(M.client)
M.show_message("<span class='danger'>You have been banned by HO$T.\nReason: Honk.</span>")
M.show_message("<span class='warning'>This is a PERMENANT ban.</span>")
if(ishuman(M))
Expand All @@ -956,3 +957,60 @@
playsound(user.loc, 'sound/effects/adminhelp.ogg', 100)
user.drop_from_inventory(src)
qdel(src)

/obj/item/toy/pig
name = "rubber piggy"
desc = "The people demand pigs!"
icon_state = "pig1"
var/spam_flag = 0
var/message_spam_flag = 0

/obj/item/toy/pig/proc/oink(mob/user, msg)
if(spam_flag == 0)
spam_flag = 1
playsound(loc, pick('sound/items/pig1.ogg','sound/items/pig2.ogg','sound/items/pig3.ogg'), 100, 1)
add_fingerprint(user)
if(message_spam_flag == 0)
message_spam_flag = 1
user.visible_message(SPAN("notice", "[user] [msg] \the [src] in hand!"))
spawn(30)
message_spam_flag = 0
spawn(3)
spam_flag = 0
return

/obj/item/toy/pig/New()
..()
//var/piggy_choice = rand(1, 100)
switch(rand(1, 100))
if(1 to 33)
icon_state = "pig1"
if(34 to 66)
icon_state = "pig2"
if(67 to 99)
icon_state = "pig3"
if(100)
icon_state = "pig4"
name = "Kathleen"
desc = "The people demand Lucas!"

/obj/item/toy/pig/attack_self(mob/user)
oink(user, "squeezes")

/obj/item/toy/pig/attack_hand(mob/user)
oink(user, pick("presses","squeezes","squashes","champs","pinches"))

/obj/item/toy/pig/MouseDrop(mob/user)
if((user == usr && (!usr.restrained() && (!usr.stat && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal))
if(!usr.get_active_hand())
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
if(H.hand)
temp = H.organs_by_name[BP_L_HAND]
if(temp && !temp.is_usable())
to_chat(user, SPAN("notice", "You try to move your [temp.name], but cannot!"))
return
to_chat(user, SPAN("notice", "You pick up \the [src]."))
user.put_in_hands(src)
return
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,7 @@
/obj/item/clothing/under/lawyer/purpsuit,
/obj/item/clothing/suit/storage/toggle/suit/purple,
/obj/item/clothing/shoes/brown,
/obj/item/clothing/shoes/black
/obj/item/clothing/shoes/black,
/obj/item/toy/pig,
/obj/item/toy/pig
)
Binary file modified icons/obj/toy.dmi
Binary file not shown.
Binary file added sound/items/pig1.ogg
Binary file not shown.
Binary file added sound/items/pig2.ogg
Binary file not shown.
Binary file added sound/items/pig3.ogg
Binary file not shown.

0 comments on commit 04a31c0

Please sign in to comment.