Fix hacking speed returning an integer, not a float (#402)

This commit is contained in:
Mazo 2020-05-04 04:43:32 +01:00 committed by GitHub
parent 8301dbe855
commit 4c249bb358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ object GenericHackables {
case hackable : Hackable => hackable.HackDuration(playerHackLevel) case hackable : Hackable => hackable.HackDuration(playerHackLevel)
case _ => case _ =>
log.warn(s"${player.Name} tried to hack an object that has no hack time defined - ${obj.Definition.Name}#${obj.GUID} on ${obj.Zone.Id}") log.warn(s"${player.Name} tried to hack an object that has no hack time defined - ${obj.Definition.Name}#${obj.GUID} on ${obj.Zone.Id}")
0 0f
} }
if(timeToHack == 0) { if(timeToHack == 0) {
log.warn(s"${player.Name} tried to hack an object that they don't have the correct hacking level for - ${obj.Definition.Name}#${obj.GUID} on ${obj.Zone.Id}") log.warn(s"${player.Name} tried to hack an object that they don't have the correct hacking level for - ${obj.Definition.Name}#${obj.GUID} on ${obj.Zone.Id}")
@ -35,7 +35,7 @@ object GenericHackables {
} }
else { else {
//timeToHack is in seconds; progress is measured in quarters of a second (250ms) //timeToHack is in seconds; progress is measured in quarters of a second (250ms)
(100 / timeToHack) / 4 (100f / timeToHack) / 4
} }
} }