mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 14:47:50 +01:00
[MIRROR] Ventcrawler update (#11930)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
co-authored by
Will
parent
4f048b932d
commit
c0da916575
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user