Commit graph

100 commits

Author SHA1 Message Date
Ramon Bernardo
f849a53294
refactor(tile): unify house tile access and checks with removing dynamic cast (#5054)
Co-authored-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
2025-11-19 08:58:14 +01:00
júni
66a666850e
fix(houses): clear ownerName after house sale
clear ownerName after house sale
2025-10-12 11:35:44 -04:00
Marcin Jałocha
04f6cab87c
Use shared_ptr for Inbox (#4880) 2024-12-21 20:46:36 +01:00
Ranieri Althoff
86b4fefd0b
Use Town as plain Lua table (#4764) 2024-11-04 20:43:53 -03:00
unclecellphone
fbe7125055
Fix issues with house invites string cases (#4753) 2024-10-29 23:36:24 -03:00
Ramon Bernardo
187a517a77
Use Guild shared_ptr instead of raw pointers (#4682)
* Use Guild shared_ptr

* Member rank level default to constexpr

* Use const when possible

* @ramon-bernardo
Use const when possible

* Use shared_ptr alias

* Fix

* Fix

* Fix

* Fix

* Fix delete

* Fix

* No need to reuse the variable

* Use const shared ptr

* Use const& ptr

* Inline rank check
2024-05-26 11:11:31 +02:00
Ranieri Althoff
73032fa7d4
Move config manager singleton to namespace (#4653) 2024-04-27 00:48:25 -03:00
Ranieri Althoff
498448f661
Run clang-format with updated Ubuntu image (#4659)
* Run clang-format with updated Ubuntu image

* Run clang-format on workflow modification and dispatch

* Drop sudo from apt invocation

* Install clang-format from llvm repository

* Merge strings
2024-04-25 11:21:49 -03:00
Ranieri Althoff
1fcb5c27e6
Reformat files with updated clang-format (#4654) 2024-04-21 00:58:17 -03:00
Ranieri Althoff
a295ea7b88
Use string views to avoid copying strings (#4079) 2023-03-08 21:49:18 -03:00
Marco Oliveira
545516299b
Update copyright year (#4331) 2023-02-18 20:10:02 -03:00
dcsee7
4b6a1a409d
Reset rent warnings upon successful payment. (#4185) 2022-07-19 03:01:49 -03:00
Ranieri Althoff
412950218c
Add code formatting with clang-format (#4029)
- Use base Google style
- Drop column limit override
- Format all files
- Use tabs for indentation
- Move system headers after project headers
- Avoid breaking string literals
- Reflow usage text
- Match breaks before braces and colons to previous style
- Reduce spaces before trailing comments
- Reflow comments and fix macro usage in luascript.cpp
- Fix invalid code
- Don't align newline escapes
- Reflow comment to make more sense
2022-04-13 14:06:08 +00:00
Ranieri Althoff
2f26b7db6c
Use existing boost algorithms where available (#4032) 2022-03-21 21:54:08 -04:00
Ranieri Althoff
c3596491a3
Cleanup & organize includes and PCH (#4019) 2022-03-18 16:20:02 -04:00
Evil Puncker
14d6020158
Fully moved item descriptions to Lua (#3869) 2022-03-12 10:32:51 -05:00
Evil Puncker
2f8a2afb3b
Add AUTHORS file and remade source header (#3969) 2022-02-22 19:41:21 +01:00
Erza
99a26db720
Fix certain scenarios where the house protection would fail to apply (#3904)
Fixes these scenarios:
1. Still being able to remove or add items from a container that is placed inside of a house tile, if the container was already open prior to being uninvited from the house

2. Being able to use useable items, like runes out of a house door or from a container placed in a house door, if it was already open prior to being uninvited from the house
3. houseTile always being nullptr inside of Container::queryRemove, since the cast was not done properly, and even after fixing the cast, it had wrong behaviour afterwards
2022-02-05 06:36:05 +01:00
Ramon Bernardo
a4c988290a
Use TFS code style on comparison and boolean check (#3725) 2021-10-31 12:28:02 -04:00
Ramon Bernardo
c3354a7162
Change std::ostringstream usage to fmt::format (#3430) 2021-06-20 01:10:04 -06:00
nekiro
f1f5063a22
Change int to uint16_t for consistency (#3392) 2021-04-07 01:53:43 -04:00
Michał "Gubihe
8404edeff8
removed several unnecessary whitespaces from files (#3375) 2021-03-25 11:13:43 -03:00
Evil Puncker
4ade6a0e6b
Fixed a few typos in comments (#3336) 2021-02-21 22:34:23 -05:00
ninjalulz
7639b6a72f
Use shared_ptr for GuildRank (#3062)
Fixes #2561
2020-06-08 20:58:19 -04:00
Evil Puncker
ac187be1a0
config: option to disable showing house price via door (#3061)
part of #2879
2020-06-08 20:47:52 -04:00
Sarah Wesker
20f50a034e
config: houseOwnedByAccount (#2935)
This enables or disables the possibility that characters from the same account automatically become "owners" and have full access to the house.
2020-04-29 19:35:48 -04:00
Daniel Speichert
bc209855f1
House AccessList: drop support for regular expressions (#2965)
This change removes support for house access list lines using:
* regular expressions (? for single character, * for many characters)
* exclusions (lines starting with !)

After this change:
* Guild name and guild rank is still supported.
* A line with "*" is supported to allow everyone - this must be the only character in that line
* Access list is limited to 100 entries and each entry can be max 100 characters long.
2020-04-28 23:10:52 -04:00
Lucas CP
b7ef46dfc7 Update copyright for 2019 (#2590) 2019-05-13 14:22:45 +02:00
Vítor Cardoso Bertolucci
e8a8ce1228 Updates paidUntil according to rentPeriod on buying a house (#2527)
* Updates paidUntil according to rentPeriod on buying a house

* Fix identation

* Doesn't reset paidUntil when changing owners
2019-02-08 16:18:34 +01:00
vankk
020ed5fd36 Update copyright for 2018 (#2452) 2018-03-05 00:39:47 +01:00
Daniel Björkholm
5d7e54a597 Fix AccessList::addGuildRank typo 2017-12-19 01:19:07 +01:00
Ranieri Althoff
06bf9c9ec1 Support adding guild ranks to access lists (#2309)
* Add helper functions to fetch guild ranks
* Add helper function to load guild by id
* Support adding single guild ranks to access lists
Fixes #2240
2017-12-18 03:18:31 +01:00
Ranieri Althoff
166bb2a50d Fix double door listing on houses (#2075) 2017-03-17 15:16:20 -03:00
Ranieri Althoff
2ffd686f3b
Use return by reference on singletons 2017-01-01 16:26:09 -02:00
Bruno Minervino
cc8e15e916 Update copyright year for 2017 (#2034) 2017-01-01 15:39:31 +01:00
Ranieri Althoff
33d074fe1c Use default constructors where possible, else simplify them (#1917) 2016-09-14 14:10:26 +02:00
Kornelijus Survila
b9ec7a6f55 Use default member initialization 2016-09-08 18:41:34 -05:00
Ranieri Althoff
4fa8f3a225 Remove most of underscore names (#1756) 2016-04-10 20:22:32 +02:00
Mark Samman
23e9f46829 Update copyright year
Happy new year!
2016-01-01 02:07:18 +01:00
Mark Samman
0510009cfb Use range-based for loop for XML children iterators 2015-05-04 23:12:39 +02:00
Ranieri Althoff
dfdf8be6c8 Remove unused imports 2015-04-29 17:27:37 -03:00
Mark Samman
26021f1610 Code improvements
Using booleans in config.lua (strings are still supported for backwards
compatibility)
Improved maintainability of existing enums
Removed unused enums
Reduced memory footprint of item abilities
2015-03-30 01:37:55 +02:00
Mark Samman
bf47795bad Code improvements 2015-03-19 00:41:50 +01:00
Mark Samman
7db565f9f3 Rewrite transformItem code for when alwaysOnTop differs
Canopy beds should now properly transform without the temporary top
order attribute hack in items.xml
2015-03-15 23:12:29 +01:00
dalkon
9b2e1b6cc9 Show where XML errors occur.
Closes #529
2015-03-11 13:05:55 +01:00
Kornelijus Survila
a25936dd9e Removed Houses singleton 2015-01-19 06:06:14 -06:00
Kornelijus Survila
fece719b42 Removed Towns singleton 2015-01-19 05:52:44 -06:00
Kornelijus Survila
c8ddafcf2b Removed reserved prefix from Cylinder functions 2015-01-08 12:00:44 -06:00
Mark Samman
3349be4745 Update copyright year 2015-01-02 21:32:52 +01:00
Mark Samman
e20dba8cdd Major cleanup/refactoring
This commit breaks backwards compatibility with breakchance and
ammoaction in items.xml and also certain global event names. Break
chance and action for weapons are now specified in weapons.xml and can
be applied to any weapon. This commit also removes the config option
"removeAmmoWhenUsingDistanceWeapon" as there were issues with that and
it is preferred that end-users configure actions for their weapons
(which provides better customizability) instead of having a global
variable that toggles it for every weapon.

Closes #1125
2014-12-30 02:41:09 +01:00