Adds smart magazine, magazine functionality

This commit is contained in:
Anewbe
2018-08-21 17:10:40 -05:00
parent 7a6f155187
commit ee48151135
13 changed files with 348 additions and 75 deletions
+18
View File
@@ -0,0 +1,18 @@
var/global/datum/repository/ammomaterial/ammo_repository = new()
/datum/repository/ammomaterial
var/list/ammotypes
/datum/repository/ammomaterial/New()
ammotypes = list()
..()
/datum/repository/ammomaterial/proc/get_materials_from_object(obj/item/ammo_casing/I)
if(!(I in ammotypes))
ammotypes += I
var/obj/item/ammo_casing/temp = new I
ammotypes[I] = temp.matter
qdel(temp)
return ammotypes[I]