Freeciv21
Develop your civilization from humble roots to a global empire
techtools.h
Go to the documentation of this file.
1
/***********************************************************************
2
_ ._ Copyright (c) 1996-2021 Freeciv21 and Freeciv contributors.
3
\ | This file is part of Freeciv21. Freeciv21 is free software: you
4
\_| can redistribute it and/or modify it under the terms of the
5
.' '. GNU General Public License as published by the Free
6
:O O: Software Foundation, either version 3 of the License,
7
'/ \' or (at your option) any later version. You should have
8
:X: received a copy of the GNU General Public License along with
9
:X: Freeciv21. If not, see https://www.gnu.org/licenses/.
10
***********************************************************************/
11
#pragma once
12
13
#include "
player.h
"
14
#include "
tech.h
"
15
16
struct
research
;
17
18
void
research_apply_penalty
(
struct
research
*presearch,
Tech_type_id
tech,
19
int
penalty_percent);
20
void
do_tech_parasite_effect
(
struct
player
*pplayer);
21
22
void
send_research_info
(
const
struct
research
*presearch,
23
const
struct
conn_list *dest);
24
25
void
script_tech_learned
(
struct
research
*presearch,
26
struct
player
*originating_plr,
27
struct
advance
*tech,
const
char
*reason);
28
void
found_new_tech
(
struct
research
*presearch,
Tech_type_id
tech_found,
29
bool
was_discovery,
bool
saving_bulbs);
30
void
update_bulbs
(
struct
player
*pplayer,
int
bulbs,
bool
check_tech);
31
void
init_tech
(
struct
research
*presearch,
bool
update);
32
void
choose_tech
(
struct
research
*presearch,
Tech_type_id
tech);
33
void
choose_random_tech
(
struct
research
*presearch);
34
void
choose_tech_goal
(
struct
research
*presearch,
Tech_type_id
tech);
35
Tech_type_id
steal_a_tech
(
struct
player
*pplayer,
struct
player
*target,
36
Tech_type_id
preferred);
37
38
Tech_type_id
pick_free_tech
(
struct
research
*presearch);
39
void
give_immediate_free_tech
(
struct
research
*presearch,
Tech_type_id
tech);
40
void
give_initial_techs
(
struct
research
*presearch,
int
num_random_techs);
41
42
bool
tech_transfer
(
struct
player
*plr_recv,
struct
player
*plr_donor,
43
Tech_type_id
tech);
Tech_type_id
int Tech_type_id
Definition:
fc_types.h:294
player.h
advance
Definition:
tech.h:113
player
Definition:
player.h:231
research
Definition:
research.h:32
tech.h
found_new_tech
void found_new_tech(struct research *presearch, Tech_type_id tech_found, bool was_discovery, bool saving_bulbs)
Players sharing the research have got a new technology (from somewhere).
Definition:
techtools.cpp:341
choose_tech_goal
void choose_tech_goal(struct research *presearch, Tech_type_id tech)
Called when a player chooses the tech goal he wants to research (or when the server chooses it for hi...
Definition:
techtools.cpp:1055
research_apply_penalty
void research_apply_penalty(struct research *presearch, Tech_type_id tech, int penalty_percent)
Apply a penalty to the research.
Definition:
techtools.cpp:59
choose_tech
void choose_tech(struct research *presearch, Tech_type_id tech)
Called when a player chooses the tech he wants to research (or when the server chooses it for him aut...
Definition:
techtools.cpp:987
do_tech_parasite_effect
void do_tech_parasite_effect(struct player *pplayer)
Give technologies to players with EFT_TECH_PARASITE (traditionally from the Great Library).
Definition:
techtools.cpp:139
steal_a_tech
Tech_type_id steal_a_tech(struct player *pplayer, struct player *target, Tech_type_id preferred)
If victim has a tech which pplayer doesn't have, pplayer will get it.
Definition:
techtools.cpp:1227
init_tech
void init_tech(struct research *presearch, bool update)
Initializes tech data for the research.
Definition:
techtools.cpp:1075
pick_free_tech
Tech_type_id pick_free_tech(struct research *presearch)
Choose a free tech.
Definition:
techtools.cpp:1380
choose_random_tech
void choose_random_tech(struct research *presearch)
Finds and chooses (sets) a random research target from among all those available until presearch->res...
Definition:
techtools.cpp:972
give_immediate_free_tech
void give_immediate_free_tech(struct research *presearch, Tech_type_id tech)
Give an immediate free tech (probably chosen with pick_free_tech()).
Definition:
techtools.cpp:1399
send_research_info
void send_research_info(const struct research *presearch, const struct conn_list *dest)
Send research info for 'presearch' to 'dest'.
Definition:
techtools.cpp:273
update_bulbs
void update_bulbs(struct player *pplayer, int bulbs, bool check_tech)
Adds the given number of bulbs into the player's tech and (if necessary and 'check_tech' is TRUE) com...
Definition:
techtools.cpp:650
script_tech_learned
void script_tech_learned(struct research *presearch, struct player *originating_plr, struct advance *tech, const char *reason)
Emit script signal(s) for player/team learning new tech.
Definition:
techtools.cpp:77
give_initial_techs
void give_initial_techs(struct research *presearch, int num_random_techs)
Gives global (read from the game ruleset file) and nation (read from the nation ruleset files) initia...
Definition:
techtools.cpp:1179
tech_transfer
bool tech_transfer(struct player *plr_recv, struct player *plr_donor, Tech_type_id tech)
Check if the tech is lost by the donor or receiver.
Definition:
techtools.cpp:1432
server
techtools.h
Generated by
1.9.1