Files
Bubberstation/code/modules/paperwork/paperplane.dm
T
GhomandGitHub 10c2b7364e The fishening v3: Fishing lures. (#86007)
## About The Pull Request
Over half of the line changes are merely from splitting the
fish_types.dm into several files since it was over 1k lines already.

One of the small issues with fishing right now is RNG. You want to get
some specific fish, and you go through all the micromanaging with hooks,
reels and baits only for the random number god to say "nope", and that's
only going to get worse the more fish are in the game.

However, I've a solution: (unconsumable/reusable) fishing lures, each of
which attracts different fish based on different conditions. The only
caveat is that they require to be spun at set intervals (usually 1 to 3
seconds, depending on the lure, with a second-long window). Worry not,
there're visual cues in the form of a green/red light hovering the
fishing float, so you won't get screwed up by the server slowing down or
whatever.
The whole box of lures (12 so far) can be from cargo for the fair price
of 450 credits.

I've also added 5 new fish: monkfish, plaice, pike, another punnier
variant of the pike, perch and squid. The latter is quite special
because of the ink production trait, which lets players use it to blind
others at a close range and when butchered, it yields an ink sac, which
can be processed into a can of squid ink (one less item exclusive to the
produce console), or thrown at people in a sort-of-similar fashion of
banana cream pies (except it's ink).

<details>
  <summary>Images</summary>

Fishing lures (forgot to take my cursor off the veggie one before the
screenshot):

![immagine](https://github.com/user-attachments/assets/8ba7a0f2-2a9f-4177-9c0d-ebeabd8a0ef7)

The five new fish:

![immagine](https://github.com/user-attachments/assets/1c251079-3b39-48bb-af6c-0a35623953a7)

</details>

<details>
<summary>A table of fish catchable wth each lure (excluding
holodeck)</summary>


![table](https://github.com/user-attachments/assets/dee95855-405b-4945-bfc2-70e816e46109)

</details>

A few more things in the CL, baitfish are a thing now.

## Why It's Good For The Game
There should be ways to contrast some of the RNG fishing has. After all,
it's only going to get more random the more fish are in the game.
Furthermore, I find it disappointing that a lot of food stuff is
exclusive to the ingredients console and there're no other ways to get
it.

## Changelog

🆑
add: Added fishing lures to the game. They don't get used up like baits
and let you catch specific kinds of fish, though they need to be spun
every few seconds. The whole set can be ordered from cargo for 450
credits.
balance: The magnet hook now removes dud chances.
add: Added five new fish types: perch, two types of pike, monkfish,
plaice and squid. Squids have a fairly special ink production trait,
which lets you use them (unless dead) to ink people face at close range,
and can be butchered for an ink sac, which can either be processed into
canned squid ink, or thrown at someone.
fix: Refactored throwing a little. Some items (specifically
components/elements) won't be triggered when caught. no more plates
shattering despite being caught for example.
add: Goldfish, lavaloops, needlefish and armorfish can now be used as
baits.
/🆑
2024-09-06 19:50:28 -04:00

114 lines
3.9 KiB
Plaintext

/obj/item/paperplane
name = "paper plane"
desc = "Paper, folded in the shape of a plane."
icon = 'icons/obj/service/bureaucracy.dmi'
icon_state = "paperplane"
base_icon_state = "paperplane"
custom_fire_overlay = "paperplane_onfire"
throw_range = 7
throw_speed = 1
throwforce = 0
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
max_integrity = 50
///The chance of hitting a mob in the eye when thrown, in percentage.
var/hit_probability = 2
///Reference to the paper that's folded up in this paperplane, which we return when unfolded.
var/obj/item/paper/internal_paper
/obj/item/paperplane/syndicate
desc = "Paper, masterfully folded in the shape of a plane."
throwforce = 20
hit_probability = 100
/obj/item/paperplane/Initialize(mapload, obj/item/paper/paper_made_of)
. = ..()
pixel_x = base_pixel_x + rand(-9, 9)
pixel_y = base_pixel_y + rand(-8, 8)
if(paper_made_of)
internal_paper = paper_made_of
flags_1 = paper_made_of.flags_1
color = paper_made_of.color
paper_made_of.forceMove(src)
else
internal_paper = new(src)
if(istype(internal_paper, /obj/item/paper/carbon_copy))
icon_state = "[base_icon_state]_carbon"
update_appearance(UPDATE_ICON)
/obj/item/paperplane/Exited(atom/movable/gone, direction)
. = ..()
if (internal_paper == gone)
internal_paper = null
if(!QDELETED(src))
qdel(src)
/obj/item/paperplane/Destroy()
internal_paper = null
return ..()
/obj/item/paperplane/suicide_act(mob/living/user)
var/obj/item/organ/internal/eyes/eyes = user.get_organ_slot(ORGAN_SLOT_EYES)
user.Stun(20 SECONDS)
user.visible_message(span_suicide("[user] jams [src] in [user.p_their()] nose. It looks like [user.p_theyre()] trying to commit suicide!"))
user.adjust_eye_blur(12 SECONDS)
if(eyes)
eyes.apply_organ_damage(rand(6,8))
sleep(1 SECONDS)
return BRUTELOSS
/obj/item/paperplane/update_overlays()
. = ..()
for(var/stamp in internal_paper.stamp_cache)
. += "[base_icon_state]_[stamp]"
/obj/item/paperplane/attack_self(mob/user)
balloon_alert(user, "unfolded")
var/atom/location = drop_location()
// Need to keep a reference to the internal paper
// when we move it out of the plane, our ref gets set to null
var/obj/item/paper/released_paper = internal_paper
released_paper.forceMove(location)
// This will as a side effect, qdel the paper plane, making the user's hands empty
user.put_in_hands(released_paper)
/obj/item/paperplane/attackby(obj/item/attacking_item, mob/user, params)
if(burn_paper_product_attackby_check(attacking_item, user))
return
if(IS_WRITING_UTENSIL(attacking_item))
to_chat(user, span_warning("You should unfold [src] before changing it!"))
return
else if(istype(attacking_item, /obj/item/stamp)) //we don't randomize stamps on a paperplane
internal_paper.attackby(attacking_item, user) //spoofed attack to update internal paper.
update_appearance()
add_fingerprint(user)
return
return ..()
/obj/item/paperplane/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscarbon(hit_atom) && HAS_TRAIT(hit_atom, TRAIT_PAPER_MASTER))
var/mob/living/carbon/hit_carbon = hit_atom
if(hit_carbon.can_catch_item(src, skip_throw_mode_check = TRUE))
hit_carbon.throw_mode_on(THROW_MODE_TOGGLE)
. = ..()
if(. || !ishuman(hit_atom)) //if the plane is caught or it hits a nonhuman
return
var/mob/living/carbon/human/hit_human = hit_atom
var/obj/item/organ/internal/eyes/eyes = hit_human.get_organ_slot(ORGAN_SLOT_EYES)
if(!prob(hit_probability))
return
if(hit_human.is_eyes_covered())
return
visible_message(span_danger("\The [src] hits [hit_human] in the eye[eyes ? "" : " socket"]!"))
hit_human.adjust_eye_blur(12 SECONDS)
eyes?.apply_organ_damage(rand(6, 8))
hit_human.Paralyze(4 SECONDS)
hit_human.emote("scream")
/obj/item/paperplane/throw_at(atom/target, range, speed, mob/thrower, spin=FALSE, diagonals_first = FALSE, datum/callback/callback, gentle, quickstart = TRUE)
return ..(target, range, speed, thrower, FALSE, diagonals_first, callback, quickstart = quickstart)