forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lotsofstuff.diff
592 lines (567 loc) · 19.7 KB
/
Lotsofstuff.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
Only in ./: AutoRunMode.diff
Only in ./: BackBeta
Only in ./: CataBackUp0.1
Only in ./: cataclysm
Common subdirectories: ./OrigCata/Cataclysm/code_doc and .//code_doc
Only in ./: .cproject
diff -cB ./OrigCata/Cataclysm/crafting.cpp .//crafting.cpp
*** ./OrigCata/Cataclysm/crafting.cpp 2011-10-01 23:22:52.707461641 +0200
--- .//crafting.cpp 2011-10-03 01:41:17.910292734 +0200
***************
*** 148,153 ****
--- 148,164 ----
COMP(itm_battery, 2, NULL);
COMP(itm_power_supply, 1, NULL);
+ /*
+ * We need a some Chemicals which arn't implemented to realistically craft this!
+ RECIPE(itm_c4, CC_WEAPON, sk_mechanics, sk_electronics, 4, 8000);
+ TOOL(itm_screwdriver, -1, NULL);
+ COMP(itm_can_food, 1, itm_steel_chunk, 1, itm_canister_empty, 1, NULL);
+ COMP(itm_battery, 1, NULL);
+ COMP(itm_superglue,1,NULL);
+ COMP(itm_soldering_iron,1,NULL);
+ COMP(itm_power_supply, 1, NULL);
+ */
+
// FOOD
RECIPE(itm_meat_cooked, CC_FOOD, sk_cooking, sk_null, 0, 5000);
***************
*** 155,160 ****
--- 166,178 ----
TOOL(itm_pan, -1, itm_pot, -1, NULL);
COMP(itm_meat, 1, NULL);
+ RECIPE(itm_dogfood, CC_FOOD, sk_cooking, sk_null, 4, 10000);
+ TOOL(itm_hotplate, 6, NULL);
+ TOOL(itm_pot, -1, NULL);
+ COMP(itm_meat, 1, NULL);
+ COMP(itm_veggy,1, NULL);
+ COMP(itm_water,1, NULL);
+
RECIPE(itm_veggy_cooked, CC_FOOD, sk_cooking, sk_null, 0, 4000);
TOOL(itm_hotplate, 5, NULL);
TOOL(itm_pan, -1, itm_pot, -1, NULL);
***************
*** 524,529 ****
--- 542,552 ----
COMP(itm_machete, 1, NULL);
COMP(itm_string_36, 1, NULL);
+ RECIPE(itm_boobytrap, CC_MISC, sk_mechanics, sk_traps,3,5000);
+ COMP(itm_grenade,1,NULL);
+ COMP(itm_string_6,1,NULL);
+ COMP(itm_can_food,1,NULL);
+
RECIPE(itm_landmine, CC_WEAPON, sk_traps, sk_mechanics, 5, 10000);
TOOL(itm_screwdriver, -1, NULL);
COMP(itm_superglue, 1, NULL);
Common subdirectories: ./OrigCata/Cataclysm/data and .//data
Only in ./: Debug
Only in ./: .deps
Only in ./: doggy2.diff
Only in ./: doggy.diff
diff -cB ./OrigCata/Cataclysm/game.cpp .//game.cpp
*** ./OrigCata/Cataclysm/game.cpp 2011-10-01 23:22:52.711461641 +0200
--- .//game.cpp 2011-10-02 20:29:09.222291391 +0200
***************
*** 68,73 ****
--- 68,75 ----
in_tutorial = false; // We're not in a tutorial game
weather = WEATHER_CLEAR; // Start with some nice weather...
season = cal.season(); // Init season
+ turnssincelastmon = 0; //Auto run mode init
+ autorunmode = false;
for (int i = 0; i < num_monsters; i++) // Reset kill counts to 0
kills[i] = 0;
// Set the scent map to 0
***************
*** 960,966 ****
--- 971,981 ----
run_mode = 1;
add_msg("Run mode ON!");
} else {
+ turnssincelastmon = 0;
run_mode = 0;
+ if(autorunmode)
+ add_msg("Run mode OFF! (Auto run mode still enabled!)");
+ else
add_msg("Run mode OFF!");
}
} else if (ch == 's')
***************
*** 983,988 ****
--- 998,1016 ----
} else if (ch == '?') {
help();
refresh_all();
+ } else if (ch == '"') {
+ if(autorunmode){
+ add_msg("Auto run mode OFF!");
+ autorunmode = false;
+ } else {
+ add_msg("Auto run mode ON");
+ autorunmode = true;
+ }
+ } else if (ch == ' '){
+ if(run_mode == 2){
+ add_msg("Ignoring enemy!");
+ run_mode = 1;
+ }
}
}
***************
*** 2257,2265 ****
--- 2285,2307 ----
if (newseen > mostseen) {
cancel_activity_query("Monster spotted!");
+ turnssincelastmon = 0;
if (run_mode == 1)
run_mode = 2; // Stop movement!
}
+ //Auto run mode
+ if(autorunmode){
+ if(newseen<=mostseen){
+ turnssincelastmon++;
+ if(turnssincelastmon >= 50){
+ if(run_mode == 0){
+ run_mode = 1;
+ }
+ }
+ }
+ }
+
+
mostseen = newseen;
int line = 0;
nc_color tmpcol;
***************
*** 4381,4387 ****
void game::plmove(int x, int y)
{
if (run_mode == 2) { // Monsters around and we don't wanna run
! add_msg("Monster spotted--run mode is on! (Press '!' to turn it off.)");
return;
}
x += u.posx;
--- 4423,4429 ----
void game::plmove(int x, int y)
{
if (run_mode == 2) { // Monsters around and we don't wanna run
! add_msg("Monster spotted--run mode is on! (Press '!' to turn it off or space to ignore monster.)");
return;
}
x += u.posx;
diff -cB ./OrigCata/Cataclysm/game.h .//game.h
*** ./OrigCata/Cataclysm/game.h 2011-10-01 23:22:52.711461641 +0200
--- .//game.h 2011-10-02 20:29:09.222291391 +0200
***************
*** 265,271 ****
char run_mode; // 0 - Normal run always; 1 - Running allowed, but if a new
// monsters spawns, go to 2 - No movement allowed
int mostseen; // # of mons seen last turn; if this increases, run_mode++
!
quit_status uquit; // Set to true if the player quits ('Q')
int nextspawn; // The turn on which monsters will spawn next.
--- 265,272 ----
char run_mode; // 0 - Normal run always; 1 - Running allowed, but if a new
// monsters spawns, go to 2 - No movement allowed
int mostseen; // # of mons seen last turn; if this increases, run_mode++
! bool autorunmode; // is autorunmode enabled?
! int turnssincelastmon; // turns since the last monster was spotted needed for auto run mode
quit_status uquit; // Set to true if the player quits ('Q')
int nextspawn; // The turn on which monsters will spawn next.
Common subdirectories: ./OrigCata/Cataclysm/.git and .//.git
diff -cB ./OrigCata/Cataclysm/help.cpp .//help.cpp
*** ./OrigCata/Cataclysm/help.cpp 2011-10-01 23:22:52.711461641 +0200
--- .//help.cpp 2011-10-02 20:29:09.226291391 +0200
***************
*** 397,403 ****
s - Smash terrain , or g - Pick up items\n\
e - Examine terrain, open container < or > - Go up or down stairs\n\
$ - Lie down to sleep ^ - Long wait\n\
! ! - Toggle Run Mode");
mvprintz(7, 0, c_white, "ITEMS:");
mvprintz(8, 0, c_ltgray, "\
i - View Inventory d,D - Drop item (with direction)\n\
--- 397,403 ----
s - Smash terrain , or g - Pick up items\n\
e - Examine terrain, open container < or > - Go up or down stairs\n\
$ - Lie down to sleep ^ - Long wait\n\
! ! - Toggle Run Mode \" - Toggle Auto Run Mode");
mvprintz(7, 0, c_white, "ITEMS:");
mvprintz(8, 0, c_ltgray, "\
i - View Inventory d,D - Drop item (with direction)\n\
diff -cB ./OrigCata/Cataclysm/itypedef.cpp .//itypedef.cpp
*** ./OrigCata/Cataclysm/itypedef.cpp 2011-10-01 23:22:52.715461641 +0200
--- .//itypedef.cpp 2011-10-03 01:33:20.410292700 +0200
***************
*** 2644,2649 ****
--- 2646,2670 ----
morale steadily while on your person. It runs through batteries quickly; you\n\
can turn it off by using it. It also obscures your hearing.");
+ TOOL("dog food", 5, 60,'o',c_red, FLESH, MNULL,
+ 1, 2, 0, 0, -5, 0, 0, 0, 0, AT_NULL, itm_null, &iuse::dogfood, 0, "\
+ Food for dogs. It smells strange, but dogs love it.");
+
+ TOOL("booby trap", 0, 500,'^',c_ltcyan, STEEL, PLASTIC,
+ 3, 2, 0, 0, -4, 0, 0, 0, 0, AT_NULL, itm_null, &iuse::set_trap, 0, "\
+ A crude explosive device triggered by a piece of string.");
+
+ TOOL("C4-Explosive", 5, 6000,'o',c_ltcyan, PLASTIC, STEEL,
+ 1, 2, 0, 0, -4, 0, 0, 0, 0, AT_NULL, itm_null, &iuse::c4, 0, "\
+ Highly explosive, use with caution! Armed with a small timer.");
+
+ TOOL("C4-Explosive(armed)", 0, 6000,'o',c_ltcyan, PLASTIC, STEEL,
+ 1, 2, 0, 0, -4, 9, 9, 0, 1, AT_NULL, itm_null, &iuse::c4armed, 0, "\
+ Highly explosive, use with caution. Comes with a small timer.\n\
+ It's armed and ticking!");
+
+
+
// BIONICS
// These are the modules used to install new bionics in the player. They're
diff -cB ./OrigCata/Cataclysm/itype.h .//itype.h
*** ./OrigCata/Cataclysm/itype.h 2011-10-01 23:22:52.711461641 +0200
--- .//itype.h 2011-10-02 23:44:08.270292231 +0200
***************
*** 132,138 ****
itm_smokebomb, itm_smokebomb_act, itm_molotov, itm_molotov_lit, itm_dynamite,
itm_dynamite_act, itm_mininuke, itm_mininuke_act, itm_pheromone, itm_portal,
itm_bot_manhack, itm_bot_turret, itm_UPS_off, itm_UPS_on, itm_tazer, itm_mp3,
! itm_mp3_on,
// Bionics containers
itm_bionics_battery, itm_bionics_power, itm_bionics_tools,
itm_bionics_neuro, itm_bionics_sensory, itm_bionics_aquatic,
--- 132,138 ----
itm_smokebomb, itm_smokebomb_act, itm_molotov, itm_molotov_lit, itm_dynamite,
itm_dynamite_act, itm_mininuke, itm_mininuke_act, itm_pheromone, itm_portal,
itm_bot_manhack, itm_bot_turret, itm_UPS_off, itm_UPS_on, itm_tazer, itm_mp3,
! itm_mp3_on, itm_dogfood, itm_boobytrap, itm_c4, itm_c4armed,
// Bionics containers
itm_bionics_battery, itm_bionics_power, itm_bionics_tools,
itm_bionics_neuro, itm_bionics_sensory, itm_bionics_aquatic,
diff -cB ./OrigCata/Cataclysm/iuse.cpp .//iuse.cpp
*** ./OrigCata/Cataclysm/iuse.cpp 2011-10-01 23:22:52.715461641 +0200
--- .//iuse.cpp 2011-10-03 00:24:23.806292403 +0200
***************
*** 582,587 ****
--- 582,614 ----
if (effect == 6)
p->radiation = 0;
}
+
+ void iuse::dogfood(game *g, player *p, item *it, bool t)
+ {
+ int dirx, diry;
+ g->draw();
+ mvprintw(0, 0, "Which direction?");
+ get_direction(dirx, diry, input());
+ if (dirx == -2) {
+ g->add_msg("Invalid direction.");
+ return;
+ }
+ p->moves -= 15;
+ dirx += p->posx;
+ diry += p->posy;
+ int mon_dex = g->mon_at(dirx,diry);
+ if(mon_dex != -1){
+ if(g->z[mon_dex].type->id == mon_dog){
+ g->add_msg("The dog seems to like you!");
+ g->z[mon_dex].friendly = -1;
+ } else {
+ g->add_msg("The %s seems quit unimpressed!",g->z[mon_dex].type->name.c_str());
+ }
+ } else {
+ g->add_msg("You spill the dogfood all over the ground.");
+ }
+
+ }
***************
*** 1197,1202 ****
--- 1224,1234 ----
int practice;
switch (it->type->id) {
+ case itm_boobytrap:
+ message << "You set the boobytrap up and activate the grenade.";
+ type = tr_boobytrap;
+ practice = 4;
+ break;
case itm_bubblewrap:
message << "You set the bubblewrap on the ground, ready to be popped.";
type = tr_bubblewrap;
***************
*** 1441,1446 ****
--- 1473,1498 ----
g->explosion(pos.x, pos.y, 18, 12, false);
}
+ void iuse::c4(game *g, player *p, item *it, bool t)
+ {
+ int time = query_int("Set the timer to?");
+ g->add_msg("You set the timer to %d.", time);
+ it->make(g->itypes[itm_c4armed]);
+ it->charges = time;
+ it->active = true;
+ }
+
+ void iuse::c4armed(game *g, player *p, item *it, bool t)
+ {
+ point pos = g->find_item(it);
+ if (pos.x == -999 || pos.y == -999)
+ return;
+ if (t) // Simple timer effects
+ g->sound(pos.x, pos.y, 0, "Tick."); // Vol 0 = only heard if you hold it
+ else // When that timer runs down...
+ g->explosion(pos.x, pos.y, 40, 3, false);
+ }
+
void iuse::EMPbomb(game *g, player *p, item *it, bool t)
{
g->add_msg("You pull the pin on the EMP grenade.");
diff -cB ./OrigCata/Cataclysm/iuse.h .//iuse.h
*** ./OrigCata/Cataclysm/iuse.h 2011-10-01 23:22:52.715461641 +0200
--- .//iuse.h 2011-10-03 00:16:44.094292370 +0200
***************
*** 38,43 ****
--- 38,45 ----
void mutagen (game *g, player *p, item *it, bool t);
void purifier (game *g, player *p, item *it, bool t);
void marloss (game *g, player *p, item *it, bool t);
+ void dogfood (game *g, player *p, item *it, bool t);
+
// TOOLS
void lighter (game *g, player *p, item *it, bool t);
void sew (game *g, player *p, item *it, bool t);
***************
*** 64,69 ****
--- 66,73 ----
void pipebomb_act (game *g, player *p, item *it, bool t);
void grenade (game *g, player *p, item *it, bool t);
void grenade_act (game *g, player *p, item *it, bool t);
+ void c4 (game *g, player *p, item *it, bool t);
+ void c4armed (game *g, player *p, item *it, bool t);
void EMPbomb (game *g, player *p, item *it, bool t);
void EMPbomb_act (game *g, player *p, item *it, bool t);
void gasbomb (game *g, player *p, item *it, bool t);
Only in ./: Lotsofstuff.diff
diff -cB ./OrigCata/Cataclysm/mapitemsdef.cpp .//mapitemsdef.cpp
*** ./OrigCata/Cataclysm/mapitemsdef.cpp 2011-10-01 23:22:52.719461641 +0200
--- .//mapitemsdef.cpp 2011-10-03 01:33:38.394292701 +0200
***************
*** 490,496 ****
itm_laser_pack, itm_usp_9mm, itm_usp_45, itm_m4a1, itm_scar_l,
itm_scar_h, itm_m249, itm_ftk93, itm_silencer, itm_clip, itm_lighter,
itm_flashlight, itm_two_way_radio, itm_landmine, itm_grenade,
! itm_EMPbomb, itm_gasbomb, itm_smokebomb, itm_UPS_off, itm_tazer, NULL);
setvector(
mapitems[mi_science],
--- 490,496 ----
itm_laser_pack, itm_usp_9mm, itm_usp_45, itm_m4a1, itm_scar_l,
itm_scar_h, itm_m249, itm_ftk93, itm_silencer, itm_clip, itm_lighter,
itm_flashlight, itm_two_way_radio, itm_landmine, itm_grenade,
! itm_EMPbomb, itm_gasbomb, itm_smokebomb, itm_UPS_off, itm_tazer,itm_c4, NULL);
setvector(
mapitems[mi_science],
***************
*** 510,516 ****
itm_mutagen, itm_purifier, itm_royal_jelly, itm_fetus, itm_card_id,
itm_electrohack, itm_processor, itm_armor_chitin, itm_plut_cell,
itm_laser_pack, itm_m249, itm_v29, itm_ftk93, itm_conversion_battle,
! itm_conversion_sniper, itm_canister_goo, itm_mininuke, itm_portal,
NULL);
setvector(
--- 510,516 ----
itm_mutagen, itm_purifier, itm_royal_jelly, itm_fetus, itm_card_id,
itm_electrohack, itm_processor, itm_armor_chitin, itm_plut_cell,
itm_laser_pack, itm_m249, itm_v29, itm_ftk93, itm_conversion_battle,
! itm_conversion_sniper, itm_canister_goo, itm_mininuke, itm_portal,itm_c4,
NULL);
setvector(
***************
*** 542,546 ****
itm_fetus, itm_arm, itm_leg, itm_wrapper, itm_manhole_cover, itm_rock,
itm_stick, itm_bag_plastic, itm_flashlight_on, itm_radio_on,
itm_chainsaw_on, itm_grenade_act, itm_EMPbomb_act, itm_gasbomb_act,
! itm_molotov_lit, itm_dynamite_act, itm_mininuke_act, itm_mp3_on, NULL);
}
--- 542,546 ----
itm_fetus, itm_arm, itm_leg, itm_wrapper, itm_manhole_cover, itm_rock,
itm_stick, itm_bag_plastic, itm_flashlight_on, itm_radio_on,
itm_chainsaw_on, itm_grenade_act, itm_EMPbomb_act, itm_gasbomb_act,
! itm_molotov_lit, itm_dynamite_act, itm_mininuke_act, itm_mp3_on,itm_c4, NULL);
}
diff -cB ./OrigCata/Cataclysm/mongroupdef.cpp .//mongroupdef.cpp
*** ./OrigCata/Cataclysm/mongroupdef.cpp 2011-10-01 23:22:52.719461641 +0200
--- .//mongroupdef.cpp 2011-10-02 03:30:56.000000000 +0200
***************
*** 5,11 ****
{
setvector(
moncats[mcat_forest],
! mon_squirrel, mon_rabbit, mon_deer, mon_wolf, mon_bear, NULL);
setvector(
moncats[mcat_ant],
mon_ant_larva, mon_ant, mon_ant_soldier, NULL);
--- 5,11 ----
{
setvector(
moncats[mcat_forest],
! mon_squirrel, mon_rabbit, mon_deer, mon_wolf, mon_bear, mon_dog, NULL);
setvector(
moncats[mcat_ant],
mon_ant_larva, mon_ant, mon_ant_soldier, NULL);
diff -cB ./OrigCata/Cataclysm/mtypedef.cpp .//mtypedef.cpp
*** ./OrigCata/Cataclysm/mtypedef.cpp 2011-10-01 23:22:52.719461641 +0200
--- .//mtypedef.cpp 2011-10-02 19:28:37.146291130 +0200
***************
*** 81,87 ****
(mfb(MF_SEES)|mfb(MF_SMELLS)|mfb(MF_HEARS)|mfb(MF_ANIMAL)|mfb(MF_WARM)|
mfb(MF_FUR)),
// frq dif agr spd msk mdi m## cut dge arm itm HP special freq
! 3, 5, 1,150, 12, 2, 3, 3, 3, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
A medium-sized domesticated dog, gone feral."
);
--- 81,87 ----
(mfb(MF_SEES)|mfb(MF_SMELLS)|mfb(MF_HEARS)|mfb(MF_ANIMAL)|mfb(MF_WARM)|
mfb(MF_FUR)),
// frq dif agr spd msk mdi m## cut dge arm itm HP special freq
! 3, 5, 1,150, 12, 2, 3, 3, 3, 0, 0, 25, 0,
&mdeath::normal, &mattack::none, "\
A medium-sized domesticated dog, gone feral."
);
Only in ./: obj
Only in ./: OrigCata
diff -cB ./OrigCata/Cataclysm/output.cpp .//output.cpp
*** ./OrigCata/Cataclysm/output.cpp 2011-10-01 23:22:52.723461641 +0200
--- .//output.cpp 2011-10-03 00:40:23.602292473 +0200
***************
*** 316,321 ****
--- 316,347 ----
return false;
}
+ int query_int(const char *mes, ...)
+ {
+ va_list ap;
+ va_start(ap, mes);
+ char buff[1024];
+ vsprintf(buff, mes, ap);
+ va_end(ap);
+ int win_width = strlen(buff) + 10;
+ WINDOW* w = newwin(3, win_width, 11, 0);
+ wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
+ LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
+ mvwprintz(w, 1, 1, c_ltred, "%s (0-9)", buff);
+ wrefresh(w);
+
+ int temp;
+ do
+ temp = getch();
+ while ((temp-48)<0 || (temp-48)>9);
+ werase(w);
+ wrefresh(w);
+ delwin(w);
+ refresh();
+
+ return temp-48;
+ }
+
std::string string_input_popup(const char *mes, ...)
{
std::string ret;
diff -cB ./OrigCata/Cataclysm/output.h .//output.h
*** ./OrigCata/Cataclysm/output.h 2011-10-01 23:22:52.723461641 +0200
--- .//output.h 2011-10-03 00:30:43.822292430 +0200
***************
*** 34,39 ****
--- 34,40 ----
void debugmsg(const char *mes, ...);
bool query_yn(const char *mes, ...);
+ int query_int(const char *mes, ...);
std::string string_input_popup(const char *mes, ...);
std::string string_input_popup(int max_length, const char *mes, ...);
char popup_getkey(const char *mes, ...);
diff -cB ./OrigCata/Cataclysm/player.cpp .//player.cpp
*** ./OrigCata/Cataclysm/player.cpp 2011-10-01 23:22:52.723461641 +0200
--- .//player.cpp 2011-10-02 19:20:18.898291096 +0200
***************
*** 3549,3554 ****
--- 3549,3555 ----
} else
g->add_msg("Your %s has %d charges but needs %d.", used->tname(g).c_str(),
used->charges, tool->charges_per_use);
+ if(tool->use == &iuse::dogfood) replace_item = false;
if (replace_item && tool->use != &iuse::set_trap)
inv.add_item(copy);
return;
Only in ./: .project
Only in ./: Release
Only in ./: save
diff -cB ./OrigCata/Cataclysm/trapdef.cpp .//trapdef.cpp
*** ./OrigCata/Cataclysm/trapdef.cpp 2011-10-01 23:22:52.727461641 +0200
--- .//trapdef.cpp 2011-10-03 00:00:16.566292299 +0200
***************
*** 100,103 ****
--- 100,107 ----
TRAP("ledge", ' ', c_black, 0, 99, 99,
&trapfunc::ledge, &trapfuncm::ledge,
itm_null, NULL);
+
+ TRAP("boobytrap", '^', c_ltcyan, 5, 4, 7,
+ &trapfunc::boobytrap, &trapfuncm::boobytrap,
+ itm_null, NULL);
}
diff -cB ./OrigCata/Cataclysm/trapfunc.cpp .//trapfunc.cpp
*** ./OrigCata/Cataclysm/trapfunc.cpp 2011-10-01 23:22:52.727461641 +0200
--- .//trapfunc.cpp 2011-10-03 00:03:35.466292315 +0200
***************
*** 231,236 ****
--- 231,252 ----
g->m.tr_at(x, y) = tr_null;
}
+ void trapfunc::boobytrap(game *g, int x, int y)
+ {
+ g->add_msg("You trigger a boobytrap!");
+ g->explosion(x, y, 18, 12, false);
+ g->m.tr_at(x, y) = tr_null;
+ }
+
+ void trapfuncm::boobytrap(game *g, monster *z, int x, int y)
+ {
+ int t;
+ if (g->u_see(x, y, t))
+ g->add_msg("The %s triggers a boobytrap!", z->name().c_str());
+ g->explosion(x, y, 18, 12, false);
+ g->m.tr_at(x, y) = tr_null;
+ }
+
void trapfunc::telepad(game *g, int x, int y)
{
g->sound(x, y, 6, "vvrrrRRMM*POP!*");
diff -cB ./OrigCata/Cataclysm/trap.h .//trap.h
*** ./OrigCata/Cataclysm/trap.h 2011-10-01 23:22:52.727461641 +0200
--- .//trap.h 2011-10-03 00:06:48.602292327 +0200
***************
*** 28,33 ****
--- 28,34 ----
tr_spike_pit,
tr_portal,
tr_ledge,
+ tr_boobytrap,
num_trap_types
};
***************
*** 52,57 ****
--- 53,59 ----
void pit_spikes(game *g, int x, int y);
void portal (game *g, int x, int y) { };
void ledge (game *g, int x, int y);
+ void boobytrap (game *g, int x, int y);
};
struct trapfuncm {
***************
*** 73,78 ****
--- 75,81 ----
void pit_spikes(game *g, monster *z, int x, int y);
void portal (game *g, monster *z, int x, int y) { };
void ledge (game *g, monster *z, int x, int y);
+ void boobytrap (game *g, monster *z, int x, int y);
};
struct trap {