doodle/pkg/uix
Noah Petherbridge d7a96d1770 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-09 22:42:22 -07:00
..
actor_animation.go Overhaul the Platformer Physics System 2020-04-04 21:00:32 -07:00
actor_collision.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00
actor_events.go Doodads: Use Key and Working Warp Doors 2021-01-03 15:19:21 -08:00
actor.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00
canvas_actors.go Updater: Better SemVer version checks for updates 2021-07-11 14:09:18 -07:00
canvas_cursor.go Change types int32 -> int per upstream render and ui library 2019-12-27 19:16:34 -08:00
canvas_editable.go Progress on the Zoom In/Out Feature 2021-07-11 21:54:28 -07:00
canvas_link_tool.go Doodads: Use Key and Working Warp Doors 2021-01-03 15:19:21 -08:00
canvas_present.go Shift to scroll slowly + Doodads on Q 2021-07-13 18:04:25 -07:00
canvas_scrolling.go Shift to scroll slowly + Doodads on Q 2021-07-13 18:04:25 -07:00
canvas_strokes.go Brush Pattern Textures 2021-06-09 22:36:32 -07:00
canvas_wallpaper.go Stabilize Load Screen by Deferring SDL2 Calls 2021-07-19 17:14:00 -07:00
canvas_zoom.go Zoom In/Out Feature: WorldIndexAt Fixed 2021-07-13 18:04:25 -07:00
canvas.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00
scripting.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00