Commit Graph
92 Commits
Author SHA1 Message Date
altrisi 86ac49c0ae Fix autocomplete removing all upper-case letters in script run 2022-07-21 15:33:42 +02:00
altrisi 0a972d6c56 Settings rework and encapsulation (#1330)
* Settings rework and encapsulation

* Settings overhaul 3

Move everything in the new system to a new API package

Require rules using the new system to specify descriptions in their translation files

Implement temporary system on top of current translations to allow that to work properly

* Fix getRules fallback

* Final touches to settings refactor

* Mention that set shouldn't throw and remove comment

* Change translation keys to unify with translation PR

* Deprecate printAllRulesToLog to allow using any PrintStream

* Remove restriction of CarpetRules being Comparable

And fix overreaction in a deprecation message

* Bring back user input to rule observers

* Make Validator deprecation warning not spam on use

* Remove unneeded abstract methods in CarpetRule already inherited from CarpetRule

They literally do nothing, don't even force them to be implemented, and may be confusing as to why they're there or as if they are needed to be implemented

* Fix legacy SettingsManager field not being assigned correctly

* Finish fixing conflicts from future merge

* Actually fix remaining conflicts from future merge (missing imports)

* Import the newer rule in SettingsManager

* Refactor Validators

* Don't spam deprecation warnings on custom managers

* Get out the var

* Fix missing warning in old rule observers

* Update src/main/java/carpet/api/settings/Rule.java

* Remove `@ApiStatus.Experimental` annotations

* Fix incorrect `@deprecated` javadoc tags

By removing them given the class is deprecated anyway and else there's too much noise

* Add missing static import

* Remove TypedField and use a regular field

I liked that class tbh, but it's true that it wasn't really needed

* Move `field` assignment out of for removal

* Fix not following contract of `type()` returning boxed value

Previously handled by TypedField

* Fix few incorrect translation keys

* Remove resaving of comments when saving config files

Comments ignoring is still a thing when reading, so `locked` configs for example will keep comments

* Condense rule load messages in one

* Only print loaded settings message when at least one setting was changed

* Fix legacy validator detector

* Tweak and add more context to response to invalid values

* Fix strict validator not actually erroring on invalid input
2022-06-27 13:12:15 +02:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
altrisi 06af9ce8b1 Migrate the Carpet codebase to Mojang Mappings 2022-01-24 20:33:16 +01:00
gnembon fe6018a43b allowing event callbacks be added concurrently (e.g. registered event while handling some other events), with safe event pruning. fixes #1193 fixes #889 2021-12-06 01:02:37 +01:00
gnembon af368a159d Merge branch '1.17' 2021-07-14 00:26:22 -03:00
altrisi cca9d2ec7e Provide script download suggestions async (#986) 2021-07-11 07:43:11 -03:00
gnembon 4f77327b6c Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/script/utils/AppStoreManager.java
2021-06-30 13:33:10 -03:00
altrisi 97e69d347e Change how resource type works, allow proper app and library installation (#956)
* Change how app store types work, allow proper app and library installation

* Add node for resources in dependencies and docs

* Fix NPE without `type`

* Fix docs trying to change location of app type resource

* Separate libraries and apps and add trash for them

* Update docs

* Create trash directory if it doesn't exist
2021-06-30 12:42:24 -03:00
gnembon 1a152ce20a Merge branch 'master' into 1.17 2021-06-25 23:50:39 -03:00
gnembon 8fa54c8146 stack overflow in scripts shouldn't crash the game, fixes #934 2021-06-25 23:31:46 -03:00
gnembon e2dfbc5bdd Merge branch 'master' into 1.17 2021-05-27 01:56:13 -03:00
gnembon 328ded0537 added /script remove app command 2021-05-27 01:54:26 -03:00
gnembon b96a1b1216 Merge branch 'master' into 1.17 2021-05-25 17:25:55 -03:00
gnembon f18cc1c836 more thread safe carpet globs 2021-05-25 17:24:14 -03:00
gnembon cab37358ed Merge branch 'master' into 1.17 2021-05-25 00:41:29 -03:00
gnembon db9039c02a added app resources for apps from appstores 2021-05-25 00:41:06 -03:00
gnembon 95d8c5fd90 Merge branch 'master' into 1.17 2021-05-22 22:14:43 -03:00
gnembon dbae5813f0 added framework for auto resource fetching for the apps 2021-05-21 22:31:02 -03:00
gnembon 74cc9a39e1 Merge branch 'master' into 1.17 2021-05-21 14:14:18 -03:00
gnembon 79fb489ab7 renames 2021-05-21 14:13:50 -03:00
gnembon 84dd972758 Merge branch 'master' into 1.17 2021-05-21 04:42:21 -03:00
gnembon 4466c77780 small refactor, customizable appstore, minimize app calls. 2021-05-21 03:50:38 -03:00
gnembon 866f1f1497 moved downloader 2021-05-19 20:46:19 -03:00
Ghoulboy 5f16ffd933 Adding /script download (#826)
This reverts commit e98adb77a52d1e274ec320e0cafab34b24c1c738.

* First attempt at creating download system...

* Last try, I had uncommitted changes which I forgot to add.

If it fails now i swear imma delete my fork of fabric carpet.

* OK, this is the last chance. I have checked and double checked, this should not fail.

Todo make them more detailed, Im not the best person to do that tbh...

* Towards a suggestion builder

(Also committing stuff in ScriptDownloader incase it crashes)

* Finished first theoretically functional draft of suggestion builder

* improving suggestion building with actual github api

* Collapsing identical error messages

* Got suggestions to work!

Now gotta get the actual file to save to disk properly

* replacing whitespace with url whitespace to make it read form 'creativ building tools' etc

* Successfully downloaded script into folder location!

* only clients can access global scripts folder, so don't want to cause error message

* Compacting code and updating docs

* Fixed getting folders from file names
2021-05-19 17:30:39 -03:00
gnembon 0367170bac Merge branch 'master' into 1.17 2021-04-29 02:17:17 -03:00
gnembon 06c9aea326 tracking module integrity when module composition changes 2021-04-29 02:17:02 -03:00
gnembon 9b9251190b Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/network/ClientNetworkHandler.java
#	src/main/java/carpet/script/utils/ShapesRenderer.java
2021-04-06 00:44:16 -03:00
gnembon 647a3a15b6 profiler rework 2021-04-06 00:41:12 -03:00
gnembon 0cce983092 Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/commands/PerimeterInfoCommand.java
#	src/main/resources/carpet.mixins.json
2021-04-04 22:34:38 -03:00
gnembon f0d044a49f added scarpet to the carpet profiler 2021-04-04 22:32:34 -03:00
gnembon 5dd2a12aa7 mapping 2021-04-02 18:38:55 -03:00
gnembon 0320de5d6d 21w13a 2021-03-31 22:02:09 -03:00
gnembon 1bd6dcbf12 rework on shapes. Labels are showing up, but lines don't. 2021-03-16 15:31:58 -03:00
gnembon 42f78a596a 20w10a
- broken scarpet shapes
2021-03-10 23:13:59 -04:00
gnembon d29f49967f rework of the event system, allowing apps to function more independently and allowing for player scoped apps to handle global events. fixes #596 2020-12-02 01:02:36 -04:00
gnembon 209c3b9262 fixed issues with reload and missing command handler 2020-11-24 22:52:05 -04:00
gnembon a297fd1441 Scarpet rules can provide multinary boolean permission level, fixes #572 2020-11-23 02:35:01 -04:00
gnembon b00b5772c9 player doesn't attack in continuous and fixed event suggestions fixes #552. 2020-11-16 20:02:47 -04:00
gnembon 55643632ca custom events, and low level event API 2020-11-11 02:06:45 -04:00
altrisi b9eee6e58b Allow rules to manage Scarpet apps (Scarpet Rules) (#519)
by altrisi
2020-11-02 21:52:21 -04:00
gnembon 1d81768c54 custom args WIP 2020-11-02 01:32:04 -04:00
gnembon 7ccd46433a entity load handler and rework of handling of events. 2020-10-30 22:59:27 -03:00
gnembon 8a2ddcbf2a 1.4.12 2020-10-01 14:14:01 -03:00
gnembon 3105d5bb71 Events are defined statically in normal classes and added handler for extensions to add their built-ins 2020-09-08 23:47:31 -03:00
gnembon 1006e0ac40 commands return integer value if possible, fixes #408
handle infinite values as infinities.
2020-09-05 02:06:59 -03:00
gnembon 3167fe06f3 cleanup unused code and mixins 2020-08-18 01:54:24 -03:00
gnembon eaded1450d apps when loaded while being loaded are now properly reloaded 2020-08-15 02:32:32 -03:00
gnembon e67ec14285 mappings 2020-07-20 21:06:03 -03:00
gnembon 583e023eb1 Merge branch 'master' into 1.16 2020-03-18 02:01:01 -03:00