From 322e2e16bf34e126bf8ed54e3144c43ea8093646 Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 12 Dec 2016 13:45:38 +0100 Subject: [PATCH] No charge-free shooting for pods, take 2 Checks if the charge actually gets deducted from the battery, if not, the pod weapon won't shoot --- code/modules/spacepods/equipment.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 55342fad0e6..427a6db798a 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -8,7 +8,9 @@ to_chat(usr, "Missing equipment or weapons.") my_atom.verbs -= text2path("[type]/proc/fire_weapons") return - my_atom.battery.use(shot_cost) + if(!my_atom.battery.use(shot_cost)) + to_chat(usr, "Insufficient charge to fire the weapons") + return var/olddir for(var/i = 0; i < shots_per; i++) if(olddir != my_atom.dir)