mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +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,7 +1,5 @@
|
||||
//For things that swim and don't do much else.
|
||||
/mob/living/simple_animal/aquatic
|
||||
abstract_type = /mob/living/simple_animal/aquatic
|
||||
|
||||
ABSTRACT_TYPE(/mob/living/simple_animal/aquatic)
|
||||
name = "aquatic animal"
|
||||
desc = DESC_PARENT
|
||||
icon = 'icons/mob/npc/fish.dmi'
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/mob/living/simple_animal/hostile/commanded
|
||||
abstract_type = /mob/living/simple_animal/hostile/commanded
|
||||
|
||||
ABSTRACT_TYPE(/mob/living/simple_animal/hostile/commanded)
|
||||
name = "commanded"
|
||||
var/short_name = null
|
||||
stance = COMMANDED_STOP
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/mob/living/simple_animal/hostile
|
||||
abstract_type = /mob/living/simple_animal/hostile
|
||||
|
||||
ABSTRACT_TYPE(/mob/living/simple_animal/hostile)
|
||||
faction = "hostile"
|
||||
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
|
||||
var/mob/living/target_mob
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//For things that swim and don't do much else, but also bite!
|
||||
/mob/living/simple_animal/hostile/retaliate/aquatic
|
||||
abstract_type = /mob/living/simple_animal/hostile/retaliate/aquatic
|
||||
|
||||
ABSTRACT_TYPE(/mob/living/simple_animal/hostile/retaliate/aquatic)
|
||||
name = "aquatic animal"
|
||||
desc = DESC_PARENT
|
||||
icon = 'icons/mob/npc/fish.dmi'
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/mob/living/simple_animal/hostile/retaliate
|
||||
abstract_type = /mob/living/simple_animal/hostile/retaliate
|
||||
|
||||
ABSTRACT_TYPE(/mob/living/simple_animal/hostile/retaliate)
|
||||
var/list/enemies = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/Destroy()
|
||||
|
||||
Reference in New Issue
Block a user