Commit graph

66 commits

Author SHA1 Message Date
turleypol
154a68a9fd
LEAKLOG, DEBUGLOG, SCRIPTLOG, FLEXLOG changed to new logging (#597)
* LEAKLOG, DEBUGLOG, SCRIPTLOG changed to new logging

* updated FLEXLOG
2024-01-13 17:08:33 +01: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
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
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
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
7f8b5055b2 no need to strip tilde chars from speech
added small early out test for textcmds
simplified _unicode params
2019-01-16 21:24:41 +01:00
turleypol
8b085e86ef dont assume a tainted string by default
cfgfiles (which includes savefiles, datafiles) get sanizized on read,
filemod::readfile, xml module, sql handled
old ascii speech packets handled
2019-01-12 17:14:05 +01:00
turleypol
04066c309d moved unicode sanitize functions to clib as a preparation to sanitize
only once
renamed mklower/mkupper to make it clear that it should only be used
for pure ascii texts
compiler triggers only once a warning about invalid unicode file
2019-01-12 11:46:30 +01:00
turleypol
8c7ed986a9 CAsc(Z)/CChr(Z) use utf16, if CChr() cannot represent it with a single
number return an error.
Fixed problem with RequestInput using the unicode version
Updated em file comments
2019-01-04 13:18:53 +01:00
turleypol
d0b74d6da6 added first docs, cleanup of first todos 2019-01-03 18:58:13 +01:00
turleypol
b032dc8065 cleanup of sysmsg unicode 2019-01-03 17:44:20 +01:00
turleypol
cc27bb611f removed last usage of convertUCtoArray 2019-01-03 11:00:46 +01:00
turleypol
67030da9e3 get rid of convertUCtoArray in packet scriptobject and party, they
return/use now strings instead of old unicode array
2019-01-01 19:17:02 +01:00
turleypol
a6c7a471a1 simplified string api, converted requestinputuc return packet 2019-01-01 15:47:27 +01:00
turleypol
9372421d93 simplified unicode send functions 2018-12-31 20:07:22 +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
a89886a0ce Merge remote-tracking branch 'origin/master' into utf8
* origin/master:
  more network specific code moved
  moved pkt headers into network folder
  fixed argument count for DepletedFunction
  Updated cotire, updated pch
  Added vitals.cfg DepletedFunction gets called once the vital reaches zero removed UnderFlowFunction since it was never used
2018-12-31 10:37:35 +01:00
turleypol
9cfb4ec5a5 moved pkt headers into network folder 2018-12-30 21:35:54 +01:00
turleypol
1c57ac43cf renamed all unicode speech functions for easier refactoring 2018-12-23 10:24:46 +01:00
turleypol
366f7e7122 Merge remote-tracking branch 'upstream/master'
* upstream/master: (45 commits)
  renamed mobile syshook to character used unique_ptr for all syshooks
  added docs
  code simplification, deprecate warning for uoclient.cfg MethodScript entry
  party and guild ref support docs and testing left?
  custom methods for client and account references
  fixed line length
  syshooks for npc/mobiles
  first round for scripted object class methods
  Fixed formatting error.
  Added new return option to consume ammunition hook which allows the hook to make the core continue with the usual ammunition checks.
  Fix critical bug in FindObjtypeInContainer()
  fixed compiler warning
  fixed linesize
  windows fixes
  Added cmake option to run clang-tidy used everywhere nullptr
  Changed classes to be final if possible, removed override macro
  Added additional documentation.
  next..
  clang 7 is currently untrusted... next try 6 ;)
  fixed new clang warnings, new compiler version on travis (lets see how many commits are needed till it works)
  ...

Conflicts:
	.travis.yml
	pol-core/bscript/impstr.h
	pol-core/clib/cfgfile.cpp
	pol-core/pol/module/npcmod.cpp
2018-10-14 14:00:33 +02:00
turleypol
054dd222a3 some untested utf8 change in unimod 2018-10-14 13:42:19 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
turleypol
f86e8b3e6c made stylecheck happy 2018-06-25 19:31:01 +02:00
turleypol
d751a9e2a6 fixed array usage 2018-06-25 19:31:01 +02:00
turleypol
ee10d76ec4 started with unimod 2018-06-25 19:31:01 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +02: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
turley
dcda893e2a new item member no_drop disallows any drops
new container/npc member no_drop_exception if set target is valid even
if no_drop is set
poltool can now unpack and print compressed gump pkts from a pol/razor
pkt log
2017-09-10 12:41:13 +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  := "" ), 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
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
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
turley
ed7b16b233 normalized lineendings 2016-02-11 22:54:43 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
turley
0d9d13bdb9 moved unicode from clib to pol 2015-09-19 10:55:48 +02:00
Thomas Volkert
1dd2200c6b Renamed endian.h to clib_endian.h to avoid redefinition problems in
system files and the general hiding of the endian.h from the system
2015-08-31 20:01:31 +02:00
turley
2737393f2a Tried to put all global vars into centralized structures.
Currently plib/systemstate, pol/uvars, pol/ucfg, pol/multi/multidef

Next step should be to split them based on usage, since its currently a bit of include hell...
2014-12-30 14:14:41 +01:00
turley
a08b5e4e4a Packet writer improvement
parameter can now have different type, only allow integer and enums, same sign
added runtimecheck for max value
2014-11-14 17:54:41 +01:00
frozenblit
c4cb100279 Some more stl_inc.h cleanups 2014-11-01 19:16:13 +01:00
frozenblit
ed679dba3d Moved message handling code into its own cpp
Created a new file (msghandl.cpp) and moved the code from pol.cpp there.
Moved related files to the "network" folder, where they belong. Fixed
include names... (we should make this relative to the project root!)
2014-10-01 21:10:32 +02:00
turley
331792c755 added more memoryusage estimation 2014-06-07 09:00:37 +00:00
turley
fb873de803 decoupled headers to optimize a bit the build time 2014-05-03 09:06:19 +00:00
turley
31ee263a45 activated new logging facility 2014-01-18 13:29:38 +00:00