Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Drathek <[email protected]>
  • Loading branch information
iloveloopers and Drulikar authored Jul 14, 2024
1 parent 335d16b commit b74ae53
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions code/game/machinery/computer/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@
return

var/credits_to_add = max(card.credits_to_give - GLOB.chemical_data.credits_gained, 0)
GLOB.chemical_data.update_credits(credits_to_add)
GLOB.chemical_data.credits_gained = max(GLOB.chemical_data.credits_gained, card.credits_to_give)
if(credits_to_add)
GLOB.chemical_data.update_credits(credits_to_add)
GLOB.chemical_data.credits_gained += credits_to_add

visible_message(SPAN_NOTICE("[user] swipes their ID card on \the [src], granting [credits_to_add] credits."))
msg_admin_niche("[key_name(user)] has swiped a clearance card and given [credits_to_add] credits to research.")
visible_message(SPAN_NOTICE("[user] swipes their ID card on [src], granting [credits_to_add] credits."))
msg_admin_niche("[key_name(user)] has swiped a clearance card to give [credits_to_add] credits to research.")
return

/obj/structure/machinery/computer/research/ui_state(mob/user)
Expand Down

0 comments on commit b74ae53

Please sign in to comment.