Commit Graph

47 Commits

Author SHA1 Message Date
Enno Rehling f559c263e3 cleanup of config.c: move more code to other modules like unit.c and faction.c 2015-11-24 19:53:27 +01:00
Enno Rehling 64b84481b2 refactoring: move parsing and allies code out of config.c 2015-11-24 18:52:09 +01:00
Enno Rehling a4cb5e2906 replace all get_param_* for global.parameters with config_get_* 2015-11-22 10:44:46 +01:00
Enno Rehling 990fda6234 clean up config.c, remove static configuration caching 2015-11-21 18:13:16 +01:00
Enno Rehling 65f1574312 CID 22490 Dereference after null check 2015-11-04 14:27:38 +01:00
Enno Rehling 0271336428 CID 22494 Identical code for different branches 2015-11-04 14:24:44 +01:00
Enno Rehling 6e31751731 CID 22542 Resource leak
Fix broken error mesasge: "Die Einheit hat diesen Gegenstand zwar, aber sämtliche $int($reservation) $resource($resource,$reservation) sind reserviert."
2015-11-04 14:22:45 +01:00
Enno Rehling 1df0afc58a CID 22550: Dereference before null check (REVERSE_INULL) 2015-10-30 12:50:32 +01:00
Enno Rehling e25d3c8ed1 Fix a bug reporting DETROY messages to the correct unit.
Add missing not-null assertions before accessing function parameters.
Eliminate all of the PVS-Studio warnings.
2015-07-07 00:49:12 +02:00
Enno Rehling 05ec74f9ec annotate with finds from PVS Studio trial static analysis 2015-07-06 21:31:27 +02:00
Enno Rehling ef4052b0f6 the outcome of a casual static analysis session. 2015-07-06 19:53:09 +02:00
Enno Rehling 266b019928 Merge branch 'hotfix/bug-2109-give-unit' of https://github.com/badgerman/eressea into badgerman-hotfix/bug-2109-give-unit
Conflicts:
	scripts/eressea/xmlconf.lua
2015-06-08 09:43:36 +02:00
Enno Rehling 12946615e5 Bugfix 2109: Einheiten lassen sich nicht mehr zwischen Parteien übergeben
https://bugs.eressea.de/view.php?id=2109
Wenn max_transfers < 0 war, wurde das nur in give_men richtig interpretiert, aber nicht in give_unit.
2015-06-08 09:06:20 +02:00
Enno Rehling 34b1ead0ac Make GiveRestriction default to 0, do not cache the value in a static variable. 2015-05-24 07:44:02 +02:00
Enno Rehling 73fa9a276d Make GiveRestriction default to 0, do not cache the value in a static variable. 2015-05-22 16:23:18 +02:00
Enno Rehling dd8449783a converting float->double in a lot of the code to prevent -Wconversion messages 2015-05-15 19:08:44 +02:00
Enno Rehling ce94c9805d rules.give.max_men == -1 für unlimitierte Übergaben in E2 2015-04-28 17:40:41 +02:00
Enno Rehling f06e3371a0 Bug 2089 again. rename giveitem flag to keepitem, because races should default to not holding on to their stuff. 2015-04-19 12:49:39 +02:00
Enno Rehling 4d18fe68f8 gcc language purity complaint. 2015-03-13 21:56:18 +01:00
Enno Rehling 293190703f make maximum number of people transferred to a faction configurable
make E2 transfers basically unlimited.
2015-03-13 21:10:39 +01:00
Enno Rehling abca25d1d5 fix indentation in every file
fix copyright date
remove vi ts=2 code
remove a couple of superfluous extern declarations
2015-01-30 20:37:14 +01:00
Enno Rehling c8b9044f78 rename to gettoken, use more widely, add a basic test. 2014-12-22 16:28:17 +01:00
Enno Rehling 0645578305 bugfix: could not GIVE to TEMP units.
https://bugs.eressea.de/view.php?id=2052
2014-12-14 15:23:28 +01:00
Enno Rehling dca9d7e9cb bugfixe give_cmd (cannot give more persons than the unit has). 2014-12-14 06:02:08 +01:00
Enno Rehling 481275aef1 refactor: eliminate the getunitpeasants global variable.
bugfix: it was possible to uncover stealth units with GIVE CONTROL.
2014-12-12 20:53:39 +01:00
Enno Rehling 440d78596c Add missing keywords, fix disappearing units.
https://bugs.eressea.de/view.php?id=2051
. The orders PASSWORT, FAHRE, KÄMPFE were not recognized (new imperative syntax).
. Added backwards compatibility for FIGHT (now COMBAT).

https://bugs.eressea.de/view.php?id=2050
. units were always giving away ALL persons, not the number in their GIVE command.
2014-12-12 13:32:21 +01:00
Enno Rehling cd70b8684d fix escape_string mmeory corruption error.
fix a number of small stuff that happens when loading very old data files (like 572).
2014-12-12 11:28:37 +01:00
Enno Rehling d7c2fc2b04 remove the R_UNIT resource.
https://bugs.eressea.de/view.php?id=1945
assert that only items can be reserved.
2014-12-11 23:24:00 +01:00
Enno Rehling ef415c66d0 Fix GIVE 0 behavior on oceans. 2014-12-11 08:51:03 +01:00
Enno Rehling 215136465b refactoring: getunitpeasants is an awful global hack, and I am pushing it out of give_men so I can eliminate it more easily. 2014-12-10 23:05:29 +01:00
Enno Rehling f1662077c3 test giving too many and too few units.
start moving give-to-peasants logic into its own function.
2014-12-10 22:35:35 +01:00
Enno Rehling 33a5e0aa9d test giving men to other faction.
refactor give_men to return a message.
major milestone reached: 200 unit tests.
2014-12-10 21:17:00 +01:00
Enno Rehling b2140f54fd refactor, move give_cmd into give.c 2014-11-03 08:44:26 +01:00
Enno Rehling 1af315ebf2 move magic out of kernel, into src.
clean up/remove a ton of includes, especially of types.h (include in header if you need it, not in every .c file).
2014-11-01 12:57:01 +01:00
Enno Rehling a9a0455207 reorganized directory structure.
flattening the directory structure, moving some modules to the src/ directory.
making stealth a separate file, under test.
more tests for some stuff.
2014-08-27 06:40:35 +02:00
Enno Rehling 4c00777553 make race::_name a string, not an array of strings. add a test for rc_name. 2014-08-24 23:58:29 +02:00
Enno Rehling 04be680bd5 refactoring the pre-release script.
1. tests are now done in a subdiretory od the live server.
2. usage is easier, with commands.
3. using getopts for command-line parsing is cool.
2014-08-11 13:41:37 +02:00
Enno Rehling 1918f56990 indentation + whitespace changes 2014-08-08 01:16:35 +02:00
CTD 246a92f666 Bug 1516 Trotz Reserviere, Pferde abgegeben.
Gib xyz anzahl irgendwas ignoriert nicht mehr das eigene Reserviere.
2014-07-29 14:33:57 +02:00
Enno Rehling b2b35fd9d0 add a test for the E3 reduced give quota.
foreign units receive only 50% of silver given to them.

Conflicts:
	tests/pool.lua
2014-07-07 03:41:33 +02:00
Enno Rehling c3dfbdea18 eliminate new_race array in favor of a function (TODO: make it fast) 2014-06-29 18:10:02 -07:00
Enno Rehling d581737744 optimization: caching resource types in get_resourcetype.
eliminate some it_find calls.
eliminate static variables, they make testing hard.
2014-06-24 07:42:45 -07:00
Enno Rehling bff25f3c51 move skill_t into a separate file, give it unit tests.
name functions the same as we did for keyword/direction earlier.
to do: json configuration and lua test.
2014-06-20 23:59:04 -07:00
Enno Rehling a304b981d5 remove archetypes, they are not used by any existing game.
make compiling with libxml2 optional (USE_LIBXML2)
disable xml reports
2014-06-09 19:05:17 -07:00
Enno Rehling 3c4b6b9dd4 rename message.[hc] to messages.[hc] in kernel because of naming conflict with util/
begin json config files (WIP)
2014-06-09 09:56:49 -07:00
Enno Rehling 0ae8737062 rename MIN/MAX to _min/_max 2014-03-16 05:03:17 +01:00
Enno Rehling 03c247c788 I am killing the core/ directory.
Lots of files are moving to a new location in src/
Some intersting CMake changes.
2014-02-18 05:45:00 +01:00
Renamed from core/src/gamecode/give.c (Browse further)