Compare commits
1726 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f7b54571b | |||
| ce89fe960d | |||
| 66261402ff | |||
| 7f46a542fe | |||
| 40e85b0353 | |||
| c00cd7b9bb | |||
| a9e420dc61 | |||
| f0271b1cec | |||
| 824b10ea1d | |||
| 4e7d34e05e | |||
| 38d2a07c65 | |||
| b2a08ee4e1 | |||
| f772977184 | |||
| d0c4519b0d | |||
| 9cac01cd22 | |||
| 7458ef8655 | |||
| 8580f7f78f | |||
| 2d200f5af7 | |||
| 3ae6a1a8de | |||
| 0667b20125 | |||
| ff57ac89f5 | |||
| e09af5d70c | |||
| 5a689e44c8 | |||
| 682174ce74 | |||
| d2a3acd821 | |||
| e91193ee04 | |||
| 9f03f153da | |||
| c24c775694 | |||
| 37fd1058cc | |||
| 8e4b775338 | |||
| 2218ca1009 | |||
| a39dfc3ab4 | |||
| 95abc56e14 | |||
| 5ea66d8bdf | |||
| 00e5091d61 | |||
| 9e32ac83d4 | |||
| 3c23b7dadb | |||
| 31899327e2 | |||
| 94f93110b5 | |||
| 7081984ab4 | |||
| 49448b0f54 | |||
| cfa8ac17e3 | |||
| f14d24ec56 | |||
| f5a8fe533b | |||
| 9ac3e63f0a | |||
| 392ca258c0 | |||
| 0bac7ba12b | |||
| 8b3eb919aa | |||
| 12f57e1871 | |||
| eb37236a3a | |||
| c5ecb9b2b5 | |||
| 82772439ba | |||
| 16ae0f2ba0 | |||
| ad76ca8fea | |||
| 7ad9c75e7f | |||
| 4729e4ac69 | |||
| 441a6ee6ee | |||
| 23a1d95d18 | |||
| fb09d161e0 | |||
| 0b4f01b5ee | |||
| 4edd31d66c | |||
| be968a9dff | |||
| d7577cbae6 | |||
| 44507e7a24 | |||
| f399387738 | |||
| 39a2073959 | |||
| ff7d545aa3 | |||
| ac460114c5 | |||
| e623d9285e | |||
| 0ddd311674 | |||
| 020534ef18 | |||
| 2a70cc6231 | |||
| 27615c07b0 | |||
| 6bb5133271 | |||
| 755587c7ba | |||
| 6454dd6936 | |||
| dd992ef821 | |||
| 9ffd98c43b | |||
| b1289f2f0c | |||
| a5d360858d | |||
| 6c2a0abc71 | |||
| 8d56d5fb94 | |||
| be8e2a50dc | |||
| dd5a9aad31 | |||
| 5cb0826632 | |||
| 7a265293f9 | |||
| df871a1446 | |||
| 44eaf8e4e9 | |||
| f37a8d1feb | |||
| ba33cf8704 | |||
| d2978b2c19 | |||
| 27b71c7703 | |||
| 1f4603ba26 | |||
| f724c9da04 | |||
| e7b444debb | |||
| fe37756898 | |||
| e64767b28c | |||
| 835e098b09 | |||
| 71b8df3f4b | |||
| dc7ce68266 | |||
| 8fe6aee088 | |||
| 58e1a7dfc3 | |||
| efb547710a | |||
| 9d30a62045 | |||
| 90c6469c19 | |||
| af817c6b6a | |||
| f7171fe70d | |||
| eaf93728ff | |||
| 346f78da6b | |||
| f0bd034cb2 | |||
| 34ba3160d2 | |||
| 482f33f92b | |||
| b716753531 | |||
| 1ee77c56fd | |||
| 50cb9acbec | |||
| 640571556c | |||
| 0fa471a267 | |||
| c31d362b05 | |||
| 7c480131a3 | |||
| 5d64700e69 | |||
| 8922640a45 | |||
| ea27ba067f | |||
| 510cdd5ec1 | |||
| 8ce5a3a28a | |||
| 501cc69330 | |||
| 280a27c422 | |||
| 4e6bd58d2e | |||
| 2f6895476c | |||
| e2029587f0 | |||
| b6d8cd5978 | |||
| f76074b8bc | |||
| 6d741ccb52 | |||
| 94c06e68f2 | |||
| 5ad6920325 | |||
| ab2d34ea01 | |||
| a738de0474 | |||
| 9cc2d5ccd6 | |||
| caaea1f0f2 | |||
| 8cf7fada84 | |||
| a022c908bd | |||
| 85e5683d46 | |||
| dec0d7a7e2 | |||
| e519a0fe77 | |||
| 811c412200 | |||
| 32c4ea9e54 | |||
| a6ea4f7941 | |||
| b19df88301 | |||
| 186a5aa954 | |||
| 9301114316 | |||
| c0cfc62e10 | |||
| a15abe7185 | |||
| b802684082 | |||
| 2bed854469 | |||
| e60739392e | |||
| 615feebe5f | |||
| 4b29d396f3 | |||
| d1889b2061 | |||
| 0c51a373da | |||
| 7433e4f552 | |||
| 0f8e60b717 | |||
| 892cdb6237 | |||
| 35fc6ddd90 | |||
| a48dda91dc | |||
| f4f411937a | |||
| 1bdcda2a7c | |||
| 13847fb6a0 | |||
| 89ffbe1b8f | |||
| 5660c816e9 | |||
| 0de109a437 | |||
| 5f4416c10a | |||
| 923db00ead | |||
| f8000e1438 | |||
| 472a993be6 | |||
| 4a111367d8 | |||
| 75cb306055 | |||
| ab10751ee6 | |||
| 41426c2c99 | |||
| 710c77fcb6 | |||
| aaf4af0d8a | |||
| 1e410d8de1 | |||
| 76642f5e89 | |||
| fa893b308f | |||
| 55c06c8802 | |||
| 8ef9408864 | |||
| d27a45675d | |||
| ca2f4f52bd | |||
| 895ac666bd | |||
| bf73d905c4 | |||
| a59d6883ca | |||
| b6bd2f3ea7 | |||
| a8c83640c4 | |||
| 5f5a5c82a0 | |||
| 2c5685be49 | |||
| 71d8814b4a | |||
| a416764149 | |||
| 6968084578 | |||
| 3ce1b2009a | |||
| 0543803a10 | |||
| 43e7c09cba | |||
| 0394870246 | |||
| 180faffc65 | |||
| f925d544c5 | |||
| 6814c82b4a | |||
| bad2f57b94 | |||
| 13b3711822 | |||
| 5286878d8a | |||
| c43bfe41fd | |||
| 546a8a4a13 | |||
| 8565b77409 | |||
| d84bccd7aa | |||
| 3625b660e4 | |||
| 7a37eb14e5 | |||
| 58a1c6d486 | |||
| 75b5e97d7b | |||
| c6499013f1 | |||
| d50a0a3a8b | |||
| f48fff8f42 | |||
| e2dab3aaaf | |||
| 8c464145e7 | |||
| 829275266e | |||
| 3a1b75af35 | |||
| f360bb1195 | |||
| 3d48f8b209 | |||
| 78db4ecb9c | |||
| 7d11865807 | |||
| 26a04f918f | |||
| ba03815a81 | |||
| 23d459606b | |||
| 63ace3b7f6 | |||
| a05431eeab | |||
| fbcd715536 | |||
| 98c812aae8 | |||
| 6f4e4a9332 | |||
| 71333c8f9c | |||
| 9bc2402b22 | |||
| 2a6821ff56 | |||
| 7f91455cf5 | |||
| ca2c33abbf | |||
| 68f25feb5f | |||
| 4c7713ad20 | |||
| eaf15056cf | |||
| 8281db69c4 | |||
| 12d061aaa1 | |||
| 155b363140 | |||
| fdee5ee937 | |||
| ad6b1aea7e | |||
| 6982c8eeb7 | |||
| 5a7ec3edb1 | |||
| 4b67092933 | |||
| 8208cc6c3c | |||
| c1f2c34695 | |||
| 02e4099bb5 | |||
| 1ca7f2a6c8 | |||
| 380b52643f | |||
| 3725fbc9e0 | |||
| 4dfd730eb2 | |||
| 40f73f671b | |||
| 9763d53e5f | |||
| 7b7c95eedc | |||
| ecae49a0c2 | |||
| 4f66ede64a | |||
| f54ad1a0f5 | |||
| f38fdeed58 | |||
| 51c27dadbf | |||
| aabbec53b7 | |||
| dc396fe954 | |||
| 7ba00561e8 | |||
| dec2dc7bf0 | |||
| 46be778aee | |||
| eb8e823b66 | |||
| dbf295d0e2 | |||
| 64bf5e2306 | |||
| 12128cc347 | |||
| c5132d553f | |||
| d1d96ef1d0 | |||
| 26565dbef6 | |||
| 3f13bd6bc1 | |||
| 3d931cd9ab | |||
| 3c1251c366 | |||
| 1b5d082db5 | |||
| 001849272f | |||
| 7d0983c839 | |||
| 89d2f9893c | |||
| 66a61e239f | |||
| 51b7cef821 | |||
| 07bd0879e9 | |||
| 1b23bde3af | |||
| 419db6875c | |||
| db2c8526f6 | |||
| 86f6857dd0 | |||
| a397e1ea4a | |||
| 9a61b00dc1 | |||
| ae64a3f61f | |||
| 468b3db3b7 | |||
| 115252a149 | |||
| d3e965ef1a | |||
| 9fe6feb52f | |||
| 9b058378bf | |||
| 5e85552377 | |||
| a89185e056 | |||
| 4445f7f06f | |||
| f6bafa573b | |||
| 0c66a3db76 | |||
| 98a51dfaab | |||
| b9220e7d8b | |||
| 2c6ec43e1f | |||
| 3b21826b6a | |||
| 317ba1c34c | |||
| 95808abc28 | |||
| 520b90e371 | |||
| b0c5eefee0 | |||
| c915ec3af6 | |||
| dd3ea43ee3 | |||
| 5a667408f4 | |||
| be320a8540 | |||
| 76c7519e11 | |||
| adccca67f9 | |||
| 470d948fe5 | |||
| 0755f6f8b3 | |||
| 36347ba62b | |||
| 4577cceb9e | |||
| 2f10f7907a | |||
| eee9970065 | |||
| d19c6cf1ab | |||
| 5cbe278548 | |||
| f44cd9e3d9 | |||
| 5232c34161 | |||
| 0ed81e758a | |||
| 83da2d8b1d | |||
| 3fbb690d76 | |||
| 158950e71d | |||
| c5b3f9e1ec | |||
| 150d916981 | |||
| 86db34bdf9 | |||
| 51b8b40b68 | |||
| f27390f53a | |||
| 1fc7546e96 | |||
| 7d91d4f358 | |||
| 248f8a64f7 | |||
| a9512b5b4c | |||
| 1fcae4b4ef | |||
| e6b98ee733 | |||
| f459dabf9d | |||
| a49b02060c | |||
| 8d667baf3c | |||
| ad8fdd4819 | |||
| 434ea30026 | |||
| 81ce7c6e9a | |||
| b4871d49d7 | |||
| 17e2380abf | |||
| 5749a320bd | |||
| 0ecdc3891a | |||
| 5868686f9d | |||
| 3108e44fe0 | |||
| aa50085573 | |||
| 959f10e80b | |||
| 4b30f55a72 | |||
| 4f0bf666cd | |||
| 2f9e8e5c52 | |||
| a7f543d60a | |||
| f382badf7d | |||
| a2993e3cd8 | |||
| da04c902e7 | |||
| 4059e16396 | |||
| a47a920a02 | |||
| 8600085be3 | |||
| aec5108fe9 | |||
| 930b4cf3a3 | |||
| 84b9f4411f | |||
| cc8006a2b0 | |||
| 5eb8e1ab41 | |||
| c909a0f713 | |||
| 377bac95d8 | |||
| 8a17c9a0d3 | |||
| e6c3168956 | |||
| 39292d183d | |||
| 1099f6b527 | |||
| 73a86971ac | |||
| 79debd29db | |||
| ac3a92c219 | |||
| 3bf8fda4df | |||
| 0086715750 | |||
| 8bba59aa72 | |||
| 8cabe87199 | |||
| 5604434130 | |||
| 66d42195a9 | |||
| 4d55dc6fe0 | |||
| 69d48fe953 | |||
| 10421d4fdc | |||
| 4d99cc7d20 | |||
| b38be2e57f | |||
| 112e7a7239 | |||
| 6544b1911e | |||
| 195350b8af | |||
| 0a22d34b4b | |||
| be52063100 | |||
| 6ef1e6d68d | |||
| 2d1c67cbd5 | |||
| 9a74914720 | |||
| be6de66c8a | |||
| 82f39cb588 | |||
| a6c5fb497e | |||
| 79157104e0 | |||
| 4fcd90bb37 | |||
| 670135cf86 | |||
| 26e650d0ab | |||
| 142f42c903 | |||
| 3c31a662de | |||
| 2e69cf70bd | |||
| 1e204fb105 | |||
| e6e9feb586 | |||
| a4f2cb4972 | |||
| 84767fb60c | |||
| 695fc87f55 | |||
| f1632bd090 | |||
| df837f15d8 | |||
| f01a835d47 | |||
| e649f43dd5 | |||
| d1d6525bbf | |||
| 570d0b6f72 | |||
| c6cb0b4930 | |||
| 4a0964bd91 | |||
| a9bf334674 | |||
| 21e377356c | |||
| 4bd36d5407 | |||
| 1819060a76 | |||
| 0e6a8be822 | |||
| 7a7e3ebc1a | |||
| f480c13d25 | |||
| f23a086603 | |||
| 91649fe933 | |||
| ff7c2a81f2 | |||
| 1e4137c847 | |||
| 0d101e51b8 | |||
| f176e82253 | |||
| 04955a421f | |||
| fd59fba0d5 | |||
| e53e8de76a | |||
| 8ea78461af | |||
| b55fcbcea1 | |||
| 67d0317a87 | |||
| f19762c67d | |||
| 4fc91e9207 | |||
| bb25bebac7 | |||
| 8f439ac7e8 | |||
| 51556b70a5 | |||
| 6ff073e8f3 | |||
| 4c346ab6e3 | |||
| 7d9b420d93 | |||
| a2a2377a21 | |||
| d7cdeb112c | |||
| a7df33c79c | |||
| 2059b0eac4 | |||
| a510ada95e | |||
| 32e29c9edf | |||
| 532c9f0096 | |||
| 887338c198 | |||
| fc8b8170f7 | |||
| 55a7f31d1d | |||
| faa6e0a41f | |||
| c61b0ed4a8 | |||
| 8531e1149b | |||
| 42dcb1b529 | |||
| 8b3a6d8ce1 | |||
| b6beaa3f8e | |||
| d4198865f7 | |||
| b8f57d9bec | |||
| fa9ce18623 | |||
| 5dc2f67c66 | |||
| d4043c546b | |||
| a2b6b30794 | |||
| c63088f288 | |||
| 682542ec45 | |||
| f1004a5e4e | |||
| f73fb793ff | |||
| 7083594e96 | |||
| c0fdab7ce6 | |||
| d63144b7e1 | |||
| 9ab335dc82 | |||
| 346ea8583a | |||
| 0759718bd8 | |||
| 39a49bbf37 | |||
| eb4cdbe904 | |||
| 2c126e7bf5 | |||
| ca2d29a024 | |||
| 729e9eda04 | |||
| ac24e389b3 | |||
| 0036a235ed | |||
| 2d39261a1e | |||
| e9f030e164 | |||
| 2c87aec44a | |||
| c77c4d0b2d | |||
| 926fdadd32 | |||
| bd4dc179b8 | |||
| 7f7a779825 | |||
| 23ba3c646b | |||
| df51e0a4a7 | |||
| a700541abb | |||
| 2c4117cc50 | |||
| e97af6b7a1 | |||
| 3f1f5f6072 | |||
| 308f599683 | |||
| 20577ba42b | |||
| c6831b3ea0 | |||
| 41aeb9aede | |||
| e9081452d5 | |||
| 38151c4a45 | |||
| 1aff0cbe39 | |||
| 10c8928039 | |||
| f0600e428b | |||
| e170b54f9b | |||
| c6f4201fc0 | |||
| 1f1ac4be07 | |||
| 2afcd12df9 | |||
| 6a31d3e093 | |||
| 45266b3f63 | |||
| 3f20273e38 | |||
| 515d7f0906 | |||
| 13eb8447ac | |||
| df698e66cf | |||
| c817d06261 | |||
| 3ec50c35c1 | |||
| 67c297c615 | |||
| d2266eef08 | |||
| 48d7715b21 | |||
| 399d3995c5 | |||
| efb83c5d9d | |||
| 0a6f9b3548 | |||
| 2befb7106c | |||
| a94a88d331 | |||
| 2e1e4be90b | |||
| 1f8d32165e | |||
| 946489a181 | |||
| 7ee01d317d | |||
| de09ced18c | |||
| 303f6cf569 | |||
| 9a5694933b | |||
| 64c61a4f43 | |||
| 656a72fb71 | |||
| f95a2060df | |||
| ccbbaeddd6 | |||
| 12b6415e78 | |||
| e0c988f550 | |||
| 73c398015e | |||
| a01e32f67b | |||
| 8e898bd2de | |||
| 77b8783db2 | |||
| cf80a547ce | |||
| 727cbaffa7 | |||
| d53896ab9b | |||
| 6dbcaeeeb0 | |||
| bf186bf7c2 | |||
| d519b1891b | |||
| 47493be741 | |||
| eb831f79c1 | |||
| 52cd8a9821 | |||
| 2ae4511c0c | |||
| 8954fa0d16 | |||
| 2a3a171ca3 | |||
| 1fc6fc205b | |||
| 9f74a26b1f | |||
| dbda99eb07 | |||
| f82e3df79f | |||
| b514501496 | |||
| cdc092218f | |||
| e2d52fe785 | |||
| a8a3fca9a0 | |||
| 113dd51ea3 | |||
| 4443556d2e | |||
| ec0b4e53be | |||
| f5fa8cbc5c | |||
| 1e5e0ca303 | |||
| c48b2ae0c9 | |||
| d802fc9458 | |||
| 500539f9c8 | |||
| eba91edabb | |||
| 7c274113eb | |||
| 939d18d323 | |||
| 57057593e9 | |||
| b5c8fc8be2 | |||
| abd3c0174f | |||
| 67597003cf | |||
| 826e865708 | |||
| bc48353cc5 | |||
| c9cc125a73 | |||
| 6c59ecddd6 | |||
| ea83616dde | |||
| b0ce537eb6 | |||
| 48866df182 | |||
| 2b0dadc3fb | |||
| 646b69e35e | |||
| 2ac080cb19 | |||
| 3956f65bd0 | |||
| b1ea7ab8d7 | |||
| 50b3f2e38f | |||
| 92237f7634 | |||
| b06c682cd5 | |||
| bf52e6f7a9 | |||
| caa0fa6e20 | |||
| 4b91513410 | |||
| 426fe81e54 | |||
| cce7d4f63e | |||
| e76f73eb52 | |||
| 17dd9f2e51 | |||
| 543381ffd7 | |||
| c5816a06c2 | |||
| c3743345ee | |||
| 5b2530d6b2 | |||
| 32bb1fada6 | |||
| 1df574a033 | |||
| a6191c6047 | |||
| f3c582131f | |||
| 92daf7bd16 | |||
| 93c1bf4aee | |||
| 9a0d253c2c | |||
| 95db5af92c | |||
| 081e3858cd | |||
| 50e7c00cac | |||
| 3220c75c4e | |||
| c5727c8437 | |||
| f05d52ccb1 | |||
| d24a6213a6 | |||
| 14e1163651 | |||
| 4c6b0aa0c8 | |||
| 04921b9b8f | |||
| ee269b9ad5 | |||
| 359aca85de | |||
| 76f8f95769 | |||
| 99e7891705 | |||
| acbc71f94b | |||
| c683b3567a | |||
| 010049efd4 | |||
| 83fd08ec5d | |||
| 9b668a85e9 | |||
| 07277e7107 | |||
| 9d8fdc485e | |||
| fab0754115 | |||
| 35b13f9927 | |||
| 807bfc889d | |||
| 9449806628 | |||
| 87af2671eb | |||
| 946bc3e75d | |||
| 1f52a16ef1 | |||
| 444c73d6a5 | |||
| 899979491b | |||
| ed5088f49a | |||
| 0a1f8af4e0 | |||
| cf2d0681a9 | |||
| ec5d9bc7ef | |||
| 2fabab8822 | |||
| 41409252da | |||
| c35132b2a9 | |||
| 91810fd9ef | |||
| e6ffa8171d | |||
| cfde4c9e52 | |||
| 736fd2a200 | |||
| a4a5a954e7 | |||
| 1329d43de0 | |||
| 7166f291b7 | |||
| 7d5c4275c2 | |||
| 2f902d7390 | |||
| 6283dd2635 | |||
| 69be6a3f07 | |||
| beb0c5ef09 | |||
| 7fa9422485 | |||
| 262ca3a99b | |||
| ee4d81fdea | |||
| 569dc15f4f | |||
| a0500ee0d4 | |||
| 10b39e1301 | |||
| d69d9de4c6 | |||
| d6c94ed314 | |||
| b7f3fb5deb | |||
| 8c58dd00b5 | |||
| 12b145050f | |||
| 34a44cefc4 | |||
| 8ff6ce2ff2 | |||
| dfdf8322d2 | |||
| 01e041efd6 | |||
| 1cbec25e35 | |||
| e38daf8467 | |||
| 40ff084785 | |||
| af83dee486 | |||
| 2081d3b18c | |||
| 443b3fff0d | |||
| ab3a2e704b | |||
| 590de892e6 | |||
| 06ece44d22 | |||
| 224a3e35f2 | |||
| 2013d93521 | |||
| d6083f3017 | |||
| df86abf313 | |||
| 22a0e38fbb | |||
| b183d5f141 | |||
| 87a0cafd24 | |||
| a6c20a66ed | |||
| edbb25441f | |||
| 38922b9860 | |||
| e5a5302284 | |||
| b9dc7f9b81 | |||
| 204aa7b154 | |||
| 36b52dc240 | |||
| e3530fb537 | |||
| cbbcb0ebdd | |||
| e8789745aa | |||
| bd15789c4c | |||
| 003b7670cb | |||
| 7d2efa2aa0 | |||
| ed58320403 | |||
| 0e983a2b62 | |||
| 28c0732fd4 | |||
| 6170c8c5c6 | |||
| ef4ef8a8b6 | |||
| 2734a17368 | |||
| e5b892f37a | |||
| 64e37e180a | |||
| 2993a9d7c8 | |||
| 05dbf9a83f | |||
| bfda82c6f9 | |||
| f70437892a | |||
| 036f8f2cf3 | |||
| 98b146394f | |||
| 549a46ffcc | |||
| bb133844e4 | |||
| 679398ab2a | |||
| 5a1fc5d5ad | |||
| 106bd6e1c3 | |||
| df72c2ccd4 | |||
| eb57f41857 | |||
| 739af21685 | |||
| 739b802d0f | |||
| 19a60bcf7c | |||
| 391df20a46 | |||
| f25f315639 | |||
| 1c2e5d7d39 | |||
| 12c83f4a6f | |||
| 17a2dd8e7a | |||
| d8ecbb828f | |||
| de1c12786b | |||
| e863e14093 | |||
| dedb21de65 | |||
| 7fd77130b5 | |||
| 19ed69e870 | |||
| 3729c5bb3f | |||
| 9bceba1d9d | |||
| b45a2a532a | |||
| 7c125f2aa8 | |||
| 8b9a842521 | |||
| f376787c57 | |||
| 39e0e173bf | |||
| 319f13bf92 | |||
| 9132f5b057 | |||
| 78b1dd3f88 | |||
| 285bcb5d5c | |||
| b662d9ae12 | |||
| fdc7b2c193 | |||
| 19b739e614 | |||
| 1bc5708920 | |||
| 99703bfc7d | |||
| 1cf6a385a0 | |||
| 6461427870 | |||
| 96b5ed86e8 | |||
| 45025d7b5f | |||
| cb7cd8ec71 | |||
| 2a8688d39c | |||
| d014321afd | |||
| f3e0581ac5 | |||
| 8db49bd998 | |||
| 02df95256e | |||
| 25f9c3884a | |||
| 8d5e6edd84 | |||
| de0969d1de | |||
| 26879c46fc | |||
| 2916482f8c | |||
| f8a79ab175 | |||
| 885ed7b51d | |||
| fa42b57dd3 | |||
| 064328b92e | |||
| d64370541e | |||
| f96d802182 | |||
| fefa233d9c | |||
| 6fea0b6683 | |||
| 5290c2fc09 | |||
| 653190fa6e | |||
| fb089b9a71 | |||
| 522960a2c0 | |||
| 705c202ba9 | |||
| ef358767e0 | |||
| 9771340ba2 | |||
| d6b2f156ff | |||
| 1ce228614d | |||
| c4ec82ecc6 | |||
| f51c5f698f | |||
| c9fed93159 | |||
| e24c4655c7 | |||
| a783d1b713 | |||
| 46063018fe | |||
| d52baca0cb | |||
| f3cfe0e2ab | |||
| 909fce3119 | |||
| b0b0b5e839 | |||
| 77028f2c29 | |||
| f6c6db2597 | |||
| f697e55a95 | |||
| b6be7ae1ae | |||
| 12377e8f9e | |||
| d816ee2b5d | |||
| 16194ce2c3 | |||
| 6a99d5629d | |||
| dd8b9592e0 | |||
| 7526a3b16c | |||
| 9da3a9a7cb | |||
| 49dc280805 | |||
| 16d8d18c0d | |||
| 18eee8f2f9 | |||
| dfeea3184e | |||
| f182b22b76 | |||
| 5f1e3b467e | |||
| b41d35f05b | |||
| b69c583d22 | |||
| bb99ae7e03 | |||
| a126213ed5 | |||
| d13ab0b992 | |||
| f0d205b9f6 | |||
| 0659912848 | |||
| 5e7d36ab98 | |||
| e3b9b707e5 | |||
| c79768b2e0 | |||
| 8dbec5230f | |||
| 51281e1850 | |||
| 9f11df4d30 | |||
| b102f5e622 | |||
| cbcd451dbd | |||
| f2f8474495 | |||
| 1588e8128d | |||
| 2222b28fdd | |||
| eb859cb53c | |||
| 4231e1bba5 | |||
| 6ee6bc05b0 | |||
| 25666a1895 | |||
| c24e5b5cc3 | |||
| 4fb09287b6 | |||
| f6986c1bac | |||
| 0e86cf801b | |||
| 8355f3d3b4 | |||
| 8c4f5dbfd8 | |||
| c1b1055c1b | |||
| 9a892424d3 | |||
| 244aa81d1a | |||
| 539afb5773 | |||
| 90c17258c2 | |||
| 2909795958 | |||
| 87517c8247 | |||
| 015dd91cd8 | |||
| 01d6fdacc0 | |||
| 2e62753e4d | |||
| 962ed6ebf8 | |||
| 8641bee38a | |||
| c9e5aad704 | |||
| d4cc36fbe8 | |||
| 42a38ba8d0 | |||
| 483a1c3277 | |||
| b132383344 | |||
| 480ba538fa | |||
| 896ebeccd0 | |||
| 90b4a261f6 | |||
| 23e05440cd | |||
| 104c85ab84 | |||
| 1eeaf4e881 | |||
| 63ec2d48c6 | |||
| fcbb998d72 | |||
| 24b674f99d | |||
| 22a1cbbf7e | |||
| 1ba2641b5b | |||
| 561f372e20 | |||
| 8fe7a5408c | |||
| 0c30276a39 | |||
| e614dba6ba | |||
| c8ecb7b7c7 | |||
| f58c769ce2 | |||
| cbc4f65a43 | |||
| 0a12c9f43b | |||
| 98100189ec | |||
| 93120acbcf | |||
| 244dfaf245 | |||
| 25b77cbf2a | |||
| d6e359b460 | |||
| 80e396ba67 | |||
| b6738b9e15 | |||
| fdddeb2e33 | |||
| 94953e6ce1 | |||
| e3c3f7e2ad | |||
| ea842fdcd4 | |||
| 6bd2be6c19 | |||
| 7ee5220010 | |||
| e5188abc04 | |||
| 7db953b341 | |||
| 29d91ec83b | |||
| e8af406e8c | |||
| 66f85fd665 | |||
| b14e56e7ed | |||
| 11917efbb1 | |||
| c8a51d5272 | |||
| 9d02380e5d | |||
| 346d3fc13c | |||
| 6bda614fce | |||
| cbb79103d9 | |||
| 049e2dad48 | |||
| 0c20b9e0e0 | |||
| f4ec56896c | |||
| 7bb826d024 | |||
| c20a6d656b | |||
| 03a1ddb767 | |||
| 3ff2841600 | |||
| a61050d0b7 | |||
| 273cb19123 | |||
| 78598fc848 | |||
| f5d43cbefd | |||
| bdc508ca30 | |||
| 6c7c5c92cd | |||
| cba216eea6 | |||
| 9efd9c6cb1 | |||
| db05859538 | |||
| ec32cf4399 | |||
| 569017d4b5 | |||
| 578b776f50 | |||
| 5bd3dd5389 | |||
| c29f251e0c | |||
| 7486b13eef | |||
| 7dca418f8f | |||
| 43edb6e28e | |||
| c87a4eb985 | |||
| f3bec68606 | |||
| d778c96f24 | |||
| 5238680f4e | |||
| c582ec1f00 | |||
| d403dee27f | |||
| 033c674821 | |||
| 6b47b3ed04 | |||
| 20448bbb9f | |||
| 99be2add0d | |||
| 329879b152 | |||
| 567a0cf048 | |||
| 241666ab45 | |||
| eb51a46b07 | |||
| 60bc5c0d01 | |||
| 82c369f341 | |||
| f237dfbc7c | |||
| fe5cd58192 | |||
| 62dc4a0d3e | |||
| 04c6035e79 | |||
| 70be4e63a9 | |||
| 12bfcf4363 | |||
| b0a2691a9b | |||
| 7b043b8aad | |||
| 23fb52737b | |||
| c1e849a701 | |||
| 75bc1c5015 | |||
| 8a975d9829 | |||
| c26fb969c3 | |||
| 4544c029bf | |||
| af7eac439c | |||
| 76bb7b8a60 | |||
| 8c1b90ac2a | |||
| 2242dc0558 | |||
| efc9851ece | |||
| d8da557343 | |||
| ca566baee7 | |||
| 6cfe4927ee | |||
| 2f86ddf54d | |||
| 4efd4a1fbd | |||
| bfa463f427 | |||
| c36e1390eb | |||
| d1bd12b0e2 | |||
| 9d9fec4c62 | |||
| dbc0eea563 | |||
| 97d8766dc6 | |||
| 0d95cb99fd | |||
| 06ebe00ed3 | |||
| a5eddf5e9a | |||
| 5e8a75e6f4 | |||
| 3061d2a15f | |||
| a6359ab812 | |||
| b767b19a22 | |||
| 9e7160f4e0 | |||
| 90b1454d3f | |||
| 0247a68bb2 | |||
| 55c5c9fb3d | |||
| 6791b36b20 | |||
| a78d4ab6a5 | |||
| 8561b882d6 | |||
| 34ce78ca92 | |||
| bf96a523bf | |||
| ea6fc565da | |||
| 0626768b17 | |||
| aebb05a22d | |||
| b4f69b80a6 | |||
| 1a28044b91 | |||
| ed9b4fd905 | |||
| b067ca460f | |||
| e3b897ced2 | |||
| 6b59ed084a | |||
| 398dd3c5d4 | |||
| 64dd8e0466 | |||
| fc497729fd | |||
| b2d5e59da0 | |||
| 1d8aed0c37 | |||
| 41f080ea36 | |||
| 9ae0c84205 | |||
| f2002aa178 | |||
| 62a497b1a3 | |||
| dd9ae34c02 | |||
| b16960015e | |||
| d7bbf9d357 | |||
| 8f086dcd8a | |||
| 688e0c7506 | |||
| b34d1e275c | |||
| 43036fb7fe | |||
| 09eb756bc6 | |||
| 570bc23f02 | |||
| 832e230cd8 | |||
| 80ef38459c | |||
| a0ecb15c19 | |||
| 02f1626fb8 | |||
| 5800c1d74d | |||
| b95ed0f2dd | |||
| 1293a4a327 | |||
| 18fc805a0f | |||
| 540a19cfaa | |||
| 218bfd1323 | |||
| ca482d88d2 | |||
| b50433ca19 | |||
| 2314c2c63f | |||
| 3de1a7f2c2 | |||
| a6fad03602 | |||
| 5e8bce8c51 | |||
| 85733dfa3c | |||
| c062c0f857 | |||
| 190cdee153 | |||
| 7107433dcd | |||
| d1c9b8dbbe | |||
| ed26c90816 | |||
| 0960f63f03 | |||
| 2f3e4fc8c2 | |||
| c27e89a85c | |||
| 8f0077396e | |||
| 35250f7334 | |||
| 2f4a211065 | |||
| 2ae1f65705 | |||
| 79654065b4 | |||
| 6a672affcd | |||
| 6094e56112 | |||
| fa4a3bf606 | |||
| 7202b9da7a | |||
| 3bcd65bcb5 | |||
| 39581a1d09 | |||
| 8627293874 | |||
| 82b6211c50 | |||
| eac93274e6 | |||
| 1345baa885 | |||
| b8f66b69e1 | |||
| 4be8d6647d | |||
| 9428f23d63 | |||
| 38e261b283 | |||
| c0fbf32c8f | |||
| 1d5d5666fb | |||
| 16b9a17adc | |||
| 69f869ca16 | |||
| eb8ff64592 | |||
| 63afbe6d05 | |||
| 7db767b36c | |||
| 34ba91f8df | |||
| 2849eb539c | |||
| 62db60c36f | |||
| 9c343b5b58 | |||
| 0e075582c6 | |||
| 6557b37f44 | |||
| 4b30bb41a3 | |||
| a59e0f6a84 | |||
| c7f727d974 | |||
| 77fefd9123 | |||
| e65588ab65 | |||
| 5d024eb583 | |||
| 10e323f80b | |||
| 41a432a88a | |||
| e116197137 | |||
| 89b769ec11 | |||
| 9bcd254e1f | |||
| 6e02f37876 | |||
| 17064f496c | |||
| 0b2a39755f | |||
| c12bab5ede | |||
| a90f8beca3 | |||
| 417c2235f3 | |||
| a6b43ca28e | |||
| 252c3977f5 | |||
| 583e94f8ca | |||
| a16b870c3c | |||
| 48f09cbda3 | |||
| ccdbae085d | |||
| 1fa4cab410 | |||
| 32a5b96f89 | |||
| f5ccf0d0ef | |||
| c22cc8dd4a | |||
| 6dcd020977 | |||
| 40cd3dec1a | |||
| ef5981e752 | |||
| 67c99cdff5 | |||
| e44c295ad8 | |||
| edca8f0f33 | |||
| 7e5960c637 | |||
| 65ef0ffe81 | |||
| 92758ac2aa | |||
| 651d8779a8 | |||
| 5e80ca8573 | |||
| 623a331ef5 | |||
| 23b449951a | |||
| e638e812e2 | |||
| d113871810 | |||
| df4f271a7f | |||
| 0873d4ab8d | |||
| 28b1bb51ec | |||
| 910215c7a2 | |||
| 045fb50ac6 | |||
| 02d5cd9023 | |||
| 7a03540af7 | |||
| 6d2bc37c82 | |||
| 662a977f2a | |||
| 8e81ad1091 | |||
| fb709da465 | |||
| 8b2e421f59 | |||
| c40a5b413c | |||
| 1d89346337 | |||
| abd5432247 | |||
| 6d60d22ee1 | |||
| fb4cbb0cd2 | |||
| 01e4ab3c1c | |||
| b60b6933c6 | |||
| 971d5b79c5 | |||
| a55c42808d | |||
| a554eb6b75 | |||
| 9705ca763e | |||
| 4790d40f22 | |||
| 5499eb30af | |||
| 342bebfd40 | |||
| a643b5a0bf | |||
| ab44abd652 | |||
| ae20a06ce9 | |||
| b29e9f6dfc | |||
| ea288e8f9a | |||
| da975c6b42 | |||
| f711f996ef | |||
| ff69111bd2 | |||
| 155095b32a | |||
| 989b9f37b6 | |||
| e1512a8825 | |||
| 0f44c4ae13 | |||
| 2152f08eae | |||
| 6874ae57b9 | |||
| f8884ef1d2 | |||
| e1444d40da | |||
| 45e8e6c391 | |||
| 716ec49d32 | |||
| f4af0c831f | |||
| 720317931e | |||
| 323872c503 | |||
| bdc66f1f7a | |||
| 0819b2cc67 | |||
| ddf15c3e67 | |||
| cbed9f4de0 | |||
| e650629cb6 | |||
| fd6f5e24ea | |||
| 0858c1c06a | |||
| 84b716bb81 | |||
| b4c2a2240c | |||
| 0d0c1f0303 | |||
| 382f779114 | |||
| 336fd7ff39 | |||
| cdc6107715 | |||
| e4b1dba228 | |||
| dbc97fb205 | |||
| 5eaebe59d2 | |||
| 8abd247968 | |||
| b8b9b1d8e2 | |||
| 0df23b1b25 | |||
| 089cb1582f | |||
| 1259f07dbb | |||
| cb2a8e250d | |||
| 3f928b8be6 | |||
| 690a76bcde | |||
| 691954f517 | |||
| 0a9a69eb92 | |||
| d1cfc04f51 | |||
| 553acf35ca | |||
| 41ba156fe4 | |||
| 8283f207dc | |||
| b7bacb74f7 | |||
| 9628eb5902 | |||
| 7f758eb8c7 | |||
| 9ab367b32d | |||
| cb498936a1 | |||
| b26f0c3b53 | |||
| 8bedbd1406 | |||
| a5ef4ff627 | |||
| 397deb2b2a | |||
| ff35d368b3 | |||
| e0a4cfd0a5 | |||
| c1c44af54d | |||
| f4166a796c | |||
| c178b7f81e | |||
| 6496b6b417 | |||
| 5d3067c98f | |||
| 50fe2024ec | |||
| c84b0fcba7 | |||
| 2c096cff92 | |||
| 540419ac5f | |||
| 42f7f3863e | |||
| 922c242c00 | |||
| 6846b798ba | |||
| 36e02742b1 | |||
| e47e711cfa | |||
| b57def4763 | |||
| e7d2913f33 | |||
| f20118fed9 | |||
| 4bbf660067 | |||
| ce5a1b4521 | |||
| afede12c04 | |||
| b03dff09b4 | |||
| 49217b652e | |||
| b0afac60ad | |||
| bee9f9c7c2 | |||
| 171f312097 | |||
| 9944213436 | |||
| 919b0c316c | |||
| 1d1c1311a7 | |||
| fd30c6b272 | |||
| 5ddceb2116 | |||
| 27c494d808 | |||
| 7d771106a1 | |||
| 3a2a94f637 | |||
| 2589f6b642 | |||
| 6489762fa6 | |||
| 569c17eb59 | |||
| b47167bffa | |||
| 117eb69d00 | |||
| ca83dfed82 | |||
| 90e6bdb34e | |||
| 9895370291 | |||
| b28ea74582 | |||
| e3f9ce548d | |||
| 93c6927326 | |||
| 41f0d9e2d7 | |||
| f179a72a10 | |||
| 6442e69bb5 | |||
| b0769ed94b | |||
| 0e7d333f88 | |||
| a7499b4002 | |||
| 1cd0f1f61d | |||
| 3de8d970af | |||
| 783f0ef4a2 | |||
| 4e65569bb0 | |||
| be94cf3714 | |||
| 87c33c7616 | |||
| a449ab6310 | |||
| a98b011ed6 | |||
| 492054b243 | |||
| c8b7515f38 | |||
| 78df118350 | |||
| 0b035b344c | |||
| afcec85b1c | |||
| 040ff92099 | |||
| 29dcc1960c | |||
| 45498558f9 | |||
| d7b08463ea | |||
| 6557b4e7f5 | |||
| 2eb0ad444e | |||
| 7b7b50dad7 | |||
| a5620124d6 | |||
| 7642811bbf | |||
| 9457aacdf0 | |||
| 445b576a58 | |||
| 1ab05985ed | |||
| c170f7bc6a | |||
| 9b15e7fcf8 | |||
| 1f4459aafd | |||
| 8ab3b1a1cf | |||
| 085dcfd617 | |||
| 8e722ea716 | |||
| f15a4de104 | |||
| 10e3ae9f33 | |||
| 331bc16d61 | |||
| 77c87667db | |||
| 56c820fb49 | |||
| 66999b48f5 | |||
| c892792209 | |||
| 2d70b5c477 | |||
| f7af08ba42 | |||
| 6da3697f9f | |||
| 0e93b1b696 | |||
| dd444125ab | |||
| 5d5a1d0960 | |||
| c8ce78afd0 | |||
| ef83b84f8b | |||
| a395843c68 | |||
| 7615f98ff7 | |||
| a6494f5ad5 | |||
| 379c161446 | |||
| 0c734d6832 | |||
| 06e7288463 | |||
| a1833b71bb | |||
| 47fb78f48f | |||
| 3062f7b1c5 | |||
| 685d36e801 | |||
| 928fc755cc | |||
| 3942bb6bde | |||
| 740ccdeae5 | |||
| 43ab59355c | |||
| 01975326ff | |||
| d19eb1b420 | |||
| 6d6df3b0e0 | |||
| 5ed3f2cdc3 | |||
| fd856d47cd | |||
| 432aa7a7f9 | |||
| 60d84eb9c7 | |||
| 22a998a486 | |||
| 8d25113870 | |||
| 8eed366797 | |||
| 829b4c4755 | |||
| 52db89f7c8 | |||
| 49e7c28584 | |||
| 6377d81abc | |||
| 3c1b528685 | |||
| 8f290fcc86 | |||
| e0e1f3e654 | |||
| b663eef6f0 | |||
| 0ff829de6a | |||
| c7e5684425 | |||
| 3df4b1af97 | |||
| 35ae82ec91 | |||
| 34f6fb4e8d | |||
| 7e53e362b3 | |||
| 6319f032ec | |||
| 26c3919ded | |||
| e9fe6943b3 | |||
| b5c37c493e | |||
| 9a83ba77d2 | |||
| e397c29983 | |||
| a49daf240c | |||
| e0ee49cfef | |||
| 0ead765da9 | |||
| 0ec54e1dcf | |||
| efe30fdc31 | |||
| faf89f3c8e | |||
| 195a68e9e1 | |||
| b804dde202 | |||
| d95c55f8c4 | |||
| 195446684f | |||
| 447fa2e768 | |||
| 1035cc8ba6 | |||
| 7929120aa8 | |||
| 0696961ea7 | |||
| e558e38487 | |||
| df013ad57b | |||
| 06f5c8ddd7 | |||
| c5e5541282 | |||
| ab984471bd | |||
| ca48e195b2 | |||
| 2ee0736a5a | |||
| 9d766a375f | |||
| 89e2fabaf4 | |||
| c91b3ebaa2 | |||
| 77bb0fe85f | |||
| 678b3f5f5c | |||
| 17a6d312a7 | |||
| cc5bccdf33 | |||
| a62858a5a5 | |||
| ab6425d526 | |||
| 7bad2dfd0a | |||
| ac4c9c60d3 | |||
| bc07a5179f | |||
| 61e4d140e3 | |||
| 07317608bc | |||
| b32ff5badc | |||
| 4653350687 | |||
| 8a2cc5493c | |||
| a97b899e74 | |||
| fb3ba56953 | |||
| 0ee8e83212 | |||
| 16ab75d7fa | |||
| 3a4c5e8047 | |||
| 26611e970f | |||
| 9d984bbd5f | |||
| 141d788990 | |||
| ef00549452 | |||
| 5f3ccbcf1c | |||
| 552a6d3cd4 | |||
| efa46c5d62 | |||
| 92739fdbeb | |||
| 84a0becfe4 | |||
| 31c5694c10 | |||
| 1c0e09c334 | |||
| 5aa4104683 | |||
| d626730dd2 | |||
| f3b0bcb7c9 | |||
| 6db72c165c | |||
| d67fc55322 | |||
| 78942cc30f | |||
| 0f682ec45e | |||
| d4f500787b | |||
| 986b7a07f0 | |||
| 835652c5d2 | |||
| 6f63dd7522 | |||
| ab15f1a879 | |||
| 4f8010d0a0 | |||
| 0988944949 | |||
| c52f6b9048 | |||
| 1e07470c98 | |||
| 61113a8dd9 | |||
| 5acbb5b3db | |||
| ebecd3b40e | |||
| 01cc3f6bf7 | |||
| fcee31c237 | |||
| 21855e2176 | |||
| 68cadcb52c | |||
| a28693139d | |||
| 2e3af258b4 | |||
| 528edd10b2 | |||
| 8bf2035d3c | |||
| 25c9986d4d | |||
| 0c759878bd | |||
| 903feb9bc1 | |||
| 23f088e938 | |||
| c9ef1d465b | |||
| 9d61f574e8 | |||
| 01bfde4bc7 | |||
| f673fe21d2 | |||
| 7f5d6f8383 | |||
| a9606106cd | |||
| 029ce0d948 | |||
| 97e822da48 | |||
| 25b58a0873 | |||
| d9dcdb8915 | |||
| c02fd28af1 | |||
| a22522a725 | |||
| 8dc7cd36fe | |||
| 49b3b63d72 | |||
| d2501bc030 | |||
| 97b9331afb | |||
| 6451098bd8 | |||
| 510c759f64 | |||
| 6363ad61f7 | |||
| 551fc095ac | |||
| 7cfb3e9369 | |||
| 222ce076f5 | |||
| d7d7b8bf49 | |||
| b5ace4ad2a | |||
| 35eea03570 | |||
| 91449a4fc0 | |||
| 3e835b85a0 | |||
| 0816af5cb8 | |||
| a783ea88d3 | |||
| 8e4024afb0 | |||
| d29b244ff3 | |||
| 092793805b | |||
| 3d5ba4eae8 | |||
| 4350320437 | |||
| 3153790ac8 | |||
| 2316fd5911 | |||
| b8519ed9c7 | |||
| 4183d70999 | |||
| 9a8283e121 | |||
| 6f96ab0173 | |||
| 9f48d73510 | |||
| 305d1f5cdd | |||
| b1a8c6d395 | |||
| bd364111dc | |||
| e9745bba42 | |||
| 3882cb5cc2 | |||
| 7920ca2d48 | |||
| 8673eea0a1 | |||
| dc2d6a7244 | |||
| 34d4b97189 | |||
| eb0f327c49 | |||
| 877b136f02 | |||
| 705a2f25d6 | |||
| 10ce9024f4 | |||
| 40350df34f | |||
| ad3c7828d4 | |||
| 25dd4be923 | |||
| 9474e84e35 | |||
| ede15e1a8f | |||
| b51549e20a | |||
| b9f6c70b95 | |||
| 6359d73864 | |||
| f8a43b5053 | |||
| f7b4bb5635 | |||
| 27f6f4064a | |||
| 783bc2cc18 | |||
| 524ad4a5e1 | |||
| 3ed605f45f | |||
| dcca01a26d | |||
| deedf81e90 | |||
| bd387006f4 | |||
| ed149d8ef3 | |||
| 086e56c81d | |||
| 3b561a037e | |||
| e97fd63d8b | |||
| 9475956cdc | |||
| f74a85320e | |||
| d314685789 | |||
| 42d5e77536 | |||
| 6d35478837 | |||
| be01f5fcab | |||
| ad9f771c02 | |||
| 268819aa44 | |||
| 865b5ec6ba | |||
| d2d7cc175e | |||
| a195837be5 | |||
| 3ee1b69be4 | |||
| cec14342fa | |||
| e6b8b4b858 | |||
| 9d7ed3b561 | |||
| 723002d92b | |||
| 05037ceed2 | |||
| f4795426be | |||
| acdf2094d0 | |||
| bbd5143dc3 | |||
| 9e23cf1a92 | |||
| edafe2e453 | |||
| e11b84b982 | |||
| 8c1751c0b5 | |||
| eafd32048b | |||
| 8712b85bea | |||
| b9b08294c9 | |||
| f162d0f195 | |||
| ff98c8c4db | |||
| 3f13bb9f25 | |||
| ce19e1bf8d | |||
| f64cb83838 | |||
| d790f8f9ba | |||
| f42e20b48d | |||
| 5f6441214b | |||
| ded915d780 | |||
| a711120781 | |||
| ec1e7b63e1 | |||
| 6479dfcbe2 | |||
| d3462eca05 | |||
| 479f6feb6c | |||
| d897f1b9cb | |||
| c37e641e6b | |||
| e098d1d39b | |||
| a2727180df | |||
| 79fc31c74f | |||
| cda170ff64 | |||
| 7fceef44f2 | |||
| d1e11bf78a | |||
| 3957eb2bf6 | |||
| bb56645fb0 | |||
| 04bd38a2ab | |||
| 78591cd9ca | |||
| fe2b68697b | |||
| 4d27d8a250 | |||
| c474d10f77 | |||
| 600130b1a1 | |||
| 602e64dafe | |||
| 22f93982df | |||
| 6bb10531bc | |||
| eb345f04c2 | |||
| 96a4d54295 | |||
| ca9a57c684 | |||
| 9074961c55 | |||
| 909ca50c49 | |||
| c0f8cea2cf | |||
| c4318c4e3d | |||
| 14eb3ddd4f | |||
| 8a3bec3f62 | |||
| 697cba3bb5 | |||
| b5087e1ed4 | |||
| fd689a4a3b | |||
| e38776ab89 | |||
| 06696b6002 | |||
| 491273bd35 | |||
| 4182ff8bf5 | |||
| 49589a2406 | |||
| 65e992f0c2 | |||
| 15df8f7f37 | |||
| 73378e1456 | |||
| 6bf376f3cf | |||
| 1708fc2b3b | |||
| 91f2a5a00a | |||
| 748d7561d8 | |||
| 1faf1e61c0 | |||
| 2dbd68c703 | |||
| 08e8426cbd | |||
| c68bb0f295 | |||
| ef62aeaa65 | |||
| c288630d74 | |||
| d9de70eb3f | |||
| 9e3482b8ef | |||
| d578c09c85 | |||
| 3d03d8c2a7 | |||
| 3c70c9475c | |||
| 68551c1145 | |||
| 348e83c86a | |||
| 3983e49459 | |||
| a09087b3f2 | |||
| 4e66ed5cb3 | |||
| ff458e43ea | |||
| 4466f7e315 | |||
| 1140e5a28a | |||
| 9bef3b10ef | |||
| eb27dae044 | |||
| 0a2bfc91f4 | |||
| d0e47205ea | |||
| 431c9cdb1f | |||
| 2a77a1307e | |||
| 4e964a58f9 | |||
| 37d1a0b365 | |||
| aeee7fa419 | |||
| af799bc6c4 | |||
| efd23ef434 | |||
| 0cb717e342 | |||
| d13ca72b67 | |||
| d85b39e41f | |||
| 6a570f0c53 | |||
| 1ec122d162 | |||
| cf1fcdde28 | |||
| 2dd42317ef | |||
| 7da807e1be | |||
| 989be8275d | |||
| 5485b75e2f | |||
| 55e1197800 | |||
| 3cb3dce7f2 | |||
| 294c04cc1e | |||
| 9bbefa16e8 | |||
| b66fd49c8e | |||
| 424bcf0b5d | |||
| 78d87c8e4c | |||
| 11f18517f4 | |||
| 7eff9b9fe1 | |||
| fec629aa4f | |||
| 66e8cdf26b | |||
| 015a8b5284 | |||
| 6ad3169434 | |||
| 0379189c17 | |||
| ac4c785fb8 | |||
| e08ceb81db | |||
| 4495a9369f | |||
| 11fac6058d | |||
| 098887a329 | |||
| f394fa7b92 | |||
| 0da409648c | |||
| 9108c53e5d | |||
| 22c3301c5b | |||
| e22b6f6e81 | |||
| 2ab5e43c29 | |||
| 40318b986d | |||
| a8051ba330 | |||
| d4bbbf352b | |||
| 95b0f791c2 | |||
| 6f1ddd2126 | |||
| 03153ebfc5 | |||
| 2e475fa83d | |||
| b0345c2f7b | |||
| 9f94ff602b | |||
| ec1f8c0656 | |||
| 8f9f2b81fa | |||
| 2e40eeaf57 | |||
| 195d8caba5 | |||
| f0eb67f2df | |||
| aec010d4aa | |||
| 61d7722d58 | |||
| 5510fdda83 | |||
| c2d5d6b845 | |||
| 688263a4b2 | |||
| b505b82a6c | |||
| ed4ca9497d | |||
| b04f51abe3 | |||
| 41950db139 | |||
| ac3bebf8bc | |||
| a9e0ee9515 | |||
| 1bfb4bec63 | |||
| d62c714434 | |||
| 1d84ccf2b5 | |||
| 9a79713510 | |||
| 5f87fcd549 | |||
| 98779857d6 | |||
| e7fb33496e | |||
| 1bc4f249de | |||
| d6b05e978e | |||
| 76bbf9779d | |||
| aaff40057e | |||
| 6dae388bcf | |||
| 32e2942650 | |||
| fd9975c5ff | |||
| db5c679e8d | |||
| a6d32cde1a | |||
| f34568ee60 | |||
| bbbe83ffdc | |||
| 01f5296a1d | |||
| 3fbca61610 | |||
| 3367e0cf13 | |||
| 98220d9e36 | |||
| 2d8967f603 | |||
| cbfe708f36 | |||
| 2be2924e05 | |||
| ea7211ab97 | |||
| 8047cbf4ff | |||
| b7d0bae27e | |||
| ad1920876c | |||
| 46bcc0845a | |||
| 95f3b83ff3 | |||
| 4ca94f6bb1 | |||
| 5edcfdcd26 | |||
| 397b231583 | |||
| e066f83cda | |||
| 6402bcf27b | |||
| a720914bb5 | |||
| e36d22b247 | |||
| 70ef2c462d | |||
| 68952a196e | |||
| 2054755efa | |||
| 44d3adbc92 | |||
| 7b3f6542e7 | |||
| ec96820550 | |||
| bb1872ac1a |
+20
@@ -1,4 +1,5 @@
|
||||
cataclysm
|
||||
cataclysm-tiles
|
||||
data/*.template
|
||||
save/
|
||||
obj/
|
||||
@@ -12,3 +13,22 @@ version.h
|
||||
Cataclysm.exe
|
||||
CataclysmWin.depend
|
||||
CataclysmWin.layout
|
||||
|
||||
# Visual Studio files
|
||||
*.suo
|
||||
*.user
|
||||
Cataclysm.sdf
|
||||
Release*/
|
||||
Debug*/
|
||||
*.opensdf
|
||||
|
||||
# Temporary and backup files
|
||||
*~
|
||||
\#*
|
||||
*.bak
|
||||
*.cbTemp
|
||||
gmon.out
|
||||
|
||||
# System Files
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ Current policy is to update code to the standard style when changing a
|
||||
substantial portion of it. Blocks of code can be passed through astyle
|
||||
to ensure that their formatting is correct:
|
||||
|
||||
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
|
||||
astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name -p
|
||||
|
||||
For example, from vi, set marks a and b around the block, then:
|
||||
:'a,'b ! astyle --style=allman --indent=spaces=4 --add-brackets --align-pointer=name
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
Instructions for compiling on a Debian-based system. The package names here are for Ubuntu 12.10
|
||||
|
||||
Dependencies: libncurses
|
||||
|
||||
# Native build on current platform
|
||||
sudo apt-get install libncurses5-dev
|
||||
make
|
||||
|
||||
# Cross-compile to linux 32-bit from linux 64-bit
|
||||
sudo apt-get install libc6-dev-i386 lib32ncurses5-dev lib32stdc++-dev g++-multilib
|
||||
make NATIVE=linux32
|
||||
|
||||
# Cross-compile for Windows
|
||||
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
|
||||
mkdir -p ~/src
|
||||
git clone -b stable https://github.com/mxe/mxe.git ~/src
|
||||
cd ~/src/mxe
|
||||
make gcc
|
||||
PATH=${PATH}:~/src/mxe/usr/bin
|
||||
make CROSS=win32
|
||||
@@ -0,0 +1,84 @@
|
||||
Instructions for compiling on a Debian-based system. The package names here are
|
||||
valid for Ubuntu 12.10 and may or may not work on your system.
|
||||
|
||||
Building instructions, below, always assume you are running them from the
|
||||
Cataclysm:DDA source directory.
|
||||
|
||||
## Linux (native) ncurses builds ##
|
||||
Dependencies:
|
||||
* ncurses
|
||||
* build essentials
|
||||
|
||||
```
|
||||
sudo apt-get install libncurses5-dev build-essential
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
## Cross-compiling to linux 32-bit from linux 64-bit ##
|
||||
Dependencies:
|
||||
* 32-bit toolchain
|
||||
* 32-bit ncurses
|
||||
|
||||
```
|
||||
sudo apt-get install libc6-dev-i386 lib32stdc++-dev g++-multilib lib32ncurses5-dev
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make NATIVE=linux32
|
||||
```
|
||||
|
||||
## Cross-compile to Windows from Linux ##
|
||||
Dependencies:
|
||||
* [mxe](http://mxe.cc)
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
|
||||
mkdir -p ~/src/mxe
|
||||
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
|
||||
cd ~/src/mxe
|
||||
make gcc
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
PATH="${PATH}:~/src/mxe/usr/bin"
|
||||
make CROSS=i686-pc-mingw32-
|
||||
```
|
||||
|
||||
## Linux (native) SDL builds ##
|
||||
Dependencies:
|
||||
* SDL
|
||||
* SDL_ttf
|
||||
* build essentials
|
||||
|
||||
```
|
||||
sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev build-essential
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
make TILES=1
|
||||
```
|
||||
|
||||
## Cross-compile to Windows SDL from Linux ##
|
||||
Dependencies:
|
||||
* [mxe](http://mxe.cc)
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf bison flex cmake git automake intltool libtool scons yasm
|
||||
mkdir -p ~/src/mxe
|
||||
git clone -b stable https://github.com/mxe/mxe.git ~/src/mxe
|
||||
cd ~/src/mxe
|
||||
make sdl sdl_ttf
|
||||
```
|
||||
|
||||
### Building ###
|
||||
```
|
||||
PATH="${PATH}:~/src/mxe/usr/bin"
|
||||
make TILES=1 CROSS=i686-pc-mingw32-
|
||||
```
|
||||
@@ -0,0 +1,73 @@
|
||||
# Building Cataclysm-DDA on Mac OS X
|
||||
|
||||
Tested with OS X 10.8.4, Xcode 4.6.2.
|
||||
I haven't played it extensively but it builds and runs.
|
||||
|
||||
Not sure if it compiles with older OS/XCode versions.
|
||||
This worked for me, your mileage may vary.
|
||||
|
||||
## Requirements
|
||||
|
||||
Cataclysm-DDA uses SDL, SDL\_ttf, ncurses, and gettext.
|
||||
|
||||
SDL can be installed as frameworks or shared libraries.
|
||||
|
||||
### SDL Frameworks
|
||||
|
||||
[**SDL framework**](http://www.libsdl.org/download-1.2.php)
|
||||
http://www.libsdl.org/release/SDL-1.2.15.dmg
|
||||
|
||||
[**SDL\_image framework**](http://www.libsdl.org/projects/SDL_ttf/)
|
||||
http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.dmg
|
||||
|
||||
Copy `SDL.framework` and `SDL_ttf.framework` to `/Library/Frameworks`
|
||||
or `/Users/name/Library/Frameworks`.
|
||||
|
||||
### ncurses, gettext, libsdl, lib\_ttf
|
||||
|
||||
Using a package manager:
|
||||
[Fink](http://fink.thetis.ig42.org), [Homebrew](http://mxcl.github.io/homebrew/),
|
||||
[MacPorts](http://www.macports.org), or [pkgsrc](http://www.pkgsrc.org/).
|
||||
|
||||
Install gettext and ncurses. Also install libsdl and libsdl\_ttf if you're
|
||||
not using frameworks as above.
|
||||
|
||||
Without a package manager, building from source isn't too difficult;
|
||||
follow instructions in the source archives.
|
||||
|
||||
## Build
|
||||
|
||||
From the Cataclysm-DDA source folder:
|
||||
|
||||
$ export CXXFLAGS="-I/path/to/include" LDFLAGS="-L/path/to/lib"
|
||||
|
||||
This adds search paths to find shared libraries outside of /usr and /usr/local.
|
||||
Multiple `-I/...` or `-L/...` paths can be specified.
|
||||
|
||||
$ make NATIVE=osx RELEASE=1 TILES=1 FRAMEWORK=1 OSX_MIN=10.6
|
||||
|
||||
## Run
|
||||
|
||||
$ ./cataclysm
|
||||
|
||||
or
|
||||
|
||||
$ ./cataclysm-tiles
|
||||
|
||||
### Options
|
||||
|
||||
`NATIVE=osx` builds for OS X.
|
||||
|
||||
`RELEASE=1` builds an optimized 'release' version.
|
||||
|
||||
`TILES=1` builds the SDL version; omit to build the ncurses/console version.
|
||||
|
||||
`FRAMEWORK=1` uses frameworks; omit for libsdl, libsdl\_ttf.
|
||||
|
||||
`OSX_MIN=version` sets `-mmacosx-version-min=` (mine needs to be 10.6); omit for 10.5.
|
||||
|
||||
### Archive
|
||||
|
||||
$ make bindist NATIVE=osx TILES=1
|
||||
|
||||
Create a .tar.gz archive of the build; omit `TILES=1` for the console version.
|
||||
+3
-3
@@ -39,7 +39,7 @@ For example, from vi, set marks a and b around the block, then:
|
||||
|
||||
$ cd Cataclysm-DDA
|
||||
# Changes the active directory in the prompt to the newly cloned "Cataclysm-DDA" directory
|
||||
$ git remote add -f upstream https://github.com/TheDarklingWolf/Cataclysm-DDA.git
|
||||
$ git remote add -f upstream https://github.com/CleverRaven/Cataclysm-DDA.git
|
||||
# Assigns the original repository to a remote called "upstream"
|
||||
|
||||
#### Update your `master` branch
|
||||
@@ -113,7 +113,7 @@ You can also set the tracking information at the same time as creating the branc
|
||||
* Note: Although this makes it easier to pull from `upstream/master`, it doesn't change anything with regards to pushing. `git push` fails because you don't have permission to push to `upstream/master`.
|
||||
|
||||
$ git push
|
||||
error: The requested URL returned error: 403 while accessing https://github.com/TheDarklingWolf/Cataclysm-DDA.git
|
||||
error: The requested URL returned error: 403 while accessing https://github.com/CleverRaven/Cataclysm-DDA.git
|
||||
fatal: HTTP request failed
|
||||
$ git push origin
|
||||
....
|
||||
@@ -128,7 +128,7 @@ You can also set the tracking information at the same time as creating the branc
|
||||
If `git pull --ff-only` shows an error, it means that you've committed directly to your local `master` branch. To fix this, we create a new branch with these commits, find the point at which we diverged from `upstream/master`, and then reset `master` to that point.
|
||||
|
||||
$ git pull --ff-only upstream master
|
||||
From https://github.com/TheDarklingWolf/Cataclysm-DDA
|
||||
From https://github.com/CleverRaven/Cataclysm-DDA
|
||||
* branch master -> FETCH_HEAD
|
||||
fatal: Not possible to fast-forward, aborting.
|
||||
$ git branch new_branch master # mark the current commit with a tmp branch
|
||||
|
||||
Executable → Regular
+25
-2
@@ -19,6 +19,21 @@
|
||||
<Add option="-static -lgdi32" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug">
|
||||
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg -lgmon" />
|
||||
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
|
||||
<Add option="-static -lgdi32" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Unit filename="action.cpp" />
|
||||
<Unit filename="action.h" />
|
||||
@@ -27,15 +42,18 @@
|
||||
<Unit filename="artifact.cpp" />
|
||||
<Unit filename="artifact.h" />
|
||||
<Unit filename="artifactdata.h" />
|
||||
<Unit filename="auto_pickup.cpp" />
|
||||
<Unit filename="auto_pickup.h" />
|
||||
<Unit filename="basecamp.cpp" />
|
||||
<Unit filename="basecamp.h" />
|
||||
<Unit filename="bionics.cpp" />
|
||||
<Unit filename="bionics.h" />
|
||||
<Unit filename="bodypart.cpp" />
|
||||
<Unit filename="bodypart.h" />
|
||||
<Unit filename="building_generation.cpp" />
|
||||
<Unit filename="building_generation.h" />
|
||||
<Unit filename="calendar.cpp" />
|
||||
<Unit filename="calendar.h" />
|
||||
<Unit filename="catacurse.cpp" />
|
||||
<Unit filename="catacurse.h" />
|
||||
<Unit filename="catajson.cpp" />
|
||||
<Unit filename="catajson.h" />
|
||||
@@ -106,6 +124,8 @@
|
||||
<Unit filename="mapgenformat.h" />
|
||||
<Unit filename="mapitems.h" />
|
||||
<Unit filename="mapitemsdef.cpp" />
|
||||
<Unit filename="material.cpp" />
|
||||
<Unit filename="material.h" />
|
||||
<Unit filename="melee.cpp" />
|
||||
<Unit filename="mission.cpp" />
|
||||
<Unit filename="mission.h" />
|
||||
@@ -120,7 +140,6 @@
|
||||
<Unit filename="mondeath.h" />
|
||||
<Unit filename="mongroup.h" />
|
||||
<Unit filename="mongroupdef.cpp" />
|
||||
<Unit filename="monitemsdef.cpp" />
|
||||
<Unit filename="monmove.cpp" />
|
||||
<Unit filename="monster.cpp" />
|
||||
<Unit filename="monster.h" />
|
||||
@@ -171,11 +190,14 @@
|
||||
<Unit filename="text_snippets.h" />
|
||||
<Unit filename="tileray.cpp" />
|
||||
<Unit filename="tileray.h" />
|
||||
<Unit filename="translations.h" />
|
||||
<Unit filename="trap.h" />
|
||||
<Unit filename="trapdef.cpp" />
|
||||
<Unit filename="trapfunc.cpp" />
|
||||
<Unit filename="tutorial.cpp" />
|
||||
<Unit filename="tutorial.h" />
|
||||
<Unit filename="ui.cpp" />
|
||||
<Unit filename="ui.h" />
|
||||
<Unit filename="veh_interact.cpp" />
|
||||
<Unit filename="veh_interact.h" />
|
||||
<Unit filename="veh_type.h" />
|
||||
@@ -187,6 +209,7 @@
|
||||
<Unit filename="weather.cpp" />
|
||||
<Unit filename="weather.h" />
|
||||
<Unit filename="weather_data.cpp" />
|
||||
<Unit filename="wincurse.cpp" />
|
||||
<Unit filename="wish.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
|
||||
+77
-1
@@ -61,6 +61,82 @@
|
||||
{ot_toxic_dump, 0, 5, 15, -1, mcat_null, 0, 0, 0, 0, &omspec_place::wilderness,0}
|
||||
The comments given in source code to structure struct overmap_special explains the meaning of these constants in the example above.
|
||||
|
||||
1.4 Adding/editing armour and how armour protection is calculated
|
||||
1) Edit armor.json and add your armor item near similar types.
|
||||
2) The fields are:
|
||||
"type" : "ARMOR", // this must be ARMOR
|
||||
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
|
||||
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
|
||||
"weight" : 1, // weight of armour
|
||||
"color" : "blue", // ascii character colour
|
||||
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
|
||||
"to_hit" : 0, // bonus if using it as a melee weapon (whatever for?)
|
||||
"storage" : 0, // how many volume storage slots it adds
|
||||
"symbol" : "[", // ascii character
|
||||
"description" : "Socks. Put 'em on your feet.", // description of armour
|
||||
"price" : 100, // price of armour, used when bartering with NPCs
|
||||
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
|
||||
"volume" : 1, // volume occupied
|
||||
"cutting" : 0, // cutting damage caused by using it as a melee weapon
|
||||
"warmth" : 10, // how much warmth clothing provides
|
||||
"phase" : "solid", // what phase it is
|
||||
"enviromental_protection" : 0, // how much environmental protection it affords
|
||||
"rarity" : 70, // determines how often it spawns
|
||||
"encumberance" : 0, // base encumbrance (unfitted value)
|
||||
"bashing" : -5, // bashing damage caused by using it as a melee weapon
|
||||
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
|
||||
"coverage" : 80, // what percentage of body part
|
||||
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
|
||||
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
|
||||
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
|
||||
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
|
||||
6) The above steps are repeated for each layer of armour on the body part
|
||||
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
|
||||
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
|
||||
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
|
||||
|
||||
1.5 Acid resistance
|
||||
This determines how items react to acid fields. Item acid resistances are a weighted
|
||||
average of the materials acid resistance (see item::acid_resist).
|
||||
An item acid resistance of zero means it will get corroded every turn
|
||||
An item acid resistance above zero means it has a chance of getting corroded every turn
|
||||
An item acid resistance above 9 means completely acidproof
|
||||
|
||||
Acid resistance values are in materials.json, and defined as such:
|
||||
0 - zero resistance to acid (metals)
|
||||
1 - partly resistant to acid
|
||||
2 - very resistant to acid
|
||||
3 - complete acid resistance
|
||||
|
||||
1.6 Adding a bionic
|
||||
1) Edit data/raw/bionics.json and add your bionic near similar types.
|
||||
|
||||
2) Add the required attributes
|
||||
|
||||
id : "bio_rocketlauncher" // Text string used as identifier in the code.
|
||||
name : "CBM: Rocket Launcher" // The bionic's name, as showed to the player.
|
||||
cost : 10 // How many PUs it costs to use the bionic.
|
||||
time : 0 // How long, when activated, between drawing cost. If 0, it draws power once.
|
||||
description : "It's a rocket launcher, inside your arm!!" // A brief description of the bionic, as showed to the player.
|
||||
|
||||
3) Add any otional attributes
|
||||
|
||||
flags : ["ACTIVE"] // Used to flag the bionic as a specific type.
|
||||
|
||||
Supported flags:
|
||||
|
||||
"ACTIVE" : The bionic can be manually activated and deactivated.
|
||||
"POWER" : The bionic provides a source of power.
|
||||
"FAULTY" : The bionic is an unwanted one, will typically have negative effects.
|
||||
|
||||
Flags can be combined like so: ["ACTIVE","POWER","FAULTY"] (Don't add all these at once)
|
||||
|
||||
4) If you want the bionic to be available in the gameworld as an item, add it to itypedef.cpp
|
||||
|
||||
BIO_SINGLE(id, rarity, price, color, difficulty)
|
||||
|
||||
See 1.1 for more information about adding items.
|
||||
|
||||
|
||||
FAQ
|
||||
Q: What the heck is up with the map objects?
|
||||
@@ -84,4 +160,4 @@ An overmap encapsulates the large-scale structure of a map
|
||||
|
||||
FAQ
|
||||
Q: what is the relation of NPCS/Monsters vs maps. How are they stored, where are they stored? Are they stored?
|
||||
A: All npcs are now stored in the overmap. Active npcs only contain the currently active npcs. There is a difference between npc active npc coordinates, and overmap coordinates. So these will need to be changed when saving the npcs. Or else the npcs will be saved at the wrong location. And yes they are stored.
|
||||
A: All npcs are now stored in the overmap. Active npcs only contain the currently active npcs. There is a difference between npc active npc coordinates, and overmap coordinates. So these will need to be changed when saving the npcs. Or else the npcs will be saved at the wrong location. And yes they are stored.
|
||||
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
MODDING
|
||||
|
||||
Certain features of the game can be modified without rebuilding the game from
|
||||
source code; you should be able to just modify the pertinent files and run the
|
||||
game to see your changes. This attempts to document these features.
|
||||
|
||||
1.1 Adding a profession.
|
||||
|
||||
The data on professions is contained in data/raw/professions.json
|
||||
The format of the file follows:
|
||||
[
|
||||
{
|
||||
"ident" : "example", <-- This is a unique string that identifies the
|
||||
profession; it is used internally by the game as
|
||||
opposed to in the user interface.
|
||||
"name": "Example Profession", <-- This is the name that will be displayed
|
||||
on the user interface; this is
|
||||
what you actually "see" in-game.
|
||||
"description": "An example profession.", <-- This field contains the
|
||||
description of the profession
|
||||
that will be displayed in the
|
||||
character creation screen.
|
||||
|
||||
"points" : 0, <-- This value describes the point cost of the profession;
|
||||
note that negative numbers are accecptable. A positive
|
||||
value will deduct points from the players total whereas
|
||||
a negative one will give the player creation points.
|
||||
"items": ["jeans", "tshirt", "sneakers"], <-- This list contains the items
|
||||
a character will start with
|
||||
if they choose this
|
||||
profession.
|
||||
"addictions" : [ <-- This is the OPTIONAL list of starting addictions.
|
||||
{
|
||||
"type": "nicotine", <-- The identifier of the addiction.
|
||||
"intensity" : 10, <-- The intensity of the addiction.
|
||||
}
|
||||
],
|
||||
"skills" : [ <-- This list is also OPTIONAL; it contains the starting
|
||||
skills and their modified levels.
|
||||
{
|
||||
"name": "melee", <-- The identifier of the skill that will be modified.
|
||||
"level" : 1 <-- The value that the skill will be modified; note that
|
||||
this is NOT the starting level of the skill. It is
|
||||
the value that the player's starting level will be
|
||||
modified by. In other words, if the player puts 1
|
||||
point into melee to give themselves level 2 melee,
|
||||
taking this profession would add one additional level
|
||||
resulting in level 3.
|
||||
},
|
||||
{
|
||||
"name" : "dodge",
|
||||
"level" : 1
|
||||
}, <-- It is possible to list multiple skills for a single profession;
|
||||
it's an unused feature in the current game.
|
||||
|
||||
]
|
||||
|
||||
},
|
||||
]
|
||||
1.2 Example of adding a profession.
|
||||
|
||||
Let's say we want to add a survivalist profession; this profession represents a
|
||||
character who was already living off the land before the disaster struck. We'll
|
||||
say this profession starts with archery, survival, traps, beef jerky
|
||||
and a few survival items. We'll set the starting cost at 3 points since
|
||||
it modifies skills and items. We could do that with the
|
||||
following entries:
|
||||
{
|
||||
"ident" : "survivalist"
|
||||
"name": "Wilderness Survivalist",
|
||||
"description": "You live off the wild and wander the world; you've never
|
||||
had\na place to live or items other than what you can
|
||||
scavenge off the land. People called you crazy; now,
|
||||
after the disaster, you're the sane one."
|
||||
|
||||
"points" : 3,
|
||||
"items": ["pants_cargo", "boots", "beltrig", "selfbow", "jerky", "arrow_field_point"],
|
||||
|
||||
"skills" : [
|
||||
{
|
||||
"name": "archery",
|
||||
"level" : 1
|
||||
},
|
||||
{
|
||||
"name" : "survival",
|
||||
"level" : 1
|
||||
},
|
||||
{
|
||||
"name" : "traps",
|
||||
"level" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
After adding this to the professions.json file, we should see the new profession
|
||||
show up in the character creation screen.
|
||||
|
||||
1.3 IMPORTANT NOTE on JSON FILES:
|
||||
The following characters: [ { , } ] : "
|
||||
are *very* important when adding or modifying the JSON files for technical
|
||||
reasons. This means a single missing , or [ or } can be the difference between
|
||||
a working file and a hanging game at startup. Many editors have features
|
||||
that let you track { [ and ] } to see if they're balanced (ie, have a matching
|
||||
opposite); Notepad++ is a popular, free editor on Windows that contains
|
||||
this feature. On Linux, there are a plethora of options, and you probably
|
||||
already have a preferred one :-).
|
||||
@@ -20,6 +20,8 @@
|
||||
# Default
|
||||
# Release (turn on optimizations)
|
||||
# make RELEASE=1
|
||||
# Tiles (uses SDL rather than ncurses)
|
||||
# make TILES=1
|
||||
|
||||
|
||||
# comment these to toggle them as one sees fit.
|
||||
@@ -49,16 +51,22 @@ DEBUG = -g
|
||||
#DEFINES += -DDEBUG_ENABLE_MAP_GEN
|
||||
#DEFINES += -DDEBUG_ENABLE_GAME
|
||||
|
||||
|
||||
VERSION = 0.5
|
||||
VERSION = 0.7
|
||||
|
||||
|
||||
TARGET = cataclysm
|
||||
TILESTARGET = cataclysm-tiles
|
||||
W32TILESTARGET = cataclysm-tiles.exe
|
||||
W32TARGET = cataclysm.exe
|
||||
BINDIST_DIR = bindist
|
||||
BUILD_DIR = $(CURDIR)
|
||||
|
||||
# tiles object directories are because gcc gets confused
|
||||
# when preprocessor defines change, but the source doesn't
|
||||
ODIR = obj
|
||||
ODIRTILES = obj/tiles
|
||||
W32ODIR = objwin
|
||||
W32ODIRTILES = objwin/tiles
|
||||
DDIR = .deps
|
||||
|
||||
OS = $(shell uname -o)
|
||||
@@ -73,11 +81,11 @@ endif
|
||||
|
||||
CXXFLAGS += $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS) -MMD
|
||||
|
||||
BINDIST_EXTRAS = README data cataclysm-launcher
|
||||
BINDIST_EXTRAS = README data
|
||||
BINDIST = cataclysmdda-$(VERSION).tar.gz
|
||||
W32BINDIST = cataclysmdda-$(VERSION).zip
|
||||
BINDIST_CMD = tar -czvf $(BINDIST) $(BINDIST_DIR)
|
||||
W32BINDIST_CMD = zip -r $(W32BINDIST) $(BINDIST_DIR)
|
||||
BINDIST_CMD = tar --transform=s@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@ -czvf $(BINDIST) $(BINDIST_DIR)
|
||||
W32BINDIST_CMD = cd $(BINDIST_DIR) && zip -r ../$(W32BINDIST) * && cd $(BUILD_DIR)
|
||||
|
||||
# is this section even being used anymore?
|
||||
# SOMEBODY PLEASE CHECK
|
||||
@@ -97,19 +105,27 @@ endif
|
||||
# Linux 64-bit
|
||||
ifeq ($(NATIVE), linux64)
|
||||
CXXFLAGS += -m64
|
||||
LDFLAGS += -m64
|
||||
TARGETSYSTEM=LINUX
|
||||
else
|
||||
# Linux 32-bit
|
||||
ifeq ($(NATIVE), linux32)
|
||||
CXXFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
TARGETSYSTEM=LINUX
|
||||
endif
|
||||
endif
|
||||
|
||||
# OSX
|
||||
ifeq ($(NATIVE), osx)
|
||||
CXXFLAGS += -mmacosx-version-min=10.6
|
||||
OSX_MIN = 10.5
|
||||
DEFINES += -DMACOSX
|
||||
CXXFLAGS += -mmacosx-version-min=$(OSX_MIN)
|
||||
LDFLAGS += -lintl
|
||||
TARGETSYSTEM=LINUX
|
||||
ifneq ($(OS), GNU/Linux)
|
||||
BINDIST_CMD = tar -s"@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@" -czvf $(BINDIST) $(BINDIST_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Win32 (mingw32?)
|
||||
@@ -119,29 +135,77 @@ endif
|
||||
|
||||
# MXE cross-compile to win32
|
||||
ifneq (,$(findstring mingw32,$(CROSS)))
|
||||
DEFINES += -DCROSS_LINUX
|
||||
TARGETSYSTEM=WINDOWS
|
||||
endif
|
||||
|
||||
# Global settings for Linux targets
|
||||
ifeq ($(TARGETSYSTEM),LINUX)
|
||||
LDFLAGS += -lncurses
|
||||
endif
|
||||
|
||||
# Global settings for Windows targets
|
||||
ifeq ($(TARGETSYSTEM),WINDOWS)
|
||||
TARGET = $(W32TARGET)
|
||||
BINDIST = $(W32BINDIST)
|
||||
BINDIST_CMD = $(W32BINDIST_CMD)
|
||||
ODIR = $(W32ODIR)
|
||||
LDFLAGS += -static -lgdi32
|
||||
LDFLAGS += -static -lgdi32 -lintl -liconv
|
||||
W32FLAGS += -Wl,-stack,12000000,-subsystem,windows
|
||||
endif
|
||||
|
||||
ifdef TILES
|
||||
ifeq ($(NATIVE),osx)
|
||||
ifdef FRAMEWORK
|
||||
DEFINES += -DOSX_SDL_FW
|
||||
OSX_INC = -F/Library/Frameworks \
|
||||
-F$(HOME)/Library/Frameworks \
|
||||
-I/Library/Frameworks/SDL.framework/Headers \
|
||||
-I$(HOME)/Library/Frameworks/SDL.framework/Headers \
|
||||
-I/Library/Frameworks/SDL_ttf.framework/Headers \
|
||||
-I$(HOME)/Library/Frameworks/SDL_ttf.framework/Headers
|
||||
LDFLAGS += -F/Library/Frameworks \
|
||||
-F$(HOME)/Library/Frameworks \
|
||||
-framework SDL -framework SDL_ttf -framework Cocoa
|
||||
CXXFLAGS += $(OSX_INC)
|
||||
else
|
||||
DEFINES += -DOSX_SDL_LIBS
|
||||
CXXFLAGS += $(shell sdl-config --cflags)
|
||||
LDFLAGS += $(shell sdl-config --libs) -lSDL_ttf
|
||||
endif
|
||||
else
|
||||
LDFLAGS += -lSDL -lSDL_ttf -lfreetype -lz
|
||||
endif
|
||||
DEFINES += -DTILES
|
||||
ifeq ($(TARGETSYSTEM),WINDOWS)
|
||||
LDFLAGS += -lgdi32 -ldxguid -lwinmm
|
||||
TARGET = $(W32TILESTARGET)
|
||||
ODIR = $(W32ODIRTILES)
|
||||
else
|
||||
TARGET = $(TILESTARGET)
|
||||
ODIR = $(ODIRTILES)
|
||||
endif
|
||||
else
|
||||
# Link to ncurses if we're using a non-tiles, Linux build
|
||||
ifeq ($(TARGETSYSTEM),LINUX)
|
||||
LDFLAGS += -lncursesw
|
||||
# Work around Cygwin not including gettext support in glibc
|
||||
ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Cygwin)
|
||||
LDFLAGS += -lintl -liconv
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETSYSTEM),LINUX)
|
||||
BINDIST_EXTRAS += cataclysm-launcher
|
||||
endif
|
||||
|
||||
SOURCES = $(wildcard *.cpp)
|
||||
HEADERS = $(wildcard *.h)
|
||||
_OBJS = $(SOURCES:.cpp=.o)
|
||||
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
|
||||
|
||||
ifdef TILES
|
||||
ifeq ($(NATIVE),osx)
|
||||
OBJS += $(ODIR)/SDLMain.o
|
||||
endif
|
||||
endif
|
||||
|
||||
all: version $(TARGET)
|
||||
@
|
||||
|
||||
@@ -152,13 +216,13 @@ $(TARGET): $(ODIR) $(DDIR) $(OBJS)
|
||||
.PHONY: version
|
||||
version:
|
||||
@( VERSION_STRING=$(VERSION) ; \
|
||||
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty ) && VERSION_STRING=$$GITVERSION ; \
|
||||
[ -e ".git" ] && GITVERSION=$$( git describe --tags --always --dirty --match "[0-9]*.[0-9]*" ) && VERSION_STRING=$$GITVERSION ; \
|
||||
[ -e "version.h" ] && OLDVERSION=$$(grep VERSION version.h|cut -d '"' -f2) ; \
|
||||
if [ "x$$VERSION_STRING" != "x$$OLDVERSION" ]; then echo "#define VERSION \"$$VERSION_STRING\"" | tee version.h ; fi \
|
||||
)
|
||||
|
||||
$(ODIR):
|
||||
mkdir $(ODIR)
|
||||
mkdir -p $(ODIR)
|
||||
|
||||
$(DDIR):
|
||||
@mkdir $(DDIR)
|
||||
@@ -166,12 +230,15 @@ $(DDIR):
|
||||
$(ODIR)/%.o: %.cpp
|
||||
$(CXX) $(DEFINES) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(ODIR)/SDLMain.o: SDLMain.m
|
||||
$(CC) -c $(OSX_INC) $< -o $@
|
||||
|
||||
version.cpp: version
|
||||
|
||||
clean: clean-tests
|
||||
rm -f $(TARGET) $(W32TARGET) $(ODIR)/*.o $(ODIR)/*.d $(W32ODIR)/*.o $(W32BINDIST) \
|
||||
$(BINDIST)
|
||||
rm -rf $(BINDIST_DIR)
|
||||
rm -rf $(TARGET) $(TILESTARGET) $(W32TILESTARGET) $(W32TARGET)
|
||||
rm -rf $(ODIR) $(W32ODIR) $(W32ODIRTILES)
|
||||
rm -rf $(BINDIST) $(W32BINDIST) $(BINDIST_DIR)
|
||||
rm -f version.h
|
||||
|
||||
bindist: $(BINDIST)
|
||||
|
||||
@@ -13,6 +13,7 @@ DDIR = .deps
|
||||
TARGET = cataclysm.exe
|
||||
|
||||
CXX = g++
|
||||
WNDRES = windres
|
||||
|
||||
LINKER = i486-mingw32-ld
|
||||
LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
|
||||
@@ -20,6 +21,7 @@ LINKERFLAGS = -Wl,-stack,12000000,-subsystem,windows
|
||||
CFLAGS = $(WARNINGS) $(DEBUG) $(PROFILE) $(OTHERS)
|
||||
|
||||
LDFLAGS = -static -lgdi32
|
||||
RFLAGS = -J rc -O coff
|
||||
|
||||
#ifeq ($(OS), Msys)
|
||||
#LDFLAGS = -static -lpdcurses
|
||||
@@ -29,6 +31,8 @@ LDFLAGS = -static -lgdi32
|
||||
|
||||
SOURCES = $(wildcard *.cpp)
|
||||
_OBJS = $(SOURCES:.cpp=.o)
|
||||
RSRC = $(wildcard *.rc)
|
||||
_OBJS += $(RSRC:.rc=.res)
|
||||
OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS))
|
||||
|
||||
all: $(TARGET)
|
||||
@@ -46,7 +50,11 @@ $(DDIR):
|
||||
$(ODIR)/%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(ODIR)/%.res: %.rc
|
||||
$(WNDRES) $(RFLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(ODIR)/*.o
|
||||
|
||||
-include $(SOURCES:%.cpp=$(DEPDIR)/%.P)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ The latest instructions on how to compile can be found on [our wiki](http://www.
|
||||
|
||||
## Contribute
|
||||
|
||||
Please see [CONTRIBUTING.md](https://github.com/TheDarklingWolf/Cataclysm-DDA/blob/master/CONTRIBUTING.md) for details.
|
||||
Please see [CONTRIBUTING.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/CONTRIBUTING.md) for details.
|
||||
|
||||
|
||||
## Frequently Asked Questions
|
||||
@@ -35,8 +35,8 @@ Press the `?` key, followed by the `1` key to see the full list of key commands.
|
||||
|
||||
#### How can I start a new world?
|
||||
|
||||
Simply delete the **save** folder, which can be found in the same directory as the executable.
|
||||
**Reset** on the main menu will generate a fresh world for you.
|
||||
|
||||
#### I've found a bug / I would like to make a suggestion. What should I do?
|
||||
|
||||
Please submit an issue on [our GitHub page](https://github.com/TheDarklingWolf/Cataclysm-DDA/issues/). If you're not able to, send an email to `TheDarklingWolf@gmail.com`.
|
||||
Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/). If you're not able to, send an email to `TheDarklingWolf@gmail.com`.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#ifndef _SDLMain_h_
|
||||
#define _SDLMain_h_
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SDLMain : NSObject
|
||||
@end
|
||||
|
||||
#endif /* _SDLMain_h_ */
|
||||
@@ -0,0 +1,385 @@
|
||||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#if (defined OSX_SDL_FW)
|
||||
#include "SDL.h"
|
||||
#else
|
||||
#include "SDL/SDL.h"
|
||||
#endif
|
||||
#include "SDLMain.h"
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <unistd.h>
|
||||
|
||||
/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
|
||||
but the method still is there and works. To avoid warnings, we declare
|
||||
it ourselves here. */
|
||||
@interface NSApplication(SDL_Missing_Methods)
|
||||
- (void)setAppleMenu:(NSMenu *)menu;
|
||||
@end
|
||||
|
||||
/* Use this flag to determine whether we use SDLMain.nib or not */
|
||||
#define SDL_USE_NIB_FILE 0
|
||||
|
||||
/* Use this flag to determine whether we use CPS (docking) or not */
|
||||
#define SDL_USE_CPS 1
|
||||
#ifdef SDL_USE_CPS
|
||||
/* Portions of CPS.h */
|
||||
typedef struct CPSProcessSerNum
|
||||
{
|
||||
UInt32 lo;
|
||||
UInt32 hi;
|
||||
} CPSProcessSerNum;
|
||||
|
||||
extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
static int gArgc;
|
||||
static char **gArgv;
|
||||
static BOOL gFinderLaunch;
|
||||
static BOOL gCalledAppMainline = FALSE;
|
||||
|
||||
static NSString *getApplicationName(void)
|
||||
{
|
||||
const NSDictionary *dict;
|
||||
NSString *appName = 0;
|
||||
|
||||
/* Determine the application name */
|
||||
dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
|
||||
if (dict)
|
||||
appName = [dict objectForKey: @"CFBundleName"];
|
||||
|
||||
if (![appName length])
|
||||
appName = [[NSProcessInfo processInfo] processName];
|
||||
|
||||
return appName;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* A helper category for NSString */
|
||||
@interface NSString (ReplaceSubString)
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface NSApplication (SDLApplication)
|
||||
@end
|
||||
|
||||
@implementation NSApplication (SDLApplication)
|
||||
/* Invoked from the Quit menu item */
|
||||
- (void)terminate:(id)sender
|
||||
{
|
||||
/* Post a SDL_QUIT event */
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
@end
|
||||
|
||||
/* The main class of the application, the application's delegate */
|
||||
@implementation SDLMain
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
- (void) setupWorkingDirectory:(BOOL)shouldChdir
|
||||
{
|
||||
if (shouldChdir)
|
||||
{
|
||||
char parentdir[MAXPATHLEN];
|
||||
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
|
||||
if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) {
|
||||
chdir(parentdir); /* chdir to the binary app's parent */
|
||||
}
|
||||
CFRelease(url);
|
||||
CFRelease(url2);
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
|
||||
/* Fix menu to contain the real app name instead of "SDL App" */
|
||||
- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
|
||||
{
|
||||
NSRange aRange;
|
||||
NSEnumerator *enumerator;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
aRange = [[aMenu title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
|
||||
|
||||
enumerator = [[aMenu itemArray] objectEnumerator];
|
||||
while ((menuItem = [enumerator nextObject]))
|
||||
{
|
||||
aRange = [[menuItem title] rangeOfString:@"SDL App"];
|
||||
if (aRange.length != 0)
|
||||
[menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
|
||||
if ([menuItem hasSubmenu])
|
||||
[self fixMenu:[menuItem submenu] withAppName:appName];
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void setApplicationMenu(void)
|
||||
{
|
||||
/* warning: this code is very odd */
|
||||
NSMenu *appleMenu;
|
||||
NSMenuItem *menuItem;
|
||||
NSString *title;
|
||||
NSString *appName;
|
||||
|
||||
appName = getApplicationName();
|
||||
appleMenu = [[NSMenu alloc] initWithTitle:@""];
|
||||
|
||||
/* Add menu items */
|
||||
title = [@"About " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Hide " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
|
||||
|
||||
menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
|
||||
[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
|
||||
|
||||
[appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
|
||||
|
||||
[appleMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
title = [@"Quit " stringByAppendingString:appName];
|
||||
[appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
|
||||
|
||||
|
||||
/* Put menu into the menubar */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
[menuItem setSubmenu:appleMenu];
|
||||
[[NSApp mainMenu] addItem:menuItem];
|
||||
|
||||
/* Tell the application object that this is now the application menu */
|
||||
[NSApp setAppleMenu:appleMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[appleMenu release];
|
||||
[menuItem release];
|
||||
}
|
||||
|
||||
/* Create a window menu */
|
||||
static void setupWindowMenu(void)
|
||||
{
|
||||
NSMenu *windowMenu;
|
||||
NSMenuItem *windowMenuItem;
|
||||
NSMenuItem *menuItem;
|
||||
|
||||
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
|
||||
|
||||
/* "Minimize" item */
|
||||
menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
|
||||
[windowMenu addItem:menuItem];
|
||||
[menuItem release];
|
||||
|
||||
/* Put menu into the menubar */
|
||||
windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
|
||||
[windowMenuItem setSubmenu:windowMenu];
|
||||
[[NSApp mainMenu] addItem:windowMenuItem];
|
||||
|
||||
/* Tell the application object that this is now the window menu */
|
||||
[NSApp setWindowsMenu:windowMenu];
|
||||
|
||||
/* Finally give up our references to the objects */
|
||||
[windowMenu release];
|
||||
[windowMenuItem release];
|
||||
}
|
||||
|
||||
/* Replacement for NSApplicationMain */
|
||||
static void CustomApplicationMain (int argc, char **argv)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
SDLMain *sdlMain;
|
||||
|
||||
/* Ensure the application object is initialised */
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
#ifdef SDL_USE_CPS
|
||||
{
|
||||
CPSProcessSerNum PSN;
|
||||
/* Tell the dock about us */
|
||||
if (!CPSGetCurrentProcess(&PSN))
|
||||
if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
|
||||
if (!CPSSetFrontProcess(&PSN))
|
||||
[NSApplication sharedApplication];
|
||||
}
|
||||
#endif /* SDL_USE_CPS */
|
||||
|
||||
/* Set up the menubar */
|
||||
[NSApp setMainMenu:[[NSMenu alloc] init]];
|
||||
setApplicationMenu();
|
||||
setupWindowMenu();
|
||||
|
||||
/* Create SDLMain and make it the app delegate */
|
||||
sdlMain = [[SDLMain alloc] init];
|
||||
[NSApp setDelegate:sdlMain];
|
||||
|
||||
/* Start the main event loop */
|
||||
[NSApp run];
|
||||
|
||||
[sdlMain release];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Catch document open requests...this lets us notice files when the app
|
||||
* was launched by double-clicking a document, or when a document was
|
||||
* dragged/dropped on the app's icon. You need to have a
|
||||
* CFBundleDocumentsType section in your Info.plist to get this message,
|
||||
* apparently.
|
||||
*
|
||||
* Files are added to gArgv, so to the app, they'll look like command line
|
||||
* arguments. Previously, apps launched from the finder had nothing but
|
||||
* an argv[0].
|
||||
*
|
||||
* This message may be received multiple times to open several docs on launch.
|
||||
*
|
||||
* This message is ignored once the app's mainline has been called.
|
||||
*/
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
{
|
||||
const char *temparg;
|
||||
size_t arglen;
|
||||
char *arg;
|
||||
char **newargv;
|
||||
|
||||
if (!gFinderLaunch) /* MacOS is passing command line args. */
|
||||
return FALSE;
|
||||
|
||||
if (gCalledAppMainline) /* app has started, ignore this document. */
|
||||
return FALSE;
|
||||
|
||||
temparg = [filename UTF8String];
|
||||
arglen = SDL_strlen(temparg) + 1;
|
||||
arg = (char *) SDL_malloc(arglen);
|
||||
if (arg == NULL)
|
||||
return FALSE;
|
||||
|
||||
newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
|
||||
if (newargv == NULL)
|
||||
{
|
||||
SDL_free(arg);
|
||||
return FALSE;
|
||||
}
|
||||
gArgv = newargv;
|
||||
|
||||
SDL_strlcpy(arg, temparg, arglen);
|
||||
gArgv[gArgc++] = arg;
|
||||
gArgv[gArgc] = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* Called when the internal event loop has just started running */
|
||||
- (void) applicationDidFinishLaunching: (NSNotification *) note
|
||||
{
|
||||
int status;
|
||||
|
||||
/* Set the working directory to the .app's parent directory */
|
||||
[self setupWorkingDirectory:gFinderLaunch];
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
/* Set the main menu to contain the real app name instead of "SDL App" */
|
||||
[self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
|
||||
#endif
|
||||
|
||||
/* Hand off to main application code */
|
||||
gCalledAppMainline = TRUE;
|
||||
status = SDL_main (gArgc, gArgv);
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
exit(status);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSString (ReplaceSubString)
|
||||
|
||||
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
|
||||
{
|
||||
unsigned int bufferSize;
|
||||
unsigned int selfLen = [self length];
|
||||
unsigned int aStringLen = [aString length];
|
||||
unichar *buffer;
|
||||
NSRange localRange;
|
||||
NSString *result;
|
||||
|
||||
bufferSize = selfLen + aStringLen - aRange.length;
|
||||
buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
|
||||
|
||||
/* Get first part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aRange.location;
|
||||
[self getCharacters:buffer range:localRange];
|
||||
|
||||
/* Get middle part into buffer */
|
||||
localRange.location = 0;
|
||||
localRange.length = aStringLen;
|
||||
[aString getCharacters:(buffer+aRange.location) range:localRange];
|
||||
|
||||
/* Get last part into buffer */
|
||||
localRange.location = aRange.location + aRange.length;
|
||||
localRange.length = selfLen - localRange.location;
|
||||
[self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
|
||||
|
||||
/* Build output string */
|
||||
result = [NSString stringWithCharacters:buffer length:bufferSize];
|
||||
|
||||
NSDeallocateMemoryPages(buffer, bufferSize);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
|
||||
/* Main entry point to executable - should *not* be SDL_main! */
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
/* Copy the arguments into a global variable */
|
||||
/* This is passed if we are launched by double-clicking */
|
||||
if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
|
||||
gArgv[0] = argv[0];
|
||||
gArgv[1] = NULL;
|
||||
gArgc = 1;
|
||||
gFinderLaunch = YES;
|
||||
} else {
|
||||
int i;
|
||||
gArgc = argc;
|
||||
gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
|
||||
for (i = 0; i <= argc; i++)
|
||||
gArgv[i] = argv[i];
|
||||
gFinderLaunch = NO;
|
||||
}
|
||||
|
||||
#if SDL_USE_NIB_FILE
|
||||
NSApplicationMain (argc, argv);
|
||||
#else
|
||||
CustomApplicationMain (argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,16 @@ Jason Gilbert <0jason.gilbert@gmail.com>
|
||||
Charlie Nolan (FunnyMan3595) <funnyman3595@gmail.com>
|
||||
uzername (some_name) <ivanpost777@gmail.com>
|
||||
Christian Buskirk (i2amroy) <i2amroy@gmail.com>
|
||||
Kevin McKayven (GlyphGryph) <glyphgryph@gmail.com>
|
||||
Ozone <satori.jj@gmail.com>
|
||||
Herbert Jones <jones.herbert@gmail.com>
|
||||
Justin "MacrosBlackD" Drury <macrosblackd@gmail.com>
|
||||
AtomicDryad <fnord@fnord> / <atomicdryad@gmail.com>
|
||||
Izicata
|
||||
Voker57 <voker57@gmail.com>
|
||||
Tommy <yobbobanana@gmx.com>
|
||||
teh-sam
|
||||
Alex Casey (Tamunshin) <tamunshin@hotmail.com>
|
||||
Stevensonz <money3030@yahoo.com.>
|
||||
David Holmes <dholmes@dholmes.us>
|
||||
Sean McLaughlin <galenevil@hotmail.com> / <galenevil.eve@gmail.com>
|
||||
@@ -0,0 +1,92 @@
|
||||
Info on translating Cataclysm-DDA into another language.
|
||||
|
||||
|
||||
TRANSLATORS
|
||||
===========
|
||||
|
||||
If there is already a translation available for your language,
|
||||
and you just want to update or improve it,
|
||||
you can edit the .po file for your language,
|
||||
found inside the "lang/po" subdirectory.
|
||||
|
||||
After editing this file,
|
||||
if you are running the dev version and want to test your changes,
|
||||
perform step 4 from the maintainers section below.
|
||||
|
||||
|
||||
If there is no translation yet,
|
||||
the .po file will need to be generated.
|
||||
You can do this yourself by following the instructions below,
|
||||
or ask one of the CleverRaven devs to do it for you.
|
||||
|
||||
When you are done translating,
|
||||
submit the changes back to CleverRaven for inclusion in Cataclysm-DDA.
|
||||
|
||||
|
||||
MAINTAINERS
|
||||
===========
|
||||
|
||||
|
||||
Step 1: Extract the translatable strings
|
||||
----------------------------------------
|
||||
|
||||
First we have to extract the translatable strings from the .json files.
|
||||
The python script lang/extract_json_strings.py will do this for us,
|
||||
storing them in an intermediate form in lang/json for "xgettext" to read.
|
||||
|
||||
python lang/extract_json_strings.py
|
||||
|
||||
Now we can use xgettext to collate all the translatable strings,
|
||||
and store them in the file lang/po/cataclysm-dda.pot.
|
||||
|
||||
This needs to be done every time translatable strings are added or modified.
|
||||
All of the translations depend on this file.
|
||||
|
||||
xgettext -d cataclysm-dda -s -o lang/po/cataclysm-dda.pot --keyword=_ *.cpp *.h lang/json/*.py
|
||||
|
||||
|
||||
Step 2(a): Initialize each language file
|
||||
----------------------------------------
|
||||
|
||||
If we're starting a new translation from scratch,
|
||||
we have to initialize the translation file.
|
||||
In this example the translation is into New Zealand English (en_NZ).
|
||||
For other languages change "en_NZ" to the relevant language identifier.
|
||||
|
||||
msginit -l en_NZ.utf8 -o lang/po/en_NZ.po -i lang/po/cataclysm-dda.pot
|
||||
|
||||
|
||||
Step 2(b): Update an already existing language file
|
||||
---------------------------------------------------
|
||||
|
||||
If we just want to update a translation,
|
||||
we'll want to keep all the messages that have already been translated.
|
||||
In this case we use "msgmerge" in stead of "msginit".
|
||||
|
||||
msgmerge -s -U lang/po/en_NZ.po lang/po/cataclysm-dda.pot
|
||||
|
||||
|
||||
Step 3: Translate
|
||||
-----------------
|
||||
|
||||
Now open the .po file in your favorite editor and translate!
|
||||
The lines beginning with "msgid" must be left in the english form,
|
||||
only the lines beginning with "msgstr" should be translated.
|
||||
|
||||
|
||||
Step 4: Compile the .po file
|
||||
----------------------------
|
||||
|
||||
If it is a new translation,
|
||||
you will need to create a subdirectory in lang/mo for it,
|
||||
and then a subdirectory called "LC_MESSAGES" inside that.
|
||||
For example:
|
||||
|
||||
mkdir -p lang/mo/en_NZ/LC_MESSAGES
|
||||
|
||||
Now run the "msgfmt" program to compile the translations for use in game.
|
||||
|
||||
msgfmt -c -o lang/mo/en_NZ/LC_MESSAGES/cataclysm-dda.mo lang/po/en_NZ.po
|
||||
|
||||
Hooray, that's it :).
|
||||
|
||||
+57
-9
@@ -1,9 +1,20 @@
|
||||
#include "game.h"
|
||||
#include "keypress.h"
|
||||
#include "output.h"
|
||||
#include <istream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap);
|
||||
|
||||
void game::load_keyboard_settings()
|
||||
{
|
||||
// Load the default keymap
|
||||
std::istringstream sin;
|
||||
sin.str(default_keymap_txt());
|
||||
parse_keymap(sin, default_keymap);
|
||||
|
||||
// Load the player's actual keymap
|
||||
std::ifstream fin;
|
||||
fin.open("data/keymap.txt");
|
||||
if (!fin) { // It doesn't exist
|
||||
@@ -15,13 +26,37 @@ void game::load_keyboard_settings()
|
||||
}
|
||||
if (!fin) { // Still can't open it--probably bad permissions
|
||||
debugmsg("Can't open data/keymap.txt. This may be a permissions issue.");
|
||||
keymap = default_keymap;
|
||||
return;
|
||||
} else {
|
||||
parse_keymap(fin, keymap);
|
||||
}
|
||||
while (!fin.eof()) {
|
||||
|
||||
// Check for new defaults, and automatically bind them if possible
|
||||
std::map<char, action_id>::iterator d_it;
|
||||
bool found;
|
||||
for (d_it = default_keymap.begin(); d_it != default_keymap.end(); d_it++) {
|
||||
found = false;
|
||||
std::map<char, action_id>::iterator k_it;
|
||||
for (k_it = keymap.begin(); k_it != keymap.end(); k_it++) {
|
||||
if (d_it->second == k_it->second) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found && !keymap.count(d_it->first)) {
|
||||
keymap[d_it->first] = d_it->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void parse_keymap(std::istream &keymap_txt, std::map<char, action_id> &kmap)
|
||||
{
|
||||
while (!keymap_txt.eof()) {
|
||||
std::string id;
|
||||
fin >> id;
|
||||
keymap_txt >> id;
|
||||
if (id == "")
|
||||
getline(fin, id); // Empty line, chomp it
|
||||
getline(keymap_txt, id); // Empty line, chomp it
|
||||
else if (id[0] != '#') {
|
||||
action_id act = look_up_action(id);
|
||||
if (act == ACTION_NULL)
|
||||
@@ -29,25 +64,25 @@ void game::load_keyboard_settings()
|
||||
Warning! data/keymap.txt contains an unknown action, \"%s\"\n\
|
||||
Fix data/keymap.txt at your next chance!", id.c_str());
|
||||
else {
|
||||
while (!fin.eof()) {
|
||||
while (!keymap_txt.eof()) {
|
||||
char ch;
|
||||
fin >> std::noskipws >> ch >> std::skipws;
|
||||
keymap_txt >> std::noskipws >> ch >> std::skipws;
|
||||
if (ch == '\n') {
|
||||
break;
|
||||
} else if (ch != ' ' || fin.peek() == '\n') {
|
||||
if (keymap.find(ch) != keymap.end()) {
|
||||
} else if (ch != ' ' || keymap_txt.peek() == '\n') {
|
||||
if (kmap.find(ch) != kmap.end()) {
|
||||
debugmsg("\
|
||||
Warning! '%c' assigned twice in the keymap!\n\
|
||||
%s is being ignored.\n\
|
||||
Fix data/keymap.txt at your next chance!", ch, id.c_str());
|
||||
} else {
|
||||
keymap[ ch ] = act;
|
||||
kmap[ ch ] = act;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
getline(fin, id); // Clear the whole line
|
||||
getline(keymap_txt, id); // Clear the whole line
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,6 +231,8 @@ std::string action_ident(action_id act)
|
||||
return "drop_adj";
|
||||
case ACTION_BIONICS:
|
||||
return "bionics";
|
||||
case ACTION_SORT_ARMOR:
|
||||
return "sort_armor";
|
||||
case ACTION_WAIT:
|
||||
return "wait";
|
||||
case ACTION_CRAFT:
|
||||
@@ -210,6 +247,8 @@ std::string action_ident(action_id act)
|
||||
return "disassemble";
|
||||
case ACTION_SLEEP:
|
||||
return "sleep";
|
||||
case ACTION_CONTROL_VEHICLE:
|
||||
return "control_vehicle";
|
||||
case ACTION_TOGGLE_SAFEMODE:
|
||||
return "safemode";
|
||||
case ACTION_TOGGLE_AUTOSAFE:
|
||||
@@ -218,6 +257,8 @@ std::string action_ident(action_id act)
|
||||
return "ignore_enemy";
|
||||
case ACTION_SAVE:
|
||||
return "save";
|
||||
case ACTION_QUICKSAVE:
|
||||
return "quicksave";
|
||||
case ACTION_QUIT:
|
||||
return "quit";
|
||||
case ACTION_PL_INFO:
|
||||
@@ -366,6 +407,8 @@ std::string action_name(action_id act)
|
||||
return "Drop Item to Adjacent Tile";
|
||||
case ACTION_BIONICS:
|
||||
return "View/Activate Bionics";
|
||||
case ACTION_SORT_ARMOR:
|
||||
return "Re-layer armour/clothing";
|
||||
case ACTION_WAIT:
|
||||
return "Wait for Several Minutes";
|
||||
case ACTION_CRAFT:
|
||||
@@ -380,6 +423,8 @@ std::string action_name(action_id act)
|
||||
return "Disassemble items";
|
||||
case ACTION_SLEEP:
|
||||
return "Sleep";
|
||||
case ACTION_CONTROL_VEHICLE:
|
||||
return "Control Vehicle";
|
||||
case ACTION_TOGGLE_SAFEMODE:
|
||||
return "Toggle Safemode";
|
||||
case ACTION_TOGGLE_AUTOSAFE:
|
||||
@@ -388,6 +433,8 @@ std::string action_name(action_id act)
|
||||
return "Ignore Nearby Enemy";
|
||||
case ACTION_SAVE:
|
||||
return "Save and Quit";
|
||||
case ACTION_QUICKSAVE:
|
||||
return "Quicksave";
|
||||
case ACTION_QUIT:
|
||||
return "Commit Suicide";
|
||||
case ACTION_PL_INFO:
|
||||
@@ -417,3 +464,4 @@ std::string action_name(action_id act)
|
||||
}
|
||||
return "Someone forgot to name an action.";
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ ACTION_SELECT_FIRE_MODE,
|
||||
ACTION_DROP,
|
||||
ACTION_DIR_DROP,
|
||||
ACTION_BIONICS,
|
||||
ACTION_SORT_ARMOR,
|
||||
// Long-term / special actions
|
||||
ACTION_WAIT,
|
||||
ACTION_CRAFT,
|
||||
@@ -66,10 +67,12 @@ ACTION_LONGCRAFT,
|
||||
ACTION_CONSTRUCT,
|
||||
ACTION_DISASSEMBLE,
|
||||
ACTION_SLEEP,
|
||||
ACTION_CONTROL_VEHICLE,
|
||||
ACTION_TOGGLE_SAFEMODE,
|
||||
ACTION_TOGGLE_AUTOSAFE,
|
||||
ACTION_IGNORE_ENEMY,
|
||||
ACTION_SAVE,
|
||||
ACTION_QUICKSAVE,
|
||||
ACTION_QUIT,
|
||||
// Info Screens
|
||||
ACTION_PL_INFO,
|
||||
|
||||
+22
-8
@@ -28,7 +28,7 @@ void addict_effect(game *g, addiction &add)
|
||||
g->u.stim--;
|
||||
if (rng(8, 400) < in) {
|
||||
g->add_msg("Your hands start shaking... you need it bad!");
|
||||
g->u.add_disease(DI_SHAKES, 20, g);
|
||||
g->u.add_disease("shakes", 20);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -46,9 +46,9 @@ void addict_effect(game *g, addiction &add)
|
||||
g->add_msg("Your hands start shaking... you need a drink bad!");
|
||||
g->cancel_activity_query("You have an alcohol craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_ALCOHOL, -35, -120);
|
||||
g->u.add_disease(DI_SHAKES, 50, g);
|
||||
} else if (!g->u.has_disease(DI_HALLU) && rng(10, 1600) < in)
|
||||
g->u.add_disease(DI_HALLU, 3600, g);
|
||||
g->u.add_disease("shakes", 50);
|
||||
} else if (!g->u.has_disease("hallu") && rng(10, 1600) < in)
|
||||
g->u.add_disease("hallu", 3600);
|
||||
break;
|
||||
|
||||
case ADD_SLEEP:
|
||||
@@ -75,7 +75,7 @@ void addict_effect(game *g, addiction &add)
|
||||
g->add_msg("Your hands start shaking... you need some painkillers.");
|
||||
g->cancel_activity_query("You have an opiate craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_OPIATE, -40, -200);
|
||||
g->u.add_disease(DI_SHAKES, 20 + in * 5, g);
|
||||
g->u.add_disease("shakes", 20 + in * 5);
|
||||
} else if (one_in(20) && dice(2, 30) < in) {
|
||||
g->add_msg("You feel anxious. You need your painkillers!");
|
||||
g->u.add_morale(MORALE_CRAVING_OPIATE, -30, -200);
|
||||
@@ -107,14 +107,14 @@ void addict_effect(game *g, addiction &add)
|
||||
g->add_msg("Your hands start shaking... you need a pick-me-up.");
|
||||
g->cancel_activity_query("You have a speed craving.");
|
||||
g->u.add_morale(MORALE_CRAVING_SPEED, -25, -200);
|
||||
g->u.add_disease(DI_SHAKES, in * 20, g);
|
||||
g->u.add_disease("shakes", in * 20);
|
||||
} else if (one_in(50) && dice(2, 100) < in) {
|
||||
g->add_msg("You stop suddenly, feeling bewildered.");
|
||||
g->cancel_activity();
|
||||
g->u.moves -= 300;
|
||||
} else if (!g->u.has_disease(DI_HALLU) && one_in(20) &&
|
||||
} else if (!g->u.has_disease("hallu") && one_in(20) &&
|
||||
8 + dice(2, 80) < in)
|
||||
g->u.add_disease(DI_HALLU, 3600, g);
|
||||
g->u.add_disease("hallu", 3600);
|
||||
} break;
|
||||
|
||||
case ADD_COKE:
|
||||
@@ -165,6 +165,20 @@ std::string addiction_name(addiction cur)
|
||||
}
|
||||
}
|
||||
|
||||
morale_type addiction_craving(add_type cur)
|
||||
{
|
||||
switch (cur) {
|
||||
case ADD_CIG: return MORALE_CRAVING_NICOTINE;
|
||||
case ADD_CAFFEINE: return MORALE_CRAVING_CAFFEINE;
|
||||
case ADD_ALCOHOL: return MORALE_CRAVING_ALCOHOL;
|
||||
case ADD_PKILLER: return MORALE_CRAVING_OPIATE;
|
||||
case ADD_SPEED: return MORALE_CRAVING_SPEED;
|
||||
case ADD_COKE: return MORALE_CRAVING_COCAINE;
|
||||
case ADD_CRACK: return MORALE_CRAVING_CRACK;
|
||||
default: return MORALE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
add_type addiction_type(std::string name)
|
||||
{
|
||||
if (name == "nicotine")
|
||||
|
||||
@@ -12,6 +12,8 @@ void addict_effect(game *g, addiction &add);
|
||||
|
||||
std::string addiction_name(addiction cur);
|
||||
|
||||
morale_type addiction_craving(add_type cur);
|
||||
|
||||
add_type addiction_type(std::string name);
|
||||
|
||||
std::string addiction_text(addiction cur);
|
||||
|
||||
+63
-57
@@ -225,78 +225,78 @@ artifact_property_datum artifact_property_data[ARTPROP_MAX] = {
|
||||
};
|
||||
|
||||
artifact_tool_form_datum artifact_tool_form_data[NUM_ARTTOOLFORMS] = {
|
||||
{"", '*', c_white, MNULL, MNULL, 0, 0, 0, 0, ARTWEAP_BULK,
|
||||
{"", '*', c_white, "null", "null", 0, 0, 0, 0, ARTWEAP_BULK,
|
||||
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
|
||||
|
||||
{"Harp", ';', c_yellow, WOOD, MNULL, 20, 30, 10, 18, ARTWEAP_BULK,
|
||||
{"Harp", ';', c_yellow, "wood", "null", 20, 30, 10, 18, ARTWEAP_BULK,
|
||||
{ARTWEAP_SPEAR, ARTWEAP_SWORD, ARTWEAP_KNIFE}},
|
||||
|
||||
{"Staff", '/', c_brown, WOOD, MNULL, 6, 12, 4, 10, ARTWEAP_CLUB,
|
||||
{"Staff", '/', c_brown, "wood", "null", 6, 12, 4, 10, ARTWEAP_CLUB,
|
||||
{ARTWEAP_BULK, ARTWEAP_SPEAR, ARTWEAP_KNIFE}},
|
||||
|
||||
{"Sword", '/', c_ltblue, STEEL, MNULL, 8, 14, 8, 28, ARTWEAP_SWORD,
|
||||
{"Sword", '/', c_ltblue, "steel", "null", 8, 14, 8, 28, ARTWEAP_SWORD,
|
||||
{ARTWEAP_BULK, ARTWEAP_NULL, ARTWEAP_NULL}},
|
||||
|
||||
{"Dagger", ';', c_ltblue, STEEL, MNULL, 1, 4, 1, 6, ARTWEAP_KNIFE,
|
||||
{"Dagger", ';', c_ltblue, "steel", "null", 1, 4, 1, 6, ARTWEAP_KNIFE,
|
||||
{ARTWEAP_NULL, ARTWEAP_NULL, ARTWEAP_NULL}},
|
||||
|
||||
{"Cube", '*', c_white, STEEL, MNULL, 1, 3, 1, 20, ARTWEAP_BULK,
|
||||
{"Cube", '*', c_white, "steel", "null", 1, 3, 1, 20, ARTWEAP_BULK,
|
||||
{ARTWEAP_SPEAR, ARTWEAP_NULL, ARTWEAP_NULL}}
|
||||
};
|
||||
|
||||
artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS] = {
|
||||
{"", 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{"", 0, 0, 0, 0, 0, 0, 0, 0, ""},
|
||||
// Adjective Vol,wgt Bash Cut To-Hit
|
||||
{"Heavy", 0, 12, 10, 20, 0, 0, -2, 0,
|
||||
0},
|
||||
""},
|
||||
{"Knobbed", 1, 2, 14, 30, 0, 0, -1, 1,
|
||||
0},
|
||||
""},
|
||||
{"Spiked", 1, 1, 0, 0, 20, 40, -1, 1,
|
||||
mfb(IF_SPEAR)},
|
||||
"SPEAR"},
|
||||
{"Edged", 2, 4, 0, 0, 20, 50, -1, 2,
|
||||
0},
|
||||
""},
|
||||
{"Bladed", 1, 2, 0, 0, 12, 30, -1, 1,
|
||||
mfb(IF_STAB)}
|
||||
"STAB"}
|
||||
};
|
||||
|
||||
artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
|
||||
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
|
||||
{"Robe", c_red, WOOL, MNULL, 6, 6, 1, 3, 1, 0, 2, 0, -8, 0, -3,
|
||||
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
|
||||
{"Robe", c_red, "wool", "null", 6, 6, 1, 3, 3, 0, 2, 0, -8, 0, -3,
|
||||
mfb(bp_torso)|mfb(bp_legs), false,
|
||||
{ARMORMOD_LIGHT, ARMORMOD_BULKY, ARMORMOD_POCKETED, ARMORMOD_FURRED,
|
||||
ARMORMOD_PADDED}},
|
||||
|
||||
{"Coat", c_brown,LEATHER,MNULL, 14, 14, 2, 4, 12, 1, 4, 4, -6, 0, -3,
|
||||
{"Coat", c_brown,"leather","null", 14, 14, 2, 3, 2, 1, 4, 4, -6, 0, -3,
|
||||
mfb(bp_torso), false,
|
||||
{ARMORMOD_LIGHT, ARMORMOD_POCKETED, ARMORMOD_FURRED, ARMORMOD_PADDED,
|
||||
ARMORMOD_PLATED}},
|
||||
|
||||
{"Mask", c_white, WOOD, MNULL, 4, 1, 2, 2, 16, 1, 2, 0, 2, 0, -2,
|
||||
{"Mask", c_white, "wood", "null", 4, 1, 2, 2, 2, 1, 2, 0, 2, 0, -2,
|
||||
mfb(bp_eyes)|mfb(bp_mouth), false,
|
||||
{ARMORMOD_FURRED, ARMORMOD_FURRED, ARMORMOD_NULL, ARMORMOD_NULL,
|
||||
ARMORMOD_NULL}},
|
||||
|
||||
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
|
||||
{"Helm", c_dkgray,SILVER, MNULL, 6, 6, 2, 4, 18, 0, 1, 0, 8, 0, -2,
|
||||
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
|
||||
{"Helm", c_dkgray, "silver", "null", 6, 6, 2, 3, 3, 0, 1, 0, 8, 0, -2,
|
||||
mfb(bp_head), false,
|
||||
{ARMORMOD_BULKY, ARMORMOD_FURRED, ARMORMOD_PADDED, ARMORMOD_PLATED,
|
||||
ARMORMOD_NULL}},
|
||||
|
||||
{"Gloves", c_ltblue,LEATHER,MNULL, 2, 1, 1, 6, 6, 1, 2, 0, -4, 0, -2,
|
||||
{"Gloves", c_ltblue,"leather","null", 2, 1, 1, 3, 3, 1, 2, 0, -4, 0, -2,
|
||||
mfb(bp_hands), true,
|
||||
{ARMORMOD_BULKY, ARMORMOD_FURRED, ARMORMOD_PADDED, ARMORMOD_PLATED,
|
||||
ARMORMOD_NULL}},
|
||||
|
||||
// Name color Materials Vol Wgt Enc Dmg Cut Env Wrm Sto Bsh Cut Hit
|
||||
{"Boots", c_blue, LEATHER, MNULL, 6, 2, 1, 6, 6, 1, 3, 0, 4, 0, -1,
|
||||
// Name color Materials Vol Wgt Enc Cov Thk Env Wrm Sto Bsh Cut Hit
|
||||
{"Boots", c_blue, "leather", "null", 6, 2, 1, 3, 3, 1, 3, 0, 4, 0, -1,
|
||||
mfb(bp_feet), true,
|
||||
{ARMORMOD_LIGHT, ARMORMOD_BULKY, ARMORMOD_PADDED, ARMORMOD_PLATED,
|
||||
ARMORMOD_NULL}},
|
||||
|
||||
{"Ring", c_ltgreen, SILVER, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
{"Ring", c_ltgreen, "silver", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, true,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}}
|
||||
|
||||
@@ -304,33 +304,33 @@ artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS] = {
|
||||
|
||||
artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS] = {
|
||||
|
||||
{"", c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
|
||||
{"", c_white, "null", "null", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
// Description; "It is ..." or "They are ..."
|
||||
{"very thin and light.", c_white, MNULL, MNULL,
|
||||
// Vol Wgt Enc Dmg Cut Env Wrm Sto
|
||||
{"very thin and light.", c_white, "null", "null",
|
||||
// Vol Wgt Enc Cov Thk Env Wrm Sto
|
||||
-4, -8, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
{"extremely bulky.", c_white, MNULL, MNULL,
|
||||
{"extremely bulky.", c_white, "null", "null",
|
||||
8, 10, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
{"covered in pockets.", c_white, MNULL, MNULL,
|
||||
{"covered in pockets.", c_white, "null", "null",
|
||||
1, 1, 1, 0, 0, 0, 0, 16, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
{"disgustingly furry.", c_white, WOOL, MNULL,
|
||||
{"disgustingly furry.", c_white, "wool", "null",
|
||||
// Vol Wgt Enc Dmg Cut Env Wrm Sto
|
||||
4, 2, 1, 4, 0, 1, 3, 0, 0, 0, 0, 0, false,
|
||||
4, 2, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
{"leather-padded.", c_white, LEATHER, MNULL,
|
||||
4, 4, 1, 10, 4, 0, 1, -3, 0, 0, 0, 0, false,
|
||||
{"leather-padded.", c_white, "leather", "null",
|
||||
4, 4, 1, 1, 1, 0, 1, -3, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
{"plated in iron.", c_white, IRON, MNULL,
|
||||
4, 12, 3, 8, 14, 0, 1, -4, 0, 0, 0, 0, false,
|
||||
{"plated in iron.", c_white, "iron", "null",
|
||||
4, 12, 3, 2, 2, 0, 1, -4, 0, 0, 0, 0, false,
|
||||
{ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL, ARMORMOD_NULL}},
|
||||
|
||||
};
|
||||
@@ -372,7 +372,9 @@ itype* game::new_artifact()
|
||||
art->melee_dam = rng(weapon->bash_min, weapon->bash_max);
|
||||
art->melee_cut = rng(weapon->cut_min, weapon->cut_max);
|
||||
art->m_to_hit = rng(weapon->to_hit_min, weapon->to_hit_max);
|
||||
art->item_flags = weapon->flags;
|
||||
if( weapon->tag != "" ) {
|
||||
art->item_tags.insert(weapon->tag);
|
||||
}
|
||||
// Add an extra weapon perhaps?
|
||||
if (one_in(2)) {
|
||||
int select = rng(0, 2);
|
||||
@@ -383,7 +385,9 @@ itype* game::new_artifact()
|
||||
art->melee_dam += rng(weapon->bash_min, weapon->bash_max);
|
||||
art->melee_cut += rng(weapon->bash_min, weapon->bash_max);
|
||||
art->m_to_hit += rng(weapon->to_hit_min, weapon->to_hit_max);
|
||||
art->item_flags |= weapon->flags;
|
||||
if( weapon->tag != "" ) {
|
||||
art->item_tags.insert(weapon->tag);
|
||||
}
|
||||
std::stringstream newname;
|
||||
newname << weapon->adjective << " " << info->name;
|
||||
art->name = artifact_name(newname.str());
|
||||
@@ -503,11 +507,10 @@ It may have unknown powers; use 'a' to activate them.";
|
||||
art->melee_dam = info->melee_bash;
|
||||
art->melee_cut = info->melee_cut;
|
||||
art->m_to_hit = info->melee_hit;
|
||||
art->item_flags = 0;
|
||||
art->covers = info->covers;
|
||||
art->encumber = info->encumb;
|
||||
art->dmg_resist = info->dmg_resist;
|
||||
art->cut_resist = info->cut_resist;
|
||||
art->coverage = info->coverage;
|
||||
art->thickness = info->thickness;
|
||||
art->env_resist = info->env_resist;
|
||||
art->warmth = info->warmth;
|
||||
art->storage = info->storage;
|
||||
@@ -534,15 +537,15 @@ It may have unknown powers; use 'a' to activate them.";
|
||||
|
||||
art->encumber += modinfo->encumb;
|
||||
|
||||
if (modinfo->dmg_resist > 0 || art->dmg_resist > abs(modinfo->dmg_resist))
|
||||
art->dmg_resist += modinfo->dmg_resist;
|
||||
if (modinfo->coverage > 0 || art->coverage > abs(modinfo->coverage))
|
||||
art->coverage += modinfo->coverage;
|
||||
else
|
||||
art->dmg_resist = 0;
|
||||
art->coverage = 0;
|
||||
|
||||
if (modinfo->cut_resist > 0 || art->cut_resist > abs(modinfo->cut_resist))
|
||||
art->cut_resist += modinfo->cut_resist;
|
||||
if (modinfo->thickness > 0 || art->thickness > abs(modinfo->thickness))
|
||||
art->thickness += modinfo->thickness;
|
||||
else
|
||||
art->cut_resist = 0;
|
||||
art->thickness = 0;
|
||||
|
||||
if (modinfo->env_resist > 0 || art->env_resist > abs(modinfo->env_resist))
|
||||
art->env_resist += modinfo->env_resist;
|
||||
@@ -587,8 +590,10 @@ It may have unknown powers; use 'a' to activate them.";
|
||||
art->effects_worn.push_back(passive_tmp);
|
||||
}
|
||||
|
||||
art->id = itypes.size();
|
||||
itypes[art->id]=art;
|
||||
std::stringstream artid;
|
||||
artid << "artifact" << artifact_itype_ids.size();
|
||||
art->id = artid.str();
|
||||
itypes[art->id] = art;
|
||||
artifact_itype_ids.push_back(art->id);
|
||||
return art;
|
||||
}
|
||||
@@ -609,14 +614,13 @@ itype* game::new_natural_artifact(artifact_natural_property prop)
|
||||
|
||||
art->sym = ':';
|
||||
art->color = c_yellow;
|
||||
art->m1 = STONE;
|
||||
art->m2 = MNULL;
|
||||
art->m1 = "stone";
|
||||
art->m2 = "null";
|
||||
art->volume = rng(shape_data->volume_min, shape_data->volume_max);
|
||||
art->weight = rng(shape_data->weight_min, shape_data->weight_max);
|
||||
art->melee_dam = 0;
|
||||
art->melee_cut = 0;
|
||||
art->m_to_hit = 0;
|
||||
art->item_flags = 0;
|
||||
|
||||
art->name = property_data->name + " " + shape_data->name;
|
||||
std::stringstream desc;
|
||||
@@ -702,9 +706,11 @@ itype* game::new_natural_artifact(artifact_natural_property prop)
|
||||
art->charge_type = art_charge( rng(ARTC_NULL + 1, NUM_ARTCS - 1) );
|
||||
}
|
||||
|
||||
art->id = itypes.size();
|
||||
std::stringstream artid;
|
||||
artid << "artifact" << artifact_itype_ids.size();
|
||||
art->id = artid.str();
|
||||
artifact_itype_ids.push_back(art->id);
|
||||
itypes[art->id]=art;
|
||||
itypes[art->id] = art;
|
||||
return art;
|
||||
}
|
||||
|
||||
@@ -839,11 +845,11 @@ void game::process_artifact(item *it, player *p, bool wielded)
|
||||
case AEP_EXTINGUISH:
|
||||
for (int x = p->posx - 1; x <= p->posx + 1; x++) {
|
||||
for (int y = p->posy - 1; y <= p->posy + 1; y++) {
|
||||
if (m.field_at(x, y).type == fd_fire) {
|
||||
if (m.field_at(x, y).density == 0)
|
||||
m.remove_field(x, y);
|
||||
if (m.field_at(x, y).findField(fd_fire)) {
|
||||
if (m.field_at(x, y).findField(fd_fire)->getFieldDensity() == 0)
|
||||
m.remove_field(x, y, fd_fire);
|
||||
else
|
||||
m.field_at(x, y).density--;
|
||||
m.field_at(x, y).findField(fd_fire)->setFieldDensity(m.field_at(x, y).findField(fd_fire)->getFieldDensity() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -861,7 +867,7 @@ void game::process_artifact(item *it, player *p, bool wielded)
|
||||
|
||||
case AEP_EVIL:
|
||||
if (one_in(150)) { // Once every 15 minutes, on average
|
||||
p->add_disease(DI_EVIL, 300, this);
|
||||
p->add_disease("evil", 300);
|
||||
if (!wielded && !it->is_armor())
|
||||
add_msg("You have an urge to %s the %s.",
|
||||
(it->is_armor() ? "wear" : "wield"), it->tname().c_str());
|
||||
|
||||
+12
-12
@@ -48,8 +48,8 @@ struct artifact_tool_form_datum
|
||||
std::string name;
|
||||
char sym;
|
||||
nc_color color;
|
||||
material m1;
|
||||
material m2;
|
||||
std::string m1;
|
||||
std::string m2;
|
||||
int volume_min, volume_max;
|
||||
int weight_min, weight_max;
|
||||
artifact_weapon_type base_weapon;
|
||||
@@ -57,7 +57,7 @@ struct artifact_tool_form_datum
|
||||
|
||||
/*
|
||||
artifact_tool_form_datum
|
||||
(std::string Name, char Sym, nc_color Color, material M1, material M2,
|
||||
(std::string Name, char Sym, nc_color Color, std::string M1, std::string M2,
|
||||
int Volmin, int Volmax, int Wgtmin, int Wgtmax, artifact_weapon_type Base,
|
||||
artifact_weapon_type extra[3])
|
||||
: name (Name), sym (Sym), color (Color), m1 (M1), m2 (M2),
|
||||
@@ -87,7 +87,7 @@ struct artifact_weapon_datum
|
||||
int bash_min, bash_max;
|
||||
int cut_min, cut_max;
|
||||
int to_hit_min, to_hit_max;
|
||||
unsigned flags : NUM_ITEM_FLAGS;
|
||||
std::string tag;
|
||||
};
|
||||
|
||||
extern artifact_weapon_datum artifact_weapon_data[NUM_ARTWEAPS];
|
||||
@@ -108,12 +108,12 @@ struct artifact_armor_form_datum
|
||||
{
|
||||
std::string name;
|
||||
nc_color color;
|
||||
material m1;
|
||||
material m2;
|
||||
std::string m1;
|
||||
std::string m2;
|
||||
int volume, weight;
|
||||
int encumb;
|
||||
int dmg_resist;
|
||||
int cut_resist;
|
||||
int coverage;
|
||||
int thickness;
|
||||
int env_resist;
|
||||
int warmth;
|
||||
int storage;
|
||||
@@ -125,13 +125,13 @@ struct artifact_armor_form_datum
|
||||
/*
|
||||
// Constructor
|
||||
artifact_armor_form_datum
|
||||
(std::string Name, nc_color Color, material M1, material M2, int Volume,
|
||||
(std::string Name, nc_color Color, std::string M1, std::string M2, int Volume,
|
||||
int Weight, int Encumb, int Dmg_res, int Cut_res, int Env_res,
|
||||
int Warmth, int Storage, int Bash, int Cut, int Hit, unsigned char Covers,
|
||||
bool Plural, artifact_armor_mod Mods[5])
|
||||
: name (Name), color (Color), m1 (M1), m2 (M2), volume (Volume),
|
||||
weight (Weight), encumb (Encumb), dmg_resist (Dmg_res),
|
||||
cut_resist (Cut_res), env_resist (Env_res), warmth (Warmth),
|
||||
weight (Weight), encumb (Encumb), coverage (Coverage),
|
||||
thickness (thickness), env_resist (Env_res), warmth (Warmth),
|
||||
storage (Storage), melee_bash (Bash), melee_cut (Cut), melee_hit (Hit),
|
||||
covers (Covers), plural (Plural), available_mods (Mods) { };
|
||||
|
||||
@@ -154,7 +154,7 @@ enum artifact_armor_form
|
||||
extern artifact_armor_form_datum artifact_armor_form_data[NUM_ARTARMFORMS];
|
||||
|
||||
/* Armor mods alter the normal values of armor.
|
||||
* If the basic armor type has MNULL as its second material, and the mod has a
|
||||
* If the basic armor type has "null" as its second material, and the mod has a
|
||||
* material attached, the second material will be changed.
|
||||
*/
|
||||
extern artifact_armor_form_datum artifact_armor_mod_data[NUM_ARMORMODS];
|
||||
|
||||
+755
@@ -0,0 +1,755 @@
|
||||
#include "game.h"
|
||||
#include "auto_pickup.h"
|
||||
#include "output.h"
|
||||
#include "debug.h"
|
||||
#include "keypress.h"
|
||||
#include "item_factory.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
std::vector<cPickupRules> vAutoPickupRules[5];
|
||||
|
||||
void game::show_auto_pickup()
|
||||
{
|
||||
save_reset_changes(false);
|
||||
|
||||
const int iHeaderHeight = 4;
|
||||
const int iContentHeight = FULL_SCREEN_HEIGHT-2-iHeaderHeight;
|
||||
|
||||
const int iOffsetX = (TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0;
|
||||
const int iOffsetY = (TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0;
|
||||
|
||||
std::map<int, bool> mapLines;
|
||||
mapLines[3] = true;
|
||||
mapLines[50] = true;
|
||||
mapLines[54] = true;
|
||||
//mapLines[61] = true;
|
||||
//mapLines[68] = true;
|
||||
|
||||
const int iTotalCols = mapLines.size()-1;
|
||||
|
||||
WINDOW* w_auto_pickup_options = newwin(FULL_SCREEN_HEIGHT/2, FULL_SCREEN_WIDTH/2, iOffsetY + (FULL_SCREEN_HEIGHT/2)/2, iOffsetX + (FULL_SCREEN_WIDTH/2)/2);
|
||||
WINDOW* w_auto_pickup_help = newwin((FULL_SCREEN_HEIGHT/2)-2, FULL_SCREEN_WIDTH * 3/4, 8 + iOffsetY + (FULL_SCREEN_HEIGHT/2)/2, iOffsetX + 19/2);
|
||||
|
||||
WINDOW* w_auto_pickup_border = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, iOffsetY, iOffsetX);
|
||||
WINDOW* w_auto_pickup_header = newwin(iHeaderHeight, FULL_SCREEN_WIDTH - 2, 1 + iOffsetY, 1 + iOffsetX);
|
||||
WINDOW* w_auto_pickup = newwin(iContentHeight, FULL_SCREEN_WIDTH - 2, iHeaderHeight + 1 + iOffsetY, 1 + iOffsetX);
|
||||
|
||||
wborder(w_auto_pickup_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
mvwputch(w_auto_pickup_border, 3, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(w_auto_pickup_border, 3, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
for (std::map<int, bool>::iterator iter = mapLines.begin(); iter != mapLines.end(); ++iter) {
|
||||
mvwputch(w_auto_pickup_border, FULL_SCREEN_HEIGHT-1, iter->first + 1, c_ltgray, LINE_XXOX); // _|_
|
||||
}
|
||||
|
||||
mvwprintz(w_auto_pickup_border, 0, 29, c_ltred, " AUTO PICKUP MANAGER ");
|
||||
wrefresh(w_auto_pickup_border);
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 0, 0, c_ltgreen, " A");
|
||||
wprintz(w_auto_pickup_header, c_white, "dd ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "R");
|
||||
wprintz(w_auto_pickup_header, c_white, "emove ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "C");
|
||||
wprintz(w_auto_pickup_header, c_white, "opy ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "M");
|
||||
wprintz(w_auto_pickup_header, c_white, "ove ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "E");
|
||||
wprintz(w_auto_pickup_header, c_white, "nable ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "D");
|
||||
wprintz(w_auto_pickup_header, c_white, "isable ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "T");
|
||||
wprintz(w_auto_pickup_header, c_white, "est ");
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 1, 0, c_ltgreen, " +");
|
||||
wprintz(w_auto_pickup_header, c_white, "/");
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "-");
|
||||
wprintz(w_auto_pickup_header, c_white, " Move up/down ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "Enter");
|
||||
wprintz(w_auto_pickup_header, c_white, "-Edit ");
|
||||
|
||||
wprintz(w_auto_pickup_header, c_ltgreen, "Tab");
|
||||
wprintz(w_auto_pickup_header, c_white, "-Switch Page ");
|
||||
|
||||
|
||||
for (int i = 0; i < 78; i++) {
|
||||
if (mapLines[i]) {
|
||||
mvwputch(w_auto_pickup_header, 2, i, c_ltgray, LINE_OXXX);
|
||||
mvwputch(w_auto_pickup_header, 3, i, c_ltgray, LINE_XOXO);
|
||||
} else {
|
||||
mvwputch(w_auto_pickup_header, 2, i, c_ltgray, LINE_OXOX); // Draw line under header
|
||||
}
|
||||
}
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 3, 0, c_white, "#");
|
||||
mvwprintz(w_auto_pickup_header, 3, 7, c_white, "Rules");
|
||||
mvwprintz(w_auto_pickup_header, 3, 51, c_white, "I/E");
|
||||
//mvwprintz(w_auto_pickup_header, 3, 55, c_white, "Volume");
|
||||
//mvwprintz(w_auto_pickup_header, 3, 62, c_white, "Weight");
|
||||
|
||||
wrefresh(w_auto_pickup_header);
|
||||
|
||||
int iCurrentPage = 1;
|
||||
int iCurrentLine = 0;
|
||||
int iCurrentCol = 1;
|
||||
int iStartPos = 0;
|
||||
bool bStuffChanged = false;
|
||||
char ch = ' ';
|
||||
|
||||
std::stringstream sTemp;
|
||||
|
||||
do {
|
||||
mvwprintz(w_auto_pickup_header, 2, 17 + 0, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 1) ? hilite(c_white) : c_white, "Global");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
|
||||
mvwprintz(w_auto_pickup_header, 2, 17 + 9, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 2) ? hilite(c_white) : c_white, "Character");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
|
||||
/*
|
||||
mvwprintz(w_auto_pickup_header, 2, 12 + 21, c_white, "[");
|
||||
wprintz(w_auto_pickup_header, (iCurrentPage == 3) ? hilite(c_white) : c_white, "Options");
|
||||
wprintz(w_auto_pickup_header, c_white, "]");
|
||||
*/
|
||||
|
||||
wrefresh(w_auto_pickup_header);
|
||||
|
||||
// Clear the lines
|
||||
for (int i = 0; i < iContentHeight; i++) {
|
||||
for (int j = 0; j < 79; j++) {
|
||||
if (mapLines[j]) {
|
||||
mvwputch(w_auto_pickup, i, j, c_ltgray, LINE_XOXO);
|
||||
} else {
|
||||
mvwputch(w_auto_pickup, i, j, c_black, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iCurrentPage == 1 || iCurrentPage == 2) {
|
||||
if (iCurrentPage == 2 && g->u.name == "") {
|
||||
vAutoPickupRules[2].clear();
|
||||
mvwprintz(w_auto_pickup, 8, 15, c_white, "Please load a character first to use this page!");
|
||||
}
|
||||
|
||||
if (vAutoPickupRules[iCurrentPage].size() > iContentHeight) {
|
||||
iStartPos = iCurrentLine - (iContentHeight - 1) / 2;
|
||||
|
||||
if (iStartPos < 0) {
|
||||
iStartPos = 0;
|
||||
} else if (iStartPos + iContentHeight > vAutoPickupRules[iCurrentPage].size()) {
|
||||
iStartPos = vAutoPickupRules[iCurrentPage].size() - iContentHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// display auto pickup
|
||||
for (int i = iStartPos; i < vAutoPickupRules[iCurrentPage].size(); i++) {
|
||||
if (i >= iStartPos && i < iStartPos + ((iContentHeight > vAutoPickupRules[iCurrentPage].size()) ? vAutoPickupRules[iCurrentPage].size() : iContentHeight)) {
|
||||
nc_color cLineColor = (vAutoPickupRules[iCurrentPage][i].bActive) ? c_white : c_ltgray;
|
||||
|
||||
sTemp.str("");
|
||||
sTemp << i + 1;
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 0, cLineColor, sTemp.str().c_str());
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 4, cLineColor, "");
|
||||
|
||||
if (iCurrentLine == i) {
|
||||
wprintz(w_auto_pickup, c_yellow, ">> ");
|
||||
} else {
|
||||
wprintz(w_auto_pickup, c_yellow, " ");
|
||||
}
|
||||
|
||||
wprintz(w_auto_pickup, (iCurrentLine == i && iCurrentCol == 1) ? hilite(cLineColor) : cLineColor, "%s", ((vAutoPickupRules[iCurrentPage][i].sRule == "") ? "<empty rule>" : vAutoPickupRules[iCurrentPage][i].sRule).c_str());
|
||||
|
||||
mvwprintz(w_auto_pickup, i - iStartPos, 52, (iCurrentLine == i && iCurrentCol == 2) ? hilite(cLineColor) : cLineColor, "%s", ((vAutoPickupRules[iCurrentPage][i].bExclude) ? "E" : "I"));
|
||||
}
|
||||
}
|
||||
|
||||
wrefresh(w_auto_pickup);
|
||||
|
||||
} else if (iCurrentPage == 3) {
|
||||
wborder(w_auto_pickup_options, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
|
||||
mvwprintz(w_auto_pickup_options, 5, 10, c_white, "Under construction!");
|
||||
|
||||
wrefresh(w_auto_pickup);
|
||||
wrefresh(w_auto_pickup_options);
|
||||
}
|
||||
|
||||
ch = input();
|
||||
|
||||
if (iCurrentPage == 3) {
|
||||
switch(ch) {
|
||||
case '\t': //Switch to next Page
|
||||
iCurrentPage++;
|
||||
if (iCurrentPage > 3) {
|
||||
iCurrentPage = 1;
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (iCurrentPage == 1 || iCurrentPage == 2) {
|
||||
if (iCurrentPage == 2 && g->u.name == "" && ch != '\t') {
|
||||
//Only allow loaded games to use the char sheet
|
||||
} else if (vAutoPickupRules[iCurrentPage].size() > 0 || ch == 'a' || ch == '\t') {
|
||||
switch(ch) {
|
||||
case 'j': //move down
|
||||
iCurrentLine++;
|
||||
iCurrentCol = 1;
|
||||
if (iCurrentLine >= vAutoPickupRules[iCurrentPage].size()) {
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case 'k': //move up
|
||||
iCurrentLine--;
|
||||
iCurrentCol = 1;
|
||||
if (iCurrentLine < 0) {
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
}
|
||||
break;
|
||||
case 'a': //add new rule
|
||||
case 'A':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].push_back(cPickupRules("", true, false));
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
break;
|
||||
case 'r': //remove rule
|
||||
case 'R':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].erase(vAutoPickupRules[iCurrentPage].begin() + iCurrentLine);
|
||||
if (iCurrentLine > vAutoPickupRules[iCurrentPage].size()-1) {
|
||||
iCurrentLine--;
|
||||
}
|
||||
break;
|
||||
case 'c': //copy rule
|
||||
case 'C':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage].push_back(cPickupRules(vAutoPickupRules[iCurrentPage][iCurrentLine].sRule, vAutoPickupRules[iCurrentPage][iCurrentLine].bActive, vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude));
|
||||
iCurrentLine = vAutoPickupRules[iCurrentPage].size()-1;
|
||||
break;
|
||||
case 'm': //move rule global <-> character
|
||||
case 'M':
|
||||
if ((iCurrentPage == 1 && g->u.name != "") || iCurrentPage == 2) {
|
||||
bStuffChanged = true;
|
||||
//copy over
|
||||
vAutoPickupRules[(iCurrentPage == 1) ? 2 : 1].push_back(cPickupRules(vAutoPickupRules[iCurrentPage][iCurrentLine].sRule, vAutoPickupRules[iCurrentPage][iCurrentLine].bActive, vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude));
|
||||
|
||||
//remove old
|
||||
vAutoPickupRules[iCurrentPage].erase(vAutoPickupRules[iCurrentPage].begin() + iCurrentLine);
|
||||
iCurrentLine = vAutoPickupRules[(iCurrentPage == 1) ? 2 : 1].size()-1;
|
||||
iCurrentPage = (iCurrentPage == 1) ? 2 : 1;
|
||||
}
|
||||
break;
|
||||
case '\t': //Switch to next Page
|
||||
iCurrentPage++;
|
||||
if (iCurrentPage > 2) {
|
||||
iCurrentPage = 1;
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case '\n': //Edit Col in current line
|
||||
bStuffChanged = true;
|
||||
if (iCurrentCol == 1) {
|
||||
mvwprintz(w_auto_pickup_help, 1, 1, c_white, "* is used as a Wildcard. A few Examples:");
|
||||
mvwprintz(w_auto_pickup_help, 2, 1, c_white, "");
|
||||
mvwprintz(w_auto_pickup_help, 3, 1, c_white, "wood arrow matches the itemname exactly");
|
||||
mvwprintz(w_auto_pickup_help, 4, 1, c_white, "wood ar* matches items beginning with wood ar");
|
||||
mvwprintz(w_auto_pickup_help, 5, 1, c_white, "*rrow matches items ending with rrow");
|
||||
mvwprintz(w_auto_pickup_help, 6, 1, c_white, "*avy fle*fi*arrow multible * are allowed");
|
||||
mvwprintz(w_auto_pickup_help, 7, 1, c_white, "heAVY*woOD*arrOW case insesitive search");
|
||||
mvwprintz(w_auto_pickup_help, 8, 1, c_white, "");
|
||||
|
||||
wborder(w_auto_pickup_help, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
wrefresh(w_auto_pickup_help);
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].sRule = trim_rule(string_input_popup("Pickup Rule:", 30, vAutoPickupRules[iCurrentPage][iCurrentLine].sRule));
|
||||
} else if (iCurrentCol == 2) {
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude = !vAutoPickupRules[iCurrentPage][iCurrentLine].bExclude;
|
||||
}
|
||||
break;
|
||||
case 'e': //enable rule
|
||||
case 'E':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bActive = true;
|
||||
break;
|
||||
case 'd': //disable rule
|
||||
case 'D':
|
||||
bStuffChanged = true;
|
||||
vAutoPickupRules[iCurrentPage][iCurrentLine].bActive = false;
|
||||
break;
|
||||
case 'h': //move left
|
||||
iCurrentCol--;
|
||||
if (iCurrentCol < 1) {
|
||||
iCurrentCol = iTotalCols;
|
||||
}
|
||||
break;
|
||||
case 'l': //move right
|
||||
iCurrentCol++;
|
||||
if (iCurrentCol > iTotalCols) {
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case '+': //move rule up
|
||||
bStuffChanged = true;
|
||||
if (iCurrentLine < vAutoPickupRules[iCurrentPage].size()-1) {
|
||||
std::swap(vAutoPickupRules[iCurrentPage][iCurrentLine], vAutoPickupRules[iCurrentPage][iCurrentLine+1]);
|
||||
iCurrentLine++;
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case '-': //move rule down
|
||||
bStuffChanged = true;
|
||||
if (iCurrentLine > 0) {
|
||||
std::swap(vAutoPickupRules[iCurrentPage][iCurrentLine], vAutoPickupRules[iCurrentPage][iCurrentLine-1]);
|
||||
iCurrentLine--;
|
||||
iCurrentCol = 1;
|
||||
}
|
||||
break;
|
||||
case 't': //test rule
|
||||
case 'T':
|
||||
test_pattern(iCurrentPage, iCurrentLine);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while(ch != 'q' && ch != 'Q' && ch != KEY_ESCAPE);
|
||||
|
||||
if (bStuffChanged) {
|
||||
if(query_yn("Save changes?")) {
|
||||
save_auto_pickup(false);
|
||||
|
||||
if (g->u.name != "") {
|
||||
save_auto_pickup(true);
|
||||
}
|
||||
} else {
|
||||
save_reset_changes(true);
|
||||
}
|
||||
}
|
||||
|
||||
werase(w_auto_pickup);
|
||||
werase(w_auto_pickup_border);
|
||||
werase(w_auto_pickup_header);
|
||||
werase(w_auto_pickup_options);
|
||||
werase(w_auto_pickup_help);
|
||||
}
|
||||
|
||||
void test_pattern(int iCurrentPage, int iCurrentLine)
|
||||
{
|
||||
std::vector<std::string> vMatchingItems;
|
||||
std::string sItemName = "";
|
||||
|
||||
if (vAutoPickupRules[iCurrentPage][iCurrentLine].sRule == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
//Loop through all itemfactory items
|
||||
for (int i = 0; i < standard_itype_ids.size(); i++) {
|
||||
sItemName = item_controller->find_template(standard_itype_ids[i])->name;
|
||||
if (auto_pickup_match(sItemName, vAutoPickupRules[iCurrentPage][iCurrentLine].sRule)) {
|
||||
vMatchingItems.push_back(sItemName);
|
||||
}
|
||||
}
|
||||
|
||||
const int iOffsetX = 15 + ((TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0);
|
||||
const int iOffsetY = 5 + ((TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0);
|
||||
|
||||
int iStartPos = 0;
|
||||
const int iContentHeight = FULL_SCREEN_HEIGHT - 8;
|
||||
const int iContentWidth = FULL_SCREEN_WIDTH - 30;
|
||||
char ch;
|
||||
std::stringstream sTemp;
|
||||
|
||||
WINDOW* w_test_rule_border = newwin(iContentHeight + 2, iContentWidth, iOffsetY, iOffsetX);
|
||||
WINDOW* w_test_rule_content = newwin(iContentHeight, iContentWidth - 2, 1 + iOffsetY, 1 + iOffsetX);
|
||||
|
||||
wborder(w_test_rule_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX, LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
|
||||
sTemp << vMatchingItems.size() << " items match: " << vAutoPickupRules[iCurrentPage][iCurrentLine].sRule;
|
||||
mvwprintz(w_test_rule_border, 0, iContentWidth/2 - (sTemp.str()).length()/2, hilite(c_white), sTemp.str().c_str());
|
||||
|
||||
wrefresh(w_test_rule_border);
|
||||
|
||||
iCurrentLine = 0;
|
||||
|
||||
do {
|
||||
// Clear the lines
|
||||
for (int i = 0; i < iContentHeight; i++) {
|
||||
for (int j = 0; j < 79; j++) {
|
||||
mvwputch(w_test_rule_content, i, j, c_black, ' ');
|
||||
}
|
||||
}
|
||||
|
||||
if (vMatchingItems.size() > iContentHeight) {
|
||||
iStartPos = iCurrentLine - (iContentHeight - 1) / 2;
|
||||
|
||||
if (iStartPos < 0) {
|
||||
iStartPos = 0;
|
||||
} else if (iStartPos + iContentHeight > vMatchingItems.size()) {
|
||||
iStartPos = vMatchingItems.size() - iContentHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// display auto pickup
|
||||
for (int i = iStartPos; i < vMatchingItems.size(); i++) {
|
||||
if (i >= iStartPos && i < iStartPos + ((iContentHeight > vMatchingItems.size()) ? vMatchingItems.size() : iContentHeight)) {
|
||||
nc_color cLineColor = c_white;
|
||||
|
||||
sTemp.str("");
|
||||
sTemp << i + 1;
|
||||
mvwprintz(w_test_rule_content, i - iStartPos, 0, cLineColor, sTemp.str().c_str());
|
||||
mvwprintz(w_test_rule_content, i - iStartPos, 4, cLineColor, "");
|
||||
|
||||
if (iCurrentLine == i) {
|
||||
wprintz(w_test_rule_content, c_yellow, ">> ");
|
||||
} else {
|
||||
wprintz(w_test_rule_content, c_yellow, " ");
|
||||
}
|
||||
|
||||
wprintz(w_test_rule_content, (iCurrentLine == i) ? hilite(cLineColor) : cLineColor, vMatchingItems[i].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
wrefresh(w_test_rule_content);
|
||||
|
||||
ch = input();
|
||||
|
||||
switch(ch) {
|
||||
case 'j': //move down
|
||||
iCurrentLine++;
|
||||
if (iCurrentLine >= vMatchingItems.size()) {
|
||||
iCurrentLine = 0;
|
||||
}
|
||||
break;
|
||||
case 'k': //move up
|
||||
iCurrentLine--;
|
||||
if (iCurrentLine < 0) {
|
||||
iCurrentLine = vMatchingItems.size()-1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while(ch == 'j' || ch == 'k');
|
||||
|
||||
werase(w_test_rule_border);
|
||||
werase(w_test_rule_content);
|
||||
}
|
||||
|
||||
void load_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ifstream fin;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
}
|
||||
|
||||
fin.open(sFile.c_str());
|
||||
if(!fin.is_open()) {
|
||||
fin.close();
|
||||
|
||||
create_default_auto_pickup(bCharacter);
|
||||
|
||||
fin.open(sFile.c_str());
|
||||
if(!fin.is_open()) {
|
||||
DebugLog() << "Could neither read nor create " << sFile << "\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
vAutoPickupRules[(bCharacter) ? 2 : 1].clear();
|
||||
|
||||
while(!fin.eof()) {
|
||||
std::string sLine;
|
||||
fin >> sLine;
|
||||
|
||||
if(sLine == "") { // Empty line, chomp it
|
||||
getline(fin, sLine);
|
||||
|
||||
} else if(sLine[0] == '#') { // # indicates a comment
|
||||
getline(fin, sLine);
|
||||
|
||||
} else {
|
||||
int iNum = std::count(sLine.begin(), sLine.end(), ';');
|
||||
|
||||
if(iNum != 2) {
|
||||
/*int iNum = std::count(sLine.begin(), sLine.end(), ' ');
|
||||
|
||||
if(iNum == 1) { //its an option! hurray
|
||||
|
||||
} else {*/
|
||||
DebugLog() << "Bad Rule: " << sLine << "\n";
|
||||
getline(fin, sLine);
|
||||
//}
|
||||
|
||||
} else {
|
||||
std::string sRule = "";
|
||||
bool bActive = true;
|
||||
bool bExclude = false;
|
||||
|
||||
int iPos = 0;
|
||||
int iCol = 1;
|
||||
do {
|
||||
iPos = sLine.find(";");
|
||||
|
||||
std::string sTemp = (iPos == std::string::npos) ? sLine : sLine.substr(0, iPos);
|
||||
|
||||
if (iCol == 1) {
|
||||
sRule = sTemp;
|
||||
|
||||
} else if (iCol == 2) {
|
||||
bActive = (sTemp == "T" || sTemp == "True") ? true : false;
|
||||
|
||||
} else if (iCol == 3) {
|
||||
bExclude = (sTemp == "T" || sTemp == "True") ? true : false;
|
||||
}
|
||||
|
||||
iCol++;
|
||||
|
||||
if (iPos != std::string::npos) {
|
||||
sLine = sLine.substr(iPos+1, sLine.size());
|
||||
}
|
||||
|
||||
} while(iPos != std::string::npos);
|
||||
|
||||
vAutoPickupRules[(bCharacter) ? 2 : 1].push_back(cPickupRules(sRule, bActive, bExclude));
|
||||
}
|
||||
}
|
||||
|
||||
if(fin.peek() == '\n') {
|
||||
getline(fin, sLine); // Chomp
|
||||
}
|
||||
}
|
||||
|
||||
fin.close();
|
||||
|
||||
merge_vector();
|
||||
}
|
||||
|
||||
void merge_vector()
|
||||
{
|
||||
vAutoPickupRules[0].clear();
|
||||
|
||||
for (int i=1; i <= 2; i++) { //Loop through global 1 and character 2
|
||||
for (int j=0; j < vAutoPickupRules[i].size(); j++) {
|
||||
if (vAutoPickupRules[i][j].sRule != "") {
|
||||
vAutoPickupRules[0].push_back(cPickupRules(vAutoPickupRules[i][j].sRule, vAutoPickupRules[i][j].bActive, vAutoPickupRules[i][j].bExclude));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void save_reset_changes(bool bReset)
|
||||
{
|
||||
for (int i=1; i <= 2; i++) { //Loop through global 1 and character 2
|
||||
vAutoPickupRules[i + ((bReset) ? 0: 2)].clear();
|
||||
for (int j=0; j < vAutoPickupRules[i + ((bReset) ? 2: 0)].size(); j++) {
|
||||
if (vAutoPickupRules[i + ((bReset) ? 2: 0)][j].sRule != "") {
|
||||
vAutoPickupRules[i + ((bReset) ? 0: 2)].push_back(cPickupRules(vAutoPickupRules[i + ((bReset) ? 2: 0)][j].sRule, vAutoPickupRules[i + ((bReset) ? 2: 0)][j].bActive, vAutoPickupRules[i + ((bReset) ? 2: 0)][j].bExclude));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
merge_vector();
|
||||
}
|
||||
|
||||
std::string auto_pickup_header(bool bCharacter)
|
||||
{
|
||||
std::string sTemp = (bCharacter) ? "character": "global";
|
||||
return "# This is the " + sTemp + " auto pickup rules file. The format is\n\
|
||||
# <pickup rule>;<dis/enabled>;<in/exclude>\n\n\
|
||||
# <pickup rule> Simple text. No other special characters except spaces and *\n\
|
||||
# <dis/enabled> Can be T(rue) of F(alse)\n\
|
||||
# <in/exclude> Can be T(rue) of F(alse)\n\
|
||||
#\n\
|
||||
# If # is at the start of a line, it is considered a comment and is ignored.\n\
|
||||
# In-line commenting is not allowed. I think.\n\
|
||||
#\n\
|
||||
# If you want to restore the default auto pickup rules file, simply delete this file.\n\
|
||||
# A new auto_pickup.txt will be created next time you play.\
|
||||
\n\n";
|
||||
}
|
||||
|
||||
void save_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ofstream fout;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
std::ifstream fin;
|
||||
|
||||
fin.open(("save/" + g->u.name + ".sav").c_str());
|
||||
if(!fin.is_open()) {
|
||||
return;
|
||||
}
|
||||
fin.close();
|
||||
}
|
||||
|
||||
fout.open(sFile.c_str());
|
||||
|
||||
if(!fout.is_open()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fout << auto_pickup_header(bCharacter) << std::endl;
|
||||
for(int i = 0; i < vAutoPickupRules[(bCharacter) ? 2 : 1].size(); i++) {
|
||||
fout << vAutoPickupRules[(bCharacter) ? 2 : 1][i].sRule << ";";
|
||||
fout << (vAutoPickupRules[(bCharacter) ? 2 : 1][i].bActive ? "T" : "F") << ";";
|
||||
fout << (vAutoPickupRules[(bCharacter) ? 2 : 1][i].bExclude ? "T" : "F");
|
||||
fout << "\n";
|
||||
}
|
||||
|
||||
if (!bCharacter) {
|
||||
merge_vector();
|
||||
}
|
||||
}
|
||||
|
||||
void create_default_auto_pickup(bool bCharacter)
|
||||
{
|
||||
std::ofstream fout;
|
||||
std::string sFile = "data/auto_pickup.txt";
|
||||
|
||||
if (bCharacter) {
|
||||
sFile = "save/" + g->u.name + ".apu.txt";
|
||||
}
|
||||
|
||||
fout.open(sFile.c_str());
|
||||
if(!fout.is_open()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fout << auto_pickup_header(bCharacter);
|
||||
fout.close();
|
||||
}
|
||||
|
||||
std::string trim_rule(std::string sPattern)
|
||||
{
|
||||
size_t iPos = 0;
|
||||
|
||||
//Remove all double ** in pattern
|
||||
while((iPos = sPattern.find("**")) != std::string::npos) {
|
||||
sPattern = sPattern.substr(0, iPos) + sPattern.substr(iPos+1, sPattern.length()-iPos-1);
|
||||
}
|
||||
|
||||
return sPattern;
|
||||
}
|
||||
|
||||
bool auto_pickup_match(std::string sText, std::string sPattern)
|
||||
{
|
||||
//case insenitive search
|
||||
|
||||
/* Possible patterns
|
||||
*
|
||||
wooD
|
||||
wood*
|
||||
*wood
|
||||
Wood*aRrOW
|
||||
wood*arrow*
|
||||
*wood*arrow
|
||||
*wood*hard* *x*y*z*arrow*
|
||||
*/
|
||||
|
||||
if (sText == "") {
|
||||
return false;
|
||||
} else if (sText == "*") {
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t iPos;
|
||||
std::vector<std::string> vPattern;
|
||||
|
||||
sPattern = trim_rule(sPattern);
|
||||
|
||||
split(sPattern, '*', vPattern);
|
||||
size_t iNum = vPattern.size();
|
||||
|
||||
if (iNum == 0) { //should never happen
|
||||
return false;
|
||||
} else if (iNum == 1) { // no * found
|
||||
if (sText.length() == vPattern[0].length() && ci_find_substr(sText, vPattern[0]) != -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i=0; i < vPattern.size(); i++) {
|
||||
if (i==0 && vPattern[i] != "") { //beginning: ^vPat[i]
|
||||
if (sText.length() < vPattern[i].length() || ci_find_substr(sText.substr(0, vPattern[i].length()), vPattern[i]) == -1) {
|
||||
//debugmsg(("1: sText: " + sText + " | sPattern: ^" + vPattern[i] + " | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
sText = sText.substr(vPattern[i].length(), sText.length()-vPattern[i].length());
|
||||
} else if (i==vPattern.size()-1 && vPattern[i] != "") { //linenend: vPat[i]$
|
||||
if (sText.length() < vPattern[i].length() || ci_find_substr(sText.substr(sText.length()-vPattern[i].length(), vPattern[i].length()), vPattern[i]) == -1) {
|
||||
//debugmsg(("2: sText: " + sText + " | sPattern: " + vPattern[i] + "$ | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
} else { //inbetween: vPat[i]
|
||||
if ((iPos = ci_find_substr(sText, vPattern[i])) == -1) {
|
||||
//debugmsg(("3: sText: " + sText + " | sPattern: " + vPattern[i] + " | no match").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
sText = sText.substr(iPos+vPattern[i].length(), sText.length()-iPos);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
elems.clear();
|
||||
while (std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
|
||||
if ( s.substr(s.length()-1, 1) == "*") {
|
||||
elems.push_back("");
|
||||
}
|
||||
|
||||
return elems;
|
||||
}
|
||||
|
||||
/*
|
||||
// string test
|
||||
std::string str1 = "FIRST HELLO";
|
||||
std::string str2 = "hello";
|
||||
int f1 = ci_find_substr( str1, str2 );
|
||||
|
||||
// wstring test
|
||||
std::wstring wstr1 = L"ОПЯТЬ ПРИВЕТ";
|
||||
std::wstring wstr2 = L"привет";
|
||||
int f2 = ci_find_substr( wstr1, wstr2 );
|
||||
*/
|
||||
|
||||
// templated version of my_equal so it could work with both char and wchar_t
|
||||
template<typename charT>
|
||||
struct my_equal {
|
||||
public:
|
||||
my_equal( const std::locale& loc ) : loc_(loc) {}
|
||||
|
||||
bool operator()(charT ch1, charT ch2) {
|
||||
return std::toupper(ch1, loc_) == std::toupper(ch2, loc_);
|
||||
}
|
||||
private:
|
||||
const std::locale& loc_;
|
||||
};
|
||||
|
||||
// find substring (case insensitive)
|
||||
template<typename charT>
|
||||
int ci_find_substr( const charT& str1, const charT& str2, const std::locale& loc )
|
||||
{
|
||||
typename charT::const_iterator it = std::search( str1.begin(), str1.end(), str2.begin(), str2.end(), my_equal<typename charT::value_type>(loc) );
|
||||
if ( it != str1.end() ) return it - str1.begin();
|
||||
else return -1; // not found
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef _AUTO_PICKUP_H_
|
||||
#define _AUTO_PICKUP_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <locale>
|
||||
#include <algorithm>
|
||||
|
||||
class cPickupRules {
|
||||
public:
|
||||
std::string sRule;
|
||||
bool bActive;
|
||||
bool bExclude;
|
||||
|
||||
cPickupRules() {
|
||||
this->sRule = "";
|
||||
this->bActive = false;
|
||||
this->bExclude = false;
|
||||
}
|
||||
|
||||
cPickupRules(std::string sRuleIn, bool bActiveIn, bool bExcludeIn) {
|
||||
this->sRule = sRuleIn;
|
||||
this->bActive = bActiveIn;
|
||||
this->bExclude = bExcludeIn;
|
||||
}
|
||||
|
||||
~cPickupRules() {};
|
||||
};
|
||||
|
||||
extern std::vector<cPickupRules> vAutoPickupRules[5];
|
||||
|
||||
void test_pattern(int iCurrentPage, int iCurrentLine);
|
||||
std::string trim_rule(std::string sPattern);
|
||||
void merge_vector();
|
||||
void save_reset_changes(bool bReset);
|
||||
void show_auto_pickup();
|
||||
void load_auto_pickup(bool bCharacter);
|
||||
void save_auto_pickup(bool bCharacter);
|
||||
std::string auto_pickup_header(bool bCharacter);
|
||||
void create_default_auto_pickup(bool bCharacter);
|
||||
bool auto_pickup_match(std::string sText, std::string sPattern);
|
||||
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems);
|
||||
template<typename charT>
|
||||
int ci_find_substr( const charT& str1, const charT& str2, const std::locale& loc = std::locale() );
|
||||
|
||||
#endif
|
||||
+180
-531
@@ -5,7 +5,8 @@
|
||||
#include "keypress.h"
|
||||
#include "item.h"
|
||||
#include "bionics.h"
|
||||
#include "line.h"
|
||||
#include "line.h"
|
||||
#include "catajson.h"
|
||||
|
||||
#define BATTERY_AMOUNT 4 // How much batteries increase your power
|
||||
|
||||
@@ -47,7 +48,7 @@ void show_power_level_in_titlebar(WINDOW* window, player* p)
|
||||
void player::power_bionics(game *g)
|
||||
{
|
||||
int HEIGHT = TERMY;
|
||||
int WIDTH = 80;
|
||||
int WIDTH = FULL_SCREEN_WIDTH;
|
||||
int START_X = (TERMX - WIDTH)/2;
|
||||
int START_Y = (TERMY - HEIGHT)/2;
|
||||
WINDOW* wBio = newwin(HEIGHT, WIDTH, START_Y, START_X);
|
||||
@@ -69,7 +70,7 @@ void player::power_bionics(game *g)
|
||||
show_power_level_in_titlebar(wBio, this);
|
||||
|
||||
int HEADER_LINE_Y = START_Y + 2;
|
||||
int DESCRIPTION_LINE_Y = DESCRIPTION_START_Y - 1;
|
||||
int DESCRIPTION_LINE_Y = DESCRIPTION_START_Y - 1;
|
||||
for (int i = 1; i < 79; i++) {
|
||||
mvwputch(wBio, HEADER_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line under title
|
||||
mvwputch(wBio, DESCRIPTION_LINE_Y, i, c_ltgray, LINE_OXOX); // Draw line above description
|
||||
@@ -83,8 +84,7 @@ void player::power_bionics(game *g)
|
||||
mvwputch(wBio, DESCRIPTION_LINE_Y, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
for (int i = 0; i < my_bionics.size(); i++) {
|
||||
if ( bionics[my_bionics[i].id]->power_source ||
|
||||
!bionics[my_bionics[i].id]->activated )
|
||||
if (!bionics[my_bionics[i].id]->activated)
|
||||
passive.push_back(my_bionics[i]);
|
||||
else
|
||||
active.push_back(my_bionics[i]);
|
||||
@@ -104,10 +104,15 @@ void player::power_bionics(game *g)
|
||||
if (active.size() > 0) {
|
||||
mvwprintz(wBio, 3, 33, c_ltblue, "Active:");
|
||||
for (int i = 0; i < active.size(); i++) {
|
||||
if (active[i].powered)
|
||||
if (active[i].powered && !bionics[active[i].id]->power_source)
|
||||
type = c_red;
|
||||
else if (bionics[active[i].id]->power_source && !active[i].powered)
|
||||
type = c_ltcyan;
|
||||
else if (bionics[active[i].id]->power_source && active[i].powered)
|
||||
type = c_ltgreen;
|
||||
else
|
||||
type = c_ltred;
|
||||
|
||||
mvwputch(wBio, 4 + i, 33, type, active[i].invlet);
|
||||
mvwprintz(wBio, 4 + i, 35, type,
|
||||
(active[i].powered ? "%s - ON" : "%s - %d PU / %d trns"),
|
||||
@@ -210,7 +215,6 @@ void player::activate_bionic(int b, game *g)
|
||||
std::vector<std::string> bad;
|
||||
WINDOW* w;
|
||||
int dirx, diry, t, l, index;
|
||||
InputEvent input;
|
||||
item tmp_item;
|
||||
|
||||
if(bio.id == "bio_painkiller"){
|
||||
@@ -220,6 +224,9 @@ void player::activate_bionic(int b, game *g)
|
||||
pkill = pain;
|
||||
} else if (bio.id == "bio_nanobots"){
|
||||
healall(4);
|
||||
} else if (bio.id == "bio_night"){
|
||||
if (g->turn % 5)
|
||||
g->add_msg("Artificial night generator active!");
|
||||
} else if (bio.id == "bio_resonator"){
|
||||
g->sound(posx, posy, 30, "VRRRRMP!");
|
||||
for (int i = posx - 1; i <= posx + 1; i++) {
|
||||
@@ -244,43 +251,51 @@ void player::activate_bionic(int b, game *g)
|
||||
hurt(g, bp_torso, 0, rng(5, 15));
|
||||
}
|
||||
if (one_in(5))
|
||||
add_disease(DI_TELEGLOW, rng(50, 400), g);
|
||||
add_disease("teleglow", rng(50, 400));
|
||||
} else if (bio.id == "bio_teleport"){
|
||||
g->teleport();
|
||||
add_disease(DI_TELEGLOW, 300, g);
|
||||
add_disease("teleglow", 300);
|
||||
}
|
||||
// TODO: More stuff here (and bio_blood_filter)
|
||||
else if(bio.id == "bio_blood_anal"){
|
||||
w = newwin(20, 40, 3 + ((TERMY > 25) ? (TERMY-25)/2 : 0), 10+((TERMX > 80) ? (TERMX-80)/2 : 0));
|
||||
wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
|
||||
if (has_disease(DI_FUNGUS))
|
||||
if (has_disease("fungus"))
|
||||
bad.push_back("Fungal Parasite");
|
||||
if (has_disease(DI_DERMATIK))
|
||||
if (has_disease("dermatik"))
|
||||
bad.push_back("Insect Parasite");
|
||||
if (has_disease(DI_POISON))
|
||||
if (has_disease("poison"))
|
||||
bad.push_back("Poison");
|
||||
if (radiation > 0)
|
||||
bad.push_back("Irradiated");
|
||||
if (has_disease(DI_PKILL1))
|
||||
if (has_disease("pkill1"))
|
||||
good.push_back("Minor Painkiller");
|
||||
if (has_disease(DI_PKILL2))
|
||||
if (has_disease("pkill2"))
|
||||
good.push_back("Moderate Painkiller");
|
||||
if (has_disease(DI_PKILL3))
|
||||
if (has_disease("pkill3"))
|
||||
good.push_back("Heavy Painkiller");
|
||||
if (has_disease(DI_PKILL_L))
|
||||
if (has_disease("pkill_l"))
|
||||
good.push_back("Slow-Release Painkiller");
|
||||
if (has_disease(DI_DRUNK))
|
||||
if (has_disease("drunk"))
|
||||
good.push_back("Alcohol");
|
||||
if (has_disease(DI_CIG))
|
||||
if (has_disease("cig"))
|
||||
good.push_back("Nicotine");
|
||||
if (has_disease(DI_HIGH))
|
||||
if (has_disease("meth"))
|
||||
good.push_back("Methamphetamines");
|
||||
if (has_disease("high"))
|
||||
good.push_back("Intoxicant: Other");
|
||||
if (has_disease(DI_TOOK_PROZAC))
|
||||
if (has_disease("hallu") || has_disease("visuals"))
|
||||
bad.push_back("Magic Mushroom");
|
||||
if (has_disease("iodine"))
|
||||
good.push_back("Iodine");
|
||||
if (has_disease("took_xanax"))
|
||||
good.push_back("Xanax");
|
||||
if (has_disease("took_prozac"))
|
||||
good.push_back("Prozac");
|
||||
if (has_disease(DI_TOOK_FLUMED))
|
||||
if (has_disease("took_flumed"))
|
||||
good.push_back("Antihistamines");
|
||||
if (has_disease(DI_ADRENALINE))
|
||||
if (has_disease("adrenaline"))
|
||||
good.push_back("Adrenaline Spike");
|
||||
if (good.size() == 0 && bad.size() == 0)
|
||||
mvwprintz(w, 1, 1, c_white, "No effects.");
|
||||
@@ -297,69 +312,53 @@ void player::activate_bionic(int b, game *g)
|
||||
getch();
|
||||
delwin(w);
|
||||
} else if(bio.id == "bio_blood_filter"){
|
||||
rem_disease(DI_FUNGUS);
|
||||
rem_disease(DI_POISON);
|
||||
rem_disease(DI_PKILL1);
|
||||
rem_disease(DI_PKILL2);
|
||||
rem_disease(DI_PKILL3);
|
||||
rem_disease(DI_PKILL_L);
|
||||
rem_disease(DI_DRUNK);
|
||||
rem_disease(DI_CIG);
|
||||
rem_disease(DI_HIGH);
|
||||
rem_disease(DI_TOOK_PROZAC);
|
||||
rem_disease(DI_TOOK_FLUMED);
|
||||
rem_disease(DI_ADRENALINE);
|
||||
rem_disease("fungus");
|
||||
rem_disease("poison");
|
||||
rem_disease("pkill1");
|
||||
rem_disease("pkill2");
|
||||
rem_disease("pkill3");
|
||||
rem_disease("pkill_l");
|
||||
rem_disease("drunk");
|
||||
rem_disease("cig");
|
||||
rem_disease("high");
|
||||
rem_disease("hallu");
|
||||
rem_disease("visuals");
|
||||
rem_disease("iodine");
|
||||
rem_disease("took_xanax");
|
||||
rem_disease("took_prozac");
|
||||
rem_disease("took_flumed");
|
||||
rem_disease("adrenaline");
|
||||
rem_disease("meth");
|
||||
pkill = 0;
|
||||
stim = 0;
|
||||
} else if(bio.id == "bio_evap"){
|
||||
if (query_yn("Drink directly? Otherwise you will need a container.")) {
|
||||
tmp_item = item(g->itypes["water_clean"], 0);
|
||||
thirst -= 50;
|
||||
if (has_trait(PF_GOURMAND) && thirst < -60) {
|
||||
g->add_msg("You can't finish it all!");
|
||||
thirst = -60;
|
||||
} else if (!has_trait(PF_GOURMAND) && thirst < -20) {
|
||||
g->add_msg("You can't finish it all!");
|
||||
thirst = -20;
|
||||
}
|
||||
} else {
|
||||
t = g->inv("Choose a container:");
|
||||
if (i_at(t).type == 0) {
|
||||
g->add_msg("You don't have that item!");
|
||||
item water = item(g->itypes["water_clean"], 0);
|
||||
if (g->handle_liquid(water, true, true))
|
||||
{
|
||||
moves -= 100;
|
||||
}
|
||||
else if (query_yn("Drink from your hands?"))
|
||||
{
|
||||
inv.push_back(water);
|
||||
water = inv.item_by_type(water.typeId());
|
||||
eat(g, water.invlet);
|
||||
moves -= 350;
|
||||
}
|
||||
else
|
||||
{
|
||||
power_level += bionics["bio_evap"]->power_cost;
|
||||
} else if (!i_at(t).is_container()) {
|
||||
g->add_msg("That %s isn't a container!", i_at(t).tname().c_str());
|
||||
power_level += bionics["bio_evap"]->power_cost;
|
||||
} else {
|
||||
it_container *cont = dynamic_cast<it_container*>(i_at(t).type);
|
||||
if (i_at(t).volume_contained() + 1 > cont->contains) {
|
||||
g->add_msg("There's no space left in your %s.", i_at(t).tname().c_str());
|
||||
power_level += bionics["bio_evap"]->power_cost;
|
||||
} else if (!(cont->flags & con_wtight)) {
|
||||
g->add_msg("Your %s isn't watertight!", i_at(t).tname().c_str());
|
||||
power_level += bionics["bio_evap"]->power_cost;
|
||||
} else {
|
||||
g->add_msg("You pour water into your %s.", i_at(t).tname().c_str());
|
||||
i_at(t).put_in(item(g->itypes["water_clean"], 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(bio.id == "bio_lighter"){
|
||||
g->draw();
|
||||
mvprintw(0, 0, "Torch in which direction?");
|
||||
input = get_input();
|
||||
get_direction(dirx, diry, input);
|
||||
if (dirx == -2) {
|
||||
g->add_msg("Invalid direction.");
|
||||
power_level += bionics["bio_lighter"]->power_cost;
|
||||
return;
|
||||
if(!g->choose_adjacent("Start a fire", dirx, diry) ||
|
||||
(!g->m.add_field(g, dirx, diry, fd_fire, 1))){
|
||||
g->add_msg_if_player(this,"You can't light a fire there.");
|
||||
power_level += bionics["bio_lighter"]->power_cost;
|
||||
}
|
||||
dirx += posx;
|
||||
diry += posy;
|
||||
if (!g->m.add_field(g, dirx, diry, fd_fire, 1)) // Unsuccessful.
|
||||
g->add_msg("You can't light a fire there.");
|
||||
|
||||
} else if(bio.id == "bio_claws"){
|
||||
if (weapon.type->id == "bio_claws_weapon") {
|
||||
g->add_msg("You withdraw your claws.");
|
||||
weapon = ret_null;
|
||||
weapon = get_combat_style();
|
||||
} else if(weapon.type->id != "null"){
|
||||
g->add_msg("Your claws extend, forcing you to drop your %s.",
|
||||
weapon.tname().c_str());
|
||||
@@ -388,47 +387,38 @@ void player::activate_bionic(int b, game *g)
|
||||
g->plfire(false);
|
||||
weapon = tmp_item;
|
||||
} else if (bio.id == "bio_emp"){
|
||||
g->draw();
|
||||
mvprintw(0, 0, "Fire EMP in which direction?");
|
||||
input = get_input();
|
||||
get_direction(dirx, diry, input);
|
||||
if (dirx == -2) {
|
||||
g->add_msg("Invalid direction.");
|
||||
if(g->choose_adjacent("create an EMP", dirx, diry))
|
||||
g->emp_blast(dirx, diry);
|
||||
else{
|
||||
power_level += bionics["bio_emp"]->power_cost;
|
||||
return;
|
||||
}
|
||||
dirx += posx;
|
||||
diry += posy;
|
||||
g->emp_blast(dirx, diry);
|
||||
|
||||
} else if (bio.id == "bio_hydraulics"){
|
||||
g->add_msg("Your muscles hiss as hydraulic strength fills them!");
|
||||
} else if (bio.id == "bio_water_extractor"){
|
||||
bool extracted = false;
|
||||
for (int i = 0; i < g->m.i_at(posx, posy).size(); i++) {
|
||||
item tmp = g->m.i_at(posx, posy)[i];
|
||||
if (tmp.type->id == "corpse" && query_yn("Extract water from the %s",
|
||||
tmp.tname().c_str())) {
|
||||
i = g->m.i_at(posx, posy).size() + 1; // Loop is finished
|
||||
t = g->inv("Choose a container:");
|
||||
if (i_at(t).type == 0) {
|
||||
g->add_msg("You don't have that item!");
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
} else if (!i_at(t).is_container()) {
|
||||
g->add_msg("That %s isn't a container!", i_at(t).tname().c_str());
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
} else {
|
||||
it_container *cont = dynamic_cast<it_container*>(i_at(t).type);
|
||||
if (i_at(t).volume_contained() + 1 > cont->contains) {
|
||||
g->add_msg("There's no space left in your %s.", i_at(t).tname().c_str());
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
} else {
|
||||
g->add_msg("You pour water into your %s.", i_at(t).tname().c_str());
|
||||
i_at(t).put_in(item(g->itypes["water"], 0));
|
||||
}
|
||||
item water = item(g->itypes["water_clean"], 0);
|
||||
if (g->handle_liquid(water, true, true))
|
||||
{
|
||||
moves -= 100;
|
||||
}
|
||||
else if (query_yn("Drink directly from the condensor?"))
|
||||
{
|
||||
inv.push_back(water);
|
||||
water = inv.item_by_type(water.typeId());
|
||||
eat(g, water.invlet);
|
||||
moves -= 350;
|
||||
}
|
||||
extracted = true;
|
||||
break;
|
||||
}
|
||||
if (i == g->m.i_at(posx, posy).size() - 1) // We never chose a corpse
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
}
|
||||
if (!extracted)
|
||||
power_level += bionics["bio_water_extractor"]->power_cost;
|
||||
} else if(bio.id == "bio_magnet"){
|
||||
for (int i = posx - 10; i <= posx + 10; i++) {
|
||||
for (int j = posy - 10; j <= posy + 10; j++) {
|
||||
@@ -440,7 +430,7 @@ void player::activate_bionic(int b, game *g)
|
||||
}
|
||||
traj.insert(traj.begin(), point(i, j));
|
||||
for (int k = 0; k < g->m.i_at(i, j).size(); k++) {
|
||||
if (g->m.i_at(i, j)[k].made_of(IRON) || g->m.i_at(i, j)[k].made_of(STEEL)){
|
||||
if (g->m.i_at(i, j)[k].made_of("iron") || g->m.i_at(i, j)[k].made_of("steel")){
|
||||
tmp_item = g->m.i_at(i, j)[k];
|
||||
g->m.i_rem(i, j, k);
|
||||
for (l = 0; l < traj.size(); l++) {
|
||||
@@ -466,208 +456,81 @@ void player::activate_bionic(int b, game *g)
|
||||
}
|
||||
}
|
||||
} else if(bio.id == "bio_lockpick"){
|
||||
g->draw();
|
||||
mvprintw(0, 0, "Unlock in which direction?");
|
||||
input = get_input();
|
||||
get_direction(dirx, diry, input);
|
||||
if (dirx == -2) {
|
||||
g->add_msg("Invalid direction.");
|
||||
if(!g->choose_adjacent("Activate your bio lockpick", dirx, diry)){
|
||||
power_level += bionics["bio_lockpick"]->power_cost;
|
||||
return;
|
||||
}
|
||||
dirx += posx;
|
||||
diry += posy;
|
||||
if (g->m.ter(dirx, diry) == t_door_locked) {
|
||||
moves -= 40;
|
||||
g->add_msg("You unlock the door.");
|
||||
g->add_msg_if_player(this,"You unlock the door.");
|
||||
g->m.ter_set(dirx, diry, t_door_c);
|
||||
} else
|
||||
g->add_msg("You can't unlock that %s.", g->m.tername(dirx, diry).c_str());
|
||||
g->add_msg_if_player(this,"You can't unlock that %s.", g->m.tername(dirx, diry).c_str());
|
||||
} else if(bio.id == "bio_flashbang") {
|
||||
g->add_msg_if_player(this,"You activate your integrated flashbang generator!");
|
||||
g->flashbang(posx, posy, true);
|
||||
} else if(bio.id == "bio_shockwave") {
|
||||
g->shockwave(posx, posy, 3, 4, 2, 8, true);
|
||||
g->add_msg_if_player(this,"You unleash a powerful shockwave!");
|
||||
} else if(bio.id == "bio_chain_lightning"){
|
||||
tmp_item = weapon;
|
||||
weapon = item(g->itypes["bio_lightning"], 0);
|
||||
weapon.curammo = dynamic_cast<it_ammo*>(g->itypes["bio_lightning_ammo"]);
|
||||
weapon.charges = 10;
|
||||
g->refresh_all();
|
||||
g->plfire(false);
|
||||
weapon = tmp_item;
|
||||
}
|
||||
}
|
||||
|
||||
bool player::install_bionics(game *g, it_bionic* type)
|
||||
{
|
||||
|
||||
if (type == NULL) {
|
||||
debugmsg("Tried to install NULL bionic");
|
||||
return false;
|
||||
}
|
||||
if (has_bionic(type->id)){
|
||||
if (!(type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII")){
|
||||
popup("You have already installed this bionic.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::string bio_name = type->name.substr(5); // Strip off "CBM: "
|
||||
|
||||
WINDOW* w = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
|
||||
WINDOW* w_description = newwin(3, 78, 21 + getbegy(w), 1 + getbegx(w));
|
||||
|
||||
werase(w);
|
||||
wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
|
||||
|
||||
int pl_skill = int_cur +
|
||||
skillLevel("electronics") * 4 +
|
||||
skillLevel("firstaid") * 3 +
|
||||
skillLevel("mechanics") * 2;
|
||||
|
||||
int skint = int(pl_skill / 4);
|
||||
int skdec = int((pl_skill * 10) / 4) % 10;
|
||||
|
||||
// Header text
|
||||
mvwprintz(w, 1, 1, c_white, "Installing bionics:");
|
||||
mvwprintz(w, 1, 21, type->color, bio_name.c_str());
|
||||
|
||||
// Dividing bars
|
||||
for (int i = 1; i < 79; i++) {
|
||||
mvwputch(w, 2, i, c_ltgray, LINE_OXOX);
|
||||
mvwputch(w, 20, i, c_ltgray, LINE_OXOX);
|
||||
}
|
||||
|
||||
mvwputch(w, 2, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(w, 2, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
mvwputch(w, 20, 0, c_ltgray, LINE_XXXO); // |-
|
||||
mvwputch(w, 20, 79, c_ltgray, LINE_XOXX); // -|
|
||||
|
||||
// Init the list of bionics
|
||||
for (int i = 1; i < type->options.size(); i++) {
|
||||
bionic_id bio_id = type->options[i];
|
||||
mvwprintz(w, i + 3, 1, (has_bionic(bio_id) ? c_ltred : c_ltblue),
|
||||
bionics[bio_id]->name.c_str());
|
||||
}
|
||||
// Helper text
|
||||
mvwprintz(w, 3, 39, c_white, "Difficulty of this module: %d",
|
||||
type->difficulty);
|
||||
mvwprintz(w, 4, 39, c_white, "Your installation skill: %d.%d",
|
||||
skint, skdec);
|
||||
mvwprintz(w, 5, 39, c_white, "Installation requires high intelligence,");
|
||||
mvwprintz(w, 6, 39, c_white, "and skill in electronics, first aid, and");
|
||||
mvwprintz(w, 7, 39, c_white, "mechanics (in that order of importance).");
|
||||
|
||||
int chance_of_success = int((100 * pl_skill) /
|
||||
(pl_skill + 4 * type->difficulty));
|
||||
|
||||
mvwprintz(w, 9, 39, c_white, "Chance of success:");
|
||||
|
||||
nc_color col_suc;
|
||||
if (chance_of_success >= 95)
|
||||
col_suc = c_green;
|
||||
else if (chance_of_success >= 80)
|
||||
col_suc = c_ltgreen;
|
||||
else if (chance_of_success >= 60)
|
||||
col_suc = c_yellow;
|
||||
else if (chance_of_success >= 35)
|
||||
col_suc = c_ltred;
|
||||
else
|
||||
col_suc = c_red;
|
||||
|
||||
mvwprintz(w, 9, 59, col_suc, "%d%%%%", chance_of_success);
|
||||
|
||||
mvwprintz(w, 11, 39, c_white, "Failure may result in crippling damage,");
|
||||
mvwprintz(w, 12, 39, c_white, "loss of existing bionics, genetic damage");
|
||||
mvwprintz(w, 13, 39, c_white, "or faulty installation.");
|
||||
wrefresh(w);
|
||||
|
||||
if (type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII") { // No selection list; just confirm
|
||||
int pow_up = BATTERY_AMOUNT;
|
||||
|
||||
if (!query_yn("WARNING: %i percent chance of genetic damage, blood loss, or damage to existing bionics! Install anyway?", 100 - chance_of_success))
|
||||
return false;
|
||||
int pow_up = 0;
|
||||
if (type->id == "bio_power_storage" || type->id == "bio_power_storage_mkII") {
|
||||
pow_up = BATTERY_AMOUNT;
|
||||
if (type->id == "bio_power_storage_mkII") {
|
||||
pow_up = 10;
|
||||
}
|
||||
|
||||
mvwprintz(w, 3, 1, h_ltblue, "Power Storage +%d", pow_up);
|
||||
mvwprintz(w_description, 0, 0, c_ltblue, "\
|
||||
Installing this bionic will increase your total power storage by %d.\n\
|
||||
Power is necessary for most bionics to function. You also require a\n\
|
||||
charge mechanism, which must be installed from another CBM.", pow_up);
|
||||
|
||||
InputEvent input;
|
||||
wrefresh(w_description);
|
||||
wrefresh(w);
|
||||
do
|
||||
input = get_input();
|
||||
while (input != Confirm && input != Cancel);
|
||||
if (input == Confirm) {
|
||||
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
|
||||
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
|
||||
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
|
||||
int success = chance_of_success - rng(1, 100);
|
||||
if (success > 0) {
|
||||
g->add_msg("Successfully installed batteries.");
|
||||
max_power_level += pow_up;
|
||||
} else
|
||||
bionics_install_failure(g, this, success);
|
||||
werase(w);
|
||||
delwin(w);
|
||||
g->refresh_all();
|
||||
return true;
|
||||
}
|
||||
werase(w);
|
||||
delwin(w);
|
||||
g->refresh_all();
|
||||
return false;
|
||||
}
|
||||
|
||||
int selection = 0;
|
||||
InputEvent input;
|
||||
|
||||
do {
|
||||
|
||||
bionic_id bio_id = type->options[selection];
|
||||
mvwprintz(w, 3 + selection, 1, (has_bionic(bio_id) ? h_ltred : h_ltblue),
|
||||
bionics[bio_id]->name.c_str());
|
||||
|
||||
// Clear the bottom three lines...
|
||||
werase(w_description);
|
||||
// ...and then fill them with the description of the selected bionic
|
||||
mvwprintz(w_description, 0, 0, c_ltblue, bionics[bio_id]->description.c_str());
|
||||
|
||||
wrefresh(w_description);
|
||||
wrefresh(w);
|
||||
input = get_input();
|
||||
switch (input) {
|
||||
|
||||
case DirectionS:
|
||||
mvwprintz(w, 2 + selection, 0, (has_bionic(bio_id) ? c_ltred : c_ltblue),
|
||||
bionics[bio_id]->name.c_str());
|
||||
if (selection == type->options.size() - 1)
|
||||
selection = 0;
|
||||
else
|
||||
selection++;
|
||||
break;
|
||||
|
||||
case DirectionN:
|
||||
mvwprintz(w, 2 + selection, 0, (has_bionic(bio_id) ? c_ltred : c_ltblue),
|
||||
bionics[bio_id]->name.c_str());
|
||||
if (selection == 0)
|
||||
selection = type->options.size() - 1;
|
||||
else
|
||||
selection--;
|
||||
break;
|
||||
|
||||
}
|
||||
if (input == Confirm && has_bionic(bio_id)) {
|
||||
popup("You already have a %s!", bionics[bio_id]->name.c_str());
|
||||
input = Nothing;
|
||||
}
|
||||
} while (input != Cancel && input != Confirm);
|
||||
|
||||
if (input == Confirm) {
|
||||
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
|
||||
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
|
||||
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
|
||||
bionic_id bio_id = type->options[selection];
|
||||
int success = chance_of_success - rng(1, 100);
|
||||
if (success > 0) {
|
||||
g->add_msg("Successfully installed %s.", bionics[bio_id]->name.c_str());
|
||||
add_bionic(bio_id);
|
||||
} else
|
||||
bionics_install_failure(g, this, success);
|
||||
werase(w);
|
||||
delwin(w);
|
||||
g->refresh_all();
|
||||
return true;
|
||||
}
|
||||
werase(w);
|
||||
delwin(w);
|
||||
practice(g->turn, "electronics", (100 - chance_of_success) * 1.5);
|
||||
practice(g->turn, "firstaid", (100 - chance_of_success) * 1.0);
|
||||
practice(g->turn, "mechanics", (100 - chance_of_success) * 0.5);
|
||||
int success = chance_of_success - rng(1, 100);
|
||||
if (success > 0) {
|
||||
if (pow_up) {
|
||||
max_power_level += pow_up;
|
||||
g->add_msg_if_player(this, "Increased storage capacity by %i", pow_up);
|
||||
} else{
|
||||
g->add_msg("Successfully installed %s.", bionics[type->id]->name.c_str());
|
||||
add_bionic(type->id);
|
||||
}
|
||||
} else
|
||||
bionics_install_failure(g, this, success);
|
||||
g->refresh_all();
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void bionics_install_failure(game *g, player *u, int success)
|
||||
@@ -757,264 +620,50 @@ void bionics_install_failure(game *g, player *u, int success)
|
||||
|
||||
}
|
||||
|
||||
void game::init_bionics(){
|
||||
bionics["bio_null"] = new bionic_data("NULL bionics", false, false, 0, 0, "\
|
||||
If you're seeing this, it's a bug. (game::init_bionics)");
|
||||
// NAME ,PW_SRC, ACT ,COST, TIME,
|
||||
bionics["bio_batteries"] = new bionic_data("Battery System", true, false, 0, 0, "\
|
||||
You have a battery draining attachment, and thus can make use of the energy\n\
|
||||
contained in normal, everyday batteries. Use 'E' to consume batteries.");
|
||||
power_source_bionics.push_back("bio_batteries");
|
||||
bionics["bio_metabolics"] = new bionic_data("Metabolic Interchange", true, false, 0, 0, "\
|
||||
Your digestive system and power supply are interconnected. Any drain on\n\
|
||||
energy instead increases your hunger.");
|
||||
power_source_bionics.push_back("bio_metabolics");
|
||||
bionics["bio_solar"] = new bionic_data("Solar Panels", true, false, 0, 0, "\
|
||||
You have a few solar panels installed. While in direct sunlight, your power\n\
|
||||
level will slowly recharge.");
|
||||
power_source_bionics.push_back("bio_solar");
|
||||
bionics["bio_torsionratchet"] = new bionic_data("Joint Torsion Ratchet", true, false, 0, 0, "\
|
||||
Your joints have been equipped with torsion ratchets that generate power slowly\n\
|
||||
when you move.");
|
||||
power_source_bionics.push_back("bio_torsionratchet");
|
||||
bionics["bio_furnace"] = new bionic_data("Internal Furnace", true, false, 0, 0, "\
|
||||
You can burn nearly any organic material as fuel (use 'E'), recharging your\n\
|
||||
power level. Some materials will burn better than others.");
|
||||
power_source_bionics.push_back("bio_furnace");
|
||||
bionics["bio_ethanol"] = new bionic_data("Ethanol Burner", true, false, 0, 0, "\
|
||||
You burn alcohol as fuel in an extremely efficient reaction. However, you\n\
|
||||
will still suffer the inebriating effects of the substance.");
|
||||
power_source_bionics.push_back("bio_ethanol");
|
||||
bionics["bio_memory"] = new bionic_data("Enhanced Memory Banks", false, false, 1, 0, "\
|
||||
Your memory has been enhanced with small quantum storage drives. Any time\n\
|
||||
you start to forget a skill, you have a chance at retaining all knowledge, at\n\
|
||||
the cost of a small amount of poweron.");
|
||||
unpowered_bionics.push_back("bio_memory");
|
||||
bionics["bio_ears"] = new bionic_data("Enhanced Hearing", false, false, 0, 0, "\
|
||||
Your hearing has been drastically improved, allowing you to hear ten times\n\
|
||||
better than the average person. Additionally, high-intensity sounds will be\n\
|
||||
automatically dampened before they can damage your hearing.");
|
||||
unpowered_bionics.push_back("bio_ears");
|
||||
void game::init_bionics()
|
||||
{
|
||||
catajson bionics_file("data/raw/bionics.json");
|
||||
|
||||
bionics["bio_eye_enhancer"] = new bionic_data("Diamond Cornea", false, false, 0, 0, "\
|
||||
Your vision is greatly enhanced, giving you a +2 bonus to perception.");
|
||||
unpowered_bionics.push_back("bio_eye_enhancer");
|
||||
bionics["bio_membrane"] = new bionic_data("Nictating Membrane", false, false, 0, 0, "\
|
||||
Your eyes have a thin membrane that closes over your eyes while underwater,\n\
|
||||
negating any vision penalties.");
|
||||
unpowered_bionics.push_back("bio_membrane");
|
||||
bionics["bio_targeting"] = new bionic_data("Targeting System", false, false, 0, 0, "\
|
||||
Your eyes are equipped with range finders, and their movement is synced with\n\
|
||||
that of your arms, to a degree. Shots you fire will be much more accurate,\n\
|
||||
particularly at long range.");
|
||||
unpowered_bionics.push_back("bio_targeting");
|
||||
bionics["bio_gills"] = new bionic_data("Membrane Oxygenator", false, false, 1, 0, "\
|
||||
An oxygen interchange system automatically switches on while underwater,\n\
|
||||
slowly draining your energy reserves but providing oxygen.");
|
||||
unpowered_bionics.push_back("bio_gills");
|
||||
bionics["bio_purifier"] = new bionic_data("Air Filtration System", false, false, 1, 0, "\
|
||||
Implanted in your trachea is an advanced filtration system. If toxins find\n\
|
||||
their way into your windpipe, the filter will attempt to remove them.");
|
||||
unpowered_bionics.push_back("bio_purifier");
|
||||
bionics["bio_climate"] = new bionic_data("Internal Climate Control", false, true, 1, 30, "\
|
||||
Throughout your body lies a network of thermal piping which eases the effects\n\
|
||||
of high and low ambient temperatures.");
|
||||
unpowered_bionics.push_back("bio_climate");
|
||||
for(bionics_file.set_begin(); bionics_file.has_curr(); bionics_file.next())
|
||||
{
|
||||
catajson bio = bionics_file.curr();
|
||||
|
||||
bionics["bio_storage"] = new bionic_data("Internal Storage", false, false, 0, 0, "\
|
||||
Space inside your chest cavity has been converted into a storage area. You\n\
|
||||
may carry an extra 8 units of volume.");
|
||||
unpowered_bionics.push_back("bio_storage");
|
||||
bionics["bio_recycler"] = new bionic_data("Recycler Unit", false, false, 0, 0, "\
|
||||
Your digestive system has been outfitted with a series of filters and\n\
|
||||
processors, allowing you to reclaim waste liquid and, to a lesser degree,\n\
|
||||
nutrients. The net effect is a greatly reduced need to eat and drink.");
|
||||
unpowered_bionics.push_back("bio_recycler");
|
||||
bionics["bio_digestion"] = new bionic_data("Expanded Digestive System", false, false, 0, 0, "\
|
||||
You have been outfitted with three synthetic stomachs and industrial-grade\n\
|
||||
intestines. Not only can you extract much more nutrition from food, but you\n\
|
||||
are highly resistant to foodborne illness, and can sometimes eat rotten food.");
|
||||
unpowered_bionics.push_back("bio_digestion");
|
||||
bionics["bio_tools"] = new bionic_data("Integrated Toolset", false, false, 0, 0, "\
|
||||
Implanted in your hands and fingers is a complete tool set - screwdriver,\n\
|
||||
hammer, wrench, and heating elements. You can use this in place of many\n\
|
||||
tools when crafting.");
|
||||
unpowered_bionics.push_back("bio_tools");
|
||||
bionics["bio_shock"] = new bionic_data("Electroshock Unit", false, false, 1, 0, "\
|
||||
While fighting unarmed, or with a weapon that conducts electricity, there is\n\
|
||||
a chance that a successful hit will shock your opponent, inflicting extra\n\
|
||||
damage and disabling them temporarily at the cost of some energy.");
|
||||
unpowered_bionics.push_back("bio_shock");
|
||||
bionics["bio_heat_absorb"] = new bionic_data("Heat Drain", false, false, 1, 0, "\
|
||||
While fighting unarmed against a warm-blooded opponent, there is a chance\n\
|
||||
that a successful hit will drain body heat, inflicting a small amount of\n\
|
||||
extra damage, and increasing your power reserves slightly.");
|
||||
unpowered_bionics.push_back("bio_heat_absorb");
|
||||
bionics["bio_carbon"] = new bionic_data("Subdermal Carbon Filament", false, false, 0, 0, "\
|
||||
Lying just beneath your skin is a thin armor made of carbon nanotubes. This\n\
|
||||
reduces bashing damage by 2 and cutting damage by 4.");
|
||||
unpowered_bionics.push_back("bio_carbon");
|
||||
bionics["bio_armor_head"] = new bionic_data("Alloy Plating - Head", false, false, 0, 0, "\
|
||||
The flesh on your head has been replaced by a strong armor, protecting both\n\
|
||||
your head and jaw regions.");
|
||||
unpowered_bionics.push_back("bio_armor_head");
|
||||
bionics["bio_armor_torso"] = new bionic_data("Alloy Plating - Torso", false, false, 0, 0, "\
|
||||
The flesh on your torso has been replaced by a strong armor, protecting you\n\
|
||||
greatly.");
|
||||
unpowered_bionics.push_back("bio_armor_torso");
|
||||
bionics["bio_armor_arms"] = new bionic_data("Alloy Plating - Arms", false, false, 0, 0, "\
|
||||
The flesh on your arms has been replaced by a strong armor, protecting you\n\
|
||||
greatly.");
|
||||
unpowered_bionics.push_back("bio_armor_arms");
|
||||
bionics["bio_armor_legs"] = new bionic_data("Alloy Plating - Legs", false, false, 0, 0, "\
|
||||
The flesh on your legs has been replaced by a strong armor, protecting you\n\
|
||||
greatly.");
|
||||
unpowered_bionics.push_back("bio_armor_legs");
|
||||
std::set<std::string> tags;
|
||||
|
||||
bionics["bio_flashlight"] = new bionic_data("Cranial Flashlight", false, true, 1, 30, "\
|
||||
Mounted between your eyes is a small but powerful LED flashlight.");
|
||||
bionics["bio_night_vision"] = new bionic_data("Implanted Night Vision", false, true, 1, 20, "\
|
||||
Your eyes have been modified to amplify existing light, allowing you to see\n\
|
||||
in the dark.");
|
||||
bionics["bio_infrared"] = new bionic_data("Infrared Vision", false, true, 1, 4, "\
|
||||
Your range of vision extends into the infrared, allowing you to see warm-\n\
|
||||
blooded creatures in the dark, and even through walls.");
|
||||
bionics["bio_face_mask"] = new bionic_data("Facial Distortion", false, true, 1, 10, "\
|
||||
Your face is actually made of a compound which may be molded by electrical\n\
|
||||
impulses, making you impossible to recognize. While not powered, however,\n\
|
||||
the compound reverts to its default shape.");
|
||||
bionics["bio_ads"] = new bionic_data("Active Defense System", false, true, 1, 7, "\
|
||||
A thin forcefield surrounds your body, continually draining power. Anything\n\
|
||||
attempting to penetrate this field has a chance of being deflected at the\n\
|
||||
cost of more energy. Melee attacks will be stopped more often than bullets.");
|
||||
bionics["bio_ods"] = new bionic_data("Offensive Defense System", false, true, 1, 6, "\
|
||||
A thin forcefield surrounds your body, continually draining power. This\n\
|
||||
field does not deflect penetration, but rather delivers a very strong shock,\n\
|
||||
damaging unarmed attackers and those with a conductive weapon.");
|
||||
bionics["bio_scent_mask"] = new bionic_data("Olfactory Mask", false, true, 1, 8, "\
|
||||
While this system is powered, your body will produce very little odor, making\n\
|
||||
it nearly impossible for creatures to track you by scent.");
|
||||
if(bio.has("flags"))
|
||||
{
|
||||
tags = bio.get("flags").as_tags();
|
||||
}
|
||||
|
||||
bionics["bio_scent_vision"] = new bionic_data("Scent Vision", false, true, 1, 30, "\
|
||||
While this system is powered, you're able to visually sense your own scent,\n\
|
||||
making it possible for you to recognize your surroundings even if you can't\n\
|
||||
see it.");
|
||||
bionics["bio_cloak"] = new bionic_data("Cloaking System", false, true, 2, 1, "\
|
||||
This high-power system uses a set of cameras and LEDs to make you blend into\n\
|
||||
your background, rendering you fully invisible to normal vision. However,\n\
|
||||
you may be detected by infrared, sonar, etc.");
|
||||
bionics["bio_painkiller"] = new bionic_data("Sensory Dulling", false, true, 2, 0, "\
|
||||
Your nervous system is wired to allow you to inhibit the signals of pain,\n\
|
||||
allowing you to dull your senses at will. However, the use of this system\n\
|
||||
may cause delayed reaction time and drowsiness.");
|
||||
bionics["bio_nanobots"] = new bionic_data("Repair Nanobots", false, true, 5, 0, "\
|
||||
Inside your body is a fleet of tiny dormant robots. Once charged from your\n\
|
||||
energy banks, they will flit about your body, repairing any damage.");
|
||||
bionics["bio_heatsink"] = new bionic_data("Thermal Dissapation", false, true, 1, 6, "\
|
||||
Powerful heatsinks supermaterials are woven into your flesh. While powered,\n\
|
||||
this system will prevent heat damage up to 2000 degrees fahrenheit. Note\n\
|
||||
that this does not affect your internal temperature.");
|
||||
bionics["bio_resonator"] = new bionic_data("Sonic Resonator", false, true, 4, 0, "\
|
||||
Your entire body may resonate at very high power, creating a short-range\n\
|
||||
shockwave. While it will not to much damage to flexible creatures, stiff\n\
|
||||
items such as walls, doors, and even robots will be severely damaged.");
|
||||
// set up all the bionic parameters
|
||||
std::string id = bio.get("id").as_string();
|
||||
std::string name = bio.get("name").as_string();
|
||||
int cost = bio.get("cost").as_int();
|
||||
int time = bio.get("time").as_int();
|
||||
std::string description = bio.get("description").as_string();
|
||||
bool faulty = (tags.find("FAULTY") != tags.end());
|
||||
bool powersource = (tags.find("POWER") != tags.end());
|
||||
bool active = (tags.find("ACTIVE") != tags.end());
|
||||
|
||||
bionics["bio_time_freeze"] = new bionic_data("Time Dilation", false, true, 3, 0, "\
|
||||
At an immense cost of power, you may increase your body speed and reactions\n\
|
||||
dramatically, essentially freezing time. You are still delicate, however,\n\
|
||||
and violent or rapid movements may damage you due to friction.");
|
||||
bionics["bio_teleport"] = new bionic_data("Teleportation Unit", false, true, 10, 0, "\
|
||||
This highly experimental unit folds space over short distances, instantly\n\
|
||||
transporting your body up to 25 feet at the cost of much power. Note that\n\
|
||||
prolonged or frequent use may have dangerous side effects.");
|
||||
bionics["bio_blood_anal"] = new bionic_data("Blood Analysis", false, true, 1, 0, "\
|
||||
Small sensors have been implanted in your heart, allowing you to analyse your\n\
|
||||
blood. This will detect many illnesses, drugs, and other conditions.");
|
||||
bionics["bio_blood_filter"] = new bionic_data("Blood Filter", false, true, 3, 0, "\
|
||||
A filtration system in your heart allows you to actively filter out chemical\n\
|
||||
impurities, primarily drugs. It will have limited impact on viruses. Note\n\
|
||||
that it is not a targeted filter; ALL drugs in your system will be affected.");
|
||||
bionics["bio_alarm"] = new bionic_data("Alarm System", false, true, 1, 400, "\
|
||||
A motion-detecting alarm system will notice almost all movement within a\n\
|
||||
fifteen-foot radius, and will silently alert you. This is very useful during\n\
|
||||
sleep, or if you suspect a cloaked pursuer.");
|
||||
bionics["bio_evap"] = new bionic_data("Aero-Evaporator", false, true, 8, 0, "\
|
||||
This unit draws moisture from the surrounding air, which then is poured from\n\
|
||||
a fingertip in the form of water. It may fail in very dry environments.");
|
||||
bionics["bio_lighter"] = new bionic_data("Mini-Flamethrower", false, true, 3, 0, "\
|
||||
The index fingers of both hands have powerful fire starters which extend from\n\
|
||||
the tip.");
|
||||
bionics["bio_claws"] = new bionic_data("Adamantium Claws", false, true, 3, 0, "\
|
||||
Your fingers can withdraw into your hands, allowing a set of vicious claws to\n\
|
||||
extend. These do considerable cutting damage, but prevent you from holding\n\
|
||||
anything else.");
|
||||
bionics[id] = new bionic_data(name, powersource, active, cost, time, description, faulty);
|
||||
|
||||
bionics["bio_blaster"] = new bionic_data("Fusion Blaster Arm", false, true, 2, 0, "\
|
||||
Your left arm has been replaced by a heavy-duty fusion blaster! You may use\n\
|
||||
your energy banks to fire a damaging heat ray; however, you are unable to use\n\
|
||||
or carry two-handed items, and may only fire handguns.");
|
||||
bionics["bio_laser"] = new bionic_data("Finger-Mounted Laser", false, true, 2, 0, "\
|
||||
One of your fingers has a small high-powered laser embedded in it. This long\n\
|
||||
range weapon is not incredibly damaging, but is very accurate, and has the\n\
|
||||
potential to start fires.");
|
||||
bionics["bio_emp"] = new bionic_data("Directional EMP", false, true, 4, 0, "\
|
||||
Mounted in the palms of your hand are small parabolic EMP field generators.\n\
|
||||
You may use power to fire a short-ranged blast which will disable electronics\n\
|
||||
and robots.");
|
||||
bionics["bio_hydraulics"] = new bionic_data("Hydraulic Muscles", false, true, 1, 3, "\
|
||||
While activated, the muscles in your arms will be greatly enchanced,\n\
|
||||
increasing your strength by 20.");
|
||||
bionics["bio_water_extractor"] = new bionic_data("Water Extraction Unit", false, true, 2, 0, "\
|
||||
Nanotubes embedded in the palm of your hand will pump any available fluid out\n\
|
||||
of a dead body, cleanse it of impurities and convert it into drinkable water.\n\
|
||||
You must, however, have a container to store the water in.");
|
||||
bionics["bio_magnet"] = new bionic_data("Electromagnetic Unit", false, true, 2, 0, "\
|
||||
Embedded in your hand is a powerful electromagnet, allowing you to pull items\n\
|
||||
made of iron over short distances.");
|
||||
bionics["bio_fingerhack"] = new bionic_data("Fingerhack", false, true, 1, 0, "\
|
||||
One of your fingers has an electrohack embedded in it; an all-purpose hacking\n\
|
||||
unit used to override control panels and the like (but not computers). Skill\n\
|
||||
in computers is important, and a failed use may damage your circuits.");
|
||||
bionics["bio_lockpick"] = new bionic_data("Fingerpick", false, true, 1, 0, "\
|
||||
One of your fingers has an electronic lockpick embedded in it. This auto-\n\
|
||||
matic system will quickly unlock all but the most advanced key locks without\n\
|
||||
any skill required on the part of the user.");
|
||||
// Don't add bio_null to any vectors.
|
||||
if(id != "bio_null")
|
||||
{
|
||||
if(faulty)
|
||||
{
|
||||
faulty_bionics.push_back(id);
|
||||
}
|
||||
else if(powersource)
|
||||
{
|
||||
power_source_bionics.push_back(id);
|
||||
}
|
||||
else if(!active)
|
||||
{
|
||||
unpowered_bionics.push_back(id);
|
||||
}
|
||||
}
|
||||
|
||||
bionics["bio_ground_sonar"] = new bionic_data("Terranian Sonar", false, true, 1, 5, "\
|
||||
Your feet are equipped with precision sonar equipment, allowing you to detect\n\
|
||||
the movements of creatures below the ground.");
|
||||
|
||||
bionics["bio_power_armor_interface"] = new bionic_data("Power Armor Interface", false, true, 1, 10, "\
|
||||
Interfaces your power system with the internal charging port on suits of power armor.");
|
||||
|
||||
//Fault Bionics from here on out.
|
||||
bionics["bio_dis_shock"] = new bionic_data("Electrical Discharge", false, false, 0, 0, "\
|
||||
A malfunctioning bionic which occasionally discharges electricity through\n\
|
||||
your body, causing pain and brief paralysis but no damage.");
|
||||
faulty_bionics.push_back("bio_dis_shock");
|
||||
|
||||
bionics["bio_dis_acid"] = new bionic_data("Acidic Discharge", false, false, 0, 0, "\
|
||||
A malfunctioning bionic which occasionally discharges acid into your muscles,\n\
|
||||
causing sharp pain and minor damage.");
|
||||
faulty_bionics.push_back("bio_dis_shock");
|
||||
|
||||
bionics["bio_drain"] = new bionic_data("Electrical Drain", false, false, 0, 0, "\
|
||||
A malfunctioning bionic. It doesn't perform any useful function, but will\n\
|
||||
occasionally draw power from your batteries.");
|
||||
faulty_bionics.push_back("bio_drain");
|
||||
|
||||
bionics["bio_noise"] = new bionic_data("Noisemaker", false, false, 0, 0, "\
|
||||
A malfunctioning bionic. It will occasionally emit a loud burst of noise.");
|
||||
faulty_bionics.push_back("bio_noise");
|
||||
bionics["bio_power_weakness"] = new bionic_data("Power Overload", false, false, 0, 0, "\
|
||||
Damaged power circuits cause short-circuiting inside your muscles when your\n\
|
||||
batteries are above 75%%%% capacity, causing greatly reduced strength. This\n\
|
||||
has no effect if you have no internal batteries.");
|
||||
faulty_bionics.push_back("bio_power_weakness");
|
||||
|
||||
bionics["bio_stiff"] = new bionic_data("Wire-induced Stiffness", false, false, 0, 0, "\
|
||||
Improperly installed wires cause a physical stiffness in most of your body,\n\
|
||||
causing increased encumberance.");
|
||||
faulty_bionics.push_back("bio_stiff");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,388 @@
|
||||
#include "building_generation.h"
|
||||
#include "output.h"
|
||||
#include "item_factory.h"
|
||||
|
||||
mapgendata::mapgendata(oter_id north, oter_id east, oter_id south, oter_id west)
|
||||
{
|
||||
t_nesw[0] = north;
|
||||
t_nesw[1] = east;
|
||||
t_nesw[2] = south;
|
||||
t_nesw[3] = west;
|
||||
n_fac = 0;
|
||||
e_fac = 0;
|
||||
s_fac = 0;
|
||||
w_fac = 0;
|
||||
}
|
||||
|
||||
void mapgendata::set_dir(int dir_in, int val)
|
||||
{
|
||||
switch (dir_in)
|
||||
{
|
||||
case 0:
|
||||
n_fac = val;
|
||||
break;
|
||||
case 1:
|
||||
e_fac = val;
|
||||
break;
|
||||
case 2:
|
||||
s_fac = val;
|
||||
break;
|
||||
case 3:
|
||||
w_fac = val;
|
||||
break;
|
||||
default:
|
||||
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void mapgendata::fill(int val)
|
||||
{
|
||||
n_fac = val;
|
||||
e_fac = val;
|
||||
s_fac = val;
|
||||
w_fac = val;
|
||||
}
|
||||
|
||||
int& mapgendata::dir(int dir_in)
|
||||
{
|
||||
switch (dir_in)
|
||||
{
|
||||
case 0:
|
||||
return n_fac;
|
||||
break;
|
||||
case 1:
|
||||
return e_fac;
|
||||
break;
|
||||
case 2:
|
||||
return s_fac;
|
||||
break;
|
||||
case 3:
|
||||
return w_fac;
|
||||
break;
|
||||
default:
|
||||
debugmsg("Invalid direction for mapgendata::set_dir. dir_in = %d", dir_in);
|
||||
//return something just so the compiler doesn't freak out. Not really correct, though.
|
||||
return n_fac;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ter_id grass_or_dirt()
|
||||
{
|
||||
if (one_in(4))
|
||||
return t_grass;
|
||||
return t_dirt;
|
||||
}
|
||||
|
||||
ter_id dirt_or_pile()
|
||||
{
|
||||
if (one_in(4))
|
||||
return t_dirtmound;
|
||||
return t_dirt;
|
||||
}
|
||||
|
||||
// helper functions below
|
||||
|
||||
void mapgen_null(map *m)
|
||||
{
|
||||
debugmsg("Generating terrain for ot_null, please report this as a bug");
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, t_null);
|
||||
m->radiation(i, j) = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mapgen_crater(map *m, mapgendata dat)
|
||||
{
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
if(dat.t_nesw[i] != ot_crater)
|
||||
{
|
||||
dat.set_dir(i, 6);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
if (rng(0, dat.w_fac) <= i && rng(0, dat.e_fac) <= SEEX * 2 - 1 - i &&
|
||||
rng(0, dat.n_fac) <= j && rng(0, dat.s_fac) <= SEEX * 2 - 1 - j )
|
||||
{
|
||||
m->ter_set(i, j, t_rubble);
|
||||
m->radiation(i, j) = rng(0, 4) * rng(0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
m->radiation(i, j) = rng(0, 2) * rng(0, 2) * rng(0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
m->place_items("wreckage", 83, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, 0);
|
||||
}
|
||||
|
||||
void mapgen_field(map *m, int turn)
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, grass_or_dirt());
|
||||
if (one_in(120))
|
||||
{
|
||||
if (one_in(30))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_blueberry);
|
||||
}
|
||||
else
|
||||
if (one_in(30))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_strawberry);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_shrub);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (one_in(1000)) { m->furn_set(i,j, f_mutpoppy); }
|
||||
}
|
||||
}
|
||||
m->place_items("field", 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
|
||||
}
|
||||
|
||||
void mapgen_dirtlot(map *m, game *g)
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
if (one_in(120))
|
||||
{
|
||||
m->ter_set(i, j, t_pit_shallow);
|
||||
}
|
||||
else if (one_in(50))
|
||||
{
|
||||
m->ter_set(i,j, t_grass);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (one_in(4))
|
||||
{
|
||||
m->add_vehicle (g, veh_truck, 12, 12, 90, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn)
|
||||
{
|
||||
switch (terrain_type)
|
||||
{
|
||||
case ot_forest_thick:
|
||||
dat.fill(8);
|
||||
break;
|
||||
case ot_forest_water:
|
||||
dat.fill(4);
|
||||
break;
|
||||
case ot_forest:
|
||||
dat.fill(0);
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_water)
|
||||
{
|
||||
dat.dir(i) += 14;
|
||||
}
|
||||
else if (dat.t_nesw[i] == ot_forest_thick)
|
||||
{
|
||||
dat.dir(i) += 18;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEY * 2; j++)
|
||||
{
|
||||
int forest_chance = 0, num = 0;
|
||||
if (j < dat.n_fac)
|
||||
{
|
||||
forest_chance += dat.n_fac - j;
|
||||
num++;
|
||||
}
|
||||
if (SEEX * 2 - 1 - i < dat.e_fac)
|
||||
{
|
||||
forest_chance += dat.e_fac - (SEEX * 2 - 1 - i);
|
||||
num++;
|
||||
}
|
||||
if (SEEY * 2 - 1 - j < dat.s_fac)
|
||||
{
|
||||
forest_chance += dat.s_fac - (SEEY * 2 - 1 - j);
|
||||
num++;
|
||||
}
|
||||
if (i < dat.w_fac)
|
||||
{
|
||||
forest_chance += dat.w_fac - i;
|
||||
num++;
|
||||
}
|
||||
if (num > 0)
|
||||
{
|
||||
forest_chance /= num;
|
||||
}
|
||||
int rn = rng(0, forest_chance);
|
||||
if ((forest_chance > 0 && rn > 13) || one_in(100 - forest_chance))
|
||||
{
|
||||
if (one_in(250))
|
||||
{
|
||||
m->ter_set(i, j, t_tree_apple);
|
||||
m->spawn_item(i, j, "apple", turn);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_tree);
|
||||
}
|
||||
}
|
||||
else if ((forest_chance > 0 && rn > 10) || one_in(100 - forest_chance))
|
||||
{
|
||||
m->ter_set(i, j, t_tree_young);
|
||||
}
|
||||
else if ((forest_chance > 0 && rn > 9) || one_in(100 - forest_chance))
|
||||
{
|
||||
if (one_in(250))
|
||||
{
|
||||
m->ter_set(i, j, t_shrub_blueberry);
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_underbrush);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m->ter_set(i, j, t_dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
m->place_items("forest", 60, 0, 0, SEEX * 2 - 1, SEEY * 2 - 1, true, turn);
|
||||
|
||||
if (terrain_type == ot_forest_water)
|
||||
{
|
||||
// Reset *_fac to handle where to place water
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (dat.t_nesw[i] == ot_forest_water)
|
||||
{
|
||||
dat.set_dir(i, 2);
|
||||
}
|
||||
else if (dat.t_nesw[i] >= ot_river_center && dat.t_nesw[i] <= ot_river_nw)
|
||||
{
|
||||
dat.set_dir(i, 3);
|
||||
}
|
||||
else if (dat.t_nesw[i] == ot_forest || dat.t_nesw[i] == ot_forest_thick)
|
||||
{
|
||||
dat.set_dir(i, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
dat.set_dir(i, 0);
|
||||
}
|
||||
}
|
||||
int x = SEEX / 2 + rng(0, SEEX), y = SEEY / 2 + rng(0, SEEY);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
if (x >= 0 && x < SEEX * 2 && y >= 0 && y < SEEY * 2)
|
||||
{
|
||||
if (m->ter(x, y) == t_water_sh)
|
||||
{
|
||||
m->ter_set(x, y, t_water_dp);
|
||||
}
|
||||
else if (m->ter(x, y) == t_dirt || m->ter(x, y) == t_underbrush)
|
||||
{
|
||||
m->ter_set(x, y, t_water_sh);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 20;
|
||||
}
|
||||
x += rng(-2, 2);
|
||||
y += rng(-2, 2);
|
||||
if (x < 0 || x >= SEEX * 2)
|
||||
{
|
||||
x = SEEX / 2 + rng(0, SEEX);
|
||||
}
|
||||
if (y < 0 || y >= SEEY * 2)
|
||||
{
|
||||
y = SEEY / 2 + rng(0, SEEY);
|
||||
}
|
||||
for (int j = 0; j < dat.n_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX * 2 -1), wy = rng(0, SEEY - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.e_fac; j++)
|
||||
{
|
||||
int wx = rng(SEEX, SEEX * 2 - 1), wy = rng(0, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.s_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX * 2 - 1), wy = rng(SEEY, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < dat.w_fac; j++)
|
||||
{
|
||||
int wx = rng(0, SEEX - 1), wy = rng(0, SEEY * 2 - 1);
|
||||
if (m->ter(wx, wy) == t_dirt || m->ter(wx, wy) == t_underbrush)
|
||||
{
|
||||
m->ter_set(wx, wy, t_water_sh);
|
||||
}
|
||||
}
|
||||
}
|
||||
int rn = rng(0, 2) * rng(0, 1) * (rng(0, 1) + rng(0, 1));// Good chance of 0
|
||||
for (int i = 0; i < rn; i++)
|
||||
{
|
||||
x = rng(0, SEEX * 2 - 1);
|
||||
y = rng(0, SEEY * 2 - 1);
|
||||
m->add_trap(x, y, tr_sinkhole);
|
||||
if (m->ter(x, y) != t_water_sh)
|
||||
{
|
||||
m->ter_set(x, y, t_dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (one_in(10000)) { //1-2 per overmap, very bad day for low level characters
|
||||
m->add_spawn(mon_jabberwock, 1, SEEX, SEEY);
|
||||
}
|
||||
|
||||
|
||||
if (one_in(100)) // One in 100 forests has a spider living in it :o
|
||||
{
|
||||
for (int i = 0; i < SEEX * 2; i++)
|
||||
{
|
||||
for (int j = 0; j < SEEX * 2; j++)
|
||||
{
|
||||
if ((m->ter(i, j) == t_dirt || m->ter(i, j) == t_underbrush) && !one_in(3))
|
||||
{
|
||||
m->add_field(NULL, i, j, fd_web, rng(1, 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
m->add_spawn(mon_spider_web, rng(1, 2), SEEX, SEEY);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef _BUILDING_GENERATION_H_
|
||||
#define _BUILDING_GENERATION_H_
|
||||
|
||||
#include "omdata.h"
|
||||
#include "map.h"
|
||||
|
||||
struct mapgendata
|
||||
{
|
||||
public:
|
||||
oter_id t_nesw[4];
|
||||
int n_fac; // dir == 0
|
||||
int e_fac; // dir == 1
|
||||
int s_fac; // dir == 2
|
||||
int w_fac; // dir == 3
|
||||
|
||||
mapgendata(oter_id north, oter_id east, oter_id south, oter_id west);
|
||||
void set_dir(int dir_in, int val);
|
||||
void fill(int val);
|
||||
int& dir(int dir_in);
|
||||
};
|
||||
|
||||
ter_id grass_or_dirt();
|
||||
ter_id dirt_or_pile();
|
||||
|
||||
// helper functions for mapgen.cpp, so that we can avoid having a massive switch statement (sorta)
|
||||
void mapgen_null(map *m);
|
||||
void mapgen_crater(map *m, mapgendata dat);
|
||||
void mapgen_field(map *m, int turn);
|
||||
void mapgen_dirtlot(map *m, game *g);
|
||||
void mapgen_forest_general(map *m, oter_id terrain_type, mapgendata dat, int turn);
|
||||
|
||||
#endif
|
||||
@@ -198,6 +198,11 @@ void calendar::increment()
|
||||
standardize();
|
||||
}
|
||||
|
||||
int calendar::getHour()
|
||||
{
|
||||
return hour;
|
||||
}
|
||||
|
||||
void calendar::standardize()
|
||||
{
|
||||
if (second >= 60) {
|
||||
|
||||
+2
-3
@@ -3,9 +3,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
// How many minutes exist when the game starts - 8:00 AM
|
||||
#define STARTING_MINUTES 480
|
||||
|
||||
// Convert minutes, hours, days to turns
|
||||
#define MINUTES(x) ((x) * 10)
|
||||
#define HOURS(x) ((x) * 600)
|
||||
@@ -78,6 +75,8 @@ public:
|
||||
|
||||
void standardize(); // Ensure minutes <= 59, hour <= 23, etc.
|
||||
|
||||
int getHour(); // return hour
|
||||
|
||||
// Sunlight and day/night calcuations
|
||||
int minutes_past_midnight() const; // Useful for sunrise/set calculations
|
||||
moon_phase moon() const; // Find phase of moon
|
||||
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
#include "catacharset.h"
|
||||
#include <string.h>
|
||||
#include "wcwidth.c"
|
||||
|
||||
//copied from SDL2_ttf code
|
||||
unsigned UTF8_getch(const char **src, int *srclen)
|
||||
{
|
||||
const unsigned char *p = *(const unsigned char**)src;
|
||||
int left = 0;
|
||||
bool overlong = false;
|
||||
bool underflow = false;
|
||||
unsigned ch = UNKNOWN_UNICODE;
|
||||
|
||||
if (*srclen == 0) {
|
||||
return UNKNOWN_UNICODE;
|
||||
}
|
||||
if (p[0] >= 0xFC) {
|
||||
if ((p[0] & 0xFE) == 0xFC) {
|
||||
if (p[0] == 0xFC && (p[1] & 0xFC) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x01);
|
||||
left = 5;
|
||||
}
|
||||
} else if (p[0] >= 0xF8) {
|
||||
if ((p[0] & 0xFC) == 0xF8) {
|
||||
if (p[0] == 0xF8 && (p[1] & 0xF8) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x03);
|
||||
left = 4;
|
||||
}
|
||||
} else if (p[0] >= 0xF0) {
|
||||
if ((p[0] & 0xF8) == 0xF0) {
|
||||
if (p[0] == 0xF0 && (p[1] & 0xF0) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x07);
|
||||
left = 3;
|
||||
}
|
||||
} else if (p[0] >= 0xE0) {
|
||||
if ((p[0] & 0xF0) == 0xE0) {
|
||||
if (p[0] == 0xE0 && (p[1] & 0xE0) == 0x80) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x0F);
|
||||
left = 2;
|
||||
}
|
||||
} else if (p[0] >= 0xC0) {
|
||||
if ((p[0] & 0xE0) == 0xC0) {
|
||||
if ((p[0] & 0xDE) == 0xC0) {
|
||||
overlong = true;
|
||||
}
|
||||
ch = (unsigned) (p[0] & 0x1F);
|
||||
left = 1;
|
||||
}
|
||||
} else {
|
||||
if ((p[0] & 0x80) == 0x00) {
|
||||
ch = (unsigned) p[0];
|
||||
}
|
||||
}
|
||||
++*src;
|
||||
--*srclen;
|
||||
while (left > 0 && *srclen > 0) {
|
||||
++p;
|
||||
if ((p[0] & 0xC0) != 0x80) {
|
||||
ch = UNKNOWN_UNICODE;
|
||||
break;
|
||||
}
|
||||
ch <<= 6;
|
||||
ch |= (p[0] & 0x3F);
|
||||
++*src;
|
||||
--*srclen;
|
||||
--left;
|
||||
}
|
||||
if (left > 0) {
|
||||
underflow = true;
|
||||
}
|
||||
if (overlong || underflow ||
|
||||
(ch >= 0xD800 && ch <= 0xDFFF) ||
|
||||
(ch == 0xFFFE || ch == 0xFFFF) || ch > 0x10FFFF) {
|
||||
ch = UNKNOWN_UNICODE;
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
//Calculate width of a unicode string
|
||||
//Latin characters have a width of 1
|
||||
//CJK characters have a width of 2, etc
|
||||
int utf8_width(const char* s)
|
||||
{
|
||||
int len = strlen(s);
|
||||
const char* ptr = s;
|
||||
int w = 0;
|
||||
while(len>0)
|
||||
{
|
||||
unsigned ch = UTF8_getch(&ptr, &len);
|
||||
if(ch!=UNKNOWN_UNICODE) {
|
||||
w += mk_wcwidth((wchar_t)ch);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
//Convert cursor position to byte offset
|
||||
//returns the first character position in bytes behind the cursor position.
|
||||
//If the cursor is not on the first half of the character,
|
||||
//prevpos (which points to the first byte of the cursor located char)
|
||||
// should be a different value.
|
||||
int cursorx_to_position(const char* line, int cursorx, int* prevpos)
|
||||
{
|
||||
int dummy;
|
||||
int i=0, c=0, *p=prevpos?prevpos:&dummy;
|
||||
*p = 0;
|
||||
while(c<cursorx)
|
||||
{
|
||||
const char* utf8str = line+i;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(len<=0) len=1;
|
||||
i+=len;
|
||||
if(cw<=0) cw=1;
|
||||
c+=cw;
|
||||
if(c<=cursorx) *p = i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
//Erase character by unicode char width.
|
||||
//Fill the characters with spaces.
|
||||
//returns length modified
|
||||
int erease_utf8_by_cw( char* t, int cw, int clen, int maxlen)
|
||||
{
|
||||
static char buf[8000]; //LOL
|
||||
int c=0,i=0;
|
||||
while(c<cw)
|
||||
{
|
||||
const char* utf8str = t+i;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(len<=0) len=1;
|
||||
i+=len;
|
||||
if(cw<=0) cw=1;
|
||||
c+=cw;
|
||||
}
|
||||
if(cw==c && clen==i)
|
||||
{
|
||||
memset(t, ' ', clen);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int filled = clen+c-cw;
|
||||
memcpy(buf, t+i, maxlen-i);
|
||||
memset(t, ' ', filled);
|
||||
memcpy(t+filled, buf, maxlen-filled);
|
||||
return filled-i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//cut ut8 string by character size
|
||||
//utf8_substr("正正正正", 1, 4) returns
|
||||
// " 正 "
|
||||
// Broken characters will be filled with space
|
||||
std::string utf8_substr(std::string s, int start, int size)
|
||||
{
|
||||
static char buf[8000];
|
||||
int len = strlen(s.c_str());
|
||||
int pos;
|
||||
strcpy(buf, s.c_str());
|
||||
int begin = cursorx_to_position(buf, start, &pos);
|
||||
if(begin!=pos)
|
||||
{
|
||||
const char* ts = buf+pos;
|
||||
int l = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &l);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(buf+pos, tw, tw, len-pos-1);
|
||||
begin = pos+tw-1;
|
||||
}
|
||||
|
||||
if(size>0)
|
||||
{
|
||||
int end = cursorx_to_position(buf, start+size-1, &pos);
|
||||
if(end!=pos)
|
||||
{
|
||||
const char* ts = buf+pos;
|
||||
int l = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &l);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(buf+pos, tw, tw, len-pos-1);
|
||||
end = pos+tw-1;
|
||||
}
|
||||
buf[end+1] = '\0';
|
||||
}
|
||||
|
||||
return std::string(buf+start);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef CATACHARSET_H
|
||||
#define CATACHARSET_H
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
#define ANY_LENGTH 5
|
||||
#define UNKNOWN_UNICODE 0xFFFD
|
||||
|
||||
// get a unicode character from a utf8 string
|
||||
unsigned UTF8_getch(const char **src, int *srclen);
|
||||
// from wcwidth.c, return "cell" width of a unicode char
|
||||
int mk_wcwidth(wchar_t ucs);
|
||||
// convert cursorx value to byte position
|
||||
int cursorx_to_position(const char* line, int cursorx, int* prevppos=NULL);
|
||||
//erease for characters insertion
|
||||
int erease_utf8_by_cw( char* t, int cw, int len, int maxlen);
|
||||
int utf8_width(const char* s);
|
||||
std::string utf8_substr(std::string s, int start, int size=-1);
|
||||
#endif
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
DIR=`dirname "$0"`
|
||||
cd $DIR && ./cataclysm
|
||||
|
||||
+18
-7
@@ -1,9 +1,11 @@
|
||||
#ifndef __CATACURSE__
|
||||
#define __CATACURSE__
|
||||
#if (defined _WIN32 || defined WINDOWS)
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
//#define VC_EXTRALEAN
|
||||
#include <windows.h>
|
||||
#include "windows.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
typedef int chtype;
|
||||
typedef unsigned short attr_t;
|
||||
@@ -43,6 +45,7 @@ typedef struct
|
||||
typedef struct{
|
||||
bool touched;
|
||||
char *chars;
|
||||
int width_in_bytes;
|
||||
char *FG;
|
||||
char *BG;
|
||||
//cursechar chars [80];
|
||||
@@ -99,6 +102,7 @@ typedef struct {
|
||||
#define KEY_BACKSPACE 0x107 /* Backspace */ //<---------not used
|
||||
#define KEY_NPAGE 0x152 /* page down */
|
||||
#define KEY_PPAGE 0x153 /* page up */
|
||||
#define KEY_ENTER 0x157 /* enter */
|
||||
|
||||
/* Curses external declarations. */
|
||||
|
||||
@@ -116,7 +120,9 @@ int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl,
|
||||
int wrefresh(WINDOW *win);
|
||||
int refresh(void);
|
||||
int getch(void);
|
||||
int wgetch(WINDOW* win);
|
||||
int mvgetch(int y, int x);
|
||||
int mvwgetch(WINDOW* win, int y, int x);
|
||||
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
|
||||
int mvprintw(int y, int x, const char *fmt, ...);
|
||||
int werase(WINDOW *win);
|
||||
@@ -125,6 +131,7 @@ int init_pair(short pair, short f, short b);
|
||||
int wmove(WINDOW *win, int y, int x);
|
||||
int getnstr(char *str, int size);
|
||||
int clear(void);
|
||||
int clearok(WINDOW *win);
|
||||
int erase(void);
|
||||
int endwin(void);
|
||||
int mvwaddch(WINDOW *win, int y, int x, const chtype ch);
|
||||
@@ -150,10 +157,14 @@ void timeout(int delay);//PORTABILITY, DUMMY FUNCTION
|
||||
void set_escdelay(int delay);//PORTABILITY, DUMMY FUNCTION
|
||||
int echo(void);
|
||||
int noecho(void);
|
||||
//Window Functions, Do not call these outside of catacurse.cpp
|
||||
void WinDestroy();
|
||||
bool WinCreate(bool initgl);
|
||||
void CheckMessages();
|
||||
int FindWin(WINDOW *wnd);
|
||||
LRESULT CALLBACK ProcessMessages(HWND__ *hWnd,u_int32_t Msg,WPARAM wParam, LPARAM lParam);
|
||||
//non-curses functions, Do not call these in the main game code
|
||||
extern WINDOW* mainwin;
|
||||
extern pairs *colorpairs;
|
||||
WINDOW* curses_init();
|
||||
int curses_destroy();
|
||||
void curses_drawwindow(WINDOW* win);
|
||||
void curses_delay(int delay);
|
||||
void curses_timeout(int t);
|
||||
int curses_getch(WINDOW* win);
|
||||
int curses_start_color();
|
||||
#endif
|
||||
|
||||
@@ -91,6 +91,24 @@ double catajson::as_double() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::set<std::string> catajson::as_tags()
|
||||
{
|
||||
std::set<std::string> tags;
|
||||
if (is_array())
|
||||
{
|
||||
for (set_begin(); has_curr(); next())
|
||||
{
|
||||
tags.insert( curr().as_string() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We should have gotten a string, if not an array.
|
||||
tags.insert( as_string() );
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
catajson catajson::get(std::string key) const
|
||||
{
|
||||
if (val.is<picojson::object>())
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _CATAJSON_H_
|
||||
|
||||
#include "picojson.h"
|
||||
#include <set>
|
||||
|
||||
class catajson
|
||||
{
|
||||
@@ -16,6 +17,8 @@ public:
|
||||
int as_int() const;
|
||||
bool as_bool() const;
|
||||
double as_double() const;
|
||||
// accessor for not-so-simple type
|
||||
std::set<std::string> as_tags();
|
||||
// accessors in the case of array or object values
|
||||
catajson get(std::string key) const;
|
||||
catajson get(int index) const;
|
||||
|
||||
@@ -48,3 +48,66 @@ ADDITIONS
|
||||
unique among the set of such recipes), "decomp_learn" (the level (if any)
|
||||
when you can learn it from disassembly), "book_learn" (a list of books that
|
||||
teach the recipe, and the level they teach it at).
|
||||
|
||||
1.4 Adding/editing armour and how armour protection is calculated
|
||||
1) Edit armor.json and add your armor item near similar types.
|
||||
2) The fields are:
|
||||
"type" : "ARMOR", // this must be ARMOR
|
||||
"id" : "socks", // the identifier used by the game. Must be one continuous word, use underscores if necessary
|
||||
"name" : "socks", // the name appearing in the examine box. Can be more than one word separated by spaces
|
||||
"weight" : 1, // weight of armour
|
||||
"color" : "blue", // ascii character colour
|
||||
"covers" : ["FEET"], // where it covers. Possible options are TORSO, HEAD, EYES, MOUTH, ARMS, HANDS, LEGS, FEET
|
||||
"to_hit" : 0, // to-hit bonus if using it as a melee weapon (whatever for?)
|
||||
"storage" : 0, // how many volume storage slots it adds
|
||||
"symbol" : "[", // ascii character
|
||||
"description" : "Socks. Put 'em on your feet.", // description of armour
|
||||
"price" : 100, // price of armour, used when bartering with NPCs
|
||||
"material" : ["COTTON", "NULL"], // material types. See materials.json for possible options
|
||||
"volume" : 1, // volume occupied
|
||||
"cutting" : 0, // cutting damage caused by using it as a melee weapon
|
||||
"warmth" : 10, // how much warmth clothing provides
|
||||
"phase" : "solid", // what phase it is
|
||||
"enviromental_protection" : 0, // how much environmental protection it affords
|
||||
"rarity" : 70, // determines how often it spawns
|
||||
"encumberance" : 0, // base encumbrance (unfitted value)
|
||||
"bashing" : -5, // bashing damage caused by using it as a melee weapon
|
||||
"flags" : ["VARSIZE"] // used to indicate clothing type which can be fitted. Leave out the flags field entirely if clothing cannot be fitted
|
||||
"coverage" : 80, // what percentage of body part
|
||||
"material_thickness" : 1 // thickness of material, in millimetre units (approximately). Generally ranges between 1 - 5, more unusual armour types go up to 10 or more
|
||||
3) When the player is hit at a specific body part, armour coverage determines whether the armour is hit, or an uncovered part of the player is hit (roll 1d100 against coverage)
|
||||
4) If the above roll fails (ie roll value is above coverage), then the armour does not absorb any damage from the blow, neither does it become damaged
|
||||
5) If the above roll succeeds, the armour is hit, possibly absorbing some damage and possibly getting damaged in the process
|
||||
6) The above steps are repeated for each layer of armour on the body part
|
||||
7) Armour protects against bash and cut damage. These are determined by multiplying the armour thickness by the material bash/cut resistance factor respectively, given in materials.json
|
||||
8) If the armour is made from 2 materials types, then it takes a weighted average of the primary material (66%) and secondary material (33%).
|
||||
9) Materials resistance factors are given relative to PAPER as a material (this probably needs some fine-tuning for balance).
|
||||
|
||||
1.5 Adding a bionic
|
||||
1) Edit data/raw/bionics.json and add your bionic near similar types.
|
||||
|
||||
2) Add the required attributes
|
||||
|
||||
id : "bio_rocketlauncher" // Text string used as identifier in the code.
|
||||
name : "CBM: Rocket Launcher" // The bionic's name, as showed to the player.
|
||||
cost : 10 // How many PUs it costs to use the bionic.
|
||||
time : 0 // How long, when activated, between drawing cost. If 0, it draws power once.
|
||||
description : "It's a rocket launcher, inside your arm!!" // A brief description of the bionic, as showed to the player.
|
||||
|
||||
3) Add any otional attributes
|
||||
|
||||
flags : ["ACTIVE"] // Used to flag the bionic as a specific type.
|
||||
|
||||
Supported flags:
|
||||
|
||||
"ACTIVE" : The bionic can be manually activated and deactivated.
|
||||
"POWER" : The bionic provides a source of power.
|
||||
"FAULTY" : The bionic is an unwanted one, will typically have negative effects.
|
||||
|
||||
Flags can be combined like so: ["ACTIVE","POWER","FAULTY"] (Don't add all these at once)
|
||||
|
||||
4) If you want the bionic to be available in the gameworld as an item, add it to itypedef.cpp
|
||||
|
||||
BIO_SINGLE(id, rarity, price, color, difficulty)
|
||||
|
||||
See 1.1 for more information about adding items.
|
||||
@@ -18,7 +18,7 @@ Successful dodges negate the attack and impose a cumulative penalty on dodges wi
|
||||
Dodge Use Cases:
|
||||
An individual with no skill and nominal stats in ideal circumstances against a basic opponent should occasionally be able to dodge.
|
||||
|
||||
An individual with no skill and nominal stats in ideal corcumstances against a skilled opponent should rarely if ever be able to dodge.
|
||||
An individual with no skill and nominal stats in ideal circumstances against a skilled opponent should rarely if ever be able to dodge.
|
||||
|
||||
An individual with world-class dodging ability, in ideal circumstances against a basic opponent should have a negligible chance of failure.
|
||||
|
||||
|
||||
+113
-7
@@ -70,7 +70,9 @@ void computer::shutdown_terminal()
|
||||
void computer::use(game *g)
|
||||
{
|
||||
if (w_terminal == NULL)
|
||||
w_terminal = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
|
||||
w_terminal = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH,
|
||||
(TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0,
|
||||
(TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0);
|
||||
wborder(w_terminal, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );
|
||||
|
||||
@@ -274,7 +276,7 @@ void computer::activate_function(game *g, computer_action action)
|
||||
if (g->m.ter(x, y) == t_sewage_pump) {
|
||||
for (int x1 = x - 1; x1 <= x + 1; x1++) {
|
||||
for (int y1 = y - 1; y1 <= y + 1; y1++ ) {
|
||||
if (g->m.ter(x1, y1) == t_counter) {
|
||||
if (g->m.furn(x1, y1) == f_counter) {
|
||||
bool found_item = false;
|
||||
for (int i = 0; i < g->m.i_at(x1, y1).size(); i++) {
|
||||
item *it = &(g->m.i_at(x1, y1)[i]);
|
||||
@@ -470,7 +472,7 @@ void computer::activate_function(game *g, computer_action action)
|
||||
// For each level between here and the surface, remove the missile
|
||||
for (int level = g->levz; level <= 0; level++)
|
||||
{
|
||||
map tmpmap(&g->itypes, &g->mapitems, &g->traps);
|
||||
map tmpmap(&g->traps);
|
||||
tmpmap.load(g, g->levx, g->levy, level, false);
|
||||
|
||||
if(level < 0)
|
||||
@@ -512,7 +514,7 @@ void computer::activate_function(game *g, computer_action action)
|
||||
for (int y = 0; y < SEEY * MAPSIZE; y++) {
|
||||
for (int i = 0; i < g->m.i_at(x, y).size(); i++) {
|
||||
if (g->m.i_at(x, y)[i].is_bionic()) {
|
||||
if (names.size() < 9)
|
||||
if (names.size() < TERMY - 8)
|
||||
names.push_back(g->m.i_at(x, y)[i].tname());
|
||||
else
|
||||
more++;
|
||||
@@ -520,10 +522,22 @@ void computer::activate_function(game *g, computer_action action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset_terminal();
|
||||
|
||||
print_line("");
|
||||
print_line("Bionic access - Manifest:");
|
||||
print_line("");
|
||||
|
||||
for (int i = 0; i < names.size(); i++)
|
||||
print_line(names[i].c_str());
|
||||
if (more > 0)
|
||||
print_line("%d OTHERS FOUND...", more);
|
||||
|
||||
print_line("");
|
||||
print_line("Press any key...");
|
||||
getch();
|
||||
|
||||
} break;
|
||||
|
||||
case COMPACT_ELEVATOR_ON:
|
||||
@@ -624,11 +638,11 @@ INITIATING STANDARD TREMOR TEST...");
|
||||
case COMPACT_AMIGARA_START:
|
||||
g->add_event(EVENT_AMIGARA, int(g->turn) + 10, 0, 0, 0);
|
||||
if (!g->u.has_artifact_with(AEP_PSYSHIELD))
|
||||
g->u.add_disease(DI_AMIGARA, 20, g);
|
||||
g->u.add_disease("amigara", 20);
|
||||
break;
|
||||
|
||||
case COMPACT_STEMCELL_TREATMENT:
|
||||
g->u.add_disease(DI_STEMCELL_TREATMENT, 120, g);
|
||||
g->u.add_disease("stemcell_treatment", 120);
|
||||
print_line("The machine injects your eyeball with the solution \n\
|
||||
of pureed bone & LSD.");
|
||||
g->u.pain += rng(40,90);
|
||||
@@ -693,6 +707,53 @@ of pureed bone & LSD.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COMPACT_DATA_ANAL:
|
||||
for (int x = g->u.posx - 2; x <= g->u.posx + 2; x++) {
|
||||
for (int y = g->u.posy - 2; y <= g->u.posy + 2; y++) {
|
||||
if (g->m.ter(x, y) == t_floor_blue) {
|
||||
print_error("PROCESSING DATA");
|
||||
if (g->m.i_at(x, y).empty()){
|
||||
print_error("ERROR: Please place memory bank in scan area.");
|
||||
query_any("Press any key to continue...");}
|
||||
else if (g->m.i_at(x, y).size() > 1){
|
||||
print_error("ERROR: Please only scan one item at a time.");
|
||||
query_any("Press any key to continue...");}
|
||||
else if (g->m.i_at(x, y)[0].type->id != "usb_drive" && g->m.i_at(x, y)[0].type->id != "black_box"){
|
||||
print_error("ERROR: Memory bank destroyed or not present.");
|
||||
query_any("Press any key to continue...");}
|
||||
else if (g->m.i_at(x, y)[0].type->id == "usb_drive" && g->m.i_at(x, y)[0].contents.empty()){
|
||||
print_error("ERROR: Memory bank is empty.");
|
||||
query_any("Press any key to continue...");}
|
||||
else { // Success!
|
||||
if (g->m.i_at(x, y)[0].type->id == "usb_drive"){
|
||||
print_line("Memory Bank: Unencrypted\nNothing of interest.");
|
||||
query_any("Press any key to continue...");}
|
||||
if (g->m.i_at(x, y)[0].type->id == "black_box"){
|
||||
print_line("Memory Bank: Military Hexron Encryption\nPrinting Transcript\n");
|
||||
query_any("Press any key to continue...");
|
||||
item transcript(g->itypes["black_box_transcript"], g->turn);
|
||||
g->m.add_item(g->u.posx, g->u.posy, transcript);
|
||||
} else
|
||||
print_line("Memory Bank: Unencrypted\nNothing of interest.\n");
|
||||
query_any("Press any key to continue...");
|
||||
reset_terminal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COMPACT_DISCONNECT:
|
||||
reset_terminal();
|
||||
print_line("\n\
|
||||
ERROR: NETWORK DISCONNECT \n\
|
||||
UNABLE TO REACH NETWORK ROUTER OR PROXY. PLEASE CONTACT YOUR\n\
|
||||
SYSTEM ADMINISTRATOR TO RESOLVE THIS ISSUE.\n\
|
||||
\n");
|
||||
query_any("Press any key to continue...");
|
||||
reset_terminal();
|
||||
break;
|
||||
|
||||
case COMPACT_EMERG_MESS:
|
||||
print_line("\
|
||||
@@ -940,6 +1001,26 @@ SHORTLY. TO ENSURE YOUR SAFETY PLEASE FOLLOW THE BELOW STEPS. \n\
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COMPACT_SRCF_ELEVATOR:
|
||||
if (!g->u.has_amount("sarcophagus_access_code", 1)){
|
||||
print_error("Access code required!");
|
||||
query_any("Press any key to continue...");}
|
||||
else{
|
||||
g->u.use_amount("sarcophagus_access_code", 1);
|
||||
reset_terminal();
|
||||
print_line("\nPower: Backup Only\nRadion Level: Very Dangerous\nOperational: Overrided\n\n");
|
||||
query_any("Press any key to continue...");
|
||||
for (int x = 0; x < SEEX * MAPSIZE; x++) {
|
||||
for (int y = 0; y < SEEY * MAPSIZE; y++) {
|
||||
if (g->m.ter(x, y) == t_elevator_control_off) {
|
||||
g->m.ter_set(x, y, t_elevator_control);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
} // switch (action)
|
||||
}
|
||||
@@ -1058,7 +1139,7 @@ void computer::activate_failure(game *g, computer_failure fail)
|
||||
|
||||
case COMPFAIL_AMIGARA:
|
||||
g->add_event(EVENT_AMIGARA, int(g->turn) + 5, 0, 0, 0);
|
||||
g->u.add_disease(DI_AMIGARA, 20, g);
|
||||
g->u.add_disease("amigara", 20);
|
||||
g->explosion(rng(0, SEEX * MAPSIZE), rng(0, SEEY * MAPSIZE), 10, 10, false);
|
||||
g->explosion(rng(0, SEEX * MAPSIZE), rng(0, SEEY * MAPSIZE), 10, 10, false);
|
||||
break;
|
||||
@@ -1089,6 +1170,31 @@ void computer::activate_failure(game *g, computer_failure fail)
|
||||
}
|
||||
getch();
|
||||
break;
|
||||
|
||||
case COMPFAIL_DESTROY_DATA:
|
||||
print_error("ERROR: ACCESSING DATA MALFUNCTION");
|
||||
for (int x = 0; x <= 23; x++) {
|
||||
for (int y = 0; y <= 23; y++) {
|
||||
if (g->m.ter(x, y) == t_floor_blue) {
|
||||
for (int i = 0; i < g->m.i_at(x, y).size(); i++) {
|
||||
if (g->m.i_at(x, y).empty())
|
||||
print_error("ERROR: Please place memory bank in scan area.");
|
||||
else if (g->m.i_at(x, y).size() > 1)
|
||||
print_error("ERROR: Please only scan one item at a time.");
|
||||
else if (g->m.i_at(x, y)[0].type->id != "usb_drive")
|
||||
print_error("ERROR: Memory bank destroyed or not present.");
|
||||
else if (g->m.i_at(x, y)[0].contents.empty())
|
||||
print_error("ERROR: Memory bank is empty.");
|
||||
else {
|
||||
print_error("ERROR: Data bank destroyed.");
|
||||
g->m.i_at(x, y)[i].contents.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getch();
|
||||
break;
|
||||
|
||||
}// switch (fail)
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ enum computer_action
|
||||
COMPACT_AMIGARA_START,
|
||||
COMPACT_DOWNLOAD_SOFTWARE,
|
||||
COMPACT_BLOOD_ANAL,
|
||||
COMPACT_DATA_ANAL,
|
||||
COMPACT_DISCONNECT,
|
||||
COMPACT_STEMCELL_TREATMENT,
|
||||
COMPACT_EMERG_MESS,
|
||||
COMPACT_TOWER_UNRESPONSIVE,
|
||||
@@ -45,6 +47,7 @@ enum computer_action
|
||||
COMPACT_SRCF_3_MESS,
|
||||
COMPACT_SRCF_SEAL_ORDER,
|
||||
COMPACT_SRCF_SEAL,
|
||||
COMPACT_SRCF_ELEVATOR,
|
||||
NUM_COMPUTER_ACTIONS
|
||||
};
|
||||
|
||||
@@ -60,6 +63,7 @@ enum computer_failure
|
||||
COMPFAIL_PUMP_LEAK,
|
||||
COMPFAIL_AMIGARA,
|
||||
COMPFAIL_DESTROY_BLOOD,
|
||||
COMPFAIL_DESTROY_DATA,
|
||||
NUM_COMPUTER_FAILURES
|
||||
};
|
||||
|
||||
|
||||
+232
-171
@@ -8,6 +8,7 @@
|
||||
#include "skill.h"
|
||||
#include "crafting.h" // For the use_comps use_tools functions
|
||||
#include "item_factory.h"
|
||||
#include "catacharset.h"
|
||||
|
||||
bool will_flood_stop(map *m, bool (&fill)[SEEX * MAPSIZE][SEEY * MAPSIZE],
|
||||
int x, int y);
|
||||
@@ -69,14 +70,21 @@ void game::init_construction()
|
||||
TOOLCONT("primitive_axe");
|
||||
TOOLCONT("chainsaw_on");
|
||||
|
||||
CONSTRUCT("Chop Up Log", 0, &construct::able_log, &construct::done_log);
|
||||
CONSTRUCT("Chop Tree trunk into logs", 0, &construct::able_trunk, &construct::done_trunk_log);
|
||||
STAGE(t_dirt, 20);
|
||||
TOOL("ax");
|
||||
TOOLCONT("primitive_axe");
|
||||
TOOLCONT("chainsaw_on");
|
||||
|
||||
CONSTRUCT("Move Furniture", -1, &construct::able_furniture, &construct::done_furniture);
|
||||
STAGE(t_null, 1);
|
||||
CONSTRUCT("Chop Tree trunk into planks", 0, &construct::able_trunk, &construct::done_trunk_plank);
|
||||
STAGE(t_dirt, 23);
|
||||
TOOL("ax");
|
||||
TOOLCONT("primitive_axe");
|
||||
TOOLCONT("chainsaw_on");
|
||||
TOOLCONT("saw");
|
||||
|
||||
CONSTRUCT("Move Furniture", -1, &construct::able_move, &construct::done_move);
|
||||
STAGE(1);
|
||||
|
||||
CONSTRUCT("Clean Broken Window", 0, &construct::able_broken_window,
|
||||
&construct::done_nothing);
|
||||
@@ -141,7 +149,14 @@ void game::init_construction()
|
||||
COMP("2x4", 10);
|
||||
COMP("nail", 20);
|
||||
|
||||
CONSTRUCT("Build Log Wall", 2, &construct::able_pit, &construct::done_nothing);
|
||||
CONSTRUCT("Build Log Wall", 2, &construct::able_dig, &construct::done_nothing);
|
||||
STAGE(t_pit_shallow, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
TOOLCONT("digging_stick");
|
||||
STAGE(t_pit, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
STAGE(t_wall_log_half, 20);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
@@ -155,7 +170,14 @@ void game::init_construction()
|
||||
COMP("stick", 3);
|
||||
COMPCONT("2x4", 6);
|
||||
|
||||
CONSTRUCT("Build Palisade Wall", 2, &construct::able_pit, &construct::done_nothing);
|
||||
CONSTRUCT("Build Palisade Wall", 2, &construct::able_dig, &construct::done_nothing);
|
||||
STAGE(t_pit_shallow, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
TOOLCONT("digging_stick");
|
||||
STAGE(t_pit, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
STAGE(t_palisade, 20);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
@@ -168,7 +190,14 @@ void game::init_construction()
|
||||
COMP("stick", 8);
|
||||
COMPCONT("2x4", 8);
|
||||
|
||||
CONSTRUCT("Build Palisade Gate", 2, &construct::able_pit, &construct::done_nothing);
|
||||
CONSTRUCT("Build Palisade Gate", 2, &construct::able_dig, &construct::done_nothing);
|
||||
STAGE(t_pit_shallow, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
TOOLCONT("digging_stick");
|
||||
STAGE(t_pit, 10);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
STAGE(t_palisade_gate, 20);
|
||||
TOOL("shovel");
|
||||
TOOLCONT("primitive_shovel");
|
||||
@@ -273,7 +302,7 @@ void game::init_construction()
|
||||
// Base stuff
|
||||
CONSTRUCT("Build Bulletin Board", 0, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_bulletin, 10)
|
||||
STAGE(f_bulletin, 10)
|
||||
TOOL("saw");
|
||||
TOOL("hammer");
|
||||
TOOLCONT("hatchet");
|
||||
@@ -282,9 +311,9 @@ void game::init_construction()
|
||||
COMP("nail", 8);
|
||||
|
||||
// Household stuff
|
||||
CONSTRUCT("Build Dresser", 1, &construct::able_indoors,
|
||||
CONSTRUCT("Build Dresser", 1, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_dresser, 20);
|
||||
STAGE(f_dresser, 20);
|
||||
TOOL("saw");
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
@@ -293,9 +322,9 @@ void game::init_construction()
|
||||
COMP("nail", 8);
|
||||
COMP("2x4", 6);
|
||||
|
||||
CONSTRUCT("Build Bookcase", 1, &construct::able_indoors,
|
||||
CONSTRUCT("Build Bookcase", 1, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_bookcase, 20);
|
||||
STAGE(f_bookcase, 20);
|
||||
TOOL("saw");
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
@@ -304,9 +333,9 @@ void game::init_construction()
|
||||
COMP("nail", 16);
|
||||
COMP("2x4", 12);
|
||||
|
||||
CONSTRUCT("Build Locker", 1, &construct::able_indoors,
|
||||
CONSTRUCT("Build Locker", 1, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_locker, 20);
|
||||
STAGE(f_locker, 20);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("hatchet");
|
||||
@@ -314,18 +343,18 @@ void game::init_construction()
|
||||
COMP("sheet_metal", 2);
|
||||
COMP("pipe", 8);
|
||||
|
||||
CONSTRUCT("Build Metal Rack", 1, &construct::able_indoors,
|
||||
CONSTRUCT("Build Metal Rack", 1, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_rack, 20);
|
||||
STAGE(f_rack, 20);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("hatchet");
|
||||
TOOL("wrench");
|
||||
COMP("pipe", 12);
|
||||
|
||||
CONSTRUCT("Build Counter", 0, &construct::able_indoors,
|
||||
CONSTRUCT("Build Counter", 0, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_counter, 20);
|
||||
STAGE(f_counter, 20);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("hatchet");
|
||||
@@ -333,9 +362,9 @@ void game::init_construction()
|
||||
COMP("nail", 8);
|
||||
COMP("2x4", 6);
|
||||
|
||||
CONSTRUCT("Build Makeshift Bed", 0, &construct::able_indoors,
|
||||
CONSTRUCT("Build Makeshift Bed", 0, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_makeshift_bed, 20);
|
||||
STAGE(f_makeshift_bed, 20);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("hatchet");
|
||||
@@ -346,12 +375,12 @@ void game::init_construction()
|
||||
|
||||
CONSTRUCT("Tape up window", 0, &construct::able_window_pane,
|
||||
&construct::done_tape);
|
||||
STAGE(t_null, 2);
|
||||
STAGE(2);
|
||||
COMP("duct_tape", 50);
|
||||
|
||||
CONSTRUCT("Deconstruct Furniture", 0, &construct::able_deconstruct,
|
||||
&construct::done_deconstruct);
|
||||
STAGE(t_null, 20);
|
||||
STAGE(20);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("hatchet");
|
||||
@@ -360,7 +389,7 @@ void game::init_construction()
|
||||
TOOLCONT("toolset");
|
||||
|
||||
CONSTRUCT("Start vehicle construction", 0, &construct::able_empty, &construct::done_vehicle);
|
||||
STAGE(t_null, 10);
|
||||
STAGE(10);
|
||||
COMP("frame", 1);
|
||||
|
||||
CONSTRUCT("Fence Posts", 0, &construct::able_dig,
|
||||
@@ -379,14 +408,14 @@ void game::init_construction()
|
||||
|
||||
CONSTRUCT("Build Wood Stove", 0, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_woodstove, 10);
|
||||
STAGE(f_woodstove, 10);
|
||||
TOOL("hacksaw");
|
||||
COMP("metal_tank", 1);
|
||||
COMP("pipe", 1);
|
||||
|
||||
CONSTRUCT("Build Stone Fireplace", 0, &construct::able_empty,
|
||||
&construct::done_nothing);
|
||||
STAGE(t_fireplace, 40);
|
||||
STAGE(f_fireplace, 40);
|
||||
TOOL("hammer");
|
||||
TOOLCONT("primitive_hammer");
|
||||
TOOLCONT("shovel");
|
||||
@@ -422,7 +451,7 @@ void game::construction_menu()
|
||||
long ch;
|
||||
bool exit = false;
|
||||
|
||||
inventory total_inv = crafting_inventory();
|
||||
inventory total_inv = crafting_inventory(&u);
|
||||
|
||||
do {
|
||||
// Erase existing list of constructions
|
||||
@@ -468,10 +497,16 @@ void game::construction_menu()
|
||||
int posx = 33, posy = 2;
|
||||
for (int n = 0; n < current_con->stages.size(); n++) {
|
||||
nc_color color_stage = (player_can_build(u, total_inv, current_con, n,
|
||||
false, true) ?
|
||||
c_white : c_dkgray);
|
||||
mvwprintz(w_con, posy, 31, color_stage, "Stage %d: %s", n + 1,
|
||||
current_con->stages[n].terrain == t_null? "" : terlist[current_con->stages[n].terrain].name.c_str());
|
||||
false, true) ? c_white : c_dkgray);
|
||||
|
||||
const char* mes;
|
||||
if (current_con->stages[n].terrain != t_null)
|
||||
mes = terlist[current_con->stages[n].terrain].name.c_str();
|
||||
else if (current_con->stages[n].furniture != f_null)
|
||||
mes = furnlist[current_con->stages[n].furniture].name.c_str();
|
||||
else
|
||||
mes = "";
|
||||
mvwprintz(w_con, posy, 31, color_stage, "Stage %d: %s", n + 1, mes);
|
||||
posy++;
|
||||
// Print tools
|
||||
construction_stage stage = current_con->stages[n];
|
||||
@@ -496,7 +531,7 @@ void game::construction_menu()
|
||||
has_tool[i] = true;
|
||||
col = c_green;
|
||||
}
|
||||
int length = item_controller->find_template(tool)->name.length();
|
||||
int length = utf8_width(item_controller->find_template(tool)->name.c_str());
|
||||
if (posx + length > 79) {
|
||||
posy++;
|
||||
posx = 33;
|
||||
@@ -541,7 +576,7 @@ void game::construction_menu()
|
||||
has_component[i] = true;
|
||||
col = c_green;
|
||||
}
|
||||
int length = item_controller->find_template(comp.type)->name.length();
|
||||
int length = utf8_width(item_controller->find_template(comp.type)->name.c_str());
|
||||
if (posx + length > 79) {
|
||||
posy++;
|
||||
posx = 33;
|
||||
@@ -711,7 +746,7 @@ bool game::player_can_build(player &p, inventory pinv, constructable* con,
|
||||
void game::place_construction(constructable *con)
|
||||
{
|
||||
refresh_all();
|
||||
inventory total_inv = crafting_inventory();
|
||||
inventory total_inv = crafting_inventory(&u);
|
||||
|
||||
std::vector<point> valid;
|
||||
for (int x = u.posx - 1; x <= u.posx + 1; x++) {
|
||||
@@ -721,7 +756,10 @@ void game::place_construction(constructable *con)
|
||||
construct test;
|
||||
bool place_okay = (test.*(con->able))(this, point(x, y));
|
||||
for (int i = 0; i < con->stages.size() && !place_okay; i++) {
|
||||
if (m.ter(x, y) == con->stages[i].terrain)
|
||||
ter_id t = con->stages[i].terrain; furn_id f = con->stages[i].furniture;
|
||||
if ((t != t_null || f != f_null) &&
|
||||
(m.ter(x, y) == t || t == t_null) &&
|
||||
(m.furn(x, y) == f || f == f_null))
|
||||
place_okay = true;
|
||||
}
|
||||
|
||||
@@ -729,7 +767,10 @@ void game::place_construction(constructable *con)
|
||||
// Make sure we're not trying to continue a construction that we can't finish
|
||||
int starting_stage = 0, max_stage = -1;
|
||||
for (int i = 0; i < con->stages.size(); i++) {
|
||||
if (m.ter(x, y) == con->stages[i].terrain)
|
||||
ter_id t = con->stages[i].terrain; furn_id f = con->stages[i].furniture;
|
||||
if ((t != t_null || f != f_null) &&
|
||||
(m.ter(x, y) == t || t == t_null) &&
|
||||
(m.furn(x, y) == f || f == f_null))
|
||||
starting_stage = i + 1;
|
||||
}
|
||||
for(int i = starting_stage; i < con->stages.size(); i++) {
|
||||
@@ -746,15 +787,9 @@ void game::place_construction(constructable *con)
|
||||
}
|
||||
}
|
||||
}
|
||||
mvprintz(0, 0, c_red, "Pick a direction in which to construct:");
|
||||
int dirx, diry;
|
||||
get_direction(this, dirx, diry, input());
|
||||
if (dirx == -2) {
|
||||
add_msg("Invalid direction.");
|
||||
if (!choose_adjacent("Contruct", dirx, diry))
|
||||
return;
|
||||
}
|
||||
dirx += u.posx;
|
||||
diry += u.posy;
|
||||
bool point_is_okay = false;
|
||||
for (int i = 0; i < valid.size() && !point_is_okay; i++) {
|
||||
if (valid[i].x == dirx && valid[i].y == diry)
|
||||
@@ -776,7 +811,10 @@ void game::place_construction(constructable *con)
|
||||
// Figure out what stage to start at, and what stage is the maximum
|
||||
int starting_stage = 0, max_stage = 0;
|
||||
for (int i = 0; i < con->stages.size(); i++) {
|
||||
if (m.ter(dirx, diry) == con->stages[i].terrain)
|
||||
ter_id t = con->stages[i].terrain; furn_id f = con->stages[i].furniture;
|
||||
if ((t != t_null || f != f_null) &&
|
||||
(m.ter(dirx, diry) == t || t == t_null) &&
|
||||
(m.furn(dirx, diry) == f || f == f_null))
|
||||
starting_stage = i + 1;
|
||||
if (player_can_build(u, total_inv, con, i, true))
|
||||
max_stage = i;
|
||||
@@ -794,8 +832,6 @@ void game::place_construction(constructable *con)
|
||||
|
||||
void game::complete_construction()
|
||||
{
|
||||
inventory map_inv;
|
||||
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
|
||||
int stage_num = u.activity.values[0];
|
||||
constructable *built = constructions[u.activity.index];
|
||||
construction_stage stage = built->stages[stage_num];
|
||||
@@ -807,13 +843,15 @@ void game::complete_construction()
|
||||
u.practice(turn, "carpentry", 10);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (!stage.components[i].empty())
|
||||
consume_items(stage.components[i]);
|
||||
consume_items(&u, stage.components[i]);
|
||||
}
|
||||
|
||||
// Make the terrain change
|
||||
int terx = u.activity.placement.x, tery = u.activity.placement.y;
|
||||
if (stage.terrain != t_null)
|
||||
m.ter_set(terx, tery, stage.terrain);
|
||||
if (stage.furniture != f_null)
|
||||
m.furn_set(terx, tery, stage.furniture);
|
||||
|
||||
// Strip off the first stage in our list...
|
||||
u.activity.values.erase(u.activity.values.begin());
|
||||
@@ -832,7 +870,8 @@ void game::complete_construction()
|
||||
|
||||
bool construct::able_empty(game *g, point p)
|
||||
{
|
||||
return (g->m.move_cost(p.x, p.y) == 2);
|
||||
return (g->m.has_flag(flat, p.x, p.y) && !g->m.has_furn(p.x, p.y) &&
|
||||
g->is_empty(p.x, p.y) && g->m.tr_at(p.x, p.y) == tr_null);
|
||||
}
|
||||
|
||||
bool construct::able_tree(game *g, point p)
|
||||
@@ -840,15 +879,15 @@ bool construct::able_tree(game *g, point p)
|
||||
return (g->m.ter(p.x, p.y) == t_tree);
|
||||
}
|
||||
|
||||
bool construct::able_log(game *g, point p)
|
||||
bool construct::able_trunk(game *g, point p)
|
||||
{
|
||||
return (g->m.ter(p.x, p.y) == t_log);
|
||||
return (g->m.ter(p.x, p.y) == t_trunk);
|
||||
}
|
||||
|
||||
bool construct::able_furniture(game *g, point p)
|
||||
bool construct::able_move(game *g, point p)
|
||||
{
|
||||
ter_t terrain_type = terlist[g->m.ter(p.x, p.y)];
|
||||
int required_str = terrain_type.move_str_req;
|
||||
furn_t furniture_type = furnlist[g->m.furn(p.x, p.y)];
|
||||
int required_str = furniture_type.move_str_req;
|
||||
|
||||
// Object can not be moved
|
||||
if (required_str < 0)
|
||||
@@ -917,11 +956,6 @@ bool construct::able_wall_wood(game *g, point p)
|
||||
return (g->m.ter(p.x, p.y) == t_wall_wood);
|
||||
}
|
||||
|
||||
bool construct::able_indoors(game *g, point p)
|
||||
{
|
||||
return g->m.has_flag(indoors, p.x, p.y) && able_empty(g, p);
|
||||
}
|
||||
|
||||
bool construct::able_dig(game *g, point p)
|
||||
{
|
||||
return (g->m.has_flag(diggable, p.x, p.y));
|
||||
@@ -944,7 +978,8 @@ bool construct::able_between_walls(game *g, point p)
|
||||
(g->m.has_flag(supports_roof, p.x -1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
|
||||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y +1)) ||
|
||||
(g->m.has_flag(supports_roof, p.x +1, p.y) && g->m.has_flag(supports_roof, p.x, p.y -1)) ||
|
||||
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1)));
|
||||
(g->m.has_flag(supports_roof, p.x, p.y -1) && g->m.has_flag(supports_roof, p.x, p.y +1))) &&
|
||||
(g->m.move_cost(p.x, p.y) != 0);
|
||||
}
|
||||
|
||||
bool construct::able_deconstruct(game *g, point p)
|
||||
@@ -954,10 +989,10 @@ bool construct::able_deconstruct(game *g, point p)
|
||||
|
||||
void construct::done_window_pane(game *g, point p)
|
||||
{
|
||||
g->m.spawn_item(g->u.posx, g->u.posy, item_controller->find_template("glass_sheet"), 0);
|
||||
g->m.spawn_item(g->u.posx, g->u.posy, "glass_sheet", 0);
|
||||
}
|
||||
|
||||
void construct::done_furniture(game *g, point p)
|
||||
void construct::done_move(game *g, point p)
|
||||
{
|
||||
mvprintz(0, 0, c_red, "Press a direction for the furniture to move (. to cancel):");
|
||||
int x = 0, y = 0;
|
||||
@@ -970,15 +1005,16 @@ void construct::done_furniture(game *g, point p)
|
||||
return;
|
||||
x += p.x;
|
||||
y += p.y;
|
||||
if(g->m.ter(x, y) != t_floor || !g->is_empty(x, y)) {
|
||||
if(!able_empty(g, point(x, y))) {
|
||||
mvprintz(0, 0, c_red, "Can't move furniture there! Choose a direction with open floor.");
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
g->m.ter_set(x, y, g->m.ter(p.x, p.y));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
g->sound(x, y, furnlist[g->m.furn(p.x, p.y)].move_str_req * 2, "a scraping noise");
|
||||
g->m.furn_set(x, y, g->m.furn(p.x, p.y));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
|
||||
//Move all Items within a container
|
||||
std::vector <item> vItemMove = g->m.i_at(p.x, p.y);
|
||||
@@ -1000,19 +1036,33 @@ void construct::done_tree(game *g, point p)
|
||||
std::vector<point> tree = line_to(p.x, p.y, x, y, rng(1, 8));
|
||||
for (int i = 0; i < tree.size(); i++) {
|
||||
g->m.destroy(g, tree[i].x, tree[i].y, true);
|
||||
g->m.ter_set(tree[i].x, tree[i].y, t_log);
|
||||
g->m.ter_set(tree[i].x, tree[i].y, t_trunk);
|
||||
}
|
||||
}
|
||||
|
||||
void construct::done_log(game *g, point p)
|
||||
void construct::done_trunk_log(game *g, point p)
|
||||
{
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("log"), int(g->turn), rng(5, 15));
|
||||
g->m.spawn_item(p.x, p.y, "log", int(g->turn), rng(5, 15));
|
||||
}
|
||||
|
||||
void construct::done_trunk_plank(game *g, point p)
|
||||
{
|
||||
int num_logs = rng(5, 15);
|
||||
for( int i = 0; i < num_logs; ++i ) {
|
||||
item tmplog(g->itypes["log"], int(g->turn), g->nextinv);
|
||||
iuse::cut_log_into_planks( g, &(g->u), &tmplog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void construct::done_vehicle(game *g, point p)
|
||||
{
|
||||
std::string name = string_input_popup("Enter new vehicle name", 20);
|
||||
std::string name = string_input_popup("Enter new vehicle name:", 20);
|
||||
if(name.empty())
|
||||
{
|
||||
name = "Car";
|
||||
}
|
||||
|
||||
vehicle *veh = g->m.add_vehicle (g, veh_custom, p.x, p.y, 270, 0, 0);
|
||||
if (!veh)
|
||||
{
|
||||
@@ -1021,6 +1071,10 @@ void construct::done_vehicle(game *g, point p)
|
||||
}
|
||||
veh->name = name;
|
||||
veh->install_part (0, 0, vp_frame_v2);
|
||||
|
||||
//Update the vehicle cache immediately, or the vehicle will be invisible for the first couple of turns.
|
||||
g->m.update_vehicle_cache(veh, true);
|
||||
|
||||
}
|
||||
|
||||
void construct::done_tape(game *g, point p)
|
||||
@@ -1042,110 +1096,117 @@ void construct::done_tape(game *g, point p)
|
||||
|
||||
void construct::done_deconstruct(game *g, point p)
|
||||
{
|
||||
g->add_msg("You disassemble the %s.", g->m.tername(p.x, p.y).c_str());
|
||||
switch (g->m.ter(p.x, p.y))
|
||||
{
|
||||
case t_makeshift_bed:
|
||||
case t_bed:
|
||||
case t_armchair:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 9);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 9);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_door_c:
|
||||
case t_door_o:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 3);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,12));
|
||||
g->m.ter_set(p.x, p.y, t_door_frame);
|
||||
break;
|
||||
case t_window_domestic:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("stick"), 0);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet"), 0, 1);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, 3);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("string_36"), 0, 0, 1);
|
||||
g->m.ter_set(p.x, p.y, t_window_empty);
|
||||
break;
|
||||
|
||||
case t_window:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("glass_sheet"), 0);
|
||||
g->m.ter_set(p.x, p.y, t_window_empty);
|
||||
break;
|
||||
|
||||
case t_backboard:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_pavement);
|
||||
break;
|
||||
|
||||
case t_sandbox:
|
||||
case t_bench:
|
||||
case t_crate_o:
|
||||
case t_crate_c:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_chair:
|
||||
case t_cupboard:
|
||||
case t_desk:
|
||||
case t_bulletin:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_slide:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
|
||||
g->m.ter_set(p.x, p.y, t_grass);
|
||||
break;
|
||||
|
||||
case t_locker:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("sheet_metal"), 0);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(4,8));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_rack:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_monkey_bars:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("pipe"), 0, rng(6,12));
|
||||
g->m.ter_set(p.x, p.y, t_grass);
|
||||
break;
|
||||
|
||||
case t_fridge:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("scrap"), 0, rng(2,6));
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("steel_chunk"), 0, rng(2,3));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_counter:
|
||||
case t_dresser:
|
||||
case t_table:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 6);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,8));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_pool_table:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("rag"), 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
|
||||
case t_bookcase:
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("2x4"), 0, 12);
|
||||
g->m.spawn_item(p.x, p.y, item_controller->find_template("nail"), 0, 0, rng(12,16));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
if (g->m.has_furn(p.x, p.y)) {
|
||||
g->add_msg("You disassemble the %s.", g->m.furnname(p.x, p.y).c_str());
|
||||
switch (g->m.furn(p.x, p.y)){
|
||||
case f_makeshift_bed:
|
||||
case f_bed:
|
||||
case f_armchair:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 10);
|
||||
g->m.spawn_item(p.x, p.y, "rag", 0, rng(10,15));
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
case f_bench:
|
||||
case f_crate_o:
|
||||
case f_crate_c:
|
||||
case f_chair:
|
||||
case f_cupboard:
|
||||
case f_desk:
|
||||
case f_bulletin:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_locker:
|
||||
g->m.spawn_item(p.x, p.y, "sheet_metal", 0, rng(1,2));
|
||||
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_rack:
|
||||
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_oven:
|
||||
g->m.spawn_item(p.x, p.y, "scrap", 0, rng(2,6));
|
||||
g->m.spawn_item(p.x, p.y, "steel_chunk", 0, rng(2,3));
|
||||
g->m.spawn_item(p.x, p.y, "element", 0, rng(1,4));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
case f_fridge:
|
||||
g->m.spawn_item(p.x, p.y, "scrap", 0, rng(2,6));
|
||||
g->m.spawn_item(p.x, p.y, "steel_chunk", 0, rng(2,3));
|
||||
g->m.spawn_item(p.x, p.y, "hose", 0, 1);
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_glass_fridge:
|
||||
g->m.spawn_item(p.x, p.y, "scrap", 0, rng(2,6));
|
||||
g->m.spawn_item(p.x, p.y, "steel_chunk", 0, rng(2,3));
|
||||
g->m.spawn_item(p.x, p.y, "hose", 0, 1);
|
||||
g->m.spawn_item(p.x, p.y, "glass_sheet", 0, 1);
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_counter:
|
||||
case f_dresser:
|
||||
case f_table:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 6);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,8));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_pool_table:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "rag", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
case f_bookcase:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 12);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(12,16));
|
||||
g->m.furn_set(p.x, p.y, f_null);
|
||||
break;
|
||||
default:
|
||||
g->add_msg("You have to push away %s first.", g->m.furnname(p.x, p.y).c_str());
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
g->add_msg("You disassemble the %s.", g->m.tername(p.x, p.y).c_str());
|
||||
switch (g->m.ter(p.x, p.y))
|
||||
{
|
||||
case t_door_c:
|
||||
case t_door_o:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,12));
|
||||
g->m.ter_set(p.x, p.y, t_door_frame);
|
||||
break;
|
||||
case t_window_domestic:
|
||||
g->m.spawn_item(p.x, p.y, "stick", 0);
|
||||
g->m.spawn_item(p.x, p.y, "sheet", 0, 2);
|
||||
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(3,4));
|
||||
g->m.spawn_item(p.x, p.y, "string_36", 0, 0, 1);
|
||||
g->m.ter_set(p.x, p.y, t_window_empty);
|
||||
break;
|
||||
case t_window:
|
||||
g->m.spawn_item(p.x, p.y, "glass_sheet", 0);
|
||||
g->m.ter_set(p.x, p.y, t_window_empty);
|
||||
break;
|
||||
case t_backboard:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_pavement);
|
||||
break;
|
||||
case t_sandbox:
|
||||
g->m.spawn_item(p.x, p.y, "2x4", 0, 4);
|
||||
g->m.spawn_item(p.x, p.y, "nail", 0, 0, rng(6,10));
|
||||
g->m.ter_set(p.x, p.y, t_floor);
|
||||
break;
|
||||
case t_slide:
|
||||
g->m.spawn_item(p.x, p.y, "sheet_metal", 0);
|
||||
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(4,8));
|
||||
g->m.ter_set(p.x, p.y, t_grass);
|
||||
break;
|
||||
case t_monkey_bars:
|
||||
g->m.spawn_item(p.x, p.y, "pipe", 0, rng(6,12));
|
||||
g->m.ter_set(p.x, p.y, t_grass);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+11
-6
@@ -7,12 +7,17 @@ struct construct;
|
||||
struct construction_stage
|
||||
{
|
||||
ter_id terrain;
|
||||
furn_id furniture;
|
||||
int time; // In minutes, i.e. 10 turns
|
||||
std::vector<component> tools[10];
|
||||
std::vector<component> components[10];
|
||||
|
||||
construction_stage(ter_id Terrain, int Time) :
|
||||
terrain (Terrain), time (Time) { };
|
||||
terrain (Terrain), furniture(f_null), time (Time) { };
|
||||
construction_stage(furn_id Furniture, int Time) :
|
||||
terrain (t_null), furniture (Furniture), time (Time) { };
|
||||
construction_stage(int Time) :
|
||||
terrain (t_null), furniture (f_null), time (Time) { };
|
||||
};
|
||||
|
||||
struct constructable
|
||||
@@ -49,7 +54,6 @@ struct construct // Construction functions.
|
||||
|
||||
bool able_wall (game *, point); // Able if tile is wall
|
||||
bool able_wall_wood(game *g, point); // Only player-built walls
|
||||
bool able_indoors(game *g, point); // Able on floors
|
||||
|
||||
bool able_between_walls(game *, point); // Flood-fill contained by walls
|
||||
|
||||
@@ -58,9 +62,9 @@ struct construct // Construction functions.
|
||||
bool able_pit(game *, point); // Able only on pits
|
||||
|
||||
bool able_tree(game *, point); // Able on trees
|
||||
bool able_log(game *, point); // Able on logs
|
||||
bool able_trunk(game *, point); // Able on tree trunks
|
||||
|
||||
bool able_furniture(game *, point); // Able on furniture
|
||||
bool able_move(game *, point); // Able on furniture
|
||||
|
||||
bool able_deconstruct(game *, point);
|
||||
|
||||
@@ -69,8 +73,9 @@ struct construct // Construction functions.
|
||||
void done_window_pane(game *, point);
|
||||
void done_vehicle(game *, point);
|
||||
void done_tree(game *, point);
|
||||
void done_log(game *, point);
|
||||
void done_furniture(game *, point);
|
||||
void done_trunk_log(game *, point);
|
||||
void done_trunk_plank(game *, point);
|
||||
void done_move(game *, point);
|
||||
void done_tape(game *, point);
|
||||
void done_deconstruct(game *, point);
|
||||
|
||||
|
||||
+262
-182
@@ -10,6 +10,7 @@
|
||||
#include "crafting.h"
|
||||
#include "inventory.h"
|
||||
#include "item_factory.h"
|
||||
#include "catacharset.h"
|
||||
|
||||
//apparently we can't declare this in crafting.h? Complained about multiple definition.
|
||||
std::vector<craft_cat> craft_cat_list;
|
||||
@@ -44,8 +45,8 @@ void game::init_recipes()
|
||||
bool autolearn = curr.get("autolearn").as_bool();
|
||||
// optional fields
|
||||
bool reversible = curr.has("reversible") ? curr.get("reversible").as_bool() : false;
|
||||
const char *skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string().c_str() : NULL;
|
||||
const char *skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string().c_str() : NULL;
|
||||
std::string skill1 = curr.has("skill_pri") ? curr.get("skill_pri").as_string() : "";
|
||||
std::string skill2 = curr.has("skill_sec") ? curr.get("skill_sec").as_string() : "";
|
||||
std::string id_suffix = curr.has("id_suffix") ? curr.get("id_suffix").as_string() : "";
|
||||
int learn_by_disassembly = curr.has("decomp_learn") ? curr.get("decomp_learn").as_int() : -1;
|
||||
|
||||
@@ -65,7 +66,7 @@ void game::init_recipes()
|
||||
{
|
||||
if ((*name_iter) == rec_name)
|
||||
{
|
||||
debugmsg("Recipe name collision: %s", rec_name.c_str());
|
||||
debugmsg("Recipe name collision (set a unique value for the id_suffix field to fix): %s", rec_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +187,7 @@ bool game::making_would_work(recipe *making)
|
||||
bool game::can_make(recipe *r)
|
||||
{
|
||||
bool RET_VAL = true;
|
||||
inventory crafting_inv = crafting_inventory();
|
||||
inventory crafting_inv = crafting_inventory(&u);
|
||||
if(!u.knows_recipe(r))
|
||||
{
|
||||
return false;
|
||||
@@ -355,7 +356,7 @@ bool game::check_enough_materials(recipe *r, inventory crafting_inv)
|
||||
}
|
||||
++comp_it;
|
||||
}
|
||||
|
||||
|
||||
if (!atleast_one_available)
|
||||
// this set doesn't have any components available, so the recipe can't be crafted
|
||||
{
|
||||
@@ -364,7 +365,7 @@ bool game::check_enough_materials(recipe *r, inventory crafting_inv)
|
||||
++comp_set_it;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::vector<std::vector<component> > &tools = r->tools;
|
||||
std::vector<std::vector<component> >::iterator tool_set_it = tools.begin();
|
||||
while (tool_set_it != tools.end())
|
||||
@@ -434,7 +435,7 @@ bool game::check_enough_materials(recipe *r, inventory crafting_inv)
|
||||
}
|
||||
++tool_it;
|
||||
}
|
||||
|
||||
|
||||
if (!atleast_one_available)
|
||||
// this set doesn't have any tools available, so the recipe can't be crafted
|
||||
{
|
||||
@@ -442,7 +443,7 @@ bool game::check_enough_materials(recipe *r, inventory crafting_inv)
|
||||
}
|
||||
++tool_set_it;
|
||||
}
|
||||
|
||||
|
||||
return RET_VAL;
|
||||
}
|
||||
|
||||
@@ -508,8 +509,8 @@ recipe* game::select_crafting_recipe()
|
||||
const int dataLines=(int)(dataHalfLines*2); // old: 18
|
||||
const int dataHeight=dataLines+4; // old: 22
|
||||
|
||||
WINDOW *w_head = newwin( 3, 80, 0, (TERMX > 80) ? (TERMX -80)/2 : 0);
|
||||
WINDOW *w_data = newwin(dataHeight, 80, 3, (TERMX > 80) ? (TERMX -80)/2 : 0);
|
||||
WINDOW *w_head = newwin( 3, FULL_SCREEN_WIDTH, 0, (TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0);
|
||||
WINDOW *w_data = newwin(dataHeight, FULL_SCREEN_WIDTH, 3, (TERMX > FULL_SCREEN_WIDTH) ? (TERMX -FULL_SCREEN_WIDTH)/2 : 0);
|
||||
|
||||
|
||||
craft_cat tab = "CC_WEAPON";
|
||||
@@ -522,7 +523,7 @@ recipe* game::select_crafting_recipe()
|
||||
recipe *chosen = NULL;
|
||||
InputEvent input;
|
||||
|
||||
inventory crafting_inv = crafting_inventory();
|
||||
inventory crafting_inv = crafting_inventory(&u);
|
||||
std::string filterstring = "";
|
||||
do {
|
||||
if (redraw)
|
||||
@@ -543,22 +544,22 @@ recipe* game::select_crafting_recipe()
|
||||
mvwprintz(w_data, dataLines+1, 5, c_white, "[?/E]: Describe, [F]ind , [R]eset");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
mvwprintz(w_data, dataLines+1, 5, c_white, "[?/E]: Describe, [F]ind");
|
||||
}
|
||||
mvwprintz(w_data, dataLines+2, 5, c_white, "Press <ENTER> to attempt to craft object.");
|
||||
for (int i = 0; i < 80; i++)
|
||||
for (int i = 0; i < FULL_SCREEN_WIDTH; i++)
|
||||
{
|
||||
mvwputch(w_data, dataHeight-1, i, c_ltgray, LINE_OXOX);
|
||||
if (i < dataHeight-1)
|
||||
{
|
||||
mvwputch(w_data, i, 0, c_ltgray, LINE_XOXO);
|
||||
mvwputch(w_data, i, 79, c_ltgray, LINE_XOXO);
|
||||
mvwputch(w_data, i, FULL_SCREEN_WIDTH-1, c_ltgray, LINE_XOXO);
|
||||
}
|
||||
}
|
||||
|
||||
mvwputch(w_data, dataHeight-1, 0, c_ltgray, LINE_XXOO); // _|
|
||||
mvwputch(w_data, dataHeight-1, 79, c_ltgray, LINE_XOOX); // |_
|
||||
mvwputch(w_data, dataHeight-1, FULL_SCREEN_WIDTH-1, c_ltgray, LINE_XOOX); // |_
|
||||
|
||||
int recmin = 0, recmax = current.size();
|
||||
if(recmax > dataLines)
|
||||
@@ -682,7 +683,7 @@ recipe* game::select_crafting_recipe()
|
||||
itype_id type = current[line]->tools[i][j].type;
|
||||
int charges = current[line]->tools[i][j].count;
|
||||
nc_color toolcol = c_red;
|
||||
|
||||
|
||||
if (current[line]->tools[i][j].available == 0)
|
||||
{
|
||||
toolcol = c_brown;
|
||||
@@ -704,16 +705,16 @@ recipe* game::select_crafting_recipe()
|
||||
toolinfo << "(" << charges << " charges) ";
|
||||
}
|
||||
std::string toolname = toolinfo.str();
|
||||
if (xpos + toolname.length() >= 80)
|
||||
if (xpos + utf8_width(toolname.c_str()) >= FULL_SCREEN_WIDTH)
|
||||
{
|
||||
xpos = 32;
|
||||
ypos++;
|
||||
}
|
||||
mvwprintz(w_data, ypos, xpos, toolcol, toolname.c_str());
|
||||
xpos += toolname.length();
|
||||
xpos += utf8_width(toolname.c_str());
|
||||
if (j < current[line]->tools[i].size() - 1)
|
||||
{
|
||||
if (xpos >= 77)
|
||||
if (xpos >= FULL_SCREEN_WIDTH-3)
|
||||
{
|
||||
xpos = 32;
|
||||
ypos++;
|
||||
@@ -758,16 +759,16 @@ recipe* game::select_crafting_recipe()
|
||||
std::stringstream dump;
|
||||
dump << abs(count) << "x " << item_controller->find_template(type)->name << " ";
|
||||
std::string compname = dump.str();
|
||||
if (xpos + compname.length() >= 80)
|
||||
if (xpos + utf8_width(compname.c_str()) >= FULL_SCREEN_WIDTH)
|
||||
{
|
||||
ypos++;
|
||||
xpos = 32;
|
||||
}
|
||||
mvwprintz(w_data, ypos, xpos, compcol, compname.c_str());
|
||||
xpos += compname.length();
|
||||
xpos += utf8_width(compname.c_str());
|
||||
if (j < current[line]->components[i].size() - 1)
|
||||
{
|
||||
if (xpos >= 77)
|
||||
if (xpos >= FULL_SCREEN_WIDTH-3)
|
||||
{
|
||||
ypos++;
|
||||
xpos = 32;
|
||||
@@ -848,7 +849,7 @@ recipe* game::select_crafting_recipe()
|
||||
redraw = true;
|
||||
break;
|
||||
case Filter:
|
||||
filterstring = string_input_popup("Search :",55,filterstring);
|
||||
filterstring = string_input_popup("Search:", 55, filterstring);
|
||||
redraw = true;
|
||||
break;
|
||||
case Reset:
|
||||
@@ -879,7 +880,7 @@ recipe* game::select_crafting_recipe()
|
||||
void draw_recipe_tabs(WINDOW *w, craft_cat tab,bool filtered)
|
||||
{
|
||||
werase(w);
|
||||
for (int i = 0; i < 80; i++)
|
||||
for (int i = 0; i < FULL_SCREEN_WIDTH; i++)
|
||||
{
|
||||
mvwputch(w, 2, i, c_ltgray, LINE_OXOX);
|
||||
}
|
||||
@@ -905,14 +906,14 @@ void draw_recipe_tabs(WINDOW *w, craft_cat tab,bool filtered)
|
||||
wrefresh(w);
|
||||
}
|
||||
|
||||
inventory game::crafting_inventory(){
|
||||
inventory game::crafting_inventory(player *p){
|
||||
inventory crafting_inv;
|
||||
crafting_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
|
||||
crafting_inv += u.inv;
|
||||
crafting_inv += u.weapon;
|
||||
if (u.has_bionic("bio_tools")) {
|
||||
crafting_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
|
||||
crafting_inv += p->inv;
|
||||
crafting_inv += p->weapon;
|
||||
if (p->has_bionic("bio_tools")) {
|
||||
item tools(item_controller->find_template("toolset"), turn);
|
||||
tools.charges = u.power_level;
|
||||
tools.charges = p->power_level;
|
||||
crafting_inv += tools;
|
||||
}
|
||||
return crafting_inv;
|
||||
@@ -995,7 +996,8 @@ void game::complete_craft()
|
||||
|
||||
// farsightedness can impose a penalty on electronics and tailoring success
|
||||
// it's equivalent to a 2-rank electronics penalty, 1-rank tailoring
|
||||
if (u.has_trait(PF_HYPEROPIC) && !u.is_wearing("glasses_reading")) {
|
||||
if (u.has_trait(PF_HYPEROPIC) && !u.is_wearing("glasses_reading")
|
||||
&& !u.is_wearing("glasses_bifocal")) {
|
||||
int main_rank_penalty = 0;
|
||||
if (making->sk_primary == Skill::skill("electronics")) {
|
||||
main_rank_penalty = 2;
|
||||
@@ -1035,15 +1037,15 @@ void game::complete_craft()
|
||||
if (making->difficulty != 0 && diff_roll > skill_roll * (1 + 0.1 * rng(1, 5))) {
|
||||
add_msg("You fail to make the %s, and waste some materials.",
|
||||
item_controller->find_template(making->result)->name.c_str());
|
||||
for (int i = 0; i < making->components.size(); i++)
|
||||
for (int i = 0; i < making->components.size(); i++)
|
||||
{
|
||||
if (making->components[i].size() > 0)
|
||||
consume_items(making->components[i]);
|
||||
}
|
||||
|
||||
consume_items(&u, making->components[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < making->tools.size(); i++) {
|
||||
if (making->tools[i].size() > 0)
|
||||
consume_tools(making->tools[i]);
|
||||
consume_tools(&u, making->tools[i], false);
|
||||
}
|
||||
u.activity.type = ACT_NULL;
|
||||
return;
|
||||
@@ -1058,31 +1060,50 @@ void game::complete_craft()
|
||||
}
|
||||
// If we're here, the craft was a success!
|
||||
// Use up the components and tools
|
||||
std::list<item> used;
|
||||
for (int i = 0; i < making->components.size(); i++) {
|
||||
if (making->components[i].size() > 0)
|
||||
consume_items(making->components[i]);
|
||||
if (making->components[i].size() > 0) {
|
||||
std::list<item> tmp = consume_items(&u, making->components[i]);
|
||||
used.splice(used.end(), tmp);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < making->tools.size(); i++) {
|
||||
if (making->tools[i].size() > 0)
|
||||
consume_tools(making->tools[i]);
|
||||
consume_tools(&u, making->tools[i], false);
|
||||
}
|
||||
|
||||
// Set up the new item, and pick an inventory letter
|
||||
int iter = 0;
|
||||
item newit(item_controller->find_template(making->result), turn, nextinv);
|
||||
|
||||
if (newit.is_armor() && newit.has_flag(IF_VARSIZE))
|
||||
if (newit.is_armor() && newit.has_flag("VARSIZE"))
|
||||
{
|
||||
newit.item_flags |= mfb(IF_FIT);
|
||||
newit.item_tags.insert("FIT");
|
||||
}
|
||||
float used_age_tally = 0;
|
||||
int used_age_count = 0;
|
||||
for (std::list<item>::iterator iter = used.begin(); iter != used.end(); ++iter)
|
||||
{
|
||||
if (iter->goes_bad())
|
||||
{
|
||||
used_age_tally += ((int)turn - iter->bday)/
|
||||
(float)(dynamic_cast<it_comest*>(iter->type)->spoils);
|
||||
++used_age_count;
|
||||
}
|
||||
}
|
||||
if (used_age_count > 0 && newit.goes_bad())
|
||||
{
|
||||
const int average_used_age = (used_age_tally / used_age_count) * dynamic_cast<it_comest*>(newit.type)->spoils;
|
||||
newit.bday = newit.bday - average_used_age;
|
||||
}
|
||||
// for food items
|
||||
if (newit.is_food())
|
||||
{
|
||||
int bday_tmp = turn % 3600; // fuzzy birthday for stacking reasons
|
||||
newit.bday = int(turn) + 3600 - bday_tmp;
|
||||
int bday_tmp = newit.bday % 3600; // fuzzy birthday for stacking reasons
|
||||
newit.bday = int(newit.bday) + 3600 - bday_tmp;
|
||||
|
||||
if (newit.has_flag(IF_EATEN_HOT)) { // hot foods generated
|
||||
newit.item_flags |= mfb(IF_HOT);
|
||||
if (newit.has_flag("EATEN_HOT")) { // hot foods generated
|
||||
newit.item_tags.insert("HOT");
|
||||
newit.active = true;
|
||||
newit.item_counter = 600;
|
||||
}
|
||||
@@ -1102,175 +1123,231 @@ void game::complete_craft()
|
||||
if (iter == inv_chars.size() || u.volume_carried()+newit.volume() > u.volume_capacity()) {
|
||||
add_msg("There's no room in your inventory for the %s, so you drop it.",
|
||||
newit.tname().c_str());
|
||||
m.add_item(u.posx, u.posy, newit);
|
||||
m.add_item(u.posx, u.posy, newit, MAX_ITEM_IN_SQUARE);
|
||||
} else if (u.weight_carried() + newit.volume() > u.weight_capacity()) {
|
||||
add_msg("The %s is too heavy to carry, so you drop it.",
|
||||
newit.tname().c_str());
|
||||
m.add_item(u.posx, u.posy, newit);
|
||||
m.add_item(u.posx, u.posy, newit, MAX_ITEM_IN_SQUARE);
|
||||
} else {
|
||||
u.i_add(newit);
|
||||
newit = u.i_add(newit);
|
||||
add_msg("%c - %s", newit.invlet, newit.tname().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void game::consume_items(std::vector<component> components)
|
||||
std::list<item> game::consume_items(player *p, std::vector<component> components)
|
||||
{
|
||||
// For each set of components in the recipe, fill you_have with the list of all
|
||||
// matching ingredients the player has.
|
||||
std::vector<component> player_has;
|
||||
std::vector<component> map_has;
|
||||
std::vector<component> mixed;
|
||||
std::vector<component> player_use;
|
||||
std::vector<component> map_use;
|
||||
std::vector<component> mixed_use;
|
||||
inventory map_inv;
|
||||
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
|
||||
std::list<item> ret;
|
||||
// For each set of components in the recipe, fill you_have with the list of all
|
||||
// matching ingredients the player has.
|
||||
std::vector<component> player_has;
|
||||
std::vector<component> map_has;
|
||||
std::vector<component> mixed;
|
||||
std::vector<component> player_use;
|
||||
std::vector<component> map_use;
|
||||
std::vector<component> mixed_use;
|
||||
inventory map_inv;
|
||||
map_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
|
||||
|
||||
for (int i = 0; i < components.size(); i++) {
|
||||
itype_id type = components[i].type;
|
||||
int count = abs(components[i].count);
|
||||
bool pl = false, mp = false;
|
||||
|
||||
if (components[i].available != 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < components.size(); i++)
|
||||
{
|
||||
itype_id type = components[i].type;
|
||||
int count = abs(components[i].count);
|
||||
bool pl = false, mp = false;
|
||||
|
||||
if (item_controller->find_template(type)->count_by_charges() && count > 0)
|
||||
{
|
||||
if (u.has_charges(type, count)) {
|
||||
player_has.push_back(components[i]);
|
||||
pl = true;
|
||||
}
|
||||
if (map_inv.has_charges(type, count)) {
|
||||
map_has.push_back(components[i]);
|
||||
mp = true;
|
||||
}
|
||||
if (!pl && !mp && u.charges_of(type) + map_inv.charges_of(type) >= count)
|
||||
mixed.push_back(components[i]);
|
||||
}
|
||||
if (components[i].available != 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
else { // Counting by units, not charges
|
||||
if (item_controller->find_template(type)->count_by_charges() && count > 0)
|
||||
{
|
||||
if (p->has_charges(type, count))
|
||||
{
|
||||
player_has.push_back(components[i]);
|
||||
pl = true;
|
||||
}
|
||||
if (map_inv.has_charges(type, count))
|
||||
{
|
||||
map_has.push_back(components[i]);
|
||||
mp = true;
|
||||
}
|
||||
if (!pl && !mp && p->charges_of(type) + map_inv.charges_of(type) >= count)
|
||||
{
|
||||
mixed.push_back(components[i]);
|
||||
}
|
||||
}
|
||||
else // Counting by units, not charges
|
||||
{
|
||||
|
||||
if (u.has_amount(type, count)) {
|
||||
player_has.push_back(components[i]);
|
||||
pl = true;
|
||||
}
|
||||
if (map_inv.has_amount(type, count)) {
|
||||
map_has.push_back(components[i]);
|
||||
mp = true;
|
||||
}
|
||||
if (!pl && !mp && u.amount_of(type) + map_inv.amount_of(type) >= count)
|
||||
mixed.push_back(components[i]);
|
||||
if (p->has_amount(type, count))
|
||||
{
|
||||
player_has.push_back(components[i]);
|
||||
pl = true;
|
||||
}
|
||||
if (map_inv.has_amount(type, count))
|
||||
{
|
||||
map_has.push_back(components[i]);
|
||||
mp = true;
|
||||
}
|
||||
if (!pl && !mp && p->amount_of(type) + map_inv.amount_of(type) >= count)
|
||||
{
|
||||
mixed.push_back(components[i]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (player_has.size() + map_has.size() + mixed.size() == 1) { // Only 1 choice
|
||||
if (player_has.size() == 1)
|
||||
player_use.push_back(player_has[0]);
|
||||
else if (map_has.size() == 1)
|
||||
map_use.push_back(map_has[0]);
|
||||
else
|
||||
mixed_use.push_back(mixed[0]);
|
||||
if (player_has.size() + map_has.size() + mixed.size() == 1) // Only 1 choice
|
||||
{
|
||||
if (player_has.size() == 1)
|
||||
{
|
||||
player_use.push_back(player_has[0]);
|
||||
}
|
||||
else if (map_has.size() == 1)
|
||||
{
|
||||
map_use.push_back(map_has[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
mixed_use.push_back(mixed[0]);
|
||||
}
|
||||
}
|
||||
else // Let the player pick which component they want to use
|
||||
{
|
||||
std::vector<std::string> options; // List for the menu_vec below
|
||||
// Populate options with the names of the items
|
||||
for (int i = 0; i < map_has.size(); i++)
|
||||
{
|
||||
std::string tmpStr = item_controller->find_template(map_has[i].type)->name + " (nearby)";
|
||||
options.push_back(tmpStr);
|
||||
}
|
||||
for (int i = 0; i < player_has.size(); i++)
|
||||
{
|
||||
options.push_back(item_controller->find_template(player_has[i].type)->name);
|
||||
}
|
||||
for (int i = 0; i < mixed.size(); i++)
|
||||
{
|
||||
std::string tmpStr = item_controller->find_template(mixed[i].type)->name +" (on person & nearby)";
|
||||
options.push_back(tmpStr);
|
||||
}
|
||||
|
||||
} else { // Let the player pick which component they want to use
|
||||
std::vector<std::string> options; // List for the menu_vec below
|
||||
// Populate options with the names of the items
|
||||
for (int i = 0; i < map_has.size(); i++) {
|
||||
std::string tmpStr = item_controller->find_template(map_has[i].type)->name + " (nearby)";
|
||||
options.push_back(tmpStr);
|
||||
}
|
||||
for (int i = 0; i < player_has.size(); i++)
|
||||
options.push_back(item_controller->find_template(player_has[i].type)->name);
|
||||
for (int i = 0; i < mixed.size(); i++) {
|
||||
std::string tmpStr = item_controller->find_template(mixed[i].type)->name +" (on person & nearby)";
|
||||
options.push_back(tmpStr);
|
||||
}
|
||||
// unlike with tools, it's a bad thing if there aren't any components available
|
||||
if (options.size() == 0)
|
||||
{
|
||||
debugmsg("Attempted a recipe with no available components!");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (options.size() == 0) // This SHOULD only happen if cooking with a fire,
|
||||
return; // and the fire goes out.
|
||||
// Get the selection via a menu popup
|
||||
int selection = menu_vec(false, "Use which component?", options) - 1;
|
||||
if (selection < map_has.size())
|
||||
{
|
||||
map_use.push_back(map_has[selection]);
|
||||
}
|
||||
else if (selection < map_has.size() + player_has.size())
|
||||
{
|
||||
selection -= map_has.size();
|
||||
player_use.push_back(player_has[selection]);
|
||||
}
|
||||
else
|
||||
{
|
||||
selection -= map_has.size() + player_has.size();
|
||||
mixed_use.push_back(mixed[selection]);
|
||||
}
|
||||
}
|
||||
|
||||
// Get the selection via a menu popup
|
||||
int selection = menu_vec(false, "Use which component?", options) - 1;
|
||||
if (selection < map_has.size())
|
||||
map_use.push_back(map_has[selection]);
|
||||
else if (selection < map_has.size() + player_has.size()) {
|
||||
selection -= map_has.size();
|
||||
player_use.push_back(player_has[selection]);
|
||||
} else {
|
||||
selection -= map_has.size() + player_has.size();
|
||||
mixed_use.push_back(mixed[selection]);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < player_use.size(); i++) {
|
||||
if (item_controller->find_template(player_use[i].type)->count_by_charges() &&
|
||||
player_use[i].count > 0)
|
||||
u.use_charges(player_use[i].type, player_use[i].count);
|
||||
else
|
||||
u.use_amount(player_use[i].type, abs(player_use[i].count),
|
||||
(player_use[i].count < 0));
|
||||
}
|
||||
for (int i = 0; i < map_use.size(); i++) {
|
||||
if (item_controller->find_template(map_use[i].type)->count_by_charges() &&
|
||||
map_use[i].count > 0)
|
||||
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
map_use[i].type, map_use[i].count);
|
||||
else
|
||||
m.use_amount(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
map_use[i].type, abs(map_use[i].count),
|
||||
(map_use[i].count < 0));
|
||||
}
|
||||
for (int i = 0; i < mixed_use.size(); i++) {
|
||||
if (item_controller->find_template(mixed_use[i].type)->count_by_charges() &&
|
||||
mixed_use[i].count > 0) {
|
||||
int from_map = mixed_use[i].count - u.charges_of(mixed_use[i].type);
|
||||
u.use_charges(mixed_use[i].type, u.charges_of(mixed_use[i].type));
|
||||
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
mixed_use[i].type, from_map);
|
||||
} else {
|
||||
bool in_container = (mixed_use[i].count < 0);
|
||||
int from_map = abs(mixed_use[i].count) - u.amount_of(mixed_use[i].type);
|
||||
u.use_amount(mixed_use[i].type, u.amount_of(mixed_use[i].type),
|
||||
in_container);
|
||||
m.use_amount(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
mixed_use[i].type, from_map, in_container);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < player_use.size(); i++)
|
||||
{
|
||||
if (item_controller->find_template(player_use[i].type)->count_by_charges() &&
|
||||
player_use[i].count > 0)
|
||||
{
|
||||
std::list<item> tmp = p->use_charges(player_use[i].type, player_use[i].count);
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::list<item> tmp = p->use_amount(player_use[i].type, abs(player_use[i].count),
|
||||
(player_use[i].count < 0));
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < map_use.size(); i++)
|
||||
{
|
||||
if (item_controller->find_template(map_use[i].type)->count_by_charges() &&
|
||||
map_use[i].count > 0)
|
||||
{
|
||||
std::list<item> tmp = m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
map_use[i].type, map_use[i].count);
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::list<item> tmp = m.use_amount(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
map_use[i].type, abs(map_use[i].count),
|
||||
(map_use[i].count < 0));
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < mixed_use.size(); i++)
|
||||
{
|
||||
if (item_controller->find_template(mixed_use[i].type)->count_by_charges() &&
|
||||
mixed_use[i].count > 0)
|
||||
{
|
||||
int from_map = mixed_use[i].count - p->charges_of(mixed_use[i].type);
|
||||
std::list<item> tmp;
|
||||
tmp = p->use_charges(mixed_use[i].type, p->charges_of(mixed_use[i].type));
|
||||
ret.splice(ret.end(), tmp);
|
||||
tmp = m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
mixed_use[i].type, from_map);
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool in_container = (mixed_use[i].count < 0);
|
||||
int from_map = abs(mixed_use[i].count) - p->amount_of(mixed_use[i].type);
|
||||
std::list<item> tmp;
|
||||
tmp = p->use_amount(mixed_use[i].type, p->amount_of(mixed_use[i].type),
|
||||
in_container);
|
||||
ret.splice(ret.end(), tmp);
|
||||
tmp = m.use_amount(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
mixed_use[i].type, from_map, in_container);
|
||||
ret.splice(ret.end(), tmp);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void game::consume_tools(std::vector<component> tools)
|
||||
void game::consume_tools(player *p, std::vector<component> tools, bool force_available)
|
||||
{
|
||||
bool found_nocharge = false;
|
||||
inventory map_inv;
|
||||
map_inv.form_from_map(this, point(u.posx, u.posy), PICKUP_RANGE);
|
||||
map_inv.form_from_map(this, point(p->posx, p->posy), PICKUP_RANGE);
|
||||
std::vector<component> player_has;
|
||||
std::vector<component> map_has;
|
||||
// Use charges of any tools that require charges used
|
||||
for (int i = 0; i < tools.size() && !found_nocharge; i++) {
|
||||
if (tools[i].available != 1)
|
||||
if (!force_available && tools[i].available != 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
itype_id type = tools[i].type;
|
||||
if (tools[i].count > 0) {
|
||||
int count = tools[i].count;
|
||||
if (u.has_charges(type, count))
|
||||
if (p->has_charges(type, count))
|
||||
player_has.push_back(tools[i]);
|
||||
if (map_inv.has_charges(type, count))
|
||||
map_has.push_back(tools[i]);
|
||||
} else if (u.has_amount(type, 1) || map_inv.has_amount(type, 1))
|
||||
} else if (p->has_amount(type, 1) || map_inv.has_amount(type, 1))
|
||||
found_nocharge = true;
|
||||
}
|
||||
if (found_nocharge)
|
||||
return; // Default to using a tool that doesn't require charges
|
||||
|
||||
if (player_has.size() == 1 && map_has.size() == 0)
|
||||
u.use_charges(player_has[0].type, player_has[0].count);
|
||||
p->use_charges(player_has[0].type, player_has[0].count);
|
||||
else if (map_has.size() == 1 && player_has.size() == 0)
|
||||
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
map_has[0].type, map_has[0].count);
|
||||
else { // Variety of options, list them and pick one
|
||||
// Populate the list
|
||||
@@ -1288,11 +1365,11 @@ void game::consume_tools(std::vector<component> tools)
|
||||
// Get selection via a popup menu
|
||||
int selection = menu_vec(false, "Use which tool?", options) - 1;
|
||||
if (selection < map_has.size())
|
||||
m.use_charges(point(u.posx, u.posy), PICKUP_RANGE,
|
||||
m.use_charges(point(p->posx, p->posy), PICKUP_RANGE,
|
||||
map_has[selection].type, map_has[selection].count);
|
||||
else {
|
||||
selection -= map_has.size();
|
||||
u.use_charges(player_has[selection].type, player_has[selection].count);
|
||||
p->use_charges(player_has[selection].type, player_has[selection].count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1330,7 +1407,7 @@ void game::disassemble(char ch)
|
||||
{
|
||||
// check tools are available
|
||||
// loop over the tools and see what's required...again
|
||||
inventory crafting_inv = crafting_inventory();
|
||||
inventory crafting_inv = crafting_inventory(&u);
|
||||
bool have_all_tools = true;
|
||||
for (int j = 0; j < cur_recipe->tools.size(); j++)
|
||||
{
|
||||
@@ -1373,7 +1450,7 @@ void game::disassemble(char ch)
|
||||
int req = cur_recipe->tools[j][0].count;
|
||||
if (cur_recipe->tools[j][0].type == "welder")
|
||||
{
|
||||
add_msg("You need a hack saw to disassemble this.");
|
||||
add_msg("You need a hacksaw to disassemble this.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1394,7 +1471,7 @@ void game::disassemble(char ch)
|
||||
// all tools present, so assign the activity
|
||||
if (have_all_tools)
|
||||
{
|
||||
|
||||
|
||||
if (OPTIONS[OPT_QUERY_DISASSEMBLE] && !(query_yn("Really disassemble your %s?", dis_item->tname(this).c_str())))
|
||||
{
|
||||
return;
|
||||
@@ -1421,7 +1498,7 @@ void game::complete_disassemble()
|
||||
|
||||
add_msg("You disassemble the item into its components.");
|
||||
// remove any batteries or ammo first
|
||||
if (dis_item->is_gun() && dis_item->curammo != NULL && dis_item->ammo_type() != AT_NULL)
|
||||
if (dis_item->is_gun() && dis_item->curammo != NULL && dis_item->ammo_type() != "NULL")
|
||||
{
|
||||
item ammodrop;
|
||||
ammodrop = item(dis_item->curammo, turn);
|
||||
@@ -1429,17 +1506,20 @@ void game::complete_disassemble()
|
||||
if (ammodrop.made_of(LIQUID))
|
||||
handle_liquid(ammodrop, false, false);
|
||||
else
|
||||
m.add_item(u.posx, u.posy, ammodrop);
|
||||
m.add_item(u.posx, u.posy, ammodrop, MAX_ITEM_IN_SQUARE);
|
||||
}
|
||||
if (dis_item->is_tool() && dis_item->charges > 0 && dis_item->ammo_type() != AT_NULL)
|
||||
if (dis_item->is_tool() && dis_item->charges > 0 && dis_item->ammo_type() != "NULL")
|
||||
{
|
||||
item ammodrop;
|
||||
ammodrop = item(item_controller->find_template(default_ammo(dis_item->ammo_type())), turn);
|
||||
ammodrop.charges = dis_item->charges;
|
||||
if (dis_item->typeId() == "adv_UPS_off" || dis_item->typeId() == "adv_UPS_on") {
|
||||
ammodrop.charges /= 500;
|
||||
}
|
||||
if (ammodrop.made_of(LIQUID))
|
||||
handle_liquid(ammodrop, false, false);
|
||||
else
|
||||
m.add_item(u.posx, u.posy, ammodrop);
|
||||
m.add_item(u.posx, u.posy, ammodrop, MAX_ITEM_IN_SQUARE);
|
||||
}
|
||||
u.i_rem(u.activity.values[0]); // remove the item
|
||||
|
||||
@@ -1447,7 +1527,7 @@ void game::complete_disassemble()
|
||||
for (int j = 0; j < dis->tools.size(); j++)
|
||||
{
|
||||
if (dis->tools[j].size() > 0)
|
||||
consume_tools(dis->tools[j]);
|
||||
consume_tools(&u, dis->tools[j], false);
|
||||
}
|
||||
|
||||
// add the components to the map
|
||||
@@ -1489,14 +1569,14 @@ void game::complete_disassemble()
|
||||
if (newit.count_by_charges())
|
||||
{
|
||||
if (dis->difficulty == 0 || comp_success)
|
||||
m.spawn_item(u.posx, u.posy, item_controller->find_template(dis->components[j][0].type), 0, 0, compcount);
|
||||
m.spawn_item(u.posx, u.posy, dis->components[j][0].type, 0, 0, compcount);
|
||||
else
|
||||
add_msg("You fail to recover a component.");
|
||||
compcount = 0;
|
||||
} else
|
||||
{
|
||||
if (dis->difficulty == 0 || comp_success)
|
||||
m.add_item(u.posx, u.posy, newit);
|
||||
m.add_item(u.posx, u.posy, newit, MAX_ITEM_IN_SQUARE);
|
||||
else
|
||||
add_msg("You fail to recover a component.");
|
||||
compcount--;
|
||||
|
||||
+4
-4
@@ -49,14 +49,14 @@ struct recipe {
|
||||
autolearn = false;
|
||||
}
|
||||
|
||||
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, const char *p1,
|
||||
const char *p2, int pdiff, int ptime, bool preversible, bool pautolearn,
|
||||
recipe(std::string pident, int pid, itype_id pres, craft_cat pcat, std::string &p1,
|
||||
std::string &p2, int pdiff, int ptime, bool preversible, bool pautolearn,
|
||||
int plearn_dis) :
|
||||
ident (pident), id (pid), result (pres), cat(pcat), difficulty (pdiff), time (ptime),
|
||||
reversible (preversible), autolearn (pautolearn), learn_by_disassembly (plearn_dis)
|
||||
{
|
||||
sk_primary = p1?Skill::skill(p1):NULL;
|
||||
sk_secondary = p2?Skill::skill(p2):NULL;
|
||||
sk_primary = p1.size()?Skill::skill(p1):NULL;
|
||||
sk_secondary = p2.size()?Skill::skill(p2):NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
#ifndef _CURSES_DEF_H_
|
||||
#define _CURSES_DEF_H_
|
||||
|
||||
#if (defined _WIN32 || defined WINDOWS)
|
||||
#include "catacurse.h"
|
||||
#if (defined TILES || defined _WIN32 || defined WINDOWS)
|
||||
#include "catacurse.h"
|
||||
#elif (defined __CYGWIN__)
|
||||
#include "ncurses/curses.h"
|
||||
#include "ncurses/curses.h"
|
||||
#else
|
||||
#include <curses.h>
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#endif // CURSES_DEF_H
|
||||
|
||||
+604
@@ -0,0 +1,604 @@
|
||||
#if (defined TILES || defined _WIN32 || defined WINDOWS)
|
||||
#include "catacurse.h"
|
||||
#include "output.h"
|
||||
#include "color.h"
|
||||
#include "catacharset.h"
|
||||
|
||||
//***********************************
|
||||
//Globals *
|
||||
//***********************************
|
||||
|
||||
WINDOW *mainwin;
|
||||
pairs *colorpairs; //storage for pair'ed colored, should be dynamic, meh
|
||||
int echoOn; //1 = getnstr shows input, 0 = doesn't show. needed for echo()-ncurses compatibility.
|
||||
|
||||
//***********************************
|
||||
//Psuedo-Curses Functions *
|
||||
//***********************************
|
||||
|
||||
//Basic Init, create the font, backbuffer, etc
|
||||
WINDOW *initscr(void)
|
||||
{
|
||||
return curses_init();
|
||||
}
|
||||
|
||||
WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x)
|
||||
{
|
||||
if (begin_y < 0 || begin_x < 0) {
|
||||
return NULL; //it's the caller's problem now (since they have logging functions declared)
|
||||
}
|
||||
|
||||
// default values
|
||||
if (ncols == 0)
|
||||
{
|
||||
ncols = TERMX - begin_x;
|
||||
}
|
||||
if (nlines == 0)
|
||||
{
|
||||
nlines = TERMY - begin_y;
|
||||
}
|
||||
|
||||
int i,j;
|
||||
WINDOW *newwindow = new WINDOW;
|
||||
//newwindow=&_windows[WindowCount];
|
||||
newwindow->x=begin_x;
|
||||
newwindow->y=begin_y;
|
||||
newwindow->width=ncols;
|
||||
newwindow->height=nlines;
|
||||
newwindow->inuse=true;
|
||||
newwindow->draw=false;
|
||||
newwindow->BG=0;
|
||||
newwindow->FG=8;
|
||||
newwindow->cursorx=0;
|
||||
newwindow->cursory=0;
|
||||
newwindow->line = new curseline[nlines];
|
||||
|
||||
for (j=0; j<nlines; j++)
|
||||
{
|
||||
newwindow->line[j].chars= new char[ncols*4];
|
||||
newwindow->line[j].FG= new char[ncols];
|
||||
newwindow->line[j].BG= new char[ncols];
|
||||
newwindow->line[j].touched=true;//Touch them all !?
|
||||
newwindow->line[j].width_in_bytes = ncols;
|
||||
for (i=0; i<ncols; i++)
|
||||
{
|
||||
newwindow->line[j].chars[i]=0;
|
||||
newwindow->line[j].chars[i+1]=0;
|
||||
newwindow->line[j].chars[i+2]=0;
|
||||
newwindow->line[j].chars[i+3]=0;
|
||||
newwindow->line[j].FG[i]=0;
|
||||
newwindow->line[j].BG[i]=0;
|
||||
}
|
||||
}
|
||||
//WindowCount++;
|
||||
return newwindow;
|
||||
}
|
||||
|
||||
//Deletes the window and marks it as free. Clears it just in case.
|
||||
int delwin(WINDOW *win)
|
||||
{
|
||||
int j;
|
||||
win->inuse=false;
|
||||
win->draw=false;
|
||||
for (j=0; j<win->height; j++){
|
||||
delete win->line[j].chars;
|
||||
delete win->line[j].FG;
|
||||
delete win->line[j].BG;
|
||||
}
|
||||
delete win->line;
|
||||
delete win;
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline int newline(WINDOW *win){
|
||||
if (win->cursory < win->height - 1){
|
||||
win->cursory++;
|
||||
win->cursorx=0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void addedchar(WINDOW *win){
|
||||
win->cursorx++;
|
||||
win->line[win->cursory].touched=true;
|
||||
if (win->cursorx > win->width)
|
||||
newline(win);
|
||||
}
|
||||
|
||||
|
||||
//Borders the window with fancy lines!
|
||||
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
|
||||
{
|
||||
/*
|
||||
ncurses does not do this, and this prevents: wattron(win, c_customBordercolor); wborder(win, ...); wattroff(win, c_customBorderColor);
|
||||
wattron(win, c_white);
|
||||
*/
|
||||
int i, j;
|
||||
int oldx=win->cursorx;//methods below move the cursor, save the value!
|
||||
int oldy=win->cursory;//methods below move the cursor, save the value!
|
||||
if (ls>0)
|
||||
for (j=1; j<win->height-1; j++)
|
||||
mvwaddch(win, j, 0, LINE_XOXO);
|
||||
if (rs>0)
|
||||
for (j=1; j<win->height-1; j++)
|
||||
mvwaddch(win, j, win->width-1, LINE_XOXO);
|
||||
if (ts>0)
|
||||
for (i=1; i<win->width-1; i++)
|
||||
mvwaddch(win, 0, i, LINE_OXOX);
|
||||
if (bs>0)
|
||||
for (i=1; i<win->width-1; i++)
|
||||
mvwaddch(win, win->height-1, i, LINE_OXOX);
|
||||
if (tl>0)
|
||||
mvwaddch(win,0, 0, LINE_OXXO);
|
||||
if (tr>0)
|
||||
mvwaddch(win,0, win->width-1, LINE_OOXX);
|
||||
if (bl>0)
|
||||
mvwaddch(win,win->height-1, 0, LINE_XXOO);
|
||||
if (br>0)
|
||||
mvwaddch(win,win->height-1, win->width-1, LINE_XOOX);
|
||||
//_windows[w].cursorx=oldx;//methods above move the cursor, put it back
|
||||
//_windows[w].cursory=oldy;//methods above move the cursor, put it back
|
||||
wmove(win,oldy,oldx);
|
||||
wattroff(win, c_white);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Refreshes a window, causing it to redraw on top.
|
||||
int wrefresh(WINDOW *win)
|
||||
{
|
||||
if (win==0) win=mainwin;
|
||||
if (win->draw)
|
||||
curses_drawwindow(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Refreshes window 0 (stdscr), causing it to redraw on top.
|
||||
int refresh(void)
|
||||
{
|
||||
return wrefresh(mainwin);
|
||||
}
|
||||
|
||||
int getch(void)
|
||||
{
|
||||
return wgetch(mainwin);
|
||||
}
|
||||
|
||||
int wgetch(WINDOW* win)
|
||||
{
|
||||
return curses_getch(win);
|
||||
}
|
||||
|
||||
int mvgetch(int y, int x)
|
||||
{
|
||||
move(y,x);
|
||||
return getch();
|
||||
}
|
||||
|
||||
int mvwgetch(WINDOW* win, int y, int x)
|
||||
{
|
||||
move(y, x);
|
||||
return wgetch(win);
|
||||
}
|
||||
|
||||
int getnstr(char *str, int size)
|
||||
{
|
||||
int startX = mainwin->cursorx;
|
||||
int count = 0;
|
||||
char input;
|
||||
while(true)
|
||||
{
|
||||
input = getch();
|
||||
// Carriage return, Line feed and End of File terminate the input.
|
||||
if( input == '\r' || input == '\n' || input == '\x04' )
|
||||
{
|
||||
str[count] = '\x00';
|
||||
return count;
|
||||
}
|
||||
else if( input == 127 ) // Backspace, remapped from \x8 in ProcessMessages()
|
||||
{
|
||||
if( count == 0 )
|
||||
continue;
|
||||
str[count] = '\x00';
|
||||
if(echoOn == 1)
|
||||
mvaddch(mainwin->cursory, startX + count, ' ');
|
||||
--count;
|
||||
if(echoOn == 1)
|
||||
move(mainwin->cursory, startX + count);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( count >= size - 1 ) // Still need space for trailing 0x00
|
||||
continue;
|
||||
str[count] = input;
|
||||
++count;
|
||||
if(echoOn == 1)
|
||||
{
|
||||
move(mainwin->cursory, startX + count);
|
||||
mvaddch(mainwin->cursory, startX + count, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
//The core printing function, prints characters to the array, and sets colors
|
||||
inline int printstring(WINDOW *win, char *fmt)
|
||||
{
|
||||
int size = strlen(fmt);
|
||||
if(size>0)
|
||||
{
|
||||
int j, i, p=win->cursorx;
|
||||
int x = (win->line[win->cursory].width_in_bytes==win->width)?win->cursorx:cursorx_to_position(win->line[win->cursory].chars, win->cursorx, &p);
|
||||
|
||||
if(p!=x)//so we start inside a wide character, erase it for good
|
||||
{
|
||||
const char* ts = win->line[win->cursory].chars+p;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &len);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
erease_utf8_by_cw(win->line[win->cursory].chars+p, tw, tw, win->width*4-p-1);
|
||||
x = p+tw-1;
|
||||
}
|
||||
for (j=0; j<size; j++){
|
||||
if (!(fmt[j]==10)){//check that this isnt a newline char
|
||||
const char* utf8str = fmt+j;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned ch = UTF8_getch(&utf8str, &len);
|
||||
int cw = mk_wcwidth((wchar_t)ch);
|
||||
len = ANY_LENGTH-len;
|
||||
if(cw<1) cw = 1;
|
||||
if(len<1) len = 1;
|
||||
if (win->cursorx+cw <= win->width && win->cursory <= win->height - 1) {
|
||||
win->line[win->cursory].width_in_bytes += erease_utf8_by_cw(win->line[win->cursory].chars+x, cw, len, win->width*4-x-1);
|
||||
for(i=0; i<len; i++)
|
||||
{
|
||||
win->line[win->cursory].chars[x+i]=fmt[j+i];
|
||||
}
|
||||
for(i=0; i<cw; i++)
|
||||
{
|
||||
win->line[win->cursory].FG[win->cursorx]=win->FG;
|
||||
win->line[win->cursory].BG[win->cursorx]=win->BG;
|
||||
addedchar(win);
|
||||
}
|
||||
win->line[win->cursory].touched=true;
|
||||
j += len-1;
|
||||
x+=len;
|
||||
} else if (win->cursory <= win->height - 1) {
|
||||
// don't write outside the window, but don't abort if there are still lines to write.
|
||||
//j += len-1;
|
||||
//x+=len;
|
||||
} else {
|
||||
return 0; //if we try and write anything outside the window, abort completely
|
||||
}
|
||||
} else {// if the character is a newline, make sure to move down a line
|
||||
if (newline(win)==0){
|
||||
return 0;
|
||||
}
|
||||
x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
win->draw=true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Prints a formatted string to a window at the current cursor, base function
|
||||
int wprintw(WINDOW *win, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
return printstring(win,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to a window, moves the cursor
|
||||
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
if (wmove(win,y,x)==0) return 0;
|
||||
return printstring(win,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to window 0 (stdscr), moves the cursor
|
||||
int mvprintw(int y, int x, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2048];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
if (move(y,x)==0) return 0;
|
||||
return printstring(mainwin,printbuf);
|
||||
}
|
||||
|
||||
//Prints a formatted string to window 0 (stdscr) at the current cursor
|
||||
int printw(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char printbuf[2078];
|
||||
vsnprintf(printbuf, 2047, fmt, args);
|
||||
va_end(args);
|
||||
return printstring(mainwin,printbuf);
|
||||
}
|
||||
|
||||
//erases a window of all text and attributes
|
||||
int werase(WINDOW *win)
|
||||
{
|
||||
int j,i;
|
||||
for (j=0; j<win->height; j++)
|
||||
{
|
||||
for (i=0; i<win->width; i++) {
|
||||
win->line[j].chars[i]=0;
|
||||
win->line[j].chars[i+1]=0;
|
||||
win->line[j].chars[i+2]=0;
|
||||
win->line[j].chars[i+3]=0;
|
||||
win->line[j].FG[i]=0;
|
||||
win->line[j].BG[i]=0;
|
||||
}
|
||||
win->line[j].touched=true;
|
||||
win->line[j].width_in_bytes = win->width;
|
||||
}
|
||||
win->draw=true;
|
||||
wmove(win,0,0);
|
||||
// wrefresh(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
//erases window 0 (stdscr) of all text and attributes
|
||||
int erase(void)
|
||||
{
|
||||
return werase(mainwin);
|
||||
}
|
||||
|
||||
//pairs up a foreground and background color and puts it into the array of pairs
|
||||
int init_pair(short pair, short f, short b)
|
||||
{
|
||||
colorpairs[pair].FG=f;
|
||||
colorpairs[pair].BG=b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//moves the cursor in a window
|
||||
int wmove(WINDOW *win, int y, int x)
|
||||
{
|
||||
if (x>=win->width)
|
||||
{return 0;}//FIXES MAP CRASH -> >= vs > only
|
||||
if (y>=win->height)
|
||||
{return 0;}// > crashes?
|
||||
if (y<0)
|
||||
{return 0;}
|
||||
if (x<0)
|
||||
{return 0;}
|
||||
win->cursorx=x;
|
||||
win->cursory=y;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Clears windows 0 (stdscr) I'm not sure if its suppose to do this?
|
||||
int clear(void)
|
||||
{
|
||||
return wclear(mainwin);
|
||||
}
|
||||
|
||||
//Ends the terminal, destroy everything
|
||||
int endwin(void)
|
||||
{
|
||||
return curses_destroy();
|
||||
}
|
||||
|
||||
//adds a character to the window
|
||||
int mvwaddch(WINDOW *win, int y, int x, const chtype ch)
|
||||
{
|
||||
if (wmove(win,y,x)==0) return 0;
|
||||
return waddch(win, ch);
|
||||
}
|
||||
|
||||
//clears a window
|
||||
int wclear(WINDOW *win)
|
||||
{
|
||||
werase(win);
|
||||
clearok(win);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int clearok(WINDOW *win)
|
||||
{
|
||||
for (int i=0; i<win->y; i++)
|
||||
{
|
||||
win->line[i].touched = true;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//gets the max x of a window (the width)
|
||||
int getmaxx(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->width; //StdScr
|
||||
return win->width;
|
||||
}
|
||||
|
||||
//gets the max y of a window (the height)
|
||||
int getmaxy(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->height; //StdScr
|
||||
return win->height;
|
||||
}
|
||||
|
||||
//gets the beginning x of a window (the x pos)
|
||||
int getbegx(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->x; //StdScr
|
||||
return win->x;
|
||||
}
|
||||
|
||||
//gets the beginning y of a window (the y pos)
|
||||
int getbegy(WINDOW *win)
|
||||
{
|
||||
if (win==0) return mainwin->y; //StdScr
|
||||
return win->y;
|
||||
}
|
||||
|
||||
int start_color(void)
|
||||
{
|
||||
return curses_start_color();
|
||||
}
|
||||
|
||||
int keypad(WINDOW *faux, bool bf)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cbreak(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int keypad(int faux, bool bf)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int curs_set(int visibility)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int mvaddch(int y, int x, const chtype ch)
|
||||
{
|
||||
return mvwaddch(mainwin,y,x,ch);
|
||||
}
|
||||
|
||||
int wattron(WINDOW *win, int attrs)
|
||||
{
|
||||
bool isBold = !!(attrs & A_BOLD);
|
||||
bool isBlink = !!(attrs & A_BLINK);
|
||||
int pairNumber = (attrs & A_COLOR) >> 17;
|
||||
win->FG=colorpairs[pairNumber].FG;
|
||||
win->BG=colorpairs[pairNumber].BG;
|
||||
if (isBold) win->FG += 8;
|
||||
if (isBlink) win->BG += 8;
|
||||
return 1;
|
||||
}
|
||||
int wattroff(WINDOW *win, int attrs)
|
||||
{
|
||||
win->FG=8; //reset to white
|
||||
win->BG=0; //reset to black
|
||||
return 1;
|
||||
}
|
||||
int attron(int attrs)
|
||||
{
|
||||
return wattron(mainwin, attrs);
|
||||
}
|
||||
int attroff(int attrs)
|
||||
{
|
||||
return wattroff(mainwin,attrs);
|
||||
}
|
||||
int waddch(WINDOW *win, const chtype ch)
|
||||
{
|
||||
char charcode;
|
||||
charcode=ch;
|
||||
|
||||
switch (ch){ //LINE_NESW - X for on, O for off
|
||||
case LINE_XOXO: //#define LINE_XOXO 4194424
|
||||
charcode=LINE_XOXO_C;
|
||||
break;
|
||||
case LINE_OXOX: //#define LINE_OXOX 4194417
|
||||
charcode=LINE_OXOX_C;
|
||||
break;
|
||||
case LINE_XXOO: //#define LINE_XXOO 4194413
|
||||
charcode=LINE_XXOO_C;
|
||||
break;
|
||||
case LINE_OXXO: //#define LINE_OXXO 4194412
|
||||
charcode=LINE_OXXO_C;
|
||||
break;
|
||||
case LINE_OOXX: //#define LINE_OOXX 4194411
|
||||
charcode=LINE_OOXX_C;
|
||||
break;
|
||||
case LINE_XOOX: //#define LINE_XOOX 4194410
|
||||
charcode=LINE_XOOX_C;
|
||||
break;
|
||||
case LINE_XXOX: //#define LINE_XXOX 4194422
|
||||
charcode=LINE_XXOX_C;
|
||||
break;
|
||||
case LINE_XXXO: //#define LINE_XXXO 4194420
|
||||
charcode=LINE_XXXO_C;
|
||||
break;
|
||||
case LINE_XOXX: //#define LINE_XOXX 4194421
|
||||
charcode=LINE_XOXX_C;
|
||||
break;
|
||||
case LINE_OXXX: //#define LINE_OXXX 4194423
|
||||
charcode=LINE_OXXX_C;
|
||||
break;
|
||||
case LINE_XXXX: //#define LINE_XXXX 4194414
|
||||
charcode=LINE_XXXX_C;
|
||||
break;
|
||||
default:
|
||||
charcode = (char)ch;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
int cury=win->cursory;
|
||||
int p = win->cursorx;
|
||||
int curx=(win->line[cury].width_in_bytes==win->width)?win->cursorx:cursorx_to_position(win->line[cury].chars, win->cursorx, &p);
|
||||
|
||||
if(curx!=p)
|
||||
{
|
||||
const char* ts = win->line[cury].chars+p;
|
||||
int len = ANY_LENGTH;
|
||||
unsigned tc = UTF8_getch(&ts, &len);
|
||||
int tw = mk_wcwidth((wchar_t)tc);
|
||||
win->line[cury].width_in_bytes += erease_utf8_by_cw(win->line[cury].chars+p, tw, tw, win->width*4-p-1);
|
||||
curx = p+tw-1;
|
||||
}
|
||||
else if(win->line[cury].width_in_bytes!=win->width)
|
||||
{
|
||||
win->line[cury].width_in_bytes += erease_utf8_by_cw(win->line[cury].chars+p, 1, 1, win->width*4-p-1);
|
||||
}
|
||||
|
||||
//if (win2 > -1){
|
||||
win->line[cury].chars[curx]=charcode;
|
||||
win->line[cury].FG[win->cursorx]=win->FG;
|
||||
win->line[cury].BG[win->cursorx]=win->BG;
|
||||
|
||||
|
||||
win->draw=true;
|
||||
addedchar(win);
|
||||
return 1;
|
||||
// else{
|
||||
// win2=win2+1;
|
||||
|
||||
}
|
||||
|
||||
//Move the cursor of windows 0 (stdscr)
|
||||
int move(int y, int x)
|
||||
{
|
||||
return wmove(mainwin,y,x);
|
||||
}
|
||||
|
||||
//Set the amount of time getch waits for input
|
||||
void timeout(int delay)
|
||||
{
|
||||
curses_timeout(delay);
|
||||
}
|
||||
void set_escdelay(int delay) { } //PORTABILITY, DUMMY FUNCTION
|
||||
|
||||
|
||||
int echo()
|
||||
{
|
||||
echoOn = 1;
|
||||
return 0; // 0 = OK, -1 = ERR
|
||||
}
|
||||
|
||||
int noecho()
|
||||
{
|
||||
echoOn = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Terminus
|
||||
8
|
||||
16
|
||||
Terminus
|
||||
8
|
||||
16
|
||||
|
||||
Executable → Regular
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Executable → Regular
+245
-1
@@ -1,4 +1,248 @@
|
||||
Changelog will be a little light for the early entries due to me being really bad at documenting things.
|
||||
0.7
|
||||
|
||||
Highlights:
|
||||
---
|
||||
Use ncursesw and gettext for i18n support and expanded character palette.
|
||||
Configurable Autopickup feature.
|
||||
Configurable item spawning lists, now with more configurable spawn frequencies.
|
||||
New advanced bionics.
|
||||
|
||||
Features:
|
||||
---
|
||||
Use ncursesw and gettext for i18n support and expanded character palette.
|
||||
Configurable Autopickup feature.
|
||||
Configurable item spawning lists, now with more configurable spawn frequencies.
|
||||
Probability Travel Bionic (walk through walls!)
|
||||
Railgun Bionic (throw metal items at the speed of electricity!)
|
||||
Flashbang bionic.
|
||||
Shockwave Generator bionic.
|
||||
Chain Lightning bionic.
|
||||
Artificial Night bionic.
|
||||
Streamlined lumberjacking tasks.
|
||||
Splints are now craftable and (slowly!) heal broken limbs.
|
||||
Recover CBMs from butchered player corpses
|
||||
Small game arrow.
|
||||
Spoiled (rotten) items will now be removed from the map after twice the time it takes to spoil.
|
||||
Lit torches set enemies on fire.
|
||||
Toggled Metabolic Interchange bionic, active power sources.
|
||||
Changed Optimist to be more thematic and balanced.
|
||||
Morale effects have more flexible durations.
|
||||
Extensively reworked fire handling, e.g. campfires should last a more reasonable duration.
|
||||
Preserve martial art style selection across wielding/unwielding weapons.
|
||||
Simulate alt+number input for SDL version.
|
||||
Quicksave command.
|
||||
Added basic sludge crawler monster
|
||||
More crafting recipes.
|
||||
Stash knives in your boots.
|
||||
Folding bicycle you can stash in a trunk.
|
||||
New improvised guns.
|
||||
More survival-ish foods.
|
||||
Added some more heavy pistols and ammunition.
|
||||
New Improvised lockpick!
|
||||
Floatation Vest.
|
||||
Added wine and a new shirt.
|
||||
Towels.
|
||||
Fuzzy time display, and precise time with wristwatch item.
|
||||
|
||||
Bugfixes:
|
||||
---
|
||||
Multiple gates near one handle work correctly.
|
||||
Made wild Jabberwocks much more rare.
|
||||
Fix turrets shuffing around when off map.
|
||||
Prevent gibbing from low-damage sources.
|
||||
House generation fixes.
|
||||
Allow deconstruction of refrigerators.
|
||||
More consistent road placement.
|
||||
Make mongroups die propperly, even if the queen dies at a distance
|
||||
Monsters killed by wide attacks drop corpses/loot
|
||||
Fix solar panel power production on vehicles.
|
||||
Cleanup tire changing activity.
|
||||
Fix stunlock caused by counterattacks.
|
||||
Keep Jabberwocks from spawning in classic mode.
|
||||
Fix turret drops.
|
||||
Extensive text handling fixes.
|
||||
Menu beautification.
|
||||
Allow saving while in a vehicle.
|
||||
Fix div0 on bad option setting.
|
||||
|
||||
======
|
||||
|
||||
0.6
|
||||
|
||||
Highlights:
|
||||
---
|
||||
* Zombies will revive after a time, if not butchered (or otherwise dealt with).
|
||||
* The Android trait now behaves the way that the description indicates.
|
||||
* Gasoline can be siphoned from vehicles. Requires a rubber hose for now - these are easier to acquire.
|
||||
* Sewing requires materials other than thread - rags for cloth, leather patches for leather, kevlar bricks, plastic chunks.
|
||||
* Leather/Kevlar/plastic/fur repair/reinforcement actually possible!
|
||||
* Inventory management UI improvements, and a new screen to organize worn items.
|
||||
* NPCs continue to be less buggy, but are still prone to crashes.
|
||||
* Weapon firing code reworked a bit. UI improvements, and you should now be able to fire at anything within range.
|
||||
* Reworked the armor/protection code.
|
||||
* Reworked the learning system: replaced XP with Focus. See the relevant help text.
|
||||
* Added a *bunch* of new multi-stage missions, for those who play with the shelter NPC turned on.
|
||||
* Many new buildings (See full changelong list)
|
||||
* Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
|
||||
* Option to use triginometric distance instead of roguelike distance. In other words light, line of sight are circular instead of square.
|
||||
* Zombie density in towns is based on nearby buildings instead of distance from town center.
|
||||
* Higher-performance (on windows) SDL-based rendering as an optional build type.
|
||||
* Movement on and around vehicles greatly streamlined.
|
||||
* Sound indicator lets you know how much noise you're making.
|
||||
* Turn cost indicator lets you know how long actions take.
|
||||
* Overkilled monsters now spray gibs around instead of disapearing.
|
||||
* Mostly remove limits on how many items fit in a tile of ground.
|
||||
* As usual, many bugfixes.
|
||||
|
||||
Full list:
|
||||
---
|
||||
Purifier no longer removes traits available at chargen.
|
||||
Fix some calculations that wanted floating-point math, and were using integer math.
|
||||
Fix some vehicle collision craziness related to skids.
|
||||
Added zombie revival. Chance of unbutchered zombie corpses rezzing, once 6 hours have passed.
|
||||
Advanced inventory UI improvements/fixes.
|
||||
Dropping count-by-charge items (batteries, meds, etc.) into vehicles will cause restacking.
|
||||
Android trait always gives a power system bionic.
|
||||
Fix torso encumbrance display (it's smart about sign use now).
|
||||
Bitmask-based item flags no longer exist! Instead, we have string-based tags, that have no upper limit.
|
||||
Tweaked glowstick behavior - can no longer deactivate, and they have a dead state.
|
||||
Android trait should no longer give the player faulty bionics.
|
||||
Bolts moved to ammo category, like arrows.
|
||||
Added bone broth, and recipe.
|
||||
Adjust how Climate Control bionic works, make vehicles have functioning (magic!) AC.
|
||||
Added fuel siphoning using rubber hose.
|
||||
Appearance-improving mutations are now flagged as being good mutations.
|
||||
Welder charges are actually used during vehicle construction.
|
||||
Items will no longer become erroneously fitted, and item tags should not spread during map loading.
|
||||
Weather accounts for starting time properly.
|
||||
Containers can be unloaded again (they were bugged).
|
||||
Optimized scentmap updates, hopefully this speeds up certain activities.
|
||||
Pit-requiring constructions have pit digging as their first two stages, to make it more obvious what the prereqs are.
|
||||
Some menus (notably, inventory) can be navigated with arrow keys and enter.
|
||||
Allowing sewing of leather items, make sewing require rags/patches.
|
||||
Cooking rotten food does not make it magically fresh any more.
|
||||
Resolves an issue where destroying an item while tailoring would crash the game.
|
||||
New UI to sort clothing and automatically assign special characters to clothing (accessed via +)
|
||||
Footwear warmth values tweaked to be more flexible.
|
||||
Wool warmth is not reduced by rain.
|
||||
Sofas and armchairs help with sleeping.
|
||||
Temperature is less of an issue while sleeping.
|
||||
Warning messages for when the player is cold/hot while sleeping.
|
||||
Oversized clothing can be worn over anything (blankets, cloaks, etc).
|
||||
Sound interruptions can be categorically ignored while crafting, reading, etc.
|
||||
More improvements to the advanced inventory UI.
|
||||
Shrubs less difficult to smash.
|
||||
Upgraded versions of Fast Healer still give you bonuses while sleeping.
|
||||
Soldering iron recipe learnable via disassembly.
|
||||
Integrated toolset power usage normalized on a few recipes.
|
||||
Vehicle speed is now taken into account when throwing a character that exits a moving vehicle.
|
||||
Gasoline lanterns added to the game.
|
||||
Bifocal glasses added to the game.
|
||||
Tweak Windows (catacurse) colors.
|
||||
Correct window border color behavior under Windows.
|
||||
Add glass jars, make sauces spawn in them instead of in tin cans.
|
||||
Removed a couple NPC crash bugs.
|
||||
You can safely exit a vehicle moving less than 1 MPH.
|
||||
Fix a pair of drawing glitches related to the item pickup window.
|
||||
Remove the artificial delay when animating vehicle movement.
|
||||
Out-of-range enemies are still drawn when firing a weapon.
|
||||
Make it so that anything within range can be targeted with a ranged weapon.
|
||||
Disassembly recipe for vacuum sealer.
|
||||
Backspace no longer causes junk to be input during string entry.
|
||||
The overmap screen now lets you use "<" and ">" to view different z-levels.
|
||||
Reworked the armor/protection code.
|
||||
Fridges drop rubber hose instead of pipe when destroyed.
|
||||
Reworked the learning system: replaced XP with Focus. See the relevant help text.
|
||||
Autosave should save everything now, rather than a subset.
|
||||
Fix artifact saving/loading... again.
|
||||
Added new missions.
|
||||
Added cathedral to mapgen.
|
||||
Fixed flamethrowers.
|
||||
Add 40mm acid bomb shells.
|
||||
Moving furniture causes noise.
|
||||
Clothing damage descriptions now depend on the item's material.
|
||||
Gunmods now show "%" properly in the magazine size line.
|
||||
Add bicycle seats: low-mass seats that can't take a seatbelt.
|
||||
Vehicle collision physics are now based on *actual* physics! Reduces collision insanity.
|
||||
Foraging gives survival experience, even on failure.
|
||||
Disassembling ammo gives firearms experience.
|
||||
Ball bearings should hopefully drop now.
|
||||
Added headlights to a few more default vehicles.
|
||||
Lab coats can be fitted.
|
||||
Items in adjacent containers (fridges, lockers, etc.) visible with 'V' screen.
|
||||
Players can no longer examine sealed crates to see their contents.
|
||||
Funnels give acid water during acid rain :).
|
||||
Acid water (after refinement) now an alternate ingredient for acid bombs.
|
||||
Corrected a few item name typos.
|
||||
Cleaned up generation of a particular (spiral-y) underground room.
|
||||
More temperature tweaks.
|
||||
Being hot makes you MORE thirsty, not less.
|
||||
Reworked item unloading and reloading a bit to remove bugs.
|
||||
Flatbed trucks now have rear windows.
|
||||
Electric cars added as potential vehicle spawns.
|
||||
Fix some bugs related to known overmap data and leaking the state to other characters.
|
||||
Effects of current stats are shown on the '@' screen.
|
||||
Materials obtained from clothing depend on the clothing's damage level.
|
||||
Fixed some lab mapgen bugs.
|
||||
Mansions got a little love.
|
||||
Having too little intelligence for a book is more of a penalty.
|
||||
Vehicle headlight state is persistent after save-load.
|
||||
Being hot no longer increases thirst by an unreasonable amount
|
||||
Minor : temp_conv and dis.intensity are saved, fixing strange on-load inconsistencies
|
||||
Minor : Diseases that affect speed no longer overwrite eachother in the @ menu
|
||||
Clothing with pockets provides a bonus to hand warmth when not wielding a weapon.
|
||||
New large building with basement: Prison
|
||||
Basement level for hazardous waste sarcophagus.
|
||||
New building with basement: musterious cabin.
|
||||
Display recent log messages on player death.
|
||||
Radiation exposure is now more dangerous
|
||||
Mutations from radiation can be disabled.
|
||||
Mutation categories now more dominant.
|
||||
Added themed mutagens with recipes.
|
||||
New medical items.
|
||||
Bundle of plastic bags item for stowing bags.
|
||||
Rebalance chance of cutting weapons getting stuck, much less likely now.
|
||||
Smashing corpses prevents them from reviving.
|
||||
Burning corpses prevents them from reviving.
|
||||
Stopped players from leaving slime trails or webs while in a vehicle.
|
||||
Made vitamins have an effect again.
|
||||
Made multiple gasoline tanks drain properly.
|
||||
Added tiny pain effect to Acid Drizzle, raincoats now offer a bit of protection to acid rain/drizzle.
|
||||
Advanced inv: "e" pulls up inventory item menu. Help window displays feedback messages for actions taken. "?" toggles between help and msg viewer.
|
||||
Eliminate radiation dosage saturation, halving dosage rate to compensate. (radiation is slower, but more implacable)
|
||||
Fitting screen now shows storage and encumbrance in item columns.
|
||||
Added leather vest item and crafting recipe.
|
||||
avoid use of pow() in distance calculation, speeding them up an order of magnitude.
|
||||
Make blood filter remove all other drug based diseases.
|
||||
Make blood analysis detect all drugs.
|
||||
Behold, sharpie markers.
|
||||
Display actual keymapping instead of default one in most help text.
|
||||
Stopped bleeding, bites, and poison from applying when stopped by armor.
|
||||
Safely hop from slow-moving vehicles, get hurt from quick ones.
|
||||
Multidrop screen now shows a summary of what is about to be dropped.
|
||||
Sort inventory by item charges, use low-charge items first.
|
||||
Option to auto-save before sleep.
|
||||
Lava burns things and can be used for crafting.
|
||||
Multiple fixes to burst-fire targeting.
|
||||
Prevent turrets from shooting themselves.
|
||||
Prevent friendly turrets from trying to shoot through the player.
|
||||
Brasas catcher item to catch your brass for recrafting.
|
||||
More power armor variants.
|
||||
Make movement take half the cost of both the beginning and end tiles, instead of just taking the cost of the end tile.
|
||||
Made shooting interactions more realistic.
|
||||
Add radiation badge item and associated infrastructure.
|
||||
Automagically add new keybindings, so long as they don't conflict.
|
||||
Significantly reduces the number of giant worms.
|
||||
Adds strawberry bushes.
|
||||
Advanced inventory: Add [c]ategory sort.
|
||||
Large number of added archery items: Wide range of bows crossbows, and arrows, and a multitude of crafting recipes.
|
||||
Stop unnecessaraly saving adjacent overmaps every time they are potentially dirtied. (prevents periodic pauses!)
|
||||
Hard Leg Guards and Metal Leg guards.
|
||||
Picking berry bushes trains survival (at low levels).
|
||||
Added skill support into professions.
|
||||
|
||||
|
||||
======
|
||||
|
||||
0.5
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
Original author: Project Manager: Website/Forum:
|
||||
Whales (retired) TheDarklingWolf GlyphGryph
|
||||
|
||||
Main Developers/Gihub Managers:
|
||||
Main Developers/Github Managers:
|
||||
Kevingranade, Ozone, TheDarklingWolf, zpmorgan
|
||||
|
||||
Active Contributors:
|
||||
|
||||
Binary file not shown.
@@ -1,18 +1,18 @@
|
||||
# This message may be 16 lines long at maximum.
|
||||
# Max length of a line is 68 characters; the following line is for reference
|
||||
####################################################################
|
||||
New features v0.5:
|
||||
* Todo
|
||||
* Fixes, fixes and more fixes.
|
||||
New features v0.7 Lindqvist:
|
||||
* Preliminary i18n support.
|
||||
* More advanced bionics.
|
||||
* Autopickup
|
||||
|
||||
For latest discussions and news on Cataclysm DDA, please visit:
|
||||
|
||||
Homepage: http://www.cataclysmdda.com/
|
||||
Forum: http://www.cataclysmdda.com/smf/
|
||||
Forum: http://smf.cataclysmdda.com/
|
||||
Wiki: http://wiki.cataclysmdda.com/
|
||||
|
||||
The game now has new configurable options:
|
||||
Customizeable Viewport, Spawntype: Classic/Static, Starting time
|
||||
Static NPCs, Randomly spawning NPCs, Seasons
|
||||
New configurable options:
|
||||
Autosave frequency, Trigonometric (circular) distance,
|
||||
Trait points cap, radiation lethality.
|
||||
|
||||
Ingame you can access the options via the help menu (?2).
|
||||
|
||||
@@ -0,0 +1,543 @@
|
||||
[
|
||||
{
|
||||
"id" : "bio_null",
|
||||
"name" : "NULL bionics",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "If you're seeing this, it's a bug. (game::init_bionics)"
|
||||
},
|
||||
{
|
||||
"id" : "bio_batteries",
|
||||
"name" : "Battery System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You have a battery draining attachment, and thus can make use of the energy\ncontained in normal, everyday batteries. Use 'E' to consume batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_metabolics",
|
||||
"name" : "Metabolic Interchange",
|
||||
"cost" : 0,
|
||||
"time" : 100,
|
||||
"flags" : ["POWER", "ACTIVE"],
|
||||
"description": "Your digestive system and power supply are interconnected. Any drain on\nenergy instead increases your hunger."
|
||||
},
|
||||
{
|
||||
"id" : "bio_solar",
|
||||
"name" : "Solar Panels",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You have a few solar panels installed. While in direct sunlight, your power\nlevel will slowly recharge."
|
||||
},
|
||||
{
|
||||
"id" : "bio_torsionratchet",
|
||||
"name" : "Joint Torsion Ratchet",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "Your joints have been equipped with torsion ratchets that generate power slowly\nwhen you move."
|
||||
},
|
||||
{
|
||||
"id" : "bio_furnace",
|
||||
"name" : "Internal Furnace",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You can burn nearly any organic material as fuel (use 'E'), recharging your\npower level. Some materials will burn better than others."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ethanol",
|
||||
"name" : "Ethanol Burner",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["POWER"],
|
||||
"description": "You burn alcohol as fuel in an extremely efficient reaction. However, you\nwill still suffer the inebriating effects of the substance."
|
||||
},
|
||||
{
|
||||
"id" : "bio_memory",
|
||||
"name" : "Enhanced Memory Banks",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "Your memory has been enhanced with small quantum storage drives. Any time\nyou start to forget a skill, you have a chance at retaining all knowledge, at\nthe cost of a small amount of poweron."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ears",
|
||||
"name" : "Enhanced Hearing",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your hearing has been drastically improved, allowing you to hear ten times\nbetter than the average person. Additionally, high-intensity sounds will be\nautomatically dampened before they can damage your hearing."
|
||||
},
|
||||
{
|
||||
"id" : "bio_eye_enhancer",
|
||||
"name" : "Diamond Cornea",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your vision is greatly enhanced, giving you a +2 bonus to perception."
|
||||
},
|
||||
{
|
||||
"id" : "bio_membrane",
|
||||
"name" : "Nictating Membrane",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your eyes have a thin membrane that closes over your eyes while underwater,\nnegating any vision penalties."
|
||||
},
|
||||
{
|
||||
"id" : "bio_targeting",
|
||||
"name" : "Targeting System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your eyes are equipped with range finders, and their movement is synced with\nthat of your arms, to a degree. Shots you fire will be much more accurate,\nparticularly at long range."
|
||||
},
|
||||
{
|
||||
"id" : "bio_gills",
|
||||
"name" : "Membrane Oxygenator",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "An oxygen interchange system automatically switches on while underwater,\nslowly draining your energy reserves but providing oxygen."
|
||||
},
|
||||
{
|
||||
"id" : "bio_purifier",
|
||||
"name" : "Air Filtration System",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "Implanted in your trachea is an advanced filtration system. If toxins find\ntheir way into your windpipe, the filter will attempt to remove them."
|
||||
},
|
||||
{
|
||||
"id" : "bio_climate",
|
||||
"name" : "Internal Climate Control",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Throughout your body lies a network of thermal piping which eases the effects\nof high and low ambient temperatures."
|
||||
},
|
||||
{
|
||||
"id" : "bio_storage",
|
||||
"name" : "Internal Storage",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Space inside your chest cavity has been converted into a storage area. You\nmay carry an extra 8 units of volume."
|
||||
},
|
||||
{
|
||||
"id" : "bio_recycler",
|
||||
"name" : "Recycler Unit",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Your digestive system has been outfitted with a series of filters and\nprocessors, allowing you to reclaim waste liquid and, to a lesser degree,\nnutrients. The net effect is a greatly reduced need to eat and drink."
|
||||
},
|
||||
{
|
||||
"id" : "bio_digestion",
|
||||
"name" : "Expanded Digestive System",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "You have been outfitted with three synthetic stomachs and industrial-grade\nintestines. Not only can you extract much more nutrition from food, but you\nare highly resistant to foodborne illness, and can sometimes eat rotten food."
|
||||
},
|
||||
{
|
||||
"id" : "bio_tools",
|
||||
"name" : "Integrated Toolset",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Implanted in your hands and fingers is a complete tool set - screwdriver,\nhammer, wrench, and heating elements. You can use this in place of many\ntools when crafting."
|
||||
},
|
||||
{
|
||||
"id" : "bio_shock",
|
||||
"name" : "Electroshock Unit",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "While fighting unarmed, or with a weapon that conducts electricity, there is\na chance that a successful hit will shock your opponent, inflicting extra\ndamage and disabling them temporarily at the cost of some energy."
|
||||
},
|
||||
{
|
||||
"id" : "bio_heat_absorb",
|
||||
"name" : "Heat Drain",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"description": "While fighting unarmed against a warm-blooded opponent, there is a chance\nthat a successful hit will drain body heat, inflicting a small amount of\nextra damage, and increasing your power reserves slightly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_carbon",
|
||||
"name" : "Subdermal Carbon Filament",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "Lying just beneath your skin is a thin armor made of carbon nanotubes. This\nreduces bashing damage by 2 and cutting damage by 4."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_head",
|
||||
"name" : "Alloy Plating - Head",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your head has been replaced by a strong armor, protecting both\nyour head and jaw regions."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_torso",
|
||||
"name" : "Alloy Plating - Torso",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your torso has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_arms",
|
||||
"name" : "Alloy Plating - Arms",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your arms has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_armor_legs",
|
||||
"name" : "Alloy Plating - Legs",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"description": "The flesh on your legs has been replaced by a strong armor, protecting you\ngreatly."
|
||||
},
|
||||
{
|
||||
"id" : "bio_flashlight",
|
||||
"name" : "Cranial Flashlight",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Mounted between your eyes is a small but powerful LED flashlight."
|
||||
},
|
||||
{
|
||||
"id" : "bio_night_vision",
|
||||
"name" : "Implanted Night Vision",
|
||||
"cost" : 1,
|
||||
"time" : 20,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your eyes have been modified to amplify existing light, allowing you to see\nin the dark."
|
||||
},
|
||||
{
|
||||
"id" : "bio_infrared",
|
||||
"name" : "Infrared Vision",
|
||||
"cost" : 1,
|
||||
"time" : 4,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your range of vision extends into the infrared, allowing you to see warm-\nblooded creatures in the dark, and even through walls."
|
||||
},
|
||||
{
|
||||
"id" : "bio_face_mask",
|
||||
"name" : "Facial Distortion",
|
||||
"cost" : 1,
|
||||
"time" : 10,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your face is actually made of a compound which may be molded by electrical\nimpulses, making you impossible to recognize. While not powered, however,\nthe compound reverts to its default shape."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ads",
|
||||
"name" : "Active Defense System",
|
||||
"cost" : 1,
|
||||
"time" : 7,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A thin forcefield surrounds your body, continually draining power. Anything\nattempting to penetrate this field has a chance of being deflected at the\ncost of more energy. Melee attacks will be stopped more often than bullets."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ods",
|
||||
"name" : "Offensive Defense System",
|
||||
"cost" : 1,
|
||||
"time" : 6,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A thin forcefield surrounds your body, continually draining power. This\nfield does not deflect penetration, but rather delivers a very strong shock,\ndamaging unarmed attackers and those with a conductive weapon."
|
||||
},
|
||||
{
|
||||
"id" : "bio_scent_mask",
|
||||
"name" : "Olfactory Mask",
|
||||
"cost" : 1,
|
||||
"time" : 8,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While this system is powered, your body will produce very little odor, making\nit nearly impossible for creatures to track you by scent."
|
||||
},
|
||||
{
|
||||
"id" : "bio_scent_vision",
|
||||
"name" : "Scent Vision",
|
||||
"cost" : 1,
|
||||
"time" : 30,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While this system is powered, you're able to visually sense your own scent,\nmaking it possible for you to recognize your surroundings even if you can't\nsee it."
|
||||
},
|
||||
{
|
||||
"id" : "bio_cloak",
|
||||
"name" : "Cloaking System",
|
||||
"cost" : 2,
|
||||
"time" : 1,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This high-power system uses a set of cameras and LEDs to make you blend into\nyour background, rendering you fully invisible to normal vision. However,\nyou may be detected by infrared, sonar, etc."
|
||||
},
|
||||
{
|
||||
"id" : "bio_painkiller",
|
||||
"name" : "Sensory Dulling",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your nervous system is wired to allow you to inhibit the signals of pain,\nallowing you to dull your senses at will. However, the use of this system\nmay cause delayed reaction time and drowsiness."
|
||||
},
|
||||
{
|
||||
"id" : "bio_nanobots",
|
||||
"name" : "Repair Nanobots",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Inside your body is a fleet of tiny dormant robots. Once charged from your\nenergy banks, they will flit about your body, repairing any damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_heatsink",
|
||||
"name" : "Thermal Dissipation",
|
||||
"cost" : 1,
|
||||
"time" : 6,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Powerful heatsinks supermaterials are woven into your flesh. While powered,\nthis system will prevent heat damage up to 2000 degrees fahrenheit. Note\nthat this does not affect your internal temperature."
|
||||
},
|
||||
{
|
||||
"id" : "bio_resonator",
|
||||
"name" : "Sonic Resonator",
|
||||
"cost" : 4,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your entire body may resonate at very high power, creating a short-range\nshockwave. While it will not to much damage to flexible creatures, stiff\nitems such as walls, doors, and even robots will be severely damaged."
|
||||
},
|
||||
{
|
||||
"id" : "bio_time_freeze",
|
||||
"name" : "Time Dilation",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "At an immense cost of power, you may increase your body speed and reactions\ndramatically, essentially freezing time. You are still delicate, however,\nand violent or rapid movements may damage you due to friction."
|
||||
},
|
||||
{
|
||||
"id" : "bio_teleport",
|
||||
"name" : "Teleportation Unit",
|
||||
"cost" : 10,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This highly experimental unit folds space over short distances, instantly\ntransporting your body up to 25 feet at the cost of much power. Note that\nprolonged or frequent use may have dangerous side effects."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blood_anal",
|
||||
"name" : "Blood Analysis",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Small sensors have been implanted in your heart, allowing you to analyse your\nblood. This will detect many illnesses, drugs, and other conditions."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blood_filter",
|
||||
"name" : "Blood Filter",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A filtration system in your heart allows you to actively filter out chemical\nimpurities, primarily drugs. It will have limited impact on viruses. Note\nthat it is not a targeted filter; ALL drugs in your system will be affected."
|
||||
},
|
||||
{
|
||||
"id" : "bio_alarm",
|
||||
"name" : "Alarm System",
|
||||
"cost" : 1,
|
||||
"time" : 400,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "A motion-detecting alarm system will notice almost all movement within a\nfifteen-foot radius, and will silently alert you. This is very useful during\nsleep, or if you suspect a cloaked pursuer."
|
||||
},
|
||||
{
|
||||
"id" : "bio_evap",
|
||||
"name" : "Aero-Evaporator",
|
||||
"cost" : 8,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "This unit draws moisture from the surrounding air, which then is poured from\na fingertip in the form of water. It may fail in very dry environments."
|
||||
},
|
||||
{
|
||||
"id" : "bio_lighter",
|
||||
"name" : "Mini-Flamethrower",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "The index fingers of both hands have powerful fire starters which extend from\nthe tip."
|
||||
},
|
||||
{
|
||||
"id" : "bio_claws",
|
||||
"name" : "Adamantium Claws",
|
||||
"cost" : 3,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your fingers can withdraw into your hands, allowing a set of vicious claws to\nextend. These do considerable cutting damage, but prevent you from holding\nanything else."
|
||||
},
|
||||
{
|
||||
"id" : "bio_blaster",
|
||||
"name" : "Fusion Blaster Arm",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your left arm has been replaced by a heavy-duty fusion blaster! You may use\nyour energy banks to fire a damaging heat ray; however, you are unable to use\nor carry two-handed items, and may only fire handguns."
|
||||
},
|
||||
{
|
||||
"id" : "bio_laser",
|
||||
"name" : "Finger-Mounted Laser",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has a small high-powered laser embedded in it. This long\nrange weapon is not incredibly damaging, but is very accurate, and has the\npotential to start fires."
|
||||
},
|
||||
{
|
||||
"id" : "bio_emp",
|
||||
"name" : "Directional EMP",
|
||||
"cost" : 4,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Mounted in the palms of your hand are small parabolic EMP field generators.\nYou may use power to fire a short-ranged blast which will disable electronics\nand robots."
|
||||
},
|
||||
{
|
||||
"id" : "bio_hydraulics",
|
||||
"name" : "Hydraulic Muscles",
|
||||
"cost" : 1,
|
||||
"time" : 3,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "While activated, the muscles in your arms will be greatly enchanced,\nincreasing your strength by 20."
|
||||
},
|
||||
{
|
||||
"id" : "bio_water_extractor",
|
||||
"name" : "Water Extraction Unit",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Nanotubes embedded in the palm of your hand will pump any available fluid out\nof a dead body, cleanse it of impurities and convert it into drinkable water.\nYou must, however, have a container to store the water in."
|
||||
},
|
||||
{
|
||||
"id" : "bio_magnet",
|
||||
"name" : "Electromagnetic Unit",
|
||||
"cost" : 2,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Embedded in your hand is a powerful electromagnet, allowing you to pull items\nmade of iron over short distances."
|
||||
},
|
||||
{
|
||||
"id" : "bio_fingerhack",
|
||||
"name" : "Fingerhack",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has an electrohack embedded in it; an all-purpose hacking\nunit used to override control panels and the like (but not computers). Skill\nin computers is important, and a failed use may damage your circuits."
|
||||
},
|
||||
{
|
||||
"id" : "bio_lockpick",
|
||||
"name" : "Fingerpick",
|
||||
"cost" : 1,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "One of your fingers has an electronic lockpick embedded in it. This auto-\nmatic system will quickly unlock all but the most advanced key locks without\nany skill required on the part of the user."
|
||||
},
|
||||
{
|
||||
"id" : "bio_ground_sonar",
|
||||
"name" : "Terranian Sonar",
|
||||
"cost" : 1,
|
||||
"time" : 5,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your feet are equipped with precision sonar equipment, allowing you to detect\nthe movements of creatures below the ground."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_armor_interface",
|
||||
"name" : "Power Armor Interface",
|
||||
"cost" : 1,
|
||||
"time" : 10,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Interfaces your power system with the internal charging port on suits of power armor."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_armor_interface_mkII",
|
||||
"name" : "Power Armor Interface Mk. II",
|
||||
"cost" : 1,
|
||||
"time" : 50,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Interfaces your power system with the internal charging port on suits of power armor.\nThe Mk. II was designed by DoubleTech Inc., to meet the popularity of the Mk. II\npower armor series."
|
||||
},
|
||||
{
|
||||
"id" : "bio_flashbang",
|
||||
"name" : "Flashbang Generator",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Light emitting diodes integrated into your skin can release a flash comparable\nto a flashbang grenade, blinding nearby enemies. Speakers integrated into your\nbody mimic the loud sound, deafening those nearby."
|
||||
},
|
||||
{
|
||||
"id" : "bio_railgun",
|
||||
"name" : "Railgun",
|
||||
"cost" : 1,
|
||||
"time" : 100,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "EM field generators in your arms double the range and damage of thrown\niron and steel objects at a cost of 1 power per throw, causing them to\nleave a trail of electricity that can cause additional damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_probability_travel",
|
||||
"name" : "Probability Travel",
|
||||
"cost" : 1,
|
||||
"time" : 100,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Increases your body's wavelength, allowing you to quantum tunnel through\nwalls, reappearing on the other side. Power drain in standby is minimal,\nbut each tile tunneled through costs 10 bionic power."
|
||||
},
|
||||
{
|
||||
"id" : "bio_shockwave",
|
||||
"name" : "Shockwave Generator",
|
||||
"cost" : 10,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "You generate a powerful shockwave, knocking back all nearby creatures.\nTargets are stunned briefly, take damage and additional stun upon impact\nwith impassable terrain, and knockback any creatures they collide with."
|
||||
},
|
||||
{
|
||||
"id" : "bio_chain_lightning",
|
||||
"name" : "Chain Lightning",
|
||||
"cost" : 5,
|
||||
"time" : 0,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Your body is equipped with a chain lightning generator, allowing you to\n emit a blast of lightning at a target, leaving a trail of lightning in\n its wake, jumping to additional targets within 4 tiles of the previous target."
|
||||
},
|
||||
{
|
||||
"id" : "bio_night",
|
||||
"name" : "Artificial Night Generator",
|
||||
"cost" : 1,
|
||||
"time" : 2,
|
||||
"flags" : ["ACTIVE"],
|
||||
"description": "Destructive interference eliminates all light within a 15 tile radius."
|
||||
},
|
||||
{
|
||||
"id" : "bio_dis_shock",
|
||||
"name" : "Electrical Discharge",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic which occasionally discharges electricity through\nyour body, causing pain and brief paralysis but no damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_dis_acid",
|
||||
"name" : "Acidic Discharge",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic which occasionally discharges acid into your muscles,\ncausing sharp pain and minor damage."
|
||||
},
|
||||
{
|
||||
"id" : "bio_drain",
|
||||
"name" : "Electrical Drain",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic. It doesn't perform any useful function, but will\noccasionally draw power from your batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_noise",
|
||||
"name" : "Noisemaker",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "A malfunctioning bionic. It will occasionally emit a loud burst of noise."
|
||||
},
|
||||
{
|
||||
"id" : "bio_power_weakness",
|
||||
"name" : "Power Overload",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "Damaged power circuits cause short-circuiting inside your muscles when your\nbatteries are above 75%%%% capacity, causing greatly reduced strength. This\nhas no effect if you have no internal batteries."
|
||||
},
|
||||
{
|
||||
"id" : "bio_stiff",
|
||||
"name" : "Wire-induced Stiffness",
|
||||
"cost" : 0,
|
||||
"time" : 0,
|
||||
"flags" : ["FAULTY"],
|
||||
"description": "Improperly installed wires cause a physical stiffness in most of your body,\ncausing increased encumberance."
|
||||
}
|
||||
]
|
||||
+3066
-10
File diff suppressed because it is too large
Load Diff
+565
-288
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,829 @@
|
||||
[
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrowhead",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "arrowhead",
|
||||
"symbol" : "=",
|
||||
"color" : "light_gray",
|
||||
"description" : "Heads for an arrow. Placing these on an arrow will make the arrow more damaging and piercing.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 1,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "NULL",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 0,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "fletching",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "fletching",
|
||||
"symbol" : "=",
|
||||
"color" : "white",
|
||||
"description" : "Also known as a flight, this item provides aerodynamic stabilization of arrows.",
|
||||
"material" : "leather",
|
||||
"volume" : 1,
|
||||
"weight" : 1,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "NULL",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 0,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_wood",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "wood arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A crude shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 12,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 0,
|
||||
"pierce" : 0,
|
||||
"range" : 0,
|
||||
"dispersion" : 34,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_wood_heavy",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "heavy wood arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy shaft made from wood. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 14,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 2,
|
||||
"pierce" : 0,
|
||||
"range" : 1,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "shaft_metal",
|
||||
"rarity" : 0,
|
||||
"price" : 20,
|
||||
"name" : "metal arrow shaft",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy shaft made from scrap metal. It needs arrowheads and fletching to become a functional arrow. You can, however, fire it from a bow.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 3,
|
||||
"pierce" : 0,
|
||||
"range" : 3,
|
||||
"dispersion" : 24,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_fire_hardened",
|
||||
"rarity" : 0,
|
||||
"price" : 25,
|
||||
"name" : "fire hardened wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has had a point carved into it and then fire hardened.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 12,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 3,
|
||||
"pierce" : 0,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_field_point",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "field point wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a crude arrow head. Useful for hunting small woodland creatures.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 6,
|
||||
"pierce" : 1,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_small_game",
|
||||
"rarity" : 0,
|
||||
"price" : 30,
|
||||
"name" : "small game arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a wide blunt head. Useful for hunting small woodland creatures without splattering them all over the ground.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 2,
|
||||
"pierce" : 0,
|
||||
"range" : 2,
|
||||
"dispersion" : 29,
|
||||
"recoil" : 0,
|
||||
"count" : 10,
|
||||
"flags" : ["NOGIB"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_fire_hardened_fletched",
|
||||
"rarity" : 0,
|
||||
"price" : 35,
|
||||
"name" : "fletched fire hardened wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This simple arrow has a fire hardened point and some fletchings.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 13,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 4,
|
||||
"pierce" : 0,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_field_point_fletched",
|
||||
"rarity" : 0,
|
||||
"price" : 40,
|
||||
"name" : "fletched field point wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A simple arrow shaft that has a crude arrow head and some fletchings. Useful for hunting small woodland creatures or as a last ditch defense against zombies.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 14,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 7,
|
||||
"pierce" : 2,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_wood",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A basic wooden arrow, it has a metal arrow head and some fletchings. It's light-weight, does some damage, and is so-so on accuracy. Stands a good chance of remaining intact once fired.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 15,
|
||||
"bashing" : 2,
|
||||
"cutting" : 1,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 10,
|
||||
"pierce" : 3,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_heavy_fire_hardened_fletched",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy fletched fire hardened arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a firehardened point and some fletchings.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 5,
|
||||
"pierce" : 2,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_heavy_field_point_fletched",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy fletched field point arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow is significantly sturdier than other wooden arrows. It has a crude field point head and some fletchings.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 20,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 6,
|
||||
"pierce" : 3,
|
||||
"range" : 7,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_wood_heavy",
|
||||
"rarity" : 7,
|
||||
"price" : 75,
|
||||
"name" : "heavy wood arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A heavy wooden arrow, it has a metal arrow head and some fletchings. It's much heavier than other wooden arrows, as a result it does more damage and is more stable in flight, resulting in better accuracy over a longer range. Stands a very good chance of remaining intact once fired.",
|
||||
"material" : "plastic",
|
||||
"volume" : 1,
|
||||
"weight" : 22,
|
||||
"bashing" : 6,
|
||||
"cutting" : 2,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 12,
|
||||
"pierce" : 5,
|
||||
"range" : 8,
|
||||
"dispersion" : 4,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_metal_sharpened",
|
||||
"rarity" : 7,
|
||||
"price" : 50,
|
||||
"name" : "sharpened metal arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This metal shaft has been carefully sharpened so that it has a crude point at the end.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 19,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 5,
|
||||
"pierce" : 3,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_metal",
|
||||
"rarity" : 7,
|
||||
"price" : 100,
|
||||
"name" : "metal arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This metal arrow has a steel arrow head and some fletchings.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 21,
|
||||
"bashing" : 3,
|
||||
"cutting" : 2,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 14,
|
||||
"pierce" : 7,
|
||||
"range" : 10,
|
||||
"dispersion" : 4,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_cf",
|
||||
"rarity" : 5,
|
||||
"price" : 150,
|
||||
"name" : "carbon fiber arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "High-tech carbon fiber shafts and 100 grain broadheads. Very light weight, fast, and notoriously fragile.",
|
||||
"material" : "plastic",
|
||||
"volume" : 2,
|
||||
"weight" : 15,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 10,
|
||||
"pierce" : 5,
|
||||
"range" : 8,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 8
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_exploding",
|
||||
"rarity" : 5,
|
||||
"price" : 350,
|
||||
"name" : "exploding arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow has a small IED strapped to its tip. Horribly inaccurate, heavy, and bulky, not only does this contraption require expert hands to pull off a shot, it requires one to loose this with a small measure of confidence the shooter won't be caught in the blast radius.",
|
||||
"material" : "steel",
|
||||
"volume" : 2,
|
||||
"weight" : 40,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 15,
|
||||
"pierce" : 9,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 5,
|
||||
"effects" : ["EXPLOSIVE"]
|
||||
},
|
||||
{
|
||||
"id" : "exploding_arrow_warhead",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"name" : "exploding arrowhead",
|
||||
"description" : "This simple IED is designed to be attached to an arrow and detonate on impact. Theoretically you could throw it but who would want to do that?",
|
||||
"rarity" : 3,
|
||||
"price" : 400,
|
||||
"material" : "iron",
|
||||
"weight" : 10,
|
||||
"volume" : 1,
|
||||
"bashing" : 10,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"count" : 5,
|
||||
"effects" : ["EXPLOSIVE"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "arrow_flamming",
|
||||
"rarity" : 5,
|
||||
"price" : 350,
|
||||
"name" : "flaming arrow",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "This arrow has a flaming rag wrapped around the shaft near the head. You should shoot it soon before it burns your bow.",
|
||||
"material" : "steel",
|
||||
"volume" : 2,
|
||||
"weight" : 40,
|
||||
"bashing" : 2,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "arrow",
|
||||
"damage" : 15,
|
||||
"pierce" : 9,
|
||||
"range" : 5,
|
||||
"dispersion" : 19,
|
||||
"recoil" : 0,
|
||||
"count" : 5,
|
||||
"effects" : ["IGNITE"]
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "bolt_wood",
|
||||
"rarity" : 8,
|
||||
"price" : 100,
|
||||
"name" : "wood crossbow bolt",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A sharpened bolt carved from wood. It's lighter than a steel bolt, but does less damage and is less accurate. Stands a good chance of remaining intact once fired.",
|
||||
"material" : "wood",
|
||||
"volume" : 1,
|
||||
"weight" : 40,
|
||||
"bashing" : 1,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "bolt",
|
||||
"damage" : 10,
|
||||
"pierce" : 1,
|
||||
"range" : 0,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"count" : 15
|
||||
},
|
||||
{
|
||||
"type" : "AMMO",
|
||||
"id" : "bolt_steel",
|
||||
"rarity" : 7,
|
||||
"price" : 400,
|
||||
"name" : "steel crossbow bolt",
|
||||
"symbol" : "=",
|
||||
"color" : "green",
|
||||
"description" : "A sharp bolt made from steel. Deadly in skilled hands. Stands an excellent chance of remaining intact once fired.",
|
||||
"material" : "steel",
|
||||
"volume" : 1,
|
||||
"weight" : 25,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ammo_type" : "bolt",
|
||||
"damage" : 20,
|
||||
"pierce" : 10,
|
||||
"range" : 6,
|
||||
"dispersion" : 9,
|
||||
"recoil" : 0,
|
||||
"count" : 10
|
||||
},
|
||||
{
|
||||
"id" : "selfbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "self bow",
|
||||
"description" : "A bow made from a single piece of wood. It is made specifically for the person using it.",
|
||||
"rarity" : 5,
|
||||
"price" : 400,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 8,
|
||||
"volume" : 12,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 4,
|
||||
"range" : 5,
|
||||
"dispersion" : 20,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 70
|
||||
},
|
||||
{
|
||||
"id" : "shortbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "short bow",
|
||||
"description" : "A shorter bow than the longbow, easier to draw than the longbow but sacrifices power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
|
||||
"rarity" : 5,
|
||||
"price" : 800,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 3,
|
||||
"volume" : 6,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 3,
|
||||
"range" : 6,
|
||||
"dispersion" : 14,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 60
|
||||
},
|
||||
{
|
||||
"id" : "compbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "compound bow",
|
||||
"description" : "A bow with cams that fires high velocity arrows. Weaker people can use compound bows more easily. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 8 strength to fire",
|
||||
"rarity" : 1,
|
||||
"price" : 1800,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR8_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 8,
|
||||
"volume" : 8,
|
||||
"bashing" : 8,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 1,
|
||||
"ranged_damage" : 5,
|
||||
"range" : 10,
|
||||
"dispersion" : 12,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "compositebow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "composite bow",
|
||||
"description" : "A bow made from more than one material so it is able to store more energy. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 3,
|
||||
"price" : 1200,
|
||||
"material" : ["wood", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 8,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 7,
|
||||
"range" : 12,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 110
|
||||
},
|
||||
{
|
||||
"id" : "recurbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "recurve bow",
|
||||
"description" : "A bow that curves away from the archer at the tips allowing more power to be stored in the bow. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 9,
|
||||
"range" : 14,
|
||||
"dispersion" : 8,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "reflexbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "reflex bow",
|
||||
"description" : "A bow that has limbs which curve away from the archer sacrificing accuracy for power. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["steel", "plastic"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 6,
|
||||
"volume" : 10,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 11,
|
||||
"range" : 16,
|
||||
"dispersion" : 6,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "longbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "longbow",
|
||||
"description" : "A six-foot wooden bow that fires arrows. This takes a fair amount of strength to draw. Arrows fired from this weapon have a good chance of remaining intact for re-use. It requires 10 strength to fire",
|
||||
"rarity" : 5,
|
||||
"price" : 800,
|
||||
"material" : "wood",
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR10_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 4,
|
||||
"volume" : 8,
|
||||
"bashing" : 10,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 7,
|
||||
"range" : 20,
|
||||
"dispersion" : 18,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 80
|
||||
},
|
||||
{
|
||||
"id" : "reflexrecurvebow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "yellow",
|
||||
"name" : "reflex recurve bow",
|
||||
"description" : "A bow that combines the traits from both the reflex and the recurve bows. Both the limbs and the tips curve away from the archer. This dramatically increases the power while increasing the strength to draw the bow significantly. It requires 12 strength to fire efficiently.",
|
||||
"rarity" : 2,
|
||||
"price" : 1200,
|
||||
"material" : ["wood", "bone"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR12_DRAW", "RELOAD_AND_SHOOT"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "arrow",
|
||||
"weight" : 4,
|
||||
"volume" : 5,
|
||||
"bashing" : 12,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 0,
|
||||
"ranged_damage" : 15,
|
||||
"range" : 18,
|
||||
"dispersion" : 8,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 80
|
||||
},
|
||||
{
|
||||
"id" : "hand_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "pistol crossbow",
|
||||
"description" : "A small concealable pistol like crossbow. It is weak due to it's small size and draw, good for hunting small game. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 1,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : "none",
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 5,
|
||||
"volume" : 4,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -0,
|
||||
"ranged_damage" : -6,
|
||||
"range" : 6,
|
||||
"dispersion" : 12,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 100
|
||||
},
|
||||
{
|
||||
"id" : "crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "crossbow",
|
||||
"description" : "A slow-loading hand weapon that launches bolts. Stronger people can reload it much faster. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 2,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : "STR_RELOAD",
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 9,
|
||||
"volume" : 6,
|
||||
"bashing" : 11,
|
||||
"cutting" : 0,
|
||||
"to_hit" : 1,
|
||||
"ranged_damage" : 0,
|
||||
"range" : 10,
|
||||
"dispersion" : 10,
|
||||
"recoil" : 0,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 800
|
||||
},
|
||||
{
|
||||
"id" : "huge_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "Ganz-Rustung",
|
||||
"description" : "A HUGE very slow-loading medieval crossbow from Germany. It's tension is so powerful that you feel it shake after firing. Un-skilled users will find it very hard to reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 2,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "STR_RELOAD"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 60,
|
||||
"volume" : 40,
|
||||
"bashing" : 20,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"ranged_damage" : 30,
|
||||
"range" : 30,
|
||||
"dispersion" : 22,
|
||||
"recoil" : 30,
|
||||
"durability" : 6,
|
||||
"burst" : 0,
|
||||
"clip_size" : 1,
|
||||
"reload" : 6000
|
||||
},
|
||||
{
|
||||
"id" : "rep_crossbow",
|
||||
"type" : "GUN",
|
||||
"symbol" : "(",
|
||||
"color" : "green",
|
||||
"name" : "repeating crossbow",
|
||||
"description" : "A custom made mechanical large crossbow, with a wooden magazine that holds 10 bolts. Single bolt reload. Bolts fired from this weapon have a good chance of remaining intact for re-use.",
|
||||
"rarity" : 1,
|
||||
"price" : 1000,
|
||||
"material" : ["iron", "wood"],
|
||||
"flags" : ["ALWAYS_TWOHAND", "RELOAD_ONE", "MODE_BURST"],
|
||||
"skill" : "archery",
|
||||
"ammo" : "bolt",
|
||||
"weight" : 16,
|
||||
"volume" : 10,
|
||||
"bashing" : 13,
|
||||
"cutting" : 0,
|
||||
"to_hit" : -1,
|
||||
"ranged_damage" : -2,
|
||||
"range" : 8,
|
||||
"dispersion" : 22,
|
||||
"recoil" : 15,
|
||||
"durability" : 6,
|
||||
"burst" : 3,
|
||||
"clip_size" : 10,
|
||||
"reload" : 100
|
||||
}
|
||||
]
|
||||
+865
-415
File diff suppressed because it is too large
Load Diff
+176
-44
@@ -10,7 +10,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -32,7 +32,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 3,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -54,7 +54,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -76,7 +76,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 2,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -98,7 +98,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -120,7 +120,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -142,7 +142,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 2,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -164,7 +164,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 2,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -186,7 +186,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -208,7 +208,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -230,7 +230,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 1,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -252,7 +252,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 2,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -274,7 +274,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 1,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -296,7 +296,7 @@
|
||||
"color" : "pink",
|
||||
"intelligence" : 1,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -318,7 +318,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -340,7 +340,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -362,7 +362,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 6,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -384,7 +384,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -406,7 +406,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -428,7 +428,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -450,7 +450,7 @@
|
||||
"color" : "light_blue",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -472,7 +472,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 3,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 2,
|
||||
"bashing" : -4,
|
||||
"cutting" : 0,
|
||||
@@ -494,7 +494,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 1,
|
||||
"bashing" : -5,
|
||||
"cutting" : 0,
|
||||
@@ -516,7 +516,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -538,7 +538,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -560,7 +560,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -582,7 +582,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 6,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -604,7 +604,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 5,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -626,7 +626,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -648,7 +648,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -670,7 +670,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -692,7 +692,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 6,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 4,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
@@ -714,7 +714,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 7,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -736,7 +736,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -758,7 +758,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 4,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 2,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -780,7 +780,7 @@
|
||||
"color" : "green",
|
||||
"intelligence" : 5,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 2,
|
||||
"bashing" : -3,
|
||||
"cutting" : 0,
|
||||
@@ -802,7 +802,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 11,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 7,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
@@ -824,7 +824,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 11,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 7,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
@@ -846,7 +846,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 9,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 7,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
@@ -868,7 +868,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 6,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 6,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
@@ -890,7 +890,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 12,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 8,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
@@ -912,7 +912,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 8,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 6,
|
||||
"bashing" : 4,
|
||||
"cutting" : 0,
|
||||
@@ -934,7 +934,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 13,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 6,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
@@ -956,7 +956,7 @@
|
||||
"color" : "blue",
|
||||
"intelligence" : 14,
|
||||
"symbol" : "?",
|
||||
"material" : ["PAPER", "NULL"],
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 8,
|
||||
"bashing" : 8,
|
||||
"cutting" : 0,
|
||||
@@ -966,5 +966,137 @@
|
||||
"rarity" : 1,
|
||||
"price" : 920,
|
||||
"required_level" : 5
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "record_weather",
|
||||
"name" : "National Weather Transcripts",
|
||||
"max_level" : 0,
|
||||
"description" : "Old weather records are about as interesting as a rock.",
|
||||
"weight" : 7,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 7,
|
||||
"bashing" : 7,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : -1,
|
||||
"skill" : "none",
|
||||
"rarity" : 20,
|
||||
"price" : 5,
|
||||
"required_level" : 0
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "record_patient",
|
||||
"name" : "Patient Treatment Records",
|
||||
"max_level" : 0,
|
||||
"description" : "A massive stack of medical records that contain every gory detail.",
|
||||
"weight" : 6,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 6,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : -1,
|
||||
"skill" : "none",
|
||||
"rarity" : 20,
|
||||
"price" : 5,
|
||||
"required_level" : 0
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "record_accounting",
|
||||
"name" : "Corporate Accounting Ledger",
|
||||
"max_level" : 0,
|
||||
"description" : "If you knew what to look for something might stand out...",
|
||||
"weight" : 5,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 5,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : -1,
|
||||
"skill" : "none",
|
||||
"rarity" : 20,
|
||||
"price" : 100,
|
||||
"required_level" : 0
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "black_box_transcript",
|
||||
"name" : "black box transcript",
|
||||
"max_level" : 0,
|
||||
"description" : "A full flight log for a military aircraft. Nothing of interest stands out.",
|
||||
"weight" : 5,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 5,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : -1,
|
||||
"skill" : "none",
|
||||
"rarity" : 0,
|
||||
"price" : 500,
|
||||
"required_level" : 0
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "priest_diary",
|
||||
"name" : "Priest's Diary",
|
||||
"max_level" : 0,
|
||||
"description" : "A small book filled with journal entries in Latin.",
|
||||
"weight" : 3,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : -1,
|
||||
"skill" : "none",
|
||||
"rarity" : 0,
|
||||
"price" : 500,
|
||||
"required_level" : 0
|
||||
},
|
||||
{
|
||||
"type" : "BOOK",
|
||||
"id" : "visions_solitude",
|
||||
"name" : "Visions in Solitude",
|
||||
"max_level" : 0,
|
||||
"description" : "A small book detailing 'visions' a prisoner had on death row.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 1,
|
||||
"color" : "blue",
|
||||
"intelligence" : 0,
|
||||
"symbol" : "?",
|
||||
"material" : ["paper", "null"],
|
||||
"volume" : 3,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"time" : 30,
|
||||
"fun" : 2,
|
||||
"skill" : "none",
|
||||
"rarity" : 0,
|
||||
"price" : 900,
|
||||
"required_level" : 0
|
||||
}
|
||||
]
|
||||
|
||||
+1019
-192
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,253 @@
|
||||
[
|
||||
{
|
||||
"id": "bag_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_gray",
|
||||
"name": "plastic bag",
|
||||
"description": "A small, open plastic bag. Essentially trash.",
|
||||
"rarity": 90,
|
||||
"price": 1,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": -4,
|
||||
"cutting": 0,
|
||||
"to_hit": -8,
|
||||
"contains": 24,
|
||||
"material": "plastic"
|
||||
},
|
||||
{
|
||||
"id": "bottle_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "plastic bottle",
|
||||
"description": "A resealable plastic bottle, holds 500mls of liquid.",
|
||||
"rarity": 90,
|
||||
"price": 8,
|
||||
"weight": 0,
|
||||
"volume": 2,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 2,
|
||||
"flags": ["RIGID", "WATERTIGHT", "SEALS"]
|
||||
},
|
||||
{
|
||||
"id": "bottle_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "cyan",
|
||||
"name": "glass bottle",
|
||||
"description": "A resealable glass bottle, holds 750mls of liquid.",
|
||||
"rarity": 90,
|
||||
"price": 1,
|
||||
"weight": 2,
|
||||
"volume": 3,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 3,
|
||||
"flags": ["RIGID", "WATERTIGHT", "SEALS"]
|
||||
},
|
||||
{
|
||||
"id": "can_drink",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_blue",
|
||||
"name": "aluminum can",
|
||||
"description": "An aluminum can, like what soda comes in.",
|
||||
"rarity": 70,
|
||||
"price": 1,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": 0,
|
||||
"cutting": 0,
|
||||
"to_hit": 0,
|
||||
"material": "steel",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "can_food",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "blue",
|
||||
"name": "tin can",
|
||||
"description": "A tin can, like what beans come in.",
|
||||
"rarity": 65,
|
||||
"price": 2,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": -1,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "iron",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "box_small",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "brown",
|
||||
"name": "sm. cardboard box",
|
||||
"description": "A small cardboard box. No bigger than a foot in dimension.",
|
||||
"rarity": 50,
|
||||
"price": 0,
|
||||
"weight": 0,
|
||||
"volume": 4,
|
||||
"bashing": -5,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "paper",
|
||||
"contains": 4,
|
||||
"flags": ["RIGID"]
|
||||
},
|
||||
{
|
||||
"id": "canteen",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "plastic canteen",
|
||||
"description": "A large military-style water canteen, with a 1.5 liter capacity and strap.",
|
||||
"rarity": 20,
|
||||
"price": 1000,
|
||||
"weight": 2,
|
||||
"volume": 6,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 6,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jerrycan",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "plastic jerrycan",
|
||||
"description": "A bulky plastic jerrycan, meant to carry fuel, but can carry other liquids\nin a pinch. It has a capacity of 10 liters.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 4,
|
||||
"volume": 40,
|
||||
"bashing": -2,
|
||||
"cutting": 0,
|
||||
"to_hit": -2,
|
||||
"material": "plastic",
|
||||
"contains": 40,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jug_plastic",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "gallon jug",
|
||||
"description": "A standard plastic jug used for household cleaning chemicals.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 2,
|
||||
"volume": 10,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "plastic",
|
||||
"contains": 10,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "flask_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "glass flask",
|
||||
"description": "A 250 ml laboratory conical flask, with a rubber bung.",
|
||||
"rarity": 10,
|
||||
"price": 2500,
|
||||
"weight": 0,
|
||||
"volume": 1,
|
||||
"bashing": 8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "waterskin",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "brown",
|
||||
"name": "waterskin",
|
||||
"description": "A watertight leather bag, can hold 1.5 liters of water.",
|
||||
"rarity": 0,
|
||||
"price": 0,
|
||||
"weight": 4,
|
||||
"volume": 6,
|
||||
"bashing": -8,
|
||||
"cutting": 0,
|
||||
"to_hit": -5,
|
||||
"material": "leather",
|
||||
"contains": 6,
|
||||
"flags": ["SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jerrycan_big",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "green",
|
||||
"name": "steel jerrycan",
|
||||
"description": "A steel jerrycan, meant to carry fuel, but can carry other liquids\nin a pinch. It has a capacity of 25 liters.",
|
||||
"rarity": 20,
|
||||
"price": 5000,
|
||||
"weight": 7,
|
||||
"volume": 100,
|
||||
"bashing": -3,
|
||||
"cutting": 0,
|
||||
"to_hit": -3,
|
||||
"material": "steel",
|
||||
"contains": 100,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "keg",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "aluminum keg",
|
||||
"description": "A reusable aluminum keg, used for shipping beer.\nIt has a capacity of 50 liters.",
|
||||
"rarity": 20,
|
||||
"price": 6000,
|
||||
"weight": 12,
|
||||
"volume": 200,
|
||||
"bashing": -4,
|
||||
"cutting": 0,
|
||||
"to_hit": -4,
|
||||
"material": "steel",
|
||||
"contains": 200,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
},
|
||||
{
|
||||
"id": "jar_glass",
|
||||
"type": "CONTAINER",
|
||||
"symbol": ")",
|
||||
"color": "light_cyan",
|
||||
"name": "glass jar",
|
||||
"description": "A half-litre glass jar with a metal screw top lid, used for canning.",
|
||||
"rarity": 50,
|
||||
"price": 2500,
|
||||
"weight": 1,
|
||||
"volume": 1,
|
||||
"bashing": 8,
|
||||
"cutting": 0,
|
||||
"to_hit": 1,
|
||||
"material": "glass",
|
||||
"contains": 1,
|
||||
"flags": ["RIGID", "SEALS", "WATERTIGHT"]
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,7 @@
|
||||
"name":"Guitar",
|
||||
"description":"An acoustic six-string guitar. A bit out of tune, but in good shape otherwise.",
|
||||
"rarity": 60,
|
||||
"material": "WOOD",
|
||||
"material": "wood",
|
||||
"weight": 13,
|
||||
"volume": 24,
|
||||
"damage": 14,
|
||||
@@ -23,7 +23,7 @@
|
||||
"name":"Bongo",
|
||||
"description": "A handheld drum. Suitable for making loud noises into all hours of the night.",
|
||||
"rarity": 60,
|
||||
"material": ["WOOD", "STEEL"],
|
||||
"material": ["wood", "steel"],
|
||||
"weight": 10,
|
||||
"volume": 10,
|
||||
"damage": 11,
|
||||
|
||||
+225
-139
File diff suppressed because it is too large
Load Diff
+592
-5
@@ -7,20 +7,607 @@
|
||||
"description":"Replacing several key parts of a 9mm, .38, .40 or .44 firearm converts it to a .45 firearm. The conversion results in reduced accuracy and increased recoil.",
|
||||
"rarity": 3,
|
||||
"price": 480,
|
||||
"material": "STEEL",
|
||||
"material": "steel",
|
||||
"weight": 2,
|
||||
"volume": 2,
|
||||
"bashing": 3,
|
||||
"cutting": 0,
|
||||
"to_hit": -1,
|
||||
"accuracy_modifier": 2,
|
||||
"dispersion_modifier": 2,
|
||||
"damage_modifier": 0,
|
||||
"loudness_modifier": 0,
|
||||
"ammo_modifier": ".45",
|
||||
"ammo_modifier": "45",
|
||||
"recoil_modifier": 2,
|
||||
"burst_modifier": 0,
|
||||
"clip_size_modifier": 0,
|
||||
"mod_targets": ["pistol", "smg"],
|
||||
"ammo_types": ["9MM", "38", "40", "44"]
|
||||
}
|
||||
"acceptable_ammo": ["9mm", "38", "40", "44"]
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "suppressor",
|
||||
"name" : "suppressor",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 1,
|
||||
"damage_modifier" : -4,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Using a suppressor is almost an imperative in zombie-infested regions. Gunfire is very noisy, and will attract predators. Its only drawback is a reduced muzzle velocity, resulting in less accuracy and damage.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 2,
|
||||
"color" : "dark_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "smg", "rifle"],
|
||||
"volume" : 2,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 480,
|
||||
"loudness_modifier" : -25
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "grip",
|
||||
"name" : "enhanced grip",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -2,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A grip placed forward on the barrel allows for greater control and accuracy. Aside from increased weight, there are no drawbacks.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "brown",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -2,
|
||||
"rarity" : 12,
|
||||
"price" : 280,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_big",
|
||||
"name" : "barrel extension",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -6,
|
||||
"damage_modifier" : 1,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A longer barrel increases the muzzle velocity of a firearm, contributing to both accuracy and damage. However, the longer barrel tends to vibrate after firing, greatly increasing recoil.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 2,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 4,
|
||||
"bashing" : 5,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 5,
|
||||
"rarity" : 10,
|
||||
"price" : 400,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_small",
|
||||
"name" : "shortened barrel",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 5,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A shortened barrel results in markedly reduced accuracy, and a minor increase in noise, but also reduces recoil greatly as a result of the improved managability of the firearm.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -6,
|
||||
"rarity" : 6,
|
||||
"price" : 320,
|
||||
"loudness_modifier" : 2
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "barrel_rifled",
|
||||
"name" : "rifled barrel",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : -10,
|
||||
"damage_modifier" : -20,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Rifling a shotgun barrel is mainly done in order to improve its accuracy when firing slugs. The rifling makes the gun less suitable for shot, however.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["shotgun"],
|
||||
"volume" : 2,
|
||||
"bashing" : 3,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : -1,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 5,
|
||||
"price" : 220,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "clip",
|
||||
"name" : "extended magazine",
|
||||
"clip_size_modifier" : 50,
|
||||
"dispersion_modifier" : 1,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Increases the ammunition capacity of your firearm by 50%, but the added bulk reduces accuracy slightly.",
|
||||
"weight" : 1,
|
||||
"to_hit" : -1,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : -2,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 8,
|
||||
"price" : 560,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "clip2",
|
||||
"name" : "double magazine",
|
||||
"clip_size_modifier" : 100,
|
||||
"dispersion_modifier" : 2,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "Completely doubles the ammunition capacity of your firearm, but the added bulk reduces accuracy and increases recoil.",
|
||||
"weight" : 2,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 2,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 2,
|
||||
"rarity" : 4,
|
||||
"price" : 720,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "spare_mag",
|
||||
"name" : "spare magazine",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A spare magazine you can keep on hand to make reloads faster, but must itself be reloaded before it can be used again.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["pistol", "shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 200,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "brass_catcher",
|
||||
"name" : "brass catcher",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "A bag that hangs off the side of your gun and catches ejected casings so you don't have to pick them up.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "light_gray",
|
||||
"symbol" : ":",
|
||||
"material" : ["cotton", "null"],
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 15,
|
||||
"price" : 200,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "stabilizer",
|
||||
"name" : "gyroscopic stabilizer",
|
||||
"clip_size_modifier" : -10,
|
||||
"dispersion_modifier" : -2,
|
||||
"damage_modifier" : -2,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "An advanced unit that straps onto the side of your firearm and reduces vibration, greatly reducing recoil and increasing accuracy. However, it also takes up space in the magazine slot, reducing ammo capacity.",
|
||||
"weight" : 2,
|
||||
"to_hit" : -3,
|
||||
"color" : "blue",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 3,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 0,
|
||||
"recoil_modifier" : -8,
|
||||
"rarity" : 4,
|
||||
"price" : 680,
|
||||
"loudness_modifier" : 0
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "blowback",
|
||||
"name" : "rapid blowback",
|
||||
"clip_size_modifier" : 0,
|
||||
"dispersion_modifier" : 3,
|
||||
"damage_modifier" : 0,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "An improved blowback mechanism makes your firearm's automatic fire faster, at the cost of reduced accuracy and increased noise.",
|
||||
"weight" : 1,
|
||||
"to_hit" : 0,
|
||||
"color" : "red",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"mod_targets" : ["smg", "rifle"],
|
||||
"volume" : 0,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 6,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 3,
|
||||
"price" : 700,
|
||||
"loudness_modifier" : 4
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "autofire",
|
||||
"name" : "auto-fire mechanism",
|
||||
"weight" : 2,
|
||||
"color" : "red",
|
||||
"burst_modifier" : 3,
|
||||
"loudness_modifier" : 2,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "A simple mechanism that converts a pistol to a fully-automatic weapon, with a burst size of three rounds. However, it reduces accuracy, and increases noise and recoil.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "plastic"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 2,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38", "40", "57", "46"],
|
||||
"mod_targets" : ["pistol"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"ammo_modifier" : "NULL"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_9mm",
|
||||
"name" : "9mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 420,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Replacing several key parts of a .38, .40, .44 or .45 firearm converts it to a 9mm firearm. The conversion results in a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["38", "40", "44", "45"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 3,
|
||||
"bashing" : 0,
|
||||
"ammo_modifier" : "9mm"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_22",
|
||||
"name" : ".22 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 320,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Replacing several key parts of a 9mm, .38, .40, 5.7mm, 4.6mm, 7.62mm or .223 firearm converts it to a .22 firearm. The conversion results in a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["9mm", "38", "40", "57", "46", "762", "223"],
|
||||
"mod_targets" : ["pistol", "smg", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : -2,
|
||||
"ammo_modifier" : "22"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_57",
|
||||
"name" : "5.7mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 460,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "FN Hestal sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 5.7x28mm, a round designed for accuracy and armor penetration.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 1,
|
||||
"bashing" : -3,
|
||||
"ammo_modifier" : "57"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_46",
|
||||
"name" : "4.6mm caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 1,
|
||||
"price" : 460,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "Heckler and Koch sells a conversion kit, used to convert .22, 9mm, or .38 firearms to their proprietary 4.6x30mm, a round designed for accuracy and armor penetration.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 1,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["22", "9mm", "38"],
|
||||
"mod_targets" : ["pistol", "smg"],
|
||||
"rarity" : 1,
|
||||
"bashing" : -3,
|
||||
"ammo_modifier" : "46"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_308",
|
||||
"name" : ".308 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : 1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 520,
|
||||
"clip_size_modifier" : -20,
|
||||
"description" : "This kit is used to convert a shotgun or 7.62mm, .223 or .30-06 rifle to the popular and powerful .308 caliber. The conversion results in reduced ammo capacity and a slight reduction in accuracy.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["shot", "762", "223", "3006"],
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 4,
|
||||
"ammo_modifier" : "308"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "retool_223",
|
||||
"name" : ".223 caliber retool",
|
||||
"weight" : 1,
|
||||
"color" : "green",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : 1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 500,
|
||||
"clip_size_modifier" : -10,
|
||||
"description" : "This kit is used to convert a shotgun or 7.62mm, .30-06, or .308 rifle to the popular, accurate, and damaging .223 caliber. The conversion results in slight reductions in both accuracy and ammo capacity.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"acceptable_ammo" : ["shot", "762", "3006", "308"],
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 4,
|
||||
"ammo_modifier" : "223"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "conversion_battle",
|
||||
"name" : "battle rifle conversion",
|
||||
"clip_size_modifier" : 20,
|
||||
"dispersion_modifier" : 6,
|
||||
"damage_modifier" : 6,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "This is a complete conversion kit, designed to turn a rifle into a powerful battle rifle. It reduces accuracy, and increases noise and recoil, but also increases damage, ammo capacity, and fire rate.",
|
||||
"weight" : 3,
|
||||
"to_hit" : -1,
|
||||
"color" : "magenta",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["rifle"],
|
||||
"volume" : 4,
|
||||
"bashing" : 6,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : 4,
|
||||
"recoil_modifier" : 4,
|
||||
"rarity" : 1,
|
||||
"price" : 680,
|
||||
"loudness_modifier" : 4
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "conversion_sniper",
|
||||
"name" : "sniper conversion",
|
||||
"clip_size_modifier" : -15,
|
||||
"dispersion_modifier" : -10,
|
||||
"damage_modifier" : 8,
|
||||
"ammo_modifier" : "NULL",
|
||||
"description" : "This is a complete conversion kit, designed to turn a rifle into a deadly sniper rifle. It decreases ammo capacity, and removes any automatic fire capabilities, but also increases accuracy and damage.",
|
||||
"weight" : 2,
|
||||
"to_hit" : -1,
|
||||
"color" : "green",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"mod_targets" : ["rifle"],
|
||||
"volume" : 1,
|
||||
"bashing" : 0,
|
||||
"cutting" : 0,
|
||||
"burst_modifier" : -99,
|
||||
"recoil_modifier" : 0,
|
||||
"rarity" : 1,
|
||||
"price" : 660,
|
||||
"loudness_modifier" : 3
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "m203",
|
||||
"name" : "M203",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 1,
|
||||
"description" : "The M203 was originally designed for use with M16 variants but today can be attached to almost any rifle. It allows a single 40mm grenade to be loaded and fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX"],
|
||||
"ammo_modifier" : "40mm"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "bayonet",
|
||||
"name" : "bayonet",
|
||||
"weight" : 2,
|
||||
"color" : "light_cyan",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -3,
|
||||
"dispersion_modifier" : 0,
|
||||
"price" : 400,
|
||||
"clip_size_modifier" : 0,
|
||||
"description" : "A bayonet is a stabbing weapon that can be attached to the front of a shotgun, sub-machinegun or rifle, allowing a melee attack to deal piercing damage. The added length increases recoil slightly.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 16,
|
||||
"recoil_modifier" : 3,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["shotgun", "smg", "rifle"],
|
||||
"rarity" : 6,
|
||||
"bashing" : 0,
|
||||
"flags" : ["STAB"],
|
||||
"ammo_modifier" : "NULL"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "u_shotgun",
|
||||
"name" : "underslung shotgun",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 2,
|
||||
"price" : 650,
|
||||
"clip_size_modifier" : 2,
|
||||
"description" : "A miniaturized shotgun with 2 barrels, which can be mounted under the barrel of many rifles. It allows two shotgun shells to be loaded and fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "null"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX"],
|
||||
"ammo_modifier" : "shot"
|
||||
},
|
||||
{
|
||||
"type" : "GUNMOD",
|
||||
"id" : "gun_crossbow",
|
||||
"name" : "rail-mounted crossbow",
|
||||
"weight" : 1,
|
||||
"color" : "light_red",
|
||||
"burst_modifier" : 0,
|
||||
"loudness_modifier" : 0,
|
||||
"to_hit" : -1,
|
||||
"dispersion_modifier" : 0,
|
||||
"price" : 500,
|
||||
"clip_size_modifier" : 1,
|
||||
"description" : "A kit to attach a pair of crossbow arms and a firing rail to the barrel of a long firearm. It allows crossbow bolts to be fired.",
|
||||
"symbol" : ":",
|
||||
"material" : ["steel", "wood"],
|
||||
"volume" : 2,
|
||||
"cutting" : 0,
|
||||
"recoil_modifier" : 0,
|
||||
"damage_modifier" : 0,
|
||||
"mod_targets" : ["shotgun", "rifle"],
|
||||
"rarity" : 2,
|
||||
"bashing" : 2,
|
||||
"flags" : ["MODE_AUX", "STR_RELOAD"],
|
||||
"ammo_modifier" : "bolt"
|
||||
}
|
||||
]
|
||||
|
||||
+324
-273
File diff suppressed because it is too large
Load Diff
+754
-296
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,262 @@
|
||||
[
|
||||
{
|
||||
"ident" : "null",
|
||||
"name" : "Null",
|
||||
"bash_resist" : 0,
|
||||
"cut_resist" : 0,
|
||||
"bash_dmg_verb" : "damaged",
|
||||
"cut_dmg_verb" : "damaged",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 0,
|
||||
"density" : 1
|
||||
},
|
||||
{
|
||||
"ident" : "veggy",
|
||||
"name" : "Plant Matter",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "flesh",
|
||||
"name" : "Flesh",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "bruised",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 5
|
||||
},
|
||||
{
|
||||
"ident" : "powder",
|
||||
"name" : "Powder",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "damaged",
|
||||
"cut_dmg_verb" : "damaged",
|
||||
"dmg_adj" : ["lightly damaged", "damaged", "very damaged", "thoroughly damaged"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 1
|
||||
},
|
||||
{
|
||||
"ident" : "hflesh",
|
||||
"name" : "Human Flesh",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "bruised",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["bruised", "mutilated", "badly mutilated", "thoroughly mutilated"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 1,
|
||||
"fire_resist" : 0,
|
||||
"density" : 5
|
||||
},
|
||||
{
|
||||
"ident" : "cotton",
|
||||
"name" : "Cotton",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 3
|
||||
},
|
||||
{
|
||||
"ident" : "wool",
|
||||
"name" : "Wool",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "torn",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 9
|
||||
},
|
||||
{
|
||||
"ident" : "leather",
|
||||
"name" : "Leather",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["scratched", "cut", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 1,
|
||||
"density" : 6
|
||||
},
|
||||
{
|
||||
"ident" : "kevlar",
|
||||
"name" : "Kevlar",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["marked", "dented", "scarred", "broken"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 1,
|
||||
"density" : 10
|
||||
},
|
||||
{
|
||||
"ident" : "fur",
|
||||
"name" : "Fur",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "sliced",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 9
|
||||
},
|
||||
{
|
||||
"ident" : "chitin",
|
||||
"name" : "Chitin",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 10
|
||||
},
|
||||
{
|
||||
"ident" : "bone",
|
||||
"name" : "Bone",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 3,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 4,
|
||||
"density" : 7
|
||||
},
|
||||
{
|
||||
"ident" : "stone",
|
||||
"name" : "Stone",
|
||||
"bash_resist" : 6,
|
||||
"cut_resist" : 6,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "chipped",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 3,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 17
|
||||
},
|
||||
{
|
||||
"ident" : "paper",
|
||||
"name" : "Paper",
|
||||
"bash_resist" : 1,
|
||||
"cut_resist" : 1,
|
||||
"bash_dmg_verb" : "ripped",
|
||||
"cut_dmg_verb" : "cut",
|
||||
"dmg_adj" : ["ripped", "torn", "shredded", "tattered"],
|
||||
"acid_resist" : 1,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "wood",
|
||||
"name" : "Wood",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "splintered",
|
||||
"cut_dmg_verb" : "gouged",
|
||||
"dmg_adj" : ["scratched", "chipped", "cracked", "splintered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 4
|
||||
},
|
||||
{
|
||||
"ident" : "plastic",
|
||||
"name" : "Plastic",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 2,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "gouged",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 0,
|
||||
"density" : 8
|
||||
},
|
||||
{
|
||||
"ident" : "glass",
|
||||
"name" : "Glass",
|
||||
"bash_resist" : 3,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "cracked",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["scratched", "cut", "cracked", "shattered"],
|
||||
"acid_resist" : 3,
|
||||
"elec_resist" : 2,
|
||||
"fire_resist" : 2,
|
||||
"density" : 14
|
||||
},
|
||||
{
|
||||
"ident" : "iron",
|
||||
"name" : "Iron",
|
||||
"bash_resist" : 4,
|
||||
"cut_resist" : 4,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 52
|
||||
},
|
||||
{
|
||||
"ident" : "steel",
|
||||
"name" : "Steel",
|
||||
"bash_resist" : 6,
|
||||
"cut_resist" : 6,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 0,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 52
|
||||
},
|
||||
{
|
||||
"ident" : "silver",
|
||||
"name" : "Silver",
|
||||
"bash_resist" : 2,
|
||||
"cut_resist" : 3,
|
||||
"bash_dmg_verb" : "dented",
|
||||
"cut_dmg_verb" : "scratched",
|
||||
"dmg_adj" : ["marked", "dented", "smashed", "shattered"],
|
||||
"acid_resist" : 2,
|
||||
"elec_resist" : 0,
|
||||
"fire_resist" : 2,
|
||||
"density" : 70
|
||||
}
|
||||
]
|
||||
@@ -66,7 +66,8 @@
|
||||
"monsters" : [
|
||||
{ "monster" : "mon_triffid_young", "freq" : 300, "multiplier" : 0 },
|
||||
{ "monster" : "mon_vinebeast", "freq" : 160, "multiplier" : 10 },
|
||||
{ "monster" : "mon_triffid_queen", "freq" : 60, "multiplier" : 0 }
|
||||
{ "monster" : "mon_triffid_queen", "freq" : 60, "multiplier" : 0 },
|
||||
{ "monster" : "mon_triffid_heart", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -78,7 +79,8 @@
|
||||
{ "monster" : "mon_zombie_fungus", "freq" : 300, "multiplier" : 0 },
|
||||
{ "monster" : "mon_boomer_fungus", "freq" : 30, "multiplier" : 0 },
|
||||
{ "monster" : "mon_spore", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_fungal_wall", "freq" : 0, "multiplier" : 0 }
|
||||
{ "monster" : "mon_fungal_wall", "freq" : 0, "multiplier" : 0 },
|
||||
{ "monster" : "mon_fungaloid_queen", "freq" : 0, "multiplier" : 0 }
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
+15
-10
@@ -3,7 +3,7 @@
|
||||
"ident": "unemployed",
|
||||
"name": "Unemployed",
|
||||
"description":
|
||||
"They say you don't have any 'useful skills', but at least your clothes fit\nwell.",
|
||||
"They say you don't have any 'useful skills', but at least your clothes fit well.",
|
||||
"points": 0,
|
||||
"items": ["jeans", "tshirt", "sneakers"]
|
||||
},
|
||||
@@ -12,7 +12,7 @@
|
||||
"ident": "tailor",
|
||||
"name": "Tailor",
|
||||
"description":
|
||||
"You've made and adjusted clothing for some of the biggest names in town.\nNow, their undead bodies are trying to eat your brains. At least you'll be\nable to keep your own clothing repaired.",
|
||||
"You've made and adjusted clothing for some of the biggest names in town. Now, their undead bodies are trying to eat your brains. At least you'll be able to keep your own clothing repaired.",
|
||||
"points": 1,
|
||||
"items": ["polo_shirt", "blazer", "pants", "dress_shoes", "sewing_kit", "scissors", "manual_tailor"]
|
||||
},
|
||||
@@ -21,7 +21,7 @@
|
||||
"ident": "labtech",
|
||||
"name": "Lab Technician",
|
||||
"description":
|
||||
"It was your first day in the lab when the cataclysm hit. You were evacuated\nwith all the civilians, but at least you kept your lab gear.",
|
||||
"It was your first day in the lab when the cataclysm hit. You were evacuated with all the civilians, but at least you kept your lab gear.",
|
||||
"points": 1,
|
||||
"items": ["dress_shirt", "pants", "boots", "coat_lab", "gloves_rubber", "glasses_safety"]
|
||||
},
|
||||
@@ -30,7 +30,7 @@
|
||||
"ident": "mechanic",
|
||||
"name": "Wannabe Mechanic",
|
||||
"description":
|
||||
"Although you never got your driver's license, you've always loved cars.\nYou start with a wrench, a toolbelt, and some car-related reading material.",
|
||||
"Although you never got your driver's license, you've always loved cars. You start with a wrench, a toolbelt, and some car-related reading material.",
|
||||
"points": 2,
|
||||
"items": ["tank_top", "jeans", "boots", "beltrig", "wrench", "mag_cars", "manual_mechanics"]
|
||||
},
|
||||
@@ -39,22 +39,27 @@
|
||||
"ident": "scoundrel",
|
||||
"name": "Scoundrel",
|
||||
"description":
|
||||
"Your flexible outlook on law has ensured your survival, but now what?\nYou start with cargo pants, a hoodie, and \"sundries\".",
|
||||
"Your flexible outlook on law has ensured your survival, but now what? You start with cargo pants, a hoodie, \"sundries\", and one additional level of melee.",
|
||||
"points": 2,
|
||||
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"]
|
||||
"items": ["tank_top", "hoodie", "pants_cargo", "sneakers", "weed", "picklocks"],
|
||||
"skills" : [
|
||||
{
|
||||
"name" : "melee",
|
||||
"level" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ident": "smoker",
|
||||
"name": "Chain Smoker",
|
||||
"description":
|
||||
"Everyone at work knew you as the person who always had a cigarette or two\nin hand. Now, you're down to a single pack, and you hope you find more soon.\nYou start out with a strong nicotine addiction, and 10 cigarettes.",
|
||||
"description": "Everyone at work knew you as the person who always had a cigarette or two in hand. now, you're down to a single pack, and you hope you find more soon. You start out with a strong nicotine addiction, and 10 cigarettes.",
|
||||
"points": -1,
|
||||
"items": ["pants", "dress_shirt", "dress_shoes", "cig"],
|
||||
"addictions": [
|
||||
{
|
||||
"type": "nicotine",
|
||||
"intensity": 10
|
||||
"type": "nicotine",
|
||||
"intensity": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+2794
-112
File diff suppressed because it is too large
Load Diff
+54
-27
@@ -2,136 +2,163 @@
|
||||
[
|
||||
"dodge",
|
||||
"dodge",
|
||||
"Your skill at dodging, whether it be from an attack, a trap, or a natural\noccurrence. It is also used when attempting to fall gracefully, or in other\nacrobatic feats."
|
||||
"Your skill at dodging, whether it be from an attack, a trap, or a natural occurrence. It is also used when attempting to fall gracefully, or in other acrobatic feats.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"melee",
|
||||
"melee",
|
||||
"Your skill at hand-to-hand combat, both with and without a weapon. At low\nlevels this merely increases your chance to hit, but at higher levels it also\nincreases the damage done significantly."
|
||||
"Your skill at hand-to-hand combat, both with and without a weapon. At low levels this merely increases your chance to hit, but at higher levels it also increases the damage done significantly.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"unarmed",
|
||||
"unarmed combat",
|
||||
"Your skill at combat without a weapon. While at low levels, unarmed combat is\na good way to die quickly, those skilled in it can eventually use throws and\ncrushing blows to quickly dispatch enemies."
|
||||
"Your skill at combat without a weapon. While at low levels, unarmed combat is a good way to die quickly, those skilled in it can eventually use throws and crushing blows to quickly dispatch enemies.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"bashing",
|
||||
"bashing weapons",
|
||||
"Your skill at combat with weapons that club or bash your enemies. This\nincludes everything from rocks to baseball bats, and even the butt of rifles.\nThis increases damage, and at higher levels will improve your chance to hit."
|
||||
"Your skill at combat with weapons that club or bash your enemies. This includes everything from rocks to baseball bats, and even the butt of rifles. This increases damage, and at higher levels will improve your chance to hit.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"cutting",
|
||||
"cutting weapons",
|
||||
"Your skill at combat with weapons that cut or slice your enemies. At first\nthis will simply slightly increase accuracy and damage; later on it will\nhelp you bypass armor and thick hides."
|
||||
"Your skill at combat with weapons that cut or slice your enemies. At first this will simply slightly increase accuracy and damage; later on it will help you bypass armor and thick hides.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"stabbing",
|
||||
"piercing weapons",
|
||||
"Your skill at combat that involves piercing weapons. This includes spears,\nwhich only have a stabbing attack, and things like knives, which can cut or\npierce. This increases your accuracy and chance of a deadly critical."
|
||||
"Your skill at combat that involves piercing weapons. This includes spears, which only have a stabbing attack, and things like knives, which can cut or pierce. This increases your accuracy and chance of a deadly critical.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"throw",
|
||||
"throwing",
|
||||
"Your skill at throwing items and getting them to go where you want. Increases\nboth accuracy and, at higher levels, range."
|
||||
"Your skill at throwing items and getting them to go where you want. Increases both accuracy and, at higher levels, range.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"gun",
|
||||
"firearms",
|
||||
"Your general skill at firearms. This increases your accuracy with any gun,\nbut not as much as the skill associated with the gun in question."
|
||||
"Your general skill at firearms. This increases your accuracy with any gun, but not as much as the skill associated with the gun in question.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"pistol",
|
||||
"handguns",
|
||||
"Your skill with handguns. These have poor accuracy, but generally are fired\nand reloaded faster than other guns, and are good in close quarters."
|
||||
"Your skill with handguns. These have poor accuracy, but generally are fired and reloaded faster than other guns, and are good in close quarters.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"shotgun",
|
||||
"shotguns",
|
||||
"Your skill with shotguns. Shot is easy to hit with, and does massive damage,\nbut has short range. Shotguns may also be loaded with slugs, which go further\nand do as much damage, but are not very accurate."
|
||||
"Your skill with shotguns. Shot is easy to hit with, and does massive damage, but has short range. Shotguns may also be loaded with slugs, which go further and do as much damage, but are not very accurate.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"smg",
|
||||
"submachine guns",
|
||||
"Your skill with submachine guns and machine pistols. Halfway between a pistol\nand an assault rifle, these weapons fire and reload quickly, and may fire in\nbursts, but they are not very accurate."
|
||||
"Your skill with submachine guns and machine pistols. Halfway between a pistol and an assault rifle, these weapons fire and reload quickly, and may fire in bursts, but they are not very accurate.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"rifle",
|
||||
"rifles",
|
||||
"Your skill with rifles, both assault rifles and semi-auto hunting rifles.\nThese have terrific range and accuracy, but are very slow to fire and reload,\nand are not very good in close quarters."
|
||||
"Your skill with rifles, both assault rifles and semi-auto hunting rifles. These have terrific range and accuracy, but are very slow to fire and reload, and are not very good in close quarters.",
|
||||
["gun_type"]
|
||||
],
|
||||
[
|
||||
"archery",
|
||||
"archery",
|
||||
"Your skill with all kinds of bows, from crossbows to handmade long bows.\nThese are quiet, but require some amount of strength to use, and are not\nterribly accurate. They can only be deadly in skilled hands."
|
||||
"Your skill with all kinds of bows, from crossbows to handmade long bows. These are quiet, but require some amount of strength to use, and are not terribly accurate. They can only be deadly in skilled hands.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"launcher",
|
||||
"grenade launcher",
|
||||
"Your skill with grenade launchers, whether standalone or as a rifle mod.\nThese launchers fire a variety of 40mm grenades with different uses,\nbut they and their rounds are hard to find."
|
||||
"Your skill with grenade launchers, whether standalone or as a rifle mod. These launchers fire a variety of 40mm grenades with different uses, but they and their rounds are hard to find.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"computer",
|
||||
"computers",
|
||||
"Your skill with computers, both in terms of legitimate use, and hacking. This\nwill help you use complex systems, and bypass their security."
|
||||
"Your skill with computers, both in terms of legitimate use, and hacking. This will help you use complex systems, and bypass their security.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"mechanics",
|
||||
"mechanics",
|
||||
"Your skill with repairs to mechanical systems, and the crafting of many items\nthat use complex parts, but are not electronics."
|
||||
"Your skill with repairs to mechanical systems, and the crafting of many items that use complex parts, but are not electronics.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"electronics",
|
||||
"electronics",
|
||||
"Your skill with repairs to electrical systems, and the crafting of many items\nthat use electrical parts."
|
||||
"Your skill with repairs to electrical systems, and the crafting of many items that use electrical parts.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"cooking",
|
||||
"cooking",
|
||||
"Your skill in combining food ingredients to make other, tastier food items.\nThis may also be used in mixing chemicals and other more esoteric tasks."
|
||||
"Your skill in combining food ingredients to make other, tastier food items. This may also be used in mixing chemicals and other more esoteric tasks.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"carpentry",
|
||||
"construction",
|
||||
"Your general knowledge in construction. This is used primarily when building\nterrain, via the * screen."
|
||||
"Your general knowledge in construction. This is used primarily when building terrain, via the * screen.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"survival",
|
||||
"survival",
|
||||
"Your skill in wilderness survival. This helps you butcher meat from a corpse\nand craft various basic survival items. High levels may allow you to remove\npoison from tainted meat. Also used for skinning corpses to acquire pelts."
|
||||
"Your skill in wilderness survival. This helps you butcher meat from a corpse and craft various basic survival items. Also used for skinning corpses to acquire pelts.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"traps",
|
||||
"traps",
|
||||
"Your skill at setting and disarming traps safely and effectively. Note that\nthis does not help you detect traps, or avoid their effects if you activate\nthem."
|
||||
"Your skill at setting and disarming traps safely and effectively. Note that this does not help you detect traps, or avoid their effects if you activate them.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"tailor",
|
||||
"tailoring",
|
||||
"Your skill at repairing clothing, and at higher levels, creating clothing\nfrom basic materials. Generally a sewing kit is needed. Also applies to\nother methods of clothing repair and textile crafting."
|
||||
"Your skill at repairing clothing, and at higher levels, creating clothing from basic materials. Generally a sewing kit is needed. Also applies to other methods of clothing repair and textile crafting.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"firstaid",
|
||||
"first aid",
|
||||
"Your skill at emergency medical treatment, such as that from first aid kits\nand bandages. High levels of this skill may help heal more HP. Some drugs\nmay be more effective as well."
|
||||
"Your skill at emergency medical treatment, such as that from first aid kits and bandages. High levels of this skill may help heal more HP. Some drugs may be more effective as well.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"speech",
|
||||
"speech",
|
||||
"Your skill at talking to people, convincing them of things, lying, and many\nothers. Works best in conjunction with a high intelligence."
|
||||
"Your skill at talking to people, convincing them of things, lying, and many others. Works best in conjunction with a high intelligence.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"barter",
|
||||
"barter",
|
||||
"Your skill at getting a good deal when trading with others. Very high levels\nmight even see you getting freebies."
|
||||
"Your skill at getting a good deal when trading with others. Very high levels might even see you getting freebies.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"swimming",
|
||||
"swimming",
|
||||
"Your skill at swimming. This affects speed, your ability to swim while\nwearing clothes or carrying weights, and in-water combat."
|
||||
"Your skill at swimming. This affects speed, your ability to swim while wearing clothes or carrying weights, and in-water combat.",
|
||||
[]
|
||||
],
|
||||
[
|
||||
"driving",
|
||||
"driving",
|
||||
"Your skill at driving. This affects how well you can control a vehicle,\nas well as the penalty of shooting while driving."
|
||||
"Your skill at driving. This affects how well you can control a vehicle, as well as the penalty of shooting while driving.",
|
||||
[]
|
||||
]
|
||||
]
|
||||
|
||||
+18
-18
@@ -111,7 +111,7 @@ void defense_game::pre_action(game *g, action_id &act)
|
||||
g->add_msg("You don't need to sleep!");
|
||||
act = ACTION_NULL;
|
||||
}
|
||||
if (act == ACTION_SAVE) {
|
||||
if (act == ACTION_SAVE || act == ACTION_QUICKSAVE) {
|
||||
g->add_msg("You cannot save in defense mode!");
|
||||
act = ACTION_NULL;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ void defense_game::init_map(game *g)
|
||||
// Round down to the nearest even number
|
||||
mx -= mx % 2;
|
||||
my -= my % 2;
|
||||
tinymap tm(&g->itypes, &g->mapitems, &g->traps);
|
||||
tinymap tm(&g->traps);
|
||||
tm.generate(g, g->cur_om, mx, my, 0, int(g->turn));
|
||||
tm.clear_spawns();
|
||||
tm.clear_traps();
|
||||
@@ -440,7 +440,7 @@ void defense_game::init_to_style(defense_style new_style)
|
||||
|
||||
void defense_game::setup()
|
||||
{
|
||||
WINDOW* w = newwin(25, 80, 0, 0);
|
||||
WINDOW* w = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, 0, 0);
|
||||
int selection = 1;
|
||||
refresh_setup(w, selection);
|
||||
|
||||
@@ -801,7 +801,7 @@ void defense_game::caravan(game *g)
|
||||
|
||||
int total_price = 0;
|
||||
|
||||
WINDOW *w = newwin(25, 80, 0, 0);
|
||||
WINDOW *w = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, 0, 0);
|
||||
|
||||
int offset = 0, item_selected = 0, category_selected = 0;
|
||||
|
||||
@@ -1117,25 +1117,25 @@ void draw_caravan_borders(WINDOW *w, int current_window)
|
||||
mvwputch(w, i, 39, col, LINE_XOXO);
|
||||
}
|
||||
for (int i = 1; i <= 38; i++)
|
||||
mvwputch(w, 24, i, c_ltgray, LINE_OXOX);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, i, c_ltgray, LINE_OXOX);
|
||||
|
||||
mvwputch(w, 24, 0, c_ltgray, LINE_XXOO);
|
||||
mvwputch(w, 24, 39, c_ltgray, LINE_XXOX);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, 0, c_ltgray, LINE_XXOO);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, 39, c_ltgray, LINE_XXOX);
|
||||
|
||||
// Finally, draw the item section borders
|
||||
for (int i = 40; i <= 78; i++) {
|
||||
for (int i = 40; i <= FULL_SCREEN_WIDTH-2; i++) {
|
||||
mvwputch(w, 0, i, col, LINE_OXOX);
|
||||
mvwputch(w, 24, i, col, LINE_OXOX);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, i, col, LINE_OXOX);
|
||||
}
|
||||
for (int i = 1; i <= 23; i++)
|
||||
mvwputch(w, i, 79, col, LINE_XOXO);
|
||||
for (int i = 1; i <= FULL_SCREEN_HEIGHT-2; i++)
|
||||
mvwputch(w, i, FULL_SCREEN_WIDTH-1, col, LINE_XOXO);
|
||||
|
||||
mvwputch(w, 24, 39, col, LINE_XXOX);
|
||||
mvwputch(w, 0, 79, col, LINE_OOXX);
|
||||
mvwputch(w, 24, 79, col, LINE_XOOX);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, 39, col, LINE_XXOX);
|
||||
mvwputch(w, 0, FULL_SCREEN_WIDTH-1, col, LINE_OOXX);
|
||||
mvwputch(w, FULL_SCREEN_HEIGHT-1, FULL_SCREEN_WIDTH-1, col, LINE_XOOX);
|
||||
|
||||
// Quick reminded about help.
|
||||
mvwprintz(w, 24, 2, c_red, "Press ? for help.");
|
||||
mvwprintz(w, FULL_SCREEN_HEIGHT-1, 2, c_red, "Press ? for help.");
|
||||
wrefresh(w);
|
||||
}
|
||||
|
||||
@@ -1165,7 +1165,7 @@ void draw_caravan_items(WINDOW *w, game *g, std::vector<itype_id> *items,
|
||||
// will corrupt the item list.
|
||||
|
||||
// Actually, clear the item info first.
|
||||
for (int i = 12; i <= 23; i++)
|
||||
for (int i = 12; i <= FULL_SCREEN_HEIGHT-2; i++)
|
||||
mvwprintz(w, i, 1, c_black, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
|
||||
// THEN print it--if item_selected is valid
|
||||
if (item_selected < items->size()) {
|
||||
@@ -1173,10 +1173,10 @@ void draw_caravan_items(WINDOW *w, game *g, std::vector<itype_id> *items,
|
||||
mvwprintz(w, 12, 0, c_white, tmp.info().c_str());
|
||||
}
|
||||
// Next, clear the item list on the right
|
||||
for (int i = 1; i <= 23; i++)
|
||||
for (int i = 1; i <= FULL_SCREEN_HEIGHT-2; i++)
|
||||
mvwprintz(w, i, 40, c_black, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
|
||||
// Finally, print the item list on the right
|
||||
for (int i = offset; i <= offset + 23 && i < items->size(); i++) {
|
||||
for (int i = offset; i <= offset + FULL_SCREEN_HEIGHT-2 && i < items->size(); i++) {
|
||||
mvwprintz(w, i - offset + 1, 40, (item_selected == i ? h_white : c_white),
|
||||
g->itypes[ (*items)[i] ]->name.c_str());
|
||||
wprintz(w, c_white, " x %s%d", ((*counts)[i] >= 10 ? "" : " "), (*counts)[i]);
|
||||
|
||||
@@ -89,6 +89,7 @@ struct talk_response
|
||||
int mission_index;
|
||||
mission_id miss; // If it generates a new mission
|
||||
int tempvalue; // Used for various stuff
|
||||
Skill* skill;
|
||||
npc_opinion opinion_success;
|
||||
npc_opinion opinion_failure;
|
||||
void (talk_function::*effect_success)(game *, npc *);
|
||||
@@ -104,6 +105,7 @@ struct talk_response
|
||||
mission_index = -1;
|
||||
miss = MISSION_NULL;
|
||||
tempvalue = -1;
|
||||
skill = NULL;
|
||||
effect_success = &talk_function::nothing;
|
||||
effect_failure = &talk_function::nothing;
|
||||
opinion_success = npc_opinion();
|
||||
@@ -120,6 +122,7 @@ struct talk_response
|
||||
mission_index = rhs.mission_index;
|
||||
miss = rhs.miss;
|
||||
tempvalue = rhs.tempvalue;
|
||||
skill = rhs.skill;
|
||||
effect_success = rhs.effect_success;
|
||||
effect_failure = rhs.effect_failure;
|
||||
opinion_success = rhs.opinion_success;
|
||||
|
||||
+1044
-714
File diff suppressed because it is too large
Load Diff
@@ -20,4 +20,6 @@ std::string dis_name(disease dis);
|
||||
|
||||
std::string dis_description(disease dis);
|
||||
|
||||
dis_type disease_for_body_part(dis_type base, int body_part);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,20 +5,21 @@
|
||||
#define sgn(x) (((x) < 0) ? -1 : 1)
|
||||
#endif
|
||||
|
||||
enum material {
|
||||
MNULL = 0,
|
||||
//Food Materials
|
||||
VEGGY, FLESH, POWDER, HFLESH, //Human Flesh.
|
||||
//Clothing
|
||||
COTTON, WOOL, LEATHER, KEVLAR, FUR,
|
||||
//Other
|
||||
STONE, PAPER, WOOD, PLASTIC, GLASS, IRON, STEEL, SILVER
|
||||
};
|
||||
|
||||
enum phase_id {
|
||||
PNULL, SOLID, LIQUID, GAS, PLASMA
|
||||
};
|
||||
|
||||
enum damage_type
|
||||
{
|
||||
DNULL = 0,
|
||||
BASH,
|
||||
CUT,
|
||||
ACID,
|
||||
ELECTRICITY,
|
||||
FIRE,
|
||||
NUM_DAM_TYPES
|
||||
};
|
||||
|
||||
struct point {
|
||||
int x;
|
||||
int y;
|
||||
|
||||
@@ -0,0 +1,340 @@
|
||||
#ifndef _FIELD_H_
|
||||
#define _FIELD_H_
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "color.h"
|
||||
#include "item.h"
|
||||
#include "trap.h"
|
||||
#include "monster.h"
|
||||
#include "enums.h"
|
||||
#include "computer.h"
|
||||
#include "vehicle.h"
|
||||
#include "graffiti.h"
|
||||
#include "basecamp.h"
|
||||
#include "iexamine.h"
|
||||
#include <iosfwd>
|
||||
|
||||
/*
|
||||
struct field_t
|
||||
Used to store the master field effects list metadata. Not used to store a field, just queried to find out specifics
|
||||
of an existing field.
|
||||
*/
|
||||
struct field_t {
|
||||
std::string name[3]; //The display name of the given density (ie: light smoke, smoke, heavy smoke)
|
||||
char sym; //The symbol to draw for this field. Note that some are reserved like * and %. You will have to check the draw function for specifics.
|
||||
nc_color color[3]; //The color the field will be drawn as on the screen, by density.
|
||||
|
||||
/*
|
||||
If true, does not invoke a check to block line of sight. If false, may block line of sight.
|
||||
Note that this does nothing by itself. You must go to the code block in lightmap.cpp and modify
|
||||
transparancy code there with a case statement as well!
|
||||
*/
|
||||
bool transparent[3];
|
||||
|
||||
//Dangerous tiles ask you before you step in them.
|
||||
bool dangerous[3];
|
||||
|
||||
//Controls, albeit randomly, how long a field of a given type will last before going down in density.
|
||||
int halflife; // In turns
|
||||
|
||||
//cost of moving into and out of this field
|
||||
int move_cost[3];
|
||||
};
|
||||
|
||||
//The master list of id's for a field, corresponding to the fieldlist array.
|
||||
enum field_id {
|
||||
fd_null = 0,
|
||||
fd_blood,
|
||||
fd_bile,
|
||||
fd_gibs_flesh,
|
||||
fd_gibs_veggy,
|
||||
fd_web,
|
||||
fd_slime,
|
||||
fd_acid,
|
||||
fd_sap,
|
||||
fd_sludge,
|
||||
fd_fire,
|
||||
fd_rubble,
|
||||
fd_smoke,
|
||||
fd_toxic_gas,
|
||||
fd_tear_gas,
|
||||
fd_nuke_gas,
|
||||
fd_gas_vent,
|
||||
fd_fire_vent,
|
||||
fd_flame_burst,
|
||||
fd_electricity,
|
||||
fd_fatigue,
|
||||
fd_push_items,
|
||||
fd_shock_vent,
|
||||
fd_acid_vent,
|
||||
num_fields
|
||||
};
|
||||
|
||||
/*
|
||||
Controls the master listing of all possible field effects, indexed by a field_id. Does not store active fields, just metadata.
|
||||
*/
|
||||
const field_t fieldlist[] = {
|
||||
{
|
||||
{"", "", ""}, '%',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"blood splatter", "blood stain", "puddle of blood"}, '%',
|
||||
{c_red, c_red, c_red}, {true, true, true}, {false, false, false}, 2500,
|
||||
{0,0,0}
|
||||
},
|
||||
{
|
||||
{"bile splatter", "bile stain", "puddle of bile"}, '%',
|
||||
{c_pink, c_pink, c_pink}, {true, true, true}, {false, false, false},2500,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"scraps of flesh", "bloody meat chunks", "heap of gore"}, '~',
|
||||
{c_brown, c_ltred, c_red}, {true, true, true}, {false, false, false}, 2500,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"shredded leaves and twigs", "shattered branches and leaves", "broken vegetation tangle"}, '~',
|
||||
{c_ltgreen, c_ltgreen, c_green}, {true, true, true}, {false, false, false}, 2500,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"cobwebs","webs", "thick webs"}, '}',
|
||||
{c_white, c_white, c_white}, {true, true, false},{false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"slime trail", "slime stain", "puddle of slime"}, '%',
|
||||
{c_ltgreen, c_ltgreen, c_green},{true, true, true},{false, false, false},2500,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"acid splatter", "acid streak", "pool of acid"}, '5',
|
||||
{c_ltgreen, c_green, c_green}, {true, true, true}, {true, true, true}, 10,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"sap splatter", "glob of sap", "pool of sap"}, '5',
|
||||
{c_yellow, c_brown, c_brown}, {true, true, true}, {true, true, true}, 20,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"thin sludge trail", "sludge trail", "thick sludge trail"}, '5',
|
||||
{c_ltgray, c_dkgray, c_black}, {true, true, true}, {false, false, false}, 900,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"small fire", "fire", "raging fire"}, '4',
|
||||
{c_yellow, c_ltred, c_red}, {true, true, true}, {true, true, true}, 800,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"rubble heap", "rubble pile", "mountain of rubble"}, '#',
|
||||
{c_dkgray, c_dkgray, c_dkgray}, {true, true, false},{false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"thin smoke", "smoke", "thick smoke"}, '8',
|
||||
{c_white, c_ltgray, c_dkgray}, {true, false, false},{false, true, true}, 300,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"hazy cloud","toxic gas","thick toxic gas"}, '8',
|
||||
{c_white, c_ltgreen, c_green}, {true, false, false},{false, true, true}, 900,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"hazy cloud","tear gas","thick tear gas"}, '8',
|
||||
{c_white, c_yellow, c_brown}, {true, false, false},{true, true, true}, 600,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"hazy cloud","radioactive gas", "thick radioactive gas"}, '8',
|
||||
{c_white, c_ltgreen, c_green}, {true, true, false}, {true, true, true}, 1000,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"gas vent", "gas vent", "gas vent"}, '%',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{ // Fire Vents
|
||||
{"", "", ""}, '&',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"fire", "fire", "fire"}, '5',
|
||||
{c_red, c_red, c_red}, {true, true, true}, {true, true, true}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"sparks", "electric crackle", "electric cloud"}, '9',
|
||||
{c_white, c_cyan, c_blue}, {true, true, true}, {true, true, true}, 2,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{
|
||||
{"odd ripple", "swirling air", "tear in reality"}, '*',
|
||||
{c_ltgray, c_dkgray, c_magenta},{true, true, false},{false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{ //Push Items
|
||||
{"", "", ""}, '&',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{ // shock vents
|
||||
{"", "", ""}, '&',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
},
|
||||
|
||||
{ // acid vents
|
||||
{"", "", ""}, '&',
|
||||
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0,
|
||||
{0,0,0}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Class: field_entry
|
||||
An active or passive effect existing on a tile. Multiple different types can exist on one tile
|
||||
but there can be only one of each type (IE: one fire, one smoke cloud, etc). Each effect
|
||||
can vary in intensity (density) and age (usually used as a time to live).
|
||||
*/
|
||||
class field_entry {
|
||||
public:
|
||||
field_entry() {
|
||||
type = fd_null;
|
||||
density = 1;
|
||||
age = 0;
|
||||
is_alive = false;
|
||||
};
|
||||
|
||||
field_entry(field_id t, unsigned char d, unsigned int a) {
|
||||
type = t;
|
||||
density = d;
|
||||
age = a;
|
||||
is_alive = true;
|
||||
}
|
||||
|
||||
//returns the move cost of this field
|
||||
int move_cost() const;
|
||||
|
||||
//Returns the field_id of the current field entry.
|
||||
field_id getFieldType() const;
|
||||
|
||||
//Returns the current density (aka intensity) of the current field entry.
|
||||
signed char getFieldDensity() const;
|
||||
|
||||
//Returns the age (usually turns to live) of the current field entry.
|
||||
int getFieldAge() const;
|
||||
|
||||
//Allows you to modify the field_id of the current field entry.
|
||||
field_id setFieldType(const field_id new_field_id);
|
||||
|
||||
//Allows you to modify the density of the current field entry.
|
||||
signed char setFieldDensity(const signed char new_density);
|
||||
|
||||
//Allows you to modify the age of the current field entry.
|
||||
int setFieldAge(const int new_age);
|
||||
|
||||
//Get the move cost for this field
|
||||
int getFieldMoveCost();
|
||||
|
||||
//Returns if the current field is dangerous or not.
|
||||
bool is_dangerous() const
|
||||
{
|
||||
return fieldlist[type].dangerous[density - 1];
|
||||
}
|
||||
|
||||
//Returns the display name of the current field given its current density.
|
||||
//IE: light smoke, smoke, heavy smoke
|
||||
std::string name() const
|
||||
{
|
||||
return fieldlist[type].name[density - 1];
|
||||
}
|
||||
|
||||
//Returns true if this is an active field, false if it should be removed.
|
||||
bool isAlive(){
|
||||
return is_alive;
|
||||
}
|
||||
|
||||
private:
|
||||
field_id type; //The field identifier.
|
||||
signed char density; //The density, or intensity (higher is stronger), of the field entry.
|
||||
int age; //The age, or time to live, of the field effect. 0 is permanent.
|
||||
bool is_alive; //True if this is an active field, false if it should be destroyed next check.
|
||||
};
|
||||
|
||||
//Represents a variable sized collection of field entries on a given map square.
|
||||
class field{
|
||||
public:
|
||||
//Field constructor
|
||||
field();
|
||||
//Frees all memory assigned to the field's field_entry vector and general cleanup.
|
||||
~field();
|
||||
|
||||
//Returns a field entry corresponding to the field_id parameter passed in.
|
||||
//If no fields are found then a field_entry with type fd_null is returned.
|
||||
field_entry* findField(const field_id field_to_find);
|
||||
const field_entry* findFieldc(const field_id field_to_find); //for when you want a const field_entry.
|
||||
|
||||
//Inserts the given field_id into the field list for a given tile if it does not already exist.
|
||||
//Returns false if the field_id already exists, true otherwise.
|
||||
//If you wish to modify an already existing field use findField and modify the result.
|
||||
//Density defaults to 1, and age to 0 (permanent) if not specified.
|
||||
bool addField(const field_id field_to_add,const unsigned char new_density=1, const int new_age=0);
|
||||
|
||||
//Removes the field entry with a type equal to the field_id parameter. Returns true if removed, false otherwise.
|
||||
bool removeField(const field_id field_to_remove);
|
||||
|
||||
//Returns the number of fields existing on the current tile.
|
||||
unsigned int fieldCount() const;
|
||||
|
||||
//Returns the last added field from the tile for drawing purposes.
|
||||
//This can be changed to return whatever you think the most important field to draw is.
|
||||
field_id fieldSymbol() const;
|
||||
|
||||
//Returns the vector iterator to begin searching through the list.
|
||||
//Note: If you are using "field_at" function, set the return to a temporary field variable! If you somehow
|
||||
//query an out of bounds field location it returns a different field every inquery. This means that
|
||||
//the start and end iterators won't match up and will crash the system.
|
||||
std::vector<field_entry*>::iterator getFieldStart();
|
||||
|
||||
//Returns the vector iterator to end searching through the list.
|
||||
std::vector<field_entry*>::iterator getFieldEnd();
|
||||
|
||||
//Returns the total move cost from all fields
|
||||
int move_cost() const;
|
||||
|
||||
private:
|
||||
std::vector<field_entry*> field_list; //A listing of all field effects on the current tile.
|
||||
//Draw_symbol currently is equal to the last field added to the square. You can modify this behavior in the class functions if you wish.
|
||||
field_id draw_symbol;
|
||||
bool dirty; //true if this is a copy of the class, false otherwise.
|
||||
};
|
||||
#endif
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "mutation.h"
|
||||
#include "gamemode.h"
|
||||
#include "action.h"
|
||||
#include "translations.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <list>
|
||||
@@ -47,8 +48,16 @@
|
||||
#define BULLET_SPEED 10000000
|
||||
#define EXPLOSION_SPEED 70000000
|
||||
|
||||
#define PICKUP_RANGE 2
|
||||
#define MAX_ITEM_IN_SQUARE 1024 // really just a sanity check for functions not tested beyond this. in theory 4096 works (`InvletInvlet)
|
||||
#define MAX_VOLUME_IN_SQUARE 1000 // 6.25 dead bears is enough for everybody!
|
||||
#define MAX_ITEM_IN_VEHICLE_STORAGE MAX_ITEM_IN_SQUARE // no reason to differ
|
||||
#define MAX_VOLUME_IN_VEHICLE_STORAGE 500 // todo: variation. semi trailer square could hold more. the real limit would be weight
|
||||
|
||||
// The reference to the one and only game instance.
|
||||
extern game *g;
|
||||
|
||||
#define PICKUP_RANGE 2
|
||||
extern bool trigdist;
|
||||
enum tut_type {
|
||||
TUT_NULL,
|
||||
TUT_BASIC, TUT_COMBAT,
|
||||
@@ -113,6 +122,12 @@ class game
|
||||
void vadd_msg(const char* msg, va_list ap );
|
||||
void add_msg(const char* msg, ...);
|
||||
void add_msg_if_player(player *p, const char* msg, ...);
|
||||
std::string press_x(action_id act); // (Press X (or Y)|Try) to Z
|
||||
std::string press_x(action_id act, std::string key_bound,
|
||||
std::string key_unbound);
|
||||
std::string press_x(action_id act, std::string key_bound_pre,
|
||||
std::string key_bound_suf, std::string key_unbound);
|
||||
std::string press_x(action_id act, std::string act_desc); // ('Z'ing|zing) (X( or Y)))
|
||||
void add_event(event_type type, int on_turn, int faction_id = -1,
|
||||
int x = -1, int y = -1);
|
||||
bool event_queued(event_type type);
|
||||
@@ -127,7 +142,7 @@ class game
|
||||
// Explosion at (x, y) of intensity (power), with (shrapnel) chunks of shrapnel
|
||||
void explosion(int x, int y, int power, int shrapnel, bool fire);
|
||||
// Flashback at (x, y)
|
||||
void flashbang(int x, int y);
|
||||
void flashbang(int x, int y, bool player_immune = false);
|
||||
// Move the player vertically, if (force) then they fell
|
||||
void vertical_move(int z, bool force);
|
||||
void use_computer(int x, int y);
|
||||
@@ -145,8 +160,10 @@ class game
|
||||
// Kill that monster; fixes any pointers etc
|
||||
void kill_mon(int index, bool player_did_it = false);
|
||||
void explode_mon(int index); // Explode a monster; like kill_mon but messier
|
||||
void revive_corpse(int x, int y, int n); // revives a corpse from an item pile
|
||||
void revive_corpse(int x, int y, item *it); // revives a corpse by item pointer, caller handles item deletion
|
||||
// hit_monster_with_flags processes ammo flags (e.g. incendiary, etc)
|
||||
void hit_monster_with_flags(monster &z, unsigned int flags);
|
||||
void hit_monster_with_flags(monster &z, const std::set<std::string> &effects);
|
||||
void plfire(bool burst); // Player fires a gun (target selection)...
|
||||
// ... a gun is fired, maybe by an NPC (actual damage, etc.).
|
||||
void fire(player &p, int tarx, int tary, std::vector<point> &trajectory,
|
||||
@@ -155,6 +172,11 @@ class game
|
||||
std::vector<point> &trajectory);
|
||||
void cancel_activity();
|
||||
void cancel_activity_query(const char* message, ...);
|
||||
bool cancel_activity_or_ignore_query(const char* reason, ...);
|
||||
void moving_vehicle_dismount(int tox, int toy);
|
||||
// Get input from the player to choose an adjacent tile (for examine() etc)
|
||||
bool choose_adjacent(std::string verb, int &x, int&y);
|
||||
|
||||
int assign_mission_id(); // Just returns the next available one
|
||||
void give_mission(mission_id type); // Create the mission and assign it
|
||||
void assign_mission(int id); // Just assign an existing mission
|
||||
@@ -165,6 +187,7 @@ class game
|
||||
int reserve_random_mission(mission_origin origin, point p = point(-1, -1),
|
||||
int npc_id = -1);
|
||||
npc* find_npc(int id);
|
||||
int kill_count(mon_id mon); // Return the number of kills of a given mon_id
|
||||
mission* find_mission(int id); // Mission with UID=id; NULL if non-existant
|
||||
mission_type* find_mission_type(int id); // Same, but returns its type
|
||||
bool mission_complete(int id, int npc_id); // True if we made it
|
||||
@@ -177,7 +200,7 @@ class game
|
||||
void teleport(player *p = NULL);
|
||||
void plswim(int x, int y); // Called by plmove. Handles swimming
|
||||
// when player is thrown (by impact or something)
|
||||
void fling_player_or_monster(player *p, monster *zz, int dir, int flvel);
|
||||
void fling_player_or_monster(player *p, monster *zz, const int& dir, float flvel, bool controlled = false);
|
||||
|
||||
void nuke(int x, int y);
|
||||
std::vector<faction *> factions_at(int x, int y);
|
||||
@@ -206,6 +229,7 @@ class game
|
||||
void add_artifact_messages(std::vector<art_effect_passive> effects);
|
||||
|
||||
void peek();
|
||||
point look_debug(point pnt=point(-256,-256));
|
||||
point look_around();// Look at nearby terrain ';'
|
||||
void list_items(); //List all items around the player
|
||||
bool list_items_match(std::string sText, std::string sPattern);
|
||||
@@ -219,16 +243,17 @@ class game
|
||||
std::string sFilter; // this is a member so that it's remembered over time
|
||||
std::string list_item_upvote;
|
||||
std::string list_item_downvote;
|
||||
char inv(std::string title = "Inventory:");
|
||||
char inv_type(std::string title = "Inventory:", item_cat inv_item_type = IC_NULL);
|
||||
char inv(std::string title);
|
||||
char inv_type(std::string title, item_cat inv_item_type = IC_NULL);
|
||||
int inventory_item_menu(char chItem, int startx = 0, int width = 50);
|
||||
std::vector<item> multidrop();
|
||||
faction* list_factions(std::string title = "FACTIONS:");
|
||||
point find_item(item *it);
|
||||
void remove_item(item *it);
|
||||
|
||||
inventory crafting_inventory(); // inv_from_map, inv, & 'weapon'
|
||||
void consume_items(std::vector<component> components);
|
||||
void consume_tools(std::vector<component> tools);
|
||||
inventory crafting_inventory(player *p); // inv_from_map, inv, & 'weapon'
|
||||
std::list<item> consume_items(player *p, std::vector<component> components);
|
||||
void consume_tools(player *p, std::vector<component> tools, bool force_available);
|
||||
|
||||
bool has_gametype() const { return gamemode && gamemode->id() != SGAME_NULL; }
|
||||
special_game_id gametype() const { return (gamemode) ? gamemode->id() : SGAME_NULL; }
|
||||
@@ -240,11 +265,11 @@ class game
|
||||
recipe_map recipes; // The list of valid recipes
|
||||
std::vector<constructable*> constructions; // The list of constructions
|
||||
|
||||
std::vector <itype_id> mapitems[num_itloc]; // Items at various map types
|
||||
std::vector <items_location_and_chance> monitems[num_monsters];
|
||||
std::vector <mission_type> mission_types; // The list of mission templates
|
||||
mutation_branch mutation_data[PF_MAX2]; // Mutation data
|
||||
std::map<char, action_id> keymap;
|
||||
std::map<char, action_id> default_keymap;
|
||||
|
||||
calendar turn;
|
||||
signed char temperature; // The air temperature
|
||||
@@ -271,6 +296,7 @@ class game
|
||||
|
||||
std::map<int, std::map<int, bool> > mapRain;
|
||||
|
||||
int w_void_lines;
|
||||
WINDOW *w_terrain;
|
||||
WINDOW *w_minimap;
|
||||
WINDOW *w_HP;
|
||||
@@ -289,13 +315,29 @@ class game
|
||||
|
||||
bionic_id random_good_bionic() const; // returns a non-faulty, valid bionic
|
||||
|
||||
void load_artifacts(); // Load artifact data
|
||||
// Needs to be called by main() before MAPBUFFER.load
|
||||
|
||||
// Knockback functions: knock target at (tx,ty) along a line, either calculated
|
||||
// from source position (sx,sy) using force parameter or passed as an argument;
|
||||
// force determines how far target is knocked, if trajectory is calculated
|
||||
// force also determines damage along with dam_mult;
|
||||
// stun determines base number of turns target is stunned regardless of impact
|
||||
// stun == 0 means no stun, stun == -1 indicates only impact stun (wall or npc/monster)
|
||||
void knockback(int sx, int sy, int tx, int ty, int force, int stun, int dam_mult);
|
||||
void knockback(std::vector<point>& traj, int force, int stun, int dam_mult);
|
||||
|
||||
// shockwave applies knockback to all targets within radius of (x,y)
|
||||
// parameters force, stun, and dam_mult are passed to knockback()
|
||||
// ignore_player determines if player is affected, useful for bionic, etc.
|
||||
void shockwave(int x, int y, int radius, int force, int stun, int dam_mult, bool ignore_player);
|
||||
|
||||
private:
|
||||
// Game-start procedures
|
||||
bool opening_screen();// Warn about screen size, then present the main menu
|
||||
void print_menu(WINDOW* w_open, int iSel, const int iMenuOffsetX, int iMenuOffsetY, bool bShowDDA = true);
|
||||
void print_menu_items(WINDOW* w_in, std::vector<std::string> vItems, int iSel, int iOffsetY, int iOffsetX);
|
||||
bool load_master(); // Load the master data file, with factions &c
|
||||
void load_artifacts(); // Load artifact data
|
||||
void load_weather(std::ifstream &fin);
|
||||
void load(std::string name); // Load a player-specific save file
|
||||
void start_game(); // Starts a new game
|
||||
@@ -311,7 +353,6 @@ class game
|
||||
void init_itypes(); // Initializes item types
|
||||
void init_skills();
|
||||
void init_bionics(); // Initializes bionics... for now.
|
||||
void init_mapitems(); // Initializes item placement
|
||||
void init_mtypes(); // Initializes monster types
|
||||
void init_mongroups(); // Initualizes monster groups
|
||||
void init_monitems(); // Initializes monster inventory selection
|
||||
@@ -322,6 +363,7 @@ class game
|
||||
void init_mutations(); // Initializes mutation "tech tree"
|
||||
void init_vehicles(); // Initializes vehicle types
|
||||
void init_autosave(); // Initializes autosave parameters
|
||||
void init_diseases(); // Initializes disease lookup table.
|
||||
|
||||
void load_keyboard_settings(); // Load keybindings from disk
|
||||
|
||||
@@ -367,12 +409,12 @@ class game
|
||||
void construction_menu(); // See construction.cpp
|
||||
bool player_can_build(player &p, inventory inv, constructable* con,
|
||||
const int level = -1, bool cont = false,
|
||||
bool exact_level=false);
|
||||
bool exact_level=false);
|
||||
void place_construction(constructable *con); // See construction.cpp
|
||||
void complete_construction(); // See construction.cpp
|
||||
bool pl_choose_vehicle (int &x, int &y);
|
||||
bool vehicle_near ();
|
||||
void handbrake ();
|
||||
void control_vehicle(); // Use vehicle controls '^'
|
||||
void examine();// Examine nearby terrain 'e'
|
||||
void advanced_inv();
|
||||
// open vehicle interaction screen
|
||||
@@ -383,7 +425,7 @@ class game
|
||||
void compare(int iCompareX = -999, int iCompareY = -999); // Compare two Items 'I'
|
||||
void drop(char chInput = '.'); // Drop an item 'd'
|
||||
void drop_in_direction(); // Drop w/ direction 'D'
|
||||
void reassign_item(); // Reassign the letter of an item '='
|
||||
void reassign_item(char ch = '.'); // Reassign the letter of an item '='
|
||||
void butcher(); // Butcher a corpse 'B'
|
||||
void complete_butcher(int index); // Finish the butchering process
|
||||
void forage(); // Foraging ('a' on underbrush)
|
||||
@@ -401,7 +443,8 @@ class game
|
||||
void chat(); // Talk to a nearby NPC 'C'
|
||||
void plthrow(char chInput = '.'); // Throw an item 't'
|
||||
void help(); // Help screen '?'
|
||||
void show_options(); // Options screen '?'
|
||||
void show_options(); // Options screen '?1'
|
||||
void show_auto_pickup(); // Auto pickup manage screen '?3'
|
||||
|
||||
// Target is an interactive function which allows the player to choose a nearby
|
||||
// square. It display information on any monster/NPC on that square, and also
|
||||
@@ -432,14 +475,16 @@ class game
|
||||
bool handle_action();
|
||||
void update_scent(); // Updates the scent map
|
||||
bool is_game_over(); // Returns true if the player quit or died
|
||||
void place_corpse(); // Place player corpse
|
||||
void death_screen(); // Display our stats, "GAME OVER BOO HOO"
|
||||
void gameover(); // Ends the game
|
||||
void write_msg(); // Prints the messages in the messages list
|
||||
void msg_buffer(); // Opens a window with old messages in it
|
||||
void draw_minimap(); // Draw the 5x5 minimap
|
||||
void draw_HP(); // Draws the player's HP and Power level
|
||||
int autosave_timeout(); // If autosave enabled, how long we should wait for user inaction before saving.
|
||||
void autosave(); // Saves map
|
||||
// int autosave_timeout(); // If autosave enabled, how long we should wait for user inaction before saving.
|
||||
void autosave(); // automatic quicksaves - Performs some checks before calling quicksave()
|
||||
void quicksave(); // Saves the game without quitting
|
||||
|
||||
// On-request draw functions
|
||||
void draw_overmap(); // Draws the overmap, allows note-taking etc.
|
||||
@@ -476,7 +521,6 @@ class game
|
||||
std::vector<event> events; // Game events to be processed
|
||||
int kills[num_monsters]; // Player's kill count
|
||||
std::string last_action; // The keypresses of last turn
|
||||
|
||||
int moves_since_last_save;
|
||||
int item_exchanges_since_save;
|
||||
time_t last_save_timestamp;
|
||||
|
||||
@@ -18,14 +18,20 @@
|
||||
|
||||
void game::help()
|
||||
{
|
||||
WINDOW* w_help_border = newwin(25, 80, (TERMY > 25) ? (TERMY-25)/2 : 0, (TERMX > 80) ? (TERMX-80)/2 : 0);
|
||||
WINDOW* w_help = newwin(23, 78, 1 + (int)((TERMY > 25) ? (TERMY-25)/2 : 0), 1 + (int)((TERMX > 80) ? (TERMX-80)/2 : 0));
|
||||
WINDOW* w_help_border = newwin(FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH,
|
||||
(TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0,
|
||||
(TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0);
|
||||
WINDOW* w_help = newwin(FULL_SCREEN_HEIGHT-2, FULL_SCREEN_WIDTH-2,
|
||||
1 + (int)((TERMY > FULL_SCREEN_HEIGHT) ? (TERMY-FULL_SCREEN_HEIGHT)/2 : 0),
|
||||
1 + (int)((TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0));
|
||||
|
||||
char ch;
|
||||
|
||||
action_id movearray[] = {ACTION_MOVE_NW,ACTION_MOVE_N,ACTION_MOVE_NE,
|
||||
ACTION_MOVE_W, ACTION_PAUSE, ACTION_MOVE_E,
|
||||
ACTION_MOVE_SW,ACTION_MOVE_S,ACTION_MOVE_SE};
|
||||
do {
|
||||
wborder(w_help_border, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX);
|
||||
mvwprintz(w_help_border, 0, 38, c_ltred, " HELP ");
|
||||
wrefresh(w_help_border);
|
||||
werase(w_help);
|
||||
@@ -39,15 +45,16 @@ c: Viewing k: Traps\n\
|
||||
d: Hunger, Thirst, and Sleep l: Items overview\n\
|
||||
e: Pain and Stimulants m: Combat\n\
|
||||
f: Addiction n: Unarmed Styles\n\
|
||||
g: Morale and XP o: Survival tips\n\
|
||||
g: Morale and Learning o: Survival tips\n\
|
||||
h: Radioactivity and Mutation\n\
|
||||
\n\
|
||||
1: List of all commands (you can change key commands here)\n\
|
||||
2: List of all options (you can change options here)\n\
|
||||
3: List of item types and data\n\
|
||||
4: Description of map symbols\n\
|
||||
5: Description of gun types\n\
|
||||
6: Frequently Asked Questions (Some spoilers!)\n\
|
||||
3: Auto pickup manager (you can change pickup rules here)\n\
|
||||
4: List of item types and data\n\
|
||||
5: Description of map symbols\n\
|
||||
6: Description of gun types\n\
|
||||
7: Frequently Asked Questions (Some spoilers!)\n\
|
||||
\n\
|
||||
q: Return to game");
|
||||
|
||||
@@ -82,21 +89,38 @@ tools are all available to help you survive.");
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Movement is performed using the numpad, or vikeys. Each step will take 100\n\
|
||||
movement points (or more, depending on the terrain); you\n\
|
||||
y k u 7 8 9 will then replenish a variable amount of movement points,\n\
|
||||
\\ | / \\ | / depending on many factors (press '@' to see the exact\n\
|
||||
will then replenish a variable amount of movement points,\n\
|
||||
\\ | / \\ | / depending on many factors (%s to see the exact\n\
|
||||
\\|/ \\|/ amount). To attempt to hit a monster with your weapon,\n\
|
||||
h--.--l 4--5--6 simply move into it. You may find doors, ('+'); these may\n\
|
||||
/|\\ /|\\ be opened with 'o' or closed with 'c'. Some doors are\n\
|
||||
-- -- -- -- simply move into it. You may find doors, ('+'); these may\n\
|
||||
/|\\ /|\\ be opened %s or closed %s. Some doors are\n\
|
||||
/ | \\ / | \\ locked. Locked doors, windows, and some other obstacles\n\
|
||||
b j n 1 2 3 can be destroyed by smashing them ('s', then choose a\n\
|
||||
can be destroyed by smashing them (%sthen choose a\n\
|
||||
direction). Smashing down obstacles is much easier with a\n\
|
||||
good weapon or a strong character.\n\
|
||||
\n\
|
||||
There may be times when you want to move more quickly by holding down a\n\
|
||||
movement key. However, fast movement in this fashion may lead to the player\n\
|
||||
getting into a dangerous situation or even killed before they have a chance\n\
|
||||
to react. Pressing '!' will toggle \"Run Mode.\" While this is on, any\n\
|
||||
movement will be ignored if new monsters enter the player's view.");
|
||||
to react. %s will toggle \"Run Mode.\" While this is on, any\n\
|
||||
movement will be ignored if new monsters enter the player's view.",
|
||||
press_x(ACTION_PL_INFO, "press ", "'View Player Info'").c_str(),
|
||||
press_x(ACTION_OPEN, "with ", "").c_str(),
|
||||
press_x(ACTION_CLOSE, "with ", "").c_str(),
|
||||
press_x(ACTION_SMASH, "", ", ", "").c_str(),
|
||||
press_x(ACTION_TOGGLE_SAFEMODE, "Pressing ", "'Toggle Safemode'" ).c_str());
|
||||
for(int acty = 0; acty < 3; acty++) {
|
||||
for(int actx = 0; actx < 3; actx++) {
|
||||
std::vector<char> keys = keys_bound_to( movearray[acty*3+actx] );
|
||||
if (keys.empty()) {
|
||||
} else {
|
||||
mvwputch(w_help, (acty * 3 + 2), (actx * 3), c_ltblue, keys[0]);
|
||||
if (keys.size() >0) {
|
||||
mvwputch(w_help, (acty * 3 + 2), (actx * 3 + 10), c_ltblue, keys[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -107,12 +131,14 @@ movement will be ignored if new monsters enter the player's view.");
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
The player can often see more than can be displayed on the screen at a time.\n\
|
||||
Pressing ';' or 'x' enters look around mode, which allows you to scoll around\n\
|
||||
using the movement keys and view irems on the map. Pressing 'V' provides a\n\
|
||||
list of nearby visible items, though items shut away in crates, cubpoards,\n\
|
||||
%s allows you to scroll around\n\
|
||||
using the movement keys and view items on the map. %s provides a\n\
|
||||
list of nearby visible items, though items shut away in crates, cupboards,\n\
|
||||
refrigerators and the like will not be displayed. Pressing Shift+vikeys\n\
|
||||
will scroll the view persistently, allowing you to keep an eye on things\n\
|
||||
as you move around.");
|
||||
as you move around.",
|
||||
press_x(ACTION_LOOK, "Pressing ", " enters look around mode, which", "'Look Around' mode").c_str(),
|
||||
press_x(ACTION_LIST_ITEMS, "Pressing ", "'List all items around the player'").c_str());
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -126,20 +152,23 @@ As time passes, you will begin to feel hunger and thirst. A status warning\n\
|
||||
at the bottom of the screen will appear. As hunger and thirst reach critical\n\
|
||||
levels, you will begin to suffer movement penalties. Thirst is more dangerous\n\
|
||||
than hunger. Finding food in a city is usually easy; outside of a city, you\n\
|
||||
may have to hunt an animal, then stand over its corpse and 'B'utcher it into\n\
|
||||
may have to hunt an animal, then stand over its corpse and %s it into\n\
|
||||
small chunks of meat. Likewise, outside of a city you may have to drink water\n\
|
||||
from a river or other natural source; stand in shallow water and press 'g' or\n\
|
||||
',' to pick it up. You'll need a watertight container. Be forewarned that\n\
|
||||
some sources of water aren't trustworthy and may produce diseased water. To\n\
|
||||
be sure it's healthy, run all water you collect through a water filter before\n\
|
||||
drinking.\n\
|
||||
from a river or other natural source; stand in shallow water and \n\
|
||||
%s to pick it up. You'll need a watertight container. \n\
|
||||
Be forewarned that some sources of water aren't trustworthy \n\
|
||||
and may produce diseased water. To be sure it's healthy, \n\
|
||||
run all water you collect through a water filter before drinking.\n\
|
||||
\n\
|
||||
Every 14 to 20 hours, you'll find yourself growing sleepy. If you do not\n\
|
||||
sleep by pressing '$', you'll start suffering stat and movement penalties.\n\
|
||||
sleep%s you'll start suffering stat and movement penalties.\n\
|
||||
You may not always fall asleep right away. Sleeping indoors, especially on a\n\
|
||||
bed, will help; or you can always use sleeping pills. While sleeping, you'll\n\
|
||||
slowly replenish lost hit points. You'll also be vulnerable to attack, so\n\
|
||||
try to find a safe place, or set traps for unwary intruders.");
|
||||
try to find a safe place, or set traps for unwary intruders.",
|
||||
press_x(ACTION_BUTCHER, "butcher").c_str(),
|
||||
from_sentence_case(press_x(ACTION_PICKUP)).c_str(),
|
||||
press_x(ACTION_SLEEP, " by pressing ", ",", "").c_str());
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -221,14 +250,24 @@ Press any key for more...");
|
||||
getch();
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Morale is also responsible for filling your XP pool. This XP pool is used\n\
|
||||
for improving your skills; as you use your skills, points are taken from the\n\
|
||||
XP pool and placed into the skill used. If your XP pool is empty, your\n\
|
||||
skills cannot be improved except through the use of books.\n\
|
||||
Morale is also responsible for ensuring you can learn effectively, via a\n\
|
||||
mechanic referred to as 'focus'. Your focus level is a measure of how\n\
|
||||
effectively you can learn. The natural level is 100, which indicates normal\n\
|
||||
learning potential. Higher or lower focus levels make it easier or harder\n\
|
||||
to learn from practical experience.\n\
|
||||
\n\
|
||||
Your XP pool will not fill unless your morale is at least 0. A morale level\n\
|
||||
between 0 and 100 gives the percentage chance for your XP to increase by 1\n\
|
||||
each turn. Above 100, you get 1 XP point each turn for every 100 morale.");
|
||||
Your focus level has a natural set point that it converges towards. When your\n\
|
||||
focus is much lower - or higher - than this set point, it will change faster\n\
|
||||
than when it is near the set point. Having high morale will raise the set\n\
|
||||
point, and having low morale will lower the set point. Pain is also factored\n\
|
||||
into the set point calculation - it's harder to learn when you're in pain.\n\
|
||||
\n\
|
||||
Your focus is also lowered by certain activities. Training your skills\n\
|
||||
through real-world practice lowers your focus gradually, by an amount that\n\
|
||||
depends on your current level of focus (higher focus means larger decreases,\n\
|
||||
as well as improved learning). Training your skills by reading books\n\
|
||||
decreases your focus rapidly, by giving a significant penalty to the set\n\
|
||||
point of your focus.");
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -238,7 +277,7 @@ each turn. Above 100, you get 1 XP point each turn for every 100 morale.");
|
||||
case 'H':
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Though it is relatively rare, certain areas of the world may be contamiated\n\
|
||||
Though it is relatively rare, certain areas of the world may be contaminated\n\
|
||||
with radiation. It will gradually accumulate in your body, weakening you\n\
|
||||
more and more. While in radiation-free areas, your radiation level will\n\
|
||||
slowly decrease. Taking iodine tablets will help speed the process.\n\
|
||||
@@ -285,24 +324,27 @@ Many important items can be very hard to find, or will cost a great deal of\n\
|
||||
money to trade for. Fortunately, it is possible to craft a wide variety of\n\
|
||||
goods with the proper tools, materials, and training.\n\
|
||||
\n\
|
||||
Some recipes require a set of tools. These are not used up when crafting, so\n\
|
||||
you can keep your tool set. All recipes require one or more ingredients.\n\
|
||||
Some recipes require a set of tools. These are not used up when crafting,\n\
|
||||
so you can keep your tool set. All recipes require one or more ingredients.\n\
|
||||
These ARE used up in crafting.\n\
|
||||
\n\
|
||||
To craft items, press '&'. There are five categories; Weapons, Food,\n\
|
||||
Electronics, Armor, and Miscellaneous. While a few items require no skill to\n\
|
||||
create, the majority require you to have some knowledge:\n\
|
||||
%sThere are five categories; Weapons, Food, \n\
|
||||
Electronics, Armor, and Miscellaneous. While a few items require\n\
|
||||
no skill to create, the majority require you to have some knowledge:\n\
|
||||
\n\
|
||||
->Mechanic skill is used for weapons, traps, and a few tools.\n\
|
||||
->Cooking skill, at low levels, is used for making tasty recipes; at higher\n\
|
||||
levels, you have an understanding of chemistry and can make chemical weapons\n\
|
||||
and beneficial elixirs.\n\
|
||||
->Cooking skill, at low levels, is used for making tasty recipes; \n\
|
||||
at higher levels, you have an understanding of chemistry and can make\n\
|
||||
chemical weapons and beneficial elixirs.\n\
|
||||
->Electronics skill lets you make a wide variety of tools with intricate uses.\n\
|
||||
->Tailoring skill is used to create basic clothing, and later tough armor.\n\
|
||||
\n\
|
||||
In addition to the primary crafting skills, other skills may be necessary to\n\
|
||||
create certain items. Traps skill, Firearms skill, and First Aid skill are\n\
|
||||
all required for certain items.");
|
||||
In addition to the primary crafting skills, other skills may be necessary\n\
|
||||
to create certain items. Traps skill, Firearms skill, and First Aid skill\n\
|
||||
are all required for certain items.",
|
||||
press_x(ACTION_CRAFT, "To craft items, press ", ". ", "").c_str()/*,
|
||||
press_x(ACTION_RECRAFT).c_str(),
|
||||
press_x(ACTION_LONGCRAFT).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -319,19 +361,22 @@ to wake you up) and bear traps (which make noise AND damage and trap anything\n\
|
||||
that steps on them). Others need to be crafted; this requires the Traps skill\n\
|
||||
and possibly Mechanics.\n\
|
||||
\n\
|
||||
To set a trap, simply use the item ('a') and choose a direction; the trap\n\
|
||||
To set a trap, simply use the item%s and choose a direction; the trap\n\
|
||||
will be placed on an adjacent tile. Some traps may require additional tools,\n\
|
||||
like a shovel, to be set. Once set, a trap will remain in place until\n\
|
||||
stepped on or disarmed.\n\
|
||||
\n\
|
||||
To disarm a trap, examine ('e') the space it is on. Your success depends\n\
|
||||
To disarm a trap, examine%s the space it is on. Your success depends\n\
|
||||
upon your Traps skill and Dexterity. If you succeed, the trap is removed\n\
|
||||
and replaced by some or all of its constituent parts; however, if you fail,\n\
|
||||
there is a chance that you will set off the trap, suffering the consequences.\n\
|
||||
\n\
|
||||
Many traps are fully or partially hidden. Your ability to detect traps is\n\
|
||||
entirely dependent upon your Perception. Should you stumble into a trap, you\n\
|
||||
may have a chance to avoid it, depending on your Dodge skill.");
|
||||
may have a chance to avoid it, depending on your Dodge skill.",
|
||||
press_x(ACTION_USE, " (", ")", "").c_str(),
|
||||
press_x(ACTION_EXAMINE, " (", ")", "").c_str()/*,
|
||||
press_x(ACTION_USE_WIELDED).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -342,39 +387,51 @@ may have a chance to avoid it, depending on your Dodge skill.");
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
There are a wide variety of items available for your use. You may find them\n\
|
||||
lying on the ground; if so, simply press ',' or 'g' to pick up items on the\n\
|
||||
lying on the ground; if so, simply %s to pick up items on the\n\
|
||||
same square. Some items are found inside a container, drawn as a { with a\n\
|
||||
blue background. Pressing 'e', then a direction, will allow you to examine\n\
|
||||
blue background. %s, then a direction, will allow you to examine\n\
|
||||
these containers and loot their contents.\n\
|
||||
\n\
|
||||
Pressing 'I' opens a comparison menu, where you can see two items\n\
|
||||
%s opens a comparison menu, where you can see two items\n\
|
||||
side-by-side with their attributes highlighted to indicate which is superior.\n\
|
||||
You can also access the item comparison menu by pressing 'C' when the 'V'iew\n\
|
||||
You can also access the item comparison menu by pressing 'C' when the %s\n\
|
||||
nearby items menu is open and an item is selected.\n\
|
||||
\n\
|
||||
All items may be used as a melee weapon, though some are better than others.\n\
|
||||
You can check the melee attributes of an item you're carrying by hitting 'i'\n\
|
||||
You can check the melee attributes of an item you're carrying by %s\n\
|
||||
to enter your inventory, then pressing the letter of the item. There are 3\n\
|
||||
melee values, bashing, cutting, and to-hit bonus (or penalty).\n\
|
||||
Bashing damage is universally effective, but is capped by low strength.\n\
|
||||
Cutting damage is a guaranteed increase in damage, but it may be reduced by\n\
|
||||
a monster's natural armor.\n\
|
||||
\n\
|
||||
Press any key for more...");
|
||||
Press any key for more...",
|
||||
from_sentence_case(press_x(ACTION_PICKUP)).c_str(),
|
||||
press_x(ACTION_EXAMINE, "Pressing ", "'Examine Nearby Terrain'").c_str(),
|
||||
press_x(ACTION_COMPARE, "Pressing ", "'Compare two Items'").c_str(),
|
||||
press_x(ACTION_LIST_ITEMS, "view").c_str(),
|
||||
press_x(ACTION_INVENTORY, "hitting ", "trying").c_str()/*,
|
||||
press_x(ACTION_ADVANCEDINV).c_str(), //'Advanced Inventory management'"
|
||||
press_x(ACTION_ORGANIZE).c_str()*/); //'Swap Inventory Letters'
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
To wield an item as a weapon, press 'w' then the proper letter. Pressing '-'\n\
|
||||
To wield an item as a weapon, %s then the proper letter. Pressing '-'\n\
|
||||
in lieu of a letter will make you wield nothing. A wielded weapon will not\n\
|
||||
contribute to your volume carried, so holding a large item in your hands may\n\
|
||||
be a good option for travel. When unwielding your weapon, it will go back in\n\
|
||||
your inventory, or will be dropped on the ground if there is no space.\n\
|
||||
\n\
|
||||
To wear a piece of clothing, press 'W' then the proper letter. Armor reduces\n\
|
||||
damage and helps you resist things like smoke. To take off an item, press\n\
|
||||
'T' then the proper letter.");
|
||||
To wear a piece of clothing, %s then the proper letter. Armor reduces\n\
|
||||
damage and helps you resist things like smoke. To take off an item, %s\n\
|
||||
then the proper letter.",
|
||||
from_sentence_case(press_x(ACTION_WIELD)).c_str(),
|
||||
from_sentence_case(press_x(ACTION_WEAR)).c_str(),
|
||||
from_sentence_case(press_x(ACTION_TAKE_OFF)).c_str()/*,
|
||||
press_x(ACTION_SORT_ARMOR).c_str(),
|
||||
press_x(ACTION_PICK_STYLE).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -388,27 +445,37 @@ After 30 minutes of warmup time, monsters will begin to appear. They are\n\
|
||||
represented by letters on your screen; a list of monster names, and their\n\
|
||||
positions relative to you, is displayed on the right side of the screen.\n\
|
||||
\n\
|
||||
To attack a monster with a melee weapon, simply move into them. The time it\n\
|
||||
takes to attack depends on the size and weight of your weapon. Small, light\n\
|
||||
weapons are the fastest; unarmed attacks increase in speed with your Unarmed\n\
|
||||
Combat skill, and will eventually be VERY fast. A successful hit with a\n\
|
||||
bashing weapon may stun the monster temporarily, while cutting weapons may get\n\
|
||||
stuck, possibly pulling the weapon from your hands--but a monster with a weapon\n\
|
||||
stuck in it will move much more slowly. A miss may make you stumble and lose\n\
|
||||
movement points. If a monster hits you, your clothing may absorb some damage,\n\
|
||||
but you will absorb the excess.\n\
|
||||
To attack a monster with a melee weapon, simply move into them. The time\n\
|
||||
it takes to attack depends on the size and weight of your weapon. Small,\n\
|
||||
light weapons are the fastest; unarmed attacks increase in speed with\n\
|
||||
your Unarmed Combat skill, and will eventually be VERY fast. A successful\n\
|
||||
hit with a bashing weapon may stun the monster temporarily, while cutting\n\
|
||||
weapons may get stuck, possibly pulling the weapon from your hands-- but\n\
|
||||
a monster with a weapon stuck in it will move much more slowly. A miss\n\
|
||||
may make you stumble and lose movement points. If a monster hits you,\n\
|
||||
your clothing may absorb some damage, but you will absorb the excess.\n\
|
||||
\n\
|
||||
Swarms of monsters may call for firearms. If you find one, wield it first,\n\
|
||||
then reload by pressing 'r'. If you wish to change ammo, you must unload the\n\
|
||||
weapon by pressing 'U', then reload again. To fire, press 'f', move the\n\
|
||||
then reload%s. If you wish to change ammo, you must unload the\n\
|
||||
weapon%s, then reload again. To fire%s, move the\n\
|
||||
cursor to the relevant space, then hit '.' or 'f'. Some guns have alternate\n\
|
||||
firing modes, such as burst fire; to cycle modes, press 'F'. Firing\n\
|
||||
continuously, especially in bursts, will severely reduce accuracy.\n\
|
||||
\n\
|
||||
firing modes, such as burst fire; to cycle modes%s.\n\
|
||||
Firing continuously, especially in bursts, will severely reduce accuracy.\n\
|
||||
Press any key for more...",
|
||||
press_x(ACTION_RELOAD, " by pressing ", "").c_str(),
|
||||
press_x(ACTION_UNLOAD, " by pressing ", "").c_str(),
|
||||
press_x(ACTION_FIRE, ", press ", "").c_str(),
|
||||
press_x(ACTION_SELECT_FIRE_MODE, ", press ", " 'Toggle attack mode of Wielded Item'").c_str());
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Unlike most roguelikes, fleeing will often be your best option, especially\n\
|
||||
when overwhelmed by a swarm of zombies. Try to avoid getting cornered inside\n\
|
||||
a building. Ducking down into the subways or sewers is often an excellent\n\
|
||||
escape tactic.");
|
||||
when overwhelmed by a swarm of zombies. Try to avoid getting cornered\n\
|
||||
inside a building. Ducking down into the subways or sewers is often\n\
|
||||
an excellent escape tactic."/*,
|
||||
press_x(ACTION_USE_WIELDED).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -423,19 +490,23 @@ start with your choice of a single, commonly-taught style by starting with\n\
|
||||
the Martial Arts Training trait. Many, many more can be taught by wandering\n\
|
||||
masters.\n\
|
||||
\n\
|
||||
To select a fighting style, press _ (underscore). If you are already unarmed\n\
|
||||
To select a fighting style%s. If you are already unarmed\n\
|
||||
this will make you start using the style. Otherwise, it will be locked in as\n\
|
||||
your default unarmed style; to start using it, press w-.\n\
|
||||
your default unarmed style; to start using it, %s '-'.\n\
|
||||
\n\
|
||||
Most styles have a variety of special moves associated with them. Most have\n\
|
||||
a skill requirement, and will be unavailable until you reach a level of\n\
|
||||
unarmed skill. You can check the moves by examining your style via the\n\
|
||||
inventory screen (i key).\n\
|
||||
inventory screen%s.\n\
|
||||
\n\
|
||||
Many styles also have special effects unlocked under certain conditions.\n\
|
||||
These are varied and unique to each style, and range from special combo moves\n\
|
||||
to bonuses depending on the situation you are in. You can check these by\n\
|
||||
examining your style.");
|
||||
examining your style.",
|
||||
press_x(ACTION_PICK_STYLE, ", press ", "").c_str(),
|
||||
press_x(ACTION_WIELD, "press ", " then", "'Select Wielded Item' then press").c_str(),
|
||||
press_x(ACTION_INVENTORY, " (", " key)", "").c_str()/*,
|
||||
press_x(ACTION_THROW).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -455,8 +526,8 @@ as possible and load up on more than one type.\n\
|
||||
It's also important to carry a few medications; painkillers are a must-have,\n\
|
||||
and drugs such as cigarettes will make life easier (but beware addiction).\n\
|
||||
Leave cities as soon as you have a good stockpile of equipment. Their high\n\
|
||||
concentration of zombies makes them a deathtrap--but a necessary resource for\n\
|
||||
food and ammunition.\n\
|
||||
concentration of zombies makes them a deathtrap--but a necessary resource\n\
|
||||
for food and ammunition.\n\
|
||||
\n\
|
||||
Combat is much easier if you can fight just one monster at once. Use doorways\n\
|
||||
as a choke point, or stand behind a window and strike as the zombies slowly\n\
|
||||
@@ -472,19 +543,24 @@ Press any key for more...");
|
||||
getch();
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Try to keep your inventory as full as possible without being overloaded. You\n\
|
||||
never know when you might need an item, most are good to sell, and you can\n\
|
||||
easily drop unwanted items on the floor.\n\
|
||||
Try to keep your inventory as full as possible without being overloaded.\n\
|
||||
You never know when you might need an item, most are good to sell, and\n\
|
||||
you can easily drop unwanted items on the floor.\n\
|
||||
\n\
|
||||
Keep an eye on the weather. At night, sleeping might be difficult if you\n\
|
||||
don't have a warm place to rest your head. Be sure to protect your\n\
|
||||
Keep an eye on the weather. At night, sleeping might be difficult if\n\
|
||||
you don't have a warm place to rest your head. Be sure to protect your\n\
|
||||
extremities from frostbite and to keep your distance from large fires.");
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
break;
|
||||
|
||||
// Keybindings
|
||||
case '1': {
|
||||
|
||||
// Remember what the keybindings were originally so we can restore them if player cancels.
|
||||
std::map<char, action_id> keymap_old = keymap;
|
||||
|
||||
werase(w_help);
|
||||
int offset = 1;
|
||||
char remapch = ' ';
|
||||
@@ -507,10 +583,10 @@ extremities from frostbite and to keep your distance from large fires.");
|
||||
needs_refresh = false;
|
||||
}
|
||||
// Clear the lines
|
||||
for (int i = 0; i < 23; i++)
|
||||
for (int i = 0; i < FULL_SCREEN_HEIGHT-2; i++)
|
||||
mvwprintz(w_help, i, 0, c_black, " ");
|
||||
|
||||
for (int i = 0; i < 23 && offset + i < NUM_ACTIONS; i++) {
|
||||
for (int i = 0; i < FULL_SCREEN_HEIGHT-2 && offset + i < NUM_ACTIONS; i++) {
|
||||
std::vector<char> keys = keys_bound_to( action_id(offset + i) );
|
||||
nc_color col = (keys.empty() ? c_ltred : c_white);
|
||||
mvwprintz(w_help, i, 3, col, "%s: ", action_name( action_id(offset + i) ).c_str());
|
||||
@@ -535,7 +611,7 @@ extremities from frostbite and to keep your distance from large fires.");
|
||||
offset++;
|
||||
if (remapch == '-' || remapch == '+') {
|
||||
needs_refresh = true;
|
||||
for (int i = 0; i < 23 && i + offset < NUM_ACTIONS; i++) {
|
||||
for (int i = 0; i < FULL_SCREEN_HEIGHT-2 && i + offset < NUM_ACTIONS; i++) {
|
||||
mvwprintz(w_help, i, 0, c_ltblue, "%c", 'a' + i);
|
||||
mvwprintz(w_help, i, 1, c_white, ":");
|
||||
}
|
||||
@@ -560,8 +636,21 @@ extremities from frostbite and to keep your distance from large fires.");
|
||||
}
|
||||
}
|
||||
} while (remapch != 'q' && remapch != 'Q' && remapch != KEY_ESCAPE);
|
||||
if (changed_keymap && query_yn("Save changes?"))
|
||||
save_keymap();
|
||||
|
||||
|
||||
if (changed_keymap)
|
||||
{
|
||||
if(query_yn("Save changes?"))
|
||||
{
|
||||
save_keymap();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Player wants to keep the old keybindings. Revert!
|
||||
keymap = keymap_old;
|
||||
}
|
||||
}
|
||||
|
||||
werase(w_help);
|
||||
} break;
|
||||
|
||||
@@ -570,14 +659,19 @@ extremities from frostbite and to keep your distance from large fires.");
|
||||
werase(w_help);
|
||||
} break;
|
||||
|
||||
case '3':
|
||||
case '3': {
|
||||
show_auto_pickup();
|
||||
werase(w_help);
|
||||
} break;
|
||||
|
||||
case '4':
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
ITEM TYPES:\n\
|
||||
~ Liquid\n\
|
||||
%%%% Food\n\
|
||||
! Medication\n\
|
||||
These are all consumed by using 'E'. They provide a certain amount of\n\
|
||||
These are all consumed by %s. They provide a certain amount of\n\
|
||||
nutrition, quench your thirst, may be a stimulant or a depressant, and may\n\
|
||||
provide morale. There may also be more subtle effects.\n\
|
||||
\n\
|
||||
@@ -586,13 +680,17 @@ ITEM TYPES:\n\
|
||||
, Tiny item\n\
|
||||
These are all generic items, useful only to be wielded as a weapon.\n\
|
||||
However, some have special uses; they will show up under the TOOLS section\n\
|
||||
in your inventory. Press 'a' to use these.\n\
|
||||
in your inventory. %s to use these.\n\
|
||||
\n\
|
||||
) Container\n\
|
||||
These items may hold other items. Someare passable weapons. Many will be\n\
|
||||
listed with their contents, e.g. \"plastic bottle of water\". Those containing\n\
|
||||
comestibles may be eaten with 'E'; this may leave you with an empty container.\n\
|
||||
Press any key to continue...");
|
||||
These items may hold other items. Some are passable weapons.\n\
|
||||
Many will be listed with their contents, e.g. \"plastic bottle of water\".\n\
|
||||
Those containing comestibles may be eaten%s;\n\
|
||||
this may leave an empty container.\n\
|
||||
Press any key to continue...",
|
||||
press_x(ACTION_EAT, "using ", "eating").c_str(),
|
||||
press_x(ACTION_USE).c_str(),
|
||||
press_x(ACTION_EAT, " with ", "").c_str());
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -600,7 +698,7 @@ Press any key to continue...");
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
ITEM TYPES:\n\
|
||||
[ Clothing\n\
|
||||
This may be worn with the 'W' key or removed with the 'T' key. It may\n\
|
||||
This may be worn%s or removed%s. It may\n\
|
||||
cover one or more body parts; you can wear multiple articles of clothing on\n\
|
||||
any given body part, but this will encumber you severely. Each article of\n\
|
||||
clothing may provide storage space, warmth, an encumberment, and a resistance\n\
|
||||
@@ -608,19 +706,27 @@ ITEM TYPES:\n\
|
||||
effects.\n\
|
||||
\n\
|
||||
( Firearm\n\
|
||||
This weapon may be loaded with ammunition with 'r', unloaded with 'U', and\n\
|
||||
fired with 'f'. Some have automatic fire, which may be used with 'F' at a\n\
|
||||
penalty to accuracy. The color refers to the type; handguns are gray, shotguns\n\
|
||||
are red, submachine guns are cyan, rifles are brown, assault rifles are blue,\n\
|
||||
and heavy machine guns are light red. Each has an accuracy rating, a bonus to\n\
|
||||
damage, a rate of fire, and a maximum load. Note that most firearms load\n\
|
||||
fully in one action, while shotguns must be loaded one shell at a time.\n\
|
||||
This weapon may be loaded with ammunition%s, unloaded%s, and\n\
|
||||
fired%s. Some have automatic fire, which may be used%s at a\n\
|
||||
penalty to accuracy. The color refers to the type; handguns are gray,\n\
|
||||
shotguns are red, submachine guns are cyan, rifles are brown, assault rifles\n\
|
||||
are blue, and heavy machine guns are light red. Each has a dispersion rating,\n\
|
||||
a bonus to damage, a rate of fire, and a maximum load. Note that most\n\
|
||||
firearms load fully in one action, while shotguns must be loaded one\n\
|
||||
shell at a time.\n\
|
||||
\n\
|
||||
= Ammunition\n\
|
||||
Ammunition is worthless without a gun to load it into. Generally, there\n\
|
||||
are several variants for any particular calibre. Ammunition has a damage\n\
|
||||
rating, an accuracy, a range, and an armor-piercing quality.\n\
|
||||
Press any key to continue...");
|
||||
Ammunition is worthless without a gun to load it into. Generally,\n\
|
||||
there are several variants for any particular calibre. Ammunition has\n\
|
||||
damage, dispersion, and range ratings, and an armor-piercing quality.\n\
|
||||
Press any key to continue...",
|
||||
press_x(ACTION_WEAR, " with the ", " key","").c_str(),
|
||||
press_x(ACTION_TAKE_OFF, " with the "," key","").c_str(),
|
||||
press_x(ACTION_RELOAD, " with ", "").c_str(),
|
||||
press_x(ACTION_UNLOAD, " with ", "").c_str(),
|
||||
press_x(ACTION_FIRE, " with ", "").c_str(),
|
||||
press_x(ACTION_SELECT_FIRE_MODE, " with ", "").c_str()/*,
|
||||
press_x(ACTION_FIRE_BURST).c_str()*/);
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
@@ -630,35 +736,38 @@ ITEM TYPES:\n\
|
||||
\n\
|
||||
* Thrown weapon; simple projectile or grenade\n\
|
||||
These items are suited for throwing, and many are only useful when\n\
|
||||
thrown, such as grenades, molotov cocktails, or tear gas.\n\
|
||||
thrown, such as grenades, molotov cocktails, or tear gas. Once activated\n\
|
||||
be certain to throw these items%s.\n\
|
||||
\n\
|
||||
? Book or magazine\n\
|
||||
This can be read for training or entertainment by pressing 'R'. Most\n\
|
||||
This can be read for training or entertainment%s. Most\n\
|
||||
require a basic level of intelligence; some require some base knowledge in\n\
|
||||
the relevant subject.");
|
||||
the relevant subject.",
|
||||
press_x(ACTION_THROW, " by pressing ",", then the letter of the item to throw.",".").c_str(),
|
||||
press_x(ACTION_READ, " by pressing ", "").c_str());
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
break;
|
||||
|
||||
case '4':
|
||||
case '5':
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_ltgray, "MAP SYMBOLS:");
|
||||
mvwprintz(w_help, 1, 0, c_brown, "\
|
||||
. Field - Empty grassland, occasional wild fruit.");
|
||||
mvwprintz(w_help, 2, 0, c_green, "\
|
||||
F Forest - May be dense or sparse. Slow moving; foragable food.");
|
||||
mvputch(3, 0, c_dkgray, LINE_XOXO);
|
||||
mvputch(3, 1, c_dkgray, LINE_OXOX);
|
||||
mvputch(3, 2, c_dkgray, LINE_XXOO);
|
||||
mvputch(3, 3, c_dkgray, LINE_OXXO);
|
||||
mvputch(3, 4, c_dkgray, LINE_OOXX);
|
||||
mvputch(3, 5, c_dkgray, LINE_XOOX);
|
||||
mvputch(3, 6, c_dkgray, LINE_XXXO);
|
||||
mvputch(3, 7, c_dkgray, LINE_XXOX);
|
||||
mvputch(3, 8, c_dkgray, LINE_XOXX);
|
||||
mvputch(3, 9, c_dkgray, LINE_OXXX);
|
||||
mvputch(3, 10, c_dkgray, LINE_XXXX);
|
||||
mvwputch(w_help, 3, 0, c_dkgray, LINE_XOXO);
|
||||
mvwputch(w_help, 3, 1, c_dkgray, LINE_OXOX);
|
||||
mvwputch(w_help, 3, 2, c_dkgray, LINE_XXOO);
|
||||
mvwputch(w_help, 3, 3, c_dkgray, LINE_OXXO);
|
||||
mvwputch(w_help, 3, 4, c_dkgray, LINE_OOXX);
|
||||
mvwputch(w_help, 3, 5, c_dkgray, LINE_XOOX);
|
||||
mvwputch(w_help, 3, 6, c_dkgray, LINE_XXXO);
|
||||
mvwputch(w_help, 3, 7, c_dkgray, LINE_XXOX);
|
||||
mvwputch(w_help, 3, 8, c_dkgray, LINE_XOXX);
|
||||
mvwputch(w_help, 3, 9, c_dkgray, LINE_OXXX);
|
||||
mvwputch(w_help, 3, 10, c_dkgray, LINE_XXXX);
|
||||
|
||||
mvwprintz(w_help, 3, 12, c_dkgray, "\
|
||||
Road - Safe from burrowing animals.");
|
||||
@@ -699,7 +808,7 @@ O Parking lot - Empty lot, few items. Mostly useless.");
|
||||
getch();
|
||||
break;
|
||||
|
||||
case '5':
|
||||
case '6':
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "Gun types:");
|
||||
mvwprintz(w_help, 2, 0, c_ltgray, "( Handguns");
|
||||
@@ -714,17 +823,18 @@ several loaded handguns, switching from one to the next once their ammo is\n\
|
||||
spent.");
|
||||
mvwprintz(w_help, 12, 0, c_green, "( Crossbows");
|
||||
mvwprintz(w_help, 13, 0, c_white, "\
|
||||
The best feature of crossbows is their silence. The bolts they fire are only\n\
|
||||
rarely destroyed; if you pick up the bolts after firing them, your ammunition\n\
|
||||
will last much longer. Crossbows suffer from a short range and a very long\n\
|
||||
reload time (modified by your strength); plus, most only hold a single round.\n\
|
||||
The best feature of crossbows is their silence. The bolts they fire are\n\
|
||||
only rarely destroyed; if you pick up the bolts after firing them, your \n\
|
||||
ammunition will last much longer. Crossbows suffer from a short range and\n\
|
||||
a very long reload time (modified by your strength); plus, most only hold\n\
|
||||
a single round.\n\
|
||||
For this reason, it is advisable to carry a few loaded crossbows.\n\
|
||||
Crossbows can be very difficult to find; however, it is possible to craft one\n\
|
||||
given enough Mechanics skill. Likewise, it is possible to make wooden bolts\n\
|
||||
from any number of wooden objects, though these are much less effective than\n\
|
||||
steel bolts.\n\
|
||||
Crossbows can be very difficult to find; however, it is possible to craft\n\
|
||||
one given enough Mechanics skill. Likewise, it is possible to make\n\
|
||||
wooden bolts from any number of wooden objects, though these are much\n\
|
||||
less effective than steel bolts.\n\
|
||||
Crossbows use the handgun skill.");
|
||||
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
|
||||
mvwprintz(w_help, FULL_SCREEN_HEIGHT-1, 0, c_white, "Press any key to continue...");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
@@ -737,8 +847,8 @@ Shotguns are one of the most powerful weapons in the game, capable of taking\n\
|
||||
out almost any enemy with a single hit. Birdshot and 00 shot spread, making\n\
|
||||
it very easy to hit nearby monsters. However, they are very ineffective\n\
|
||||
against armor, and some armored monsters might shrug off 00 shot completely.\n\
|
||||
Shotgun slugs are the answer to this problem; they also offer much better\n\
|
||||
range than shot.\n\
|
||||
Shotgun slugs are the answer to this problem; they also offer much\n\
|
||||
better range than shot.\n\
|
||||
The biggest drawback to shotguns is their noisiness. They are very loud,\n\
|
||||
and impossible to silence. A shot that kills one zombie might attract three\n\
|
||||
more! Because of this, shotguns are best reserved for emergencies.");
|
||||
@@ -750,7 +860,7 @@ of bullets. However, they are more effective when firing single shots, so\n\
|
||||
use discretion. They mainly use the 9mm and .45 ammunition; however, other\n\
|
||||
SMGs exist. They reload moderately quickly, and are suitable for close or\n\
|
||||
medium-long range combat.");
|
||||
mvwprintz(w_help, 22, 0, c_white, "Press any key to continue...");
|
||||
mvwprintz(w_help, FULL_SCREEN_HEIGHT-3, 0, c_white, "Press any key to continue...");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
@@ -764,8 +874,8 @@ more, their scopes or sights make shots fired at targets more than 10 tiles\n\
|
||||
away as accurate as those with a shorter range. However, they are very poor\n\
|
||||
at hitting targets 4 squares or less from the player.\n\
|
||||
Unlike assault rifles, hunting rifles have no automatic fire. They are also\n\
|
||||
slow to reload and fire, so when facing a large group of nearby enemies, they\n\
|
||||
are not the best pick.");
|
||||
slow to reload and fire, so when facing a large group of nearby enemies,\n\
|
||||
they are not the best pick.");
|
||||
mvwprintz(w_help, 11, 0, c_blue, "( Assault Rifles");
|
||||
mvwprintz(w_help, 12, 0, c_white, "\
|
||||
Assault rifles are similar to hunting rifles in many ways; they are also\n\
|
||||
@@ -776,7 +886,7 @@ fire, so save it for when you're highly skilled.\n\
|
||||
Assault rifles are an excellent choice for medium or long range combat, or\n\
|
||||
even close-range bursts again a large number of enemies. They are difficult\n\
|
||||
to use, and are best saved for skilled riflemen.");
|
||||
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
|
||||
mvwprintz(w_help, FULL_SCREEN_HEIGHT-1, 0, c_white, "Press any key to continue...");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
@@ -795,45 +905,44 @@ making them very good at clearing out large numbers of enemies.");
|
||||
mvwprintz(w_help, 11, 0, c_white, "\
|
||||
Energy weapons is an umbrella term used to describe a variety of rifles and\n\
|
||||
handguns which fire lasers, plasma, or energy attacks. They started to\n\
|
||||
appear in military use just prior to the start of the apocalypse, and as such\n\
|
||||
are very difficult to find.\n\
|
||||
appear in military use just prior to the start of the apocalypse, and\n\
|
||||
as such are very difficult to find.\n\
|
||||
Energy weapons have no recoil at all; they are nearly silent, have a long\n\
|
||||
range, and are fairly damaging. The biggest drawback to energy weapons is\n\
|
||||
scarcity of ammunition; it is wise to reserve the precious ammo for when you\n\
|
||||
really need it.");
|
||||
mvwprintz(w_help, 24, 0, c_white, "Press any key to continue...");
|
||||
scarcity of ammunition; it is wise to reserve the precious ammo for when\n\
|
||||
you really need it.");
|
||||
mvwprintz(w_help, FULL_SCREEN_HEIGHT-1, 0, c_white, "Press any key to continue...");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
break;
|
||||
|
||||
case '6':
|
||||
case '7':
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Q: What is Run Mode, and why does it prevent me from moving?\n\
|
||||
A: Run Mode is a way to guarantee that you won't die by holding a movement\n\
|
||||
Q: What is Safe Mode, and why does it prevent me from moving?\n\
|
||||
A: Safe Mode is a way to guarantee that you won't die by holding a movement\n\
|
||||
key down. When a monster comes into view, your movement will be ignored\n\
|
||||
until Run Mode is turned off with the ! key. This ensures that the\n\
|
||||
sudden appearence of a monster won't catch you off guard.\n\
|
||||
until Safe Mode is turned off with the ! key. This ensures that\n\
|
||||
the sudden appearence of a monster won't catch you off guard.\n\
|
||||
\n\
|
||||
Q: It seems like everything I eat makes me sick! What's wrong?\n\
|
||||
A: Lots of the food found in towns is perishable, and will only last a few\n\
|
||||
days after the start of a new game (July 12). Fruit, milk, and others are\n\
|
||||
the first to go. After the first couple of days, you should switch to\n\
|
||||
canned food, jerky, and hunting.\n\
|
||||
days after the start of a new game (July 12). Fruit, milk, and others\n\
|
||||
are the first to go. After the first couple of days, you should switch\n\
|
||||
to canned food, jerky, and hunting.\n\
|
||||
\n\
|
||||
Q: Why doesn't reading a book seem to give me any training?\n\
|
||||
A: Your skills will not be displayed in the @ screen until they reach level\n\
|
||||
one. Generally it will take several reads of the same book to gain a\n\
|
||||
single level in a skill.\n\
|
||||
Q: How can I remove boards from boarded-up windows and doors?\n\
|
||||
A: Use a hammer and choose the direction of the boarded-up window or\n\
|
||||
door to remove the boards.\n\
|
||||
\n\
|
||||
Q: How can I board up windows and doors?\n\
|
||||
A: You'll need a hammer, nails, and two by fours. Use the hammer and choose\n\
|
||||
the direction in which the terrain you wish to barricade lies.\n\
|
||||
Q: The game just told me to quit, and other weird stuff is happening.\n\
|
||||
A: You have the Schizophrenic trait, which might make the game seem buggy.\n\
|
||||
\n\
|
||||
Q: How can I prevent monsters from attacking while I sleep?\n\
|
||||
A: Find a safe place to sleep, in a building far from the front door. Set\n\
|
||||
traps if you have them, or build a fire.");
|
||||
A: Find a safe place to sleep, in a building far from the front door.\n\
|
||||
Set traps if you have them, or build a fire.");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
@@ -843,40 +952,49 @@ A: Find a safe place to sleep, in a building far from the front door. Set\n\
|
||||
Q: Why do I always sink when I try to swim?\n\
|
||||
A: Your swimming ability is reduced greatly by the weight you are carrying,\n\
|
||||
and is also adversely affected by the clothing you wear. Until you reach\n\
|
||||
a high level in the swimming skill, you'll need to drop your equipment and\n\
|
||||
remove your clothing to swim, making it a last-ditch escape plan.\n\
|
||||
a high level in the swimming skill, you'll need to drop your equipment \n\
|
||||
and remove your clothing to swim, making it a last-ditch escape plan.\n\
|
||||
\n\
|
||||
Q: How can I cure a fungal infection?\n\
|
||||
A: At present time, there is only one cure, royal jelly. You can find royal\n\
|
||||
jelly in the bee hives which dot forests.\n\
|
||||
\n\
|
||||
Q: How do I get into science labs?\n\
|
||||
A: You can enter the front door if you have an ID card by 'e'xamining the\n\
|
||||
A: You can enter the front door if you have an ID card by %s the\n\
|
||||
keypad. If you are skilled in computers and have an electrohack, it is\n\
|
||||
possible to hack the keypad. An EMP blast has a chance to force the doors\n\
|
||||
open, but it's more likely to break them. You can also sneak in through\n\
|
||||
the sewers sometimes, or try to smash through the walls with explosions.\n\
|
||||
\n\
|
||||
Q: Why does my crafting fail so often?\n\
|
||||
A: Check the difficulty of the recipe, and the primary skill used; your skill\n\
|
||||
level should be around one and a half times the difficulty to be confident\n\
|
||||
that it will succeed.");
|
||||
A: Check the difficulty of the recipe, and the primary skill used; your\n\
|
||||
skill level should be around one and a half times the difficulty to\n\
|
||||
be confident that it will succeed.",
|
||||
press_x(ACTION_EXAMINE, "examining").c_str());
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
getch();
|
||||
werase(w_help);
|
||||
mvwprintz(w_help, 0, 0, c_white, "\
|
||||
Q: Shotguns bring in more zombies than they kill! What's the point?\n\
|
||||
A: Shotguns are intended for emergency use. If you are cornered, use your\n\
|
||||
shotgun to escape, then just run from the zombies it attracts.\n\
|
||||
Q: Why can't I carry anything?\n\
|
||||
A: At the start of the game you only have the space in your pockets.\n\
|
||||
A good first goal of many survivors is to find a backpack or pouch to\n\
|
||||
store things in. (The shelter basement is a good place to check first!)\n\
|
||||
\n\
|
||||
Q: The game just told me to quit, and other weird stuff is happening.\n\
|
||||
A: You have the Schizophrenic trait, which might make the game seem buggy.\n\
|
||||
Q: Shotguns bring in more zombies than they kill! What's the point?\n\
|
||||
A: Shotguns are intended for emergency use. If you are cornered, use\n\
|
||||
your shotgun to escape, then just run from the zombies it attracts.\n\
|
||||
\n\
|
||||
Q: Help! I started a fire and now my house is burning down!\n\
|
||||
A: Fires will spread to nearby flammable tiles if they are able. Lighting a\n\
|
||||
stop fire in a set-up brazier, wood stove, stone fireplace, or pit will\n\
|
||||
it from spreading. Fire extinguishers can put out fires that get out\n\
|
||||
of control.\n\
|
||||
\n\
|
||||
Q: I have a question that's not addressed here. How can I get an answer?\n\
|
||||
A: Email your question to TheDarklingWolf@Gmail.com. I'll answer it for you,\n\
|
||||
and possibly include it on this list.");
|
||||
A: Ask the helpful people on the forum at smf.cataclysmdda.com or email\n\
|
||||
your question to TheDarklingWolf@Gmail.com.");
|
||||
|
||||
wrefresh(w_help);
|
||||
refresh();
|
||||
|
||||
+120
-86
@@ -17,7 +17,7 @@
|
||||
#include <sstream>
|
||||
|
||||
void iexamine::none (game *g, player *p, map *m, int examx, int examy) {
|
||||
g->add_msg("That is a %s.", m->tername(examx, examy).c_str());
|
||||
g->add_msg("That is a %s.", m->name(examx, examy).c_str());
|
||||
};
|
||||
|
||||
void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
|
||||
@@ -25,35 +25,38 @@ void iexamine::gaspump(game *g, player *p, map *m, int examx, int examy) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
item gas(g->itypes["gasoline"], g->turn);
|
||||
if (one_in(10 + p->dex_cur)) {
|
||||
g->add_msg("You accidentally spill the gasoline.");
|
||||
m->add_item(p->posx, p->posy, gas);
|
||||
} else {
|
||||
p->moves -= 300;
|
||||
g->handle_liquid(gas, false, true);
|
||||
}
|
||||
if (one_in(10)) {
|
||||
g->add_msg("With a clang and a shudder, the gas pump goes silent.");
|
||||
m->ter_set(examx, examy, t_gas_pump_empty);
|
||||
|
||||
for (int i = 0; i < m->i_at(examx, examy).size(); i++) {
|
||||
if (m->i_at(examx, examy)[i].made_of(LIQUID)) {
|
||||
item* liq = &(m->i_at(examx, examy)[i]);
|
||||
|
||||
if (one_in(10 + p->dex_cur)) {
|
||||
g->add_msg("You accidentally spill the %s.", liq->type->name.c_str());
|
||||
item spill(liq->type, g->turn);
|
||||
spill.charges = rng(dynamic_cast<it_ammo*>(liq->type)->count,
|
||||
dynamic_cast<it_ammo*>(liq->type)->count * (float)(8 / p->dex_cur));
|
||||
m->add_item_or_charges(p->posx, p->posy, spill, 1);
|
||||
liq->charges -= spill.charges;
|
||||
if (liq->charges < 1) {
|
||||
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
|
||||
}
|
||||
} else {
|
||||
p->moves -= 300;
|
||||
if (g->handle_liquid(*liq, true, false)) {
|
||||
g->add_msg("With a clang and a shudder, the %s pump goes silent.", liq->type->name.c_str());
|
||||
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
g->add_msg("Out of order.");
|
||||
}
|
||||
|
||||
void iexamine::elevator(game *g, player *p, map *m, int examx, int examy){
|
||||
if (!query_yn("Use the %s?",m->tername(examx, examy).c_str())) return;
|
||||
int movez = (g->levz < 0 ? 2 : -2);
|
||||
g->levz += movez;
|
||||
m->load(g, g->levx, g->levy, g->levz);
|
||||
g->update_map(p->posx, p->posy);
|
||||
for (int x = 0; x < SEEX * MAPSIZE; x++) {
|
||||
for (int y = 0; y < SEEY * MAPSIZE; y++) {
|
||||
if (m->ter(x, y) == t_elevator) {
|
||||
p->posx = x;
|
||||
p->posy = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
g->refresh_all();
|
||||
g->vertical_move( movez, false );
|
||||
}
|
||||
|
||||
void iexamine::controls_gate(game *g, player *p, map *m, int examx, int examy) {
|
||||
@@ -184,21 +187,21 @@ void iexamine::tent(game *g, player *p, map *m, int examx, int examy) {
|
||||
p->moves -= 200;
|
||||
for (int i = -1; i <= 1; i++)
|
||||
for (int j = -1; j <= 1; j++)
|
||||
m->ter_set(examx + i, examy + j, t_dirt);
|
||||
m->furn_set(examx + i, examy + j, f_null);
|
||||
g->add_msg("You take down the tent");
|
||||
item dropped(g->itypes["tent_kit"], g->turn);
|
||||
m->add_item(examx, examy, dropped);
|
||||
}
|
||||
|
||||
void iexamine::shelter(game *g, player *p, map *m, int examx, int examy) {
|
||||
if (!query_yn("Take down %s?",m->tername(examx, examy).c_str())) {
|
||||
if (!query_yn("Take down %s?",m->furnname(examx, examy).c_str())) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
p->moves -= 200;
|
||||
for (int i = -1; i <= 1; i++)
|
||||
for (int j = -1; j <= 1; j++)
|
||||
m->ter_set(examx + i, examy + j, t_dirt);
|
||||
m->furn_set(examx + i, examy + j, f_null);
|
||||
g->add_msg("You take down the shelter");
|
||||
item dropped(g->itypes["shelter_kit"], g->turn);
|
||||
m->add_item(examx, examy, dropped);
|
||||
@@ -530,52 +533,64 @@ void iexamine::fswitch(game *g, player *p, map *m, int examx, int examy) {
|
||||
}
|
||||
|
||||
void iexamine::flower_poppy(game *g, player *p, map *m, int examx, int examy) {
|
||||
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
if(!query_yn("Pick %s?",m->furnname(examx, examy).c_str())) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
|
||||
g->add_msg("This flower has a heady aroma");
|
||||
if (!(p->is_wearing("mask_filter")||p->is_wearing("mask_gas") ||
|
||||
one_in(3))) {
|
||||
g->add_msg("You fall asleep...");
|
||||
p->add_disease(DI_SLEEP, 1200, g);
|
||||
g->add_msg("Your legs are covered by flower's roots!");
|
||||
p->hurt(g,bp_legs, 0, 4);
|
||||
p->moves-=50;
|
||||
}
|
||||
m->ter_set(examx, examy, t_dirt);
|
||||
m->spawn_item(examx, examy, g->itypes["poppy_flower"],0);
|
||||
m->spawn_item(examx, examy, g->itypes["poppy_bud"],0);
|
||||
int resist = p->resist(bp_mouth);
|
||||
|
||||
if (resist < 10) {
|
||||
// Can't smell the flowers with a gas mask on!
|
||||
g->add_msg("This flower has a heady aroma");
|
||||
}
|
||||
|
||||
if (one_in(3) && resist < 5) {
|
||||
// Should user player::infect, but can't!
|
||||
// player::infect needs to be restructured to return a bool indicating success.
|
||||
g->add_msg("You fall asleep...");
|
||||
p->add_disease("sleep", 1200);
|
||||
g->add_msg("Your legs are covered by flower's roots!");
|
||||
p->hurt(g,bp_legs, 0, 4);
|
||||
p->moves-=50;
|
||||
}
|
||||
|
||||
m->furn_set(examx, examy, f_null);
|
||||
m->spawn_item(examx, examy, "poppy_flower", 0);
|
||||
m->spawn_item(examx, examy, "poppy_bud", 0);
|
||||
}
|
||||
|
||||
void iexamine::pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter) {
|
||||
if (!query_yn("Pick %s?", m->tername(examx, examy).c_str())) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
|
||||
SkillLevel& survival = p->skillLevel("survival");
|
||||
if (survival < 1)
|
||||
p->practice(g->turn, "survival", rng(5, 12));
|
||||
else if (survival < 6)
|
||||
p->practice(g->turn, "survival", rng(1, 12 / survival));
|
||||
|
||||
int num_fruits = rng(1, survival);
|
||||
if (num_fruits > 12)
|
||||
num_fruits = 12;
|
||||
|
||||
m->spawn_item(examx, examy, itemType, g->turn, num_fruits);
|
||||
|
||||
m->ter_set(examx, examy, (ter_id)new_ter);
|
||||
}
|
||||
|
||||
void iexamine::tree_apple(game *g, player *p, map *m, int examx, int examy) {
|
||||
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) return;
|
||||
|
||||
int num_apples = rng(1, p->skillLevel("survival"));
|
||||
if (num_apples >= 12)
|
||||
num_apples = 12;
|
||||
for (int i = 0; i < num_apples; i++)
|
||||
m->spawn_item(examx, examy, g->itypes["apple"], g->turn, 0);
|
||||
|
||||
m->ter_set(examx, examy, t_tree);
|
||||
|
||||
pick_plant(g, p, m, examx, examy, "apple", t_tree);
|
||||
}
|
||||
|
||||
void iexamine::shrub_blueberry(game *g, player *p, map *m, int examx, int examy) {
|
||||
if(!query_yn("Pick %s?",m->tername(examx, examy).c_str())) {
|
||||
none(g, p, m, examx, examy);
|
||||
return;
|
||||
}
|
||||
pick_plant(g, p, m, examx, examy, "blueberries", t_shrub);
|
||||
}
|
||||
|
||||
int num_blueberries = rng(1, p->skillLevel("survival"));
|
||||
|
||||
if (num_blueberries >= 12)
|
||||
num_blueberries = 12;
|
||||
for (int i = 0; i < num_blueberries; i++)
|
||||
m->spawn_item(examx, examy, g->itypes["blueberries"], g->turn, 0);
|
||||
|
||||
m->ter_set(examx, examy, t_shrub);
|
||||
void iexamine::shrub_strawberry(game *g, player *p, map *m, int examx, int examy) {
|
||||
pick_plant(g, p, m, examx, examy, "strawberries", t_shrub);
|
||||
}
|
||||
|
||||
void iexamine::shrub_wildveggies(game *g, player *p, map *m, int examx, int examy) {
|
||||
@@ -615,7 +630,7 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
|
||||
for (int i = 0; i < m->i_at(examx, examy).size(); i++)
|
||||
{
|
||||
item *it = &(m->i_at(examx, examy)[i]);
|
||||
if (it->made_of(STEEL))
|
||||
if (it->made_of("steel"))
|
||||
steel_weight += it->weight();
|
||||
m->i_at(examx, examy).erase(m->i_at(examx, examy).begin() + i);
|
||||
i--;
|
||||
@@ -633,16 +648,21 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
|
||||
|
||||
g->sound(examx, examy, 80, "Ka-klunk!");
|
||||
|
||||
int lump_weight = item_controller->find_template("steel_lump")->weight;
|
||||
int sheet_weight = item_controller->find_template("sheet_metal")->weight;
|
||||
int chunk_weight = item_controller->find_template("steel_chunk")->weight;
|
||||
int scrap_weight = item_controller->find_template("scrap")->weight;
|
||||
|
||||
switch(ch)
|
||||
{
|
||||
case 1: // 1 steel lump = weight 80
|
||||
num_lumps = steel_weight / (item_controller->find_template("steel_lump")->weight);
|
||||
steel_weight -= num_lumps * (item_controller->find_template("steel_lump")->weight);
|
||||
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
|
||||
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
|
||||
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
|
||||
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
|
||||
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
|
||||
num_lumps = steel_weight / (lump_weight);
|
||||
steel_weight -= num_lumps * (lump_weight);
|
||||
num_sheets = steel_weight / (sheet_weight);
|
||||
steel_weight -= num_sheets * (sheet_weight);
|
||||
num_chunks = steel_weight / (chunk_weight);
|
||||
steel_weight -= num_chunks * (chunk_weight);
|
||||
num_scraps = steel_weight / (scrap_weight);
|
||||
if (num_lumps == 0)
|
||||
{
|
||||
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
|
||||
@@ -651,11 +671,11 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
|
||||
break;
|
||||
|
||||
case 2: // 1 metal sheet = weight 20
|
||||
num_sheets = steel_weight / (item_controller->find_template("sheet_metal")->weight);
|
||||
steel_weight -= num_sheets * (item_controller->find_template("sheet_metal")->weight);
|
||||
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
|
||||
steel_weight -= num_chunks * (item_controller->find_template("sheet_chunk")->weight);
|
||||
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
|
||||
num_sheets = steel_weight / (sheet_weight);
|
||||
steel_weight -= num_sheets * (sheet_weight);
|
||||
num_chunks = steel_weight / (chunk_weight);
|
||||
steel_weight -= num_chunks * (chunk_weight);
|
||||
num_scraps = steel_weight / (scrap_weight);
|
||||
if (num_sheets == 0)
|
||||
{
|
||||
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
|
||||
@@ -664,9 +684,9 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
|
||||
break;
|
||||
|
||||
case 3: // 1 steel chunk = weight 6
|
||||
num_chunks = steel_weight / (item_controller->find_template("steel_chunk")->weight);
|
||||
steel_weight -= num_chunks * (item_controller->find_template("steel_chunk")->weight);
|
||||
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
|
||||
num_chunks = steel_weight / (chunk_weight);
|
||||
steel_weight -= num_chunks * (chunk_weight);
|
||||
num_scraps = steel_weight / (scrap_weight);
|
||||
if (num_chunks == 0)
|
||||
{
|
||||
g->add_msg("The recycler beeps: \"Insufficient steel!\"");
|
||||
@@ -675,28 +695,28 @@ void iexamine::recycler(game *g, player *p, map *m, int examx, int examy) {
|
||||
break;
|
||||
|
||||
case 4: // 1 metal scrap = weight 1
|
||||
num_scraps = steel_weight / (item_controller->find_template("scrap")->weight);
|
||||
num_scraps = steel_weight / (scrap_weight);
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_lumps; i++)
|
||||
{
|
||||
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_lump"), 0);
|
||||
m->spawn_item(p->posx, p->posy, "steel_lump", 0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_sheets; i++)
|
||||
{
|
||||
m->spawn_item(p->posx, p->posy, item_controller->find_template("sheet_metal"), 0);
|
||||
m->spawn_item(p->posx, p->posy, "sheet_metal", 0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_chunks; i++)
|
||||
{
|
||||
m->spawn_item(p->posx, p->posy, item_controller->find_template("steel_chunk"), 0);
|
||||
m->spawn_item(p->posx, p->posy, "steel_chunk", 0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_scraps; i++)
|
||||
{
|
||||
m->spawn_item(p->posx, p->posy, item_controller->find_template("scrap"), 0);
|
||||
m->spawn_item(p->posx, p->posy, "scrap", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,6 +733,11 @@ void iexamine::trap(game *g, player *p, map *m, int examx, int examy) {
|
||||
{
|
||||
water_source(g, p, m, examx, examy);
|
||||
}
|
||||
else if (m->tr_at(examx, examy) == tr_funnel && m->is_outside(examx, examy) &&
|
||||
(g->weather == WEATHER_ACID_DRIZZLE || g->weather == WEATHER_ACID_RAIN))
|
||||
{
|
||||
acid_source(g, p, m, examx, examy);
|
||||
}
|
||||
}
|
||||
|
||||
void iexamine::water_source(game *g, player *p, map *m, const int examx, const int examy)
|
||||
@@ -732,3 +757,12 @@ void iexamine::water_source(game *g, player *p, map *m, const int examx, const i
|
||||
p->moves -= 350;
|
||||
}
|
||||
}
|
||||
|
||||
void iexamine::acid_source(game *g, player *p, map *m, const int examx, const int examy)
|
||||
{
|
||||
item acid = m->acid_from(examx, examy);
|
||||
if (g->handle_liquid(acid, true, true))
|
||||
{
|
||||
p->moves -= 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,15 @@ public:
|
||||
void pedestal_temple (game *g, player *p, map *m, int examx, int examy);
|
||||
void fswitch (game *g, player *p, map *m, int examx, int examy);
|
||||
void flower_poppy (game *g, player *p, map *m, int examx, int examy);
|
||||
void pick_plant(game *g, player *p, map *m, int examx, int examy, std::string itemType, int new_ter);
|
||||
void tree_apple (game *g, player *p, map *m, int examx, int examy);
|
||||
void shrub_blueberry (game *g, player *p, map *m, int examx, int examy);
|
||||
void shrub_strawberry (game *g, player *p, map *m, int examx, int examy);
|
||||
void shrub_wildveggies (game *g, player *p, map *m, int examx, int examy);
|
||||
void recycler (game *g, player *p, map *m, int examx, int examy);
|
||||
void trap(game *g, player *p, map *m, int examx, int examy);
|
||||
void water_source (game *g, player *p, map *m, const int examx, const int examy);
|
||||
void acid_source (game *g, player *p, map *m, const int examx, const int examy);
|
||||
};
|
||||
|
||||
#endif /* defined(__Cataclysmic__iexamine__) */
|
||||
|
||||
+54
-26
@@ -242,7 +242,7 @@ inventory inventory::filter_by_category(item_cat cat, const player& u) const
|
||||
case IC_CONTAINER: // containers for liquid handling
|
||||
if (it.is_tool() || it.is_gun())
|
||||
{
|
||||
if (it.ammo_type() == AT_GAS)
|
||||
if (it.ammo_type() == "gasoline")
|
||||
{
|
||||
reduced_inv += *iter;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ item& inventory::add_item(item newit, bool keep_invlet)
|
||||
}
|
||||
else if (it_ref->stacks_with(newit))
|
||||
{
|
||||
if (it_ref->is_food() && it_ref->has_flag(IF_HOT))
|
||||
if (it_ref->is_food() && it_ref->has_flag("HOT"))
|
||||
{
|
||||
int tmpcounter = (it_ref->item_counter + newit.item_counter) / 2;
|
||||
it_ref->item_counter = tmpcounter;
|
||||
@@ -448,17 +448,20 @@ void inventory::form_from_map(game *g, point origin, int range)
|
||||
items.clear();
|
||||
for (int x = origin.x - range; x <= origin.x + range; x++) {
|
||||
for (int y = origin.y - range; y <= origin.y + range; y++) {
|
||||
if (g->m.has_flag(sealed, x, y))
|
||||
continue;
|
||||
for (int i = 0; i < g->m.i_at(x, y).size(); i++)
|
||||
if (!g->m.i_at(x, y)[i].made_of(LIQUID))
|
||||
add_item(g->m.i_at(x, y)[i]);
|
||||
// Kludges for now!
|
||||
if (g->m.field_at(x, y).type == fd_fire) {
|
||||
ter_id terrain_id = g->m.ter(x, y);
|
||||
furn_id furniture_id = g->m.furn(x, y);
|
||||
if ((g->m.field_at(x, y).findField(fd_fire)) || (terrain_id == t_lava)) {
|
||||
item fire(g->itypes["fire"], 0);
|
||||
fire.charges = 1;
|
||||
add_item(fire);
|
||||
}
|
||||
ter_id terrain_id = g->m.ter(x, y);
|
||||
if (terrain_id == t_toilet || terrain_id == t_water_sh || terrain_id == t_water_dp){
|
||||
if (furniture_id == f_toilet || terrain_id == t_water_sh || terrain_id == t_water_dp){
|
||||
item water(g->itypes["water"], 0);
|
||||
water.charges = 50;
|
||||
add_item(water);
|
||||
@@ -472,11 +475,11 @@ void inventory::form_from_map(game *g, point origin, int range)
|
||||
|
||||
if (kpart >= 0) {
|
||||
item hotplate(g->itypes["hotplate"], 0);
|
||||
hotplate.charges = veh->fuel_left(AT_BATT, true);
|
||||
hotplate.charges = veh->fuel_left("battery", true);
|
||||
add_item(hotplate);
|
||||
|
||||
item water(g->itypes["water_clean"], 0);
|
||||
water.charges = veh->fuel_left(AT_WATER);
|
||||
water.charges = veh->fuel_left("water");
|
||||
add_item(water);
|
||||
|
||||
item pot(g->itypes["pot"], 0);
|
||||
@@ -650,14 +653,14 @@ std::vector<item> inventory::remove_mission_items(int mission_id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void inventory::dump(std::vector<item>& dest) const
|
||||
void inventory::dump(std::vector<item *>& dest)
|
||||
{
|
||||
for (invstack::const_iterator iter = items.begin(); iter != items.end(); ++iter)
|
||||
for (invstack::iterator iter = items.begin(); iter != items.end(); ++iter)
|
||||
{
|
||||
for (std::list<item>::const_iterator stack_iter = iter->begin();
|
||||
for (std::list<item>::iterator stack_iter = iter->begin();
|
||||
stack_iter != iter->end(); ++stack_iter)
|
||||
{
|
||||
dest.push_back(*stack_iter);
|
||||
dest.push_back(&(*stack_iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -743,7 +746,7 @@ std::vector<item*> inventory::all_ammo(ammotype type)
|
||||
|
||||
}
|
||||
// Handle gasoline nested in containers
|
||||
else if (type == AT_GAS && stack_iter->is_container() &&
|
||||
else if (type == "gasoline" && stack_iter->is_container() &&
|
||||
!stack_iter->contents.empty() && stack_iter->contents[0].is_ammo() &&
|
||||
dynamic_cast<it_ammo*>(stack_iter->contents[0].type)->type == type)
|
||||
{
|
||||
@@ -830,8 +833,10 @@ int inventory::charges_of(itype_id it) const
|
||||
return count;
|
||||
}
|
||||
|
||||
void inventory::use_amount(itype_id it, int quantity, bool use_container)
|
||||
std::list<item> inventory::use_amount(itype_id it, int quantity, bool use_container)
|
||||
{
|
||||
sort();
|
||||
std::list<item> ret;
|
||||
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
|
||||
{
|
||||
for (std::list<item>::iterator stack_iter = iter->begin();
|
||||
@@ -844,6 +849,7 @@ void inventory::use_amount(itype_id it, int quantity, bool use_container)
|
||||
{
|
||||
if (stack_iter->contents[k].type->id == it)
|
||||
{
|
||||
ret.push_back(stack_iter->contents[k]);
|
||||
quantity--;
|
||||
stack_iter->contents.erase(stack_iter->contents.begin() + k);
|
||||
k--;
|
||||
@@ -854,31 +860,42 @@ void inventory::use_amount(itype_id it, int quantity, bool use_container)
|
||||
if (use_container && used_item_contents)
|
||||
{
|
||||
stack_iter = iter->erase(stack_iter);
|
||||
--stack_iter;
|
||||
if (iter->empty())
|
||||
{
|
||||
iter = items.erase(iter);
|
||||
--iter;
|
||||
stack_iter = iter->begin();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
--stack_iter;
|
||||
}
|
||||
}
|
||||
else if (stack_iter->type->id == it && quantity > 0)
|
||||
{
|
||||
ret.push_back(*stack_iter);
|
||||
quantity--;
|
||||
stack_iter = iter->erase(stack_iter);
|
||||
--stack_iter;
|
||||
if (iter->empty())
|
||||
{
|
||||
iter = items.erase(iter);
|
||||
--iter;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
--stack_iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void inventory::use_charges(itype_id it, int quantity)
|
||||
std::list<item> inventory::use_charges(itype_id it, int quantity)
|
||||
{
|
||||
sort();
|
||||
std::list<item> ret;
|
||||
for (invstack::iterator iter = items.begin(); iter != items.end() && quantity > 0; ++iter)
|
||||
{
|
||||
for (std::list<item>::iterator stack_iter = iter->begin();
|
||||
@@ -892,6 +909,7 @@ void inventory::use_charges(itype_id it, int quantity)
|
||||
{
|
||||
if (stack_iter->contents[k].charges <= quantity)
|
||||
{
|
||||
ret.push_back(stack_iter->contents[k]);
|
||||
quantity -= stack_iter->contents[k].charges;
|
||||
if (stack_iter->contents[k].destroyed_at_zero_charges())
|
||||
{
|
||||
@@ -905,8 +923,11 @@ void inventory::use_charges(itype_id it, int quantity)
|
||||
}
|
||||
else
|
||||
{
|
||||
item tmp = stack_iter->contents[k];
|
||||
tmp.charges = quantity;
|
||||
ret.push_back(tmp);
|
||||
stack_iter->contents[k].charges -= quantity;
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -916,17 +937,21 @@ void inventory::use_charges(itype_id it, int quantity)
|
||||
{
|
||||
if (stack_iter->charges <= quantity)
|
||||
{
|
||||
ret.push_back(*stack_iter);
|
||||
quantity -= stack_iter->charges;
|
||||
if (stack_iter->destroyed_at_zero_charges())
|
||||
{
|
||||
stack_iter = iter->erase(stack_iter);
|
||||
--stack_iter;
|
||||
if (iter->empty())
|
||||
{
|
||||
iter = items.erase(iter);
|
||||
--iter;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
--stack_iter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -935,12 +960,16 @@ void inventory::use_charges(itype_id it, int quantity)
|
||||
}
|
||||
else
|
||||
{
|
||||
item tmp = *stack_iter;
|
||||
tmp.charges = quantity;
|
||||
ret.push_back(tmp);
|
||||
stack_iter->charges -= quantity;
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool inventory::has_amount(itype_id it, int quantity) const
|
||||
@@ -1037,7 +1066,7 @@ int inventory::butcher_factor() const
|
||||
++stack_iter)
|
||||
{
|
||||
const item& cur_item = *stack_iter;
|
||||
if (cur_item.damage_cut() >= 10 && !cur_item.has_flag(IF_SPEAR))
|
||||
if (cur_item.damage_cut() >= 10 && !cur_item.has_flag("SPEAR"))
|
||||
{
|
||||
int factor = cur_item.volume() * 5 - cur_item.weight() * 1.5 -
|
||||
cur_item.damage_cut();
|
||||
@@ -1128,8 +1157,7 @@ item& inventory::watertight_container()
|
||||
item& it = iter->front();
|
||||
if (it.is_container() && it.contents.empty())
|
||||
{
|
||||
it_container* cont = dynamic_cast<it_container*>(it.type);
|
||||
if (cont->flags & mfb(con_wtight) && cont->flags & mfb(con_seals))
|
||||
if (it.has_flag("WATERTIGHT") && it.has_flag("SEALS"))
|
||||
{
|
||||
return it;
|
||||
}
|
||||
@@ -1206,13 +1234,13 @@ item& inventory::most_appropriate_painkiller(int pain)
|
||||
return ret;
|
||||
}
|
||||
|
||||
item& inventory::best_for_melee(int skills[num_skill_types])
|
||||
item& inventory::best_for_melee(player *p)
|
||||
{
|
||||
item& ret = nullitem;
|
||||
int best = 0;
|
||||
for (invstack::iterator iter = items.begin(); iter != items.end(); ++iter)
|
||||
{
|
||||
int score = iter->front().melee_value(skills);
|
||||
int score = iter->front().melee_value(p);
|
||||
if (score > best)
|
||||
{
|
||||
best = score;
|
||||
@@ -1245,7 +1273,7 @@ void inventory::rust_iron_items()
|
||||
stack_iter != iter->end();
|
||||
++stack_iter)
|
||||
{
|
||||
if (stack_iter->type->m1 == IRON && stack_iter->damage < 5 && one_in(8))
|
||||
if (stack_iter->type->m1 == "iron" && stack_iter->damage < 5 && one_in(8))
|
||||
{
|
||||
stack_iter->damage++;
|
||||
}
|
||||
|
||||
+4
-4
@@ -76,8 +76,8 @@ class inventory
|
||||
int amount_of (itype_id it) const;
|
||||
int charges_of(itype_id it) const;
|
||||
|
||||
void use_amount (itype_id it, int quantity, bool use_container = false);
|
||||
void use_charges(itype_id it, int quantity);
|
||||
std::list<item> use_amount (itype_id it, int quantity, bool use_container = false);
|
||||
std::list<item> use_charges(itype_id it, int quantity);
|
||||
|
||||
bool has_amount (itype_id it, int quantity) const;
|
||||
bool has_charges(itype_id it, int quantity) const;
|
||||
@@ -95,7 +95,7 @@ class inventory
|
||||
int worst_item_value(npc* p) const;
|
||||
bool has_enough_painkiller(int pain) const;
|
||||
item& most_appropriate_painkiller(int pain);
|
||||
item& best_for_melee(int skills[num_skill_types]);
|
||||
item& best_for_melee(player *p);
|
||||
item& most_loaded_gun();
|
||||
|
||||
void rust_iron_items();
|
||||
@@ -104,7 +104,7 @@ class inventory
|
||||
int volume() const;
|
||||
int max_active_item_charges(itype_id id) const;
|
||||
|
||||
void dump(std::vector<item>& dest) const; // dumps contents into dest (does not delete contents)
|
||||
void dump(std::vector<item*>& dest); // dumps contents into dest (does not delete contents)
|
||||
|
||||
// vector rather than list because it's NOT an item stack
|
||||
std::vector<item*> active_items();
|
||||
|
||||
+316
-127
@@ -1,6 +1,8 @@
|
||||
#include "game.h"
|
||||
#include "output.h"
|
||||
#include "uistate.h"
|
||||
#include "keypress.h"
|
||||
#include "translations.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -9,8 +11,9 @@
|
||||
|
||||
const int iCategorieNum = 11;
|
||||
std::string CATEGORIES[iCategorieNum] =
|
||||
{"GROUND:", "FIREARMS:", "AMMUNITION:", "CLOTHING:", "FOOD/DRINKS:",
|
||||
"TOOLS:", "BOOKS:", "WEAPONS:", "MODS/BIONICS", "MEDICINE/DRUGS", "OTHER:"};
|
||||
{_("GROUND:"), _("FIREARMS:"), _("AMMUNITION:"), _("CLOTHING:"),
|
||||
_("FOOD/DRINKS:"), _("TOOLS:"), _("BOOKS:"), _("WEAPONS:"),
|
||||
_("MODS/BIONICS"), _("MEDICINE/DRUGS"), _("OTHER:")};
|
||||
|
||||
//TODO: make this function not have issues with items that are classed as multiple things
|
||||
std::vector<int> find_firsts(invslice &slice)
|
||||
@@ -56,7 +59,7 @@ std::vector<int> find_firsts(invslice &slice)
|
||||
void print_inv_weight_vol(game *g, WINDOW* w_inv, int weight_carried, int vol_carried)
|
||||
{
|
||||
// Print weight
|
||||
mvwprintw(w_inv, 0, 43, "Weight: ");
|
||||
mvwprintw(w_inv, 0, 43, _("Weight: "));
|
||||
if (weight_carried >= g->u.weight_capacity() * .25)
|
||||
{
|
||||
wprintz(w_inv, c_red, "%4d", weight_carried);
|
||||
@@ -68,7 +71,7 @@ void print_inv_weight_vol(game *g, WINDOW* w_inv, int weight_carried, int vol_ca
|
||||
wprintz(w_inv, c_ltgray, "/%-4d", int(g->u.weight_capacity() * .25));//, g->u.weight_capacity());
|
||||
|
||||
// Print volume
|
||||
mvwprintw(w_inv, 0, 61, "Volume: ");
|
||||
mvwprintw(w_inv, 0, 61, _("Volume: "));
|
||||
if (vol_carried > g->u.volume_capacity() - 2)
|
||||
{
|
||||
wprintz(w_inv, c_red, "%3d", vol_carried);
|
||||
@@ -90,7 +93,7 @@ void print_inv_statics(game *g, WINDOW* w_inv, std::string title,
|
||||
|
||||
// Print our weapon
|
||||
int n_items = 0;
|
||||
mvwprintz(w_inv, 2, 45, c_magenta, "WEAPON:");
|
||||
mvwprintz(w_inv, 2, 45, c_magenta, _("WEAPON:"));
|
||||
int dropping_weapon = false;
|
||||
for (int i = 0; i < dropped_items.size() && !dropping_weapon; i++) {
|
||||
if (dropped_items[i] == g->u.weapon.invlet)
|
||||
@@ -112,7 +115,7 @@ void print_inv_statics(game *g, WINDOW* w_inv, std::string title,
|
||||
mvwprintz(w_inv, 3, 45, c_ltgray, g->u.weapname().c_str());
|
||||
// Print worn items
|
||||
if (g->u.worn.size() > 0)
|
||||
mvwprintz(w_inv, 5, 45, c_magenta, "ITEMS WORN:");
|
||||
mvwprintz(w_inv, 5, 45, c_magenta, _("ITEMS WORN:"));
|
||||
for (int i = 0; i < g->u.worn.size(); i++) {
|
||||
n_items++;
|
||||
bool dropping_armor = false;
|
||||
@@ -133,16 +136,16 @@ void print_inv_statics(game *g, WINDOW* w_inv, std::string title,
|
||||
invlet != inv_chars.end(); invlet++) {
|
||||
n_items += ((g->u.inv.item_by_letter(*invlet).is_null()) ? 0 : 1);
|
||||
}
|
||||
mvwprintw(w_inv, 1, 62, "Items: %d/%d ", n_items, inv_chars.size());
|
||||
mvwprintw(w_inv, 1, 62, _("Items: %d/%d "), n_items, inv_chars.size());
|
||||
}
|
||||
|
||||
// Display current inventory.
|
||||
char game::inv(std::string title)
|
||||
{
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? FULL_SCREEN_WIDTH : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
|
||||
int ch = (int)'.';
|
||||
int start = 0, cur_it;
|
||||
int start = 0, cur_it, max_it;
|
||||
u.inv.sort();
|
||||
u.inv.restack(&u);
|
||||
invslice slice = u.inv.slice(0, u.inv.size());
|
||||
@@ -150,8 +153,13 @@ char game::inv(std::string title)
|
||||
print_inv_statics(this, w_inv, title, null_vector);
|
||||
// Gun, ammo, weapon, armor, food, tool, book, other
|
||||
std::vector<int> firsts = find_firsts(slice);
|
||||
int selected=-1;
|
||||
int selected_char=(int)' ';
|
||||
|
||||
if( uistate.last_inv_start >= 0 ) start = uistate.last_inv_start;
|
||||
if( uistate.last_inv_sel >= 0 ) selected = uistate.last_inv_sel;
|
||||
do {
|
||||
selected_char=(int)' ';
|
||||
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
@@ -159,28 +167,32 @@ char game::inv(std::string title)
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
if ( selected > -1 ) selected = start; // oy, the cheese
|
||||
}
|
||||
if ((ch == '>' || ch == KEY_NPAGE ) && cur_it < u.inv.size()) { // Clear lines and shift
|
||||
start = cur_it;
|
||||
mvwprintw(w_inv, maxitems + 4, 12, " ");
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
if ( selected < start && selected > -1 ) selected = start;
|
||||
}
|
||||
int cur_line = 2;
|
||||
max_it = 0;
|
||||
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
|
||||
// Clear the current line;
|
||||
mvwprintw(w_inv, cur_line, 0, " ");
|
||||
// Print category header
|
||||
for (int i = 1; i < iCategorieNum; i++) {
|
||||
if (cur_it == firsts[i-1]) {
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, CATEGORIES[i].c_str());
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, _(CATEGORIES[i].c_str()));
|
||||
cur_line++;
|
||||
}
|
||||
}
|
||||
if (cur_it < slice.size()) {
|
||||
item& it = slice[cur_it]->front();
|
||||
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
|
||||
mvwprintz(w_inv, cur_line, 1, it.color_in_inventory(&u), " %s",
|
||||
if(cur_it==selected) selected_char=(int)it.invlet;
|
||||
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
|
||||
mvwprintz(w_inv, cur_line, 1, (cur_it == selected ? h_white : it.color_in_inventory(&u) ), " %s",
|
||||
it.tname(this).c_str());
|
||||
if (slice[cur_it]->size() > 1)
|
||||
wprintw(w_inv, " [%d]", slice[cur_it]->size());
|
||||
@@ -189,16 +201,53 @@ char game::inv(std::string title)
|
||||
else if (it.contents.size() == 1 &&
|
||||
it.contents[0].charges > 0)
|
||||
wprintw(w_inv, " (%d)", it.contents[0].charges);
|
||||
max_it=cur_it;
|
||||
}
|
||||
cur_line++;
|
||||
}
|
||||
if (start > 0)
|
||||
mvwprintw(w_inv, maxitems + 4, 0, "< Go Back");
|
||||
mvwprintw(w_inv, maxitems + 4, 0, _("< Go Back"));
|
||||
if (cur_it < u.inv.size())
|
||||
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
|
||||
mvwprintw(w_inv, maxitems + 4, 12, _("> More items"));
|
||||
wrefresh(w_inv);
|
||||
|
||||
ch = getch();
|
||||
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE );
|
||||
|
||||
if ( ch == KEY_DOWN ) {
|
||||
if ( selected < 0 ) {
|
||||
selected = start;
|
||||
} else {
|
||||
selected++;
|
||||
}
|
||||
if ( selected > max_it ) {
|
||||
if( cur_it < u.inv.size() ) {
|
||||
ch='>';
|
||||
} else {
|
||||
selected = u.inv.size() - 1; // wraparound?
|
||||
}
|
||||
}
|
||||
} else if ( ch == KEY_UP ) {
|
||||
selected--;
|
||||
if ( selected < -1 ) {
|
||||
selected = -1; // wraparound?
|
||||
} else if ( selected < start ) {
|
||||
if ( start > 0 ) {
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
start -= maxitems;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
}
|
||||
}
|
||||
} else if ( ch == '\n' || ch == KEY_RIGHT ) {
|
||||
// if ( uistate.last_inv_start > -2 && uistate.last_inv_sel > -2 ) {
|
||||
uistate.last_inv_start=start;
|
||||
uistate.last_inv_sel=selected;
|
||||
// }
|
||||
ch = selected_char;
|
||||
}
|
||||
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE || ch == KEY_UP || ch == KEY_DOWN );
|
||||
werase(w_inv);
|
||||
delwin(w_inv);
|
||||
erase();
|
||||
@@ -211,10 +260,10 @@ char game::inv_type(std::string title, item_cat inv_item_type)
|
||||
// this function lists inventory objects by type
|
||||
// refer to enum item_cat in itype.h for list of categories
|
||||
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? FULL_SCREEN_WIDTH : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
|
||||
int ch = (int)'.';
|
||||
int start = 0, cur_it;
|
||||
int start = 0, cur_it, max_it;
|
||||
u.inv.sort();
|
||||
u.inv.restack(&u);
|
||||
std::vector<char> null_vector;
|
||||
@@ -227,6 +276,8 @@ char game::inv_type(std::string title, item_cat inv_item_type)
|
||||
invslice slice = reduced_inv.slice(0, reduced_inv.size());
|
||||
std::vector<int> firsts = find_firsts(slice);
|
||||
|
||||
int selected=-1;
|
||||
int selected_char=(int)' ';
|
||||
do {
|
||||
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) { // Clear lines and shift
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
@@ -235,21 +286,24 @@ char game::inv_type(std::string title, item_cat inv_item_type)
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
if ( selected > -1 ) selected = start; // oy, the cheese
|
||||
}
|
||||
if (( ch == '>' || ch == KEY_NPAGE ) && cur_it < reduced_inv.size()) { // Clear lines and shift
|
||||
start = cur_it;
|
||||
mvwprintw(w_inv, maxitems + 4, 12, " ");
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
if ( selected < start && selected > -1 ) selected = start;
|
||||
}
|
||||
int cur_line = 2;
|
||||
max_it = 0;
|
||||
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
|
||||
// Clear the current line;
|
||||
mvwprintw(w_inv, cur_line, 0, " ");
|
||||
|
||||
for (int i = 1; i < iCategorieNum; i++) {
|
||||
if (cur_it == firsts[i-1]) {
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, CATEGORIES[i].c_str());
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, _(CATEGORIES[i].c_str()));
|
||||
cur_line++;
|
||||
}
|
||||
}
|
||||
@@ -257,8 +311,9 @@ char game::inv_type(std::string title, item_cat inv_item_type)
|
||||
if (cur_it < slice.size())
|
||||
{
|
||||
item& it = slice[cur_it]->front();
|
||||
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
|
||||
mvwprintz(w_inv, cur_line, 1, it.color_in_inventory(&u), " %s",
|
||||
if(cur_it==selected) selected_char=(int)it.invlet;
|
||||
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
|
||||
mvwprintz(w_inv, cur_line, 1, (cur_it == selected ? h_white : it.color_in_inventory(&u) ), " %s",
|
||||
it.tname(this).c_str());
|
||||
if (slice[cur_it]->size() > 1)
|
||||
wprintw(w_inv, " [%d]", slice[cur_it]->size());
|
||||
@@ -267,17 +322,51 @@ char game::inv_type(std::string title, item_cat inv_item_type)
|
||||
else if (it.contents.size() == 1 &&
|
||||
it.contents[0].charges > 0)
|
||||
wprintw(w_inv, " (%d)", it.contents[0].charges);
|
||||
cur_line++;
|
||||
cur_line++;
|
||||
max_it=cur_it;
|
||||
}
|
||||
// cur_line++;
|
||||
}
|
||||
if (start > 0)
|
||||
mvwprintw(w_inv, maxitems + 4, 0, "< Go Back");
|
||||
mvwprintw(w_inv, maxitems + 4, 0, _("< Go Back"));
|
||||
if (cur_it < reduced_inv.size())
|
||||
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
|
||||
mvwprintw(w_inv, maxitems + 4, 12, _("> More items"));
|
||||
wrefresh(w_inv);
|
||||
|
||||
ch = getch();
|
||||
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE );
|
||||
|
||||
if ( ch == KEY_DOWN ) {
|
||||
if ( selected < 0 ) {
|
||||
selected = start;
|
||||
} else {
|
||||
selected++;
|
||||
}
|
||||
if ( selected > max_it ) {
|
||||
if( cur_it < u.inv.size() ) {
|
||||
ch='>';
|
||||
} else {
|
||||
selected = u.inv.size() - 1; // wraparound?
|
||||
}
|
||||
}
|
||||
} else if ( ch == KEY_UP ) {
|
||||
selected--;
|
||||
if ( selected < -1 ) {
|
||||
selected = -1; // wraparound?
|
||||
} else if ( selected < start ) {
|
||||
if ( start > 0 ) {
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
start -= maxitems;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
}
|
||||
}
|
||||
} else if ( ch == '\n' || ch == KEY_RIGHT ) {
|
||||
ch = selected_char;
|
||||
}
|
||||
|
||||
} while (ch == '<' || ch == '>' || ch == KEY_NPAGE || ch == KEY_PPAGE || ch == KEY_UP || ch == KEY_DOWN );
|
||||
werase(w_inv);
|
||||
delwin(w_inv);
|
||||
erase();
|
||||
@@ -289,20 +378,24 @@ std::vector<item> game::multidrop()
|
||||
{
|
||||
u.inv.sort();
|
||||
u.inv.restack(&u);
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? 80 : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
WINDOW* w_inv = newwin(((VIEWY < 12) ? 25 : VIEWY*2+1), ((VIEWX < 12) ? FULL_SCREEN_WIDTH : VIEWX*2+56), VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
int drp_line_width=getmaxx(w_inv)-90;
|
||||
const std::string drp_line_padding = ( drp_line_width > 1 ? std::string(drp_line_width, ' ') : " ");
|
||||
const int maxitems = (VIEWY < 12) ? 20 : VIEWY*2-4; // Number of items to show at one time.
|
||||
std::map<char, int> dropping; // Count of how many we'll drop from each stack
|
||||
int count = 0; // The current count
|
||||
std::vector<char> weapon_and_armor; // Always single, not counted
|
||||
bool warned_about_bionic = false; // Printed add_msg re: dropping bionics
|
||||
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
|
||||
print_inv_statics(this, w_inv, _("Multidrop:"), weapon_and_armor);
|
||||
int base_weight = u.weight_carried();
|
||||
int base_volume = u.volume_carried();
|
||||
|
||||
int ch = (int)'.';
|
||||
int start = 0, cur_it;
|
||||
int start = 0, cur_it, max_it;
|
||||
invslice stacks = u.inv.slice(0, u.inv.size());
|
||||
std::vector<int> firsts = find_firsts(stacks);
|
||||
int selected=-1;
|
||||
int selected_char=(int)' ';
|
||||
do {
|
||||
inventory drop_subset = u.inv.subset(dropping);
|
||||
int new_weight = base_weight - drop_subset.weight();
|
||||
@@ -311,40 +404,69 @@ std::vector<item> game::multidrop()
|
||||
new_weight -= u.i_at(weapon_and_armor[i]).weight();
|
||||
}
|
||||
print_inv_weight_vol(this, w_inv, new_weight, new_volume);
|
||||
if (( ch == '<' || ch == KEY_PPAGE ) && start > 0) {
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
start -= maxitems;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
}
|
||||
if (( ch == '>' || ch == KEY_NPAGE ) && cur_it < u.inv.size()) {
|
||||
start = cur_it;
|
||||
mvwprintw(w_inv, maxitems + 4, 12, " ");
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
}
|
||||
int cur_line = 2;
|
||||
max_it = 0;
|
||||
int drp_line = 1;
|
||||
// Print weapon to be dropped, the first position is reserved for high visibility
|
||||
mvwprintw(w_inv, 0, 90, "%s", drp_line_padding.c_str());
|
||||
bool dropping_w = false;
|
||||
for (int k = 0; k < weapon_and_armor.size() && !dropping_w; k++) {
|
||||
if (weapon_and_armor[k] == u.weapon.invlet) {
|
||||
dropping_w = true;
|
||||
}
|
||||
if (dropping_w && u.is_armed()) {
|
||||
mvwprintz(w_inv, 0, 90, c_ltblue, "%c + %s", u.weapon.invlet, u.weapname().c_str());
|
||||
}
|
||||
}
|
||||
// Print worn items to be dropped
|
||||
if(dropping_w) {
|
||||
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
|
||||
drp_line++;
|
||||
}
|
||||
bool dropping_a = false;
|
||||
if (u.worn.size() > 0){
|
||||
for (int k = 0; k < u.worn.size(); k++) {
|
||||
bool dropping_w = false;
|
||||
for (int j = 0; j < weapon_and_armor.size() && !dropping_w; j++) {
|
||||
if (weapon_and_armor[j] == u.worn[k].invlet) {
|
||||
dropping_w = true;
|
||||
dropping_a = true;
|
||||
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
|
||||
mvwprintz(w_inv, drp_line, 90, c_cyan, "%c + %s", u.worn[k].invlet, u.worn[k].tname(this).c_str());
|
||||
drp_line++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dropping_a) {
|
||||
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
|
||||
drp_line++;
|
||||
}
|
||||
for (cur_it = start; cur_it < start + maxitems && cur_line < maxitems+3; cur_it++) {
|
||||
// Clear the current line;
|
||||
mvwprintw(w_inv, cur_line, 0, " ");
|
||||
mvwprintw(w_inv, drp_line, 90, "%s", drp_line_padding.c_str());
|
||||
mvwprintw(w_inv, drp_line + 1, 90, "%s", drp_line_padding.c_str());
|
||||
// Print category header
|
||||
for (int i = 1; i < iCategorieNum; i++) {
|
||||
if (cur_it == firsts[i-1]) {
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, CATEGORIES[i].c_str());
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, _(CATEGORIES[i].c_str()));
|
||||
cur_line++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( selected < start && selected > -1 ) selected = start;
|
||||
|
||||
if (cur_it < stacks.size()) {
|
||||
item& it = stacks[cur_it]->front();
|
||||
mvwputch (w_inv, cur_line, 0, c_white, it.invlet);
|
||||
if(cur_it==selected) selected_char=(int)it.invlet;
|
||||
mvwputch (w_inv, cur_line, 0, (cur_it == selected ? h_white : c_white), it.invlet);
|
||||
char icon = '-';
|
||||
if (dropping[it.invlet] >= (it.count_by_charges() ? it.charges : stacks[cur_it]->size()))
|
||||
icon = '+';
|
||||
else if (dropping[it.invlet] > 0)
|
||||
icon = '#';
|
||||
nc_color col = (dropping[it.invlet] == 0 ? c_ltgray : c_white);
|
||||
nc_color col = ( cur_it == selected ? h_white : (dropping[it.invlet] == 0 ? c_ltgray : c_white ) );
|
||||
mvwprintz(w_inv, cur_line, 1, col, " %c %s", icon,
|
||||
it.tname(this).c_str());
|
||||
if (stacks[cur_it]->size() > 1)
|
||||
@@ -354,76 +476,146 @@ std::vector<item> game::multidrop()
|
||||
else if (it.contents.size() == 1 &&
|
||||
it.contents[0].charges > 0)
|
||||
wprintw(w_inv, " (%d)", it.contents[0].charges);
|
||||
if (icon=='+'||icon=='#') {
|
||||
mvwprintz(w_inv, drp_line, 90, col, "%c %c %s", it.invlet, icon, it.tname(this).c_str());
|
||||
if (icon=='+'){
|
||||
if (stacks[cur_it]->size() > 1)
|
||||
wprintz(w_inv, col, " [%d]", stacks[cur_it]->size());
|
||||
if (it.charges > 0)
|
||||
wprintz(w_inv, col, " (%d)", it.charges);
|
||||
}
|
||||
if (icon=='#') {
|
||||
wprintz(w_inv, col, " {%d}", dropping[it.invlet]);
|
||||
}
|
||||
drp_line++;
|
||||
}
|
||||
}
|
||||
cur_line++;
|
||||
max_it=cur_it;
|
||||
}
|
||||
if (start > 0)
|
||||
mvwprintw(w_inv, maxitems + 4, 0, "< Go Back");
|
||||
mvwprintw(w_inv, maxitems + 4, 0, _("< Go Back"));
|
||||
if (cur_it < u.inv.size())
|
||||
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
|
||||
mvwprintw(w_inv, maxitems + 4, 12, _("> More items"));
|
||||
wrefresh(w_inv);
|
||||
/* back to (int)getch() as input() mangles arrow keys
|
||||
ch = input();
|
||||
if (ch >= '0'&& ch <= '9') {
|
||||
*/
|
||||
ch = getch();
|
||||
if ( ch == '<' || ch == KEY_PPAGE ) {
|
||||
if( start > 0) {
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
start -= maxitems;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
if ( selected > -1 ) selected = start; // oy, the cheese
|
||||
}
|
||||
} else if ( ch == '>' || ch == KEY_NPAGE ) {
|
||||
if ( cur_it < u.inv.size()) {
|
||||
start = cur_it;
|
||||
mvwprintw(w_inv, maxitems + 4, 12, " ");
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
if ( selected < start && selected > -1 ) selected = start;
|
||||
}
|
||||
} else if ( ch == KEY_DOWN ) {
|
||||
if ( selected < 0 ) {
|
||||
selected = start;
|
||||
} else {
|
||||
selected++;
|
||||
}
|
||||
if ( selected > max_it ) {
|
||||
if( cur_it < u.inv.size() ) {
|
||||
start = cur_it;
|
||||
mvwprintw(w_inv, maxitems + 4, 12, " ");
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
} else {
|
||||
selected = u.inv.size() - 1; // wraparound?
|
||||
}
|
||||
}
|
||||
} else if ( ch == KEY_UP ) {
|
||||
selected--;
|
||||
if ( selected < -1 ) {
|
||||
selected = -1; // wraparound?
|
||||
} else if ( selected < start ) {
|
||||
if ( start > 0 ) {
|
||||
for (int i = 1; i < maxitems+4; i++)
|
||||
mvwprintz(w_inv, i, 0, c_black, " ");
|
||||
start -= maxitems;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
mvwprintw(w_inv, maxitems + 4, 0, " ");
|
||||
}
|
||||
}
|
||||
} else if (ch >= '0'&& ch <= '9') {
|
||||
ch = (char)ch - '0';
|
||||
count *= 10;
|
||||
count += ch;
|
||||
} else if (u.has_item(ch)) {
|
||||
item& it = u.inv.item_by_letter(ch);
|
||||
if (it.is_null()) { // Not from inventory
|
||||
int found = false;
|
||||
for (int i = 0; i < weapon_and_armor.size() && !found; i++) {
|
||||
if (weapon_and_armor[i] == ch) {
|
||||
weapon_and_armor.erase(weapon_and_armor.begin() + i);
|
||||
found = true;
|
||||
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
|
||||
} else { // todo: reformat and maybe rewrite
|
||||
if ( ch == '\t' || ch == KEY_RIGHT || ch == KEY_LEFT ) {
|
||||
ch = selected_char;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if ( ch == u.weapon.invlet &&
|
||||
std::find(unreal_itype_ids.begin(), unreal_itype_ids.end(), u.weapon.type->id) != unreal_itype_ids.end()){
|
||||
if (!warned_about_bionic)
|
||||
add_msg("You cannot drop your %s.", u.weapon.tname(this).c_str());
|
||||
warned_about_bionic = true;
|
||||
} else {
|
||||
weapon_and_armor.push_back(ch);
|
||||
print_inv_statics(this, w_inv, "Multidrop:", weapon_and_armor);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int index = -1;
|
||||
for (int i = 0; i < stacks.size(); ++i) {
|
||||
if (stacks[i]->front().invlet == it.invlet) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (index == -1) {
|
||||
debugmsg("Inventory got out of sync with inventory slice?");
|
||||
}
|
||||
if (count == 0) {
|
||||
if (it.count_by_charges())
|
||||
{
|
||||
if (dropping[it.invlet] == 0)
|
||||
dropping[it.invlet] = -1;
|
||||
else
|
||||
dropping[it.invlet] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dropping[it.invlet] == 0)
|
||||
dropping[it.invlet] = stacks[index]->size();
|
||||
else
|
||||
dropping[it.invlet] = 0;
|
||||
}
|
||||
}
|
||||
if (u.has_item(ch)) {
|
||||
item& it = u.inv.item_by_letter(ch);
|
||||
if (it.is_null()) { // Not from inventory
|
||||
int found = false;
|
||||
for (int i = 0; i < weapon_and_armor.size() && !found; i++) {
|
||||
if (weapon_and_armor[i] == ch) {
|
||||
weapon_and_armor.erase(weapon_and_armor.begin() + i);
|
||||
found = true;
|
||||
print_inv_statics(this, w_inv, _("Multidrop:"), weapon_and_armor);
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if ( ch == u.weapon.invlet &&
|
||||
std::find(unreal_itype_ids.begin(), unreal_itype_ids.end(), u.weapon.type->id) != unreal_itype_ids.end()){
|
||||
if (!warned_about_bionic)
|
||||
add_msg(_("You cannot drop your %s."), u.weapon.tname(this).c_str());
|
||||
warned_about_bionic = true;
|
||||
} else {
|
||||
weapon_and_armor.push_back(ch);
|
||||
print_inv_statics(this, w_inv, _("Multidrop:"), weapon_and_armor);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int index = -1;
|
||||
for (int i = 0; i < stacks.size(); ++i) {
|
||||
if (stacks[i]->front().invlet == it.invlet) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (index == -1) {
|
||||
debugmsg("Inventory got out of sync with inventory slice?");
|
||||
}
|
||||
if (count == 0) {
|
||||
if (it.count_by_charges())
|
||||
{
|
||||
if (dropping[it.invlet] == 0)
|
||||
dropping[it.invlet] = -1;
|
||||
else
|
||||
dropping[it.invlet] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dropping[it.invlet] == 0)
|
||||
dropping[it.invlet] = stacks[index]->size();
|
||||
else
|
||||
dropping[it.invlet] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else if (count >= stacks[index]->size() && !it.count_by_charges())
|
||||
dropping[it.invlet] = stacks[index]->size();
|
||||
else
|
||||
dropping[it.invlet] = count;
|
||||
else if (count >= stacks[index]->size() && !it.count_by_charges())
|
||||
dropping[it.invlet] = stacks[index]->size();
|
||||
else
|
||||
dropping[it.invlet] = count;
|
||||
|
||||
count = 0;
|
||||
}
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (ch != '\n' && ch != KEY_ESCAPE && ch != ' ');
|
||||
werase(w_inv);
|
||||
@@ -442,13 +634,24 @@ std::vector<item> game::multidrop()
|
||||
else if (it->second && u.inv.item_by_letter( it->first).count_by_charges()) {
|
||||
int charges = u.inv.item_by_letter( it->first).charges;// >= it->second ? : it->second;
|
||||
ret.push_back( u.inv.remove_item_by_charges( it->first, it->second > charges ? charges : it->second));
|
||||
} else if (it->second)
|
||||
} else if (it->second)
|
||||
for (int j = it->second; j > 0; j--)
|
||||
ret.push_back( u.inv.remove_item_by_letter( it->first));
|
||||
}
|
||||
|
||||
for (int i = 0; i < weapon_and_armor.size(); i++)
|
||||
ret.push_back(u.i_rem(weapon_and_armor[i]));
|
||||
{
|
||||
if (!u.takeoff(this, weapon_and_armor[i], true))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Item could have been dropped after taking it off
|
||||
if (&u.inv.item_by_letter(weapon_and_armor[i]) != &u.inv.nullitem)
|
||||
{
|
||||
ret.push_back(u.i_rem(weapon_and_armor[i]));
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -456,31 +659,17 @@ std::vector<item> game::multidrop()
|
||||
void game::compare(int iCompareX, int iCompareY)
|
||||
{
|
||||
int examx, examy;
|
||||
std::vector <item> grounditems;
|
||||
int ch = (int)'.';
|
||||
|
||||
if (iCompareX != -999 && iCompareX != -999) {
|
||||
examx = iCompareX;
|
||||
examy = iCompareY;
|
||||
} else {
|
||||
mvwprintw(w_terrain, 0, 0, "Compare where? (Direction button)");
|
||||
wrefresh(w_terrain);
|
||||
|
||||
ch = input();
|
||||
last_action += ch;
|
||||
if (ch == KEY_ESCAPE || ch == 'q')
|
||||
return;
|
||||
if (ch == '\n' || ch == 'I')
|
||||
ch = '.';
|
||||
get_direction(this, examx, examy, ch);
|
||||
if (examx == -2 || examy == -2) {
|
||||
add_msg("Invalid direction.");
|
||||
return;
|
||||
}
|
||||
examx = u.posx + iCompareX;
|
||||
examy = u.posy + iCompareY;
|
||||
} else if (!choose_adjacent("Compare",examx,examy)) {
|
||||
return;
|
||||
}
|
||||
examx += u.posx;
|
||||
examy += u.posy;
|
||||
|
||||
std::vector <item> here = m.i_at(examx, examy);
|
||||
std::vector <item> grounditems;
|
||||
//Filter out items with the same name (keep only one of them)
|
||||
std::map <std::string, bool> dups;
|
||||
for (int i = 0; i < here.size(); i++) {
|
||||
@@ -493,7 +682,7 @@ void game::compare(int iCompareX, int iCompareY)
|
||||
const int groundsize = (grounditems.size() > 10 ? 10 : grounditems.size());
|
||||
u.inv.sort();
|
||||
u.inv.restack(&u);
|
||||
|
||||
|
||||
invslice stacks = u.inv.slice(0, u.inv.size());
|
||||
|
||||
WINDOW* w_inv = newwin(TERMY-VIEW_OFFSET_Y*2, TERMX-VIEW_OFFSET_X*2, VIEW_OFFSET_Y, VIEW_OFFSET_X);
|
||||
@@ -540,7 +729,7 @@ void game::compare(int iCompareX, int iCompareY)
|
||||
// Print category header
|
||||
for (int i = iHeaderOffset; i < iCategorieNum; i++) {
|
||||
if (cur_it == firsts[i-iHeaderOffset]) {
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, CATEGORIES[i].c_str());
|
||||
mvwprintz(w_inv, cur_line, 0, c_magenta, _(CATEGORIES[i].c_str()));
|
||||
cur_line++;
|
||||
}
|
||||
}
|
||||
@@ -571,9 +760,9 @@ void game::compare(int iCompareX, int iCompareY)
|
||||
cur_line++;
|
||||
}
|
||||
if (start > 0)
|
||||
mvwprintw(w_inv, maxitems + 4, 0, "< Go Back");
|
||||
mvwprintw(w_inv, maxitems + 4, 0, _("< Go Back"));
|
||||
if (cur_it < u.inv.size() + groundsize)
|
||||
mvwprintw(w_inv, maxitems + 4, 12, "> More items");
|
||||
mvwprintw(w_inv, maxitems + 4, 12, _("> More items"));
|
||||
wrefresh(w_inv);
|
||||
ch = getch();
|
||||
if (u.has_item(ch)) {
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
class player;
|
||||
class npc;
|
||||
|
||||
// Thresholds for radiation dosage for the radiation film badge.
|
||||
const int rad_dosage_thresholds[] = { 0, 30, 60, 120, 240, 500};
|
||||
const std::string rad_threshold_colors[] = { "green", "blue", "yellow", "orange", "red", "black"};
|
||||
|
||||
struct iteminfo{
|
||||
public:
|
||||
std::string sType; //Itemtype
|
||||
@@ -41,11 +45,12 @@ public:
|
||||
item(std::string itemdata, game *g);
|
||||
~item();
|
||||
void make(itype* it);
|
||||
void clear(); // cleanup that's required to re-use an item variable
|
||||
|
||||
// returns the default container of this item, with this item in it
|
||||
item in_its_container(std::map<std::string, itype*> *itypes);
|
||||
|
||||
nc_color color(player *u);
|
||||
nc_color color(player *u) const;
|
||||
nc_color color_in_inventory(player *u);
|
||||
std::string tname(game *g = NULL); // g needed for rotten-test
|
||||
void use(player &u);
|
||||
@@ -54,7 +59,7 @@ public:
|
||||
// Firearm specifics
|
||||
int reload_time(player &u);
|
||||
int clip_size();
|
||||
int accuracy();
|
||||
int dispersion();
|
||||
int gun_damage(bool with_ammo = true);
|
||||
int noise() const;
|
||||
int burst_size();
|
||||
@@ -69,9 +74,9 @@ public:
|
||||
void load_info(std::string data, game *g);
|
||||
//std::string info(bool showtext = false); // Formatted for human viewing
|
||||
std::string info(bool showtext = false);
|
||||
std::string info(bool showtext, std::vector<iteminfo> *dump);
|
||||
char symbol();
|
||||
nc_color color();
|
||||
std::string info(bool showtext, std::vector<iteminfo> *dump, game *g = NULL, bool debug = false);
|
||||
char symbol() const;
|
||||
nc_color color() const;
|
||||
int price() const;
|
||||
|
||||
bool invlet_is_okay();
|
||||
@@ -84,7 +89,7 @@ public:
|
||||
int attack_time();
|
||||
int damage_bash();
|
||||
int damage_cut() const;
|
||||
bool has_flag(item_flag f) const;
|
||||
bool has_flag(std::string f) const;
|
||||
bool has_technique(technique_id t, player *p = NULL);
|
||||
int has_gunmod(itype_id type);
|
||||
item* active_gunmod();
|
||||
@@ -95,17 +100,26 @@ public:
|
||||
bool craft_has_charges();
|
||||
int num_charges();
|
||||
bool rotten(game *g);
|
||||
bool ready_to_revive(game *g); // used for corpses
|
||||
|
||||
// Our value as a weapon, given particular skills
|
||||
int weapon_value(int skills[num_skill_types]) const;
|
||||
int weapon_value(player *p) const;
|
||||
// As above, but discounts its use as a ranged weapon
|
||||
int melee_value (int skills[num_skill_types]);
|
||||
int melee_value (player *p);
|
||||
// how resistant item is to bashing and cutting damage
|
||||
int bash_resist() const;
|
||||
int cut_resist() const;
|
||||
// elemental resistances
|
||||
int acid_resist() const;
|
||||
// Returns the data associated with tech, if we are an it_style
|
||||
style_move style_data(technique_id tech);
|
||||
bool is_two_handed(player *u);
|
||||
bool made_of(material mat) const;
|
||||
bool made_of(std::string mat_ident) const;
|
||||
std::string get_material(int m) const;
|
||||
bool made_of(phase_id phase) const;
|
||||
bool conductive(); // Electricity
|
||||
bool conductive() const; // Electricity
|
||||
bool flammable() const;
|
||||
|
||||
bool destroyed_at_zero_charges();
|
||||
// Most of the is_whatever() functions call the same function in our itype
|
||||
bool is_null() const; // True if type is NULL, or points to the null item (id == 0)
|
||||
@@ -134,7 +148,7 @@ public:
|
||||
bool is_other() const; // Doesn't belong in other categories
|
||||
bool is_var_veh_part() const;
|
||||
bool is_artifact() const;
|
||||
|
||||
|
||||
bool operator<(const item& other) const;
|
||||
|
||||
itype_id typeId() const;
|
||||
@@ -149,19 +163,22 @@ public:
|
||||
int charges;
|
||||
bool active; // If true, it has active effects to be processed
|
||||
signed char damage; // How much damage it's sustained; generally, max is 5
|
||||
char burnt; // How badly we're burnt
|
||||
int burnt; // How badly we're burnt
|
||||
unsigned int bday; // The turn on which it was created
|
||||
int owned; // UID of NPC owner; 0 = player, -1 = unowned
|
||||
union{
|
||||
int poison; // How badly poisoned is it?
|
||||
int bigness; // engine power, wheel size
|
||||
int frequency; // Radio frequency
|
||||
int note; // Associated dynamic text snippet.
|
||||
int irridation; // Tracks radiation dosage.
|
||||
};
|
||||
int mode; // Mode of operation, can be changed by the player.
|
||||
unsigned item_flags : NUM_ITEM_FLAGS; // generic item specific flags
|
||||
std::string mode; // Mode of operation, can be changed by the player.
|
||||
std::set<std::string> item_tags; // generic item specific flags
|
||||
unsigned item_counter; // generic counter to be used with item flags
|
||||
int mission_id;// Refers to a mission in game's master list
|
||||
int player_id; // Only give a mission to the right player!
|
||||
|
||||
std::map<std::string, std::string> item_vars;
|
||||
static itype * nullitem();
|
||||
|
||||
item clone();
|
||||
|
||||
+108
-243
@@ -3,6 +3,7 @@
|
||||
#include "enums.h"
|
||||
#include "catajson.h"
|
||||
#include "addiction.h"
|
||||
#include "translations.h"
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
@@ -20,8 +21,8 @@ Item_factory* item_controller = new Item_factory();
|
||||
Item_factory::Item_factory(){
|
||||
init();
|
||||
m_missing_item = new itype();
|
||||
m_missing_item->name = "Error: Item Missing.";
|
||||
m_missing_item->description = "There is only the space where an object should be, but isn't. No item template of this type exists.";
|
||||
m_missing_item->name = _("Error: Item Missing.");
|
||||
m_missing_item->description = _("There is only the space where an object should be, but isn't. No item template of this type exists.");
|
||||
m_templates["MISSING_ITEM"]=m_missing_item;
|
||||
}
|
||||
|
||||
@@ -34,14 +35,11 @@ void Item_factory::init(){
|
||||
iuse_function_list["ROYAL_JELLY"] = &iuse::royal_jelly;
|
||||
iuse_function_list["BANDAGE"] = &iuse::bandage;
|
||||
iuse_function_list["FIRSTAID"] = &iuse::firstaid;
|
||||
iuse_function_list["DISINFECTANT"] = &iuse::disinfectant;
|
||||
iuse_function_list["CAFF"] = &iuse::caff;
|
||||
iuse_function_list["ALCOHOL"] = &iuse::alcohol;
|
||||
iuse_function_list["ALCOHOL_WEAK"] = &iuse::alcohol_weak;
|
||||
iuse_function_list["PKILL_1"] = &iuse::pkill_1;
|
||||
iuse_function_list["PKILL_2"] = &iuse::pkill_2;
|
||||
iuse_function_list["PKILL_3"] = &iuse::pkill_3;
|
||||
iuse_function_list["PKILL_4"] = &iuse::pkill_4;
|
||||
iuse_function_list["PKILL_L"] = &iuse::pkill_l;
|
||||
iuse_function_list["PKILL"] = &iuse::pkill;
|
||||
iuse_function_list["XANAX"] = &iuse::xanax;
|
||||
iuse_function_list["CIG"] = &iuse::cig;
|
||||
iuse_function_list["ANTIBIOTIC"] = &iuse::antibiotic;
|
||||
@@ -50,6 +48,8 @@ void Item_factory::init(){
|
||||
iuse_function_list["CRACK"] = &iuse::crack;
|
||||
iuse_function_list["GRACK"] = &iuse::grack;
|
||||
iuse_function_list["METH"] = &iuse::meth;
|
||||
iuse_function_list["VITAMINS"] = &iuse::vitamins;
|
||||
iuse_function_list["VACCINE"] = &iuse::vaccine;
|
||||
iuse_function_list["POISON"] = &iuse::poison;
|
||||
iuse_function_list["HALLU"] = &iuse::hallu;
|
||||
iuse_function_list["THORAZINE"] = &iuse::thorazine;
|
||||
@@ -61,7 +61,6 @@ void Item_factory::init(){
|
||||
iuse_function_list["INHALER"] = &iuse::inhaler;
|
||||
iuse_function_list["BLECH"] = &iuse::blech;
|
||||
iuse_function_list["MUTAGEN"] = &iuse::mutagen;
|
||||
iuse_function_list["MUTAGEN_3"] = &iuse::mutagen_3;
|
||||
iuse_function_list["PURIFIER"] = &iuse::purifier;
|
||||
iuse_function_list["MARLOSS"] = &iuse::marloss;
|
||||
iuse_function_list["DOGFOOD"] = &iuse::dogfood;
|
||||
@@ -76,6 +75,8 @@ void Item_factory::init(){
|
||||
iuse_function_list["HAMMER"] = &iuse::hammer;
|
||||
iuse_function_list["LIGHT_OFF"] = &iuse::light_off;
|
||||
iuse_function_list["LIGHT_ON"] = &iuse::light_on;
|
||||
iuse_function_list["GASOLINE_LANTERN_OFF"] = &iuse::gasoline_lantern_off;
|
||||
iuse_function_list["GASOLINE_LANTERN_ON"] = &iuse::gasoline_lantern_on;
|
||||
iuse_function_list["LIGHTSTRIP"] = &iuse::lightstrip;
|
||||
iuse_function_list["LIGHTSTRIP_ACTIVE"] = &iuse::lightstrip_active;
|
||||
iuse_function_list["GLOWSTICK"] = &iuse::glowstick;
|
||||
@@ -83,6 +84,7 @@ void Item_factory::init(){
|
||||
iuse_function_list["DIRECTIONAL_ANTENNA"] = &iuse::directional_antenna;
|
||||
iuse_function_list["DEVAC"] = &iuse::devac;
|
||||
iuse_function_list["CAUTERIZE_ELEC"] = &iuse::cauterize_elec;
|
||||
iuse_function_list["SOLDER_WELD"] = &iuse::solder_weld;
|
||||
iuse_function_list["WATER_PURIFIER"] = &iuse::water_purifier;
|
||||
iuse_function_list["TWO_WAY_RADIO"] = &iuse::two_way_radio;
|
||||
iuse_function_list["RADIO_OFF"] = &iuse::radio_off;
|
||||
@@ -97,6 +99,7 @@ void Item_factory::init(){
|
||||
iuse_function_list["CROWBAR"] = &iuse::crowbar;
|
||||
iuse_function_list["MAKEMOUND"] = &iuse::makemound;
|
||||
iuse_function_list["DIG"] = &iuse::dig;
|
||||
iuse_function_list["SIPHON"] = &iuse::siphon;
|
||||
iuse_function_list["CHAINSAW_OFF"] = &iuse::chainsaw_off;
|
||||
iuse_function_list["CHAINSAW_ON"] = &iuse::chainsaw_on;
|
||||
iuse_function_list["JACKHAMMER"] = &iuse::jackhammer;
|
||||
@@ -124,6 +127,7 @@ void Item_factory::init(){
|
||||
iuse_function_list["SMOKEBOMB_ACT"] = &iuse::smokebomb_act;
|
||||
iuse_function_list["ACIDBOMB"] = &iuse::acidbomb;
|
||||
iuse_function_list["ACIDBOMB_ACT"] = &iuse::acidbomb_act;
|
||||
iuse_function_list["ARROW_FLAMABLE"] = &iuse::arrow_flamable;
|
||||
iuse_function_list["MOLOTOV"] = &iuse::molotov;
|
||||
iuse_function_list["MOLOTOV_LIT"] = &iuse::molotov_lit;
|
||||
iuse_function_list["DYNAMITE"] = &iuse::dynamite;
|
||||
@@ -140,6 +144,8 @@ void Item_factory::init(){
|
||||
iuse_function_list["TURRET"] = &iuse::turret;
|
||||
iuse_function_list["UPS_OFF"] = &iuse::UPS_off;
|
||||
iuse_function_list["UPS_ON"] = &iuse::UPS_on;
|
||||
iuse_function_list["adv_UPS_OFF"] = &iuse::adv_UPS_off;
|
||||
iuse_function_list["adv_UPS_ON"] = &iuse::adv_UPS_on;
|
||||
iuse_function_list["TAZER"] = &iuse::tazer;
|
||||
iuse_function_list["MP3"] = &iuse::mp3;
|
||||
iuse_function_list["MP3_ON"] = &iuse::mp3_on;
|
||||
@@ -165,6 +171,10 @@ void Item_factory::init(){
|
||||
iuse_function_list["LAW"] = &iuse::LAW;
|
||||
iuse_function_list["HEATPACK"] = &iuse::heatpack;
|
||||
iuse_function_list["DEJAR"] = &iuse::dejar;
|
||||
iuse_function_list["RAD_BADGE"] = &iuse::rad_badge;
|
||||
iuse_function_list["BOOTS"] = &iuse::boots;
|
||||
iuse_function_list["ABSORBENT"] = &iuse::towel;
|
||||
iuse_function_list["UNFOLD_BICYCLE"] = &iuse::unfold_bicycle;
|
||||
// MACGUFFINS
|
||||
iuse_function_list["MCG_NOTE"] = &iuse::mcg_note;
|
||||
// ARTIFACTS
|
||||
@@ -173,39 +183,6 @@ void Item_factory::init(){
|
||||
// See artifact.h for a list
|
||||
iuse_function_list["ARTIFACT"] = &iuse::artifact;
|
||||
|
||||
// ITEM FLAGS
|
||||
item_flags_list["LIGHT_1"] = mfb(IF_LIGHT_1);
|
||||
item_flags_list["LIGHT_4"] = mfb(IF_LIGHT_4);
|
||||
item_flags_list["LIGHT_8"] = mfb(IF_LIGHT_8);
|
||||
item_flags_list["LIGHT_20"] = mfb(IF_LIGHT_20);
|
||||
item_flags_list["FIRE"] = mfb(IF_FIRE);
|
||||
item_flags_list["SPEAR"] = mfb(IF_SPEAR);
|
||||
item_flags_list["STAB"] = mfb(IF_STAB);
|
||||
item_flags_list["WRAP"] = mfb(IF_WRAP);
|
||||
item_flags_list["MESSY"] = mfb(IF_MESSY);
|
||||
item_flags_list["RELOAD_ONE"] = mfb(IF_RELOAD_ONE);
|
||||
item_flags_list["STR_RELOAD"] = mfb(IF_STR_RELOAD);
|
||||
item_flags_list["STR8_DRAW"] = mfb(IF_STR8_DRAW);
|
||||
item_flags_list["STR10_DRAW"] = mfb(IF_STR10_DRAW);
|
||||
item_flags_list["USE_UPS"] = mfb(IF_USE_UPS);
|
||||
item_flags_list["RELOAD_AND_SHOOT"] = mfb(IF_RELOAD_AND_SHOOT);
|
||||
item_flags_list["FIRE_100"] = mfb(IF_FIRE_100);
|
||||
item_flags_list["GRENADE"] = mfb(IF_GRENADE);
|
||||
item_flags_list["CHARGE"] = mfb(IF_CHARGE);
|
||||
item_flags_list["SHOCK"] = mfb(IF_SHOCK);
|
||||
item_flags_list["UNARMED_WEAPON"] = mfb(IF_UNARMED_WEAPON);
|
||||
item_flags_list["NO_UNWIELD"] = mfb(IF_NO_UNWIELD);
|
||||
item_flags_list["NO_UNLOAD"] = mfb(IF_NO_UNLOAD);
|
||||
item_flags_list["BACKBLAST"] = mfb(IF_BACKBLAST);
|
||||
item_flags_list["MODE_AUX"] = mfb(IF_MODE_AUX);
|
||||
item_flags_list["MODE_BURST"] = mfb(IF_MODE_BURST);
|
||||
item_flags_list["HOT"] = mfb(IF_HOT);
|
||||
item_flags_list["EATEN_HOT"] = mfb(IF_EATEN_HOT);
|
||||
item_flags_list["ROTTEN"] = mfb(IF_ROTTEN);
|
||||
item_flags_list["VARSIZE"] = mfb(IF_VARSIZE);
|
||||
item_flags_list["FIT"] = mfb(IF_FIT);
|
||||
item_flags_list["DOUBLE_AMMO"] = mfb(IF_DOUBLE_AMMO);
|
||||
|
||||
// Offensive Techniques
|
||||
techniques_list["SWEEP"] = mfb(TEC_SWEEP);
|
||||
techniques_list["PRECISE"] = mfb(TEC_PRECISE);
|
||||
@@ -216,6 +193,7 @@ void Item_factory::init(){
|
||||
techniques_list["FEINT"] = mfb(TEC_FEINT);
|
||||
techniques_list["THROW"] = mfb(TEC_THROW);
|
||||
techniques_list["DISARM"] = mfb(TEC_DISARM);
|
||||
techniques_list["FLAMING"] = mfb(TEC_FLAMING);
|
||||
// Defensive Techniques
|
||||
techniques_list["BLOCK"] = mfb(TEC_BLOCK);
|
||||
techniques_list["BLOCK_LEGS"] = mfb(TEC_BLOCK_LEGS);
|
||||
@@ -227,53 +205,6 @@ void Item_factory::init(){
|
||||
techniques_list["DEF_THROW"] = mfb(TEC_DEF_THROW);
|
||||
techniques_list["DEF_DISARM"] = mfb(TEC_DEF_DISARM);
|
||||
|
||||
//Ammo lists
|
||||
ammo_flags_list["NULL"] = mfb(AT_NULL);
|
||||
ammo_flags_list["THREAD"] = mfb(AT_THREAD);
|
||||
ammo_flags_list["BATT"] = mfb(AT_BATT);
|
||||
ammo_flags_list["PLUT"] = mfb(AT_PLUT);
|
||||
ammo_flags_list["NAIL"] = mfb(AT_NAIL);
|
||||
ammo_flags_list["BB"] = mfb(AT_BB);
|
||||
ammo_flags_list["BOLT"] = mfb(AT_BOLT);
|
||||
ammo_flags_list["ARROW"] = mfb(AT_ARROW);
|
||||
ammo_flags_list["SHOT"] = mfb(AT_SHOT);
|
||||
ammo_flags_list["22"] = mfb(AT_22);
|
||||
ammo_flags_list["9MM"] = mfb(AT_9MM);
|
||||
ammo_flags_list["762x25"] = mfb(AT_762x25);
|
||||
ammo_flags_list["38"] = mfb(AT_38);
|
||||
ammo_flags_list["40"] = mfb(AT_40);
|
||||
ammo_flags_list["44"] = mfb(AT_44);
|
||||
ammo_flags_list["45"] = mfb(AT_45);
|
||||
ammo_flags_list["57"] = mfb(AT_57);
|
||||
ammo_flags_list["46"] = mfb(AT_46);
|
||||
ammo_flags_list["762"] = mfb(AT_762);
|
||||
ammo_flags_list["223"] = mfb(AT_223);
|
||||
ammo_flags_list["3006"] = mfb(AT_3006);
|
||||
ammo_flags_list["308"] = mfb(AT_308);
|
||||
ammo_flags_list["40MM"] = mfb(AT_40MM);
|
||||
ammo_flags_list["66MM"] = mfb(AT_66MM);
|
||||
ammo_flags_list["GAS"] = mfb(AT_GAS);
|
||||
ammo_flags_list["FUSION"] = mfb(AT_FUSION);
|
||||
ammo_flags_list["MUSCLE"] = mfb(AT_MUSCLE);
|
||||
ammo_flags_list["12MM"] = mfb(AT_12MM);
|
||||
ammo_flags_list["PLASMA"] = mfb(AT_PLASMA);
|
||||
ammo_flags_list["WATER"] = mfb(AT_WATER);
|
||||
ammo_flags_list["PEBBLE"] = mfb(AT_PEBBLE);
|
||||
|
||||
ammo_effects_list["FLAME"] = mfb(AMMO_FLAME);
|
||||
ammo_effects_list["INCENDIARY"] = mfb(AMMO_INCENDIARY);
|
||||
ammo_effects_list["EXPLOSIVE"] = mfb(AMMO_EXPLOSIVE);
|
||||
ammo_effects_list["FRAG"] = mfb(AMMO_FRAG);
|
||||
ammo_effects_list["NAPALM"] = mfb(AMMO_NAPALM);
|
||||
ammo_effects_list["EXPLOSIVE_BIG"] = mfb(AMMO_EXPLOSIVE_BIG);
|
||||
ammo_effects_list["TEARGAS"] = mfb(AMMO_TEARGAS);
|
||||
ammo_effects_list["SMOKE"] = mfb(AMMO_SMOKE);
|
||||
ammo_effects_list["TRAIL"] = mfb(AMMO_TRAIL);
|
||||
ammo_effects_list["FLASHBANG"] = mfb(AMMO_FLASHBANG);
|
||||
ammo_effects_list["STREAM"] = mfb(AMMO_STREAM);
|
||||
ammo_effects_list["COOKOFF"] = mfb(AMMO_COOKOFF);
|
||||
ammo_effects_list["LASER"] = mfb(AMMO_LASER);
|
||||
|
||||
bodyparts_list["TORSO"] = mfb(bp_torso);
|
||||
bodyparts_list["HEAD"] = mfb(bp_head);
|
||||
bodyparts_list["EYES"] = mfb(bp_eyes);
|
||||
@@ -338,7 +269,7 @@ const Item_tag Item_factory::id_from(const Item_tag group_tag){
|
||||
|
||||
|
||||
item Item_factory::create(Item_tag id, int created_at){
|
||||
return item(find_template(id),0);
|
||||
return item(find_template(id), created_at);
|
||||
}
|
||||
Item_list Item_factory::create(Item_tag id, int created_at, int quantity){
|
||||
Item_list new_items;
|
||||
@@ -366,6 +297,15 @@ Item_list Item_factory::create_random(int created_at, int quantity){
|
||||
return new_items;
|
||||
}
|
||||
|
||||
bool Item_factory::group_contains_item(Item_tag group_tag, Item_tag item) {
|
||||
Item_group *current_group = m_template_groups.find(group_tag)->second;
|
||||
if(current_group) {
|
||||
return current_group->has_item(item);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
// DATA FILE READING //
|
||||
///////////////////////
|
||||
@@ -376,9 +316,11 @@ void Item_factory::load_item_templates(){
|
||||
load_item_templates_from("data/raw/items/ammo.json");
|
||||
load_item_templates_from("data/raw/items/mods.json");
|
||||
load_item_templates_from("data/raw/items/tools.json");
|
||||
load_item_templates_from("data/raw/items/containers.json");
|
||||
load_item_templates_from("data/raw/items/comestibles.json");
|
||||
load_item_templates_from("data/raw/items/armor.json");
|
||||
load_item_templates_from("data/raw/items/books.json");
|
||||
load_item_templates_from("data/raw/items/archery.json");
|
||||
load_item_groups_from("data/raw/item_groups.json");
|
||||
}
|
||||
|
||||
@@ -424,17 +366,19 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
it_gunmod* gunmod_template = new it_gunmod();
|
||||
gunmod_template->damage = entry.get("damage_modifier").as_int();;
|
||||
gunmod_template->loudness = entry.get("loudness_modifier").as_int();
|
||||
gunmod_template->newtype = ammo_from_string(entry.get("ammo_modifier").as_string());
|
||||
gunmod_template->newtype = entry.get("ammo_modifier").as_string();
|
||||
gunmod_template->used_on_pistol = is_mod_target(entry.get("mod_targets"), "pistol");
|
||||
gunmod_template->used_on_shotgun = is_mod_target(entry.get("mod_targets"), "shotgun");
|
||||
gunmod_template->used_on_smg = is_mod_target(entry.get("mod_targets"), "smg");
|
||||
gunmod_template->used_on_rifle = is_mod_target(entry.get("mod_targets"), "rifle");
|
||||
gunmod_template->accuracy = entry.get("accuracy_modifier").as_int();
|
||||
gunmod_template->dispersion = entry.get("dispersion_modifier").as_int();
|
||||
gunmod_template->recoil = entry.get("recoil_modifier").as_int();
|
||||
gunmod_template->burst = entry.get("burst_modifier").as_int();
|
||||
gunmod_template->clip = entry.get("clip_size_modifier").as_int();
|
||||
gunmod_template->techniques = (!entry.has("ammo") ? 0 :
|
||||
flags_from_json(entry.get("techniques"), "ammo"));
|
||||
if( entry.has("acceptable_ammo") ) {
|
||||
tags_from_json( entry.get("acceptable_ammo"),
|
||||
gunmod_template->acceptible_ammo_types );
|
||||
}
|
||||
new_item_template = gunmod_template;
|
||||
}
|
||||
else if (type_label == "COMESTIBLE")
|
||||
@@ -457,11 +401,11 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
else if (type_label == "GUN")
|
||||
{
|
||||
it_gun* gun_template = new it_gun();
|
||||
gun_template->ammo = ammo_from_string(entry.get("ammo").as_string());
|
||||
gun_template->ammo = entry.get("ammo").as_string();
|
||||
gun_template->skill_used = Skill::skill(entry.get("skill").as_string());
|
||||
gun_template->dmg_bonus = entry.get("ranged_damage").as_int();
|
||||
gun_template->range = entry.get("range").as_int();
|
||||
gun_template->accuracy = entry.get("accuracy").as_int();
|
||||
gun_template->dispersion = entry.get("dispersion").as_int();
|
||||
gun_template->recoil = entry.get("recoil").as_int();
|
||||
gun_template->durability = entry.get("durability").as_int();
|
||||
gun_template->burst = entry.get("burst").as_int();
|
||||
@@ -473,7 +417,7 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
else if (type_label == "TOOL")
|
||||
{
|
||||
it_tool* tool_template = new it_tool();
|
||||
tool_template->ammo = ammo_from_string(entry.get("ammo").as_string());
|
||||
tool_template->ammo = entry.get("ammo").as_string();
|
||||
tool_template->max_charges = entry.get("max_charges").as_int();
|
||||
tool_template->def_charges = entry.get("initial_charges").as_int();
|
||||
tool_template->charges_per_use = entry.get("charges_per_use").as_int();
|
||||
@@ -485,20 +429,17 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
else if (type_label == "AMMO")
|
||||
{
|
||||
it_ammo* ammo_template = new it_ammo();
|
||||
ammo_template->type =
|
||||
ammo_from_string(
|
||||
entry.get("ammo_type").as_string());
|
||||
ammo_template->type = entry.get("ammo_type").as_string();
|
||||
ammo_template->damage = entry.get("damage").as_int();
|
||||
ammo_template->pierce = entry.get("pierce").as_int();
|
||||
ammo_template->range = entry.get("range").as_int();
|
||||
ammo_template->accuracy =
|
||||
entry.get("accuracy").as_int();
|
||||
ammo_template->dispersion =
|
||||
entry.get("dispersion").as_int();
|
||||
ammo_template->recoil = entry.get("recoil").as_int();
|
||||
ammo_template->count = entry.get("count").as_int();
|
||||
ammo_template->ammo_effects =
|
||||
(!entry.has("effects") ? 0 :
|
||||
flags_from_json(entry.get("effects"),
|
||||
"ammo_effects"));
|
||||
if( entry.has("effects") ) {
|
||||
tags_from_json(entry.get("effects"), ammo_template->ammo_effects);
|
||||
}
|
||||
|
||||
new_item_template = ammo_template;
|
||||
}
|
||||
@@ -507,8 +448,8 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
it_armor* armor_template = new it_armor();
|
||||
|
||||
armor_template->encumber = entry.get("encumberance").as_int();
|
||||
armor_template->dmg_resist = entry.get("bashing_protection").as_int();
|
||||
armor_template->cut_resist = entry.get("cutting_protection").as_int();
|
||||
armor_template->coverage = entry.get("coverage").as_int();
|
||||
armor_template->thickness = entry.get("material_thickness").as_int();
|
||||
armor_template->env_resist = entry.get("enviromental_protection").as_int();
|
||||
armor_template->warmth = entry.get("warmth").as_int();
|
||||
armor_template->storage = entry.get("storage").as_int();
|
||||
@@ -531,6 +472,14 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
|
||||
new_item_template = book_template;
|
||||
}
|
||||
else if (type_label == "CONTAINER")
|
||||
{
|
||||
it_container* container_template = new it_container();
|
||||
|
||||
container_template->contains = entry.get("contains").as_int();
|
||||
|
||||
new_item_template = container_template;
|
||||
}
|
||||
else
|
||||
{
|
||||
debugmsg("Item definition for %s skipped, unrecognized type: %s", new_id.c_str(),
|
||||
@@ -544,15 +493,15 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
// And then proceed to assign the correct field
|
||||
new_item_template->rarity = entry.get("rarity").as_int();
|
||||
new_item_template->price = entry.get("price").as_int();
|
||||
new_item_template->name = entry.get("name").as_string();
|
||||
new_item_template->name = _(entry.get("name").as_string().c_str());
|
||||
new_item_template->sym = entry.get("symbol").as_char();
|
||||
new_item_template->color = color_from_string(entry.get("color").as_string());
|
||||
new_item_template->description = entry.get("description").as_string();
|
||||
new_item_template->description = _(entry.get("description").as_string().c_str());
|
||||
if(entry.has("material")){
|
||||
set_material_from_json(new_id, entry.get("material"));
|
||||
} else {
|
||||
new_item_template->m1 = MNULL;
|
||||
new_item_template->m2 = MNULL;
|
||||
new_item_template->m1 = "null";
|
||||
new_item_template->m2 = "null";
|
||||
}
|
||||
Item_tag new_phase = "solid";
|
||||
if(entry.has("phase")){
|
||||
@@ -565,8 +514,26 @@ void Item_factory::load_item_templates_from(const std::string file_name){
|
||||
new_item_template->melee_cut = entry.get("cutting").as_int();
|
||||
new_item_template->m_to_hit = entry.get("to_hit").as_int();
|
||||
|
||||
new_item_template->item_flags = (!entry.has("flags") ? 0 :
|
||||
flags_from_json(entry.get("flags")));
|
||||
if( entry.has("flags") )
|
||||
{
|
||||
new_item_template->item_tags = entry.get("flags").as_tags();
|
||||
/*
|
||||
List of current flags
|
||||
FIT - Reduces encumberance by one
|
||||
VARSIZE - Can be made to fit via tailoring
|
||||
OVERSIZE - Can always be worn no matter encumberance/mutations/bionics/etc
|
||||
HOOD - Will increase warmth for head if head is cold and player is not wearing a helmet (headwear of material that is not wool or cotton)
|
||||
POCKETS - Will increase warmth for hands if hands are cold and the player is wielding nothing
|
||||
WATCH - Shows the current time, instead of sun/moon position
|
||||
ALARM - Has a alarmclock feature
|
||||
|
||||
Container-only flags:
|
||||
SEALS
|
||||
RIGID
|
||||
WATERTIGHT
|
||||
*/
|
||||
}
|
||||
|
||||
new_item_template->techniques = (!entry.has("techniques") ? 0 :
|
||||
flags_from_json(entry.get("techniques"), "techniques"));
|
||||
new_item_template->use = (!entry.has("use_action") ? &iuse::none :
|
||||
@@ -599,6 +566,9 @@ void Item_factory::load_item_groups_from(const std::string file_name){
|
||||
//Crawl through once and create an entry for every definition
|
||||
const picojson::array& all_items = input_value.get<picojson::array>();
|
||||
for (picojson::array::const_iterator entry = all_items.begin(); entry != all_items.end(); ++entry) {
|
||||
// TODO: Make sure we have at least an item or group child, as otherwise
|
||||
// later things will bug out.
|
||||
|
||||
if( !(entry->is<picojson::object>()) ){
|
||||
std::cerr << "Invalid group definition, entry not a JSON object" << std::endl;
|
||||
}
|
||||
@@ -620,7 +590,7 @@ void Item_factory::load_item_groups_from(const std::string file_name){
|
||||
const picojson::value::object& entry_body = entry->get<picojson::object>();
|
||||
|
||||
Item_tag group_id = entry_body.find("id")->second.get<std::string>();
|
||||
Item_group current_group = *m_template_groups.find(group_id)->second;
|
||||
Item_group *current_group = m_template_groups.find(group_id)->second;
|
||||
|
||||
//Add items
|
||||
picojson::value::object::const_iterator key_pair = entry_body.find("items");
|
||||
@@ -642,7 +612,7 @@ void Item_factory::load_item_groups_from(const std::string file_name){
|
||||
if(!item_frequency_array[0].is<std::string>() || !item_frequency_array[1].is<double>() ){
|
||||
std::cerr << "Invalid item list for group definition '"+group_id+"', element is not a valid tag/frequency pair." << std::endl;
|
||||
} else {
|
||||
current_group.add_entry(item_frequency_array[0].get<std::string>(), (int)item_frequency_array[1].get<double>());
|
||||
current_group->add_entry(item_frequency_array[0].get<std::string>(), (int)item_frequency_array[1].get<double>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -670,7 +640,7 @@ void Item_factory::load_item_groups_from(const std::string file_name){
|
||||
std::cerr << "Invalid group list for group definition '"+group_id+"', element is not a valid tag/frequency pair." << std::endl;
|
||||
} else {
|
||||
Item_group* subgroup = m_template_groups.find(item_frequency_array[0].get<std::string>())->second;
|
||||
current_group.add_group(subgroup, (int)item_frequency_array[1].get<double>());
|
||||
current_group->add_group(subgroup, (int)item_frequency_array[1].get<double>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -717,75 +687,6 @@ nc_color Item_factory::color_from_string(std::string new_color){
|
||||
}
|
||||
}
|
||||
|
||||
ammotype Item_factory::ammo_from_string(std::string new_ammo){
|
||||
if("nail"==new_ammo){
|
||||
return AT_NAIL;
|
||||
} else if ("BB" == new_ammo) {
|
||||
return AT_BB;
|
||||
} else if ("pebble" == new_ammo) {
|
||||
return AT_PEBBLE;
|
||||
} else if ("bolt" == new_ammo) {
|
||||
return AT_BOLT;
|
||||
} else if ("arrow" == new_ammo) {
|
||||
return AT_ARROW;
|
||||
} else if ("shot" == new_ammo) {
|
||||
return AT_SHOT;
|
||||
} else if (".22" == new_ammo) {
|
||||
return AT_22;
|
||||
} else if ("9mm" == new_ammo) {
|
||||
return AT_9MM;
|
||||
} else if ("7.62x25mm" == new_ammo) {
|
||||
return AT_762x25;
|
||||
} else if (".38" == new_ammo) {
|
||||
return AT_38;
|
||||
} else if (".40" == new_ammo) {
|
||||
return AT_40;
|
||||
} else if (".44" == new_ammo) {
|
||||
return AT_44;
|
||||
} else if (".45" == new_ammo) {
|
||||
return AT_45;
|
||||
} else if ("5.7mm" == new_ammo) {
|
||||
return AT_57;
|
||||
} else if ("4.6mm" == new_ammo) {
|
||||
return AT_46;
|
||||
} else if ("7.62x39mm" == new_ammo) {
|
||||
return AT_762;
|
||||
} else if (".223" == new_ammo) {
|
||||
return AT_223;
|
||||
} else if (".30-06" == new_ammo) {
|
||||
return AT_3006;
|
||||
} else if (".308" == new_ammo) {
|
||||
return AT_308;
|
||||
} else if ("40mm" == new_ammo) {
|
||||
return AT_40MM;
|
||||
} else if ("66mm" == new_ammo) {
|
||||
return AT_66MM;
|
||||
} else if ("gasoline" == new_ammo) {
|
||||
return AT_GAS;
|
||||
} else if ("thread" == new_ammo) {
|
||||
return AT_THREAD;
|
||||
} else if ("battery" == new_ammo) {
|
||||
return AT_BATT;
|
||||
} else if ("plutonium" == new_ammo) {
|
||||
return AT_PLUT;
|
||||
} else if ("muscle" == new_ammo) {
|
||||
return AT_MUSCLE;
|
||||
} else if ("fusion" == new_ammo) {
|
||||
return AT_FUSION;
|
||||
} else if ("12mm" == new_ammo) {
|
||||
return AT_12MM;
|
||||
} else if ("plasma" == new_ammo) {
|
||||
return AT_PLASMA;
|
||||
} else if ("water" == new_ammo) {
|
||||
return AT_WATER;
|
||||
} else if ("none" == new_ammo) {
|
||||
return AT_NULL; // NX17 and other special weapons
|
||||
} else {
|
||||
debugmsg("Read invalid ammo %s.", new_ammo.c_str());
|
||||
return AT_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Use_function Item_factory::use_from_string(std::string function_name){
|
||||
std::map<Item_tag, Use_function>::iterator found_function = iuse_function_list.find(function_name);
|
||||
|
||||
@@ -801,14 +702,9 @@ Use_function Item_factory::use_from_string(std::string function_name){
|
||||
|
||||
void Item_factory::set_flag_by_string(unsigned& cur_flags, std::string new_flag, std::string flag_type)
|
||||
{
|
||||
//Use the standard item flag list unless a valid alternative is provided
|
||||
std::map<Item_tag, unsigned> flag_map = item_flags_list;
|
||||
if(flag_type=="ammo"){
|
||||
flag_map = ammo_flags_list;
|
||||
} else if(flag_type=="techniques"){
|
||||
std::map<Item_tag, unsigned> flag_map;
|
||||
if(flag_type=="techniques"){
|
||||
flag_map = techniques_list;
|
||||
} else if(flag_type=="ammo_effects"){
|
||||
flag_map = ammo_effects_list;
|
||||
} else if(flag_type=="bodyparts"){
|
||||
flag_map = bodyparts_list;
|
||||
}
|
||||
@@ -829,6 +725,22 @@ void Item_factory::set_bitmask_by_string(std::map<Item_tag, unsigned> flag_map,
|
||||
}
|
||||
}
|
||||
|
||||
void Item_factory::tags_from_json(catajson tag_list, std::set<std::string> &tags)
|
||||
{
|
||||
if (tag_list.is_array())
|
||||
{
|
||||
for (tag_list.set_begin(); tag_list.has_curr(); tag_list.next())
|
||||
{
|
||||
tags.insert( tag_list.curr().as_string() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//we should have gotten a string, if not an array, and catajson will do error checking
|
||||
tags.insert( tag_list.as_string() );
|
||||
}
|
||||
}
|
||||
|
||||
unsigned Item_factory::flags_from_json(catajson flag_list, std::string flag_type){
|
||||
//If none is found, just use the standard none action
|
||||
unsigned flag = 0;
|
||||
@@ -872,7 +784,7 @@ bool Item_factory::is_mod_target(catajson targets, std::string weapon){
|
||||
|
||||
void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
|
||||
//If the value isn't found, just return a group of null materials
|
||||
material material_list[2] = {MNULL, MNULL};
|
||||
std::string material_list[2] = {"null", "null"};
|
||||
|
||||
if (mat_list.is_array())
|
||||
{
|
||||
@@ -880,12 +792,12 @@ void Item_factory::set_material_from_json(Item_tag new_id, catajson mat_list){
|
||||
{
|
||||
debugmsg("Too many materials provided for item %s", new_id.c_str());
|
||||
}
|
||||
material_list[0] = material_from_tag(new_id, mat_list.get(0).as_string());
|
||||
material_list[1] = material_from_tag(new_id, mat_list.get(1).as_string());
|
||||
material_list[0] = mat_list.get(0).as_string();
|
||||
material_list[1] = mat_list.get(1).as_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
material_list[0] = material_from_tag(new_id, mat_list.as_string());
|
||||
material_list[0] = mat_list.as_string();
|
||||
}
|
||||
|
||||
itype* temp = find_template(new_id);
|
||||
@@ -907,50 +819,3 @@ phase_id Item_factory::phase_from_tag(Item_tag name){
|
||||
return PNULL;
|
||||
}
|
||||
};
|
||||
|
||||
material Item_factory::material_from_tag(Item_tag new_id, Item_tag name){
|
||||
// Map the valid input tags to a valid material
|
||||
|
||||
// This should clearly be some sort of map, stored somewhere
|
||||
// ...unless it can get replaced entirely, which would be nice.
|
||||
// For now, though, that isn't the problem I'm solving.
|
||||
if(name == "VEGGY"){
|
||||
return VEGGY;
|
||||
} else if(name == "FLESH"){
|
||||
return FLESH;
|
||||
} else if(name == "POWDER"){
|
||||
return POWDER;
|
||||
} else if(name == "HFLESH"){
|
||||
return HFLESH;
|
||||
} else if(name == "COTTON"){
|
||||
return COTTON;
|
||||
} else if(name == "WOOL"){
|
||||
return WOOL;
|
||||
} else if(name == "LEATHER"){
|
||||
return LEATHER;
|
||||
} else if(name == "KEVLAR"){
|
||||
return KEVLAR;
|
||||
} else if(name == "FUR"){
|
||||
return FUR;
|
||||
} else if(name == "STONE"){
|
||||
return STONE;
|
||||
} else if(name == "PAPER"){
|
||||
return PAPER;
|
||||
} else if(name == "WOOD"){
|
||||
return WOOD;
|
||||
} else if(name == "PLASTIC"){
|
||||
return PLASTIC;
|
||||
} else if(name == "GLASS"){
|
||||
return GLASS;
|
||||
} else if(name == "IRON"){
|
||||
return IRON;
|
||||
} else if(name == "STEEL"){
|
||||
return STEEL;
|
||||
} else if(name == "SILVER"){
|
||||
return SILVER;
|
||||
} else if(name == "NULL"){
|
||||
return MNULL;
|
||||
} else {
|
||||
return MNULL;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,9 +1,6 @@
|
||||
#ifndef _ITEM_FACTORY_H_
|
||||
#define _ITEM_FACTORY_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "game.h"
|
||||
#include "itype.h"
|
||||
#include "item.h"
|
||||
@@ -11,7 +8,10 @@
|
||||
#include "picojson.h"
|
||||
#include "catajson.h"
|
||||
#include "item_group.h"
|
||||
#include "iuse.h"
|
||||
#include "iuse.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
typedef std::string Item_tag;
|
||||
typedef std::vector<item> Item_list;
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
itype* template_from(Item_tag group_tag);
|
||||
const Item_tag random_id();
|
||||
const Item_tag id_from(Item_tag group_tag);
|
||||
bool group_contains_item(Item_tag group_tag, Item_tag item);
|
||||
|
||||
//Production methods
|
||||
item create(Item_tag id, int created_at);
|
||||
@@ -56,12 +57,11 @@ private:
|
||||
|
||||
nc_color color_from_string(std::string color);
|
||||
Use_function use_from_string(std::string name);
|
||||
void tags_from_json(catajson tag_list, std::set<std::string> &tags);
|
||||
unsigned flags_from_json(catajson flags, std::string flag_type="");
|
||||
void set_material_from_json(Item_tag new_id, catajson mats);
|
||||
bool is_mod_target(catajson targets, std::string weapon);
|
||||
material material_from_tag(Item_tag new_id, Item_tag index);
|
||||
phase_id phase_from_tag(Item_tag name);
|
||||
ammotype ammo_from_string(std::string ammo);
|
||||
|
||||
//two convenience functions that just call into set_bitmask_by_string
|
||||
void set_flag_by_string(unsigned& cur_flags, std::string new_flag, std::string flag_type);
|
||||
@@ -71,14 +71,8 @@ private:
|
||||
|
||||
//iuse stuff
|
||||
std::map<Item_tag, Use_function> iuse_function_list;
|
||||
//flags stuff
|
||||
std::map<Item_tag, unsigned> item_flags_list;
|
||||
//techniques stuff
|
||||
std::map<Item_tag, unsigned> techniques_list;
|
||||
//ammo stuff
|
||||
std::map<Item_tag, unsigned> ammo_flags_list;
|
||||
//ammo effects
|
||||
std::map<Item_tag, unsigned> ammo_effects_list;
|
||||
//bodyparts
|
||||
std::map<Item_tag, unsigned> bodyparts_list;
|
||||
};
|
||||
|
||||
@@ -86,3 +86,13 @@ bool Item_group_group::check(int value) const{
|
||||
const Item_tag Item_group_group::get(std::vector<Item_tag> recursion_list){
|
||||
return m_group->get_id(recursion_list);
|
||||
}
|
||||
|
||||
bool Item_group::has_item(const Item_tag item_id) {
|
||||
for(int i=0; i<m_entries.size(); i++) {
|
||||
if(m_entries[i]->get() == item_id) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ public:
|
||||
const Item_tag get_id(std::vector<Item_tag> recursion_list);
|
||||
void add_entry(const Item_tag item_id, int chance);
|
||||
void add_group(Item_group*, int chance);
|
||||
|
||||
// Does this item group contain the given item?
|
||||
bool has_item(const Item_tag item_id);
|
||||
private:
|
||||
const Item_tag m_id;
|
||||
int m_max_odds;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef _ITYPE_H_
|
||||
#define _ITYPE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include "color.h"
|
||||
#include "enums.h"
|
||||
#include "iuse.h"
|
||||
@@ -13,6 +10,12 @@
|
||||
#include "bionics.h"
|
||||
#include "artifact.h"
|
||||
#include "picojson.h"
|
||||
#include "rng.h"
|
||||
#include "material.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <set>
|
||||
|
||||
// mfb(n) converts a flag to its appropriate position in covers's bitfield
|
||||
#ifndef mfb
|
||||
@@ -39,27 +42,7 @@ extern std::vector<std::string> artifact_itype_ids;
|
||||
extern std::vector<std::string> standard_itype_ids;
|
||||
extern std::vector<std::string> pseudo_itype_ids;
|
||||
|
||||
// IMPORTANT: If adding a new AT_*** ammotype, add it to the ammo_name function
|
||||
// at the end of itypedef.cpp
|
||||
enum ammotype {
|
||||
AT_NULL, AT_THREAD,
|
||||
AT_BATT, AT_PLUT,
|
||||
AT_NAIL, AT_BB, AT_BOLT, AT_ARROW,
|
||||
AT_SHOT,
|
||||
AT_22, AT_9MM, AT_762x25, AT_38, AT_40, AT_44, AT_45,
|
||||
AT_57, AT_46,
|
||||
AT_762, AT_223, AT_3006, AT_308,
|
||||
AT_40MM,
|
||||
AT_66MM,
|
||||
AT_GAS,
|
||||
AT_FUSION,
|
||||
AT_MUSCLE,
|
||||
AT_12MM,
|
||||
AT_PLASMA,
|
||||
AT_WATER,
|
||||
AT_PEBBLE,
|
||||
NUM_AMMO_TYPES
|
||||
};
|
||||
typedef std::string ammotype;
|
||||
|
||||
enum software_type {
|
||||
SW_NULL,
|
||||
@@ -71,78 +54,6 @@ SW_DATA,
|
||||
NUM_SOFTWARE_TYPES
|
||||
};
|
||||
|
||||
enum item_flag {
|
||||
IF_NULL,
|
||||
|
||||
IF_LIGHT_1, // Provides 1 tile of light
|
||||
IF_LIGHT_4, // Provides 4 tiles of light
|
||||
IF_LIGHT_8, // Provides 8 tiles of light
|
||||
IF_LIGHT_20, // Provides 20 tiles of light
|
||||
|
||||
IF_FIRE, // Chance to set fire to tiles/enemies
|
||||
IF_SPEAR, // Cutting damage is actually a piercing attack
|
||||
IF_STAB, // This weapon *can* pierce, but also has normal cutting
|
||||
IF_WRAP, // Can wrap around your target, costing you and them movement
|
||||
IF_MESSY, // Splatters blood, etc.
|
||||
IF_RELOAD_ONE, // Reload cartridge by cartridge (e.g. most shotguns)
|
||||
IF_STR_RELOAD, // Reloading time is reduced by Strength * 20
|
||||
IF_STR8_DRAW, // Requires strength 8 to draw
|
||||
IF_STR10_DRAW, // Requires strength 10 to draw
|
||||
IF_USE_UPS, // Draws power from a UPS
|
||||
IF_RELOAD_AND_SHOOT, // Reloading and shooting is one action
|
||||
IF_FIRE_100, // Fires 100 rounds at once! (e.g. flamethrower)
|
||||
IF_GRENADE, // NPCs treat this as a grenade
|
||||
IF_CHARGE, // For guns; charges up slowly
|
||||
IF_SHOCK, // Stuns and damages enemies, powers up shockers.
|
||||
|
||||
IF_UNARMED_WEAPON, // Counts as an unarmed weapon
|
||||
IF_NO_UNWIELD, // Impossible to unwield, e.g. bionic claws
|
||||
IF_NO_UNLOAD, // Cannot be unloaded. For Fusion rifles and other ammo generating weapons.
|
||||
IF_BACKBLAST, // Creates a backblast of smoke.
|
||||
|
||||
// Weapon mode flags
|
||||
IF_MODE_AUX, // A gunmod with a firing mode
|
||||
IF_MODE_BURST, // A burst of attacks
|
||||
|
||||
// Food status flags
|
||||
IF_HOT, // hot food
|
||||
IF_EATEN_HOT, // food meant to be eaten hot
|
||||
IF_ROTTEN, // rotten food
|
||||
|
||||
// Clothing flags
|
||||
IF_VARSIZE, // comes in variable sizes (item type flag)
|
||||
IF_FIT, // clothing fits player (item specific flag)
|
||||
|
||||
//Book Flags
|
||||
/*IF_READ_SKILLBOOK,
|
||||
IF_READ_FUNBOOK,
|
||||
*/
|
||||
// Item mod flags
|
||||
|
||||
// has double the normal ammo capacity (item specific flag), only works with tools at the moment
|
||||
// need to tweak a few things to make it work with guns as well
|
||||
IF_DOUBLE_AMMO,
|
||||
|
||||
NUM_ITEM_FLAGS
|
||||
};
|
||||
|
||||
enum ammo_effect {
|
||||
AMMO_FLAME, // Sets fire to terrain and monsters
|
||||
AMMO_INCENDIARY, // Sparks explosive terrain
|
||||
AMMO_EXPLOSIVE, // Small explosion
|
||||
AMMO_FRAG, // Frag explosion
|
||||
AMMO_NAPALM, // Firey explosion
|
||||
AMMO_EXPLOSIVE_BIG, // Big explosion!
|
||||
AMMO_TEARGAS, // Teargas burst
|
||||
AMMO_SMOKE, // Smoke burst
|
||||
AMMO_TRAIL, // Leaves a trail of smoke
|
||||
AMMO_FLASHBANG, // Disorients and blinds
|
||||
AMMO_STREAM, // Doesn't stop once it hits a monster
|
||||
AMMO_COOKOFF, // Explodes when burned instead of just burning
|
||||
AMMO_LASER, // laser effects
|
||||
NUM_AMMO_EFFECTS
|
||||
};
|
||||
|
||||
enum technique_id {
|
||||
TEC_NULL,
|
||||
// Offensive Techniques
|
||||
@@ -155,6 +66,7 @@ TEC_RAPID, // Hits faster
|
||||
TEC_FEINT, // Misses take less time
|
||||
TEC_THROW, // Attacks may throw your opponent
|
||||
TEC_DISARM, // Remove an NPC's weapon
|
||||
TEC_FLAMING, // Sets victim on fire
|
||||
// Defensive Techniques
|
||||
TEC_BLOCK, // Block attacks, reducing them to 25% damage
|
||||
TEC_BLOCK_LEGS, // Block attacks, but with your legs
|
||||
@@ -213,8 +125,8 @@ struct itype
|
||||
char sym; // Symbol on the map
|
||||
nc_color color; // Color on the map (color.h)
|
||||
|
||||
material m1; // Main material
|
||||
material m2; // Secondary material -- MNULL if made of just 1 thing
|
||||
std::string m1; // Main material
|
||||
std::string m2; // Secondary material -- "null" if made of just 1 thing
|
||||
|
||||
phase_id phase; //e.g. solid, liquid, gas
|
||||
|
||||
@@ -227,7 +139,7 @@ struct itype
|
||||
signed char melee_cut; // Cutting damage in melee
|
||||
signed char m_to_hit; // To-hit bonus for melee combat; -5 to 5 is reasonable
|
||||
|
||||
unsigned item_flags : NUM_ITEM_FLAGS;
|
||||
std::set<std::string> item_tags;
|
||||
unsigned techniques : NUM_TECHNIQUES;
|
||||
|
||||
virtual bool is_food() { return false; }
|
||||
@@ -251,6 +163,8 @@ struct itype
|
||||
virtual bool count_by_charges() { return false; }
|
||||
virtual picojson::value save_data() { return picojson::value(); }
|
||||
|
||||
std::string dmg_adj(int dam) { return material_type::find_material(m1)->dmg_adj(dam); }
|
||||
|
||||
void (iuse::*use)(game *, player *, item *, bool);// Special effects of use
|
||||
|
||||
itype() {
|
||||
@@ -259,24 +173,23 @@ struct itype
|
||||
name = "none";
|
||||
sym = '#';
|
||||
color = c_white;
|
||||
m1 = MNULL;
|
||||
m2 = MNULL;
|
||||
m1 = "null";
|
||||
m2 = "null";
|
||||
phase = SOLID;
|
||||
volume = 0;
|
||||
weight = 0;
|
||||
melee_dam = 0;
|
||||
m_to_hit = 0;
|
||||
item_flags = 0;
|
||||
techniques = 0;
|
||||
use = &iuse::none;
|
||||
}
|
||||
|
||||
itype(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned pitem_flags, unsigned ptechniques = 0) {
|
||||
unsigned ptechniques = 0) {
|
||||
id = pid;
|
||||
rarity = prarity;
|
||||
price = pprice;
|
||||
@@ -292,7 +205,6 @@ struct itype
|
||||
melee_dam = pmelee_dam;
|
||||
melee_cut = pmelee_cut;
|
||||
m_to_hit = pm_to_hit;
|
||||
item_flags = pitem_flags;
|
||||
techniques = ptechniques;
|
||||
use = &iuse::none;
|
||||
}
|
||||
@@ -331,18 +243,18 @@ struct it_comest : public itype
|
||||
|
||||
it_comest(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, phase_id pphase,
|
||||
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
|
||||
signed char pquench, unsigned char pnutr, signed char pspoils,
|
||||
signed char pstim, signed char phealthy, unsigned char paddict,
|
||||
unsigned char pcharges, signed char pfun, itype_id pcontainer,
|
||||
itype_id ptool, void (iuse::*puse)(game *, player *, item *, bool),
|
||||
add_type padd, std::string pcomesttype)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit)
|
||||
{
|
||||
quench = pquench;
|
||||
nutr = pnutr;
|
||||
@@ -357,7 +269,6 @@ struct it_comest : public itype
|
||||
use = puse;
|
||||
add = padd;
|
||||
comesttype = pcomesttype;
|
||||
item_flags = pitem_flags;
|
||||
}
|
||||
|
||||
it_comest() :itype() { };
|
||||
@@ -372,7 +283,7 @@ struct it_var_veh_part: public itype
|
||||
|
||||
it_var_veh_part(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned effects,
|
||||
@@ -381,7 +292,7 @@ struct it_var_veh_part: public itype
|
||||
unsigned int big_max,
|
||||
bigness_property_aspect big_aspect)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, 0) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
min_bigness = big_min;
|
||||
max_bigness = big_max;
|
||||
bigness_aspect = big_aspect;
|
||||
@@ -402,11 +313,11 @@ struct it_ammo : public itype
|
||||
unsigned char damage; // Average damage done
|
||||
unsigned char pierce; // Armor piercing; static reduction in armor
|
||||
unsigned char range; // Maximum range
|
||||
signed char accuracy; // Accuracy (low is good)
|
||||
signed char dispersion;// Dispersion (low is good)
|
||||
unsigned char recoil; // Recoil; modified by strength
|
||||
unsigned char count; // Default charges
|
||||
|
||||
unsigned ammo_effects : NUM_AMMO_EFFECTS;
|
||||
std::set<std::string> ammo_effects;
|
||||
|
||||
virtual bool is_ammo() { return true; }
|
||||
// virtual bool count_by_charges() { return id != "gasoline"; }
|
||||
@@ -414,33 +325,32 @@ struct it_ammo : public itype
|
||||
|
||||
it_ammo() : itype()
|
||||
{
|
||||
type = AT_NULL;
|
||||
type = "NULL";
|
||||
damage = 0;
|
||||
pierce = 0;
|
||||
range = 0;
|
||||
accuracy = 0;
|
||||
dispersion = 0;
|
||||
recoil = 0;
|
||||
count = 0;
|
||||
ammo_effects = 0;
|
||||
}
|
||||
|
||||
it_ammo(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, phase_id pphase,
|
||||
char psym, nc_color pcolor, std::string pm1, phase_id pphase,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned effects,
|
||||
std::set<std::string> effects,
|
||||
|
||||
ammotype ptype, unsigned char pdamage, unsigned char ppierce,
|
||||
signed char paccuracy, unsigned char precoil, unsigned char prange,
|
||||
signed char pdispersion, unsigned char precoil, unsigned char prange,
|
||||
unsigned char pcount)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, MNULL, pphase,
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, "null", pphase,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, 0) {
|
||||
type = ptype;
|
||||
damage = pdamage;
|
||||
pierce = ppierce;
|
||||
range = prange;
|
||||
accuracy = paccuracy;
|
||||
dispersion = pdispersion;
|
||||
recoil = precoil;
|
||||
count = pcount;
|
||||
ammo_effects = effects;
|
||||
@@ -453,7 +363,7 @@ struct it_gun : public itype
|
||||
Skill *skill_used;
|
||||
signed char dmg_bonus;
|
||||
signed char range;
|
||||
signed char accuracy;
|
||||
signed char dispersion;
|
||||
signed char recoil;
|
||||
signed char durability;
|
||||
unsigned char burst;
|
||||
@@ -464,21 +374,20 @@ struct it_gun : public itype
|
||||
|
||||
it_gun(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned pitem_flags,
|
||||
|
||||
const char *pskill_used, ammotype pammo, signed char pdmg_bonus, signed char prange,
|
||||
signed char paccuracy, signed char precoil, unsigned char pdurability,
|
||||
signed char pdispersion, signed char precoil, unsigned char pdurability,
|
||||
unsigned char pburst, int pclip, int preload_time)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
skill_used = pskill_used?Skill::skill(pskill_used):NULL;
|
||||
ammo = pammo;
|
||||
dmg_bonus = pdmg_bonus;
|
||||
range = prange;
|
||||
accuracy = paccuracy;
|
||||
dispersion = pdispersion;
|
||||
recoil = precoil;
|
||||
durability = pdurability;
|
||||
burst = pburst;
|
||||
@@ -491,9 +400,9 @@ struct it_gun : public itype
|
||||
|
||||
struct it_gunmod : public itype
|
||||
{
|
||||
signed char accuracy, damage, loudness, clip, recoil, burst;
|
||||
signed char dispersion, damage, loudness, clip, recoil, burst;
|
||||
ammotype newtype;
|
||||
unsigned acceptible_ammo_types : NUM_AMMO_TYPES;
|
||||
std::set<std::string> acceptible_ammo_types;
|
||||
bool used_on_pistol;
|
||||
bool used_on_shotgun;
|
||||
bool used_on_smg;
|
||||
@@ -503,19 +412,19 @@ struct it_gunmod : public itype
|
||||
|
||||
it_gunmod(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
|
||||
signed char paccuracy, signed char pdamage, signed char ploudness,
|
||||
signed char pdispersion, signed char pdamage, signed char ploudness,
|
||||
signed char pclip, signed char precoil, signed char pburst,
|
||||
ammotype pnewtype, long a_a_t, bool pistol,
|
||||
ammotype pnewtype, std::set<std::string> a_a_t, bool pistol,
|
||||
bool shotgun, bool smg, bool rifle)
|
||||
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
accuracy = paccuracy;
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
dispersion = pdispersion;
|
||||
damage = pdamage;
|
||||
loudness = ploudness;
|
||||
clip = pclip;
|
||||
@@ -536,8 +445,8 @@ struct it_armor : public itype
|
||||
{
|
||||
unsigned char covers; // Bitfield of enum body_part
|
||||
signed char encumber;
|
||||
unsigned char dmg_resist;
|
||||
unsigned char cut_resist;
|
||||
unsigned char coverage;
|
||||
unsigned char thickness;
|
||||
unsigned char env_resist; // Resistance to environmental effects
|
||||
signed char warmth;
|
||||
unsigned char storage;
|
||||
@@ -548,13 +457,21 @@ struct it_armor : public itype
|
||||
virtual bool is_power_armor() { return power_armor; }
|
||||
virtual bool is_artifact() { return false; }
|
||||
virtual picojson::value save_data() { return picojson::value(); }
|
||||
std::string bash_dmg_verb() { return m2 == "null" || !one_in(3) ?
|
||||
material_type::find_material(m1)->bash_dmg_verb() :
|
||||
material_type::find_material(m2)->bash_dmg_verb();
|
||||
}
|
||||
std::string cut_dmg_verb() { return m2 == "null" || !one_in(3) ?
|
||||
material_type::find_material(m1)->cut_dmg_verb() :
|
||||
material_type::find_material(m2)->cut_dmg_verb();
|
||||
}
|
||||
|
||||
it_armor() : itype()
|
||||
{
|
||||
covers = 0;
|
||||
encumber = 0;
|
||||
dmg_resist = 0;
|
||||
cut_resist = 0;
|
||||
coverage = 0;
|
||||
thickness = 0;
|
||||
env_resist = 0;
|
||||
warmth = 0;
|
||||
storage = 0;
|
||||
@@ -563,21 +480,20 @@ struct it_armor : public itype
|
||||
|
||||
it_armor(itype_id pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned pitem_flags,
|
||||
|
||||
unsigned char pcovers, signed char pencumber,
|
||||
unsigned char pdmg_resist, unsigned char pcut_resist,
|
||||
unsigned char pcoverage, unsigned char pthickness,
|
||||
unsigned char penv_resist, signed char pwarmth,
|
||||
unsigned char pstorage, bool ppower_armor = false)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
covers = pcovers;
|
||||
encumber = pencumber;
|
||||
dmg_resist = pdmg_resist;
|
||||
cut_resist = pcut_resist;
|
||||
coverage = pcoverage;
|
||||
thickness = pthickness;
|
||||
env_resist = penv_resist;
|
||||
warmth = pwarmth;
|
||||
storage = pstorage;
|
||||
@@ -601,15 +517,14 @@ struct it_book : public itype
|
||||
it_book() {}
|
||||
it_book(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned pitem_flags,
|
||||
|
||||
const char *ptype, unsigned char plevel, unsigned char preq,
|
||||
signed char pfun, unsigned char pintel, unsigned char ptime)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
type = ptype?Skill::skill(ptype):NULL;
|
||||
level = plevel;
|
||||
req = preq;
|
||||
@@ -619,31 +534,11 @@ struct it_book : public itype
|
||||
}
|
||||
};
|
||||
|
||||
enum container_flags {
|
||||
con_rigid,
|
||||
con_wtight,
|
||||
con_seals,
|
||||
num_con_flags
|
||||
};
|
||||
|
||||
struct it_container : public itype
|
||||
{
|
||||
unsigned char contains; // Internal volume
|
||||
unsigned flags : num_con_flags;
|
||||
virtual bool is_container() { return true; }
|
||||
it_container(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
|
||||
unsigned char pcontains, unsigned pflags)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
contains = pcontains;
|
||||
flags = pflags;
|
||||
}
|
||||
it_container() {};
|
||||
};
|
||||
|
||||
struct it_tool : public itype
|
||||
@@ -661,7 +556,7 @@ struct it_tool : public itype
|
||||
|
||||
it_tool() :itype()
|
||||
{
|
||||
ammo = AT_NULL;
|
||||
ammo = "NULL";
|
||||
max_charges = 0;
|
||||
def_charges = 0;
|
||||
charges_per_use = 0;
|
||||
@@ -672,17 +567,16 @@ struct it_tool : public itype
|
||||
|
||||
it_tool(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2, phase_id pphase,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2, phase_id pphase,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
|
||||
unsigned pitem_flags,
|
||||
|
||||
unsigned int pmax_charges, unsigned int pdef_charges,
|
||||
unsigned char pcharges_per_use, unsigned char pturns_per_charge,
|
||||
ammotype pammo, itype_id prevert_to,
|
||||
void (iuse::*puse)(game *, player *, item *, bool))
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, pphase,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
max_charges = pmax_charges;
|
||||
def_charges = pdef_charges;
|
||||
ammo = pammo;
|
||||
@@ -702,14 +596,14 @@ struct it_bionic : public itype
|
||||
|
||||
it_bionic(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
|
||||
int pdifficulty)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
difficulty = pdifficulty;
|
||||
options.push_back(id);
|
||||
}
|
||||
@@ -723,15 +617,15 @@ struct it_macguffin : public itype
|
||||
|
||||
it_macguffin(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
|
||||
bool preadable,
|
||||
void (iuse::*puse)(game *, player *, item *, bool))
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
readable = preadable;
|
||||
use = puse;
|
||||
}
|
||||
@@ -746,14 +640,14 @@ struct it_software : public itype
|
||||
|
||||
it_software(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
|
||||
software_type pswtype, int ppower)
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) {
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) {
|
||||
swtype = pswtype;
|
||||
power = ppower;
|
||||
}
|
||||
@@ -767,13 +661,13 @@ struct it_style : public itype
|
||||
|
||||
it_style(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned char pvolume, unsigned char pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags)
|
||||
signed char pm_to_hit)
|
||||
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags) { }
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit) { }
|
||||
};
|
||||
|
||||
struct it_stationary : public itype
|
||||
@@ -784,14 +678,14 @@ struct it_stationary : public itype
|
||||
|
||||
it_stationary(std::string pid, unsigned char prarity, unsigned int pprice,
|
||||
std::string pname, std::string pdes,
|
||||
char psym, nc_color pcolor, material pm1, material pm2,
|
||||
char psym, nc_color pcolor, std::string pm1, std::string pm2,
|
||||
unsigned char pvolume, unsigned char pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit,
|
||||
std::string pcategory)
|
||||
|
||||
:itype(pid, prarity, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags)
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit)
|
||||
{
|
||||
category = pcategory;
|
||||
}
|
||||
@@ -826,7 +720,15 @@ struct it_artifact_tool : public it_tool
|
||||
data[std::string("melee_dam")] = picojson::value(melee_dam);
|
||||
data[std::string("melee_cut")] = picojson::value(melee_cut);
|
||||
data[std::string("m_to_hit")] = picojson::value(m_to_hit);
|
||||
data[std::string("item_flags")] = picojson::value(item_flags);
|
||||
|
||||
std::vector<picojson::value> tags_json;
|
||||
for(std::set<std::string>::iterator it = item_tags.begin();
|
||||
it != item_tags.end(); ++it)
|
||||
{
|
||||
tags_json.push_back(picojson::value(*it));
|
||||
}
|
||||
data[std::string("item_flags")] = picojson::value(tags_json);
|
||||
|
||||
data[std::string("techniques")] = picojson::value(techniques);
|
||||
|
||||
// tool data
|
||||
@@ -872,7 +774,7 @@ struct it_artifact_tool : public it_tool
|
||||
}
|
||||
|
||||
it_artifact_tool() :it_tool(){
|
||||
ammo = AT_NULL;
|
||||
ammo = "NULL";
|
||||
price = 0;
|
||||
def_charges = 0;
|
||||
charges_per_use = 1;
|
||||
@@ -882,10 +784,10 @@ struct it_artifact_tool : public it_tool
|
||||
};
|
||||
|
||||
it_artifact_tool(std::string pid, unsigned int pprice, std::string pname,
|
||||
std::string pdes, char psym, nc_color pcolor, material pm1,
|
||||
material pm2, unsigned short pvolume, unsigned short pweight,
|
||||
std::string pdes, char psym, nc_color pcolor, std::string pm1,
|
||||
std::string pm2, unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit, std::set<std::string> pitem_tags,
|
||||
|
||||
unsigned int pmax_charges, unsigned int pdef_charges,
|
||||
unsigned char pcharges_per_use,
|
||||
@@ -893,10 +795,11 @@ struct it_artifact_tool : public it_tool
|
||||
ammotype pammo, itype_id prevert_to)
|
||||
|
||||
:it_tool(pid, 0, pprice, pname, pdes, psym, pcolor, pm1, pm2, SOLID,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit,
|
||||
pmax_charges, pdef_charges, pcharges_per_use, pturns_per_charge,
|
||||
pammo, prevert_to, &iuse::artifact)
|
||||
{
|
||||
item_tags = pitem_tags;
|
||||
artifact_itype_ids.push_back(pid);
|
||||
};
|
||||
};
|
||||
@@ -928,14 +831,22 @@ struct it_artifact_armor : public it_armor
|
||||
data[std::string("melee_dam")] = picojson::value(melee_dam);
|
||||
data[std::string("melee_cut")] = picojson::value(melee_cut);
|
||||
data[std::string("m_to_hit")] = picojson::value(m_to_hit);
|
||||
data[std::string("item_flags")] = picojson::value(item_flags);
|
||||
|
||||
std::vector<picojson::value> tags_json;
|
||||
for(std::set<std::string>::iterator it = item_tags.begin();
|
||||
it != item_tags.end(); ++it)
|
||||
{
|
||||
tags_json.push_back(picojson::value(*it));
|
||||
}
|
||||
data[std::string("item_flags")] = picojson::value(tags_json);
|
||||
|
||||
data[std::string("techniques")] = picojson::value(techniques);
|
||||
|
||||
// armor data
|
||||
data[std::string("covers")] = picojson::value(covers);
|
||||
data[std::string("encumber")] = picojson::value(encumber);
|
||||
data[std::string("dmg_resist")] = picojson::value(dmg_resist);
|
||||
data[std::string("cut_resist")] = picojson::value(cut_resist);
|
||||
data[std::string("coverage")] = picojson::value(coverage);
|
||||
data[std::string("material_thickness")] = picojson::value(thickness);
|
||||
data[std::string("env_resist")] = picojson::value(env_resist);
|
||||
data[std::string("warmth")] = picojson::value(warmth);
|
||||
data[std::string("storage")] = picojson::value(storage);
|
||||
@@ -960,20 +871,21 @@ struct it_artifact_armor : public it_armor
|
||||
};
|
||||
|
||||
it_artifact_armor(std::string pid, unsigned int pprice, std::string pname,
|
||||
std::string pdes, char psym, nc_color pcolor, material pm1,
|
||||
material pm2, unsigned short pvolume, unsigned short pweight,
|
||||
std::string pdes, char psym, nc_color pcolor, std::string pm1,
|
||||
std::string pm2, unsigned short pvolume, unsigned short pweight,
|
||||
signed char pmelee_dam, signed char pmelee_cut,
|
||||
signed char pm_to_hit, unsigned pitem_flags,
|
||||
signed char pm_to_hit, std::set<std::string> pitem_tags,
|
||||
|
||||
unsigned char pcovers, signed char pencumber,
|
||||
unsigned char pdmg_resist, unsigned char pcut_resist,
|
||||
unsigned char pcoverage, unsigned char pthickness,
|
||||
unsigned char penv_resist, signed char pwarmth,
|
||||
unsigned char pstorage)
|
||||
:it_armor(pid, 0, pprice, pname, pdes, psym, pcolor, pm1, pm2,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit, pitem_flags,
|
||||
pcovers, pencumber, pdmg_resist, pcut_resist, penv_resist, pwarmth,
|
||||
pvolume, pweight, pmelee_dam, pmelee_cut, pm_to_hit,
|
||||
pcovers, pencumber, pcoverage, pthickness, penv_resist, pwarmth,
|
||||
pstorage)
|
||||
{
|
||||
item_tags = pitem_tags;
|
||||
artifact_itype_ids.push_back(pid);
|
||||
};
|
||||
};
|
||||
|
||||
+112
-495
@@ -34,71 +34,27 @@ void game::init_itypes ()
|
||||
{
|
||||
// First, the null object. NOT REALLY AN OBJECT AT ALL. More of a concept.
|
||||
itypes["null"]=
|
||||
new itype("null", 0, 0, "none", "", '#', c_white, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
|
||||
new itype("null", 0, 0, "none", "", '#', c_white, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
|
||||
// Corpse - a special item
|
||||
itypes["corpse"]=
|
||||
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, MNULL, MNULL, PNULL, 0, 0,
|
||||
new itype("corpse", 0, 0, "corpse", "A dead body.", '%', c_white, "null", "null", PNULL, 0, 0,
|
||||
0, 0, 1, 0);
|
||||
itypes["corpse"]->item_tags.insert("NO_UNLOAD");
|
||||
// Fire - only appears in crafting recipes
|
||||
itypes["fire"]=
|
||||
new itype("fire", 0, 0, "nearby fire",
|
||||
"Some fire - if you are reading this it's a bug! (itypdef:fire)",
|
||||
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
|
||||
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
|
||||
// Integrated toolset - ditto
|
||||
itypes["toolset"]=
|
||||
new itype("toolset", 0, 0, "integrated toolset",
|
||||
"A fake item. If you are reading this it's a bug! (itypdef:toolset)",
|
||||
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
|
||||
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
|
||||
// For smoking crack or meth
|
||||
itypes["apparatus"]=
|
||||
new itype("apparatus", 0, 0, "something to smoke that from, and a lighter",
|
||||
"A fake item. If you are reading this it's a bug! (itypdef:apparatus)",
|
||||
'$', c_red, MNULL, MNULL, PNULL, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
// Drinks
|
||||
// Stim should be -8 to 8.
|
||||
// quench MAY be less than zero--salt water and liquor make you thirstier.
|
||||
// Thirst goes up by 1 every 5 minutes; so a quench of 12 lasts for 1 hour
|
||||
|
||||
// Any foods with a nutrition of lower than 5 will never prompt a 'You are full, force yourself to eat that?' message
|
||||
|
||||
#define DRINK(id, name,rarity,price,color,container,quench,nutr,spoils,stim,\
|
||||
healthy,addict,charges,fun,use_func,addict_func,des, item_flags) \
|
||||
itypes[id] = new it_comest(id,rarity,price,name,des,'~',\
|
||||
color,MNULL,LIQUID,2,1,0,0,0,item_flags,quench,nutr,spoils,stim,healthy,addict,charges,\
|
||||
fun,container,"null",use_func,addict_func,"DRINK");
|
||||
|
||||
#define FOOD(id, name, rarity,price,color,mat1,container,volume,weight,quench,\
|
||||
nutr,spoils,stim,healthy,addict,charges,fun,use_func,addict_func,des, item_flags) \
|
||||
itypes[id]=new it_comest(id,rarity,price,name,des,'%',\
|
||||
color,mat1,SOLID,volume,weight,0,0,0,item_flags, quench,nutr,spoils,stim,healthy,addict,charges,\
|
||||
fun,container,"null",use_func,addict_func,"FOOD");
|
||||
// FOOD
|
||||
|
||||
// MEDS
|
||||
#define MED(id, name,rarity,price,color,tool,mat,stim,healthy,addict,\
|
||||
charges,fun,use_func,addict_func,des) \
|
||||
itypes[id]=new it_comest(id,rarity,price,name,des,'!',\
|
||||
color,mat,SOLID,1,1,0,0,0,0,0,0,0,stim,healthy,addict,charges,\
|
||||
fun,"null",tool,use_func,addict_func,"MED");
|
||||
|
||||
/*MED("grack", "Grack Cocaine", 8,420, c_white, "apparatus",
|
||||
POWDER, 200, -2, 80, 4, 50,&iuse::grack, ADD_CRACK, "\
|
||||
Grack Cocaine, the strongest substance known to the multiverse\n\
|
||||
this potent substance is refined from the sweat of the legendary\n\
|
||||
gracken");
|
||||
*/
|
||||
|
||||
// MELEE WEAPONS
|
||||
// Only use secondary material if it will have a major impact.
|
||||
// dam is a somewhat rigid bonus--anything above 30, tops, is ridiculous
|
||||
// cut is even MORE rigid, and should be kept lower still
|
||||
// to_hit (affects chances of hitting) should be kept small, -5 to +5
|
||||
// Note that do-nothing objects (e.g. superglue) belong here too!
|
||||
#define MELEE(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,dam,cut,to_hit,\
|
||||
flags, des)\
|
||||
itypes[id]=new itype(id,rarity,price,name,des,sym,\
|
||||
color,mat1,mat2,SOLID,volume,wgt,dam,cut,to_hit,flags);
|
||||
'$', c_red, "null", "null", PNULL, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
#define VAR_VEH_PART(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,dam,cut,to_hit,\
|
||||
flags, bigmin, bigmax, bigaspect, des)\
|
||||
@@ -107,99 +63,62 @@ color,mat1,mat2,volume,wgt,dam,cut,to_hit,flags, bigmin, bigmax, bigaspect)
|
||||
|
||||
//"wheel", "wheel_wide", "wheel_bicycle", "wheel_motorbike", "wheel_small",
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, STEEL, PLASTIC,
|
||||
VAR_VEH_PART("wheel", "wheel", 10, 100, ']', c_dkgray, "steel", "plastic",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX BIGNESS_ASPECT
|
||||
40, 140, 12, 0, -1, 0, 13, 20, BIGNESS_WHEEL_DIAMETER, "\
|
||||
A car wheel");
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, STEEL, PLASTIC,
|
||||
VAR_VEH_PART("wheel_wide", "wide wheel", 4, 340, ']', c_dkgray, "steel", "plastic",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
70, 260, 17, 0, -1, 0, 17, 36, BIGNESS_WHEEL_DIAMETER, "\
|
||||
A wide wheel. \\o/ This wide.");
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, STEEL, PLASTIC,
|
||||
VAR_VEH_PART("wheel_bicycle", "bicycle wheel", 18, 40, ']', c_dkgray, "steel", "plastic",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
28, 45, 8, 0, -1, 0, 9, 18, BIGNESS_WHEEL_DIAMETER, "\
|
||||
A bicycle wheel");
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, STEEL, PLASTIC,
|
||||
VAR_VEH_PART("wheel_motorbike", "motorbike wheel", 13, 140, ']', c_dkgray, "steel", "plastic",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
33, 85, 10, 0, -1, 0, 9, 14, BIGNESS_WHEEL_DIAMETER, "\
|
||||
A motorbike wheel");
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, STEEL, PLASTIC,
|
||||
VAR_VEH_PART("wheel_small", "small wheel", 5, 140, ']', c_dkgray, "steel", "plastic",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
9, 42, 10, 0, -1, 0, 6, 14, BIGNESS_WHEEL_DIAMETER, "\
|
||||
A pretty small wheel. Probably from one of those segway things.\
|
||||
It is not very menacing.");
|
||||
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, IRON, MNULL,
|
||||
VAR_VEH_PART("1cyl_combustion", "1-cylinder engine", 3, 100, ':', c_ltcyan, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS 0BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
6, 70, 4, 0, -1, 0, 28, 75, BIGNESS_ENGINE_DISPLACEMENT, "\
|
||||
A single-cylinder 4-stroke combustion engine.");
|
||||
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, IRON, MNULL,
|
||||
VAR_VEH_PART("v2_combustion", "V-twin engine", 2, 100, ':', c_ltcyan, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
6, 70, 4, 0, -1, 0, 65, 260, BIGNESS_ENGINE_DISPLACEMENT, "\
|
||||
A 2-cylinder 4-stroke combustion engine.");
|
||||
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, IRON, MNULL,
|
||||
VAR_VEH_PART("i4_combustion", "Inline-4 engine", 6, 150, ':', c_ltcyan, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
6, 160, 8, 0, -2, 0, 220, 350, BIGNESS_ENGINE_DISPLACEMENT, "\
|
||||
A small, yet powerful 4-cylinder combustion engine.");
|
||||
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, IRON, MNULL,
|
||||
VAR_VEH_PART("v6_combustion", "V6 engine", 3, 180, ':', c_ltcyan, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
14, 400, 12, 0, -3, 0, 250, 520, BIGNESS_ENGINE_DISPLACEMENT, "\
|
||||
A powerful 6-cylinder combustion engine.");
|
||||
|
||||
// NAME RAR PRC SYM COLOR MAT1 MAT2
|
||||
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, IRON, MNULL,
|
||||
VAR_VEH_PART("v8_combustion", "V8 engine", 2, 250, ':', c_ltcyan, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS BIGNESS_MIN BIGNESS_MAX ASPECT
|
||||
25, 600, 15, 0, -5, 0, 380, 700, BIGNESS_ENGINE_DISPLACEMENT, "\
|
||||
A large and very powerful 8-cylinder combustion engine.");
|
||||
|
||||
// ARMOR
|
||||
#define ARMOR(id, name, rarity,price,color,mat1,mat2,volume,wgt,dam,to_hit,\
|
||||
encumber,dmg_resist,cut_resist,env,warmth,storage,covers,des,item_flags)\
|
||||
itypes[id]=new it_armor(id, rarity,price,name,des,'[',\
|
||||
color,mat1,mat2,volume,wgt,dam,0,to_hit,item_flags,covers,encumber,dmg_resist,cut_resist,\
|
||||
env,warmth,storage)
|
||||
|
||||
#define POWER_ARMOR(id, name,rarity,price,color,mat1,mat2,volume,wgt,dam,to_hit,\
|
||||
encumber,dmg_resist,cut_resist,env,warmth,storage,covers,des)\
|
||||
itypes[id] = new it_armor(id,rarity,price,name,des,'[',\
|
||||
color,mat1,mat2,volume,wgt,dam,0,to_hit,0,covers,encumber,dmg_resist,cut_resist,\
|
||||
env,warmth,storage,true)
|
||||
|
||||
// AMMUNITION
|
||||
// Material should be the wrapper--even though shot is made of iron, because
|
||||
// it can survive a dip in water and be okay, its material here is PLASTIC.
|
||||
// dmg is damage done, in an average hit. Note that the average human has
|
||||
// 80 health. Headshots do 8x damage; vital hits do 2x-4x; glances do 0x-1x.
|
||||
// Weight and price is per 100 rounds.
|
||||
// AP is a reduction in the armor of the target.
|
||||
// Accuracy is in quarter-degrees, and measures the maximum this ammo will
|
||||
// contribute to the angle of difference. HIGH ACC IS BAD.
|
||||
// Recoil is cumulative between shots. 4 recoil = 1 accuracy.
|
||||
// IMPORTANT: If adding a new AT_*** ammotype, add it to the ammo_name function
|
||||
// at the end of this file.
|
||||
#define AMMO(id, name,rarity,price,ammo_type,color,mat,volume,wgt,dmg,AP,range,\
|
||||
accuracy,recoil,count,des,effects) \
|
||||
itypes[id]=new it_ammo(id,rarity,price,name,des,'=',\
|
||||
color,mat,SOLID,volume,wgt,1,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,count);
|
||||
|
||||
// FUEL
|
||||
// Fuel is just a special type of ammo; liquid
|
||||
#define FUEL(id, name,rarity,price,ammo_type,color,dmg,AP,range,accuracy,recoil,\
|
||||
count,des,effects) \
|
||||
itypes[id]=new it_ammo(id,rarity,price,name,des,'~',\
|
||||
color,MNULL,LIQUID,1,1,0,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,count)
|
||||
|
||||
// GUNS
|
||||
// ammo_type matches one of the ammo_types above.
|
||||
// dmg is ADDED to the damage of the corresponding ammo. +/-, should be small.
|
||||
@@ -209,60 +128,11 @@ color,MNULL,LIQUID,1,1,0,0,0,effects,ammo_type,dmg,AP,accuracy,recoil,range,coun
|
||||
// clip is how many shots we get before reloading.
|
||||
|
||||
#define GUN(id,name,rarity,price,color,mat1,mat2,skill,ammo,volume,wgt,melee_dam,\
|
||||
to_hit,dmg,range,accuracy,recoil,durability,burst,clip,reload_time,des,flags) \
|
||||
to_hit,dmg,range,dispersion,recoil,durability,burst,clip,reload_time,des) \
|
||||
itypes[id]=new it_gun(id,rarity,price,name,des,'(',\
|
||||
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,flags,skill,ammo,dmg,range,accuracy,\
|
||||
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,skill,ammo,dmg,range,dispersion,\
|
||||
recoil,durability,burst,clip,reload_time)
|
||||
|
||||
// GUN MODS
|
||||
// Accuracy is inverted from guns; high values are a bonus, low values a penalty
|
||||
// The clip modification is a percentage of the original clip size.
|
||||
// The final variable is a bitfield of acceptable ammo types. Using 0 means
|
||||
// that any ammo type is acceptable (so long as the mod works on the class of
|
||||
// gun)
|
||||
#define GUNMOD(id, name, rare, value, color, mat1, mat2, volume, weight, meleedam,\
|
||||
meleecut, meleehit, acc, damage, loudness, clip, recoil, burst,\
|
||||
newtype, pistol, shotgun, smg, rifle, a_a_t, des, flags)\
|
||||
itypes[id]=new it_gunmod(id, rare, value, name, des, ':',\
|
||||
color, mat1, mat2, volume, weight, meleedam,\
|
||||
meleecut, meleehit, flags, acc, damage, loudness,\
|
||||
clip, recoil, burst, newtype, a_a_t, pistol,\
|
||||
shotgun, smg, rifle)
|
||||
|
||||
|
||||
// BOOKS
|
||||
// Try to keep colors consistant among types of books.
|
||||
// TYPE is the skill type required to read, or trained via reading; see skill.h
|
||||
// LEV is the skill level you can be brought to by this book; if your skill is
|
||||
// already at LEV or higher, you may enjoy the book but won't learn anything.
|
||||
// REQ is the skill level required to read this book, at all. If you lack the
|
||||
// required skill level, you'll waste 10 (?) turns then quit.
|
||||
// FUN is the fun had by reading;
|
||||
// INT is an intelligence requirement.
|
||||
// TIME is the time, in minutes (10 turns), taken to gain the fun/skill bonus.
|
||||
#define BOOK(id, name,rarity,price,color,mat1,mat2,volume,wgt,melee_dam,to_hit,\
|
||||
type,level,req,fun,intel,time,des) \
|
||||
itypes[id]=new it_book(id,rarity,price,name,des,'?',\
|
||||
color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,0,type,level,req,fun,intel,time)
|
||||
// NAME RAR PRC COLOR MAT1 MAT2
|
||||
|
||||
// CONTAINERS
|
||||
// These are containers you hold in your hand--ones you wear are _armor_!
|
||||
// These only have two attributes; contains, which is the volume it holds, and
|
||||
// the flags. There are only three flags, con_rigid, con_wtight and con_seals.
|
||||
// con_rigid is used if the item's total volume is constant.
|
||||
// Otherwise, its volume is calculated as VOL + volume of the contents
|
||||
// con_wtight is used if you can store liquids in this container
|
||||
// con_seals is used if it seals--this has many implications
|
||||
// * Won't spill
|
||||
// * Can be used as an icebox
|
||||
// * Others??
|
||||
#define CONT(id, name,rarity,price,color,mat1,mat2,volume,wgt,melee_dam,to_hit,\
|
||||
contains,flags,des) \
|
||||
itypes[id]=new it_container(id,rarity,price,name,des,\
|
||||
')',color,mat1,mat2,volume,wgt,melee_dam,0,to_hit,0,contains,flags)
|
||||
// NAME RAR PRC COLOR MAT1 MAT2
|
||||
|
||||
/* TOOLS
|
||||
* MAX is the maximum number of charges help.
|
||||
* DEF is the default number of charges--items will be generated with this
|
||||
@@ -270,7 +140,7 @@ itypes[id]=new it_container(id,rarity,price,name,des,\
|
||||
* USE is how many charges are used up when 'a'pplying the object.
|
||||
* SEC is how many turns will pass before a charge is drained if the item is
|
||||
* active; generally only used in the "<whatever> (on)" forms
|
||||
* FUEL is the type of charge the tool uses; set to AT_NULL if the item is
|
||||
* FUEL is the type of charge the tool uses; set to "NULL" if the item is
|
||||
* unable to be recharged.
|
||||
* REVERT is the item type that the tool will revert to once its charges are
|
||||
* drained
|
||||
@@ -280,268 +150,14 @@ itypes[id]=new it_container(id,rarity,price,name,des,\
|
||||
*/
|
||||
#define TOOL(id, name,rarity,price,sym,color,mat1,mat2,volume,wgt,melee_dam,\
|
||||
melee_cut,to_hit,max_charge,def_charge,charge_per_use,charge_per_sec,fuel,\
|
||||
revert,func,flags,des) \
|
||||
revert,func,des) \
|
||||
itypes[id]=new it_tool(id,rarity,price,name,des,sym,\
|
||||
color,mat1,mat2,SOLID,volume,wgt,melee_dam,melee_cut,to_hit,flags,max_charge,\
|
||||
color,mat1,mat2,SOLID,volume,wgt,melee_dam,melee_cut,to_hit,max_charge,\
|
||||
def_charge,charge_per_use,charge_per_sec,fuel,revert,func)
|
||||
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("suppressor", "suppressor", 15, 480, c_dkgray, STEEL, PLASTIC, 2, 1, 3, 0, 2,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
|
||||
-1, -4,-25, 0, 0, 0, AT_NULL, true, false, true, true,
|
||||
0, "\
|
||||
Using a suppressor is almost an imperative in zombie-infested regions. Gunfire\n\
|
||||
is very noisy, and will attract predators. Its only drawback is a reduced\n\
|
||||
muzzle velocity, resulting in less accuracy and damage.",
|
||||
0);
|
||||
|
||||
GUNMOD("grip", "enhanced grip", 12, 280, c_brown, STEEL, PLASTIC, 1, 1, 0, 0, -1,
|
||||
2, 0, 0, 0, -2, 0, AT_NULL, false, true, true, true,
|
||||
0, "\
|
||||
A grip placed forward on the barrel allows for greater control and accuracy.\n\
|
||||
Aside from increased weight, there are no drawbacks.",
|
||||
0);
|
||||
|
||||
GUNMOD("barrel_big", "barrel extension",10,400, c_ltgray, STEEL, MNULL, 4, 1, 5, 0, 2,
|
||||
6, 1, 0, 0, 5, 0, AT_NULL, false, false, true, true,
|
||||
0, "\
|
||||
A longer barrel increases the muzzle velocity of a firearm, contributing to\n\
|
||||
both accuracy and damage. However, the longer barrel tends to vibrate after\n\
|
||||
firing, greatly increasing recoil.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("barrel_small", "shortened barrel", 6, 320, c_ltgray, STEEL, MNULL, 1, 1, -2, 0, -1,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
|
||||
-5, 0, 2, 0, -6, 0, AT_NULL, false, false, true, true,
|
||||
0, "\
|
||||
A shortened barrel results in markedly reduced accuracy, and a minor increase\n\
|
||||
in noise, but also reduces recoil greatly as a result of the improved\n\
|
||||
managability of the firearm.",
|
||||
0);
|
||||
|
||||
GUNMOD("barrel_rifled", "rifled barrel", 5, 220, c_ltgray, STEEL, MNULL, 2, 1, 3, 0, 1,
|
||||
10,-20, 0, 0, 0, -1, AT_NULL, false, true, false, false,
|
||||
0, "\
|
||||
Rifling a shotgun barrel is mainly done in order to improve its accuracy when\n\
|
||||
firing slugs. The rifling makes the gun less suitable for shot, however.",
|
||||
0);
|
||||
|
||||
GUNMOD("clip", "extended magazine", 8, 560, c_ltgray, STEEL, PLASTIC, 1, 1, -2, 0, -1,
|
||||
-1, 0, 0, 50, 0, 0, AT_NULL, true, true, true, true,
|
||||
0, "\
|
||||
Increases the ammunition capacity of your firearm by 50%, but the added bulk\n\
|
||||
reduces accuracy slightly.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("clip2", "double magazine", 4, 720, c_ltgray, STEEL, PLASTIC, 2, 2, 0, 0, 0,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
|
||||
-2, 0, 0,100, 2, 0, AT_NULL, false, true, true, true,
|
||||
0, "\
|
||||
Completely doubles the ammunition capacity of your firearm, but the added\n\
|
||||
bulk reduces accuracy and increases recoil.",
|
||||
0);
|
||||
|
||||
GUNMOD("spare_mag", "spare magazine", 15, 200, c_ltgray, STEEL, PLASTIC, 1, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, AT_NULL, true, true, true, true,
|
||||
0, "\
|
||||
A spare magazine you can keep on hand to make reloads faster, but must itself\n\
|
||||
be reloaded before it can be used again.",
|
||||
0);
|
||||
|
||||
GUNMOD("stablizer", "gyroscopic stablizer",4,680,c_blue, STEEL, PLASTIC, 3, 2, 0, 0, -3,
|
||||
2, -2, 0,-10, -8, 0, AT_NULL, false, false, true, true,
|
||||
0, "\
|
||||
An advanced unit that straps onto the side of your firearm and reduces\n\
|
||||
vibration, greatly reducing recoil and increasing accuracy. However, it also\n\
|
||||
takes up space in the magazine slot, reducing ammo capacity.",
|
||||
0);
|
||||
|
||||
GUNMOD("blowback", "rapid blowback", 3, 700, c_red, STEEL, PLASTIC, 0, 1, 0, 0, 0,
|
||||
-3, 0, 4, 0, 0, 6, AT_NULL, false, false, true, true,
|
||||
0, "\
|
||||
An improved blowback mechanism makes your firearm's automatic fire faster, at\n\
|
||||
the cost of reduced accuracy and increased noise.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("autofire", "auto-fire mechanism",2,650,c_red, STEEL, PLASTIC, 1, 2, 2, 0, -1,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
|
||||
-2, 0, 2, 0, 2, 3, AT_NULL, true, false, false, false,
|
||||
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)|mfb(AT_40)|mfb(AT_57)|mfb(AT_46)), "\
|
||||
A simple mechanism that converts a pistol to a fully-automatic weapon, with\n\
|
||||
a burst size of three rounds. However, it reduces accuracy, and increases\n\
|
||||
noise and recoil.",
|
||||
0);
|
||||
|
||||
GUNMOD("retool_9mm", "9mm caliber retool",3,420, c_green, STEEL, MNULL, 1, 1, 0, 0, -1,
|
||||
-1, 0, 0, 0, 0, 0, AT_9MM, true, false, true, false,
|
||||
(mfb(AT_38)|mfb(AT_40)|mfb(AT_44)|mfb(AT_45)), "\
|
||||
Replacing several key parts of a .38, .40, .44 or .45 firearm converts it to\n\
|
||||
a 9mm firearm. The conversion results in a slight reduction in accuracy.",
|
||||
0);
|
||||
|
||||
GUNMOD("retool_22", ".22 caliber retool",2,320, c_green, STEEL, MNULL, 1, 1, -2, 0, -1,
|
||||
-1, 0, 0, 0, 0, 0, AT_22, true, false, true, true,
|
||||
(mfb(AT_9MM)|mfb(AT_38)|mfb(AT_40)|mfb(AT_57)|mfb(AT_46)|mfb(AT_762)|
|
||||
mfb(AT_223)), "\
|
||||
Replacing several key parts of a 9mm, .38, .40, 5.7mm, 4.6mm, 7.62mm or .223\n\
|
||||
firearm converts it to a .22 firearm. The conversion results in a slight\n\
|
||||
reduction in accuracy.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("retool_57", "5.7mm caliber retool",1,460,c_green, STEEL, MNULL, 1, 1, -3, 0, -1,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE, PISTOL SHOT SMG RIFLE
|
||||
-1, 0, 0, 0, 0, 0, AT_57, true, false, true, false,
|
||||
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)), "\
|
||||
FN Hestal sells a conversion kit, used to convert .22, 9mm, or .38 firearms\n\
|
||||
to their proprietary 5.7x28mm, a round designed for accuracy and armor\n\
|
||||
penetration.",
|
||||
0);
|
||||
|
||||
GUNMOD("retool_46", "4.6mm caliber retool",1,460,c_green, STEEL, MNULL, 1, 1, -3, 0, -1,
|
||||
-1, 0, 0, 0, 0, 0, AT_46, true, false, true, false,
|
||||
(mfb(AT_22)|mfb(AT_9MM)|mfb(AT_38)), "\
|
||||
Heckler and Koch sells a conversion kit, used to convert .22, 9mm, or .38\n\
|
||||
firearms to their proprietary 4.6x30mm, a round designed for accuracy and\n\
|
||||
armor penetration.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("retool_308", ".308 caliber retool",2,520,c_green, STEEL, MNULL, 2, 1, 4, 0, 1,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
|
||||
-2, 0, 0,-20, 0, 0, AT_308, false, true, false, true,
|
||||
(mfb(AT_SHOT)|mfb(AT_762)|mfb(AT_223)|mfb(AT_3006)), "\
|
||||
This kit is used to convert a shotgun or 7.62mm, .223 or .30-06 rifle to the\n\
|
||||
popular and powerful .308 caliber. The conversion results in reduced ammo\n\
|
||||
capacity and a slight reduction in accuracy.",
|
||||
0);
|
||||
|
||||
GUNMOD("retool_223", ".223 caliber retool",2,500,c_green, STEEL, MNULL, 2, 1, 4, 0, 1,
|
||||
-2, 0, 0,-10, 0, 0, AT_223, false, true, false, true,
|
||||
(mfb(AT_SHOT)|mfb(AT_762)|mfb(AT_3006)|mfb(AT_308)), "\
|
||||
This kit is used to convert a shotgun or 7.62mm, .30-06, or .308 rifle to the\n\
|
||||
popular, accurate, and damaging .223 caliber. The conversion results in\n\
|
||||
slight reductions in both accuracy and ammo capacity.",
|
||||
0);
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("conversion_battle", "battle rifle conversion",1,680,c_magenta,STEEL,MNULL, 4, 3, 6, 0, -1,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
|
||||
-6, 6, 4, 20, 4, 4, AT_NULL, false, false, false, true,
|
||||
0, "\
|
||||
This is a complete conversion kit, designed to turn a rifle into a powerful\n\
|
||||
battle rifle. It reduces accuracy, and increases noise and recoil, but also\n\
|
||||
increases damage, ammo capacity, and fire rate.",
|
||||
0);
|
||||
|
||||
GUNMOD("conversion_sniper", "sniper conversion",1,660, c_green, STEEL, MNULL, 1, 2, 0, 0, -1,
|
||||
10, 8, 3,-15, 0,-99, AT_NULL, false, false, false, true,
|
||||
0, "\
|
||||
This is a complete conversion kit, designed to turn a rifle into a deadly\n\
|
||||
sniper rifle. It decreases ammo capacity, and removes any automatic fire\n\
|
||||
capabilities, but also increases accuracy and damage.",
|
||||
0);
|
||||
|
||||
GUNMOD("m203", "M203", 2,650, c_ltred, STEEL, MNULL, 2, 1, 2, 0, -1,
|
||||
-2, 0, 0, 1, 0, 0, AT_40MM, false, false, false, true,
|
||||
0, "\
|
||||
The M203 was originally designed for use with M16 variants but today can be\n\
|
||||
attached to almost any rifle. It allows a single 40mm grenade to be loaded\n\
|
||||
and fired.",
|
||||
mfb(IF_MODE_AUX));
|
||||
|
||||
// NAME RAR PRC COLOR MAT1 MAT2 VOL WGT DAM CUT HIT
|
||||
GUNMOD("bayonet", "bayonet", 6, 400, c_ltcyan, STEEL, MNULL, 2, 2, 0, 16, -3,
|
||||
// ACC DAM NOI CLP REC BST NEWTYPE PISTOL SHOT SMG RIFLE
|
||||
0, 0, 0, 0, 3, 0, AT_NULL, false, true, true, true,
|
||||
0, "\
|
||||
A bayonet is a stabbing weapon that can be attached to the front of a\n\
|
||||
shotgun, sub-machinegun or rifle, allowing a melee attack to deal\n\
|
||||
piercing damage. The added length increases recoil slightly.",
|
||||
mfb(IF_STAB));
|
||||
|
||||
GUNMOD("u_shotgun", "underslung shotgun", 2,650, c_ltred, STEEL, MNULL, 2, 1, 2, 0, -1,
|
||||
-2, 0, 0, 2, 0, 0, AT_SHOT, false, false, false, true,
|
||||
0, "\
|
||||
A miniaturized shotgun with 2 barrels, which can be mounted under the\n\
|
||||
barrel of many rifles. It allows two shotgun shells to be loaded and fired.",
|
||||
mfb(IF_MODE_AUX));
|
||||
|
||||
GUNMOD("gun_crossbow", "rail-mounted crossbow", 2, 500, c_ltred, STEEL, WOOD, 2, 1, 2, 0, -1,
|
||||
0, 0, 0, 1, 0, 0, AT_BOLT, false, true, false, true,
|
||||
0, "\
|
||||
A kit to attach a pair of crossbow arms and a firing rail to\n\
|
||||
the barrel of a long firearm. It allows crossbow bolts to be fired.",
|
||||
mfb(IF_MODE_AUX)|mfb(IF_STR_RELOAD));
|
||||
|
||||
CONT("bag_plastic", "plastic bag", 50, 1, c_ltgray, PLASTIC,MNULL,
|
||||
// VOL WGT DAM HIT VOL FLAGS
|
||||
1, 0, -8, -4, 24, 0, "\
|
||||
A small, open plastic bag. Essentially trash.");
|
||||
|
||||
CONT("bottle_plastic", "plastic bottle", 70, 8, c_ltcyan, PLASTIC,MNULL,
|
||||
2, 0, -8, 1, 2, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A resealable plastic bottle, holds 500mls of liquid.");
|
||||
|
||||
CONT("bottle_glass", "glass bottle", 70, 12, c_cyan, GLASS, MNULL,
|
||||
3, 2, 8, 1, 3, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A resealable glass bottle, holds 750mls of liquid.");
|
||||
|
||||
CONT("can_drink", "aluminum can", 70, 1, c_ltblue, STEEL, MNULL,
|
||||
1, 0, 0, 0, 1, mfb(con_rigid)|mfb(con_wtight), "\
|
||||
An aluminum can, like what soda comes in.");
|
||||
|
||||
CONT("can_food", "tin can", 65, 2, c_blue, IRON, MNULL,
|
||||
1, 0, -1, 1, 1, mfb(con_rigid)|mfb(con_wtight), "\
|
||||
A tin can, like what beans come in.");
|
||||
|
||||
CONT("box_small", "sm. cardboard box",50, 0, c_brown, PAPER, MNULL,
|
||||
4, 0, -5, 1, 4, mfb(con_rigid), "\
|
||||
A small cardboard box. No bigger than a foot in any dimension.");
|
||||
|
||||
CONT("canteen", "plastic canteen", 20, 1000, c_green, PLASTIC,MNULL,
|
||||
6, 2, -8, 1, 6, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A large military-style water canteen, with a 1.5 liter capacity and strap.");
|
||||
|
||||
CONT("jerrycan", "plastic jerrycan", 10, 2500, c_green, PLASTIC,MNULL,
|
||||
40, 4, -2, -2, 40, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A bulky plastic jerrycan, meant to carry fuel, but can carry other liquids\n\
|
||||
in a pinch. It has a capacity of 10 liters.");
|
||||
|
||||
CONT("jug_plastic", "gallon jug", 10, 2500, c_ltcyan, PLASTIC,MNULL,
|
||||
10, 2, -8, 1, 10, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A standard plastic jug used for household cleaning chemicals.");
|
||||
|
||||
CONT("flask_glass", "glass flask", 10, 2500, c_ltcyan, GLASS,MNULL,
|
||||
1, 0, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A 250 ml laboratory conical flask, with a rubber bung.");
|
||||
|
||||
CONT("waterskin", "waterskin", 0, 0, c_brown, LEATHER, MNULL,
|
||||
// VOL WGT DAM HIT VOL FLAGS
|
||||
6, 4, -8, -5, 6, mfb(con_wtight)|mfb(con_seals), "\
|
||||
A watertight leather bag, can hold 1.5 liters of water.");
|
||||
|
||||
CONT("jerrycan_big", "steel jerrycan", 20, 5000, c_green, STEEL, MNULL,
|
||||
100, 7, -3, -3, 100, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A steel jerrycan, meant to carry fuel, but can carry other liquds\n\
|
||||
in a pinch. It has a capacity of 25 liters.");
|
||||
|
||||
CONT("keg", "aluminum keg", 20, 6000, c_ltcyan, STEEL, MNULL,
|
||||
200, 12, -4, -4, 200, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A reusable aluminum keg, used for shipping beer.\n\
|
||||
It has a capcity of 50 liters.");
|
||||
|
||||
CONT("jar_glass", "glass jar", 50, 2500, c_ltcyan, GLASS,MNULL,
|
||||
1, 1, 8, 1, 1, mfb(con_rigid)|mfb(con_wtight)|mfb(con_seals),"\
|
||||
A half-litre glass jar with a metal screw top lid, used for canning.");
|
||||
|
||||
TOOL("jack", "jack", 30, 86, ';', c_ltgray, IRON, MNULL,
|
||||
TOOL("jack", "jack", 30, 86, ';', c_ltgray, "iron", "null",
|
||||
// VOL WGT DAM CUT HIT FLAGS
|
||||
5, 10, 11, 0, 2, 0, 0, 0, 0, AT_NULL, "null", &iuse::none, 0, "\
|
||||
5, 10, 11, 0, 2, 0, 0, 0, 0, "NULL", "null", &iuse::none, "\
|
||||
A common hydraulic jack, used when changing tires.");
|
||||
|
||||
// BIONICS
|
||||
@@ -550,11 +166,11 @@ A common hydraulic jack, used when changing tires.");
|
||||
// list of options.
|
||||
#define BIO(id, name, rarity, price, color, difficulty, des) \
|
||||
itypes[id]=new it_bionic(id, rarity,price,name,des,':',\
|
||||
color, STEEL, PLASTIC, 10, 18, 8, 0, 0, 0, difficulty)
|
||||
color, "steel", "plastic", 10, 18, 8, 0, 0, difficulty)
|
||||
|
||||
#define BIO_SINGLE(id,rarity,price,color,difficulty) \
|
||||
BIO(id, std::string("CBM: ")+bionics[id]->name, rarity,price,color,difficulty, \
|
||||
word_rewrap(bionics[id]->description, 50)) \
|
||||
bionics[id]->description) \
|
||||
|
||||
// Name RAR PRICE COLOR DIFFICULTY
|
||||
BIO("bio_power_storage", "CBM: Power Storage", 24, 3800, c_green, 1, "\
|
||||
@@ -570,13 +186,13 @@ by 10 units."); // This is another special case, increases power capacity by 10
|
||||
// SOFTWARE
|
||||
#define SOFTWARE(id, name, price, swtype, power, description) \
|
||||
itypes[id]=new it_software(id, 0, price, name, description,\
|
||||
' ', c_white, MNULL, MNULL, 0, 0, 0, 0, 0, 0, swtype, power)
|
||||
' ', c_white, "null", "null", 0, 0, 0, 0, 0, swtype, power)
|
||||
|
||||
//Macguffins
|
||||
#define MACGUFFIN(id, name, price, sym, color, mat1, mat2, volume, wgt, dam, cut,\
|
||||
to_hit, readable, function, description) \
|
||||
itypes[id]=new it_macguffin(id, 0, price, name, description,\
|
||||
sym, color, mat1, mat2, volume, wgt, dam, cut, to_hit, 0, readable,\
|
||||
sym, color, mat1, mat2, volume, wgt, dam, cut, to_hit, readable,\
|
||||
function)
|
||||
|
||||
// BIONIC IMPLANTS
|
||||
@@ -628,6 +244,7 @@ BIO_SINGLE("bio_water_extractor", 3, 5500, c_green, 5);
|
||||
BIO_SINGLE("bio_shock", 2, 5500, c_red, 5);
|
||||
BIO_SINGLE("bio_heat_absorb", 2, 5500, c_red, 5);
|
||||
BIO_SINGLE("bio_claws", 2, 5500, c_red, 5);
|
||||
BIO_SINGLE("bio_shockwave", 2, 5500, c_red, 5);
|
||||
// armor:
|
||||
BIO_SINGLE("bio_carbon", 3, 7500, c_cyan, 9);
|
||||
BIO_SINGLE("bio_armor_head", 3, 3500, c_cyan, 5);
|
||||
@@ -638,7 +255,8 @@ BIO_SINGLE("bio_armor_legs", 3, 3500, c_cyan, 3);
|
||||
BIO_SINGLE("bio_face_mask", 1, 8500, c_magenta, 5);
|
||||
BIO_SINGLE("bio_scent_mask", 1, 8500, c_magenta, 5);
|
||||
BIO_SINGLE("bio_cloak", 1, 8500, c_magenta, 5);
|
||||
BIO_SINGLE("bio_fingerhack", 1, 3500, c_magenta, 2);
|
||||
BIO_SINGLE("bio_fingerhack", 1, 3500, c_magenta, 2);
|
||||
BIO_SINGLE("bio_night", 1, 8500, c_magenta, 5);
|
||||
// defensive
|
||||
BIO_SINGLE("bio_ads", 1, 9500, c_ltblue, 7);
|
||||
BIO_SINGLE("bio_ods", 1, 9500, c_ltblue, 7);
|
||||
@@ -650,13 +268,18 @@ BIO_SINGLE("bio_resonator", 2, 12000, c_dkgray, 11);
|
||||
BIO_SINGLE("bio_hydraulics", 3, 4000, c_dkgray, 6);
|
||||
// super soldier
|
||||
BIO_SINGLE("bio_time_freeze", 1, 14000, c_white, 11);
|
||||
BIO_SINGLE("bio_teleport", 1, 7000, c_white, 7);
|
||||
BIO_SINGLE("bio_teleport", 1, 7000, c_white, 7);
|
||||
BIO_SINGLE("bio_probability_travel", 1, 14000, c_white, 11);
|
||||
// ranged combat
|
||||
BIO_SINGLE("bio_blaster", 13, 2200, c_red, 3);
|
||||
BIO_SINGLE("bio_laser", 2, 7200, c_red, 5);
|
||||
BIO_SINGLE("bio_emp", 2, 7200, c_red, 5);
|
||||
BIO_SINGLE("bio_emp", 2, 7200, c_red, 5);
|
||||
BIO_SINGLE("bio_flashbang", 2, 7200, c_red, 5);
|
||||
BIO_SINGLE("bio_railgun", 5, 2200, c_red, 3);
|
||||
BIO_SINGLE("bio_chain_lightning", 5, 2200, c_red, 3);
|
||||
// power armor
|
||||
BIO_SINGLE("bio_power_armor_interface", 20, 1200, c_yellow, 1);
|
||||
BIO_SINGLE("bio_power_armor_interface_mkII", 8, 10000, c_yellow, 8);
|
||||
|
||||
SOFTWARE("software_useless", "misc software", 300, SW_USELESS, 0, "\
|
||||
A miscellaneous piece of hobby software. Probably useless.");
|
||||
@@ -673,13 +296,13 @@ A piece of mathematical software.");
|
||||
SOFTWARE("software_blood_data", "infection data", 200, SW_DATA, 5, "\
|
||||
Medical data on zombie blood.");
|
||||
|
||||
MACGUFFIN("note", "note", 0, '?', c_white, PAPER, MNULL, 1, 0, 0, 0, 0,
|
||||
MACGUFFIN("note", "note", 0, '?', c_white, "paper", "null", 1, 0, 0, 0, 0,
|
||||
true, &iuse::mcg_note, "\
|
||||
A hand-written paper note.");
|
||||
|
||||
#define STATIONARY(id, name, rarity, price, category, description) \
|
||||
itypes[id] = new it_stationary(id, rarity, price, name, description,\
|
||||
',', c_white, PAPER, MNULL, 0, 0, 0, 0, 0, 0, category)
|
||||
',', c_white, "paper", "null", 0, 0, 0, 0, 0, category)
|
||||
|
||||
STATIONARY("flyer", "flyer", 5, 1, "flier", "A scrap of paper.");
|
||||
|
||||
@@ -692,28 +315,26 @@ for(std::map<std::string,itype*>::iterator iter = itypes.begin(); iter != itypes
|
||||
}
|
||||
}
|
||||
|
||||
// NAME RARE TYPE COLOR MAT
|
||||
AMMO("bio_fusion_ammo", "Fusion blast", 0,0, AT_FUSION,c_dkgray, MNULL,
|
||||
// VOL WGT DMG AP RNG ACC REC COUNT
|
||||
0, 0, 40, 0, 10, 1, 0, 5, "", mfb(AMMO_INCENDIARY));
|
||||
|
||||
// NAME RARE COLOR MAT1 MAT2
|
||||
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, STEEL, PLASTIC,
|
||||
GUN("bio_blaster_gun", "fusion blaster", 0,0,c_magenta, "steel", "plastic",
|
||||
// SKILL AMMO VOL WGT MDG HIT DMG RNG ACC REC DUR BST CLIP REL
|
||||
"rifle", AT_FUSION, 12, 0, 0, 0, 0, 0, 4, 0, 10, 0, 1, 500,
|
||||
"",0);
|
||||
|
||||
|
||||
|
||||
|
||||
"rifle", "fusion", 12, 0, 0, 0, 0, 0, 4, 0, 10, 0, 1, 500,
|
||||
"");
|
||||
|
||||
// NAME RARE COLOR MAT1 MAT2
|
||||
GUN("bio_lightning", "Chain Lightning", 0,0,c_magenta, "steel", "plastic",
|
||||
// SKILL AMMO VOL WGT MDG HIT DMG RNG ACC REC DUR BST CLIP REL
|
||||
"rifle", "fusion", 12, 0, 0, 0, 0, 0, 4, 0, 10, 1, 10, 500,
|
||||
"");
|
||||
|
||||
|
||||
// Unarmed Styles
|
||||
// TODO: refactor handling of styles see #1771
|
||||
#define STYLE(id, name, dam, description, ...) \
|
||||
itypes[id]=new it_style(id, 0, 0, name, description, '$', \
|
||||
c_white, MNULL, MNULL, 0, 0, dam, 0, 0, 0); \
|
||||
c_white, "null", "null", 0, 0, dam, 0, 0); \
|
||||
setvector(&((static_cast<it_style*>(itypes[id])))->moves, __VA_ARGS__, NULL); \
|
||||
itypes[id]->item_flags |= mfb(IF_UNARMED_WEAPON); \
|
||||
itypes[id]->item_tags.insert("UNARMED_WEAPON"); \
|
||||
martial_arts_itype_ids.push_back(id)
|
||||
|
||||
STYLE("style_karate", "karate", 2, "\
|
||||
@@ -930,73 +551,69 @@ attacks with no penalty.",
|
||||
|
||||
std::string ammo_name(ammotype t)
|
||||
{
|
||||
switch (t) {
|
||||
case AT_NAIL: return "nails";
|
||||
case AT_BB: return "BBs";
|
||||
case AT_BOLT: return "bolts";
|
||||
case AT_ARROW: return "arrows";
|
||||
case AT_PEBBLE: return "pebbles";
|
||||
case AT_SHOT: return "shot";
|
||||
case AT_22: return ".22";
|
||||
case AT_9MM: return "9mm";
|
||||
case AT_762x25: return "7.62x25mm";
|
||||
case AT_38: return ".38";
|
||||
case AT_40: return ".40";
|
||||
case AT_44: return ".44";
|
||||
case AT_45: return ".45";
|
||||
case AT_57: return "5.7mm";
|
||||
case AT_46: return "4.6mm";
|
||||
case AT_762: return "7.62x39mm";
|
||||
case AT_223: return ".223";
|
||||
case AT_3006: return ".30-06";
|
||||
case AT_308: return ".308";
|
||||
case AT_40MM: return "40mm grenade";
|
||||
case AT_66MM: return "High Explosive Anti Tank Warhead";
|
||||
case AT_GAS: return "gasoline";
|
||||
case AT_THREAD: return "thread";
|
||||
case AT_BATT: return "batteries";
|
||||
case AT_PLUT: return "plutonium";
|
||||
case AT_MUSCLE: return "Muscle";
|
||||
case AT_FUSION: return "fusion cell";
|
||||
case AT_12MM: return "12mm slugs";
|
||||
case AT_PLASMA: return "hydrogen";
|
||||
case AT_WATER: return "clean water";
|
||||
default: return "XXX";
|
||||
}
|
||||
if( t == "nail") return "nails";
|
||||
if( t == "BB" ) return "BBs";
|
||||
if( t == "bolt" ) return "bolts";
|
||||
if( t == "arrow" ) return "arrows";
|
||||
if( t == "pebble" )return "pebbles";
|
||||
if( t == "shot" ) return "shot";
|
||||
if( t == "22" ) return ".22";
|
||||
if( t == "9mm" ) return "9mm";
|
||||
if( t == "762x25" )return "7.62x25mm";
|
||||
if( t == "38" ) return ".38";
|
||||
if( t == "40" ) return ".40";
|
||||
if( t == "44" ) return ".44";
|
||||
if( t == "45" ) return ".45";
|
||||
if( t == "57" ) return "5.7mm";
|
||||
if( t == "46" ) return "4.6mm";
|
||||
if( t == "762" ) return "7.62x39mm";
|
||||
if( t == "223" ) return ".223";
|
||||
if( t == "3006" ) return ".30-06";
|
||||
if( t == "308" ) return ".308";
|
||||
if( t == "40mm" ) return "40mm grenade";
|
||||
if( t == "66mm" ) return "High Explosive Anti Tank Warhead";
|
||||
if( t == "gasoline" ) return "gasoline";
|
||||
if( t == "THREAD" )return "thread";
|
||||
if( t == "battery" ) return "batteries";
|
||||
if( t == "plutonium" ) return "plutonium";
|
||||
if( t == "muscle" )return "Muscle";
|
||||
if( t == "fusion" )return "fusion cell";
|
||||
if( t == "12mm" ) return "12mm slugs";
|
||||
if( t == "plasma" )return "hydrogen";
|
||||
if( t == "water" )return "clean water";
|
||||
return "XXX";
|
||||
}
|
||||
|
||||
itype_id default_ammo(ammotype guntype)
|
||||
{
|
||||
switch (guntype) {
|
||||
case AT_NAIL: return "nail";
|
||||
case AT_BB: return "bb";
|
||||
case AT_BOLT: return "bolt_wood";
|
||||
case AT_ARROW: return "arrow_wood";
|
||||
case AT_PEBBLE:return "pebble";
|
||||
case AT_SHOT: return "shot_00";
|
||||
case AT_22: return "22_lr";
|
||||
case AT_9MM: return "9mm";
|
||||
case AT_762x25:return "762_25";
|
||||
case AT_38: return "38_special";
|
||||
case AT_40: return "10mm";
|
||||
case AT_44: return "44magnum";
|
||||
case AT_45: return "45_acp";
|
||||
case AT_57: return "57mm";
|
||||
case AT_46: return "46mm";
|
||||
case AT_762: return "762_m43";
|
||||
case AT_223: return "223";
|
||||
case AT_308: return "308";
|
||||
case AT_3006: return "270";
|
||||
case AT_40MM: return "40mm_concussive";
|
||||
case AT_66MM: return "66mm_HEAT";
|
||||
case AT_BATT: return "battery";
|
||||
case AT_FUSION:return "laser_pack";
|
||||
case AT_12MM: return "12mm";
|
||||
case AT_PLASMA:return "plasma";
|
||||
case AT_PLUT: return "plut_cell";
|
||||
case AT_GAS: return "gasoline";
|
||||
case AT_THREAD:return "thread";
|
||||
case AT_WATER:return "water_clean";
|
||||
}
|
||||
return "null";
|
||||
if( guntype == "nail" ) return "nail";
|
||||
if( guntype == "BB" ) return "bb";
|
||||
if( guntype == "bolt" ) return "bolt_wood";
|
||||
if( guntype == "arrow" ) return "arrow_wood";
|
||||
if( guntype == "pebble" )return "pebble";
|
||||
if( guntype == "shot" ) return "shot_00";
|
||||
if( guntype == "22" ) return "22_lr";
|
||||
if( guntype == "9mm" ) return "9mm";
|
||||
if( guntype == "762x25" )return "762_25";
|
||||
if( guntype == "38" ) return "38_special";
|
||||
if( guntype == "40" ) return "10mm";
|
||||
if( guntype == "44" ) return "44magnum";
|
||||
if( guntype == "45" ) return "45_acp";
|
||||
if( guntype == "57" ) return "57mm";
|
||||
if( guntype == "46" ) return "46mm";
|
||||
if( guntype == "762" ) return "762_m43";
|
||||
if( guntype == "223" ) return "223";
|
||||
if( guntype == "308" ) return "308";
|
||||
if( guntype == "3006" ) return "270";
|
||||
if( guntype == "40mm" ) return "40mm_concussive";
|
||||
if( guntype == "66mm" ) return "66mm_HEAT";
|
||||
if( guntype == "battery" ) return "battery";
|
||||
if( guntype == "fusion" )return "laser_pack";
|
||||
if( guntype == "12mm" ) return "12mm";
|
||||
if( guntype == "plasma" )return "plasma";
|
||||
if( guntype == "plutonium" ) return "plut_cell";
|
||||
if( guntype == "gasoline" ) return "gasoline";
|
||||
if( guntype == "THREAD" )return "thread";
|
||||
if( guntype == "water" ) return "water_clean";
|
||||
return "null";
|
||||
}
|
||||
|
||||
@@ -18,14 +18,11 @@ class iuse
|
||||
void royal_jelly (game *g, player *p, item *it, bool t);
|
||||
void bandage (game *g, player *p, item *it, bool t);
|
||||
void firstaid (game *g, player *p, item *it, bool t);
|
||||
void disinfectant (game *g, player *p, item *it, bool t);
|
||||
void caff (game *g, player *p, item *it, bool t);
|
||||
void alcohol (game *g, player *p, item *it, bool t);
|
||||
void alcohol_weak (game *g, player *p, item *it, bool t);
|
||||
void pkill_1 (game *g, player *p, item *it, bool t);
|
||||
void pkill_2 (game *g, player *p, item *it, bool t);
|
||||
void pkill_3 (game *g, player *p, item *it, bool t);
|
||||
void pkill_4 (game *g, player *p, item *it, bool t);
|
||||
void pkill_l (game *g, player *p, item *it, bool t);
|
||||
void pkill (game *g, player *p, item *it, bool t);
|
||||
void xanax (game *g, player *p, item *it, bool t);
|
||||
void cig (game *g, player *p, item *it, bool t);
|
||||
void antibiotic (game *g, player *p, item *it, bool t);
|
||||
@@ -34,6 +31,8 @@ class iuse
|
||||
void crack (game *g, player *p, item *it, bool t);
|
||||
void grack (game *g, player *p, item *it, bool t);
|
||||
void meth (game *g, player *p, item *it, bool t);
|
||||
void vitamins (game *g, player *p, item *it, bool t);
|
||||
void vaccine (game *g, player *p, item *it, bool t);
|
||||
void poison (game *g, player *p, item *it, bool t);
|
||||
void hallu (game *g, player *p, item *it, bool t);
|
||||
void thorazine (game *g, player *p, item *it, bool t);
|
||||
@@ -45,7 +44,6 @@ class iuse
|
||||
void inhaler (game *g, player *p, item *it, bool t);
|
||||
void blech (game *g, player *p, item *it, bool t);
|
||||
void mutagen (game *g, player *p, item *it, bool t);
|
||||
void mutagen_3 (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);
|
||||
@@ -60,11 +58,14 @@ class iuse
|
||||
void hammer (game *g, player *p, item *it, bool t);
|
||||
void light_off (game *g, player *p, item *it, bool t);
|
||||
void light_on (game *g, player *p, item *it, bool t);
|
||||
void gasoline_lantern_off (game *g, player *p, item *it, bool t);
|
||||
void gasoline_lantern_on (game *g, player *p, item *it, bool t);
|
||||
void lightstrip (game *g, player *p, item *it, bool t);
|
||||
void lightstrip_active(game *g, player *p, item *it, bool t);
|
||||
void glowstick (game *g, player *p, item *it, bool t);
|
||||
void glowstick_active(game *g, player *p, item *it, bool t);
|
||||
void cauterize_elec (game *g, player *p, item *it, bool t);
|
||||
void solder_weld (game *g, player *p, item *it, bool t);
|
||||
void water_purifier (game *g, player *p, item *it, bool t);
|
||||
void two_way_radio (game *g, player *p, item *it, bool t);
|
||||
void directional_antenna (game *g, player *p, item *it, bool t);
|
||||
@@ -76,9 +77,11 @@ class iuse
|
||||
void roadmap_a_target (game *g, player *p, item *it, bool t, int target);
|
||||
void roadmap_targets(game *g, player *p, item *it, bool t, int target, int target_range, int distance, int reveal_distance);
|
||||
void picklock (game *g, player *p, item *it, bool t);
|
||||
void improvised_picklock (game *g, player *p, item *it, bool t);
|
||||
void crowbar (game *g, player *p, item *it, bool t);
|
||||
void makemound (game *g, player *p, item *it, bool t);
|
||||
void dig (game *g, player *p, item *it, bool t);
|
||||
void siphon (game *g, player *p, item *it, bool t);
|
||||
void chainsaw_off (game *g, player *p, item *it, bool t);
|
||||
void chainsaw_on (game *g, player *p, item *it, bool t);
|
||||
void jackhammer (game *g, player *p, item *it, bool t);
|
||||
@@ -105,6 +108,7 @@ class iuse
|
||||
void smokebomb (game *g, player *p, item *it, bool t);
|
||||
void smokebomb_act (game *g, player *p, item *it, bool t);
|
||||
void acidbomb (game *g, player *p, item *it, bool t);
|
||||
void arrow_flamable (game *g, player *p, item *it, bool t);
|
||||
void acidbomb_act (game *g, player *p, item *it, bool t);
|
||||
void molotov (game *g, player *p, item *it, bool t);
|
||||
void molotov_lit (game *g, player *p, item *it, bool t);
|
||||
@@ -122,6 +126,8 @@ class iuse
|
||||
void turret (game *g, player *p, item *it, bool t);
|
||||
void UPS_off (game *g, player *p, item *it, bool t);
|
||||
void UPS_on (game *g, player *p, item *it, bool t);
|
||||
void adv_UPS_off (game *g, player *p, item *it, bool t);
|
||||
void adv_UPS_on (game *g, player *p, item *it, bool t);
|
||||
void tazer (game *g, player *p, item *it, bool t);
|
||||
void mp3 (game *g, player *p, item *it, bool t);
|
||||
void mp3_on (game *g, player *p, item *it, bool t);
|
||||
@@ -129,6 +135,7 @@ class iuse
|
||||
void dog_whistle (game *g, player *p, item *it, bool t);
|
||||
void vacutainer (game *g, player *p, item *it, bool t);
|
||||
void knife (game *g, player *p, item *it, bool t);
|
||||
static void cut_log_into_planks(game *g, player *p, item *it);
|
||||
void lumber (game *g, player *p, item *it, bool t);
|
||||
void hacksaw (game *g, player *p, item *it, bool t);
|
||||
void tent (game *g, player *p, item *it, bool t);
|
||||
@@ -148,7 +155,10 @@ class iuse
|
||||
void heatpack (game *g, player *p, item *it, bool t);
|
||||
void dejar (game *g, player *p, item *it, bool t);
|
||||
void devac (game *g, player *p, item *it, bool t);
|
||||
|
||||
void rad_badge (game *g, player *p, item *it, bool t);
|
||||
void boots (game *g, player *p, item *it, bool t);
|
||||
void towel (game *g, player *p, item *it, bool t);
|
||||
void unfold_bicycle (game *g, player *p, item *it, bool t);
|
||||
// MACGUFFINS
|
||||
void mcg_note (game *g, player *p, item *it, bool t);
|
||||
// ARTIFACTS
|
||||
|
||||
+5
-2
@@ -8,8 +8,8 @@ long input(long ch)
|
||||
ch = getch();
|
||||
}
|
||||
|
||||
// Needs a totally seperate implementation for windows
|
||||
#if !(defined _WIN32 || defined WINDOWS)
|
||||
// Our current tiles and Windows code doesn't have ungetch()
|
||||
#if !(defined TILES || defined _WIN32 || defined WINDOWS)
|
||||
int newch;
|
||||
|
||||
// Clear the buffer of characters that match the one we're going to act on.
|
||||
@@ -25,6 +25,7 @@ long input(long ch)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
switch (ch) {
|
||||
case KEY_UP: return 'k';
|
||||
case KEY_LEFT: return 'h';
|
||||
@@ -219,6 +220,7 @@ select_fire_mode F\n\
|
||||
drop d\n\
|
||||
drop_adj D\n\
|
||||
bionics p\n\
|
||||
sort_armor +\n\
|
||||
\n\
|
||||
# LONG TERM & SPECIAL ACTIONS\n\
|
||||
wait |\n\
|
||||
@@ -227,6 +229,7 @@ recraft -\n\
|
||||
construct *\n\
|
||||
disassemble (\n\
|
||||
sleep $\n\
|
||||
control_vehicle ^\n\
|
||||
safemode !\n\
|
||||
autosafe \"\n\
|
||||
ignore_enemy '\n\
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python
|
||||
"Extract translatable strings from the .json files in data/raw."
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
# allow running from main directory, or from script subdirectory
|
||||
if os.path.exists("data/raw"):
|
||||
raw_folder = "data/raw"
|
||||
to_folder = "lang/json"
|
||||
elif os.path.exists("../data/raw"):
|
||||
raw_folder = "../data/raw"
|
||||
to_folder = "../lang/json"
|
||||
else:
|
||||
print("Error: Couldn't find the 'data/raw' subdirectory.")
|
||||
exit(1)
|
||||
|
||||
def gettextify(string):
|
||||
"Put the string in a fake gettext call, and add a newline."
|
||||
return "_(%r)\n" % string
|
||||
|
||||
# create the output directory, if it does not already exist
|
||||
if not os.path.exists(to_folder):
|
||||
os.mkdir(to_folder)
|
||||
|
||||
# extract "name" and "description" fields from json to fake-python
|
||||
def convert(infilename, outfile):
|
||||
"open infilename, read data, write names and descriptions to outfile."
|
||||
jsondata = json.loads(open(infilename).read())
|
||||
names = [item["name"] for item in jsondata]
|
||||
descriptions = [item["description"] for item in jsondata]
|
||||
for n, d in zip(names, descriptions):
|
||||
outfile.write(gettextify(n))
|
||||
outfile.write(gettextify(d))
|
||||
|
||||
# data/raw/items/*
|
||||
with open(os.path.join(to_folder,"json_items.py"), 'w') as items_jtl:
|
||||
for filename in os.listdir(os.path.join(raw_folder,"items")):
|
||||
jsonfile = os.path.join(raw_folder, "items", filename)
|
||||
convert(jsonfile, items_jtl)
|
||||
|
||||
# data/raw/skills.json
|
||||
with open(os.path.join(to_folder, "json_skills.py"), 'w') as skills_jtl:
|
||||
jsonfile = os.path.join(raw_folder, "skills.json")
|
||||
jsondata = json.loads(open(jsonfile).read())
|
||||
names = [item[1] for item in jsondata]
|
||||
descriptions = [item[2] for item in jsondata]
|
||||
for n, d in zip(names, descriptions):
|
||||
skills_jtl.write(gettextify(n))
|
||||
skills_jtl.write(gettextify(d))
|
||||
|
||||
# data/raw/professions.json
|
||||
with open(os.path.join(to_folder,"json_professions.py"), 'w') as prof_jtl:
|
||||
prof_json = os.path.join(raw_folder, "professions.json")
|
||||
convert(prof_json, prof_jtl)
|
||||
|
||||
# data/raw/bionics.json
|
||||
with open(os.path.join(to_folder,"json_bionics.py"), 'w') as bio_jtl:
|
||||
bio_json = os.path.join(raw_folder, "bionics.json")
|
||||
convert(bio_json, bio_jtl)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# ignore everything in this directory
|
||||
*
|
||||
# except this file and the README
|
||||
!.gitignore
|
||||
!README
|
||||
@@ -0,0 +1,5 @@
|
||||
This directory is for storing translatable strings,
|
||||
automatically generated from the .json files in data/raw.
|
||||
|
||||
Any files in here (other than this one) should not be edited by hand,
|
||||
and should not be added to the git repository.
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user