Commit graph

85 commits

Author SHA1 Message Date
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
turleypol
1f7ba53e4a Fixed method override via custom functions 2017-12-22 09:40:10 +01:00
turleypol
386b0a79d4 fixed cache access for members/methods 2017-12-20 18:43:14 +01:00
turleypol
4ab046ae06 Doubled speed of custom object method resolution 2017-12-20 16:52:39 +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
turley
6c772dcffc Fixed unreachable code warnings. 2016-12-19 17:22:09 +01:00
frozenblit
2423c4a5cb Added character.carrying_capacity
Read-only property which returns the current carrying capacity
2016-10-23 15:58:18 +02:00
turley
2804c55db2 added object.specifc_name returns 1 if a custom name is set. if its
still the original (eg itemdesc) returns 0
2016-08-28 21:59:15 +02: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
Gabriele Tozzi
397d11d520 Fix: bug recent compiler fix, commit 861ff58d1d 2016-01-25 07:30:01 +01:00
Gabriele Tozzi
fd24da5cd1 Documentation: reformatting some comment blocks 2016-01-25 01:17:56 +01:00
Gabriele Tozzi
861ff58d1d Fixed: Minor bug in ecompile allowing Double in the form "2d4".
These were incorrectly interpreted as "2e4", meaning 20000 and
leading to confusion with dice rolls. The compiler now issues an
error instead.
Added related test cases.
2016-01-22 00:16:39 +01:00
Gabriele Tozzi
4a02fa110d Fix: usage of assert() in my previous commits due to inexperience
Also fixed a rval issue in recently modified house components code.
2016-01-21 18:43:45 +01:00
Gabriele Tozzi
c87fa09947 Merge branch 'master' of https://github.com/polserver/polserver 2016-01-20 19:11:40 +01:00
turley
ef3ff034c7 corrected doxygen comments 2016-01-20 12:14:30 +01:00
Gabriele Tozzi
e979010408 Added: New Item.house property
Returns a reference to the house if the item is a component of it
(listed in House.components()).
This is the intended replacement for the previously removed CProp
"house_serial": use item.house.serial instead of
GetObjProperty(item, "house_serial").
2016-01-20 05:00:32 +01:00
Gabriele Tozzi
c6a9a6cb73 Merge branch 'stable' 2015-12-19 00:05:55 +01:00
Gabriele Tozzi
ebb6f8a404 Added: support for "\xFF" string escape sequence in eScript 2015-12-19 00:04:32 +01:00
Gabriele Tozzi
5bf416ca24 Merge branch 'cmake'
Conflicts:
- pol-core/clib/xmain.cpp
- pol-core/ecompile/ecompile.cpp
2015-12-18 23:41:43 +01:00
Gabriele Tozzi
144f0600f7 Documentation: improving comments in code
Most of them coming from the "unicode" branch
2015-12-15 02:53:58 +01:00
Gabriele Tozzi
24d3488f7a Merge branch 'master' into cmake 2015-12-07 17:57:03 +01:00
Gabriele Tozzi
7511d15286 Documentation: reformatting comment block
This seems to be very important. Using doxygen syntax, so that it can
be more easily found in future.
2015-12-05 12:47:10 +01:00
Gabriele Tozzi
7593188ff7 Merge branch 'master' into cmake 2015-12-05 09:17:28 +01:00
Gabriele Tozzi
05b2a3a6bc Buff Bar Support
The buff status is held in a new buffs_ property of Character. It is
modified via Character.addBuff(), Character.delBuff(),
Character.clearBuffs() functions. (Maybe also a readBuffs() function
could be useful in future?). Packets are automatically sent when on
a "when needed" basis.
2015-12-05 09:06:40 +01:00
Gabriele Tozzi
66c6200e2a Merge branch 'master' into cmake 2015-11-30 05:49:34 +01:00
Gabriele Tozzi
17c45a8fd2 New Client object properties last_packet_at and last_activity_at 2015-11-28 11:12:52 +01:00
Thomas Volkert
d9646eadd9 Added missing initializers to avoid compiler warnings 2015-11-01 01:06:41 +01:00
Thomas Volkert
202e7f1496 Merge remote-tracking branch 'origin/cmake'
Conflicts:
	pol-core/.gitignore
2015-10-31 19:52:33 +01:00
Gabriele Tozzi
27eabb1721 Added: Item insurance support, new Item.insured property (0/1)
An insured item behaves on death like a newbie item, except that
the insured flag gets reset back to 0 after every death. If the
item for some reason (e.g. when backpack is full) will get dropped
instead, the insured flag will be reset anyway. Insured items are
not stackable with normal items but they can still be sold to
vendors.
Hint: this feature can also be used in conjunction with CanDie
sys hook to determine via script which items a player will drop
on death; since the CanDie hook is called exactly one moment
before death you can use it to insure the items that you don't
want to fall on the corpse.
2015-09-03 13:56:30 +02:00
Thomas Volkert
44d7785438 Added missing initializers 2015-08-31 15:59:22 +02:00
Gabriele Tozzi
15a2ccfd32 Added: new bscript keyword "unused"
Has no practical effect, but tells the compiler not to issue a warning
if the following variable in a function or program definition is will
not be used. The compiler will instead issue a warning if the given
variable is used.

Example:
program onremovescript( character, container, unused item, unused item_amount, movetype )
  <some code here...>
endprogram

function myfunc( parameter1, unused parameter_for_future_use )
  <some code here...>
endfunction
2015-08-27 22:46:48 +02:00
turley
c755d44e75 Added: array.cycle([count])
will move array backwards or forwards in-place as it were a conveyor belt.
{1, 2, 3}.cycle()
Will make it:
{3, 1, 2}
Accepts a negative value as a shift to move different direction
Changed: string.format()
Now actually faster than string concatenation in eScript
Fixes a bug where {:d} formating could cause an arbitrary number shown instead of a real value
tag errors are slightly more intuitive and compact.
Note: Patches submitted by andenixa
2015-07-27 19:17:49 +02:00
frozenblit
ab592b0bf6 Instead of .c_str(), the log will take a copy of the formatter string 2015-05-16 16:00:26 +02: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
e0b722a93b fixed several uninitialized variables 2014-08-30 12:25:08 +02:00
turley
05c5b2d60b removed old code
testing a threadpool 
added chr.last_textcolor member which returns the clientside chatcolor
2014-06-01 09:59:12 +00:00
turley
21723568bc fixed some minor crashes 2014-03-22 08:30:02 +00:00
frozenblit
cbc05e909d New member for the Character class: chr.temporally_criminal will return true if a criminal timer is running
Note that chr.criminal returns true when a criminal timer is running or character.murderer is true! This behavior has not changed.
2014-03-01 17:15:22 +00: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
ad5b5ddffa Added: character.DisableSkillsFor( duration ) method to disable skills that are started with start_skill_script or by scritps defined in attributes.cfg for duration ( seconds )
This method overrides the default Delay setting in attributes.cfg if used ( for example if on failing a skill you want no delay just set it to 0 )
             This can also be used to disable skills for example during an event or pvp
    Added:   item.name_suffix for adding crafter marks or such
             item.desc returns the formatted name and suffix added to it without formatting if it exists
             item.name does not include this suffix, so that can be used to get the item name without formatting and without suffix
2013-09-25 18:43:43 +00:00
turley
b0338db350 some c++11 changes 2013-09-21 09:45:04 +00:00
dsourc
b8a0cdfadd Added Weapon RW member .speed_mod
Changed Weapon RW member .dmg_mod to dynamic
Fixed in UContainer set_script_member functions the new members to cast correctly the values to short from int
2013-09-03 11:14:56 +00:00
dsourc
6fd2500e99 Added Container RW members .max_items_mod .max_weight_mod and max_slots_mod
Fixed a possible problem with max_slots where it was reading the default value from ssopt instead of desc value
Fixed the set part of dynamic members so that during server restarts it doesnt fill the map for nothing if the value is 0 and when setting the value to 0 whenever removes it from the map
2013-09-02 16:35:38 +00:00
frozenblit
4fed077538 Added string formatter from andenixa. Missing: write tests!
(http://forums.polserver.com/viewtopic.php?f=41&t=5078)
2013-08-27 22:11:09 +00:00
turley
3a37cd1006 Added: string methods:
str.length() : returns like len(str) the length of the string
str.upper() : returns like upper(str) the uppercase version and also modifies the str
str.lower() : returns like lower(str) the lowercase version and also modifies the str
str.find(Search,[Start]) : returns like Find(string, search, start) the index of the first occurance of 'search' after 'start' within str
but unlike the basic.em function the Start parameter is optional if not given it searches the whole string
str.join(array) : returns a string which is the concatenation of the array elements, seperated by str
2012-11-16 16:27:26 +00:00
turley
e6851b8b99 more codecleanup 2012-10-06 09:54:20 +00:00
turley
81bf53a069 Added: ecompile parameter -wP
Added:      ecompile.cfg entry ParanoiaWarnings
  Note:       since "{}" is valid syntax, only complain about it if ParanoiaWarnings is enabled
2012-10-05 16:47:53 +00:00
turley
15c949d185 added UnitTest for valid member/method definition 2012-09-29 11:10:32 +00:00