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:
Incoming
2014-02-25 20:43:30 -05:00
parent 0110a571d7
commit f0b81575e7
19 changed files with 94 additions and 128 deletions
+73 -10
View File
@@ -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)
@@ -11,6 +11,7 @@
gender = NEUTER
dna = null
faction = "alien"
ventcrawler = 2
var/storedPlasma = 250
var/max_plasma = 500
@@ -7,6 +7,7 @@
status_flags = CANPARALYSE
heal_rate = 5
plasma_rate = 20
ventcrawler = 0 //pull over that ass too fat
/mob/living/carbon/alien/humanoid/queen/New()
@@ -22,7 +23,6 @@
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 -= /mob/living/carbon/alien/verb/ventcrawl
..()
/mob/living/carbon/alien/humanoid/queen/handle_regular_hud_updates()
@@ -85,4 +85,4 @@
else
icon_state = "queen_s"
for(var/image/I in overlays_standing)
overlays += I
overlays += I
@@ -1,5 +0,0 @@
/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()
+1 -94
View File
@@ -221,99 +221,6 @@
// ++++ROCKDTBEN++++ MOB PROCS //END
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
if(stat)
src << "You must be conscious to do this!"
return
if(lying)
src << "You can't vent crawl while you're stunned!"
return
if(vent_found) // one was passed in, probably from vent/AltClick()
if(vent_found.welded)
src << "That vent is welded shut."
return
if(!vent_found.Adjacent(src))
return // don't even acknowledge that
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(!vent_found)
src << "You'll need a non-welded vent to crawl into!"
return
if(!vent_found.network || !vent_found.network.normal_members.len)
src << "This vent is not connected to anything."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.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)
src << "\red There are no available vents to travel to, they could be welded."
return
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
if(!selection) return
if(!vent_found.Adjacent(src))
src << "Never mind, you left."
return
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
if(isslime(src))
var/mob/living/carbon/slime/S = src
if(S.Victim)
src << "\red You'll have to let [S.Victim] go or finish eating \him first."
return
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
if(!target_vent)
return
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
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
/mob/living/carbon/clean_blood()
if(ishuman(src))
var/mob/living/carbon/human/H = src
@@ -553,4 +460,4 @@ var/const/GALOSHES_DONT_HELP = 8
loc.handle_slip(src, s_amount, w_amount, O, lube)
/mob/living/carbon/fall(var/forced)
loc.handle_fall(src, forced)//it's loc so it doesn't call the mob's handle_fall which does nothing
loc.handle_fall(src, forced)//it's loc so it doesn't call the mob's handle_fall which does nothing
@@ -5,6 +5,7 @@
pass_flags = PASSTABLE
voice_message = "skree!"
say_message = "hums"
ventcrawler = 2
var/is_adult = 0
layer = 5
@@ -225,13 +225,4 @@
else
src << "<i>I am not ready to reproduce yet...</i>"
else
src << "<i>I am not old enough to reproduce yet...</i>"
/mob/living/carbon/slime/verb/ventcrawl()
set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Slime"
if(Victim) return
handle_ventcrawl()
src << "<i>I am not old enough to reproduce yet...</i>"
@@ -8,6 +8,7 @@
gender = NEUTER
pass_flags = PASSTABLE
update_icon = 0 ///no need to call regenerate_icon
ventcrawler = 1
/mob/living/carbon/monkey/New()
create_reagents(1000)
@@ -1,5 +0,0 @@
/mob/living/carbon/monkey/verb/ventcrawl()
set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Monkey"
handle_ventcrawl()
@@ -35,3 +35,5 @@
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
var/ventcrawler = 0 //0 No vent crawling, 1 vent crawling in the nude, 2 vent crawling always
@@ -16,6 +16,7 @@
response_harm = "stomps"
stop_automated_movement = 1
friendly = "pinches"
ventcrawler = 2
var/obj/item/inventory_head
var/obj/item/inventory_mask
@@ -166,6 +166,7 @@
response_harm = "kicks"
attacktext = "kicks"
health = 1
ventcrawler = 2
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE
@@ -206,6 +207,7 @@ var/global/chicken_count = 0
response_harm = "kicks"
attacktext = "kicks"
health = 10
ventcrawler = 2
var/eggsleft = 0
var/body_color
pass_flags = PASSTABLE
@@ -13,4 +13,5 @@
melee_damage_upper = 2
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
response_harm = "stomps on"
ventcrawler = 2
@@ -18,6 +18,7 @@
response_disarm = "gently pushes aside"
response_harm = "splats"
density = 0
ventcrawler = 2
var/body_color //brown, gray and white, leave blank for random
/mob/living/simple_animal/mouse/New()
@@ -12,6 +12,7 @@
response_disarm = "shoos"
response_harm = "stomps on"
emote_see = list("jiggles", "bounces in place")
ventcrawler = 2
var/colour = "grey"
/mob/living/simple_animal/slime/Bump(atom/movable/AM as mob|obj, yes)
@@ -12,4 +12,5 @@
response_help = "prods"
response_disarm = "pushes aside"
response_harm = "smacks"
harm_intent_damage = 5
harm_intent_damage = 5
ventcrawler = 2
@@ -34,6 +34,7 @@
var/busy = 0
pass_flags = PASSTABLE
move_to_delay = 6
ventcrawler = 2
//nursemaids - these create webs and eggs
/mob/living/simple_animal/hostile/giant_spider/nurse
@@ -22,6 +22,7 @@
stat_attack = 2
mouse_opacity = 1
speed = 1
ventcrawler = 2
var/powerlevel = 0 //Tracks our general strength level gained from eating other shrooms
var/bruised = 0 //If someone tries to cheat the system by attacking a shroom to lower its health, punish them so that it wont award levels to shrooms that eat it
var/recovery_cooldown = 0 //So you can't repeatedly revive it during a fight
@@ -23,6 +23,7 @@
faction = "carp"
attack_sound = 'sound/weapons/bite.ogg'
environment_smash = 0
ventcrawler = 2
//Space bats need no air to fly in.