2970bd09d7
The parent<=>child relationship of scenes was removed. Instead, this commit introduces the concept of a connection.
A connection is used to connect two scenes. Depending on which entity the connect-method is called, one is defined as the "outgoing" scene, the other as the ingoing scene:
```
$a->connect($b);
```
In this case, $a will be the outgoing part of the connection, $b the incoming.
Furthermore, in order to support action groups, this commit introduces SceneConnectionGroups which can be created in scenes and checked wether they exist or not. Using these, it is possible to specifiy to which part of the scenes are connected to each other.
```
$a->getConnectionGroup("scene-A/marketsquare")->connect($b);
```
In this case, $a will have the action to access $b under the ActionGroup of scene-A/marketsquare. On the other hand, $b, which doesn't have a connection group specified, will have the connection back to $a in the default group.
Connect also accepts the return value of getConnectionGroup as the argument, thus allowing the connection _to_ a certain part of $b as well:
```
$a->connect($b->getConnectionGroup("scene-B/back"));
```
The tests for scenes were updates in order to reflect this change.
37 lines
907 B
JSON
37 lines
907 B
JSON
{
|
|
"name": "lotgd/core",
|
|
"description": "Core functionality for Legend of the Green Dragon, a text-based RPG game.",
|
|
"license": "AGPL-3.0",
|
|
"autoload": {
|
|
"psr-4": {
|
|
"LotGD\\Core\\": "src/",
|
|
"LotGD\\Core\\Tests\\": "tests/"
|
|
}
|
|
},
|
|
"bin": [
|
|
"bin/daenerys"
|
|
],
|
|
"require": {
|
|
"php": "^7.1.0",
|
|
"composer/composer": "*",
|
|
"gedmo/doctrine-extensions": "*",
|
|
"doctrine/orm": "^2.5",
|
|
"monolog/monolog": "^1.12",
|
|
"symfony/console": "^3.0",
|
|
"symfony/yaml": "^3.0",
|
|
"d11wtq/boris": "^1.0"
|
|
},
|
|
"repositories": [
|
|
{
|
|
"type": "vcs",
|
|
"url": "https://github.com/austenmc/php-docblock-checker"
|
|
}
|
|
|
|
],
|
|
"require-dev": {
|
|
"phpunit/phpunit": "*",
|
|
"phpunit/dbunit": "*",
|
|
"block8/php-docblock-checker": "2.0.0"
|
|
}
|
|
}
|