The style used on the presented commits is a little all over the place (some code lives on the DataModel, some on the VueSheet, some elsewhere, etc), there are a few reasons for this.
I want to see which one makes the most sense in preparation for the refactoring that will eventually happen.
I'm moving code to the data model to have an idea about future support for macros and modules.
I'm looking into how to generalize code and reuse it in multiple places.
Most, if not all, of the commits are "unsafe". What I mean by this is that building at a specific commit, instead of at the last one, might not produce a functional and stable version of the system. The amount of changes is so big that doing each commit incrementally would be a hassle given how I'm working on this.
Commit c0e126b1fbadadbfb3188058a65a56acdd0d00ac
The inventory area is now larger even when there is no inventory. This should facilitate dropping items to vehicles.
When transferring between inventories the effects of the source actor are copied to the new actor
This is useful, for example, when an inventory item has an effect that gets updated by the users over time. Now the updated value is also transferred instead of using the default/initial value stored on the item.
Made a small typing change to Active Effects
Initial effect value:
Modified effect on the source actor:
Modified effect on the target actor:
Commit 4da191814a73509879099a707fe2ee82eacaed5f
Prevent the linter from removing boolean casting with the !! method. If the casting is removed then the interpreter complains that the value is always true due to the typing.
Provide better typings for the game and ui FoundryVTT objects.
Made a change to the EffectsWereNotUpdatedAfterTransfer. Still not convinced with either phrase.
Commit a83d0d199c71aa27e42780b0b9700797adb5e69b
Provide better typings for the game and ui FoundryVTT objects, again. Also enhances the settings object types.
Commit d06354c16facb0a582cc18507bdbc71e8b018e8f
Reduces code/logic duplication while loading the settings values to the CONFIG object.
Adds a skills array to the CONFIG.genesys which contains a reference to all the skills in the skills compendium.
Modified the language files to remove a reference to creating an actor when we are trying to load the skills to the CONFIG object.
Commit 0ec582b1ba65a74e31b204c1bd835a0d7605e750
Simplifies the data we pass to the dice prompt.
The skill tab will now only show actors that still exist.
The actors will be listed with all the skills relevant to the roles they're in, even if they don't have the skill listed on their sheet (this is more relevant for adversaries that are added to the vehicle).
All role skills for every actor
Commit e97e0e0a3b930b59f515c98a5f82ae6f9c0e33b6
Rename InventorySortSlot to SortSlot since we use it in other places as well.
Commit 9ae32679eaab48c6e5affe0cdd719b1606e202e0
Changes the way we check if a type is relevant to a context.
Moved operations that were being done on the "Inventory" and "Crew" tab to the VehicleDataModel.
Changed the schema for the actors that are being stored on the vehicle.
Added a hook to delete references to actors that have been deleted from the vehicles
We also keep the array of vehicles up to date to maximize performance.
Added a new EquipmentState which will be used at some point in the future 🤞
Added the activeGM getter to the users object, which is available on FVTTv11. There should be fallback code whenever we use this to maintain compatibility with FVTTv10
Commit d38418425e9cefc6e86bf154b87529697f925cc7
Added types related to drag and drop
Added code used to handle transferring items between two actors.
Also made changes to the vehicle's Combat tab so that the popup that appears when using a weapon or repairing a critical hit also shows actors from roles that have the necessary skills, even if the actors themselves don't have them innately.
Added a warning when there are no actors that meet any of the criteria for using a weapon or repairing a critical hit.
Commit 19888a05af0bfd68a79895edf67cb9667e75c8d4
Made changes to the drag and drop data from ActorTile so that the it follows the new format.
The InventoryItem component now handles transferring between actors.
The Role component now show an actor if it exists in the world.
Commit 00ac37c08211d3602e2234ffa84dfde481282b6b
Dropping certain items into a vehicle has a default behavior if it hasn't been handled by any other part of the sheet.
Dropping actors into a vehicle has a default behavior if it hasn't been handled by any other part of the sheet.
The vehicle's Crew tab now uses the new drag and drop data format which allows transferring actors between vehicles and dropping from the folders and Compendium.
Actors can be directly dropped from a vehicle to the canvas.
The vehicle's Inventory tab now uses the new drag and drop data format which allows transferring items between vehicles and actors, as well as dropping from the folders and Compendium.
Dragging into the inventory now trigger proper highlights
Dropping appropriate items into a sort slot properly places the dropped item at that spot.
Transferring between actors triggers highlight
Transferred items can be dropped at specific sort locations
Dropping an actor from the vehicle into the canvas
Actor token placed on the canvas
Commit df43510541c11295ce3e7f99268aeaa7568f3f6e
Made changes to the CharacterDataModel to match the changes done for VehicleDataModel.
Changed the messages shown when creating a new character and the skills compendium wasn't setup properly.
Reorganized the character's sheet code and added checks for context types
Properly setup highlights for containers
The character's Inventory tab now has similar functionality to the vehicle's matching tab.
Commit 361f5a831cbee5ddc1b9f2be7eab6d58dfd441f6
Made changes to the AdversaryDataModel to match the changes done for VehicleDataModel.
Reorganized the adversaries' sheet code and added checks for context types
Inventory items from characters or vehicles can be copied (not transferred) to adversaries. Inventory items from adversaries can't be transferred/copied.
Some miscellaneous linter/prettier changes
Commit ff740f13470b67e3522ec1abc9360ec532b4e491
Adds code to the VehicleDataModel which is used to facilitate the migration to the new format for storing actor references.
Fixed an error where inventory items couldn't be dropped into adversaries.
General Notes
Commit c0e126b1fbadadbfb3188058a65a56acdd0d00ac
Initial effect value:![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/6f82d4af-1947-463d-b809-88a0149cd21b)
Modified effect on the source actor:![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/10675820-7048-433b-a124-7a50ce1f5588)
Modified effect on the target actor:![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/dba8c5cc-94a5-4800-89d8-8deb6627673b)
Commit 4da191814a73509879099a707fe2ee82eacaed5f
!!
method. If the casting is removed then the interpreter complains that the value is always true due to the typing.game
andui
FoundryVTT objects.EffectsWereNotUpdatedAfterTransfer
. Still not convinced with either phrase.Commit a83d0d199c71aa27e42780b0b9700797adb5e69b
game
andui
FoundryVTT objects, again. Also enhances thesettings
object types.Commit d06354c16facb0a582cc18507bdbc71e8b018e8f
CONFIG
object.skills
array to theCONFIG.genesys
which contains a reference to all the skills in the skills compendium.CONFIG
object.Commit 0ec582b1ba65a74e31b204c1bd835a0d7605e750
All role skills for every actor![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/bb2312a0-3ae8-467c-ae50-2baa05ebf0b9)
Commit e97e0e0a3b930b59f515c98a5f82ae6f9c0e33b6
InventorySortSlot
toSortSlot
since we use it in other places as well.Commit 9ae32679eaab48c6e5affe0cdd719b1606e202e0
VehicleDataModel
.EquipmentState
which will be used at some point in the future 🤞activeGM
getter to the users object, which is available on FVTTv11. There should be fallback code whenever we use this to maintain compatibility with FVTTv10Commit d38418425e9cefc6e86bf154b87529697f925cc7
Commit 19888a05af0bfd68a79895edf67cb9667e75c8d4
ActorTile
so that the it follows the new format.InventoryItem
component now handles transferring between actors.Role
component now show an actor if it exists in the world.Commit 00ac37c08211d3602e2234ffa84dfde481282b6b
Transferring between actors triggers highlight![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/dbc45635-3171-434e-ae32-10afaa71964d)
Transferred items can be dropped at specific sort locations![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/6ab87a37-b8a5-419d-af0b-142bfe859a8b)
Dropping an actor from the vehicle into the canvas![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/1ade344a-e109-4b1b-83a1-13c49af01c02)
Actor token placed on the canvas![image](https://github.com/Mezryss/FVTT-Genesys/assets/1728535/cd1312ae-b7ac-41b7-8a10-b8c00934f24c)
Commit df43510541c11295ce3e7f99268aeaa7568f3f6e
CharacterDataModel
to match the changes done forVehicleDataModel
.Commit 361f5a831cbee5ddc1b9f2be7eab6d58dfd441f6
AdversaryDataModel
to match the changes done forVehicleDataModel
.Commit ff740f13470b67e3522ec1abc9360ec532b4e491
VehicleDataModel
which is used to facilitate the migration to the new format for storing actor references.