mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix an issue in molang validation
Fix profile delete dialog not translated Fix playback of animated textures with per-frame frame time
This commit is contained in:
parent
733b19b3ba
commit
a6c04681a3
@ -212,7 +212,6 @@
|
||||
padding: 2px;
|
||||
padding-right: 15px;
|
||||
padding-left: 100px;
|
||||
background: rgb(3,86,112);
|
||||
background: linear-gradient(90deg, rgba(3,86,112,0) 0%, rgba(0,10,22,0.63) 34%, rgba(0,9,20,0.72) 45%);
|
||||
}
|
||||
#start_screen div.start_screen_right {
|
||||
|
@ -1781,7 +1781,7 @@ BARS.defineActions(function() {
|
||||
new Action('load_animation_file', {
|
||||
icon: 'fa-file-video',
|
||||
category: 'animation',
|
||||
condition: {modes: ['animate'], method: () => Format.animation_files},
|
||||
condition: {modes: ['animate'], features: ['animation_files']},
|
||||
click: function () {
|
||||
var path = Project.export_path
|
||||
if (isApp) {
|
||||
|
@ -598,7 +598,7 @@ new ValidatorCheck('molang_syntax', {
|
||||
issues.push('Invalid token ' + clear_string.match(/(^|[^a-z0-9_])[\d.]+[a-z_]+/i)[0].replace(/[^a-z0-9._]/g, ''));
|
||||
}
|
||||
if (clear_string.match(/[^\w\s+\-*/().,;:[\]!?=<>&|]/)) {
|
||||
issues.push('Invalid character: ' + clear_string.match(/[^\w+\-*/().,;:[\]!?=<>&|]+/g).join(', '));
|
||||
issues.push('Invalid character: ' + clear_string.match(/[^\s\w+\-*/().,;:[\]!?=<>&|]+/g).join(', '));
|
||||
}
|
||||
let left = string.match(/\(/g) || 0;
|
||||
let right = string.match(/\)/g) || 0;
|
||||
|
@ -294,7 +294,7 @@ class SettingsProfile {
|
||||
_2: '_',
|
||||
|
||||
remove: {type: 'buttons', buttons: ['generic.delete'], click: (button) => {
|
||||
if (confirm('settings_profile.confirm_delete'))
|
||||
if (confirm(tl('settings_profile.confirm_delete')))
|
||||
this.remove();
|
||||
Settings.dialog.content_vue.profile = null;
|
||||
SettingsProfile.unselect();
|
||||
|
@ -1863,7 +1863,7 @@ TextureAnimator = {
|
||||
let custom_indices = Format.texture_mcmeta && tex.getAnimationFrameIndices();
|
||||
if (custom_indices) {
|
||||
let index = custom_indices[TextureAnimator.frame_total % custom_indices.length];
|
||||
tex.currentFrame = index;
|
||||
tex.currentFrame = Math.clamp(typeof index == 'object' ? index.index : index, 0, tex.frameCount-1);
|
||||
|
||||
} else {
|
||||
if (tex.currentFrame >= tex.frameCount-1) {
|
||||
|
Loading…
Reference in New Issue
Block a user