[ ] Seperate output formats between informationals vs. interactives?
[ ] Colorization
[ ] Ascii design - (unicode/utf is available, but not turned on by default in all clients).
(I know I touched on __docstrings__ stuff in another issue, but standards should have its own issue. This is the current stuff that I could think of that needs to be discussed/resolved.)
Code Standards Proposal:
Naming and readability standards for code.
We will be following the Evennia Code Style guidelines.
1) Classes:
* Command classes contain func() method and begin with `Cmd` prefix
> ```
> class CmdClassname(Typeclass):
> def __init__(self):
> pass
>
> def func():
> pass
>```
2) Methods
* Internal methods:
* Begin with an underscore ('_') character
* Simple and descriptive
* Variable names expose intentions of what the internal is expecting (character, inventory, money...)
> ```
> def _character_desc(self, character):
> """return character description"""
> return self.character.db.desc
>
> def _calc_armor_dmg(self, shield, armor, resistances):
> """calculate damage done to a character's armor"""
> pass
> ```
* External methods:
* Begin with an alpha character
* Simple and descriptive
* Variable indicates object or type it expects
> ```
> def inventory(self, character):
> pass
>
> def puppeted(self, account):
> pass
> ```
Contain db/ndb designation (db writes to database, ndb does not)
class Npc(Character):
def __init__(self):
self.db.creator = self.get_caller()
def apply_effect(self, effect):
if effect in self.allowed_effects and effect not in self.effect_list:
self.ndb.effect_list.append(effect):
else:
pass
I've been looking at TravisCI. This is something that we're going to need to know, but not something we have to have right now. Gotta get working code and tests in before TravisCI can do its thing. We'll have to add it to the Tene repo when we get to that point.
Standards
Code standards draft
Help standards draft
UX/UI Mockup:
(I know I touched on
__docstrings__
stuff in another issue, but standards should have its own issue. This is the current stuff that I could think of that needs to be discussed/resolved.)Code Standards Proposal:
Naming and readability standards for code. We will be following the Evennia Code Style guidelines.
1) Classes:
2) Methods
Variables:
Local variables:
Instance variables:
Global Variables: