~greg1989/s25rttr/very-low-ressources

« back to all changes in this revision

Viewing changes to src/nobHQ.cpp

  • Committer: greg1989
  • Date: 2010-12-30 14:10:35 UTC
  • Revision ID: greg1989@web.de-20101230141035-wqd58065gxl7s43w
Changed the order of the goods and related enums for start_wares

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        // Alter mit Bau setzen
46
46
        SetAge();
47
47
 
48
 
        // ins Milit�rquadrat einf�gen
 
48
        // ins Milit�rquadrat einf�gen
49
49
        gwg->GetMilitarySquare(x,y).push_back(this);
50
50
        gwg->RecalcTerritory(this,GetMilitaryRadius(),false,true);
51
51
 
53
53
        // StartWaren setzen ( provisorisch )
54
54
        switch(GameClient::inst().GetGGS().start_wares)
55
55
        {
 
56
        //sehr wenig
 
57
 
 
58
                case 0:
 
59
                        goods.goods[GD_BEER] = 0;
 
60
                        goods.goods[GD_TONGS] = 1;
 
61
                        goods.goods[GD_HAMMER] = 4;
 
62
                        goods.goods[GD_AXE] = 1;
 
63
                        goods.goods[GD_SAW] = 0;
 
64
                        goods.goods[GD_PICKAXE] = 0;
 
65
                        goods.goods[GD_SHOVEL] = 1;
 
66
                        goods.goods[GD_CRUCIBLE] = 1;
 
67
                        goods.goods[GD_RODANDLINE] = 1;//??
 
68
                        goods.goods[GD_SCYTHE] = 2;//??
 
69
                        goods.goods[GD_WATEREMPTY] = 0;
 
70
                        goods.goods[GD_WATER] = 0;
 
71
                        goods.goods[GD_CLEAVER] = 0;
 
72
                        goods.goods[GD_ROLLINGPIN] = 1;
 
73
                        goods.goods[GD_BOW] = 0;
 
74
                        goods.goods[GD_BOAT] = 0;
 
75
                        goods.goods[GD_SWORD] = 0;
 
76
                        goods.goods[GD_IRON] = 0;
 
77
                        goods.goods[GD_FLOUR] = 0;
 
78
                        goods.goods[GD_FISH] = 1;
 
79
                        goods.goods[GD_BREAD] = 2;
 
80
                        goods.goods[GD_SHIELDROMANS] = 0;
 
81
                        goods.goods[GD_WOOD] = 6;
 
82
                        goods.goods[GD_BOARDS] = 11;
 
83
                        goods.goods[GD_STONES] = 17;
 
84
                        goods.goods[GD_SHIELDVIKINGS] = 0;
 
85
                        goods.goods[GD_SHIELDAFRICANS] = 0;
 
86
                        goods.goods[GD_GRAIN] = 0;
 
87
                        goods.goods[GD_COINS] = 0;
 
88
                        goods.goods[GD_GOLD] = 0;
 
89
                        goods.goods[GD_IRONORE] = 4;
 
90
                        goods.goods[GD_COAL] = 4;
 
91
                        goods.goods[GD_MEAT] = 0;
 
92
                        goods.goods[GD_HAM] = 0;
 
93
                        goods.goods[GD_SHIELDJAPANESE] = 0;
 
94
 
 
95
                        goods.people[JOB_HELPER] = 13;
 
96
                        goods.people[JOB_WOODCUTTER] = 2;
 
97
                        goods.people[JOB_FISHER] = 0;
 
98
                        goods.people[JOB_FORESTER] = 1;
 
99
                        goods.people[JOB_CARPENTER] = 1;
 
100
                        goods.people[JOB_STONEMASON] = 1;
 
101
                        goods.people[JOB_HUNTER] = 1;
 
102
                        goods.people[JOB_FARMER] = 0;
 
103
                        goods.people[JOB_MILLER] = 0;
 
104
                        goods.people[JOB_BAKER] = 0;
 
105
                        goods.people[JOB_BUTCHER] = 0;
 
106
                        goods.people[JOB_MINER] = 2;
 
107
                        goods.people[JOB_BREWER] = 0;
 
108
                        goods.people[JOB_PIGBREEDER] = 0;
 
109
                        goods.people[JOB_DONKEYBREEDER] = 0;
 
110
                        goods.people[JOB_IRONFOUNDER] = 0;
 
111
                        goods.people[JOB_MINTER] = 0;
 
112
                        goods.people[JOB_METALWORKER] = 0;
 
113
                        goods.people[JOB_ARMORER] = 1;
 
114
                        goods.people[JOB_BUILDER] = 2;
 
115
                        goods.people[JOB_PLANER] = 1;
 
116
                        goods.people[JOB_PRIVATE] = 13;
 
117
                        goods.people[JOB_PRIVATEFIRSTCLASS] = 0;
 
118
                        goods.people[JOB_SERGEANT] = 0;
 
119
                        goods.people[JOB_OFFICER] = 0;
 
120
                        goods.people[JOB_GENERAL] = 0;
 
121
                        goods.people[JOB_GEOLOGIST] = 2;
 
122
                        goods.people[JOB_SHIPWRIGHT] = 0;
 
123
                        goods.people[JOB_SCOUT] = 1;
 
124
                        goods.people[JOB_PACKDONKEY] = 2;
 
125
                        break;
 
126
 
56
127
        // Wenig
57
 
        case 0:
 
128
        case 1:
58
129
 
59
130
                goods.goods[GD_BEER] = 0;
60
131
                goods.goods[GD_TONGS] = 0;
125
196
                break;
126
197
 
127
198
        // Mittel
128
 
        case 1:
 
199
        case 2:
129
200
 
130
201
                goods.goods[GD_BEER] = 6;
131
202
                goods.goods[GD_TONGS] = 0;
196
267
                break;
197
268
 
198
269
        // Viel
199
 
        case 2:
 
270
        case 3:
200
271
                goods.goods[GD_BEER] = 12;
201
272
                goods.goods[GD_TONGS] = 0;
202
273
                goods.goods[GD_HAMMER] = 32;
265
336
                goods.people[JOB_PACKDONKEY] = 16;
266
337
                break;
267
338
                
268
 
        //sehr wenig
269
 
 
270
 
        case 3:
271
 
                goods.goods[GD_BEER] = 0;
272
 
                goods.goods[GD_TONGS] = 1;
273
 
                goods.goods[GD_HAMMER] = 4;
274
 
                goods.goods[GD_AXE] = 1;
275
 
                goods.goods[GD_SAW] = 0;        
276
 
                goods.goods[GD_PICKAXE] = 0;
277
 
                goods.goods[GD_SHOVEL] = 1;
278
 
                goods.goods[GD_CRUCIBLE] = 1;
279
 
                goods.goods[GD_RODANDLINE] = 1;//??
280
 
                goods.goods[GD_SCYTHE] = 2;//??
281
 
                goods.goods[GD_WATEREMPTY] = 0;
282
 
                goods.goods[GD_WATER] = 0;      
283
 
                goods.goods[GD_CLEAVER] = 0;
284
 
                goods.goods[GD_ROLLINGPIN] = 1;
285
 
                goods.goods[GD_BOW] = 0;
286
 
                goods.goods[GD_BOAT] = 0;
287
 
                goods.goods[GD_SWORD] = 0;
288
 
                goods.goods[GD_IRON] = 0;
289
 
                goods.goods[GD_FLOUR] = 0;
290
 
                goods.goods[GD_FISH] = 1;
291
 
                goods.goods[GD_BREAD] = 2;
292
 
                goods.goods[GD_SHIELDROMANS] = 0;
293
 
                goods.goods[GD_WOOD] = 6;
294
 
                goods.goods[GD_BOARDS] = 11;
295
 
                goods.goods[GD_STONES] = 17;
296
 
                goods.goods[GD_SHIELDVIKINGS] = 0;
297
 
                goods.goods[GD_SHIELDAFRICANS] = 0;
298
 
                goods.goods[GD_GRAIN] = 0;
299
 
                goods.goods[GD_COINS] = 0;
300
 
                goods.goods[GD_GOLD] = 0;
301
 
                goods.goods[GD_IRONORE] = 4;
302
 
                goods.goods[GD_COAL] = 4;
303
 
                goods.goods[GD_MEAT] = 0;
304
 
                goods.goods[GD_HAM] = 0;        
305
 
                goods.goods[GD_SHIELDJAPANESE] = 0;
306
 
 
307
 
                goods.people[JOB_HELPER] = 13;
308
 
                goods.people[JOB_WOODCUTTER] = 2;
309
 
                goods.people[JOB_FISHER] = 0;
310
 
                goods.people[JOB_FORESTER] = 1;
311
 
                goods.people[JOB_CARPENTER] = 1;
312
 
                goods.people[JOB_STONEMASON] = 1;
313
 
                goods.people[JOB_HUNTER] = 1;
314
 
                goods.people[JOB_FARMER] = 0;
315
 
                goods.people[JOB_MILLER] = 0;
316
 
                goods.people[JOB_BAKER] = 0;
317
 
                goods.people[JOB_BUTCHER] = 0;
318
 
                goods.people[JOB_MINER] = 2;
319
 
                goods.people[JOB_BREWER] = 0;
320
 
                goods.people[JOB_PIGBREEDER] = 0;
321
 
                goods.people[JOB_DONKEYBREEDER] = 0;
322
 
                goods.people[JOB_IRONFOUNDER] = 0;
323
 
                goods.people[JOB_MINTER] = 0;
324
 
                goods.people[JOB_METALWORKER] = 0;
325
 
                goods.people[JOB_ARMORER] = 1;
326
 
                goods.people[JOB_BUILDER] = 2;
327
 
                goods.people[JOB_PLANER] = 1;
328
 
                goods.people[JOB_PRIVATE] = 13;
329
 
                goods.people[JOB_PRIVATEFIRSTCLASS] = 0;
330
 
                goods.people[JOB_SERGEANT] = 0;
331
 
                goods.people[JOB_OFFICER] = 0;
332
 
                goods.people[JOB_GENERAL] = 0;
333
 
                goods.people[JOB_GEOLOGIST] = 2;
334
 
                goods.people[JOB_SHIPWRIGHT] = 0;
335
 
                goods.people[JOB_SCOUT] = 1;
336
 
                goods.people[JOB_PACKDONKEY] = 2;
337
 
                break;
 
339
 
338
340
 
339
341
        }
340
342
 
352
354
        Destroy_nobBaseWarehouse();
353
355
 
354
356
        // Land drumherum neu berechnen (nur wenn es schon besetzt wurde!)
355
 
        // Nach dem BaseDestroy erst, da in diesem erst das Feuer gesetzt, die Stra�e gel�scht wird usw.
 
357
        // Nach dem BaseDestroy erst, da in diesem erst das Feuer gesetzt, die Stra�e gel�scht wird usw.
356
358
        gwg->RecalcTerritory(this,MILITARY_RADIUS[GetSize()],true, false);
357
359
 
358
 
        // Wieder aus dem Milit�rquadrat rauswerfen
 
360
        // Wieder aus dem Milit�rquadrat rauswerfen
359
361
        gwg->GetMilitarySquare(x,y).erase(this);
360
362
}
361
363
 
366
368
 
367
369
nobHQ::nobHQ(SerializedGameData * sgd, const unsigned obj_id) : nobBaseWarehouse(sgd,obj_id)
368
370
{
369
 
        // ins Milit�rquadrat einf�gen
 
371
        // ins Milit�rquadrat einf�gen
370
372
        gwg->GetMilitarySquare(x,y).push_back(this);
371
373
 
372
374
        // Startpos setzen
376
378
 
377
379
void nobHQ::Draw(int x,int y)
378
380
{
379
 
        // Geb�ude an sich zeichnen
 
381
        // Geb�ude an sich zeichnen
380
382
        DrawBaseBuilding(x,y);
381
383
 
382
384
 
383
 
        // 4 F�hnchen zeichnen
 
385
        // 4 F�hnchen zeichnen
384
386
        for(unsigned i = min<unsigned>(GetSoldiersCount()+
385
387
                reserve_soldiers_available[0]+reserve_soldiers_available[1]+reserve_soldiers_available[2]+reserve_soldiers_available[3]+reserve_soldiers_available[4]
386
388
        ,4);i;--i)