Managedeletion
This commit is contained in:
parent
a4abedd4b3
commit
74a2b434c7
@ -836,6 +836,7 @@ export class PegasusActor extends Actor {
|
|||||||
|
|
||||||
// Severe Trauma management
|
// Severe Trauma management
|
||||||
if (this.getTraumaState() == "severetrauma") {
|
if (this.getTraumaState() == "severetrauma") {
|
||||||
|
if ( !this.severeTraumaMessage) {
|
||||||
let chatData = {
|
let chatData = {
|
||||||
user: game.user.id,
|
user: game.user.id,
|
||||||
rollMode: game.settings.get("core", "rollMode"),
|
rollMode: game.settings.get("core", "rollMode"),
|
||||||
@ -843,6 +844,8 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
|
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
|
||||||
ChatMessage.create(chatData)
|
ChatMessage.create(chatData)
|
||||||
|
this.severeTraumaMessage = true
|
||||||
|
}
|
||||||
this.updateEmbeddedDocuments('Item', [{ _id: itemId, 'data.status': "ready", 'data.used1': false, 'data.used2': false, 'data.used3': false }])
|
this.updateEmbeddedDocuments('Item', [{ _id: itemId, 'data.status': "ready", 'data.used1': false, 'data.used2': false, 'data.used3': false }])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1040,9 +1043,14 @@ export class PegasusActor extends Actor {
|
|||||||
if (moralitythreshold != this.data.data.biodata.moralitythreshold) {
|
if (moralitythreshold != this.data.data.biodata.moralitythreshold) {
|
||||||
updates['data.biodata.moralitythreshold'] = moralitythreshold
|
updates['data.biodata.moralitythreshold'] = moralitythreshold
|
||||||
}
|
}
|
||||||
if (!this.warnMorality && this.data.data.biodata.morality < 0) {
|
if ( !this.isToken) {
|
||||||
|
if (this.warnMorality != this.data.data.biodata.morality && this.data.data.biodata.morality < 0) {
|
||||||
|
console.log("CHAR", this)
|
||||||
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
||||||
this.warnMorality = true
|
}
|
||||||
|
if (this.warnMorality != this.data.data.biodata.morality) {
|
||||||
|
this.warnMorality = this.data.data.biodata.morality
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let race = this.getRace()
|
let race = this.getRace()
|
||||||
|
@ -183,6 +183,6 @@
|
|||||||
"templateVersion": 96,
|
"templateVersion": 96,
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "0.6.6",
|
"version": "0.6.7",
|
||||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@
|
|||||||
<span class="small-label padd-right packed-left"> Current</span><input type="text"
|
<span class="small-label padd-right packed-left"> Current</span><input type="text"
|
||||||
class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}"
|
class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
<a class="current-nrg-minus plus-minus-button"> -</a>/<a class="current-nrg-plus plus-minus-button">+</a>
|
<a class="current-nrg-plus plus-minus-button">+</a>/<a class="current-nrg-minus plus-minus-button"> -</a>
|
||||||
<span class="small-label padd-right packed-left"> Mod</span><input type="text"
|
<span class="small-label padd-right packed-left"> Mod</span><input type="text"
|
||||||
class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}"
|
class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
|
Loading…
Reference in New Issue
Block a user