5 #include "gb/commands/production.h" 11 #include "gb/GB_server.h" 12 #include "gb/buffers.h" 13 #include "gb/files_shl.h" 14 #include "gb/getplace.h" 21 #include "gb/tweakables.h" 26 player_t Playernum = g.player;
27 governor_t Governor = g.governor;
30 if (!
isset(Stars[star]->explored, Playernum))
return;
32 for (
auto i = 0; i < Stars[star]->numplanets; i++) {
35 if (pl.info[Playernum - 1].explored &&
36 pl.info[Playernum - 1].numsectsowned &&
37 (!Governor || Stars[star]->governor[Playernum - 1] == Governor)) {
39 buf,
" %c %4.4s/%-4.4s%c%3d%8.4f%8ld%3d%6d%5d%6d %6ld %3d%8.2f\n",
40 Psymbol[pl.type], Stars[star]->name, Stars[star]->pnames[i],
41 (pl.info[Playernum - 1].autorep ?
'*' :
' '),
42 Stars[star]->governor[Playernum - 1],
43 pl.info[Playernum - 1].prod_tech, pl.total_resources,
44 pl.info[Playernum - 1].prod_crystals, pl.info[Playernum - 1].prod_res,
45 pl.info[Playernum - 1].prod_dest, pl.info[Playernum - 1].prod_fuel,
46 pl.info[Playernum - 1].prod_money, pl.info[Playernum - 1].tox_thresh,
47 pl.info[Playernum - 1].est_production);
48 notify(Playernum, Governor, buf);
55 const player_t Playernum = g.player;
56 const governor_t Governor = g.governor;
60 notify(Playernum, Governor,
61 " ============ Production Report ==========\n");
62 notify(Playernum, Governor,
63 " Planet gov tech deposit x res " 64 "des fuel tax tox est prod\n");
66 race = races[Playernum - 1];
70 for (starnum_t star = 0; star < Sdata.numstars; star++)
73 for (
int i = 1; i < argv.size(); i++) {
74 where = getplace(g, argv[i], 0);
75 if (where.err || (where.level == ScopeLevel::LEVEL_UNIV) ||
76 (where.level == ScopeLevel::LEVEL_SHIP)) {
77 sprintf(buf,
"Bad location `%s'.\n", argv[i].c_str());
78 notify(Playernum, Governor, buf);
81 production_at_star(g, where.snum);
Planet getplanet(const starnum_t star, const planetnum_t pnum)
void production_at_star(GameObj &g, starnum_t star)
void production(const command_t &argv, GameObj &g)
void getsdata(struct stardata *S)
void getstar(startype **s, int star)