Compare commits
116 Commits
foundryvtt
...
master
Author | SHA1 | Date | |
---|---|---|---|
c515e9bc66 | |||
b2e7a8a6e1 | |||
09045c0d53 | |||
4c4e1e8419 | |||
66bcc51102 | |||
32844bbf3c | |||
21d6f14b68 | |||
87a0bece5e | |||
e0f83e9be2 | |||
01c1978ccd | |||
47ae157781 | |||
0c092b9099 | |||
a6d1a84b13 | |||
82e8954d5c | |||
249850558b | |||
45b10f2c6b | |||
d39dac3bf9 | |||
1f5e8c084b | |||
0864721bc5 | |||
4c5685c20b | |||
a618200417 | |||
62eb6482d0 | |||
9b8ea03067 | |||
8090d0280d | |||
c31202fbd3 | |||
146c8d184c | |||
c251727dea | |||
19f5e2af59 | |||
8b2f02d4b0 | |||
03b88a269a | |||
32d016b9ad | |||
a0c1d063f1 | |||
1e5446fcde | |||
f76e0db046 | |||
b7c816129b | |||
c786757db0 | |||
78d4b48aae | |||
0a9e8e0ac6 | |||
5443cb52bb | |||
b232a8fa0c | |||
a68aa29b53 | |||
ccb9cd73f4 | |||
723d1e6b99 | |||
40f99da8ac | |||
76865d24d2 | |||
020824af7e | |||
cc8f432746 | |||
6435ce70da | |||
db9cbc693a | |||
b202352979 | |||
7ddedea204 | |||
2bca036d53 | |||
8f08f95dbf | |||
b5581ff9fb | |||
e06ae1937a | |||
0f7e1ef553 | |||
51afd9020c | |||
1bc5e06147 | |||
7f3a575349 | |||
c26ba66722 | |||
cb105dd311 | |||
76c88e530e | |||
03839397ce | |||
74ddc8893a | |||
790aa950c3 | |||
4672a3a7d6 | |||
2a8ab5e1ce | |||
4aaa72ed1a | |||
f087b61c27 | |||
96c6936c3e | |||
7d27d7d9f9 | |||
0d7ba3be69 | |||
8670456d9a | |||
b2c7ff4927 | |||
680fbee090 | |||
5c6a01b9f4 | |||
d45f5d625a | |||
2b1a9151d7 | |||
3335c41c27 | |||
329ae475d9 | |||
72f8c83caf | |||
d353b6ccaf | |||
a122a2e421 | |||
2465af4413 | |||
817c5d30ad | |||
87440cf7f9 | |||
965e45cead | |||
ac8610cd6c | |||
08cf1f49e1 | |||
4925cee756 | |||
43acbfb443 | |||
9a6fb1a850 | |||
42fb0c0b5e | |||
fa2b125459 | |||
e8d0748688 | |||
2972504640 | |||
3582fa9c8a | |||
d5277137dd | |||
dae852a1e0 | |||
1ea6b66483 | |||
d35f3ce5a2 | |||
bf9e74ef7c | |||
fd73b2c7af | |||
3aa13511cd | |||
94cebbb9e5 | |||
2a1495927f | |||
8d42871988 | |||
868ed01723 | |||
65c90c5bd4 | |||
c16101428a | |||
77d5646497 | |||
1c0c775de3 | |||
e8a59b56a4 | |||
39f6307058 | |||
a532a989d6 | |||
a802307dac |
2
.gitignore
vendored
@ -1,5 +1,3 @@
|
||||
.vscode/settings.json
|
||||
.idea
|
||||
todo.txt
|
||||
todo.md
|
||||
/.vscode
|
||||
|
43
RdD.geany
Normal file
@ -0,0 +1,43 @@
|
||||
[editor]
|
||||
line_wrapping=false
|
||||
line_break_column=72
|
||||
auto_continue_multiline=true
|
||||
|
||||
[file_prefs]
|
||||
final_new_line=true
|
||||
ensure_convert_new_lines=false
|
||||
strip_trailing_spaces=false
|
||||
replace_tabs=false
|
||||
|
||||
[indentation]
|
||||
indent_width=2
|
||||
indent_type=0
|
||||
indent_hard_tab_width=8
|
||||
detect_indent=false
|
||||
detect_indent_width=false
|
||||
indent_mode=2
|
||||
|
||||
[project]
|
||||
name=RdD
|
||||
base_path=/home/morr/work/foundryvtt/foundryvtt-reve-de-dragon
|
||||
description=
|
||||
file_patterns=
|
||||
|
||||
[long line marker]
|
||||
long_line_behaviour=1
|
||||
long_line_column=72
|
||||
|
||||
[files]
|
||||
current_page=8
|
||||
FILE_NAME_0=9759;JSON;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplate.json;0;2
|
||||
FILE_NAME_1=8120;CSS;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fstyles%2Fsimple.css;0;2
|
||||
FILE_NAME_2=19778;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Ftmr-utility.js;0;2
|
||||
FILE_NAME_3=21106;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor.js;0;2
|
||||
FILE_NAME_4=6228;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor-sheet.js;0;2
|
||||
FILE_NAME_5=20083;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Factor-sheet.html;0;2
|
||||
FILE_NAME_6=1312;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-tmr-dialog.js;0;2
|
||||
FILE_NAME_7=1767;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-roll-dialog.js;0;2
|
||||
FILE_NAME_8=266;None;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fpacks%2Fqueues-de-dragon.db;0;2
|
||||
|
||||
[VTE]
|
||||
last_dir=/home/sigmar
|
61
dev-notes.md
@ -1,61 +0,0 @@
|
||||
# Actor notes
|
||||
|
||||
> The Actor#getData default implementation gives you the following for use in sheet rendering:
|
||||
|
||||
```
|
||||
actor -> the Actor instance
|
||||
data -> a cloned copy of Actor#data
|
||||
items -> a cloned copy of Actor#data#items
|
||||
effects -> a cloned copy of Actor#data#effects
|
||||
```
|
||||
|
||||
> if all you need is a safe copy of `Actor#data`, you'll be much better off by simply defining your own function and avoiding all the wasted work that the parent class does which will slow down your sheet
|
||||
```js
|
||||
getData(options) {
|
||||
return {
|
||||
data: foundry.utils.deepClone(this.object.data)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
who knows, maybe you don't even need to copy your actor data, skip the copy and it's even faster:
|
||||
```js
|
||||
getData(options) {
|
||||
return {
|
||||
data: this.object.data
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Atropos19/02/2021
|
||||
There are two recommended ways to create owned items in 0.8.0:
|
||||
```js
|
||||
await Item.create(itemData, {parent: actor});
|
||||
await actor.createEmbeddedDocuments("Item", itemDataArray);
|
||||
```
|
||||
|
||||
|
||||
You can update an embedded item in one of two ways:
|
||||
```js
|
||||
//Method 1:
|
||||
|
||||
const item = actor.items.get(itemId);
|
||||
item.update(data);
|
||||
|
||||
//Method 2:
|
||||
actor.updateEmbeddedDocuments("Item", [{_id: itemId, ...}]);
|
||||
```
|
||||
|
||||
|
||||
I noticed adding an ActiveEffect to an actor in code using
|
||||
|
||||
```js
|
||||
this.createEmbeddedDocuments('ActiveEffect', [effet], options);
|
||||
this.applyActiveEffects();
|
||||
```
|
||||
|
||||
Atropos — Aujourd’hui à 14:42
|
||||
Two notes on this:
|
||||
1. You don't actually need to call this.applyActiveEffects() because this will happen automatically whenever an effect is created/updated/deleted
|
||||
2. If you want to suppress the automatic display of the sheet for the newly created document, you can pass options.renderSheet = false as part of your options object
|
BIN
fonts/goudyacc.woff
Normal file
BIN
icons/botanique/Aigronce.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
icons/botanique/Amandelle.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Amanite thanataire.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Arrache-rêve.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
icons/botanique/Asper violet.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 3.0 KiB |
BIN
icons/botanique/Blèmissure.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Bousille.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.1 KiB |
BIN
icons/botanique/Bélidane.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Calamine.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.4 KiB |
BIN
icons/botanique/Champirigolo.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Cheleuse.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.4 KiB |
BIN
icons/botanique/Chronophile.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
icons/botanique/Clopinettes.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 834 B |
BIN
icons/botanique/Corne de rêve.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
icons/botanique/Croupigne.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Crétamère.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.1 KiB |
BIN
icons/botanique/Endebrume.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
icons/botanique/Endorlotte.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
icons/botanique/Fausse suppure.png
Normal file
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 3.0 KiB |
BIN
icons/botanique/Faux murus.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
icons/botanique/Fesse de groin.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Floume.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
icons/botanique/Fricotille.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.4 KiB |
BIN
icons/botanique/Fumebol.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.1 KiB |
BIN
icons/botanique/Genèfle.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 838 B |
BIN
icons/botanique/Gironcle.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.4 KiB |
BIN
icons/botanique/Herbe de lune.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Hécatombe.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Lulube.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Mercurion.png
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 3.1 KiB |
BIN
icons/botanique/Mignote.png
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
icons/botanique/Murus.png
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
icons/botanique/Mélikasse.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
icons/botanique/Méritoine.png
Normal file
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 3.3 KiB |
BIN
icons/botanique/Nanar.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Noisemûre.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
icons/botanique/Névropenthe.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.6 KiB |
BIN
icons/botanique/Ortigal noir.png
Normal file
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 3.1 KiB |
BIN
icons/botanique/Ortigal rose.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
icons/botanique/Ortigal.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 3.0 KiB |
BIN
icons/botanique/Ortilise.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
icons/botanique/Ortironce.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
icons/botanique/Ossiphage.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 1.8 KiB |
BIN
icons/botanique/Primelune.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
icons/botanique/Sajutte.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
icons/botanique/Salsimir ventru.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
icons/botanique/Salsimir à points jaunes.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.6 KiB |
BIN
icons/botanique/Salsimir à points rouges.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.5 KiB |