Module: Hlockey::Mod::Moddable
- Includes:
- SelfDescribable
- Included in:
- Fencebuilder, Fencedestroyer, Handholding, Immaterial, Locked, Nonconfrontational, Powernapper, Punchy
- Defined in:
- lib/hlockey/mod/moddable.rb
Overview
Module with needed methods for mods, that every mod includes All methods starting with “on” represent player events
Constant Summary collapse
- DESCRIPTION =
Default description
"A mod with no description.".freeze
Instance Attribute Summary collapse
-
#game ⇒ Object
writeonly
Sets the attribute game.
Instance Method Summary collapse
- #initialize(player) ⇒ Object
- #on_action ⇒ Object
-
#on_got_hit(hitting_player) ⇒ Object
May return truthy value to signal that hitting player should not try to take puck.
-
#on_join_fight ⇒ Object
May return a different player to join the fight instead of this one.
- #on_swap(into_roster, pos, prev_pos) ⇒ Object
Methods included from SelfDescribable
Instance Attribute Details
#game=(value) ⇒ Object (writeonly)
Sets the attribute game
12 13 14 |
# File 'lib/hlockey/mod/moddable.rb', line 12 def game=(value) @game = value end |
Instance Method Details
#initialize(player) ⇒ Object
23 24 25 26 |
# File 'lib/hlockey/mod/moddable.rb', line 23 def initialize(player) @player = player @team = player.team end |
#on_action ⇒ Object
30 |
# File 'lib/hlockey/mod/moddable.rb', line 30 def on_action() end |
#on_got_hit(hitting_player) ⇒ Object
May return truthy value to signal that hitting player should not try to take puck
33 |
# File 'lib/hlockey/mod/moddable.rb', line 33 def on_got_hit(hitting_player) end |
#on_join_fight ⇒ Object
May return a different player to join the fight instead of this one
36 |
# File 'lib/hlockey/mod/moddable.rb', line 36 def on_join_fight() end |
#on_swap(into_roster, pos, prev_pos) ⇒ Object
28 |
# File 'lib/hlockey/mod/moddable.rb', line 28 def on_swap(into_roster, pos, prev_pos) end |