Commit graph

37 commits

Author SHA1 Message Date
turleypol
24c8c8b92f
Tidy modernize for loops (#862)
* trigger loop convert

* Automated clang-tidy change: modernize-loop-convert

* fixed refactor

* Automated clang-tidy change: modernize-loop-convert

* compile

* first look through

* fixes and start to use a few ranges

* revert autogenerated file

* compilation fix

* second pass

* renamed loop variable

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-31 09:14:02 +01:00
turleypol
21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00
turleypol
d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00
turleypol
43b776b94d
New format lib version (#592)
* renamed include guard to be able to use both format lib versions in
parallel

* build Fmt lib and link it into clib

* use std::string instead of format Writer for logging
added variant "2" for logging with new fmt lib

* use new logging variant for two logs

* always add \n to flush log, lets see if the assumption holds

* use new lib for tostring

* replaced all INFO_PRINTS in clib

* formatter for Token, BObject and BObjectImp

* started with bsccript

* use function instead of actual object for logging

* remaining bscript, started plib

* logvariant without newline added, more template magic

* format support for base types, added test for format padding
new version for fdump

* chanhed ecompile/runecl fixed compilation with ESCRIPT_PROFILE

* rewrite INFO_PRINT in plib,poltool/uoconvert/uotool

* replaced remaining INFO_PRINTS, renamed macros INFO_PRINT for logging
without newline, INFO_PRINTLN for newline addition.
Replaced also INFO_PRINT_TRACE and renamed it to INFO_PRINTLN_TRACE

* gitignore for fmt lib

* cleanup vim leftovers
2024-01-10 18:29:10 +01:00
Fernando Rozenblit
af19074ed4
Update to cpp14 (#188)
* use c++14 on linux, visual studio still undefined which means highest
available

* removed make_unique.h due to c++14 no more needed

* stumbled across pre c++14 code

* Removed use of boost::make_unique<> (updated to C++14)

Co-authored-by: turleypol <turley@polserver.com>
2020-08-05 20:28:07 +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
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
aadea18796 renamed mobile syshook to character
used unique_ptr for all syshooks
2018-10-14 13:13:16 +02:00
turleypol
b33e5ad02d party and guild ref support
docs and testing left?
2018-10-13 18:24:24 +02:00
turleypol
7837093432 custom methods for client and account references 2018-10-13 15:15:38 +02:00
turleypol
983c6a3c73 first round for scripted object class methods 2018-10-13 00:03:40 +02:00
GIB
5e53b1896c Added ConsumeAmmunition syshook to hook the combat ammunition consumption check for projectile weapons. 2018-10-06 00:12:51 +08:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +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
e5b58b0bd3 last wrong namespace comment 2016-10-23 10:01:27 -07: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
88ec380941 Moved globals into separate directory. 2014-12-30 15:20:59 +01: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
frozenblit
943b820eba More and more cleanups
Added some missing include guards, corrected wrong include guard names.
Removed more stl_inc.h includes.
2014-11-02 19:40:40 +01:00
turley
31ee263a45 activated new logging facility 2014-01-18 13:29:38 +00:00
turley
99d7dc3037 namespaces...finally :)
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
dsourc
f3a141661c Added: Syshook CanTrade
parameters ( character, drop_on_chr, item )
  Note:       This syshook runs when dropping an item on a character or when trying to add an item to a tradewindow
2013-01-04 17:54:14 +00:00
dsourc
19c71e05a1 Added: SystemHook "WarmodeChange" called when a character changes warmode status either by member .warmode or by clicking the warmode button on the paperdoll
Params CharRef and new_warmode_status
2012-10-13 22:38:57 +00:00
turley
c9cabbf9a2 Added: DestroyMulti(house) returns error "House currently being customized."
Added: house.cancelediting(chr, drop_changes) will stop editing mode.
drop_changes 1/0 if true drops all non committed changes
Errors: "House is not custom","House is currently not been edited","Character is not editing this house"
Added: Syshook CloseCustomHouse(mobile, house)
called after client quits editing, or when house.cancelediting() is called
return value is ignored
Added: servspecopt.cfg
"SpeedHack_MountRunDelay"  default 80 ms
"SpeedHack_MountWalkDelay" default 180 ms
"SpeedHack_FootRunDelay"   default 180 ms
"SpeedHack_FootWalkDelay"  default 380 ms
Change them on your own risk
2011-09-03 08:15:59 +00:00
turley
11bd865d23 removed syshook and replaced it with a noncritical call of scripts/misc/customhousecommit.ecl 2011-05-28 06:29:43 +00:00
turley
efab05d10e more customhousing stuff
read core-changes.txt :)
2011-05-19 21:00:29 +00:00
turley
56d1814c59 added more customhousing stuff:
add/remove roof
syshook CustomHouseCommit(who,array of items{struct:graphic,xoffset,yoffset,z})
return true if accepted, should be used to calc cost, yes/no confirm, consume cost
convert doors into components during commit
2011-05-19 13:42:57 +00:00
turley
e10cd27cea sync: shini - long to int (prerequisit for 64-bit) 2010-03-29 14:52:03 +00:00
turley
7cc945a7ab Added: (Tomi) Syshook UnHide(mobile)
return values 0 stops the char from unhiding and 1 let the core process it.
Added: (Tomi) "DisableCoreChecks" 0/1 (default 0) to each attribute entry in attribute.cfg
            if true the core will not check during skill_use ( from skillwindow ) for active skills, 
            active spells, frozen, paralyzed or delay
            if false core will check everything as it does now.
Changed: Increased Maximum UO SkillID to 57 (default value of uoclient::MaxSkillID)
2010-02-18 10:01:58 +00:00
turley
15c2b312ae added CanDie SysHook 2009-11-26 08:30:42 +00:00
turley
915ff97b5a Added: Syshook Ouch(mobile,lastx,lasty,lastz)
Called if mobile falls atleast 22 down (fixed Clientside value)
Added: uo::CanWalk(movemode, x1, y1, z1, x2_or_dir, y2 := -1, realm := _DEFAULT_REALM)
            movemode is mobile.movemode string
            if y2 is -1 x2 is considered as direction (0-7)
            if x2 and y2 is given it calculates the needed direction
            returns new z value or error
2009-10-22 14:59:50 +00:00
muaddib_pol
bc4448ed9a + SysHook::CanDecay(item) - Patch by Tomi 2009-10-03 21:55:00 +00:00
muaddib_pol
631ed68c4a + All projects now using literal paths for includes.
+ Disabled Compiler warning 4244 in VS for str.cpp and strutil.cpp due to fact they are false warnings there.
2009-09-12 23:51:20 +00:00
muaddib_pol
d032ee448f + POL is now, open source. 2009-09-03 19:44:42 +00:00