Add seq diagram line for rejected citation of incinerator

This commit is contained in:
Ladd Hoffman 2023-03-14 21:32:38 -05:00
parent 5ca884686b
commit f3037a766d
1 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,13 @@ export class Forum extends ReputationHolder {
// Only a positive amount may be incinerated! Otherwise the sink could be used as a source.
if (outboundAmount < 0) {
this.scene?.flowchart?.log(`style ${citationEdge.from.id} fill:#620000`);
this.actions.propagate.log(
citationEdge.from.data,
{ name: 'Incinerator' },
`(${increment})`,
undefined,
'-x',
);
throw new Error('Incinerator can only receive positive citations!');
}
// Reputation sent to the incinerator is burned! This means it is deducted from the sender,