Enno Rehling
b44e4e747d
ships and items never have multi-stage builds.
...
we are going to make sure of this soon.
2018-04-30 23:23:48 +02:00
Enno Rehling
08663b6eb5
fix last commit. refactoring with the MSVC IDE is prone to errors.
2018-04-28 15:57:51 +02:00
Enno Rehling
da984b5880
BUG 2425: lighthouses can see units.
2018-03-11 14:40:38 +01:00
Enno Rehling
346f56ebdb
merge conflict description namespace vs. xinclude removal and new potion names.
2018-03-11 09:19:16 +01:00
Enno Rehling
bf21f24f98
BUG 2426: E3 hat kein RC_TEMPLATE, split potion names and descriptions
2018-03-11 09:02:02 +01:00
Enno Rehling
6c0f8a81f6
merge from master
2018-02-26 19:51:48 +01:00
Enno Rehling
622c103b00
more cppcheck messages
2018-02-26 19:48:52 +01:00
Enno Rehling
432a8d432d
messy merge of cppcheck fixes into develop
2018-02-25 20:41:53 +01:00
Enno Rehling
4181e23d15
FAST_CONNECT is always on.
...
fix more cppcheck messages.
2018-02-25 18:30:20 +01:00
Enno Rehling
cf46acdc6a
bufunit does not write an indent, doe not need the parameter.
2018-02-24 19:46:34 +01:00
Enno Rehling
d15684a546
fix test_process_turn failure.
...
move turn global to calendar.
promote calendar module to kernel.
2018-02-14 20:01:36 +01:00
Enno Rehling
b5ea102372
cppcheck: scope reductions and a false positive.
2018-02-11 16:14:00 +01:00
Enno Rehling
ec48017520
move spell reporting attributes to a separate module.
2018-02-08 18:33:58 +01:00
Enno Rehling
ba14fab3a3
macros should have uppercase names.
2018-02-03 14:49:35 +01:00
Enno Rehling
3d69f4e372
start removing dependencies on potion_type.
...
use item_type where we can. does not compile, is WIP.
2018-01-14 17:40:48 +01:00
Enno Rehling
01dd489b7a
BUG 2403: endless loop (variable rename gone wrong).
2017-12-31 16:36:59 +01:00
Enno Rehling
a8140f1dc9
rename strlcpy->str_strlcpy, etc.
2017-12-30 19:49:21 +01:00
Enno Rehling
f98eab56c4
platform.h is only for WIN32 now.
...
replace MIN and MAX macros, they are BAD.
2017-12-29 06:13:28 +01:00
Enno Rehling
5b1d27542a
reduce dependence on platform.h.
...
gradually stop using MAX and MIN (mistakes were made).
2017-12-28 18:29:40 +01:00
Enno Rehling
5dabd19504
add tests for visible_unit, remove unused cansee_ex
2017-12-23 17:49:30 +01:00
Enno Rehling
6bd4e543ba
BUG 2395: lighthouses were seeing units they should not.
...
DRY!
2017-12-23 17:37:24 +01:00
Enno Rehling
cba452786f
BUG 2396: insect recruit messages fixed, and tests added.
2017-12-22 11:15:17 +01:00
Enno Rehling
05425b5101
pull economy requests into header, rename the struct.
2017-12-04 19:20:48 +01:00
Enno Rehling
290a07e763
Merge branch 'develop'
2017-11-15 20:39:20 +01:00
Steffen Mecke
0aa5a64c63
allow empty faction email
2017-11-15 12:12:42 +01:00
Enno Rehling
79aecf21b5
Merge branch 'develop'
2017-10-18 19:40:00 +02:00
Enno Rehling
b337373bc9
shorten some names, too many messages with the same prefix are inefficient.
2017-10-16 20:38:52 +02:00
Enno Rehling
e2c7b2c711
merge with master, which was far behind
2017-10-15 20:32:19 +02:00
Enno Rehling
34cd692c2d
remove the locale from orders.
2017-10-13 19:33:28 +02:00
Enno Rehling
1b53128e1a
BUG 2366: Fix cansee for seen_spell regions.
2017-10-10 20:24:20 +02:00
Enno Rehling
f00ff2d16e
BUG 2368: additional space
2017-10-06 04:14:07 +02:00
Enno Rehling
423fe65377
move region display to land_region struct, oceans do not have descriptions.
2017-09-16 07:58:57 +02:00
Enno Rehling
f4df6bd9db
kill ATF_CURSE flag, compare to at_curse directly.
2017-08-25 21:11:01 +02:00
Enno Rehling
2dd159841e
Merge branch 'master' into develop
2017-08-24 16:47:24 +02:00
Enno Rehling
fc4bde47f6
kill the old curses enum and oldcursename.
2017-08-21 20:48:00 +02:00
Enno Rehling
7985ebe511
replace ct_find calls with constants.
...
reorder a lot of includes.
2017-08-21 20:18:19 +02:00
Enno Rehling
c99e92db20
kill curse cache logic, it was a bad idea.
...
ct_find is almost never what we want to do.
2017-08-21 19:43:35 +02:00
Enno Rehling
abb7c9fb17
Merge branch 'kill-rcspell' into feature/refactor-rcspell
...
Conflicts:
src/kernel/config.h
src/main.c
src/report.c
src/reports.c
src/reports.test.c
src/spells.c
2017-05-21 21:33:29 +02:00
Enno Rehling
7806f4991f
store calendar configuration nin JSON, not XML.
2017-05-07 17:46:51 +02:00
Enno Rehling
d633c2a9fb
BUG 2310: counting units and people.
...
reduce number of count_all loops made,
make f->num_units and f->num_people be correct.
2017-03-11 19:36:26 +01:00
Enno Rehling
ba8f51b7d4
Merge pull request #667 from ennorehling/hotfix/config-2301
...
fix bugs 2301, 2302, 2303
2017-03-06 21:57:23 +01:00
Enno Rehling
05bb109a09
BUG 2303: allied units are not traitors.
...
had to rewrite the creport code for this, it is probably less efficient now than ever, but at least it works.
2017-03-06 21:35:48 +01:00
Enno Rehling
f699c32f0e
BUG 2298: fix NR display.
...
always use correct singular or plural form.
2017-03-05 18:25:15 +01:00
Enno Rehling
0379a17350
make report_resource return an rtype, not a name.
2017-03-05 17:42:57 +01:00
Enno Rehling
45862a06d0
Add a good test for the NR.
...
TODO: make it fail.
2017-03-05 16:55:11 +01:00
Enno Rehling
caa8159428
eliminate duplicate string definition
2017-03-05 09:52:17 +01:00
Enno Rehling
4e5f1d05ce
Be very strict about C standards.
...
Compile with -std=c89 in gcc.
remove all // comments (they are nice, but unnecessary).
variables only declared at start of block.
various pedantery.
backwards compatible va_copy for pre-C99 gcc.
2017-02-18 21:15:14 +01:00
Enno Rehling
456d1bd196
spellbooks should not use spellref, it's unnecessary.
2017-02-02 20:08:04 +01:00
Enno Rehling
7e69149c40
WIP: spellref everywhere
2017-02-02 16:52:32 +01:00
Enno Rehling
ee88c13732
Korrekte Email-Subject und Adresse, auch im NR.
...
Eliminate crufty per-game strings.
2017-01-26 18:06:48 +01:00
Enno Rehling
0496c66028
use FACTION in text template, not ERESSEA
2017-01-26 18:06:15 +01:00
Enno Rehling
d94cde67a4
kill autoconf.h, replace platform.h for C99 compatibility work
2017-01-26 18:03:48 +01:00
Enno Rehling
9351a1960e
gcc warning eliminated
2017-01-26 17:57:21 +01:00
Enno Rehling
d71d5e413a
eliminate unnecessary strncpy use.
2017-01-26 17:57:21 +01:00
Enno Rehling
f297d89958
merge monster.c and monsters.c
...
move RCF_DESERT handling to monsters.c
2017-01-26 17:57:21 +01:00
Enno Rehling
a4badc0a75
remove quicklist shim, use selist everywhere
2017-01-26 17:41:21 +01:00
Enno Rehling
e52cf75c59
remove autoconf.h from platform.h, fix lots of includes
2016-11-25 20:15:11 +01:00
Enno Rehling
7f9313f1a7
static analysis warnings.
...
PVS-Studio warnings reduced or suppressed.
2016-11-23 18:56:40 +01:00
Enno Rehling
ec4060cb9a
fix curse-vigour calculation math.
...
also fix a ton of small other niggles from pvs-studio.
2016-11-20 19:08:39 +01:00
Enno Rehling
27605f18ba
more boring macros removed.
2016-11-17 21:31:11 +01:00
Enno Rehling
303eb86399
factionid and curseid are also boring.
2016-11-17 21:29:15 +01:00
Enno Rehling
434cf8fce6
the unitid macro is boring.
2016-11-17 21:27:19 +01:00
Enno Rehling
413f70d1a1
move market function out of config.c
2016-11-16 22:30:59 +01:00
Enno Rehling
11b122048b
reduce dependency on save.h
...
moving a_write* functions to attrib.h, which was most of the reason everyone and their mom include save.h
2016-11-13 19:40:38 +01:00
Enno Rehling
29d072a186
remove the old ORCIFICATION code.
2016-11-13 17:13:59 +01:00
Enno Rehling
467ffe2db0
include guard.h directly, not through laws.h
2016-11-01 22:11:10 +01:00
Enno Rehling
03d90c5680
remove BOM from UTF-8 files, replace Umlauts
2016-11-01 17:25:52 +01:00
Enno Rehling
754ad78db7
WIP: remove GUARD_* flags.
...
TODO: does not compile
TODO: write new guard.test.c tests
2016-10-31 07:45:06 +01:00
Enno Rehling
15702daf99
Add a new attribute and RF_OBSERVER flag.
2016-09-25 13:01:51 +02:00
Enno Rehling
0753ea0174
fix travelthru reporting (passes unit test)
2016-09-17 08:28:33 +02:00
Enno Rehling
567083c9e8
fix bad translation key
2016-09-16 20:18:53 +02:00
Enno Rehling
d449ce4a8c
re-enable report writing, fix report.c to work without seen_region
2016-09-16 18:03:28 +02:00
Enno Rehling
4e4b4e482e
split off report.test from reports.test
...
move some tests around
2016-09-13 20:13:26 +02:00
Enno Rehling
20578da0e9
delete the old seen.* files
...
remove includes for seen.h
remove unused functions
2016-09-13 16:58:48 +02:00
Enno Rehling
0124bafdc4
delete dead code
2016-09-11 16:44:35 +02:00
Enno Rehling
402c19d8fc
dn't warn new player about NMR.
...
newbie info text was no longer valid.
2016-09-11 16:35:55 +02:00
Enno Rehling
ef5ce04335
remove unused code
2016-09-07 20:50:52 +02:00
Enno Rehling
dda845e2f4
free configuration data (valgrind calls it still-reachable leaks).
2016-09-07 20:46:41 +02:00
Enno Rehling
901cf97cb2
refactoring the "nocostbuilding" curse.
...
- remove C_NOCOST constant and other baggage
- refactor maintenance a bit
2016-08-21 20:02:19 +02:00
Enno Rehling
fef2852c5e
Reparatur Irrlichter
...
https://bugs.eressea.de/view.php?id=2227
2016-08-06 14:36:54 +02:00
Enno Rehling
db5b90e80b
clarify building_type.maxsize and add error logging for bug 2221.
...
https://bugs.eressea.de/view.php?id=2221
2016-08-06 13:52:29 +02:00
Enno Rehling
8a3bb35987
eliminate global log_flags, revert the mode arguments for fopen.
...
turns out that text is default, and windows hates it if I open a binary file without 'b'
standardize on using join_path to create filenames
(use backslash on windows, even though fopen doesn't seem to care).
2016-02-05 23:10:05 +01:00
Enno Rehling
91f894b290
teleport.c is the astral space implementation, and it is not one of the core concepts, so move it out of the kernel/ directory
2016-01-28 12:25:16 +01:00
Enno Rehling
b6d44410b7
make the password pseudo-private to faction.c
2016-01-12 06:46:51 +01:00
Enno Rehling
a02d71bfef
https://bugs.eressea.de/view.php?id=2176
...
generate the reduced production message before writing reports, so it shows in the CR.
2015-12-17 12:40:22 +01:00
Steffen Mecke
1f4c521ac8
encapsulate r->land->peasants, money, horses, herbs, morale
2015-12-08 17:57:23 +01:00
Enno Rehling
6a20345b53
issue #428 , fix writing spell description for break_curse
2015-12-06 16:45:31 +01:00
Enno Rehling
b3e7fa63e0
Merge pull request #396 from stm2/spell_parameters
...
fixed treatment of spell parameters (bug 1867)
2015-12-03 11:04:57 +01:00
Enno Rehling
4b7cb824bd
Merge branch 'massive_overload' of https://github.com/stm2/server into stm2-massive_overload
...
Conflicts:
src/move.c
src/tests.c
2015-11-27 12:40:17 +01:00
Enno Rehling
7e27928d17
eliminate static variables and cache logic from more modules
2015-11-21 12:28:20 +01:00
Steffen Mecke
a7a82662b7
reduce maximum overload damage to 38%
2015-11-17 15:47:43 +01:00
Steffen Mecke
477d69152f
added tests for all kinds of syntax parameters
2015-11-13 00:57:14 +01:00
Steffen Mecke
4ab92e3caf
fixed descriptions of spells with parameters (bug #2060+1867)
2015-11-13 00:57:14 +01:00
Steffen Mecke
f3972a2390
prepared test for nr_spell
2015-11-13 00:57:14 +01:00
Enno Rehling
b7b1ae43c2
CID 22493 Dereference after null check
...
CID 22458 Logically dead code
github issue #361
2015-11-04 12:16:52 +01:00
Enno Rehling
1a715d6736
CID 22493 Dereference after null check
2015-11-04 12:14:12 +01:00
Enno Rehling
657f5044e5
CID 22495 Identical code for different branches
2015-11-04 12:11:26 +01:00
Enno Rehling
4e431b41e2
CID 22575 (#2-1 of 2): Copy into fixed size buffer (STRING_OVERFLOW)
2015-10-29 20:45:36 +01:00
Enno Rehling
6cccdec4a2
coverity scan CID 22454 (logically dead code)
2015-10-29 09:06:46 +01:00
Enno Rehling
936c201d0b
Merge pull request #312 from eressea/master
...
pull latest changes from master into develop
2015-10-11 16:47:29 +02:00
Enno Rehling
6a074fd294
only disable MSVC2015 warnings in MSVC2015, do not break confuse compilers.
2015-10-11 14:39:51 +02:00
Enno Rehling
e8880db447
get the code to compile under vs2015 (disable warnings)
2015-10-11 14:39:43 +02:00
Enno Rehling
5f7b9129bc
Merge branch 'master' into develop
...
Conflicts:
tests/runtests.bat
2015-09-12 22:47:33 +02:00
Enno Rehling
a027139057
remove global variable verbosity
in favor of static in main.c (use log_* functions everywhere)
2015-09-12 20:58:09 +02:00
Enno Rehling
09efd9c2a9
fix anything that uses the calendar module. opps.
2015-09-12 12:54:49 +02:00
Enno Rehling
9312b44f8e
move seen_region logic to a separate seen.[hc] module for testing.
...
currently failing test:
1) Failure (tests.report.test_lighthouse):
./scripts/tests/common.lua:1051: true expected but was false
2015-09-08 09:56:56 +02:00
Enno Rehling
d64948f0fc
eliminate duplicate call to link_seen (and report_context.seen)
2015-09-07 19:48:53 +02:00
Enno Rehling
b8df3f3a5f
increase the datatype for scores from int to long long
...
this fixes https://bugs.eressea.de/view.php?id=2136
2015-09-06 19:04:04 +02:00
Enno Rehling
74d7caf526
remove dead code for base10->base36 conversion
2015-09-05 19:24:59 +02:00
Enno Rehling
a9ecd1f55e
replace all at_travelunit code with travelthru_map calls.
...
welcome to callback hell.
this should stop the buffer for travelthru from running over.
tests for this should be hell, and I still owe writing them.
2015-08-19 14:37:51 +02:00
Enno Rehling
ebe365fd6e
move travelthru logic to a separate module. todo: split off the report writing from the collection of units.
2015-08-18 18:57:04 +02:00
Enno Rehling
5bc4f7f144
add some simple tests for writing travelthru information to the report, fix test that sets errno as a side effect (thanks, Microsoft!)
2015-08-18 17:08:02 +02:00
Enno Rehling
b999e3c963
replace strlcpy/wrptr pairs with new STRLCPY macro.
2015-08-17 19:37:02 +02:00
Enno Rehling
27b5588e8f
Merge region messages and individual messages before writing them into the report.
...
This fixes https://bugs.eressea.de/view.php?id=2073
2015-08-16 11:30:44 +02:00
Enno Rehling
47dccc667b
Add a message that contains the password in the first report, so Magellan can pick it up.
...
Fix a bad type conversion when setting skills.
2015-08-15 20:25:36 +02:00
Enno Rehling
398579c293
remove duplication, fix a stray blank space in the NR.
2015-08-07 16:17:11 +02:00
Enno Rehling
816243d2d7
magicians can always identify their own curse-effects.
...
magic-resistance on a building is always visible to anybody, just like it is on units.
2015-08-07 15:52:10 +02:00
Enno Rehling
4d061d8592
repair update_long_order and K_DESTROY handling according to discussion in https://bugs.eressea.de/view.php?id=2080
2015-08-04 22:47:55 +02:00
Enno Rehling
b8e17839a7
eliminate some spammy warnings.
2015-07-08 18:27:27 +02: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
22ae1b63de
Merge pull request #201 from badgerman/issue-199-sparagraph
...
bugfix sparagraph (github issue #199 ).
2015-05-20 22:54:53 +02:00
Enno Rehling
465dcf4e1c
bugfix sparagraph (github issue #199 ).
...
adding tests.
2015-05-20 18:05:25 +02:00
Enno Rehling
3a03579a65
rename set_origin/get_origin into faction.c, remove argument from adjust_coordinates. add test for bug 2070.
2015-05-19 08:27:16 +02:00
Enno Rehling
e7661434e3
fix an out-of-bounds error in the new stream-based report code when centering very short headlines, refactor indentation code, add tests.
2015-05-19 08:26:44 +02:00
Enno Rehling
dbf022b757
fix loop termination, sparagraph
2015-05-18 09:37:31 +02:00
Enno Rehling
c6b4c51b0d
fix endless loop bug.
2015-05-18 09:21:41 +02:00
Enno Rehling
053adda3b4
Merge pull request #193 from badgerman/feature-gmtool-upgrades
...
misc gmtool upgrades
2015-05-17 17:57:46 +02:00
Enno Rehling
c4d1482250
signed/unsigned comparisons (VC warning only)
2015-05-15 20:56:43 +02:00
Enno Rehling
eac4ef7ddc
reduce conversion warning to float only
2015-05-15 13:32:22 +02:00
Enno Rehling
9c7fe1d7cc
fix gcc compilation and missing argument
2015-05-13 13:12:46 +02:00
Enno Rehling
06ff88e783
use filestream for report_template, too.
2015-05-12 20:51:17 -07:00
Enno Rehling
53a452e4ba
more conversions to filestream
2015-05-12 20:08:34 -07:00
Enno Rehling
e048b82ad2
very messy first steps towards making report_plaintext use filestream instead of FILE (lots of hacks)
2015-05-12 19:41:43 -07:00
Enno Rehling
83e610ee03
Fixing bug 1802 again, CR contains no Monster names.
2015-02-11 07:57:38 +01:00
Enno Rehling
9a395127ac
Merge branch 'nr_localization_fix' of https://github.com/stm2/server into stm2-nr_localization_fix
...
Conflicts:
src/report.c
2015-02-01 12:24:19 +01:00
Enno Rehling
03cddee6b7
Small plural/singular fix in German message.
2015-02-01 10:39:36 +01:00
Enno Rehling
c54cbfd472
fix copyright notice
2015-01-30 22:10:29 +01:00
Steffen Mecke
5e4ea5a145
fixed formatting errors
2015-01-30 20:43:40 +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
Steffen Mecke
039ee159cb
a bunch of messages in the NR where not localized
2015-01-14 16:17:21 +01:00
Enno Rehling
3d4fefcf7c
Some additional TODO comments for things I want to tackle eventually. #comment-only
2015-01-10 17:05:10 +01:00
Enno Rehling
23b8f2bc8a
call init_locales after parse_json from Lua, downgrade missing string warnings during that to DEBUG (because it's quite common not to have them).
...
also, these int to bool conversion warnings made a good point, even if I could not reproduce them.
2015-01-08 20:55:29 +01:00
Enno Rehling
b3bec13051
report the unit limit in NR and CR.
...
this implements https://bugs.eressea.de/view.php?id=2055
2014-12-19 19:57:24 +01:00
Enno Rehling
9b56ccf53c
cleaning up some alliance code, killing bitrot from WDW.
2014-12-09 14:14:35 +01:00
Enno Rehling
0fead39b41
added a function that sets a monster's name to NULL if it is the name of its race.
...
deprecate old rc_name function (renamed to rc_name_s) because it used a static return string.
2014-12-09 07:20:36 +01:00
Enno Rehling
5b9eb9080f
refactoring: move all monster-related code into monster.c
...
make some features depend on being NPCs, not monster faction.
2014-11-11 16:53:56 +01:00
Enno Rehling
a28cbc647a
loot refactoring and a small armor/shield fix.
2014-11-09 14:39:48 +01:00
Enno Rehling
81bfb598d0
refactoring modules, cleaning out the config.c kitchen sink.
...
- cansee_* rules to laws.c
- translations to language.c
- stealth to attributes/,
- rename build.h -> buildno.h
2014-11-01 12:09:56 +01:00
Enno Rehling
cf1f3972b6
cleaning out config.c, there is too much code in there.
...
rules should be in their own modules. here:
upkeep is a concept all by itself, should have its own tests, etc.
movement code should be in move.c.
cleaning up some superfluous include directives.
2014-08-31 16:50:37 +02:00