mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Removes the ventcrawl verb, all ventcrawlers are still ventcrawlers and can use ventcrawling with the alt click. This is simutaniously less buggy and far easier to do on the fly.
The meat of ventcrawling is now stored in the vent pump, meaning anything can ventcrawl if it has ventcrawling on. Ventcrawling 0 is no crawling, Ventcrawling 1 is naked crawling, Ventcrawling 2 and above is always crawling. Yes you can var edit humans to be able to ventcrawl with this, great if you want to reenact diehard! Simple animals that logically should fit in a vent can now ventcrawl. Note that this only is relevent for player controlled simple animals (staff of change/badminry), it won't be used by the mob AI.
This commit is contained in:
@@ -322,14 +322,77 @@
|
||||
return
|
||||
|
||||
/*
|
||||
Alt-click to ventcrawl - Monkeys, aliens, and slimes
|
||||
This is a little buggy but somehow that just seems to plague ventcrawl.
|
||||
I am sorry, I don't know why.
|
||||
Alt-click to ventcrawl
|
||||
*/
|
||||
/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/carbon/ML)
|
||||
if(istype(ML))
|
||||
var/list/ventcrawl_verbs = list(/mob/living/carbon/monkey/verb/ventcrawl, /mob/living/carbon/alien/verb/ventcrawl, /mob/living/carbon/slime/verb/ventcrawl)
|
||||
if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated
|
||||
ML.handle_ventcrawl(src)
|
||||
return
|
||||
..()
|
||||
/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/L)
|
||||
if(!L.ventcrawler || !isliving(L) || !Adjacent(L))
|
||||
return
|
||||
if(L.stat)
|
||||
L << "You must be conscious to do this!"
|
||||
return
|
||||
if(L.lying)
|
||||
L << "You can't vent crawl while you're stunned!"
|
||||
return
|
||||
if(welded)
|
||||
L << "That vent is welded shut."
|
||||
return
|
||||
|
||||
/*else
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
if(v.Adjacent(src))
|
||||
vent_found = v*/
|
||||
|
||||
if(!network || !network.normal_members.len)
|
||||
L << "This vent is not connected to anything."
|
||||
return
|
||||
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in network.normal_members)
|
||||
if(temp_vent.welded)
|
||||
continue
|
||||
if(temp_vent in 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
|
||||
if(!vents.len)
|
||||
L << "<span class='warning'> There are no available vents to travel to, they could be welded. </span>"
|
||||
return
|
||||
|
||||
var/obj/selection = input(L,"Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
|
||||
if(!selection) return
|
||||
|
||||
if(!Adjacent(L))
|
||||
return
|
||||
if(iscarbon(L) && L.ventcrawler < 2) // lesser ventcrawlers can't bring items
|
||||
for(var/obj/item/carried_item in L.contents)
|
||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant or a facehugger
|
||||
L << "<span class='warning'> You can't be carrying items or have items equipped when vent crawling!</span>"
|
||||
return
|
||||
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||
if(!target_vent)
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(L, null))
|
||||
O.show_message(text("<B>[L] scrambles into the ventillation ducts!</B>"), 1)
|
||||
|
||||
for(var/mob/O in hearers(target_vent,null))
|
||||
O.show_message("You hear something squeezing through the ventilation ducts.",2)
|
||||
|
||||
if(target_vent.welded) //the vent can be welded while they scrolled through the list.
|
||||
target_vent = src
|
||||
L << "<span class='warning'> The vent you were heading to appears to be welded.</span>"
|
||||
L.loc = target_vent.loc
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(L)
|
||||
|
||||
Reference in New Issue
Block a user