-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed dynamic auto-completions being cached - added new problem fix type "script" - added problems for spawn_rules, animations & animation_controllers - updated auto-completions to v1.11.0.7 - added new problem components - error scanning upon opening a file with bridge. for the first time - fixed adding an attribute's value not updating the history
- Loading branch information
Showing
21 changed files
with
370 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "bridge", | ||
"productName": "bridge.", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"author": "solvedDev <[email protected]>", | ||
"description": "A powerful add-on editor", | ||
"license": null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/renderer/scripts/editor/problems/components/BehaviorCheck.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//@ts-check | ||
import CommonProblem from "../CommonProblem"; | ||
import JsonCacheUtils from "../../JSONCacheUtils"; | ||
import TabSystem from "../../../TabSystem"; | ||
|
||
export default class BehaviorCheck extends CommonProblem { | ||
constructor({ ...other }) { | ||
//@ts-ignore | ||
super(other); | ||
this.found_behavior = false; | ||
this.found_pathfinder = false; | ||
this.found_movement = false; | ||
} | ||
|
||
peek(node) { | ||
if(node.key.startsWith("minecraft:behavior.")) { | ||
this.found_behavior = true; | ||
return true; | ||
} else if(node.key.startsWith("minecraft:navigation.")) { | ||
this.found_pathfinder = true; | ||
} else if(node.key.startsWith("minecraft:movement.")) { | ||
this.found_movement = true; | ||
} | ||
|
||
return false; | ||
} | ||
found() { | ||
return this.found_behavior && (!this.found_movement || !this.found_pathfinder); | ||
} | ||
report() { | ||
let old = this.error_message; | ||
this.error_message = this.error_message.replace(/\$failure_name/g, !this.found_pathfinder ? "minecraft:navigation.<type>" : "minecraft:movement.<type>"); | ||
let res = super.report(); | ||
this.error_message = old; | ||
|
||
return res; | ||
} | ||
reset() { | ||
super.reset(); | ||
this.found_behavior = false; | ||
this.found_pathfinder = false; | ||
this.found_movement = false; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/renderer/scripts/editor/problems/components/ChildMustBeNumber.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//@ts-check | ||
import CommonProblem from "../CommonProblem"; | ||
|
||
export default class ChildMustBeNumber extends CommonProblem { | ||
constructor({ search, ...other }) { | ||
//@ts-ignore | ||
super(other); | ||
this.search = search; | ||
this.problem_found = false; | ||
} | ||
|
||
peek(node) { | ||
if(node.parent !== undefined && node.parent.key === this.search) { | ||
if(Number.isNaN(Number(node.key))) { | ||
this.problem_found = true; | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
found() { | ||
return this.problem_found; | ||
} | ||
reset() { | ||
super.reset(); | ||
this.problem_found = false; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/renderer/scripts/editor/problems/components/ChildMustStartWith.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//@ts-check | ||
import CommonProblem from "../CommonProblem"; | ||
|
||
export default class ChildMustStartWith extends CommonProblem { | ||
constructor({ search, start, ...other }) { | ||
//@ts-ignore | ||
super(other); | ||
this.search = search; | ||
this.start = start; | ||
this.problem_found = false; | ||
} | ||
|
||
peek(node) { | ||
if(node.parent !== undefined && node.parent.key === this.search) { | ||
if(!node.key.startsWith(this.start)) { | ||
this.problem_found = true; | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
found() { | ||
return this.problem_found; | ||
} | ||
reset() { | ||
super.reset(); | ||
this.problem_found = false; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/renderer/scripts/editor/problems/components/EventCheck.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//@ts-check | ||
import CommonProblem from "../CommonProblem"; | ||
import JsonCacheUtils from "../../JSONCacheUtils"; | ||
import TabSystem from "../../../TabSystem"; | ||
|
||
export default class EventCheck extends CommonProblem { | ||
constructor({ ...other }) { | ||
//@ts-ignore | ||
super(other); | ||
this.problem_found = false; | ||
} | ||
|
||
peek(node) { | ||
if(node.key === "event") { | ||
let t = node.parent.get("target"); | ||
|
||
if(t === undefined || t === "self") { | ||
try { | ||
let current_events = TabSystem.getSelected().content.get("minecraft:entity/events"); | ||
|
||
if(!Object.keys(current_events.toJSON()).includes(node.data)) { | ||
this.problem_found = true; | ||
return true; | ||
} | ||
} catch(e) {} | ||
} else { | ||
if(!JsonCacheUtils.events.includes(node.data)) { | ||
this.problem_found = true; | ||
return true; | ||
} | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
found() { | ||
return this.problem_found; | ||
} | ||
reset() { | ||
super.reset(); | ||
this.problem_found = false; | ||
} | ||
} |
Oops, something went wrong.