Skip to content

Commit

Permalink
Add xml pretiffier and commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Mar 16, 2024
1 parent 00174ef commit 8a8ac97
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/build
/.vs
.vstags
*.pdb
/node_modules
/package*.json*
/translate.*
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tabWidth: 4
useTabs: true
printWidth: 220
xmlSelfClosingSpace: false
xmlWhitespaceSensitivity: ignore
6 changes: 6 additions & 0 deletions 05-prettify.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

REM call npm install prettier @prettier/plugin-xml
call npm exec prettier -- --plugin @prettier/plugin-xml --write "Config/**/*.xml"

pause
8 changes: 1 addition & 7 deletions Config/XUi/controls.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<configs patcher-version="4">

<setattribute xpath="/controls/item_stack" name="on_scroll">true</setattribute>
<setattribute xpath="/controls/item_stack" name="controller">WheelItemStack, InventoryMouseWheel</setattribute>

<setattribute xpath="/controls/backpack_item_stack" name="on_scroll">true</setattribute>
<setattribute xpath="/controls/backpack_item_stack" name="controller">WheelItemStack, InventoryMouseWheel</setattribute>

<modif condition="DarknessFallsCore">

<setattribute xpath="/controls/df_item_stack" name="on_scroll">true</setattribute>
<setattribute xpath="/controls/df_item_stack" name="controller">WheelItemStack, InventoryMouseWheel</setattribute>

Expand All @@ -16,14 +14,10 @@

<setattribute xpath="/controls/df_toolbelt_stack" name="on_scroll">true</setattribute>
<setattribute xpath="/controls/df_toolbelt_stack" name="controller">WheelItemStack, InventoryMouseWheel</setattribute>

</modif>

<modelsif condition="xpath:/controls/kh60_backpack_item_stack">

<setattribute xpath="/controls/kh60_backpack_item_stack" name="on_scroll">true</setattribute>
<setattribute xpath="/controls/kh60_backpack_item_stack" name="controller">WheelItemStack, InventoryMouseWheel</setattribute>

</modelsif>

</configs>
</configs>
4 changes: 1 addition & 3 deletions Config/XUi/windows.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<configs>

<setattribute xpath="/windows//item_stack[@controller='RequiredItemStack']" name="on_scroll">true</setattribute>
<setattribute xpath="/windows//item_stack[@controller='RequiredItemStack']" name="controller">WheelRequiredItemStack, InventoryMouseWheel</setattribute>

</configs>
</configs>

0 comments on commit 8a8ac97

Please sign in to comment.