Experimental Guns No8. PGM Hecate II
@@ -79,9 +79,12 @@ var/const/SURROUND_CAP = 7
|
|||||||
#define MIN_SOUND_PRESSURE 2 //2 kPa of pressure required to at least hear sound
|
#define MIN_SOUND_PRESSURE 2 //2 kPa of pressure required to at least hear sound
|
||||||
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, gas_modified)
|
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, gas_modified)
|
||||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/playsound_local() called tick#: [world.time]")
|
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/playsound_local() called tick#: [world.time]")
|
||||||
if(!src.client || ear_deaf > 0)
|
if(!src.client)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(ear_deaf > 0)
|
||||||
|
vol = vol / (1 + ear_deaf)
|
||||||
|
|
||||||
if(gas_modified)
|
if(gas_modified)
|
||||||
var/turf/current_turf = get_turf(src)
|
var/turf/current_turf = get_turf(src)
|
||||||
if(!current_turf)
|
if(!current_turf)
|
||||||
|
|||||||
@@ -949,12 +949,13 @@ var/global/list/damage_icon_parts = list()
|
|||||||
r_hand.screen_loc = ui_rhand //TODO
|
r_hand.screen_loc = ui_rhand //TODO
|
||||||
var/t_state = r_hand.item_state
|
var/t_state = r_hand.item_state
|
||||||
var/t_inhand_state = r_hand.inhand_states["right_hand"]
|
var/t_inhand_state = r_hand.inhand_states["right_hand"]
|
||||||
|
var/icon/check_dimensions = new(t_inhand_state)
|
||||||
if(!t_state) t_state = r_hand.icon_state
|
if(!t_state) t_state = r_hand.icon_state
|
||||||
var/obj/Overlays/O = obj_overlays[R_HAND_LAYER]
|
var/obj/Overlays/O = obj_overlays[R_HAND_LAYER]
|
||||||
O.icon = t_inhand_state
|
O.icon = t_inhand_state
|
||||||
O.icon_state = t_state
|
O.icon_state = t_state
|
||||||
O.pixel_x = (t_inhand_state.Width - 32)/2
|
O.pixel_x = -1*(check_dimensions.Width() - 32)/2
|
||||||
O.pixel_y = (t_inhand_state.Height - 32)/2
|
O.pixel_y = -1*(check_dimensions.Height() - 32)/2
|
||||||
overlays += O
|
overlays += O
|
||||||
obj_overlays[R_HAND_LAYER] = O
|
obj_overlays[R_HAND_LAYER] = O
|
||||||
//overlays_standing[R_HAND_LAYER] = image("icon" = t_inhand_state, "icon_state" = "[t_state]")
|
//overlays_standing[R_HAND_LAYER] = image("icon" = t_inhand_state, "icon_state" = "[t_state]")
|
||||||
@@ -970,13 +971,14 @@ var/global/list/damage_icon_parts = list()
|
|||||||
if(l_hand)
|
if(l_hand)
|
||||||
l_hand.screen_loc = ui_lhand //TODO
|
l_hand.screen_loc = ui_lhand //TODO
|
||||||
var/t_state = l_hand.item_state
|
var/t_state = l_hand.item_state
|
||||||
var/t_inhand_state = l_hand.inhand_states["left_hand"]
|
var/icon/t_inhand_state = l_hand.inhand_states["left_hand"]
|
||||||
|
var/icon/check_dimensions = new(t_inhand_state)
|
||||||
if(!t_state) t_state = l_hand.icon_state
|
if(!t_state) t_state = l_hand.icon_state
|
||||||
var/obj/Overlays/O = obj_overlays[L_HAND_LAYER]
|
var/obj/Overlays/O = obj_overlays[L_HAND_LAYER]
|
||||||
O.icon = t_inhand_state
|
O.icon = t_inhand_state
|
||||||
O.icon_state = t_state
|
O.icon_state = t_state
|
||||||
O.pixel_x = (t_inhand_state.Width - 32)/2
|
O.pixel_x = -1*(check_dimensions.Width() - 32)/2
|
||||||
O.pixel_y = (t_inhand_state.Height - 32)/2
|
O.pixel_y = -1*(check_dimensions.Height() - 32)/2
|
||||||
overlays += O
|
overlays += O
|
||||||
obj_overlays[L_HAND_LAYER] = O
|
obj_overlays[L_HAND_LAYER] = O
|
||||||
//overlays_standing[L_HAND_LAYER] = image("icon" = t_inhand_state, "icon_state" = "[t_state]")
|
//overlays_standing[L_HAND_LAYER] = image("icon" = t_inhand_state, "icon_state" = "[t_state]")
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
return 2
|
return 2
|
||||||
if(!P.nodamage)
|
if(!P.nodamage)
|
||||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, used_weapon = P)
|
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, used_weapon = P)
|
||||||
|
regenerate_icons()
|
||||||
P.on_hit(src, absorb)
|
P.on_hit(src, absorb)
|
||||||
if(istype(P, /obj/item/projectile/beam/lightning))
|
if(istype(P, /obj/item/projectile/beam/lightning))
|
||||||
if(P.damage >= 200)
|
if(P.damage >= 200)
|
||||||
|
|||||||
@@ -127,10 +127,16 @@
|
|||||||
projectile_type = "/obj/item/projectile/bullet"
|
projectile_type = "/obj/item/projectile/bullet"
|
||||||
w_type = RECYK_METAL
|
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
|
/obj/item/ammo_casing/energy/kinetic
|
||||||
projectile_type = /obj/item/projectile/bullet
|
projectile_type = /obj/item/projectile/bullet
|
||||||
//select_name = "kinetic"
|
//select_name = "kinetic"
|
||||||
//e_cost = 500
|
//e_cost = 500
|
||||||
//fire_sound = 'sound/weapons/Gunshot4.ogg'
|
//fire_sound = 'sound/weapons/Gunshot4.ogg'
|
||||||
w_type = RECYK_METAL
|
w_type = RECYK_METAL
|
||||||
|
|||||||
@@ -112,9 +112,9 @@
|
|||||||
|
|
||||||
if(levelupsound)
|
if(levelupsound)
|
||||||
for(var/mob/M in get_turf(src))
|
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)
|
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()
|
/obj/item/weapon/gun/energy/polarstar/proc/set_firesound()
|
||||||
@@ -174,6 +174,7 @@
|
|||||||
origin_tech = 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')
|
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
|
recoil = 1
|
||||||
|
slot_flags = null
|
||||||
flags = FPRINT | TWOHANDABLE
|
flags = FPRINT | TWOHANDABLE
|
||||||
w_class = 5.0//we be fuckin huge maaan
|
w_class = 5.0//we be fuckin huge maaan
|
||||||
fire_delay = 0
|
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')
|
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
|
recoil = 1
|
||||||
flags = FPRINT
|
flags = FPRINT
|
||||||
|
slot_flags = null
|
||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
fire_delay = 2
|
fire_delay = 2
|
||||||
caliber = list("nikita" = 1)
|
caliber = list("nikita" = 1)
|
||||||
@@ -747,49 +749,54 @@
|
|||||||
pixel_x = rand(-10.0, 10)
|
pixel_x = rand(-10.0, 10)
|
||||||
pixel_y = rand(-10.0, 10)
|
pixel_y = rand(-10.0, 10)
|
||||||
|
|
||||||
/obj/item/weapon/gun/hecate
|
/obj/item/weapon/gun/projectile/hecate
|
||||||
name = "\improper Overwatch Standard Issue Pulse Rifle"
|
name = "\improper PGM H<>cate II"
|
||||||
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."
|
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 = 'icons/obj/gun_experimental.dmi'
|
||||||
icon_state = "hecateII"
|
icon_state = "hecate"
|
||||||
item_state = "hecateII"
|
item_state = null
|
||||||
origin_tech = 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')
|
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
|
recoil = 2
|
||||||
fire_delay = 0
|
slot_flags = null
|
||||||
w_class = 3.0
|
fire_delay = 30
|
||||||
fire_sound = 'sound/weapons/osipr_fire.ogg'
|
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
|
var/backup_view = 7
|
||||||
|
|
||||||
/obj/item/weapon/gun/hecate/update_wield(mob/user)
|
/obj/item/weapon/gun/projectile/hecate/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params, struggle = 0)
|
||||||
item_state = "minigun[wielded ? 1 : 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)
|
if(wielded)
|
||||||
slowdown = 10
|
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
|
else
|
||||||
slowdown = 0
|
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()
|
/obj/item/weapon/gun/projectile/hecate/attack_self(mob/user)
|
||||||
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)
|
|
||||||
if(wielded)
|
if(wielded)
|
||||||
unwield(user)
|
unwield(user)
|
||||||
else
|
else
|
||||||
wield(user)
|
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)
|
for(var/mob/M in A)
|
||||||
M.bullet_act(src, def_zone)
|
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.
|
//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()
|
var/reaction_type = A.projectile_check()
|
||||||
if(bounces && (bounce_type & reaction_type))
|
if(bounces && (bounce_type & reaction_type))
|
||||||
@@ -274,7 +277,20 @@ var/list/impact_master = list()
|
|||||||
return 1
|
return 1
|
||||||
else if(phases && (phase_type & reaction_type))
|
else if(phases && (phase_type & reaction_type))
|
||||||
src.forceMove(get_step(src.loc,dir))
|
src.forceMove(get_step(src.loc,dir))
|
||||||
|
if(linear_movement)
|
||||||
|
update_pixel()
|
||||||
|
pixel_x = PixelX
|
||||||
|
pixel_y = PixelY
|
||||||
phases--
|
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
|
return 1
|
||||||
|
|
||||||
bullet_die()
|
bullet_die()
|
||||||
|
|||||||
@@ -954,3 +954,42 @@
|
|||||||
s.start()
|
s.start()
|
||||||
T.turf_animation('icons/obj/projectiles_impacts.dmi',"dark_explosion",0, 0, 13, 'sound/weapons/osipr_altexplosion.ogg')
|
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
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 531 KiB After Width: | Height: | Size: 531 KiB |
|
Before Width: | Height: | Size: 389 KiB After Width: | Height: | Size: 389 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.0 KiB |