Locked: The Art of Code: Namespaces and Inheritance in Tutorials & Snippets
You do realize that still uses obj as your base type?
Well that wasn't long at all. When your code has more comments than actual code; you're doing it wrong.
Drink() // It drinks when it eats. ..()
There is so much unrelated and/or superfluous information, bad examples
and the fact that this isn't even a good design concept in DM to begin with
You do realize that still uses obj as your base atom type?
Because referring to it as an item and object gets the point across that it is indeed an item and object, not just some magical weapon type that you have to assume is inheriting who knows what from who knows where.
Grenade parent_type = /obj var maximum_dmg // The maximum damage at the center of a explosion. minimum_dmg // The minimum damage at the end of a explosion. radius // The radius of the explosion. // Let's define the type of grenade here. M67 // Assign all the properties for the M67 grenade-type we inherited from the Grenade. maximum_dmg = 25 minimum_dmg = 17 radius = 7 Gun parent_type = /obj var damage // How much damage the weapon inflicts. spread // Functionality for spreading bullets. speed // How fast the gun shoots bullets. (i.e, fire time) MP5 damage = 1.4 spread = 1.5 speed = 0.20