what is this
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
name = "\improper PM-9HEDP"
|
||||
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
|
||||
caliber = "84mm"
|
||||
icon_state = "s-casing-live"
|
||||
icon_state = "84mm-hedp"
|
||||
projectile_type = /obj/item/projectile/bullet/a84mm
|
||||
|
||||
/obj/item/ammo_casing/caseless/a75
|
||||
|
||||
@@ -62,3 +62,8 @@
|
||||
e_cost = 200
|
||||
select_name = "stun"
|
||||
projectile_type = /obj/item/projectile/energy/tesla/revolver
|
||||
|
||||
/obj/item/ammo_casing/energy/emitter
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
e_cost = 2000 //20,000 is in the cell making this 10 shots before reload
|
||||
projectile_type = /obj/item/projectile/beam/emitter
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
max_ammo = 1
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/rocketlauncher
|
||||
name = "grenade launcher internal magazine"
|
||||
name = "rocket launcher internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/rocket
|
||||
caliber = "84mm"
|
||||
max_ammo = 1
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
var/fire_delay = 0 //rate of fire for burst firing and semi auto
|
||||
var/firing_burst = 0 //Prevent the weapon from firing again while already firing
|
||||
var/semicd = 0 //cooldown handler
|
||||
var/weapon_weight = WEAPON_LIGHT
|
||||
var/weapon_weight = WEAPON_LIGHT //currently only used for inaccuracy
|
||||
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/inaccuracy_modifier = 1
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
@@ -538,3 +539,13 @@
|
||||
if(A == chambered)
|
||||
chambered = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/proc/getinaccuracy(mob/living/user)
|
||||
if(!iscarbon(user))
|
||||
return FALSE
|
||||
else
|
||||
var/mob/living/carbon/holdingdude = user
|
||||
if(istype(holdingdude) && holdingdude.combatmode)
|
||||
return (max((holdingdude.lastdirchange + weapon_weight * 25) - world.time,0) * inaccuracy_modifier)
|
||||
else
|
||||
return ((weapon_weight * 25) * inaccuracy_modifier)
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
inaccuracy_modifier = 0.7
|
||||
casing_ejector = FALSE
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
magazine_wording = "rocket"
|
||||
@@ -108,34 +109,33 @@
|
||||
/obj/item/gun/ballistic/rocketlauncher/can_shoot()
|
||||
return chambered?.BB
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/process_chamber()
|
||||
if(chambered)
|
||||
chambered = null
|
||||
if(magazine)
|
||||
QDEL_NULL(magazine)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/attack_self_tk(mob/user)
|
||||
return //too difficult to remove the rocket with TK
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/attack_self(mob/living/user)
|
||||
if(magazine)
|
||||
if(chambered)
|
||||
chambered.forceMove(magazine)
|
||||
magazine.stored_ammo.Insert(1, chambered)
|
||||
var/obj/item/ammo_casing/AC = chambered
|
||||
if(AC)
|
||||
if(!user.put_in_hands(AC))
|
||||
AC.bounce_away(FALSE, NONE)
|
||||
to_chat(user, "<span class='notice'>You remove \the [AC] from \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, TRUE)
|
||||
chambered = null
|
||||
else
|
||||
stack_trace("Removed [magazine] from [src] without a chambered round")
|
||||
magazine.forceMove(drop_location())
|
||||
if(user.is_holding(src))
|
||||
user.put_in_hands(magazine)
|
||||
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, TRUE)
|
||||
to_chat(user, "<span class='notice'>You work the [magazine] out from [src].</span>")
|
||||
magazine = null
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's no rocket in [src].</span>")
|
||||
to_chat(user, "<span class='notice'>There's no [magazine_wording] in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/attackby(obj/item/A, mob/user, params)
|
||||
if(magazine && istype(A, /obj/item/ammo_casing))
|
||||
if(chambered)
|
||||
to_chat(user, "<span class='notice'>[src] already has a [magazine_wording] chambered.</span>")
|
||||
return
|
||||
if(magazine.attackby(A, user, silent = TRUE))
|
||||
to_chat(user, "<span class='notice'>You load a new [A] into \the [src].</span>")
|
||||
playsound(src, "gun_insert_full_magazine", 70, 1)
|
||||
chamber_round()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/rocketlauncher/update_icon()
|
||||
icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(istype(user) && user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
|
||||
return//CIT CHANGE - ditto
|
||||
pump(user)
|
||||
pump(user, TRUE)
|
||||
recentpump = world.time + 10
|
||||
if(istype(user))//CIT CHANGE - makes pumping shotguns cost a lil bit of stamina.
|
||||
user.adjustStaminaLossBuffered(2) //CIT CHANGE - DITTO. make this scale inversely to the strength stat when stats/skills are added
|
||||
@@ -52,7 +52,9 @@
|
||||
process_fire(user, user, FALSE)
|
||||
. = 1
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/proc/pump(mob/M)
|
||||
/obj/item/gun/ballistic/shotgun/proc/pump(mob/M, visible = TRUE)
|
||||
if(visible)
|
||||
M.visible_message("<span class='warning'>[M] racks [src].</span>", "<span class='warning'>You rack [src].</span>")
|
||||
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
pump_unload(M)
|
||||
pump_reload(M)
|
||||
@@ -212,14 +214,41 @@
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
|
||||
name = "compact combat shotgun"
|
||||
desc = "A compact version of the semi automatic combat shotgun. For close encounters."
|
||||
name = "warden's combat shotgun"
|
||||
desc = "A modified version of the semi automatic combat shotgun with a collapsible stock. For close encounters."
|
||||
icon_state = "cshotgunc"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/com/compact
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
unique_reskin = list("Tatical" = "cshotgunc",
|
||||
"Slick" = "cshotgunc_slick"
|
||||
)
|
||||
var/stock = FALSE
|
||||
recoil = 5
|
||||
spread = 2
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
toggle_stock(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to toggle the stock.</span>")
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/proc/toggle_stock(mob/living/user)
|
||||
stock = !stock
|
||||
if(stock)
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
to_chat(user, "You unfold the stock.")
|
||||
recoil = 1
|
||||
spread = 0
|
||||
else
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
to_chat(user, "You fold the stock.")
|
||||
recoil = 5
|
||||
spread = 2
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon()
|
||||
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
|
||||
|
||||
//Dual Feed Shotgun
|
||||
|
||||
@@ -235,6 +264,7 @@
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to pump it.</span>")
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -304,3 +304,22 @@
|
||||
|
||||
/obj/item/gun/energy/gravity_gun/security
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
//Emitter Gun
|
||||
|
||||
/obj/item/gun/energy/emitter
|
||||
name = "Emitter Carbine"
|
||||
desc = "A small emitter fitted into a handgun case, do to size constraints and safety it can only shoot about ten times when fully charged."
|
||||
icon_state = "emitter_carbine"
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
cell_type = /obj/item/stock_parts/cell/super
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
|
||||
|
||||
/obj/item/gun/energy/emitter/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
|
||||
add_overlay("emitter_carbine_empty")
|
||||
else
|
||||
add_overlay("emitter_carbine")
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10))
|
||||
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
|
||||
@@ -37,10 +37,12 @@
|
||||
to_chat(user, "<span class ='notice'>This firearm already has a firing pin installed.</span>")
|
||||
|
||||
/obj/item/firing_pin/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
gun = G
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
/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
|
||||
do_teleport(L, teletarget, 2, channel = TELEPORT_CHANNEL_BLUESPACE)//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.
|
||||
do_teleport(L, L, 15, channel = TELEPORT_CHANNEL_BLUESPACE) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
teleloc = target.loc
|
||||
for(var/atom/movable/stuff in teleloc)
|
||||
if(!stuff.anchored && stuff.loc)
|
||||
if(do_teleport(stuff, stuff, 10))
|
||||
if(do_teleport(stuff, stuff, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
teleammount++
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(max(round(4 - teleammount),0), stuff.loc) //Smoke drops off if a lot of stuff is moved for the sake of sanity
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var/anti_armour_damage = 200
|
||||
armour_penetration = 100
|
||||
dismemberment = 100
|
||||
ricochets_max = 0
|
||||
|
||||
/obj/item/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user