mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Merged all those vent-crawl procs D:
As such the same rules apply to all mobs now. They all make noise as they exit the vent. They can all be blocked by welded vents. They all cannot carry items through (except implants and facehuggers). They all have a delay in arriving at their destination. This removes any meta "Vent noise! Must be aliums cos monkeys don't have that code!". Fixes a bug that stopped ventcrawl working. And, best of all, you can vent-crawl to any connected vent..not just one per area. :3 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4137 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -630,7 +630,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
||||||
return
|
return
|
||||||
|
|
||||||
explosion (O, devastation, heavy, light, flash)
|
explosion(O, devastation, heavy, light, flash)
|
||||||
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
|
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
|
||||||
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
|
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
|
||||||
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|||||||
@@ -101,80 +101,6 @@ I kind of like the right click only--the window version can get a little confusi
|
|||||||
src << "\green Target is too far away."
|
src << "\green Target is too far away."
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE
|
|
||||||
set name = "Crawl through Vent"
|
|
||||||
set desc = "Enter an air vent and crawl through the pipes."
|
|
||||||
set category = "Alien"
|
|
||||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
|
||||||
// return
|
|
||||||
|
|
||||||
if(powerc())
|
|
||||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
|
||||||
if(!v.welded)
|
|
||||||
vent_found = v
|
|
||||||
else
|
|
||||||
src << "\red That vent is welded."
|
|
||||||
if(vent_found)
|
|
||||||
var/list/vents = list()
|
|
||||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
|
||||||
if(temp_vent.loc == loc)
|
|
||||||
continue
|
|
||||||
if(temp_vent.welded)
|
|
||||||
continue
|
|
||||||
vents.Add(temp_vent)
|
|
||||||
var/list/choices = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
|
||||||
if(vent.loc.z != loc.z)
|
|
||||||
continue
|
|
||||||
if(vent.welded)
|
|
||||||
continue
|
|
||||||
var/atom/a = get_turf_loc(vent)
|
|
||||||
choices.Add(a.loc)
|
|
||||||
var/turf/startloc = loc
|
|
||||||
var/obj/selection = input("Select a destination.", "Duct System") in sortAtom(choices)
|
|
||||||
var/selection_position = choices.Find(selection)
|
|
||||||
if(loc==startloc)
|
|
||||||
|
|
||||||
// Hacky way of hopefully preventing a runtime error from happening
|
|
||||||
if(vents.len < selection_position)
|
|
||||||
vents.len = selection_position//What the fuck is this I dont even, Right will likely have to fix this later
|
|
||||||
|
|
||||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
|
|
||||||
if(target_vent)
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
|
||||||
// var/list/huggers = list()
|
|
||||||
// for(var/obj/effect/alien/facehugger/F in view(3, src))
|
|
||||||
// if(istype(F, /obj/effect/alien/facehugger))
|
|
||||||
// huggers.Add(F)
|
|
||||||
loc = vent_found
|
|
||||||
|
|
||||||
// for(var/obj/effect/alien/facehugger/F in huggers)
|
|
||||||
// F.loc = vent_found
|
|
||||||
var/travel_time = get_dist(loc, target_vent.loc)
|
|
||||||
|
|
||||||
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
|
|
||||||
if(!target_vent.welded)
|
|
||||||
for(var/mob/O in hearers(target_vent, null))
|
|
||||||
O.show_message("You hear something crawling through the ventilation pipes.",2)
|
|
||||||
|
|
||||||
spawn(travel_time)
|
|
||||||
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
|
|
||||||
target_vent = vent_found //travel back. No additional time required.
|
|
||||||
src << "\red The vent you were heading to appears to be welded."
|
|
||||||
loc = target_vent.loc
|
|
||||||
// for(var/obj/effect/alien/facehugger/F in huggers)
|
|
||||||
// F.loc = loc
|
|
||||||
|
|
||||||
else
|
|
||||||
src << "\green You need to remain still while entering a vent."
|
|
||||||
else
|
|
||||||
src << "\green This vent is not connected to anything."
|
|
||||||
else
|
|
||||||
src << "\green You must be standing on or beside an open air vent to enter it."
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
||||||
set name = "Spit Neurotoxin (50)"
|
set name = "Spit Neurotoxin (50)"
|
||||||
|
|||||||
@@ -13,19 +13,20 @@
|
|||||||
|
|
||||||
real_name = src.name
|
real_name = src.name
|
||||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
verbs -= /mob/living/carbon/alien/verb/ventcrawl
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/queen
|
/mob/living/carbon/alien/humanoid/queen
|
||||||
|
|
||||||
updatehealth()
|
updatehealth()
|
||||||
if (src.nodamage == 0)
|
if (src.nodamage)
|
||||||
//oxyloss is only used for suicide
|
|
||||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
|
||||||
src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
|
||||||
else
|
|
||||||
src.health = 250
|
src.health = 250
|
||||||
src.stat = 0
|
src.stat = 0
|
||||||
|
else
|
||||||
|
//oxyloss is only used for suicide
|
||||||
|
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||||
|
src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||||
|
|
||||||
|
|
||||||
handle_regular_hud_updates()
|
handle_regular_hud_updates()
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +1,3 @@
|
|||||||
/mob/living/carbon/alien/larva/verb/ventcrawl() // -- TLE
|
|
||||||
set name = "Crawl through Vent"
|
|
||||||
set desc = "Enter an air vent and crawl through the pipe system."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
|
||||||
// return
|
|
||||||
if(powerc())
|
|
||||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
|
||||||
if(!v.welded)
|
|
||||||
vent_found = v
|
|
||||||
else
|
|
||||||
src << "\red That vent is welded."
|
|
||||||
if(vent_found)
|
|
||||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
|
||||||
var/list/vents = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
|
||||||
if(temp_vent.loc == loc)
|
|
||||||
continue
|
|
||||||
vents.Add(temp_vent)
|
|
||||||
var/list/choices = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
|
||||||
if(vent.loc.z != loc.z)
|
|
||||||
continue
|
|
||||||
var/atom/a = get_turf_loc(vent)
|
|
||||||
choices.Add(a.loc)
|
|
||||||
var/turf/startloc = loc
|
|
||||||
var/obj/selection = input("Select a destination.", "Duct System") in sortAtom(choices)
|
|
||||||
var/selection_position = choices.Find(selection)
|
|
||||||
if(loc==startloc)
|
|
||||||
var/obj/target_vent = vents[selection_position]
|
|
||||||
if(target_vent)
|
|
||||||
for(var/mob/O in oviewers(src, null))
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
|
||||||
loc = target_vent.loc
|
|
||||||
else
|
|
||||||
src << "\green You need to remain still while entering a vent."
|
|
||||||
else
|
|
||||||
src << "\green This vent is not connected to anything."
|
|
||||||
else
|
|
||||||
src << "\green You must be standing on or beside an air vent to enter it."
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/verb/hide()
|
/mob/living/carbon/alien/larva/verb/hide()
|
||||||
set name = "Hide"
|
set name = "Hide"
|
||||||
|
|||||||
5
code/modules/mob/living/carbon/alien/powers.dm
Normal file
5
code/modules/mob/living/carbon/alien/powers.dm
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/mob/living/carbon/alien/verb/ventcrawl() // -- TLE
|
||||||
|
set name = "Crawl through Vent"
|
||||||
|
set desc = "Enter an air vent and crawl through the pipe system."
|
||||||
|
set category = "Alien"
|
||||||
|
handle_ventcrawl()
|
||||||
@@ -245,3 +245,80 @@
|
|||||||
dna = newDNA
|
dna = newDNA
|
||||||
|
|
||||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||||
|
|
||||||
|
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
|
||||||
|
|
||||||
|
if(!stat)
|
||||||
|
if(!lying)
|
||||||
|
|
||||||
|
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||||
|
if(!v.welded)
|
||||||
|
vent_found = v
|
||||||
|
else
|
||||||
|
src << "\red That vent is welded."
|
||||||
|
|
||||||
|
if(vent_found)
|
||||||
|
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||||
|
var/list/vents[0]
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||||
|
if(temp_vent.loc == loc)
|
||||||
|
continue
|
||||||
|
var/turf/T = get_turf(temp_vent)
|
||||||
|
|
||||||
|
if(!T || T.z != loc.z)
|
||||||
|
continue
|
||||||
|
|
||||||
|
var/i = 1
|
||||||
|
var/index = "[T.loc.name]\[[i]\]"
|
||||||
|
while(index in vents)
|
||||||
|
i++
|
||||||
|
index = "[T.loc.name]\[[i]\]"
|
||||||
|
vents[index] = temp_vent
|
||||||
|
|
||||||
|
var/turf/startloc = loc
|
||||||
|
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
|
||||||
|
if(!selection) return
|
||||||
|
if(loc==startloc)
|
||||||
|
if(contents.len)
|
||||||
|
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||||
|
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
||||||
|
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||||
|
return
|
||||||
|
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||||
|
if(target_vent)
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||||
|
loc = target_vent
|
||||||
|
|
||||||
|
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
|
||||||
|
|
||||||
|
spawn(travel_time)
|
||||||
|
|
||||||
|
if(!target_vent) return
|
||||||
|
for(var/mob/O in hearers(target_vent,null))
|
||||||
|
O.show_message("You hear something squeezing through the ventilation ducts.",2)
|
||||||
|
|
||||||
|
sleep(travel_time)
|
||||||
|
|
||||||
|
if(!target_vent) return
|
||||||
|
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
|
||||||
|
target_vent = vent_found //travel back. No additional time required.
|
||||||
|
src << "\red The vent you were heading to appears to be welded."
|
||||||
|
loc = target_vent.loc
|
||||||
|
|
||||||
|
else
|
||||||
|
src << "You need to remain still while entering a vent."
|
||||||
|
else
|
||||||
|
src << "This vent is not connected to anything."
|
||||||
|
|
||||||
|
else
|
||||||
|
src << "You must be standing on or beside an air vent to enter it."
|
||||||
|
|
||||||
|
else
|
||||||
|
src << "You can't vent crawl while you're stunned!"
|
||||||
|
|
||||||
|
else
|
||||||
|
src << "You must be conscious to do this!"
|
||||||
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,16 @@
|
|||||||
name = text("baby metroid ([rand(1, 1000)])")
|
name = text("baby metroid ([rand(1, 1000)])")
|
||||||
else
|
else
|
||||||
name = text("adult metroid ([rand(1,1000)])")
|
name = text("adult metroid ([rand(1,1000)])")
|
||||||
|
|
||||||
real_name = name
|
real_name = name
|
||||||
spawn (1)
|
spawn (1)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
src << "\blue Your icons have been generated!"
|
src << "\blue Your icons have been generated!"
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/mob/living/carbon/metroid/adult/New()
|
||||||
|
verbs.Remove(/mob/living/carbon/metroid/verb/ventcrawl)
|
||||||
|
..()
|
||||||
|
|
||||||
/mob/living/carbon/metroid/proc/mind_initialize(mob/G)
|
/mob/living/carbon/metroid/proc/mind_initialize(mob/G)
|
||||||
mind = new
|
mind = new
|
||||||
mind.current = src
|
mind.current = src
|
||||||
|
|||||||
@@ -232,56 +232,5 @@
|
|||||||
set name = "Crawl through Vent"
|
set name = "Crawl through Vent"
|
||||||
set desc = "Enter an air vent and crawl through the pipe system."
|
set desc = "Enter an air vent and crawl through the pipe system."
|
||||||
set category = "Metroid"
|
set category = "Metroid"
|
||||||
|
if(Victim) return
|
||||||
|
handle_ventcrawl()
|
||||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
|
||||||
src << "<i>I am much too big to fit in this small vent...</i>"
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!stat)
|
|
||||||
|
|
||||||
if(Victim)
|
|
||||||
src << "<i>Not while I am a feeding...</i>"
|
|
||||||
return
|
|
||||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
|
||||||
if(!v.welded)
|
|
||||||
vent_found = v
|
|
||||||
else
|
|
||||||
src << "\red <i>That vent is welded...</i>"
|
|
||||||
if(vent_found)
|
|
||||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
|
||||||
var/list/vents = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
|
||||||
if(temp_vent.loc == loc)
|
|
||||||
continue
|
|
||||||
vents.Add(temp_vent)
|
|
||||||
var/list/choices = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
|
||||||
if(vent.loc.z != loc.z)
|
|
||||||
continue
|
|
||||||
var/atom/a = get_turf_loc(vent)
|
|
||||||
choices.Add(a.loc)
|
|
||||||
var/turf/startloc = loc
|
|
||||||
var/obj/selection = input("Select a destination.", "Duct System") in sortAtom(choices)
|
|
||||||
var/selection_position = choices.Find(selection)
|
|
||||||
if(loc==startloc)
|
|
||||||
var/obj/target_vent = vents[selection_position]
|
|
||||||
if(target_vent)
|
|
||||||
for(var/mob/O in oviewers())
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
|
||||||
loc = target_vent.loc
|
|
||||||
else
|
|
||||||
src << "<i>I must remain still while entering a vent...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>This vent is not connected to anything...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>I must be standing on or beside an air vent to enter it...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>I must be conscious to do this...</i>"
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,51 +2,4 @@
|
|||||||
set name = "Crawl through Vent"
|
set name = "Crawl through Vent"
|
||||||
set desc = "Enter an air vent and crawl through the pipe system."
|
set desc = "Enter an air vent and crawl through the pipe system."
|
||||||
set category = "Monkey"
|
set category = "Monkey"
|
||||||
|
handle_ventcrawl()
|
||||||
if(stat == CONSCIOUS)
|
|
||||||
if(!lying)
|
|
||||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
|
||||||
if(!v.welded)
|
|
||||||
vent_found = v
|
|
||||||
else
|
|
||||||
src << "\red That vent is welded."
|
|
||||||
if(vent_found)
|
|
||||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
|
||||||
var/list/vents = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
|
||||||
if(temp_vent.loc == loc)
|
|
||||||
continue
|
|
||||||
vents.Add(temp_vent)
|
|
||||||
var/list/choices = list()
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
|
||||||
if(vent.loc.z != loc.z)
|
|
||||||
continue
|
|
||||||
var/atom/a = get_turf_loc(vent)
|
|
||||||
choices.Add(a.loc)
|
|
||||||
var/turf/startloc = loc
|
|
||||||
var/obj/selection = input("Select a destination.", "Duct System") in sortAtom(choices)
|
|
||||||
var/selection_position = choices.Find(selection)
|
|
||||||
if(loc==startloc)
|
|
||||||
if(contents.len)
|
|
||||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
|
||||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
|
|
||||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
|
||||||
return
|
|
||||||
var/obj/target_vent = vents[selection_position]
|
|
||||||
if(target_vent)
|
|
||||||
for(var/mob/O in oviewers(src, null))
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
|
||||||
loc = target_vent.loc
|
|
||||||
else
|
|
||||||
src << "You need to remain still while entering a vent."
|
|
||||||
else
|
|
||||||
src << "This vent is not connected to anything."
|
|
||||||
else
|
|
||||||
src << "You must be standing on or beside an air vent to enter it."
|
|
||||||
else
|
|
||||||
src << "You can't vent crawl while you're stunned!"
|
|
||||||
else
|
|
||||||
src << "You must be conscious to do this!"
|
|
||||||
return
|
|
||||||
|
|||||||
@@ -743,6 +743,7 @@
|
|||||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\death.dm"
|
#include "code\modules\mob\living\carbon\alien\death.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\alien\powers.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\say.dm"
|
#include "code\modules\mob\living\carbon\alien\say.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
|
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\death.dm"
|
#include "code\modules\mob\living\carbon\alien\humanoid\death.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user