Commit graph

641 commits

Author SHA1 Message Date
Thomas Arp
b76945f1ff Merge branch 'master' into feature/unittesting
# Conflicts:
#	.gitignore
#	src/Makefile.in
2025-07-02 22:49:38 +02:00
Thomas Arp
f6339b495e
Feature/clang tidy (#154)
* First cmake list file, simple docs.

TODO: utils folder.

* Support for building utils

* All fields except HAVE_DOPRNT in place

* Now builds and runs :)

* Added support for clang-tidy, if available.
2025-07-02 22:34:57 +02:00
Thomas Arp
3e0c1ccc18
Support cmake (#153)
* First cmake list file, simple docs.

TODO: utils folder.

* Support for building utils

* All fields except HAVE_DOPRNT in place

* Now builds and runs :)
2025-07-02 22:23:10 +02:00
Thomas Arp
b9d84fc325
Make sure %target% also works in act triggers and code cleanup (#152)
* Make sure %target% works in act triggers

* code cleanup. Remove inline block, make variable names more understandable.

Ref https://www.tbamud.com/forum/4-development/4525-confused-over-piece-of-code-in-parse-room
2025-07-02 22:22:36 +02:00
Thomas Arp
bdaca46e79
Added a new trigger type for mobs, called "Damage", that triggers every (#151)
time the mob is harmed, through any means.

Valid return values: 
-1: prevents damage from occurring. Will also prevent a fight from
starting.
0: forces a miss.
>0 : the damage the mob will endure.

Available variables:
%actor%: the one doing the damage
%victim%: typically the same as %self% - the one being attacked
%damage%: the damage inflicted. Always a non-negative number.
%attacktype%: The attack type. Will be UNDEFINED when hitting with a
weapon.
2025-07-02 22:22:17 +02:00
Thomas Arp
f1794521cf
Feature/issue 141 immort where (#142)
* perform_immort_where and print_object_location rewritten to handle paging.

Fixes #141

* A little more info in immort where now we have more space for output.

Fixes #141

* Added PRF_VERBOSE for toggling long output in where command.

Fixes #141

* Also toggle headers in `where x` depending on verbose-pref.

Fixes #141
2025-07-02 22:21:14 +02:00
Thomas Arp
89eb009c4f
Remove webster lookup since it no longer works (#99)
* removed useless util/webster.c and fixed a couple of potential buffer overruns in the util functions

* removed stray utf-8 error chars. I guess someone has used an editor with fancy 's

* removed last webster integrations
2025-07-02 22:18:40 +02:00
Thomas Arp
9a0a096f85 Merge remote-tracking branch 'refs/remotes/origin/master' 2025-07-02 21:27:07 +02:00
Thomas Arp
ba7dc7bf6f convert docs files to utf-8 2025-07-02 21:26:19 +02:00
Thomas Arp
558e71eed8 ignore .idea from clion IDE 2025-07-02 21:25:34 +02:00
Marthammor
a4af23538f
Add MTTS support (#150)
MTTS support - thanks to marthammer for the patch
2025-06-28 23:58:14 +02:00
Thomas Arp
b471ff195e
avoid freeing obj_proto[].name. (#149)
fixes #148
2025-05-06 23:15:06 +02:00
Rumble
392f3d90b8 Staying ahead of the power curve 2025-04-16 12:24:37 -07:00
Thomas Arp
be8de64cf8
fix buffer overrun act.informative.c (#146)
Ref https://www.tbamud.com/kunena/4-development/5636-bug-in-do-toggle-in-act-informative-c#10540

Thanks to Ironfist for the fix
2025-02-19 21:18:39 +01:00
Rumble
5024dd8e66 Updated for 2025 release 2025-01-09 23:57:59 +00:00
Thomas Arp
69888a5d89
Update aedit.c (#145)
fixes #144 

Thanks to @gbstott for the bug report
2025-01-08 22:57:39 +01:00
haloway13
1ccb6adaee
Update dg_olc.c (#143)
Better auto-formatting of dg_scripts. Thanks to haloway13 for the patch.
2025-01-01 11:05:54 +01:00
Thomas Arp
d3227f1300
Fix bug in process_output (#140)
Based on error report from JTP in the tbamud forums. If an attacker was able to start a session and then break the connection, the  process_output function would fail. This would trigger two calls to close_socket on the same descriptor. This in turn results in a double free on the character struct.

https://www.tbamud.com/kunena/4-development/5617-another-core-dump-not-long-after-the-one-earlier
Thanks to JTP for the bug report.
2024-12-30 12:30:29 +01:00
Thomas Arp
88b3027ec6
Bugfix/135 while freezes the mud (#138)
* Added loop counter per while instead of global. fixes #135

* Revert "Added loop counter per while instead of global. fixes #135"

This reverts commit 59cf6a1fb2.

* Remove extraneous reset of loop var.

Fixes #135

Thanks to bylins for the fix - https://github.com/bylins
2024-09-28 20:29:11 +02:00
Victor Augusto Borges Dias de Almeida
7036a15782
Changes to make the code compile normally on macOS. (#137)
Changes in configure to set crypt lib dynamically depending on the OS
2024-09-22 11:15:28 +02:00
welcor
e59420363a Merge branch 'master' of git@github.com:tbamud/tbamud.git 2024-09-16 22:26:44 +02:00
Thomas Arp
c838a513dd
Added loop counter per while instead of global. fixes #135 (#136) 2024-09-16 22:25:29 +02:00
welcor
c8fc70bf43 Refactor: fixtures in its own files.
Added readme for creating tests.
Found and fixed interesting bugs in destroy_db when there is no world.
renamed the testfile to testrunner to make it clear it is actually running the texts. Also, made testrunner more focused on the actual running of the tests.
Added debug target to test makefile.
2024-06-27 00:31:54 +02:00
welcor
9399b68f26 remove the conf.h listing when building, and add another test for
get_number
2024-06-21 14:45:07 +02:00
welcor
594cedbff6 Build step tweaking 2024-06-21 14:11:47 +02:00
welcor
9b242a1085 build step tweaking 2024-06-21 14:10:16 +02:00
welcor
81e0eb009a remove undefined behaviour 2024-06-21 14:07:20 +02:00
welcor
59e2e4f180 typo 2024-06-21 13:58:13 +02:00
welcor
f36c951ddc check conf.h on build server 2024-06-21 13:57:07 +02:00
welcor
1330cb7b18 add cmocka 2024-06-21 00:35:32 +02:00
welcor
a3185bf925 Added tests to workflow 2024-06-21 00:30:33 +02:00
welcor
b61dd29e00 Added a couple of lines to the readme. 2024-06-21 00:22:15 +02:00
welcor
8f958359e9 Removing Makefiles for old architectures or build mechanisms.
We're in 2024.

The VMS, Amiga, OS/2 and Arc have fallen by the wayside, along with the
Borland C compiler and Watcom...
2024-06-21 00:08:40 +02:00
welcor
11d4693776 Merge branch 'master' into feature/unittesting 2024-06-20 22:55:35 +02:00
welcor
ed9e5e1c5a Merge branch 'master' of github.com:tbamud/tbamud 2024-06-20 22:48:59 +02:00
Dan Danese
762cb77c60
Fix a bug with the prior commit for handling triggers. It should have (#132)
continued the loop, not returned since it isn't likely to be the end of
the wld file.

Added the ability to specify multiple files on the command line. This
will load all files passed before processing into html files. This is to
fix the 'missing exits' from the output html files. The prior version
only worked on a single zone or wld file and generated incomplete
output. The record count was moved global to enable proper tracking of
the entire world. The index_boot function was modified to scan the files
first, get a record count, then start over and load the room records.

example usage: wld2html *.wld

This command will generate the entire world as one html file per room.

Fixed room number roll over. The original was using a short int which is
a 16bit int and rolls at 32k.

Fixed an issue where the html files would get negative names due to
integer rollover. It had something to do with sprintf an int using %d,
but only if you passed that to fopen. Casting the int (room number) to
a long before using sprintf with %ld fixed the issue.

Added the missing four directions from the dir_names array and defines.

Co-authored-by: Dan Danese <biouxtia@danese.us>
2024-06-20 19:56:51 +02:00
Thomas Arp
317286d051
Ignore project files on commit, and fix the automap bug showing two (#133)
descriptions
2024-06-20 19:31:20 +02:00
welcor
95cca56880 ignore project files 2024-06-19 23:43:22 +02:00
Dan Danese
ac711ffff8
Update wld2html.c (#131)
Triggers on elements of the room break this utility. Added code to toss them since we don't need them. Can add handling that pulls the trigger info later if desired, but too time consuming to index them before building the room for this simple tool.
2024-06-18 20:56:13 +02:00
Thomas Arp
cde4b84be1
Update FAQ.txt (#130)
Added info about generated maps for the areas on tbaMUD
2024-06-08 12:12:54 +02:00
welcor
b5f460f74e refactoring for readability 2024-05-20 00:53:40 +02:00
welcor
7d3acb0e3d Testing do_remove
Mocking the send_to_char function to check messages to the user. Still doesn't work for act() though.
Requires libmocka-dev and   libunwind-setjmp0-dev
2024-05-19 01:45:42 +02:00
welcor
217eac8cb3 Renamed test files to match pattern from src
Also, started setup for testing do_remove and introduced a bit of shorthand macros.
2024-05-18 23:32:46 +02:00
welcor
eb8e200a31 Add munit for unit testing.
Main method extracted to separate file to make it easier to test the _rest_ of the code.
munit is added as a submodule by running `cd src; git submodule add https://github.com/nemequ/munit.git` .

Unit testing has so far only been tested on ubuntu.
2024-05-18 21:21:17 +02:00
welcor
455e3a06ea Removed a stack of not interesting files from being comitted to git. You may want to adjust this if you are using git for backup. 2024-05-18 16:43:17 +02:00
Nick Schmoyer
5da67ddc6a
Add missing lookup for flags in read_ibt (#128) 2024-03-02 23:11:28 +01:00
Roman Shapiro
b2d38522e0
Added new easy way of building TbaMUD in the Visual Studio through the CMake (#127)
* Added new experimental MSVC build way through CMake

* Small build/README.md fix
2023-11-19 04:04:39 +01:00
Serge
498b652546
fixed small bug in toggle showvnum (#125)
Thanks, @prool
2023-01-07 15:43:06 +01:00
Rumble
213e52d255 Updated for 2023 release 2023-01-02 14:23:51 +00:00
Steaphan Greene
79e2f91894
Fix (remove) rogue non-ascii character from socials.new. (#123)
This character isn't ascii, nor even utf8.  It doesn't serve any real
textual purpose either, so, just delete it.
2022-12-05 12:53:37 +01:00