Try   HackMD

Coding Guidelines

This is a quick and dirty summary of things to do and not to do when coding for monkestation including "best" practices.

THINGS NOT TO DO

Single letter variables

Do not use single letter variables except in very specific circumstances where it would comonly be used.
Example of bad variable use:

image
This is very hard to read dont do this.
This however these, are fine.
image

And
image

Its very common to shorten H for human, M for mob, O for object and T for turf. Don't do it all the time though.

Deleting

Use qdel() for all your deleting needs. dont use del()

Whitespace

Add spaces after control statements and linelbreaks after code blocks of varying indentation for readability.

Whitespace

Do not add new mobs to simple mobs, /mob/living/simple_animal.

New animals or mobs should be under basic mobs, /mob/living/basic.


bingus

THINGS TO DO

Client checks

If your code is interacting with a client datum, check if it is null often.
A client can become null at any time without warning even in the middle of a proc or a check for if its null!