Skip to content

Commit

Permalink
Vent sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 19, 2023
1 parent 69b22a9 commit 51520bc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions code/modules/admin/game_master/game_master_submenu/vents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,23 @@

/// Shakes the vent and creates timers to spawn multiple xenos in succession
/datum/game_master_submenu/vents/proc/handle_vent_spawn(ambush)
var/obj/structure/pipes/vents/reference_vent = referenced_atom
if(!istype(reference_vent))
var/obj/structure/pipes/vents/referenced_vent = referenced_atom
if(!istype(referenced_vent))
log_debug("Vent game master submenu has reference atom that is not a vent. Referenced atom: [referenced_atom]")
return

reference_vent.animate_ventcrawl()
referenced_vent.animate_ventcrawl()
playsound(referenced_vent, pick('sound/effects/alien_ventcrawl1.ogg', 'sound/effects/alien_ventcrawl2.ogg'), 25, 1)
var/timer_increment = VENT_ESCAPE_INCREMENT_TIME
reference_vent.visible_message(SPAN_NOTICE("Something begins climbing out of [reference_vent]!"))
referenced_vent.visible_message(SPAN_NOTICE("Something begins climbing out of [referenced_vent]!"))

if(ambush)
for(var/ambusher_type in current_ambush)
for(var/i = 1 to current_ambush[ambusher_type])
addtimer(CALLBACK(src, PROC_REF(spawn_xeno), ambusher_type), timer_increment)
timer_increment += VENT_ESCAPE_INCREMENT_TIME

addtimer(CALLBACK(reference_vent, TYPE_PROC_REF(/obj/structure/pipes/vents, animate_ventcrawl_reset)), timer_increment)
addtimer(CALLBACK(referenced_vent, TYPE_PROC_REF(/obj/structure/pipes/vents, animate_ventcrawl_reset)), timer_increment)
current_ambush = list()
ambush_info = initial(ambush_info)
ambushing = FALSE
Expand All @@ -140,7 +141,7 @@
addtimer(CALLBACK(src, PROC_REF(spawn_xeno), selected_xeno), timer_increment)
timer_increment += VENT_ESCAPE_INCREMENT_TIME

addtimer(CALLBACK(reference_vent, TYPE_PROC_REF(/obj/structure/pipes/vents, animate_ventcrawl_reset)), timer_increment)
addtimer(CALLBACK(referenced_vent, TYPE_PROC_REF(/obj/structure/pipes/vents, animate_ventcrawl_reset)), timer_increment)

#undef VENT_ESCAPE_INCREMENT_TIME

Expand All @@ -158,6 +159,8 @@
log_debug("Vent game master submenu unable to find xeno type. Xeno type name: [spawning_xeno_name]")
return

playsound(referenced_atom, pick('sound/effects/alien_ventpass1.ogg', 'sound/effects/alien_ventpass2.ogg'), 25, 1)

new xeno_type(spawn_turf, null, XENO_HIVE_NORMAL)


Expand Down

0 comments on commit 51520bc

Please sign in to comment.