Commit graph

195 commits

Author SHA1 Message Date
turleypol
6a2bd7c705 Merge remote-tracking branch 'origin/master' into vector_classes
* origin/master: (93 commits)
  Add support for dictionary creation (#277)
  Add do-while statement (#276)
  Add foreach loops (#275)
  New compiler: array initialization (#274)
  Disambiguator: figure out if label is a case statement dispatch selector, or should apply to a statement within the case dispatch group's block. (#273)
  New compiler: Add support for case statements (#272)
  Change "logical" to "bitwise". (#258)
  Fix divide-by-zero errors, and mask FormatError if it were thrown in a destructor. (#271)
  Add break and continue statements. (#270)
  New compiler: assignment to local and global variables. (#269)
  Add support for while loops (#268)
  Optimize if statements, and emit module functions in legacy order (#267)
  Optimizations: binary operators (#266)
  Add binary operators (#265)
  Add support for const declarations (#264)
  Handle default parameter values, pass-by-name, and return statements in functions. (#263)
  Add limited support for user functions (#262)
  New compiler: add return and exit statements (#261)
  Add support for if-then-else statements (#259)
  OG compiler: set module to Mod_Basic when a token is an identifier (#257)
  ...
2020-09-06 20:14:26 +02:00
turleypol
aa5ec519e5 fixed z coord compare in ListItemsInBox, fixed move from storage 2020-09-06 16:22:57 +02:00
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
turleypol
a81ddaf816 MultiDef min/max Vec3d 2020-05-31 19:11:42 +02:00
turleypol
4edcd7fd31 MULTI_ELEM contains now Vec3d 2020-05-31 14:01:05 +02:00
turleypol
7bc35dda6b Removed the uncountable ways to get the toplevel owner... :(
loading objects handles now nonset realm for containers correctly
2020-04-23 21:23:13 +02:00
turleypol
ef21af3e0c realm functions like walkheight now expect and return s8 for z level 2020-04-19 12:46:57 +02:00
turleypol
6990207d36 more warning fixes, kept the onces which should.be fixed by refactoring 2020-04-18 18:35:47 +02:00
turleypol
9040333c5e minimal solution for compilation of multis 2020-04-18 11:57:19 +02:00
turleypol
eab9710f98 fixed realms
moved getPosNdParam to uoexecutor
2020-04-13 15:45:19 +02:00
turleypol
9a34ee8839 shame one me just changed inrange functions instead of reimplementing
them
extended inRange api in PosNd, moved direction methods to Oos2d
2020-04-12 22:24:54 +02:00
turleypol
1f220bb048 modules done 2020-04-12 13:36:07 +02:00
turleypol
7722b3d542 I start to regret it...
uomod.cpp done
2020-04-12 11:34:08 +02:00
Fernando Rozenblit
c2178a34dc Changed UFACING namespace 2020-04-10 14:19:56 +02:00
turleypol
9eef9e9c29 removed pol_distance, removed setposition in character for equipped
items. left securecont to lazy to check how its used.
2020-04-05 21:17:38 +02:00
Fernando Rozenblit
6ae7095a9f Added supporting_multi() to UObject. Fixed a lot of code. Still too much to go. 2020-04-05 00:05:04 +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