Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move some of the effect ids out. #38929

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ static const activity_id ACT_WAIT_WEATHER( "ACT_WAIT_WEATHER" );
static const activity_id ACT_WASH( "ACT_WASH" );
static const activity_id ACT_WEAR( "ACT_WEAR" );

static const efftype_id effect_blind( "blind" );
static const efftype_id effect_controlled( "controlled" );

static const zone_type_id zone_type_FARM_PLOT( "FARM_PLOT" );

static const skill_id skill_computer( "computer" );
Expand Down
3 changes: 3 additions & 0 deletions src/avatar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ static const bionic_id bio_eye_optic( "bio_eye_optic" );
static const bionic_id bio_memory( "bio_memory" );
static const bionic_id bio_watch( "bio_watch" );

static const efftype_id effect_contacts( "contacts" );
static const efftype_id effect_depressants( "depressants" );

class JsonIn;
class JsonOut;

Expand Down
2 changes: 2 additions & 0 deletions src/avatar_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

static const activity_id ACT_AIM( "ACT_AIM" );

static const efftype_id effect_amigara( "amigara" );

static const skill_id skill_swimming( "swimming" );

static const bionic_id bio_ups( "bio_ups" );
Expand Down
2 changes: 2 additions & 0 deletions src/ballistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "point.h"
#include "cata_string_consts.h"

static const efftype_id effect_bounced( "bounced" );

static void drop_or_embed_projectile( const dealt_projectile_attack &attack )
{
const auto &proj = attack.proj;
Expand Down
12 changes: 12 additions & 0 deletions src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@

static const activity_id ACT_OPERATION( "ACT_OPERATION" );

static const efftype_id effect_adrenaline( "adrenaline" );
static const efftype_id effect_adrenaline_mycus( "adrenaline_mycus" );
static const efftype_id effect_assisted( "assisted" );
static const efftype_id effect_asthma( "asthma" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_bloodworms( "bloodworms" );
static const efftype_id effect_brainworms( "brainworms" );
static const efftype_id effect_cig( "cig" );
static const efftype_id effect_datura( "datura" );
static const efftype_id effect_dermatik( "dermatik" );
static const efftype_id effect_drunk( "drunk" );

static const itype_id fuel_type_battery( "battery" );
static const itype_id fuel_type_sun_light( "sunlight" );
static const itype_id fuel_type_wind( "wind" );
Expand Down
52 changes: 0 additions & 52 deletions src/cata_string_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,6 @@

#include "type_id.h"

static const efftype_id effect_adrenaline( "adrenaline" );
static const efftype_id effect_adrenaline_mycus( "adrenaline_mycus" );
static const efftype_id effect_alarm_clock( "alarm_clock" );
static const efftype_id effect_allow_sleep( "allow_sleep" );
static const efftype_id effect_amigara( "amigara" );
static const efftype_id effect_antibiotic( "antibiotic" );
static const efftype_id effect_antibiotic_visible( "antibiotic_visible" );
static const efftype_id effect_asked_for_item( "asked_for_item" );
static const efftype_id effect_asked_personal_info( "asked_personal_info" );
static const efftype_id effect_asked_to_follow( "asked_to_follow" );
static const efftype_id effect_asked_to_lead( "asked_to_lead" );
static const efftype_id effect_asked_to_train( "asked_to_train" );
static const efftype_id effect_assisted( "assisted" );
static const efftype_id effect_asthma( "asthma" );
static const efftype_id effect_attention( "attention" );
static const efftype_id effect_badpoison( "badpoison" );
static const efftype_id effect_bandaged( "bandaged" );
static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_blisters( "blisters" );
static const efftype_id effect_bloodworms( "bloodworms" );
static const efftype_id effect_boomered( "boomered" );
static const efftype_id effect_bouldering( "bouldering" );
static const efftype_id effect_bounced( "bounced" );
static const efftype_id effect_brainworms( "brainworms" );
static const efftype_id effect_catch_up( "catch_up" );
static const efftype_id effect_cig( "cig" );
static const efftype_id effect_cold( "cold" );
static const efftype_id effect_common_cold( "common_cold" );
static const efftype_id effect_contacts( "contacts" );
static const efftype_id effect_controlled( "controlled" );
static const efftype_id effect_corroding( "corroding" );
static const efftype_id effect_cough_suppress( "cough_suppress" );
static const efftype_id effect_countdown( "countdown" );
static const efftype_id effect_crushed( "crushed" );
static const efftype_id effect_cureall( "cureall" );
static const efftype_id effect_currently_busy( "currently_busy" );
static const efftype_id effect_darkness( "darkness" );
static const efftype_id effect_datura( "datura" );
static const efftype_id effect_dazed( "dazed" );
static const efftype_id effect_deaf( "deaf" );
static const efftype_id effect_depressants( "depressants" );
static const efftype_id effect_dermatik( "dermatik" );
static const efftype_id effect_disabled( "disabled" );
static const efftype_id effect_disinfected( "disinfected" );
static const efftype_id effect_docile( "docile" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_dragging( "dragging" );
static const efftype_id effect_drunk( "drunk" );
static const efftype_id effect_earphones( "earphones" );
static const efftype_id effect_emp( "emp" );
static const efftype_id effect_evil( "evil" );
static const efftype_id effect_fearparalyze( "fearparalyze" );
Expand Down
22 changes: 22 additions & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,28 @@ static const activity_id ACT_TREE_COMMUNION( "ACT_TREE_COMMUNION" );
static const activity_id ACT_TRY_SLEEP( "ACT_TRY_SLEEP" );
static const activity_id ACT_WAIT_STAMINA( "ACT_WAIT_STAMINA" );

static const efftype_id effect_adrenaline( "adrenaline" );
static const efftype_id effect_alarm_clock( "alarm_clock" );
static const efftype_id effect_bandaged( "bandaged" );
static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_blisters( "blisters" );
static const efftype_id effect_boomered( "boomered" );
static const efftype_id effect_cold( "cold" );
static const efftype_id effect_common_cold( "common_cold" );
static const efftype_id effect_contacts( "contacts" );
static const efftype_id effect_controlled( "controlled" );
static const efftype_id effect_corroding( "corroding" );
static const efftype_id effect_cough_suppress( "cough_suppress" );
static const efftype_id effect_crushed( "crushed" );
static const efftype_id effect_darkness( "darkness" );
static const efftype_id effect_deaf( "deaf" );
static const efftype_id effect_disinfected( "disinfected" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_drunk( "drunk" );

static const trait_id trait_DEBUG_NODMG( "DEBUG_NODMG" );

static const skill_id skill_dodge( "dodge" );
Expand Down
2 changes: 2 additions & 0 deletions src/computer_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
#include "type_id.h"
#include "cata_string_consts.h"

static const efftype_id effect_amigara( "amigara" );

static const skill_id skill_computer( "computer" );

static const species_id HUMAN( "HUMAN" );
Expand Down
2 changes: 2 additions & 0 deletions src/condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "vpart_position.h"
#include "cata_string_consts.h"

static const efftype_id effect_currently_busy( "currently_busy" );

// throws an error on failure, so no need to return
std::string get_talk_varname( const JsonObject &jo, const std::string &member, bool check_value )
{
Expand Down
4 changes: 4 additions & 0 deletions src/consumption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ static const bionic_id bio_furnace( "bio_furnace" );
static const bionic_id bio_reactor( "bio_reactor" );
static const bionic_id bio_taste_blocker( "bio_taste_blocker" );

static const efftype_id effect_bloodworms( "bloodworms" );
static const efftype_id effect_brainworms( "brainworms" );
static const efftype_id effect_common_cold( "common_cold" );

const std::vector<std::string> carnivore_blacklist {{
flag_ALLERGEN_VEGGY, flag_ALLERGEN_FRUIT, flag_ALLERGEN_WHEAT, flag_ALLERGEN_NUT,
}
Expand Down
2 changes: 2 additions & 0 deletions src/crafting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
static const activity_id ACT_CRAFT( "ACT_CRAFT" );
static const activity_id ACT_DISASSEMBLE( "ACT_DISASSEMBLE" );

static const efftype_id effect_contacts( "contacts" );

static const skill_id skill_electronics( "electronics" );
static const skill_id skill_tailor( "tailor" );

Expand Down
4 changes: 4 additions & 0 deletions src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
#include "point.h"
#include "cata_string_consts.h"

static const efftype_id effect_blind( "blind" );
static const efftype_id effect_bounced( "bounced" );
static const efftype_id effect_downed( "downed" );

const std::map<std::string, m_size> Creature::size_map = {
{"TINY", MS_TINY}, {"SMALL", MS_SMALL}, {"MEDIUM", MS_MEDIUM},
{"LARGE", MS_LARGE}, {"HUGE", MS_HUGE}
Expand Down
2 changes: 2 additions & 0 deletions src/debug_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
#include "cata_string_consts.h"
#include "mapgendata.h"

static const efftype_id effect_asthma( "asthma" );

static const mtype_id mon_generator( "mon_generator" );

class vehicle;
Expand Down
4 changes: 4 additions & 0 deletions src/effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include "units.h"
#include "cata_string_consts.h"

static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_crushed( "crushed" );
static const efftype_id effect_downed( "downed" );

namespace
{
std::map<efftype_id, effect_type> effect_types;
Expand Down
3 changes: 3 additions & 0 deletions src/explosion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
#include "type_id.h"
#include "cata_string_consts.h"

static const efftype_id effect_blind( "blind" );
static const efftype_id effect_deaf( "deaf" );

static const itype_id fuel_type_none( "null" );

static const species_id ROBOT( "ROBOT" );
Expand Down
2 changes: 2 additions & 0 deletions src/game_inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ static const activity_id ACT_CONSUME_FOOD_MENU( "ACT_CONSUME_FOOD_MENU" );
static const activity_id ACT_CONSUME_DRINK_MENU( "ACT_CONSUME_DRINK_MENU" );
static const activity_id ACT_CONSUME_MEDS_MENU( "ACT_CONSUME_MEDS_MENU" );

static const efftype_id effect_assisted( "assisted" );

static const fault_id fault_bionic_salvaged( "fault_bionic_salvaged" );

static const skill_id skill_computer( "computer" );
Expand Down
2 changes: 2 additions & 0 deletions src/handle_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ static const activity_id ACT_WAIT( "ACT_WAIT" );
static const activity_id ACT_WAIT_STAMINA( "ACT_WAIT_STAMINA" );
static const activity_id ACT_WAIT_WEATHER( "ACT_WAIT_WEATHER" );

static const efftype_id effect_alarm_clock( "alarm_clock" );

static const skill_id skill_melee( "melee" );

static const quality_id qual_CUT( "CUT" );
Expand Down
2 changes: 2 additions & 0 deletions src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ static const activity_id ACT_HACKING( "ACT_HACKING" );
static const activity_id ACT_PICKUP( "ACT_PICKUP" );
static const activity_id ACT_PLANT_SEED( "ACT_PLANT_SEED" );

static const efftype_id effect_earphones( "earphones" );

static const trap_str_id tr_unfinished_construction( "tr_unfinished_construction" );

static const skill_id skill_computer( "computer" );
Expand Down
2 changes: 2 additions & 0 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ static const std::string CLOTHING_MOD_VAR_PREFIX( "clothing_mod_" );
static const ammotype ammo_battery( "battery" );
static const ammotype ammo_plutonium( "plutonium" );

static const efftype_id effect_cig( "cig" );

static const fault_id fault_gun_blackpowder( "fault_gun_blackpowder" );

static const skill_id skill_cooking( "cooking" );
Expand Down
26 changes: 26 additions & 0 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,32 @@ static const activity_id ACT_SHAVE( "ACT_SHAVE" );
static const activity_id ACT_VIBE( "ACT_VIBE" );
static const activity_id ACT_WASH( "ACT_WASH" );

static const efftype_id effect_adrenaline( "adrenaline" );
static const efftype_id effect_antibiotic( "antibiotic" );
static const efftype_id effect_antibiotic_visible( "antibiotic_visible" );
static const efftype_id effect_asthma( "asthma" );
static const efftype_id effect_attention( "attention" );
static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_bloodworms( "bloodworms" );
static const efftype_id effect_boomered( "boomered" );
static const efftype_id effect_bouldering( "bouldering" );
static const efftype_id effect_brainworms( "brainworms" );
static const efftype_id effect_cig( "cig" );
static const efftype_id effect_contacts( "contacts" );
static const efftype_id effect_corroding( "corroding" );
static const efftype_id effect_crushed( "crushed" );
static const efftype_id effect_cureall( "cureall" );
static const efftype_id effect_datura( "datura" );
static const efftype_id effect_dazed( "dazed" );
static const efftype_id effect_dermatik( "dermatik" );
static const efftype_id effect_docile( "docile" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_drunk( "drunk" );
static const efftype_id effect_earphones( "earphones" );

static const skill_id skill_computer( "computer" );
static const skill_id skill_cooking( "cooking" );
static const skill_id skill_electronics( "electronics" );
Expand Down
7 changes: 7 additions & 0 deletions src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ static const activity_id ACT_SPELLCASTING( "ACT_SPELLCASTING" );
static const activity_id ACT_STUDY_SPELL( "ACT_STUDY_SPELL" );
static const activity_id ACT_START_FIRE( "ACT_START_FIRE" );

static const efftype_id effect_asthma( "asthma" );
static const efftype_id effect_bandaged( "bandaged" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_disinfected( "disinfected" );
static const efftype_id effect_downed( "downed" );

static const fault_id fault_bionic_salvaged( "fault_bionic_salvaged" );

static const bionic_id bio_syringe( "bio_syringe" );
Expand Down
4 changes: 4 additions & 0 deletions src/map_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ static const species_id SPIDER( "SPIDER" );

static const bionic_id bio_heatsink( "bio_heatsink" );

static const efftype_id effect_badpoison( "badpoison" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_corroding( "corroding" );

void map::create_burnproducts( const tripoint &p, const item &fuel, const units::mass &burned_mass )
{
std::vector<material_id> all_mats = fuel.made_of();
Expand Down
3 changes: 3 additions & 0 deletions src/mattack_actors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#include "point.h"
#include "cata_string_consts.h"

static const efftype_id effect_badpoison( "badpoison" );
static const efftype_id effect_bite( "bite" );

// Simplified version of the function in monattack.cpp
static bool is_adjacent( const monster &z, const Creature &target )
{
Expand Down
4 changes: 4 additions & 0 deletions src/memorial_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include "stats_tracker.h"
#include "cata_string_consts.h"

static const efftype_id effect_adrenaline( "adrenaline" );
static const efftype_id effect_datura( "datura" );
static const efftype_id effect_drunk( "drunk" );

static const trap_str_id tr_bubblewrap( "tr_bubblewrap" );
static const trap_str_id tr_glass( "tr_glass" );
static const trap_str_id tr_beartrap( "tr_beartrap" );
Expand Down
15 changes: 15 additions & 0 deletions src/monattack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@

static const activity_id ACT_RELOAD( "ACT_RELOAD" );

static const efftype_id effect_assisted( "assisted" );
static const efftype_id effect_bite( "bite" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_boomered( "boomered" );
static const efftype_id effect_controlled( "controlled" );
static const efftype_id effect_corroding( "corroding" );
static const efftype_id effect_countdown( "countdown" );
static const efftype_id effect_darkness( "darkness" );
static const efftype_id effect_dazed( "dazed" );
static const efftype_id effect_deaf( "deaf" );
static const efftype_id effect_dermatik( "dermatik" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_dragging( "dragging" );

static const skill_id skill_gun( "gun" );
static const skill_id skill_launcher( "launcher" );
static const skill_id skill_melee( "melee" );
Expand Down
5 changes: 5 additions & 0 deletions src/mondeath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
#include "mattack_actors.h"
#include "cata_string_consts.h"

static const efftype_id effect_amigara( "amigara" );
static const efftype_id effect_boomered( "boomered" );
static const efftype_id effect_controlled( "controlled" );
static const efftype_id effect_darkness( "darkness" );

static const species_id species_BLOB( "BLOB" );
static const species_id ZOMBIE( "ZOMBIE" );

Expand Down
2 changes: 2 additions & 0 deletions src/monexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
static const activity_id ACT_MILK( "ACT_MILK" );
static const activity_id ACT_PLAY_WITH_PET( "ACT_PLAY_WITH_PET" );

static const efftype_id effect_controlled( "controlled" );

static const skill_id skill_survival( "survival" );

static const species_id ZOMBIE( "ZOMBIE" );
Expand Down
6 changes: 6 additions & 0 deletions src/monmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
#include "string_formatter.h"
#include "cata_string_consts.h"

static const efftype_id effect_bouldering( "bouldering" );
static const efftype_id effect_countdown( "countdown" );
static const efftype_id effect_docile( "docile" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_dragging( "dragging" );

static const species_id FUNGUS( "FUNGUS" );
static const species_id INSECT( "INSECT" );
static const species_id SPIDER( "SPIDER" );
Expand Down
Loading