mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-17 20:30:46 +01:00
d5849910e5
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
240 lines
6.5 KiB
Plaintext
240 lines
6.5 KiB
Plaintext
/obj/item/material/fishing_net
|
|
name = "fishing net"
|
|
desc = "A crude fishing net."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "net"
|
|
item_state = "net"
|
|
description_info = "This object can be used to capture certain creatures easily, most commonly fish. \
|
|
It has a reach of two tiles, and can be emptied by activating it in-hand. \
|
|
This version will not keep creatures inside in stasis, and will be heavier if it contains a mob."
|
|
|
|
var/empty_state = "net"
|
|
var/contain_state = "net_full"
|
|
|
|
w_class = ITEMSIZE_SMALL
|
|
flags = NOBLUDGEON
|
|
|
|
slowdown = 0.5
|
|
|
|
reach = 2
|
|
|
|
default_material = MAT_CLOTH
|
|
|
|
var/list/accepted_mobs = list(/mob/living/simple_mob/animal/passive/fish)
|
|
|
|
///Var for attack_self chain
|
|
var/special_handling = FALSE
|
|
|
|
/obj/item/material/fishing_net/Initialize(mapload)
|
|
. = ..()
|
|
update_icon()
|
|
|
|
/obj/item/material/fishing_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))
|
|
accept = TRUE
|
|
for(var/atom/At in src.contents)
|
|
if(isliving(At))
|
|
to_chat(user, span_notice("Your net is already holding something!"))
|
|
accept = FALSE
|
|
if(!accept)
|
|
to_chat(user, span_filter_notice("[A] can't be trapped in \the [src]."))
|
|
return
|
|
var/mob/L = A
|
|
user.visible_message(span_notice("[user] snatches [L] with \the [src]."), span_notice("You snatch [L] with \the [src]."))
|
|
L.forceMove(src)
|
|
update_icon()
|
|
update_weight()
|
|
return
|
|
return ..()
|
|
|
|
/obj/item/material/fishing_net/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
if(special_handling)
|
|
return FALSE
|
|
for(var/mob/M in src)
|
|
M.forceMove(get_turf(src))
|
|
user.visible_message(span_notice("[user] releases [M] from \the [src]."), span_notice("You release [M] from \the [src]."))
|
|
for(var/obj/item/I in src)
|
|
I.forceMove(get_turf(src))
|
|
user.visible_message(span_notice("[user] dumps \the [I] out of \the [src]."), span_notice("You dump \the [I] out of \the [src]."))
|
|
update_icon()
|
|
update_weight()
|
|
return
|
|
|
|
/obj/item/material/fishing_net/attackby(var/obj/item/W, var/mob/user)
|
|
if(contents)
|
|
for(var/mob/living/L in contents)
|
|
if(prob(25))
|
|
L.attackby(W, user)
|
|
..()
|
|
|
|
/obj/item/material/fishing_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)
|
|
var/image/victim = image(M.icon, M.icon_state)
|
|
underlays += victim
|
|
name = "filled net"
|
|
desc = "A net with [M] inside."
|
|
contains_mob = TRUE
|
|
|
|
if(contains_mob)
|
|
icon_state = contain_state
|
|
|
|
else
|
|
icon_state = empty_state
|
|
|
|
return
|
|
|
|
/obj/item/material/fishing_net/proc/update_weight()
|
|
if(icon_state == contain_state) // Let's not do a for loop just to see if a mob is in here.
|
|
slowdown = initial(slowdown) * 2
|
|
reach = 1
|
|
else
|
|
slowdown = initial(slowdown)
|
|
reach = initial(reach)
|
|
|
|
/obj/item/material/fishing_net/butterfly_net
|
|
name = "butterfly net"
|
|
desc = "A butterfly net, it can be used to catch small critters, such as butterflies, but perhaps also friends?"
|
|
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 = MAT_CLOTH
|
|
|
|
accepted_mobs = list(/mob/living/simple_mob/animal/sif/glitterfly, /mob/living/carbon/human)
|
|
|
|
special_handling = TRUE
|
|
|
|
/obj/item/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(ishuman(M) && 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_notice("Your net is already holding something!"))
|
|
accept = FALSE
|
|
if(!accept)
|
|
to_chat(user, span_filter_notice("[A] can't be trapped in \the [src]."))
|
|
return
|
|
var/mob/L = A
|
|
user.visible_message(span_notice("[user] snatches [L] with \the [src]."), span_notice("You snatch [L] with \the [src]."))
|
|
L.forceMove(src)
|
|
playsound(src, 'sound/effects/plop.ogg', 50, 1)
|
|
update_icon()
|
|
update_weight()
|
|
return
|
|
return ..()
|
|
|
|
/obj/item/material/fishing_net/butterfly_net/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
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_notice("[user] scoops [M] out from \the [src]."), span_notice("You pull [M] from \the [src]."))
|
|
else
|
|
M.forceMove(get_turf(src))
|
|
user.visible_message(span_notice("[user] releases [M] from \the [src]."), span_notice("You release [M] from \the [src]."))
|
|
for(var/obj/item/I in src)
|
|
I.forceMove(get_turf(src))
|
|
user.visible_message(span_notice("[user] dumps \the [I] out of \the [src]."), span_notice("You dump \the [I] out of \the [src]."))
|
|
update_icon()
|
|
update_weight()
|
|
return
|
|
|
|
/obj/item/material/fishing_net/butterfly_net/container_resist(mob/living/M)
|
|
if(prob(20))
|
|
if(isdisposalpacket(loc))
|
|
M.forceMove(loc)
|
|
else
|
|
M.forceMove(get_turf(src))
|
|
to_chat(M, span_warning("You climb out of \the [src]."))
|
|
update_icon()
|
|
update_weight()
|
|
else
|
|
to_chat(M, span_warning("You fail to escape \the [src]."))
|
|
|
|
/obj/item/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/material/fishing_net/butterfly_net
|
|
reqs = list(
|
|
list(/obj/item/stack/material/cloth = 2)
|
|
)
|
|
time = 20
|
|
category = CAT_MISC
|