mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #13290 from VOREStation/upstream-merge-8660
[MIRROR] Adds some core behavior code, uses it to fix a small bug (ABLE TO BE MERGED)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The actual modifiers (if used) for these are stored inside code/modules/mob/_modifiers/traits.dm
|
||||
|
||||
/datum/trait/modifier
|
||||
abstract_type = /datum/trait/modifier
|
||||
var/modifier_type = null // Type to add to the mob post spawn.
|
||||
|
||||
/datum/trait/modifier/apply_trait_post_spawn(mob/living/L)
|
||||
@@ -26,6 +27,7 @@
|
||||
|
||||
// Physical traits are what they sound like, and involve the character's physical body, as opposed to their mental state.
|
||||
/datum/trait/modifier/physical
|
||||
abstract_type = /datum/trait/modifier/physical
|
||||
name = "Physical"
|
||||
category = "Physical"
|
||||
|
||||
@@ -198,6 +200,7 @@
|
||||
// 'Mental' traits are just those that only sapients can have, for now, and generally involves fears.
|
||||
// So far, all of them are just for fluff/don't have mechanical effects.
|
||||
/datum/trait/modifier/mental
|
||||
abstract_type = /datum/trait/modifier/mental
|
||||
name = "Mental"
|
||||
category = "Mental"
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ var/list/trait_categories = list() // The categories available for the trait men
|
||||
/hook/startup/proc/populate_trait_list()
|
||||
|
||||
//create a list of trait datums
|
||||
for(var/trait_type in typesof(/datum/trait) - list(/datum/trait, /datum/trait/modifier))
|
||||
for(var/trait_type as anything in subtypesof(/datum/trait))
|
||||
if (is_abstract(trait_type))
|
||||
continue
|
||||
var/datum/trait/T = new trait_type
|
||||
if(!T.is_available())
|
||||
qdel(T)
|
||||
@@ -144,6 +146,7 @@ var/list/trait_categories = list() // The categories available for the trait men
|
||||
|
||||
|
||||
/datum/trait
|
||||
abstract_type = /datum/trait
|
||||
var/name = null // Name to show on UI
|
||||
var/desc = null // Description of what it does, also shown on UI.
|
||||
var/list/mutually_exclusive = list() // List of trait types which cannot be taken alongside this trait.
|
||||
|
||||
Reference in New Issue
Block a user