Merge pull request #9415 from variableundefined/SpeshulGunlog

Minor attack log overhaul
This commit is contained in:
Crazy Lemon
2018-10-08 01:16:21 -07:00
committed by GitHub
6 changed files with 26 additions and 18 deletions
+6 -3
View File
@@ -28,16 +28,17 @@
var/speed = 1 //Amount of deciseconds it takes for projectile to travel
var/Angle = 0
var/spread = 0 //amount (in degrees) of projectile spread
var/legacy = 0 //legacy projectile system
var/legacy = FALSE //legacy projectile system
animate_movement = 0
var/damage = 10
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
var/nodamage = 0 //Determines if the projectile will skip any damage inflictions
var/nodamage = FALSE //Determines if the projectile will skip any damage inflictions
var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb //Cael - bio and rad are also valid
var/projectile_type = "/obj/item/projectile"
var/range = 50 //This will de-increment every step. When 0, it will delete the projectile.
var/is_reflectable = FALSE // Can it be reflected or not?
var/alwayslog = FALSE // ALWAYS log this projectile on hit even if it doesn't hit a living target. Useful for AOE explosion / EMP.
//Effects
var/stun = 0
var/weaken = 0
@@ -68,6 +69,8 @@
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0, hit_zone)
var/turf/target_loca = get_turf(target)
if(alwayslog)
add_attack_logs(firer, target, "Shot with a [type]")
if(!isliving(target))
return 0
var/mob/living/L = target
@@ -121,7 +124,7 @@
reagent_note += R.id + " ("
reagent_note += num2text(R.volume) + ") "
has_reagents = TRUE
if(!log_override && firer && original)
if(!log_override && firer && !alwayslog)
if(has_reagents)
add_attack_logs(firer, L, "Shot with a [type] (containing [reagent_note])")
else
+10 -4
View File
@@ -2,43 +2,46 @@
name = "ion bolt"
icon_state = "ion"
damage = 0
alwayslog = TRUE
damage_type = BURN
nodamage = 1
flag = "energy"
/obj/item/projectile/ion/on_hit(var/atom/target, var/blocked = 0)
..()
empulse(target, 1, 1, 1)
empulse(target, 1, 1, 1, cause = "[type] fired by [key_name(firer)]")
return 1
/obj/item/projectile/ion/weak
/obj/item/projectile/ion/weak/on_hit(atom/target, blocked = 0)
..()
empulse(target, 0, 0, 1)
empulse(target, 0, 0, 1, cause = "[type] fired by [key_name(firer)]")
return 1
/obj/item/projectile/bullet/gyro
name ="explosive bolt"
icon_state= "bolter"
damage = 50
alwayslog = TRUE
flag = "bullet"
/obj/item/projectile/bullet/gyro/on_hit(var/atom/target, var/blocked = 0)
..()
explosion(target, -1, 0, 2)
explosion(target, -1, 0, 2, cause = "[type] fired by [key_name(firer)]")
return 1
/obj/item/projectile/bullet/a40mm
name ="40mm grenade"
desc = "USE A WEEL GUN"
icon_state= "bolter"
alwayslog = TRUE
damage = 60
flag = "bullet"
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = 0)
..()
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
explosion(target, -1, 0, 2, 1, 0, flame_range = 3, cause = "[type] fired by [key_name(firer)]")
return 1
/obj/item/projectile/temp
@@ -229,6 +232,7 @@
name ="explosive slug"
damage = 25
weaken = 5
alwayslog = TRUE
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = 0)
..()
@@ -276,6 +280,7 @@
icon_state = "bluespace"
damage = 0
nodamage = 1
alwayslog = TRUE
var/teleport_target = null
/obj/item/projectile/energy/teleport/New(loc, tele_target)
@@ -289,6 +294,7 @@
do_teleport(target, teleport_target, 0)//teleport what's in the tile to the beacon
else
do_teleport(target, target, 15) //Otherwise it just warps you off somewhere.
add_attack_logs(firer, target, "Shot with a [type] [teleport_target ? "(Destination: [teleport_target])" : ""]")
/obj/item/projectile/snowball
name = "snowball"