mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Ventcrawling changes
Fixes #5573 Fixes #5891 Fixes #6191 Centralized some code for ventcrawling in ventcrawl.dm Made passive vents a type to be checked for ventcrawling into Made hunters able to carry things into vents apparently Gave contortionist jumpsuit a verb to ventcrawl with for the scrubs who dont know hotkeys
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, /obj/machinery/atmospherics/unary/vent_scrubber)
|
||||
var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, /obj/machinery/atmospherics/unary/vent_scrubber, /obj/machinery/atmospherics/unary/vent)
|
||||
|
||||
/mob/living/proc/can_ventcrawl()
|
||||
return 0
|
||||
@@ -29,6 +29,33 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
return C.check_clothing(src)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/under/contortionist/verb/crawl_through_vent()
|
||||
set name = "Crawl Through Vent"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(istype(user) && user.w_uniform == src && check_clothing(user))
|
||||
var/pipe = user.start_ventcrawl()
|
||||
if(pipe)
|
||||
user.handle_ventcrawl(pipe)
|
||||
|
||||
/mob/proc/start_ventcrawl()
|
||||
var/atom/pipe
|
||||
var/list/pipes = list()
|
||||
for(var/obj/machinery/atmospherics/unary/U in range(1))
|
||||
if(is_type_in_list(U,ventcrawl_machinery) && Adjacent(U))
|
||||
pipes |= U
|
||||
if(!pipes || !pipes.len)
|
||||
src << "There are no pipes that you can ventcrawl into within range!"
|
||||
return
|
||||
if(pipes.len == 1)
|
||||
pipe = pipes[1]
|
||||
else
|
||||
pipe = input("Crawl Through Vent", "Pick a pipe") as null|anything in pipes
|
||||
if(canmove && pipe)
|
||||
return pipe
|
||||
|
||||
/mob/living/carbon/slime/can_ventcrawl()
|
||||
return 1
|
||||
|
||||
@@ -53,9 +80,13 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
/mob/living/carbon/alien/can_ventcrawl()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/ventcrawl_carry()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/can_ventcrawl()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/var/ventcrawl_layer = PIPING_LAYER_DEFAULT
|
||||
|
||||
/mob/living/proc/handle_ventcrawl(var/atom/clicked_on)
|
||||
|
||||
Reference in New Issue
Block a user