mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #5501 from Anewbe/magazine_things
Adds smart magazine, magazine functionality
This commit is contained in:
18
code/datums/repositories/ammomaterial.dm
Normal file
18
code/datums/repositories/ammomaterial.dm
Normal 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]
|
||||
Reference in New Issue
Block a user