mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Finishing up final UI adjustments
This commit is contained in:
@@ -251,8 +251,15 @@
|
||||
if(mob_occupant.reagents && mob_occupant.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in mob_occupant.reagents.reagent_list)
|
||||
data["occupant"]["reagents"] += list(list("name" = R.name, "volume" = R.volume))
|
||||
data["occupant"]["failing_organs"] = list()
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
if(C)
|
||||
for(var/obj/item/organ/Or in C.getFailingOrgans())
|
||||
if(istype(Or, /obj/item/organ/brain))
|
||||
continue
|
||||
data["occupant"]["failing_organs"] += list(list("name" = Or.name))
|
||||
|
||||
if(mob_occupant.has_dna()) // Blood-stuff is mostly a copy-paste from the healthscanner.
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
var/blood_id = C.get_blood_id()
|
||||
if(blood_id)
|
||||
data["occupant"]["blood"] = list() // We can start populating this list.
|
||||
|
||||
@@ -157,6 +157,11 @@
|
||||
O.applyOrganDamage(amount, maximum)
|
||||
O.onDamage(amount, maximum)
|
||||
|
||||
/mob/living/carbon/proc/getFailingOrgans()
|
||||
.=list()
|
||||
for(var/obj/item/organ/O in internal_organs)
|
||||
if(O.organ_flags & ORGAN_FAILING)
|
||||
.+=O
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -32,6 +32,12 @@ section
|
||||
@extend $cell
|
||||
width: 100%
|
||||
|
||||
.compressedcell
|
||||
@extend $cell
|
||||
&:not(:first-child)
|
||||
text-align: center
|
||||
padding-top: 0px
|
||||
|
||||
.cell
|
||||
@extend $cell
|
||||
&:not(:first-child)
|
||||
@@ -41,4 +47,3 @@ section
|
||||
width: 75px
|
||||
&:not(:last-child)
|
||||
padding-right: 4px
|
||||
|
||||
@@ -31,6 +31,13 @@
|
||||
<ui-section label='Brain'>
|
||||
<span class='{{data.occupant.brainLoss ? "bad" : "good"}}'>{{data.occupant.brainLoss ? "Abnormal" : "Healthy"}}</span>
|
||||
</ui-section>
|
||||
{{#if data.occupant.failing_organs}}
|
||||
<ui-section label='Failing Organs'>
|
||||
{{#each data.occupant.failing_organs}}
|
||||
<span class='bad'>{{name}} </span>
|
||||
{{/each}}
|
||||
</ui-section>
|
||||
{{/if}}
|
||||
<ui-section label='Bloodstream'>
|
||||
{{#each adata.occupant.reagents}}
|
||||
<span class='highlight' intro-outro='fade'>{{Math.fixed(volume, 1)}} units of {{name}}</span><br/>
|
||||
@@ -44,29 +51,87 @@
|
||||
<ui-section label='Door'>
|
||||
<ui-button icon='{{data.open ? "unlock" : "lock"}}' action='door'>{{data.open ? "Open" : "Closed"}}</ui-button>
|
||||
</ui-section>
|
||||
|
||||
<ui-section label='Synthesize'>
|
||||
{{#each data.synthchems}}
|
||||
<ui-button grid action='synth' params='{"chem": "{{id}}"}'>{{name}}</ui-button>
|
||||
{{/each}}
|
||||
</ui-section>
|
||||
|
||||
<ui-section label='Inject'>
|
||||
{{#each data.chems}}
|
||||
<span><b>{{name}}</b>: {{vol}}u</span>
|
||||
{{#if data.efficiency >= 4}}
|
||||
<span>Purity: {{purity}}</span>
|
||||
{{/if}}
|
||||
<section class="buttons" align='right'>
|
||||
{{#if data.efficiency >= 3}}
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 1}'>1</ui-button>
|
||||
{{/if}}
|
||||
{{#if adata.efficiency >= 2}}
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 5}'>5</ui-button>
|
||||
{{/if}}
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 10}'>10</ui-button>
|
||||
<ui-button action='purge' params='{"chem": "{{id}}"}'>Purge</ui-button><br/>
|
||||
</section>
|
||||
{{/each}}
|
||||
</ui-section>
|
||||
<div class="display tabular">
|
||||
<section class="candystripe">
|
||||
<section class="compressedcell">
|
||||
Name
|
||||
</section>
|
||||
|
||||
<section class="compressedcell">
|
||||
Volume
|
||||
</section>
|
||||
|
||||
{{#if data.efficiency >= 4}}
|
||||
<section class="compressedcell">
|
||||
<span>Purity</span>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
{{#if data.efficiency >= 3}}
|
||||
<section class="compressedcell">
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
{{#if data.efficiency >= 2}}
|
||||
<section class="compressedcell">
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
<section class="compressedcell">
|
||||
</section>
|
||||
|
||||
<section class="compressedcell">
|
||||
</section>
|
||||
|
||||
</section>
|
||||
{{#each data.chems}}
|
||||
<section class="candystripe">
|
||||
<section class="compressedcell">
|
||||
<span><b>{{name}}</b></span>
|
||||
</section>
|
||||
|
||||
<section class="compressedcell" align='center'>
|
||||
<span>{{vol}}u</span>
|
||||
</section>
|
||||
|
||||
{{#if data.efficiency >= 4}}
|
||||
<section class="compressedcell" align='center'>
|
||||
<span>{{purity}}</span>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
{{#if data.efficiency >= 3}}
|
||||
<section class="compressedcell">
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 1}'>1</ui-button>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
{{#if adata.efficiency >= 2}}
|
||||
<section class="compressedcell">
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 5}'>5</ui-button>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
<section class="compressedcell">
|
||||
<ui-button state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}", "volume": 10}'>10</ui-button>
|
||||
</section>
|
||||
|
||||
<section class="compressedcell">
|
||||
<ui-button action='purge' params='{"chem": "{{id}}"}'>Purge</ui-button><br/>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
{{/each}}
|
||||
</div>
|
||||
</ui-section>
|
||||
<ui-section label='Capacity'>
|
||||
<ui-bar min=0 max='{{data.tot_capacity}}' value='{{data.current_vol}}'
|
||||
state='{{data.current_vol}}'>{{data.current_vol}}</ui-bar>
|
||||
|
||||
Reference in New Issue
Block a user