doodads/build.sh

119 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
# Build all the doodads from their source files.
if [[ ! -d "./azulian" ]]; then
echo Run this script from the dev-assets/doodads/ working directory.
exit 1
fi
mkdir -p ../../assets/doodads
boy() {
cd boy/
make
cd ..
Thief and Inventory APIs This commit adds the Thief character with starter graphics (no animations). The Thief walks back and forth and will steal items from other doodads, including the player. For singleton items that have no quantity, like the Colored Keys, the Thief will only steal one if he does not already have it. Quantitied items like the Small Key are always stolen. Flexibility in the playable character is introduced: Boy, Azulian, Bird, and Thief all respond to playable controls. There is not currently a method to enable these apart from modifying balance.PlayerCharacterDoodad at compile time. New and Changed Doodads * Thief: new doodad that walks back and forth and will steal items from other characters inventory. * Bird: has no inventory and cannot pick up items, unless player controlled. Its hitbox has also been fixed so it collides with floors correctly - not something normally seen in the Bird. * Boy: opts in to have inventory. * Keys (all): only gives themselves to actors having inventories. JavaScript API - New functions available * Self.IsPlayer() - returns if the current actor IS the player. * Self.SetInventory(bool) - doodads must opt-in to having an inventory. Keys should only give themselves to doodads having an inventory. * Self.HasInventory() bool * Self.AddItem(filename, qty) * Self.RemoveItem(filename, qty) * Self.HasItem(filename) * Self.Inventory() - returns map[string]int * Self.ClearInventory() * Self.OnLeave(func(e)) now receives a CollideEvent as parameter instead of the useless actor ID. Notably, e.Actor is the leaving actor and e.Settled is always true. Other Changes * Play Mode: if playing as a character which doesn't obey gravity, such as the bird, antigravity controls are enabled by default. If you `import antigravity` you can turn gravity back on. * Doodad collision scripts are no longer run in parallel goroutines. It made the Thief's job difficult trying to steal items in many threads simultaneously!
2021-08-10 05:42:22 +00:00
cd thief/
make
cd ..
}
buttons() {
cd buttons/
make
cd ..
}
switches() {
cd switches/
make
cd ..
}
doors() {
cd doors/
make
cd ..
cd gems/
make
cd ..
}
trapdoors() {
cd trapdoors/
make
cd ..
}
azulians() {
cd azulian/
make
cd ..
}
mobs() {
cd bird/
make
cd ..
}
objects() {
cd objects/
make
cd ..
cd box/
make
cd ..
cd crumbly-floor/
make
cd ..
cd regions/
make
cd ..
2022-09-25 05:00:17 +00:00
# cd test/
# make
# cd ..
}
onoff() {
cd on-off/
make
cd ..
}
warpdoor() {
cd warp-door/
make
cd ..
}
creatures() {
cd snake/
make
cd ..
cd crusher/
make
cd ..
}
boy
buttons
switches
doors
trapdoors
azulians
mobs
objects
onoff
warpdoor
creatures
doodad edit-doodad -quiet -lock -author "Noah" ../../assets/doodads/*.doodad
doodad edit-doodad ../../assets/doodads/azu-blu.doodad
doodad edit-doodad -hide ../../assets/doodads/boy.doodad