naev 0.12.6
player_inventory.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "player.h"
7
11typedef struct PlayerItem_ {
12 char *name;
15
16void player_inventoryClear( void );
17const PlayerItem *player_inventory( void );
18int player_inventoryAmount( const char *name );
19int player_inventoryAdd( const char *name, int amount );
20int player_inventoryRemove( const char *name, int amount );
int player_inventoryAdd(const char *name, int amount)
Adds an item to the player inventory.
void player_inventoryClear(void)
Clears the inventory and frees memory.
int player_inventoryRemove(const char *name, int amount)
Removes an item from the player inventory.
const PlayerItem * player_inventory(void)
Gets the whole player inventory.
int player_inventoryAmount(const char *name)
Gets the amount of an item the player has.
Represents an item in the player inventory.