Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-01-16 21:12:56 -07:00
1616 changed files with 214985 additions and 211224 deletions
@@ -1,85 +1,85 @@
/obj/item/ammo_casing
name = "bullet casing"
desc = "A bullet casing."
icon = 'icons/obj/ammo.dmi'
icon_state = "s-casing"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 500)
var/fire_sound = null //What sound should play when this ammo is fired
var/caliber = null //Which kind of guns it can be loaded into
var/projectile_type = null //The bullet type to create when New() is called
var/obj/item/projectile/BB = null //The loaded bullet
var/pellets = 1 //Pellets for spreadshot
var/variance = 0 //Variance for inaccuracy fundamental to the casing
var/randomspread = 0 //Randomspread for automatics
var/delay = 0 //Delay for energy weapons
var/click_cooldown_override = 0 //Override this to make your gun have a faster fire rate, in tenths of a second. 4 is the default gun cooldown.
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired.
var/heavy_metal = TRUE
var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal
/obj/item/ammo_casing/spent
name = "spent bullet casing"
BB = null
/obj/item/ammo_casing/Initialize()
. = ..()
if(projectile_type)
BB = new projectile_type(src)
pixel_x = rand(-10, 10)
pixel_y = rand(-10, 10)
setDir(pick(GLOB.alldirs))
update_icon()
/obj/item/ammo_casing/update_icon()
..()
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
desc = "[initial(desc)][BB ? "" : " This one is spent."]"
//proc to magically refill a casing with a new projectile
/obj/item/ammo_casing/proc/newshot() //For energy weapons, syringe gun, shotgun shells and wands (!).
if(!BB)
BB = new projectile_type(src, src)
/obj/item/ammo_casing/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/ammo_box))
var/obj/item/ammo_box/box = I
if(isturf(loc))
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in loc)
if (box.stored_ammo.len >= box.max_ammo)
break
if (bullet.BB)
if (box.give_round(bullet, 0))
boolets++
else
continue
if (boolets > 0)
box.update_icon()
to_chat(user, "<span class='notice'>You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.</span>")
else
to_chat(user, "<span class='warning'>You fail to collect anything!</span>")
else
return ..()
/obj/item/ammo_casing/throw_impact(atom/A)
if(heavy_metal)
bounce_away(FALSE, NONE)
. = ..()
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
update_icon()
SpinAnimation(10, 1)
var/matrix/M = matrix(transform)
M.Turn(rand(-170,170))
transform = M
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
var/turf/T = get_turf(src)
if(still_warm && T && T.bullet_sizzle)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), bounce_delay) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
else if(T && T.bullet_bounce_sound)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, T.bullet_bounce_sound, 60, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
/obj/item/ammo_casing
name = "bullet casing"
desc = "A bullet casing."
icon = 'icons/obj/ammo.dmi'
icon_state = "s-casing"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 500)
var/fire_sound = null //What sound should play when this ammo is fired
var/caliber = null //Which kind of guns it can be loaded into
var/projectile_type = null //The bullet type to create when New() is called
var/obj/item/projectile/BB = null //The loaded bullet
var/pellets = 1 //Pellets for spreadshot
var/variance = 0 //Variance for inaccuracy fundamental to the casing
var/randomspread = 0 //Randomspread for automatics
var/delay = 0 //Delay for energy weapons
var/click_cooldown_override = 0 //Override this to make your gun have a faster fire rate, in tenths of a second. 4 is the default gun cooldown.
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired.
var/heavy_metal = TRUE
var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal
/obj/item/ammo_casing/spent
name = "spent bullet casing"
BB = null
/obj/item/ammo_casing/Initialize()
. = ..()
if(projectile_type)
BB = new projectile_type(src)
pixel_x = rand(-10, 10)
pixel_y = rand(-10, 10)
setDir(pick(GLOB.alldirs))
update_icon()
/obj/item/ammo_casing/update_icon()
..()
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
desc = "[initial(desc)][BB ? "" : " This one is spent."]"
//proc to magically refill a casing with a new projectile
/obj/item/ammo_casing/proc/newshot() //For energy weapons, syringe gun, shotgun shells and wands (!).
if(!BB)
BB = new projectile_type(src, src)
/obj/item/ammo_casing/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/ammo_box))
var/obj/item/ammo_box/box = I
if(isturf(loc))
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in loc)
if (box.stored_ammo.len >= box.max_ammo)
break
if (bullet.BB)
if (box.give_round(bullet, 0))
boolets++
else
continue
if (boolets > 0)
box.update_icon()
to_chat(user, "<span class='notice'>You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.</span>")
else
to_chat(user, "<span class='warning'>You fail to collect anything!</span>")
else
return ..()
/obj/item/ammo_casing/throw_impact(atom/A)
if(heavy_metal)
bounce_away(FALSE, NONE)
. = ..()
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
update_icon()
SpinAnimation(10, 1)
var/matrix/M = matrix(transform)
M.Turn(rand(-170,170))
transform = M
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
var/turf/T = get_turf(src)
if(still_warm && T && T.bullet_sizzle)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), bounce_delay) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
else if(T && T.bullet_bounce_sound)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, T.bullet_bounce_sound, 60, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.
+63 -63
View File
@@ -1,63 +1,63 @@
/obj/item/ammo_casing/proc/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
distro += variance
for (var/i = max(1, pellets), i > 0, i--)
var/targloc = get_turf(target)
ready_proj(target, user, quiet, zone_override, fired_from)
if(distro) //We have to spread a pixel-precision bullet. throw_proj was called before so angles should exist by now...
if(randomspread)
spread = round((rand() - 0.5) * distro)
else //Smart spread
spread = round((i / pellets - 0.5) * distro)
if(!throw_proj(target, targloc, user, params, spread))
return 0
if(i > 1)
newshot()
if(click_cooldown_override)
user.changeNext_move(click_cooldown_override)
else
user.changeNext_move(CLICK_CD_RANGE)
user.newtonian_move(get_dir(target, user))
update_icon()
return 1
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "", fired_from)
if (!BB)
return
BB.original = target
BB.firer = user
BB.fired_from = fired_from
if (zone_override)
BB.def_zone = zone_override
else
BB.def_zone = user.zone_selected
BB.suppressed = quiet
if(reagents && BB.reagents)
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
qdel(reagents)
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params, spread)
var/turf/curloc = get_turf(user)
if (!istype(targloc) || !istype(curloc) || !BB)
return 0
var/firing_dir
if(BB.firer)
firing_dir = BB.firer.dir
if(!BB.suppressed && firing_effect_type)
new firing_effect_type(get_turf(src), firing_dir)
var/direct_target
if(targloc == curloc)
if(target) //if the target is right on our location we'll skip the travelling code in the proj's fire()
direct_target = target
if(!direct_target)
BB.preparePixelProjectile(target, user, params, spread)
BB.fire(null, direct_target)
BB = null
return 1
/obj/item/ammo_casing/proc/spread(turf/target, turf/current, distro)
var/dx = abs(target.x - current.x)
var/dy = abs(target.y - current.y)
return locate(target.x + round(gaussian(0, distro) * (dy+2)/8, 1), target.y + round(gaussian(0, distro) * (dx+2)/8, 1), target.z)
/obj/item/ammo_casing/proc/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
distro += variance
for (var/i = max(1, pellets), i > 0, i--)
var/targloc = get_turf(target)
ready_proj(target, user, quiet, zone_override, fired_from)
if(distro) //We have to spread a pixel-precision bullet. throw_proj was called before so angles should exist by now...
if(randomspread)
spread = round((rand() - 0.5) * distro)
else //Smart spread
spread = round((i / pellets - 0.5) * distro)
if(!throw_proj(target, targloc, user, params, spread))
return 0
if(i > 1)
newshot()
if(click_cooldown_override)
user.changeNext_move(click_cooldown_override)
else
user.changeNext_move(CLICK_CD_RANGE)
user.newtonian_move(get_dir(target, user))
update_icon()
return 1
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "", fired_from)
if (!BB)
return
BB.original = target
BB.firer = user
BB.fired_from = fired_from
if (zone_override)
BB.def_zone = zone_override
else
BB.def_zone = user.zone_selected
BB.suppressed = quiet
if(reagents && BB.reagents)
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
qdel(reagents)
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params, spread)
var/turf/curloc = get_turf(user)
if (!istype(targloc) || !istype(curloc) || !BB)
return 0
var/firing_dir
if(BB.firer)
firing_dir = BB.firer.dir
if(!BB.suppressed && firing_effect_type)
new firing_effect_type(get_turf(src), firing_dir)
var/direct_target
if(targloc == curloc)
if(target) //if the target is right on our location we'll skip the travelling code in the proj's fire()
direct_target = target
if(!direct_target)
BB.preparePixelProjectile(target, user, params, spread)
BB.fire(null, direct_target)
BB = null
return 1
/obj/item/ammo_casing/proc/spread(turf/target, turf/current, distro)
var/dx = abs(target.x - current.x)
var/dy = abs(target.y - current.y)
return locate(target.x + round(gaussian(0, distro) * (dy+2)/8, 1), target.y + round(gaussian(0, distro) * (dx+2)/8, 1), target.z)
@@ -1,23 +1,23 @@
// 1.95x129mm (SAW)
/obj/item/ammo_casing/mm195x129
name = "1.95x129mm bullet casing"
desc = "A 1.95x129mm bullet casing."
icon_state = "762-casing"
caliber = "mm195129"
projectile_type = /obj/item/projectile/bullet/mm195x129
/obj/item/ammo_casing/mm195x129/ap
name = "1.95x129mm armor-piercing bullet casing"
desc = "A 1.95x129mm bullet casing designed with a hardened-tipped core to help penetrate armored targets."
projectile_type = /obj/item/projectile/bullet/mm195x129_ap
/obj/item/ammo_casing/mm195x129/hollow
name = "1.95x129mm hollow-point bullet casing"
desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets."
projectile_type = /obj/item/projectile/bullet/mm195x129_hp
/obj/item/ammo_casing/mm195x129/incen
name = "1.95x129mm incendiary bullet casing"
desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames."
projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129
// 1.95x129mm (SAW)
/obj/item/ammo_casing/mm195x129
name = "1.95x129mm bullet casing"
desc = "A 1.95x129mm bullet casing."
icon_state = "762-casing"
caliber = "mm195129"
projectile_type = /obj/item/projectile/bullet/mm195x129
/obj/item/ammo_casing/mm195x129/ap
name = "1.95x129mm armor-piercing bullet casing"
desc = "A 1.95x129mm bullet casing designed with a hardened-tipped core to help penetrate armored targets."
projectile_type = /obj/item/projectile/bullet/mm195x129_ap
/obj/item/ammo_casing/mm195x129/hollow
name = "1.95x129mm hollow-point bullet casing"
desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets."
projectile_type = /obj/item/projectile/bullet/mm195x129_hp
/obj/item/ammo_casing/mm195x129/incen
name = "1.95x129mm incendiary bullet casing"
desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames."
projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129
@@ -1,50 +1,50 @@
// 10mm (Stechkin)
/obj/item/ammo_casing/c10mm
name = ".10mm bullet casing"
desc = "A 10mm bullet casing."
caliber = "10mm"
projectile_type = /obj/item/projectile/bullet/c10mm
/obj/item/ammo_casing/c10mm/ap
name = ".10mm armor-piercing bullet casing"
desc = "A 10mm armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/c10mm_ap
/obj/item/ammo_casing/c10mm/hp
name = ".10mm hollow-point bullet casing"
desc = "A 10mm hollow-point bullet casing."
projectile_type = /obj/item/projectile/bullet/c10mm_hp
/obj/item/ammo_casing/c10mm/fire
name = ".10mm incendiary bullet casing"
desc = "A 10mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c10mm
// 9mm (Stechkin APS)
/obj/item/ammo_casing/c9mm
name = "9mm bullet casing"
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/c9mm
/obj/item/ammo_casing/c9mm/ap
name = "9mm armor-piercing bullet casing"
desc = "A 9mm armor-piercing bullet casing."
projectile_type =/obj/item/projectile/bullet/c9mm_ap
/obj/item/ammo_casing/c9mm/inc
name = "9mm incendiary bullet casing"
desc = "A 9mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c9mm
// .50AE (Desert Eagle)
/obj/item/ammo_casing/a50AE
name = ".50AE bullet casing"
desc = "A .50AE bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/a50AE
// 10mm (Stechkin)
/obj/item/ammo_casing/c10mm
name = ".10mm bullet casing"
desc = "A 10mm bullet casing."
caliber = "10mm"
projectile_type = /obj/item/projectile/bullet/c10mm
/obj/item/ammo_casing/c10mm/ap
name = ".10mm armor-piercing bullet casing"
desc = "A 10mm armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/c10mm_ap
/obj/item/ammo_casing/c10mm/hp
name = ".10mm hollow-point bullet casing"
desc = "A 10mm hollow-point bullet casing."
projectile_type = /obj/item/projectile/bullet/c10mm_hp
/obj/item/ammo_casing/c10mm/fire
name = ".10mm incendiary bullet casing"
desc = "A 10mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c10mm
// 9mm (Stechkin APS)
/obj/item/ammo_casing/c9mm
name = "9mm bullet casing"
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/c9mm
/obj/item/ammo_casing/c9mm/ap
name = "9mm armor-piercing bullet casing"
desc = "A 9mm armor-piercing bullet casing."
projectile_type =/obj/item/projectile/bullet/c9mm_ap
/obj/item/ammo_casing/c9mm/inc
name = "9mm incendiary bullet casing"
desc = "A 9mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c9mm
// .50AE (Desert Eagle)
/obj/item/ammo_casing/a50AE
name = ".50AE bullet casing"
desc = "A .50AE bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/a50AE
@@ -1,50 +1,50 @@
// .357 (Syndie Revolver)
/obj/item/ammo_casing/a357
name = ".357 bullet casing"
desc = "A .357 bullet casing."
caliber = "357"
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/ammo_casing/a357/ap
name = ".357 armor-piercing bullet casing"
desc = "A .357 armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/a357/ap
// 7.62x38mmR (Nagant Revolver)
/obj/item/ammo_casing/n762
name = "7.62x38mmR bullet casing"
desc = "A 7.62x38mmR bullet casing."
caliber = "n762"
projectile_type = /obj/item/projectile/bullet/n762
// .38 (Detective's Gun)
/obj/item/ammo_casing/c38
name = ".38 rubber bullet casing"
desc = "A .38 rubber bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/c38/rubber
/obj/item/ammo_casing/c38/lethal
name = ".38 bullet casing"
desc = "A .38 bullet casing"
projectile_type = /obj/item/projectile/bullet/c38
/obj/item/ammo_casing/c38/trac
name = ".38 TRAC bullet casing"
desc = "A .38 \"TRAC\" bullet casing."
projectile_type = /obj/item/projectile/bullet/c38/trac
/obj/item/ammo_casing/c38/hotshot
name = ".38 Hot Shot bullet casing"
desc = "A .38 Hot Shot bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/c38/hotshot
/obj/item/ammo_casing/c38/iceblox
name = ".38 Iceblox bullet casing"
desc = "A .38 Iceblox bullet casing."
caliber = "38"
// .357 (Syndie Revolver)
/obj/item/ammo_casing/a357
name = ".357 bullet casing"
desc = "A .357 bullet casing."
caliber = "357"
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/ammo_casing/a357/ap
name = ".357 armor-piercing bullet casing"
desc = "A .357 armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/a357/ap
// 7.62x38mmR (Nagant Revolver)
/obj/item/ammo_casing/n762
name = "7.62x38mmR bullet casing"
desc = "A 7.62x38mmR bullet casing."
caliber = "n762"
projectile_type = /obj/item/projectile/bullet/n762
// .38 (Detective's Gun)
/obj/item/ammo_casing/c38
name = ".38 rubber bullet casing"
desc = "A .38 rubber bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/c38/rubber
/obj/item/ammo_casing/c38/lethal
name = ".38 bullet casing"
desc = "A .38 bullet casing"
projectile_type = /obj/item/projectile/bullet/c38
/obj/item/ammo_casing/c38/trac
name = ".38 TRAC bullet casing"
desc = "A .38 \"TRAC\" bullet casing."
projectile_type = /obj/item/projectile/bullet/c38/trac
/obj/item/ammo_casing/c38/hotshot
name = ".38 Hot Shot bullet casing"
desc = "A .38 Hot Shot bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/c38/hotshot
/obj/item/ammo_casing/c38/iceblox
name = ".38 Iceblox bullet casing"
desc = "A .38 Iceblox bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/c38/iceblox
@@ -1,28 +1,28 @@
// 7.62 (Nagant Rifle)
/obj/item/ammo_casing/a762
name = "7.62 bullet casing"
desc = "A 7.62 bullet casing."
icon_state = "762-casing"
caliber = "a762"
projectile_type = /obj/item/projectile/bullet/a762
/obj/item/ammo_casing/a762/enchanted
projectile_type = /obj/item/projectile/bullet/a762_enchanted
// 5.56mm (M-90gl Carbine)
/obj/item/ammo_casing/a556
name = "5.56mm bullet casing"
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/a556
// 40mm (Grenade Launcher)
/obj/item/ammo_casing/a40mm
name = "40mm HE shell"
desc = "A cased high explosive grenade that can only be activated once fired out of a grenade launcher."
caliber = "40mm"
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm
// 7.62 (Nagant Rifle)
/obj/item/ammo_casing/a762
name = "7.62 bullet casing"
desc = "A 7.62 bullet casing."
icon_state = "762-casing"
caliber = "a762"
projectile_type = /obj/item/projectile/bullet/a762
/obj/item/ammo_casing/a762/enchanted
projectile_type = /obj/item/projectile/bullet/a762_enchanted
// 5.56mm (M-90gl Carbine)
/obj/item/ammo_casing/a556
name = "5.56mm bullet casing"
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/a556
// 40mm (Grenade Launcher)
/obj/item/ammo_casing/a40mm
name = "40mm HE shell"
desc = "A cased high explosive grenade that can only be activated once fired out of a grenade launcher."
caliber = "40mm"
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm
@@ -1,141 +1,141 @@
// Shotgun
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A 12 gauge lead slug."
icon_state = "blshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun_slug
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/shotgun_beanbag
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary slug"
desc = "An incendiary-coated shotgun slug."
icon_state = "ishell"
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun
/obj/item/ammo_casing/shotgun/dragonsbreath
name = "dragonsbreath shell"
desc = "A shotgun shell which fires a spread of incendiary pellets."
icon_state = "ishell2"
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/stunslug
name = "taser slug"
desc = "A stunning taser slug."
icon_state = "stunshell"
projectile_type = /obj/item/projectile/bullet/shotgun_stunslug
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/meteorslug
name = "meteorslug shell"
desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired."
icon_state = "mshell"
projectile_type = /obj/item/projectile/bullet/shotgun_meteorslug
/obj/item/ammo_casing/shotgun/pulseslug
name = "pulse slug"
desc = "A delicate device which can be loaded into a shotgun. The primer acts as a button which triggers the gain medium and fires a powerful \
energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \
would have difficulty with."
icon_state = "pshell"
projectile_type = /obj/item/projectile/beam/pulse/shotgun
/obj/item/ammo_casing/shotgun/frag12
name = "FRAG-12 slug"
desc = "A high explosive breaching round for a 12 gauge shotgun."
icon_state = "heshell"
projectile_type = /obj/item/projectile/bullet/shotgun_frag12
/obj/item/ammo_casing/shotgun/buckshot
name = "buckshot shell"
desc = "A 12 gauge buckshot shell."
icon_state = "gshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_buckshot
pellets = 6
variance = 25
/obj/item/ammo_casing/shotgun/rubbershot
name = "rubber shot"
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_rubbershot
pellets = 6
variance = 25
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_improvised
materials = list(MAT_METAL=250)
pellets = 10
variance = 25
/obj/item/ammo_casing/shotgun/ion
name = "ion shell"
desc = "An advanced shotgun shell which uses a subspace ansible crystal to produce an effect similar to a standard ion rifle. \
The unique properties of the crystal split the pulse into a spread of individually weaker bolts."
icon_state = "ionshell"
projectile_type = /obj/item/projectile/ion/weak
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/laserslug
name = "scatter laser shell"
desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a scatter laser weapon in a ballistic package."
icon_state = "lshell"
projectile_type = /obj/item/projectile/beam/weak
pellets = 6
variance = 35
/obj/item/ammo_casing/shotgun/techshell
name = "unloaded technological shell"
desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects."
icon_state = "cshell"
projectile_type = null
/obj/item/ammo_casing/shotgun/dart
name = "shotgun dart"
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
var/reagent_amount = 30
/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/shotgun/dart/noreact
name = "cryostasis shotgun dart"
desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical."
icon_state = "cnrshell"
reagent_amount = 10
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
/obj/item/ammo_casing/shotgun/dart/bioterror/Initialize()
. = ..()
reagents.add_reagent("neurotoxin", 6)
reagents.add_reagent("spore", 6)
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
reagents.add_reagent("coniine", 6)
reagents.add_reagent("sodium_thiopental", 6)
// Shotgun
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A 12 gauge lead slug."
icon_state = "blshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun_slug
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/shotgun_beanbag
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary slug"
desc = "An incendiary-coated shotgun slug."
icon_state = "ishell"
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun
/obj/item/ammo_casing/shotgun/dragonsbreath
name = "dragonsbreath shell"
desc = "A shotgun shell which fires a spread of incendiary pellets."
icon_state = "ishell2"
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/stunslug
name = "taser slug"
desc = "A stunning taser slug."
icon_state = "stunshell"
projectile_type = /obj/item/projectile/bullet/shotgun_stunslug
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/meteorslug
name = "meteorslug shell"
desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired."
icon_state = "mshell"
projectile_type = /obj/item/projectile/bullet/shotgun_meteorslug
/obj/item/ammo_casing/shotgun/pulseslug
name = "pulse slug"
desc = "A delicate device which can be loaded into a shotgun. The primer acts as a button which triggers the gain medium and fires a powerful \
energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \
would have difficulty with."
icon_state = "pshell"
projectile_type = /obj/item/projectile/beam/pulse/shotgun
/obj/item/ammo_casing/shotgun/frag12
name = "FRAG-12 slug"
desc = "A high explosive breaching round for a 12 gauge shotgun."
icon_state = "heshell"
projectile_type = /obj/item/projectile/bullet/shotgun_frag12
/obj/item/ammo_casing/shotgun/buckshot
name = "buckshot shell"
desc = "A 12 gauge buckshot shell."
icon_state = "gshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_buckshot
pellets = 6
variance = 25
/obj/item/ammo_casing/shotgun/rubbershot
name = "rubber shot"
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_rubbershot
pellets = 6
variance = 25
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_improvised
materials = list(MAT_METAL=250)
pellets = 10
variance = 25
/obj/item/ammo_casing/shotgun/ion
name = "ion shell"
desc = "An advanced shotgun shell which uses a subspace ansible crystal to produce an effect similar to a standard ion rifle. \
The unique properties of the crystal split the pulse into a spread of individually weaker bolts."
icon_state = "ionshell"
projectile_type = /obj/item/projectile/ion/weak
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/laserslug
name = "scatter laser shell"
desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a scatter laser weapon in a ballistic package."
icon_state = "lshell"
projectile_type = /obj/item/projectile/beam/weak
pellets = 6
variance = 35
/obj/item/ammo_casing/shotgun/techshell
name = "unloaded technological shell"
desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects."
icon_state = "cshell"
projectile_type = null
/obj/item/ammo_casing/shotgun/dart
name = "shotgun dart"
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
var/reagent_amount = 30
/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/shotgun/dart/noreact
name = "cryostasis shotgun dart"
desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical."
icon_state = "cnrshell"
reagent_amount = 10
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
/obj/item/ammo_casing/shotgun/dart/bioterror/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/toxin/fentanyl, 6)
reagents.add_reagent(/datum/reagent/toxin/spore, 6)
reagents.add_reagent(/datum/reagent/toxin/mutetoxin, 6) //;HELP OPS IN MAINT
reagents.add_reagent(/datum/reagent/toxin/coniine, 6)
reagents.add_reagent(/datum/reagent/toxin/sodium_thiopental, 6)
@@ -1,32 +1,32 @@
// 4.6x30mm (Autorifles)
/obj/item/ammo_casing/c46x30mm
name = "4.6x30mm bullet casing"
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type = /obj/item/projectile/bullet/c46x30mm
/obj/item/ammo_casing/c46x30mm/ap
name = "4.6x30mm armor-piercing bullet casing"
desc = "A 4.6x30mm armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/c46x30mm_ap
/obj/item/ammo_casing/c46x30mm/inc
name = "4.6x30mm incendiary bullet casing"
desc = "A 4.6x30mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c46x30mm
// .45 (M1911 + C20r)
/obj/item/ammo_casing/c45
name = ".45 bullet casing"
desc = "A .45 bullet casing."
caliber = ".45"
projectile_type = /obj/item/projectile/bullet/c45
/obj/item/ammo_casing/c45/nostamina
projectile_type = /obj/item/projectile/bullet/c45_nostamina
/obj/item/ammo_casing/c45/kitchengun
desc = "A .45 bullet casing. It has a small sponge attached to it."
projectile_type = /obj/item/projectile/bullet/c45_cleaning
// 4.6x30mm (Autorifles)
/obj/item/ammo_casing/c46x30mm
name = "4.6x30mm bullet casing"
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type = /obj/item/projectile/bullet/c46x30mm
/obj/item/ammo_casing/c46x30mm/ap
name = "4.6x30mm armor-piercing bullet casing"
desc = "A 4.6x30mm armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/c46x30mm_ap
/obj/item/ammo_casing/c46x30mm/inc
name = "4.6x30mm incendiary bullet casing"
desc = "A 4.6x30mm incendiary bullet casing."
projectile_type = /obj/item/projectile/bullet/incendiary/c46x30mm
// .45 (M1911 + C20r)
/obj/item/ammo_casing/c45
name = ".45 bullet casing"
desc = "A .45 bullet casing."
caliber = ".45"
projectile_type = /obj/item/projectile/bullet/c45
/obj/item/ammo_casing/c45/nostamina
projectile_type = /obj/item/projectile/bullet/c45_nostamina
/obj/item/ammo_casing/c45/kitchengun
desc = "A .45 bullet casing. It has a small sponge attached to it."
projectile_type = /obj/item/projectile/bullet/c45_cleaning
@@ -1,20 +1,20 @@
// .50 (Sniper)
/obj/item/ammo_casing/p50
name = ".50 bullet casing"
desc = "A .50 bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/p50
icon_state = ".50"
/obj/item/ammo_casing/p50/soporific
name = ".50 soporific bullet casing"
desc = "A .50 bullet casing, specialised in sending the target to sleep, instead of hell."
projectile_type = /obj/item/projectile/bullet/p50/soporific
icon_state = "sleeper"
harmful = FALSE
/obj/item/ammo_casing/p50/penetrator
name = ".50 penetrator round bullet casing"
desc = "A .50 caliber penetrator round casing."
projectile_type = /obj/item/projectile/bullet/p50/penetrator
// .50 (Sniper)
/obj/item/ammo_casing/p50
name = ".50 bullet casing"
desc = "A .50 bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/p50
icon_state = ".50"
/obj/item/ammo_casing/p50/soporific
name = ".50 soporific bullet casing"
desc = "A .50 bullet casing, specialised in sending the target to sleep, instead of hell."
projectile_type = /obj/item/projectile/bullet/p50/soporific
icon_state = "sleeper"
harmful = FALSE
/obj/item/ammo_casing/p50/penetrator
name = ".50 penetrator round bullet casing"
desc = "A .50 caliber penetrator round casing."
projectile_type = /obj/item/projectile/bullet/p50/penetrator
@@ -1,16 +1,16 @@
/obj/item/ammo_casing/caseless
desc = "A caseless bullet casing."
firing_effect_type = null
heavy_metal = FALSE
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
if (..()) //successfully firing
moveToNullspace()
QDEL_NULL(src)
return TRUE
else
return FALSE
/obj/item/ammo_casing/caseless/update_icon()
..()
icon_state = "[initial(icon_state)]"
/obj/item/ammo_casing/caseless
desc = "A caseless bullet casing."
firing_effect_type = null
heavy_metal = FALSE
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
if (..()) //successfully firing
moveToNullspace()
QDEL_NULL(src)
return TRUE
else
return FALSE
/obj/item/ammo_casing/caseless/update_icon()
..()
icon_state = "[initial(icon_state)]"
@@ -1,65 +1,65 @@
/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
materials = list(MAT_METAL = 11.25)
harmful = FALSE
var/modified = FALSE
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
if (modified)
icon_state = "foamdart_empty"
desc = "It's nerf or nothing! ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else
icon_state = initial(icon_state)
desc = "It's nerf or nothing! Ages 8 and up."
if(BB)
BB.icon_state = initial(BB.icon_state)
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
modified = TRUE
FD.modified = TRUE
FD.damage_type = BRUTE
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
update_icon()
else if (istype(A, /obj/item/pen))
if(modified)
if(!FD.pen)
harmful = TRUE
if(!user.transferItemToLoc(A, FD))
return
FD.pen = A
FD.damage = 5
FD.nodamage = FALSE
to_chat(user, "<span class='notice'>You insert [A] into [src].</span>")
else
to_chat(user, "<span class='warning'>There's already something in [src].</span>")
else
to_chat(user, "<span class='warning'>The safety cap prevents you from inserting [A] into [src].</span>")
else
return ..()
/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if(FD.pen)
FD.damage = initial(FD.damage)
FD.nodamage = initial(FD.nodamage)
user.put_in_hands(FD.pen)
to_chat(user, "<span class='notice'>You remove [FD.pen] from [src].</span>")
FD.pen = null
/obj/item/ammo_casing/caseless/foam_dart/riot
name = "riot foam dart"
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
materials = list(MAT_METAL = 1125)
/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
materials = list(MAT_METAL = 11.25)
harmful = FALSE
var/modified = FALSE
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
if (modified)
icon_state = "foamdart_empty"
desc = "It's nerf or nothing! ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else
icon_state = initial(icon_state)
desc = "It's nerf or nothing! Ages 8 and up."
if(BB)
BB.icon_state = initial(BB.icon_state)
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
modified = TRUE
FD.modified = TRUE
FD.damage_type = BRUTE
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
update_icon()
else if (istype(A, /obj/item/pen))
if(modified)
if(!FD.pen)
harmful = TRUE
if(!user.transferItemToLoc(A, FD))
return
FD.pen = A
FD.damage = 5
FD.nodamage = FALSE
to_chat(user, "<span class='notice'>You insert [A] into [src].</span>")
else
to_chat(user, "<span class='warning'>There's already something in [src].</span>")
else
to_chat(user, "<span class='warning'>The safety cap prevents you from inserting [A] into [src].</span>")
else
return ..()
/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if(FD.pen)
FD.damage = initial(FD.damage)
FD.nodamage = initial(FD.nodamage)
user.put_in_hands(FD.pen)
to_chat(user, "<span class='notice'>You remove [FD.pen] from [src].</span>")
FD.pen = null
/obj/item/ammo_casing/caseless/foam_dart/riot
name = "riot foam dart"
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
materials = list(MAT_METAL = 1125)
@@ -1,22 +1,22 @@
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/caseless/laser
name = "laser casing"
desc = "You shouldn't be seeing this."
caliber = "laser"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/beam
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
/obj/item/ammo_casing/caseless/laser/gatling
projectile_type = /obj/item/projectile/beam/weak/penetrator
variance = 0.8
click_cooldown_override = 1
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/caseless/laser
name = "laser casing"
desc = "You shouldn't be seeing this."
caliber = "laser"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/beam
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
/obj/item/ammo_casing/caseless/laser/gatling
projectile_type = /obj/item/projectile/beam/weak/penetrator
variance = 0.8
click_cooldown_override = 1
@@ -1,19 +1,19 @@
/obj/item/ammo_casing/caseless/rocket
name = "\improper PM-9HE"
desc = "An 84mm High Explosive rocket. Fire at people and pray."
caliber = "84mm"
icon_state = "srm-8"
projectile_type = /obj/item/projectile/bullet/a84mm_he
/obj/item/ammo_casing/caseless/rocket/hedp
name = "\improper PM-9HEDP"
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
caliber = "84mm"
icon_state = "84mm-hedp"
projectile_type = /obj/item/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/a75
desc = "A .75 bullet casing."
caliber = "75"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/bullet/gyro
/obj/item/ammo_casing/caseless/rocket
name = "\improper PM-9HE"
desc = "An 84mm High Explosive rocket. Fire at people and pray."
caliber = "84mm"
icon_state = "srm-8"
projectile_type = /obj/item/projectile/bullet/a84mm_he
/obj/item/ammo_casing/caseless/rocket/hedp
name = "\improper PM-9HEDP"
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
caliber = "84mm"
icon_state = "84mm-hedp"
projectile_type = /obj/item/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/a75
desc = "A .75 bullet casing."
caliber = "75"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/bullet/gyro
@@ -1,10 +1,10 @@
/obj/item/ammo_casing/energy
name = "energy weapon lens"
desc = "The part of the gun that makes the laser go pew."
caliber = "energy"
projectile_type = /obj/item/projectile/energy
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
var/select_name = "energy"
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
heavy_metal = FALSE
/obj/item/ammo_casing/energy
name = "energy weapon lens"
desc = "The part of the gun that makes the laser go pew."
caliber = "energy"
projectile_type = /obj/item/projectile/energy
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
var/select_name = "energy"
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
heavy_metal = FALSE
@@ -1,12 +1,12 @@
/obj/item/ammo_casing/energy/bolt
projectile_type = /obj/item/projectile/energy/bolt
select_name = "bolt"
e_cost = 500
fire_sound = 'sound/weapons/genhit.ogg'
/obj/item/ammo_casing/energy/bolt/halloween
projectile_type = /obj/item/projectile/energy/bolt/halloween
/obj/item/ammo_casing/energy/bolt/large
projectile_type = /obj/item/projectile/energy/bolt/large
select_name = "heavy bolt"
/obj/item/ammo_casing/energy/bolt
projectile_type = /obj/item/projectile/energy/bolt
select_name = "bolt"
e_cost = 500
fire_sound = 'sound/weapons/genhit.ogg'
/obj/item/ammo_casing/energy/bolt/halloween
projectile_type = /obj/item/projectile/energy/bolt/halloween
/obj/item/ammo_casing/energy/bolt/large
projectile_type = /obj/item/projectile/energy/bolt/large
select_name = "heavy bolt"
@@ -1,29 +1,29 @@
/obj/item/ammo_casing/energy/gravity
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "gravity"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravity/Initialize(mapload)
if(istype(loc,/obj/item/gun/energy/gravity_gun))
gun = loc
. = ..()
/obj/item/ammo_casing/energy/gravity/Destroy()
gun = null
. = ..()
/obj/item/ammo_casing/energy/gravity/repulse
projectile_type = /obj/item/projectile/gravityrepulse
select_name = "repulse"
/obj/item/ammo_casing/energy/gravity/attract
projectile_type = /obj/item/projectile/gravityattract
select_name = "attract"
/obj/item/ammo_casing/energy/gravity/chaos
projectile_type = /obj/item/projectile/gravitychaos
select_name = "chaos"
/obj/item/ammo_casing/energy/gravity
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "gravity"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravity/Initialize(mapload)
if(istype(loc,/obj/item/gun/energy/gravity_gun))
gun = loc
. = ..()
/obj/item/ammo_casing/energy/gravity/Destroy()
gun = null
. = ..()
/obj/item/ammo_casing/energy/gravity/repulse
projectile_type = /obj/item/projectile/gravityrepulse
select_name = "repulse"
/obj/item/ammo_casing/energy/gravity/attract
projectile_type = /obj/item/projectile/gravityattract
select_name = "attract"
/obj/item/ammo_casing/energy/gravity/chaos
projectile_type = /obj/item/projectile/gravitychaos
select_name = "chaos"
@@ -1,73 +1,73 @@
/obj/item/ammo_casing/energy/laser
projectile_type = /obj/item/projectile/beam/laser
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/item/projectile/beam/laser
e_cost = 83
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun/old
projectile_type = /obj/item/projectile/beam/laser
e_cost = 200
select_name = "kill"
/obj/item/ammo_casing/energy/laser/hos
e_cost = 100
/obj/item/ammo_casing/energy/laser/practice
projectile_type = /obj/item/projectile/beam/practice
select_name = "practice"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/scatter
projectile_type = /obj/item/projectile/beam/scatter
pellets = 5
variance = 25
select_name = "scatter"
/obj/item/ammo_casing/energy/laser/scatter/disabler
projectile_type = /obj/item/projectile/beam/disabler
pellets = 3
variance = 15
harmful = FALSE
/obj/item/ammo_casing/energy/laser/heavy
projectile_type = /obj/item/projectile/beam/laser/heavylaser
select_name = "anti-vehicle"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/ammo_casing/energy/laser/pulse
projectile_type = /obj/item/projectile/beam/pulse
e_cost = 200
select_name = "DESTROY"
fire_sound = 'sound/weapons/pulse.ogg'
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/beam/lasertag/bluetag
select_name = "bluetag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/bluetag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/bluetag/hitscan
/obj/item/ammo_casing/energy/laser/redtag
projectile_type = /obj/item/projectile/beam/lasertag/redtag
select_name = "redtag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/redtag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan
/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan/holy
/obj/item/ammo_casing/energy/xray
projectile_type = /obj/item/projectile/beam/xray
e_cost = 50
fire_sound = 'sound/weapons/laser3.ogg'
/obj/item/ammo_casing/energy/mindflayer
projectile_type = /obj/item/projectile/beam/mindflayer
select_name = "MINDFUCK"
fire_sound = 'sound/weapons/laser.ogg'
/obj/item/ammo_casing/energy/laser
projectile_type = /obj/item/projectile/beam/laser
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/item/projectile/beam/laser
e_cost = 83
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun/old
projectile_type = /obj/item/projectile/beam/laser
e_cost = 200
select_name = "kill"
/obj/item/ammo_casing/energy/laser/hos
e_cost = 100
/obj/item/ammo_casing/energy/laser/practice
projectile_type = /obj/item/projectile/beam/practice
select_name = "practice"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/scatter
projectile_type = /obj/item/projectile/beam/scatter
pellets = 5
variance = 25
select_name = "scatter"
/obj/item/ammo_casing/energy/laser/scatter/disabler
projectile_type = /obj/item/projectile/beam/disabler
pellets = 3
variance = 15
harmful = FALSE
/obj/item/ammo_casing/energy/laser/heavy
projectile_type = /obj/item/projectile/beam/laser/heavylaser
select_name = "anti-vehicle"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/ammo_casing/energy/laser/pulse
projectile_type = /obj/item/projectile/beam/pulse
e_cost = 200
select_name = "DESTROY"
fire_sound = 'sound/weapons/pulse.ogg'
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/beam/lasertag/bluetag
select_name = "bluetag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/bluetag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/bluetag/hitscan
/obj/item/ammo_casing/energy/laser/redtag
projectile_type = /obj/item/projectile/beam/lasertag/redtag
select_name = "redtag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/redtag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan
/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan/holy
/obj/item/ammo_casing/energy/xray
projectile_type = /obj/item/projectile/beam/xray
e_cost = 50
fire_sound = 'sound/weapons/laser3.ogg'
/obj/item/ammo_casing/energy/mindflayer
projectile_type = /obj/item/projectile/beam/mindflayer
select_name = "MINDFUCK"
fire_sound = 'sound/weapons/laser.ogg'
@@ -1,6 +1,6 @@
/obj/item/ammo_casing/energy/c3dbullet
projectile_type = /obj/item/projectile/bullet/c3d
select_name = "spraydown"
fire_sound = 'sound/weapons/gunshot_smg.ogg'
e_cost = 20
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect
/obj/item/ammo_casing/energy/c3dbullet
projectile_type = /obj/item/projectile/bullet/c3d
select_name = "spraydown"
fire_sound = 'sound/weapons/gunshot_smg.ogg'
e_cost = 20
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect
@@ -1,11 +1,15 @@
/obj/item/ammo_casing/energy/plasma
projectile_type = /obj/item/projectile/plasma
select_name = "plasma burst"
fire_sound = 'sound/weapons/plasma_cutter.ogg'
delay = 15
e_cost = 25
/obj/item/ammo_casing/energy/plasma/adv
projectile_type = /obj/item/projectile/plasma/adv
delay = 10
e_cost = 10
/obj/item/ammo_casing/energy/plasma
projectile_type = /obj/item/projectile/plasma
select_name = "plasma burst"
fire_sound = 'sound/weapons/plasma_cutter.ogg'
delay = 15
e_cost = 25
/obj/item/ammo_casing/energy/plasma/adv
projectile_type = /obj/item/projectile/plasma/adv
delay = 10
e_cost = 10
/obj/item/ammo_casing/energy/plasma/weak
projectile_type = /obj/item/projectile/plasma/weak
e_cost = 100
@@ -1,20 +1,20 @@
/obj/item/ammo_casing/energy/wormhole
projectile_type = /obj/item/projectile/beam/wormhole
e_cost = 0
fire_sound = 'sound/weapons/pulse3.ogg'
var/obj/item/gun/energy/wormhole_projector/gun = null
select_name = "blue"
/obj/item/ammo_casing/energy/wormhole/orange
projectile_type = /obj/item/projectile/beam/wormhole/orange
select_name = "orange"
/obj/item/ammo_casing/energy/wormhole/Initialize(mapload, obj/item/gun/energy/wormhole_projector/wh)
. = ..()
gun = wh
/obj/item/ammo_casing/energy/wormhole/throw_proj()
. = ..()
if(istype(BB, /obj/item/projectile/beam/wormhole))
var/obj/item/projectile/beam/wormhole/WH = BB
WH.gun = gun
/obj/item/ammo_casing/energy/wormhole
projectile_type = /obj/item/projectile/beam/wormhole
e_cost = 0
fire_sound = 'sound/weapons/pulse3.ogg'
var/obj/item/gun/energy/wormhole_projector/gun = null
select_name = "blue"
/obj/item/ammo_casing/energy/wormhole/orange
projectile_type = /obj/item/projectile/beam/wormhole/orange
select_name = "orange"
/obj/item/ammo_casing/energy/wormhole/Initialize(mapload, obj/item/gun/energy/wormhole_projector/wh)
. = ..()
gun = wh
/obj/item/ammo_casing/energy/wormhole/throw_proj()
. = ..()
if(istype(BB, /obj/item/projectile/beam/wormhole))
var/obj/item/projectile/beam/wormhole/WH = BB
WH.gun = gun
@@ -1,74 +1,74 @@
/obj/item/ammo_casing/energy/ion
projectile_type = /obj/item/projectile/ion
select_name = "ion"
fire_sound = 'sound/weapons/ionrifle.ogg'
/obj/item/ammo_casing/energy/declone
projectile_type = /obj/item/projectile/energy/declone
select_name = "declone"
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/flora
fire_sound = 'sound/effects/stealthoff.ogg'
harmful = FALSE
/obj/item/ammo_casing/energy/flora/yield
projectile_type = /obj/item/projectile/energy/florayield
select_name = "yield"
/obj/item/ammo_casing/energy/flora/mut
projectile_type = /obj/item/projectile/energy/floramut
select_name = "mutation"
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/item/projectile/temp
select_name = "freeze"
e_cost = 250
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/temp/hot
projectile_type = /obj/item/projectile/temp/hot
select_name = "bake"
/obj/item/ammo_casing/energy/meteor
projectile_type = /obj/item/projectile/meteor
select_name = "goddamn meteor"
/obj/item/ammo_casing/energy/net
projectile_type = /obj/item/projectile/energy/net
select_name = "netting"
pellets = 6
variance = 40
harmful = FALSE
/obj/item/ammo_casing/energy/trap
projectile_type = /obj/item/projectile/energy/trap
select_name = "snare"
harmful = FALSE
/obj/item/ammo_casing/energy/instakill
projectile_type = /obj/item/projectile/beam/instakill
e_cost = 0
select_name = "DESTROY"
/obj/item/ammo_casing/energy/instakill/blue
projectile_type = /obj/item/projectile/beam/instakill/blue
/obj/item/ammo_casing/energy/instakill/red
projectile_type = /obj/item/projectile/beam/instakill/red
/obj/item/ammo_casing/energy/tesla_revolver
fire_sound = 'sound/magic/lightningbolt.ogg'
e_cost = 200
select_name = "stun"
projectile_type = /obj/item/projectile/energy/tesla/revolver
/obj/item/ammo_casing/energy/emitter
fire_sound = 'sound/weapons/emitter.ogg'
e_cost = 2000 //20,000 is in the cell making this 10 shots before reload
projectile_type = /obj/item/projectile/beam/emitter
/obj/item/ammo_casing/energy/shrink
projectile_type = /obj/item/projectile/beam/shrink
select_name = "shrink ray"
/obj/item/ammo_casing/energy/ion
projectile_type = /obj/item/projectile/ion
select_name = "ion"
fire_sound = 'sound/weapons/ionrifle.ogg'
/obj/item/ammo_casing/energy/declone
projectile_type = /obj/item/projectile/energy/declone
select_name = "declone"
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/flora
fire_sound = 'sound/effects/stealthoff.ogg'
harmful = FALSE
/obj/item/ammo_casing/energy/flora/yield
projectile_type = /obj/item/projectile/energy/florayield
select_name = "yield"
/obj/item/ammo_casing/energy/flora/mut
projectile_type = /obj/item/projectile/energy/floramut
select_name = "mutation"
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/item/projectile/temp
select_name = "freeze"
e_cost = 250
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/temp/hot
projectile_type = /obj/item/projectile/temp/hot
select_name = "bake"
/obj/item/ammo_casing/energy/meteor
projectile_type = /obj/item/projectile/meteor
select_name = "goddamn meteor"
/obj/item/ammo_casing/energy/net
projectile_type = /obj/item/projectile/energy/net
select_name = "netting"
pellets = 6
variance = 40
harmful = FALSE
/obj/item/ammo_casing/energy/trap
projectile_type = /obj/item/projectile/energy/trap
select_name = "snare"
harmful = FALSE
/obj/item/ammo_casing/energy/instakill
projectile_type = /obj/item/projectile/beam/instakill
e_cost = 0
select_name = "DESTROY"
/obj/item/ammo_casing/energy/instakill/blue
projectile_type = /obj/item/projectile/beam/instakill/blue
/obj/item/ammo_casing/energy/instakill/red
projectile_type = /obj/item/projectile/beam/instakill/red
/obj/item/ammo_casing/energy/tesla_revolver
fire_sound = 'sound/magic/lightningbolt.ogg'
e_cost = 200
select_name = "stun"
projectile_type = /obj/item/projectile/energy/tesla/revolver
/obj/item/ammo_casing/energy/emitter
fire_sound = 'sound/weapons/emitter.ogg'
e_cost = 2000 //20,000 is in the cell making this 10 shots before reload
projectile_type = /obj/item/projectile/beam/emitter
/obj/item/ammo_casing/energy/shrink
projectile_type = /obj/item/projectile/beam/shrink
select_name = "shrink ray"
e_cost = 200
@@ -1,30 +1,30 @@
/obj/item/ammo_casing/energy/electrode
projectile_type = /obj/item/projectile/energy/electrode
select_name = "stun"
fire_sound = 'sound/weapons/taser.ogg'
e_cost = 200
harmful = FALSE
/obj/item/ammo_casing/energy/electrode/spec
e_cost = 100
/obj/item/ammo_casing/energy/electrode/gun
fire_sound = 'sound/weapons/gunshot.ogg'
e_cost = 100
/obj/item/ammo_casing/energy/electrode/hos
e_cost = 200
/obj/item/ammo_casing/energy/electrode/old
e_cost = 1000
/obj/item/ammo_casing/energy/disabler
projectile_type = /obj/item/projectile/beam/disabler
select_name = "disable"
e_cost = 40
fire_sound = 'sound/weapons/taser2.ogg'
harmful = FALSE
click_cooldown_override = 3.5
/obj/item/ammo_casing/energy/disabler/secborg
/obj/item/ammo_casing/energy/electrode
projectile_type = /obj/item/projectile/energy/electrode
select_name = "stun"
fire_sound = 'sound/weapons/taser.ogg'
e_cost = 200
harmful = FALSE
/obj/item/ammo_casing/energy/electrode/spec
e_cost = 100
/obj/item/ammo_casing/energy/electrode/gun
fire_sound = 'sound/weapons/gunshot.ogg'
e_cost = 100
/obj/item/ammo_casing/energy/electrode/hos
e_cost = 200
/obj/item/ammo_casing/energy/electrode/old
e_cost = 1000
/obj/item/ammo_casing/energy/disabler
projectile_type = /obj/item/projectile/beam/disabler
select_name = "disable"
e_cost = 40
fire_sound = 'sound/weapons/taser2.ogg'
harmful = FALSE
click_cooldown_override = 3.5
/obj/item/ammo_casing/energy/disabler/secborg
e_cost = 50
@@ -1,45 +1,45 @@
/obj/item/ammo_casing/magic
name = "magic casing"
desc = "I didn't even know magic needed ammo..."
projectile_type = /obj/item/projectile/magic
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/magic
heavy_metal = FALSE
/obj/item/ammo_casing/magic/change
projectile_type = /obj/item/projectile/magic/change
/obj/item/ammo_casing/magic/animate
projectile_type = /obj/item/projectile/magic/animate
/obj/item/ammo_casing/magic/heal
projectile_type = /obj/item/projectile/magic/resurrection
harmful = FALSE
/obj/item/ammo_casing/magic/death
projectile_type = /obj/item/projectile/magic/death
/obj/item/ammo_casing/magic/teleport
projectile_type = /obj/item/projectile/magic/teleport
harmful = FALSE
/obj/item/ammo_casing/magic/door
projectile_type = /obj/item/projectile/magic/door
harmful = FALSE
/obj/item/ammo_casing/magic/fireball
projectile_type = /obj/item/projectile/magic/aoe/fireball
/obj/item/ammo_casing/magic/chaos
projectile_type = /obj/item/projectile/magic
/obj/item/ammo_casing/magic/spellblade
projectile_type = /obj/item/projectile/magic/spellblade
/obj/item/ammo_casing/magic/arcane_barrage
projectile_type = /obj/item/projectile/magic/arcane_barrage
/obj/item/ammo_casing/magic/honk
projectile_type = /obj/item/projectile/bullet/honker
/obj/item/ammo_casing/magic/locker
projectile_type = /obj/item/projectile/magic/locker
/obj/item/ammo_casing/magic
name = "magic casing"
desc = "I didn't even know magic needed ammo..."
projectile_type = /obj/item/projectile/magic
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/magic
heavy_metal = FALSE
/obj/item/ammo_casing/magic/change
projectile_type = /obj/item/projectile/magic/change
/obj/item/ammo_casing/magic/animate
projectile_type = /obj/item/projectile/magic/animate
/obj/item/ammo_casing/magic/heal
projectile_type = /obj/item/projectile/magic/resurrection
harmful = FALSE
/obj/item/ammo_casing/magic/death
projectile_type = /obj/item/projectile/magic/death
/obj/item/ammo_casing/magic/teleport
projectile_type = /obj/item/projectile/magic/teleport
harmful = FALSE
/obj/item/ammo_casing/magic/door
projectile_type = /obj/item/projectile/magic/door
harmful = FALSE
/obj/item/ammo_casing/magic/fireball
projectile_type = /obj/item/projectile/magic/aoe/fireball
/obj/item/ammo_casing/magic/chaos
projectile_type = /obj/item/projectile/magic
/obj/item/ammo_casing/magic/spellblade
projectile_type = /obj/item/projectile/magic/spellblade
/obj/item/ammo_casing/magic/arcane_barrage
projectile_type = /obj/item/projectile/magic/arcane_barrage
/obj/item/ammo_casing/magic/honk
projectile_type = /obj/item/projectile/bullet/honker
/obj/item/ammo_casing/magic/locker
projectile_type = /obj/item/projectile/magic/locker
@@ -1,78 +1,78 @@
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = /obj/item/projectile/bullet/dart/syringe
firing_effect_type = null
/obj/item/ammo_casing/syringegun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/syringe))
var/obj/item/gun/syringe/SG = loc
if(!SG.syringes.len)
return
var/obj/item/reagent_containers/syringe/S = SG.syringes[1]
S.reagents.trans_to(BB, S.reagents.total_volume)
BB.name = S.name
var/obj/item/projectile/bullet/dart/D = BB
D.piercing = S.proj_piercing
SG.syringes.Remove(S)
qdel(S)
..()
/obj/item/ammo_casing/chemgun
name = "dart synthesiser"
desc = "A high-power spring, linked to an energy-based dart synthesiser."
projectile_type = /obj/item/projectile/bullet/dart
firing_effect_type = null
/obj/item/ammo_casing/chemgun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/chem))
var/obj/item/gun/chem/CG = loc
if(CG.syringes_left <= 0)
return
CG.reagents.trans_to(BB, 15)
BB.name = "chemical dart"
CG.syringes_left--
..()
/obj/item/ammo_casing/dnainjector
name = "rigged syringe gun spring"
desc = "A high-power spring that throws DNA injectors."
projectile_type = /obj/item/projectile/bullet/dnainjector
firing_effect_type = null
/obj/item/ammo_casing/dnainjector/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/syringe/dna))
var/obj/item/gun/syringe/dna/SG = loc
if(!SG.syringes.len)
return
var/obj/item/dnainjector/S = popleft(SG.syringes)
var/obj/item/projectile/bullet/dnainjector/D = BB
S.forceMove(D)
D.injector = S
..()
/obj/item/ammo_casing/syringegun/dart
name = "used air canister"
desc = "A small canister of compressed gas."
projectile_type = /obj/item/projectile/bullet/dart/syringe/dart
firing_effect_type = null
harmful = FALSE
/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
..()
var/obj/item/gun/syringe/SG = loc
if(!SG.syringes.len)
return
var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1]
if(S.emptrig == TRUE)
var/obj/item/projectile/bullet/dart/syringe/dart/D = BB
D.emptrig = TRUE
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = /obj/item/projectile/bullet/dart/syringe
firing_effect_type = null
/obj/item/ammo_casing/syringegun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/syringe))
var/obj/item/gun/syringe/SG = loc
if(!SG.syringes.len)
return
var/obj/item/reagent_containers/syringe/S = SG.syringes[1]
S.reagents.trans_to(BB, S.reagents.total_volume)
BB.name = S.name
var/obj/item/projectile/bullet/dart/D = BB
D.piercing = S.proj_piercing
SG.syringes.Remove(S)
qdel(S)
..()
/obj/item/ammo_casing/chemgun
name = "dart synthesiser"
desc = "A high-power spring, linked to an energy-based dart synthesiser."
projectile_type = /obj/item/projectile/bullet/dart
firing_effect_type = null
/obj/item/ammo_casing/chemgun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/chem))
var/obj/item/gun/chem/CG = loc
if(CG.syringes_left <= 0)
return
CG.reagents.trans_to(BB, 15)
BB.name = "chemical dart"
CG.syringes_left--
..()
/obj/item/ammo_casing/dnainjector
name = "rigged syringe gun spring"
desc = "A high-power spring that throws DNA injectors."
projectile_type = /obj/item/projectile/bullet/dnainjector
firing_effect_type = null
/obj/item/ammo_casing/dnainjector/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/syringe/dna))
var/obj/item/gun/syringe/dna/SG = loc
if(!SG.syringes.len)
return
var/obj/item/dnainjector/S = popleft(SG.syringes)
var/obj/item/projectile/bullet/dnainjector/D = BB
S.forceMove(D)
D.injector = S
..()
/obj/item/ammo_casing/syringegun/dart
name = "used air canister"
desc = "A small canister of compressed gas."
projectile_type = /obj/item/projectile/bullet/dart/syringe/dart
firing_effect_type = null
harmful = FALSE
/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
..()
var/obj/item/gun/syringe/SG = loc
if(!SG.syringes.len)
return
var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1]
if(S.emptrig == TRUE)
var/obj/item/projectile/bullet/dart/syringe/dart/D = BB
D.emptrig = TRUE
@@ -1,138 +1,138 @@
//Boxes of ammo
/obj/item/ammo_box
name = "ammo box (null_reference_exception)"
desc = "A box of ammo."
icon = 'icons/obj/ammo.dmi'
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
materials = list(MAT_METAL = 30000)
throwforce = 2
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
var/list/stored_ammo = list()
var/ammo_type = /obj/item/ammo_casing
var/max_ammo = 7
var/multiple_sprites = 0
var/caliber
var/multiload = 1
var/start_empty = 0
var/list/bullet_cost
var/list/base_cost// override this one as well if you override bullet_cost
/obj/item/ammo_box/Initialize()
. = ..()
if (!bullet_cost)
for (var/material in materials)
var/material_amount = materials[material]
LAZYSET(base_cost, material, (material_amount * 0.10))
material_amount *= 0.90 // 10% for the container
material_amount /= max_ammo
LAZYSET(bullet_cost, material, material_amount)
if(!start_empty)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
update_icon()
/obj/item/ammo_box/proc/get_round(keep = 0)
if (!stored_ammo.len)
return null
else
var/b = stored_ammo[stored_ammo.len]
stored_ammo -= b
if (keep)
stored_ammo.Insert(1,b)
return b
/obj/item/ammo_box/proc/give_round(obj/item/ammo_casing/R, replace_spent = 0)
// Boxes don't have a caliber type, magazines do. Not sure if it's intended or not, but if we fail to find a caliber, then we fall back to ammo_type.
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
return 0
if (stored_ammo.len < max_ammo)
stored_ammo += R
R.forceMove(src)
return 1
//for accessibles magazines (e.g internal ones) when full, start replacing spent ammo
else if(replace_spent)
for(var/obj/item/ammo_casing/AC in stored_ammo)
if(!AC.BB)//found a spent ammo
stored_ammo -= AC
AC.forceMove(get_turf(src.loc))
stored_ammo += R
R.forceMove(src)
return 1
return 0
/obj/item/ammo_box/proc/can_load(mob/user)
return 1
/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = FALSE, replace_spent = 0)
var/num_loaded = 0
if(!can_load(user))
return
if(istype(A, /obj/item/ammo_box))
var/obj/item/ammo_box/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
var/did_load = give_round(AC, replace_spent)
if(did_load)
AM.stored_ammo -= AC
num_loaded++
if(!did_load || !multiload)
break
if(istype(A, /obj/item/ammo_casing))
var/obj/item/ammo_casing/AC = A
if(give_round(AC, replace_spent))
user.transferItemToLoc(AC, src, TRUE)
num_loaded++
if(num_loaded)
if(!silent)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
A.update_icon()
update_icon()
return num_loaded
/obj/item/ammo_box/attack_self(mob/user)
var/obj/item/ammo_casing/A = get_round()
if(A)
if(!user.put_in_hands(A))
A.bounce_away(FALSE, NONE)
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
to_chat(user, "<span class='notice'>You remove a round from \the [src]!</span>")
update_icon()
/obj/item/ammo_box/update_icon()
switch(multiple_sprites)
if(1)
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
if(2)
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]"
desc = "[initial(desc)] There are [stored_ammo.len] shell\s left!"
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
materials[material] = material_amount
//Behavior for magazines
/obj/item/ammo_box/magazine/proc/ammo_count()
return stored_ammo.len
/obj/item/ammo_box/magazine/proc/empty_magazine()
var/turf_mag = get_turf(src)
for(var/obj/item/ammo in stored_ammo)
ammo.forceMove(turf_mag)
stored_ammo -= ammo
/obj/item/ammo_box/magazine/handle_atom_del(atom/A)
stored_ammo -= A
update_icon()
//Boxes of ammo
/obj/item/ammo_box
name = "ammo box (null_reference_exception)"
desc = "A box of ammo."
icon = 'icons/obj/ammo.dmi'
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
materials = list(MAT_METAL = 30000)
throwforce = 2
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
var/list/stored_ammo = list()
var/ammo_type = /obj/item/ammo_casing
var/max_ammo = 7
var/multiple_sprites = 0
var/caliber
var/multiload = 1
var/start_empty = 0
var/list/bullet_cost
var/list/base_cost// override this one as well if you override bullet_cost
/obj/item/ammo_box/Initialize()
. = ..()
if (!bullet_cost)
for (var/material in materials)
var/material_amount = materials[material]
LAZYSET(base_cost, material, (material_amount * 0.10))
material_amount *= 0.90 // 10% for the container
material_amount /= max_ammo
LAZYSET(bullet_cost, material, material_amount)
if(!start_empty)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
update_icon()
/obj/item/ammo_box/proc/get_round(keep = 0)
if (!stored_ammo.len)
return null
else
var/b = stored_ammo[stored_ammo.len]
stored_ammo -= b
if (keep)
stored_ammo.Insert(1,b)
return b
/obj/item/ammo_box/proc/give_round(obj/item/ammo_casing/R, replace_spent = 0)
// Boxes don't have a caliber type, magazines do. Not sure if it's intended or not, but if we fail to find a caliber, then we fall back to ammo_type.
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
return 0
if (stored_ammo.len < max_ammo)
stored_ammo += R
R.forceMove(src)
return 1
//for accessibles magazines (e.g internal ones) when full, start replacing spent ammo
else if(replace_spent)
for(var/obj/item/ammo_casing/AC in stored_ammo)
if(!AC.BB)//found a spent ammo
stored_ammo -= AC
AC.forceMove(get_turf(src.loc))
stored_ammo += R
R.forceMove(src)
return 1
return 0
/obj/item/ammo_box/proc/can_load(mob/user)
return 1
/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = FALSE, replace_spent = 0)
var/num_loaded = 0
if(!can_load(user))
return
if(istype(A, /obj/item/ammo_box))
var/obj/item/ammo_box/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
var/did_load = give_round(AC, replace_spent)
if(did_load)
AM.stored_ammo -= AC
num_loaded++
if(!did_load || !multiload)
break
if(istype(A, /obj/item/ammo_casing))
var/obj/item/ammo_casing/AC = A
if(give_round(AC, replace_spent))
user.transferItemToLoc(AC, src, TRUE)
num_loaded++
if(num_loaded)
if(!silent)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
A.update_icon()
update_icon()
return num_loaded
/obj/item/ammo_box/attack_self(mob/user)
var/obj/item/ammo_casing/A = get_round()
if(A)
if(!user.put_in_hands(A))
A.bounce_away(FALSE, NONE)
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
to_chat(user, "<span class='notice'>You remove a round from \the [src]!</span>")
update_icon()
/obj/item/ammo_box/update_icon()
switch(multiple_sprites)
if(1)
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
if(2)
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]"
desc = "[initial(desc)] There are [stored_ammo.len] shell\s left!"
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
materials[material] = material_amount
//Behavior for magazines
/obj/item/ammo_box/magazine/proc/ammo_count()
return stored_ammo.len
/obj/item/ammo_box/magazine/proc/empty_magazine()
var/turf_mag = get_turf(src)
for(var/obj/item/ammo in stored_ammo)
ammo.forceMove(turf_mag)
stored_ammo -= ammo
/obj/item/ammo_box/magazine/handle_atom_del(atom/A)
stored_ammo -= A
update_icon()
@@ -1,8 +1,8 @@
/obj/item/ammo_box/magazine/m75
name = "specialized magazine (.75)"
icon_state = "75"
ammo_type = /obj/item/ammo_casing/caseless/a75
caliber = "75"
multiple_sprites = 2
max_ammo = 8
/obj/item/ammo_box/magazine/m75
name = "specialized magazine (.75)"
icon_state = "75"
ammo_type = /obj/item/ammo_casing/caseless/a75
caliber = "75"
multiple_sprites = 2
max_ammo = 8
+22 -22
View File
@@ -1,22 +1,22 @@
/obj/item/ammo_box/magazine/mm195x129
name = "box magazine (1.95x129mm)"
icon_state = "a762-50"
ammo_type = /obj/item/ammo_casing/mm195x129
caliber = "mm195129"
max_ammo = 50
/obj/item/ammo_box/magazine/mm195x129/hollow
name = "box magazine (Hollow-Point 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/hollow
/obj/item/ammo_box/magazine/mm195x129/ap
name = "box magazine (Armor Penetrating 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/ap
/obj/item/ammo_box/magazine/mm195x129/incen
name = "box magazine (Incendiary 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/incen
/obj/item/ammo_box/magazine/mm195x129/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
/obj/item/ammo_box/magazine/mm195x129
name = "box magazine (1.95x129mm)"
icon_state = "a762-50"
ammo_type = /obj/item/ammo_casing/mm195x129
caliber = "mm195129"
max_ammo = 50
/obj/item/ammo_box/magazine/mm195x129/hollow
name = "box magazine (Hollow-Point 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/hollow
/obj/item/ammo_box/magazine/mm195x129/ap
name = "box magazine (Armor Penetrating 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/ap
/obj/item/ammo_box/magazine/mm195x129/incen
name = "box magazine (Incendiary 1.95x129mm)"
ammo_type = /obj/item/ammo_casing/mm195x129/incen
/obj/item/ammo_box/magazine/mm195x129/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
+61 -61
View File
@@ -1,61 +1,61 @@
/obj/item/ammo_box/magazine/m10mm
name = "pistol magazine (10mm)"
desc = "A gun magazine."
icon_state = "9x19p"
ammo_type = /obj/item/ammo_casing/c10mm
caliber = "10mm"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/m10mm/fire
name = "pistol magazine (10mm incendiary)"
icon_state = "9x19pI"
desc = "A gun magazine. Loaded with rounds which ignite the target."
ammo_type = /obj/item/ammo_casing/c10mm/fire
/obj/item/ammo_box/magazine/m10mm/hp
name = "pistol magazine (10mm HP)"
icon_state = "9x19pH"
desc= "A gun magazine. Loaded with hollow-point rounds, extremely effective against unarmored targets, but nearly useless against protective clothing."
ammo_type = /obj/item/ammo_casing/c10mm/hp
/obj/item/ammo_box/magazine/m10mm/ap
name = "pistol magazine (10mm AP)"
icon_state = "9x19pA"
desc= "A gun magazine. Loaded with rounds which penetrate armour, but are less effective against normal targets."
ammo_type = /obj/item/ammo_casing/c10mm/ap
/obj/item/ammo_box/magazine/m45
name = "handgun magazine (.45)"
icon_state = "45-8"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 8
/obj/item/ammo_box/magazine/m45/update_icon()
..()
icon_state = "45-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/m45/kitchengun
name = "handgun magazine (.45 cleaning)"
desc = "BANG! BANG! BANG!"
ammo_type = /obj/item/ammo_casing/c45/kitchengun
/obj/item/ammo_box/magazine/pistolm9mm
name = "pistol magazine (9mm)"
icon_state = "9x19p-8"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 15
/obj/item/ammo_box/magazine/pistolm9mm/update_icon()
..()
icon_state = "9x19p-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/m50
name = "handgun magazine (.50ae)"
icon_state = "50ae"
ammo_type = /obj/item/ammo_casing/a50AE
caliber = ".50"
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_box/magazine/m10mm
name = "pistol magazine (10mm)"
desc = "A gun magazine."
icon_state = "9x19p"
ammo_type = /obj/item/ammo_casing/c10mm
caliber = "10mm"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/m10mm/fire
name = "pistol magazine (10mm incendiary)"
icon_state = "9x19pI"
desc = "A gun magazine. Loaded with rounds which ignite the target."
ammo_type = /obj/item/ammo_casing/c10mm/fire
/obj/item/ammo_box/magazine/m10mm/hp
name = "pistol magazine (10mm HP)"
icon_state = "9x19pH"
desc= "A gun magazine. Loaded with hollow-point rounds, extremely effective against unarmored targets, but nearly useless against protective clothing."
ammo_type = /obj/item/ammo_casing/c10mm/hp
/obj/item/ammo_box/magazine/m10mm/ap
name = "pistol magazine (10mm AP)"
icon_state = "9x19pA"
desc= "A gun magazine. Loaded with rounds which penetrate armour, but are less effective against normal targets."
ammo_type = /obj/item/ammo_casing/c10mm/ap
/obj/item/ammo_box/magazine/m45
name = "handgun magazine (.45)"
icon_state = "45-8"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 8
/obj/item/ammo_box/magazine/m45/update_icon()
..()
icon_state = "45-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/m45/kitchengun
name = "handgun magazine (.45 cleaning)"
desc = "BANG! BANG! BANG!"
ammo_type = /obj/item/ammo_casing/c45/kitchengun
/obj/item/ammo_box/magazine/pistolm9mm
name = "pistol magazine (9mm)"
icon_state = "9x19p-8"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 15
/obj/item/ammo_box/magazine/pistolm9mm/update_icon()
..()
icon_state = "9x19p-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/m50
name = "handgun magazine (.50ae)"
icon_state = "50ae"
ammo_type = /obj/item/ammo_casing/a50AE
caliber = ".50"
max_ammo = 7
multiple_sprites = 1
@@ -1,14 +1,14 @@
/obj/item/ammo_box/magazine/recharge
name = "power pack"
desc = "A rechargeable, detachable battery that serves as a magazine for laser rifles."
icon_state = "oldrifle-20"
ammo_type = /obj/item/ammo_casing/caseless/laser
caliber = "laser"
max_ammo = 20
/obj/item/ammo_box/magazine/recharge/update_icon()
desc = "[initial(desc)] It has [stored_ammo.len] shot\s left."
icon_state = "oldrifle-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets"
return
/obj/item/ammo_box/magazine/recharge
name = "power pack"
desc = "A rechargeable, detachable battery that serves as a magazine for laser rifles."
icon_state = "oldrifle-20"
ammo_type = /obj/item/ammo_casing/caseless/laser
caliber = "laser"
max_ammo = 20
/obj/item/ammo_box/magazine/recharge/update_icon()
desc = "[initial(desc)] It has [stored_ammo.len] shot\s left."
icon_state = "oldrifle-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets"
return
+21 -21
View File
@@ -1,21 +1,21 @@
/obj/item/ammo_box/magazine/m10mm/rifle
name = "rifle magazine (10mm)"
desc = "A well-worn magazine fitted for the surplus rifle."
icon_state = "75-8"
ammo_type = /obj/item/ammo_casing/c10mm
caliber = "10mm"
max_ammo = 10
/obj/item/ammo_box/magazine/m10mm/rifle/update_icon()
if(ammo_count())
icon_state = "75-8"
else
icon_state = "75-0"
/obj/item/ammo_box/magazine/m556
name = "toploader magazine (5.56mm)"
icon_state = "5.56m"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30
multiple_sprites = 2
/obj/item/ammo_box/magazine/m10mm/rifle
name = "rifle magazine (10mm)"
desc = "A well-worn magazine fitted for the surplus rifle."
icon_state = "75-8"
ammo_type = /obj/item/ammo_casing/c10mm
caliber = "10mm"
max_ammo = 10
/obj/item/ammo_box/magazine/m10mm/rifle/update_icon()
if(ammo_count())
icon_state = "75-8"
else
icon_state = "75-0"
/obj/item/ammo_box/magazine/m556
name = "toploader magazine (5.56mm)"
icon_state = "5.56m"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30
multiple_sprites = 2
+41 -41
View File
@@ -1,41 +1,41 @@
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g buckshot slugs)"
desc = "A drum magazine."
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
caliber = "shotgun"
max_ammo = 8
/obj/item/ammo_box/magazine/m12g/update_icon()
..()
icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/8, 1)*8]"
/obj/item/ammo_box/magazine/m12g/stun
name = "shotgun magazine (12g taser slugs)"
icon_state = "m12gs"
ammo_type = /obj/item/ammo_casing/shotgun/stunslug
/obj/item/ammo_box/magazine/m12g/slug
name = "shotgun magazine (12g slugs)"
icon_state = "m12gb" //this may need an unique sprite
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/ammo_box/magazine/m12g/dragon
name = "shotgun magazine (12g dragon's breath)"
icon_state = "m12gf"
ammo_type = /obj/item/ammo_casing/shotgun/dragonsbreath
/obj/item/ammo_box/magazine/m12g/bioterror
name = "shotgun magazine (12g bioterror)"
icon_state = "m12gt"
ammo_type = /obj/item/ammo_casing/shotgun/dart/bioterror
/obj/item/ammo_box/magazine/m12g/meteor
name = "shotgun magazine (12g meteor slugs)"
icon_state = "m12gbc"
ammo_type = /obj/item/ammo_casing/shotgun/meteorslug
/obj/item/ammo_box/magazine/m12g/scatter
name = "shotgun magazine (12g scatter laser shot slugs)"
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/laserslug
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g buckshot slugs)"
desc = "A drum magazine."
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
caliber = "shotgun"
max_ammo = 8
/obj/item/ammo_box/magazine/m12g/update_icon()
..()
icon_state = "[initial(icon_state)]-[CEILING(ammo_count(0)/8, 1)*8]"
/obj/item/ammo_box/magazine/m12g/stun
name = "shotgun magazine (12g taser slugs)"
icon_state = "m12gs"
ammo_type = /obj/item/ammo_casing/shotgun/stunslug
/obj/item/ammo_box/magazine/m12g/slug
name = "shotgun magazine (12g slugs)"
icon_state = "m12gb" //this may need an unique sprite
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/ammo_box/magazine/m12g/dragon
name = "shotgun magazine (12g dragon's breath)"
icon_state = "m12gf"
ammo_type = /obj/item/ammo_casing/shotgun/dragonsbreath
/obj/item/ammo_box/magazine/m12g/bioterror
name = "shotgun magazine (12g bioterror)"
icon_state = "m12gt"
ammo_type = /obj/item/ammo_casing/shotgun/dart/bioterror
/obj/item/ammo_box/magazine/m12g/meteor
name = "shotgun magazine (12g meteor slugs)"
icon_state = "m12gbc"
ammo_type = /obj/item/ammo_casing/shotgun/meteorslug
/obj/item/ammo_box/magazine/m12g/scatter
name = "shotgun magazine (12g scatter laser shot slugs)"
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/laserslug
+76 -76
View File
@@ -1,76 +1,76 @@
/obj/item/ammo_box/magazine/wt550m9
name = "wt550 magazine (4.6x30mm)"
icon_state = "46x30mmt-20"
ammo_type = /obj/item/ammo_casing/c46x30mm
caliber = "4.6x30mm"
max_ammo = 32
/obj/item/ammo_box/magazine/wt550m9/update_icon()
..()
icon_state = "46x30mmt-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/wt550m9/wtap
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
icon_state = "46x30mmtA-20"
ammo_type = /obj/item/ammo_casing/c46x30mm/ap
/obj/item/ammo_box/magazine/wt550m9/wtap/update_icon()
..()
icon_state = "46x30mmtA-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/wt550m9/wtic
name = "wt550 magazine (Incendiary 4.6x30mm)"
icon_state = "46x30mmtI-20"
ammo_type = /obj/item/ammo_casing/c46x30mm/inc
/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon()
..()
icon_state = "46x30mmtI-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/uzim9mm
name = "uzi magazine (9mm)"
icon_state = "uzi9mm-32"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 32
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
..()
icon_state = "uzi9mm-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/smgm9mm
name = "SMG magazine (9mm)"
icon_state = "smg9mm-42"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 21
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "smg9mm-[ammo_count() ? "42" : "0"]"
/obj/item/ammo_box/magazine/smgm9mm/ap
name = "SMG magazine (Armour Piercing 9mm)"
ammo_type = /obj/item/ammo_casing/c9mm/ap
/obj/item/ammo_box/magazine/smgm9mm/fire
name = "SMG Magazine (Incendiary 9mm)"
ammo_type = /obj/item/ammo_casing/c9mm/inc
/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
icon_state = "c20r45-24"
ammo_type = /obj/item/ammo_casing/c45/nostamina
caliber = ".45"
max_ammo = 24
/obj/item/ammo_box/magazine/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/tommygunm45
name = "drum magazine (.45)"
icon_state = "drum45"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 50
/obj/item/ammo_box/magazine/wt550m9
name = "wt550 magazine (4.6x30mm)"
icon_state = "46x30mmt-20"
ammo_type = /obj/item/ammo_casing/c46x30mm
caliber = "4.6x30mm"
max_ammo = 32
/obj/item/ammo_box/magazine/wt550m9/update_icon()
..()
icon_state = "46x30mmt-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/wt550m9/wtap
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
icon_state = "46x30mmtA-20"
ammo_type = /obj/item/ammo_casing/c46x30mm/ap
/obj/item/ammo_box/magazine/wt550m9/wtap/update_icon()
..()
icon_state = "46x30mmtA-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/wt550m9/wtic
name = "wt550 magazine (Incendiary 4.6x30mm)"
icon_state = "46x30mmtI-20"
ammo_type = /obj/item/ammo_casing/c46x30mm/inc
/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon()
..()
icon_state = "46x30mmtI-[round(20*(ammo_count()/max_ammo),4)]"
/obj/item/ammo_box/magazine/uzim9mm
name = "uzi magazine (9mm)"
icon_state = "uzi9mm-32"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 32
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
..()
icon_state = "uzi9mm-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/smgm9mm
name = "SMG magazine (9mm)"
icon_state = "smg9mm-42"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 21
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "smg9mm-[ammo_count() ? "42" : "0"]"
/obj/item/ammo_box/magazine/smgm9mm/ap
name = "SMG magazine (Armour Piercing 9mm)"
ammo_type = /obj/item/ammo_casing/c9mm/ap
/obj/item/ammo_box/magazine/smgm9mm/fire
name = "SMG Magazine (Incendiary 9mm)"
ammo_type = /obj/item/ammo_casing/c9mm/inc
/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
icon_state = "c20r45-24"
ammo_type = /obj/item/ammo_casing/c45/nostamina
caliber = ".45"
max_ammo = 24
/obj/item/ammo_box/magazine/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/tommygunm45
name = "drum magazine (.45)"
icon_state = "drum45"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 50
+26 -26
View File
@@ -1,26 +1,26 @@
/obj/item/ammo_box/magazine/sniper_rounds
name = "sniper rounds (.50)"
icon_state = ".50mag"
ammo_type = /obj/item/ammo_casing/p50
max_ammo = 6
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/update_icon()
if(ammo_count())
icon_state = "[initial(icon_state)]-ammo"
else
icon_state = "[initial(icon_state)]"
/obj/item/ammo_box/magazine/sniper_rounds/soporific
name = "sniper rounds (Zzzzz)"
desc = "Soporific sniper rounds, designed for happy days and dead quiet nights..."
icon_state = "soporific"
ammo_type = /obj/item/ammo_casing/p50/soporific
max_ammo = 3
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/penetrator
name = "sniper rounds (penetrator)"
desc = "An extremely powerful round capable of passing straight through cover and anyone unfortunate enough to be behind it."
ammo_type = /obj/item/ammo_casing/p50/penetrator
max_ammo = 5
/obj/item/ammo_box/magazine/sniper_rounds
name = "sniper rounds (.50)"
icon_state = ".50mag"
ammo_type = /obj/item/ammo_casing/p50
max_ammo = 6
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/update_icon()
if(ammo_count())
icon_state = "[initial(icon_state)]-ammo"
else
icon_state = "[initial(icon_state)]"
/obj/item/ammo_box/magazine/sniper_rounds/soporific
name = "sniper rounds (Zzzzz)"
desc = "Soporific sniper rounds, designed for happy days and dead quiet nights..."
icon_state = "soporific"
ammo_type = /obj/item/ammo_casing/p50/soporific
max_ammo = 3
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/penetrator
name = "sniper rounds (penetrator)"
desc = "An extremely powerful round capable of passing straight through cover and anyone unfortunate enough to be behind it."
ammo_type = /obj/item/ammo_casing/p50/penetrator
max_ammo = 5
+59 -59
View File
@@ -1,59 +1,59 @@
/obj/item/ammo_box/magazine/toy
name = "foam force META magazine"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
/obj/item/ammo_box/magazine/toy/smg
name = "foam force SMG magazine"
icon_state = "smg9mm-42"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smg/update_icon()
..()
if(ammo_count())
icon_state = "smg9mm-42"
else
icon_state = "smg9mm-0"
/obj/item/ammo_box/magazine/toy/smg/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/pistol
name = "foam force pistol magazine"
icon_state = "9x19p"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/toy/pistol/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
icon_state = "c20r45-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/toy/smgm45/riot
icon_state = "c20r45-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/m762
name = "donksoft box magazine"
icon_state = "a762-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 50
/obj/item/ammo_box/magazine/toy/m762/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
/obj/item/ammo_box/magazine/toy/m762/riot
icon_state = "a762-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy
name = "foam force META magazine"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
/obj/item/ammo_box/magazine/toy/smg
name = "foam force SMG magazine"
icon_state = "smg9mm-42"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smg/update_icon()
..()
if(ammo_count())
icon_state = "smg9mm-42"
else
icon_state = "smg9mm-0"
/obj/item/ammo_box/magazine/toy/smg/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/pistol
name = "foam force pistol magazine"
icon_state = "9x19p"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/toy/pistol/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
icon_state = "c20r45-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/toy/smgm45/riot
icon_state = "c20r45-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/m762
name = "donksoft box magazine"
icon_state = "a762-toy"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 50
/obj/item/ammo_box/magazine/toy/m762/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
/obj/item/ammo_box/magazine/toy/m762/riot
icon_state = "a762-riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
@@ -1,47 +1,47 @@
/obj/item/ammo_box/magazine/internal/cylinder
name = "revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 7
/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(countempties = 1)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet && (bullet.BB || countempties))
boolets++
return boolets
/obj/item/ammo_box/magazine/internal/cylinder/get_round(keep = 0)
rotate()
var/b = stored_ammo[1]
if(!keep)
stored_ammo[1] = null
return b
/obj/item/ammo_box/magazine/internal/cylinder/proc/rotate()
var/b = stored_ammo[1]
stored_ammo.Cut(1,2)
stored_ammo.Insert(0, b)
/obj/item/ammo_box/magazine/internal/cylinder/proc/spin()
for(var/i in 1 to rand(0, max_ammo*2))
rotate()
/obj/item/ammo_box/magazine/internal/cylinder/give_round(obj/item/ammo_casing/R, replace_spent = 0)
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
return FALSE
for(var/i in 1 to stored_ammo.len)
var/obj/item/ammo_casing/bullet = stored_ammo[i]
if(!bullet || !bullet.BB) // found a spent ammo
stored_ammo[i] = R
R.forceMove(src)
if(bullet)
bullet.forceMove(drop_location())
return TRUE
return FALSE
/obj/item/ammo_box/magazine/internal/cylinder
name = "revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 7
/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(countempties = 1)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet && (bullet.BB || countempties))
boolets++
return boolets
/obj/item/ammo_box/magazine/internal/cylinder/get_round(keep = 0)
rotate()
var/b = stored_ammo[1]
if(!keep)
stored_ammo[1] = null
return b
/obj/item/ammo_box/magazine/internal/cylinder/proc/rotate()
var/b = stored_ammo[1]
stored_ammo.Cut(1,2)
stored_ammo.Insert(0, b)
/obj/item/ammo_box/magazine/internal/cylinder/proc/spin()
for(var/i in 1 to rand(0, max_ammo*2))
rotate()
/obj/item/ammo_box/magazine/internal/cylinder/give_round(obj/item/ammo_casing/R, replace_spent = 0)
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
return FALSE
for(var/i in 1 to stored_ammo.len)
var/obj/item/ammo_casing/bullet = stored_ammo[i]
if(!bullet || !bullet.BB) // found a spent ammo
stored_ammo[i] = R
R.forceMove(src)
if(bullet)
bullet.forceMove(drop_location())
return TRUE
return FALSE
@@ -1,8 +1,8 @@
/obj/item/ammo_box/magazine/internal
desc = "Oh god, this shouldn't be here"
flags_1 = CONDUCT_1
item_flags = ABSTRACT
//internals magazines are accessible, so replace spent ammo if full when trying to put a live one in
/obj/item/ammo_box/magazine/internal/give_round(obj/item/ammo_casing/R)
return ..(R,1)
/obj/item/ammo_box/magazine/internal
desc = "Oh god, this shouldn't be here"
flags_1 = CONDUCT_1
item_flags = ABSTRACT
//internals magazines are accessible, so replace spent ammo if full when trying to put a live one in
/obj/item/ammo_box/magazine/internal/give_round(obj/item/ammo_casing/R)
return ..(R,1)
@@ -1,17 +1,17 @@
/obj/item/ammo_box/magazine/internal/cylinder/grenademulti
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/grenadelauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/rocketlauncher
name = "rocket launcher internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/rocket
caliber = "84mm"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/cylinder/grenademulti
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/grenadelauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/rocketlauncher
name = "rocket launcher internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/rocket
caliber = "84mm"
max_ammo = 1
@@ -1,11 +1,11 @@
/obj/item/ammo_box/magazine/internal/speargun
name = "speargun internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/magspear
caliber = "speargun"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/minigun
name = "gatling gun fusion core"
ammo_type = /obj/item/ammo_casing/caseless/laser/gatling
caliber = "gatling"
max_ammo = 5000
/obj/item/ammo_box/magazine/internal/speargun
name = "speargun internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/magspear
caliber = "speargun"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/minigun
name = "gatling gun fusion core"
ammo_type = /obj/item/ammo_casing/caseless/laser/gatling
caliber = "gatling"
max_ammo = 5000
@@ -1,22 +1,22 @@
/obj/item/ammo_box/magazine/internal/cylinder/rev38
name = "detective revolver cylinder"
ammo_type = /obj/item/ammo_casing/c38
caliber = "38"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/cylinder/rev762
name = "\improper Nagant revolver cylinder"
ammo_type = /obj/item/ammo_casing/n762
caliber = "n762"
max_ammo = 7
/obj/item/ammo_box/magazine/internal/cylinder/rus357
name = "\improper Russian revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 6
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/Initialize()
stored_ammo += new ammo_type(src)
. = ..()
/obj/item/ammo_box/magazine/internal/cylinder/rev38
name = "detective revolver cylinder"
ammo_type = /obj/item/ammo_casing/c38
caliber = "38"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/cylinder/rev762
name = "\improper Nagant revolver cylinder"
ammo_type = /obj/item/ammo_casing/n762
caliber = "n762"
max_ammo = 7
/obj/item/ammo_box/magazine/internal/cylinder/rus357
name = "\improper Russian revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 6
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/Initialize()
stored_ammo += new ammo_type(src)
. = ..()
@@ -1,17 +1,17 @@
/obj/item/ammo_box/magazine/internal/boltaction
name = "bolt action rifle internal magazine"
desc = "Oh god, this shouldn't be here"
ammo_type = /obj/item/ammo_casing/a762
caliber = "a762"
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/boltaction/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo = 1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
/obj/item/ammo_box/magazine/internal/boltaction
name = "bolt action rifle internal magazine"
desc = "Oh god, this shouldn't be here"
ammo_type = /obj/item/ammo_casing/a762
caliber = "a762"
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/boltaction/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo = 1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
@@ -1,48 +1,48 @@
/obj/item/ammo_box/magazine/internal/shot
name = "shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
caliber = "shotgun"
max_ammo = 4
multiload = 0
/obj/item/ammo_box/magazine/internal/shot/ammo_count(countempties = 1)
if (!countempties)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet.BB)
boolets++
return boolets
else
return ..()
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/lethal
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/internal/shot/com
name = "combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 6
/obj/item/ammo_box/magazine/internal/shot/com/compact
name = "compact combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/dual
name = "double-barrel shotgun internal magazine"
max_ammo = 2
/obj/item/ammo_box/magazine/internal/shot/improvised
name = "improvised shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/shot/riot
name = "riot shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 6
/obj/item/ammo_box/magazine/internal/shot
name = "shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
caliber = "shotgun"
max_ammo = 4
multiload = 0
/obj/item/ammo_box/magazine/internal/shot/ammo_count(countempties = 1)
if (!countempties)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet.BB)
boolets++
return boolets
else
return ..()
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/lethal
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/internal/shot/com
name = "combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 6
/obj/item/ammo_box/magazine/internal/shot/com/compact
name = "compact combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/dual
name = "double-barrel shotgun internal magazine"
max_ammo = 2
/obj/item/ammo_box/magazine/internal/shot/improvised
name = "improvised shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/shot/riot
name = "riot shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 6
@@ -1,7 +1,7 @@
/obj/item/ammo_box/magazine/internal/shot/toy
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/toy/crossbow
max_ammo = 5
/obj/item/ammo_box/magazine/internal/shot/toy
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/toy/crossbow
max_ammo = 5
-5
View File
@@ -37,7 +37,6 @@
var/burst_spread = 0 //Spread induced by the gun itself during burst fire per iteration. Only checked if spread is 0.
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
var/inaccuracy_modifier = 1
var/pb_knockback = 0
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
@@ -126,10 +125,6 @@
if(message)
if(pointblank)
user.visible_message("<span class='danger'>[user] fires [src] point blank at [pbtarget]!</span>", null, null, COMBAT_MESSAGE_RANGE)
if(pb_knockback > 0)
var/atom/throw_target = get_edge_target_turf(pbtarget, user.dir)
pbtarget.throw_at(throw_target, pb_knockback, 2)
else
user.visible_message("<span class='danger'>[user] fires [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
@@ -267,7 +267,6 @@
fire_delay = 0
pin = /obj/item/firing_pin/implant/pindicate
actions_types = list()
pb_knockback = 2
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/firing_pin
@@ -273,7 +273,6 @@
"Maple" = "dshotgun-l",
"Rosewood" = "dshotgun-p"
)
pb_knockback = 3 // it's a super shotgun!
/obj/item/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
..()
@@ -12,8 +12,6 @@
var/recentpump = 0 // to prevent spammage
weapon_weight = WEAPON_MEDIUM
pb_knockback = 2
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
@@ -56,7 +56,6 @@
item_flags = NONE
casing_ejector = FALSE
can_suppress = FALSE
pb_knockback = 0
/obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
..()
+236 -236
View File
@@ -1,236 +1,236 @@
/obj/item/gun/energy
icon_state = "energy"
name = "energy gun"
desc = "A basic energy-based gun."
icon = 'icons/obj/guns/energy.dmi'
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
var/cell_type = /obj/item/stock_parts/cell
var/modifystate = 0
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
var/can_charge = 1 //Can it be charged in a recharger?
var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_icon()?
var/charge_sections = 4
ammo_x_offset = 2
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon
var/selfcharge = EGUN_NO_SELFCHARGE // EGUN_SELFCHARGE if true, EGUN_SELFCHARGE_BORG drains the cyborg's cell to recharge its own
var/charge_tick = 0
var/charge_delay = 4
var/use_cyborg_cell = FALSE //whether the gun drains the cyborg user's cell instead, not to be confused with EGUN_SELFCHARGE_BORG
var/dead_cell = FALSE //set to true so the gun is given an empty cell
/obj/item/gun/energy/emp_act(severity)
. = ..()
if(!(. & EMP_PROTECT_CONTENTS))
cell.use(round(cell.charge / severity))
chambered = null //we empty the chamber
recharge_newshot() //and try to charge a new shot
update_icon()
/obj/item/gun/energy/get_cell()
return cell
/obj/item/gun/energy/Initialize()
. = ..()
if(cell_type)
cell = new cell_type(src)
else
cell = new(src)
if(!dead_cell)
cell.give(cell.maxcharge)
update_ammo_types()
recharge_newshot(TRUE)
if(selfcharge)
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/gun/energy/proc/update_ammo_types()
var/obj/item/ammo_casing/energy/shot
for (var/i = 1, i <= ammo_type.len, i++)
var/shottype = ammo_type[i]
shot = new shottype(src)
ammo_type[i] = shot
shot = ammo_type[select]
fire_sound = shot.fire_sound
fire_delay = shot.delay
/obj/item/gun/energy/Destroy()
QDEL_NULL(cell)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/process()
if(selfcharge && cell?.charge < cell.maxcharge)
charge_tick++
if(charge_tick < charge_delay)
return
charge_tick = 0
if(selfcharge == EGUN_SELFCHARGE_BORG)
var/atom/owner = loc
if(istype(owner, /obj/item/robot_module))
owner = owner.loc
if(!iscyborg(owner))
return
var/mob/living/silicon/robot/R = owner
if(!R.cell?.use(100))
return
cell.give(100)
if(!chambered) //if empty chamber we try to charge a new shot
recharge_newshot(TRUE)
update_icon()
/obj/item/gun/energy/attack_self(mob/living/user as mob)
if(ammo_type.len > 1)
select_fire(user)
update_icon()
/obj/item/gun/energy/can_shoot()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
return !QDELETED(cell) ? (cell.charge >= shot.e_cost) : FALSE
/obj/item/gun/energy/recharge_newshot(no_cyborg_drain)
if (!ammo_type || !cell)
return
if(use_cyborg_cell && !no_cyborg_drain)
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(R.cell)
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
cell.give(shot.e_cost) //... to recharge the shot
if(!chambered)
var/obj/item/ammo_casing/energy/AC = ammo_type[select]
if(cell.charge >= AC.e_cost) //if there's enough power in the cell cell...
chambered = AC //...prepare a new shot based on the current ammo type selected
if(!chambered.BB)
chambered.newshot()
/obj/item/gun/energy/process_chamber()
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
var/obj/item/ammo_casing/energy/shot = chambered
cell.use(shot.e_cost)//... drain the cell cell
chambered = null //either way, released the prepared shot
recharge_newshot() //try to charge a new shot
/obj/item/gun/energy/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(!chambered && can_shoot())
process_chamber() // If the gun was drained and then recharged, load a new shot.
return ..()
/obj/item/gun/energy/process_burst(mob/living/user, atom/target, message = TRUE, params = null, zone_override="", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0)
if(!chambered && can_shoot())
process_chamber() // Ditto.
return ..()
/obj/item/gun/energy/proc/select_fire(mob/living/user)
select++
if (select > ammo_type.len)
select = 1
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
fire_sound = shot.fire_sound
fire_delay = shot.delay
if (shot.select_name)
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
chambered = null
recharge_newshot(TRUE)
update_icon(TRUE)
return
/obj/item/gun/energy/update_icon(force_update)
if(QDELETED(src))
return
..()
if(!automatic_charge_overlays)
return
var/ratio = can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
// TG issues #5361 & #47908
if(ratio == old_ratio && !force_update)
return
old_ratio = ratio
cut_overlays()
var/iconState = "[icon_state]_charge"
var/itemState = null
if(!initial(item_state))
itemState = icon_state
if (modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
add_overlay("[icon_state]_[shot.select_name]")
iconState += "_[shot.select_name]"
if(itemState)
itemState += "[shot.select_name]"
if(ratio == 0)
add_overlay("[icon_state]_empty")
else
if(!shaded_charge)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
for(var/i = ratio, i >= 1, i--)
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
add_overlay(charge_overlay)
else
add_overlay("[icon_state]_charge[ratio]")
if(itemState)
itemState += "[ratio]"
item_state = itemState
/obj/item/gun/energy/suicide_act(mob/living/user)
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
sleep(25)
if(user.is_holding(src))
user.visible_message("<span class='suicide'>[user] melts [user.p_their()] face off with [src]!</span>")
playsound(loc, fire_sound, 50, 1, -1)
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
cell.use(shot.e_cost)
update_icon()
return(FIRELOSS)
else
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 30, 1)
return (OXYLOSS)
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
switch(var_name)
if("selfcharge")
if(var_value)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/gun/energy/ignition_effect(atom/A, mob/living/user)
if(!can_shoot() || !ammo_type[select])
shoot_with_empty_chamber()
. = ""
else
var/obj/item/ammo_casing/energy/E = ammo_type[select]
var/obj/item/projectile/energy/BB = E.BB
if(!BB)
. = ""
else if(BB.nodamage || !BB.damage || BB.damage_type == STAMINA)
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but it doesn't do anything. Dumbass.</span>")
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
. = ""
else if(BB.damage_type != BURN)
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but only succeeds in utterly destroying it. Dumbass.</span>")
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
qdel(A)
. = ""
else
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
. = "<span class='danger'>[user] casually lights their [A.name] with [src]. Damn.</span>"
/obj/item/gun/energy
icon_state = "energy"
name = "energy gun"
desc = "A basic energy-based gun."
icon = 'icons/obj/guns/energy.dmi'
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
var/cell_type = /obj/item/stock_parts/cell
var/modifystate = 0
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
var/can_charge = 1 //Can it be charged in a recharger?
var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_icon()?
var/charge_sections = 4
ammo_x_offset = 2
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon
var/selfcharge = EGUN_NO_SELFCHARGE // EGUN_SELFCHARGE if true, EGUN_SELFCHARGE_BORG drains the cyborg's cell to recharge its own
var/charge_tick = 0
var/charge_delay = 4
var/use_cyborg_cell = FALSE //whether the gun drains the cyborg user's cell instead, not to be confused with EGUN_SELFCHARGE_BORG
var/dead_cell = FALSE //set to true so the gun is given an empty cell
/obj/item/gun/energy/emp_act(severity)
. = ..()
if(!(. & EMP_PROTECT_CONTENTS))
cell.use(round(cell.charge / severity))
chambered = null //we empty the chamber
recharge_newshot() //and try to charge a new shot
update_icon()
/obj/item/gun/energy/get_cell()
return cell
/obj/item/gun/energy/Initialize()
. = ..()
if(cell_type)
cell = new cell_type(src)
else
cell = new(src)
if(!dead_cell)
cell.give(cell.maxcharge)
update_ammo_types()
recharge_newshot(TRUE)
if(selfcharge)
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/gun/energy/proc/update_ammo_types()
var/obj/item/ammo_casing/energy/shot
for (var/i = 1, i <= ammo_type.len, i++)
var/shottype = ammo_type[i]
shot = new shottype(src)
ammo_type[i] = shot
shot = ammo_type[select]
fire_sound = shot.fire_sound
fire_delay = shot.delay
/obj/item/gun/energy/Destroy()
QDEL_NULL(cell)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/process()
if(selfcharge && cell?.charge < cell.maxcharge)
charge_tick++
if(charge_tick < charge_delay)
return
charge_tick = 0
if(selfcharge == EGUN_SELFCHARGE_BORG)
var/atom/owner = loc
if(istype(owner, /obj/item/robot_module))
owner = owner.loc
if(!iscyborg(owner))
return
var/mob/living/silicon/robot/R = owner
if(!R.cell?.use(100))
return
cell.give(100)
if(!chambered) //if empty chamber we try to charge a new shot
recharge_newshot(TRUE)
update_icon()
/obj/item/gun/energy/attack_self(mob/living/user as mob)
if(ammo_type.len > 1)
select_fire(user)
update_icon()
/obj/item/gun/energy/can_shoot()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
return !QDELETED(cell) ? (cell.charge >= shot.e_cost) : FALSE
/obj/item/gun/energy/recharge_newshot(no_cyborg_drain)
if (!ammo_type || !cell)
return
if(use_cyborg_cell && !no_cyborg_drain)
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(R.cell)
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
cell.give(shot.e_cost) //... to recharge the shot
if(!chambered)
var/obj/item/ammo_casing/energy/AC = ammo_type[select]
if(cell.charge >= AC.e_cost) //if there's enough power in the cell cell...
chambered = AC //...prepare a new shot based on the current ammo type selected
if(!chambered.BB)
chambered.newshot()
/obj/item/gun/energy/process_chamber()
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
var/obj/item/ammo_casing/energy/shot = chambered
cell.use(shot.e_cost)//... drain the cell cell
chambered = null //either way, released the prepared shot
recharge_newshot() //try to charge a new shot
/obj/item/gun/energy/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(!chambered && can_shoot())
process_chamber() // If the gun was drained and then recharged, load a new shot.
return ..()
/obj/item/gun/energy/process_burst(mob/living/user, atom/target, message = TRUE, params = null, zone_override="", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0)
if(!chambered && can_shoot())
process_chamber() // Ditto.
return ..()
/obj/item/gun/energy/proc/select_fire(mob/living/user)
select++
if (select > ammo_type.len)
select = 1
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
fire_sound = shot.fire_sound
fire_delay = shot.delay
if (shot.select_name)
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
chambered = null
recharge_newshot(TRUE)
update_icon(TRUE)
return
/obj/item/gun/energy/update_icon(force_update)
if(QDELETED(src))
return
..()
if(!automatic_charge_overlays)
return
var/ratio = can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
// TG issues #5361 & #47908
if(ratio == old_ratio && !force_update)
return
old_ratio = ratio
cut_overlays()
var/iconState = "[icon_state]_charge"
var/itemState = null
if(!initial(item_state))
itemState = icon_state
if (modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
add_overlay("[icon_state]_[shot.select_name]")
iconState += "_[shot.select_name]"
if(itemState)
itemState += "[shot.select_name]"
if(ratio == 0)
add_overlay("[icon_state]_empty")
else
if(!shaded_charge)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
for(var/i = ratio, i >= 1, i--)
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
add_overlay(charge_overlay)
else
add_overlay("[icon_state]_charge[ratio]")
if(itemState)
itemState += "[ratio]"
item_state = itemState
/obj/item/gun/energy/suicide_act(mob/living/user)
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
sleep(25)
if(user.is_holding(src))
user.visible_message("<span class='suicide'>[user] melts [user.p_their()] face off with [src]!</span>")
playsound(loc, fire_sound, 50, 1, -1)
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
cell.use(shot.e_cost)
update_icon()
return(FIRELOSS)
else
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 30, 1)
return (OXYLOSS)
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
switch(var_name)
if("selfcharge")
if(var_value)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/gun/energy/ignition_effect(atom/A, mob/living/user)
if(!can_shoot() || !ammo_type[select])
shoot_with_empty_chamber()
. = ""
else
var/obj/item/ammo_casing/energy/E = ammo_type[select]
var/obj/item/projectile/energy/BB = E.BB
if(!BB)
. = ""
else if(BB.nodamage || !BB.damage || BB.damage_type == STAMINA)
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but it doesn't do anything. Dumbass.</span>")
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
. = ""
else if(BB.damage_type != BURN)
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but only succeeds in utterly destroying it. Dumbass.</span>")
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
qdel(A)
. = ""
else
playsound(user, E.fire_sound, 50, 1)
playsound(user, BB.hitsound, 50, 1)
cell.use(E.e_cost)
. = "<span class='danger'>[user] casually lights their [A.name] with [src]. Damn.</span>"
@@ -112,7 +112,10 @@
/obj/item/gun/energy/kinetic_accelerator/cyborg
holds_charge = TRUE
unique_frequency = TRUE
max_mod_capacity = 80
/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg
holds_charge = TRUE
unique_frequency = TRUE
/obj/item/gun/energy/kinetic_accelerator/minebot
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
@@ -280,7 +283,7 @@
. += "<span class='notice'>Occupies <b>[cost]%</b> of mod capacity.</span>"
/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user))
if(istype(A, /obj/item/gun/energy/kinetic_accelerator))
install(A, user)
else
..()
+225 -225
View File
@@ -1,225 +1,225 @@
/obj/item/gun/energy/laser
name = "laser gun"
desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal."
icon_state = "laser"
item_state = "laser"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=2000)
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
shaded_charge = 1
/obj/item/gun/energy/laser/practice
name = "practice laser gun"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
clumsy_check = 0
item_flags = NONE
/obj/item/gun/energy/laser/retro
name ="retro laser gun"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
ammo_x_offset = 3
/obj/item/gun/energy/laser/retro/old
name ="laser gun"
icon_state = "retro"
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
ammo_x_offset = 3
/obj/item/gun/energy/laser/captain
name = "antique laser gun"
icon_state = "caplaser"
item_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
ammo_x_offset = 3
selfcharge = EGUN_SELFCHARGE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/gun/energy/laser/carbine
name = "laser carbine"
desc = "A ruggedized laser carbine featuring much higher capacity and improved handling when compared to a normal laser gun."
icon = 'icons/obj/guns/energy.dmi'
icon_state = "lasernew"
item_state = "laser"
force = 10
throwforce = 10
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
cell_type = /obj/item/stock_parts/cell/lascarbine
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/gun/energy/laser/carbine/nopin
pin = null
/obj/item/gun/energy/laser/captain/scattershot
name = "scatter shot laser rifle"
icon_state = "lasercannon"
item_state = "laser"
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/laser/cyborg
can_charge = FALSE
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "laser_cyborg"
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 3
/obj/item/gun/energy/laser/cyborg/emp_act()
return
/obj/item/gun/energy/laser/cyborg/mean
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
/obj/item/gun/energy/laser/scatter
name = "scatter laser gun"
desc = "A laser gun equipped with a refraction kit that spreads bolts."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/laser/scatter/shotty
name = "energy shotgun"
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "cshotgun"
item_state = "shotgun"
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
shaded_charge = 0
pin = /obj/item/firing_pin/implant/mindshield
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
///Laser Cannon
/obj/item/gun/energy/lasercannon
name = "accelerator laser cannon"
desc = "An advanced laser cannon that does more damage the farther away the target is."
icon_state = "lasercannon"
item_state = "laser"
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
pin = null
ammo_x_offset = 3
/obj/item/ammo_casing/energy/laser/accelerator
projectile_type = /obj/item/projectile/beam/laser/accelerator
select_name = "accelerator"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/projectile/beam/laser/accelerator
name = "accelerator laser"
icon_state = "scatterlaser"
range = 255
damage = 6
/obj/item/projectile/beam/laser/accelerator/Range()
..()
damage += 7
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
/obj/item/gun/energy/xray
name = "\improper X-ray laser gun"
desc = "A high-power laser gun capable of expelling concentrated X-ray blasts that pass through multiple soft targets and heavier materials."
icon_state = "xray"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/xray)
pin = null
ammo_x_offset = 3
////////Laser Tag////////////////////
/obj/item/gun/energy/laser/bluetag
name = "laser tag gun"
icon_state = "bluetag"
desc = "A retro laser gun modified to fire harmless blue beams of light. Sound effects included!"
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/firing_pin/tag/blue
ammo_x_offset = 2
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/laser/bluetag/hitscan
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag/hitscan)
/obj/item/gun/energy/laser/redtag
name = "laser tag gun"
icon_state = "redtag"
desc = "A retro laser gun modified to fire harmless beams red of light. Sound effects included!"
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/firing_pin/tag/red
ammo_x_offset = 2
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/laser/redtag/hitscan
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain
name = "\improper holy lasrifle"
desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests."
icon_state = "LaserAK"
item_state = null
force = 14
pin = /obj/item/firing_pin/holy
icon = 'modular_citadel/icons/obj/guns/VGguns.dmi'
ammo_x_offset = 4
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy)
lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi'
righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi'
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
throw_speed = 3
throw_range = 4
throwforce = 10
obj_flags = UNIQUE_RENAME
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
if(!ishuman(user) || !ishuman(target))
return
if(semicd)
return
if(user == target)
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
else
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
semicd = TRUE
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
if(user)
if(user == target)
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
else if(target && target.Adjacent(user))
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
semicd = FALSE
return
semicd = FALSE
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
playsound('sound/weapons/dink.ogg', 30, 1)
if((iscultist(target)) || (is_servant_of_ratvar(target)))
chambered.BB.damage *= 1500
else if(chambered && chambered.BB)
chambered.BB.damage *= 5
process_fire(target, user, TRUE, params)
/obj/item/gun/energy/laser
name = "laser gun"
desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal."
icon_state = "laser"
item_state = "laser"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=2000)
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
shaded_charge = 1
/obj/item/gun/energy/laser/practice
name = "practice laser gun"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
clumsy_check = 0
item_flags = NONE
/obj/item/gun/energy/laser/retro
name ="retro laser gun"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
ammo_x_offset = 3
/obj/item/gun/energy/laser/retro/old
name ="laser gun"
icon_state = "retro"
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
ammo_x_offset = 3
/obj/item/gun/energy/laser/captain
name = "antique laser gun"
icon_state = "caplaser"
item_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
ammo_x_offset = 3
selfcharge = EGUN_SELFCHARGE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/gun/energy/laser/carbine
name = "laser carbine"
desc = "A ruggedized laser carbine featuring much higher capacity and improved handling when compared to a normal laser gun."
icon = 'icons/obj/guns/energy.dmi'
icon_state = "lasernew"
item_state = "laser"
force = 10
throwforce = 10
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
cell_type = /obj/item/stock_parts/cell/lascarbine
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/gun/energy/laser/carbine/nopin
pin = null
/obj/item/gun/energy/laser/captain/scattershot
name = "scatter shot laser rifle"
icon_state = "lasercannon"
item_state = "laser"
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/laser/cyborg
can_charge = FALSE
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "laser_cyborg"
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 3
/obj/item/gun/energy/laser/cyborg/emp_act()
return
/obj/item/gun/energy/laser/cyborg/mean
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
/obj/item/gun/energy/laser/scatter
name = "scatter laser gun"
desc = "A laser gun equipped with a refraction kit that spreads bolts."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/laser/scatter/shotty
name = "energy shotgun"
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "cshotgun"
item_state = "shotgun"
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
shaded_charge = 0
pin = /obj/item/firing_pin/implant/mindshield
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
///Laser Cannon
/obj/item/gun/energy/lasercannon
name = "accelerator laser cannon"
desc = "An advanced laser cannon that does more damage the farther away the target is."
icon_state = "lasercannon"
item_state = "laser"
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
pin = null
ammo_x_offset = 3
/obj/item/ammo_casing/energy/laser/accelerator
projectile_type = /obj/item/projectile/beam/laser/accelerator
select_name = "accelerator"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/projectile/beam/laser/accelerator
name = "accelerator laser"
icon_state = "scatterlaser"
range = 255
damage = 6
/obj/item/projectile/beam/laser/accelerator/Range()
..()
damage += 7
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
/obj/item/gun/energy/xray
name = "\improper X-ray laser gun"
desc = "A high-power laser gun capable of expelling concentrated X-ray blasts that pass through multiple soft targets and heavier materials."
icon_state = "xray"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/xray)
pin = null
ammo_x_offset = 3
////////Laser Tag////////////////////
/obj/item/gun/energy/laser/bluetag
name = "laser tag gun"
icon_state = "bluetag"
desc = "A retro laser gun modified to fire harmless blue beams of light. Sound effects included!"
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/firing_pin/tag/blue
ammo_x_offset = 2
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/laser/bluetag/hitscan
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag/hitscan)
/obj/item/gun/energy/laser/redtag
name = "laser tag gun"
icon_state = "redtag"
desc = "A retro laser gun modified to fire harmless beams red of light. Sound effects included!"
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/firing_pin/tag/red
ammo_x_offset = 2
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/laser/redtag/hitscan
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain
name = "\improper holy lasrifle"
desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests."
icon_state = "LaserAK"
item_state = null
force = 14
pin = /obj/item/firing_pin/holy
icon = 'modular_citadel/icons/obj/guns/VGguns.dmi'
ammo_x_offset = 4
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy)
lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi'
righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi'
var/chaplain_spawnable = TRUE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
throw_speed = 3
throw_range = 4
throwforce = 10
obj_flags = UNIQUE_RENAME
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
if(!ishuman(user) || !ishuman(target))
return
if(semicd)
return
if(user == target)
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
else
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
semicd = TRUE
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
if(user)
if(user == target)
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
else if(target && target.Adjacent(user))
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
semicd = FALSE
return
semicd = FALSE
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
playsound('sound/weapons/dink.ogg', 30, 1)
if((iscultist(target)) || (is_servant_of_ratvar(target)))
chambered.BB.damage *= 1500
else if(chambered && chambered.BB)
chambered.BB.damage *= 5
process_fire(target, user, TRUE, params)
+20 -20
View File
@@ -1,20 +1,20 @@
/obj/item/gun/energy/e_gun/advtaser/mounted
name = "mounted taser"
desc = "An arm mounted dual-mode weapon that fires electrodes and disabler shots."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
item_state = "armcannonstun4"
force = 5
selfcharge = EGUN_SELFCHARGE
can_flashlight = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
/obj/item/gun/energy/laser/mounted
name = "mounted laser"
desc = "An arm mounted cannon that fires lethal lasers."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "laser"
item_state = "armcannonlase"
force = 5
selfcharge = EGUN_SELFCHARGE
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
/obj/item/gun/energy/e_gun/advtaser/mounted
name = "mounted taser"
desc = "An arm mounted dual-mode weapon that fires electrodes and disabler shots."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
item_state = "armcannonstun4"
force = 5
selfcharge = EGUN_SELFCHARGE
can_flashlight = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
/obj/item/gun/energy/laser/mounted
name = "mounted laser"
desc = "An arm mounted cannon that fires lethal lasers."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "laser"
item_state = "armcannonlase"
force = 5
selfcharge = EGUN_SELFCHARGE
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
+79 -79
View File
@@ -1,79 +1,79 @@
/obj/item/gun/energy/pulse
name = "pulse rifle"
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
icon_state = "pulse"
item_state = null
w_class = WEIGHT_CLASS_BULKY
force = 10
modifystate = TRUE
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
cell_type = "/obj/item/stock_parts/cell/pulse"
/obj/item/gun/energy/pulse/emp_act(severity)
return
/obj/item/gun/energy/pulse/prize
pin = /obj/item/firing_pin
/obj/item/gun/energy/pulse/prize/Initialize()
. = ..()
GLOB.poi_list += src
var/turf/T = get_turf(src)
var/msg = "A pulse rifle prize has been created at [ADMIN_VERBOSEJMP(T)]"
message_admins(msg)
log_game(msg)
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
/obj/item/gun/energy/pulse/prize/Destroy()
GLOB.poi_list -= src
. = ..()
/obj/item/gun/energy/pulse/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine
name = "pulse carbine"
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
w_class = WEIGHT_CLASS_NORMAL
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_carbine"
item_state = null
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
can_flashlight = 1
flight_x_offset = 18
flight_y_offset = 12
/obj/item/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/pistol
name = "pulse pistol"
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_pistol"
item_state = "gun"
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
/obj/item/gun/energy/pulse/pistol/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/destroyer
name = "pulse destroyer"
desc = "A heavy-duty energy rifle built for pure destruction."
cell_type = "/obj/item/stock_parts/cell/infinite"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
/obj/item/gun/energy/pulse/pistol/m1911
name = "\improper M1911-P"
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911"
item_state = "gun"
cell_type = "/obj/item/stock_parts/cell/infinite"
/obj/item/gun/energy/pulse
name = "pulse rifle"
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
icon_state = "pulse"
item_state = null
w_class = WEIGHT_CLASS_BULKY
force = 10
modifystate = TRUE
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
cell_type = "/obj/item/stock_parts/cell/pulse"
/obj/item/gun/energy/pulse/emp_act(severity)
return
/obj/item/gun/energy/pulse/prize
pin = /obj/item/firing_pin
/obj/item/gun/energy/pulse/prize/Initialize()
. = ..()
GLOB.poi_list += src
var/turf/T = get_turf(src)
var/msg = "A pulse rifle prize has been created at [ADMIN_VERBOSEJMP(T)]"
message_admins(msg)
log_game(msg)
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
/obj/item/gun/energy/pulse/prize/Destroy()
GLOB.poi_list -= src
. = ..()
/obj/item/gun/energy/pulse/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine
name = "pulse carbine"
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
w_class = WEIGHT_CLASS_NORMAL
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_carbine"
item_state = null
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
can_flashlight = 1
flight_x_offset = 18
flight_y_offset = 12
/obj/item/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/pistol
name = "pulse pistol"
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_pistol"
item_state = "gun"
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
/obj/item/gun/energy/pulse/pistol/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/destroyer
name = "pulse destroyer"
desc = "A heavy-duty energy rifle built for pure destruction."
cell_type = "/obj/item/stock_parts/cell/infinite"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
/obj/item/gun/energy/pulse/pistol/m1911
name = "\improper M1911-P"
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911"
item_state = "gun"
cell_type = "/obj/item/stock_parts/cell/infinite"
+325 -325
View File
@@ -1,325 +1,325 @@
/obj/item/gun/energy/ionrifle
name = "ion rifle"
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
icon_state = "ionrifle"
item_state = null //so the human update icon uses the icon_state instead.
can_flashlight = 1
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
ammo_x_offset = 3
flight_x_offset = 17
flight_y_offset = 9
/obj/item/gun/energy/ionrifle/emp_act(severity)
return
/obj/item/gun/energy/ionrifle/carbine
name = "ion carbine"
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
icon_state = "ioncarbine"
w_class = WEIGHT_CLASS_NORMAL
slot_flags = ITEM_SLOT_BELT
pin = null
ammo_x_offset = 2
flight_x_offset = 18
flight_y_offset = 11
/obj/item/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
ammo_type = list(/obj/item/ammo_casing/energy/declone)
pin = null
ammo_x_offset = 1
/obj/item/gun/energy/decloner/update_icon()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("decloner_spin")
/obj/item/gun/energy/floragun
name = "floral somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
icon_state = "flora"
item_state = "gun"
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
modifystate = 1
ammo_x_offset = 1
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/meteorgun
name = "meteor gun"
desc = "For the love of god, make sure you're aiming this the right way!"
icon_state = "meteor_gun"
item_state = "c20r"
w_class = WEIGHT_CLASS_BULKY
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
cell_type = "/obj/item/stock_parts/cell/potato"
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/meteorgun/pen
name = "meteor pen"
desc = "The pen is mightier than the sword."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
/obj/item/gun/energy/mindflayer
name = "\improper Mind Flayer"
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
icon_state = "xray"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
ammo_x_offset = 2
/obj/item/gun/energy/kinetic_accelerator/crossbow
name = "mini energy crossbow"
desc = "A weapon favored by syndicate stealth specialists."
icon_state = "crossbow"
item_state = "crossbow"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=2000)
suppressed = TRUE
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
weapon_weight = WEAPON_LIGHT
obj_flags = 0
overheat_time = 20
holds_charge = TRUE
unique_frequency = TRUE
can_flashlight = 0
max_mod_capacity = 0
/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween
name = "candy corn crossbow"
desc = "A weapon favored by Syndicate trick-or-treaters."
icon_state = "crossbow_halloween"
item_state = "crossbow"
ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween)
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
name = "energy crossbow"
desc = "A reverse engineered weapon using syndicate technology."
icon_state = "crossbowlarge"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=4000)
suppressed = null
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
pin = null
/obj/item/gun/energy/plasmacutter
name = "plasma cutter"
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff."
icon_state = "plasmacutter"
item_state = "plasmacutter"
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
flags_1 = CONDUCT_1
attack_verb = list("attacked", "slashed", "cut", "sliced")
force = 12
sharpness = IS_SHARP
can_charge = 0
heat = 3800
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
tool_behaviour = TOOL_WELDER
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
/obj/item/gun/energy/plasmacutter/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
/obj/item/gun/energy/plasmacutter/examine(mob/user)
. = ..()
if(cell)
. += "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>"
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
I.use(1)
cell.give(1000)
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else if(istype(I, /obj/item/stack/ore/plasma))
I.use(1)
cell.give(500)
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else
..()
// Tool procs, in case plasma cutter is used as welder
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
if(!QDELETED(cell) && (cell.charge >= amount * 100))
return TRUE
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
return FALSE
/obj/item/gun/energy/plasmacutter/use(amount)
return cell.use(amount * 100)
/obj/item/gun/energy/plasmacutter/update_icon()
return
/obj/item/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
force = 15
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
/obj/item/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
desc = "A projector that emits high density quantum-coupled bluespace beams."
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
item_state = null
icon_state = "wormhole_projector"
pin = null
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
/obj/item/gun/energy/wormhole_projector/update_icon()
icon_state = "[initial(icon_state)][select]"
item_state = icon_state
/obj/item/gun/energy/wormhole_projector/update_ammo_types()
. = ..()
for(var/i in 1 to ammo_type.len)
var/obj/item/ammo_casing/energy/wormhole/W = ammo_type[i]
if(istype(W))
W.gun = src
var/obj/item/projectile/beam/wormhole/WH = W.BB
if(istype(WH))
WH.gun = src
/obj/item/gun/energy/wormhole_projector/process_chamber()
..()
select_fire()
/obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
if(P == p_blue)
p_blue = null
else if(P == p_orange)
p_orange = null
/obj/item/gun/energy/wormhole_projector/proc/has_blue_portal()
if(istype(p_blue) && !QDELETED(p_blue))
return TRUE
return FALSE
/obj/item/gun/energy/wormhole_projector/proc/has_orange_portal()
if(istype(p_orange) && !QDELETED(p_orange))
return TRUE
return FALSE
/obj/item/gun/energy/wormhole_projector/proc/crosslink()
if(!has_blue_portal() && !has_orange_portal())
return
if(!has_blue_portal() && has_orange_portal())
p_orange.link_portal(null)
return
if(!has_orange_portal() && has_blue_portal())
p_blue.link_portal(null)
return
p_orange.link_portal(p_blue)
p_blue.link_portal(p_orange)
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
var/obj/effect/portal/P = new /obj/effect/portal(target, src, 300, null, FALSE, null, atmos_link)
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
qdel(p_orange)
p_orange = P
P.icon_state = "portal1"
else
qdel(p_blue)
p_blue = P
crosslink()
/* 3d printer 'pseudo guns' for borgs */
/obj/item/gun/energy/printer
name = "cyborg lmg"
desc = "A LMG that fires 3D-printed flechettes. They are slowly resupplied using the cyborg's internal power source."
icon_state = "l6closed0"
icon = 'icons/obj/guns/projectile.dmi'
cell_type = "/obj/item/stock_parts/cell/secborg"
ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet)
can_charge = 0
use_cyborg_cell = 1
/obj/item/gun/energy/printer/update_icon()
return
/obj/item/gun/energy/printer/emp_act()
return
/obj/item/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
desc = "A gun that changes temperatures."
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
cell_type = "/obj/item/stock_parts/cell/high"
pin = null
/obj/item/gun/energy/temperature/security
name = "security temperature gun"
desc = "A weapon that can only be used to its full potential by the truly robust."
pin = /obj/item/firing_pin
/obj/item/gun/energy/laser/instakill
name = "instakill rifle"
icon_state = "instagib"
item_state = "instagib"
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
force = 60
/obj/item/gun/energy/laser/instakill/red
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
icon_state = "instagibred"
item_state = "instagibred"
ammo_type = list(/obj/item/ammo_casing/energy/instakill/red)
/obj/item/gun/energy/laser/instakill/blue
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a blue design."
icon_state = "instagibblue"
item_state = "instagibblue"
ammo_type = list(/obj/item/ammo_casing/energy/instakill/blue)
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
return
/obj/item/gun/energy/gravity_gun
name = "one-point bluespace-gravitational manipulator"
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
item_state = "gravity_gun"
icon_state = "gravity_gun"
pin = null
var/power = 4
/obj/item/gun/energy/gravity_gun/security
pin = /obj/item/firing_pin
//Emitter Gun
/obj/item/gun/energy/emitter
name = "Emitter Carbine"
desc = "A small emitter fitted into a handgun case, do to size constraints and safety it can only shoot about ten times when fully charged."
icon_state = "emitter_carbine"
force = 12
w_class = WEIGHT_CLASS_SMALL
cell_type = /obj/item/stock_parts/cell/super
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
/obj/item/gun/energy/emitter/update_icon()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("emitter_carbine_empty")
else
add_overlay("emitter_carbine")
/obj/item/gun/energy/ionrifle
name = "ion rifle"
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
icon_state = "ionrifle"
item_state = null //so the human update icon uses the icon_state instead.
can_flashlight = 1
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
ammo_x_offset = 3
flight_x_offset = 17
flight_y_offset = 9
/obj/item/gun/energy/ionrifle/emp_act(severity)
return
/obj/item/gun/energy/ionrifle/carbine
name = "ion carbine"
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
icon_state = "ioncarbine"
w_class = WEIGHT_CLASS_NORMAL
slot_flags = ITEM_SLOT_BELT
pin = null
ammo_x_offset = 2
flight_x_offset = 18
flight_y_offset = 11
/obj/item/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
ammo_type = list(/obj/item/ammo_casing/energy/declone)
pin = null
ammo_x_offset = 1
/obj/item/gun/energy/decloner/update_icon()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("decloner_spin")
/obj/item/gun/energy/floragun
name = "floral somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
icon_state = "flora"
item_state = "gun"
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
modifystate = 1
ammo_x_offset = 1
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/meteorgun
name = "meteor gun"
desc = "For the love of god, make sure you're aiming this the right way!"
icon_state = "meteor_gun"
item_state = "c20r"
w_class = WEIGHT_CLASS_BULKY
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
cell_type = "/obj/item/stock_parts/cell/potato"
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
selfcharge = EGUN_SELFCHARGE
/obj/item/gun/energy/meteorgun/pen
name = "meteor pen"
desc = "The pen is mightier than the sword."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
/obj/item/gun/energy/mindflayer
name = "\improper Mind Flayer"
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
icon_state = "xray"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
ammo_x_offset = 2
/obj/item/gun/energy/kinetic_accelerator/crossbow
name = "mini energy crossbow"
desc = "A weapon favored by syndicate stealth specialists."
icon_state = "crossbow"
item_state = "crossbow"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=2000)
suppressed = TRUE
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
weapon_weight = WEAPON_LIGHT
obj_flags = 0
overheat_time = 20
holds_charge = TRUE
unique_frequency = TRUE
can_flashlight = 0
max_mod_capacity = 0
/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween
name = "candy corn crossbow"
desc = "A weapon favored by Syndicate trick-or-treaters."
icon_state = "crossbow_halloween"
item_state = "crossbow"
ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween)
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
name = "energy crossbow"
desc = "A reverse engineered weapon using syndicate technology."
icon_state = "crossbowlarge"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=4000)
suppressed = null
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
pin = null
/obj/item/gun/energy/plasmacutter
name = "plasma cutter"
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff."
icon_state = "plasmacutter"
item_state = "plasmacutter"
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
flags_1 = CONDUCT_1
attack_verb = list("attacked", "slashed", "cut", "sliced")
force = 12
sharpness = IS_SHARP
can_charge = 0
heat = 3800
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
tool_behaviour = TOOL_WELDER
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
/obj/item/gun/energy/plasmacutter/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
/obj/item/gun/energy/plasmacutter/examine(mob/user)
. = ..()
if(cell)
. += "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>"
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
I.use(1)
cell.give(1000)
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else if(istype(I, /obj/item/stack/ore/plasma))
I.use(1)
cell.give(500)
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else
..()
// Tool procs, in case plasma cutter is used as welder
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
if(!QDELETED(cell) && (cell.charge >= amount * 100))
return TRUE
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
return FALSE
/obj/item/gun/energy/plasmacutter/use(amount)
return cell.use(amount * 100)
/obj/item/gun/energy/plasmacutter/update_icon()
return
/obj/item/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
force = 15
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
/obj/item/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
desc = "A projector that emits high density quantum-coupled bluespace beams."
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
item_state = null
icon_state = "wormhole_projector"
pin = null
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
/obj/item/gun/energy/wormhole_projector/update_icon()
icon_state = "[initial(icon_state)][select]"
item_state = icon_state
/obj/item/gun/energy/wormhole_projector/update_ammo_types()
. = ..()
for(var/i in 1 to ammo_type.len)
var/obj/item/ammo_casing/energy/wormhole/W = ammo_type[i]
if(istype(W))
W.gun = src
var/obj/item/projectile/beam/wormhole/WH = W.BB
if(istype(WH))
WH.gun = src
/obj/item/gun/energy/wormhole_projector/process_chamber()
..()
select_fire()
/obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
if(P == p_blue)
p_blue = null
else if(P == p_orange)
p_orange = null
/obj/item/gun/energy/wormhole_projector/proc/has_blue_portal()
if(istype(p_blue) && !QDELETED(p_blue))
return TRUE
return FALSE
/obj/item/gun/energy/wormhole_projector/proc/has_orange_portal()
if(istype(p_orange) && !QDELETED(p_orange))
return TRUE
return FALSE
/obj/item/gun/energy/wormhole_projector/proc/crosslink()
if(!has_blue_portal() && !has_orange_portal())
return
if(!has_blue_portal() && has_orange_portal())
p_orange.link_portal(null)
return
if(!has_orange_portal() && has_blue_portal())
p_blue.link_portal(null)
return
p_orange.link_portal(p_blue)
p_blue.link_portal(p_orange)
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
var/obj/effect/portal/P = new /obj/effect/portal(target, src, 300, null, FALSE, null, atmos_link)
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
qdel(p_orange)
p_orange = P
P.icon_state = "portal1"
else
qdel(p_blue)
p_blue = P
crosslink()
/* 3d printer 'pseudo guns' for borgs */
/obj/item/gun/energy/printer
name = "cyborg lmg"
desc = "A LMG that fires 3D-printed flechettes. They are slowly resupplied using the cyborg's internal power source."
icon_state = "l6closed0"
icon = 'icons/obj/guns/projectile.dmi'
cell_type = "/obj/item/stock_parts/cell/secborg"
ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet)
can_charge = 0
use_cyborg_cell = 1
/obj/item/gun/energy/printer/update_icon()
return
/obj/item/gun/energy/printer/emp_act()
return
/obj/item/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
desc = "A gun that changes temperatures."
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
cell_type = "/obj/item/stock_parts/cell/high"
pin = null
/obj/item/gun/energy/temperature/security
name = "security temperature gun"
desc = "A weapon that can only be used to its full potential by the truly robust."
pin = /obj/item/firing_pin
/obj/item/gun/energy/laser/instakill
name = "instakill rifle"
icon_state = "instagib"
item_state = "instagib"
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
force = 60
/obj/item/gun/energy/laser/instakill/red
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
icon_state = "instagibred"
item_state = "instagibred"
ammo_type = list(/obj/item/ammo_casing/energy/instakill/red)
/obj/item/gun/energy/laser/instakill/blue
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a blue design."
icon_state = "instagibblue"
item_state = "instagibblue"
ammo_type = list(/obj/item/ammo_casing/energy/instakill/blue)
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
return
/obj/item/gun/energy/gravity_gun
name = "one-point bluespace-gravitational manipulator"
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
item_state = "gravity_gun"
icon_state = "gravity_gun"
pin = null
var/power = 4
/obj/item/gun/energy/gravity_gun/security
pin = /obj/item/firing_pin
//Emitter Gun
/obj/item/gun/energy/emitter
name = "Emitter Carbine"
desc = "A small emitter fitted into a handgun case, do to size constraints and safety it can only shoot about ten times when fully charged."
icon_state = "emitter_carbine"
force = 12
w_class = WEIGHT_CLASS_SMALL
cell_type = /obj/item/stock_parts/cell/super
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
/obj/item/gun/energy/emitter/update_icon()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("emitter_carbine_empty")
else
add_overlay("emitter_carbine")
+64 -64
View File
@@ -1,64 +1,64 @@
/obj/item/gun/energy/taser
name = "taser gun"
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 3
/obj/item/gun/energy/tesla_revolver
name = "tesla gun"
desc = "An experimental gun based on an experimental engine, it's about as likely to kill its operator as it is the target."
icon_state = "tesla"
item_state = "tesla"
ammo_type = list(/obj/item/ammo_casing/energy/tesla_revolver)
can_flashlight = 0
pin = null
shaded_charge = 1
/obj/item/gun/energy/e_gun/advtaser
name = "hybrid taser"
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
icon_state = "advtaser"
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 2
/obj/item/gun/energy/e_gun/advtaser/cyborg
name = "cyborg taser"
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_flashlight = FALSE
can_charge = FALSE
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 5
/obj/item/gun/energy/e_gun/advtaser/cyborg/mean
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell."
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
/obj/item/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
icon_state = "disabler"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
ammo_x_offset = 3
/obj/item/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_charge = FALSE
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 5
/obj/item/gun/energy/disabler/cyborg/mean
desc = "An integrated disabler that draws from a cyborg's power cell."
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
/obj/item/gun/energy/taser
name = "taser gun"
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 3
/obj/item/gun/energy/tesla_revolver
name = "tesla gun"
desc = "An experimental gun based on an experimental engine, it's about as likely to kill its operator as it is the target."
icon_state = "tesla"
item_state = "tesla"
ammo_type = list(/obj/item/ammo_casing/energy/tesla_revolver)
can_flashlight = 0
pin = null
shaded_charge = 1
/obj/item/gun/energy/e_gun/advtaser
name = "hybrid taser"
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
icon_state = "advtaser"
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 2
/obj/item/gun/energy/e_gun/advtaser/cyborg
name = "cyborg taser"
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_flashlight = FALSE
can_charge = FALSE
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 5
/obj/item/gun/energy/e_gun/advtaser/cyborg/mean
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell."
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
/obj/item/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
icon_state = "disabler"
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
ammo_x_offset = 3
/obj/item/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
can_charge = FALSE
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 5
/obj/item/gun/energy/disabler/cyborg/mean
desc = "An integrated disabler that draws from a cyborg's power cell."
use_cyborg_cell = TRUE
selfcharge = EGUN_NO_SELFCHARGE
+91 -91
View File
@@ -1,91 +1,91 @@
/obj/item/gun/magic
name = "staff of nothing"
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
icon = 'icons/obj/guns/magic.dmi'
icon_state = "staffofnothing"
item_state = "staff"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
fire_sound = 'sound/weapons/emitter.ogg'
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_HUGE
var/checks_antimagic = FALSE
var/max_charges = 6
var/charges = 0
var/recharge_rate = 4
var/charge_tick = 0
var/can_charge = 1
var/ammo_type
var/no_den_usage
clumsy_check = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
pin = /obj/item/firing_pin/magic
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag)
if(no_den_usage)
var/area/A = get_area(user)
if(istype(A, /area/wizard_station))
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
return
else
no_den_usage = 0
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
return
. = ..()
/obj/item/gun/magic/can_shoot()
return charges
/obj/item/gun/magic/recharge_newshot()
if (charges && chambered && !chambered.BB)
chambered.newshot()
/obj/item/gun/magic/process_chamber()
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
charges--//... drain a charge
recharge_newshot()
/obj/item/gun/magic/Initialize()
. = ..()
charges = max_charges
chambered = new ammo_type(src)
if(can_charge)
START_PROCESSING(SSobj, src)
/obj/item/gun/magic/Destroy()
if(can_charge)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/magic/process()
charge_tick++
if(charge_tick < recharge_rate || charges >= max_charges)
return 0
charge_tick = 0
charges++
if(charges == 1)
recharge_newshot()
return 1
/obj/item/gun/magic/update_icon()
return
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
/obj/item/gun/magic/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, fire_sound, 50, 1, -1)
return (FIRELOSS)
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
. = ..()
switch (var_name)
if ("charges")
recharge_newshot()
/obj/item/gun/magic
name = "staff of nothing"
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
icon = 'icons/obj/guns/magic.dmi'
icon_state = "staffofnothing"
item_state = "staff"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
fire_sound = 'sound/weapons/emitter.ogg'
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_HUGE
var/checks_antimagic = FALSE
var/max_charges = 6
var/charges = 0
var/recharge_rate = 4
var/charge_tick = 0
var/can_charge = 1
var/ammo_type
var/no_den_usage
clumsy_check = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
pin = /obj/item/firing_pin/magic
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag)
if(no_den_usage)
var/area/A = get_area(user)
if(istype(A, /area/wizard_station))
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
return
else
no_den_usage = 0
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
return
. = ..()
/obj/item/gun/magic/can_shoot()
return charges
/obj/item/gun/magic/recharge_newshot()
if (charges && chambered && !chambered.BB)
chambered.newshot()
/obj/item/gun/magic/process_chamber()
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
charges--//... drain a charge
recharge_newshot()
/obj/item/gun/magic/Initialize()
. = ..()
charges = max_charges
chambered = new ammo_type(src)
if(can_charge)
START_PROCESSING(SSobj, src)
/obj/item/gun/magic/Destroy()
if(can_charge)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/magic/process()
charge_tick++
if(charge_tick < recharge_rate || charges >= max_charges)
return 0
charge_tick = 0
charges++
if(charges == 1)
recharge_newshot()
return 1
/obj/item/gun/magic/update_icon()
return
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
/obj/item/gun/magic/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, fire_sound, 50, 1, -1)
return (FIRELOSS)
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
. = ..()
switch (var_name)
if ("charges")
recharge_newshot()
+177 -177
View File
@@ -1,177 +1,177 @@
/obj/item/gun/magic/wand
name = "wand of nothing"
desc = "It's not just a stick, it's a MAGIC stick!"
ammo_type = /obj/item/ammo_casing/magic
icon_state = "nothingwand"
item_state = "wand"
w_class = WEIGHT_CLASS_SMALL
can_charge = 0
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
var/variable_charges = 1
/obj/item/gun/magic/wand/Initialize()
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
if(prob(33))
max_charges = CEILING(max_charges / 3, 1)
else
max_charges = CEILING(max_charges / 2, 1)
return ..()
/obj/item/gun/magic/wand/examine(mob/user)
. = ..()
. += "Has [charges] charge\s remaining."
/obj/item/gun/magic/wand/update_icon()
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
if(target == user)
return
..()
/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user)
if(!charges)
shoot_with_empty_chamber(user)
return
if(target == user)
if(no_den_usage)
var/area/A = get_area(user)
if(istype(A, /area/wizard_station))
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
return
else
no_den_usage = 0
zap_self(user)
else
. = ..()
update_icon()
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
playsound(user, fire_sound, 50, 1)
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
/////////////////////////////////////
//WAND OF DEATH
/////////////////////////////////////
/obj/item/gun/magic/wand/death
name = "wand of death"
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
fire_sound = 'sound/magic/wandodeath.ogg'
ammo_type = /obj/item/ammo_casing/magic/death
icon_state = "deathwand"
max_charges = 3 //3, 2, 2, 1
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
..()
to_chat(user, "<span class='warning'>You irradiate yourself with pure energy! \
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
</span>")
user.adjustOxyLoss(500)
charges--
/////////////////////////////////////
//WAND OF HEALING
/////////////////////////////////////
/obj/item/gun/magic/wand/resurrection
name = "wand of healing"
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
ammo_type = /obj/item/ammo_casing/magic/heal
fire_sound = 'sound/magic/staff_healing.ogg'
icon_state = "revivewand"
max_charges = 10 //10, 5, 5, 4
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
..()
charges--
if(user.anti_magic_check())
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
return
user.revive(full_heal = 1)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.regenerate_limbs()
C.regenerate_organs()
to_chat(user, "<span class='notice'>You feel great!</span>")
/obj/item/gun/magic/wand/resurrection/debug //for testing
name = "debug wand of healing"
max_charges = 500
/////////////////////////////////////
//WAND OF POLYMORPH
/////////////////////////////////////
/obj/item/gun/magic/wand/polymorph
name = "wand of polymorph"
desc = "This wand is attuned to chaos and will radically alter the victim's form."
ammo_type = /obj/item/ammo_casing/magic/change
icon_state = "polywand"
fire_sound = 'sound/magic/staff_change.ogg'
max_charges = 10 //10, 5, 5, 4
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
..() //because the user mob ceases to exists by the time wabbajack fully resolves
wabbajack(user)
charges--
/////////////////////////////////////
//WAND OF TELEPORTATION
/////////////////////////////////////
/obj/item/gun/magic/wand/teleport
name = "wand of teleportation"
desc = "This wand will wrench targets through space and time to move them somewhere else."
ammo_type = /obj/item/ammo_casing/magic/teleport
fire_sound = 'sound/magic/wand_teleport.ogg'
icon_state = "telewand"
max_charges = 10 //10, 5, 5, 4
no_den_usage = 1
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(3, user.loc)
smoke.start()
charges--
..()
/////////////////////////////////////
//WAND OF DOOR CREATION
/////////////////////////////////////
/obj/item/gun/magic/wand/door
name = "wand of door creation"
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
ammo_type = /obj/item/ammo_casing/magic/door
icon_state = "doorwand"
fire_sound = 'sound/magic/staff_door.ogg'
max_charges = 20 //20, 10, 10, 7
no_den_usage = 1
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
charges--
..()
/////////////////////////////////////
//WAND OF FIREBALL
/////////////////////////////////////
/obj/item/gun/magic/wand/fireball
name = "wand of fireball"
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
fire_sound = 'sound/magic/fireball.ogg'
ammo_type = /obj/item/ammo_casing/magic/fireball
icon_state = "firewand"
max_charges = 8 //8, 4, 4, 3
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
..()
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
charges--
/obj/item/gun/magic/wand
name = "wand of nothing"
desc = "It's not just a stick, it's a MAGIC stick!"
ammo_type = /obj/item/ammo_casing/magic
icon_state = "nothingwand"
item_state = "wand"
w_class = WEIGHT_CLASS_SMALL
can_charge = 0
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
var/variable_charges = 1
/obj/item/gun/magic/wand/Initialize()
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
if(prob(33))
max_charges = CEILING(max_charges / 3, 1)
else
max_charges = CEILING(max_charges / 2, 1)
return ..()
/obj/item/gun/magic/wand/examine(mob/user)
. = ..()
. += "Has [charges] charge\s remaining."
/obj/item/gun/magic/wand/update_icon()
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
if(target == user)
return
..()
/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user)
if(!charges)
shoot_with_empty_chamber(user)
return
if(target == user)
if(no_den_usage)
var/area/A = get_area(user)
if(istype(A, /area/wizard_station))
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
return
else
no_den_usage = 0
zap_self(user)
else
. = ..()
update_icon()
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
playsound(user, fire_sound, 50, 1)
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
/////////////////////////////////////
//WAND OF DEATH
/////////////////////////////////////
/obj/item/gun/magic/wand/death
name = "wand of death"
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
fire_sound = 'sound/magic/wandodeath.ogg'
ammo_type = /obj/item/ammo_casing/magic/death
icon_state = "deathwand"
max_charges = 3 //3, 2, 2, 1
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
..()
to_chat(user, "<span class='warning'>You irradiate yourself with pure energy! \
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
</span>")
user.adjustOxyLoss(500)
charges--
/////////////////////////////////////
//WAND OF HEALING
/////////////////////////////////////
/obj/item/gun/magic/wand/resurrection
name = "wand of healing"
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
ammo_type = /obj/item/ammo_casing/magic/heal
fire_sound = 'sound/magic/staff_healing.ogg'
icon_state = "revivewand"
max_charges = 10 //10, 5, 5, 4
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
..()
charges--
if(user.anti_magic_check())
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
return
user.revive(full_heal = 1)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.regenerate_limbs()
C.regenerate_organs()
to_chat(user, "<span class='notice'>You feel great!</span>")
/obj/item/gun/magic/wand/resurrection/debug //for testing
name = "debug wand of healing"
max_charges = 500
/////////////////////////////////////
//WAND OF POLYMORPH
/////////////////////////////////////
/obj/item/gun/magic/wand/polymorph
name = "wand of polymorph"
desc = "This wand is attuned to chaos and will radically alter the victim's form."
ammo_type = /obj/item/ammo_casing/magic/change
icon_state = "polywand"
fire_sound = 'sound/magic/staff_change.ogg'
max_charges = 10 //10, 5, 5, 4
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
..() //because the user mob ceases to exists by the time wabbajack fully resolves
wabbajack(user)
charges--
/////////////////////////////////////
//WAND OF TELEPORTATION
/////////////////////////////////////
/obj/item/gun/magic/wand/teleport
name = "wand of teleportation"
desc = "This wand will wrench targets through space and time to move them somewhere else."
ammo_type = /obj/item/ammo_casing/magic/teleport
fire_sound = 'sound/magic/wand_teleport.ogg'
icon_state = "telewand"
max_charges = 10 //10, 5, 5, 4
no_den_usage = 1
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(3, user.loc)
smoke.start()
charges--
..()
/////////////////////////////////////
//WAND OF DOOR CREATION
/////////////////////////////////////
/obj/item/gun/magic/wand/door
name = "wand of door creation"
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
ammo_type = /obj/item/ammo_casing/magic/door
icon_state = "doorwand"
fire_sound = 'sound/magic/staff_door.ogg'
max_charges = 20 //20, 10, 10, 7
no_den_usage = 1
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
charges--
..()
/////////////////////////////////////
//WAND OF FIREBALL
/////////////////////////////////////
/obj/item/gun/magic/wand/fireball
name = "wand of fireball"
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
fire_sound = 'sound/magic/fireball.ogg'
ammo_type = /obj/item/ammo_casing/magic/fireball
icon_state = "firewand"
max_charges = 8 //8, 4, 4, 3
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
..()
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
charges--
File diff suppressed because it is too large Load Diff
+45 -45
View File
@@ -1,46 +1,46 @@
//his isn't a subtype of the syringe gun because the syringegun subtype is made to hold syringes
//this is meant to hold reagents/obj/item/gun/syringe
/obj/item/gun/chem
name = "reagent gun"
desc = "A Nanotrasen syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents."
icon_state = "chemgun"
item_state = "chemgun"
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
var/time_per_syringe = 250
var/syringes_left = 4
var/max_syringes = 4
var/last_synth = 0
/obj/item/gun/chem/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/chemgun(src)
START_PROCESSING(SSobj, src)
create_reagents(100, OPENCONTAINER)
/obj/item/gun/chem/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
/obj/item/gun/chem/can_shoot()
return syringes_left
/obj/item/gun/chem/process_chamber()
if(chambered && !chambered.BB && syringes_left)
chambered.newshot()
/obj/item/gun/chem/process()
if(syringes_left >= max_syringes)
return
if(world.time < last_synth+time_per_syringe)
return
to_chat(loc, "<span class='warning'>You hear a click as [src] synthesizes a new dart.</span>")
syringes_left++
if(chambered && !chambered.BB)
chambered.newshot()
//his isn't a subtype of the syringe gun because the syringegun subtype is made to hold syringes
//this is meant to hold reagents/obj/item/gun/syringe
/obj/item/gun/chem
name = "reagent gun"
desc = "A Nanotrasen syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents."
icon_state = "chemgun"
item_state = "chemgun"
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
var/time_per_syringe = 250
var/syringes_left = 4
var/max_syringes = 4
var/last_synth = 0
/obj/item/gun/chem/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/chemgun(src)
START_PROCESSING(SSobj, src)
create_reagents(100, OPENCONTAINER)
/obj/item/gun/chem/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
/obj/item/gun/chem/can_shoot()
return syringes_left
/obj/item/gun/chem/process_chamber()
if(chambered && !chambered.BB && syringes_left)
chambered.newshot()
/obj/item/gun/chem/process()
if(syringes_left >= max_syringes)
return
if(world.time < last_synth+time_per_syringe)
return
to_chat(loc, "<span class='warning'>You hear a click as [src] synthesizes a new dart.</span>")
syringes_left++
if(chambered && !chambered.BB)
chambered.newshot()
last_synth = world.time
@@ -1,46 +1,46 @@
/obj/item/gun/grenadelauncher
name = "grenade launcher"
desc = "A terrible, terrible thing. It's really awful!"
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "riotgun"
item_state = "riotgun"
w_class = WEIGHT_CLASS_BULKY
throw_speed = 2
throw_range = 7
force = 5
var/list/grenades = new/list()
var/max_grenades = 3
materials = list(MAT_METAL=2000)
/obj/item/gun/grenadelauncher/examine(mob/user)
. = ..()
. += "[grenades.len] / [max_grenades] grenades loaded."
/obj/item/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
if((istype(I, /obj/item/grenade)))
if(grenades.len < max_grenades)
if(!user.transferItemToLoc(I, src))
return
grenades += I
to_chat(user, "<span class='notice'>You put the grenade in the grenade launcher.</span>")
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] Grenades.</span>")
else
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
/obj/item/gun/grenadelauncher/can_shoot()
return grenades.len
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
"<span class='danger'>You fire the grenade launcher!</span>")
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
grenades -= F
F.forceMove(user.loc)
F.throw_at(target, 30, 2, user)
message_admins("[ADMIN_LOOKUPFLW(user)] fired a grenade ([F.name]) from a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
log_game("[key_name(user)] fired a grenade ([F.name]) with a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
F.active = 1
F.icon_state = initial(F.icon_state) + "_active"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
addtimer(CALLBACK(F, /obj/item/grenade.proc/prime), 15)
/obj/item/gun/grenadelauncher
name = "grenade launcher"
desc = "A terrible, terrible thing. It's really awful!"
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "riotgun"
item_state = "riotgun"
w_class = WEIGHT_CLASS_BULKY
throw_speed = 2
throw_range = 7
force = 5
var/list/grenades = new/list()
var/max_grenades = 3
materials = list(MAT_METAL=2000)
/obj/item/gun/grenadelauncher/examine(mob/user)
. = ..()
. += "[grenades.len] / [max_grenades] grenades loaded."
/obj/item/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
if((istype(I, /obj/item/grenade)))
if(grenades.len < max_grenades)
if(!user.transferItemToLoc(I, src))
return
grenades += I
to_chat(user, "<span class='notice'>You put the grenade in the grenade launcher.</span>")
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] Grenades.</span>")
else
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
/obj/item/gun/grenadelauncher/can_shoot()
return grenades.len
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
"<span class='danger'>You fire the grenade launcher!</span>")
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
grenades -= F
F.forceMove(user.loc)
F.throw_at(target, 30, 2, user)
message_admins("[ADMIN_LOOKUPFLW(user)] fired a grenade ([F.name]) from a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
log_game("[key_name(user)] fired a grenade ([F.name]) with a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
F.active = 1
F.icon_state = initial(F.icon_state) + "_active"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
addtimer(CALLBACK(F, /obj/item/grenade.proc/prime), 15)
+135 -135
View File
@@ -1,135 +1,135 @@
/obj/item/gun/medbeam
name = "Medical Beamgun"
desc = "Don't cross the streams!"
icon = 'icons/obj/chronos.dmi'
icon_state = "chronogun"
item_state = "chronogun"
w_class = WEIGHT_CLASS_NORMAL
var/mob/living/current_target
var/last_check = 0
var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though
var/max_range = 8
var/active = 0
var/datum/beam/current_beam = null
var/mounted = 0 //Denotes if this is a handheld or mounted version
weapon_weight = WEAPON_MEDIUM
/obj/item/gun/medbeam/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/gun/medbeam/Destroy(mob/user)
STOP_PROCESSING(SSobj, src)
LoseTarget()
return ..()
/obj/item/gun/medbeam/dropped(mob/user)
..()
LoseTarget()
/obj/item/gun/medbeam/equipped(mob/user)
..()
LoseTarget()
/obj/item/gun/medbeam/proc/LoseTarget()
if(active)
qdel(current_beam)
current_beam = null
active = 0
on_beam_release(current_target)
current_target = null
/obj/item/gun/medbeam/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(isliving(user))
add_fingerprint(user)
if(current_target)
LoseTarget()
if(!isliving(target))
return
current_target = target
active = TRUE
current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical)
INVOKE_ASYNC(current_beam, /datum/beam.proc/Start)
SSblackbox.record_feedback("tally", "gun_fired", 1, type)
/obj/item/gun/medbeam/process()
var/source = loc
if(!mounted && !isliving(source))
LoseTarget()
return
if(!current_target)
LoseTarget()
return
if(world.time <= last_check+check_delay)
return
last_check = world.time
if(get_dist(source, current_target)>max_range || !los_check(source, current_target))
LoseTarget()
if(isliving(source))
to_chat(source, "<span class='warning'>You lose control of the beam!</span>")
return
if(current_target)
on_beam_tick(current_target)
/obj/item/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
var/turf/user_turf = user.loc
if(mounted)
user_turf = get_turf(user)
else if(!istype(user_turf))
return 0
var/obj/dummy = new(user_turf)
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
for(var/turf/turf in getline(user_turf,target))
if(mounted && turf == user_turf)
continue //Mechs are dense and thus fail the check
if(turf.density)
qdel(dummy)
return 0
for(var/atom/movable/AM in turf)
if(!AM.CanPass(dummy,turf,1))
qdel(dummy)
return 0
for(var/obj/effect/ebeam/medical/B in turf)// Don't cross the str-beams!
if(B.owner.origin != current_beam.origin)
explosion(B.loc,0,3,5,8)
qdel(dummy)
return 0
qdel(dummy)
return 1
/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
return
/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
if(target.health != target.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
target.adjustBruteLoss(-4)
target.adjustFireLoss(-4)
target.adjustToxLoss(-1, forced = TRUE)
target.adjustOxyLoss(-1)
return
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
return
/obj/effect/ebeam/medical
name = "medical beam"
//////////////////////////////Mech Version///////////////////////////////
/obj/item/gun/medbeam/mech
mounted = 1
/obj/item/gun/medbeam/mech/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
/obj/item/gun/medbeam
name = "Medical Beamgun"
desc = "Don't cross the streams!"
icon = 'icons/obj/chronos.dmi'
icon_state = "chronogun"
item_state = "chronogun"
w_class = WEIGHT_CLASS_NORMAL
var/mob/living/current_target
var/last_check = 0
var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though
var/max_range = 8
var/active = 0
var/datum/beam/current_beam = null
var/mounted = 0 //Denotes if this is a handheld or mounted version
weapon_weight = WEAPON_MEDIUM
/obj/item/gun/medbeam/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/gun/medbeam/Destroy(mob/user)
STOP_PROCESSING(SSobj, src)
LoseTarget()
return ..()
/obj/item/gun/medbeam/dropped(mob/user)
..()
LoseTarget()
/obj/item/gun/medbeam/equipped(mob/user)
..()
LoseTarget()
/obj/item/gun/medbeam/proc/LoseTarget()
if(active)
qdel(current_beam)
current_beam = null
active = 0
on_beam_release(current_target)
current_target = null
/obj/item/gun/medbeam/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(isliving(user))
add_fingerprint(user)
if(current_target)
LoseTarget()
if(!isliving(target))
return
current_target = target
active = TRUE
current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical)
INVOKE_ASYNC(current_beam, /datum/beam.proc/Start)
SSblackbox.record_feedback("tally", "gun_fired", 1, type)
/obj/item/gun/medbeam/process()
var/source = loc
if(!mounted && !isliving(source))
LoseTarget()
return
if(!current_target)
LoseTarget()
return
if(world.time <= last_check+check_delay)
return
last_check = world.time
if(get_dist(source, current_target)>max_range || !los_check(source, current_target))
LoseTarget()
if(isliving(source))
to_chat(source, "<span class='warning'>You lose control of the beam!</span>")
return
if(current_target)
on_beam_tick(current_target)
/obj/item/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
var/turf/user_turf = user.loc
if(mounted)
user_turf = get_turf(user)
else if(!istype(user_turf))
return 0
var/obj/dummy = new(user_turf)
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
for(var/turf/turf in getline(user_turf,target))
if(mounted && turf == user_turf)
continue //Mechs are dense and thus fail the check
if(turf.density)
qdel(dummy)
return 0
for(var/atom/movable/AM in turf)
if(!AM.CanPass(dummy,turf,1))
qdel(dummy)
return 0
for(var/obj/effect/ebeam/medical/B in turf)// Don't cross the str-beams!
if(B.owner.origin != current_beam.origin)
explosion(B.loc,0,3,5,8)
qdel(dummy)
return 0
qdel(dummy)
return 1
/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
return
/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
if(target.health != target.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
target.adjustBruteLoss(-4)
target.adjustFireLoss(-4)
target.adjustToxLoss(-1, forced = TRUE)
target.adjustOxyLoss(-1)
return
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
return
/obj/effect/ebeam/medical
name = "medical beam"
//////////////////////////////Mech Version///////////////////////////////
/obj/item/gun/medbeam/mech
mounted = 1
/obj/item/gun/medbeam/mech/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
+167 -167
View File
@@ -1,167 +1,167 @@
/obj/item/gun/syringe
name = "syringe gun"
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
icon_state = "syringegun"
item_state = "syringegun"
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
clumsy_check = 0
fire_sound = 'sound/items/syringeproj.ogg'
var/list/syringes = list()
var/max_syringes = 1
/obj/item/gun/syringe/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/syringegun(src)
/obj/item/gun/syringe/recharge_newshot()
if(!syringes.len)
return
chambered.newshot()
/obj/item/gun/syringe/can_shoot()
return syringes.len
/obj/item/gun/syringe/process_chamber()
if(chambered && !chambered.BB) //we just fired
recharge_newshot()
/obj/item/gun/syringe/examine(mob/user)
. = ..()
. += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
/obj/item/gun/syringe/attack_self(mob/living/user)
if(!syringes.len)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return 0
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
if(!S)
return 0
S.forceMove(user.loc)
syringes.Remove(S)
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
return 1
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe))
if(syringes.len < max_syringes)
if(!user.transferItemToLoc(A, src))
return FALSE
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
syringes += A
recharge_newshot()
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
/obj/item/gun/syringe/rapidsyringe
name = "rapid syringe gun"
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
icon_state = "rapidsyringegun"
max_syringes = 6
/obj/item/gun/syringe/syndicate
name = "dart pistol"
desc = "A small spring-loaded sidearm that functions identically to a syringe gun."
icon_state = "syringe_pistol"
item_state = "gun" //Smaller inhand
w_class = WEIGHT_CLASS_SMALL
force = 2 //Also very weak because it's smaller
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE //Permanently silenced
/obj/item/gun/syringe/dna
name = "modified syringe gun"
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
/obj/item/gun/syringe/dna/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/dnainjector(src)
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/dnainjector))
var/obj/item/dnainjector/D = A
if(D.used)
to_chat(user, "<span class='warning'>This injector is used up!</span>")
return
if(syringes.len < max_syringes)
if(!user.transferItemToLoc(D, src))
return FALSE
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
syringes += D
recharge_newshot()
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
/obj/item/gun/syringe/dart
name = "dart gun"
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
icon_state = "dartgun"
item_state = "dartgun"
materials = list(MAT_METAL=2000, MAT_GLASS=500)
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE
/obj/item/gun/syringe/dart/Initialize()
..()
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe/dart))
..()
else
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
return FALSE
/obj/item/gun/syringe/dart/rapiddart
name = "Repeating dart gun"
icon_state = "rapiddartgun"
item_state = "rapiddartgun"
/obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list)
var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list
if(istype(B, /obj/item/reagent_containers/glass/beaker/large))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 2
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/plastic))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 3
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/meta))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 4
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/bluespace))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 6
return
else
max_syringes = 1
desc = "[initial(desc)] It has a [B] strapped to it, but it doesn't seem to be doing anything."
..()
/obj/item/gun/syringe/blowgun
name = "blowgun"
desc = "Fire syringes at a short distance."
icon_state = "blowgun"
item_state = "blowgun"
fire_sound = 'sound/items/syringeproj.ogg'
/obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
visible_message("<span class='danger'>[user] starts aiming with a blowgun!</span>")
if(do_after(user, 25, target = src))
user.adjustStaminaLoss(20)
user.adjustOxyLoss(20)
..()
/obj/item/gun/syringe
name = "syringe gun"
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
icon_state = "syringegun"
item_state = "syringegun"
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
force = 4
materials = list(MAT_METAL=2000)
clumsy_check = 0
fire_sound = 'sound/items/syringeproj.ogg'
var/list/syringes = list()
var/max_syringes = 1
/obj/item/gun/syringe/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/syringegun(src)
/obj/item/gun/syringe/recharge_newshot()
if(!syringes.len)
return
chambered.newshot()
/obj/item/gun/syringe/can_shoot()
return syringes.len
/obj/item/gun/syringe/process_chamber()
if(chambered && !chambered.BB) //we just fired
recharge_newshot()
/obj/item/gun/syringe/examine(mob/user)
. = ..()
. += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
/obj/item/gun/syringe/attack_self(mob/living/user)
if(!syringes.len)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return 0
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
if(!S)
return 0
S.forceMove(user.loc)
syringes.Remove(S)
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
return 1
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe))
if(syringes.len < max_syringes)
if(!user.transferItemToLoc(A, src))
return FALSE
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
syringes += A
recharge_newshot()
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
/obj/item/gun/syringe/rapidsyringe
name = "rapid syringe gun"
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
icon_state = "rapidsyringegun"
max_syringes = 6
/obj/item/gun/syringe/syndicate
name = "dart pistol"
desc = "A small spring-loaded sidearm that functions identically to a syringe gun."
icon_state = "syringe_pistol"
item_state = "gun" //Smaller inhand
w_class = WEIGHT_CLASS_SMALL
force = 2 //Also very weak because it's smaller
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE //Permanently silenced
/obj/item/gun/syringe/dna
name = "modified syringe gun"
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
/obj/item/gun/syringe/dna/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/dnainjector(src)
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/dnainjector))
var/obj/item/dnainjector/D = A
if(D.used)
to_chat(user, "<span class='warning'>This injector is used up!</span>")
return
if(syringes.len < max_syringes)
if(!user.transferItemToLoc(D, src))
return FALSE
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
syringes += D
recharge_newshot()
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
/obj/item/gun/syringe/dart
name = "dart gun"
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
icon_state = "dartgun"
item_state = "dartgun"
materials = list(MAT_METAL=2000, MAT_GLASS=500)
suppressed = TRUE //Softer fire sound
can_unsuppress = FALSE
/obj/item/gun/syringe/dart/Initialize()
..()
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe/dart))
..()
else
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
return FALSE
/obj/item/gun/syringe/dart/rapiddart
name = "Repeating dart gun"
icon_state = "rapiddartgun"
item_state = "rapiddartgun"
/obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list)
var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list
if(istype(B, /obj/item/reagent_containers/glass/beaker/large))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 2
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/plastic))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 3
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/meta))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 4
return
else if(istype(B, /obj/item/reagent_containers/glass/beaker/bluespace))
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
max_syringes = 6
return
else
max_syringes = 1
desc = "[initial(desc)] It has a [B] strapped to it, but it doesn't seem to be doing anything."
..()
/obj/item/gun/syringe/blowgun
name = "blowgun"
desc = "Fire syringes at a short distance."
icon_state = "blowgun"
item_state = "blowgun"
fire_sound = 'sound/items/syringeproj.ogg'
/obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
visible_message("<span class='danger'>[user] starts aiming with a blowgun!</span>")
if(do_after(user, 25, target = src))
user.adjustStaminaLoss(20)
user.adjustOxyLoss(20)
..()
File diff suppressed because it is too large Load Diff
+209 -209
View File
@@ -1,210 +1,210 @@
/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
light_range = 2
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
flag = "laser"
eyeblur = 2
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
ricochets_max = 50 //Honk!
ricochet_chance = 80
is_reflectable = TRUE
/obj/item/projectile/beam/laser
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/item/projectile/beam/laser/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
tracer_type = /obj/effect/projectile/tracer/heavy_laser
muzzle_type = /obj/effect/projectile/muzzle/heavy_laser
impact_type = /obj/effect/projectile/impact/heavy_laser
/obj/item/projectile/beam/laser/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.IgniteMob()
else if(isturf(target))
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall
/obj/item/projectile/beam/weak
damage = 15
/obj/item/projectile/beam/weak/penetrator
armour_penetration = 50
/obj/item/projectile/beam/practice
name = "practice laser"
damage = 0
nodamage = 1
/obj/item/projectile/beam/scatter
name = "laser pellet"
icon_state = "scatterlaser"
damage = 5
/obj/item/projectile/beam/xray
name = "\improper X-ray beam"
icon_state = "xray"
damage = 15
irradiate = 300
range = 15
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
tracer_type = /obj/effect/projectile/tracer/xray
muzzle_type = /obj/effect/projectile/muzzle/xray
impact_type = /obj/effect/projectile/impact/xray
/obj/item/projectile/beam/disabler
name = "disabler beam"
icon_state = "omnilaser"
damage = 28 // Citadel change for balance from 36
damage_type = STAMINA
flag = "energy"
hitsound = 'sound/weapons/tap.ogg'
eyeblur = 0
speed = 0.6
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/disabler
muzzle_type = /obj/effect/projectile/muzzle/disabler
impact_type = /obj/effect/projectile/impact/disabler
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/pulse
muzzle_type = /obj/effect/projectile/muzzle/pulse
impact_type = /obj/effect/projectile/impact/pulse
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
. = ..()
if (!QDELETED(target) && (isturf(target) || istype(target, /obj/structure/)))
target.ex_act(EXPLODE_HEAVY)
/obj/item/projectile/beam/pulse/shotgun
damage = 40
/obj/item/projectile/beam/pulse/heavy
name = "heavy pulse laser"
icon_state = "pulse1_bl"
var/life = 20
/obj/item/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = FALSE)
life -= 10
if(life > 0)
. = -1
..()
/obj/item/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
/obj/item/projectile/beam/emitter/singularity_pull()
return //don't want the emitters to miss
/obj/item/projectile/beam/lasertag
name = "laser tag beam"
icon_state = "omnilaser"
hitsound = null
damage = 0
damage_type = STAMINA
flag = "laser"
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustStaminaLoss(34)
/obj/item/projectile/beam/lasertag/redtag
icon_state = "laser"
suit_types = list(/obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/item/projectile/beam/lasertag/redtag/hitscan
hitscan = TRUE
/obj/item/projectile/beam/lasertag/redtag/hitscan/holy
name = "lasrifle beam"
damage = 0.1
damage_type = BURN
/obj/item/projectile/beam/lasertag/bluetag
icon_state = "bluelaser"
suit_types = list(/obj/item/clothing/suit/redtag)
tracer_type = /obj/effect/projectile/tracer/laser/blue
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/item/projectile/beam/lasertag/bluetag/hitscan
hitscan = TRUE
/obj/item/projectile/beam/instakill
name = "instagib laser"
icon_state = "purple_laser"
damage = 200
damage_type = BURN
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
light_color = LIGHT_COLOR_PURPLE
/obj/item/projectile/beam/instakill/blue
icon_state = "blue_laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/item/projectile/beam/instakill/red
icon_state = "red_laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
/obj/item/projectile/beam/instakill/on_hit(atom/target)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.visible_message("<span class='danger'>[M] explodes into a shower of gibs!</span>")
M.gib()
//a shrink ray that shrinks stuff, which grows back after a short while.
/obj/item/projectile/beam/shrink
name = "shrink ray"
icon_state = "blue_laser"
hitsound = 'sound/weapons/shrink_hit.ogg'
damage = 0
damage_type = STAMINA
flag = "energy"
impact_effect_type = /obj/effect/temp_visual/impact_effect/shrink
light_color = LIGHT_COLOR_BLUE
var/shrink_time = 90
/obj/item/projectile/beam/shrink/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isopenturf(target) || istype(target, /turf/closed/indestructible))//shrunk floors wouldnt do anything except look weird, i-walls shouldnt be bypassable
return
/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
light_range = 2
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
flag = "laser"
eyeblur = 2
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
ricochets_max = 50 //Honk!
ricochet_chance = 80
is_reflectable = TRUE
/obj/item/projectile/beam/laser
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/item/projectile/beam/laser/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
tracer_type = /obj/effect/projectile/tracer/heavy_laser
muzzle_type = /obj/effect/projectile/muzzle/heavy_laser
impact_type = /obj/effect/projectile/impact/heavy_laser
/obj/item/projectile/beam/laser/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.IgniteMob()
else if(isturf(target))
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall
/obj/item/projectile/beam/weak
damage = 15
/obj/item/projectile/beam/weak/penetrator
armour_penetration = 50
/obj/item/projectile/beam/practice
name = "practice laser"
damage = 0
nodamage = 1
/obj/item/projectile/beam/scatter
name = "laser pellet"
icon_state = "scatterlaser"
damage = 5
/obj/item/projectile/beam/xray
name = "\improper X-ray beam"
icon_state = "xray"
damage = 15
irradiate = 300
range = 15
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
tracer_type = /obj/effect/projectile/tracer/xray
muzzle_type = /obj/effect/projectile/muzzle/xray
impact_type = /obj/effect/projectile/impact/xray
/obj/item/projectile/beam/disabler
name = "disabler beam"
icon_state = "omnilaser"
damage = 28 // Citadel change for balance from 36
damage_type = STAMINA
flag = "energy"
hitsound = 'sound/weapons/tap.ogg'
eyeblur = 0
speed = 0.6
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/disabler
muzzle_type = /obj/effect/projectile/muzzle/disabler
impact_type = /obj/effect/projectile/impact/disabler
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/pulse
muzzle_type = /obj/effect/projectile/muzzle/pulse
impact_type = /obj/effect/projectile/impact/pulse
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
. = ..()
if (!QDELETED(target) && (isturf(target) || istype(target, /obj/structure/)))
target.ex_act(EXPLODE_HEAVY)
/obj/item/projectile/beam/pulse/shotgun
damage = 40
/obj/item/projectile/beam/pulse/heavy
name = "heavy pulse laser"
icon_state = "pulse1_bl"
var/life = 20
/obj/item/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = FALSE)
life -= 10
if(life > 0)
. = -1
..()
/obj/item/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
/obj/item/projectile/beam/emitter/singularity_pull()
return //don't want the emitters to miss
/obj/item/projectile/beam/lasertag
name = "laser tag beam"
icon_state = "omnilaser"
hitsound = null
damage = 0
damage_type = STAMINA
flag = "laser"
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustStaminaLoss(34)
/obj/item/projectile/beam/lasertag/redtag
icon_state = "laser"
suit_types = list(/obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/item/projectile/beam/lasertag/redtag/hitscan
hitscan = TRUE
/obj/item/projectile/beam/lasertag/redtag/hitscan/holy
name = "lasrifle beam"
damage = 0.1
damage_type = BURN
/obj/item/projectile/beam/lasertag/bluetag
icon_state = "bluelaser"
suit_types = list(/obj/item/clothing/suit/redtag)
tracer_type = /obj/effect/projectile/tracer/laser/blue
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/item/projectile/beam/lasertag/bluetag/hitscan
hitscan = TRUE
/obj/item/projectile/beam/instakill
name = "instagib laser"
icon_state = "purple_laser"
damage = 200
damage_type = BURN
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
light_color = LIGHT_COLOR_PURPLE
/obj/item/projectile/beam/instakill/blue
icon_state = "blue_laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/item/projectile/beam/instakill/red
icon_state = "red_laser"
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = LIGHT_COLOR_RED
/obj/item/projectile/beam/instakill/on_hit(atom/target)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.visible_message("<span class='danger'>[M] explodes into a shower of gibs!</span>")
M.gib()
//a shrink ray that shrinks stuff, which grows back after a short while.
/obj/item/projectile/beam/shrink
name = "shrink ray"
icon_state = "blue_laser"
hitsound = 'sound/weapons/shrink_hit.ogg'
damage = 0
damage_type = STAMINA
flag = "energy"
impact_effect_type = /obj/effect/temp_visual/impact_effect/shrink
light_color = LIGHT_COLOR_BLUE
var/shrink_time = 90
/obj/item/projectile/beam/shrink/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isopenturf(target) || istype(target, /turf/closed/indestructible))//shrunk floors wouldnt do anything except look weird, i-walls shouldnt be bypassable
return
target.AddComponent(/datum/component/shrink, shrink_time)
+10 -10
View File
@@ -1,10 +1,10 @@
/obj/item/projectile/bullet
name = "bullet"
icon_state = "bullet"
damage = 60
damage_type = BRUTE
nodamage = FALSE
candink = TRUE
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
/obj/item/projectile/bullet
name = "bullet"
icon_state = "bullet"
damage = 60
damage_type = BRUTE
nodamage = FALSE
candink = TRUE
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
@@ -1,17 +1,17 @@
/obj/item/projectile/bullet/incendiary
damage = 20
var/fire_stacks = 4
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(fire_stacks)
M.IgniteMob()
/obj/item/projectile/bullet/incendiary/Move()
. = ..()
var/turf/location = get_turf(src)
if(location)
new /obj/effect/hotspot(location)
location.hotspot_expose(700, 5, 1)
/obj/item/projectile/bullet/incendiary
damage = 20
var/fire_stacks = 4
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(fire_stacks)
M.IgniteMob()
/obj/item/projectile/bullet/incendiary/Move()
. = ..()
var/turf/location = get_turf(src)
if(location)
new /obj/effect/hotspot(location)
location.hotspot_expose(700, 5, 1)
@@ -1,81 +1,80 @@
/obj/item/projectile/bullet/dart
name = "dart"
icon_state = "cbbolt"
damage = 6
var/piercing = FALSE
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
create_reagents(50, NO_REACT)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100) // not completely blocked
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
if(skip == TRUE)
return
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
..(target, blocked)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
return TRUE
/obj/item/projectile/bullet/dart/metalfoam/Initialize()
. = ..()
reagents.add_reagent("aluminium", 15)
reagents.add_reagent("foaming_agent", 5)
reagents.add_reagent("facid", 5)
/obj/item/projectile/bullet/dart/syringe
name = "syringe"
icon_state = "syringeproj"
//I am in a mess of my own making
/obj/item/projectile/bullet/dart/syringe/dart
name = "Smartdart"
icon_state = "dartproj"
damage = 0
var/emptrig = FALSE
/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..(target, blocked, TRUE)
for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time!
if(istype(R, /datum/reagent/medicine)) //Is this a medicine?
if(M.reagents.has_reagent(R.id))
if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD?
M.reagents.add_reagent(R.id, R.volume)
else
var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.id)) -1)
M.reagents.add_reagent(R.id, transVol)
else
if(!R.overdose_threshold == 0)
var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
M.reagents.add_reagent(R.id, transVol)
else
M.reagents.add_reagent(R.id, R.volume)
target.visible_message("<span class='notice'>\The [src] beeps!</span>")
to_chat("<span class='notice'><i>You feel a tiny prick as a smartdart embeds itself in you with a beep.</i></span>")
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You see a [src] bounce off you, booping sadly!</span>")
target.visible_message("<span class='danger'>\The [src] fails to land on target!</span>")
return TRUE
/obj/item/projectile/bullet/dart
name = "dart"
icon_state = "cbbolt"
damage = 6
var/piercing = FALSE
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
create_reagents(50, NO_REACT)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100) // not completely blocked
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
if(skip == TRUE)
return
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
..(target, blocked)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
return TRUE
/obj/item/projectile/bullet/dart/metalfoam/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/aluminium, 15)
reagents.add_reagent(/datum/reagent/foaming_agent, 5)
reagents.add_reagent(/datum/reagent/toxin/acid, 5)
/obj/item/projectile/bullet/dart/syringe
name = "syringe"
icon_state = "syringeproj"
//I am in a mess of my own making
/obj/item/projectile/bullet/dart/syringe/dart
name = "Smartdart"
icon_state = "dartproj"
damage = 0
var/emptrig = FALSE
/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..(target, blocked, TRUE)
for(var/datum/reagent/medicine/R in reagents.reagent_list) //OD prevention time!
if(M.reagents.has_reagent(R.type))
if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD?
M.reagents.add_reagent(R.type, R.volume)
else
var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.type)) -1)
M.reagents.add_reagent(R.type, transVol)
else
if(!R.overdose_threshold == 0)
var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
M.reagents.add_reagent(R.type, transVol)
else
M.reagents.add_reagent(R.type, R.volume)
target.visible_message("<span class='notice'>\The [src] beeps!</span>")
to_chat("<span class='notice'><i>You feel a tiny prick as a smartdart embeds itself in you with a beep.</i></span>")
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You see a [src] bounce off you, booping sadly!</span>")
target.visible_message("<span class='danger'>\The [src] fails to land on target!</span>")
return TRUE
@@ -1,24 +1,24 @@
/obj/item/projectile/bullet/dnainjector
name = "\improper DNA injector"
icon_state = "syringeproj"
var/obj/item/dnainjector/injector
damage = 5
hitsound_wall = "shatter"
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, FALSE))
if(injector.inject(M, firer))
QDEL_NULL(injector)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
return ..()
/obj/item/projectile/bullet/dnainjector/Destroy()
QDEL_NULL(injector)
return ..()
/obj/item/projectile/bullet/dnainjector
name = "\improper DNA injector"
icon_state = "syringeproj"
var/obj/item/dnainjector/injector
damage = 5
hitsound_wall = "shatter"
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, FALSE))
if(injector.inject(M, firer))
QDEL_NULL(injector)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
return ..()
/obj/item/projectile/bullet/dnainjector/Destroy()
QDEL_NULL(injector)
return ..()
@@ -1,12 +1,12 @@
// 40mm (Grenade Launcher
/obj/item/projectile/bullet/a40mm
name ="40mm grenade"
desc = "USE A WEEL GUN"
icon_state= "bolter"
damage = 60
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
return TRUE
// 40mm (Grenade Launcher
/obj/item/projectile/bullet/a40mm
name ="40mm grenade"
desc = "USE A WEEL GUN"
icon_state= "bolter"
damage = 60
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
return TRUE
@@ -1,44 +1,44 @@
// C3D (Borgs)
/obj/item/projectile/bullet/c3d
damage = 20
// Mech LMG
/obj/item/projectile/bullet/lmg
damage = 20
// Mech FNX-99
/obj/item/projectile/bullet/incendiary/fnx99
damage = 20
// Turrets
/obj/item/projectile/bullet/manned_turret
damage = 20
/obj/item/projectile/bullet/syndicate_turret
damage = 20
// 1.95x129mm (SAW)
/obj/item/projectile/bullet/mm195x129
name = "1.95x129mm bullet"
damage = 45
armour_penetration = 5
/obj/item/projectile/bullet/mm195x129_ap
name = "1.95x129mm armor-piercing bullet"
damage = 40
armour_penetration = 75
/obj/item/projectile/bullet/mm195x129_hp
name = "1.95x129mm hollow-point bullet"
damage = 60
armour_penetration = -60
/obj/item/projectile/bullet/incendiary/mm195x129
name = "1.95x129mm incendiary bullet"
damage = 20
fire_stacks = 3
// C3D (Borgs)
/obj/item/projectile/bullet/c3d
damage = 20
// Mech LMG
/obj/item/projectile/bullet/lmg
damage = 20
// Mech FNX-99
/obj/item/projectile/bullet/incendiary/fnx99
damage = 20
// Turrets
/obj/item/projectile/bullet/manned_turret
damage = 20
/obj/item/projectile/bullet/syndicate_turret
damage = 20
// 1.95x129mm (SAW)
/obj/item/projectile/bullet/mm195x129
name = "1.95x129mm bullet"
damage = 45
armour_penetration = 5
/obj/item/projectile/bullet/mm195x129_ap
name = "1.95x129mm armor-piercing bullet"
damage = 40
armour_penetration = 75
/obj/item/projectile/bullet/mm195x129_hp
name = "1.95x129mm hollow-point bullet"
damage = 60
armour_penetration = -60
/obj/item/projectile/bullet/incendiary/mm195x129
name = "1.95x129mm incendiary bullet"
damage = 20
fire_stacks = 3
@@ -1,36 +1,36 @@
// 9mm (Stechkin APS)
/obj/item/projectile/bullet/c9mm
name = "9mm bullet"
damage = 20
/obj/item/projectile/bullet/c9mm_ap
name = "9mm armor-piercing bullet"
damage = 15
armour_penetration = 40
/obj/item/projectile/bullet/incendiary/c9mm
name = "9mm incendiary bullet"
damage = 10
fire_stacks = 1
// 10mm (Stechkin)
/obj/item/projectile/bullet/c10mm
name = "10mm bullet"
damage = 30
/obj/item/projectile/bullet/c10mm_ap
name = "10mm armor-piercing bullet"
damage = 27
armour_penetration = 40
/obj/item/projectile/bullet/c10mm_hp
name = "10mm hollow-point bullet"
damage = 40
armour_penetration = -50
/obj/item/projectile/bullet/incendiary/c10mm
name = "10mm incendiary bullet"
damage = 15
fire_stacks = 2
// 9mm (Stechkin APS)
/obj/item/projectile/bullet/c9mm
name = "9mm bullet"
damage = 20
/obj/item/projectile/bullet/c9mm_ap
name = "9mm armor-piercing bullet"
damage = 15
armour_penetration = 40
/obj/item/projectile/bullet/incendiary/c9mm
name = "9mm incendiary bullet"
damage = 10
fire_stacks = 1
// 10mm (Stechkin)
/obj/item/projectile/bullet/c10mm
name = "10mm bullet"
damage = 30
/obj/item/projectile/bullet/c10mm_ap
name = "10mm armor-piercing bullet"
damage = 27
armour_penetration = 40
/obj/item/projectile/bullet/c10mm_hp
name = "10mm hollow-point bullet"
damage = 40
armour_penetration = -50
/obj/item/projectile/bullet/incendiary/c10mm
name = "10mm incendiary bullet"
damage = 15
fire_stacks = 2
@@ -1,71 +1,71 @@
// 7.62x38mmR (Nagant Revolver)
/obj/item/projectile/bullet/n762
name = "7.62x38mmR bullet"
damage = 60
// .50AE (Desert Eagle)
/obj/item/projectile/bullet/a50AE
name = ".50AE bullet"
damage = 60
// .38 (Detective's Gun)
/obj/item/projectile/bullet/c38
name = ".38 bullet"
damage = 25
/obj/item/projectile/bullet/c38/rubber
name = ".38 rubber bullet"
damage = 15
stamina = 48
/obj/item/projectile/bullet/c38/trac
name = ".38 TRAC bullet"
damage = 10
/obj/item/projectile/bullet/c38/trac/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/M = target
var/obj/item/implant/tracking/c38/imp
for(var/obj/item/implant/tracking/c38/TI in M.implants) //checks if the target already contains a tracking implant
imp = TI
return
if(!imp)
imp = new /obj/item/implant/tracking/c38(M)
imp.implant(M)
/obj/item/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail
name = ".38 Hot Shot bullet"
damage = 20
/obj/item/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(6)
M.IgniteMob()
/obj/item/projectile/bullet/c38/iceblox //see /obj/item/projectile/temp for the original code
name = ".38 Iceblox bullet"
damage = 20
var/temperature = 100
/obj/item/projectile/bullet/c38/iceblox/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isliving(target))
var/mob/living/M = target
M.adjust_bodytemperature(((100-blocked)/100)*(temperature - M.bodytemperature))
// .357 (Syndie Revolver)
/obj/item/projectile/bullet/a357
name = ".357 bullet"
damage = 60
/obj/item/projectile/bullet/a357/ap
name = ".357 armor-piercing bullet"
damage = 45
// 7.62x38mmR (Nagant Revolver)
/obj/item/projectile/bullet/n762
name = "7.62x38mmR bullet"
damage = 60
// .50AE (Desert Eagle)
/obj/item/projectile/bullet/a50AE
name = ".50AE bullet"
damage = 60
// .38 (Detective's Gun)
/obj/item/projectile/bullet/c38
name = ".38 bullet"
damage = 25
/obj/item/projectile/bullet/c38/rubber
name = ".38 rubber bullet"
damage = 15
stamina = 48
/obj/item/projectile/bullet/c38/trac
name = ".38 TRAC bullet"
damage = 10
/obj/item/projectile/bullet/c38/trac/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/M = target
var/obj/item/implant/tracking/c38/imp
for(var/obj/item/implant/tracking/c38/TI in M.implants) //checks if the target already contains a tracking implant
imp = TI
return
if(!imp)
imp = new /obj/item/implant/tracking/c38(M)
imp.implant(M)
/obj/item/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail
name = ".38 Hot Shot bullet"
damage = 20
/obj/item/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(6)
M.IgniteMob()
/obj/item/projectile/bullet/c38/iceblox //see /obj/item/projectile/temp for the original code
name = ".38 Iceblox bullet"
damage = 20
var/temperature = 100
/obj/item/projectile/bullet/c38/iceblox/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isliving(target))
var/mob/living/M = target
M.adjust_bodytemperature(((100-blocked)/100)*(temperature - M.bodytemperature))
// .357 (Syndie Revolver)
/obj/item/projectile/bullet/a357
name = ".357 bullet"
damage = 60
/obj/item/projectile/bullet/a357/ap
name = ".357 armor-piercing bullet"
damage = 45
armour_penetration = 45
@@ -1,16 +1,16 @@
// 5.56mm (M-90gl Carbine)
/obj/item/projectile/bullet/a556
name = "5.56mm bullet"
damage = 35
// 7.62 (Nagant Rifle)
/obj/item/projectile/bullet/a762
name = "7.62 bullet"
damage = 60
/obj/item/projectile/bullet/a762_enchanted
name = "enchanted 7.62 bullet"
damage = 5
stamina = 80
// 5.56mm (M-90gl Carbine)
/obj/item/projectile/bullet/a556
name = "5.56mm bullet"
damage = 35
// 7.62 (Nagant Rifle)
/obj/item/projectile/bullet/a762
name = "7.62 bullet"
damage = 60
/obj/item/projectile/bullet/a762_enchanted
name = "enchanted 7.62 bullet"
damage = 5
stamina = 80
@@ -1,100 +1,100 @@
/obj/item/projectile/bullet/shotgun_slug
name = "12g shotgun slug"
damage = 60
/obj/item/projectile/bullet/shotgun_beanbag
name = "beanbag slug"
damage = 5
stamina = 70
/obj/item/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
damage = 20
/obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
name = "dragonsbreath pellet"
damage = 5
/obj/item/projectile/bullet/shotgun_stunslug
name = "stunslug"
damage = 5
stamina = 20
knockdown = 100
stutter = 5
jitter = 20
range = 7
icon_state = "spark"
color = "#FFFF00"
/obj/item/projectile/bullet/shotgun_meteorslug
name = "meteorslug"
icon = 'icons/obj/meteor.dmi'
icon_state = "dust"
damage = 20
knockdown = 80
hitsound = 'sound/effects/meteorimpact.ogg'
/obj/item/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ismovableatom(target))
var/atom/movable/M = target
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.safe_throw_at(throw_target, 3, 2)
/obj/item/projectile/bullet/shotgun_meteorslug/Initialize()
. = ..()
SpinAnimation()
/obj/item/projectile/bullet/shotgun_frag12
name ="frag12 slug"
damage = 25
knockdown = 50
/obj/item/projectile/bullet/shotgun_frag12/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 1)
return TRUE
/obj/item/projectile/bullet/pellet
var/tile_dropoff = 0.75
var/tile_dropoff_s = 1.25
/obj/item/projectile/bullet/pellet/shotgun_buckshot
name = "buckshot pellet"
damage = 10
/obj/item/projectile/bullet/pellet/shotgun_rubbershot
name = "rubbershot pellet"
damage = 2
stamina = 15
/obj/item/projectile/bullet/pellet/Range()
..()
if(damage > 0)
damage -= tile_dropoff
if(stamina > 0)
stamina -= tile_dropoff_s
if(damage < 0 && stamina < 0)
qdel(src)
/obj/item/projectile/bullet/pellet/shotgun_improvised
tile_dropoff = 0.55 //Come on it does 6 damage don't be like that.
damage = 6
/obj/item/projectile/bullet/pellet/shotgun_improvised/Initialize()
. = ..()
range = rand(1, 8)
/obj/item/projectile/bullet/pellet/shotgun_improvised/on_range()
do_sparks(1, TRUE, src)
..()
// Mech Scattershots
/obj/item/projectile/bullet/scattershot
damage = 20
stamina = 65
/obj/item/projectile/bullet/seed
damage = 4
stamina = 1
/obj/item/projectile/bullet/shotgun_slug
name = "12g shotgun slug"
damage = 60
/obj/item/projectile/bullet/shotgun_beanbag
name = "beanbag slug"
damage = 5
stamina = 70
/obj/item/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
damage = 20
/obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
name = "dragonsbreath pellet"
damage = 5
/obj/item/projectile/bullet/shotgun_stunslug
name = "stunslug"
damage = 5
stamina = 20
knockdown = 100
stutter = 5
jitter = 20
range = 7
icon_state = "spark"
color = "#FFFF00"
/obj/item/projectile/bullet/shotgun_meteorslug
name = "meteorslug"
icon = 'icons/obj/meteor.dmi'
icon_state = "dust"
damage = 20
knockdown = 80
hitsound = 'sound/effects/meteorimpact.ogg'
/obj/item/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ismovableatom(target))
var/atom/movable/M = target
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.safe_throw_at(throw_target, 3, 2)
/obj/item/projectile/bullet/shotgun_meteorslug/Initialize()
. = ..()
SpinAnimation()
/obj/item/projectile/bullet/shotgun_frag12
name ="frag12 slug"
damage = 25
knockdown = 50
/obj/item/projectile/bullet/shotgun_frag12/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 1)
return TRUE
/obj/item/projectile/bullet/pellet
var/tile_dropoff = 0.75
var/tile_dropoff_s = 1.25
/obj/item/projectile/bullet/pellet/shotgun_buckshot
name = "buckshot pellet"
damage = 10
/obj/item/projectile/bullet/pellet/shotgun_rubbershot
name = "rubbershot pellet"
damage = 2
stamina = 15
/obj/item/projectile/bullet/pellet/Range()
..()
if(damage > 0)
damage -= tile_dropoff
if(stamina > 0)
stamina -= tile_dropoff_s
if(damage < 0 && stamina < 0)
qdel(src)
/obj/item/projectile/bullet/pellet/shotgun_improvised
tile_dropoff = 0.55 //Come on it does 6 damage don't be like that.
damage = 6
/obj/item/projectile/bullet/pellet/shotgun_improvised/Initialize()
. = ..()
range = rand(1, 8)
/obj/item/projectile/bullet/pellet/shotgun_improvised/on_range()
do_sparks(1, TRUE, src)
..()
// Mech Scattershots
/obj/item/projectile/bullet/scattershot
damage = 20
stamina = 65
/obj/item/projectile/bullet/seed
damage = 4
stamina = 1
@@ -1,46 +1,46 @@
// .50 (Sniper)
/obj/item/projectile/bullet/p50
name =".50 bullet"
speed = 0.4
damage = 70
knockdown = 100
dismemberment = 50
armour_penetration = 50
var/breakthings = TRUE
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)
if(isobj(target) && (blocked != 100) && breakthings)
var/obj/O = target
O.take_damage(80, BRUTE, "bullet", FALSE)
return ..()
/obj/item/projectile/bullet/p50/soporific
name =".50 soporific bullet"
armour_penetration = 0
damage = 0
dismemberment = 0
knockdown = 0
breakthings = FALSE
/obj/item/projectile/bullet/p50/soporific/on_hit(atom/target, blocked = FALSE)
if((blocked != 100) && isliving(target))
var/mob/living/L = target
L.Sleeping(400)
return ..()
/obj/item/projectile/bullet/p50/penetrator
name =".50 penetrator bullet"
icon_state = "gauss"
name = "penetrator round"
damage = 60
forcedodge = TRUE
dismemberment = 0 //It goes through you cleanly.
knockdown = 0
breakthings = FALSE
/obj/item/projectile/bullet/p50/penetrator/shuttle //Nukeop Shuttle Variety
icon_state = "gaussstrong"
damage = 25
speed = 0.3
range = 16
// .50 (Sniper)
/obj/item/projectile/bullet/p50
name =".50 bullet"
speed = 0.4
damage = 70
knockdown = 100
dismemberment = 50
armour_penetration = 50
var/breakthings = TRUE
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)
if(isobj(target) && (blocked != 100) && breakthings)
var/obj/O = target
O.take_damage(80, BRUTE, "bullet", FALSE)
return ..()
/obj/item/projectile/bullet/p50/soporific
name =".50 soporific bullet"
armour_penetration = 0
damage = 0
dismemberment = 0
knockdown = 0
breakthings = FALSE
/obj/item/projectile/bullet/p50/soporific/on_hit(atom/target, blocked = FALSE)
if((blocked != 100) && isliving(target))
var/mob/living/L = target
L.Sleeping(400)
return ..()
/obj/item/projectile/bullet/p50/penetrator
name =".50 penetrator bullet"
icon_state = "gauss"
name = "penetrator round"
damage = 60
forcedodge = TRUE
dismemberment = 0 //It goes through you cleanly.
knockdown = 0
breakthings = FALSE
/obj/item/projectile/bullet/p50/penetrator/shuttle //Nukeop Shuttle Variety
icon_state = "gaussstrong"
damage = 25
speed = 0.3
range = 16
@@ -1,27 +1,27 @@
// Honker
/obj/item/projectile/bullet/honker
damage = 0
knockdown = 60
forcedodge = TRUE
nodamage = TRUE
candink = FALSE
hitsound = 'sound/items/bikehorn.ogg'
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "banana"
range = 200
/obj/item/projectile/bullet/honker/Initialize()
. = ..()
SpinAnimation()
// Mime
/obj/item/projectile/bullet/mime
damage = 20
/obj/item/projectile/bullet/mime/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.silent = max(M.silent, 10)
// Honker
/obj/item/projectile/bullet/honker
damage = 0
knockdown = 60
forcedodge = TRUE
nodamage = TRUE
candink = FALSE
hitsound = 'sound/items/bikehorn.ogg'
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "banana"
range = 200
/obj/item/projectile/bullet/honker/Initialize()
. = ..()
SpinAnimation()
// Mime
/obj/item/projectile/bullet/mime
damage = 20
/obj/item/projectile/bullet/mime/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.silent = max(M.silent, 10)
@@ -1,8 +1,8 @@
/obj/item/projectile/energy
name = "energy"
icon_state = "spark"
damage = 0
damage_type = BURN
flag = "energy"
is_reflectable = TRUE
/obj/item/projectile/energy
name = "energy"
icon_state = "spark"
damage = 0
damage_type = BURN
flag = "energy"
is_reflectable = TRUE
@@ -1,16 +1,16 @@
/obj/item/projectile/energy/bolt //ebow bolts
name = "bolt"
icon_state = "cbbolt"
damage = 8
damage_type = TOX
nodamage = 0
knockdown = 100
stutter = 5
drowsy = 50
/obj/item/projectile/energy/bolt/halloween
name = "candy corn"
icon_state = "candy_corn"
/obj/item/projectile/energy/bolt/large
damage = 20
/obj/item/projectile/energy/bolt //ebow bolts
name = "bolt"
icon_state = "cbbolt"
damage = 8
damage_type = TOX
nodamage = 0
knockdown = 100
stutter = 5
drowsy = 50
/obj/item/projectile/energy/bolt/halloween
name = "candy corn"
icon_state = "candy_corn"
/obj/item/projectile/energy/bolt/large
damage = 20
@@ -1,15 +1,15 @@
/obj/item/projectile/energy/declone
name = "radiation beam"
icon_state = "declone"
damage = 20
damage_type = CLONE
irradiate = 100
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
/obj/item/projectile/energy/dart //ninja throwing dart
name = "dart"
icon_state = "toxin"
damage = 5
damage_type = TOX
knockdown = 100
range = 7
/obj/item/projectile/energy/declone
name = "radiation beam"
icon_state = "declone"
damage = 20
damage_type = CLONE
irradiate = 100
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
/obj/item/projectile/energy/dart //ninja throwing dart
name = "dart"
icon_state = "toxin"
damage = 5
damage_type = TOX
knockdown = 100
range = 7
@@ -1,35 +1,35 @@
/obj/item/projectile/energy/electrode
name = "electrode"
icon_state = "spark"
color = "#FFFF00"
nodamage = 1
knockdown = 60
knockdown_stamoverride = 36
knockdown_stam_max = 50
stutter = 5
jitter = 20
hitsound = 'sound/weapons/taserhit.ogg'
range = 7
tracer_type = /obj/effect/projectile/tracer/stun
muzzle_type = /obj/effect/projectile/muzzle/stun
impact_type = /obj/effect/projectile/impact/stun
var/tase_duration = 50
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = FALSE)
. = ..()
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks!
do_sparks(1, TRUE, src)
else if(iscarbon(target))
var/mob/living/carbon/C = target
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "tased", /datum/mood_event/tased)
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
C.IgniteMob()
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
C.apply_status_effect(STATUS_EFFECT_TASED, tase_duration)
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
do_sparks(1, TRUE, src)
..()
/obj/item/projectile/energy/electrode
name = "electrode"
icon_state = "spark"
color = "#FFFF00"
nodamage = 1
knockdown = 60
knockdown_stamoverride = 36
knockdown_stam_max = 50
stutter = 5
jitter = 20
hitsound = 'sound/weapons/taserhit.ogg'
range = 7
tracer_type = /obj/effect/projectile/tracer/stun
muzzle_type = /obj/effect/projectile/muzzle/stun
impact_type = /obj/effect/projectile/impact/stun
var/tase_duration = 50
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = FALSE)
. = ..()
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks!
do_sparks(1, TRUE, src)
else if(iscarbon(target))
var/mob/living/carbon/C = target
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "tased", /datum/mood_event/tased)
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
C.IgniteMob()
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE))
C.apply_status_effect(STATUS_EFFECT_TASED, tase_duration)
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
do_sparks(1, TRUE, src)
..()
@@ -1,29 +1,29 @@
/obj/item/projectile/energy/tesla
name = "tesla bolt"
icon_state = "tesla_projectile"
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
var/chain
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE
var/zap_range = 3
var/power = 10000
/obj/item/projectile/energy/tesla/fire(setAngle)
if(firer)
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
..()
/obj/item/projectile/energy/tesla/on_hit(atom/target)
. = ..()
tesla_zap(target, zap_range, power, tesla_flags)
qdel(src)
/obj/item/projectile/energy/tesla/Destroy()
qdel(chain)
return ..()
/obj/item/projectile/energy/tesla/revolver
name = "energy orb"
/obj/item/projectile/energy/tesla/cannon
name = "tesla orb"
power = 20000
/obj/item/projectile/energy/tesla
name = "tesla bolt"
icon_state = "tesla_projectile"
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
var/chain
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE
var/zap_range = 3
var/power = 10000
/obj/item/projectile/energy/tesla/fire(setAngle)
if(firer)
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
..()
/obj/item/projectile/energy/tesla/on_hit(atom/target)
. = ..()
tesla_zap(target, zap_range, power, tesla_flags)
qdel(src)
/obj/item/projectile/energy/tesla/Destroy()
qdel(chain)
return ..()
/obj/item/projectile/energy/tesla/revolver
name = "energy orb"
/obj/item/projectile/energy/tesla/cannon
name = "tesla orb"
power = 20000
@@ -1,20 +1,20 @@
/obj/item/projectile/bullet/reusable
name = "reusable bullet"
desc = "How do you even reuse a bullet?"
var/ammo_type = /obj/item/ammo_casing/caseless
var/dropped = FALSE
impact_effect_type = null
/obj/item/projectile/bullet/reusable/on_hit(atom/target, blocked = FALSE)
. = ..()
handle_drop()
/obj/item/projectile/bullet/reusable/on_range()
handle_drop()
..()
/obj/item/projectile/bullet/reusable/proc/handle_drop()
if(!dropped)
var/turf/T = get_turf(src)
new ammo_type(T)
dropped = TRUE
/obj/item/projectile/bullet/reusable
name = "reusable bullet"
desc = "How do you even reuse a bullet?"
var/ammo_type = /obj/item/ammo_casing/caseless
var/dropped = FALSE
impact_effect_type = null
/obj/item/projectile/bullet/reusable/on_hit(atom/target, blocked = FALSE)
. = ..()
handle_drop()
/obj/item/projectile/bullet/reusable/on_range()
handle_drop()
..()
/obj/item/projectile/bullet/reusable/proc/handle_drop()
if(!dropped)
var/turf/T = get_turf(src)
new ammo_type(T)
dropped = TRUE
@@ -1,41 +1,41 @@
/obj/item/projectile/bullet/reusable/foam_dart
name = "foam dart"
desc = "I hope you're wearing eye protection."
damage = 0 // It's a damn toy.
damage_type = OXY
nodamage = TRUE
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart_proj"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
range = 10
var/modified = FALSE
var/obj/item/pen/pen = null
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
if(dropped)
return
var/turf/T = get_turf(src)
dropped = 1
var/obj/item/ammo_casing/caseless/foam_dart/newcasing = new ammo_type(T)
newcasing.modified = modified
var/obj/item/projectile/bullet/reusable/foam_dart/newdart = newcasing.BB
newdart.modified = modified
newdart.damage = damage
newdart.nodamage = nodamage
newdart.damage_type = damage_type
if(pen)
newdart.pen = pen
pen.forceMove(newdart)
pen = null
newdart.update_icon()
/obj/item/projectile/bullet/reusable/foam_dart/Destroy()
pen = null
return ..()
/obj/item/projectile/bullet/reusable/foam_dart/riot
name = "riot foam dart"
icon_state = "foamdart_riot_proj"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
stamina = 25
/obj/item/projectile/bullet/reusable/foam_dart
name = "foam dart"
desc = "I hope you're wearing eye protection."
damage = 0 // It's a damn toy.
damage_type = OXY
nodamage = TRUE
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart_proj"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
range = 10
var/modified = FALSE
var/obj/item/pen/pen = null
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
if(dropped)
return
var/turf/T = get_turf(src)
dropped = 1
var/obj/item/ammo_casing/caseless/foam_dart/newcasing = new ammo_type(T)
newcasing.modified = modified
var/obj/item/projectile/bullet/reusable/foam_dart/newdart = newcasing.BB
newdart.modified = modified
newdart.damage = damage
newdart.nodamage = nodamage
newdart.damage_type = damage_type
if(pen)
newdart.pen = pen
pen.forceMove(newdart)
pen = null
newdart.update_icon()
/obj/item/projectile/bullet/reusable/foam_dart/Destroy()
pen = null
return ..()
/obj/item/projectile/bullet/reusable/foam_dart/riot
name = "riot foam dart"
icon_state = "foamdart_riot_proj"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
stamina = 25
@@ -1,6 +1,6 @@
/obj/item/projectile/bullet/reusable/magspear
name = "magnetic spear"
desc = "WHITE WHALE, HOLY GRAIL"
damage = 30 //takes 3 spears to kill a mega carp, one to kill a normal carp
icon_state = "magspear"
ammo_type = /obj/item/ammo_casing/caseless/magspear
/obj/item/projectile/bullet/reusable/magspear
name = "magnetic spear"
desc = "WHITE WHALE, HOLY GRAIL"
damage = 30 //takes 3 spears to kill a mega carp, one to kill a normal carp
icon_state = "magspear"
ammo_type = /obj/item/ammo_casing/caseless/magspear
@@ -1,52 +1,52 @@
/obj/effect/ebeam/curse_arm
name = "curse arm"
layer = LARGE_MOB_LAYER
/obj/item/projectile/curse_hand
name = "curse hand"
icon_state = "cursehand0"
hitsound = 'sound/effects/curse4.ogg'
layer = LARGE_MOB_LAYER
damage_type = BURN
damage = 10
knockdown = 20
speed = 2
range = 16
forcedodge = TRUE
var/datum/beam/arm
var/handedness = 0
/obj/item/projectile/curse_hand/Initialize(mapload)
. = ..()
handedness = prob(50)
icon_state = "cursehand[handedness]"
/obj/item/projectile/curse_hand/fire(setAngle)
if(starting)
arm = starting.Beam(src, icon_state = "curse[handedness]", time = INFINITY, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm)
..()
/obj/item/projectile/curse_hand/prehit(atom/target)
if(target == original)
forcedodge = FALSE
else if(!isturf(target))
return FALSE
return ..()
/obj/item/projectile/curse_hand/Destroy()
if(arm)
arm.End()
arm = null
if(forcedodge)
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
new/obj/effect/temp_visual/dir_setting/curse/hand(T, dir, handedness)
for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting)
qdel(G)
new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir)
var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm, beam_sleep_time = 1)
for(var/b in D.elements)
var/obj/effect/ebeam/B = b
animate(B, alpha = 0, time = 32)
return ..()
/obj/effect/ebeam/curse_arm
name = "curse arm"
layer = LARGE_MOB_LAYER
/obj/item/projectile/curse_hand
name = "curse hand"
icon_state = "cursehand0"
hitsound = 'sound/effects/curse4.ogg'
layer = LARGE_MOB_LAYER
damage_type = BURN
damage = 10
knockdown = 20
speed = 2
range = 16
forcedodge = TRUE
var/datum/beam/arm
var/handedness = 0
/obj/item/projectile/curse_hand/Initialize(mapload)
. = ..()
handedness = prob(50)
icon_state = "cursehand[handedness]"
/obj/item/projectile/curse_hand/fire(setAngle)
if(starting)
arm = starting.Beam(src, icon_state = "curse[handedness]", time = INFINITY, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm)
..()
/obj/item/projectile/curse_hand/prehit(atom/target)
if(target == original)
forcedodge = FALSE
else if(!isturf(target))
return FALSE
return ..()
/obj/item/projectile/curse_hand/Destroy()
if(arm)
arm.End()
arm = null
if(forcedodge)
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
new/obj/effect/temp_visual/dir_setting/curse/hand(T, dir, handedness)
for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting)
qdel(G)
new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir)
var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm, beam_sleep_time = 1)
for(var/b in D.elements)
var/obj/effect/ebeam/B = b
animate(B, alpha = 0, time = 32)
return ..()
@@ -1,25 +1,25 @@
/obj/item/projectile/energy/floramut
name = "alpha somatoray"
icon_state = "energy"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
/obj/item/projectile/energy/floramut/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.dna.species.id == "pod")
C.randmuti()
C.randmut()
C.updateappearance()
C.domutcheck()
/obj/item/projectile/energy/florayield
name = "beta somatoray"
icon_state = "energy2"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
/obj/item/projectile/energy/floramut
name = "alpha somatoray"
icon_state = "energy"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
/obj/item/projectile/energy/floramut/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.dna.species.id == "pod")
C.randmuti()
C.randmut()
C.updateappearance()
C.domutcheck()
/obj/item/projectile/energy/florayield
name = "beta somatoray"
icon_state = "energy2"
damage = 0
damage_type = TOX
nodamage = 1
flag = "energy"
@@ -1,90 +1,90 @@
/obj/item/projectile/gravityrepulse
name = "repulsion bolt"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#33CCFF"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravityrepulse/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/repulse/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravityrepulse/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src || (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(A, src)))
A.throw_at(throwtarget,power+1,1)
thrown_items[A] = A
for(var/turf/F in range(T,power))
new /obj/effect/temp_visual/gravpush(F)
/obj/item/projectile/gravityattract
name = "attraction bolt"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#FF6600"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravityattract/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/attract/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravityattract/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src || (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
A.throw_at(T, power+1, 1)
thrown_items[A] = A
for(var/turf/F in range(T,power))
new /obj/effect/temp_visual/gravpush(F)
/obj/item/projectile/gravitychaos
name = "gravitational blast"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#101010"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravitychaos/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/chaos/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravitychaos/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src|| (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
A.throw_at(get_edge_target_turf(A, pick(GLOB.cardinals)), power+1, 1)
thrown_items[A] = A
for(var/turf/Z in range(T,power))
new /obj/effect/temp_visual/gravpush(Z)
/obj/item/projectile/gravityrepulse
name = "repulsion bolt"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#33CCFF"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravityrepulse/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/repulse/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravityrepulse/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src || (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(A, src)))
A.throw_at(throwtarget,power+1,1)
thrown_items[A] = A
for(var/turf/F in range(T,power))
new /obj/effect/temp_visual/gravpush(F)
/obj/item/projectile/gravityattract
name = "attraction bolt"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#FF6600"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravityattract/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/attract/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravityattract/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src || (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
A.throw_at(T, power+1, 1)
thrown_items[A] = A
for(var/turf/F in range(T,power))
new /obj/effect/temp_visual/gravpush(F)
/obj/item/projectile/gravitychaos
name = "gravitational blast"
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
hitsound = 'sound/weapons/wave.ogg'
damage = 0
damage_type = BRUTE
nodamage = 1
color = "#101010"
var/turf/T
var/power = 4
var/list/thrown_items = list()
/obj/item/projectile/gravitychaos/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravity/chaos/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
/obj/item/projectile/gravitychaos/on_hit()
. = ..()
T = get_turf(src)
for(var/atom/movable/A in range(T, power))
if(A == src|| (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
A.throw_at(get_edge_target_turf(A, pick(GLOB.cardinals)), power+1, 1)
thrown_items[A] = A
for(var/turf/Z in range(T,power))
new /obj/effect/temp_visual/gravpush(Z)
@@ -1,230 +1,230 @@
/obj/item/projectile/hallucination
name = "bullet"
icon = null
icon_state = null
hitsound = ""
suppressed = TRUE
ricochets_max = 0
ricochet_chance = 0
damage = 0
nodamage = TRUE
projectile_type = /obj/item/projectile/hallucination
log_override = TRUE
var/hal_icon_state
var/image/fake_icon
var/mob/living/carbon/hal_target
var/hal_fire_sound
var/hal_hitsound
var/hal_hitsound_wall
var/hal_impact_effect
var/hal_impact_effect_wall
var/hit_duration
var/hit_duration_wall
/obj/item/projectile/hallucination/fire()
..()
fake_icon = image('icons/obj/projectiles.dmi', src, hal_icon_state, ABOVE_MOB_LAYER)
if(hal_target.client)
hal_target.client.images += fake_icon
/obj/item/projectile/hallucination/Destroy()
if(hal_target.client)
hal_target.client.images -= fake_icon
QDEL_NULL(fake_icon)
return ..()
/obj/item/projectile/hallucination/Bump(atom/A)
if(!ismob(A))
if(hal_hitsound_wall)
hal_target.playsound_local(loc, hal_hitsound_wall, 40, 1)
if(hal_impact_effect_wall)
spawn_hit(A, TRUE)
else if(A == hal_target)
if(hal_hitsound)
hal_target.playsound_local(A, hal_hitsound, 100, 1)
target_on_hit(A)
qdel(src)
return TRUE
/obj/item/projectile/hallucination/proc/target_on_hit(mob/M)
if(M == hal_target)
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
hal_apply_effect()
else if(M in view(hal_target))
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
if(damage_type == BRUTE)
var/splatter_dir = dir
if(starting)
splatter_dir = get_dir(starting, get_turf(M))
spawn_blood(M, splatter_dir)
else if(hal_impact_effect)
spawn_hit(M, FALSE)
/obj/item/projectile/hallucination/proc/spawn_blood(mob/M, set_dir)
set waitfor = 0
if(!hal_target.client)
return
var/splatter_icon_state
if(set_dir in GLOB.diagonals)
splatter_icon_state = "splatter[pick(1, 2, 6)]"
else
splatter_icon_state = "splatter[pick(3, 4, 5)]"
var/image/blood = image('icons/effects/blood.dmi', M, splatter_icon_state, ABOVE_MOB_LAYER)
var/target_pixel_x = 0
var/target_pixel_y = 0
switch(set_dir)
if(NORTH)
target_pixel_y = 16
if(SOUTH)
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(EAST)
target_pixel_x = 16
if(WEST)
target_pixel_x = -16
if(NORTHEAST)
target_pixel_x = 16
target_pixel_y = 16
if(NORTHWEST)
target_pixel_x = -16
target_pixel_y = 16
if(SOUTHEAST)
target_pixel_x = 16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(SOUTHWEST)
target_pixel_x = -16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
hal_target.client.images += blood
animate(blood, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = 5)
addtimer(CALLBACK(src, .proc/cleanup_blood), 5)
/obj/item/projectile/hallucination/proc/cleanup_blood(image/blood)
hal_target.client.images -= blood
qdel(blood)
/obj/item/projectile/hallucination/proc/spawn_hit(atom/A, is_wall)
set waitfor = 0
if(!hal_target.client)
return
var/image/hit_effect = image('icons/effects/blood.dmi', A, is_wall ? hal_impact_effect_wall : hal_impact_effect, ABOVE_MOB_LAYER)
hit_effect.pixel_x = A.pixel_x + rand(-4,4)
hit_effect.pixel_y = A.pixel_y + rand(-4,4)
hal_target.client.images += hit_effect
sleep(is_wall ? hit_duration_wall : hit_duration)
hal_target.client.images -= hit_effect
qdel(hit_effect)
/obj/item/projectile/hallucination/proc/hal_apply_effect()
return
/obj/item/projectile/hallucination/bullet
name = "bullet"
hal_icon_state = "bullet"
hal_fire_sound = "gunshot"
hal_hitsound = 'sound/weapons/pierce.ogg'
hal_hitsound_wall = "ricochet"
hal_impact_effect = "impact_bullet"
hal_impact_effect_wall = "impact_bullet"
hit_duration = 5
hit_duration_wall = 5
/obj/item/projectile/hallucination/bullet/hal_apply_effect()
hal_target.adjustStaminaLoss(60)
/obj/item/projectile/hallucination/laser
name = "laser"
damage_type = BURN
hal_icon_state = "laser"
hal_fire_sound = 'sound/weapons/laser.ogg'
hal_hitsound = 'sound/weapons/sear.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser"
hal_impact_effect_wall = "impact_laser_wall"
hit_duration = 4
hit_duration_wall = 10
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/laser/hal_apply_effect()
hal_target.adjustStaminaLoss(20)
hal_target.blur_eyes(2)
/obj/item/projectile/hallucination/taser
name = "electrode"
damage_type = BURN
hal_icon_state = "spark"
color = "#FFFF00"
hal_fire_sound = 'sound/weapons/taser.ogg'
hal_hitsound = 'sound/weapons/taserhit.ogg'
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/taser/hal_apply_effect()
hal_target.DefaultCombatKnockdown(100)
hal_target.stuttering += 20
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((hal_target.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(hal_target, TRAIT_STUNIMMUNE))
addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5)
/obj/item/projectile/hallucination/disabler
name = "disabler beam"
damage_type = STAMINA
hal_icon_state = "omnilaser"
hal_fire_sound = 'sound/weapons/taser2.ogg'
hal_hitsound = 'sound/weapons/tap.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser_blue"
hal_impact_effect_wall = null
hit_duration = 4
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/disabler/hal_apply_effect()
hal_target.adjustStaminaLoss(25)
/obj/item/projectile/hallucination/ebow
name = "bolt"
damage_type = TOX
hal_icon_state = "cbbolt"
hal_fire_sound = 'sound/weapons/genhit.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/ebow/hal_apply_effect()
hal_target.DefaultCombatKnockdown(100)
hal_target.stuttering += 5
hal_target.adjustStaminaLoss(8)
/obj/item/projectile/hallucination/change
name = "bolt of change"
damage_type = BURN
hal_icon_state = "ice_1"
hal_fire_sound = 'sound/magic/staff_change.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/change/hal_apply_effect()
new /datum/hallucination/self_delusion(hal_target, TRUE, wabbajack = FALSE)
/obj/item/projectile/hallucination/death
name = "bolt of death"
damage_type = BURN
hal_icon_state = "pulse1_bl"
hal_fire_sound = 'sound/magic/wandodeath.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/death/hal_apply_effect()
new /datum/hallucination/death(hal_target, TRUE)
/obj/item/projectile/hallucination
name = "bullet"
icon = null
icon_state = null
hitsound = ""
suppressed = TRUE
ricochets_max = 0
ricochet_chance = 0
damage = 0
nodamage = TRUE
projectile_type = /obj/item/projectile/hallucination
log_override = TRUE
var/hal_icon_state
var/image/fake_icon
var/mob/living/carbon/hal_target
var/hal_fire_sound
var/hal_hitsound
var/hal_hitsound_wall
var/hal_impact_effect
var/hal_impact_effect_wall
var/hit_duration
var/hit_duration_wall
/obj/item/projectile/hallucination/fire()
..()
fake_icon = image('icons/obj/projectiles.dmi', src, hal_icon_state, ABOVE_MOB_LAYER)
if(hal_target.client)
hal_target.client.images += fake_icon
/obj/item/projectile/hallucination/Destroy()
if(hal_target.client)
hal_target.client.images -= fake_icon
QDEL_NULL(fake_icon)
return ..()
/obj/item/projectile/hallucination/Bump(atom/A)
if(!ismob(A))
if(hal_hitsound_wall)
hal_target.playsound_local(loc, hal_hitsound_wall, 40, 1)
if(hal_impact_effect_wall)
spawn_hit(A, TRUE)
else if(A == hal_target)
if(hal_hitsound)
hal_target.playsound_local(A, hal_hitsound, 100, 1)
target_on_hit(A)
qdel(src)
return TRUE
/obj/item/projectile/hallucination/proc/target_on_hit(mob/M)
if(M == hal_target)
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
hal_apply_effect()
else if(M in view(hal_target))
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
if(damage_type == BRUTE)
var/splatter_dir = dir
if(starting)
splatter_dir = get_dir(starting, get_turf(M))
spawn_blood(M, splatter_dir)
else if(hal_impact_effect)
spawn_hit(M, FALSE)
/obj/item/projectile/hallucination/proc/spawn_blood(mob/M, set_dir)
set waitfor = 0
if(!hal_target.client)
return
var/splatter_icon_state
if(set_dir in GLOB.diagonals)
splatter_icon_state = "splatter[pick(1, 2, 6)]"
else
splatter_icon_state = "splatter[pick(3, 4, 5)]"
var/image/blood = image('icons/effects/blood.dmi', M, splatter_icon_state, ABOVE_MOB_LAYER)
var/target_pixel_x = 0
var/target_pixel_y = 0
switch(set_dir)
if(NORTH)
target_pixel_y = 16
if(SOUTH)
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(EAST)
target_pixel_x = 16
if(WEST)
target_pixel_x = -16
if(NORTHEAST)
target_pixel_x = 16
target_pixel_y = 16
if(NORTHWEST)
target_pixel_x = -16
target_pixel_y = 16
if(SOUTHEAST)
target_pixel_x = 16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(SOUTHWEST)
target_pixel_x = -16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
hal_target.client.images += blood
animate(blood, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = 5)
addtimer(CALLBACK(src, .proc/cleanup_blood), 5)
/obj/item/projectile/hallucination/proc/cleanup_blood(image/blood)
hal_target.client.images -= blood
qdel(blood)
/obj/item/projectile/hallucination/proc/spawn_hit(atom/A, is_wall)
set waitfor = 0
if(!hal_target.client)
return
var/image/hit_effect = image('icons/effects/blood.dmi', A, is_wall ? hal_impact_effect_wall : hal_impact_effect, ABOVE_MOB_LAYER)
hit_effect.pixel_x = A.pixel_x + rand(-4,4)
hit_effect.pixel_y = A.pixel_y + rand(-4,4)
hal_target.client.images += hit_effect
sleep(is_wall ? hit_duration_wall : hit_duration)
hal_target.client.images -= hit_effect
qdel(hit_effect)
/obj/item/projectile/hallucination/proc/hal_apply_effect()
return
/obj/item/projectile/hallucination/bullet
name = "bullet"
hal_icon_state = "bullet"
hal_fire_sound = "gunshot"
hal_hitsound = 'sound/weapons/pierce.ogg'
hal_hitsound_wall = "ricochet"
hal_impact_effect = "impact_bullet"
hal_impact_effect_wall = "impact_bullet"
hit_duration = 5
hit_duration_wall = 5
/obj/item/projectile/hallucination/bullet/hal_apply_effect()
hal_target.adjustStaminaLoss(60)
/obj/item/projectile/hallucination/laser
name = "laser"
damage_type = BURN
hal_icon_state = "laser"
hal_fire_sound = 'sound/weapons/laser.ogg'
hal_hitsound = 'sound/weapons/sear.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser"
hal_impact_effect_wall = "impact_laser_wall"
hit_duration = 4
hit_duration_wall = 10
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/laser/hal_apply_effect()
hal_target.adjustStaminaLoss(20)
hal_target.blur_eyes(2)
/obj/item/projectile/hallucination/taser
name = "electrode"
damage_type = BURN
hal_icon_state = "spark"
color = "#FFFF00"
hal_fire_sound = 'sound/weapons/taser.ogg'
hal_hitsound = 'sound/weapons/taserhit.ogg'
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/taser/hal_apply_effect()
hal_target.DefaultCombatKnockdown(100)
hal_target.stuttering += 20
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((hal_target.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(hal_target, TRAIT_STUNIMMUNE))
addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5)
/obj/item/projectile/hallucination/disabler
name = "disabler beam"
damage_type = STAMINA
hal_icon_state = "omnilaser"
hal_fire_sound = 'sound/weapons/taser2.ogg'
hal_hitsound = 'sound/weapons/tap.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser_blue"
hal_impact_effect_wall = null
hit_duration = 4
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/disabler/hal_apply_effect()
hal_target.adjustStaminaLoss(25)
/obj/item/projectile/hallucination/ebow
name = "bolt"
damage_type = TOX
hal_icon_state = "cbbolt"
hal_fire_sound = 'sound/weapons/genhit.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/ebow/hal_apply_effect()
hal_target.DefaultCombatKnockdown(100)
hal_target.stuttering += 5
hal_target.adjustStaminaLoss(8)
/obj/item/projectile/hallucination/change
name = "bolt of change"
damage_type = BURN
hal_icon_state = "ice_1"
hal_fire_sound = 'sound/magic/staff_change.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/change/hal_apply_effect()
new /datum/hallucination/self_delusion(hal_target, TRUE, wabbajack = FALSE)
/obj/item/projectile/hallucination/death
name = "bolt of death"
damage_type = BURN
hal_icon_state = "pulse1_bl"
hal_fire_sound = 'sound/magic/wandodeath.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/death/hal_apply_effect()
new /datum/hallucination/death(hal_target, TRUE)
@@ -1,20 +1,20 @@
/obj/item/projectile/ion
name = "ion bolt"
icon_state = "ion"
damage = 0
damage_type = BURN
nodamage = 1
flag = "energy"
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
/obj/item/projectile/ion/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 1, 1)
return TRUE
/obj/item/projectile/ion/weak
/obj/item/projectile/ion/weak/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 0, 0)
return TRUE
/obj/item/projectile/ion
name = "ion bolt"
icon_state = "ion"
damage = 0
damage_type = BURN
nodamage = 1
flag = "energy"
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
/obj/item/projectile/ion/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 1, 1)
return TRUE
/obj/item/projectile/ion/weak
/obj/item/projectile/ion/weak/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 0, 0)
return TRUE
@@ -1,19 +1,19 @@
/obj/item/projectile/meteor
name = "meteor"
icon = 'icons/obj/meteor.dmi'
icon_state = "small1"
damage = 0
damage_type = BRUTE
nodamage = 1
flag = "bullet"
/obj/item/projectile/meteor/Bump(atom/A)
if(A == firer)
forceMove(A.loc)
return
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in urange(10, src))
if(!M.stat)
shake_camera(M, 3, 1)
qdel(src)
/obj/item/projectile/meteor
name = "meteor"
icon = 'icons/obj/meteor.dmi'
icon_state = "small1"
damage = 0
damage_type = BRUTE
nodamage = 1
flag = "bullet"
/obj/item/projectile/meteor/Bump(atom/A)
if(A == firer)
forceMove(A.loc)
return
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in urange(10, src))
if(!M.stat)
shake_camera(M, 3, 1)
qdel(src)
@@ -1,9 +1,9 @@
/obj/item/projectile/beam/mindflayer
name = "flayer ray"
/obj/item/projectile/beam/mindflayer/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
M.hallucination += 30
/obj/item/projectile/beam/mindflayer
name = "flayer ray"
/obj/item/projectile/beam/mindflayer/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
M.hallucination += 30
@@ -1,14 +1,14 @@
/obj/item/projectile/bullet/neurotoxin
name = "neurotoxin spit"
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
if(isalien(target))
knockdown = 0
nodamage = TRUE
else if(iscarbon(target))
var/mob/living/L = target
L.DefaultCombatKnockdown(100, TRUE, FALSE, 30, 25)
return ..()
/obj/item/projectile/bullet/neurotoxin
name = "neurotoxin spit"
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
if(isalien(target))
knockdown = 0
nodamage = TRUE
else if(iscarbon(target))
var/mob/living/L = target
L.DefaultCombatKnockdown(100, TRUE, FALSE, 30, 25)
return ..()
@@ -1,49 +1,55 @@
/obj/item/projectile/plasma
name = "plasma blast"
icon_state = "plasmacutter"
damage_type = BRUTE
damage = 20
range = 4
dismemberment = 20
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
var/pressure_decrease_active = FALSE
var/pressure_decrease = 0.25
var/mine_range = 3 //mines this many additional tiles of rock
tracer_type = /obj/effect/projectile/tracer/plasma_cutter
muzzle_type = /obj/effect/projectile/muzzle/plasma_cutter
impact_type = /obj/effect/projectile/impact/plasma_cutter
/obj/item/projectile/plasma/Initialize()
. = ..()
if(!lavaland_equipment_pressure_check(get_turf(src)))
name = "weakened [name]"
damage = damage * pressure_decrease
pressure_decrease_active = TRUE
/obj/item/projectile/plasma/on_hit(atom/target)
. = ..()
if(ismineralturf(target))
var/turf/closed/mineral/M = target
M.gets_drilled(firer)
if(mine_range)
mine_range--
range++
if(range > 0)
return -1
/obj/item/projectile/plasma/adv
damage = 28
range = 5
mine_range = 5
/obj/item/projectile/plasma/adv/mech
damage = 40
range = 9
mine_range = 3
/obj/item/projectile/plasma/turret
//Between normal and advanced for damage, made a beam so not the turret does not destroy glass
name = "plasma beam"
damage = 24
range = 7
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/plasma
name = "plasma blast"
icon_state = "plasmacutter"
damage_type = BRUTE
damage = 20
range = 4
dismemberment = 20
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
var/pressure_decrease_active = FALSE
var/pressure_decrease = 0.25
var/mine_range = 3 //mines this many additional tiles of rock
tracer_type = /obj/effect/projectile/tracer/plasma_cutter
muzzle_type = /obj/effect/projectile/muzzle/plasma_cutter
impact_type = /obj/effect/projectile/impact/plasma_cutter
/obj/item/projectile/plasma/Initialize()
. = ..()
if(!lavaland_equipment_pressure_check(get_turf(src)))
name = "weakened [name]"
damage = damage * pressure_decrease
pressure_decrease_active = TRUE
/obj/item/projectile/plasma/on_hit(atom/target)
. = ..()
if(ismineralturf(target))
var/turf/closed/mineral/M = target
M.gets_drilled(firer)
if(mine_range)
mine_range--
range++
if(range > 0)
return -1
/obj/item/projectile/plasma/adv
damage = 28
range = 5
mine_range = 5
/obj/item/projectile/plasma/adv/mech
damage = 40
range = 9
mine_range = 3
/obj/item/projectile/plasma/turret
//Between normal and advanced for damage, made a beam so not the turret does not destroy glass
name = "plasma beam"
damage = 24
range = 7
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/plasma/weak
dismemberment = 0
damage = 10
range = 4
mine_range = 0
@@ -1,46 +1,46 @@
/obj/item/projectile/bullet/gyro
name ="explosive bolt"
icon_state= "bolter"
damage = 50
/obj/item/projectile/bullet/gyro/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2)
return TRUE
/obj/item/projectile/bullet/a84mm
name ="\improper HEDP rocket"
desc = "USE A WEEL GUN"
icon_state= "84mm-hedp"
damage = 80
var/anti_armour_damage = 200
armour_penetration = 100
dismemberment = 100
ricochets_max = 0
/obj/item/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 1, 3, 1, 0, flame_range = 4)
if(ismecha(target))
var/obj/mecha/M = target
M.take_damage(anti_armour_damage)
if(issilicon(target))
var/mob/living/silicon/S = target
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
return TRUE
/obj/item/projectile/bullet/a84mm_he
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
damage = 30
ricochets_max = 0 //it's a MISSILE
/obj/item/projectile/bullet/a84mm_he/on_hit(atom/target, blocked=0)
..()
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
/obj/item/projectile/bullet/gyro
name ="explosive bolt"
icon_state= "bolter"
damage = 50
/obj/item/projectile/bullet/gyro/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2)
return TRUE
/obj/item/projectile/bullet/a84mm
name ="\improper HEDP rocket"
desc = "USE A WEEL GUN"
icon_state= "84mm-hedp"
damage = 80
var/anti_armour_damage = 200
armour_penetration = 100
dismemberment = 100
ricochets_max = 0
/obj/item/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 1, 3, 1, 0, flame_range = 4)
if(ismecha(target))
var/obj/mecha/M = target
M.take_damage(anti_armour_damage)
if(issilicon(target))
var/mob/living/silicon/S = target
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
return TRUE
/obj/item/projectile/bullet/a84mm_he
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
damage = 30
ricochets_max = 0 //it's a MISSILE
/obj/item/projectile/bullet/a84mm_he/on_hit(atom/target, blocked=0)
..()
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
return TRUE
@@ -1,18 +1,18 @@
/obj/item/projectile/temp
name = "freeze beam"
icon_state = "ice_2"
damage = 0
damage_type = BURN
nodamage = FALSE
flag = "energy"
var/temperature = 100
/obj/item/projectile/temp/on_hit(atom/target, blocked = 0)
. = ..()
if(isliving(target))
var/mob/living/L = target
L.adjust_bodytemperature(((100-blocked)/100)*(temperature - L.bodytemperature)) // the new body temperature is adjusted by 100-blocked % of the delta between body temperature and the bullet's effect temperature
/obj/item/projectile/temp/hot
name = "heat beam"
temperature = 400
/obj/item/projectile/temp
name = "freeze beam"
icon_state = "ice_2"
damage = 0
damage_type = BURN
nodamage = FALSE
flag = "energy"
var/temperature = 100
/obj/item/projectile/temp/on_hit(atom/target, blocked = 0)
. = ..()
if(isliving(target))
var/mob/living/L = target
L.adjust_bodytemperature(((100-blocked)/100)*(temperature - L.bodytemperature)) // the new body temperature is adjusted by 100-blocked % of the delta between body temperature and the bullet's effect temperature
/obj/item/projectile/temp/hot
name = "heat beam"
temperature = 400
@@ -1,29 +1,29 @@
/obj/item/projectile/beam/wormhole
name = "bluespace beam"
icon_state = "spark"
hitsound = "sparks"
damage = 0
nodamage = TRUE
pass_flags = PASSGLASS | PASSTABLE | PASSGRILLE | PASSMOB
var/obj/item/gun/energy/wormhole_projector/gun
color = "#33CCFF"
tracer_type = /obj/effect/projectile/tracer/wormhole
impact_type = /obj/effect/projectile/impact/wormhole
muzzle_type = /obj/effect/projectile/muzzle/wormhole
hitscan = TRUE
/obj/item/projectile/beam/wormhole/orange
name = "orange bluespace beam"
color = "#FF6600"
/obj/item/projectile/beam/wormhole/Initialize(mapload, obj/item/ammo_casing/energy/wormhole/casing)
. = ..()
if(casing)
gun = casing.gun
/obj/item/projectile/beam/wormhole/on_hit(atom/target)
if(!gun)
qdel(src)
return
gun.create_portal(src, get_turf(src))
/obj/item/projectile/beam/wormhole
name = "bluespace beam"
icon_state = "spark"
hitsound = "sparks"
damage = 0
nodamage = TRUE
pass_flags = PASSGLASS | PASSTABLE | PASSGRILLE | PASSMOB
var/obj/item/gun/energy/wormhole_projector/gun
color = "#33CCFF"
tracer_type = /obj/effect/projectile/tracer/wormhole
impact_type = /obj/effect/projectile/impact/wormhole
muzzle_type = /obj/effect/projectile/muzzle/wormhole
hitscan = TRUE
/obj/item/projectile/beam/wormhole/orange
name = "orange bluespace beam"
color = "#FF6600"
/obj/item/projectile/beam/wormhole/Initialize(mapload, obj/item/ammo_casing/energy/wormhole/casing)
. = ..()
if(casing)
gun = casing.gun
/obj/item/projectile/beam/wormhole/on_hit(atom/target)
if(!gun)
qdel(src)
return
gun.create_portal(src, get_turf(src))