summaryrefslogtreecommitdiff
path: root/vampirism.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vampirism.patch')
-rw-r--r--vampirism.patch27
1 files changed, 15 insertions, 12 deletions
diff --git a/vampirism.patch b/vampirism.patch
index 8386f75..2ae5cac 100644
--- a/vampirism.patch
+++ b/vampirism.patch
@@ -4,10 +4,10 @@
static const species_id HUMAN( "HUMAN" );
static const species_id ZOMBIE( "ZOMBIE" );
-+static const std::string trait_flag_VAMPIRE( "VAMPIRE" );
- static const std::string trait_flag_CANNIBAL( "CANNIBAL" );
- static const std::string trait_flag_PSYCHOPATH( "PSYCHOPATH" );
- static const std::string trait_flag_SAPIOVORE( "SAPIOVORE" );
++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" );
+ static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" );
+ static const trait_flag_str_id trait_flag_PSYCHOPATH( "PSYCHOPATH" );
+ static const trait_flag_str_id trait_flag_SAPIOVORE( "SAPIOVORE" );
@@ -278,6 +278,8 @@
static const std::string flag_SUPPORTS_ROOF( "SUPPORTS_ROOF" );
static const std::string flag_TREE( "TREE" );
@@ -116,7 +116,7 @@
--- a/src/consumption.cpp
+++ b/src/consumption.cpp
-@@ -108,6 +108,7 @@
+@@ -108,8 +108,10 @@
static const trait_id trait_THRESH_LUPINE( "THRESH_LUPINE" );
static const trait_id trait_THRESH_PLANT( "THRESH_PLANT" );
static const trait_id trait_THRESH_URSINE( "THRESH_URSINE" );
@@ -124,6 +124,9 @@
static const trait_id trait_VEGETARIAN( "VEGETARIAN" );
static const trait_id trait_WATERSLEEP( "WATERSLEEP" );
+ static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" );
++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" );
+
@@ -114,6 +114,10 @@
static const std::string flag_HIDDEN_HALLU( "HIDDEN_HALLU" );
+static const std::string flag_ALLERGEN_ALCOHOL( "ALLERGEN_ALCOHOL" );
@@ -157,7 +160,7 @@
_( "Eww. Inedible plant stuff!" ) );
}
-+ if( has_trait_flag( "VAMPIRE" ) && food.has_any_flag( vamp_blacklist ) &&
++ if( has_trait_flag( trait_flag_VAMPIRE ) && food.has_any_flag( vamp_blacklist ) &&
+ !food.has_flag( flag_VAMPIRISM_OK ) ) {
+ return ret_val<edible_rating>::make_failure( edible_rating::inedible_mutation,
+ _( "Bleh. This isn't blood!" ) );
@@ -170,16 +173,16 @@
}
}
-+ if( food.has_flag( flag_VAMPIRISM ) && ( !has_trait_flag( "VAMPIRE" ) &&
-+ !has_trait_flag( "CANNIBAL" ) ) ) {
++ if( food.has_flag( flag_VAMPIRISM ) && ( !has_trait_flag( trait_flag_VAMPIRE ) &&
++ !has_trait_flag( trait_flag_CANNIBAL ) ) ) {
+ add_consequence( _( "The thought of drinking human blood makes you feel sick." ),
+ edible_rating::vampirism );
+ }
+
const bool carnivore = has_trait( trait_CARNIVORE );
-- if( food.has_flag( flag_CANNIBALISM ) && !has_trait_flag( "CANNIBAL" ) ) {
+- if( food.has_flag( flag_CANNIBALISM ) && !has_trait_flag( trait_flag_CANNIBAL ) ) {
+ if( ( food.has_flag( flag_CANNIBALISM ) && !food.has_flag( flag_VAMPIRISM ) ) &&
-+ !has_trait_flag( "CANNIBAL" ) ) {
++ !has_trait_flag( trait_flag_CANNIBAL ) ) {
add_consequence( _( "The thought of eating human flesh makes you feel sick." ),
edible_rating::cannibalism );
}
@@ -244,8 +247,8 @@
@@ -148,6 +148,7 @@
static const species_id ROBOT( "ROBOT" );
- static const std::string trait_flag_CANNIBAL( "CANNIBAL" );
-+static const std::string trait_flag_VAMPIRE( "VAMPIRE" );
+ static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" );
++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" );
static const bionic_id bio_digestion( "bio_digestion" );