Commit graph

138 commits

Author SHA1 Message Date
Kevin Eady
6d748af2df
Add module function party::ListParties() (#886)
* implementation

* tests

* docs
2026-05-23 08:27:16 +02:00
turleypol
5bd71ae8ee
Non blocking gump cmd (#871)
* refactor gump pkt creation

* testclient returns buttonid 1 pressed when 'button' is contained in the
commands

* extended test

* cleanup destructor mess a bit

* store gumps as pair to decide if the executor needs to be revived
more refactoring

* disallow copy, if used creates nasty bugs

* helper method to convert imp to character

* gumpevent

* new non-blocking dialog function, sends event instead

* test closegump

* test if serialnumber gets correctly converted and invalid entries get
skipped

* removed unused BApplicPtr class
added BApplicObjBase to impptrIf convert function

* use impptrIf

* CloseGump accepts now also an array of characters
extended tests

* moved deleted copy constructor to the public part

* by default clang tidy will check .inc files, removed this filter

* the last tidy run with modernize-loop wasnt added to the PR check

* keep vector with chr and gumpid per uomod
to prevent growing dont add to the cache if same chr with same id
already exists.

* docs

* core-changes
2026-03-16 08:11:43 +01:00
AsY!um-
5b7816d00a
Fix a typo in ecompile.cfg.example (#833) 2025-12-21 09:25:43 +01:00
Kevin Eady
5cf6949ea7
Add support for regular expressions (#818)
* implementation

* tests

* maybe fix windows compilation?

* undo change of match_flag_type

* switch to boost regex

* move flags to BRegExp object

* fix tests due to cmake 4 update

* update grammar

* update prettifier

* move flag parsing to BRegExp ctor

* add AST nodes, update instr generation and execution

* copy tests but use regular expression literals

* fix grammar for handling division correctly

* modify return values a bit, update tests
- string.match: make groups hold structs of matched, offset
- string.match: add offset
- string.replace: use a groups array like string.match vs individual arguments

* bundle of changes

- standardize error messages
- add more tests for coverage
- move BRegExp creation to static method:  previous implementation had
  ctor throwing, which was no good inside executor since it didn't have
  a try/catch

* more tests; add OT_REGEXP to basic.em

* move string regex stuff to bregexp and support regex/wregex via std::visit

* maybe fix compilation errors?

* add unicode escape sequence handling

* really maybe fix compilation error?

* fix compiler warnings

* refactor a bit to remove duplicate code

* address discord comments
- just return wstring, no need for vector<wchar_t> method

* Add string.split by string and regexp

* Use Max_Split instead of Limit
This makes it match basic::SplitWords

* add support for empty string delim in SplitWords

* remove duplicate code across string.split and mf_SplitWords

* Squashed commit of the following:

commit b3148e069f
Author: turleypol <turley@polserver.com>
Date:   Sat Sep 27 17:02:22 2025 +0200

    memorylocation of input string is not allowed to changed, switched back
    to uniqueptr

commit 5a4d1c8fcb
Author: turleypol <turley@polserver.com>
Date:   Sat Sep 27 10:18:01 2025 +0200

    no need to use ptr for input

commit 90fa0edc66
Author: turleypol <turley@polserver.com>
Date:   Sat Sep 27 09:56:29 2025 +0200

    fixed typo

commit bed4ff3ac9
Author: turleypol <turley@polserver.com>
Date:   Sat Sep 27 09:47:36 2025 +0200

    make Callback for BContinuation move only

* use uninit when group isn't matched

* fix multiline flag handling; add test

* add docs and doc example tests

* some cleanup

* address review comments
- allow move assignment

* add core-changes
2025-11-17 18:02:45 +01:00
Kevin Eady
59046fdc7c
Normalize TypeOf and TypeOfInt return value for ClassInstanceRef (#821)
* implementation

* tests

* docs and core changes

* fix tests due to cmake 4 update
2025-09-29 08:55:48 +02:00
Kevin Eady
c029ca4283
Add module function util::RandomUUID() (#803)
* implementation

* tests

* docs

* add uuid_nil, uuid_max

* add support for v4 or v7 uuid generation
2025-08-16 13:39:34 +02:00
turleypol
7090c64840
Short Circuit Optimizer (#797)
* first working short curcuit for && and or
creates jumps after each expressions to skip the following

* fixed valuestack when short circuit jmp does not jump

* use specialized instructions for short circuit && and ||

1: lhs
2: logical jump if false/true goto 4 <- if jmp do logical convert
3: rhs
4: logical convert
5: rest

logical convert is needed since "normal" && || operations convert isTrue
to BLong

added BObjectRef BObjectImp set specialization to remove noise

* fixed converted objimp when jump on false values

* first version of short circuit warning
should be moved to analyzer
added whitelist of module functions which have no sideeffect to reduce
the number of warnings

* moved warning visitor to analyzer and added it as extra compile step
fixed sourceline print and cache the content

* missing include, unused member

* included the correct header

* ecompile.cfg to activate and warn
ecompile cmdline arg to activate it
run all tests also with it active
fixed that only the most right side statement was checked

* ecompile cmdline

* increase ecompile version
cleanup

* compilation error

* missing header

* allow -S- to deactivate shortcircuit like the other params do

* extended whitelist functions

* revert fileformat version increase
fixed escript test cmake

* use the correct arg

* escript testoutput can now be different if shortcircuit is active

* docs

* additional test

* addressed comments
2025-07-28 21:48:34 +02:00
Kevin Eady
1ad7d240eb
Add module function os::SendEmail (#793)
* wip implementation

* maybe add tests...

* fix dependencies

* fix windows and mac deps

* attempt #3 for mac deps

* add --break-system-packages because WHY NOT

* add raii wrapper for curl_slist and curl_mime

* add content_type; fix incorrect recipient variable; more tests

* put smtpd log in file; add curl_easy_setopt_return_error; fix parsing email from display string

* remove some debugging

* catch exceptions in polsys::ReloadConfiguration; tests; smtpd cleanup

* Fix xslt validation erorrs in osem.xml
- `HTTPRequest`` did not have the `<code>` block inside `<explain>` so
it was not rendered.
- `LoadExportedScript` needed `<return>` after `<explain>`
- `GetEnvironmentVariable` needed `<return>` after `<explain>`

* Address review comments
- remove openssl test dep by generating cert, valid for 100 years
- only run test if asiosmtpd module is installed

* Address review comments
- remove `pChild`
- remove `curl_easy_setopt_return_error` macro
- return `new BLong( 0 )` for temp object replaced by background thread

* Address review comments
- use `Clib::localtime` + `fmt::format` for date header

* Address review comments
- Early exit on failures

* Address review comments
- Move suspend to immediately before background thread creation

* Address review comments
- better handling of curl_slist and curl_mimes

* Address Discord comments
- remove env check in test_email program

* attempt to fix timezone issue in date header

* additional tests for invalid params

* add docs, core changes

* smtpd: fix event loop, only run if not filtered out

* put stacktrace in "no signal received" error

* fix stacktrace call in testutil; add default param to os.environ.get in smtpd
2025-07-03 21:33:36 +02:00
Kevin Eady
6c7a2b0a30
Add support for spread operator in dictionary and struct initializers; FormatterEllipsisSpacing formatter option (#763)
* update grammar

* implementation

* formatting

* executor implementation, tests

* docs, core-changes

* fix warning introduced in #760

* add format option FormatterEllipsisSpacing

* update core-changes
2025-02-19 18:33:56 +01:00
Kevin Eady
1ce1a16f5d
Add allow_negatives to module function util::RandomDiceRoll (#748)
* implementation

* tests

* docs, core-changes

* address review comments
- no need for negative check with clamping
2025-01-21 15:33:22 +01:00
Lukáš Novotný
9be58c528e
Add realm decay setting (#734)
* Add realm decay setting

* fix crash on missing realm; recompute decay pause upon changing decay

* docs and corechanges
2024-11-10 00:33:04 +01:00
Kevin Eady
3ccf701ce9
Format testsuite scripts, pol-core support modules (#713)
* Format escript testsuite

* Manual formatting for escript testsuite
- Add format-off to places where formatter does what it should, but we don't like the results
- Manually change places where formatter outputs weird things _without_ format-off, so next format-all would show changes if not fixed

* Update .err files; add update_err.py helper script

Use the format `:line:col: message` for all .err file checks. This
allows us to change the file names without needing to edit the .err
contents.

Note that `in/inc0{1,2}.err` need have error messages between POSIX and
Windows, so their messages are a bit more "generic" than the other errs.

* Format pol testsuite

* Manual formatting for pol testsuite

* Format pol-core modules

* Manual formatting for pol-core modules

* Additional format pol-core modules

Use FormatterLineWidth=10000 since module functions must be on one line
because of the parse_modules target

* Address Discord comments

- Support multi-line module function declarations in parse_modules

* Format on df07831
2024-10-04 10:29:55 +02:00
turleypol
ba9ad6d1d5
more formatting improvements (#696)
* more formatting improvements:

replace inside of comments tabs with spaces if UseTabs is false
do not strip whitespaces at the beginning of linecomments
better handling of long lines eg string additions
"binpack":
  if an array fits equally into up to 3 lines use this instead of having each element in a newline
  struct/dicts get only packed if they fit into a single line, or half of the room for two lines
align comments in statements

* fixed linecomment forcing newline in simple splits
formatting of functionexpressions
```
@(blubb) {
  blah;
};
```

* fixed windows lineendings
fixed extra newline before long comment in certain situations
added option FormatterFormatInsideComments to deactivate trimming and
replacing of tabs

* fixed typo..
ecompile cfg is now FormatterIndentLevel

* FormatterBracketAttachToType: array{} vs array {}
FormatterAllowSingleLines: allow single line case/functionrefs

* align case label expressions
comments at the end still make the expression packable
other bugs

* better detection of case labels, by buffering the text. fixed more
problems with comments while packing lines

* do not allow more then 3 lines to be packed to a single one

* fixed hopefully last bug with comments and packing

removed FormatterAllowSingleLines
added
 FormatterAlignTrailingComments
 FormatterAlignConsecutiveShortCaseStatements
 FormatterAllowShortCaseLabelsOnASingleLine
 FormatterAllowShortFuncRefsOnASingleLine

* better linesplits when prefferedBreak is used (functions with params)

* fixed unalign lines with comments in arrays

* simplified ecompile code, use callback for compilation during iteration
through the directories.
use for pkgs recursive_directory_iterator

* core-changes

* onlinedocs

* onlinedocs-typo

* corrected cfg

* do not touch comments at all when disabled
detect aligned */

* fixed group formatting in var statements in more complicated situations

* when packing finishes right before the last element check if this
element also fit into the last line

* remaining ); or similar parts dont start a new line during group
formatting

* fixed edge cases of preferredBreak tactic with paranthesis alignment

* changed defaults, updated docs
2024-09-13 06:49:00 +02:00
Kevin Eady
cfd241bb93
Add support to change House multi id via house.set_multiid() (#677)
* Some changes
- add house `MTH_SET_MULTIID`
- `UMutli::multiid` protected, rename to `multiid_`
- Make setting `multi.graphic` a no-op

* implementation

* initial test

* add walkon, collision tests

* Address review comments
- Add nullptr check

* Add ability to pass string name; tests;

* Add docs

* update objref.xml datemodified
2024-08-03 15:08:43 +02:00
Kevin Eady
62a252ad3a
Add daemon watch mode to ecompile (#630)
* Add libefsw at 3419347

* saving work

* some cleanup

* move to fs::paths

* saving work.. maybe hitting a limit with number of watched dirs?

* migrate to watching only ecompile.cfg specified folders, cleanup/doc

* Display summary between compilations in watch mode; fix cache reuse

* Fix inf loop; some cmake, format changes...

* some windows compilation fixes... tweaks to windows cmake?

* Update Efsw.cmake for build lib changes

* removed debug flag

* silence efsw build
dont add antlr project if it already exists

* Address review comments:
- use std::move on efswwatcher add_*

* add docs

* Add WatchModeByDefault ecompile.cfg option

* iniital work on tests

* Add CI actions

* some changes (passes locally on win, mac, linux)

* Fix fixtures dependency; use ecompile verbose mode

* Add core-changes

* Send ctrl+c instead of killing process

* Proper Python file naming

* Kill ecompile process on windows, SIGINT otherwise

---------

Co-authored-by: turleypol <turley@polserver.com>
2024-03-16 00:08:06 +01:00
turleypol
7849b6cda5
SQL non default port, escape string (#629)
* added sql tests (linux only)

* add mysql_escape_string module function
its now possible to define a port for sql connection. (0 means default
sql port like before)

* escape string can fail, return error in this case

* rebuild antlr

* added docs
2024-03-10 14:31:30 +01:00
turleypol
7627e3d353
"Preview/Initial"- Version sourcecode formatting feature (#626)
* Squash only prettify changes from escript_formating_try

* support of "format-off" / "format-on" comments to mark areas without
formatting

* fix typo

* added FormatterIdentLevel, FormatterMergeEmptyLines cfg entry
better line splits for dicts/arrays

* added several spacing options. the current setting list is now:
//LineWidth
FormatterLineWidth 80
// keep original keyword spelling
FormatterKeepKeywords 0
// number of spaces for ident
FormatterIdentLevel 2
// multiple newlines get merged to a single
FormatterMergeEmptyLines 1
// space between emtpy parenthesis eg foo() vs foo( )
FormatterEmptyParenthesisSpacing 0
// space between emtpy brackets eg struct{} vs struct{ }
FormatterEmptyBracketSpacing 0
// space after/before parenthesis in conditionals
// eg if ( true ) vs if (true)
FormatterConditionalParenthesisSpacing 1
// space after/before parenthesis
// eg foo( true ) vs foo(true)
FormatterParenthesisSpacing 1
// space after/before brackets
// eg array{ true } vs array{true}
FormatterBracketSpacing 1
// add space after delimiter comma or semi in for loops
// eg {1, 2, 3} vs {1,2,3}
FormatterDelimiterSpacing 1
// add space around assignment
// eg a := 1; vs a:=1;
FormatterAssignmentSpacing 1
// add space around comparison
// eg a == 1 vs a==1
FormatterComparisonSpacing 1
// add space around operations
// eg a + 1 vs a+1
FormatterOperatorSpacing 1
// use \r\n as newline instead of \n
FormatterWindowsLineEndings 0

* added tab support
// use tabs instead of spaces
FormatterUseTabs 0
// tab width
FormatterTabWidth 4

* extended example ecompile.cfg with formatter settings

* cleanup

* program args comma is optional...
fixed line comments in group splitting

* since tokenids are now correct no more guessing for linecomments needed

* comments use as start tokenid the whitespace token if its on the same
line

* splitted processing from linebuilding

* renamed TokenPart to FmtToken better matches the purpose.
Comments get directly stored as FmtToken
started with a context enum

* better(?) formatting for groups

* fix eof rawlines
added check that all comments/rawlines got parsed

* const correctness

* datatype adapted to antlr

* fixed warnings

* added InsertNewlineAtEOF

* add newline at the end if the original file had one
dont strip comment whitespace if its somejind of "header block"
use the defined lineending for /* */ comments

* docs

* \r\n is default on windows \n otherwise

* fixed warning

---------

Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
2024-02-26 21:21:44 +01:00
Peter Wedder
42f15b809f
Add new EScript function: GetStandingCoordinates, and a new option to GetStandingLayers (#476)
* Make GetStandingLayer recognize items & fix bug affecting the z-coordinates returned.

* Oblige oppressive line length requirements

* Don't need this workaround anymore

* Add includeitems parameter to GetStandingLayers.

* Add GetStandingCoordinates EScript function.

* Remove semicolon from documentation.

* Fix line length nags.

* Add "x", "y" members to documentation.

* Reformat code.

* Update corechanges.

* Fix line break in core changes.

* Remove dummy parameter by removing broken reinterpret_cast.

* Update GetStandingLayers documentation.

* Remove x,y parameter overload of get_walkheights.

* mf_GetStandingLayers: use Pos2d instead of x, y params.

* Remove x,y param overloads of readdynamics. Rename flagless version to read_walkable_dynamics.

* mf_GetStandingCoordinates: Refactor to use Core::Pos2d, Core::Range2d and Realms::Realm.

* Clarify GetStandingCoordinates documentation.

* Use correct error message in documentation.

* Fix function signature in uo.em

* Add test script for GetStandingCoordinates.

Adds a simple test script for GetStandingCoordinates which
compares the function's return value to known good data
from the test map.

* Update changelog

* Fix test

* Add a commented out block into test script to generate expected data

* Fix clearance check.

Walls and other tall shapes were not getting detected correctly.
2023-12-06 12:54:29 +01:00
Kevin Eady
8b7596659c
Add support to restart Item control scripts via RestartScript (#557)
* Add implementation

* Add tests

* Update modules, docs, core-changes

* Address review comments
- Use single `getUObjectParam` instead of both `getItem/CharParam`
2023-11-02 15:23:24 +01:00
turleypol
4895bfdf16
rewrite of FindPath (#554)
* rewrite of FindPath
added parameter for movemode, before it was only possible to use
findpath on land

* unknown movemode is now an explicit error.
extended tests
docu

* added core changes

* typo
2023-10-23 19:35:40 +02:00
turleypol
31780b070e
extended print and syslog with color support (#544)
* extended print and syslog with color support
needs linux or atleast windows11

* added pol.cfg setting to disable colored output

* added docs
2023-10-18 15:18:06 +02:00
Kevin Eady
79273d2719
Fix storage area usage in module functions (#551)
* Fix storage area usage in module functions

* Address review comments
- Add OT_STORAGEAREA
- Remove remaining TODOs

* Really fix todos
2023-10-16 12:33:54 -04:00
Kevin Eady
469a454446
Add prettify argument to PackJSON() (#520)
* Add prettify argument to PackJson()

* simplify test
2023-04-28 09:44:22 +02:00
Kevin Eady
ccc6213c6f
Add ignore_line_breaks option to os::OpenConnection (#512)
* Add use_byte_reader option to OpenConnection

* Fix formatting

* fix incorrect param number

* Do not include on writes CRLF if using byte reader

* Rename to ignore_line_breaks

* Update docs

* Add core-changes
2023-03-20 19:54:39 +01:00
Kevin Eady
f892bf2ced
Add flag to os::HTTPRequest() for additional response data; Add http::WriteStatus() and http::WriteHeader() (#504)
* Add flag to HTTPRequest() for addl response data

* Add ability to change status and headers in www scripts

* Add tests for new webserver features

* Update docs and core-changes
2023-02-08 21:13:48 +01:00
Kevin Eady
1b879bc59f
Add script helpers to implement stealing skill (#493)
* add item.character_owner

* Address review comments
- Cleanup chr_from_wornitems
- Return BError if no character owner

* Add Target option TGTOPT_ALLOW_NONLOCAL

* Address review comments
- Remove `Core::chr_from_wornitems`

* Add pol tests for snooping

* Add tests for TGTOPT_ALLOW_NONLOCAL

* target_nonlocal_checklos pol test debugging

* target_nonlocal_checklos pol test debugging
- Remove destroy of obstacle
- Add a CheckLosAt call to error return

* target_nonlocal_checklos pol test debugging
- Enable USAN build

* undo test debugging changes

* use mobile for los when targetting snoopable items

* Update core-changes

* Persist SnoopScript for items on save

* Add snoop_script_ to Item::estimatedSize

* document SnoopScript script type
2023-01-08 16:59:28 +01:00
Kevin Eady
ab151728d0
Add x, y parameters to create item function calls (#490) 2022-12-13 23:08:02 +01:00
che666
5bd51780d6
Update uo.em (#481)
* Update uo.em

* Fixes for Broadcast and BroadcastUC required_cmdlevel parameter

* updated changelog

* updated changelog
2022-10-24 13:30:42 +02:00
Peter Wedder
3ea8fc55ea
Add force parameter to CreateNPCFromTemplate() (#475)
* Add force parameter to CreateNPCFromTemplate()

* Update documentation

* Rename parameter to forcelocation

* Fix parameter name in docs

* Fix parameter name in docs (again)
2022-10-13 19:59:07 +02:00
turleypol
8b7ece1c18
Testclient (#390)
* first testclient version
fixed dangling pointer in openconnection
added option to keep connection alive

* movement tests
OpenConnection do not start socketclient on connection error
changed communication pkts between testclient and server
send every event to server from testclient

* add new item event
serialize method
check move position

* added openconnection docs

* test if the ci can fail to find python3

* explicit add python3

* added multiclient support

* debug logs

* more debug

* id out of sync?

* cleanup fixed typo

* transfer client id

* send todos to the correct brain

* addee core changes
2021-03-25 19:26:09 +01:00
Kevin Eady
ae96ecbf77
Remove OGC from EcompileMain, testsuites (#383)
* Remove OGC from escript testsuite

* Remove compiler options

* Remove Facility::Compiler

* Update docs and options in ecompile help usage

* Update core-changes, breaking-changes
2021-03-04 17:39:14 +01:00
Fernando Rozenblit
ebaeab3dc8
Add option to receive only PC or NPC area events (#364)
* Add option to receive only PC or NPC area events: EnableEvents(ev, range, evmask)
where evmask can be:
0 -> accepts events from both PC or NPC (as it is now)
1 -> accepts events from PC only
2 -> accepts events from NPC only

* Add docs and entry in uo.em
* Add entered/leftarea tests
2021-02-27 23:46:21 +01:00
turleypol
90b92f4002
Get environment variable/Extended Testsuite (#359)
* added os:GetEnvironmentVariable to list all environs or get a single one

* first version of restarting the core to test save/load
added environment variable to filter tests

* fixed string constructor (size_t instead of signed int)

* added string_view constructor

* splitted and extended restart tests

* added docs

* added pol.cfg setting to disallow environment variable access

* Change environmental variable access rules
Instead of defaulting to all values allowed, now defaults to none. May
specify either `*` to allow all variables, or a comma-delimited list.

* Address review changes
- Use Clib lower instead of boost
- const auto references
- Separate tests for access and finding env vars

* Update documentation

* Apply suggestions from code review

Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
2021-02-27 08:36:22 +01:00
Admin-Yukiko
7f337a1a83
Added an additional package root to ecompile.cfg.example (#343)
* Added an additional package root to ecompile.cfg.example

Added PackageRoot=D:\DistroDev\pkgopt to PackageRoot setting.

* Update pol-core/support/scripts/ecompile.cfg.example

Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>

Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>
2021-02-26 22:22:53 +01:00
turleypol
6d73472029
Testsuite reorganization, new feature to call exported functions (#237)
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists

return 1 for success everything else is an error

* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing

* added support for used in critical scripts

* use weakptr instead of pid
moved keep_alive flag to uoexecutor

* Function and nethod accept now a argument list

* added docs

* missing docs

* faster shutdown time

* fixed typo

* fixed weird cornercase

* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript

* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set

* boat tests

* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api

* cleanuo scripts for boat and npc

* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted

* bypass windows specific ecompile.cfg logic

* fix for parallel execution

* on windows its called .exe ..

* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile

* configure ecompile.cfg to add absolute path

* early sleepms calls can lead to endless waiting

* Code coverage (#260)

* play with coverage reports

* fix yml

* use 0 as default for gcov cmake var

* fixed used cov version, hopefully fixed now cmake

* demangle function names

* removed debug msg

* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking

* added https://coveralls.io/github/polserver/polserver

* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds

* added storage tests..
docs need fixes, the Imps are not working at all

* fixed storage test to really move items

* added a house
corrected static/dynamic flag
created a few house tests

* updated yml file to new github api

* corrected coverage discord job name

* always put to runlist even if not necessary

* extended aos prop tests

* equip/unequip aos mod

* extra ci step for shard test fixtures and activated verbose shard test

* use extra ci step for all build configs, sorted testscripts for
execution

* fixed sorting

* added param to syslog to not print the context (cleaner testscript
visualization)

* added build targets for tests

* sleep api cleanup

* more aos property tests

* build for coveralls also on pullrequest

* readded debug state reset on schedule

* updated checkout ci action

* updated checkout in all ci runs
2020-12-16 18:56:10 +01:00
Eric Swanson
3a707526c8
Add example for UseCompiler2020 to ecompile.cfg.example (#336) 2020-10-17 16:55:48 -07:00
Fernando Rozenblit
70b9c1305c
Add maximum cmdlevel to polsys::ListTextCommands() (#231)
The default, -1, will return all commands as before. No need for a version bump because the method checks the number of arguments.
2020-08-19 07:19:30 +02:00
Eric Swanson
50e42719b8
Add file/SourceFileCache (#222)
* Add file/SourceFileCache

Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
2020-08-16 17:22:16 -07:00
Kevin Eady
5bbc53ab6c
Add exit_code to uo::Shutdown() (#176)
* Add exit_code to uo::Shutdown()

Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>
2020-08-03 20:30:27 +02:00
Eric Swanson
8b98737829 Move Compiler.verbosity_level_ to CompilerConfig.VerbosityLevel 2020-08-03 00:31:27 -07:00
turleypol
ece2025c57 added docs for checkskill change 2020-08-01 10:00:08 +02:00
Kevin Eady
12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00
turleypol
59c816cab1 added ecompile.cfg and cmdline flag to trigger error when include
directives use the wrong capitalization. The existing warning will now
lead to an error when warnings get treated as errors.
2019-10-07 21:01:26 +02:00
Fernando Rozenblit
818c06af96 GetProcess(-1) will now return the script pid. GetProcess(0) will not find any script, as before. For this change, script pids had to be constrained to the range of valid signed ints. Please update your .em's and recompile. 2019-09-30 23:49:31 +02:00
turleypol
f5310f48f4 Merge remote-tracking branch 'origin/master' into utf8
* origin/master:
  Style...
  Getting rid of a warning
  Fixed wrong return type
  style issues :p
  Fixed the check for max line length and some other minor issues
  Added SocketLineReader class, which is responsible for reading lines from a socket in a more efficient way. Modified Aux, Debug and WWW to use the new class.
  removed some ancient macros from clib.h
  Added error for if NaN sent as PID
  Update docs to use different wording to prevent confusion.
  Updated Docs.
  Fix for GetProcess() not actually loading the parent PID.
  Update docs to use different wording to prevent confusion.
  updated travis build clang and ninja
  Updated Docs.
  Fix for GetProcess() not actually loading the parent PID.
  Improved network code used by http and aux servers

Conflicts:
	pol-core/doc/core-changes.txt
2019-09-02 18:55:07 +02:00
Jonathan Morland-Barrett
35535a220a Fix for GetProcess() not actually loading the parent PID. 2019-08-22 07:42:08 +08:00
turleypol
ebe884c2fe Merge remote-tracking branch 'origin/master' into utf8
* origin/master: (70 commits)
  Fix to items randomly loading with AOS props due to incorrect initalization of props on load of server.
  Rectify core not clearing mobiles from client during shadow realm shift.
  SendQuestArrow() fix for HSA clients (#91)
  Hotfix/start skill script (#90)
  Noninvasive dynaprops (#89)
  Update objref.xml
  Some network error conditions were missing...
  Final adjustments to core-changes
  Added Turley's missing core-changes :P
  Improved connection handling:  - Linux isn't limited to 1024 connections anymore  - Windows may have some slight performance boost
  removed senseless gitignore files
  use generator unspecific clean cmd in build_tools.sh always generate compile_commands.json force color diagnostic (to work with ninja)
  Curl building uses now the same compiler as pol
  fixed target_link_directories system header declaration
  check if container is orphan when adding items as content. for now it crashes the shard to have the backtrace. (would crash anyway later)
  add corechanges for doc changes
  new build target "clang_format" runs clang-format on current modified or new files in pol-core dir.
  Formatting
  Fix xml indentation
  fix indentation
  ...

Conflicts:
	pol-core/bscript/execmodl.cpp
	pol-core/doc/core-changes.txt
	pol-core/pol/getmsg.cpp
	pol-core/pol/module/unimod.cpp
2019-08-16 19:02:53 +02:00
GIB
76487f0ab2
SendQuestArrow() fix for HSA clients (#91)
* Changed SendQuestArrow to receive an arrow id rather than requiring an object reference.
*Added new error if no id is supplied to a cancellation request.
* .Fix uo.em to have correct default.
2019-06-19 10:30:41 +08:00
GIB
d8911acc72
Hotfix/start skill script (#90)
* Update os.em file so that script parameter is passed as a string by default instead of int.
Updated docs for start_skill_script to be clearer what is being asked for, and reflect changes to os.em
Modified script param check to also check the string length.
2019-06-17 21:23:57 +08:00
Fernando Rozenblit
f4f9c20afd Merge branch 'master' into network-improvements 2019-04-26 20:33:27 +02:00