Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Add some event commands
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw authored and gr-im committed Oct 9, 2019
1 parent e940639 commit a9167f4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Release (2.0.0)

### Additions

- Add commands `event_dashing?` and `player_dashing?` (@xvw, requested by @Zer0xxxxx and @CyrilRPG)
- Add command `get_picture_opacity` (@xvw, reported by @Zer0xxxxx)
- Add commands `event_direction_fix` and `player_direction_fix` (@xvw, requested by @Zer0xxxxx)
- Add commands `event_step_animation` and `player_step_animation` (@xvw, requested by @Zer0xxxxx)
Expand Down
9 changes: 9 additions & 0 deletions RME.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13890,6 +13890,15 @@ def player_trail(len, mode = 0, tone = nil)
event_trail(0, len, mode, tone)
end

def event_dashing?(id)
e = event(id)
e.dash? && event_moving?(id)
end

def player_dashing?
event_dashing?(0)
end

def event_stop_trail(ids)
select_events(ids).each do |id_event|
event(id_event).trails_signal = true
Expand Down
12 changes: 7 additions & 5 deletions doc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/Commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,15 @@ def player_trail(len, mode = 0, tone = nil)
event_trail(0, len, mode, tone)
end

def event_dashing?(id)
e = event(id)
e.dash? && event_moving?(id)
end

def player_dashing?
event_dashing?(0)
end

def event_stop_trail(ids)
select_events(ids).each do |id_event|
event(id_event).trails_signal = true
Expand Down
19 changes: 17 additions & 2 deletions src/Doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8573,7 +8573,7 @@ module Command
:"*value" => ["true pour activer, false pour désactiver. Si aucun argument n'est fourni, la commande renverra la valeur sans rien modifier", :Boolean],

}, true # Maybe changed
register_command :standard, 'Command.event_direction_fix'
register_command :event, 'Command.event_direction_fix'

# AUTOGenerated for player_direction_fix
link_method_documentation 'Command.player_direction_fix',
Expand All @@ -8582,7 +8582,22 @@ module Command
:"*value" => ["true pour activer, false pour désactiver. Si aucun argument n'est fourni, la commande renverra la valeur sans rien modifier", :Boolean],

}, true # Maybe changed
register_command :standard, 'Command.player_direction_fix'
register_command :event, 'Command.player_direction_fix'

# AUTOGenerated for event_dashing?
link_method_documentation 'Command.event_dashing?',
'Renvoie true si l\'évènement est en train de courrir, false sinon',
{
:id => ["l'ID de l'évènement", :Fixnum],

}, true # Maybe changed
register_command :event, 'Command.event_dashing?'

# AUTOGenerated for player_dashing?
link_method_documentation 'Command.player_dashing?',
'Renvoie true si le joueur est en train de courrir, false sinon',
{}, true # Maybe changed
register_command :event, 'Command.player_dashing?'


end
Expand Down

0 comments on commit a9167f4

Please sign in to comment.