doodle/dev-assets/doodads/trapdoors/Makefile
Noah Petherbridge 810ba193d9 Doodads: Electric Trapdoor and Resettable Box
* New doodad: Electric Trapdoor. It is a horizontal version of the
  Electric Door. Opens while powered by a button or a switch and closes
  when it loses power.
* The Box doodad will reset to its original location if it receives a
  power signal from a linked Button or Switch. So for box pushing
  puzzles you can add a reset button in case the boxes get stuck.
* Refactored the Doodad build scripts into many Makefiles for easier
  iteration (don't need to compile ALL doodads to test one).

Updates to the JavaScript API for doodads:

* Self.MoveTo(Point) is now available to set the actor's position in
  world coordinates.
2021-08-08 20:10:42 -07:00

32 lines
1.3 KiB
Makefile

ALL: build
.PHONY: build
build:
# Build the four basic trapdoors.
doodad convert -t "Trapdoor" down{1,2,3,4}.png trapdoor-down.doodad
doodad convert -t "Trapdoor Left" left{1,2,3,4}.png trapdoor-left.doodad
doodad convert -t "Trapdoor Right" right{1,2,3,4}.png trapdoor-right.doodad
doodad convert -t "Trapdoor Up" up{1,2,3,4}.png trapdoor-up.doodad
doodad install-script trapdoor.js trapdoor-down.doodad
doodad install-script trapdoor.js trapdoor-left.doodad
doodad install-script trapdoor.js trapdoor-right.doodad
doodad install-script trapdoor.js trapdoor-up.doodad
doodad edit-doodad -q --tag direction=down trapdoor-down.doodad
doodad edit-doodad -q --tag direction=left trapdoor-left.doodad
doodad edit-doodad -q --tag direction=right trapdoor-right.doodad
doodad edit-doodad -q --tag direction=up trapdoor-up.doodad
# Tag the category for these doodads
ls -hal *.doodad
for i in *.doodad; do\
echo $${i};\
doodad edit-doodad -q --tag "category=doors" $${i};\
done
# Build the Electric Trapdoor.
doodad convert -t "Electric Trapdoor" electric{1,2,3,4}.png electric-trapdoor.doodad
doodad install-script electric-trapdoor.js electric-trapdoor.doodad
doodad edit-doodad -q --tag "category=doors,gizmos" electric-trapdoor.doodad
cp *.doodad ../../../assets/doodads/