UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
aliencontainment.h
Go to the documentation of this file.
1
5
6
/*
7
Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
*/
24
25
#pragma once
26
27
#include "
aliencargo.h
"
28
#include "
cp_capacity.h
"
29
33
class
AlienContainment
:
public
AlienCargo
{
34
protected
:
35
capacities_t
*
aliveCapacity
;
36
capacities_t
*
deadCapacity
;
37
38
public
:
39
virtual
bool
add
(
const
teamDef_t
* team,
int
alive,
int
dead);
40
virtual
bool
add
(
const
char
* teamId,
int
alive,
int
dead);
41
42
static
bool
isLifeSupported
(
const
teamDef_t
* team);
43
static
int
getCapacityNeedForAlien
(
const
teamDef_t
* teamDef,
const
bool
isDead);
44
45
AlienContainment
(
capacities_t
*
aliveCapacity
,
capacities_t
*
deadCapacity
);
46
virtual
~AlienContainment
(
void
);
47
private
:
48
void
resetCurrentCapacities
(
void
);
49
};
aliencargo.h
Alien cargo class header.
AlienCargo::AlienCargo
AlienCargo(void)
Creates and initializes AlienCargo object.
Definition
aliencargo.cpp:206
AlienContainment::AlienContainment
AlienContainment(capacities_t *aliveCapacity, capacities_t *deadCapacity)
Creates and initializes AlienContainment object.
Definition
aliencontainment.cpp:129
AlienContainment::deadCapacity
capacities_t * deadCapacity
Definition
aliencontainment.h:36
AlienContainment::aliveCapacity
capacities_t * aliveCapacity
Definition
aliencontainment.h:35
AlienContainment::isLifeSupported
static bool isLifeSupported(const teamDef_t *team)
Returns if storing a specific life form is supported by the containment.
Definition
aliencontainment.cpp:57
AlienContainment::resetCurrentCapacities
void resetCurrentCapacities(void)
Private metod to reset current capacities.
Definition
aliencontainment.cpp:45
AlienContainment::add
virtual bool add(const teamDef_t *team, int alive, int dead)
Add aliens to the containment by teamDef.
Definition
aliencontainment.cpp:86
AlienContainment::~AlienContainment
virtual ~AlienContainment(void)
Destroys AlienContainer with it's internal data.
Definition
aliencontainment.cpp:137
AlienContainment::getCapacityNeedForAlien
static int getCapacityNeedForAlien(const teamDef_t *teamDef, const bool isDead)
Returns the number of capacity needed for an alien in the containment.
Definition
aliencontainment.cpp:37
cp_capacity.h
capacities_t
Store capacities in base.
Definition
cp_capacity.h:41
teamDef_t
Definition
chr_shared.h:307
src
client
cgame
campaign
aliencontainment.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0