mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-07-10 07:42:06 +01:00
7c8bb85de3
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commit afbdd1d8442973f5d570c30920d9d865b5acd479. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commit de22ad375d3ee4d5930c550da2fd23a29a86e616. * Attempt to normalize example.yml (and another file I guess) * Try again
24 lines
879 B
Plaintext
24 lines
879 B
Plaintext
/**
|
|
* Abstract-ness is a meta-property of a class that is used to indicate
|
|
* that the class is intended to be used as a base class for others, and
|
|
* should not (or cannot) be instantiated.
|
|
* We have no such language concept in DM, and so we provide a datum member
|
|
* that can be used to hint at abstractness for circumstances where we would
|
|
* like that to be the case, such as base behavior providers.
|
|
*/
|
|
|
|
/// If set, a path at/above this one that expects not to be instantiated.
|
|
/datum/var/abstract_type
|
|
|
|
/// If true, this datum is an instance of an abstract type. Oops.
|
|
/datum/proc/IsAbstract()
|
|
SHOULD_NOT_OVERRIDE(TRUE)
|
|
return type == abstract_type
|
|
|
|
/// Passed a path or instance, returns whether it is abstract. Otherwise null.
|
|
/proc/is_abstract(datum/thing)
|
|
if (ispath(thing))
|
|
return thing == initial(thing.abstract_type)
|
|
if (istype(thing))
|
|
return thing.IsAbstract()
|