Merge branch 'master' into spike-loot-differentces
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
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.
|
||||
/// Override this to make the gun check for a different cooldown rather than CLICK_CD_RANGE, which is 4 deciseconds.
|
||||
var/click_cooldown_override
|
||||
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired.
|
||||
var/heavy_metal = TRUE
|
||||
var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
/obj/item/ammo_casing/proc/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
|
||||
distro += variance
|
||||
for (var/i = max(1, pellets), i > 0, i--)
|
||||
var/targloc = get_turf(target)
|
||||
ready_proj(target, user, quiet, zone_override, fired_from)
|
||||
var/targloc = get_turf(target)
|
||||
ready_proj(target, user, quiet, zone_override, fired_from)
|
||||
if(pellets == 1)
|
||||
if(distro) //We have to spread a pixel-precision bullet. throw_proj was called before so angles should exist by now...
|
||||
if(randomspread)
|
||||
spread = round((rand() - 0.5) * distro)
|
||||
else //Smart spread
|
||||
spread = round((i / pellets - 0.5) * distro)
|
||||
spread = round(1 - 0.5) * distro
|
||||
if(!throw_proj(target, targloc, user, params, spread))
|
||||
return 0
|
||||
if(i > 1)
|
||||
newshot()
|
||||
if(click_cooldown_override)
|
||||
user.changeNext_move(click_cooldown_override)
|
||||
return FALSE
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_RANGE)
|
||||
if(isnull(BB))
|
||||
return FALSE
|
||||
AddComponent(/datum/component/pellet_cloud, projectile_type, pellets)
|
||||
SEND_SIGNAL(src, COMSIG_PELLET_CLOUD_INIT, target, user, fired_from, randomspread, spread, zone_override, params, distro)
|
||||
|
||||
user.DelayNextAction(considered_action = TRUE, immediate = FALSE)
|
||||
user.newtonian_move(get_dir(target, user))
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -31,7 +32,7 @@
|
||||
else
|
||||
BB.def_zone = user.zone_selected
|
||||
BB.suppressed = quiet
|
||||
|
||||
|
||||
if(isgun(fired_from))
|
||||
var/obj/item/gun/G = fired_from
|
||||
BB.damage *= G.projectile_damage_multiplier
|
||||
|
||||
@@ -21,3 +21,16 @@
|
||||
name = "1.95x129mm incendiary bullet casing"
|
||||
desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames."
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129
|
||||
|
||||
/obj/item/ammo_casing/mm712x82/match
|
||||
name = "7.12x82mm match bullet casing"
|
||||
desc = "A 7.12x82mm bullet casing manufactured to unfailingly high standards, you could pull off some cool trickshots with this."
|
||||
projectile_type = /obj/item/projectile/bullet/mm712x82_match
|
||||
|
||||
/obj/item/projectile/bullet/mm712x82_match
|
||||
name = "7.12x82mm match bullet"
|
||||
damage = 40
|
||||
ricochets_max = 2
|
||||
ricochet_chance = 60
|
||||
ricochet_auto_aim_range = 4
|
||||
ricochet_incidence_leeway = 35
|
||||
@@ -51,17 +51,3 @@
|
||||
desc = "A .50AE bullet casing."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/a50AE
|
||||
|
||||
// .32 ACP (Improvised Pistol)
|
||||
|
||||
/obj/item/ammo_casing/c32acp
|
||||
name = ".32 bullet casing"
|
||||
desc = "A .32 bullet casing."
|
||||
caliber = "c32acp"
|
||||
projectile_type = /obj/item/projectile/bullet/c32acp
|
||||
|
||||
/obj/item/ammo_casing/r32acp
|
||||
name = ".32 rubber bullet casing"
|
||||
desc = "A .32 rubber bullet casing."
|
||||
caliber = "c32acp"
|
||||
projectile_type = /obj/item/projectile/bullet/r32acp
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
desc = "A .357 armor-piercing bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/a357/ap
|
||||
|
||||
/obj/item/ammo_casing/a357/match
|
||||
name = ".357 match bullet casing"
|
||||
desc = "A .357 bullet casing, manufactured to exceedingly high standards."
|
||||
caliber = "357"
|
||||
projectile_type = /obj/item/projectile/bullet/a357/match
|
||||
|
||||
// 7.62x38mmR (Nagant Revolver)
|
||||
|
||||
/obj/item/ammo_casing/n762
|
||||
@@ -47,4 +53,19 @@
|
||||
name = ".38 Iceblox bullet casing"
|
||||
desc = "A .38 Iceblox bullet casing."
|
||||
caliber = "38"
|
||||
projectile_type = /obj/item/projectile/bullet/c38/iceblox
|
||||
projectile_type = /obj/item/projectile/bullet/c38/iceblox
|
||||
|
||||
/obj/item/ammo_casing/c38/match
|
||||
name = ".38 Match bullet casing"
|
||||
desc = "A .38 bullet casing, manufactured to exceedingly high standards."
|
||||
projectile_type = /obj/item/projectile/bullet/c38/match
|
||||
|
||||
/obj/item/ammo_casing/c38/match/bouncy
|
||||
name = ".38 Rubber bullet casing"
|
||||
desc = "A .38 rubber bullet casing, manufactured to exceedingly high standards."
|
||||
projectile_type = /obj/item/projectile/bullet/c38/match/bouncy
|
||||
|
||||
/obj/item/ammo_casing/c38/dumdum
|
||||
name = ".38 DumDum bullet casing"
|
||||
desc = "A .38 DumDum bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/c38/dumdum
|
||||
@@ -8,6 +8,18 @@
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_slug
|
||||
custom_materials = list(/datum/material/iron=4000)
|
||||
|
||||
obj/item/ammo_casing/shotgun/executioner
|
||||
name = "executioner slug"
|
||||
desc = "A 12 gauge lead slug purpose built to annihilate flesh on impact."
|
||||
icon_state = "stunshell"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_slug/executioner
|
||||
|
||||
/obj/item/ammo_casing/shotgun/pulverizer
|
||||
name = "pulverizer slug"
|
||||
desc = "A 12 gauge lead slug purpose built to annihilate bones on impact."
|
||||
icon_state = "stunshell"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_slug/pulverizer
|
||||
|
||||
/obj/item/ammo_casing/shotgun/beanbag
|
||||
name = "beanbag slug"
|
||||
desc = "A weak beanbag slug for riot control."
|
||||
@@ -143,3 +155,12 @@
|
||||
reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 5) //this and the acid equal about 25ish burn, not counting the minute toxin damage dealt by their metabolism, this makes each dart about as lethal as a stechkin shot in upfront damage
|
||||
reagents.add_reagent(/datum/reagent/toxin/acid, 5)
|
||||
reagents.add_reagent(/datum/reagent/consumable/frostoil, 10) //tempgun slowdown goes both ways and adds to the burn
|
||||
|
||||
/obj/item/ammo_casing/shotgun/incapacitate
|
||||
name = "custom incapacitating shot"
|
||||
desc = "A shotgun casing filled with... something. used to incapacitate targets."
|
||||
icon_state = "bountyshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_incapacitate
|
||||
pellets = 12//double the pellets, but half the stun power of each, which makes this best for just dumping right in someone's face.
|
||||
variance = 25
|
||||
custom_materials = list(/datum/material/iron=4000)
|
||||
@@ -12,15 +12,6 @@
|
||||
e_cost = 200
|
||||
select_name = "kill"
|
||||
|
||||
/obj/item/ammo_casing/energy/lasergun/improvised
|
||||
projectile_type = /obj/item/projectile/beam/weak/improvised
|
||||
e_cost = 200
|
||||
select_name = "kill"
|
||||
|
||||
/obj/item/ammo_casing/energy/lasergun/improvised/upgraded
|
||||
projectile_type = /obj/item/projectile/beam/weak
|
||||
e_cost = 100
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/hos
|
||||
e_cost = 100
|
||||
|
||||
@@ -46,6 +37,11 @@
|
||||
select_name = "anti-vehicle"
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/hellfire
|
||||
projectile_type = /obj/item/projectile/beam/laser/hellfire
|
||||
e_cost = 130
|
||||
select_name = "maim"
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/pulse
|
||||
projectile_type = /obj/item/projectile/beam/pulse
|
||||
e_cost = 200
|
||||
|
||||
@@ -75,4 +75,9 @@
|
||||
/obj/item/ammo_casing/energy/shrink
|
||||
projectile_type = /obj/item/projectile/beam/shrink
|
||||
select_name = "shrink ray"
|
||||
e_cost = 200
|
||||
e_cost = 200
|
||||
|
||||
/obj/item/ammo_casing/energy/pickle //ammo for an adminspawn gun
|
||||
projectile_type = /obj/item/projectile/energy/pickle
|
||||
select_name = "pickle ray"
|
||||
e_cost = 0
|
||||
@@ -114,11 +114,13 @@
|
||||
/obj/item/ammo_box/update_icon()
|
||||
. = ..()
|
||||
desc = "[initial(desc)] There [stored_ammo.len == 1 ? "is" : "are"] [stored_ammo.len] shell\s left!"
|
||||
for (var/material in bullet_cost)
|
||||
var/material_amount = bullet_cost[material]
|
||||
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
|
||||
custom_materials[material] = material_amount
|
||||
set_custom_materials(custom_materials)//make sure we setup the correct properties again
|
||||
if(length(bullet_cost))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for (var/material in bullet_cost)
|
||||
var/material_amount = bullet_cost[material]
|
||||
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
|
||||
temp_materials[material] = material_amount
|
||||
set_custom_materials(temp_materials)
|
||||
|
||||
/obj/item/ammo_box/update_icon_state()
|
||||
switch(multiple_sprites)
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
|
||||
/obj/item/ammo_box/a357/match
|
||||
name = "speed loader (.357 Match)"
|
||||
desc = "Designed to quickly reload revolvers. These rounds are manufactured within extremely tight tolerances, making them easy to show off trickshots with."
|
||||
ammo_type = /obj/item/ammo_casing/a357/match
|
||||
|
||||
/obj/item/ammo_box/a357/ap
|
||||
name = "speed loader (.357 AP)"
|
||||
ammo_type = /obj/item/ammo_casing/a357/ap
|
||||
@@ -40,17 +45,15 @@
|
||||
desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload."
|
||||
ammo_type = /obj/item/ammo_casing/c38/iceblox
|
||||
|
||||
/obj/item/ammo_box/c32mm
|
||||
name = "ammo box (.32 acp)"
|
||||
desc = "Lethal .32 acp bullets, there's forty in the box."
|
||||
ammo_type = /obj/item/ammo_casing/c32acp
|
||||
max_ammo = 40
|
||||
/obj/item/ammo_box/c38/dumdum
|
||||
name = "speed loader (.38 DumDum)"
|
||||
desc = "Designed to quickly reload revolvers. DumDum bullets shatter on impact and shred the target's innards, likely getting caught inside."
|
||||
ammo_type = /obj/item/ammo_casing/c38/dumdum
|
||||
|
||||
/obj/item/ammo_box/r32mm
|
||||
name = "ammo box (rubber .32 acp)"
|
||||
desc = "Non-lethal .32 acp bullets, there's forty in the box."
|
||||
ammo_type = /obj/item/ammo_casing/r32acp
|
||||
max_ammo = 40
|
||||
/obj/item/ammo_box/c38/match
|
||||
name = "speed loader (.38 Match)"
|
||||
desc = "Designed to quickly reload revolvers. These rounds are manufactured within extremely tight tolerances, making them easy to show off trickshots with."
|
||||
ammo_type = /obj/item/ammo_casing/c38/match
|
||||
|
||||
/obj/item/ammo_box/c9mm
|
||||
name = "ammo box (9mm)"
|
||||
|
||||
@@ -20,3 +20,7 @@
|
||||
/obj/item/ammo_box/magazine/mm195x129/update_icon()
|
||||
..()
|
||||
icon_state = "a762-[round(ammo_count(),10)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/mm712x82/match
|
||||
name = "box magazine (Match 7.12x82mm)"
|
||||
ammo_type = /obj/item/ammo_casing/mm712x82/match
|
||||
@@ -66,15 +66,3 @@
|
||||
caliber = ".50"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
|
||||
/obj/item/ammo_box/magazine/m32acp
|
||||
name = "pistol magazine (.32)"
|
||||
desc = "A crudely construction pistol magazine that holds .32 ACP rounds. It looks like it can only fit eight bullets."
|
||||
icon_state = "32acp"
|
||||
ammo_type = /obj/item/ammo_casing/c32acp
|
||||
caliber = "c32acp"
|
||||
max_ammo = 8
|
||||
multiple_sprites = 2
|
||||
|
||||
/obj/item/ammo_box/magazine/m32acp/empty
|
||||
start_empty = 1
|
||||
|
||||
@@ -50,3 +50,8 @@
|
||||
name = "riot shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
|
||||
max_ammo = 6
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/bounty
|
||||
name = "triple-barrel shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/incapacitate
|
||||
max_ammo = 3
|
||||
@@ -17,6 +17,7 @@
|
||||
force = 5
|
||||
item_flags = NEEDS_PERMIT
|
||||
attack_verb = list("struck", "hit", "bashed")
|
||||
attack_speed = CLICK_CD_RANGE
|
||||
|
||||
var/fire_sound = "gunshot"
|
||||
var/suppressed = null //whether or not a message is displayed when fired
|
||||
@@ -28,6 +29,13 @@
|
||||
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
|
||||
var/sawn_desc = null //description change if weapon is sawn-off
|
||||
var/sawn_off = FALSE
|
||||
|
||||
/// can we be put into a turret
|
||||
var/can_turret = TRUE
|
||||
/// can we be put in a circuit
|
||||
var/can_circuit = TRUE
|
||||
/// can we be put in an emitter
|
||||
var/can_emitter = TRUE
|
||||
|
||||
/// Weapon is burst fire if this is above 1
|
||||
var/burst_size = 1
|
||||
@@ -166,6 +174,8 @@
|
||||
|
||||
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
. = ..()
|
||||
if(!CheckAttackCooldown(user, target))
|
||||
return
|
||||
process_afterattack(target, user, flag, params)
|
||||
|
||||
/obj/item/gun/proc/process_afterattack(atom/target, mob/living/user, flag, params)
|
||||
@@ -174,16 +184,18 @@
|
||||
if(firing)
|
||||
return
|
||||
var/stamloss = user.getStaminaLoss()
|
||||
if(stamloss >= STAMINA_NEAR_SOFTCRIT) //The more tired you are, the less damage you do.
|
||||
var/penalty = (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*STAM_CRIT_GUN_DELAY
|
||||
user.changeNext_move(CLICK_CD_RANGE+(CLICK_CD_RANGE*penalty))
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
return
|
||||
if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
|
||||
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH && (user.a_intent != INTENT_DISARM)) //so we can't shoot ourselves (unless mouth selected or disarm intent)
|
||||
return
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
for(var/datum/wound/W in C.all_wounds)
|
||||
if(W.try_treating(src, user))
|
||||
return // another coward cured!
|
||||
|
||||
if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can.
|
||||
var/mob/living/L = user
|
||||
@@ -213,6 +225,8 @@
|
||||
to_chat(user, "<span class='userdanger'>You need both hands free to fire \the [src]!</span>")
|
||||
return
|
||||
|
||||
user.DelayNextAction()
|
||||
|
||||
//DUAL (or more!) WIELDING
|
||||
var/bonus_spread = 0
|
||||
var/loop_counter = 0
|
||||
@@ -243,6 +257,17 @@
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/CheckAttackCooldown(mob/user, atom/target)
|
||||
if((user.a_intent == INTENT_HARM) && user.Adjacent(target)) //melee
|
||||
return user.CheckActionCooldown(CLICK_CD_MELEE)
|
||||
return user.CheckActionCooldown(get_clickcd())
|
||||
|
||||
/obj/item/gun/proc/get_clickcd()
|
||||
return isnull(chambered?.click_cooldown_override)? CLICK_CD_RANGE : chambered.click_cooldown_override
|
||||
|
||||
/obj/item/gun/GetEstimatedAttackSpeed()
|
||||
return get_clickcd()
|
||||
|
||||
/obj/item/gun/proc/handle_pins(mob/living/user)
|
||||
if(no_pin_required)
|
||||
return TRUE
|
||||
@@ -357,17 +382,14 @@
|
||||
if(user.a_intent == INTENT_HARM) //Flogging
|
||||
if(bayonet)
|
||||
M.attackby(bayonet, user)
|
||||
attack_delay_done = TRUE
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
attack_delay_done = TRUE //we are firing the gun, not bashing people with its butt.
|
||||
|
||||
/obj/item/gun/attack_obj(obj/O, mob/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(bayonet)
|
||||
O.attackby(bayonet, user)
|
||||
return TRUE
|
||||
return O.attackby(bayonet, user)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -97,8 +97,7 @@
|
||||
w_class += S.w_class //so pistols do not fit in pockets when suppressed
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/gun/ballistic/attack_hand(mob/user)
|
||||
/obj/item/gun/ballistic/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(loc == user)
|
||||
if(suppressed && can_unsuppress)
|
||||
var/obj/item/suppressor/S = suppressed
|
||||
@@ -180,13 +179,11 @@
|
||||
#undef BRAINS_BLOWN_THROW_SPEED
|
||||
#undef BRAINS_BLOWN_THROW_RANGE
|
||||
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/proc/sawoff(mob/user)
|
||||
if(sawn_off)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] begins to shorten \the [src].", "<span class='notice'>You begin to shorten \the [src]...</span>")
|
||||
|
||||
//if there's any live ammo inside the gun, makes it go off
|
||||
|
||||
@@ -327,8 +327,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/attack_hand(mob/user)
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(loc != user)
|
||||
..()
|
||||
return //let them pick it up
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/bow/pipe
|
||||
name = "pipe bow"
|
||||
desc = "Some sort of pipe made projectile weapon made of a durathread string and lots of bending. Used to fire arrows."
|
||||
desc = "Some sort of pipe-based projectile weapon made of string and lots of bending. Used to fire arrows."
|
||||
icon_state = "pipebow"
|
||||
item_state = "pipebow"
|
||||
force = 0
|
||||
force = 2
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
/obj/item/minigunpack/process()
|
||||
overheat = max(0, overheat - heat_diffusion)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/minigunpack/attack_hand(var/mob/living/carbon/user)
|
||||
/obj/item/minigunpack/on_attack_hand(var/mob/living/carbon/user)
|
||||
if(src.loc == user)
|
||||
if(!armed)
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
|
||||
@@ -144,13 +144,13 @@
|
||||
user.visible_message("<span class='warning'>[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!</span>", \
|
||||
"<span class='userdanger'>You aim [src] at the ground to perform a bisnasty rocket jump...</span>")
|
||||
if(can_shoot())
|
||||
user.notransform = TRUE
|
||||
user.mob_transforming = TRUE
|
||||
playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, 1, 5)
|
||||
animate(user, pixel_z = 300, time = 30, easing = LINEAR_EASING)
|
||||
sleep(70)
|
||||
animate(user, pixel_z = 0, time = 5, easing = LINEAR_EASING)
|
||||
sleep(5)
|
||||
user.notransform = FALSE
|
||||
user.mob_transforming = FALSE
|
||||
process_fire(user, user, TRUE)
|
||||
if(!QDELETED(user)) //if they weren't gibbed by the explosion, take care of them for good.
|
||||
user.gib()
|
||||
|
||||
@@ -156,19 +156,3 @@
|
||||
name = "Syndicate Anti Tank Pistol"
|
||||
desc = "A massively impractical and silly monstrosity of a pistol that fires .50 calliber rounds. The recoil is likely to dislocate a variety of joints without proper bracing."
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
|
||||
////////////Improvised Pistol////////////
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/improvised
|
||||
name = "Improvised Pistol"
|
||||
desc = "An improvised pocket-sized pistol that fires .32 calibre rounds. It looks incredibly flimsy."
|
||||
icon_state = "ipistol"
|
||||
item_state = "pistol"
|
||||
mag_type = /obj/item/ammo_box/magazine/m32acp
|
||||
fire_delay = 7.5
|
||||
can_suppress = FALSE
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
spread = 15 // Keep the spread between 15 and 20. This hardlocks it into being a mid-range pistol, the magazine size means you're allowed to miss. Fills the mid-range niche that slugs/rifle and buckshot doesn't fill.
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/improvised/nomag
|
||||
spawnwithmagazine = FALSE // For crafting as you shouldn't get eight bullets for free otherwise people will reaper reload.
|
||||
|
||||
@@ -319,11 +319,11 @@
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised
|
||||
name = "improvised shotgun"
|
||||
desc = "A shoddy break-action breechloaded shotgun. Its lacklustre construction will probably result in it hurting people less than a normal shotgun."
|
||||
desc = "A shoddy break-action breechloaded shotgun. Its lacklustre construction shows in its lesser effectiveness."
|
||||
icon_state = "ishotgun"
|
||||
item_state = "shotgun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
weapon_weight = WEAPON_MEDIUM // prevents shooting 2 at once, but doesn't require 2 hands
|
||||
force = 10
|
||||
slot_flags = null
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
@@ -331,12 +331,11 @@
|
||||
unique_reskin = null
|
||||
projectile_damage_multiplier = 0.9
|
||||
var/slung = FALSE
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil) && !sawn_off)
|
||||
if(A.use_tool(src, user, 0, 10, max_level = JOB_SKILL_BASIC))
|
||||
if(A.use_tool(src, user, 0, 10, skill_gain_mult = EASY_USE_TOOL_MULT))
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
|
||||
slung = TRUE
|
||||
@@ -358,7 +357,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawn
|
||||
name = "sawn-off improvised shotgun"
|
||||
desc = "The barrel and stock have been sawn and filed down; it can fit in backpacks. You still need two hands to fire this, if you value unbroken wrists."
|
||||
desc = "The barrel and stock have been sawn and filed down; it can fit in backpacks. You wont want to shoot two of these at once if you value your wrists."
|
||||
icon_state = "ishotgun"
|
||||
item_state = "gun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/improvised/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil) && !sawn_off)
|
||||
if(A.use_tool(src, user, 0, 10, max_level = JOB_SKILL_BASIC))
|
||||
if(A.use_tool(src, user, 0, 10, skill_gain_mult = EASY_USE_TOOL_MULT))
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You tie the lengths of cable to the rifle, making a sling.</span>")
|
||||
slung = TRUE
|
||||
@@ -320,3 +320,18 @@
|
||||
return TRUE
|
||||
|
||||
// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/doublebarrel/hook
|
||||
name = "hook modified sawn-off shotgun"
|
||||
desc = "Range isn't an issue when you can bring your victim to you."
|
||||
icon_state = "hookshotgun"
|
||||
item_state = "shotgun"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/bounty
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
force = 16 //it has a hook on it
|
||||
attack_verb = list("slashed", "hooked", "stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
//our hook gun!
|
||||
var/obj/item/gun/magic/hook/bounty/hook
|
||||
var/toggled = FALSE
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
item_flags = NONE
|
||||
casing_ejector = FALSE
|
||||
can_suppress = FALSE
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/toy/process_chamber(mob/living/user, empty_chamber = 0)
|
||||
..()
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("selfcharge")
|
||||
if(NAMEOF(src, selfcharge))
|
||||
if(var_value)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
|
||||
@@ -34,13 +34,6 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/kinetic/premium)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/premiumka/dropped(mob/user)
|
||||
. = ..()
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
// calls dropped().
|
||||
addtimer(CALLBACK(src, .proc/empty_if_not_held), 1.60)
|
||||
|
||||
/obj/item/ammo_casing/energy/kinetic/premium
|
||||
projectile_type = /obj/item/projectile/kinetic/premium
|
||||
|
||||
@@ -151,7 +144,7 @@
|
||||
addtimer(CALLBACK(src, .proc/empty_if_not_held), 2)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty_if_not_held()
|
||||
if(!ismob(loc))
|
||||
if(!ismob(loc) && !istype(loc, /obj/item/integrated_circuit))
|
||||
empty()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty()
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/laser/hellgun
|
||||
name ="hellfire laser gun"
|
||||
desc = "A relic of a weapon, built before NT began installing regulators on its laser weaponry. This pattern of laser gun became infamous for the gruesome burn wounds it caused, and was quietly discontinued once it began to affect NT's reputation."
|
||||
icon_state = "hellgun"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/hellfire)
|
||||
|
||||
/obj/item/gun/energy/laser/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
@@ -240,20 +246,3 @@
|
||||
chambered.BB.damage *= 5
|
||||
|
||||
process_fire(target, user, TRUE, params)
|
||||
|
||||
////////////////
|
||||
// IMPROVISED //
|
||||
////////////////
|
||||
|
||||
/obj/item/gun/energy/e_gun/old/improvised
|
||||
name = "improvised energy rifle"
|
||||
desc = "A crude imitation of an energy gun. It works, however the beams are poorly focused and most of the energy is wasted before it reaches the target. Welp, it still burns things."
|
||||
icon_state = "improvised"
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/improvised)
|
||||
|
||||
/obj/item/gun/energy/e_gun/old/improvised/upgraded
|
||||
name = "makeshift energy rifle"
|
||||
desc = "The new lens and upgraded parts gives this a higher capacity and more energy output, however, the shoddy construction still leaves it inferior to Nanotrasen's own energy weapons."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/improvised/upgraded)
|
||||
|
||||
@@ -329,3 +329,11 @@
|
||||
add_overlay("emitter_carbine_empty")
|
||||
else
|
||||
add_overlay("emitter_carbine")
|
||||
|
||||
//the pickle ray
|
||||
/obj/item/gun/energy/pickle_gun
|
||||
name = "pickle ray"
|
||||
desc = "funniest shit i've ever seen"
|
||||
icon_state = "decloner"
|
||||
no_pin_required = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/pickle)
|
||||
@@ -24,7 +24,7 @@
|
||||
ammo_x_offset = 2
|
||||
// Not enough guns have altfire systems like this yet for this to be a universal framework.
|
||||
var/last_altfire = 0
|
||||
var/altfire_delay = 15
|
||||
var/altfire_delay = CLICK_CD_RANGE
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/altafterattack(atom/target, mob/user, proximity_flag, params)
|
||||
. = TRUE
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/checks_antimagic = FALSE
|
||||
var/checks_antimagic = TRUE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
@@ -83,6 +83,6 @@
|
||||
|
||||
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
switch(var_name)
|
||||
if(NAMEOF(src, charges))
|
||||
recharge_newshot()
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/beam_rifle/hitscan)
|
||||
cell_type = /obj/item/stock_parts/cell/beam_rifle
|
||||
canMouseDown = TRUE
|
||||
can_turret = FALSE
|
||||
can_circuit = FALSE
|
||||
//Cit changes: beam rifle stats.
|
||||
slowdown = 1
|
||||
item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND | NEEDS_PERMIT
|
||||
@@ -418,10 +420,10 @@
|
||||
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/aoe_fire_range = 2
|
||||
var/aoe_fire_chance = 100
|
||||
var/aoe_mob_range = 2
|
||||
var/aoe_mob_damage = 30
|
||||
var/impact_structure_damage = 0
|
||||
var/impact_direct_damage = 0
|
||||
var/turf/cached
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
if(current_target)
|
||||
LoseTarget()
|
||||
if(!isliving(target))
|
||||
if(!isliving(target) || (user == target))
|
||||
return
|
||||
|
||||
current_target = target
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/pixel_move_interrupted = FALSE
|
||||
|
||||
/// Pixels moved per second.
|
||||
var/pixels_per_second = TILES_TO_PIXELS(12.5)
|
||||
var/pixels_per_second = TILES_TO_PIXELS(17.5)
|
||||
/// The number of pixels we increment by. THIS IS NOT SPEED, DO NOT TOUCH THIS UNLESS YOU KNOW WHAT YOU ARE DOING. In general, lower values means more linetrace accuracy up to a point at cost of performance.
|
||||
var/pixel_increment_amount
|
||||
|
||||
@@ -58,9 +58,25 @@
|
||||
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
|
||||
animate_movement = 0 //Use SLIDE_STEPS in conjunction with legacy
|
||||
/// how many times we've ricochet'd so far (instance variable, not a stat)
|
||||
var/ricochets = 0
|
||||
var/ricochets_max = 2
|
||||
var/ricochet_chance = 30
|
||||
/// how many times we can ricochet max
|
||||
var/ricochets_max = 0
|
||||
/// 0-100, the base chance of ricocheting, before being modified by the atom we shoot and our chance decay
|
||||
var/ricochet_chance = 0
|
||||
/// 0-1 (or more, I guess) multiplier, the ricochet_chance is modified by multiplying this after each ricochet
|
||||
var/ricochet_decay_chance = 0.7
|
||||
/// 0-1 (or more, I guess) multiplier, the projectile's damage is modified by multiplying this after each ricochet
|
||||
var/ricochet_decay_damage = 0.7
|
||||
/// On ricochet, if nonzero, we consider all mobs within this range of our projectile at the time of ricochet to home in on like Revolver Ocelot, as governed by ricochet_auto_aim_angle
|
||||
var/ricochet_auto_aim_range = 0
|
||||
/// On ricochet, if ricochet_auto_aim_range is nonzero, we'll consider any mobs within this range of the normal angle of incidence to home in on, higher = more auto aim
|
||||
var/ricochet_auto_aim_angle = 30
|
||||
/// the angle of impact must be within this many degrees of the struck surface, set to 0 to allow any angle
|
||||
var/ricochet_incidence_leeway = 40
|
||||
|
||||
///If the object being hit can pass ths damage on to something else, it should not do it for this bullet
|
||||
var/force_hit = FALSE
|
||||
|
||||
//Hitscan
|
||||
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
|
||||
@@ -133,6 +149,15 @@
|
||||
|
||||
var/temporary_unstoppable_movement = FALSE
|
||||
|
||||
///If defined, on hit we create an item of this type then call hitby() on the hit target with this
|
||||
var/shrapnel_type
|
||||
///If TRUE, hit mobs even if they're on the floor and not our target
|
||||
var/hit_stunned_targets = FALSE
|
||||
|
||||
wound_bonus = CANT_WOUND
|
||||
/// For telling whether we want to roll for bone breaking or lacerations if we're bothering with wounds
|
||||
sharpness = FALSE
|
||||
|
||||
/obj/item/projectile/Initialize()
|
||||
. = ..()
|
||||
permutated = list()
|
||||
@@ -148,6 +173,7 @@
|
||||
on_range()
|
||||
|
||||
/obj/item/projectile/proc/on_range() //if we want there to be effects when they reach the end of their range
|
||||
SEND_SIGNAL(src, COMSIG_PROJECTILE_RANGE_OUT)
|
||||
qdel(src)
|
||||
|
||||
//to get the correct limb (if any) for the projectile hit message
|
||||
@@ -164,17 +190,17 @@
|
||||
/obj/item/projectile/proc/prehit(atom/target)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Called when we hit something.
|
||||
*
|
||||
* @params
|
||||
* * target - what we hit
|
||||
* * blocked - 0 to 100 percentage mitigation/block
|
||||
* * def zone - where we hit if we hit a mob.
|
||||
*/
|
||||
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0, def_zone)
|
||||
/obj/item/projectile/proc/on_hit(atom/target, blocked = FALSE)
|
||||
if(fired_from)
|
||||
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_ON_HIT, firer, target, Angle)
|
||||
|
||||
// i know that this is probably more with wands and gun mods in mind, but it's a bit silly that the projectile on_hit signal doesn't ping the projectile itself.
|
||||
// maybe we care what the projectile thinks! See about combining these via args some time when it's not 5AM
|
||||
var/obj/item/bodypart/hit_limb
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
hit_limb = L.check_limb_hit(def_zone)
|
||||
SEND_SIGNAL(src, COMSIG_PROJECTILE_SELF_ON_HIT, firer, target, Angle, hit_limb)
|
||||
var/turf/target_loca = get_turf(target)
|
||||
|
||||
var/hitx
|
||||
@@ -217,7 +243,7 @@
|
||||
else
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color(H.dna.blood_type))
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color())
|
||||
|
||||
@@ -226,10 +252,13 @@
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
|
||||
var/organ_hit_text = ""
|
||||
var/limb_hit = L.check_limb_hit(def_zone)//to get the correct message info.
|
||||
var/limb_hit = hit_limb
|
||||
if(limb_hit)
|
||||
organ_hit_text = " in \the [parse_zone(limb_hit)]"
|
||||
if(suppressed)
|
||||
|
||||
if(suppressed==SUPPRESSED_VERY)
|
||||
playsound(loc, hitsound, 5, TRUE, -1)
|
||||
else if(suppressed)
|
||||
playsound(loc, hitsound, 5, 1, -1)
|
||||
to_chat(L, "<span class='userdanger'>You're shot by \a [src][organ_hit_text]!</span>")
|
||||
else
|
||||
@@ -259,53 +288,43 @@
|
||||
else
|
||||
return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume
|
||||
|
||||
/obj/item/projectile/proc/on_ricochet(atom/A)
|
||||
if(!ricochet_auto_aim_angle || !ricochet_auto_aim_range)
|
||||
return
|
||||
|
||||
var/mob/living/unlucky_sob
|
||||
var/best_angle = ricochet_auto_aim_angle
|
||||
if(firer && HAS_TRAIT(firer, TRAIT_NICE_SHOT))
|
||||
best_angle += NICE_SHOT_RICOCHET_BONUS
|
||||
for(var/mob/living/L in range(ricochet_auto_aim_range, src.loc))
|
||||
if(L.stat == DEAD || !isInSight(src, L))
|
||||
continue
|
||||
var/our_angle = abs(closer_angle_difference(Angle, get_projectile_angle(src.loc, L.loc)))
|
||||
if(our_angle < best_angle)
|
||||
best_angle = our_angle
|
||||
unlucky_sob = L
|
||||
|
||||
if(unlucky_sob)
|
||||
setAngle(get_projectile_angle(src, unlucky_sob.loc))
|
||||
|
||||
/obj/item/projectile/proc/store_hitscan_collision(datum/point/pcache)
|
||||
beam_segments[beam_index] = pcache
|
||||
beam_index = pcache
|
||||
beam_segments[beam_index] = null
|
||||
|
||||
/**
|
||||
* Determines if we should ricochet off of something.
|
||||
* By default, asks the thing if we should ricochet off it, but because we're called first, we get final say.
|
||||
* Returns TRUE or FALSE.
|
||||
*/
|
||||
/obj/item/projectile/proc/check_ricochet(atom/A)
|
||||
if(ricochets > ricochets_max) //safety thing, we don't care about what the other thing says about this.
|
||||
return FALSE
|
||||
var/them = A.check_projectile_ricochet(src)
|
||||
switch(them)
|
||||
if(PROJECTILE_RICOCHET_PREVENT)
|
||||
return FALSE
|
||||
if(PROJECTILE_RICOCHET_FORCE)
|
||||
return TRUE
|
||||
if(PROJECTILE_RICOCHET_NO)
|
||||
return FALSE
|
||||
if(PROJECTILE_RICOCHET_YES)
|
||||
return prob(ricochet_chance)
|
||||
else
|
||||
CRASH("Invalid return value for projectile ricochet check from [A].")
|
||||
|
||||
/**
|
||||
* Handles ricocheting off of something.
|
||||
* By default, also asks the thing to handle it, but because we're called first, we get final say.
|
||||
*/
|
||||
/obj/item/projectile/proc/handle_ricochet(atom/A)
|
||||
ricochets++
|
||||
ignore_source_check = TRUE
|
||||
decayedRange = max(0, decayedRange - reflect_range_decrease)
|
||||
pixel_move_interrupted = TRUE
|
||||
range = decayedRange
|
||||
return A.handle_projectile_ricochet(src)
|
||||
|
||||
/obj/item/projectile/Bump(atom/A)
|
||||
if(!trajectory)
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
if(check_ricochet(A))
|
||||
if(check_ricochet(A) && A.handle_ricochet(src)) //if you can ricochet, attempt to ricochet off the object
|
||||
on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
|
||||
var/datum/point/pcache = trajectory.copy_to()
|
||||
if(hitscan)
|
||||
store_hitscan_collision(pcache)
|
||||
handle_ricochet(A)
|
||||
decayedRange = max(0, decayedRange - reflect_range_decrease)
|
||||
ricochet_chance *= ricochet_decay_chance
|
||||
damage *= ricochet_decay_damage
|
||||
range = decayedRange
|
||||
return TRUE
|
||||
|
||||
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
|
||||
@@ -381,6 +400,33 @@
|
||||
return T
|
||||
//Returns null if nothing at all was found.
|
||||
|
||||
/obj/item/projectile/proc/check_ricochet(atom/A)
|
||||
if(ricochets > ricochets_max) //safety thing, we don't care about what the other thing says about this.
|
||||
return FALSE
|
||||
var/them = A.check_projectile_ricochet(src)
|
||||
switch(them)
|
||||
if(PROJECTILE_RICOCHET_PREVENT)
|
||||
return FALSE
|
||||
if(PROJECTILE_RICOCHET_FORCE)
|
||||
return TRUE
|
||||
if(PROJECTILE_RICOCHET_NO)
|
||||
return FALSE
|
||||
if(PROJECTILE_RICOCHET_YES)
|
||||
var/chance = ricochet_chance * A.ricochet_chance_mod
|
||||
if(firer && HAS_TRAIT(firer, TRAIT_NICE_SHOT))
|
||||
chance += NICE_SHOT_RICOCHET_BONUS
|
||||
if(prob(chance))
|
||||
return TRUE
|
||||
else
|
||||
CRASH("Invalid return value for projectile ricochet check from [A].")
|
||||
|
||||
/obj/item/projectile/proc/check_ricochet_flag(atom/A)
|
||||
if((flag in list("energy", "laser")) && (A.flags_ricochet & RICOCHET_SHINY))
|
||||
return TRUE
|
||||
if((flag in list("bomb", "bullet")) && (A.flags_ricochet & RICOCHET_HARD))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/// one move is a tile.
|
||||
/obj/item/projectile/proc/return_predicted_turf_after_moves(moves, forced_angle) //I say predicted because there's no telling that the projectile won't change direction/location in flight.
|
||||
if(!trajectory && isnull(forced_angle) && isnull(Angle))
|
||||
@@ -418,6 +464,8 @@
|
||||
/obj/item/projectile/proc/fire(angle, atom/direct_target)
|
||||
if(fired_from)
|
||||
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_BEFORE_FIRE, src, original) //If no angle needs to resolve it from xo/yo!
|
||||
if(shrapnel_type)
|
||||
AddElement(/datum/element/embed, projectile_payload = shrapnel_type)
|
||||
if(!log_override && firer && original)
|
||||
log_combat(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
|
||||
if(direct_target)
|
||||
@@ -575,7 +623,7 @@
|
||||
pixel_x = trajectory.return_px()
|
||||
pixel_y = trajectory.return_py()
|
||||
else if(T != loc)
|
||||
var/safety = CEILING(pixel_increment_amount / world.icon_size, 1) * 2 + 1
|
||||
var/safety = CEILING(pixel_increment_amount / world.icon_size, 1) * 5 + 1
|
||||
while(T != loc)
|
||||
if(!--safety)
|
||||
CRASH("[type] took too long (allowed: [CEILING(pixel_increment_amount/world.icon_size,1)*2] moves) to get to its location.")
|
||||
|
||||
@@ -14,11 +14,25 @@
|
||||
ricochets_max = 50 //Honk!
|
||||
ricochet_chance = 80
|
||||
is_reflectable = TRUE
|
||||
wound_bonus = -20
|
||||
bare_wound_bonus = 10
|
||||
|
||||
/obj/item/projectile/beam/laser
|
||||
tracer_type = /obj/effect/projectile/tracer/laser
|
||||
muzzle_type = /obj/effect/projectile/muzzle/laser
|
||||
impact_type = /obj/effect/projectile/impact/laser
|
||||
wound_bonus = -30
|
||||
bare_wound_bonus = 40
|
||||
|
||||
//overclocked laser, does a bit more damage but has much higher wound power (-0 vs -20)
|
||||
/obj/item/projectile/beam/laser/hellfire
|
||||
name = "hellfire laser"
|
||||
wound_bonus = 0
|
||||
damage = 25
|
||||
|
||||
/obj/item/projectile/beam/laser/hellfire/Initialize()
|
||||
. = ..()
|
||||
transform *= 2
|
||||
|
||||
/obj/item/projectile/beam/laser/heavylaser
|
||||
name = "heavy laser"
|
||||
@@ -39,9 +53,6 @@
|
||||
/obj/item/projectile/beam/weak
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/beam/weak/improvised
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/beam/weak/penetrator
|
||||
armour_penetration = 50
|
||||
|
||||
@@ -93,6 +104,7 @@
|
||||
tracer_type = /obj/effect/projectile/tracer/pulse
|
||||
muzzle_type = /obj/effect/projectile/muzzle/pulse
|
||||
impact_type = /obj/effect/projectile/impact/pulse
|
||||
wound_bonus = 10
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
@@ -119,6 +131,8 @@
|
||||
damage = 30
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
wound_bonus = -40
|
||||
bare_wound_bonus = 70
|
||||
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
flag = "bullet"
|
||||
hitsound_wall = "ricochet"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||
sharpness = TRUE
|
||||
@@ -48,15 +48,3 @@
|
||||
L.Sleeping(300)
|
||||
else
|
||||
L.adjustStaminaLoss(25)
|
||||
|
||||
// .32 ACP (Improvised Pistol)
|
||||
|
||||
/obj/item/projectile/bullet/c32acp
|
||||
name = ".32 bullet"
|
||||
damage = 13
|
||||
|
||||
/obj/item/projectile/bullet/r32acp
|
||||
name = ".32 rubber bullet"
|
||||
damage = 3
|
||||
eyeblur = 1
|
||||
stamina = 20
|
||||
|
||||
@@ -15,6 +15,41 @@
|
||||
/obj/item/projectile/bullet/c38
|
||||
name = ".38 bullet"
|
||||
damage = 25
|
||||
ricochets_max = 2
|
||||
ricochet_chance = 50
|
||||
ricochet_auto_aim_angle = 10
|
||||
ricochet_auto_aim_range = 3
|
||||
wound_bonus = -35
|
||||
sharpness = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/c38/match
|
||||
name = ".38 Match bullet"
|
||||
ricochets_max = 4
|
||||
ricochet_chance = 100
|
||||
ricochet_auto_aim_angle = 40
|
||||
ricochet_auto_aim_range = 5
|
||||
ricochet_incidence_leeway = 50
|
||||
ricochet_decay_chance = 1
|
||||
ricochet_decay_damage = 1
|
||||
wound_bonus = 0
|
||||
|
||||
/obj/item/projectile/bullet/c38/match/bouncy
|
||||
name = ".38 Rubber bullet"
|
||||
damage = 10
|
||||
stamina = 30
|
||||
armour_penetration = -30
|
||||
ricochets_max = 6
|
||||
ricochet_incidence_leeway = 70
|
||||
ricochet_chance = 130
|
||||
ricochet_decay_damage = 0.8
|
||||
shrapnel_type = NONE
|
||||
|
||||
/obj/item/projectile/bullet/c38/dumdum
|
||||
name = ".38 DumDum bullet"
|
||||
damage = 15
|
||||
armour_penetration = -30
|
||||
ricochets_max = 0
|
||||
shrapnel_type = /obj/item/shrapnel/bullet/c38/dumdum
|
||||
|
||||
/obj/item/projectile/bullet/c38/rubber
|
||||
name = ".38 rubber bullet"
|
||||
@@ -24,6 +59,7 @@
|
||||
/obj/item/projectile/bullet/c38/trac
|
||||
name = ".38 TRAC bullet"
|
||||
damage = 10
|
||||
ricochets_max = 0
|
||||
|
||||
/obj/item/projectile/bullet/c38/trac/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
@@ -39,6 +75,7 @@
|
||||
/obj/item/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail
|
||||
name = ".38 Hot Shot bullet"
|
||||
damage = 20
|
||||
ricochets_max = 0
|
||||
|
||||
/obj/item/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
@@ -51,6 +88,7 @@
|
||||
name = ".38 Iceblox bullet"
|
||||
damage = 20
|
||||
var/temperature = 100
|
||||
ricochets_max = 0
|
||||
|
||||
/obj/item/projectile/bullet/c38/iceblox/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
@@ -68,4 +106,14 @@
|
||||
/obj/item/projectile/bullet/a357/ap
|
||||
name = ".357 armor-piercing bullet"
|
||||
damage = 45
|
||||
armour_penetration = 45
|
||||
armour_penetration = 45
|
||||
|
||||
// admin only really, for ocelot memes
|
||||
/obj/item/projectile/bullet/a357/match
|
||||
name = ".357 match bullet"
|
||||
ricochets_max = 5
|
||||
ricochet_chance = 140
|
||||
ricochet_auto_aim_angle = 50
|
||||
ricochet_auto_aim_range = 6
|
||||
ricochet_incidence_leeway = 80
|
||||
ricochet_decay_chance = 1
|
||||
@@ -2,10 +2,22 @@
|
||||
name = "12g shotgun slug"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_slug/executioner
|
||||
name = "executioner slug" // admin only, can dismember limbs
|
||||
sharpness = TRUE
|
||||
wound_bonus = 0
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_slug/pulverizer
|
||||
name = "pulverizer slug" // admin only, can crush bones
|
||||
sharpness = FALSE
|
||||
wound_bonus = 0
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_beanbag
|
||||
name = "beanbag slug"
|
||||
damage = 5
|
||||
damage = 10
|
||||
stamina = 70
|
||||
wound_bonus = 20
|
||||
sharpness = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shotgun
|
||||
name = "incendiary slug"
|
||||
@@ -77,6 +89,7 @@
|
||||
/obj/item/projectile/bullet/pellet/shotgun_buckshot
|
||||
name = "buckshot pellet"
|
||||
damage = 12.5
|
||||
wound_bonus = -10
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_rubbershot
|
||||
name = "rubbershot pellet"
|
||||
@@ -112,3 +125,8 @@
|
||||
/obj/item/projectile/bullet/seed
|
||||
damage = 4
|
||||
stamina = 1
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_incapacitate
|
||||
name = "incapacitating pellet"
|
||||
damage = 1
|
||||
stamina = 6
|
||||
@@ -13,3 +13,13 @@
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/pickle //projectile for adminspawn only gun
|
||||
name = "pickle-izing beam"
|
||||
icon_state = "declone"
|
||||
|
||||
/obj/item/projectile/energy/pickle/on_hit(atom/target)
|
||||
//we don't care if they blocked it, they're turning into a pickle
|
||||
if(isliving(target))
|
||||
var/mob/living/living_target = target
|
||||
living_target.turn_into_pickle() //yes this is a real proc
|
||||
|
||||
@@ -121,10 +121,10 @@
|
||||
qdel(src)
|
||||
|
||||
/proc/wabbajack(mob/living/M)
|
||||
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
|
||||
if(!istype(M) || M.stat == DEAD || M.mob_transforming || (GODMODE & M.status_flags))
|
||||
return
|
||||
|
||||
M.notransform = TRUE
|
||||
M.mob_transforming = TRUE
|
||||
M.Paralyze(INFINITY)
|
||||
M.icon = null
|
||||
M.cut_overlays()
|
||||
@@ -207,7 +207,8 @@
|
||||
/mob/living/simple_animal/pet/fox,
|
||||
/mob/living/simple_animal/butterfly,
|
||||
/mob/living/simple_animal/pet/cat/cak,
|
||||
/mob/living/simple_animal/chick)
|
||||
/mob/living/simple_animal/chick,
|
||||
/mob/living/simple_animal/pickle)
|
||||
new_mob = new path(M.loc)
|
||||
|
||||
if("humanoid")
|
||||
|
||||
Reference in New Issue
Block a user