World: change 'closed' to 'unloaded'

this makes more sense overall from a reader's perspective.
and also provide a rug-jerk for any idiots using World->close() when they aren't supposed to? ....
This commit is contained in:
Dylan K. Taylor
2021-06-26 21:54:18 +01:00
parent b8ebf8936e
commit 02fab77e55
4 changed files with 14 additions and 14 deletions

View File

@@ -168,7 +168,7 @@ class WorldManager{
}
unset($this->worlds[$world->getId()]);
$world->close();
$world->onUnload();
return true;
}
@@ -321,7 +321,7 @@ class WorldManager{
*/
public function findEntity(int $entityId) : ?Entity{
foreach($this->worlds as $world){
assert(!$world->isClosed());
assert($world->isLoaded());
if(($entity = $world->getEntity($entityId)) instanceof Entity){
return $entity;
}