mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Adds smart magazine, magazine functionality
This commit is contained in:
@@ -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