Reworks the if checks, should make the system more robust.
This commit is contained in:
skull132
2016-02-21 15:39:57 +02:00
parent 6c158fc4e2
commit c462205540

View File

@@ -344,19 +344,20 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
in_chamber.on_hit(M)
if (in_chamber.damage == 0)
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
mouthshoot = 0
return
in_chamber.on_hit(M)
if (in_chamber.damage_type != HALLOSS)
else if (in_chamber.damage_type == HALLOSS)
user << "<span class = 'notice'>Ow...</span>"
user.apply_effect(110,AGONY,0)
else
log_and_message_admins("[key_name(user)] commited suicide using \a [src]")
user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1)
user.death()
else
user << "<span class = 'notice'>Ow...</span>"
user.apply_effect(110,AGONY,0)
qdel(in_chamber)
mouthshoot = 0
return