fishing_challenge
![code/modules/fishing/fishing_minigame.dm 43](git.png)
Vars | |
active_effect_cd | The cooldown between switching active effects |
---|---|
active_effects | A list of possible active minigame effects. If not empty, one will be picked from time to time. |
background | Background icon state from fishing_hud.dmi |
bait_bounce_mult | By how much the bait recoils back when hitting the bounds of the slider while idle |
bait_height | How much space the bait takes on the minigame slider |
bait_pixel_height | The height in pixels of the bait bar |
bait_position | The position of the bait on the minigame slider |
bait_velocity | The current speed the bait is moving at |
can_interrupt_move | If true, the fish can jump while a target position is set, thus overriding it |
completed | Is it finished (either by win/lose or window closing) |
completion | The completion score. If it reaches 100, it's a win. If it reaches 0, it's a loss. |
completion_gain | How much completion is gained per second when the bait area is intersecting with the fish's |
completion_loss | How much completion is lost per second when the bait area is not intersecting with the fish's |
current_active_effect | The current active effect |
current_velocity_limit | The current speed limit used |
difficulty | Minigame difficulty |
fish_ai | Fish AI type to use |
fish_height | How much space the fish takes on the minigame slider |
fish_icon | Fish icon state from fishing_hud.dmi |
fish_idle_velocity | The base velocity of the fish, which may affect jump distances and falling speed. |
fish_pixel_height | The height in pixels of the fish |
fish_position | The position of the fish on the minigame slider |
fish_velocity | The current speed the fish is moving at |
fishing_hud | The background as shown in the minigame, and the holder of the other visual overlays |
fishing_line | Fishing line visual |
gravity_velocity | The acceleration of the bait while not reeling |
long_jump_chance | How likely the fish is to perform a long jump, then multiplied by difficulty |
long_jump_velocity_limit | The speed limit for the long jump |
lure | Lure visual |
reeling_state | Whether the bait is idle or reeling up or down (left and right click) |
reeling_velocity | The acceleration of the bait while reeling |
reward_path | Result path |
short_jump_chance | How likely the fish is to perform a standard jump, then multiplied by difficulty |
short_jump_velocity_limit | The speed limit for the short jump |
special_effects | Rule modifiers (eg weighted bait) |
start_time | When the ui minigame phase started |
target_position | A position on the slider the fish wants to get to |
used_rod | Rod that is used for the challenge |
user | Fishing mob |
Procs | |
Destroy | Fish minigame properties Enable special parameters If the chances are higher than 1% (100% at maximum difficulty), they'll scale less than proportionally (exponent less than 1) instead. This way we ensure fish with high jump chances won't get TOO jumpy until they near the maximum difficulty, at which they hit 100% |
interrupt | Challenge interrupted by something external |
move_bait | Move at least 0.75 to full of the availible bar in given direction, and more likely to move in the direction where there's more space The proc that moves the bait around, just like in the old TGUI, mostly. |
move_fish | bring forth an active effect go back to normal The proc that moves the fish around, just like in the old TGUI, mostly. |
on_line_deleted | Create fishing line visuals |
on_user_logout | The player is no longer around to play the minigame, so we interrupt it. |
on_user_move | The lure may be out of sight if the user has moed around a corner, so the message should be displayed over him instead. |
prepare_minigame_hud | Initialize the minigame hud and register some signals to make it work. |
process | Update the state of the fish, the bait and the hud |
remove_minigame_hud | Stop processing and remove references to the minigame hud |
select_active_effect | The proc that handles fancy effects like flipping the hud or skewing movement |
start_reeling | While the mouse button is held down, the bait will be reeling up (or down on r-click if the bidirectional rule is enabled) |
stop_reeling | Reset the reeling state to idle once the mouse button is released |
update_visuals | Pull the brake on the velocity if the current velocity and the acceleration have different directions, making the bait less slippery, thus easier to control bidirectional baits stay bouyant while idle update the vertical pixel position of both fish and bait, and the icon state of the completion bar |
Var Details
active_effect_cd
![code/modules/fishing/fishing_minigame.dm 55](git.png)
The cooldown between switching active effects
active_effects
![code/modules/fishing/fishing_minigame.dm 53](git.png)
A list of possible active minigame effects. If not empty, one will be picked from time to time.
background
![code/modules/fishing/fishing_minigame.dm 73](git.png)
Background icon state from fishing_hud.dmi
bait_bounce_mult
![code/modules/fishing/fishing_minigame.dm 130](git.png)
By how much the bait recoils back when hitting the bounds of the slider while idle
bait_height
![code/modules/fishing/fishing_minigame.dm 85](git.png)
How much space the bait takes on the minigame slider
bait_pixel_height
![code/modules/fishing/fishing_minigame.dm 87](git.png)
The height in pixels of the bait bar
bait_position
![code/modules/fishing/fishing_minigame.dm 93](git.png)
The position of the bait on the minigame slider
bait_velocity
![code/modules/fishing/fishing_minigame.dm 97](git.png)
The current speed the bait is moving at
can_interrupt_move
![code/modules/fishing/fishing_minigame.dm 121](git.png)
If true, the fish can jump while a target position is set, thus overriding it
completed
![code/modules/fishing/fishing_minigame.dm 47](git.png)
Is it finished (either by win/lose or window closing)
completion
![code/modules/fishing/fishing_minigame.dm 100](git.png)
The completion score. If it reaches 100, it's a win. If it reaches 0, it's a loss.
completion_gain
![code/modules/fishing/fishing_minigame.dm 104](git.png)
How much completion is gained per second when the bait area is intersecting with the fish's
completion_loss
![code/modules/fishing/fishing_minigame.dm 102](git.png)
How much completion is lost per second when the bait area is not intersecting with the fish's
current_active_effect
![code/modules/fishing/fishing_minigame.dm 57](git.png)
The current active effect
current_velocity_limit
![code/modules/fishing/fishing_minigame.dm 115](git.png)
The current speed limit used
difficulty
![code/modules/fishing/fishing_minigame.dm 61](git.png)
Minigame difficulty
fish_ai
![code/modules/fishing/fishing_minigame.dm 49](git.png)
Fish AI type to use
fish_height
![code/modules/fishing/fishing_minigame.dm 83](git.png)
How much space the fish takes on the minigame slider
fish_icon
![code/modules/fishing/fishing_minigame.dm 75](git.png)
Fish icon state from fishing_hud.dmi
fish_idle_velocity
![code/modules/fishing/fishing_minigame.dm 117](git.png)
The base velocity of the fish, which may affect jump distances and falling speed.
fish_pixel_height
![code/modules/fishing/fishing_minigame.dm 89](git.png)
The height in pixels of the fish
fish_position
![code/modules/fishing/fishing_minigame.dm 91](git.png)
The position of the fish on the minigame slider
fish_velocity
![code/modules/fishing/fishing_minigame.dm 95](git.png)
The current speed the fish is moving at
fishing_hud
![code/modules/fishing/fishing_minigame.dm 135](git.png)
The background as shown in the minigame, and the holder of the other visual overlays
fishing_line
![code/modules/fishing/fishing_minigame.dm 78](git.png)
Fishing line visual
gravity_velocity
![code/modules/fishing/fishing_minigame.dm 126](git.png)
The acceleration of the bait while not reeling
long_jump_chance
![code/modules/fishing/fishing_minigame.dm 109](git.png)
How likely the fish is to perform a long jump, then multiplied by difficulty
long_jump_velocity_limit
![code/modules/fishing/fishing_minigame.dm 113](git.png)
The speed limit for the long jump
lure
![code/modules/fishing/fishing_minigame.dm 71](git.png)
Lure visual
reeling_state
![code/modules/fishing/fishing_minigame.dm 124](git.png)
Whether the bait is idle or reeling up or down (left and right click)
reeling_velocity
![code/modules/fishing/fishing_minigame.dm 128](git.png)
The acceleration of the bait while reeling
reward_path
![code/modules/fishing/fishing_minigame.dm 59](git.png)
Result path
short_jump_chance
![code/modules/fishing/fishing_minigame.dm 107](git.png)
How likely the fish is to perform a standard jump, then multiplied by difficulty
short_jump_velocity_limit
![code/modules/fishing/fishing_minigame.dm 111](git.png)
The speed limit for the short jump
special_effects
![code/modules/fishing/fishing_minigame.dm 51](git.png)
Rule modifiers (eg weighted bait)
start_time
![code/modules/fishing/fishing_minigame.dm 45](git.png)
When the ui minigame phase started
target_position
![code/modules/fishing/fishing_minigame.dm 119](git.png)
A position on the slider the fish wants to get to
used_rod
![code/modules/fishing/fishing_minigame.dm 69](git.png)
Rod that is used for the challenge
user
![code/modules/fishing/fishing_minigame.dm 67](git.png)
Fishing mob
Proc Details
Destroy
Fish minigame properties Enable special parameters If the chances are higher than 1% (100% at maximum difficulty), they'll scale less than proportionally (exponent less than 1) instead. This way we ensure fish with high jump chances won't get TOO jumpy until they near the maximum difficulty, at which they hit 100%
interrupt
Challenge interrupted by something external
move_bait
Move at least 0.75 to full of the availible bar in given direction, and more likely to move in the direction where there's more space The proc that moves the bait around, just like in the old TGUI, mostly.
move_fish
bring forth an active effect go back to normal The proc that moves the fish around, just like in the old TGUI, mostly.
on_line_deleted
Create fishing line visuals
on_user_logout
The player is no longer around to play the minigame, so we interrupt it.
on_user_move
The lure may be out of sight if the user has moed around a corner, so the message should be displayed over him instead.
prepare_minigame_hud
Initialize the minigame hud and register some signals to make it work.
process
Update the state of the fish, the bait and the hud
remove_minigame_hud
Stop processing and remove references to the minigame hud
select_active_effect
The proc that handles fancy effects like flipping the hud or skewing movement
start_reeling
While the mouse button is held down, the bait will be reeling up (or down on r-click if the bidirectional rule is enabled)
stop_reeling
Reset the reeling state to idle once the mouse button is released
update_visuals
Pull the brake on the velocity if the current velocity and the acceleration have different directions, making the bait less slippery, thus easier to control bidirectional baits stay bouyant while idle update the vertical pixel position of both fish and bait, and the icon state of the completion bar