forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
veh_utils.h
30 lines (26 loc) · 890 Bytes
/
veh_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#ifndef CATA_SRC_VEH_UTILS_H
#define CATA_SRC_VEH_UTILS_H
#include "type_id.h"
class vehicle;
class Character;
class vpart_info;
struct vehicle_part;
namespace veh_utils
{
/** Calculates xp for interacting with given part. */
int calc_xp_gain( const vpart_info &vp, const skill_id &sk, const Character &who );
/**
* Returns a part on a given vehicle that a given character can repair.
* Prefers the most damaged parts that don't need replacements.
* If no such part exists, returns a null part.
*/
vehicle_part &most_repairable_part( vehicle &veh, Character &who_arg,
bool only_repairable = false );
/**
* Repairs a given part on a given vehicle by given character.
* Awards xp and consumes components.
*/
bool repair_part( vehicle &veh, vehicle_part &pt, Character &who );
} // namespace veh_utils
#endif // CATA_SRC_VEH_UTILS_H