File tree 4 files changed +19
-8
lines changed
4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,12 @@ export class PlayerCharacterSheet extends VaesenActorSheet {
309
309
icon : statusEffect . icon ,
310
310
changes : statusEffect . changes ,
311
311
id : this . uuid ,
312
- statuses : statusEffect . statuses
312
+ statuses : statusEffect . statuses ,
313
+ flags : {
314
+ core :{
315
+ statusId : statusEffect . id
316
+ }
317
+ } ,
313
318
} ] ) ;
314
319
}
315
320
}
Original file line number Diff line number Diff line change @@ -137,7 +137,6 @@ export class conditions{
137
137
138
138
static async onVaesenCondition ( actor , conditionId ) {
139
139
let condition = Array . from ( actor . items ?. values ( ) ) . find ( x => x . type == "condition" && x . id == conditionId ) ;
140
- console . log ( condition ) ;
141
140
142
141
await actor . updateEmbeddedDocuments ( "Item" , [
143
142
{ _id : condition . id , "data.active" : ! condition . system . active } ,
@@ -147,7 +146,12 @@ export class conditions{
147
146
label : condition . name ,
148
147
icon : condition . img ,
149
148
id : condition . name ,
150
- statuses : [ condition . name ]
149
+ statuses : [ condition . name ] ,
150
+ flags : {
151
+ core : {
152
+ statusId : condition . name
153
+ }
154
+ }
151
155
} ;
152
156
153
157
const currentEffect = Array . from ( actor . effects ?. values ( ) ) . find ( it => it . icon === statusEffect . icon ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const migrations = {
19
19
async function migrateTo4_0 ( ) {
20
20
const options = { permanent : true } ;
21
21
ui . notifications . warn ( "Migrating your data to version 4.0.0. Please, wait until it finishes." , options ) ;
22
- console . log ( "MIGRATING TO 4.0.0" ) ;
23
22
for ( let actor of game . actors . contents ) {
24
23
const updateData = migrateTo4_0_Actor ( actor ) ;
25
24
if ( ! foundry . utils . isEmpty ( updateData ) ) {
@@ -49,7 +48,7 @@ function migrateTo4_0_Actor(actor){
49
48
if ( ! checked )
50
49
continue ;
51
50
52
- const currentEffect = Array . from ( actor . effects ?. values ( ) ) . find ( it => it . statuses . has ( condition . id ) ) ;
51
+ const currentEffect = Array . from ( actor . effects ?. values ( ) ) . find ( it => it . icon === condition . icon ) ;
53
52
if ( currentEffect )
54
53
continue ;
55
54
@@ -61,7 +60,12 @@ function migrateTo4_0_Actor(actor){
61
60
icon : statusEffect . icon ,
62
61
changes : statusEffect . changes ,
63
62
id : actor . uuid ,
64
- statuses : statusEffect . statuses
63
+ statuses : statusEffect . statuses ,
64
+ flags : {
65
+ core : {
66
+ statusId : condition . id
67
+ }
68
+ }
65
69
} ] ) ;
66
70
}
67
71
const actorLink = get ( actor , "prototypeToken.actorLink" ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ export class VaesenTokenHUD extends TokenHUD {
10
10
11
11
if ( actor . type === "player" ) {
12
12
let ret = super . _getStatusEffectChoices ( ) ;
13
- console . log ( ret ) ;
14
13
return ret ;
15
14
}
16
15
@@ -43,7 +42,6 @@ export class VaesenTokenHUD extends TokenHUD {
43
42
if ( item . type !== "condition" ) {
44
43
continue ;
45
44
}
46
- console . log ( item ) ;
47
45
vaesenActions [ item . img ] = {
48
46
cssClass : item . system . active ? "active" : "" ,
49
47
id : item . id ,
You can’t perform that action at this time.
0 commit comments