Update Doodad build-scripts to tag extra data
* The Blue Azulian marks its doodad file as Hidden. * All Doodads are write locked after generation and tagged with common author value.
This commit is contained in:
parent
fd649b7ab1
commit
154fc6c9cb
|
@ -17,6 +17,10 @@ func init() {
|
||||||
Usage: "update metadata for a Doodad file",
|
Usage: "update metadata for a Doodad file",
|
||||||
ArgsUsage: "<filename.doodad>",
|
ArgsUsage: "<filename.doodad>",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "quiet, q",
|
||||||
|
Usage: "limit output (don't show doodad data at the end)",
|
||||||
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "title",
|
Name: "title",
|
||||||
Usage: "set the doodad title",
|
Usage: "set the doodad title",
|
||||||
|
@ -70,7 +74,7 @@ func editDoodad(c *cli.Context, filename string) error {
|
||||||
return fmt.Errorf("Failed to load %s: %s", filename, err)
|
return fmt.Errorf("Failed to load %s: %s", filename, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("File: %s", filename)
|
log.Info("Edit Doodad: %s", filename)
|
||||||
|
|
||||||
/***************************
|
/***************************
|
||||||
* Update level properties *
|
* Update level properties *
|
||||||
|
@ -120,5 +124,9 @@ func editDoodad(c *cli.Context, filename string) error {
|
||||||
log.Warn("Note: No changes made to level")
|
log.Warn("Note: No changes made to level")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.Bool("quiet") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return showDoodad(c, filename)
|
return showDoodad(c, filename)
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,10 @@ func init() {
|
||||||
Usage: "update metadata for a Level file",
|
Usage: "update metadata for a Level file",
|
||||||
ArgsUsage: "<filename.level>",
|
ArgsUsage: "<filename.level>",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "quiet, q",
|
||||||
|
Usage: "limit output (don't show doodad data at the end)",
|
||||||
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "title",
|
Name: "title",
|
||||||
Usage: "set the level title",
|
Usage: "set the level title",
|
||||||
|
@ -152,5 +156,9 @@ func editLevel(c *cli.Context, filename string) error {
|
||||||
log.Warn("Note: No changes made to level")
|
log.Warn("Note: No changes made to level")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.Bool("quiet") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return showLevel(c, filename)
|
return showLevel(c, filename)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
function main() {
|
function main() {
|
||||||
Flash("Azulian '%s' initialized!", Self.Doodad.Title);
|
|
||||||
|
|
||||||
var playerSpeed = 12;
|
var playerSpeed = 12;
|
||||||
var gravity = 4;
|
var gravity = 4;
|
||||||
var Vx = Vy = 0;
|
var Vx = Vy = 0;
|
||||||
|
|
|
@ -98,6 +98,7 @@ azulians() {
|
||||||
|
|
||||||
doodad convert -t "Blue Azulian" blu-front.png blu-back.png \
|
doodad convert -t "Blue Azulian" blu-front.png blu-back.png \
|
||||||
blu-wr{1,2,3,4}.png blu-wl{1,2,3,4}.png azu-blu.doodad
|
blu-wr{1,2,3,4}.png blu-wl{1,2,3,4}.png azu-blu.doodad
|
||||||
|
doodad edit-doodad -hide azu-blu.doodad
|
||||||
doodad install-script azulian.js azu-blu.doodad
|
doodad install-script azulian.js azu-blu.doodad
|
||||||
|
|
||||||
doodad convert -t "Red Azulian" red-front.png red-back.png \
|
doodad convert -t "Red Azulian" red-front.png red-back.png \
|
||||||
|
@ -126,3 +127,4 @@ doors
|
||||||
trapdoors
|
trapdoors
|
||||||
azulians
|
azulians
|
||||||
objects
|
objects
|
||||||
|
doodad edit-doodad -quiet -lock -author "Noah" ../../assets/doodads/*.doodad
|
||||||
|
|
|
@ -126,7 +126,7 @@ func (d *Doodad) WriteFile(filename string) error {
|
||||||
|
|
||||||
// Desktop: write to disk.
|
// Desktop: write to disk.
|
||||||
filename = userdir.DoodadPath(filename)
|
filename = userdir.DoodadPath(filename)
|
||||||
log.Info("Write Doodad: %s", filename)
|
log.Debug("Write Doodad: %s", filename)
|
||||||
err = ioutil.WriteFile(filename, bin, 0644)
|
err = ioutil.WriteFile(filename, bin, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("doodads.WriteFile: %s", err)
|
return fmt.Errorf("doodads.WriteFile: %s", err)
|
||||||
|
|
|
@ -175,7 +175,12 @@ func (s *PlayScene) Setup(d *Doodle) error {
|
||||||
log.Error("PlayScene.Setup: failed to drawing.InstallScripts: %s", err)
|
log.Error("PlayScene.Setup: failed to drawing.InstallScripts: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
d.Flash("Entered Play Mode. Press 'E' to edit this map.")
|
if s.CanEdit {
|
||||||
|
d.Flash("Entered Play Mode. Press 'E' to edit this map.")
|
||||||
|
} else {
|
||||||
|
d.Flash("%s", s.Level.Title)
|
||||||
|
}
|
||||||
|
|
||||||
s.running = true
|
s.running = true
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user