Minor issues with smoking computers and descriptive words.

This commit is contained in:
Tim Young 2018-02-16 12:38:03 +00:00
parent ed432d03ef
commit dc1d22b2d4
3 changed files with 37 additions and 23 deletions

View File

@ -134,7 +134,10 @@ namespace EduNetworkBuilder
switch (TheTest) switch (TheTest)
{ {
case NetTestType.DeviceIsFrozen: case NetTestType.DeviceIsFrozen:
toreturn = NB.Translate("NT_TstDscriptBadDevice"); toreturn = NB.Translate("NT_TstDescriptFrozenDevice");
break;
case NetTestType.DeviceNeedsUPS:
toreturn = NB.Translate("NT_TstDescriptNeedsUPS");
break; break;
case NetTestType.NeedsDefaultGW: case NetTestType.NeedsDefaultGW:
toreturn = NB.Translate("NT_TstDscriptGteway"); toreturn = NB.Translate("NT_TstDscriptGteway");
@ -221,7 +224,10 @@ namespace EduNetworkBuilder
switch (TheTest) switch (TheTest)
{ {
case NetTestType.DeviceIsFrozen: case NetTestType.DeviceIsFrozen:
toreturn = NB.Translate("NT_TstDscriptBadDevice2"); toreturn = NB.Translate("NT_TstDescriptFrozenDevice2");
break;
case NetTestType.DeviceNeedsUPS:
toreturn = NB.Translate("NT_TstDescriptNeedsUPS2");
break; break;
case NetTestType.NeedsDefaultGW: case NetTestType.NeedsDefaultGW:
toreturn = NB.Translate("NT_TstDiscriptGteway2"); toreturn = NB.Translate("NT_TstDiscriptGteway2");

View File

@ -937,24 +937,24 @@ namespace EduNetworkBuilder
if (ItemClickedOn != null) if (ItemClickedOn != null)
{ {
ItemClickedOn.PowerOff = false; ItemClickedOn.PowerOff = false;
if(myNetwork.ItemHasTest(ItemClickedOn.hostname,NetTestType.DeviceBlowsUpWithPower)) bool BlowUpOnce = myNetwork.ItemHasTest(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower) && !myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower);
{ bool BlowUpMultiple = myNetwork.ItemHasTest(ItemClickedOn.hostname, NetTestType.DeviceNeedsUPS) && !myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceNeedsUPS);
if(!myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower)) if (BlowUpOnce || BlowUpMultiple)
{ {
Rectangle Where = new Rectangle(ItemClickedOn.myLocation().X, Rectangle Where = new Rectangle(ItemClickedOn.myLocation().X,
ItemClickedOn.myLocation().Y - ((ItemClickedOn.Size * 2) / 3), ItemClickedOn.Size, ItemClickedOn.Size); ItemClickedOn.myLocation().Y - ((ItemClickedOn.Size * 2) / 3), ItemClickedOn.Size, ItemClickedOn.Size);
if(ItemClickedOn.IsBurned) if(ItemClickedOn.IsBurned)
{ {
int which = GameRandomGen.Next(3); int which = GameRandomGen.Next(3);
if(which ==1) if(which ==0)
myNetwork.AddAnimation(AnimationName.Smoke1, Where);
else
myNetwork.AddAnimation(AnimationName.Spark1, Where); myNetwork.AddAnimation(AnimationName.Spark1, Where);
else
myNetwork.AddAnimation(AnimationName.Smoke1, Where);
} }
else else
myNetwork.AddAnimation(AnimationName.Fire1, Where); myNetwork.AddAnimation(AnimationName.Fire1, Where);
ItemClickedOn.IsBurned = true; ItemClickedOn.IsBurned = true;
} ItemClickedOn.PowerOff = true; //It remains off.
} }
UpdateLinks(); UpdateLinks();
UpdateVisuals(); UpdateVisuals();

View File

@ -2001,12 +2001,20 @@
<value>The device is not responding.</value> <value>The device is not responding.</value>
<comment>NC_Burned = The device is not responding.</comment> <comment>NC_Burned = The device is not responding.</comment>
</data> </data>
<data name="NT_TstDscriptBadDevice" xml:space="preserve"> <data name="NT_TstDescriptFrozenDevice" xml:space="preserve">
<value>Something seems broken with this device</value> <value>Device is Frozen</value>
<comment>NT_TstDscriptBadDevice = Something seems broken with this device</comment> <comment>NT_TstDescriptFrozenDevice</comment>
</data> </data>
<data name="NT_TstDscriptBadDevice2" xml:space="preserve"> <data name="NT_TstDescriptFrozenDevice2" xml:space="preserve">
<value>This Device is bad and should be replaced</value> <value>Reboot the device</value>
<comment>NT_TstDscriptBadDevice2 = This Device is bad and should be replaced</comment> <comment>NT_TstDescriptFrozenDevice2 = Reboot the device</comment>
</data>
<data name="NT_TstDescriptNeedsUPS" xml:space="preserve">
<value>Is plugged into Bad Power</value>
<comment>NT_TstDescriptNeedsUPS = Is plugged into bad power</comment>
</data>
<data name="NT_TstDescriptNeedsUPS2" xml:space="preserve">
<value>Needs a UPS</value>
<comment>NT_TstDescriptNeedsUPS2 = Needs a UPS</comment>
</data> </data>
</root> </root>