Doodads: Small Key Door + Bigger Crumbly Floor
* The crumbly floor doodad was made 50% larger. * New doodad: Small Key and Small Key Door. These work like the colored doors and locks except each Small Key is consumed when it unlocks a door. The door's appearance is of iron bars. * The inventory HUD displays a small quantity label in the lower-right corner of items that have a quantity, such as the Small Key. This is done as a Canvas.CornerLabel string attribute on uix.Canvas. * The "give all keys" cheat adds 99 Small Keys to your inventory.
|
@ -1,6 +1,6 @@
|
|||
// Crumbly Floor.
|
||||
function main() {
|
||||
Self.SetHitbox(0, 0, 65, 7);
|
||||
Self.SetHitbox(0, 0, 98, 11);
|
||||
|
||||
Self.AddAnimation("shake", 100, ["shake1", "shake2", "floor", "shake1", "shake2", "floor"]);
|
||||
Self.AddAnimation("fall", 100, ["fall1", "fall2", "fall3", "fall4"]);
|
||||
|
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 957 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 1.0 KiB |
|
@ -18,13 +18,9 @@ doodad convert -t "Yellow Door" yellow-closed.png yellow-unlocked.png yellow-rig
|
|||
doodad edit-doodad -q --tag color=yellow door-yellow.doodad
|
||||
doodad install-script colored-door.js door-yellow.doodad
|
||||
|
||||
# doodad convert -t "Green Door" green1.png green2.png door-green.doodad
|
||||
# doodad edit-doodad -q --tag color=green door-green.doodad
|
||||
# doodad install-script locked-door.js door-green.doodad
|
||||
#
|
||||
# doodad convert -t "Yellow Door" yellow1.png yellow2.png door-yellow.doodad
|
||||
# doodad edit-doodad -q --tag color=yellow door-yellow.doodad
|
||||
# doodad install-script locked-door.js door-yellow.doodad
|
||||
doodad convert -t "Small Key Door" small-closed.png small-unlocked.png small-right.png small-left.png small-key-door.doodad
|
||||
doodad edit-doodad -q --tag color=small small-key-door.doodad
|
||||
doodad install-script colored-door.js small-key-door.doodad
|
||||
|
||||
doodad convert -t "Red Key" red-key.png key-red.doodad
|
||||
doodad edit-doodad -q --tag color=red key-red.doodad
|
||||
|
@ -42,7 +38,11 @@ doodad convert -t "Yellow Key" yellow-key.png key-yellow.doodad
|
|||
doodad edit-doodad -q --tag color=yellow key-yellow.doodad
|
||||
doodad install-script keys.js key-yellow.doodad
|
||||
|
||||
doodad convert -t "Small Key" small-key.png small-key.doodad
|
||||
doodad edit-doodad -q --tag color=small small-key.doodad
|
||||
doodad install-script keys.js small-key.doodad
|
||||
|
||||
doodad convert -t "Electric Door" electric{1,2,3,4}.png door-electric.doodad
|
||||
doodad install-script electric-door.js door-electric.doodad
|
||||
|
||||
cp door-*.doodad key-*.doodad ../../../assets/doodads/
|
||||
cp door-*.doodad key-*.doodad small-*.doodad ../../../assets/doodads/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
function main() {
|
||||
var color = Self.GetTag("color");
|
||||
var keyname = "key-" + color + ".doodad";
|
||||
var keyname = color === "small" ? "small-key.doodad" : "key-" + color + ".doodad";
|
||||
|
||||
// Layers in the doodad image.
|
||||
var layer = {
|
||||
|
@ -46,7 +46,12 @@ function main() {
|
|||
if (e.Settled) {
|
||||
unlocked = true;
|
||||
Self.ShowLayer(enterSide < 0 ? layer.right : layer.left);
|
||||
Sound.Play("unlock.wav")
|
||||
Sound.Play("unlock.wav");
|
||||
|
||||
// If a Small Key door, consume a small key.
|
||||
if (color === "small") {
|
||||
e.Actor.RemoveItem(keyname, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
function main() {
|
||||
var color = Self.GetTag("color");
|
||||
var quantity = color === "small" ? 1 : 0;
|
||||
|
||||
Events.OnCollide(function(e) {
|
||||
if (e.Settled) {
|
||||
Sound.Play("item-get.wav")
|
||||
e.Actor.AddItem(Self.Filename, 0);
|
||||
e.Actor.AddItem(Self.Filename, quantity);
|
||||
Self.Destroy();
|
||||
}
|
||||
})
|
||||
|
|
BIN
dev-assets/doodads/doors/small-closed.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
dev-assets/doodads/doors/small-key.png
Normal file
After Width: | Height: | Size: 682 B |
BIN
dev-assets/doodads/doors/small-left.png
Normal file
After Width: | Height: | Size: 935 B |
BIN
dev-assets/doodads/doors/small-right.png
Normal file
After Width: | Height: | Size: 936 B |
BIN
dev-assets/doodads/doors/small-unlocked.png
Normal file
After Width: | Height: | Size: 932 B |