Skip to content

Commit

Permalink
Airtank status on hardsuit interface
Browse files Browse the repository at this point in the history
Adds a bar displaying pressure, plus the specified release pressure in
parenthesis after the actual kPa pressure value.

Fixes #139
  • Loading branch information
Arokha committed Nov 8, 2015
1 parent 1a3493f commit 21120aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/modules/clothing/spacesuits/rig/rig.dm
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@
data["maxcharge"] = cell ? cell.maxcharge : 0
data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0

data["tankPressure"] = air_supply ? round(air_supply.air_contents.return_pressure() ? air_supply.air_contents.return_pressure() : 0) : 0
data["relPressure"] = air_supply ? round(air_supply.distribute_pressure ? air_supply.distribute_pressure : 0) : 0

data["emagged"] = subverted
data["coverlock"] = locked
data["interfacelock"] = interface_locked
Expand Down
8 changes: 8 additions & 0 deletions nano/templates/hardsuit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
{{:helper.displayBar(data.chargestatus, 0, 50, (data.chargestatus >= 35) ? 'good' : (data.chargestatus >= 15) ? 'average' : 'bad')}} {{:data.charge}}/{{:data.maxcharge}}
</div>
</div>
<div class='inlineBlock extraTopPadding'>
<div class='fixedLeft boldText'>
Air supply
</div>
<div>
{{:helper.displayBar(data.tankPressure, 0, 1013, (data.tankPressure > 200) ? 'good' : ((data.tankPressure > 100) ? 'average' : 'bad'))}} {{:data.tankPressure}} kPa ({{:data.relPressure}} kPa)
</div>
</div>
<div>
<div class='inlineBlock extraTopPadding'>
<div class='fixedLeft boldText'>
Expand Down

0 comments on commit 21120aa

Please sign in to comment.