mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
cuts down inherited code
This should cut down code that was inherited from effects/spider
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/effect/spider/grub //travis is a butt!!!
|
||||
/obj/effect/spider/grub
|
||||
name = "grub larva"
|
||||
desc = "It never stays still for long."
|
||||
// icon = 'grub_vr.dmi'
|
||||
@@ -21,87 +21,6 @@
|
||||
get_light_and_color(parent)
|
||||
..()
|
||||
|
||||
/obj/effect/spider/grub/Destroy()
|
||||
processing_objects -= src
|
||||
walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
return ..()
|
||||
|
||||
/obj/effect/grubs/grub/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/effect/spider/grub/proc/die()
|
||||
visible_message("<span class='alert'>[src] dies!</span>")
|
||||
new /obj/effect/decal/cleanable/spiderling_remains(src.loc) //Leaving this. It works.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/grub/healthcheck()
|
||||
if(health <= 0)
|
||||
die()
|
||||
|
||||
/obj/effect/spider/grub/process()
|
||||
if(travelling_in_vent)
|
||||
if(istype(src.loc, /turf))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
if(entry_vent.network && entry_vent.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.network.normal_members)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
|
||||
/*if(prob(50))
|
||||
src.visible_message("<B>[src] scrambles into the ventillation ducts!</B>")*/
|
||||
|
||||
spawn(rand(20,60))
|
||||
loc = exit_vent
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
src.visible_message("<span class='notice'>You hear something squeezing through the ventilation ducts.</span>",2)
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
loc = exit_vent.loc
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
else
|
||||
entry_vent = null
|
||||
//=================
|
||||
|
||||
if(isturf(loc))
|
||||
if(prob(25))
|
||||
var/list/nearby = trange(5, src) - loc
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom, 5)
|
||||
if(prob(25))
|
||||
src.visible_message("<span class='notice'>\The [src] slides[pick(" away"," around","")].</span>")
|
||||
else if(prob(5))
|
||||
//vent crawl!
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 5)
|
||||
break
|
||||
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = /mob/living/simple_animal/retaliate/solargrub
|
||||
new spawn_type(src.loc, src)
|
||||
@@ -122,6 +41,3 @@
|
||||
O.owner << "<span class='notice'>Your [O.name] itches...</span>"
|
||||
else if(prob(1))
|
||||
src.visible_message("<span class='notice'>\The [src] squelches.</span>")
|
||||
|
||||
if(amount_grown)
|
||||
amount_grown += rand(0,2)
|
||||
|
||||
Reference in New Issue
Block a user