Merge branch 'master' into aro-tether-wip

# Conflicts:
#	code/ZAS/_docs.dm
#	code/game/area/areas.dm
#	code/game/objects/explosion.dm
#	code/modules/holodeck/HolodeckControl.dm
#	code/modules/mob/living/say.dm
This commit is contained in:
Leshana
2017-05-16 00:04:50 -04:00
220 changed files with 2121 additions and 1183 deletions

View File

@@ -182,7 +182,11 @@
if (A == user && user.zone_sel.selecting == O_MOUTH && !mouthshoot)
handle_suicide(user)
else if(user.a_intent == I_HURT) //point blank shooting
Fire(A, user, pointblank=1)
if(user && user.client && user.aiming && user.aiming.active && user.aiming.aiming_at != A && A != user)
PreFire(A,user) //They're using the new gun system, locate what they're aiming at.
return
else
Fire(A, user, pointblank=1)
else
return ..() //Pistolwhippin'
@@ -326,6 +330,8 @@
user.setMoveCooldown(move_delay)
next_fire_time = world.time + fire_delay
accuracy = initial(accuracy) //Reset the gun's accuracy
if(muzzle_flash)
set_light(0)
@@ -396,6 +402,8 @@
//update timing
next_fire_time = world.time + fire_delay
accuracy = initial(accuracy) //Reset the gun's accuracy
if(muzzle_flash)
set_light(0)
@@ -482,11 +490,11 @@
// Certain statuses make it harder to aim, blindness especially. Same chances as melee, however guns accuracy uses multiples of 15.
if(user.eye_blind)
accuracy -= 5
P.accuracy -= 5
if(user.eye_blurry)
accuracy -= 2
P.accuracy -= 2
if(user.confused)
accuracy -= 3
P.accuracy -= 3
//accuracy bonus from aiming
if (aim_targets && (target in aim_targets))

View File

@@ -28,6 +28,7 @@
name = "practice laser carbine"
desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice."
projectile_type = /obj/item/projectile/beam/practice
charge_cost = 48
cell_type = /obj/item/weapon/cell/device

View File

@@ -93,20 +93,20 @@
user.visible_message("<span class='warning'>\The [user] fires \the [src], but the shot fizzles in the air!</span>", "<span class='danger'>You fire \the [src], but the shot fizzles in the air!</span>")
power_supply.charge -= charge_cost
playsound(src.loc, fire_sound, 100, 1)
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
update_icon()
else if (severity <= 80) //20% chance of shorting out and emptying the cell
user.visible_message("<span class='warning'>\The [user] pulls the trigger, but \the [src] shorts out!</span>", "<span class='danger'>You pull the trigger, but \the [src] shorts out!</span>")
power_supply.charge = 0
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
update_icon()
else if (severity <= 90) //10% chance of breaking the gun
user.visible_message("<span class='warning'>\The [user] pulls the trigger, but \the [src] erupts in a shower of sparks!</span>", "<span class='danger'>You pull the trigger, but \the [src] bursts into a shower of sparks!</span>")
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
power_supply.charge = 0

View File

@@ -44,10 +44,12 @@
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3)
modifystate = "floramut"
self_recharge = 1
var/decl/plantgene/gene = null
firemodes = list(
list(mode_name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"),
list(mode_name="increase yield", projectile_type=/obj/item/projectile/energy/florayield, modifystate="florayield"),
list(mode_name="induce specific mutations", projectile_type=/obj/item/projectile/energy/floramut/gene, modifystate="floramut"),
)
/obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag)
@@ -58,6 +60,28 @@
return
..()
/obj/item/weapon/gun/energy/floragun/verb/select_gene()
set name = "Select Gene"
set category = "Object"
set src in view(1)
var/genemask = input("Choose a gene to modify.") as null|anything in plant_controller.plant_gene_datums
if(!genemask)
return
gene = plant_controller.plant_gene_datums[genemask]
to_chat(usr, "<span class='info'>You set the [src]'s targeted genetic area to [genemask].</span>")
return
/obj/item/weapon/gun/energy/floragun/consume_next_projectile()
. = ..()
var/obj/item/projectile/energy/floramut/gene/G = .
if(istype(G))
G.gene = gene
/obj/item/weapon/gun/energy/meteorgun
name = "meteor gun"
desc = "For the love of god, make sure you're aiming this the right way!"

View File

@@ -173,7 +173,7 @@
return
//roll to-hit
miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier + round(15*target_mob.evasion), 0)
miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier + round(15*target_mob.get_evasion()), 0)
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
var/result = PROJECTILE_FORCE_MISS

View File

@@ -38,7 +38,7 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()

View File

@@ -121,6 +121,15 @@
else
return 1
/obj/item/projectile/energy/floramut/gene
name = "gamma somatoray"
icon_state = "energy2"
damage = 0
damage_type = TOX
nodamage = 1
check_armour = "energy"
var/decl/plantgene/gene = null
/obj/item/projectile/energy/florayield
name = "beta somatoray"
icon_state = "energy2"