Skip to content

Commit

Permalink
nuke upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdragonTOW committed Jun 19, 2024
1 parent fbfdddb commit 4ee08a6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions code/game/machinery/nuclearbomb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,25 @@ GLOBAL_VAR_INIT(bomb_set, FALSE)

decrypting = FALSE
announce_to_players()

/obj/structure/machinery/nuclearbomb/tech/attackby(obj/item/nuke_disk as obj, mob/user as mob)
var/reduction_multiplier = 0.7 //30% reduction
if(istype(nuke_disk, /obj/item/disk/nuclear))
attack_hand(user)
if(decrypting)
if (decryption_time > 0)
decryption_end_time = LERP(world.time, decryption_end_time, reduction_multiplier)
decryption_time = decryption_end_time - world.time
to_chat(user, SPAN_WARNING("The decryption process begins using the disk's data..."))
announce_to_players() //Let everyone know the new time
qdel(nuke_disk)
return
else
to_chat(user, SPAN_WARNING("Decryption is already complete..."))
return
else
to_chat(user, SPAN_WARNING("It needs to be decrypting first!"))
return
else
to_chat(user, SPAN_WARNING("You probably shouldn't hit it with \the [src]..."))
return

0 comments on commit 4ee08a6

Please sign in to comment.