Butterfly nets (#16088)

Added butterfly nets. These nets can be wafted across a tile, much like a fishing net, to catch butterflies (and people of scale 50% and below)! Using them on themselves either drops the contents, or if the inactive hand is empty, pulls out the contents into the free hand.
They can be crafted from cloth, found in the botanists locker, or rarely found in maintenance.
This commit is contained in:
SatinIsle
2024-07-07 20:47:09 +10:00
committed by GitHub
parent 65e44b9111
commit d27b00d2f5
5 changed files with 117 additions and 1 deletions
+1
View File
@@ -113,6 +113,7 @@ something, make sure it's not in one of the other lists.*/
prob(2);/obj/item/toy/tennis/purple,
prob(1);/obj/item/toy/baseball,
prob(1);/obj/item/pizzavoucher,
prob(5);/obj/item/weapon/material/fishing_net/butterfly_net,
prob(2);/obj/item/weapon/cracker
/* VOREStation Edit End */
)
@@ -18,7 +18,8 @@
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/clothing/suit/storage/hooded/wintercoat/hydro,
/obj/item/clothing/shoes/boots/winter/hydro,
/obj/item/weapon/storage/belt/hydro)
/obj/item/weapon/storage/belt/hydro,
/obj/item/weapon/material/fishing_net/butterfly_net)
/obj/structure/closet/secure_closet/hydroponics/Initialize()
if(prob(50))
+114
View File
@@ -107,3 +107,117 @@
else
slowdown = initial(slowdown)
reach = initial(reach)
/obj/item/weapon/material/fishing_net/butterfly_net
name = "butterfly net"
desc = "A butterfly net."
icon = 'icons/obj/items.dmi'
icon_state = "butterfly_net"
item_state = "butterfly_net"
description_info = "This object can be used to capture certain creatures easily, most commonly butterflies. \
It can be emptied by activating it in-hand."
empty_state = "butterfly_net"
contain_state = "butterfly_net_full"
w_class = ITEMSIZE_SMALL
flags = NOBLUDGEON
reach = 1
default_material = "cloth"
accepted_mobs = list(/mob/living/simple_mob/animal/sif/glitterfly, /mob/living/carbon/human)
/obj/item/weapon/material/fishing_net/butterfly_net/afterattack(var/atom/A, var/mob/user, var/proximity)
if(get_dist(get_turf(src), A) > reach)
return
if(istype(A, /turf))
var/mob/living/Target
for(var/type in accepted_mobs)
Target = locate(type) in A.contents
if(Target)
afterattack(Target, user, proximity)
break
if(istype(A, /mob))
var/accept = FALSE
for(var/D in accepted_mobs)
if(istype(A, D))
var/mob/M = A
if(istype(M, /mob/living/carbon/human) && M.size_multiplier > 0.5)
accept = FALSE
else if(A == user)
accept = FALSE
else
accept = TRUE
for(var/atom/At in src.contents)
if(isliving(At))
to_chat(user, "<span class='notice'>Your net is already holding something!</span>")
accept = FALSE
if(!accept)
to_chat(user, "<span class='filter_notice'>[A] can't be trapped in \the [src].</span>")
return
var/mob/L = A
user.visible_message("<span class='notice'>[user] snatches [L] with \the [src].</span>", "<span class='notice'>You snatch [L] with \the [src].</span>")
L.forceMove(src)
playsound(src, 'sound/effects/plop.ogg', 50, 1)
update_icon()
update_weight()
return
return ..()
/obj/item/weapon/material/fishing_net/butterfly_net/attack_self(var/mob/user)
for(var/mob/living/M in src)
if(!user.get_inactive_hand()) //Check if the inactive hand is empty
M.forceMove(get_turf(src))
M.attempt_to_scoop(user)
user.visible_message("<span class='notice'>[user] scoops [M] out from \the [src].</span>", "<span class='notice'>You pull [M] from \the [src].</span>")
else
M.forceMove(get_turf(src))
user.visible_message("<span class='notice'>[user] releases [M] from \the [src].</span>", "<span class='notice'>You release [M] from \the [src].</span>")
for(var/obj/item/I in src)
I.forceMove(get_turf(src))
user.visible_message("<span class='notice'>[user] dumps \the [I] out of \the [src].</span>", "<span class='notice'>You dump \the [I] out of \the [src].</span>")
update_icon()
update_weight()
return
/obj/item/weapon/material/fishing_net/butterfly_net/container_resist(mob/living/M)
if(prob(20))
M.forceMove(get_turf(src))
to_chat(M, "<span class='warning'>You climb out of \the [src].</span>")
update_icon()
update_weight()
else
to_chat(M, "<span class='warning'>You fail to escape \the [src].</span>")
/obj/item/weapon/material/fishing_net/butterfly_net/update_icon() // Also updates name and desc
underlays.Cut()
cut_overlays()
name = initial(name)
desc = initial(desc)
var/contains_mob = FALSE
for(var/mob/M in src)
name = "filled butterfly net"
desc = "A net with [M] inside."
contains_mob = TRUE
if(contains_mob)
icon_state = contain_state
else
icon_state = empty_state
return
/datum/crafting_recipe/butterfly_net
name = "butterfly net"
result = /obj/item/weapon/material/fishing_net/butterfly_net
reqs = list(
list(/obj/item/stack/material/cloth = 2)
)
time = 20
category = CAT_MISC
Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.