@@ -1,60 +1,60 @@
|
||||
/obj/item/ammo_casing
|
||||
name = "bullet casing"
|
||||
desc = "A bullet casing."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
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.
|
||||
/obj/item/ammo_casing
|
||||
name = "bullet casing"
|
||||
desc = "A bullet casing."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
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.
|
||||
|
||||
|
||||
/obj/item/ammo_casing/New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/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/New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/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 ..()
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
icon_state = "sleeper"
|
||||
|
||||
/obj/item/ammo_casing/haemorrhage
|
||||
desc = "A .50 bullet casing, specialised in causing massive bloodloss"
|
||||
desc = "A .50 bullet casing, specialised in causing massive bloodloss."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/haemorrhage
|
||||
icon_state = ".50"
|
||||
@@ -149,7 +149,7 @@
|
||||
projectile_type = /obj/item/projectile/bullet/saw
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/bleeding
|
||||
desc = "A 1.95x129mm bullet casing with specialized inner-casing, that when it makes contact with a target, release tiny shrapnel to induce internal bleeding."
|
||||
desc = "A 1.95x129mm bullet casing with specialized inner-casing, that when it makes contact with a target, releases tiny shrapnel to induce internal bleeding."
|
||||
icon_state = "762-casing"
|
||||
projectile_type = /obj/item/projectile/bullet/saw/bleeding
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
/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 splot the pulse into a spread of individually weaker bolts."
|
||||
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
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
caliber = "laser"
|
||||
icon_state = "s-casing-live"
|
||||
projectile_type = /obj/item/projectile/beam
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
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
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart
|
||||
name = "foam dart"
|
||||
desc = "Its nerf or nothing! Ages 8 and up."
|
||||
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'
|
||||
@@ -66,12 +66,12 @@
|
||||
..()
|
||||
if (modified)
|
||||
icon_state = "foamdart_empty"
|
||||
desc = "Its nerf or nothing! ... Although, this one doesn't look too safe."
|
||||
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 = "Its nerf or nothing! Ages 8 and up."
|
||||
desc = "It's nerf or nothing! Ages 8 and up."
|
||||
if(BB)
|
||||
BB.icon_state = initial(BB.icon_state)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
modified = 1
|
||||
FD.modified = 1
|
||||
FD.damage_type = BRUTE
|
||||
to_chat(user, "<span class='notice'>You pop the safety cap off of [src].</span>")
|
||||
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
|
||||
update_icon()
|
||||
else if (istype(A, /obj/item/weapon/pen))
|
||||
if(modified)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
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'
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/ammo_casing/energy/chameleon
|
||||
@@ -99,7 +99,7 @@
|
||||
/obj/item/ammo_casing/energy/ion
|
||||
projectile_type = /obj/item/projectile/ion
|
||||
select_name = "ion"
|
||||
fire_sound = 'sound/weapons/IonRifle.ogg'
|
||||
fire_sound = 'sound/weapons/ionrifle.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/declone
|
||||
projectile_type = /obj/item/projectile/energy/declone
|
||||
@@ -109,7 +109,7 @@
|
||||
/obj/item/ammo_casing/energy/mindflayer
|
||||
projectile_type = /obj/item/projectile/beam/mindflayer
|
||||
select_name = "MINDFUCK"
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/flora
|
||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||
@@ -169,7 +169,7 @@
|
||||
projectile_type = /obj/item/projectile/energy/bolt
|
||||
select_name = "bolt"
|
||||
e_cost = 500
|
||||
fire_sound = 'sound/weapons/Genhit.ogg'
|
||||
fire_sound = 'sound/weapons/genhit.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/bolt/halloween
|
||||
projectile_type = /obj/item/projectile/energy/bolt/halloween
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
else
|
||||
icon_state = "75-0"
|
||||
|
||||
|
||||
/obj/item/ammo_box/magazine/m10mm/fire
|
||||
name = "pistol magazine (10mm incendiary)"
|
||||
icon_state = "9x19pI"
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
var/weapon_weight = WEAPON_LIGHT
|
||||
var/spread = 0 //Spread induced by the gun itself.
|
||||
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
|
||||
var/unique_reskin = 0 //allows one-time reskinning
|
||||
var/current_skin = null //the skin choice if we had a reskin
|
||||
var/list/options = list()
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
@@ -65,9 +62,9 @@
|
||||
var/zoomable = FALSE //whether the gun generates a Zoom action on creation
|
||||
var/zoomed = FALSE //Zoom toggle
|
||||
var/zoom_amt = 3 //Distance in TURFs to move the user's screen forward (the "zoom" effect)
|
||||
var/zoom_out_amt = 0
|
||||
var/datum/action/toggle_scope_zoom/azoom
|
||||
|
||||
|
||||
/obj/item/weapon/gun/Initialize()
|
||||
. = ..()
|
||||
if(pin)
|
||||
@@ -93,8 +90,6 @@
|
||||
to_chat(user, "It has [pin] installed.")
|
||||
else
|
||||
to_chat(user, "It doesn't have a firing pin installed, and won't fire.")
|
||||
if(unique_reskin && !current_skin)
|
||||
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
|
||||
|
||||
//called after the gun has successfully fired its chambered ammo.
|
||||
/obj/item/weapon/gun/proc/process_chamber()
|
||||
@@ -400,26 +395,6 @@
|
||||
if(alight)
|
||||
alight.Remove(user)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(unique_reskin && !current_skin && loc == user)
|
||||
reskin_gun(user)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/proc/reskin_gun(mob/M)
|
||||
var/choice = input(M,"Warning, you can only reskin your weapon once!","Reskin Gun") in options
|
||||
|
||||
if(src && choice && !current_skin && !M.incapacitated() && in_range(M,src))
|
||||
if(options[choice] == null)
|
||||
return
|
||||
current_skin = options[choice]
|
||||
to_chat(M, "Your gun is now skinned as [choice]. Say hello to your new friend.")
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
return
|
||||
@@ -465,7 +440,7 @@
|
||||
|
||||
/datum/action/toggle_scope_zoom
|
||||
name = "Toggle Scope"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING
|
||||
button_icon_state = "sniper_zoom"
|
||||
var/obj/item/weapon/gun/gun = null
|
||||
|
||||
@@ -507,12 +482,14 @@
|
||||
if(WEST)
|
||||
_x = -zoom_amt
|
||||
|
||||
user.client.view = zoom_out_amt
|
||||
user.client.pixel_x = world.icon_size*_x
|
||||
user.client.pixel_y = world.icon_size*_y
|
||||
else
|
||||
user.client.view = world.view
|
||||
user.client.pixel_x = 0
|
||||
user.client.pixel_y = 0
|
||||
|
||||
return zoomed
|
||||
|
||||
//Proc, so that gun accessories/scopes/etc. can easily add zooming.
|
||||
/obj/item/weapon/gun/proc/build_zooming()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
suppressed = A
|
||||
S.oldsound = fire_sound
|
||||
S.initial_w_class = w_class
|
||||
fire_sound = 'sound/weapons/Gunshot_silenced.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
|
||||
w_class = WEIGHT_CLASS_NORMAL //so pistols do not fit in pockets when suppressed
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
item_state = "c20r"
|
||||
origin_tech = "combat=5;materials=2;syndicate=6"
|
||||
mag_type = /obj/item/ammo_box/magazine/smgm45
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
fire_delay = 2
|
||||
burst_size = 2
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
@@ -142,7 +142,7 @@
|
||||
item_state = "m90"
|
||||
origin_tech = "combat=5;materials=2;syndicate=6"
|
||||
mag_type = /obj/item/ammo_box/magazine/m556
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
var/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/underbarrel
|
||||
burst_size = 3
|
||||
@@ -216,7 +216,7 @@
|
||||
slot_flags = 0
|
||||
origin_tech = "combat=5;materials=1;syndicate=3"
|
||||
mag_type = /obj/item/ammo_box/magazine/tommygunm45
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
burst_size = 4
|
||||
fire_delay = 1
|
||||
@@ -229,13 +229,11 @@
|
||||
slot_flags = 0
|
||||
origin_tech = "combat=6;engineering=4"
|
||||
mag_type = /obj/item/ammo_box/magazine/m556
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
burst_size = 3
|
||||
fire_delay = 1
|
||||
|
||||
|
||||
|
||||
// Bulldog shotgun //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog
|
||||
@@ -247,7 +245,7 @@
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
origin_tech = "combat=6;materials=4;syndicate=6"
|
||||
mag_type = /obj/item/ammo_box/magazine/m12g
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
can_suppress = 0
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
@@ -286,7 +284,7 @@
|
||||
origin_tech = "combat=6;engineering=3;syndicate=6"
|
||||
mag_type = /obj/item/ammo_box/magazine/mm195x129
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
var/cover_open = 0
|
||||
can_suppress = 0
|
||||
burst_size = 3
|
||||
@@ -409,6 +407,7 @@
|
||||
else
|
||||
icon_state = "surplus-e"
|
||||
|
||||
|
||||
// Laser rifle (rechargeable magazine) //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser
|
||||
@@ -421,7 +420,7 @@
|
||||
can_suppress = 0
|
||||
burst_size = 0
|
||||
actions_types = list()
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser/update_icon()
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
automatic = 0
|
||||
fire_delay = 1
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/minigun
|
||||
casing_ejector = 0
|
||||
var/obj/item/weapon/minigunpack/ammo_pack
|
||||
|
||||
@@ -92,17 +92,13 @@
|
||||
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
|
||||
icon_state = "detective"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||
unique_rename = 1
|
||||
unique_reskin = 1
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/detective/Initialize()
|
||||
. = ..()
|
||||
options["Default"] = "detective"
|
||||
options["Leopard Spots"] = "detective_leopard"
|
||||
options["Black Panther"] = "detective_panther"
|
||||
options["Gold Trim"] = "detective_gold"
|
||||
options["The Peacemaker"] = "detective_peacemaker"
|
||||
options["Cancel"] = null
|
||||
unique_rename = TRUE
|
||||
unique_reskin = list("Default" = "detective",
|
||||
"Leopard Spots" = "detective_leopard",
|
||||
"Black Panther" = "detective_panther",
|
||||
"Gold Trim" = "detective_gold",
|
||||
"The Peacemaker" = "detective_peacemaker"
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
|
||||
if(magazine.caliber != initial(magazine.caliber))
|
||||
@@ -269,18 +265,14 @@
|
||||
slot_flags = SLOT_BACK
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
|
||||
sawn_desc = "Omar's coming!"
|
||||
unique_rename = 1
|
||||
unique_reskin = 1
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/Initialize()
|
||||
. = ..()
|
||||
options["Default"] = "dshotgun"
|
||||
options["Dark Red Finish"] = "dshotgun-d"
|
||||
options["Ash"] = "dshotgun-f"
|
||||
options["Faded Grey"] = "dshotgun-g"
|
||||
options["Maple"] = "dshotgun-l"
|
||||
options["Rosewood"] = "dshotgun-p"
|
||||
options["Cancel"] = null
|
||||
unique_rename = TRUE
|
||||
unique_reskin = list("Default" = "dshotgun",
|
||||
"Dark Red Finish" = "dshotgun-d",
|
||||
"Ash" = "dshotgun-f",
|
||||
"Faded Grey" = "dshotgun-g",
|
||||
"Maple" = "dshotgun-1",
|
||||
"Rosewood" = "dshotgun-p"
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
@@ -319,9 +311,9 @@
|
||||
slot_flags = null
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
unique_rename = 0
|
||||
unique_reskin = 0
|
||||
var/slung = 0
|
||||
unique_rename = FALSE
|
||||
unique_reskin = null
|
||||
var/slung = FALSE
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
@@ -330,7 +322,7 @@
|
||||
if(C.use(10))
|
||||
slot_flags = SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
|
||||
slung = 1
|
||||
slung = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
|
||||
@@ -356,6 +348,7 @@
|
||||
sawn_state = SAWN_OFF
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
|
||||
clumsy_check = 0
|
||||
|
||||
@@ -366,4 +359,4 @@
|
||||
user.visible_message("<span class='warning'>[user] somehow manages to shoot [user.p_them()]self in the face!</span>", "<span class='userdanger'>You somehow shoot yourself in the face! How the hell?!</span>")
|
||||
user.emote("scream")
|
||||
user.drop_item()
|
||||
user.Weaken(4)
|
||||
user.Knockdown(80)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "saber"
|
||||
item_state = "gun"
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/smg
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
force = 0
|
||||
throwforce = 0
|
||||
burst_size = 3
|
||||
@@ -23,7 +23,7 @@
|
||||
icon_state = "pistol"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/pistol
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle
|
||||
name = "particle acceleration rifle"
|
||||
desc = "An energy-based anti material marksman rifle that uses highly charged particle beams moving at extreme velocities to decimate whatever is unfortunate enough to be targetted by one. \
|
||||
<span class='boldnotice'>Hold down left click while scoped to aim, when weapon is fully aimed (Tracer goes from red to green as it charges), release to fire. Moving while aiming or \
|
||||
changing where you're pointing at while aiming will delay the aiming process depending on how much you changed.</span>"
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
icon_state = "esniper"
|
||||
item_state = "esniper"
|
||||
fire_sound = 'sound/weapons/beam_sniper.ogg'
|
||||
slot_flags = SLOT_BACK
|
||||
force = 15
|
||||
materials = list()
|
||||
origin_tech = ""
|
||||
recoil = 5
|
||||
ammo_x_offset = 3
|
||||
ammo_y_offset = 3
|
||||
modifystate = FALSE
|
||||
zoomable = TRUE
|
||||
zoom_amt = 17
|
||||
zoom_out_amt = 20
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/beam_rifle/hitscan)
|
||||
var/hipfire_inaccuracy = 2
|
||||
var/hipfire_recoil = 10
|
||||
var/scoped_inaccuracy = 0
|
||||
var/scoped_recoil = 3
|
||||
var/scoped = FALSE
|
||||
var/noscope = FALSE //Can you fire this without a scope?
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/beam_rifle
|
||||
canMouseDown = TRUE
|
||||
pin = null
|
||||
var/aiming = FALSE
|
||||
var/aiming_time = 7
|
||||
var/aiming_time_fire_threshold = 2
|
||||
var/aiming_time_left = 7
|
||||
var/aiming_time_increase_user_movement = 3
|
||||
var/scoped_slow = 1
|
||||
var/aiming_time_increase_angle_multiplier = 0.6
|
||||
|
||||
var/lastangle = 0
|
||||
var/mob/current_user = null
|
||||
var/list/obj/effect/temp_visual/current_tracers = list()
|
||||
|
||||
var/structure_piercing = 2 //This doesn't always work!
|
||||
var/structure_bleed_coeff = 0.7
|
||||
var/wall_pierce_amount = 0
|
||||
var/wall_devastate = 0
|
||||
var/aoe_structure_range = 1
|
||||
var/aoe_structure_damage = 50
|
||||
var/aoe_fire_range = 2
|
||||
var/aoe_fire_chance = 40
|
||||
var/aoe_mob_range = 1
|
||||
var/aoe_mob_damage = 30
|
||||
var/impact_structure_damage = 60
|
||||
var/projectile_damage = 30
|
||||
var/projectile_stun = 0
|
||||
var/projectile_setting_pierce = TRUE
|
||||
var/delay = 65
|
||||
var/lastfire = 0
|
||||
|
||||
var/static/image/charged_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_charged")
|
||||
var/static/image/drained_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_empty")
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/debug
|
||||
delay = 0
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/infinite
|
||||
aiming_time = 0
|
||||
recoil = 0
|
||||
scoped_recoil = 0
|
||||
hipfire_recoil = 0
|
||||
hipfire_inaccuracy = 0
|
||||
scoped_inaccuracy = 0
|
||||
noscope = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/update_icon()
|
||||
cut_overlays()
|
||||
var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1]
|
||||
if(cell.charge > primary_ammo.e_cost)
|
||||
add_overlay(charged_overlay)
|
||||
else
|
||||
add_overlay(drained_overlay)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/attack_self(mob/user)
|
||||
projectile_setting_pierce = !projectile_setting_pierce
|
||||
to_chat(user, "<span class='boldnotice'>You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode.</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/update_slowdown()
|
||||
if(scoped)
|
||||
slowdown = scoped_slow
|
||||
else
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/zoom(user, forced_zoom)
|
||||
. = ..()
|
||||
scope(user, .)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/scope(mob/user, forced)
|
||||
var/scoping
|
||||
switch(forced)
|
||||
if(TRUE)
|
||||
scoping = TRUE
|
||||
if(FALSE)
|
||||
scoping = FALSE
|
||||
else
|
||||
scoping = !scoped
|
||||
if(scoping)
|
||||
spread = scoped_inaccuracy
|
||||
recoil = scoped_recoil
|
||||
scoped = TRUE
|
||||
user << "<span class='boldnotice'>You bring your [src] up and use its scope...</span>"
|
||||
else
|
||||
spread = hipfire_inaccuracy
|
||||
recoil = hipfire_recoil
|
||||
scoped = FALSE
|
||||
user << "<span class='boldnotice'>You lower your [src].</span>"
|
||||
update_slowdown()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/can_trigger_gun(var/mob/living/user)
|
||||
if(!scoped && !noscope)
|
||||
user << "<span class='userdanger'>This beam rifle can only be used while scoped!</span>"
|
||||
return FALSE
|
||||
. = ..(user)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/emp_act(severity)
|
||||
chambered = null
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/aiming_beam()
|
||||
var/atom/A = current_user.client.mouseObject
|
||||
if(!istype(A) || !A.loc)
|
||||
return
|
||||
var/turf/T = get_turf(current_user.client.mouseObject)
|
||||
if(!istype(T))
|
||||
return
|
||||
var/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/P = new
|
||||
P.gun = src
|
||||
P.wall_pierce_amount = wall_pierce_amount
|
||||
P.structure_pierce_amount = structure_piercing
|
||||
P.do_pierce = projectile_setting_pierce
|
||||
P.preparePixelProjectile(current_user.client.mouseObject, T, current_user, current_user.client.mouseParams, 0)
|
||||
if(aiming_time)
|
||||
var/percent = ((100/aiming_time)*aiming_time_left)
|
||||
P.color = rgb(255 * percent,255 * ((100 - percent) / 100),0)
|
||||
else
|
||||
P.color = rgb(0, 255, 0)
|
||||
clear_tracers()
|
||||
P.fire()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/clear_tracers()
|
||||
for(var/I in current_tracers)
|
||||
current_tracers -= I
|
||||
var/obj/effect/temp_visual/projectile_beam/PB = I
|
||||
qdel(PB)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/terminate_aiming()
|
||||
stop_aiming()
|
||||
clear_tracers()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/process()
|
||||
if(!aiming)
|
||||
return
|
||||
if(!istype(current_user) || !isturf(current_user.loc) || !(src in current_user.held_items) || current_user.incapacitated()) //Doesn't work if you're not holding it!
|
||||
terminate_aiming()
|
||||
return
|
||||
if(aiming_time_left > 0)
|
||||
aiming_time_left--
|
||||
aiming_beam()
|
||||
process_aim()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/process_aim()
|
||||
if(current_user.client.mouseParams)
|
||||
var/list/mouse_control = params2list(current_user.client.mouseParams)
|
||||
if(isturf(current_user.client.mouseLocation))
|
||||
current_user.face_atom(current_user.client.mouseLocation)
|
||||
if(mouse_control["screen-loc"])
|
||||
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
|
||||
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
|
||||
var/screenview = (current_user.client.view * 2 + 1) * world.icon_size //Refer to http://www.byond.com/docs/ref/info.html#/client/var/view for mad maths
|
||||
var/ox = round(screenview/2) - current_user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenview/2) - current_user.client.pixel_y //"origin" y
|
||||
var/angle = NORM_ROT(Atan2(y - oy, x - ox))
|
||||
var/difference = abs(lastangle - angle)
|
||||
delay_penalty(difference * aiming_time_increase_angle_multiplier)
|
||||
lastangle = angle
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/on_mob_move()
|
||||
delay_penalty(aiming_time_increase_user_movement)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/start_aiming()
|
||||
aiming_time_left = aiming_time
|
||||
aiming = TRUE
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/stop_aiming()
|
||||
aiming_time_left = aiming_time
|
||||
aiming = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
current_user = mob
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseDown(object, location, params, mob)
|
||||
start_aiming()
|
||||
current_user = mob
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseUp(object, location, params, mob/M)
|
||||
process_aim()
|
||||
if(aiming_time_left <= aiming_time_fire_threshold)
|
||||
sync_ammo()
|
||||
afterattack(M.client.mouseObject, M, FALSE, M.client.mouseParams, passthrough = TRUE)
|
||||
stop_aiming()
|
||||
clear_tracers()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/afterattack(atom/target, mob/living/user, flag, params, passthrough = FALSE)
|
||||
if(!passthrough && (aiming_time > aiming_time_fire_threshold))
|
||||
return
|
||||
if(lastfire > world.time + delay)
|
||||
return
|
||||
lastfire = world.time
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/sync_ammo()
|
||||
for(var/obj/item/ammo_casing/energy/beam_rifle/AC in contents)
|
||||
AC.sync_stats()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/delay_penalty(amount)
|
||||
aiming_time_left = Clamp(aiming_time_left + amount, 0, aiming_time)
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle
|
||||
name = "particle acceleration lens"
|
||||
desc = "Don't look into barrel!"
|
||||
var/wall_pierce_amount = 0
|
||||
var/wall_devastate = 0
|
||||
var/aoe_structure_range = 1
|
||||
var/aoe_structure_damage = 30
|
||||
var/aoe_fire_range = 2
|
||||
var/aoe_fire_chance = 66
|
||||
var/aoe_mob_range = 1
|
||||
var/aoe_mob_damage = 20
|
||||
var/impact_structure_damage = 50
|
||||
var/projectile_damage = 40
|
||||
var/projectile_stun = 0
|
||||
var/structure_piercing = 2
|
||||
var/structure_bleed_coeff = 0.7
|
||||
var/do_pierce = TRUE
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/host
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle/proc/sync_stats()
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/BR = loc
|
||||
if(!istype(BR))
|
||||
stack_trace("Beam rifle syncing error")
|
||||
host = BR
|
||||
do_pierce = BR.projectile_setting_pierce
|
||||
wall_pierce_amount = BR.wall_pierce_amount
|
||||
wall_devastate = BR.wall_devastate
|
||||
aoe_structure_range = BR.aoe_structure_range
|
||||
aoe_structure_damage = BR.aoe_structure_damage
|
||||
aoe_fire_range = BR.aoe_fire_range
|
||||
aoe_fire_chance = BR.aoe_fire_chance
|
||||
aoe_mob_range = BR.aoe_mob_range
|
||||
aoe_mob_damage = BR.aoe_mob_damage
|
||||
impact_structure_damage = BR.impact_structure_damage
|
||||
projectile_damage = BR.projectile_damage
|
||||
projectile_stun = BR.projectile_stun
|
||||
delay = BR.delay
|
||||
structure_piercing = BR.structure_piercing
|
||||
structure_bleed_coeff = BR.structure_bleed_coeff
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle/ready_proj(atom/target, mob/living/user, quiet, zone_override)
|
||||
. = ..(target, user, quiet, zone_override)
|
||||
var/obj/item/projectile/beam/beam_rifle/hitscan/HS_BB = BB
|
||||
if(!istype(HS_BB))
|
||||
return
|
||||
HS_BB.impact_direct_damage = projectile_damage
|
||||
HS_BB.stun = projectile_stun
|
||||
HS_BB.impact_structure_damage = impact_structure_damage
|
||||
HS_BB.aoe_mob_damage = aoe_mob_damage
|
||||
HS_BB.aoe_mob_range = Clamp(aoe_mob_range, 0, 15) //Badmin safety lock
|
||||
HS_BB.aoe_fire_chance = aoe_fire_chance
|
||||
HS_BB.aoe_fire_range = aoe_fire_range
|
||||
HS_BB.aoe_structure_damage = aoe_structure_damage
|
||||
HS_BB.aoe_structure_range = Clamp(aoe_structure_range, 0, 15) //Badmin safety lock
|
||||
HS_BB.wall_devastate = wall_devastate
|
||||
HS_BB.wall_pierce_amount = wall_pierce_amount
|
||||
HS_BB.structure_pierce_amount = structure_piercing
|
||||
HS_BB.structure_bleed_coeff = structure_bleed_coeff
|
||||
HS_BB.do_pierce = do_pierce
|
||||
HS_BB.gun = host
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle/hitscan
|
||||
projectile_type = /obj/item/projectile/beam/beam_rifle/hitscan
|
||||
select_name = "beam"
|
||||
e_cost = 5000
|
||||
fire_sound = 'sound/weapons/beam_sniper.ogg'
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle
|
||||
name = "particle beam"
|
||||
icon = ""
|
||||
hitsound = 'sound/effects/explosion3.ogg'
|
||||
damage = 0 //Handled manually.
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
range = 150
|
||||
jitter = 10
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/gun
|
||||
var/structure_pierce_amount = 0 //All set to 0 so the gun can manually set them during firing.
|
||||
var/structure_bleed_coeff = 0
|
||||
var/structure_pierce = 0
|
||||
var/do_pierce = TRUE
|
||||
var/wall_pierce_amount = 0
|
||||
var/wall_pierce = 0
|
||||
var/wall_devastate = 0
|
||||
var/aoe_structure_range = 0
|
||||
var/aoe_structure_damage = 0
|
||||
var/aoe_fire_range = 0
|
||||
var/aoe_fire_chance = 0
|
||||
var/aoe_mob_range = 0
|
||||
var/aoe_mob_damage = 0
|
||||
var/impact_structure_damage = 0
|
||||
var/impact_direct_damage = 0
|
||||
var/turf/cached
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/proc/AOE(turf/epicenter)
|
||||
set waitfor = FALSE
|
||||
if(!epicenter)
|
||||
return
|
||||
new /obj/effect/temp_visual/explosion/fast(epicenter)
|
||||
for(var/mob/living/L in range(aoe_mob_range, epicenter)) //handle aoe mob damage
|
||||
L.adjustFireLoss(aoe_mob_damage)
|
||||
to_chat(L, "<span class='userdanger'>\The [src] sears you!</span>")
|
||||
for(var/turf/T in range(aoe_fire_range, epicenter)) //handle aoe fire
|
||||
if(prob(aoe_fire_chance))
|
||||
new /obj/effect/hotspot(T)
|
||||
for(var/obj/O in range(aoe_structure_range, epicenter))
|
||||
if(!isitem(O))
|
||||
if(O.level == 1) //Please don't break underfloor items!
|
||||
continue
|
||||
O.take_damage(aoe_structure_damage * get_damage_coeff(O), BURN, "laser", FALSE)
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/proc/check_pierce(atom/target)
|
||||
if(!do_pierce)
|
||||
return FALSE
|
||||
if(isclosedturf(target))
|
||||
if(wall_pierce++ < wall_pierce_amount)
|
||||
loc = target
|
||||
if(prob(wall_devastate))
|
||||
target.ex_act(2)
|
||||
return TRUE
|
||||
if(ismovableatom(target))
|
||||
var/atom/movable/AM = target
|
||||
if(AM.density && !AM.CanPass(src, get_turf(target)) && !ismob(AM))
|
||||
if(structure_pierce++ < structure_pierce_amount)
|
||||
if(isobj(AM))
|
||||
var/obj/O = AM
|
||||
O.take_damage((impact_structure_damage + aoe_structure_damage) * structure_bleed_coeff * get_damage_coeff(AM), BURN, "energy", FALSE)
|
||||
loc = get_turf(AM)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/proc/get_damage_coeff(atom/target)
|
||||
if(istype(target, /obj/machinery/door))
|
||||
return 0.4
|
||||
if(istype(target, /obj/structure/window))
|
||||
return 0.5
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/proc/handle_impact(atom/target)
|
||||
if(isobj(target))
|
||||
var/obj/O = target
|
||||
O.take_damage(impact_structure_damage * get_damage_coeff(target), BURN, "laser", FALSE)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.adjustFireLoss(impact_direct_damage)
|
||||
L.emote("scream")
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/proc/handle_hit(atom/target)
|
||||
set waitfor = FALSE
|
||||
if(!cached && !QDELETED(target))
|
||||
cached = get_turf(target)
|
||||
if(nodamage)
|
||||
return FALSE
|
||||
playsound(cached, 'sound/effects/explosion3.ogg', 100, 1)
|
||||
AOE(cached)
|
||||
if(!QDELETED(target))
|
||||
handle_impact(target)
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/Bump(atom/target, yes)
|
||||
if(check_pierce(target))
|
||||
permutated += target
|
||||
return FALSE
|
||||
if(!QDELETED(target))
|
||||
cached = get_turf(target)
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/on_hit(atom/target, blocked = 0)
|
||||
if(!QDELETED(target))
|
||||
cached = get_turf(target)
|
||||
handle_hit(target)
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan
|
||||
icon_state = ""
|
||||
var/tracer_type = /obj/effect/temp_visual/projectile_beam/tracer
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/fire(setAngle, atom/direct_target) //oranges didn't let me make this a var the first time around so copypasta time
|
||||
set waitfor = 0
|
||||
if(!log_override && firer && original)
|
||||
add_logs(firer, original, "fired at", src, " [get_area(src)]")
|
||||
if(setAngle)
|
||||
Angle = setAngle
|
||||
var/next_run = world.time
|
||||
var/old_pixel_x = pixel_x
|
||||
var/old_pixel_y = pixel_y
|
||||
var/safety = 0 //The code works fine, but... just in case...
|
||||
while(loc)
|
||||
if(++safety > (range * 3)) //If it's looping for way, way too long...
|
||||
return //Kill!
|
||||
if((!( current ) || loc == current))
|
||||
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
|
||||
if(!Angle)
|
||||
Angle=round(Get_Angle(src,current))
|
||||
if(spread)
|
||||
Angle += (rand() - 0.5) * spread
|
||||
var/matrix/M = new
|
||||
M.Turn(Angle)
|
||||
transform = M
|
||||
var/Pixel_x=sin(Angle)+16*sin(Angle)*2
|
||||
var/Pixel_y=cos(Angle)+16*cos(Angle)*2
|
||||
var/pixel_x_offset = old_pixel_x + Pixel_x
|
||||
var/pixel_y_offset = old_pixel_y + Pixel_y
|
||||
var/new_x = x
|
||||
var/new_y = y
|
||||
while(pixel_x_offset > 16)
|
||||
pixel_x_offset -= 32
|
||||
old_pixel_x -= 32
|
||||
new_x++// x++
|
||||
while(pixel_x_offset < -16)
|
||||
pixel_x_offset += 32
|
||||
old_pixel_x += 32
|
||||
new_x--
|
||||
while(pixel_y_offset > 16)
|
||||
pixel_y_offset -= 32
|
||||
old_pixel_y -= 32
|
||||
new_y++
|
||||
while(pixel_y_offset < -16)
|
||||
pixel_y_offset += 32
|
||||
old_pixel_y += 32
|
||||
new_y--
|
||||
pixel_x = old_pixel_x
|
||||
pixel_y = old_pixel_y
|
||||
step_towards(src, locate(new_x, new_y, z))
|
||||
next_run += max(world.tick_lag, speed)
|
||||
var/delay = next_run - world.time
|
||||
if(delay <= world.tick_lag*2)
|
||||
pixel_x = pixel_x_offset
|
||||
pixel_y = pixel_y_offset
|
||||
else
|
||||
animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = max(1, (delay <= 3 ? delay - 1 : delay)), flags = ANIMATION_END_NOW)
|
||||
old_pixel_x = pixel_x_offset
|
||||
old_pixel_y = pixel_y_offset
|
||||
if(original && (original.layer>=2.75) || ismob(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original, 1)
|
||||
Range()
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/Range()
|
||||
spawn_tracer_effect()
|
||||
if(!QDELETED(src) && loc)
|
||||
cached = get_turf(src)
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/proc/spawn_tracer_effect()
|
||||
QDEL_IN((new tracer_type(loc, time = 5, angle_override = Angle, p_x = pixel_x, p_y = pixel_y, color_override = color)), 5)
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam
|
||||
tracer_type = /obj/effect/temp_visual/projectile_beam/tracer/aiming
|
||||
name = "aiming beam"
|
||||
hitsound = null
|
||||
hitsound_wall = null
|
||||
nodamage = TRUE
|
||||
damage = 0
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/prehit(atom/target)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit()
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/spawn_tracer_effect()
|
||||
var/obj/effect/temp_visual/projectile_beam/T = new tracer_type(loc, time = 5, angle_override = Angle, p_x = pixel_x, p_y = pixel_y, color_override = color)
|
||||
if(istype(gun) && istype(T))
|
||||
gun.current_tracers[T] = TRUE
|
||||
|
||||
/obj/effect/temp_visual/projectile_beam
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
layer = ABOVE_MOB_LAYER
|
||||
anchored = 1
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
light_power = 1
|
||||
light_range = 2
|
||||
light_color = "#00ffff"
|
||||
|
||||
/obj/effect/temp_visual/projectile_beam/New(time = 5, angle_override, p_x, p_y, color_override)
|
||||
duration = time
|
||||
var/mutable_appearance/look = new(src)
|
||||
look.pixel_x = p_x
|
||||
look.pixel_y = p_y
|
||||
if(color_override)
|
||||
look.color = color_override
|
||||
var/matrix/M = new
|
||||
M.Turn(angle_override)
|
||||
look.transform = M
|
||||
appearance = look
|
||||
..()
|
||||
|
||||
/obj/effect/temp_visual/projectile_beam/tracer
|
||||
icon_state = "tracer_beam"
|
||||
|
||||
/obj/effect/temp_visual/projectile_beam/tracer/aiming
|
||||
icon_state = "gbeam"
|
||||
duration = 1
|
||||
@@ -1,208 +1,208 @@
|
||||
/obj/item/weapon/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/weapon/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 = 0 //if this gun uses a stateful charge bar for more detail
|
||||
var/selfcharge = 0
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = 0 //whether the gun's cell drains the cyborg user's cell to recharge
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
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/weapon/gun/energy/get_cell()
|
||||
return cell
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
else
|
||||
cell = new(src)
|
||||
cell.give(cell.maxcharge)
|
||||
update_ammo_types()
|
||||
recharge_newshot(1)
|
||||
if(selfcharge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/process()
|
||||
if(selfcharge)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
return
|
||||
charge_tick = 0
|
||||
if(!cell)
|
||||
return
|
||||
cell.give(100)
|
||||
if(!chambered) //if empty chamber we try to charge a new shot
|
||||
recharge_newshot(1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/attack_self(mob/living/user as mob)
|
||||
if(ammo_type.len > 1)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return cell.charge >= shot.e_cost
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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(1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
..()
|
||||
if(!automatic_charge_overlays)
|
||||
return
|
||||
var/ratio = Ceiling((cell.charge / cell.maxcharge) * charge_sections)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
var/iconState = "[icon_state]_charge"
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
add_overlay("[icon_state]_[shot.select_name]")
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
itemState += "[shot.select_name]"
|
||||
if(cell.charge < shot.e_cost)
|
||||
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)
|
||||
add_overlay(charge_overlay)
|
||||
else
|
||||
add_overlay("[icon_state]_charge[ratio]")
|
||||
if(itemState)
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/weapon/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/energy/suicide_act(mob/user)
|
||||
/obj/item/weapon/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/weapon/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 = 0 //if this gun uses a stateful charge bar for more detail
|
||||
var/selfcharge = 0
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = 0 //whether the gun's cell drains the cyborg user's cell to recharge
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
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/weapon/gun/energy/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/gun/energy/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
else
|
||||
cell = new(src)
|
||||
cell.give(cell.maxcharge)
|
||||
update_ammo_types()
|
||||
recharge_newshot(1)
|
||||
if(selfcharge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/process()
|
||||
if(selfcharge)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
return
|
||||
charge_tick = 0
|
||||
if(!cell)
|
||||
return
|
||||
cell.give(100)
|
||||
if(!chambered) //if empty chamber we try to charge a new shot
|
||||
recharge_newshot(1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/attack_self(mob/living/user as mob)
|
||||
if(ammo_type.len > 1)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return cell.charge >= shot.e_cost
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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(1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
..()
|
||||
if(!automatic_charge_overlays)
|
||||
return
|
||||
var/ratio = Ceiling((cell.charge / cell.maxcharge) * charge_sections)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
var/iconState = "[icon_state]_charge"
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
add_overlay("[icon_state]_[shot.select_name]")
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
itemState += "[shot.select_name]"
|
||||
if(cell.charge < shot.e_cost)
|
||||
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/weapon/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/energy/suicide_act(mob/user)
|
||||
if (src.can_shoot() && can_trigger_gun(user))
|
||||
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)
|
||||
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 blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/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/weapon/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 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 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>"
|
||||
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)
|
||||
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 blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/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/weapon/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 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 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>"
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
ammo_x_offset = 2
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/spec, /obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/old
|
||||
name = "prototype energy gun"
|
||||
desc = "NT-P:01 Prototype Energy Gun. Early stage development of a unique laser rifle that has multifaceted energy lens allowing the gun to alter the form of projectile it fires on command."
|
||||
@@ -46,7 +45,6 @@
|
||||
ammo_x_offset = 2
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser, /obj/item/ammo_casing/energy/electrode/old)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/mini/practice_phaser
|
||||
name = "practice phaser"
|
||||
desc = "A modified version of the basic phaser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
select_name = "kinetic"
|
||||
e_cost = 500
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg' // fine spelling there chap
|
||||
fire_sound = 'sound/weapons/kenetic_accel.ogg' // fine spelling there chap
|
||||
|
||||
/obj/item/ammo_casing/energy/kinetic/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
..()
|
||||
@@ -172,18 +172,13 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/kinetic/prehit(atom/target)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!isturf(target_turf))
|
||||
return
|
||||
. = ..()
|
||||
if(.)
|
||||
if(kinetic_gun)
|
||||
var/list/mods = kinetic_gun.get_modkits()
|
||||
for(var/obj/item/borg/upgrade/modkit/M in mods)
|
||||
M.projectile_prehit(src, target, kinetic_gun)
|
||||
var/datum/gas_mixture/environment = target_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure > 50)
|
||||
if(!lavaland_equipment_pressure_check(get_turf(target)))
|
||||
name = "weakened [name]"
|
||||
damage = damage * pressure_decrease
|
||||
pressure_decrease_active = TRUE
|
||||
@@ -261,7 +256,7 @@
|
||||
if(!user.transferItemToLoc(src, KA))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You install the modkit.</span>")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/screwdriver.ogg', 100, 1)
|
||||
KA.modkits += src
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install would conflict with an already installed modkit. Use a crowbar to remove existing modkits.</span>")
|
||||
@@ -280,7 +275,6 @@
|
||||
//use this one for effects you want to trigger before mods that do damage
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
//and this one for things that don't need to trigger before other damage-dealing mods
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
|
||||
//Range
|
||||
@@ -449,8 +443,7 @@
|
||||
if(SM.reward_target == src) //we want to allow multiple people with bounty modkits to use them, but we need to replace our own marks so we don't multi-reward
|
||||
SM.reward_target = null
|
||||
qdel(SM)
|
||||
var/datum/status_effect/syphon_mark/SM = L.apply_status_effect(STATUS_EFFECT_SYPHONMARK)
|
||||
SM.reward_target = src
|
||||
L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target))
|
||||
@@ -471,11 +464,10 @@
|
||||
else
|
||||
bounties_reaped[L.type] = min(bounties_reaped[L.type] + (modifier * bonus_mod), maximum_bounty)
|
||||
|
||||
|
||||
//Indoors
|
||||
/obj/item/borg/upgrade/modkit/indoors
|
||||
name = "decrease pressure penalty"
|
||||
desc = "A syndicate modification kit that increases the damage a kinetic accelerator does in a high pressure environment."
|
||||
desc = "A syndicate modification kit that increases the damage a kinetic accelerator does in high pressure environments."
|
||||
modifier = 2
|
||||
denied_type = /obj/item/borg/upgrade/modkit/indoors
|
||||
maximum_of_type = 2
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=4;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/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."
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/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/weapon/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)
|
||||
origin_tech = "combat=4;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/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."
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/energy/laser/retro/old
|
||||
name ="laser gun"
|
||||
icon_state = "retro"
|
||||
@@ -31,113 +31,113 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/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
|
||||
origin_tech = null
|
||||
ammo_x_offset = 3
|
||||
selfcharge = 1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/weapon/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 lense to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theorically infinite use."
|
||||
origin_tech = "combat=5;materials=4;powerstorage=4"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg
|
||||
can_charge = 0
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
origin_tech = null
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/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/weapon/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/device/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/weapon/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 = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
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/weapon/gun/energy/xray
|
||||
name = "xray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated xray blasts that pass through multiple soft targets and heavier materials"
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
origin_tech = "combat=6;materials=4;magnets=4;syndicate=1"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
pin = /obj/item/device/firing_pin/tag/blue
|
||||
ammo_x_offset = 2
|
||||
selfcharge = 1
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
pin = /obj/item/device/firing_pin/tag/red
|
||||
ammo_x_offset = 2
|
||||
selfcharge = 1
|
||||
/obj/item/weapon/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
|
||||
origin_tech = null
|
||||
ammo_x_offset = 3
|
||||
selfcharge = 1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/weapon/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 lense to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theorically infinite use."
|
||||
origin_tech = "combat=5;materials=4;powerstorage=4"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg
|
||||
can_charge = 0
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
origin_tech = null
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/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/weapon/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/device/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/weapon/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 = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
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/weapon/gun/energy/xray
|
||||
name = "xray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated xray blasts that pass through multiple soft targets and heavier materials"
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
origin_tech = "combat=6;materials=4;magnets=4;syndicate=1"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
pin = /obj/item/device/firing_pin/tag/blue
|
||||
ammo_x_offset = 2
|
||||
selfcharge = 1
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
pin = /obj/item/device/firing_pin/tag/red
|
||||
ammo_x_offset = 2
|
||||
selfcharge = 1
|
||||
|
||||
@@ -1,79 +1,78 @@
|
||||
/obj/item/weapon/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 = CONDUCT
|
||||
slot_flags = 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/weapon/stock_parts/cell/pulse"
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/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 = CONDUCT
|
||||
slot_flags = 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/weapon/stock_parts/cell/pulse"
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize/Initialize()
|
||||
. = ..()
|
||||
. = ..()
|
||||
GLOB.poi_list += src
|
||||
var/msg = "A pulse rifle prize has been created at [ADMIN_COORDJMP(src)]"
|
||||
|
||||
message_admins(msg)
|
||||
log_game(msg)
|
||||
|
||||
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/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 = SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/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 = SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/pistol"
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty energy rifle built for pure destruction."
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/stock_parts/cell/infinite"
|
||||
var/msg = "A pulse rifle prize has been created at [ADMIN_COORDJMP(src)]"
|
||||
|
||||
message_admins(msg)
|
||||
log_game(msg)
|
||||
|
||||
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/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 = SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/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 = SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/pistol"
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty energy rifle built for pure destruction."
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/stock_parts/cell/infinite"
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter
|
||||
name = "plasma cutter"
|
||||
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
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"
|
||||
origin_tech = "combat=1;materials=3;magnets=2;plasmatech=3;engineering=1"
|
||||
@@ -172,8 +172,8 @@
|
||||
item_state = null
|
||||
icon_state = "wormhole_projector"
|
||||
origin_tech = "combat=4;bluespace=6;plasmatech=4;engineering=4"
|
||||
var/obj/effect/portal/blue
|
||||
var/obj/effect/portal/orange
|
||||
var/obj/effect/portal/p_blue
|
||||
var/obj/effect/portal/p_orange
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "[initial(icon_state)][select]"
|
||||
@@ -184,36 +184,50 @@
|
||||
..()
|
||||
select_fire()
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/portal_destroyed(obj/effect/portal/P)
|
||||
if(P.icon_state == "portal")
|
||||
blue = null
|
||||
if(orange)
|
||||
orange.target = null
|
||||
else
|
||||
orange = null
|
||||
if(blue)
|
||||
blue.target = null
|
||||
/obj/item/weapon/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/weapon/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(W), null, src)
|
||||
P.precision = 0
|
||||
if(W.name == "bluespace beam")
|
||||
qdel(blue)
|
||||
blue = P
|
||||
else
|
||||
qdel(orange)
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/has_blue_portal()
|
||||
if(istype(p_blue) && !QDELETED(p_blue))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/has_orange_portal()
|
||||
if(istype(p_orange) && !QDELETED(p_orange))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/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/weapon/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)
|
||||
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
|
||||
qdel(p_orange)
|
||||
p_orange = P
|
||||
P.icon_state = "portal1"
|
||||
orange = P
|
||||
if(orange && blue)
|
||||
blue.target = get_turf(orange)
|
||||
orange.target = get_turf(blue)
|
||||
|
||||
else
|
||||
qdel(p_blue)
|
||||
p_blue = P
|
||||
crosslink()
|
||||
|
||||
/* 3d printer 'pseudo guns' for borgs */
|
||||
|
||||
/obj/item/weapon/gun/energy/printer
|
||||
name = "cyborg lmg"
|
||||
desc = "A machinegun that fires 3d-printed flachettes slowly regenerated using a cyborg's internal power source."
|
||||
desc = "A machinegun that fires 3d-printed flechettes slowly regenerated using a cyborg's internal power source."
|
||||
icon_state = "l6closed0"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/secborg"
|
||||
@@ -268,7 +282,7 @@
|
||||
|
||||
/obj/item/weapon/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"
|
||||
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/gravityrepulse, /obj/item/ammo_casing/energy/gravityattract, /obj/item/ammo_casing/energy/gravitychaos)
|
||||
origin_tech = "combat=4;magnets=4;materials=6;powerstorage=4;bluespace=4"
|
||||
item_state = null
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=3"
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=4;materials=4;powerstorage=4"
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/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/electrode, /obj/item/ammo_casing/energy/disabler)
|
||||
origin_tech = "combat=4"
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_flashlight = 0
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=3"
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/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)
|
||||
origin_tech = "combat=4;materials=4;powerstorage=4"
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/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/electrode, /obj/item/ammo_casing/energy/disabler)
|
||||
origin_tech = "combat=4"
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_flashlight = 0
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/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
|
||||
origin_tech = "combat=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
origin_tech = "combat=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
/obj/item/weapon/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"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
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
|
||||
origin_tech = null
|
||||
clumsy_check = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
pin = /obj/item/device/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/weapon/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
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/weapon/gun/magic/recharge_newshot()
|
||||
if (charges && chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/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/weapon/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"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
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
|
||||
origin_tech = null
|
||||
clumsy_check = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
pin = /obj/item/device/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/weapon/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
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/weapon/gun/magic/recharge_newshot()
|
||||
if (charges && chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/magic/Initialize()
|
||||
. = ..()
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
if(can_charge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
if(can_charge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/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/weapon/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
recharge_newshot()
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/change
|
||||
name = "staff of change"
|
||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||
fire_sound = 'sound/magic/Staff_Change.ogg'
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/change
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/animate
|
||||
name = "staff of animation"
|
||||
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
fire_sound = 'sound/magic/Staff_animation.ogg'
|
||||
fire_sound = 'sound/magic/staff_animation.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/animate
|
||||
icon_state = "staffofanimation"
|
||||
item_state = "staffofanimation"
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/healing
|
||||
name = "staff of healing"
|
||||
desc = "An artefact that spits bolts of restoring magic which can remove ailments of all kinds and even raise the dead."
|
||||
fire_sound = 'sound/magic/Staff_Healing.ogg'
|
||||
fire_sound = 'sound/magic/staff_healing.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||
icon_state = "staffofhealing"
|
||||
item_state = "staffofhealing"
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/chaos
|
||||
name = "staff of chaos"
|
||||
desc = "An artefact that spits bolts of chaotic magic that can potentially do anything."
|
||||
fire_sound = 'sound/magic/Staff_Chaos.ogg'
|
||||
fire_sound = 'sound/magic/staff_chaos.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/chaos
|
||||
icon_state = "staffofchaos"
|
||||
item_state = "staffofchaos"
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/door
|
||||
name = "staff of door creation"
|
||||
desc = "An artefact that spits bolts of transformative magic that can create doors in walls."
|
||||
fire_sound = 'sound/magic/Staff_Door.ogg'
|
||||
fire_sound = 'sound/magic/staff_door.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/door
|
||||
icon_state = "staffofdoor"
|
||||
item_state = "staffofdoor"
|
||||
@@ -70,7 +70,7 @@
|
||||
/obj/item/weapon/gun/magic/staff/spellblade
|
||||
name = "spellblade"
|
||||
desc = "A deadly combination of laziness and boodlust, this blade allows the user to dismember their enemies without all the hard work of actually swinging the sword."
|
||||
fire_sound = 'sound/magic/Fireball.ogg'
|
||||
fire_sound = 'sound/magic/fireball.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/spellblade
|
||||
icon_state = "spellblade"
|
||||
item_state = "spellblade"
|
||||
@@ -81,7 +81,7 @@
|
||||
sharpness = IS_SHARP
|
||||
max_charges = 4
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0
|
||||
return ..()
|
||||
|
||||
@@ -1,170 +1,170 @@
|
||||
/obj/item/weapon/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/weapon/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/weapon/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)
|
||||
else
|
||||
max_charges = Ceiling(max_charges / 2)
|
||||
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)
|
||||
else
|
||||
max_charges = Ceiling(max_charges / 2)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Has [charges] charge\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/update_icon()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/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/weapon/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>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DEATH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
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>")
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF POLYMORPH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DOOR CREATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Has [charges] charge\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/update_icon()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/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/weapon/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>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DEATH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
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>")
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF POLYMORPH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DOOR CREATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
@@ -0,0 +1,127 @@
|
||||
/obj/item/weapon/gun/blastcannon
|
||||
name = "pipe gun"
|
||||
desc = "A pipe welded onto a gun stock, with a mechanical trigger. The pipe has an opening near the top, and there seems to be a spring loaded wheel in the hole."
|
||||
icon_state = "empty_blastcannon"
|
||||
var/icon_state_loaded = "loaded_blastcannon"
|
||||
item_state = "blastcannon_empty"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
force = 10
|
||||
fire_sound = 'sound/weapons/blastcannon.ogg'
|
||||
needs_permit = FALSE
|
||||
clumsy_check = FALSE
|
||||
randomspread = FALSE
|
||||
|
||||
var/obj/item/device/transfer_valve/bomb
|
||||
var/datum/gas_mixture/air1
|
||||
var/datum/gas_mixture/air2
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/New()
|
||||
if(!pin)
|
||||
pin = new
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/Destroy()
|
||||
if(bomb)
|
||||
qdel(bomb)
|
||||
bomb = null
|
||||
air1 = null
|
||||
air2 = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/attack_self(mob/user)
|
||||
if(bomb)
|
||||
bomb.forceMove(user.loc)
|
||||
user.put_in_hands(bomb)
|
||||
user.visible_message("<span class='warning'>[user] detaches the [bomb] from the [src]</span>")
|
||||
bomb = null
|
||||
update_icon()
|
||||
. = ..(user)
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/update_icon()
|
||||
if(bomb)
|
||||
icon_state = icon_state_loaded
|
||||
name = "blast cannon"
|
||||
desc = "A makeshift device used to concentrate a bomb's blast energy to a narrow wave."
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/attackby(obj/O, mob/user)
|
||||
if(istype(O, /obj/item/device/transfer_valve))
|
||||
var/obj/item/device/transfer_valve/T = O
|
||||
if(!T.tank_one || !T.tank_two)
|
||||
to_chat(user, "<span class='warning'>What good would an incomplete bomb do?</span>")
|
||||
return FALSE
|
||||
if(!user.drop_item(O))
|
||||
to_chat(user, "<span class='warning'>The [O] seems to be stuck to your hand!</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='warning'>[user] attaches the [O] to the [src]!</span>")
|
||||
bomb = O
|
||||
O.loc = src
|
||||
update_icon()
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/proc/calculate_bomb()
|
||||
if(!istype(bomb)||!istype(bomb.tank_one)||!istype(bomb.tank_two))
|
||||
return 0
|
||||
air1 = bomb.tank_one.air_contents
|
||||
air2 = bomb.tank_two.air_contents
|
||||
var/datum/gas_mixture/temp
|
||||
temp.volume = air1.volume + air2.volume
|
||||
temp.merge(air1)
|
||||
temp.merge(air2)
|
||||
for(var/i in 1 to 6)
|
||||
temp.react()
|
||||
var/pressure = temp.return_pressure()
|
||||
qdel(temp)
|
||||
if(pressure < TANK_FRAGMENT_PRESSURE)
|
||||
return 0
|
||||
return (pressure/TANK_FRAGMENT_SCALE)
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/afterattack(atom/target, mob/user, flag, params)
|
||||
if((!bomb) || (target == user) || (target.loc == user) || (!target) || (target.loc == user.loc) || (target.loc in range(user, 2)) || (target in range(user, 2)))
|
||||
return ..()
|
||||
var/power = calculate_bomb()
|
||||
qdel(bomb)
|
||||
update_icon()
|
||||
var/heavy = power * 0.2
|
||||
var/medium = power * 0.5
|
||||
var/light = power
|
||||
user.visible_message("<span class='danger'>[user] opens \the [bomb] on \his [src.name] and fires a blast wave at \the [target]!</span>","<span class='danger'>You open \the [bomb] on your [src.name] and fire a blast wave at \the [target]!</span>")
|
||||
playsound(user, "explosion", 100, 1)
|
||||
var/turf/starting = get_turf(user)
|
||||
var/area/A = get_area(user)
|
||||
var/log_str = "Blast wave fired at [ADMIN_COORDJMP(starting)] ([A.name]) by [user.name]([user.ckey]) with power [heavy]/[medium]/[light]."
|
||||
message_admins(log_str)
|
||||
log_game(log_str)
|
||||
|
||||
/obj/item/projectile/blastwave
|
||||
name = "blast wave"
|
||||
icon_state = "blastwave"
|
||||
damage = 0
|
||||
nodamage = FALSE
|
||||
forcedodge = TRUE
|
||||
var/heavyr = 0
|
||||
var/mediumr = 0
|
||||
var/lightr = 0
|
||||
range = 150
|
||||
|
||||
/obj/item/projectile/blastwave/Range()
|
||||
..()
|
||||
if(heavyr)
|
||||
loc.ex_act(1)
|
||||
else if(mediumr)
|
||||
loc.ex_act(2)
|
||||
else if(lightr)
|
||||
loc.ex_act(3)
|
||||
else
|
||||
qdel(src)
|
||||
heavyr--
|
||||
mediumr--
|
||||
lightr--
|
||||
|
||||
/obj/item/projectile/blastwave/ex_act()
|
||||
return
|
||||
@@ -25,12 +25,14 @@
|
||||
var/p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
|
||||
var/speed = 0.8 //Amount of deciseconds it takes for projectile to travel
|
||||
var/Angle = 0
|
||||
var/nondirectional_sprite = FALSE //Set TRUE to prevent projectiles from having their sprites rotated based on firing angle
|
||||
var/spread = 0 //amount (in degrees) of projectile spread
|
||||
var/legacy = 0 //legacy projectile system
|
||||
animate_movement = 0 //Use SLIDE_STEPS in conjunction with legacy
|
||||
var/ricochets = 0
|
||||
var/ricochets_max = 2
|
||||
var/ricochet_chance = 30
|
||||
var/ignore_source_check = FALSE
|
||||
|
||||
var/damage = 10
|
||||
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
|
||||
@@ -40,8 +42,8 @@
|
||||
var/range = 50 //This will de-increment every step. When 0, it will delete the projectile.
|
||||
//Effects
|
||||
var/stun = 0
|
||||
var/weaken = 0
|
||||
var/paralyze = 0
|
||||
var/knockdown = 0
|
||||
var/unconscious = 0
|
||||
var/irradiate = 0
|
||||
var/stutter = 0
|
||||
var/slur = 0
|
||||
@@ -126,7 +128,7 @@
|
||||
reagent_note += num2text(R.volume) + ") "
|
||||
|
||||
add_logs(firer, L, "shot", src, reagent_note)
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
|
||||
return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
|
||||
|
||||
/obj/item/projectile/proc/vol_by_damage()
|
||||
if(src.damage)
|
||||
@@ -140,8 +142,9 @@
|
||||
if(check_ricochet() && check_ricochet_flag(A) && ricochets < ricochets_max)
|
||||
ricochets++
|
||||
if(A.handle_ricochet(src))
|
||||
ignore_source_check = TRUE
|
||||
return FALSE
|
||||
if(firer && !ricochets)
|
||||
if(firer && !ignore_source_check)
|
||||
if(A == firer || (A == firer.loc && istype(A, /obj/mecha))) //cannot shoot yourself or your mech
|
||||
loc = A.loc
|
||||
return FALSE
|
||||
@@ -220,7 +223,8 @@
|
||||
if(spread)
|
||||
Angle += (rand() - 0.5) * spread
|
||||
var/matrix/M = new
|
||||
M.Turn(Angle)
|
||||
if(!nondirectional_sprite)
|
||||
M.Turn(Angle)
|
||||
transform = M
|
||||
|
||||
var/Pixel_x=round((sin(Angle)+16*sin(Angle)*2), 1) //round() is a floor operation when only one argument is supplied, we don't want that here
|
||||
|
||||
@@ -1,157 +1,157 @@
|
||||
/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
|
||||
/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
|
||||
light_color = LIGHT_COLOR_RED
|
||||
ricochets_max = 50 //Honk!
|
||||
ricochet_chance = 80
|
||||
|
||||
/obj/item/projectile/beam/laser
|
||||
|
||||
/obj/item/projectile/beam/laser/heavylaser
|
||||
name = "heavy laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 40
|
||||
|
||||
/obj/item/projectile/beam/laser/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.IgniteMob()
|
||||
else if(isturf(target))
|
||||
/obj/item/projectile/beam/laser
|
||||
|
||||
/obj/item/projectile/beam/laser/heavylaser
|
||||
name = "heavy laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 40
|
||||
|
||||
/obj/item/projectile/beam/laser/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
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
|
||||
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 = "xray beam"
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 30
|
||||
range = 15
|
||||
forcedodge = 1
|
||||
|
||||
/obj/item/projectile/beam/weak
|
||||
damage = 15
|
||||
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 = "xray beam"
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 30
|
||||
range = 15
|
||||
forcedodge = 1
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/item/projectile/beam/disabler
|
||||
name = "disabler beam"
|
||||
icon_state = "omnilaser"
|
||||
damage = 36
|
||||
damage_type = STAMINA
|
||||
flag = "energy"
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
eyeblur = 0
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/item/projectile/beam/disabler
|
||||
name = "disabler beam"
|
||||
icon_state = "omnilaser"
|
||||
damage = 36
|
||||
damage_type = STAMINA
|
||||
flag = "energy"
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
eyeblur = 0
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
name = "pulse"
|
||||
icon_state = "u_laser"
|
||||
damage = 50
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/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
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(isturf(target) || istype(target,/obj/structure/))
|
||||
target.ex_act(2)
|
||||
|
||||
/obj/item/projectile/beam/pulse/shot
|
||||
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 = 0)
|
||||
life -= 10
|
||||
if(life > 0)
|
||||
. = -1
|
||||
..()
|
||||
|
||||
/obj/item/projectile/beam/emitter
|
||||
name = "emitter beam"
|
||||
icon_state = "emitter"
|
||||
damage = 30
|
||||
legacy = 1
|
||||
animate_movement = SLIDE_STEPS
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(isturf(target) || istype(target,/obj/structure/))
|
||||
target.ex_act(2)
|
||||
|
||||
/obj/item/projectile/beam/pulse/shot
|
||||
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 = 0)
|
||||
life -= 10
|
||||
if(life > 0)
|
||||
. = -1
|
||||
..()
|
||||
|
||||
/obj/item/projectile/beam/emitter
|
||||
name = "emitter beam"
|
||||
icon_state = "emitter"
|
||||
damage = 30
|
||||
legacy = 1
|
||||
animate_movement = SLIDE_STEPS
|
||||
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)
|
||||
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 = 0)
|
||||
. = ..()
|
||||
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)
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
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
|
||||
|
||||
/obj/item/projectile/beam/lasertag/bluetag
|
||||
icon_state = "bluelaser"
|
||||
suit_types = list(/obj/item/clothing/suit/redtag)
|
||||
|
||||
/obj/item/projectile/beam/instakill
|
||||
name = "instagib laser"
|
||||
icon_state = "purple_laser"
|
||||
damage = 200
|
||||
damage_type = BURN
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/beam/lasertag/bluetag
|
||||
icon_state = "bluelaser"
|
||||
suit_types = list(/obj/item/clothing/suit/redtag)
|
||||
|
||||
/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"
|
||||
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"
|
||||
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()
|
||||
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()
|
||||
|
||||
@@ -1,295 +1,290 @@
|
||||
/obj/item/projectile/bullet
|
||||
name = "bullet"
|
||||
icon_state = "bullet"
|
||||
damage = 60
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
flag = "bullet"
|
||||
hitsound_wall = "ricochet"
|
||||
/obj/item/projectile/bullet
|
||||
name = "bullet"
|
||||
icon_state = "bullet"
|
||||
damage = 60
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
flag = "bullet"
|
||||
hitsound_wall = "ricochet"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
|
||||
damage = 5
|
||||
stamina = 80
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down
|
||||
damage = 15
|
||||
weaken = 3
|
||||
stamina = 50
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet3
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/toxinbullet
|
||||
damage = 15
|
||||
damage_type = TOX
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/firebullet
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/bullet/armourpiercing
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
|
||||
damage = 5
|
||||
stamina = 80
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down
|
||||
damage = 15
|
||||
knockdown = 30
|
||||
stamina = 50
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet3
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/toxinbullet
|
||||
damage = 15
|
||||
damage_type = TOX
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/firebullet
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/bullet/armourpiercing
|
||||
damage = 15
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/pellet
|
||||
name = "pellet"
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/Range()
|
||||
..()
|
||||
damage += -0.75
|
||||
if(damage < 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/New()
|
||||
range = rand(1, 8)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/New()
|
||||
range = rand(1, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
explosion(target, 0, 0, 2)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_range()
|
||||
explosion(src, 0, 0, 2)
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/midbullet
|
||||
damage = 20
|
||||
stamina = 65 //two round bursts from the c20r knocks people down
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/midbullet2
|
||||
damage = 25
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/hp
|
||||
damage = 40
|
||||
armour_penetration = -50
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/ap
|
||||
damage = 27
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/fire/on_hit(atom/target, blocked = 0)
|
||||
if(..(target, blocked))
|
||||
var/mob/living/M = target
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
|
||||
/obj/item/projectile/bullet/heavybullet
|
||||
damage = 35
|
||||
|
||||
/obj/item/projectile/bullet/rpellet
|
||||
damage = 3
|
||||
stamina = 25
|
||||
|
||||
/obj/item/projectile/bullet/stunshot //taser slugs for shotguns, nothing special
|
||||
name = "stunshot"
|
||||
damage = 5
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
range = 7
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(4)
|
||||
M.IgniteMob()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell
|
||||
name = "incendiary slug"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
|
||||
name = "dragonsbreath round"
|
||||
damage = 5
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot
|
||||
name = "meteor"
|
||||
icon = 'icons/obj/meteor.dmi'
|
||||
icon_state = "dust"
|
||||
damage = 30
|
||||
weaken = 8
|
||||
stun = 8
|
||||
hitsound = 'sound/effects/meteorimpact.ogg'
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/weak
|
||||
damage = 10
|
||||
weaken = 4
|
||||
stun = 4
|
||||
|
||||
/obj/item/projectile/bullet/honker
|
||||
damage = 0
|
||||
weaken = 3
|
||||
stun = 3
|
||||
forcedodge = 1
|
||||
nodamage = 1
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "banana"
|
||||
range = 200
|
||||
|
||||
/obj/item/projectile/bullet/honker/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(istype(target, /atom/movable))
|
||||
var/atom/movable/M = target
|
||||
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
|
||||
M.throw_at(throw_target, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/mime
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/mime/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.silent = max(M.silent, 10)
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/dart
|
||||
name = "dart"
|
||||
icon_state = "cbbolt"
|
||||
damage = 6
|
||||
var/piercing = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/dart/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = 0)
|
||||
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.
|
||||
..()
|
||||
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)
|
||||
reagents.set_reacting(TRUE)
|
||||
reagents.handle_reactions()
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/dart/metalfoam/New()
|
||||
..()
|
||||
reagents.add_reagent("aluminium", 15)
|
||||
reagents.add_reagent("foaming_agent", 5)
|
||||
reagents.add_reagent("facid", 5)
|
||||
|
||||
//This one is for future syringe guns update
|
||||
/obj/item/projectile/bullet/dart/syringe
|
||||
name = "syringe"
|
||||
icon_state = "syringeproj"
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin
|
||||
name = "neurotoxin spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
weaken = 5
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = 0)
|
||||
if(isalien(target))
|
||||
weaken = 0
|
||||
nodamage = 1
|
||||
. = ..() // Execute the rest of the code.
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
icon_state = "syringeproj"
|
||||
var/obj/item/weapon/dnainjector/injector
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = 0)
|
||||
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 ..()
|
||||
|
||||
//// SNIPER BULLETS
|
||||
|
||||
/obj/item/projectile/bullet/sniper
|
||||
speed = 0 //360 alwaysscope.
|
||||
damage = 70
|
||||
stun = 5
|
||||
weaken = 5
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && (!ismob(target) && breakthings))
|
||||
target.ex_act(rand(1,2))
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet
|
||||
name = "pellet"
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/Range()
|
||||
..()
|
||||
damage += -0.75
|
||||
if(damage < 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/New()
|
||||
range = rand(1, 8)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/New()
|
||||
range = rand(1, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
explosion(target, 0, 0, 2)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_range()
|
||||
explosion(src, 0, 0, 2)
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/midbullet
|
||||
damage = 20
|
||||
stamina = 65 //two round bursts from the c20r knocks people down
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/midbullet2
|
||||
damage = 25
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/hp
|
||||
damage = 40
|
||||
armour_penetration = -50
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/ap
|
||||
damage = 27
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/fire/on_hit(atom/target, blocked = 0)
|
||||
if(..(target, blocked))
|
||||
var/mob/living/M = target
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
|
||||
/obj/item/projectile/bullet/heavybullet
|
||||
damage = 35
|
||||
|
||||
/obj/item/projectile/bullet/rpellet
|
||||
damage = 3
|
||||
stamina = 25
|
||||
|
||||
/obj/item/projectile/bullet/stunshot //taser slugs for shotguns, nothing special
|
||||
name = "stunshot"
|
||||
damage = 5
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
range = 7
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(4)
|
||||
M.IgniteMob()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell
|
||||
name = "incendiary slug"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
|
||||
name = "dragonsbreath round"
|
||||
damage = 5
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot
|
||||
name = "meteor"
|
||||
icon = 'icons/obj/meteor.dmi'
|
||||
icon_state = "dust"
|
||||
damage = 30
|
||||
knockdown = 160
|
||||
hitsound = 'sound/effects/meteorimpact.ogg'
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/weak
|
||||
damage = 10
|
||||
knockdown = 80
|
||||
|
||||
/obj/item/projectile/bullet/honker
|
||||
damage = 0
|
||||
knockdown = 60
|
||||
forcedodge = 1
|
||||
nodamage = 1
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "banana"
|
||||
range = 200
|
||||
|
||||
/obj/item/projectile/bullet/honker/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
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.throw_at(throw_target, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/mime
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/mime/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.silent = max(M.silent, 10)
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/dart
|
||||
name = "dart"
|
||||
icon_state = "cbbolt"
|
||||
damage = 6
|
||||
var/piercing = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/dart/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = 0)
|
||||
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.
|
||||
..()
|
||||
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)
|
||||
reagents.set_reacting(TRUE)
|
||||
reagents.handle_reactions()
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/dart/metalfoam/New()
|
||||
..()
|
||||
reagents.add_reagent("aluminium", 15)
|
||||
reagents.add_reagent("foaming_agent", 5)
|
||||
reagents.add_reagent("facid", 5)
|
||||
|
||||
//This one is for future syringe guns update
|
||||
/obj/item/projectile/bullet/dart/syringe
|
||||
name = "syringe"
|
||||
icon_state = "syringeproj"
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin
|
||||
name = "neurotoxin spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = 0)
|
||||
if(isalien(target))
|
||||
knockdown = 0
|
||||
nodamage = 1
|
||||
. = ..() // Execute the rest of the code.
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
icon_state = "syringeproj"
|
||||
var/obj/item/weapon/dnainjector/injector
|
||||
damage = 5
|
||||
hitsound_wall = "shatter"
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = 0)
|
||||
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 ..()
|
||||
|
||||
//// SNIPER BULLETS
|
||||
|
||||
/obj/item/projectile/bullet/sniper
|
||||
speed = 0 //360 alwaysscope.
|
||||
damage = 70
|
||||
knockdown = 100
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && (!ismob(target) && breakthings))
|
||||
target.ex_act(rand(1,2))
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/sniper/gang
|
||||
damage = 55
|
||||
stun = 1
|
||||
weaken = 1
|
||||
knockdown = 20
|
||||
dismemberment = 15
|
||||
armour_penetration = 25
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/gang/sleeper
|
||||
nodamage = 1
|
||||
stun = 0
|
||||
weaken = 0
|
||||
knockdown = 0
|
||||
dismemberment = 0
|
||||
breakthings = FALSE
|
||||
|
||||
@@ -298,92 +293,89 @@
|
||||
var/mob/living/L = target
|
||||
L.blur_eyes(8)
|
||||
if(L.staminaloss >= 40)
|
||||
L.Sleeping(20)
|
||||
L.Sleeping(400)
|
||||
else
|
||||
L.adjustStaminaLoss(55)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/sniper/soporific
|
||||
armour_penetration = 0
|
||||
nodamage = 1
|
||||
stun = 0
|
||||
dismemberment = 0
|
||||
weaken = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Sleeping(20)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage
|
||||
armour_penetration = 15
|
||||
damage = 15
|
||||
stun = 0
|
||||
dismemberment = 0
|
||||
weaken = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(100)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/penetrator
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = 1
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
stun = 0
|
||||
weaken = 0
|
||||
breakthings = FALSE
|
||||
|
||||
|
||||
|
||||
//// SAW BULLETS
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/saw
|
||||
damage = 45
|
||||
armour_penetration = 5
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding
|
||||
damage = 20
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(35)
|
||||
|
||||
/obj/item/projectile/bullet/saw/hollow
|
||||
damage = 60
|
||||
armour_penetration = -10
|
||||
|
||||
/obj/item/projectile/bullet/saw/ap
|
||||
damage = 40
|
||||
armour_penetration = 75
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen
|
||||
damage = 7
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(3)
|
||||
M.IgniteMob()
|
||||
/obj/item/projectile/bullet/sniper/soporific
|
||||
armour_penetration = 0
|
||||
nodamage = 1
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Sleeping(400)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage
|
||||
armour_penetration = 15
|
||||
damage = 15
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(100)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/penetrator
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = 1
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
|
||||
|
||||
//// SAW BULLETS
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/saw
|
||||
damage = 45
|
||||
armour_penetration = 5
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding
|
||||
damage = 20
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(35)
|
||||
|
||||
/obj/item/projectile/bullet/saw/hollow
|
||||
damage = 60
|
||||
armour_penetration = -10
|
||||
|
||||
/obj/item/projectile/bullet/saw/ap
|
||||
damage = 40
|
||||
armour_penetration = 75
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen
|
||||
damage = 7
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(3)
|
||||
M.IgniteMob()
|
||||
|
||||
@@ -1,194 +1,193 @@
|
||||
/obj/item/projectile/energy
|
||||
name = "energy"
|
||||
icon_state = "spark"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/energy
|
||||
name = "energy"
|
||||
icon_state = "spark"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/energy/chameleon
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
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
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
else if(C.status_flags & CANWEAKEN)
|
||||
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/net
|
||||
name = "energy netting"
|
||||
icon_state = "e_netting"
|
||||
damage = 10
|
||||
damage_type = STAMINA
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/net/Initialize()
|
||||
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/energy/net/on_hit(atom/target, blocked = 0)
|
||||
if(isliving(target))
|
||||
var/turf/Tloc = get_turf(target)
|
||||
if(!locate(/obj/effect/nettingportal) in Tloc)
|
||||
new /obj/effect/nettingportal(Tloc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/net/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/effect/nettingportal
|
||||
name = "DRAGnet teleportation field"
|
||||
desc = "A field of bluespace energy, locking on to teleport a target."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dragnetfield"
|
||||
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
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
else if(C.status_flags & CANKNOCKDOWN)
|
||||
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/net
|
||||
name = "energy netting"
|
||||
icon_state = "e_netting"
|
||||
damage = 10
|
||||
damage_type = STAMINA
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/net/Initialize()
|
||||
. = ..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/energy/net/on_hit(atom/target, blocked = 0)
|
||||
if(isliving(target))
|
||||
var/turf/Tloc = get_turf(target)
|
||||
if(!locate(/obj/effect/nettingportal) in Tloc)
|
||||
new /obj/effect/nettingportal(Tloc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/net/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/effect/nettingportal
|
||||
name = "DRAGnet teleportation field"
|
||||
desc = "A field of bluespace energy, locking on to teleport a target."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dragnetfield"
|
||||
light_range = 3
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/nettingportal/Initialize()
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/nettingportal/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/device/radio/beacon/teletarget = null
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
teletarget = com.target
|
||||
|
||||
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
|
||||
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
|
||||
else
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/projectile/energy/trap
|
||||
name = "energy snare"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
weaken = 1
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/energy/trap/on_hit(atom/target, blocked = 0)
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - drop a trap
|
||||
new/obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.Crossed(target)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/on_range()
|
||||
new /obj/item/weapon/restraints/legcuffs/beartrap/energy(loc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg
|
||||
name = "Energy Bola"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
weaken = 0
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_hit(atom/target, blocked = 0)
|
||||
if(!ismob(target) || blocked >= 100)
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.Crossed(target)
|
||||
QDEL_IN(src, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/energy/declone
|
||||
name = "radiation beam"
|
||||
icon_state = "declone"
|
||||
damage = 20
|
||||
damage_type = CLONE
|
||||
irradiate = 10
|
||||
var/obj/item/device/radio/beacon/teletarget = null
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
teletarget = com.target
|
||||
|
||||
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
|
||||
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
|
||||
else
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/projectile/energy/trap
|
||||
name = "energy snare"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/energy/trap/on_hit(atom/target, blocked = 0)
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - drop a trap
|
||||
new/obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.Crossed(target)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/on_range()
|
||||
new /obj/item/weapon/restraints/legcuffs/beartrap/energy(loc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg
|
||||
name = "Energy Bola"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 0
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_hit(atom/target, blocked = 0)
|
||||
if(!ismob(target) || blocked >= 100)
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.Crossed(target)
|
||||
QDEL_IN(src, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/energy/declone
|
||||
name = "radiation beam"
|
||||
icon_state = "declone"
|
||||
damage = 20
|
||||
damage_type = CLONE
|
||||
irradiate = 10
|
||||
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
|
||||
weaken = 5
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/bolt //ebow bolts
|
||||
name = "bolt"
|
||||
icon_state = "cbbolt"
|
||||
damage = 8
|
||||
damage_type = TOX
|
||||
nodamage = 0
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
|
||||
/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/dart //ninja throwing dart
|
||||
name = "dart"
|
||||
icon_state = "toxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/bolt //ebow bolts
|
||||
name = "bolt"
|
||||
icon_state = "cbbolt"
|
||||
damage = 8
|
||||
damage_type = TOX
|
||||
nodamage = 0
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
|
||||
/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/tesla
|
||||
name = "tesla bolt"
|
||||
icon_state = "tesla_projectile"
|
||||
name = "tesla bolt"
|
||||
icon_state = "tesla_projectile"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
var/chain
|
||||
|
||||
var/chain
|
||||
|
||||
/obj/item/projectile/energy/tesla/fire(setAngle)
|
||||
if(firer)
|
||||
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
|
||||
..()
|
||||
|
||||
if(firer)
|
||||
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/tesla/Destroy()
|
||||
qdel(chain)
|
||||
return ..()
|
||||
|
||||
qdel(chain)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/energy/tesla/revolver
|
||||
name = "energy orb"
|
||||
|
||||
|
||||
/obj/item/projectile/energy/tesla/revolver/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
tesla_zap(target, 3, 10000)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/projectile/energy/tesla/cannon
|
||||
name = "tesla orb"
|
||||
|
||||
|
||||
/obj/item/projectile/energy/tesla/cannon/on_hit(atom/target)
|
||||
. = ..()
|
||||
. = ..()
|
||||
tesla_zap(target, 3, 10000, explosive = FALSE, stun_mobs = FALSE)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -277,6 +277,8 @@
|
||||
|
||||
to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")
|
||||
|
||||
to_chat(new_mob, config.policies["polymorph"])
|
||||
|
||||
qdel(M)
|
||||
return new_mob
|
||||
|
||||
@@ -292,7 +294,7 @@
|
||||
..()
|
||||
|
||||
/atom/proc/animate_atom_living(var/mob/living/owner = null)
|
||||
if((istype(src, /obj/item) || istype(src, /obj/structure)) && !is_type_in_list(src, GLOB.protected_objects))
|
||||
if((isitem(src) || istype(src, /obj/structure)) && !is_type_in_list(src, GLOB.protected_objects))
|
||||
if(istype(src, /obj/structure/statue/petrified))
|
||||
var/obj/structure/statue/petrified/P = src
|
||||
if(P.petrified_mob)
|
||||
@@ -412,3 +414,9 @@
|
||||
exp_light = -1
|
||||
exp_flash = 4
|
||||
exp_fire= 5
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/infernal/on_hit(target)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(target)
|
||||
for(var/i=0, i<50, i+=10)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
|
||||
|
||||
@@ -2,7 +2,7 @@ obj/item/projectile/energy/plasmabolt
|
||||
icon = 'icons/obj/VGProjectile.dmi'
|
||||
name = "plasma bolt"
|
||||
icon_state = "plasma"
|
||||
weaken = 0
|
||||
knockdown = 0
|
||||
flag = "energy"
|
||||
damage_type = BURN
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
@@ -14,17 +14,17 @@ obj/item/projectile/energy/plasmabolt
|
||||
damage = 35
|
||||
icon_state = "plasma2"
|
||||
irradiate = 20
|
||||
weaken = 3
|
||||
knockdown = 60
|
||||
|
||||
/obj/item/projectile/energy/plasmabolt/rifle
|
||||
damage = 50
|
||||
icon_state = "plasma3"
|
||||
irradiate = 35
|
||||
weaken = 5
|
||||
knockdown = 120
|
||||
|
||||
/obj/item/projectile/energy/plasmabolt/MP40k
|
||||
damage = 35
|
||||
eyeblur = 4
|
||||
irradiate = 25
|
||||
weaken = 4
|
||||
knockdown = 100
|
||||
icon_state = "plasma3"
|
||||
@@ -59,7 +59,7 @@
|
||||
if(istype(target, /obj/mecha))
|
||||
var/obj/mecha/M = target
|
||||
M.take_damage(anti_armour_damage)
|
||||
if(istype(target, /mob/living/silicon))
|
||||
if(issilicon(target))
|
||||
var/mob/living/silicon/S = target
|
||||
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
|
||||
return 1
|
||||
@@ -183,12 +183,12 @@
|
||||
return ..()
|
||||
if(!gun)
|
||||
qdel(src)
|
||||
gun.create_portal(src)
|
||||
gun.create_portal(src, get_turf(src))
|
||||
|
||||
/obj/item/projectile/bullet/frag12
|
||||
name ="explosive slug"
|
||||
damage = 25
|
||||
weaken = 5
|
||||
knockdown = 50
|
||||
|
||||
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
@@ -199,23 +199,20 @@
|
||||
name = "plasma blast"
|
||||
icon_state = "plasmacutter"
|
||||
damage_type = BRUTE
|
||||
damage = 5
|
||||
range = 3.5 //works as 4, but doubles to 7
|
||||
damage = 20
|
||||
range = 4
|
||||
dismemberment = 20
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
var/mine_range = 3 //mines this many additional tiles
|
||||
var/pressure_decrease_active = FALSE
|
||||
var/pressure_decrease = 0.25
|
||||
var/mine_range = 3 //mines this many additional tiles of rock
|
||||
|
||||
/obj/item/projectile/plasma/Initialize()
|
||||
. = ..()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
if(!isturf(proj_turf))
|
||||
return
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 60)
|
||||
name = "full strength [name]"
|
||||
damage *= 4
|
||||
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)
|
||||
. = ..()
|
||||
@@ -229,19 +226,19 @@
|
||||
return -1
|
||||
|
||||
/obj/item/projectile/plasma/adv
|
||||
damage = 7
|
||||
damage = 28
|
||||
range = 5
|
||||
mine_range = 5
|
||||
|
||||
/obj/item/projectile/plasma/adv/mech
|
||||
damage = 10
|
||||
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 = 6
|
||||
damage = 24
|
||||
range = 7
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user