Fixes certain compile errors with the taser, baton.

Simple code certainly needs testing, regardless of the hour.
This commit is contained in:
Datraen
2016-05-12 17:46:18 -04:00
parent 3d9435c9b3
commit 3a666dbd7f
3 changed files with 22 additions and 12 deletions

View File

@@ -8,31 +8,38 @@
*/
/obj/item/weapon/melee/baton/slime
name = "stunbaton (s)"
name = "slimebaton"
desc = "A modified stun baton designed to stun slimes for handling."
icon_state = "slimebaton"
item_state = "slimebaton"
slot_flags = SLOT_BELT
force = 9
lightcolor = "#33CCFF"
origin_tech = list(TECH_COMBAT = 2, TECH_BIO = 4)
agonyforce = 10 //It's not supposed to be great at stunning human beings.
var/stunforce = 60 //How much stasis it does to slimes, and 1/3rd to non-slimes.
var/stasisforce = 60 //How much stasis it does to slimes, and 1/3rd to non-slimes.
/obj/item/weapon/melee/baton/slime/attack(mob/M, mob/user)
if(istype(M, /mob/living/simple_animal/xeno))
var/mob/living/simple_animal/xeno/X = M
if(istype(M, /mob/living/simple_animal/xeno/slime))
X.stasis += stunforce
X.stasis += stasisforce
else
X.stasis += (stunforce / 6)
X.stasis += (stasisforce / 6)
..()
/obj/item/weapon/melee/baton/slime/loaded/New()
..()
bcell = new/obj/item/weapon/cell/high(src)
update_icon()
return
// Xeno stun gun + projectile
/obj/item/weapon/gun/energy/taser/xeno
name = "xeno taser gun"
desc = "Straight out of NT's testing laboratories, this small gun is used to subdue non-humanoid xeno life forms. While marketed towards handling slimes, it may be useful for other creatures."
icon_state = taserold
icon_state = "taserold"
fire_sound = 'sound/weapons/taser2.ogg'
max_shots = 10
projectile_type = /obj/item/projectile/beam/stun/xeno
@@ -40,16 +47,18 @@
/obj/item/projectile/beam/stun/xeno
icon_state = "omni"
agony = 4
var/stunforce = 40
var/stasisforce = 40
muzzle_type = /obj/effect/projectile/laser_omni/muzzle
tracer_type = /obj/effect/projectile/laser_omni/tracer
impact_type = /obj/effect/projectile/laser_omni/impact
/obj/item/projectile/beam/stun/xeno/on_hit(var/atom/target, var/blocked = 0)
if(istype(M, /mob/living/simple_animal/xeno))
var/mob/living/simple_animal/xeno/X = M
if(istype(M, /mob/living/simple_animal/xeno/slime))
X.stasis += stunforce
if(istype(target, /mob/living/simple_animal/xeno))
var/mob/living/simple_animal/xeno/X = target
if(istype(target, /mob/living/simple_animal/xeno/slime))
X.stasis += stasisforce
else
X.stasis += (stunforce / 8)
X.stasis += (stasisforce / 8)
else
..()