From b6bc4fd3de7324dd4b086c215768bc50b54c49bb Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Tue, 24 May 2016 20:27:25 -0400 Subject: 0.1.1 Release Candidate 1 Committing all code for 0.1.1 Release Candidate 1. --- source/WindowsFormsApplication1/Computer.cs | 32 +++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'source/WindowsFormsApplication1/Computer.cs') diff --git a/source/WindowsFormsApplication1/Computer.cs b/source/WindowsFormsApplication1/Computer.cs index db1f24e..3b546b7 100644 --- a/source/WindowsFormsApplication1/Computer.cs +++ b/source/WindowsFormsApplication1/Computer.cs @@ -12,6 +12,8 @@ namespace ShiftOS { public partial class Computer : UserControl { + public int TotalHP = 100; + public Computer() { InitializeComponent(); @@ -318,6 +320,16 @@ namespace ShiftOS if (this.HP > 0) { lbstats.Text = $"HP: {_HP}"; + if(!Enemy) + { + foreach(var m in Hacking.MyNetwork) + { + if(m.Hostname == Hostname) + { + m.HP = _HP; + } + } + } switch (Type) { case SystemType.Core: @@ -369,8 +381,24 @@ namespace ShiftOS { if (API.Upgrades["limitlesscustomshades"] == true) { - int mod = _HP % 255; - this.BackColor = Color.FromArgb(255, mod, mod); + if(_HP > TotalHP / 2) + { + this.BackColor = Color.Green; + lbstats.ForeColor = Color.Black; + } + else + { + if(_HP > TotalHP / 3) + { + this.BackColor = Color.Orange; + lbstats.ForeColor = Color.Black; + } + else + { + this.BackColor = Color.Red; + lbstats.ForeColor = Color.White; + } + } } if (Enemy == true) { -- cgit v1.2.3