-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds fishing #3790
Adds fishing #3790
Conversation
95b55d5
to
57a411f
Compare
Calling this ready to go. It'll need some playtesting and refinement, and I'd like to make the actual minigame more interesting, but it'll do for the time being. |
9b8e6aa
to
1ff3644
Compare
If I keep messing with this I'm never going to stop. |
code/game/area/area_fishing.dm
Outdated
|
||
. = new loot_type(origin) | ||
|
||
// This is pretty rancid but we're limited in our ability to actually refine a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling this block out for review as in general I don't like it, but I can't think of anything less bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could potentially make it use /datum/atom_creator
like closets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per my other comment I'm not sure I see how that would be an improvement.
EDIT: I think I get what you mean but I don't think it's a suitable solution.
code/game/objects/random/random.dm
Outdated
if(!SSatoms.initialized || !length(spawned_atoms)) | ||
return INITIALIZE_HINT_QDEL | ||
|
||
// Hang around for a tick in case someone wants our spawn results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about re: bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this! /datum/atom_creator/weighted()
is better for things where code might need to access the results, in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how you can access results from datum/atom_creator/weighted
, it just seems to dump stuff into the loc the same as a random spawner does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see what you mean, but it's not really what I want. It would lock the fishing results to a single type unless I regenerated the list every time I wanted to get a result from it.
995a742
to
402fc83
Compare
code/game/area/area_fishing.dm
Outdated
|
||
. = new loot_type(origin) | ||
|
||
// This is pretty rancid but we're limited in our ability to actually refine a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could potentially make it use /datum/atom_creator
like closets?
code/game/objects/random/random.dm
Outdated
if(!SSatoms.initialized || !length(spawned_atoms)) | ||
return INITIALIZE_HINT_QDEL | ||
|
||
// Hang around for a tick in case someone wants our spawn results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this! /datum/atom_creator/weighted()
is better for things where code might need to access the results, in my opinion.
402fc83
to
b128a1f
Compare
I just rolled back the random item handling, it can get sorted out in another PR. |
8b35592
to
ec1f24a
Compare
Does this feature the stardew valley style fishing minigame? If not and you need icons for that later feel free to hit me up MistakeNot :) |
No minigame currently, but it would be nice... |
36391e8
to
b95a433
Compare
code/modules/fishing/fishing_rod.dm
Outdated
var/is_fishing = FALSE | ||
var/obj/item/bait | ||
var/obj/item/fishing_line/line | ||
var/line_integrity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this variable is unused
if(!target.submerged()) | ||
to_chat(user, SPAN_WARNING("The water is not deep enough to fish there.")) | ||
return FISHING_FAILED_WARNING | ||
return FISHING_POSSIBLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't check if something is blocking our path, and doing so is currently nontrivial. i have a commit that fixes this pretty well if you'd like, ask about it on Discord and i'll link it to you assuming i've pushed it by then
code/modules/fishing/fishing_rod.dm
Outdated
if(QDELETED(line)) | ||
to_chat(user, SPAN_DANGER("Your fishing line snaps!")) | ||
line = null | ||
update_icon() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update_icon() | |
update_icon() | |
result.throw_at(get_turf(user), get_dist(src, result), 0.5, user, FALSE) |
This way, you actually 'reel' the catch in and don't have to wade out into the water to collect your fish.
code/modules/fishing/fishing_rod.dm
Outdated
|
||
// TODO: more interesting fishing minigame. | ||
/obj/item/fishing_rod/proc/do_fishing_minigame(mob/user, turf/target) | ||
user.visible_message(SPAN_NOTICE("\The [user] casts \the [src] into \the [target].")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user.visible_message(SPAN_NOTICE("\The [user] casts \the [src] into \the [target].")) | |
user.visible_message(SPAN_NOTICE("\The [user] casts \the [src] into \the [target.get_fluid_name()].")) |
ideally you cast it into the water (lava, blood, etc), not into the mud
Grabbed your commits and put some time into the minigame. Need to add some sounds and visual cues but the logic seems to be working. |
d166761
to
b9a01a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed some cases of [target]
, but the minigame looks fine!
code/modules/fishing/fishing_rod.dm
Outdated
|
||
if(is_fishing) | ||
if(isnull(is_fishing.hooked)) | ||
to_chat(user, SPAN_NOTICE("You reel your line back in and abandon fishing in \the [is_fishing.target].")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to_chat(user, SPAN_NOTICE("You reel your line back in and abandon fishing in \the [is_fishing.target].")) | |
to_chat(user, SPAN_NOTICE("You reel your line back in and abandon fishing in \the [is_fishing.target.get_fluid_name()].")) |
Missed one, sorry.
return FISHING_FAILED_WARNING | ||
var/list/hit = check_trajectory(target, src, pass_flags=PASS_FLAG_TABLE, lifespan = get_dist(target, src)) | ||
if(length(hit)) | ||
to_chat(user, SPAN_WARNING("Your fishing line is blocked from reaching \the [target] by \the [hit[1]].")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to_chat(user, SPAN_WARNING("Your fishing line is blocked from reaching \the [target] by \the [hit[1]].")) | |
to_chat(user, SPAN_WARNING("Your fishing line is blocked from reaching \the [target.get_fluid_name()] by \the [hit[1]].")) |
ca2ab5c
to
012509c
Compare
012509c
to
7c39f0f
Compare
7c39f0f
to
2068c84
Compare
Description of changes
Why and what will this PR improve
Fishing good.
TODO
Authorship
Code is mine, icons are adapted from Polaris.
Changelog
🆑
add: Added fishing!
/:cl: