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
This commit is contained in:
Jonas
2016-12-12 13:45:38 +01:00
parent e19266a89b
commit 322e2e16bf
+3 -1
View File
@@ -8,7 +8,9 @@
to_chat(usr, "<span class='warning'>Missing equipment or weapons.</span>")
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, "<span class='warning'>Insufficient charge to fire the weapons</span>")
return
var/olddir
for(var/i = 0; i < shots_per; i++)
if(olddir != my_atom.dir)