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:
Fluffy
2024-08-23 10:49:28 +00:00
committed by GitHub
parent cc5a31ab59
commit 41a05bc196
43 changed files with 177 additions and 146 deletions
+1 -3
View File
@@ -10,9 +10,7 @@
*
* A device used for rapid fabrication of things, built from a compressed matter cartridge
*/
/obj/item/rfd
abstract_type = /obj/item/rfd //This is an abstract, use one of the subtypes instead
ABSTRACT_TYPE(/obj/item/rfd)
name = "\improper Rapid Fabrication Device"
desc = "A device used for rapid fabrication. The matter decompression matrix is untuned, rendering it useless."
icon = 'icons/obj/rfd.dmi'
@@ -142,8 +142,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//////////////////
//FINE SMOKABLES//
//////////////////
/obj/item/clothing/mask/smokable
abstract_type = /obj/item/clothing/mask/smokable
ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
name = "smokable item"
desc = "You're not sure what this is. You should probably ahelp it."
icon = 'icons/obj/smokables.dmi'
@@ -2,8 +2,7 @@
#define MALFUNCTION_PERMANENT 2
/obj/item/implant
abstract_type = /obj/item/implant
ABSTRACT_TYPE(/obj/item/implant)
name = "implant"
icon = 'icons/obj/item/implants.dmi'
w_class = WEIGHT_CLASS_TINY