mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Refactored the abstract meta propriety (#19797)
Refactored the abstract meta propriety into defines. It's now more easy to spot/see abstract types thanks to the macro that defines them. Added a check on initialization of atoms to avoid spawning abstract types. Made the spawn_atom proc check for abstractness. Made the spawn_atom proc use tgui_list for types list shorter than 1000 elements, which enables to search in them. It's too laggy on larger lists so above 1000 it uses the builtin input. Made the spawn_atom use a list subtraction instead of a double list, it's lighter on memory and processing.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
/singleton/overhead_emote
|
||||
abstract_type = /singleton/overhead_emote
|
||||
|
||||
ABSTRACT_TYPE(/singleton/overhead_emote)
|
||||
var/icon = 'icons/mob/overhead_emote.dmi'
|
||||
var/icon_state = "abstract"
|
||||
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
/// Datum level flags
|
||||
var/datum_flags = NONE
|
||||
|
||||
/**
|
||||
* If set, a path at/above this one that expects not to be instantiated
|
||||
*
|
||||
* This is a `typepath`
|
||||
*
|
||||
* Do not instantiate a datum that has the path set as its abstract_type, this indicates
|
||||
* that the datum is abstract and is not meant to be spawned/used directly
|
||||
*/
|
||||
var/abstract_type
|
||||
|
||||
/// A weak reference to another datum
|
||||
var/datum/weakref/weak_reference
|
||||
|
||||
|
||||
@@ -163,8 +163,7 @@ var/global/repository/singletons/Singletons = new
|
||||
return result
|
||||
|
||||
|
||||
/singleton
|
||||
abstract_type = /singleton
|
||||
ABSTRACT_TYPE(/singleton)
|
||||
|
||||
|
||||
/singleton/proc/Initialize()
|
||||
|
||||
Reference in New Issue
Block a user