Commit graph

180 commits

Author SHA1 Message Date
Fernando Rozenblit
c49f5b4abb
Reorganize regions and realms (#228)
* Moved realms.h and realms.cpp to realms/..

* Moved regions into their own folder
2020-08-17 22:29:07 +02: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
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
Jonathan Morland-Barrett
e66eac2b71
AddAmount returns ItemRef on success. (#114)
**BREAKING CHANGE**
Whilst the break may be minor for some its still worth checking if you evaluate the response from AddAmount anywhere in your scripts.
If you compare it to 1 (int) you need to update this as the function no longer returns an integer on success.
* Update AddAmount() function from uo.em to return the original itemref on a successful addition of amount.
2020-01-04 19:51:28 +08:00
turleypol
4885c9b0ce fixed hopefully different behaviour of SendQeustArrow with an invalid param on linux and windows 2020-01-03 09:56:17 +01:00
turleypol
7e8f92bc85 rewrote module function generation, maybe this works 2019-11-10 22:04:08 +01:00
Kevin Eady
ca850a0c76 project refactoring 2019-10-18 21:32:30 +02:00
Kevin Eady
5c0fb7c4ea First support for .em-parsed module function tbls
- Create module parser custom target
- Include generated tables in .cpp sources
- Standardize module function names based off .em names
2019-10-17 22:37:26 +02:00
Kevin Eady
b55e852a5b wip 1 2019-10-17 19:08:49 +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
turleypol
691d330c07 removed some ancient macros from clib.h 2019-08-25 09:05:15 +02: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
Kevin Eady
c002cdd5c3 Remove osmodule includes 2019-03-15 00:58:55 +01:00
Kevin Eady
44f2ebbe90 Refactor to make os_module private in UOExecutor 2019-03-11 21:37:51 +01:00
turleypol
395083a31c memoryestimation did not add the module cost per executor
added EstimateSize util.em function returns estimated memorysize in
bytes of given argument. (docs to be done)
2019-02-01 23:18:43 +01:00
turleypol
f4ae345155 If a unicode string is detected as param sysmsg etc module functions
automatically use the unicode replacement
2019-01-03 22:14:10 +01:00
turleypol
6fd2883182 cleanup of char profile pkt 2019-01-03 11:39:59 +01:00
turleypol
cc27bb611f removed last usage of convertUCtoArray 2019-01-03 11:00:46 +01:00
turleypol
ee92a503bf updated speech code 2019-01-02 23:35:38 +01:00
turleypol
89fd3991ce all unicode module functions ahould now accept both Arrays for backward
compatibility and (unicode)strings
2018-12-31 14:28:37 +01:00
turleypol
9cfb4ec5a5 moved pkt headers into network folder 2018-12-30 21:35:54 +01:00
turleypol
25dae4fc21 fixed namespaces of moved files 2018-12-22 00:32:47 +01:00
turleypol
e1b14dcd00 moved polfile/uofile files into plib to cleanup atleast a bit the
compile dependencies
2018-12-21 20:27:05 +01:00
Admin\Me
34e22a2efc ** Fix docs for ListObjectsInBoxOfClass and remove commented debug code. 2018-11-26 01:04:56 -06:00
Admin\Me
13b55db32f **** Commit for 2018-11-25 ****
Added ListObjectsInBox to uo.em.
2018-11-25 21:54:52 -06:00
Admin\Me
edec78af5e **** Commit for 2018-11-25 ****
Added ListItemsInBoxOfObjType( objtype, x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM) to uo.em
Updated core-changes.txt with the ListItemsInBoxOfObjType info.
Updated uo.em docs with the ListItemsInBoxOfObjType info.
2018-11-25 05:43:30 -06:00
turleypol
0d4cca785d cleanup of compilerspecifics, ancient compilers arent supported.
ran tidy to use bools instead of ints
2018-11-03 13:14:53 +01:00
GIB
8e6ae537fe
Fix critical bug in FindObjtypeInContainer()
Error would cause assertion failure on every call.
2018-10-10 22:06:59 +08:00
turleypol
0a39af15a1 Changed classes to be final if possible, removed override macro 2018-10-09 09:47:27 +02:00
GIB
771f2884d5 Changes to the way the flags were processed.
Removed references to non-inuse items.
Updated documentation.
Included new Racalac Guide documentation supplied by Yukiko.
Clangified my changes.
Updated change log.
2018-09-07 10:19:17 +08:00
GIB
b9071bbde8 Changes to include flags for findobjtypeincontainer. 2018-09-06 22:34:51 +08:00
esdete
b9a31d3560 clang formatting 2018-07-31 16:16:19 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
esdete
349ea7f4b8 CfgElem: passing sink parameters by value 2018-07-31 12:29:25 +02:00
GIB
e047e34ef2 List statics (#64)
Added new functions for getting statics with in a range that have certain restraints
2018-07-30 09:58:22 +02:00
turleypol
6107184258 only one global config include exists now 2018-06-17 18:31:55 +02:00
Fernando Rozenblit
02b966d64d Refactoring to make adding entered/leftarea events to items easier 2018-06-17 17:08:00 +02:00
Gabriele Tozzi
72fc9d1ae4 Breaking long lines 2018-04-03 04:24:00 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +02:00
Fernando Rozenblit
daf4e35150 Fixed Accessible(). It didn't take a range into account before. Check core-changes.txt for more information! 2018-02-11 14:59:20 +01:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turleypol
798eda5b63 Cleanup of header includes. 2018-01-01 21:52:14 +01:00
Fernando Rozenblit
33c54d7fb7 Fix: Interactive commands could crash POL
See previous commits for more details.
2017-07-31 00:41:11 +02:00
Fernando Rozenblit
78a69c48ac Interactive functions will now test if the script can be blocked
Affected functions:

- Module UO:

Target()
TargetCoordinates()
TargetMultiPlacement()
SelectMenuItem()
SendDialogGump()
SendGumpMenu()
SendTextEntryGump()
SendInstaResDialog()
SelectColor()
SendPopupMenu()
RequestInput()

- Unicode:

RequestInputUC()
2017-07-30 22:31:58 +02:00
Jono@home
f60babb407 +Added: _DEFAULT_TEXT_REQUIREDCMD := 0 to uo.em which allows to set a minimum cmd level that broadcasts will be sent to.
~Changed:Broadcast( text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, requiredcmdlevel := _DEFAULT_TEXT_REQUIREDCMD ) adding requiredcmdlevel argument which allows you to set a minimum cmd level that the broadcast will be sent to.
~Changed: No longer require a PID for GetProcess( pid  := &quot;&quot; ), not selecting a PID will use the PID of the parent script.
2017-07-23 20:44:37 +08:00
Fernando Rozenblit
eb34290222 Cleanup for modules' function tables 2017-01-24 21:57:16 +01:00
turley
e7b494fb99 corrected SendQuestArrow off-version for HSA clients 2017-01-22 22:16:55 +01:00
turley
f9c3db9e41 Modules share the same (helper) template base class
Optimize function name search for all modules not only uo by using an additional map, replaced c array with vector for functionsdef.
Simplified pragma pack order. (MSVC version is supported in all
compilers)
Removed compilerassert.h (asserteql,..) replaced with static_assert
Removed some old #ifs
2016-12-20 23:53:32 +01:00
turley
1da37b2523 Fixed program args parsing of runecl
Reenabled and fixed testmode for pol
2016-12-14 17:05:34 +01:00