Merge pull request #3967 from Citadel-Station-13/upstream-merge-32775

[MIRROR] Makes the operation computer tgui
This commit is contained in:
deathride58
2017-11-18 05:38:59 +00:00
committed by GitHub
2 changed files with 118 additions and 74 deletions
@@ -0,0 +1,46 @@
{{#unless data.table}}
<ui-notice>
No table detected!
</ui-notice>
{{/unless}}
<ui-display>
<ui-display title='Patient State'>
{{#if data.patient}}
<ui-section label='State'>
<span class='{{data.patient.statstate}}'>{{data.patient.stat}}</span>
</ui-section>
<ui-section label='Blood Type'>
<span class='content'>{{data.patient.blood_type}}</span>
</ui-section>
<ui-section label='Health'>
<ui-bar min='{{data.patient.minHealth}}' max='{{data.patient.maxHealth}}' value='{{data.patient.health}}'
state='{{data.patient.health >= 0 ? "good" : "average"}}'>{{Math.round(adata.patient.health)}}</ui-bar>
</ui-section>
{{#each [{label: "Brute", type: "bruteLoss"}, {label: "Burn", type: "fireLoss"}, {label: "Toxin", type: "toxLoss"}, {label: "Respiratory", type: "oxyLoss"}]}}
<ui-section label='{{label}}'>
<ui-bar min='0' max='{{data.patient.maxHealth}}' value='{{data.patient[type]}}' state='bad'>{{Math.round(adata.patient[type])}}</ui-bar>
</ui-section>
{{/each}}
{{else}}
No patient detected.
{{/if}}
</ui-display>
<ui-display title='Initiated Procedures'>
{{#if data.procedures}}
{{#each data.procedures}}
<ui-subdisplay title='{{name}}'>
<ui-section label='Next Step'>
<span class='content'>{{next_step}}</span>
</ui-section>
{{#if alternative_step}}
<ui-section label='Alternative Step'>
<span class='content'>{{alternative_step}}</span>
</ui-section>
{{/if}}
</ui-subdisplay>
{{/each}}
{{else}}
No active procedures.
{{/if}}
</ui-display>
</ui-display>