Guide to Food and Drink and SS13 for Experienced Programmers: Difference between pages

From Chompstation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Luther
 
imported>Nadyr
(Page restored.)
 
Line 1: Line 1:
{{vorePage}}
{{BayPage}}
==Fullness==
{{hatnote|This article was gratefully copied from the corresponding page on the [http://tgstation13.org/wiki/SS13_for_experienced_programmers /tg/station13 wiki].}}
Other related guides: [[Basics of Coding in BYOND]] and the [[Guide to Mapping]]


As you walk and move about on station, your starting nutrition bar will start to drain from starting green, down to dark red; if your hunger bar turns black, you've eaten way too much. The effects of fullness and hunger are equally bad, so it is best to stay at a happy medium. So keep in mind how much you've eaten and how long it has been since you last ate, and you will be fine.  
So you know how to write programs in other languages and would like a quick guide on how to understand and code for SS13? Good, this is the guide for you. It likely doesn't contain everything that you need to know but it's a start.


Go with the rule that, "If you have a hard time getting it down, don't eat any more". Note that nutrition is typically slow-release, so if you don't fill up immediately, you will in the near future.
== Syntax ==


Several reagents will increase your fullness:
*Semicolons at the end are not mandatory,
* Very effective: Nutriment, found in most foods. The main one and most effective; Corn oil; Animal Protein, found in meat and Egg Yolk.
*Loop, proc, object, variable etc. spans are determined by indentations (similar to Python, see examples below)
* Somewhat effective: Ketchup, Sugar, Sprinkles, Coco powder, Corn oil, Cherry jelly.
  /obj
* Some alcoholic drinks.
    var
      i1
      i2
      i3
is the same as (Strongly recommended you use this layout to make searching for variable and proc definitions easier.)
  /obj
    var/i1
    var/i2
    var/i3
which is inturn the same as
  /obj/var/i1
  /obj/var/i2
  /obj/var/i3
*This guide uses the word 'object' for any defined type (see [[#Variable types|Variable types]]) and the word 'obj' for derivatives of atom/obj, which are all objects which can be placed on the map.
*This guide uses the word 'AI controlled' for behavior to do with an [[AI]] player controlling an item. The term 'Game controlled' is used when refering to behavior which the script itself determins (Usually called AI controlled creatures or NPCs)
*All things are inherited from parent objects. If a variable is defined in /obj/item, it doesn't need to be (actually can't be) redefined in /obj/item/weapon.


===Starvation===
=== [http://www.byond.com/members/?command=reference&path=var Variables] ===
Variables are very general, Byond makes no difference in the declaration of strings, integers, etc. (Similar to PHP)


[[File:hunger_starving.png|50px]][[File:hunger_hungry.png|50px]][[File:hunger_fed.png|50px]][[File:hunger_well_fed.png|50px]][[File:hunger_full.png|50px]][[File:hunger_fat.png|50px]]
==== [http://www.byond.com/members/?command=reference&path=var Predefined variables] ====
There is a lot of predefined variables for objects in BYOND, but the most important are:
*'''[http://www.byond.com/members/?command=reference&path=proc%2Fvar%2Fsrc src]''' - a variable equal to the object containing the proc or verb. It is defined to have the same type as that object. (Similar to "this" in Java or C++)
*'''[http://www.byond.com/members/?command=reference&path=proc%2Fvar%2Fusr usr]''' - a mob variable (var/mob/usr) containing the mob of the player who executed the current verb, or whose action ultimately called the current proc. '''A good rule of thumb is to never put usr in a proc.''' If src would not be the correct choice, it is better to send another argument to your proc with the information it needs.
*'''[http://www.byond.com/members/?command=reference&path=proc%2Fvar%2Fargs args]''' - a list of the arguments passed to the proc or verb.
*'''[http://www.byond.com/members/?command=reference&path=datum%2Fvar%2Fvars vars]''' - a list of object variables. If the variable name is used as an index into the list, the value of that variable is accessed.


If you drop to dark red, you move very slowly and your description reveals your lack of eating habits. You are starving, this is not good! You will move slowly until you eat some food, so head to the [[chef]] for a burger or slice of meatbread!
For more SS13 specific variables see [[#SS13 common variable meanings|SS13 common variable meanings]]


Some things will decrease your hunger faster:
==== Variable definition ====
* Vomiting
* Being cold (by exposure to cold environments or because you were in a cryo tube)
* Recovering from blood loss
* Taking Lipozine
* Some viruses


If you eat too much, your description will note that you are "chubby". Too little, and you will be described as "malnourished".
=====Basic definitions=====
Food will also factor into your characters Weight. Gain weight by eating food, lose weight by walking or working out in the stations [[Gym]].
  var/j
  var/i = 4
  var/a, b, c


==Drinks==
=====Complex definitions=====
The general syntax is [http://www.byond.com/members/?command=reference&path=var var/type/variable_name = value]


'''IMPORTANT:'''
Examples:
Many of these drinks, while they do have toxic ingredients, are not toxic in and of themselves. However, because they have toxic ingredients, if you mess them up, you will poison your patrons--not something a good bartender wants to do. An evil one, though...  
  var/obj/item/I = new/obj/item
  [http://www.byond.com/members/?command=reference&path=operator%2F%40dt%3B I.name] = "Some item"


'''EXAMPLES:'''
Datum definition and declaration of a variable of that datum type:
* Kahlua = Coffee Liqueur
  datum/test_datum
* Vodka = Tunguska Triple Distilled
    var/test_variable = 0 //declaration of the test_variable var
* Whiskey = Uncle Git's Special Reserve
   
    proc/set_as(var/i) //proc definition within the test_datum datum
      test_variable = i //set the test_variable var to the value in the argument
 
  var/datum/test_datum/TD = new/datum/test_datum //TD will now be a reference to a datum of type test_datum
  TD.test_variable = 4  //Byond doesn't know of private variables, so you can set any variables like this
  [http://www.byond.com/members/?command=reference&path=world world] [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B <<] TD.test_variable //will output 4 to all connected users
  TD.set_as(10) //Will call the set_as proc in the datum with the argument 10
  TD.test_variable //will output 10 to all connected users


===Alcoholic Drinks===
==== Bitflags ====
Alcoholic drinks contain ethanol. Each drink is given a numerical value, that reflects how much it takes to raise you one stage of drunkenness. '''Lower numbers mean the drink is stronger.''' Depending on how much you drink, you may slur your speech, get dizzy, start stumbling around, and even pass out. Just as in real life, the more slowly you drink, the less you are affected by alcohol. Some species have special reactions to alcohol: Skrell will always treat any alcohol as extremely strong, and will get very drunk, very quickly. Humans will take liver damage from drinking too much; this damage happens at around the same level where the character passes out.
Bitflags are variables which use bits instead of numbers to determine conditions. The bit operators are [http://www.byond.com/members/?command=reference&path=operator%2F%26 &] and [http://www.byond.com/members/?command=reference&path=operator%2F%7C |]. For now, you should know that bitflag operators use the binary value of numbers to determine the result. So [http://www.byond.com/members/?command=reference&path=operator%2F%26 13 & 3] will result in 1. ([http://www.byond.com/members/?command=reference&path=operator%2F%26 1101 & 0011 = 0001]) and [http://www.byond.com/members/?command=reference&path=operator%2F%7C 13 | 3 = 15] ([http://www.byond.com/members/?command=reference&path=operator%2F%7C 1101 | 0011 = 1111]) see [[#If|if]] for uses


====Mixed Drinks====
==== Variable types ====
Since a drinking glass will hold only 30 units of liquid, it's recommended that bartenders use their drink shakers to concoct these drinks before pouring them out.
[http://www.byond.com/members/?command=reference&path=var reference]


{| class="sortable" border="1" cellspacing="0" cellpadding="2" align="center"
*[http://www.byond.com/members/?command=reference&path=datum datum] - ordinary object type (class in java)
! style="background-color:Chocolate;" |Picture
*[http://www.byond.com/members/?command=reference&path=atom atom] - atom derives into obj, turf, mob and area
! style="background-color:Chocolate;" |Cocktail
*[http://www.byond.com/members/?command=reference&path=turf turf] - tiles which make up the floors, walls and space on SS13
! style="background-color:Chocolate;" |Ingredients
*[http://www.byond.com/members/?command=reference&path=area area] - areas are grouped locations. They combine many turfs and it gives some common properties. Power, atmosphere, etc. are determined by areas
! style="background-color:Chocolate;" |Strength
*[http://www.byond.com/members/?command=reference&path=mob mob] - an object with life, be it game controlled or player controlled.
! style="background-color:Chocolate;" |Notes
*[http://www.byond.com/members/?command=reference&path=obj obj] - objects which can be placed on the map
|-
*[http://www.byond.com/members/?command=reference&path=client client] - a new client object is created for each connected player
![[File:AcidSpit.png|50px]]
*[http://www.byond.com/members/?command=reference&path=list list] - a list of elements. The first element in a list called L is L[1]
|Acid Spit
*[http://www.byond.com/members/?command=reference&path=world world] - this is a variable where some global variables for the entire world can be set. World's contents var contains all atoms currently in the game world.
|1 part sulphuric acid, 5 parts wine
 
|30
==== [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B%2Foutput Outputting messages] ====
|Get sulphuric acid from the chemist.
The most basic way of outputting messages is with the [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B%2Foutput '<<' output operator].
|-
 
![[File:AlliesCocktail.png|50px]]
  [http://www.byond.com/members/?command=reference&path=world world] [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B <<] "Hello World!" //Outputs a message to all clients in the world
|Allies Cocktail
  [http://www.byond.com/members/?command=reference&path=proc%2Fvar%2Fusr usr] [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B <<] "Hello usr" //Outputs a message to only the user who is tied to the calling of the proc which contains this.
|1 part ''Classic Martini'', 1 part vodka
 
|25
===== Output with variables =====
| Classic Martini (2 gin, 1 vermouth)
  var/s1 = "Hello"
|-
  var/s2 = "World"
![[File:Aloe.png|50px]]
  var/i = 2011
|Aloe
  [http://www.byond.com/members/?command=reference&path=world world] [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B <<] "[s1] [s2], this guide was written in [i]" //Returns "Hello World, this guide was written in 2011"
|1 part cream, 1 part watermelon juice, 1 part whiskey
 
|15
==== Determining variable types in code ====
|The whiskey must be added last. Makes 2 parts.
The [http://www.byond.com/members/?command=reference&path=proc%2Fistype istype()] proc will come in handy
|-
 
![[File:Amasec.png|50px]]
Example
|Amasec
  var/obj/item/weapon/W = new/obj/item/weapon/baton
|1 part iron, 5 parts vodka, 5 parts wine
  if([http://www.byond.com/members/?command=reference&path=proc%2Fistype istype](W,/obj/item/weapon/baton))
|25
    [http://www.byond.com/members/?command=reference&path=world world] << "It's a baton!"
|Makes 10 parts. Get Iron from the chemist.
 
|-
The second argument is optional, if it's omitted, the variable will be checked against its declared type, like
![[File:Andalusia.png|50px]]
  var/obj/item/weapon/W = new/obj/item/weapon/baton
|Andalusia
  if([http://www.byond.com/members/?command=reference&path=proc%2Fistype istype](W))
|1 part lemon juice, 1 part rum, 1 part whiskey.
    [http://www.byond.com/members/?command=reference&path=world world] << "It's a weapon!"
|15
 
|Get lemons from the gardener and process them.
Standard code for getting specific arguments from variables which have a type that is a subclass of the type the current proc treats them with (see any attackby() proc for examples). Note that the example below is of a proc which is globaly defined, not tied to the object. It doesn't make much sense to do it like this but it works for the purposes of the example. /obj objects don't have the 'amount' variable, it's defined in /obj/item/stack (as ilustrated by the oversimplified definition of classes below. Also note where var/ is used and where it isn't).
|-
  /obj
![[File:antifreezeglass.png|50px]]
    var/name = "Object"
|Anti-Freeze
 
|1 part cream, 1 part ice, 2 parts vodka
  /obj/item
|12
    name = "Item"
|Raises body temperature.
 
  /obj/item/stack
    name = "Stack"
    var/amount = 50
 
  proc/get_amount(var/obj/O)
    if([http://www.byond.com/members/?command=reference&path=proc%2Fistype istype](O,/obj/item/stack))
      var/obj/item/stack/S = O
      return [http://www.byond.com/members/?command=reference&path=operator%2F%40dt%3B S.amount]
 
There is another way of doing this. I'll show you that it exists but it is NOT TO BE USED.
  proc/get_aount(var/obj/S)
    if([http://www.byond.com/members/?command=reference&path=proc%2Fistype istype](O,/obj/item/stack))
      return [http://www.byond.com/members/?command=reference&path=operator%2F%3A O:amount]
The [http://www.byond.com/members/?command=reference&path=operator%2F%3A colon operator] (:) in the example above tells the byond compiler: "I know what I'm doing, so ignore the fact the object doesn't have this variable, I'll make sure it works myself." The problem is that people will revise your code and use it in ways you never planed for. This means something might eventually make the O:amount throw exceptions in the form of runtime errors. Some variables might eventually need to be removed or replaced and this is impossible when they are used with object:variable as the compiler will not throw an error when the variable is removed. The error will only become apparent after the game is ran on the live server which might cause it to crash. So just don't use this method, ever.
 
There are some shortcuts to [http://www.byond.com/members/?command=reference&path=proc%2Fistype istype()] proc:<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fisarea isarea(variable)] = istype(variable, /area)<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fisicon isicon(variable)] = istype(variable, /icon)<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fismob ismob(variable)]  = istype(variable, /mob)<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fisobj isobj(variable)]  = istype(variable, /obj)<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fisturf isturf(variable)] = istype(variable, /turf)<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fisloc isloc(variable)]  = ismob(variable) || isobj(variable) || isturf(variable) || isarea(variable)
 
==== Switching between variable types in code ====
 
Byond defined:<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fascii2text ascii2text]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ffile2text file2text]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Flist2params list2params]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fnum2text num2text]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Fparams2list params2list]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ftext2ascii text2ascii]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ftext2file text2file]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ftext2num text2num]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ftext2path text2path]<br>
[http://www.byond.com/members/?command=reference&path=proc%2Ftime2text time2text]<br>
 
SS13 Defined:<br>
text2dir(direction)<br>
dir2text(direction)<br>
dd_file2list(file_path, separator)<br>
dd_text2list(text, separator, var/list/withinList)<br>
dd_text2List(text, separator, var/list/withinList)<br>
dd_list2text(var/list/the_list, separator)<br>
angle2dir(var/degree)<br>
angle2text(var/degree)<br>
 
For more useful procs see<br>
[http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/procs/helpers.dm code/defines/procs/helpers.dm]<br>
[http://code.google.com/p/tgstation13/source/browse/trunk/code/game/objects/items/helper_procs.dm code/game/objects/items/helper_procs.dm]
 
=== [http://www.byond.com/members/?command=reference&path=proc%2Fif If] ===
 
Ifs default to checking for true if not otherwise stated. True is defined for all variable types as empty, 0 or non-existant (null).
  if(condition)
    action_true()
  else
    action_false()
 
==== Common variable behavior in if statements: ====
{|
!Variable type
!False when
!True when
|-
|-
![[File:Atomicbombglass.gif|50px]]
!String (text / ascii)
|Atomic Bomb
|"" or null
|10 parts ''b-52'', 1 part uranium
|Anything else
|10
|Gets you drunk immediately, and maybe high.
|-
|-
![[File:B-52.png|50px]]
!Int / Real
|B-52
|0 or null
|1 part ''irish cream'', 1 part cognac, 1 part kahlua
|Anything else
|12
| Irish Cream (2 Whiskey, 1 Cream)
|-
|-
![[File:Bahamamamaglass.gif|50px]]
!datum, atom
|Bahama Mama
|null
|1 part ice, 2 parts orange juice, 1 part lime juice, 2 parts rum
|Anything else
|25
|
|-
![[File:BananaHonk.png|50px]]
|Banana Mama (Banana Honk)
|1 part banana, 1 part cream, 1 part sugar
|12
|Yes, it's an alcoholic drink with no alcoholic ingredients. Get Bananas from the gardener.
|-
![[File:Nobarsprite.png|50px]]
|Balloon
|1 part Cream, 1 part Blue Curacao
|66
|
|-
![[File:Barefoot.png|50px]]
|Barefoot
|1 part berry juice, 1 part cream, 1 part vermouth
|30
|Get berries from the gardener and process them.
|-
![[File:BeepskySmash.gif|50px]]
|Beepksy Smash
|1 part iron, 2 parts lime juice, 2 parts whiskey
|12
|Briefly stuns.
|-
![[File:brownglass.gif|50px]]
|Bilk
|1 part beer, 1 part milk
|50
|Get milk from the kitchen.
|-
![[File:Nobarsprite.png|50px]]
|Binman Bliss
|1 part sake, 1 part Tequila
|24
|
|-
![[File:BlackRussian.png|50px]]
|Black Russian
|3 part vodka, 2 part kahlua
|15
|
|-
![[File:BloodyMary.png|50px]]
|Bloody Mary
|2 parts tomato juice, 1 part vodka, 1 part lime juice
|15
|Tomato juice from booze vending machine.
|-
![[File:Boogerglass.gif|50px]]
|Booger
|1 part banana, 1 part cream, 1 part watermelonjuice, 1 part rum
|30
|Get bananas from the garden and process them.
|-
![[File:BraveBull.png|50px]]
|Brave Bull
|2 parts tequila, 1 part kahlua
|15
|
|-
![[File:ChangelingSting.png|50px]]
|Changeling Sting
|1 part ''screwdriver'', 1 part lemon juice, 1 part lime juice
|10
|Screwdriver (2 Vodka, 1 Orange Juice); get lemons from the gardener and process them
|-
![[File:Nobarsprite.png|50px]]
|Chrysanthemum
|1 part Sake, 1 part Melon Liquor
|35
|
|-
![[File:ClassicMartini.png|50px]]
|Classic Martini
|2 parts gin, 1 part vermouth
|25
|
|-
![[File:Nobarsprite.png|50px]]
|Clover Club
|1 part Berry Juice, 1 part Lemon Juice, 3 parts Gin
|30
|
|-
![[File:Nobarsprite.png|50px]]
|Cold front
|1 part Iced, 1 part Whiskey, 1 part Mint
|30
|Functionally the opposite of antifreeze
|-
![[File:CubaLibre.png|50px]]
|Cuba Libre
|1 part cola, 2 parts rum
|30
|
|-
![[File:Nobarsprite.png|50px]]
|Daiquiri
|3 rum, 2 limejuice, 1 sugar
|25
!
|-
![[File:Demonsbloodglass.gif|50px]]
|Demons Blood
|1 part blood, 1 part Mountain Wind, 1 part Dr.Gibb, 2 part rum
|15
|Blood can be drawn with a syringe or juiced from Blood Tomatoes.
|-
![[File:DevilsKiss.png|50px]]
|Devils Kiss
|1 part blood, 1 part kahlua, 1 part rum
|15
|Blood can be drawn with a syringe or juiced from Blood Tomatoes.
|-
![[File:ErikaSurprise.png|50px]]
|Erika Surprise
|1 part banana, 1 part ice, 1 part lime juice, 1 part ale, 1 part whiskey
|15
|Get bananas from the gardener and process them.
|-
![[File:GinTonic.png|50px]]
|Gin and Tonic
|2 parts gin, 1 part tonic
|50
|
|-
![[file:GinFizz.png|50px]]
|Gin Fizz
|2 parts gin, 1 part soda water, 1 part lime juice
|30
|
|-
![[File:Goldschlagerglass.gif|50px]]
|Goldschlager
|10 parts vodka, 1 part gold
|15
|Grind up Gold from Mining. Can be got from a party crate through Cargo.
|-
![[File:Grog.png|50px]]
|Grog
|1 part rum, 1 part water
|100
|
|-
![[File:HippiesDelight.png|50px]]
|Hippies Delight
|1 part psilocybin, 1 part gargle blaster
|15
|Gets you high. Psilocybin comes from several types of mushroom that grow in the garden.
|-
![[File:brownglass.gif|50px]]
|Hooch
|2 parts ethanol, 1 part fuel (welder fuel), 1 part sugar
|25
|Is mildly toxic. Ethanol from the chemistry dispensers; welder fuel from welder fuel tanks.
|-
![[File:IcedBeer.png|50px]]
|Iced Beer
|5 parts beer, 1 part ice OR 10 parts beer, 1 part frost oil
|50
|Lowers body temperature.
|-
![[File:Irish Car Bomb.png|50px]]
|Irish Car Bomb
|1 part ale, 1 part ''irish cream''
|15
|Irish Cream (2 Whiskey, 1 Cream)
|-
![[File:IrishCoffee.png|50px]]
|Irish Coffee
|1 parts ''irish cream'', 1 parts coffee
|15
|Irish Cream (2 Whiskey, 1 Cream)
|-
![[File:IrishCream.png|50px]]
|Irish Cream
|2 parts whiskey, 1 part cream
|25
|
|-
![[File:Nobarsprite.png|50px]]
|Jelly Shot
|4 Cherry Jelly, 1 vodka
|10
!
|-
![[File:LongIslandIcedTea.png|50px]]
|Long Island Iced Tea
|1 part ''Cuba Libre'', 1 part vodka, 1 part gin, 1 part tequila
|12
|Cuba Libre (1 Cola, 2 Rum)
|-
![[File:Manhattan.png|50px]]
|Manhattan
|2 parts whiskey, 1 part vermouth
|15
|
|-
![[File:Manhattanprojglass.gif|50px]]
|Manhattan Project
|10 parts ''Manhattan'', 1 part uranium
|10
|Gets you high. Manhattan (2 Whiskey, 1 Vermouth)
|-
![[File:Margarita.png|50px]]
|Margarita
|2 parts tequila, 1 part lime juice
|15
|
|-
![[File:Nobarsprite.png|50px]]
|Mint Julep
|2 Whiskey, 1 water, 1 mint
|25
|Lowers body temperature
|-
![[File:Nobarsprite.png|50px]]
|Morning after
|1 sbiten, 5 coffee
|60
|
|-
![[File:Nobarsprite.png|50px]]
|Mojito
|3 rum, 1 limejuice, 1 mint
|30
!
|-
![[File:Nobarsprite.png|50px]]
|Named Bullet
| 4 Slime Jelly, 1 vodka
|10
|Gives drinker 0.2u slime jelly on drink. Massive tox damage to non-promethean, heals prometheans.
|-
![[File:Nobarsprite.png|50px]]
|Negroni
|1 gin, 1 bitters, 1 vermouth
|25
!
|-
![[File:Neurotoxin.png|50px]]
|Neurotoxin
|1 part gargle blaster, 1 part soporific
|10
|Also stuns you. Soporific available from Medical.
|-
![[File:Nobarsprite.png|50px]]
|Old Fashioned
|3 whiskey, 1 bitters, 1 sugar
|15
!
|-
![[File:Nobarsprite.png|50px]]
|Paloma
|1 orange juice, 1 sodawater, 1 tequilla
|20
!
|-
![[File:GargleBlaster.gif|50px]]
|Pan-Galactic Gargle Blaster
|1 part gin, 1 part vodka, 1 part whiskey, 1 part cognac, 1 part lime juice
|10
|Gets you drunk and high.
|-
![[File:Patronglass.gif|50px]]
|Patron
|10 parts tequila, 1 part silver
|30
|Can be got from a party crate through Cargo. Grind up silver from Mining.
|-
![[File:Nobarsprite.png|50px]]
|Pisco Sour
|1 Wine Brandy, 1 lemon juice, 1 sugar
|30
!
|-
![[File:RedMead.png|50px]]
|Red Mead
|1 part blood, 1 part mead
|30
|Blood can be drawn with a syringe or juiced from Blood Tomatoes.
|-
![[File:Nobarsprite.png|50px]]
|Rotgut Fever Dream
|3 vodka, 1 rum, 1 whiskey, 1 cola
|10
|
|-
![[File:Nobarsprite.png|50px]]
|Robustin
|1 antifreeze, 1 phoron, 1 welder fuel, 1 vodka
|10
!
|-
![[File:Sbiten.png|50px]]
|Sbiten
|1 part capsaicin, 10 parts vodka.
|15
|Raises body temperature. Capsaicin is found in Chili from the garden.
|-
![[File:Screwdriver.png|50px]]
|Screwdriver
|2 parts vodka, 1 part orange juice
|15
|
|-
![[File:Nobarsprite.png|50px]]
|Screaming Viking
|1 vodka, 1 vermouth, 1 limejuice, 1 rum, 1 gin, 1 tonic
|9
!
|-
![[File:Nobarsprite.png|50px]]
|Silencer
|1 ''Nothing'', 1 cream, 1 sugar
|12
|Get ''Nothing'' from the mime costume crate
|-
![[File:singuloglass.gif|50px]]
|Singulo
|5 part vodka, 1 part radium, 5 part wine.
|10
|Get Radium from Chemistry.
|-
![[File:SnowWhite.png|50px]]
|Snow White
|1 part beer, 1 part lemon lime
|30
|
|-
![[File:Nobarsprite.png|50px]]
|Soemmer Fire
|2 parts Manhattan, 1 part Condensed Capsaicin
|25
|Raises body temperature.
|-
![[File:suidream.png|50px]]
|Sui Dream
|2 parts Space-Up, 1 parts curacao, 1 part melon liquor
|100
|Curacao and melon liquor are in the booze vending machine.
|-
![[File:SyndicateBomb.png|50px]]
|Syndicate Bomb
|1 part ''whiskey cola'', 1 part beer
|10
|Whiskey Cola (2 Whiskey, 1 Cola)
|-
![[File:TequillaSunrise.png|50px]]
|Tequila Sunrise
|2 parts tequila, 1 part orange juice
|25
|
|-
![[File:ManlyDorf.png|50px]]
|The Manly Dorf
|1 part beer, 2 parts ale
|25
|
|-
![[File:threemileislandglass.gif|50px]]
|Three Mile Island Iced Tea
|10 parts "Long Island Iced Tea", 1 part uranium
|10
|Also gets you high. Grind up Uranium from Mining. Long Island Iced Tea (2 Rum, 1 Cola, 3 Vodka, 3 gin, 3 Tequila)
|-
![[File:ToxinsSpecial.gif|50px]]
|Toxins Special
|2 parts phoron, 2 parts rum, 1 part vermouth
|10
|Raises body temperature. Grind up Phoron from Mining.
|-
![[File:Nobarsprite.png|50px]]
|Virgin Sip
|1 Driest Martini, 1 water
|60
!
|-
![[File:Nobarsprite.png|50px]]
|Vesper
|3 gin, 1 vodka, 1 wine
|20
!
|-
![[file:VodkaTonic.png|50px]]
|Vodka and Tonic
|2 parts vodka, 1 part tonic
|15
|
|-
![[File:VodkaMartini.png|50px]]
|Vodka Martini
|2 parts vodka, 1 part vermouth
|12
|
|-
![[File:Nobarsprite.png|50px]]
|Vox Delight
|3 phoron, 1 welder fuel, 1 water
|10
|Poisons Non-Vox, heals tox damage on vox.
|-
![[File:WhiskeyCola.png|50px]]
|Whiskey Cola
|2 parts whiskey, 1 part cola
|25
|
|-
![[File:WhiskeySoda.png|50px]]
|Whiskey Soda
|2 parts whiskey, 1 part soda water
|15
|
|-
![[File:Nobarsprite.png|50px]]
|Whiskey Sour
|2 whiskey, 1 lemon juice, 1 sugar
|20
!
|-
![[File:WhiteRussian.png|50px]]
|White Russian
|3 ''Black Russian'', 2 part cream
|15
|Black Russian (3 Vodka, 2 Kaluha)
|}
|}


====Poured Drinks====
==== [http://www.byond.com/members/?command=reference&path=operator Logical operators] ====
{| class="sortable" border="1" cellspacing="0" cellpadding="2" align="center"
Pretty standard:
! style="background-color:Chocolate;" |Picture
  [http://www.byond.com/members/?command=reference&path=operator%2F%21 !statement1] //NOT statement1
! style="background-color:Chocolate;" |Drink
  [http://www.byond.com/members/?command=reference&path=operator%2F%26%26 (statement1) && (statement2)] //statement1 AND statement2
! style="background-color:Chocolate;" |Strength
  [http://www.byond.com/members/?command=reference&path=operator%2F%7C%7C (statement1) || (statement2)] //statement1 OR statement2
! style="background-color:Chocolate;" |Notes
  [http://www.byond.com/members/?command=reference&path=operator%2F%3D%3D ==] //equals
|-
  [http://www.byond.com/members/?command=reference&path=operator%2F%21%3D !=] //not equal
![[File:Absinthe.png|50px]]
  [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B <] ([http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%3D <=]) //less (or equal)
|Absinthe
  [http://www.byond.com/members/?command=reference&path=operator%2F%26gt%3B >] ([http://www.byond.com/members/?command=reference&path=operator%2F%26gt%3B%3D >=]) //more (or equal)
|12
  [http://www.byond.com/members/?command=reference&path=operator%2F%26 &] //bitflag AND operator. 13 & 3 = 1 (1101 & 0011 = 0001)
|Bottles are labeled "Jailbreaker Verte". Causes alcohol effects faster than most drinks.
  [http://www.byond.com/members/?command=reference&path=operator%2F%7C |] //bitflag OR operator. 13 | 3 = 15 (1101 | 0011 = 1111)
|-
 
![[File:Aleglass.png|50px]]
Byond does not recognize the === (identical) operator. More operators can be found in the left menu on the [http://www.byond.com/members/?command=reference&path=operator reference page]
|Ale
 
|50
=== [http://www.byond.com/members/?command=reference&path=proc%2Fwhile While] ===
|Bottles are labeled "Magm-Ale".
Byond will cancel a loop if it reaches a certain number of iteration and give a runtime error out of fear of infinite loops. Same applies for recursions.
|-
Same as anywhere else
![[File:beerglass.png|50px]]
  while(condition)
|Beer
    action1()
|50
 
|Also available in the bar's back room or from the beer keg. Mix 10 corn oil and 5 universal enzyme (Catalyst).
All loops understand the [http://www.byond.com/members/?command=reference&path=proc%2Fcontinue continue] and [http://www.byond.com/members/?command=reference&path=proc%2Fbreak break] commands
|-
 
![[File:Pourdrinknosprite.png|50px]]
=== For ===
|Bitters
All loops understand the [http://www.byond.com/members/?command=reference&path=proc%2Fcontinue continue] and [http://www.byond.com/members/?command=reference&path=proc%2Fbreak break] commands
|50
 
|5 mint, 5 enzyme (catalyst) Poured
For combines the for loop and foreach loop:
|-
====  [http://www.byond.com/members/?command=reference&path=proc%2Ffor%2Floop For loop] ====
![[File:curaco.png|50px]]
  for(var/i = 1; i <= 10; i++)
|Blue Curacao
    [http://www.byond.com/members/?command=reference&path=world world] << i //Will write (each in a new line) 1 2 3 4 5 6 7 8 9 10
|15
 
|Bottles are labeled "Miss Blue Curacao". Mix 10 orange juice and 5 universal enzyme (Catalyst).
==== [http://www.byond.com/members/?command=reference&path=proc%2Ffor%2Flist For each] ====
|-
  for(var/obj/item/weapon/baton/B [http://www.byond.com/members/?command=reference&path=operator%2Fin in] world)  //will iterate through world.contents (which contains all atoms in the world) and only pick those which are of the given type (/obj/item/weapon/baton)
![[File:cognac.png|50px]]
    B.name = "Smelly baton" //Will apply the new name to the baton in the current iteration loop
|Cognac
 
|15
=== [http://www.byond.com/members/?command=reference&path=proc%2Fdo Do - While] ===
|Bottles are labeled "Chateau De Baton Premium Cognac".
 
|-
The Do while operator is not commonly used in SS13 code, Byond does support it tho.
![[File:glass_clear.png|50px]]
 
|Ethanol
  var/i = 3
|10
  do
|Comes from chemical dispenser.
    world << i--
|-
  while(i)
![[File:ginglass.png|50px]]
 
|Gin
All loops understand the [http://www.byond.com/members/?command=reference&path=proc%2Fcontinue continue] and [http://www.byond.com/members/?command=reference&path=proc%2Fbreak break] commands
|50
 
|
=== [http://www.byond.com/members/?command=reference&path=datum Defining objects] ===
|-
Doesn't matter if you want a [http://www.byond.com/members/?command=reference&path=datum datum] or [http://www.byond.com/members/?command=reference&path=atom atom], the definition of objects is the same and simple:
![[File:Kahluaglass.gif|50px]]
  /obj/item/weapon/item1 //will nmake a new object of type obj.
|Kahlua
    var/item_property = 5 //Will define a new variable type for all item1 objs
|15
    name = "Testing Item" //The name var is already defined in parent objects so it is not defined here, but only assigned a new valie.
|Bottles are labeled "Robert Robust's Coffee Liqueur". Mix 5 coffee + 5 sugar + 5 Enzyme (Catalyst).
 
|-
  /obj/item/weapon/item1/[http://www.byond.com/members/?command=reference&path=datum%2Fproc%2FNew New()] //Constructor proc
![[File:meadglass.png|50px]]
    [[#..()|..()]] //should always be present in New() procs, see [[#..()|..()]] for more information
|Mead
    item_property = 3 //An action that is performed in the object constructor.
|30
 
|Mix 1 sugar + 1 water + 5 Enzyme (Catalyst)
=== [http://www.byond.com/members/?command=reference&path=proc Procs] (Methods, functions, procedures) ===
|-
You're used to the standards of methods, functions and procedures, right? Well procs ignore some aspects of these. They can best be compared to Java methods, as they're tied to specific objects. They cannot be defined as static, private, public, etc. tho. You can write static methods, however the compiler will not restrict you from calling them in a non-static way or environment. Same applies for non-static methods.
![[File:melonliquorglass.png|50px]]
 
|Melon Liquor
  proc/proc_name(var/argument1, var/argument2)
|50
    [http://www.byond.com/members/?command=reference&path=world world] << "[argument1] [argument2]"
|Bottles are labeled "Emeraldine Melon Liquor". Mix 10 watermelon juice and 5 universal enzyme (Catalyst).
 
|-
The above would declare a global proc. If you wish to tie it to a certain level
![[File:glass_clear.png|50px]]
 
|Moonshine
==== ..() ====
|12
This is the same as super() in Java. It calls the parent object type's proc with the same name and same arguments.
| Mix 10 nutriment, 5 universal enzyme (Catalyst).
 
|-
Example:
![[File:pwineglass.png|50px]]
  /obj/item
|Poison Wine
    name = "Item"
|10
 
|Made from poison berries. Hallucinogenic and poisonous. Mix 10 poison berry  juice and 5 universal enzyme (Catalyst).
  /obj/item/New() //New() is the proc that gets called whenever a new object of this type is created. A constructor if you will.
|-
    src.name = "It's an item!"
![[File:rumglass.png|50px]]
 
|Rum
  /obj/item/stack
|15
    name = "Stack"
|Bottles are labeled "Captain Pete's Cuban Spiced Rum". Dispenser labels it "Deadrum".
 
|-
  /obj/item/stack/New()
![[File:sakeglass.png|50px]]
    src.name = "It's a stack!"
|Sake
    ..()
|25
 
|Made from rice. Mix 10 rice and 5 universal enzyme (Catalyst).
If you have the code from the example above and create a new object of type /obj/item/stack, it will first make the item in the game world with the name "Stack", because it's defined to be that by default. Then the New() proc will be called immedietally after. This will change the name to "It's a Stack!" but the call of the parent type's New() proc with the ..() command will then set it to "It's an item!". So in the end, the new object will be called "It's an item!". The ..() command is however very important in many cases as some things are defined only in the common parent's New() procs. In Del(), the proc which gets called prior to an object's deletion, it requires the code to get to the root Del() proc to even delete it. See examples of Del() in the code.
|-
 
![[File:tequilaglass.png|50px]]
== Important procs ==
|Tequila
 
|25
=== [http://www.byond.com/members/?command=reference&path=atom%2Fproc%2FNew New()] ===
|Bottles are labeled "Caccavo Guaranteed Quality Tequilla".
This proc is called whenever a new instance of the object is created. It can have arguments if needed. It should call ..() where applicable so that parent constructors can be applied.
|-
 
![[File:thirteenloko.png|50px]]
If you wish to create a New() proc for [[#Variable types|atoms]] with custom arguments, ensure the first argument is for the object's location. Example:
|Thirteen Loko
  obj/item/weapon/my_item/New(var/location, var/i)
|25
    ..()
|Comes from [[Hacking#Vending Machines|hacked soda vending machine]]. Will also make you jittery.
    //Whatever else you need to do
|-
 
![[File:vermouthglass.png|50px]]
To make a general object use
|Vermouth
  [http://www.byond.com/members/?command=reference&path=proc%2Fnew new] /datum/test_datum
|15
To make an atom (which usually has a locaiton)
|Bottles are labeled "Goldeneye Vermouth".
  [http://www.byond.com/members/?command=reference&path=proc%2Fnew new] /obj/item/weapon(src.loc)
|-
For the custom example above, the code to create a new such object would be: The 5 is just an example of a value which could be assigned to the var/i in the constructor.
![[File:vodkaglass.png|50px]]
  [http://www.byond.com/members/?command=reference&path=proc%2Fnew new] /obj/item/weapon/my_item(src.loc, 5)
|Vodka
Where src is the proc owner, which contains the line above. src.loc is the locaiton of the src object.
|15
 
|Bottles are labeled "Tunguska Triple Distilled". Mix 10 Potato Juice + 5 Enzyme (Catalyst).
=== [http://www.byond.com/members/?command=reference&path=datum%2Fproc%2FDel Del()] ===
|-
This proc gets called before an object's delection. It MUST call ..() at the end as the actual deletion is done in the root Del() proc.
![[File:whiskeyglass.png|50px]]
 
|Whiskey
An object is deleted by using the del(O) proc with O being the object to be deleted.
|25
 
|Bottles are labeled "Uncle Git's Special Reserve".
=== attack_hand(mob/M as mob) ===
|-
Whenever a user (M) clicks on the object with an empty active hand
![[File:wineglass.gif|50px]]
 
|Wine
=== attack_paw(mob/M as mob) ===
|15
Whenever a monkey (M) clicks the object with an empty active hand
|Bottles are labeled "Doublebeard Bearded Special Wine". Mix 10 grape juice and 5 universal enzyme (Catalyst).
 
|-
If a custom attack_paw(mob/user) proc is not written for an atom, it defaults to calling attack_hand(user)
![[File:Pourdrinknosprite.png|50px]]
 
|Wine Brandy
=== attack_ai(mob/user) ===
|20
Whenever an AI or cyborg clicks the object with an empty active hand
|10 wine, 10 enzyme (catalyst). Gives 5 units
 
|-
If a custom attack_ai(mob/user) proc is not written for an atom, it defaults to calling attack_hand(user)
|}
 
=== attack(mob/M as mob, mob/user as mob) ===
When the object is used to attack mob M by mob user
 
=== attackby(obj/item/W, mob/user) ===
When the object is being attacked by user with W (Example: If you click on wires with wirecutters)
 
=== ex_act(severity) ===
How the item reacts to explosions. Severity can either be 1, 2 or 3 with 1 being the most destructive.
 
=== blob_act() ===
How the item reacts to a blob (magma) attack
 
=== emp_act(severity) ===
How the item reacts to an EMP. Severity can either be 1 or 2 with 1 being the more powerful EMP surge.
 
=== [http://www.byond.com/members/?command=reference&path=datum%2Fproc%2FTopic Topic(href, href_list)] ===
This one's called when you click a link in a pop-up window. Like when you increase the output of [[SMES cells]]. The href_list variable is the important one as it's a parsed version of the arguments you add into a link. To make a link in the pop-up window, add the following line to the text you display (dat in the example):
  <nowiki>dat += </nowiki>[http://www.byond.com/members/?command=reference&path=proc%2Ftext text](<nowiki>"<A href='?src=\ref[src];select=[i]'>[src.name]</a><br>")</nowiki>
Check the code for more examples of this.
 
=== process() ===
This gets called for all objects on every tick. If possible, avoid it as it's processor heavy, but for some things it just can't be avoided.


===Non-Alcoholic Drinks===
== SS13 common variable meanings ==
{| class="sortable" border="1" cellspacing="0" cellpadding="2" align="center"
! style="background-color:Chocolate;" |Picture
! style="background-color:Chocolate;" |Cocktail
! style="background-color:Chocolate;" |How to Get It
|-
![[File:shakenosprite.png|50px]]
|Arnold Palmer
|1 iced tea, 1 lemonade
|-
![[File:bananajuice.png|50px]]
|Banana Juice
|Process a banana.
|-
![[File:shakenosprite.png|50px]]
|Banana Honk
|1 part Banana Juice, 1 part Cream, 1 part Vermouth
|-
|[[File:Berryglass.gif|50px]]
|Berry Juice
|Process berries.
|-
|[[File:shakenosprite.png|50px]]
|Berry shake
|1 milkshake, 1 berryjuice
|-
![[File:Brownstar.png|50px]]
|Brown Star
|Mix 2 parts orange juice, 1 part cola
Cold Drinks vending machine.
|-
![[File:CafeLatte.png|50px]]
|Cafe Latte
|Mix 1 part coffee, 1 part milk
|-
![[File:hot_coffee.png|50px]]
|Coffee
|Drinks dispenser; Hot Drinks vending machine.
|-
|[[File:shakenosprite.png|50px]]
|Coffee Milkshake.
|1 milkshake, 1 coffee. ((lowers body temp.))
|-
![[File:carrotjuice.png|50px]]
|Carrot Juice
|Process a carrot.
|-
|[[File:shakenosprite.png|50px]]
|Chocolate Milkshake
|1 milkshake, 1 coco
|-
![[File:glass_white.png|50px]]
|Cream
|Drinks dispenser.
|-
|[[File:shakenosprite.png|50px]]
|Dream Cream
|2 milk, 1 cream, 1 honey.
|-
![[File:Dr_gibb.png|50px]]
|Dr. Gibb
|Drinks dispenser; Cold drinks vending machine.
|-
|[[File:Nobarsprite.png|50px]]
|Ent's Draught
|1 tonic, 1 honey, 1 holy water
|-
|[[File:grapejuice.png|50px]]
|Grape Juice
|Process grapes or green grapes; Cold Drinks vending machine.
|-
![[File:grapesoda.png|50px]]
|Grape Soda
|2 parts grape juice, 1 part cola
|-
![[File:Grenadineglass.png|50px]]
|Grenadine Syrup
|10 parts berry juice, 5 parts Universal Enzyme (Catalyst)
|-
![[File:Icecoffeeglass.gif|50px]]
|Iced Coffee
|1 part ice, 3 parts coffee
|-
![[File:Hotcocoglass.png|50px]]
|Hot Chocolate
|5 parts Water, 1 part Coco Powder; Hot Drinks vending machine.
|-
![[File:iceglass.png|50px]]
|Ice
|Drinks dispenser; hacked Hot Drinks vending machine.
|-
![[File:Iceteaglass.gif|50px]]
|Iced Tea
|Mix 1 part ice, 3 parts tea; Cold Drinks vending machine.
|-
![[File:Kiraspecial.gif|50px]]
|Kira Special
|1 part orange juice, 1 part lime juice, 1 part soda water
|-
|[[File:lemonglass.gif|50px]]
|Lemon Juice
| Process a lemon.
|-
![[File:lemonlime.png|50px]]
|Lemon Lime
|Drinks dispenser.
|-
![[File:Lemonade.png|50px]]
|Lemonade
|1 part Lemon juice, 1 part sugar, 1 part Water
|-
|[[File:limejuice.png|50px]]
|Lime Juice
|Drinks dispenser; process a lime.
|-
![[File:drinknosprite.png|50px]]
|Love Potion
|1 cream, 1 berryjuice, 1 sugar
|-
![[File:glass_white.png|50px]]
|Milk
|From the biogenerator, or from a cow that has been fed Wheat.
|-
![[File:milkshake.png|50px]]
|Milkshake
|1 part cream, 2 parts ice, 2 parts milk
|-
![[File:space_mountain_wind.png|50px]]
|Mountain Wind
|Drinks Dispenser; Cold Drinks vending machine.
|-
![[File:nukacolaglass.gif|50px]]
|Nuka Cola
|1 part uranium, 6 parts space cola. Gets you high.
|-
|[[File:orangeglass.gif|50px]]
|Orange Juice
|Drinks dispenser; process an orange.
|-
![[File:poisonberryjuice.png|50px]]
|Poison Berry Juice
|Process a poison berry.
|-
|[[File:brownglass.gif|50px]]
|Potato juice
|Process a potato.
|-
![[File:Rewriter.png|50px]]
|Rewriter
|1 part Spacemoutainwind soda, 1 part Coffee
|-
![[File:glass_clear.png|50px]]
|Soda Water
|Drinks dispenser.
|-
![[File:space_cola.png|50px]]
|Space Cola
|Drinks dispenser; Cold Drinks vending machine.
|-
![[File:space_up.png|50px]]
|Space-Up
|Drinks dispenser; Cold Drinks vending machine.
|-
![[File:SoyLatte.png|50px]]
|Soy Latte
|1 part coffee, 1 part soymilk
|-
![[File:glass_white.png|50px]]
|Soy Milk
|Process a soybean.
|-
![[File:teacup.png|50px]]
|Tea
|Works as a weak anti-toxin. From drinks dispenser or hot drinks vending machine.
|-
![[File:DoctorDelight.gif|50px]]
|The Doctor's Delight
|1 part lime juice, 1 part tomato juice, 1 part orange juice, 1 part cream, 1 part tricordrazine
|-
![[File:tomatojuice.png|50px]]
|Tomato Juice
|Process a tomato; Booze vendor.
|-
![[File:glass_clear.png|50px]]
|Tonic water
|Drinks dispenser.
|-
![[File:drinknosprite.png|50px]]
|Vile Lemon
|5 Lemonade, 1 space mountain wind
|-
![[File:waterglass.png|50px]]
|Water
|Drinks dispenser, Cold Drinks vending machine, sinks, and water tanks.
|-
![[File:tomatojuice.png|50px]]
|Watermelon Juice
| Drinks dispenser; Process a watermelon slice.
|}


=Food=
=== Datum ===
I am currently maintaining this food section.
my recipe testing has turned to code diving.
Ill put down as many recipes as needed so even devs can sort some things out.


Dear regards, Luther
Datums have the smallest number of pre-defined variables. These are present in all objects in the game:
  type //The type of an object. If your object is of type /obj/item/weapon/shovel writing the following: new src.type(src.loc) will make another shovel in the same tile.
  parent_type //Parent type of /obj/item/weapon/shovel is /obj/item/weapon... seems streight-foward enough.
  tag //The tag is used to help you identify things when using several instances. It has to be set manually for each instance tho. Lazy coders and mappers resulted in not many tags being used. Instances in the map editor are sorted by tag.
  vars //List of object vars the datum has defined


==Appliances==
=== Atom ===
===Introduction===
there are a few different appliances available ingame.
The earliest of which was the microwave, so most recipes are available for that.
Later on the Grill, Deep-fryer, Oven, Candy_Machine and Cereal_Machine got added.
You can use these last appliances to cook almost anything your heart desires, aslong as you can hold it such that you can put it in.
The Grill, Deep-fryer and Oven have the most recipes, though might still need some filling out.
the Candy_Machine and Cereal_Machine don't have any. perhaps one or two? (ill figure it out)
I will for now coin the term, "Conventional" cooking to adress the recipes without appliances.
For ease, this will also be applied to the Appliances tab.


===List of Appliances===
These variables are shared by all areas, mobs, objs and turfs.
I will organise the recipes later on by including a picture of the appliance that is used to cook it.
So here is a list of appliances with their pictures included. (included conventional too)
{| class="wikitable sortable" style="width:20%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Red;" |Picture
! scope="col" class="unsortable" style="background-color:Red;" |Appliance name
|-
![[File:Microwave.png|50px]]
!Microwave
|-
![[File:Oven_Cooking.png|50px]]
!Oven
|-
![[File:Grill_Cooking.png|50px]]
!Grill
|-
![[File:Fryer_Cooking.png|50px]]
!Fryer
|-
![[File:Cereal_Cooking.png|50px]]
!Cereal_machine
|-
![[File:Candy_Cooking.png|50px]]
!Candy_machine
|-
![[File:Left_Hand.png|50px]]
!Conventional
|-
![[File:Butchers_Cleaver.png|50px]]
!Slice/Knife
|-
|}


===Custom Cooking===
  contents //List of contents. Closets store their contents in this var as do all storage items. All the items on a turf are in the turf's contents var.
Using the kitchen Appliances and some other tools that are to your disposal, you can costumize your own recipes. mixing a whole lot of different things will work, though mainly if it does not conflict with a set recipe. You can mainly Grill, Fry, Bake, Candify or Cerealize anything by using the intended machines. You can also use the Bowls in the kitchen to make custom soups.
  density //If density is at 0, you can walk over the object, if it's set to 1, you can't.
Have fun experimenting and making the recipes of your dreams as you make your crewmates either chirp in delight or tremble in fear, whenever you enter the kitchen~
  desc //Description. When you right-click and examine an object, this will show under the name.
  dir //Object direction. Sprites have a direction variable which can have 8 'legal' states. [[Understanding SS13 code#Direction (dir) var|More info]]
  gender //not used
  icon //The dmi file where the sprite is saved. Must be written in single quotations (Example: 'items.dmi')
  icon_state //The name of the sprite in the dmi file. If it's not a valid name or is left blank, the sprite without a name in the dmi file will be used. If such a sprite doesn't exist it will default to being blank.
  invisibility //Invisibility is used to determine what you can and what you can't see. Check the code or wait for someone who knows how exactly this works to write it here.
  infra_luminosity //Only mecha use this
  underlays //List of images (see image() proc) which are underlayed under the current sprite
  overlays //List of images (see image() proc) which are overlayed over the current sprite
  loc //Contains a reference to the turf file where the object currently is.
  layer //A numerical variable which determins how objects are layered. Tables with a layer of 2.8 are always under most items which have a layer of 3.0. Layers go up to 20, which is reserved for HUD items.
  luminosity //How much the item will glow. Note that the picking up and dropping of luminous items needs to be specially handled. See flashlight code for an example.
  mouse_over_pointer //not used
  mouse_drag_pointer //(almost) not used
  mouse_drop_pointer //not used
  mouse_drop_zone //not used
  mouse_opacity //Used in a few places. Check the description in the reference page
  name //The name of the object which is displayed when you right click the object and in the bottom left of the screen when you hover your mouse over it.
  opacity //Whether you can see through/past it (glass, floor) when set to 0 or whether you can't (walls, mecha) when set to 1.
  pixel_x //How many pixels in the x direction should the sprite be offset from the starting set. See the APC's New() proc for an example and how fire alarms are defined on the map. pixel_x = -5 will move it 5 pixels to the left and pixel_x = 5 will move it 5 pixels to the right
  pixel_y //Same as pixel_y but in the y direction. Positive values move it to the north, negative to the south.
  pixel_z //Used in isometric maps, so it's not used in SS13
  suffix //Rarely used. See the reference page for more information
  text //How to represent the object on text clients. Not used.
  type //The type of the object
  vars //See [[#Datum|Datum]] above
  verbs //The verbs you can use with the item. Verbs are the options in the right click menu.
  x //X position, read only. Set the loc variable to move it or use the inbulit functions.
  y //Y position, read only.
  z //Z position (Which z-level it's on), read only.


==Recipes==
=== Area ===
Note: Milk, Berry Juice, Soy Sauce, Hot Sauce, Cold Sauce, and Soy Milk are all measured off of reagent units rather then containers (like in previous version). They can be poured directly into the microwave. Additionally, you only need at LEAST the suggested amount of those ingredients instead of exactly the right amount.


===Burgers===
  var/requires_power = 1 //Areas which are to work without an APC (Such as centcom areas) should have this at 0. All other areas should have it at 1.
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  var/music = null //Music to be played when you enter the area.
! scope="col" class="unsortable" style="background-color:Red;" |Picture
  [http://www.byond.com/members/?command=reference&path=atom%2Fvar%2Fluminosity luminosity] = 0 //Areas which should be lit at all times (such as space and centcom) should have this at 1 as well as the sd_lighting var at 0
! scope="col" style="background-color:Red;" |Recipe
  var/sd_lighting = 0 //This var determines whether dynamic lighting is to be calculated for the area's tiles. Turn this to off only for areas which have the luminosity var set to 1
! scope="col" class="unsortable" style="background-color:Red;" |Appliances
! scope="col" class="unsortable" style="background-color:Red;" |Ingredients
! scope="col" class="unsortable" style="background-color:Red;" |Reagents & Notes
|-
![[File:Plain_Burger.png|50px]]
!Burger
|[[File:Left_Hand.png|50px]]
| 1 Bun + 1 Cutlet OR 1 Bun + 1 Meatball
| 8 Nutriment, 6 Animal Protein, 2 triglyceride
|-
!
!
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Meat
|
|-
![[File:Cheeseburger.png|50px]]
!Cheese Burger
|[[File:Left_Hand.png|50px]]
| 1 Burger + 1 Cheese Wedge
| 4 Nutriment, 2 Animal Protein
|-
![[File:Baconburger.png|50px]]
!Bacon Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Meat + 2 Bacon
| 8 Nutriment, 6,66 Animal Protein, 4 triglyceride
|-
![[File:Bearburger.png|50px]]
!Bear Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Bear Meat
| 4 Animal Protein
|-
![[File:Chickenburger.png|50px]]
!Chicken fillet sandwich
|[[File:Grill_Cooking.png|50px]]
| 1 bun + 1 chicken katsu
| 8 Nutriment, 8 Animal Protein
|-
![[File:Fishburger.png|50px]]
!Fillet -o- Carp Sandwich
|[[File:Grill_Cooking.png|50px]]
| 1 bun + 1 fillet
| 6 Animal Protein
|-
![[File:tofubuger.png|50px]]
!Tofu Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Tofu
| 12 Nutriment
|-
![[File:Jellyburger.png|50px]]
!Jelly Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 5 units of Cherry Jelly/Slime Jelly
| 10 Nutriment
|-
![[File:bigbite.png|50px]]
!Big Bite Burger
|[[File:Grill_Cooking.png|50px]]
| 3 Meat + Burger + Egg
| 8 Nutriment, 10 Animal Protein
|-
![[File:superbite.png|50px]]
!Super Bite Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Big Bite Burger + 1 Dough + 1 Meat + 1 Tomato + 1 Boiled Egg + 1 Cheese Wedge + 5 units of Salt + 5 units of Pepper
| 50 Nutriment, 25 Animal Protein
|-
![[File:Mouseburger.png|50px]]
!Mouse Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Mouse
| 4 Animal Protein
|-
![[File:Plumpburger.png|50px]]
!Plump Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Cheese Wedge + 1 Plumphelmet
| 10 Nutriment, 5 Animal Protein
|-
![[File:Xenoburger.png|50px]]
!Xenoburger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Xeno Meat
| 8 Animal Protein
|-
![[File:Clownburger.png|50px]]
!Clown Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Clown wig and mask
|
|-
![[File:Mimeburger.png|50px]]
!Mime Burger
|[[File:Grill_Cooking.png|50px]]
| 1 Bun + 1 Beret
|
|-
![[File:spell_burger.png|50px]]
!Spell Burger
|
| 1 Bun + 1 Wizard hat
|
|-
![[File:Ghost_burger.PNG|50px]]
!Ghost Burger
|
| 1 Bun + 1 Ectoplasm
|
|-
![[File:Roburger.png|50px]]
!Roburger
|
| 1 Bun + 1 Robot Head
|
|-
![[File:Brainburger.png|50px]]
!Brain Burger
|
| 1 Bun + 1 Brain
|
|}


===Breads & Sandwiches & Toast===
Most other variables exist only for technical reasons and should not be messed with unless done through existing procs, they are defined in:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/area/Space%20Station%2013%20areas.dm code/defines/area/Space Station 13 areas.dm]
! scope="col" class="unsortable" style="background-color:Orange;" |Picture
! scope="col" style="background-color:Orange;" |Recipe
! scope="col" class="unsortable" style="background-color:Orange;" |Appliances
! scope="col" class="unsortable" style="background-color:Orange;" |Ingredients
! scope="col" class="unsortable" style="background-color:Orange;" |Reagents & Notes
|-
![[File:Flatbread.png|50px]]
!Flatbread
| [[File:Flatbread.png|50px]]
| 1 Flatdough
|
|-
![[File:Burger_Bun.png|50px]]
!Bun
| [[File:Oven_Cooking.png|50px]][[File:Microwave.png|50px]]
| 1 Dough
|
|-
![[File:bread.png|50px]]
!Bread
| [[File:Oven_Cooking.png|50px]]
| 4 Dough + 1 unit of Salt + 5 units of Yeast
|
|-
![[File:Bread_Slice.png|50px]]
!Bread Slice
| [[File:Butchers_Cleaver.png|50px]]
| 1 Bread
|
|-
![[File:Cheesy_Toast.png|50px]]
!Cheesy Toast
| [[File:Grill_Cooking.png|50px]]
| 1 Butter + 1 Bread Slice + 1 Cheese Wedge + 1 unit of Wurmwoad
|
|-
![[File:Grilled_Cheese_Sandwich.png|50px]]
!Grilled Cheese Sandwich
| [[File:Grill_Cooking.png|50px]]
| 2 Bread Slice + 1 Cheese Wedge
|
|-
![[File:Honeyed_Toast.png|50px]]
!Honeyed Toast
| [[File:Grill_Cooking.png|50px]]
| 1 Bread Slice + 5 units of honey
|
|-
![[File:meatbread.png|50px]]
!Meatbread
| [[File:Oven_Cooking.png|50px]]
| 3 Meat or SynthMeat + 3 Dough + 3 Cheese Wedges
|
|-
![[File:tofubread.png|50px]]
!Tofu-Bread
| [[File:Oven_Cooking.png|50px]]
| 3 Tofu + 3 Cheese Wedges + 3 Dough
|
|-
![[File:xbread.png|50px]]
!Xeno-bread
| [[File:Oven_Cooking.png|50px]]
| 3 Xeno-meat, 3 Dough, 3 Cheese Wedges
|
|-
![[File:Spidermeatloaf.png|50px]]
!Spider Meatloaf
| [[File:Oven_Cooking.png|50px]]
| 3 Spider Meat, 3 Dough, 3 Cheese Wedges
|
|-
![[File:Bananabread.png|50px]]
!Banana-nut Bread
| [[File:Oven_Cooking.png|50px]]
| 3 Dough, 5 units Milk, 15 units Sugar, 1 Banana
|
|-
![[File:creambread.png|50px]]
!Cream Cheese Bread
| [[File:Oven_Cooking.png|50px]]
| 2 Dough, 2 Cheese Wedges.  
|
|-
![[File:baguette.png|50px]]
!Baguette
| [[File:Oven_Cooking.png|50px]]
| 2 Dough, 1 unit Salt, 1 unit Pepper
|
|-
![[File:sandwich.png|50px]]
!Sandwich
| [[File:Oven_Cooking.png|50px]]
| 2 Bread Slices, 1 Meat Steak, 1 Cheese Wedge
|
|-
![[File:Grilled_Cheese_Sandwich.png|50px]]
!Toasted Sandwich
| [[File:Oven_Cooking.png|50px]]
| Microwave 1 Sandwich <span style="color:#F2F2F2"> What was that, Sandwich? </span>
|
|-
![[File:toastsand.png|50px]]
!Grilled Cheese Sandwich
| [[File:Oven_Cooking.png|50px]]
| Microwave 2 Bread Slices, 1 Cheese Wedge
|
|-
![[File:Jellytoast.png|50px]]
!Jelly Toast
| [[File:Oven_Cooking.png|50px]]
| 1 Bread Slice, 5 units of Cherry Jelly/Slime Jelly
|
|-
![[File:Twobread.png|50px]]
!Two Bread
| [[File:Oven_Cooking.png|50px]]
| 2 Bread Slices, 5 units of Wine
|
|-
![[File:Jellysandwich.png|50px]]
!Jelly Sandwich
| [[File:Oven_Cooking.png|50px]]
| 2 Bread slices, 5 units of Cherry Jelly/Slime Jelly
|-
![[File:Bunbun.png|50px]]
!Bun Bun
| [[File:Oven_Cooking.png|50px]]
| 2 Buns
|
|-
![[File:Croissant.png|50px]]
!Croissant
| [[File:Oven_Cooking.png|50px]]
| 1 Dough, 1 unit of Salt, 5 units of Water, 5 units of Milk
|-
![[File:Benedict.png|50px]]
!Benedict
| [[File:Oven_Cooking.png|50px]]
| 1 Cutlet, 1 Fried Egg, 1 Bread Slice
| A traitorous breakfast.
|}


===Pizzas===
=== Mob ===
might be oven only, microwave recipes don't work
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Orange;" |Picture
! scope="col" style="background-color:Orange;" |Recipe
! scope="col" class="unsortable" style="background-color:Orange;" |Ingredients
! scope="col" class="unsortable" style="background-color:Orange;" |Notes
|-
![[File:Margheritapizza.png|50px]]
!Margherita Pizza
| 1 Flat Dough, 4 Cheese Wedges, 1 Tomato
| Sliceable.
|-
![[File:mushroompizza.png|50px]]
!Mushroom Pizza
| 1 Flat Dough, 5 Chantrelle Mushrooms, 1 Cheese wedge, 1 Tomato
| Sliceable.
|-
![[File:meatpizza.png|50px]]
!Meat Pizza
| 1 Flat Dough, 3 Meat, 1 Cheese Wedge, 1 Tomato
| Sliceable. Extremely nutritious, despite the grease.
|-
![[File:vegepizza.png|50px]]
!Vegetable Pizza
| 1 Flat Dough, 1 Cheese Wedge, 1 Eggplant, 1 Carrot, 1 Corn, 1 Tomato
| Sliceable.
|}


===Pastas===
There is a huge amount of variables for mobs. Take a look at the following files:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/mob.dm code/defines/mob/mob.dm]
! scope="col" class="unsortable" style="background-color:Yellow;" |Picture
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/dead/observer.dm code/defines/mob/dead/observer.dm]
! scope="col" style="background-color:Yellow;" |Recipe
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/living.dm code/defines/mob/living/living.dm]
! scope="col" class="unsortable" style="background-color:Yellow;" |Ingredients
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/carbon/carbon.dm code/defines/mob/living/carbon/carbon.dm]
! scope="col" class="unsortable" style="background-color:Yellow;" |Notes
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/carbon/human.dm code/defines/mob/living/carbon/human.dm]
! scope="col" class="unsortable" style="background-color:Yellow;" |RW
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/carbon/monkey.dm code/defines/mob/living/carbon/monkey.dm]
|-
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/silicon/silicon.dm code/defines/mob/living/silicon/silicon.dm]
![[File:Lasagna.png|50px]]
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/silicon/ai.dm code/defines/mob/living/silicon/ai.dm]
!{{anchor|Lasagna}}Lasagna
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/mob/living/silicon/robot.dm code/defines/mob/living/silicon/robot.dm]
| 2 Tomatoes, 1 Eggplant, 2 Cutlet, 2 Flat Dough
There are also additional files for aliens, larva, facehuggers and more there, but the files above will have most of the variables you might need.
|Fresh from Space Olive Garden
| X
|-
![[File:spagettiboiled.png|50px]]
!Boiled Spaghetti
| 5 units of Water, 1 Spaghetti.
| Mama Mia!
| V
|-
![[File:pastatomato.png|50px]]
!Tomato Pasta
| 5 units of Water, 1 Spaghetti, 2 Tomatoes.  
| Don't put it in your pockets. That's just unsanitary.
| V
|-
![[File:meatballspag.png|50px]]
!Spaghetti & Meatballs
| 5 units of Water, 1 Spaghetti, 2 Meatballs.
| That's-a a spicy meat-aball!
| V
|-
![[File:Spesslaw.png|50px]]
!Spesslaw
| 5 units of Water, 1 Spaghetti, 4 Meatballs.
| Lawyer's choice!
| V
|-
![[File:eggplantparmigiana.png|50px]]
!Eggplant Parmigiana
| 2 Cheese Wedges, 1 Eggplant
| Clogs your arteries, healthily!
| V
|-
![[File:Kitsuneudon.png|50px]]
!Kitsune Udon
| 3 units of Egg Yolk, 1 Spaghetti, 1 Tofu
| Clogs your arteries, healthily!
| V
|}


===Soups & Stews===
=== Obj ===
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Khaki;" |Picture
! scope="col" style="background-color:Khaki;" |Recipe
! scope="col" class="unsortable" style="background-color:Khaki;" |Ingredients
! scope="col" class="unsortable" style="background-color:Khaki;" |Notes
! scope="col" class="unsortable" style="background-color:Khaki;" |RW
|-
![[File:meatsoup.png|50px]]
!Meatball Soup
| 10 units of Water, 1 Meatball, 1 Carrot, 1 Potato
| Out of spaghetti? Don't like stew? Here's the thing for you.
|V
|-
![[File:nettlesoup.png|50px]]
!Nettle Soup
| 10 units of Water, 1 Nettle, 1 Egg, 1 Potato
| Contains trace amounts of sulpheric acid.
|-
![[File:vegesoup.png|50px]]
!Vegetable Soup
| 10 units of Water, 1 Carrot, 1 Corn, 1 Eggplant, 1 Potato
| Force feed the Botanists this.
| V
|-
![[File:tomatosoup.png|50px]]
!Tomato Soup
| 10 units of water, 2 tomatoes
| What, no crackers?
| V
|-
![[File:Bloodsoup.png|50px]]
!Blood Soup
| 30 units of Blood
| They ''may'' think you're the [[Chef|homicidal maniac]] you are when you produce a large amount of these.
|-
![[File:Metriodsoup.png|50px]]
!Slime Soup
| 10 units of water, 5 units of slime jelly.
| Mmm, mmm, oh God my guts.
|-
![[File:Mysterysoup.png|50px]]
!Mystery Soup
| 10 units of Water, 1 Burned Mess, 1 Tofu, 1 Egg, 1 Cheese Wedge.
| This dish contains all the essential nutriment for a growing crew, and almost anything else you can feed them.
|-
![[File:Mushroomsoup.png|50px]]
!Chantrelle Soup
| 5 units of Water, 5 units of Milk, 1 Chanterelle.
| The debate on whether you can use Aminitas for the soup goes on.
| V
|-
![[File:Beetsoup.png|50px]]
!Borscht
| 10 units of Water, 1 White Beet, 1 Cabbage.
| Feed your inner Russian with borscht.
|-
![[File:milo.png|50px]]
!Milo Soup
| 10 units of Water, 2 Tofu, 2 Soy Dope.
| Made when the [[Botanist|hippies]] decide to only grow soy crops.
|-
![[File:Stewedsoymeat.png|50px]]
!Stewed Soy Meat
| 2 Soy Dope, 1 Carrot, 1 Tomato
| Like a steak dinner, only with less murder.
|-
![[File:stew.png|50px]]
!Stew
| 10 units of water, 1 meat, 1 tomato, 1 potato, 1 carrot, 1 eggplant, 1 Chantrelle mushroom.
| The perfect thing for when the bar starts to get cold.
| V
|-
![[File:coldstew.png|50px]]
!Cold Chili Stew
| 1 Meat, 1 Ice Pepper, 1 Tomato
| Ice, ice, baby!
|-
![[File:hotstew.png|50px]]
!Hot Chili Stew
| 1 Meat, 1 Chili Pepper, 1 Tomato
|  Some like it hot, hot, HOT!
| V
|-
![[File:Wishsoup.png|50px]]
!Wish Soup
| 20 Water
| Make you wish the chef could cook.
| V
|-
![[File:Goulash.png|50px]]
!Goulash
| 1 Tomato, 1 Cutlet, 1 Spaghetti
|  Everyone's favorite set of leftovers.
| V
|-
![[File:Hotsoursoup.png|50px]]
!Hot and Sour Soup
| 1 Cabbage, 1 Mushroom, 2 units of Salt, 2 units of pepper, 10 units of Water, 1 Tofu
| It's Hot! It's Sour! It's a Soup!
|-
![[File:Onionsoup.png|50px]]
!Onion Soup
| 1 Onion, 10 units of Water
| Don't cry!
| V
|}


===Seafood===
  var/m_amt = 0 // How much metal the item has. Used to determine how much metal you get when feeding it into an autolathe and how much it costs to produce it at the lathe
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  var/g_amt = 0 // How much glass the item has. Used to determine how much glass you get when feeding it into an autolathe and how much it costs to produce it at the lathe
! scope="col" class="unsortable" style="background-color:Yellowgreen;" |Picture
  var/w_amt = 0 // waster amounts. Not used
! scope="col" style="background-color:Yellowgreen;" |Recipe
  var/origin_tech = null //Used by R&D to determine what research bonuses it grants. See examples in item definitions in code.
! scope="col" class="unsortable" style="background-color:Yellowgreen;" |Ingredients
  var/reliability = 100 //Used by SOME devices to determine how reliable they are. The number represents the percentual chance for them to work properly.
! scope="col" class="unsortable" style="background-color:Yellowgreen;" |Notes
  var/unacidable = 0 //universal "unacidabliness" var, objects with this set to 1 cannot be destroyed by acids.
|-
  var/throwforce = 0 //The amount of damage applies to a target when they're hit by the item.
![[File:carpsandwich.png|50px]]
!Fillet -o- Carp Sandwich
| 1 Bun, 1 Carp Fillet
| Slightly toxic.
|-
![[File:cubancarp.png|50px]]
!Cuban Carp
| 1 Carp Fillet, 1 Dough, 1 Chilli Pepper
| Slightly toxic, and very spicy.
|-
![[File:fishandchips.png|50px]]
!Fish & Chips
| 1 Space Fries, 1 Carp Meat
| The Brit's favorite. Good luck getting [[space carp]] meat. (Note: POISONOUS)
|-
![[File:Fishfingers.png|50px]]
!Fish Fingers
| 10 units Flour, 1 Egg, 1 Carp Meat
| Good luck getting [[space carp]] meat. (Note: POISONOUS)
|-
![[File:Sashimi.png|50px]]
!Sashimi
| 1 Carp Meat, 5 units of Soy Sauce
| Made with actual fish!
|}


===Meat===
More variables are defined in:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj.dm code/defines/obj.dm]
! scope="col" class="unsortable" style="background-color:Green;" |Picture
! scope="col" style="background-color:Green;" |Recipe
! scope="col" class="unsortable" style="background-color:Green;" |Ingredients
! scope="col" class="unsortable" style="background-color:Green;" |Notes
|-
![[File:meatstake.png|50px]]
!{{anchor|Meat Steak}}Meat Steak
| 1 unit of Salt, 1 unit of Black Pepper, 1 Meat (Any Type)
| Wait, how can it have grill marks if it's in the microwave...?
|-
![[File:Sausage.png|50px]]
!Sausage
| 1 Cutlet, 1 Meatball
| Who even knows what or who it's made from anymore.
|-
![[File:Roastbeef.png|50px]]
!Roast Beef
| 2 Carrots, 2 Potatoes, 1 Meat
| Just like Grandma used to make.
|-
![[File:Generalschicken.png|50px]]
!General's Chicken
| 2 units of Capsaicin, 2 units of Sugar, 10 units of Flour, 2 Meat
| Mm! Just like they make it in Space China.
|-
![[File:Meatbun.png|50px]]
!Meat Bun
| 1 Meatball, 1 Flat Dough
| The traditional hot pocket
|}


===Salads===
==== Item ====
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Palegreen;" |Picture
! scope="col" style="background-color:Palegreen;" |Recipe
! scope="col" class="unsortable" style="background-color:Palegreen;" |Ingredients
! scope="col" class="unsortable" style="background-color:Palegreen;" |Notes
|-
![[File:Herbsalad.png|50px]]
!Tossed Salad
| 2 Cabbages + 1 Carrot + 1 Tomato + 1 Apple
| What if, like, WE'RE the aliens, man?
|-
![[File:Aesirsalad.png|50px]]
!Aesir salad
| 3 Ambrosia Deus + 1 Goldapple
| Duuuuuuuuuude.
|-
![[File:Validsalad.png|50px]]
!Valid Salad
| 3 Ambrosia Vulgaris + 1 Potato
| Heals everyone! <font color="white">Not really</font>
|-
![[File:Fruitsalad.png|50px]]
!Fruit Salad
| 1 Orange, 1 Apple, 1 Grapes, 1 Watermelon
| Very fruity, but where does the salad part come in?
|}


===Pies===
Items are objs which can be picked up. They're divided into several categories according to their function.
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Aquamarine;" |Picture
! scope="col" style="background-color:Aquamarine;" |Recipe
! scope="col" class="unsortable" style="background-color:Aquamarine;" |Ingredients
! scope="col" class="unsortable" style="background-color:Aquamarine;" |Notes
|-
![[File:pie.gif|50px]]
!Banana Cream Pie
| 1 Flat Dough, 1 Banana, 5 units Sugar
| Contains a moderate amount of banana essence.
|-
![[File:berryclafoutis.png|50px]]
!Berry Clafoutis
| 1 Flat Dough, 1 Berry
| It's like asking the deep-friers at a carnival for something healthy!
|-
![[File:meatpies.png|50px]]
!Meatpies
| 1 Meat, 1 Flat Dough
| Made of people, or not?
|-
![[File:meatpies.png|50px]]
!Tofu Pie
| 1 Tofu, 1 Flat Dough
| Made of plants, or not?
|-
![[File:xpie.png|50px]]
!Xeno-pie
| 1 Xeno-meat, 1 Flat Dough
| A delicious end to the xeno threat.
|-
![[File:applepie.png|50px]]
!Apple Pie
| 1 Flat Dough, 1 Apple
| The traditional dessert.
|-
![[File:Cherrypie.png|50px]]
!Cherry Pie
| 1 Flat Dough, 1 Cherry, 10 units Sugar
| "To bake a pie, we must first invent the universe." -Carl Sagan
|-
![[File:Amapie.png|50px]]
!Amanita Pie
| 1 Flat Dough, 5 units Amatoxin
| Only slightly toxic, really!
|-
![[File:Pumpkinpie.png|50px]]
!Pumpkin Pie
| 1 Pumpkin, 10 units Flour, 3 units Egg, 5 units of Milk, 5 units of Sugar
|Can be sliced. Dangerously delicious.
|-
![[File:Plumppie.GIF|50px]]
!Plump Pie
| 1 Flat Dough, 1 Plump Helmet
| Has a chance to be "exceptional" - it'll contain Tricordrazine!
|-
![[File:Gappletart.png|50px]]
!Golden Apple Streusel Tart
| 10 units Flour, 1 Egg, 1 Golden Apple, 5 units of Milk, 5 units of Sugar.  
| Tastes like chaos!
|}


===Cakes===
/obj/item is defined in the following file:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj.dm code/defines/obj.dm]
! scope="col" class="unsortable" style="background-color:Lightblue;" |Picture
! scope="col" style="background-color:Lightblue;" |Recipe
! scope="col" class="unsortable" style="background-color:Lightblue;" |Ingredients
! scope="col" class="unsortable" style="background-color:Lightblue;" |Notes
|-
![[File:regularcake.png|50px]]
!Vanilla Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk
| Slicable and <s>boring</s> vanilla flavored.
|-
![[File:carrotcake.png|50px]]
!Carrot Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk, 3 Carrots
| Slicable. Heals minor eye damage.
|-
![[File:cheesecake.png|50px]]
!Cheese Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk, 2 Cheese Wedges
| Slicable. <font color="white">Does not come with scantily dressed ladies.</font>
|-
![[File:birthday.png|50px]]
!Birthday Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk, 1 Cake Hat
| Sliceable. Don't forget to make a wish.
|-
![[File:applecake.png|50px]]
!Apple Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk, 2 Apples
| Sliceable.
|-
![[File:Braincake.png|50px]]
!Brain Cake
| 5 units Milk, 15 units Flour, 15 units Sugar, 9 units Egg Yolk, 1 Brain
| Sliceable. Bother the [[Roboticist]] for unusable brains.
|-
![[File:Orangecake.png|50px]]
!Orange Cake
| 5 units Milk, 15 units Flour, 5 units Sugar, 9 units Egg Yolk, 1 Orange
| Sliceable.
|-
![[File:Limecake.png|50px]]
!Lime Cake
| 5 units Milk, 15 units Flour, 5 units Sugar, 9 units Egg Yolk, 1 Lime
| Sliceable.
|-
![[File:Lemoncake.png|50px]]
!Lemon Cake
| 5 units Milk, 15 units Flour, 5 units Sugar, 9 units Egg Yolk, 1 Lemon
| Sliceable.
|-
![[File:Choccake.png|50px]]
!Chocolate Cake
| 5 units Milk, 15 units Flour, 5 units Sugar, 9 units Egg Yolk, 1 Chocolate Bar
| Sliceable.
|}


===Side Dishes===
It adds the following variables (Look at the file for more, but these are the more important ones):
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  var/force = null //This determins how much damage the target takes when they're attacked by the item in hand. Small items usually have it at 0, medium ones between 5 and 10, rare and powerful items around 10-15 and two-handed items at 15 and more. Syndicate items have it even higher at 40 and more.
! scope="col" class="unsortable" style="background-color:Blue;" |Picture
  var/item_state = null //This it the var that determines which sprite will be used for the item from icons/mob/items_lefthand.dmi and items_righthand.dmi.
! scope="col" style="background-color:Blue;" |Recipe
  var/damtype = "brute" //Determines what damage type the item produces.
! scope="col" class="unsortable" style="background-color:Blue;" |Ingredients
  var/health = null //Some items use this to determine when they'll break from use or damage. Not common tho.
! scope="col" class="unsortable" style="background-color:Blue;" |Notes
  var/hitsound = null //Sound that's played when you hit something with the item. Not commonly used.
|-
  var/w_class = 3.0 //Weight class.
![[File:cheesefries.png|50px]]
    // w_class = 1 means it's an item that can fit in a pocket (diskette, pen, cigarette packet)
!Cheese Fries
    // w_class = 2 means the item can't fit in pockets but can fit in a box (clipboard, analyzer, cleaner)
| 1 Space Fries, 1 Cheese Wedge
    // w_class = 3 means the item can't fit in a box but can fit in backpacks (box, rods, metal)
| Tasty, tasty cheese fries.
    // w_class = 4 means the item can't even fit in a backpack (packpack, pickaxe, fireaxe)
|-
    // w_class = 5 is used but not for weight classes.
![[File:cheesepmelet.png|50px]]
  var/wielded = 0 //Used for double-handed items which can be carried in one hand but needs to be wielded by two hands before they can be used. This is determined by code when wielding and unwielding. All items should start with this at 0.
!Cheese Omelette
  var/twohanded = 0 ///Set this to 1 if your item is two-handed.
| 2 Eggs, 2 Cheese Wedges
  flags = FPRINT | TABLEPASS //Flags
| Can eat these with a fork. Have a medical team on standby in case of utensil-related injuries.
|-
![[File:friedegg.png|50px]]
!Fried Egg
| 1 Egg + 1 unit Salt + 1 unit Pepper
| The ancient and sacred meal of the solar wiring engineer.
|-
![[File:begg.png|50px]]
!Boiled Egg
| 1 Egg + 5 units Water
| Precracked, just eat!
|-
![[File:bakedpotato.png|50px]]
!Loaded Baked Potato
| 1 Potato + 1 Cheese Wedge
| No bacon bits?
|-
![[File:popcorn.png|40px]]
!Popcorn
| 1 Corn
| Some bites will contain unpopped kernels, which will cause brute damage.
|-
![[File:donkpocket.png|50px]]
!Warm Donk Pocket
| 1 Dough, 1 Meatball
| Contains tricordrazine, until they cool. Reheatable once they do.
|-
![[File:Hotdog.png|50px]]
!Hot Dog
| 1 Sausage, 1 Bun
| Fresh footlong ready to go down on.
|-
![[File:Wingbasket.png|50px]]
!Chicken Wings
| 5 units of Capsaicin, 10 units of Flour, 4 Meat
| Now all you need is Pizza and Beer. Complete the trifecta!
|-
![[File:Chocegg.png|75px]]
!Chocolate Lizard Egg
| 1 Lizard Egg, 1 Chocolate Bar
| Ask your resident, egg-laying Lizard.
|-
![[File:Friedegg.png|75px]]
!Fried Lizard Egg
| 1 Lizard Egg, 1 unit of Salt, 1 unit of Pepper
| Ask your resident, egg-laying Lizard.
|-
![[File:Begg.png|75px]]
!Boiled Lizard Egg
| 1 Lizard Egg, 5 units of Water
| Ask your resident, egg-laying Lizard.
|-
![[File:Mashedpotato.png|50px]]
!Mashed Potato
| 1 Potato
| Goes well with Gravy!
|-
![[File:Bangersandmash.png|50px]]
!Bangers And Mash
| 1 Mashed Potato, 1 Sausage
| Still goes well with Gravy!
|-
![[File:Cheesymash.png|50px]]
!Cheesy Mash
| 1 Mashed Potato, 1 Cheese Wedge
| You don't even need gravy!
|-
![[File:Blackpudding.png|50px]]
!Black Pudding
| 5 units of Blood, 1 Sausage
| Made from real blood!
|-
![[File:Onionrings.png|50px]]
!Onion Rings
| 1 Onion, 5 units of Flour
| A good substitute for Fries.
|-
![[File:Bakedbeans.png|50px]]
!Baked Beans
| 2 Soybeans, 5 units of Ketchup
| The musical fruit!
|-
![[File:Eggroll.png|50px]]
!Eggroll
| 1 Fried Egg, 10 units of Soy Sauce
| Mm, Space China.
|-
![[File:Eggbowl.png|50px]]
!Egg Bowl
| 5 units of Water, 10 units of Rice, 3 units of Egg Yolk
| A simple, soupy breakfast!
|-
![[File:Porkbowl.png|50px]]
!Pork Bowl
| 5 units of Water, 10 units of Rice, 1 Cutlet
| When you need a bit more protein.
|}


===Pastries===
==== Machinery ====
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
! scope="col" class="unsortable" style="background-color:Dodgerblue;" |Picture
! scope="col" style="background-color:Dodgerblue;" |Recipe
! scope="col" class="unsortable" style="background-color:Dodgerblue;" |Ingredients
! scope="col" class="unsortable" style="background-color:Dodgerblue;" |Notes
|-
![[File:donuts.png|50px]]
!Donut
| 1 Dough, 5 units Sugar
| Security members recover morale quickly with these.
|-
![[File:jdonut1.gif|50px]]
!Jelly Donut
| 1 Dough, 5 units Sugar, 5 units of Berry Juice/Cherry Jelly/Slime Jelly
| Security members recover more morale with these.
|-
![[File:donuts.png|50px]]
!Chaos Donuts
| 1 Dough, 5 units Sugar, 5 units Hot Sauce, 5 units Cold Sauce
| Produces a variety of (possibly dangerous) effects when eaten. ''Equal chance of containing 3 units of one of the following: Nutriment, capsaicin, frost oil, sprinkles, phoron, coco, Slime Jelly, banana, berry juice, and tricordrazine.''
|-
![[File:soylenvirdians.png|50px]]
!Soylen Viridians
| 10 units Flour, 1 Soybean
| SOYLENT VIRIDIAN IS PLANTS!
|-
![[File:waffles.png|50px]]
!Waffles
| 2 Dough, 10 units Sugar
| Like pancakes with syrup traps.
|-
![[File:roffle.png|50px]]
!Roffle Waffles
| 2 Dough, 10 units of Sugar, 5 units of Psilocybin.
| Like pancakes with hallucinogen traps.
|-
![[File:chawanmushi.png|50px]]
!Chawanmushi
| 5 units of Water, 5 units of Soy Sauce, 2 Eggs, 1 Chanterelle.
| Nǐ xiǎng yào chī shénme?
|-
![[File:fortunecookie.png|50px]]
!Fortune Cookie
| 1 Dough Slice, 5 units of Sugar, 1 Piece of Paper (with something written on it)
| Bad luck and misfortune will infest your pathetic soul for all eternity.
|-
![[File:Sugarcookie.png|50px]]
!Sugar Cookie
| 5 [[Flour]] + 1 Egg + 5 units of Sugar
| Just like your little sister used to make.
|-
![[File:Muffin.png|50px]]
!Muffin
| 1 Dough, 5 units Milk, 5 units Sugar
| Muffin!
|-
![[File:Berrymuffin.png|50px]]
!Berry Muffin
| 1 Dough, 5 units of Milk, 5 units of Sugar, 1 Berry
| Muffin, but with Berries!
|-
![[File:Ghostmuffin.png|50px]]
!Ghost Muffin
| 1 Dough, 5 units of Milk, 5 units of Sugar, 1 Berry, 1 Ectoplasm
| Spooky!
|-
![[File:cracker.png|50px]]
!Cracker
| 1 Dough Slice, 1 unit Salt
| Poly yells, "POLY WANNA CRACKER!"
|-
![[File:Poppypretzel.png|50px]]
!Poppy Pretzel
| 1 Dough, 1 Poppy
| Heals brute damage with opium!
|-
![[File:Phelmbiscuit.png|50px]]
!Plump Helmet Biscuits
| 1 Plump Helmet, 5 units of Water, 5 units of Flour
| The perfect chaser for a Manly Dorf.
|}


===Sweets===
Defined in:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj/machinery.dm code/defines/obj/machinery.dm]
! scope="col" class="unsortable" style="background-color:Cyan;" |Picture
! scope="col" style="background-color:Cyan;" |Recipe
! scope="col" class="unsortable" style="background-color:Cyan;" |Ingredients
! scope="col" class="unsortable" style="background-color:Cyan;" |Notes
|-
![[File:Chocegg.png|50px]]
!Chocolate Egg
|  1 Egg, 1 Chocolate bar
| NT regulations forbid stuffing toys in these things anymore.
|-
![[File:candiedapple.png|50px]]
!Candied Apple
| 5 units of Water, 5 units of Sugar, 1 Apple
| Happy <strike>Halloween</strike> generic shift!
|-
![[File:Reishiscup.png|50px]]
!Reishi Cup
| 3u of Psilocybin, 3u of Sugar, 1 Chocolate Bar
| A popular candy treat that makes you see COLORS.
|-
![[File:mmmi.png|50px]]
!Mämmi
| 1 Orange, 10 units of Water, 10 units of Flour, 5 units of Milk, 1 unit of Salt
| Traditional Easter Desert, in some places!
|-
![[File:Ricepudding.png|50px]]
!Rice Pudding
| 5 units of Milk, 10 units of Rice
|}


===Other===
Machinery are objs which cannot be picked up and generally require power to operate. They have the following vars defined for all of them:
{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
  var/use_power = 0 //Determines if and how much power the machine will use each tick.
! scope="col" class="unsortable" style="background-color:Violet;" |Picture
    //use_power = 0 - no power is used
! scope="col" style="background-color:Violet;" |Recipe
    //use_power = 1 - idle power is used
! scope="col" class="unsortable" style="background-color:Violet;" |Ingredients
    //use_power = 2 - active power is used
! scope="col" class="unsortable" style="background-color:Violet;" |Notes
  var/idle_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 1
|-
  var/active_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 2
![[File:monkeydel.png|50px]]
  var/power_channel = EQUIP //Determines which APC power category the device falls under. EQUIP, ENVIRON or LIGHT
!Monkey's Delight
  var/list/component_parts = null //A list of parts needed to construct the machine from a machine frame.
| 1 Monkey Cube, 10 units Flour, 1 Banana, 1 unit Salt, 1 unit Pepper
| EE EEE!
|-
![[File:wingchu.png|50px]]
!Wing Fang Chu
| 5 units of Soy Sauce, 1 Xeno-Meat
| At least it wasn't the [[Ian|Head of Personnel's dog]].
|-
![[File:enchi.png|50px]]
!Enchiladas
| 1 Cutlet, 2 Chili, 1 Corn
| Spicy.
|-
![[File:taco.png|50px]]
!Taco
| Dough slice, cutlet, cheese wedge
| Take a bite!
|-
![[File:Kebab.png|50px]]
!Kebab
| 2 Meat, 1 Metal Rod
| You get a metal rod back after eating. May break microwave.
|-
![[File:Kebab.png|50px]]
!Tofu-Kabob
| 2 Tofu, 1 Metal Rod
| You get a metal rod back after eating. May break microwave.
|-
![[File:Mint.png|50px]]
!Mint
| 5 units of sugar, 5 units of frost oil.
| It is only wafer thin.
|-
![[File:Boiledcore.png|50px]]
!Boiled Slime Core
| 5 units of water, 1 slime core
| Magically delicious~ Also poisonous.
|-
![[File:AmanitaJelly.gif|50px]]
!Amanita Jelly
| 5 units of Water, 5 units of Vodka, 5 Amatoxin
| It's evil, don't touch it!
|-
![[File:duff.gif|50px]]
!Space Liberty Duff
| 5 units of Water, 5 units of Vodka, 5 units of Psilocybin
| The colors, maaaan, THE COLORS.
|-
![[File:sushi.png|50px]]
!Sushi Roll
| 1 Cabbage, 20u of Rice, and 3 [[#Meat|Meat]]
| Sliceable. Appease your inner weaboo.
|-
![[File:Donerkebab.png|50px]]
!Donerkebab
| 1 Tomato, 1 Cabbage, 1u of Salt, 1 Meat Steak, 1 Flat Dough
| Open Kebab, Show Vagene.
|-
![[File:Grubball.png|50px]]
!Bugball
| 1 Grubmeat, 5 units of Carbon
| Do you really want to eat this?
|-
![[File:Makaronilaatikko.png|50px]]
!Makaroni
| 15 units of flour, 5 units of Milk, 1 Grubmeat, 1 Egg, 2 Cheese Wedges
| Krafty!
|-
![[File:Ruinedvirussample.png|50px]]
!Ruined Virus Sample
| 1 Virus Dish
| Just like vaccination!
|-
![[File:Meatburrito.png|50px]]
!Meat Burrito
| 1 Soybean, 1 Tortilla, 2 Cutlets
| Carne!
|-
![[File:Cheeseburrito.png|50px]]
!Cheese Burrito
| 1 Soybean, 1 Tortilla, 2 Cheese Wedges
| Queso!
|-
![[File:Fuegoburrito.png|50px]]
!Fuego Burrito
| 1 Soybean, 2 Chili, 1 Tortilla
| Fuego!
|-
![[File:Nachos.png|50px]]
!Nachos
| 1 Tortilla, 1 unit of Salt
| Now if only we had some cheese...
|-
![[File:Cheesenachos.png|50px]]
!Cheesenachos
| 1 Tortilla, 1 unit of Salt, 1 Cheese Wedge
| Now if only it were spicier...
|-
![[File:Cubannachos.png|50px]]
!Cuban Nachos
| 1 Tortilla, 1 Chili, 5 units of Ketchup
| Perfect!
|-
![[File:Piginblanket.png|50px]]
!Pig-in-a-Blanket
| 1 Flat Dough, 1 Sausage
| A simple breakfast treat, sometimes served for Brunch!
|}


==[[File:Icecream_Vat.png|50px]] Ice Cream Vat==
=== Turf ===
''Ding-aling ding dong. Get your Nanotrasen-approved ice cream!''


For those hot days on the station there's an Ice cream vat, which can be used to make:
  var/intact = 1 //This determines if the turf will hide pipes, cable and such. Set to 1 to hide and to 0 to not hide them. Only pipes and wire with level set to 1 will be hidden. Set their level var to 2 to keep them from being hidden.
  var/blocks_air = 0 //Determines if the turf prevents air from passing (walls) if set to 1.
Other variables exist but they're tied to atmospherics code which is not to be touched as whenever anything is changed in it it results in a million things breaking.
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/turf.dm code/defines/turf.dm]


{| class="wikitable sortable" style="width:80%" border="1" cellspacing="0" cellpadding="2"
==== Simulated ====
! scope="col" class="unsortable" style="background-color:Yellow;" |Picture
! scope="col" style="background-color:Yellow;" |Recipe
! scope="col" class="unsortable" style="background-color:Yellow;" |Ingredients
! scope="col" class="unsortable" style="background-color:Yellow;" |Notes
|-
![[File:Waffle_Cone.png|50px]]
!{{anchor|Waffle Cone}}Waffle Cone
| 1 unit of Flour + 1 unit of Sugar
| Delicious waffle cone, but no ice cream.
|-
![[File:Chocolate_Cone.png|50px]]
!{{anchor|Chocolate Cone}}Chocolate Cone
| 1 Waffle Cone + 1 Chocolate Flavouring (obtained from Chocolate)
| Delicious chocolate cone, but no ice cream.
|-
![[File:Vanilla_Icecream.png|50px]]
!{{anchor|Vanilla Ice Cream}}Vanilla Ice Cream
| 1 unit of Milk + 1 unit of Sugar
| Scoop it up with a Waffle/Chocolate Cone.
|-
![[File:Strawberry_Icecream.png|50px]]
!{{anchor|Strawberry Ice Cream}}Strawberry Ice Cream
| 1 unit of Milk + 1 unit of Sugar
| Scoop it up with a Waffle/Chocolate Cone.
|-
![[File:Chocolate_Icecream.png|50px]]
!{{anchor|Chocolate Ice Cream}}Chocolate Ice Cream
| 1 unit of Milk + 1 unit of Sugar
| Scoop it up with a Waffle/Chocolate Cone. Chocolate flavouring is obtained from Cocoa powder.
|-
![[File:Blue_Icecream.png|50px]]
!{{anchor|Blue Ice Cream}}Blue Ice Cream
| 1 unit of Milk + 1 unit of Sugar
| Scoop it up with a Waffle/Chocolate Cone. Blue flavouring is obtained from bluespace tomato singulo.
|-
|}


==[[File:Blender.png|50px]] Reagents, Condiments, and Intermediate Ingredients==
Simulated floors are tiles which simulate air movement and temperature. The station is made entirely from these while centcom is made from unsimulated floors to prevent massive and unneeded lag.
In order to create some of these items you will either need to mix the regents by hand or toss them into the blender/grinder and grind them. After which either a finished product will be produced or you will need to transfer the liquid to your CondiMaster Neo in the freezer to create it into a bottle.


Any recipe listed as '''Grind''' will require the use of the blender, any recipe listed as '''Mix''' only requires the beaker. All of your juices will require the Grinder's other setting '''Juice'''.
  var/wet = 0 //If this it a positive number, it is wet and you'll slip on it if you run.
  var/thermite = 0 //Will be set to 1 when thermite is poured on it.


{| class="wikitable sortable" style="width:50%" align="center" border="1" cellspacing="0" cellpadding="2"
===== Simulated floors =====
! scope="col" class="unsortable" style="background-color:Lightgreen;" |Picture
! scope="col" style="background-color:Lightgreen;" |Blends
! scope="col" class="unsortable" style="background-color:Lightgreen;" |Condiments
|-
![[File:Nutriment.png|50px]]
!{{anchor|Nutriment}}Nutriment
| Grind any solid food
|-
![[File:Hotsauce.png|50px]]
!{{anchor|Hot Sauce}}{{anchor|Capsicum Oil}}Hot Sauce/Capsicum Oil
| Grind chilis
|-
!
!capsaicin
!Chili peppers and gelthi plants contain capscaisin. Condensed capscaicin can be made by a chemist using phoron and capscaisin, or from amauri plants
|-
![[File:Coldsauce.png|50px]]
!{{anchor|Cold Sauce}}{{anchor|Frost Oil}}Cold Sauce/Frost Oil
| Grind ice peppers
|-
![[File:Ketchup.png|50px]]
!{{anchor|Ketchup}}Ketchup
| Grind tomatoes
|-
![[File:Flour.png|50px]]
!{{anchor|Flour}}Flour
| Grind wheat
|-
![[File:Soysauce.png|50px]]
!{{anchor|Soy Sauce}}Soy Sauce
| Mix 40 units Soy Milk + 10 units Sulphuric Acid
|-
![[File:Salt.png|50px]]
!{{anchor|Salt}}Salt
| Mix Sodium + Chlorine (from Chem Dispenser). Salt-shakers can be found in cafe
|-
![[File:Pepper.png|50px]]
!{{anchor|Pepper}}Pepper
| Grind pepper-mills in cafe
|-
![[File:Cheesewheel.gif|50px]]
!{{anchor|Cheese Wheel}}Cheese Wheel
| Mix 40 Milk + 5 Universal Enzyme. End result will magically pop a full wheel of cheese
|-
![[File:Cheese_Wedge.png|50px]]
!{{anchor|Cheese Wedge}}Cheese Wedge
| Slice up a Cheese Wheel with a knife
|-
![[File:chocolatebar.gif|50px]]
!{{anchor|Chocolate Bar}}Chocolate Bar
| Mix 2 units Coco powder (grind a Cocoa Pod) + 2 units Milk/Soy Milk + 2 units Sugar
|-
![[File:Tofu.gif|50px]]
!{{anchor|Tofu}}Tofu
| Mix 10 soymilk + 5 Universal Enzyme
|-
![[File:Emptycondiment.png|50px]]
!{{anchor|Sugar}}Sugar
| Grind white beet or sugar cane
|-
![[File:Condiment.png|50px]]
!{{anchor|Sprinkles}}Sprinkles
| Grind donuts
|-
![[File:Dough.png|50px]]
!{{anchor|Dough}}Dough
| Mix 3 units of Egg and 10 units of Flour
|-
![[File:Meatball.png|50px]]
!{{anchor|Meatball}}Meatball
| Mix 3 Animal Protein and 5 Flour
|-
![[File:Bun.png|50px]]
!{{anchor|Bun}}Bun
| Microwave 1 Dough
|-
![[File:Flat_Dough.png|50px]]
!{{anchor|FlatDough}}FlatDough
| Roll out 1 Dough with Rolling Pin
|-
![[File:Dough_Slice.png|50px]]
!{{anchor|DoughSlice}}DoughSlice
| Cut Flat Dough with Kitchen Knife
|-
![[File:Spaghetti.png|50px]]
!{{anchor|Spaghetti}}Spaghetti
| Cut Dough Slice with Kitchen Knife
|-
![[File:Raw_Cutlet.png|50px]]
!{{anchor|RawCutlet}}RawCutlet
| Cut 1 Meat (Any Type). Microwave for a Cutlet.
|-
![[File:Cutlet.png|50px]]
!{{anchor|Cutlet}}Cutlet
| Microwave for a Raw Cutlet.
|-
![[File:Soydope.png|50px]]
!{{anchor|Soydope}}Soy Dope
| Cut 1 Soybean
|-
![[File:Meat.png|50px]]
!{{anchor|Meat}}Meat
| From butchering or processing most animals (and people). Recipes that call for meat will accept any generic meat (except for specific, named meats such as the ones listed below, which have their own recipes). From the Biogenerator in Botany, or from mixing blood and Clonexadone.
|-
![[File:Carpfillet.png|50px]]
!{{anchor|Carp Fillet}}Carp Fillet
| Butcher a Carp (gibbing gives three fillets, cutting with a knife gives one.)
|-
![[File:Grubmeat.png|50px]]
!{{anchor|Grub Meat}}Grub Meat
| A slab of grub meat, it gives a gentle shock if you touch it. Butcher a Solargrub (gibbing gives three fillets, cutting with a knife gives one.)
|-
![[File:Xenomeat.png|50px]]
!{{anchor|Xeno Meat}}Xeno Meat
| Butcher a Xenomorph (gibbing gives three fillets, cutting with a knife gives one.)
|-
![[File:Bearmeat.png|50px]]
!{{anchor|Bear Meat}}Bear Meat
| Butcher a Spacebear (gibbing gives three fillets, cutting with a knife gives one.)
|-
![[File:Raw_Sticks.png|50px]]
!{{anchor|Raw Potato Sticks}}Raw Potato Sticks
| Cut up one potato.
|-
![[File:Carrotfries.png|50px]]
!{{anchor|Carrot Fries}}Carrot Fries
| Cut up one carrot.
|-
![[File:Tortilla.png|50px]]
!{{anchor|Tortilla}}Tortilla
| Microwave 1 Flat Dough
|}


==Vending Machines==
  var/icon_regular_floor = "floor" //Determines what icon the steel version of the floor should have. Determined at floor creation (New() proc). If the icon_state of the floor at that point is one from the global icons_to_ignore_at_floor_init var, then this variable is assigned the value "floor". The icons_to_ignore_at_floor_init list contains broken, plating, burnt and non-steel icon_states from icons/turf/floors.dmi
===[[File:Vendsnack.gif|50px]] Junk Food===
  heat_capacity = 10000 //When a fire (hotspot) on the tile exceeds this number, the floor has a chance of melting. The more the number is exceeded, the higher the chance of melting.
If you're hungry and the Chef is not around to make you a meal, you might want to check the nearest [[Getmore Chocolate Corp|Getmore Chocolate Corp -vending machine]] for some quick snacks to fill up your belly. Note that the Chef cannot (or doesn't want to) make these.
  var/broken = 0 //This mostly only determins if you'll get the tile back when you use the crowbar
  var/burnt = 0 //This mostly only determins if you'll get the tile back when you use the crowbar
  var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/steel //What floor tile is on the tile


{| class="wikitable sortable" style="width:50%" align="center" border="1" cellspacing="0" cellpadding="2"
Simulated floors are defined in:
! scope="col" class="unsortable" style="background-color:Red;" |Picture
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/game/turf.dm code/game/turf.dm]
! scope="col" style="background-color:Red;" |Dispenses
! scope="col" class="unsortable" style="background-color:Red;" |Description
|-
![[File:Candy.png|50px]]
!{{anchor|Candy}}Candy
| Nougat; love it or hate it. Consists of nutriment and sugar, filling you a little.
|-
![[File:Ramen.png|50px]]
!{{anchor|Cup Ramen}}Cup Ramen
| Just add 10u of water, self heats! A taste that reminds you of your school years. 30u Dry Ramen
|-
![[File:Ramen.png|50px]]
!{{anchor|Hot Ramen}}Hot Ramen
| Makes 3 Parts Hot Ramen
|-
![[File:Ramen.png|50px]]
!{{anchor|Hell Ramen}}Hell Ramen
| Add 1 part Capsaicin to 6 parts Hot Ramen
|-
![[File:Chips.png|50px]]
!{{anchor|Chips}}Chips
| Commander Riker's What-The-Crisps. Consists of nutriment, filling you mildly.
|-
![[File:Jerky.png|50px]]
!{{anchor|Scaredy's Private Reserve Beef Jerky}}Scaredy's Private Reserve Beef Jerky
| Beef jerky made from the finest space cows. Consists of nutriment, making it a filling snack!
|-
![[File:Raisins.png|50px]]
!{{anchor|4no Raisins}}4no Raisins
| Best raisins in the universe. Not sure why. Consists of nutriment, making it a very filling snack!
|-
![[File:Twinkie.png|50px]]
!{{anchor|Space_Twinkie}}Space Twinkie
| A few bite snack consisting of small amount of sugar.
|-
![[File:CheesieHonkers.png|50px]]
!{{anchor|Cheesie Honkers}}Cheesie Honkers
| Bite sized cheesie snacks that will honk all over your mouth. Consists of nutriment, making it a filling snack!
|-
![[File:Breadtube.png|50px]]
!{{anchor|Bread Tube}}Bread Tube
| A tube of bread! A bread tube!
|-
![[File:Syndiecake.png|50px]]
!{{anchor|Syndi-Cake}}Syndi-Cake
| A delicious traitorous treat! Available from hacked Getmore Chocolate Corp Vending Machines
|-
![[File:SkrellSnax.png|50px]]
!{{anchor|SkrellSnax}}SkrellSnax
| Mm, Tastes like Skrell! Available from hacked Getmore Chocolate Corp Vending Machines
|-
![[File:Monkeycube.png|50px]]
!{{anchor|Monkey Cube}}Monkey Cube
| 10 Animal Protein; kills you as a monkey grows inside you. Add water to get a monkey. Also comes in Stok, Farwa, and Naera varieties, available through Cargo.
|-
![[File:Liquidfood.png|50px]]
!{{anchor|LiquidFood Ration}}LiquidFood Ration
| Sometimes found in Maintenance. 20 Nutriment, 3 Iron
|-
![[File:Honeycomb.png|50px]]
!{{anchor|Honeycomb}}Honeycomb
| From beekeeping
|-
|}


=Tips=
===== Simulated walls =====
* Milk, Soy Milk, Berry Juice, Soy Sauce, Hot Sauce, Cold Sauce, and Sugar are all measured in reagent units rather than by number of containers. They can be poured directly into the microwave.
* Sliceable foods can be divided into smaller portions by slicing them. Their reagents are divided equally into the slices. The slices noted here are the maximum number of slices, which you can get by using a precise cutting tool like a kitchen knife, cleaver, or scalpel; crude cutting tools, like axes, shovels, and saws will result in fewer slices.
* Condiments are reagents can be added to food, possibly increasing their nutrition value or adding some fun extras. A chef can create condiments by grinding up things that contain them and isolating them in the CondiMaster in the back room. Condiments let you put ketchup on your fries, salt in your soup, dylovene on your fish fingers, or psilocybin on your ghost burger--the possibilities are endless. Foods hold a maximum of fifty units of reagents.
* Some poisonous foods can be prepared safely if Dylovene is added to the finished product, or if the poisonous reagent is neutralized somehow. Experienced chefs only!
* Traitor chefs can make some sneaky substitutions.
** Poisonous apples can be used in all apple dishes, and the final dish will be poisoned. Unlike poisonous mushrooms, cyanide apples can easily kill.
** Slime jelly can be substituted for cherry jelly, and will poison the resulting food.
** Anything made with meat can be made with human meat. (It's still necessary to emag the gibber before butchering one's murder victims.)
* Blood is not necessarily poisonous. It is always the same type as the person the brain was taken from, and if the type is incompatible with the recipient, it will cause a rejection reaction. O-negative blood is always safe.
* Units of egg are obtained by breaking eggs into beakers.


==Advanced Cooking==
Doesn't really contain any special new variables.
Some reagents in the finished products are poisonous, you may want to serve these items safely. This is where a little chemistry can help neutralize or remove the dangerous reagents from your food.Any given piece of food can contain only 50 units of reagents.


When using Dylovene, it's okay to use more than you strictly need. Other chemicals you might use to neutralize poison aren't so forgiving, and some are poisonous themselves.
Defined in:
  [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/turf.dm code/defines/turf.dm]


{| class="sortable" width="550" style="text-align:left; background-color:#FFFFFF;" border="1" cellspacing="0"
[[Category:Guides]] [[Category:Game Resources]]
! style="background-color:Aqua;" |Reagent
{{Contribution guides}}
! style="background-color:Aqua;" |How to Neutralize
|-
| Animal Protein; Egg Yolk
| Harmless to most people, animal protein, including egg yolk, is unsafe for Skrell. A one-to-one ratio of Dylovene to animal protein will make it safe for Skrell to eat.
|-
| Blood
| Blood is not necessarily poisonous. It is always the same type as the person it was taken from, and if the type is incompatible with the recipient, it will cause a rejection reaction.
O-negative blood is always safe.
Add one unit of Dylovene for every four units of blood.
Alcoholic drinks made with blood, of any type, are safe; just be sure there is no blood left over after the reaction.
Blood can also be neutralized with Clonexadone (1 unit Clonexadone to 5 units Blood), or by adding drink ingredients to create a blood-based drink.
|-
| Carpotoxin
| Anything made with carp meat will have carpotoxin in it. Counter it with 1 unit Dylovene per 3 units Carpotoxin. Carpotoxin also reacts with copper and cryptobiolin to form rezadone, but overdose of rezadone starts at 15 units and most carpotoxin-containing foods have five or more units of it.
|-
| Amatoxin
| Found in mushrooms. Add 1 unit Dylovene per 2 units Amatoxin.
|-
| Toxin
| Add 1 unit Dylovene per 2 units Toxin.
|-
| Slime Jelly
| Will poison your customers no matter how much Dylovene you add. Adding Dylovene (around 30 units or so) will keep them from dying of the poisoning before they can get to Medical, but if you're not a traitor, do you want to serve them such a painful dish? (No, don't answer that. We know customers can be annoying; that's still no excuse to poison them.)
|-
| Radium
| Found in roast diona and will cause radiation poisoning. Add 1 unit of Dylovene per unit of Radium; reacts to form Hyronalin.
|-
| Sulphuric Acid
| Dylovene won't cut it for sulphuric acid, which will burn as well as poison anyone unlucky enough to ingest it. Instead, neutralize each 1 unit of Sulphuric acid with either 3 units of Corn Oil (creates glycerol), 4 units of Soy Milk (creates soy sauce), or 5 units of wine (creates Acid Spit, an alcoholic cocktail).
|-
| Polytrinic Acid
| You're serious about serving that xeno meat, huh? Well, don't serve it plain; polytrinic acid will poison, burn, and generally kill your customers in a rather nasty manner. Like with sulphuric acid, dylovene isn't enough, but unlike sulphuric acid, it's not easy to neutralize. Polytrinic acid will react with foaming agent and either iron or aluminum to create metal foam, and 10 units of polytrinic acid and 20 units of plasticide will create plastic. When working out how to do this, remember that plasticide is poisonous and metal foam can be chipped through with a kitchen knife.
|-
| Alcohol
| An equal amount of Ethylredoxrazine reacts with Alcohol (including alcoholic drinks) to make water.
|-
| Synaptizine
| Synaptizine is poisonous, but the bigger problem is that it hangs around in the system for a long time. For every unit of synaptizine, you need 30 units of Dylovene.
|-
| Phoron
| Really, now? You could neutralize phoron by adding 2 rum and 1 vermouth per unit, but eating phoron is still a bit of a waste.
|-
|}

Latest revision as of 02:34, 11 November 2019

This article or section is from the Baystation 12 wiki.

This article or section is directly taken from the Baystation 12 wiki, and should not be fully relied on for CHOMPstation. You can help by updating it.

Other related guides: Basics of Coding in BYOND and the Guide to Mapping

So you know how to write programs in other languages and would like a quick guide on how to understand and code for SS13? Good, this is the guide for you. It likely doesn't contain everything that you need to know but it's a start.

Syntax

  • Semicolons at the end are not mandatory,
  • Loop, proc, object, variable etc. spans are determined by indentations (similar to Python, see examples below)
 /obj
   var
     i1
     i2
     i3

is the same as (Strongly recommended you use this layout to make searching for variable and proc definitions easier.)

 /obj
   var/i1
   var/i2
   var/i3

which is inturn the same as

 /obj/var/i1
 /obj/var/i2
 /obj/var/i3
  • This guide uses the word 'object' for any defined type (see Variable types) and the word 'obj' for derivatives of atom/obj, which are all objects which can be placed on the map.
  • This guide uses the word 'AI controlled' for behavior to do with an AI player controlling an item. The term 'Game controlled' is used when refering to behavior which the script itself determins (Usually called AI controlled creatures or NPCs)
  • All things are inherited from parent objects. If a variable is defined in /obj/item, it doesn't need to be (actually can't be) redefined in /obj/item/weapon.

Variables

Variables are very general, Byond makes no difference in the declaration of strings, integers, etc. (Similar to PHP)

Predefined variables

There is a lot of predefined variables for objects in BYOND, but the most important are:

  • src - a variable equal to the object containing the proc or verb. It is defined to have the same type as that object. (Similar to "this" in Java or C++)
  • usr - a mob variable (var/mob/usr) containing the mob of the player who executed the current verb, or whose action ultimately called the current proc. A good rule of thumb is to never put usr in a proc. If src would not be the correct choice, it is better to send another argument to your proc with the information it needs.
  • args - a list of the arguments passed to the proc or verb.
  • vars - a list of object variables. If the variable name is used as an index into the list, the value of that variable is accessed.

For more SS13 specific variables see SS13 common variable meanings

Variable definition

Basic definitions
 var/j
 var/i = 4
 var/a, b, c
Complex definitions

The general syntax is var/type/variable_name = value

Examples:

 var/obj/item/I = new/obj/item
 I.name = "Some item"

Datum definition and declaration of a variable of that datum type:

 datum/test_datum
   var/test_variable = 0 //declaration of the test_variable var
   
   proc/set_as(var/i) //proc definition within the test_datum datum
     test_variable = i //set the test_variable var to the value in the argument
 
 var/datum/test_datum/TD = new/datum/test_datum //TD will now be a reference to a datum of type test_datum
 TD.test_variable = 4  //Byond doesn't know of private variables, so you can set any variables like this
 world << TD.test_variable //will output 4 to all connected users
 TD.set_as(10) //Will call the set_as proc in the datum with the argument 10
 TD.test_variable //will output 10 to all connected users

Bitflags

Bitflags are variables which use bits instead of numbers to determine conditions. The bit operators are & and |. For now, you should know that bitflag operators use the binary value of numbers to determine the result. So 13 & 3 will result in 1. (1101 & 0011 = 0001) and 13 | 3 = 15 (1101 | 0011 = 1111) see if for uses

Variable types

reference

  • datum - ordinary object type (class in java)
  • atom - atom derives into obj, turf, mob and area
  • turf - tiles which make up the floors, walls and space on SS13
  • area - areas are grouped locations. They combine many turfs and it gives some common properties. Power, atmosphere, etc. are determined by areas
  • mob - an object with life, be it game controlled or player controlled.
  • obj - objects which can be placed on the map
  • client - a new client object is created for each connected player
  • list - a list of elements. The first element in a list called L is L[1]
  • world - this is a variable where some global variables for the entire world can be set. World's contents var contains all atoms currently in the game world.

Outputting messages

The most basic way of outputting messages is with the '<<' output operator.

 world << "Hello World!" //Outputs a message to all clients in the world
 usr << "Hello usr" //Outputs a message to only the user who is tied to the calling of the proc which contains this.
Output with variables
 var/s1 = "Hello"
 var/s2 = "World"
 var/i = 2011
 world << "[s1] [s2], this guide was written in [i]" //Returns "Hello World, this guide was written in 2011"

Determining variable types in code

The istype() proc will come in handy

Example

 var/obj/item/weapon/W = new/obj/item/weapon/baton
 if(istype(W,/obj/item/weapon/baton))
   world << "It's a baton!"

The second argument is optional, if it's omitted, the variable will be checked against its declared type, like

 var/obj/item/weapon/W = new/obj/item/weapon/baton
 if(istype(W))
   world << "It's a weapon!"

Standard code for getting specific arguments from variables which have a type that is a subclass of the type the current proc treats them with (see any attackby() proc for examples). Note that the example below is of a proc which is globaly defined, not tied to the object. It doesn't make much sense to do it like this but it works for the purposes of the example. /obj objects don't have the 'amount' variable, it's defined in /obj/item/stack (as ilustrated by the oversimplified definition of classes below. Also note where var/ is used and where it isn't).

 /obj
   var/name = "Object"
 
 /obj/item
   name = "Item"
 
 /obj/item/stack
   name = "Stack"
   var/amount = 50
 
 proc/get_amount(var/obj/O)
   if(istype(O,/obj/item/stack))
     var/obj/item/stack/S = O
     return S.amount

There is another way of doing this. I'll show you that it exists but it is NOT TO BE USED.

 proc/get_aount(var/obj/S)
   if(istype(O,/obj/item/stack))
     return O:amount

The colon operator (:) in the example above tells the byond compiler: "I know what I'm doing, so ignore the fact the object doesn't have this variable, I'll make sure it works myself." The problem is that people will revise your code and use it in ways you never planed for. This means something might eventually make the O:amount throw exceptions in the form of runtime errors. Some variables might eventually need to be removed or replaced and this is impossible when they are used with object:variable as the compiler will not throw an error when the variable is removed. The error will only become apparent after the game is ran on the live server which might cause it to crash. So just don't use this method, ever.

There are some shortcuts to istype() proc:
isarea(variable) = istype(variable, /area)
isicon(variable) = istype(variable, /icon)
ismob(variable) = istype(variable, /mob)
isobj(variable) = istype(variable, /obj)
isturf(variable) = istype(variable, /turf)
isloc(variable) = ismob(variable) || isobj(variable) || isturf(variable) || isarea(variable)

Switching between variable types in code

Byond defined:
ascii2text
file2text
list2params
num2text
params2list
text2ascii
text2file
text2num
text2path
time2text

SS13 Defined:
text2dir(direction)
dir2text(direction)
dd_file2list(file_path, separator)
dd_text2list(text, separator, var/list/withinList)
dd_text2List(text, separator, var/list/withinList)
dd_list2text(var/list/the_list, separator)
angle2dir(var/degree)
angle2text(var/degree)

For more useful procs see
code/defines/procs/helpers.dm
code/game/objects/items/helper_procs.dm

If

Ifs default to checking for true if not otherwise stated. True is defined for all variable types as empty, 0 or non-existant (null).

 if(condition)
   action_true()
 else
   action_false()

Common variable behavior in if statements:

Variable type False when True when
String (text / ascii) "" or null Anything else
Int / Real 0 or null Anything else
datum, atom null Anything else

Logical operators

Pretty standard:

 !statement1 //NOT statement1
 (statement1) && (statement2) //statement1 AND statement2
 (statement1) || (statement2) //statement1 OR statement2
 == //equals
 != //not equal
 < (<=) //less (or equal)
 > (>=) //more (or equal)
 & //bitflag AND operator. 13 & 3 = 1 (1101 & 0011 = 0001)
 | //bitflag OR operator. 13 | 3 = 15 (1101 | 0011 = 1111)

Byond does not recognize the === (identical) operator. More operators can be found in the left menu on the reference page

While

Byond will cancel a loop if it reaches a certain number of iteration and give a runtime error out of fear of infinite loops. Same applies for recursions. Same as anywhere else

 while(condition)
   action1()

All loops understand the continue and break commands

For

All loops understand the continue and break commands

For combines the for loop and foreach loop:

For loop

 for(var/i = 1; i <= 10; i++)
   world << i //Will write (each in a new line) 1 2 3 4 5 6 7 8 9 10

For each

 for(var/obj/item/weapon/baton/B in world)  //will iterate through world.contents (which contains all atoms in the world) and only pick those which are of the given type (/obj/item/weapon/baton)
   B.name = "Smelly baton" //Will apply the new name to the baton in the current iteration loop

Do - While

The Do while operator is not commonly used in SS13 code, Byond does support it tho.

 var/i = 3
 do
   world << i--
 while(i)

All loops understand the continue and break commands

Defining objects

Doesn't matter if you want a datum or atom, the definition of objects is the same and simple:

 /obj/item/weapon/item1 //will nmake a new object of type obj.
   var/item_property = 5 //Will define a new variable type for all item1 objs
   name = "Testing Item" //The name var is already defined in parent objects so it is not defined here, but only assigned a new valie.
 
 /obj/item/weapon/item1/New() //Constructor proc
   ..() //should always be present in New() procs, see ..() for more information
   item_property = 3 //An action that is performed in the object constructor.

Procs (Methods, functions, procedures)

You're used to the standards of methods, functions and procedures, right? Well procs ignore some aspects of these. They can best be compared to Java methods, as they're tied to specific objects. They cannot be defined as static, private, public, etc. tho. You can write static methods, however the compiler will not restrict you from calling them in a non-static way or environment. Same applies for non-static methods.

 proc/proc_name(var/argument1, var/argument2)
   world << "[argument1] [argument2]"

The above would declare a global proc. If you wish to tie it to a certain level

..()

This is the same as super() in Java. It calls the parent object type's proc with the same name and same arguments.

Example:

 /obj/item
   name = "Item"
 
 /obj/item/New() //New() is the proc that gets called whenever a new object of this type is created. A constructor if you will.
   src.name = "It's an item!"
 
 /obj/item/stack
   name = "Stack"
 
 /obj/item/stack/New() 
   src.name = "It's a stack!"
   ..()

If you have the code from the example above and create a new object of type /obj/item/stack, it will first make the item in the game world with the name "Stack", because it's defined to be that by default. Then the New() proc will be called immedietally after. This will change the name to "It's a Stack!" but the call of the parent type's New() proc with the ..() command will then set it to "It's an item!". So in the end, the new object will be called "It's an item!". The ..() command is however very important in many cases as some things are defined only in the common parent's New() procs. In Del(), the proc which gets called prior to an object's deletion, it requires the code to get to the root Del() proc to even delete it. See examples of Del() in the code.

Important procs

New()

This proc is called whenever a new instance of the object is created. It can have arguments if needed. It should call ..() where applicable so that parent constructors can be applied.

If you wish to create a New() proc for atoms with custom arguments, ensure the first argument is for the object's location. Example:

 obj/item/weapon/my_item/New(var/location, var/i)
   ..()
   //Whatever else you need to do

To make a general object use

 new /datum/test_datum

To make an atom (which usually has a locaiton)

 new /obj/item/weapon(src.loc)

For the custom example above, the code to create a new such object would be: The 5 is just an example of a value which could be assigned to the var/i in the constructor.

 new /obj/item/weapon/my_item(src.loc, 5)

Where src is the proc owner, which contains the line above. src.loc is the locaiton of the src object.

Del()

This proc gets called before an object's delection. It MUST call ..() at the end as the actual deletion is done in the root Del() proc.

An object is deleted by using the del(O) proc with O being the object to be deleted.

attack_hand(mob/M as mob)

Whenever a user (M) clicks on the object with an empty active hand

attack_paw(mob/M as mob)

Whenever a monkey (M) clicks the object with an empty active hand

If a custom attack_paw(mob/user) proc is not written for an atom, it defaults to calling attack_hand(user)

attack_ai(mob/user)

Whenever an AI or cyborg clicks the object with an empty active hand

If a custom attack_ai(mob/user) proc is not written for an atom, it defaults to calling attack_hand(user)

attack(mob/M as mob, mob/user as mob)

When the object is used to attack mob M by mob user

attackby(obj/item/W, mob/user)

When the object is being attacked by user with W (Example: If you click on wires with wirecutters)

ex_act(severity)

How the item reacts to explosions. Severity can either be 1, 2 or 3 with 1 being the most destructive.

blob_act()

How the item reacts to a blob (magma) attack

emp_act(severity)

How the item reacts to an EMP. Severity can either be 1 or 2 with 1 being the more powerful EMP surge.

Topic(href, href_list)

This one's called when you click a link in a pop-up window. Like when you increase the output of SMES cells. The href_list variable is the important one as it's a parsed version of the arguments you add into a link. To make a link in the pop-up window, add the following line to the text you display (dat in the example):

 dat += text("<A href='?src=\ref[src];select=[i]'>[src.name]</a><br>")

Check the code for more examples of this.

process()

This gets called for all objects on every tick. If possible, avoid it as it's processor heavy, but for some things it just can't be avoided.

SS13 common variable meanings

Datum

Datums have the smallest number of pre-defined variables. These are present in all objects in the game:

 type //The type of an object. If your object is of type /obj/item/weapon/shovel writing the following: new src.type(src.loc) will make another shovel in the same tile.
 parent_type //Parent type of /obj/item/weapon/shovel is /obj/item/weapon... seems streight-foward enough.
 tag //The tag is used to help you identify things when using several instances. It has to be set manually for each instance tho. Lazy coders and mappers resulted in not many tags being used. Instances in the map editor are sorted by tag.
 vars //List of object vars the datum has defined

Atom

These variables are shared by all areas, mobs, objs and turfs.

 contents //List of contents. Closets store their contents in this var as do all storage items. All the items on a turf are in the turf's contents var.
 density //If density is at 0, you can walk over the object, if it's set to 1, you can't.
 desc //Description. When you right-click and examine an object, this will show under the name.
 dir //Object direction. Sprites have a direction variable which can have 8 'legal' states. More info
 gender //not used
 icon //The dmi file where the sprite is saved. Must be written in single quotations (Example: 'items.dmi')
 icon_state //The name of the sprite in the dmi file. If it's not a valid name or is left blank, the sprite without a name in the dmi file will be used. If such a sprite doesn't exist it will default to being blank.
 invisibility //Invisibility is used to determine what you can and what you can't see. Check the code or wait for someone who knows how exactly this works to write it here.
 infra_luminosity //Only mecha use this
 underlays //List of images (see image() proc) which are underlayed under the current sprite
 overlays //List of images (see image() proc) which are overlayed over the current sprite
 loc //Contains a reference to the turf file where the object currently is.
 layer //A numerical variable which determins how objects are layered. Tables with a layer of 2.8 are always under most items which have a layer of 3.0. Layers go up to 20, which is reserved for HUD items.
 luminosity //How much the item will glow. Note that the picking up and dropping of luminous items needs to be specially handled. See flashlight code for an example.
 mouse_over_pointer //not used
 mouse_drag_pointer //(almost) not used
 mouse_drop_pointer //not used
 mouse_drop_zone //not used
 mouse_opacity //Used in a few places. Check the description in the reference page
 name //The name of the object which is displayed when you right click the object and in the bottom left of the screen when you hover your mouse over it.
 opacity //Whether you can see through/past it (glass, floor) when set to 0 or whether you can't (walls, mecha) when set to 1.
 pixel_x //How many pixels in the x direction should the sprite be offset from the starting set. See the APC's New() proc for an example and how fire alarms are defined on the map. pixel_x = -5 will move it 5 pixels to the left and pixel_x = 5 will move it 5 pixels to the right
 pixel_y //Same as pixel_y but in the y direction. Positive values move it to the north, negative to the south.
 pixel_z //Used in isometric maps, so it's not used in SS13
 suffix //Rarely used. See the reference page for more information
 text //How to represent the object on text clients. Not used.
 type //The type of the object
 vars //See Datum above
 verbs //The verbs you can use with the item. Verbs are the options in the right click menu.
 x //X position, read only. Set the loc variable to move it or use the inbulit functions.
 y //Y position, read only. 
 z //Z position (Which z-level it's on), read only.

Area

 var/requires_power = 1 //Areas which are to work without an APC (Such as centcom areas) should have this at 0. All other areas should have it at 1.
 var/music = null //Music to be played when you enter the area.
 luminosity = 0 //Areas which should be lit at all times (such as space and centcom) should have this at 1 as well as the sd_lighting var at 0
 var/sd_lighting = 0 //This var determines whether dynamic lighting is to be calculated for the area's tiles. Turn this to off only for areas which have the luminosity var set to 1

Most other variables exist only for technical reasons and should not be messed with unless done through existing procs, they are defined in:

 code/defines/area/Space Station 13 areas.dm

Mob

There is a huge amount of variables for mobs. Take a look at the following files:

 code/defines/mob/mob.dm
 code/defines/mob/dead/observer.dm
 code/defines/mob/living/living.dm
 code/defines/mob/living/carbon/carbon.dm
 code/defines/mob/living/carbon/human.dm
 code/defines/mob/living/carbon/monkey.dm
 code/defines/mob/living/silicon/silicon.dm
 code/defines/mob/living/silicon/ai.dm
 code/defines/mob/living/silicon/robot.dm

There are also additional files for aliens, larva, facehuggers and more there, but the files above will have most of the variables you might need.

Obj

 var/m_amt = 0	// How much metal the item has. Used to determine how much metal you get when feeding it into an autolathe and how much it costs to produce it at the lathe
 var/g_amt = 0	// How much glass the item has. Used to determine how much glass you get when feeding it into an autolathe and how much it costs to produce it at the lathe
 var/w_amt = 0	// waster amounts. Not used
 var/origin_tech = null //Used by R&D to determine what research bonuses it grants. See examples in item definitions in code.
 var/reliability = 100	//Used by SOME devices to determine how reliable they are. The number represents the percentual chance for them to work properly.
 var/unacidable = 0 //universal "unacidabliness" var, objects with this set to 1 cannot be destroyed by acids.
 var/throwforce = 0 //The amount of damage applies to a target when they're hit by the item.

More variables are defined in:

 code/defines/obj.dm

Item

Items are objs which can be picked up. They're divided into several categories according to their function.

/obj/item is defined in the following file:

 code/defines/obj.dm

It adds the following variables (Look at the file for more, but these are the more important ones):

 var/force = null //This determins how much damage the target takes when they're attacked by the item in hand. Small items usually have it at 0, medium ones between 5 and 10, rare and powerful items around 10-15 and two-handed items at 15 and more. Syndicate items have it even higher at 40 and more.
 var/item_state = null //This it the var that determines which sprite will be used for the item from icons/mob/items_lefthand.dmi and items_righthand.dmi.
 var/damtype = "brute" //Determines what damage type the item produces.
 var/health = null //Some items use this to determine when they'll break from use or damage. Not common tho.
 var/hitsound = null //Sound that's played when you hit something with the item. Not commonly used.
 var/w_class = 3.0 //Weight class.
   // w_class = 1 means it's an item that can fit in a pocket (diskette, pen, cigarette packet)
   // w_class = 2 means the item can't fit in pockets but can fit in a box (clipboard, analyzer, cleaner)
   // w_class = 3 means the item can't fit in a box but can fit in backpacks (box, rods, metal)
   // w_class = 4 means the item can't even fit in a backpack (packpack, pickaxe, fireaxe)
   // w_class = 5 is used but not for weight classes.
 var/wielded = 0 //Used for double-handed items which can be carried in one hand but needs to be wielded by two hands before they can be used. This is determined by code when wielding and unwielding. All items should start with this at 0.
 var/twohanded = 0 ///Set this to 1 if your item is two-handed.
 flags = FPRINT | TABLEPASS //Flags

Machinery

Defined in:

 code/defines/obj/machinery.dm

Machinery are objs which cannot be picked up and generally require power to operate. They have the following vars defined for all of them:

 var/use_power = 0 //Determines if and how much power the machine will use each tick.
   //use_power = 0 - no power is used
   //use_power = 1 - idle power is used
   //use_power = 2 - active power is used
 var/idle_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 1
 var/active_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 2
 var/power_channel = EQUIP //Determines which APC power category the device falls under. EQUIP, ENVIRON or LIGHT
 var/list/component_parts = null //A list of parts needed to construct the machine from a machine frame.

Turf

 var/intact = 1 //This determines if the turf will hide pipes, cable and such. Set to 1 to hide and to 0 to not hide them. Only pipes and wire with level set to 1 will be hidden. Set their level var to 2 to keep them from being hidden.
 var/blocks_air = 0 //Determines if the turf prevents air from passing (walls) if set to 1.

Other variables exist but they're tied to atmospherics code which is not to be touched as whenever anything is changed in it it results in a million things breaking.

 code/defines/turf.dm

Simulated

Simulated floors are tiles which simulate air movement and temperature. The station is made entirely from these while centcom is made from unsimulated floors to prevent massive and unneeded lag.

 var/wet = 0 //If this it a positive number, it is wet and you'll slip on it if you run.
 var/thermite = 0 //Will be set to 1 when thermite is poured on it.
Simulated floors
 var/icon_regular_floor = "floor" //Determines what icon the steel version of the floor should have. Determined at floor creation (New() proc). If the icon_state of the floor at that point is one from the global icons_to_ignore_at_floor_init var, then this variable is assigned the value "floor". The icons_to_ignore_at_floor_init list contains broken, plating, burnt and non-steel icon_states from icons/turf/floors.dmi
 heat_capacity = 10000 //When a fire (hotspot) on the tile exceeds this number, the floor has a chance of melting. The more the number is exceeded, the higher the chance of melting.
 var/broken = 0 //This mostly only determins if you'll get the tile back when you use the crowbar
 var/burnt = 0 //This mostly only determins if you'll get the tile back when you use the crowbar
 var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/steel //What floor tile is on the tile

Simulated floors are defined in:

 code/game/turf.dm
Simulated walls

Doesn't really contain any special new variables.

Defined in:

 code/defines/turf.dm
Contribution Guides & Game Resources
General Guide to Setting Up a Server, Downloading the Source Code, Guide to Contributing to the Game, Game Resources category
Coding Basics of Coding in BYOND, SS13 for Experienced Programmers, [NanoUI]
Mapping Guide to Mapping
Spriting Guide to Spriting
Wiki Guide to Contributing to the Wiki, Style Guide