From 8cfeb28d45606f345df8e684b6e82e6a6135a444 Mon Sep 17 00:00:00 2001 From: warriorstar-orion Date: Tue, 6 Feb 2024 13:21:29 -0500 Subject: [PATCH] fix: stop charging plasma mod core when full (#24055) --- code/modules/mod/mod_core.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm index 4ea624dee15..2dbd92afebc 100644 --- a/code/modules/mod/mod_core.dm +++ b/code/modules/mod/mod_core.dm @@ -233,7 +233,7 @@ mod.update_charge_alert() /obj/item/mod/core/plasma - name = "MOD plasma core" + name = "\improper MOD plasma core" desc = "Nanotrasen's attempt at capitalizing on their plasma research. These plasma cores are refueled \ through plasma fuel, allowing for easy continued use by their mining squads." icon_state = "mod-core-plasma" @@ -290,6 +290,10 @@ var/charge_given = is_type_in_list(plasma, charger_list) if(!charge_given) return FALSE + if(charge_amount() == max_charge_amount()) + to_chat(user, "[src] is already fully charged!") + // We didn't succeed but we don't want to treat it as an attackby + return TRUE var/uses_needed = min(plasma.amount, ((max_charge_amount() - charge_amount()) / 2000)) if(!plasma.use(uses_needed)) return FALSE