mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Experimental Guns No8. PGM Hecate II
This commit is contained in:
@@ -127,10 +127,16 @@
|
||||
projectile_type = "/obj/item/projectile/bullet"
|
||||
w_type = RECYK_METAL
|
||||
|
||||
/obj/item/ammo_casing/BMG50
|
||||
desc = "A .50 BMG bullet casing."
|
||||
caliber = ".50BMG"
|
||||
projectile_type = "/obj/item/projectile/bullet/hecate"
|
||||
w_type = RECYK_METAL
|
||||
icon_state = "l-casing"
|
||||
|
||||
/obj/item/ammo_casing/energy/kinetic
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
//select_name = "kinetic"
|
||||
//e_cost = 500
|
||||
//fire_sound = 'sound/weapons/Gunshot4.ogg'
|
||||
w_type = RECYK_METAL
|
||||
w_type = RECYK_METAL
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
|
||||
if(levelupsound)
|
||||
for(var/mob/M in get_turf(src))
|
||||
M.playsound_local(M, levelupsound, 100, 0)
|
||||
M.playsound_local(M, levelupsound, 100, 0, null, FALLOFF_SOUNDS, 0)
|
||||
spawn(1)
|
||||
M.playsound_local(M, levelupsound, 75, 0)
|
||||
M.playsound_local(M, levelupsound, 75, 0, null, FALLOFF_SOUNDS, 0)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/polarstar/proc/set_firesound()
|
||||
@@ -174,6 +174,7 @@
|
||||
origin_tech = null
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guns_experimental.dmi', "right_hand" = 'icons/mob/in-hand/right/guns_experimental.dmi')
|
||||
recoil = 1
|
||||
slot_flags = null
|
||||
flags = FPRINT | TWOHANDABLE
|
||||
w_class = 5.0//we be fuckin huge maaan
|
||||
fire_delay = 0
|
||||
@@ -521,6 +522,7 @@
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guns_experimental.dmi', "right_hand" = 'icons/mob/in-hand/right/guns_experimental.dmi')
|
||||
recoil = 1
|
||||
flags = FPRINT
|
||||
slot_flags = null
|
||||
w_class = 4.0
|
||||
fire_delay = 2
|
||||
caliber = list("nikita" = 1)
|
||||
@@ -747,49 +749,54 @@
|
||||
pixel_x = rand(-10.0, 10)
|
||||
pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/gun/hecate
|
||||
name = "\improper Overwatch Standard Issue Pulse Rifle"
|
||||
desc = "Centuries ago those weapons striked fear in all of humanity when the Combine attacked the Earth. Nowadays these are just the best guns that the Syndicate can provide to its Elite Troops with its tight budget."
|
||||
/obj/item/weapon/gun/projectile/hecate
|
||||
name = "\improper PGM H<>cate II"
|
||||
desc = "An Anti-Materiel Rifle. You can read \"Fabriqu<71> en Haute-Savoie\" on the receiver. Whatever that means..."
|
||||
icon = 'icons/obj/gun_experimental.dmi'
|
||||
icon_state = "hecateII"
|
||||
item_state = "hecateII"
|
||||
icon_state = "hecate"
|
||||
item_state = null
|
||||
origin_tech = null
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guns_experimental.dmi', "right_hand" = 'icons/mob/in-hand/right/guns_experimental.dmi')
|
||||
recoil = 1
|
||||
fire_delay = 0
|
||||
w_class = 3.0
|
||||
fire_sound = 'sound/weapons/osipr_fire.ogg'
|
||||
recoil = 2
|
||||
slot_flags = null
|
||||
fire_delay = 30
|
||||
w_class = 4.0
|
||||
fire_sound = 'sound/weapons/hecate_fire.ogg'
|
||||
caliber = list(".50BMG" = 1)
|
||||
ammo_type = "/obj/item/ammo_casing/BMG50"
|
||||
max_shells = 1
|
||||
load_method = 0
|
||||
var/backup_view = 7
|
||||
|
||||
/obj/item/weapon/gun/hecate/update_wield(mob/user)
|
||||
item_state = "minigun[wielded ? 1 : 0]"
|
||||
/obj/item/weapon/gun/projectile/hecate/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params, struggle = 0)
|
||||
if(flag) return //we're placing gun on a table or in backpack
|
||||
if(harm_labeled >= min_harm_label)
|
||||
user << "<span class='warning'>A label sticks the trigger to the trigger guard!</span>" //Such a new feature, the player might not know what's wrong if it doesn't tell them.
|
||||
return
|
||||
if(wielded)
|
||||
Fire(A,user,params, "struggle" = struggle)
|
||||
else
|
||||
user << "<span class='warning'>You must dual-wield \the [src] before you can fire it!</span>"
|
||||
|
||||
/obj/item/weapon/gun/projectile/hecate/update_wield(mob/user)
|
||||
if(wielded)
|
||||
slowdown = 10
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guns_64x64.dmi', "right_hand" = 'icons/mob/in-hand/right/guns_64x64.dmi')
|
||||
if(user && user.client)
|
||||
user.regenerate_icons()
|
||||
var/client/C = user.client
|
||||
backup_view = C.view
|
||||
C.view = C.view * 2
|
||||
else
|
||||
slowdown = 0
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guns_experimental.dmi', "right_hand" = 'icons/mob/in-hand/right/guns_experimental.dmi')
|
||||
if(user && user.client)
|
||||
user.regenerate_icons()
|
||||
var/client/C = user.client
|
||||
C.view = backup_view
|
||||
|
||||
/obj/item/weapon/gun/hecate/process_chambered()
|
||||
if(in_chamber) return 1
|
||||
if(current_shells)
|
||||
current_shells--
|
||||
update_icon()
|
||||
in_chamber = new/obj/item/projectile/bullet/gatling()//We create bullets as we are about to fire them. No other way to remove them from the gatling.
|
||||
new/obj/item/ammo_casing_gatling(get_turf(src))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/hecate/attack_self(mob/user)
|
||||
/obj/item/weapon/gun/projectile/hecate/attack_self(mob/user)
|
||||
if(wielded)
|
||||
unwield(user)
|
||||
else
|
||||
wield(user)
|
||||
|
||||
/obj/item/weapon/gun/hecate/wield(mob/user)
|
||||
if(user && user.client)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/hecate/unwield(mob/user)
|
||||
if(user && user.client)
|
||||
|
||||
..()
|
||||
|
||||
@@ -266,6 +266,9 @@ var/list/impact_master = list()
|
||||
for(var/mob/M in A)
|
||||
M.bullet_act(src, def_zone)
|
||||
|
||||
if(!A)
|
||||
return 1
|
||||
|
||||
//the bullets first checks if it can bounce off the obstacle, and if it cannot it then checks if it can phase through it, if it cannot either then it dies.
|
||||
var/reaction_type = A.projectile_check()
|
||||
if(bounces && (bounce_type & reaction_type))
|
||||
@@ -274,7 +277,20 @@ var/list/impact_master = list()
|
||||
return 1
|
||||
else if(phases && (phase_type & reaction_type))
|
||||
src.forceMove(get_step(src.loc,dir))
|
||||
if(linear_movement)
|
||||
update_pixel()
|
||||
pixel_x = PixelX
|
||||
pixel_y = PixelY
|
||||
phases--
|
||||
if(isturf(A))//if the bullet goes through a wall, we leave a nice mark on it
|
||||
damage -= (damage/4)//and diminish the bullet's damage a bit
|
||||
var/turf/T = A
|
||||
var/icon/I = icon(T.icon, T.icon_state)
|
||||
var/icon/trace = icon('icons/effects/96x96.dmi',"trace")
|
||||
trace.Turn(target_angle+45)
|
||||
trace.Crop(33-pixel_x,33-pixel_y,64-pixel_x,64-pixel_y)
|
||||
I.Blend(trace,ICON_MULTIPLY ,1 ,1)
|
||||
T.icon = I
|
||||
return 1
|
||||
|
||||
bullet_die()
|
||||
|
||||
@@ -954,3 +954,42 @@
|
||||
s.start()
|
||||
T.turf_animation('icons/obj/projectiles_impacts.dmi',"dark_explosion",0, 0, 13, 'sound/weapons/osipr_altexplosion.ogg')
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/hecate
|
||||
icon = 'icons/obj/projectiles_experimental.dmi'
|
||||
icon_state = "hecate"
|
||||
damage = 101//you're going to crit, lad
|
||||
kill_count = 255//oh boy, we're crossing through the entire Z level!
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
phase_type = PROJREACT_WALLS|PROJREACT_WINDOWS|PROJREACT_OBJS|PROJREACT_MOBS
|
||||
phases = 2//goes through up to two obstacle. That also means it can potentially hit three mobs at once. dayumm
|
||||
var/superspeed = 1
|
||||
|
||||
/obj/item/projectile/bullet/hecate/OnFired()
|
||||
..()
|
||||
for (var/mob/M in player_list)
|
||||
if(M && M.client)
|
||||
var/turf/M_turf = get_turf(M)
|
||||
if(M_turf && (M_turf.z == starting.z))
|
||||
M.playsound_local(starting, 'sound/weapons/hecate_fire_far.ogg', 25, 1)
|
||||
for (var/mob/living/carbon/human/H in range(src,1))
|
||||
if(!H.is_on_ears(/obj/item/clothing/ears/earmuffs))//TODO BEFORE MERGING ON THE MAIN SERVER: replace with H.earprot()
|
||||
H.Weaken(2)
|
||||
H.Stun(2)
|
||||
H.ear_damage += rand(3, 5)
|
||||
H.ear_deaf = max(H.ear_deaf,15)
|
||||
H << "<span class='warning'>Your ears ring!</span>"
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/hecate/bresenham_step(var/distA, var/distB, var/dA, var/dB)
|
||||
if(..())
|
||||
if(superspeed)
|
||||
superspeed = 0
|
||||
return 1
|
||||
else
|
||||
superspeed = 1
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user