-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fishing, Version 1 #67691
Fishing, Version 1 #67691
Conversation
What about a shitty maint version made from cardboard tubes and cable? (This is equally me asking if that'd be a good followup pr) |
legendary pr, well done |
You can fish in moisture traps for a kind of fish :^) |
Ice fishing on icebox??? |
|
||
/// Sent by the target of the fishing rod cast | ||
#define COMSIG_FISHING_ROD_CAST "comsig_fishing_rod_cast" | ||
#define FISHING_ROD_CAST_HANDLED 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.
#define FISHING_ROD_CAST_HANDLED 1 | |
#define FISHING_ROD_CAST_HANDLED (1<<0) |
@@ -0,0 +1,3 @@ | |||
/// Called before beam is redrawn | |||
#define COMSIG_BEAM_BEFORE_DRAW "beam_before_draw" | |||
#define BEAM_CANCEL_DRAW 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.
#define BEAM_CANCEL_DRAW 1 | |
#define BEAM_CANCEL_DRAW (1<<0) |
Looks super cool. Just as a potential future idea, fishing may be a good target for fishing skill and/or legendary fishing skill cape. |
This looks awesome! |
make dead rats usable as bait |
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.
- Balloon alerts should be kept lowercase and short,
!
is for failures,...
is for delayed actions. Not hard rules (which is why !!! is alright) but should be kept in mind - Re-review https://github.com/tgstation/tgstation/blob/master/.github/guides/STANDARDS.md#dot-variable-
|
||
/datum/component/fishing_spot/proc/handle_cast(datum/source, obj/item/fishing_rod/rod, mob/user) | ||
SIGNAL_HANDLER | ||
. = NONE |
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.
Why this instead of just return NONE
at the end?
var/obj/item/fishing_rod/rod = possibly_rod | ||
if(istype(rod)) | ||
if(HAS_TRAIT(user,TRAIT_GONE_FISHING) || rod.currently_hooked_item) | ||
to_chat(user, span_notice("You're not good enough to fish in two places at once.")) |
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.
Balloon? (with shorter text)
if(HAS_TRAIT(user,TRAIT_GONE_FISHING) || rod.currently_hooked_item) | ||
to_chat(user, span_notice("You're not good enough to fish in two places at once.")) | ||
return COMPONENT_NO_AFTERATTACK | ||
var/denial_reason = fish_source.can_fish(rod, user) |
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.
var/denial_reason = fish_source.can_fish(rod, user) | |
var/denial_reason = fish_source.can_fish(rod, user) |
code/modules/cargo/packs.dm
Outdated
|
||
/datum/supply_pack/misc/fishing_portal | ||
name = "Fishing Portal Generator Crate" | ||
desc = "Not enough fish near your location ? Fishing portal has your back." |
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.
desc = "Not enough fish near your location ? Fishing portal has your back." | |
desc = "Not enough fish near your location? Fishing portal has your back." |
phase = BITING_PHASE | ||
// Trashing animation | ||
playsound(lure, 'sound/effects/fish_splash.ogg', 100) | ||
lure.balloon_alert(user,"!!!") |
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.
lure.balloon_alert(user,"!!!") | |
lure.balloon_alert(user, "!!!") |
//fish caught signal if needed goes here and/or fishing achievements | ||
//Try to put it in hand | ||
fisherman.put_in_hands(reward) | ||
fisherman.balloon_alert(fisherman,"You caught [reward]!") |
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.
fisherman.balloon_alert(fisherman,"You caught [reward]!") | |
fisherman.balloon_alert(fisherman, "caught [reward]!") |
fisherman.put_in_hands(reward) | ||
fisherman.balloon_alert(fisherman,"You caught [reward]!") | ||
else //If someone adds fishing out carp/chests/singularities or whatever just plop it down on the fisher's turf | ||
fisherman.balloon_alert(fisherman,"You fish out something !") |
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.
fisherman.balloon_alert(fisherman,"You fish out something !") | |
fisherman.balloon_alert(fisherman, "caught something!") |
/// Text shown as baloon alert when you roll a dud in the table | ||
var/duds = list("You catch absolutely nothing", "The hook is empty") |
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.
/// Text shown as baloon alert when you roll a dud in the table | |
var/duds = list("You catch absolutely nothing", "The hook is empty") | |
/// Text shown as balloon alert when you roll a dud in the table | |
var/duds = list("it was nothing", "the hook is empty") |
code/modules/tgui/tgui_window.dm
Outdated
@@ -219,6 +220,8 @@ | |||
/datum/tgui_window/proc/close(can_be_suspended = TRUE) | |||
if(!client) | |||
return | |||
if(mouse_event_macro_set) | |||
remove_mouse_macro(); |
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.
remove_mouse_macro(); | |
remove_mouse_macro() |
@@ -305,3 +305,8 @@ | |||
|
|||
/datum/mood_event/russian_roulette_win/add_effects(loaded_rounds) | |||
mood_change = 2 ** loaded_rounds | |||
|
|||
/datum/mood_event/fishing | |||
description = "Fishing is relaxing" |
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.
description = "Fishing is relaxing" | |
description = "Fishing is relaxing." |
code/game/objects/items/food/bait.dm
Outdated
|
||
/obj/item/food/bait/worm | ||
name = "worm" | ||
desc = "It's a wriggiling worm from a can of fishing bait. You're not going to eat it are you ?" |
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.
desc = "It's a wriggiling worm from a can of fishing bait. You're not going to eat it are you ?" | |
desc = "It's a wriggling worm from a can of fishing bait. You're not going to eat it, are you?" |
if(win) | ||
//validate timings to have at least basic abuse prevention, though it's kinda impossible task here | ||
// 140 from minimum completion bar fill time | ||
var/minimum_time = start_time + 140 |
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.
define?
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.
review on the DM side of things
#define COMSIG_FISHING_CHALLENGE_COMPLETED "comsig_fishing_completed" | ||
/// Called when you try to use fishing rod on anything | ||
#define COMSIG_PRE_FISHING "comsig_pre_fishing" | ||
|
||
/// Sent by the target of the fishing rod cast | ||
#define COMSIG_FISHING_ROD_CAST "comsig_fishing_rod_cast" | ||
#define FISHING_ROD_CAST_HANDLED (1 << 0) | ||
|
||
/// Sent when fishing line is snapped | ||
#define COMSIG_FISHING_LINE_SNAPPED "comsig_fishing_line_interrupted" |
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.
remove the comsig from inside the define value to keep consistent with every other comsig define
code/__HELPERS/maths.dm
Outdated
var/dy | ||
var/dx | ||
dy=(32 * end_y + end_pixel_y) - (32 * start_y + start_pixel_y) | ||
dx=(32 * end_x + end_pixel_x) - (32 * start_x + start_pixel_x) |
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.
what I don't get is why you don't just do
var/dy = value
var/dx = value
if(istype(rod)) | ||
if(HAS_TRAIT(user,TRAIT_GONE_FISHING) || rod.currently_hooked_item) | ||
user.balloon_alert(user, "already fishing") | ||
return COMPONENT_NO_AFTERATTACK | ||
var/denial_reason = fish_source.can_fish(rod, user) | ||
if(denial_reason) | ||
to_chat(user, span_warning(denial_reason)) | ||
return COMPONENT_NO_AFTERATTACK | ||
start_fishing_challenge(rod, user) | ||
return COMPONENT_NO_AFTERATTACK |
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.
consider early returns here, it'll make the code more readable.
if(istype(rod)) | |
if(HAS_TRAIT(user,TRAIT_GONE_FISHING) || rod.currently_hooked_item) | |
user.balloon_alert(user, "already fishing") | |
return COMPONENT_NO_AFTERATTACK | |
var/denial_reason = fish_source.can_fish(rod, user) | |
if(denial_reason) | |
to_chat(user, span_warning(denial_reason)) | |
return COMPONENT_NO_AFTERATTACK | |
start_fishing_challenge(rod, user) | |
return COMPONENT_NO_AFTERATTACK | |
if(!istype(rod)) | |
return | |
if(HAS_TRAIT(user,TRAIT_GONE_FISHING) || rod.currently_hooked_item) | |
user.balloon_alert(user, "already fishing") | |
return COMPONENT_NO_AFTERATTACK | |
var/denial_reason = fish_source.can_fish(rod, user) | |
if(denial_reason) | |
to_chat(user, span_warning(denial_reason)) | |
return COMPONENT_NO_AFTERATTACK | |
start_fishing_challenge(rod, user) | |
return COMPONENT_NO_AFTERATTACK |
. = ..() | ||
UnregisterSignal(target, COMSIG_PRE_FISHING) | ||
|
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.
when detaching or doing any sort of cleanup, it's usually the case that the parent gets called last
code/modules/fishing/admin.dm
Outdated
if(!check_rights(R_ADMIN)) | ||
return |
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.
Wouldn't it make sense for this to be under debug permissions instead?
/obj/item/fishing_rod/proc/check_los(datum/beam/source) | ||
SIGNAL_HANDLER | ||
. = NONE |
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.
what is the point of this . = NONE?
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 believe it's good idea to make it explicit when the signal expects return value
code/modules/fishing/fishing_rod.dm
Outdated
/obj/item/fishing_rod/proc/hook_hit(atom/movable/A) | ||
var/mob/user = loc | ||
if(!istype(user)) | ||
return | ||
if(SEND_SIGNAL(A, COMSIG_FISHING_ROD_CAST, src, user) & FISHING_ROD_CAST_HANDLED) | ||
return | ||
/// If you can't fish in it, try hooking it | ||
hook_item(user, 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.
A needs a better name
code/modules/fishing/fishing_rod.dm
Outdated
/obj/item/fishing_rod/tech/use_slot(slot, mob/user, obj/item/new_item) | ||
if(slot == ROD_SLOT_BAIT) | ||
return | ||
. = ..() |
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.
. = ..() | |
return ..() |
code/modules/fishing/fishing_rod.dm
Outdated
/obj/projectile/fishing_cast/Impact(atom/A) | ||
. = ..() | ||
owner.hook_hit(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.
A needs a better name
if(ispath(result,/obj/item/fish)) | ||
var/obj/item/fish/caught_fish = result | ||
// Baseline fish difficulty |
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.
is there a reason to not early return here? If not, consider doing an early return here.
Adds fishing and fishing minigame. You use fishing rod to fish. Equipping specific bait/hook/reels will affect your success chances. You can fish out fish,items and other things. Fishing Equipment Fishing rods have three slots: Bait, Reel and Hook. Any food can be used as bait but dedicated bait makes fishing easier. You can buy hook and line sets New bait types: Worms : Buy can of them at cargo (alternative acquirement method pending) Doughballs : Use knife on flat piece of dough to get five of them. Fishing rod types: Basic : Print these at the lathe, nothing fancy here. Tech: Experimental tech. Provides infinite bait Fishing rods can also hook and reel normal items. Equipment screen and reeling video Fishing spots Keep in mind this PR is meant to add the basic systems and i intend to fill these with more fish in future PR's so wait with suggestions until then. Lavaland lava (no fish here right now, just other stuff), requires reinforced line to fish in. Maintenance moisture traps. Beach away mission water. Fishing portal available for purchase from cargo - This is stopgap until we fill more spots. Difficulty depends on fishing spot, fish type, and the fish traits and rod setup combinations. All fish types can have specific traits, most common ones being favourite and disliked bait types/categories. Other Fishing catalog now lists fishing related info New admin debug verb, fishing calculator that show probabilities with different setups so it's easier to balance this. Fish now have average weight and size. Make sure to boast if you catch a big one. Adds tgui mouse passthrough Screens Sprites: Fishing portal sprite by @ArcaneMusic Other sprites by @Mey-Ha-Zah Bad ones by me. (Could still use better fishing minigame backgrounds) Sounds: https://freesound.org/people/soundscalpel.com/sounds/110393/ https://freesound.org/people/soundslikewillem/sounds/343748/
* tgui input hotfix tgstation/tgstation#64698 * changes how tgui handles static data tgstation/tgstation#64757 * tgstation/tgstation#64885 * tgstation/tgstation#65008 * cooldown check * read preferences doenst exist here * tgstation/tgstation#65378 * Adds support for embedding react components in tgui chat * tgstation/tgstation#65686 * tgstation/tgstation#65943 * previous part 2 * oops forgot * tgstation/tgstation#66220 * tgstation/tgstation#66299 * FUCk forgot 1 * tgstation/tgstation#59914 * tgstation/tgstation#66304 * tgstation/tgstation#66309 * tgstation/tgstation#66317 * tgstation/tgstation#66691 * tgstation/tgstation#66757 * small changes from 66933 * tgstation/tgstation#67137 * tgui part of tgstation/tgstation#67691 and tgstation/tgstation#66971 * forgot public html * tgstation/tgstation#67935 prewritepackages * after write packages * tgstation/tgstation#67937 * oops * tgstation/tgstation#68216 * tgstation/tgstation#68356 * tgstation/tgstation#68679 * tgstation/tgstation#68887 * prettier ignore outside * tgstation/tgstation#69219 * tgstation/tgstation#69459 * tgstation/tgstation#69527 * tgstation/tgstation#69735 * tgstation/tgstation#69786 * tgstation/tgstation#70779 * boop * Update code/modules/mob/living/silicon/ai/examine.dm * fix ? * io * yo * prettier * prettier + other stuff + tgui say etc * okay ? * webpack tguisay * ntoswindow * tguialert move * tgui say work ? * tgstation/tgstation#71037 * rollback tguisay * comment out tgui say * remove tguisay dm files * updates tgui folder * whytflinter * rerun * fixes stack trace on fullupdate * woops, removes \n from join() * balloon alert * timeleft shenanigan solve stack_trace * check if fix linter * add it back * woo linter
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Adds god's most holiest of features and the refactor code needed to run it. Also adds in new missions to add even more fishing related gameplay depth. Makes beach planets no longer populated by flying fish too, god rest their souls. ![image](https://user-images.githubusercontent.com/112462947/232165008-f82f5019-5dd7-461a-a7fd-b8178ca4f302.png) Ports these TG Station PRs: tgstation/tgstation#67691 tgstation/tgstation#56343 tgstation/tgstation#55193 (And probably some minor bits of other ones I'm forgetting) ## Important Image ![588824fad757cd7c47e56f12b604dab6119dd3815ed4843f971e725e16609cbb_1](https://user-images.githubusercontent.com/112462947/232162917-cb99a980-c075-43f3-ae14-20e6a5947a04.jpg) <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game Adds a fun yet rewarding downtime activity. Also, you look at beach planets and tell me those weren't meant to be fished on! <!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. --> ## Changelog :cl: add: TG fishing minigame add: Aquariums add: The ability to fish on beach, lava, and jungle planets add: New outpost missions add: New fishing related outpost crates del: Removed flying fish from beach planets and made them into actual fish tweak: Increased the amount of outpost missions that generate at once from 15 to 20 refactor: Refactored beam code to use signals /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Signed-off-by: BogCreature <112462947+BogCreature@users.noreply.github.com>
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Adds god's most holiest of features and the refactor code needed to run it. Also adds in new missions to add even more fishing related gameplay depth. Makes beach planets no longer populated by flying fish too, god rest their souls. ![image](https://user-images.githubusercontent.com/112462947/232165008-f82f5019-5dd7-461a-a7fd-b8178ca4f302.png) Ports these TG Station PRs: tgstation/tgstation#67691 tgstation/tgstation#56343 tgstation/tgstation#55193 (And probably some minor bits of other ones I'm forgetting) ## Important Image ![588824fad757cd7c47e56f12b604dab6119dd3815ed4843f971e725e16609cbb_1](https://user-images.githubusercontent.com/112462947/232162917-cb99a980-c075-43f3-ae14-20e6a5947a04.jpg) <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game Adds a fun yet rewarding downtime activity. Also, you look at beach planets and tell me those weren't meant to be fished on! <!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. --> ## Changelog :cl: add: TG fishing minigame add: Aquariums add: The ability to fish on beach, lava, and jungle planets add: New outpost missions add: New fishing related outpost crates del: Removed flying fish from beach planets and made them into actual fish tweak: Increased the amount of outpost missions that generate at once from 15 to 20 refactor: Refactored beam code to use signals /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Signed-off-by: BogCreature <112462947+BogCreature@users.noreply.github.com>
About The Pull Request
Adds fishing and fishing minigame.
You use fishing rod to fish.
Equipping specific bait/hook/reels will affect your success chances.
You can fish out fish,items and other things.
Fishing Equipment
Fishing rods have three slots: Bait, Reel and Hook.
Any food can be used as bait but dedicated bait makes fishing easier.
You can buy hook and line sets
New bait types:
Fishing rod types:
Fishing rods can also hook and reel normal items.
Equipment screen and reeling video
dreamseeker_SvgK3Uq7jk.mp4
Fishing spots
Keep in mind this PR is meant to add the basic systems and i intend to fill these with more fish in future PR's so wait with suggestions until then.
Fishing minigame
Video probably explains it better than a few paragraphs:
dreamseeker_Jq1Mpk1TuX.mp4
Difficulty depends on fishing spot, fish type, and the fish traits and rod setup combinations.
All fish types can have specific traits, most common ones being favourite and disliked bait types/categories.
Other
Screens
Sprites:
Sounds:
Why It's Good For The Game
Videogame without fishing minigame can't be a good videogame.
Changelog
🆑
add: Added fishing, fishing rods and other fishing equipment.
add: Fishing related cargo crates & private packs.
add: Fishing technology and designs
/:cl: