Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+10 -2
View File
@@ -24,10 +24,15 @@
check_armour = "laser"
eyeblur = 2
/obj/item/projectile/beam/midlaser
damage = 40
armor_penetration = 10
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 60
armor_penetration = 30
muzzle_type = /obj/effect/projectile/laser_heavy/muzzle
tracer_type = /obj/effect/projectile/laser_heavy/tracer
@@ -36,7 +41,8 @@
/obj/item/projectile/beam/xray
name = "xray beam"
icon_state = "xray"
damage = 30
damage = 25
armor_penetration = 50
muzzle_type = /obj/effect/projectile/xray/muzzle
tracer_type = /obj/effect/projectile/xray/tracer
@@ -46,6 +52,7 @@
name = "pulse"
icon_state = "u_laser"
damage = 50
armor_penetration = 30
muzzle_type = /obj/effect/projectile/laser_pulse/muzzle
tracer_type = /obj/effect/projectile/laser_pulse/tracer
@@ -123,7 +130,8 @@
/obj/item/projectile/beam/sniper
name = "sniper beam"
icon_state = "xray"
damage = 60
damage = 50
armor_penetration = 10
stun = 3
weaken = 3
stutter = 3
+57 -19
View File
@@ -58,7 +58,7 @@
if(prob(chance))
if(A.opacity)
//display a message so that people on the other side aren't so confused
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!")
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!</span>")
return 1
return 0
@@ -69,22 +69,34 @@
damage = 20
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
var/pellets = 4 //number of pellets
var/range_step = 2 //effective pellet count decreases every few tiles
var/base_spread = 90 //lower means the pellets spread more across body parts
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
var/spread_step = 10 //higher means the pellets spread more across body parts with distance
/obj/item/projectile/bullet/pellet/Bumped()
. = ..()
bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine.
/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance)
/obj/item/projectile/bullet/pellet/proc/get_pellets(var/distance)
var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance
return max(pellets - pellet_loss, 1)
/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
if (pellets < 0) return 1
var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance
var/total_pellets = max(pellets - pellet_loss, 1)
var/total_pellets = get_pellets(distance)
var/spread = max(base_spread - (spread_step*distance), 0)
//shrapnel explosions miss prone mobs with a chance that increases with distance
var/prone_chance = 0
if(!base_spread)
prone_chance = max(spread_step*(distance - 2), 0)
var/hits = 0
for (var/i in 1 to total_pellets)
if(target_mob.lying && target_mob != original && prob(prone_chance))
continue
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
var/old_zone = def_zone
@@ -97,6 +109,20 @@
return 1
return 0
/obj/item/projectile/bullet/pellet/get_structure_damage()
var/distance = get_dist(loc, starting)
return ..() * get_pellets(distance)
/obj/item/projectile/bullet/pellet/Move()
. = ..()
//If this is a shrapnel explosion, allow mobs that are prone to get hit, too
if(. && !base_spread && isturf(loc))
for(var/mob/living/M in loc)
if(M.lying || !M.CanPass(src, loc)) //Bump if lying or if we would normally Bump.
if(Bump(M)) //Bump will make sure we don't hit a mob multiple times
return
/* short-casing projectiles, like the kind used in pistols or SMGs */
/obj/item/projectile/bullet/pistol
@@ -111,8 +137,8 @@
/obj/item/projectile/bullet/pistol/rubber //"rubber" bullets
name = "rubber bullet"
check_armour = "melee"
damage = 10
agony = 40
damage = 5
agony = 25
embed = 0
sharp = 0
@@ -120,7 +146,8 @@
/obj/item/projectile/bullet/shotgun
name = "slug"
damage = 60
damage = 50
armor_penetration = 15
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
name = "beanbag"
@@ -150,21 +177,24 @@
/* "Rifle" rounds */
/obj/item/projectile/bullet/rifle/a762
damage = 30
/obj/item/projectile/bullet/rifle
armor_penetration = 20
penetrating = 1
/obj/item/projectile/bullet/rifle/a762
damage = 25
/obj/item/projectile/bullet/rifle/a556
damage = 35
/obj/item/projectile/bullet/rifle/a145
damage = 80
stun = 3
weaken = 3
penetrating = 5
armor_penetration = 80
hitscan = 1 //so the PTR isn't useless as a sniper weapon
/obj/item/projectile/bullet/rifle/a556
damage = 40
penetrating = 1
/* Miscellaneous */
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
@@ -193,10 +223,6 @@
damage = 1
embed = 0
/obj/item/projectile/bullet/chameleon
damage = 1 // stop trying to murderbone with a fake gun dumbass!!!
embed = 0 // nope
/* Practice */
/obj/item/projectile/bullet/pistol/practice
@@ -208,3 +234,15 @@
/obj/item/projectile/bullet/shotgun/practice
name = "practice"
damage = 5
/obj/item/projectile/bullet/pistol/cap
name = "cap"
damage_type = HALLOSS
damage = 0
nodamage = 1
embed = 0
sharp = 0
/obj/item/projectile/bullet/pistol/cap/process()
loc = null
qdel(src)
@@ -11,7 +11,7 @@
/obj/item/projectile/change/proc/wabbajack(var/mob/M)
if(istype(M, /mob/living) && M.stat != DEAD)
if(M.monkeyizing)
if(M.transforming)
return
if(M.has_brain_worms())
return //Borer stuff - RR
@@ -11,6 +11,7 @@
name = "chemical shell"
icon_state = "bullet"
damage = 5
agony = 10
kill_count = 15 //if the shell hasn't hit anything after travelling this far it just explodes.
var/flash_range = 0
var/brightness = 7
@@ -22,7 +23,7 @@
//blind adjacent people
for (var/mob/living/carbon/M in viewers(T, flash_range))
if(M.eyecheck() < 1)
if(M.eyecheck() < FLASH_PROTECTION_MODERATE)
flick("e_flash", M.flash)
//snap pop
@@ -30,7 +31,7 @@
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/sparks(T)
new /obj/effect/sparks(T)
new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration)
//blinds people like the flash round, but can also be used for temporary illumination
+10 -1
View File
@@ -72,7 +72,7 @@
if(src)//Do not add to this if() statement, otherwise the meteor won't delete them
if(A)
A.meteorhit(src)
A.ex_act(2)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in range(10, src))
@@ -162,3 +162,12 @@
on_hit(var/atom/target, var/blocked = 0)
explosion(target, 0, 0, 4)
return 1
/obj/item/projectile/chameleon
name = "bullet"
icon_state = "bullet"
damage = 1 // stop trying to murderbone with a fake gun dumbass!!!
embed = 0 // nope
nodamage = 1
damage_type = HALLOSS
muzzle_type = /obj/effect/projectile/bullet/muzzle