This project is mirrored from https://github.com/rsmod/rsmod.
Pull mirroring updated .
- 28 Mar, 2023 4 commits
- 27 Mar, 2023 2 commits
- 23 Mar, 2023 2 commits
- 22 Mar, 2023 7 commits
-
-
Tomm0017 authored
-
Tomm0017 authored
-
Tomm0017 authored
-
Tomm authored
Reworks the old event bus system. Goal was to allow parameter-bound events, i.e. `Event<Player>`, which would permit for event actions to have player (or any other specified type) as a context-receiver. This was important as players will now store a collection of pending events through their lifecycle. These events were isolated in a way where "player-bound" events no longer require a player field and instead the "invoke" portion of the event-bus requires the player as input. If we did _not_ take this approach, players would end up with a list of events that contain a reference to themselves, such as the following: // event needs access to player for the "action" lambda set through plugins class LogInEvent(val player: Player) : Event class Player { // ... public val events = mutableListOf<Event>() } fun onLogIn(player: Player) { // player now stores an event that has a ref to their own object - bad! player.events += LogInEvent(player) }
-
Tomm0017 authored
-
Tomm0017 authored
-
Tomm0017 authored
-
- 21 Mar, 2023 8 commits
- 20 Mar, 2023 9 commits
- 19 Mar, 2023 8 commits