April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions

View File

@@ -1,16 +1,16 @@
#CONTRIBUTING
##Reporting Issues
## Reporting Issues
See [this page](http://tgstation13.org/wiki/Reporting_Issues) for a guide and format to issue reports.
##Introduction
## Introduction
Hello and welcome to /tg/station's contributing page. You are here because you are curious or interested in contributing. Thanks for being interested. Everyone is free to contribute to this project as long as they follow the simple guidelines and specifications below, because at /tg/station, we have a goal to increase code maintainability and to do that we are going to need all pull requests to hold up to those specifications. This is in order for all of us to benefit, instead of having to fix the same bug more than once because of duplicated code.
But first we want to make it clear how you can contribute, if contributing is a new experience for you, and what powers the team has over your pull request so you do not get any surprises when submitting pull requests, and it is closed for a reason you did not anticipate.
##Getting Started
## Getting Started
At /tg/station we do not have a list of goals and features to add, we instead allow freedom for contributors to suggest and create their ideas for the game. That does not mean we aren't determined to squash bugs, which unfortunately pop up a lot due to the deep complexity of the game. Here are some useful getting started guides, if you want to contribute or if you want to know what challenges you can tackle with zero knowledge about the game's code structure.
If you want to contribute the first thing you'll need to do is [set up Git](http://tgstation13.org/wiki/Setting_up_git) so you can download the source code.
@@ -21,7 +21,7 @@ There is an open list of approachable issues for [your inspiration here](https:/
You can of course, as always, ask for help at [#coderbus](irc://irc.rizon.net/coderbus) on irc.rizon.net. We are just here to have fun and help so do not expect professional support please.
##Meet the Team
## Meet the Team
**Project Leads**
@@ -37,14 +37,14 @@ Maintainers are quality control. If a proposed pull request does not meet the me
Maintainers can revert your changes if they feel they are not worth maintaining or if they did not live up to the quality specifications.
##Specification
## Specification
As mentioned before, you are expected to follow these specifications in order to make everyone's lives easier, it will also save you and us time, with having to make the changes and us having to tell you what to change. Thank you for reading this section.
###Object Oriented code
### Object Oriented code
As BYOND's Dream Maker is an object oriented language, code must be object oriented when possible in order to be more flexible when adding content to it. If you are unfamiliar with this concept, it is highly recommended you look it up.
###All Byond paths must contain the full path.
### All Byond paths must contain the full path.
(ie: absolute pathing)
Byond will allow you nest almost any type keyword into a block, such as:
@@ -98,16 +98,16 @@ The previous code made compliant:
code
```
###No overriding type safety checks.
### No overriding type safety checks.
The use of the : operator to override type safety checks is not allowed. You must cast the variable to the proper type.
###Type paths must began with a /
### Type paths must began with a /
eg: `/datum/thing` not `datum/thing`
###Datum type paths must began with "datum"
### Datum type paths must began with "datum"
In byond this is optional, but omitting it makes finding definitions harder.
###Do not use text/string based type paths
### Do not use text/string based type paths
It is rarely allowed to put type paths in a text format, as there are no compile errors if the type path no longer exists. Here is an example:
```C++
@@ -118,22 +118,22 @@ var/path_type = /obj/item/weapon/baseball_bat
var/path_type = "/obj/item/weapon/baseball_bat"
```
###Tabs not spaces
### Tabs not spaces
You must use tabs to indent your code, NOT SPACES.
(You may use spaces to align something, but you should tab to the block level first, then add the remaining spaces)
###No Hacky code
### No Hacky code
Hacky code, such as adding specific checks, is highly discouraged and only allowed when there is ***no*** other option. (Protip: 'I couldn't immediately think of a proper way so thus there must be no other option' is not gonna cut it here )
You can avoid hacky code by using object oriented methodologies, such as overriding a function (called procs in DM) or sectioning code into functions and then overriding them as required.
###No duplicated code.
### No duplicated code.
Copying code from one place to another maybe suitable for small short time projects but /tg/station focuses on the long term and thus discourages this.
Instead you can use object orientation, or simply placing repeated code in a function, to obey this specification easily.
###Startup/Runtime tradeoffs with lists and the "hidden" init proc
### Startup/Runtime tradeoffs with lists and the "hidden" init proc
First, read the comments in this byond thread, starting here:http://www.byond.com/forum/?post=2086980&page=2#comment19776775
There are two key points here:
@@ -144,19 +144,19 @@ There are two key points here:
Remember, this tradeoff makes sense in many cases but not all, you should think carefully about your implementation before deciding if this is an appropriate thing to do
###Prefer `Initialize` over `New` for atoms
### Prefer `Initialize` over `New` for atoms
Our game controller is pretty good at handling long operations and lag. But, it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/master/code/game/atoms.dm#L49
###No magic numbers or strings
### No magic numbers or strings
Make these #defines with a name that more clearly states what it's for.
###Control statements:
### Control statements:
(if,while,for,etc)
* All control statements must not contain code on the same line as the statement (`if (blah) return`)
* All control statements comparing a variable to a number should use the formula of `thing` `operator` `number`, not the reverse (eg: `if (count <= 10)` not `if (10 >= count)`)
###Use early return.
### Use early return.
Do not enclose a proc in an if block when returning on a condition is more feasible
This is bad:
````
@@ -179,7 +179,7 @@ This is good:
````
This prevents nesting levels from getting deeper then they need to be.
###Develop Secure Code
### Develop Secure Code
* Player input must always be escaped safely, we recommend you use stripped_input in all cases where you would use input. Essentially, just always treat input from players as inherently malicious and design with that use case in mind
@@ -193,14 +193,14 @@ This prevents nesting levels from getting deeper then they need to be.
* Where you have code that can cause large scale modification and *FUN* make sure you start it out locked behind one of the default admin roles - use common sense to determine which role fits the level of damage a function could do
###Files
### Files
* Because runtime errors do not give the full path, try to avoid having files with the same name across folders.
* File names should not be mixed case, or contain spaces or any character that would require escaping in a uri.
* Files and path accessed and referenced by code above simply being #included should be strictly lowercase to avoid issues on filesystems where case matters.
###Other Notes
### Other Notes
* Code should be modular where possible, if you are working on a new class then it is best if you put it in a new file.
* Bloated code may be necessary to add a certain feature, which means there has to be a judgement over whether the feature is worth having or not. You can help make this decision easier by making sure your code is modular.
@@ -209,7 +209,7 @@ This prevents nesting levels from getting deeper then they need to be.
* Do not divide when you can easily convert it to a multiplication. (ie `4/2` should be done as `4*0.5`)
####Enforced not enforced
#### Enforced not enforced
The following different coding styles are not only not enforced, but it is generally frowned upon to change them over from one to the other for little reason:
* English/British spelling on var/proc names
@@ -217,7 +217,7 @@ The following different coding styles are not only not enforced, but it is gener
* Spaces after control statements
* if() if () nobody cares.
####Operators and spaces:
#### Operators and spaces:
(this is not strictly enforced, but more a guideline for readability's sake)
* Operators that should be separated by spaces
@@ -232,7 +232,7 @@ The following different coding styles are not only not enforced, but it is gener
Math operators like +, -, /, *, etc are up in the air, just choose which version looks more readable.
###Dream Maker Quirks/Tricks:
### Dream Maker Quirks/Tricks:
Like all languages, Dream Maker has its quirks, some of them are beneficial to us, like these
* In-To for loops: ```for(var/i = 1, i <= some_value, i++)``` is a fairly standard way to write an incremental for loop in most languages (especially those in the C family) however DM's ```for(var/i in 1 to some_value)``` syntax is oddly faster than its implementation of the former syntax; where possible it's advised to use DM's syntax. (Note, the ```to``` keyword is inclusive, so it automatically defaults to replacing ```<=```, if you want ```<``` then you should write it as ```1 to some_value-1```).
@@ -276,7 +276,7 @@ H.gib()
however DM also has a dot variable, accessed just as ```.``` on it's own, defaulting to a value of null, now what's special about the dot operator is that it is automatically returned (as in the ```return``` statment) at the end of a proc, provided the proc does not already manually return (```return count``` for example). Why is this special? well the ```return``` statement should ideally be free from overhead (functionally free, of course nothing's free) but DM fails to fulfill this, DM's return statement is actually fairly costly for what it does and for what it's used for.
With ```.``` being everpresent in every proc can we use it as a temporary variable? Of course we can! However the ```.``` operator cannot replace a typecasted variable, it can hold data any other var in DM can, it just can't be accessed as one, however the ```.``` operator is compatible with a few operators that look weird but work perfectly fine, such as: ```.++``` for incrementing ```.'s``` value, or ```.[1]``` for accessing the first element of ```.``` (provided it's a list).
##Pull Request Process
## Pull Request Process
There is no strict process when it comes to merging pull requests, pull requests will sometimes take a while before they are looked at by a maintainer, the bigger the change the more time it will take before they are accepted into the code. Every team member is a volunteer who is giving up their own time to help maintain and contribute, so please be nice. Here are some helpful ways to make it easier for you and for the maintainer when making a pull request.
@@ -297,7 +297,7 @@ Do not add any of the following in a Pull Request or risk getting the PR closed:
* National Socialist Party of Germany content, National Socialist Party of Germany related content, or National Socialist Party of Germany references
* Code where one line of code is split across mutiple lines (except for multiple, separate strings and comments and in those cases existing longer lines must not be split up)
##A word on git
## A word on git
Yes we know that the files have a tonne of mixed windows and linux line endings, attempts to fix this have been met with less than stellar success and as such we have decided to give up caring until such a time as it matters.
Therefore EOF settings of main repo are forbidden territory one must avoid wandering into

View File

@@ -7,6 +7,7 @@ add: Added new things
add: Added more things
del: Removed old things
tweak: tweaked a few things
balance: rebalanced something
fix: fixed a few things
wip: added a few works in progress
soundadd: added a new sound thingy