Kitchen Strikes Back: The Rattening (#7268)

This commit is contained in:
Geeves
2019-10-31 20:54:44 +02:00
committed by Werner
parent 994d2a6a6b
commit bc59a20bec
5 changed files with 88 additions and 33 deletions
@@ -18,21 +18,21 @@
'sound/effects/creatures/rat_squeaks_2.ogg',
'sound/effects/creatures/rat_squeaks_3.ogg',
'sound/effects/creatures/rat_squeaks_4.ogg')
var/last_softsqueak = null//Used to prevent the same soft squeak twice in a row
var/squeals = 5//Spam control.
var/maxSqueals = 2//SPAM PROTECTION
var/last_squealgain = 0// #TODO-FUTURE: Remove from life() once something else is created
var/last_softsqueak = null //Used to prevent the same soft squeak twice in a row
var/squeals = 5 //Spam control.
var/maxSqueals = 2 //SPAM PROTECTION
var/last_squealgain = 0 // #TODO-FUTURE: Remove from life() once something else is created
var/squeakcooldown = 0
pass_flags = PASSTABLE
speak_chance = 3
turns_per_move = 5
see_in_dark = 6
maxHealth = 10
health = 10
maxHealth = 5
health = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/rat
response_help = "pets"
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "stomps on"
response_harm = "stomps on"
density = 0
meat_amount = 2 // Rats are a bit bigger, so a bit more meat for dreg-feeding.
var/body_color //brown, gray, white, american irish, hooded leave blank for random
+10 -10
View File
@@ -158,8 +158,8 @@
dispersion = list(0, 8)
/obj/item/weapon/gun/energy/mousegun
name = "\improper NT \"Arodentia\" Exterminator ray"
desc = "A highly sophisticated and certainly experimental raygun designed for rapid pest-control."
name = "\improper NT \"Arodentia\" Pesti-Shock"
desc = "A highly sophisticated and probably safe beamgun designed for rapid pest-control."
icon_state = "floramut100"
item_state = "floramut"
charge_meter = 0
@@ -170,21 +170,21 @@
slot_flags = SLOT_HOLSTER | SLOT_BELT
max_shots = 6
sel_mode = 1
burst = 3
burst_delay = 1
move_delay = 0
fire_delay = 3
dispersion = list(0, 15, 15)
var/emagged = FALSE
needspin = FALSE
var/lightfail = 0
/obj/item/weapon/gun/energy/mousegun/handle_post_fire(mob/user, atom/target, var/pointblank=0, var/reflex=0, var/playemote = 1)
var/T = get_turf(user)
spark(T, 3, alldirs)
..()
/obj/item/weapon/gun/energy/mousegun/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
to_chat(user, "<span class='warning'>You overload \the [src]'s shock modulator.</span>")
projectile_type = /obj/item/projectile/beam/mousegun/emag
emagged = TRUE
return TRUE
/obj/item/weapon/gun/energy/net
name = "net gun"
desc = "A gun designed to deploy energy nets to capture animals or unruly crew members."
+56 -15
View File
@@ -177,7 +177,7 @@
impact_type = /obj/effect/projectile/impact/disabler
/obj/item/projectile/beam/mousegun
name = "diffuse electrical arc"
name = "electrical arc"
icon_state = "stun"
nodamage = 1
damage_type = HALLOSS
@@ -191,37 +191,78 @@
..()
/obj/item/projectile/beam/mousegun/proc/mousepulse(turf/epicenter, range, log=0)
if (!epicenter)
if(!epicenter)
return
if (!istype(epicenter, /turf))
if(!istype(epicenter, /turf))
epicenter = get_turf(epicenter.loc)
for (var/mob/living/M in range(range, epicenter))
for(var/mob/living/M in range(range, epicenter))
var/distance = get_dist(epicenter, M)
if (distance < 0)
if(distance < 0)
distance = 0
if (distance <= range)
if (M.mob_size <= 2 && (M.find_type() & TYPE_ORGANIC))
M.visible_message("<span class='danger'>[M] bursts like a balloon!</span>")
M.gib()
if(distance <= range)
if (M.mob_size <= 3 && (M.find_type() & TYPE_ORGANIC))
M.visible_message("<span class='danger'>\The [M] gets fried!</span>")
M.color = "#4d4d4d" //get fried
M.death()
spark(M, 3, alldirs)
else if (iscarbon(M) && M.contents.len)
for (var/obj/item/weapon/holder/H in M.contents)
if (!H.contained)
else if(iscarbon(M) && M.contents.len)
for(var/obj/item/weapon/holder/H in M.contents)
if(!H.contained)
continue
var/mob/living/A = H.contained
if (!istype(A))
if(!istype(A))
continue
if (A.mob_size <= 2 && (A.find_type() & TYPE_ORGANIC))
if(A.mob_size <= 3 && (A.find_type() & TYPE_ORGANIC))
H.release_mob()
A.visible_message("<span class='danger'>\The [A] gets fried!</span>")
A.color = "#4d4d4d" //get fried
A.death()
to_chat(M, 'sound/effects/basscannon.ogg')
return TRUE
/obj/item/projectile/beam/mousegun/emag
name = "diffuse electrical arc"
taser_effect = 1
agony = 60
/obj/item/projectile/beam/mousegun/emag/mousepulse(turf/epicenter, range, log=0)
if(!epicenter)
return
if(!istype(epicenter, /turf))
epicenter = get_turf(epicenter.loc)
for(var/mob/living/M in range(range, epicenter))
var/distance = get_dist(epicenter, M)
if(distance < 0)
distance = 0
if(distance <= range)
if(M.mob_size <= 4 && (M.find_type() & TYPE_ORGANIC))
M.visible_message("<span class='danger'>[M] bursts like a balloon!</span>")
M.gib()
spark(M, 3, alldirs)
else if(iscarbon(M) && M.contents.len)
for(var/obj/item/weapon/holder/H in M.contents)
if(!H.contained)
continue
var/mob/living/A = H.contained
if(!istype(A))
continue
if(A.mob_size <= 4 && (A.find_type() & TYPE_ORGANIC))
H.release_mob()
A.visible_message("<span class='danger'>[A] bursts like a balloon!</span>")
A.gib()
to_chat(M, 'sound/effects/basscannon.ogg')
return 1
return TRUE
/obj/item/projectile/beam/shotgun
name = "diffuse laser"