From 671254fa19f32c5bb326596578995efd20c6d874 Mon Sep 17 00:00:00 2001 From: mblokker Date: Mon, 22 Aug 2016 15:12:00 +0200 Subject: [PATCH] Initial plumbing for Teleportation 2.0 #11 --- javascript/features/location/location.js | 1 - .../features/teleportation/teleportation.js | 24 +++++++++++++++++++ .../teleportation/teleportation_commands.js | 16 +++++++++++++ .../teleportation/teleportation_manager.js | 16 +++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 javascript/features/teleportation/teleportation.js create mode 100644 javascript/features/teleportation/teleportation_commands.js create mode 100644 javascript/features/teleportation/teleportation_manager.js diff --git a/javascript/features/location/location.js b/javascript/features/location/location.js index 1bbcc455b..6ccc42f7f 100644 --- a/javascript/features/location/location.js +++ b/javascript/features/location/location.js @@ -13,7 +13,6 @@ class Location extends Feature { super(); this.interiorManager_ = new InteriorManager(); - this.locationCommands_ = new LocationCommands(this.interiorManager_); } diff --git a/javascript/features/teleportation/teleportation.js b/javascript/features/teleportation/teleportation.js new file mode 100644 index 000000000..0a08fffa4 --- /dev/null +++ b/javascript/features/teleportation/teleportation.js @@ -0,0 +1,24 @@ +// Copyright 2016 Las Venturas Playground. All rights reserved. +// Use of this source code is governed by the MIT license, a copy of which can +// be found in the LICENSE file. + +const Feature = require('components/feature_manager/feature.js'); +const TeleportationCommands = require('features/teleportation/teleportation_commands.js'); +const TeleportationManager = require('features/teleportation/teleportation_manager.js'); + +// Implementation of the feature that handles teleportation in Las Venturas Playground. +class Teleportation extends Feature { + constructor() { + super(); + + this.manager_ = new TeleportationManager(); + this.commands_ = new TeleportationCommands(this.manager_); + } + + dispose() { + this.commands_.dispose(); + this.manager_.dispose(); + } +} + +exports = Teleportation; diff --git a/javascript/features/teleportation/teleportation_commands.js b/javascript/features/teleportation/teleportation_commands.js new file mode 100644 index 000000000..0a483f24d --- /dev/null +++ b/javascript/features/teleportation/teleportation_commands.js @@ -0,0 +1,16 @@ +// Copyright 2016 Las Venturas Playground. All rights reserved. +// Use of this source code is governed by the MIT license, a copy of which can +// be found in the LICENSE file. + +// Implements a series of commands related to teleportation in Las Venturas Playground. +class TeleportationCommands { + constructor(manager) { + this.manager_ = manager; + } + + dispose() { + + } +} + +exports = TeleportationCommands; diff --git a/javascript/features/teleportation/teleportation_manager.js b/javascript/features/teleportation/teleportation_manager.js new file mode 100644 index 000000000..fdcf4d0cf --- /dev/null +++ b/javascript/features/teleportation/teleportation_manager.js @@ -0,0 +1,16 @@ +// Copyright 2016 Las Venturas Playground. All rights reserved. +// Use of this source code is governed by the MIT license, a copy of which can +// be found in the LICENSE file. + +// The teleportation manager provides back-end logic for the features provided as part of this module. +class TeleportationManager { + constructor() { + + } + + dispose() { + + } +} + +exports = TeleportationManager;