-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#90: Changed warp to land entities near the warp radius of the celest…
…ial. (#91) * Created spacegame.commands package and moved warp commands into it. * Changed warp command to land entities around the limits of the destination celestial's warp radius.
- Loading branch information
Showing
5 changed files
with
62 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from spacegame.commands import warp | ||
|
||
|
||
def init(): | ||
warp.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from pantsmud.driver import command, parser | ||
from pantsmud.util import message | ||
from spacegame.modules import warp | ||
|
||
|
||
def warp_command(brain, cmd, args): | ||
params = parser.parse([("destination_uuid", parser.UUID)], args) | ||
result = warp.do_warp(brain.mobile, params["destination_uuid"]) | ||
message.command_success(brain, cmd, result) | ||
|
||
|
||
def warp_beacon_command(brain, cmd, args): | ||
parser.parse([], args) | ||
result = warp.do_warp_beacon(brain.mobile) | ||
message.command_success(brain, cmd, result) | ||
|
||
|
||
def warp_scan_command(brain, cmd, args): | ||
parser.parse([], args) | ||
result = warp.do_warp_scan(brain.mobile) | ||
message.command_success(brain, cmd, result) | ||
|
||
|
||
def warp_scan_activate_command(brain, cmd, args): | ||
parser.parse([], args) | ||
result = warp.do_warp_scan_activate(brain.mobile) | ||
message.command_success(brain, cmd, result) | ||
|
||
|
||
def init(): | ||
command.add_command("warp", warp_command) | ||
command.add_command("warp.beacon", warp_beacon_command) | ||
command.add_command("warp.scan", warp_scan_command) | ||
command.add_command("warp.scan.activate", warp_scan_activate_command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters