-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUSS #3302
HUSS #3302
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//================= Hercules Database ========================================== | ||
//= _ _ _ | ||
//= | | | | | | | ||
//= | |_| | ___ _ __ ___ _ _| | ___ ___ | ||
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| | ||
//= | | | | __/ | | (__| |_| | | __/\__ \ | ||
//= \_| |_/\___|_| \___|\__,_|_|\___||___/ | ||
//================= License ==================================================== | ||
//= This file is part of Hercules. | ||
//= http://herc.ws - http://github.com/HerculesWS/Hercules | ||
//= | ||
//= Copyright (C) 2014-2024 Hercules Dev Team | ||
//= Copyright (C) 2017 Smokexyz | ||
//= | ||
//= Hercules is free software: you can redistribute it and/or modify | ||
//= it under the terms of the GNU General Public License as published by | ||
//= the Free Software Foundation, either version 3 of the License, or | ||
//= (at your option) any later version. | ||
//= | ||
//= This program is distributed in the hope that it will be useful, | ||
//= but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
//= GNU General Public License for more details. | ||
//= | ||
//= You should have received a copy of the GNU General Public License | ||
//= along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
//============================================================================== | ||
//= Storage Configuration | ||
//============================================================================== | ||
//= @Format Notes: | ||
//= - There can be an unlimited amount of storages and limits. | ||
//= - All setting names are case-sensitive and must be keyed accurately. | ||
//= - It is not recommended to set the maximum storage capacity over 1000 items. | ||
|
||
storage_conf: ( | ||
/****************************************************************************** | ||
********************************* Entry structure ***************************** | ||
******************************************************************************* | ||
{ | ||
Id: (int) (required|unique) Unique Identifier | ||
Name: (string) (required) Name of the storage sent to the client. | ||
Capacity: (int) (required) Maximum capacity of the storage. | ||
} | ||
*******************************************************************************/ | ||
{ | ||
// DO NOT EDIT THIS ENTRY! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indent issue here |
||
// This is the default (official) storage for an account. | ||
Id: 1 | ||
Name: "Storage" | ||
Capacity: 600 | ||
}, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add an empty line at the end of the file, this makes it friendlier for diffs/version control systems. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6164,7 +6164,9 @@ has no gear, script will be terminated with an error. | |
//===================================== | ||
--------------------------------------- | ||
|
||
*openstorage() | ||
*openstorage(<storage_id>{, <storage_mode>}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. splitting access logic and id logic into separate commits would be better |
||
|
||
Default Storage Access Mode: STORAGE_ACCESS_ALL | ||
|
||
This will open character's Kafra storage window on the client connected to | ||
the invoking character. It can be used from any kind of NPC or item | ||
|
@@ -6176,13 +6178,19 @@ storage window, to avoid any disruption when both windows overlap. | |
|
||
mes("I will now open your stash for you"); | ||
close2(); | ||
openstorage(); | ||
openstorage(STORAGE_TYPE_MAIN); | ||
end; | ||
|
||
The mapflag 'nostorage' when set to type '2' (or 3), will not open the | ||
account storage. Unless the character group has the permission 'bypass_nostorage'. | ||
In case blocked by mapflag, returns 0. | ||
|
||
Storage Modes: | ||
STORAGE_ACCESS_VIEW // View storage only | ||
STORAGE_ACCESS_GET // Allow getting items from storage. | ||
STORAGE_ACCESS_PUT // Allow putting items to storage. | ||
STORAGE_ACCESS_ALL // Allow all actions. | ||
|
||
--------------------------------------- | ||
|
||
*openmail() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#1718685120 | ||
|
||
-- This file is part of Hercules. | ||
-- http://herc.ws - http://github.com/HerculesWS/Hercules | ||
-- | ||
-- Copyright (C) 2013-2024 Hercules Dev Team | ||
-- | ||
-- Hercules is free software: you can redistribute it and/or modify | ||
-- it under the terms of the GNU General Public License as published by | ||
-- the Free Software Foundation, either version 3 of the License, or | ||
-- (at your option) any later version. | ||
-- | ||
-- This program is distributed in the hope that it will be useful, | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
-- GNU General Public License for more details. | ||
-- | ||
-- You should have received a copy of the GNU General Public License | ||
-- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
ALTER TABLE `storage` ADD `storage_id` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `account_id`; | ||
|
||
INSERT INTO `sql_updates` (`timestamp`) VALUES (1718685120); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add an empty line at the end of the file |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,4 @@ | |
2022-01-05--19-00.sql | ||
2022-10-08--08-35.sql | ||
2022-05-21--29-49.sql | ||
2024-06-18--12-32.sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the removal of
storagelist
permission and@storagelist
atcommand intentional? I did not see this mention on the PR nor commit message about why this atcommand is being removedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, this PR is just #2724 rebased, so it has the same caveats as the original. Which includes no default storage and not having implemented some conveniences like
@storagelist
command. Do keep in mind this got the point of "no changes requested by team" before being entirely forgotten by said team and rendered un-mergeable. Most issues you pointed out either weren't considered an issue in the original or are just maintenance upkeep. Large, complex, non-urgent PRs like this one suffer from an unreasonably large maintenance upkeep. Usually something with only two or one or none of these three attributes get in, breaking the PR and thus the high maintenance upkeep. Honorable mention to #466 which is another good example of death by upkeep....Although for these design decisions you can ask @dastgirp as they are the original author, I guess? I don't think they'll remember much though, it has been four years already.
(To be more clear and if memory serves as it's been a long time since I looked at the original,
@storagelist
will not work with this PR short of a total rewrite of the command, so it was decided to do a regression and remove the command, as it's seldom used and out of scope, from the discussions if it should list all storages or take an argument, up to the actual implementation which would add even more stuff to review in an already large PR. There was no objection from the original reviewers).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, this PR is just #2724 rebased, so it has the same caveats as the original. Which includes no default storage and not having implemented some conveniences like
@storagelist
command. Do keep in mind this got the point of "no changes requested by team" before being entirely forgotten by said team and rendered un-mergeable. Most issues you pointed out either weren't considered an issue in the original or are just maintenance upkeep. Large, complex, non-urgent PRs like this one suffer from an unreasonably large maintenance upkeep. Usually something with only two or one or none of these three attributes get in, breaking the PR and thus the high maintenance upkeep. Honorable mention to #466 which is another good example of death by upkeep....Although for these design decisions you can ask @dastgirp as they are the original author, I guess? I don't think they'll remember much though, it has been four years already.
(To be more clear and if memory serves as it's been a long time since I looked at the original,
@storagelist
will not work with this PR short of a total rewrite of the command, so it was decided to do a regression and remove the command, as it's seldom used and out of scope, from the discussions if it should list all storages or take an argument, up to the actual implementation which would add even more stuff to review in an already large PR. There was no objection from the original reviewers).