# terms provided in the LICENSE file distributed with this software.
[__control__]
-default_files = { "account": "account.mpy", "actor": "actor.mpy", "command": "command.mpy", "internal": "internal.mpy", "location": "location.mpy", "menu": "menu.mpy", "other": "other.mpy", "prop": "prop.mpy" }
+default_files = { "account": "account.mpy", "actor": "actor.mpy", "area": "area.mpy", "command": "command.mpy", "internal": "internal.mpy", "menu": "menu.mpy", "other": "other.mpy", "prop": "prop.mpy" }
include_dirs = "sample"
include_files = "archetype.mpy"
private_files = "account.mpy"
def update_location(self):
"""Make sure the location's contents contain this element."""
- location = self.get("location")
- if location in self.universe.contents:
- self.universe.contents[location].contents[self.key] = self
+ area = self.get("location")
+ if area in self.universe.contents:
+ self.universe.contents[area].contents[self.key] = self
def clean_contents(self):
"""Make sure the element's contents aren't bogus."""
if element.get("location") != self.key:
del self.contents[element.key]
- def go_to(self, location):
- """Relocate the element to a specific location."""
+ def go_to(self, area):
+ """Relocate the element to a specific area."""
current = self.get("location")
if current and self.key in self.universe.contents[current].contents:
del universe.contents[current].contents[self.key]
- if location in self.universe.contents:
- self.set("location", location)
- self.universe.contents[location].contents[self.key] = self
- self.look_at(location)
+ if area in self.universe.contents:
+ self.set("location", area)
+ self.universe.contents[area].contents[self.key] = self
+ self.look_at(area)
def go_home(self):
"""Relocate the element to its default location."""
self.send(message)
def portals(self):
- """Map the portal directions for a room to neighbors."""
+ """Map the portal directions for an area to neighbors."""
portals = {}
- if re.match("""^location:-?\d+,-?\d+,-?\d+$""", self.key):
+ if re.match("""^area:-?\d+,-?\d+,-?\d+$""", self.key):
coordinates = [(int(x))
for x in self.key.split(":")[1].split(",")]
directions = self.universe.categories["internal"]["directions"]
for portal in self.getlist("gridlinks"):
adjacent = map(lambda c, o: c + o,
coordinates, offsets[portal])
- neighbor = "location:" + ",".join(
+ neighbor = "area:" + ",".join(
[(str(x)) for x in adjacent]
)
if neighbor in self.universe.contents:
# go through all elements to clear out inactive avatar locations
for element in self.contents.values():
- location = element.get("location")
- if element in inactive_avatars and location:
- if location in self.contents and element.key in self.contents[
- location
+ area = element.get("location")
+ if element in inactive_avatars and area:
+ if area in self.contents and element.key in self.contents[
+ area
].contents:
- del self.contents[location].contents[element.key]
+ del self.contents[area].contents[element.key]
element.set("default_location", location)
element.remove_facet("location")
def command_say(actor, parameters):
- """Speak to others in the same room."""
+ """Speak to others in the same area."""
# check for replacement macros and escape them
parameters = escape_macros(parameters)
# capitalize the first letter
message = message[0].upper() + message[1:]
- # tell the room
+ # tell the area
if message:
actor.echo_to_location(
actor.get("name") + " " + action + "s, \"" + message + "\""
-# Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
[__control__]
-include_files = [ "location.mpy", "prop.mpy" ]
+include_files = [ "area.mpy", "prop.mpy" ]
read_only = yes
-# Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
-[location:-1,0,0]
-description = This is the West Sample Location. It is merely provided as an example of what a location might look like.
+[area:-1,0,0]
+description = This is the West Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['east']
name = West Sample Location
terrain = inside
-[location:0,-1,0]
-description = This is the South Sample Location. It is merely provided as an example of what a location might look like.
+[area:0,-1,0]
+description = This is the South Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['north']
name = South Sample Location
terrain = inside
-[location:0,0,-1]
-description = This is the Lower Sample Location. It is merely provided as an example of what a location might look like.
+[area:0,0,-1]
+description = This is the Lower Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['up']
name = Lower Sample Location
terrain = inside
-[location:0,0,0]
-description = This is the Center Sample Location. It is merely provided as an example of what a location might look like.
+[area:0,0,0]
+description = This is the Center Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['down', 'east', 'north', 'south', 'up', 'west']
name = Center Sample Location
terrain = inside
-[location:0,0,1]
-description = This is the Upper Sample Location. It is merely provided as an example of what a location might look like.
+[area:0,0,1]
+description = This is the Upper Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['down']
name = Upper Sample Location
terrain = inside
-[location:0,1,0]
-description = This is the North Sample Location. It is merely provided as an example of what a location might look like.
+[area:0,1,0]
+description = This is the North Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['south']
name = North Sample Location
terrain = inside
-[location:1,0,0]
-description = This is the East Sample Location. It is merely provided as an example of what a location might look like.
+[area:1,0,0]
+description = This is the East Sample Location. It is merely provided as an example of what an area might look like.
gridlinks = ['west']
name = East Sample Location
terrain = inside
-# Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
[prop:sample_prop]
impression = A sample prop sits here.
keywords = sample prop
-location = location:0,0,0
+location = area:0,0,0
-# Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
is_actor = yes
[archetype:avatar]
-default_location = location:0,0,0
+default_location = area:0,0,0
inherit = archetype:actor
-# Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
action = command_delete(actor, parameters)
administrative = yes
description = Delete an existing facet from an element.
-help = You can delete any facet of an element as follows:$(eol)$(eol) delete location:boardroom terrain
+help = You can delete any facet of an element as follows:$(eol)$(eol) delete area:boardroom terrain
[command:destroy]
action = command_destroy(actor, parameters)
[command:say]
action = command_say(actor, parameters)
description = State something out loud.
-help = This allows you to speak to other characters within the same room. If you end your sentence with punctuation, the message displayed will incorporate an appropriate action (ask, exclaim, et cetera). It will also correct common typographical errors, add punctuation and capitalize your sentence as needed (assuming you speak one sentence per line). For example:$(eol)$(eol) > say youre sure i went teh wrong way?$(eol) You ask, "You're sure I went the wrong way?"$(eol)$(eol)If necessary, enclose literal statements in quotation marks:$(eol)$(eol) > say "youre sure i went teh wrong way?"$(eol) You say, "youre sure i went teh wrong way?"
+help = This allows you to speak to other characters within the same area. If you end your sentence with punctuation, the message displayed will incorporate an appropriate action (ask, exclaim, et cetera). It will also correct common typographical errors, add punctuation and capitalize your sentence as needed (assuming you speak one sentence per line). For example:$(eol)$(eol) > say youre sure i went teh wrong way?$(eol) You ask, "You're sure I went the wrong way?"$(eol)$(eol)If necessary, enclose literal statements in quotation marks:$(eol)$(eol) > say "youre sure i went teh wrong way?"$(eol) You say, "youre sure i went teh wrong way?"
see_also = chat
[command:set]