Porting GetComponent macros removal, and some related changes.
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
|
||||
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
|
||||
|
||||
//shorthand
|
||||
#define GET_COMPONENT_FROM(varname, path, target) var##path/##varname = ##target.GetComponent(##path)
|
||||
#define GET_COMPONENT(varname, path) GET_COMPONENT_FROM(varname, path, src)
|
||||
|
||||
#define COMPONENT_INCOMPATIBLE 1
|
||||
|
||||
// How multiple components of the exact same type are handled in the same datum
|
||||
@@ -228,6 +224,9 @@
|
||||
//Food
|
||||
#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
|
||||
//Gibs
|
||||
#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
|
||||
|
||||
//Mood
|
||||
#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code.
|
||||
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#define IF_HAS_BLOOD_DNA(__thing) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA))
|
||||
#define IF_HAS_BLOOD_DNA_AND(__thing, __conditions...) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA) && (##__conditions))
|
||||
#define IF_HAS_BLOOD_DNA(__thing) var/datum/component/forensics/__FR##__thing = __thing.GetComponent(/datum/component/forensics); if(__FR##__thing && length(__FR##__thing.blood_DNA))
|
||||
#define IF_HAS_BLOOD_DNA_AND(__thing, __conditions...) var/datum/component/forensics/__FR##__thing = __thing.GetComponent(/datum/component/forensics); if(__FR##__thing && length(__FR##__thing.blood_DNA) && (##__conditions))
|
||||
|
||||
Reference in New Issue
Block a user