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

Instance Method Summary collapse

Methods included from SelfDescribable

#to_s

Instance Attribute Details

#game=(value) ⇒ Object (writeonly)

Sets the attribute game

Parameters:

  • value

    the value to set the attribute game to.



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_actionObject



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_fightObject

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