mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Ventcrawler update (#18709)
* mob atmos properly handled * Ventcrawling signals * ventcrawler blowout * clarity * fix * fix again * again * consistency * Teshari rattler * scrubbers can be welded shut
This commit is contained in:
@@ -21,8 +21,8 @@ var/list/ventcrawl_machinery = list(
|
||||
|
||||
/mob/living/var/list/icon/pipes_shown = list()
|
||||
/mob/living/var/last_played_vent
|
||||
/mob/living/var/is_ventcrawling = 0
|
||||
/mob/living/var/prepping_to_ventcrawl = 0
|
||||
/mob/living/var/is_ventcrawling = FALSE
|
||||
/mob/living/var/prepping_to_ventcrawl = FALSE
|
||||
/mob/var/next_play_vent = 0
|
||||
|
||||
/mob/living/proc/can_ventcrawl()
|
||||
@@ -180,8 +180,12 @@ var/list/ventcrawl_machinery = list(
|
||||
break
|
||||
|
||||
if(vent_found)
|
||||
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
|
||||
if(SEND_SIGNAL(src,COMSIG_MOB_VENTCRAWL_CHECK,vent_found) & VENT_CRAWL_BLOCK_ENTRY)
|
||||
return
|
||||
if(SEND_SIGNAL(vent_found,COMSIG_VENT_CRAWLER_CHECK,src) & VENT_CRAWL_BLOCK_ENTRY)
|
||||
return
|
||||
|
||||
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
|
||||
to_chat(src, "You begin climbing into the ventilation system...")
|
||||
if(vent_found.air_contents && !issilicon(src))
|
||||
|
||||
@@ -202,15 +206,20 @@ var/list/ventcrawl_machinery = list(
|
||||
to_chat(src, span_warning("You feel a strong drag pulling you into the vent."))
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
to_chat(src, span_warning("You feel a strong current pushing you away from the vent."))
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
if(HAZARD_HIGH_PRESSURE to (HAZARD_HIGH_PRESSURE*2))
|
||||
to_chat(src, span_danger("You feel a roaring wind pushing you away from the vent!"))
|
||||
if((HAZARD_HIGH_PRESSURE*2) to INFINITY) // A little too crazy to enter
|
||||
to_chat(src, span_danger("You're pushed away by the extreme pressure in the vent!"))
|
||||
return
|
||||
|
||||
fade_towards(vent_found,45)
|
||||
prepping_to_ventcrawl = 1
|
||||
spawn(50)
|
||||
prepping_to_ventcrawl = 0
|
||||
if(!do_after(src, 45, target = src))
|
||||
// Handle animation delay
|
||||
fade_towards(vent_found, vent_crawl_time)
|
||||
prepping_to_ventcrawl = TRUE
|
||||
if(!do_after(src, vent_crawl_time, target = src))
|
||||
prepping_to_ventcrawl = FALSE
|
||||
return
|
||||
prepping_to_ventcrawl = FALSE
|
||||
|
||||
if(!can_ventcrawl())
|
||||
return
|
||||
|
||||
@@ -218,7 +227,8 @@ var/list/ventcrawl_machinery = list(
|
||||
|
||||
forceMove(vent_found)
|
||||
add_ventcrawl(vent_found)
|
||||
|
||||
SEND_SIGNAL(src,COMSIG_MOB_VENTCRAWL_START,vent_found)
|
||||
SEND_SIGNAL(vent_found,COMSIG_VENT_CRAWLER_ENTERED,src)
|
||||
else
|
||||
to_chat(src, "This vent is not connected to anything.")
|
||||
|
||||
@@ -226,7 +236,7 @@ var/list/ventcrawl_machinery = list(
|
||||
to_chat(src, "You must be standing on or beside an air vent to enter it.")
|
||||
|
||||
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
|
||||
is_ventcrawling = 1
|
||||
is_ventcrawling = TRUE
|
||||
//candrop = 0
|
||||
var/datum/pipe_network/network = starting_machine.return_network(starting_machine)
|
||||
if(!network)
|
||||
@@ -242,7 +252,7 @@ var/list/ventcrawl_machinery = list(
|
||||
client.screen += GLOB.global_hud.centermarker
|
||||
|
||||
/mob/living/proc/remove_ventcrawl()
|
||||
is_ventcrawling = 0
|
||||
is_ventcrawling = FALSE
|
||||
//candrop = 1
|
||||
if(client)
|
||||
for(var/image/current_image in pipes_shown)
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
for(var/mob/living/M in src) //ventcrawling is serious business
|
||||
M.remove_ventcrawl()
|
||||
M.forceMove(get_turf(src))
|
||||
SEND_SIGNAL(M,COMSIG_MOB_VENTCRAWL_END,src)
|
||||
SEND_SIGNAL(src,COMSIG_VENT_CRAWLER_EXITED,M)
|
||||
if(pipe_image)
|
||||
for(var/mob/living/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
@@ -43,6 +45,7 @@
|
||||
if(world.time > user.next_play_vent)
|
||||
user.next_play_vent = world.time+30
|
||||
var/turf/T = get_turf(src)
|
||||
SSmotiontracker.ping(T,40) // Teshari rattler
|
||||
playsound(T, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
|
||||
var/message = pick(
|
||||
prob(90);"* clunk *",
|
||||
@@ -56,6 +59,8 @@
|
||||
if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
|
||||
user.remove_ventcrawl()
|
||||
user.forceMove(src.loc)
|
||||
SEND_SIGNAL(user,COMSIG_MOB_VENTCRAWL_END,src)
|
||||
SEND_SIGNAL(src,COMSIG_VENT_CRAWLER_EXITED,user)
|
||||
user.visible_message("You hear something squeezing through the pipes.", "You climb out the ventilation system.")
|
||||
user.canmove = 0
|
||||
spawn(1)
|
||||
|
||||
Reference in New Issue
Block a user