SS13 for experienced programmers: Difference between revisions
SS13 for experienced programmers (view source)
Revision as of 04:57, 4 October 2015
, 04:57, 4 October 2015→Syntax
imported>SpasticVerbalizer (Added link to SS13 defined procs) |
imported>LiamLime (→Syntax) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 22: | Line 22: | ||
/obj/var/i3 | /obj/var/i3 | ||
For this project use the following layout. (This layout makes searching for variable and proc definitions easier. | For this project use the following layout. (This layout makes searching for variable and proc definitions easier.) | ||
/obj | /obj | ||
var/i1 | var/i1 | ||
Line 408: | Line 408: | ||
There is a huge amount of variables for mobs. Take a look at the following files: | There is a huge amount of variables for mobs. Take a look at the following files: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/mob.dm code/modules/mob/mob.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/dead/observer/observer.dm code.modules/mob/dead/observer/observer.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/living.dm code/modules/mob/living/living.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/carbon.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/human.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/carbon/monkey/monkey.dm code/modules/mob/living/carbon/monkey/monkey.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/silicon/silicon.dm code/modules/mob/living/silicon/silicon.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/silicon/ai/ai.dm code/modules/mob/living/silicon/ai/ai.dm] | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/living/silicon/robot/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. | 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. | ||
Line 430: | Line 430: | ||
More variables are defined in: | More variables are defined in: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/objs.dm code/game/objects/obj.dm] | ||
==== Item ==== | ==== Item ==== | ||
Line 437: | Line 437: | ||
/obj/item is defined in the following file: | /obj/item is defined in the following file: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/items.dm code/game/objects/items.dm] | ||
It adds the following variables (Look at the file for more, but these are the more important ones): | It adds the following variables (Look at the file for more, but these are the more important ones): | ||
var/ | var/horse = 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/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/damtype = "brute" //Determines what damage type the item produces. | ||
Line 458: | Line 458: | ||
Defined in: | Defined in: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/machinery/machinery.dm code/game/machinery/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: | Machinery are objs which cannot be picked up and generally require power to operate. They have the following vars defined for all of them: | ||
Line 475: | Line 475: | ||
var/blocks_air = 0 //Determines if the turf prevents air from passing (walls) if set to 1. | 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. | 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. | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/turfs/turf.dm code/game/turfs/turf.dm] | ||
==== Simulated ==== | ==== Simulated ==== | ||
Line 493: | Line 493: | ||
Simulated floors are defined in: | Simulated floors are defined in: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/turfs/simulated/floor.dm code/game/turfs/simulated/floor.dm] | ||
===== Simulated walls ===== | ===== Simulated walls ===== | ||
Line 500: | Line 500: | ||
Defined in: | Defined in: | ||
[ | [https://github.com/tgstation/-tg-station/blob/master/code/game/turfs/simulated/walls.dm code/game/turfs/simulated/walls.dm] | ||
==Performance References== | ==Performance References== |