mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well. r4146 compile time: 1 minute, 40 seconds r4147 compile time: 45 seconds [VGTG] git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
/obj/item/ammo_casing
|
|
name = "bullet casing"
|
|
desc = "A bullet casing."
|
|
icon = 'icons/obj/ammo.dmi'
|
|
icon_state = "s-casing"
|
|
flags = FPRINT | TABLEPASS | CONDUCT
|
|
slot_flags = SLOT_BELT
|
|
throwforce = 1
|
|
w_class = 1.0
|
|
var/caliber = "" //Which kind of guns it can be loaded into
|
|
var/projectile_type = ""//The bullet type to create when New() is called
|
|
var/obj/item/projectile/BB = null //The loaded bullet
|
|
|
|
|
|
New()
|
|
..()
|
|
if(projectile_type)
|
|
BB = new projectile_type(src)
|
|
pixel_x = rand(-10.0, 10)
|
|
pixel_y = rand(-10.0, 10)
|
|
dir = pick(cardinal)
|
|
|
|
|
|
|
|
//Boxes of ammo
|
|
/obj/item/ammo_magazine
|
|
name = "ammo box (.357)"
|
|
desc = "A box of ammo"
|
|
icon_state = "357"
|
|
icon = 'icons/obj/ammo.dmi'
|
|
flags = FPRINT | TABLEPASS | CONDUCT
|
|
slot_flags = SLOT_BELT
|
|
item_state = "syringe_kit"
|
|
m_amt = 50000
|
|
throwforce = 2
|
|
w_class = 1.0
|
|
throw_speed = 4
|
|
throw_range = 10
|
|
var/list/stored_ammo = list()
|
|
var/ammo_type = "/obj/item/ammo_casing"
|
|
var/max_ammo = 7
|
|
var/multiple_sprites = 0
|
|
|
|
|
|
New()
|
|
for(var/i = 1, i <= max_ammo, i++)
|
|
stored_ammo += new ammo_type(src)
|
|
update_icon()
|
|
|
|
|
|
update_icon()
|
|
if(multiple_sprites)
|
|
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
|
|
desc = "There are [stored_ammo.len] shell\s left!"
|