mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-24 13:16:18 +01:00
Spawning empty guns
You can now spawn projectile weapons with nothing loaded in them. Simply modify the ammo_type of an instance or a class to equal null. Previously, this would have generated runtime errors.
This commit is contained in:
@@ -22,8 +22,9 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/New()
|
||||
..()
|
||||
for(var/i = 1, i <= max_shells, i++)
|
||||
loaded += new ammo_type(src)
|
||||
if(ammo_type) //So that we can have weapons spawn empty.
|
||||
for(var/i = 1, i <= max_shells, i++)
|
||||
loaded += new ammo_type(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user