mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Allow rerun of level without a code change.
This commit is contained in:
parent
36c753a828
commit
c48b155413
3 changed files with 3 additions and 9 deletions
app
|
@ -222,9 +222,6 @@
|
|||
tome_minion_spells: "Your Minions' Spells" # Only in old-style levels.
|
||||
tome_read_only_spells: "Read-Only Spells" # Only in old-style levels.
|
||||
tome_other_units: "Other Units" # Only in old-style levels.
|
||||
tome_cast_button_castable: "Cast Spell" # Temporary, if tome_cast_button_run isn't translated.
|
||||
tome_cast_button_casting: "Casting" # Temporary, if tome_cast_button_running isn't translated.
|
||||
tome_cast_button_cast: "Spell Cast" # Temporary, if tome_cast_button_ran isn't translated.
|
||||
tome_cast_button_run: "Run"
|
||||
tome_cast_button_running: "Running"
|
||||
tome_cast_button_ran: "Ran"
|
||||
|
|
|
@ -104,17 +104,14 @@ module.exports = class CastButtonView extends CocoView
|
|||
@castButton.toggleClass('castable', castable).toggleClass('casting', @casting)
|
||||
if @casting
|
||||
s = $.i18n.t('play_level.tome_cast_button_running')
|
||||
s = $.i18n.t('play_level.tome_cast_button_casting') if s is 'Running' and me.get('preferredLanguage', true).split('-')[0] isnt 'en' # Temporary, if tome_cast_button_running isn't translated.
|
||||
else if castable
|
||||
else if castable or true
|
||||
s = $.i18n.t('play_level.tome_cast_button_run')
|
||||
s = $.i18n.t('play_level.tome_cast_button_casting') if s is 'Run' and me.get('preferredLanguage').split('-')[0] isnt 'en' # Temporary, if tome_cast_button_running isn't translated.
|
||||
unless @options.levelID in ['dungeons-of-kithgard', 'gems-in-the-deep', 'shadow-guard', 'forgetful-gemsmith', 'kounter-kithwise', 'true-names', 'the-raised-sword', 'favorable-odds', 'the-first-kithmaze', 'haunted-kithmaze'] # Hide for first few.
|
||||
s += ' ' + @castShortcut
|
||||
else
|
||||
s = $.i18n.t('play_level.tome_cast_button_ran')
|
||||
s = $.i18n.t('play_level.tome_cast_button_casting') if s is 'Ran' and me.get('preferredLanguage').split('-')[0] isnt 'en' # Temporary, if tome_cast_button_running isn't translated.
|
||||
@castButton.text s
|
||||
@castButton.prop 'disabled', not castable
|
||||
#@castButton.prop 'disabled', not castable
|
||||
|
||||
setAutocastDelay: (delay) ->
|
||||
#console.log 'Set autocast delay to', delay
|
||||
|
|
|
@ -389,7 +389,7 @@ module.exports = class SpellView extends CocoView
|
|||
if hasChanged
|
||||
@spell.transpile @getSource()
|
||||
@updateAether true, false
|
||||
if cast and (hasChanged or realTime)
|
||||
if cast #and (hasChanged or realTime) # just always cast now
|
||||
@cast(false, realTime)
|
||||
if hasChanged
|
||||
@notifySpellChanged()
|
||||
|
|
Loading…
Add table
Reference in a new issue