mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 09:03:37 +00:00
* The fishing portal generator expansion (plus skill-chip) (#78203) ## About The Pull Request This is a PR I worked on last month, but had to put on hold while dealing with some pressing issues with fishing feature, minigame and other stuff, and because I had to atomize out some of the stuff previously present here. I've expanded on the fishing portal generator to do something other than dispense guppies and goldfishes. It now has multiple settings, unlockable by performing scanning experiments for fish types, available from the get go, which also reward a meager amount of techweb points upon completion. The generator can now be built too. No longer it has to be ordered from cargo. It can also be emagged for the syndicate setting, tho right now it only dispenses donkfish and emulsijack, both otherwise impossible to get outside of... exodrone adventures. The advanced fishing rod now comes with an experiment handler component, specific to the fish scanning experiment, that automatically scans fished content. The node to get it now requires 2000 points and the first fish scanning exp to be unock. A new skillchip has been added, which adds a trait that changes the icon of the fish shown in the minigame UI, giving some clues on what the reward will be. The same trait is also gained by reaching the master (penultimate) level of the fishing skill. A new fish type has been added, with its own quirks. One of these quirks included temporarily switching movement direction of the bait. Currently, it can only be fished in the hyperspace and randomizer setting of the fishing portal. Screenshots:   ## Why It's Good For The Game The fishing portal generator is but a stale and underdeveloped prototype of the fishing feature right now, so much I was thinking of removing it at first. However, we also have a lot of fishes which are pretty much unfishable, so I came up with the idea of adding new portal settings that allow people to actually get them. As for the skillchip and trait, it's but an extra to both the vending machine in the library and the fishing skill itself, which has an overall humble impact on the minigame. ## Changelog 🆑 add: Expanded the fishing portal generator. It now comes with several portal options that can be unlocked by performing fish scanning experiments, which also award a modest amount of techweb points. balance: The fishing portal generator is now buildable and no longer orderable. The board can be printed from cargo, service and science lathes. balance: Advanced fishing tech is no longer a BEPIS design. It now requires the base fish scanning experiment and 2000 points to be unlocked. add: The advanced fishing rod now comes with an incorporated experiscanner specific for fish scanning. add: Added a new skillchip that may change the icon of the "fish" shown in the minigame UI to less generic ones. Reaching master level in fishing also does that. qol: The experiment handler UI no longer shows unselectable experiments. /🆑 * The fishing portal generator expansion (plus skill-chip) --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
87 lines
5.0 KiB
Plaintext
87 lines
5.0 KiB
Plaintext
GLOBAL_LIST_INIT(skill_types, subtypesof(/datum/skill))
|
|
|
|
/datum/skill
|
|
var/name = "Skilling"
|
|
var/title = "Skiller"
|
|
var/desc = "the art of doing things"
|
|
///Dictionary of modifier type - list of modifiers (indexed by level). 7 entries in each list for all 7 skill levels.
|
|
var/modifiers = list(SKILL_SPEED_MODIFIER = list(1, 1, 1, 1, 1, 1, 1)) //Dictionary of modifier type - list of modifiers (indexed by level). 7 entries in each list for all 7 skill levels.
|
|
///List Path pointing to the skill item reward that will appear when a user finishes leveling up a skill
|
|
var/skill_item_path
|
|
///List associating different messages that appear on level up with different levels
|
|
var/list/levelUpMessages = list()
|
|
///List associating different messages that appear on level up with different levels
|
|
var/list/levelDownMessages = list()
|
|
|
|
/datum/skill/proc/get_skill_modifier(modifier, level)
|
|
return modifiers[modifier][level] //Levels range from 1 (None) to 7 (Legendary)
|
|
/**
|
|
* new: sets up some lists.
|
|
*
|
|
*Can't happen in the datum's definition because these lists are not constant expressions
|
|
*/
|
|
/datum/skill/New()
|
|
. = ..()
|
|
levelUpMessages = list(span_nicegreen("What the hell is [name]? Tell an admin if you see this message."), //This first index shouldn't ever really be used
|
|
span_nicegreen("I'm starting to figure out what [name] really is!"),
|
|
span_nicegreen("I'm getting a little better at [name]!"),
|
|
span_nicegreen("I'm getting much better at [name]!"),
|
|
span_nicegreen("I feel like I've become quite proficient at [name]!"),
|
|
span_nicegreen("After lots of practice, I've begun to truly understand the intricacies and surprising depth behind [name]. I now consider myself a master [title]."),
|
|
span_nicegreen("Through incredible determination and effort, I've reached the peak of my [name] abiltities. I'm finally able to consider myself a legendary [title]!") )
|
|
levelDownMessages = list(span_nicegreen("I have somehow completely lost all understanding of [name]. Please tell an admin if you see this."),
|
|
span_nicegreen("I'm starting to forget what [name] really even is. I need more practice..."),
|
|
span_nicegreen("I'm getting a little worse at [name]. I'll need to keep practicing to get better at it..."),
|
|
span_nicegreen("I'm getting a little worse at [name]..."),
|
|
span_nicegreen("I'm losing my [name] expertise ...."),
|
|
span_nicegreen("I feel like I'm losing my mastery of [name]."),
|
|
span_nicegreen("I feel as though my legendary [name] skills have deteriorated. I'll need more intense training to recover my lost skills.") )
|
|
|
|
/**
|
|
* level_gained: Gives skill levelup messages to the user
|
|
*
|
|
* Only fires if the xp gain isn't silent, so only really useful for messages.
|
|
* Arguments:
|
|
* * mind - The mind that you'll want to send messages
|
|
* * new_level - The newly gained level. Can check the actual level to give different messages at different levels, see defines in skills.dm
|
|
* * old_level - Similar to the above, but the level you had before levelling up.
|
|
* * silent - Silences the announcement if TRUE
|
|
*/
|
|
/datum/skill/proc/level_gained(datum/mind/mind, new_level, old_level, silent)
|
|
if(silent)
|
|
return
|
|
to_chat(mind.current, levelUpMessages[new_level]) //new_level will be a value from 1 to 6, so we get appropriate message from the 6-element levelUpMessages list
|
|
/**
|
|
* level_lost: See level_gained, same idea but fires on skill level-down
|
|
*/
|
|
/datum/skill/proc/level_lost(datum/mind/mind, new_level, old_level, silent)
|
|
if(silent)
|
|
return
|
|
to_chat(mind.current, levelDownMessages[old_level]) //old_level will be a value from 1 to 6, so we get appropriate message from the 6-element levelUpMessages list
|
|
|
|
/**
|
|
* try_skill_reward: Checks to see if a user is eligable for a tangible reward for reaching a certain skill level
|
|
*
|
|
* Currently gives the user a special cloak when they reach a legendary level at any given skill
|
|
* Arguments:
|
|
* * mind - The mind that you'll want to send messages and rewards to
|
|
* * new_level - The current level of the user. Used to check if it meets the requirements for a reward
|
|
*/
|
|
/datum/skill/proc/try_skill_reward(datum/mind/mind, new_level)
|
|
if (new_level != SKILL_LEVEL_LEGENDARY)
|
|
return
|
|
if (!ispath(skill_item_path))
|
|
to_chat(mind.current, span_nicegreen("My legendary [name] skill is quite impressive, though it seems the Professional [title] Association doesn't have any status symbols to commemorate my abilities with. I should let Centcom know of this travesty, maybe they can do something about it."))
|
|
return
|
|
if (LAZYFIND(mind.skills_rewarded, src.type))
|
|
to_chat(mind.current, span_nicegreen("It seems the Professional [title] Association won't send me another status symbol."))
|
|
return
|
|
podspawn(list(
|
|
"target" = get_turf(mind.current),
|
|
"style" = STYLE_BLUESPACE,
|
|
"spawn" = skill_item_path,
|
|
"delays" = list(POD_TRANSIT = 150, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
|
|
))
|
|
to_chat(mind.current, span_nicegreen("My legendary skill has attracted the attention of the Professional [title] Association. It seems they are sending me a status symbol to commemorate my abilities."))
|
|
LAZYADD(mind.skills_rewarded, src.type)
|