1 #include <memory>
2
3 #include "character_id.h"
4 #include "item.h"
5 #include "magic.h"
6 #include "npc.h"
7 #include "pimpl.h"
8 #include "player.h"
9 #include "player_activity.h"
10 #include "point.h"
11 #include "talker_character.h"
12 #include "vehicle.h"
13
14 class time_duration;
15
disp_name() const16 std::string talker_character::disp_name() const
17 {
18 return me_chr->disp_name();
19 }
20
getID() const21 character_id talker_character::getID() const
22 {
23 return me_chr->getID();
24 }
25
is_male() const26 bool talker_character::is_male() const
27 {
28 return me_chr->male;
29 }
30
get_grammatical_genders() const31 std::vector<std::string> talker_character::get_grammatical_genders() const
32 {
33 return me_chr->get_grammatical_genders();
34 }
35
posx() const36 int talker_character::posx() const
37 {
38 return me_chr->posx();
39 }
40
posy() const41 int talker_character::posy() const
42 {
43 return me_chr->posy();
44 }
45
posz() const46 int talker_character::posz() const
47 {
48 return me_chr->posz();
49 }
50
pos() const51 tripoint talker_character::pos() const
52 {
53 return me_chr->pos();
54 }
55
global_omt_location() const56 tripoint_abs_omt talker_character::global_omt_location() const
57 {
58 return me_chr->global_omt_location();
59 }
60
str_cur() const61 int talker_character::str_cur() const
62 {
63 return me_chr->str_cur;
64 }
65
dex_cur() const66 int talker_character::dex_cur() const
67 {
68 return me_chr->dex_cur;
69 }
70
int_cur() const71 int talker_character::int_cur() const
72 {
73 return me_chr->int_cur;
74 }
75
per_cur() const76 int talker_character::per_cur() const
77 {
78 return me_chr->per_cur;
79 }
80
has_trait(const trait_id & trait_to_check) const81 bool talker_character::has_trait( const trait_id &trait_to_check ) const
82 {
83 return me_chr->has_trait( trait_to_check );
84 }
85
is_deaf() const86 bool talker_character::is_deaf() const
87 {
88 return me_chr->is_deaf();
89 }
90
is_mute() const91 bool talker_character::is_mute() const
92 {
93 return me_chr->is_mute();
94 }
95
set_mutation(const trait_id & new_trait)96 void talker_character::set_mutation( const trait_id &new_trait )
97 {
98 me_chr->set_mutation( new_trait );
99 }
100
unset_mutation(const trait_id & old_trait)101 void talker_character::unset_mutation( const trait_id &old_trait )
102 {
103 me_chr->unset_mutation( old_trait );
104 }
105
has_trait_flag(const json_character_flag & trait_flag_to_check) const106 bool talker_character::has_trait_flag( const json_character_flag &trait_flag_to_check ) const
107 {
108 return me_chr->has_trait_flag( trait_flag_to_check );
109 }
110
crossed_threshold() const111 bool talker_character::crossed_threshold() const
112 {
113 return me_chr->crossed_threshold();
114 }
115
num_bionics() const116 int talker_character::num_bionics() const
117 {
118 return me_chr->num_bionics();
119 }
120
has_max_power() const121 bool talker_character::has_max_power() const
122 {
123 return me_chr->has_max_power();
124 }
125
has_bionic(const bionic_id & bionics_id) const126 bool talker_character::has_bionic( const bionic_id &bionics_id ) const
127 {
128 return me_chr->has_bionic( bionics_id );
129 }
130
knows_spell(const spell_id & sp) const131 bool talker_character::knows_spell( const spell_id &sp ) const
132 {
133 return me_chr->magic->knows_spell( sp );
134 }
135
get_skill_level(const skill_id & skill) const136 int talker_character::get_skill_level( const skill_id &skill ) const
137 {
138 return me_chr->get_skill_level( skill );
139 }
140
knows_proficiency(const proficiency_id & proficiency) const141 bool talker_character::knows_proficiency( const proficiency_id &proficiency ) const
142 {
143 return me_chr->has_proficiency( proficiency );
144 }
145
has_effect(const efftype_id & effect_id) const146 bool talker_character::has_effect( const efftype_id &effect_id ) const
147 {
148 return me_chr->has_effect( effect_id );
149 }
150
add_effect(const efftype_id & new_effect,const time_duration & dur,bool permanent)151 void talker_character::add_effect( const efftype_id &new_effect, const time_duration &dur,
152 bool permanent )
153 {
154 me_chr->add_effect( new_effect, dur, permanent );
155 }
156
remove_effect(const efftype_id & old_effect)157 void talker_character::remove_effect( const efftype_id &old_effect )
158 {
159 me_chr->remove_effect( old_effect );
160 }
161
get_value(const std::string & var_name) const162 std::string talker_character::get_value( const std::string &var_name ) const
163 {
164 return me_chr->get_value( var_name );
165 }
166
set_value(const std::string & var_name,const std::string & value)167 void talker_character::set_value( const std::string &var_name, const std::string &value )
168 {
169 me_chr->set_value( var_name, value );
170 }
171
remove_value(const std::string & var_name)172 void talker_character::remove_value( const std::string &var_name )
173 {
174 me_chr->remove_value( var_name );
175 }
176
is_wearing(const itype_id & item_id) const177 bool talker_character::is_wearing( const itype_id &item_id ) const
178 {
179 return me_chr->is_wearing( item_id );
180 }
181
charges_of(const itype_id & item_id) const182 int talker_character::charges_of( const itype_id &item_id ) const
183 {
184 return me_chr->charges_of( item_id );
185 }
186
has_charges(const itype_id & item_id,int count) const187 bool talker_character::has_charges( const itype_id &item_id, int count ) const
188 {
189 return me_chr->has_charges( item_id, count );
190 }
191
use_charges(const itype_id & item_name,const int count)192 std::list<item> talker_character::use_charges( const itype_id &item_name, const int count )
193 {
194 return me_chr->use_charges( item_name, count );
195 }
196
use_amount(const itype_id & item_name,const int count)197 std::list<item> talker_character::use_amount( const itype_id &item_name, const int count )
198 {
199 return me_chr->use_amount( item_name, count );
200 }
201
has_amount(const itype_id & item_id,int count) const202 bool talker_character::has_amount( const itype_id &item_id, int count ) const
203 {
204 return me_chr->has_amount( item_id, count );
205 }
206
cash() const207 int talker_character::cash() const
208 {
209 return me_chr->cash;
210 }
211
items_with(const std::function<bool (const item &)> & filter) const212 std::vector<item *> talker_character::items_with( const std::function<bool( const item & )>
213 &filter ) const
214 {
215 return me_chr->items_with( filter );
216 }
217
i_add(const item & new_item)218 void talker_character::i_add( const item &new_item )
219 {
220 me_chr->i_add( new_item );
221 }
222
remove_items_with(const std::function<bool (const item &)> & filter)223 void talker_character::remove_items_with( const std::function<bool( const item & )> &filter )
224 {
225 me_chr->remove_items_with( filter );
226 }
227
unarmed_attack() const228 bool talker_character::unarmed_attack() const
229 {
230 return me_chr->unarmed_attack();
231 }
232
can_stash_weapon() const233 bool talker_character::can_stash_weapon() const
234 {
235 return me_chr->can_pickVolume( me_chr->weapon );
236 }
237
has_stolen_item(const talker & guy) const238 bool talker_character::has_stolen_item( const talker &guy ) const
239 {
240 const player *owner = guy.get_character();
241 if( owner ) {
242 for( auto &elem : me_chr->inv_dump() ) {
243 if( elem->is_old_owner( *owner, true ) ) {
244 return true;
245 }
246 }
247 }
248 return false;
249 }
250
get_faction() const251 faction *talker_character::get_faction() const
252 {
253 return me_chr->get_faction();
254 }
255
short_description() const256 std::string talker_character::short_description() const
257 {
258 return me_chr->short_description();
259 }
260
has_activity() const261 bool talker_character::has_activity() const
262 {
263 return !me_chr->activity.is_null();
264 }
265
is_mounted() const266 bool talker_character::is_mounted() const
267 {
268 return me_chr->is_mounted();
269 }
270
get_fatigue() const271 int talker_character::get_fatigue() const
272 {
273 return me_chr->get_fatigue();
274 }
275
get_hunger() const276 int talker_character::get_hunger() const
277 {
278 return me_chr->get_hunger();
279 }
280
get_thirst() const281 int talker_character::get_thirst() const
282 {
283 return me_chr->get_thirst();
284 }
285
is_in_control_of(const vehicle & veh) const286 bool talker_character::is_in_control_of( const vehicle &veh ) const
287 {
288 return veh.player_in_control( *me_chr );
289 }
290
shout(const std::string & speech,bool order)291 void talker_character::shout( const std::string &speech, bool order )
292 {
293 me_chr->shout( speech, order );
294 }
295