Skip to content

Commit

Permalink
Release 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huderlem committed Nov 10, 2024
1 parent 6d04d78 commit f8cedb5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
Nothing, yet.

## [3.5.0] - 2024-11-10
### Added
- Movement can now be inlined within commands using a special `moves()` operator, similar to text. For example:
```
applymovement(OBJ_EVENT_ID_PLAYER, moves(
walk_left * 4
face_down
))
```
- Print a warning message when `numLines` is missing from a font's config. Defaults to `numLines=2` in that case, rather than `0`.
- Added `msgbox` to the default `command_config.json`, since `msgbox(.., MSGBOX_YESNO)` would be a very common use case.

Expand Down Expand Up @@ -169,7 +179,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.0] - 2019-08-27
Initial Release

[Unreleased]: https://github.com/huderlem/poryscript/compare/3.4.0...HEAD
[Unreleased]: https://github.com/huderlem/poryscript/compare/3.5.0...HEAD
[3.5.0]: https://github.com/huderlem/poryscript/compare/3.4.0...3.5.0
[3.4.0]: https://github.com/huderlem/poryscript/compare/3.3.0...3.4.0
[3.3.0]: https://github.com/huderlem/poryscript/compare/3.2.0...3.3.0
[3.2.0]: https://github.com/huderlem/poryscript/compare/3.1.0...3.2.0
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,30 @@ MyMovement:
step_end
```
However, movement can also be *inlined* inside commands similar to text, using the `moves()` operator. This is often much more convenient, and it can help simplify your scripts. Anything that can be used in a `movement` statement can also be used inside `moves()`.
Looking at the previous example, the movement can be inlined like this:
```
script MyScript {
lock
applymovement(2, moves(
walk_left
walk_up * 5
face_down
))
waitmovement(0)
release
}
```
Note, whitespace doesn't matter. This can also be written all on a single line:
```
applymovement(2, moves(walk_left walk_up * 5 face_down))

// You can even use commas to separate each movement command, since
// that may be easier to read.
applymovement(2, moves(walk_left, walk_up * 5, face_down))
```
## `mart` Statement
Use `mart` statements to define a list of items for use with the `pokemart` command. Data defined with the `mart` statement is created with local scope by default. It is not neccesary to add `ITEM_NONE` to the end of the list, but if Poryscript encounters it, any items after it will be ignored.
Expand Down Expand Up @@ -661,7 +685,7 @@ const ASSISTANT_ID = PROF_BIRCH_ID + 1
const FLAG_GREETED_BIRCH = FLAG_TEMP_2

script ProfBirchScript {
applymovement(PROF_BIRCH_ID, BirchMovementData)
applymovement(PROF_BIRCH_ID, moves(walk_left * 4, face_down))
showobject(ASSISTANT_ID)
setflag(FLAG_GREETED_BIRCH)
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/huderlem/poryscript/parser"
)

const version = "3.4.0"
const version = "3.5.0"

type mapOption map[string]string

Expand Down

0 comments on commit f8cedb5

Please sign in to comment.