Code cleanup; silicons, melee, hallucinations

- Cleaned up paint.dm
- Everything else should be self explanatory
- Removed braindamage part of esword, since you can't reach that; it
  would be handled by attack_self()
This commit is contained in:
Jack Edge
2016-06-24 14:03:44 +01:00
parent b6a715a366
commit a841bd14f5
15 changed files with 119 additions and 138 deletions
+10 -17
View File
@@ -58,6 +58,10 @@ Gunshots/explosions/opening doors/less rare audio (done)
invisibility = INVISIBILITY_OBSERVER
var/mob/living/carbon/target = null
/obj/effect/hallucination/proc/wake_and_restore()
target.hal_screwyhud = 0
target.SetSleeping(0)
/obj/effect/hallucination/simple
var/image_icon = 'icons/mob/alien.dmi'
var/image_state = "alienh_pounce"
@@ -72,7 +76,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
target = T
current_image = GetImage()
if(target.client) target.client.images |= current_image
return
/obj/effect/hallucination/simple/proc/GetImage()
var/image/I = image(image_icon,loc,image_state,image_layer,dir=src.dir)
@@ -101,7 +104,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/Moved(atom/OldLoc, Dir)
Show()
return
/obj/effect/hallucination/simple/Destroy()
if(target.client) target.client.images.Remove(current_image)
@@ -170,7 +172,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/xeno/New(loc,var/mob/living/carbon/T)
..()
name = "alien hunter ([rand(1, 1000)])"
return
/obj/effect/hallucination/simple/xeno/throw_impact(A)
update_icon("alienh_pounce")
@@ -236,9 +237,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
if(target_dist<=3) //"Eaten"
target.hal_screwyhud = 1
target.SetSleeping(20)
spawn(rand(50,100))
target.hal_screwyhud = 0
target.SetSleeping(0)
addtimer(src, "wake_and_restore", rand(50, 100))
/obj/effect/hallucination/battle
@@ -379,7 +378,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
"<span class='danger'>[my_target] has attacked [src]!</span>")
src.health -= P.force
return
/obj/effect/fake_attacker/Crossed(mob/M, somenumber)
if(M == my_target)
@@ -391,11 +389,9 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/fake_attacker/New(loc,var/mob/living/carbon/T)
..()
my_target = T
spawn(300)
qdel(src)
QDEL_IN(src, 300)
step_away(src,my_target,2)
spawn(0)
attack_loop()
addtimer(src, "attack_loop", 0)
/obj/effect/fake_attacker/proc/updateimage()
@@ -457,9 +453,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
O.name = "blood"
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
target << I
spawn(300)
qdel(O)
return
QDEL_IN(O, 300)
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, /obj/item/weapon/melee/energy/sword/saber,\
@@ -664,8 +658,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
halitem.icon_state = "flashbang1"
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
qdel(halitem)
QDEL_IN(halitem, rand(100, 250))
if("dangerflash")
//Flashes of danger
//src << "Danger Flash"
@@ -721,4 +714,4 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
if(client) client.images -= halbody
halbody = null
halbody = null