Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
/VM/station wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Understanding SS13 code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Hierarchy and Inheritance === Objects inherit all it's parent's variables and procs. This means that an object defined as /obj/item/weapon/storage/box has all the variables of /obj/item/weapon/storage, /obj/item/weapon, /obj/item, /obj and also /atom, but we'll get to that one later. Some procs are already defined for all objects, you can see these [http://www.byond.com/members/?command=reference&path=atom%2Fproc here]. In the above example, New() was an instance of a proc which was inherited from the parent object. This is why New() does not have the proc/ prefix, because it is already defined in the parent object. You should however know that New() was redefined here, so it no longer acts the same way as in the parent objects. An example of an inherited variable are the name and desc (description) variables. Both were redefined tho. spawned_gold, however, is a new variable. One which the parent proc does not have. If we define the following two objects... /turf/simulated/gold_spot/plot1 /turf/simulated/gold_spot/plot2 ...we just defined two child objects of /turf/simulated/gold_spot and they inherited all the procs and vars that /turf/simulated/gold_spot has including all those which /turf/simulated/gold_spot inherited from their parent (/turf/simulated).
Summary:
Please note that all contributions to /VM/station wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
/VM/station wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width