Skip to content

Commit

Permalink
0.7.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
x87 committed Nov 4, 2021
1 parent 6061eef commit 7e7b3b1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 7 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
### 0.7.2 - Nov 4, 2021

- add `ONMISSION` variable that can be used to manipulate the global player's on a mission status

```js
if (!ONMISSION) {
showTextBox("Not on a mission. Setting ONMISSION to true");
ONMISSION = true;
}
```

#### BREAKING CHANGE

- using `new` operator on a static object (for which Sanny Builder Library does not define a constructor, e.g. `Audio` or `Hud`) now throws an error:

```js
var hud = new Hud(); // error: Hud is not constructable
```

- minimum required version of `sa.json` is `0.166`

### 0.7.1 - Nov 02, 2021

- new static function `Memory.Translate` to get memory address of a function or variable by its name (see [documentation](using-memory.md#finding-memory-addresses-in-re3-and-revc))
Expand Down
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ When JavaScript is enabled CLEO Redux needs commands definitions from https://li
Minimum required version of the commands definitions:
* `gta3.json`: `0.99`
* `vc.json`: `0.143`
* `sa.json`: `0.164`
* `sa.json`: `0.166`

### Script Lifecycle

Expand Down Expand Up @@ -306,6 +306,28 @@ if (GAME === "sa") {
}
```

- `ONMISSION` - global flag controlling whether the player is on a mission now.

```js
if (!ONMISSION) {
showTextBox("Not on a mission. Setting ONMISSION to true");
ONMISSION = true;
}
```

- `TIMERA` and `TIMERB` - two auto-incrementing timers useful for measuring time intervals.

```js
while(true) {
TIMERA = 0;
// wait 1000 ms
while(TIMERA < 1000) {
wait(0)
}
showTextBox("1 second passed")
}
```

- `log(...values)` - prints comma-separated `{values}` to the `cleo_redux.log`

```js
Expand All @@ -328,10 +350,14 @@ while (true) {
showTextBox("Hello, world!");
```

- family of static methods in the `Memory` class for manipulating different data types. See the [Memory guide](using-memory.md) for more information.

- `exit(reason?)` - terminates the script immediately. `exit` function accepts an optional string argument that will be added to the `cleo_redux.log`.

```js
exit("Script ended");
```

- family of static methods in the `Memory` class for manipulating different data types. See the [Memory guide](using-memory.md) for more information.

### Deprecated

Note: usage of the following commands is not recommended.
Expand Down
7 changes: 4 additions & 3 deletions examples/free_resprays[mem].js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if (GAME !== "re3" && GAME !== "reVC") {

wait(1000);
var addr = Memory.Translate("CGarages::RespraysAreFree");
Memory.WriteU8(addr, 1, 0);

showTextBox("Resprays are free now!");
if (addr) {
Memory.WriteU8(addr, true, false);
showTextBox("Resprays are free now!");
}
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h1 class="font-weight-bold d-flex justify-content-center">
href="https://github.com/cleolibrary/CLEO-Redux/releases/latest"
>Download</a
>
<small class="pt-1 text-muted">v0.7.1 | Nov 02, 2021</small>
<small class="pt-1 text-muted">v0.7.2 | Nov 04, 2021</small>
</div>
</div>
</div>
Expand Down

0 comments on commit 7e7b3b1

Please sign in to comment.