1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Switch list patching to more user-friendly 1-based indexing

This commit is contained in:
Ivan Savenko
2025-03-30 17:18:47 +03:00
parent 4dc82284b4
commit 58a6aabd4c
2 changed files with 5 additions and 5 deletions

View File

@@ -180,13 +180,13 @@ More complete description of such syntax:
"appendItems" : [ "crossbowman", "arbalist" ]
// insert new item before specified position
// NOTE: VCMI assume 0-based indexation, the very first item has index '0'
// NOTE: VCMI assume 1-based indexation, the very first item has index '1'
// Following example will insert new item before 0th item - at the very beginning of the list
// Item with provided index must exist in the list
"insert@0" : "crossbowman"
// modify existing item at specified position
// NOTE: VCMI assume 0-based indexation, the very first item has index '0'
// NOTE: VCMI assume 1-based indexation, the very first item has index '1'
// Following example will modify 0th item
// If item is a json object with multiple properties, e.g. { "key" : "value" }
// you only need to provide changed properites, as usually