Merge pull request #6204 from Ketrai/worms

Adds worms
This commit is contained in:
Neerti
2019-06-11 17:35:11 -04:00
committed by VirgoBot
parent 6031cb9e53
commit 21244ade2f
10 changed files with 163 additions and 2 deletions
+20
View File
@@ -67,4 +67,24 @@
/obj/item/device/pipe_painter = 2,
/obj/item/device/floor_painter = 2,
/obj/item/device/closet_painter = 2
)
/datum/supply_pack/recreation/cheapbait
name = "Cheap Fishing Bait"
cost = 10
containername = "cheap bait crate"
containertype = /obj/structure/closet/crate/freezer
contains = list(
/obj/item/weapon/storage/box/wormcan/sickly = 5
)
/datum/supply_pack/randomised/recreation/cheapbait
name = "Deluxe Fishing Bait"
cost = 40
containername = "deluxe bait crate"
containertype = /obj/structure/closet/crate/freezer
num_contained = 8
contains = list(
/obj/item/weapon/storage/box/wormcan,
/obj/item/weapon/storage/box/wormcan/deluxe
)
+18
View File
@@ -1150,3 +1150,21 @@
/obj/item/toy/plushie/carp = 50,
/obj/item/toy/plushie/deer = 50,
/obj/item/toy/plushie/tabby_cat = 50)
/obj/machinery/vending/fishing
name = "loot trawler"
desc = "A special vendor for fishing equipment."
product_ads = "Tired of trawling across the ocean floor? Get our loot!;Chum and rods.;Don't get baited into fishing without us!;Baby is your star-sign pisces? We'd make a perfect match.;Do not fear, plenty to catch around here.;Don't get reeled in helplessly, get your own rod today!"
icon_state = "fishvendor"
products = list(/obj/item/weapon/material/fishing_rod/modern/cheap = 6,
/obj/item/weapon/storage/box/wormcan = 4,
/obj/item/weapon/storage/box/wormcan/sickly = 10,
/obj/item/weapon/material/fishing_net = 2,
/obj/item/stack/cable_coil/random = 6)
prices = list(/obj/item/weapon/material/fishing_rod/modern/cheap = 50,
/obj/item/weapon/storage/box/wormcan = 12,
/obj/item/weapon/storage/box/wormcan/sickly = 6,
/obj/item/weapon/material/fishing_net = 40,
/obj/item/stack/cable_coil/random = 4)
premium = list(/obj/item/weapon/storage/box/wormcan/deluxe = 1)
contraband = list(/obj/item/weapon/storage/box/wormcan/deluxe = 1)
@@ -24,3 +24,46 @@
/obj/item/weapon/storage/box/donut/empty
empty = TRUE
/obj/item/weapon/storage/box/wormcan
icon = 'icons/obj/food.dmi'
icon_state = "wormcan"
name = "can of worms"
desc = "You probably do want to open this can of worms."
max_storage_space = ITEMSIZE_COST_TINY * 6
can_hold = list(
/obj/item/weapon/reagent_containers/food/snacks/wormsickly,
/obj/item/weapon/reagent_containers/food/snacks/worm,
/obj/item/weapon/reagent_containers/food/snacks/wormdeluxe
)
starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/worm = 6)
/obj/item/weapon/storage/box/wormcan/Initialize()
. = ..()
update_icon()
/obj/item/weapon/storage/box/wormcan/update_icon(var/itemremoved = 0)
if (contents.len == 0)
icon_state = "wormcan_empty"
/obj/item/weapon/storage/box/wormcan/sickly
icon_state = "wormcan_sickly"
name = "can of sickly worms"
desc = "You probably don't want to open this can of worms."
max_storage_space = ITEMSIZE_COST_TINY * 6
starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/wormsickly = 6)
/obj/item/weapon/storage/box/wormcan/sickly/update_icon(var/itemremoved = 0)
if (contents.len == 0)
icon_state = "wormcan_empty_sickly"
/obj/item/weapon/storage/box/wormcan/deluxe
icon_state = "wormcan_deluxe"
name = "can of deluxe worms"
desc = "You absolutely want to open this can of worms."
max_storage_space = ITEMSIZE_COST_TINY * 6
starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/wormdeluxe = 6)
/obj/item/weapon/storage/box/wormcan/deluxe/update_icon(var/itemremoved = 0)
if (contents.len == 0)
icon_state = "wormcan_empty_deluxe"
@@ -0,0 +1,12 @@
// this code here enables people to dig up worms from certain tiles.
/turf/simulated/floor/outdoors/grass/attackby(obj/item/weapon/S as obj, mob/user as mob)
if(istype(S, /obj/item/weapon/shovel))
to_chat(user, "<span class='notice'>You begin to dig in \the [src] with your [S].</span>")
if(do_after(user, 4 SECONDS * S.toolspeed))
to_chat(user, "<span class='notice'>\The [src] has been dug up, a worm pops from the ground.</span>")
new /obj/item/weapon/reagent_containers/food/snacks/worm(src)
else
to_chat(user, "<span class='notice'>You decide to not finish digging in \the [src].</span>")
else
..()
+8 -1
View File
@@ -87,7 +87,7 @@
if(istype(Bait, bait_type))
var/foodvolume
for(var/datum/reagent/re in Bait.reagents.reagent_list)
if(re.id == "nutriment" || re.id == "protein" || re.id == "glucose")
if(re.id == "nutriment" || re.id == "protein" || re.id == "glucose" || re.id == "fishbait")
foodvolume += re.volume
toolspeed = initial(toolspeed) * min(0.75, (0.5 / max(0.5, (foodvolume / Bait.reagents.maximum_volume))))
@@ -122,3 +122,10 @@
/obj/item/weapon/material/fishing_rod/modern/built
strung = FALSE
/obj/item/weapon/material/fishing_rod/modern/cheap //A rod sold by the fishing vendor. Done so that the rod sold by mining reward vendors doesn't loose its value.
name = "cheap fishing rod"
desc = "Mass produced, but somewhat reliable."
default_material = "plastic"
toolspeed = 0.9
+52
View File
@@ -3913,3 +3913,55 @@
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("protein", 4)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/piginblanket
name = "pig in a blanket"
desc = "A sausage embedded in soft, fluffy pastry. Free this pig from its blanket prison by eating it."
icon_state = "piginblanket"
nutriment_amt = 6
nutriment_desc = list("meat" = 3, "pastry" = 3)
/obj/item/weapon/reagent_containers/food/snacks/piginblanket/Initialize()
. = ..()
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("protein", 4)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/wormsickly
name = "sickly worm"
desc = "A worm, it doesn't look particularily healthy, but it will still serve as good fishing bait."
icon_state = "worm_sickly"
nutriment_amt = 1
nutriment_desc = list("bugflesh" = 1)
w_class = ITEMSIZE_TINY
/obj/item/weapon/reagent_containers/food/snacks/wormsickly/Initialize()
. = ..()
reagents.add_reagent("fishbait", 10)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/worm
name = "strange worm"
desc = "A peculiar worm, freshly plucked from the earth."
icon_state = "worm"
nutriment_amt = 1
nutriment_desc = list("bugflesh" = 1)
w_class = ITEMSIZE_TINY
/obj/item/weapon/reagent_containers/food/snacks/worm/Initialize()
. = ..()
reagents.add_reagent("fishbait", 20)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/wormdeluxe
name = "deluxe worm"
desc = "A fancy worm, genetically engineered to appeal to fish."
icon_state = "worm_deluxe"
nutriment_amt = 5
nutriment_desc = list("bugflesh" = 1)
w_class = ITEMSIZE_TINY
/obj/item/weapon/reagent_containers/food/snacks/wormdeluxe/Initialize()
. = ..()
reagents.add_reagent("fishbait", 40)
bitesize = 5
@@ -529,4 +529,12 @@
M.take_organ_damage(2 * removed, 2 * removed)
M.adjustOxyLoss(4 * removed)
M.adjustToxLoss(2 * removed)
M.adjustCloneLoss(2 * removed)
M.adjustCloneLoss(2 * removed)
/datum/reagent/fishbait
name = "Fish Bait"
id = "fishbait"
description = "A natural slurry that particularily appeals to fish."
taste_description = "earthy"
reagent_state = LIQUID
color = "#62764E"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 83 KiB

+1
View File
@@ -1322,6 +1322,7 @@
#include "code\game\turfs\simulated\outdoors\dirt.dm"
#include "code\game\turfs\simulated\outdoors\grass.dm"
#include "code\game\turfs\simulated\outdoors\outdoors.dm"
#include "code\game\turfs\simulated\outdoors\outdoors_attackby.dm"
#include "code\game\turfs\simulated\outdoors\sky.dm"
#include "code\game\turfs\simulated\outdoors\snow.dm"
#include "code\game\turfs\snow\snow.dm"