Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LZ fog before first drop and sentryguns to guard agains early FOB rush (they last only ten minits) #6296

Closed
wants to merge 17 commits into from
25 changes: 20 additions & 5 deletions code/game/objects/structures/blocker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@
attack_hand(M)
return XENO_NONCOMBAT_ACTION

GLOBAL_LIST_INIT(landing_zone_fog, list())
/obj/structure/blocker/landing_zone_fog
name = "dense fog"
desc = "It looks way too dangerous to traverse. Best wait until it has cleared up."
icon = 'icons/effects/effects.dmi'
icon_state = "smoke"
opacity = TRUE

/obj/structure/blocker/landing_zone_fog/Initialize()
GLOB.landing_zone_fog += src
. = ..()

/obj/structure/blocker/landing_zone_fog/proc/clear()
GLOB.landing_zone_fog -= src
QDEL_IN(src, rand(3 SECONDS,5 SECONDS))

/obj/structure/blocker/landing_zone_fog/Destroy()
GLOB.landing_zone_fog -= src
. = ..()


/obj/structure/blocker/forcefield
name = "forcefield"
Expand Down Expand Up @@ -100,21 +120,16 @@

if(!visible)
invisibility = 101


/obj/structure/blocker/forcefield/vehicles
types = list(/obj/vehicle/)


/obj/structure/blocker/forcefield/vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
return FALSE

/obj/structure/blocker/forcefield/multitile_vehicles
types = list(/obj/vehicle/multitile/)


/obj/structure/blocker/forcefield/multitile_vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
Expand Down
43 changes: 43 additions & 0 deletions code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,47 @@

fire(target)

GLOBAL_LIST_INIT(landing_zone_sentryguns, list())
/obj/structure/machinery/defenses/sentry/landing_zone
name = "UA-577 Gauss Turret spaceborn"
fire_delay = 2
omni_directional = TRUE
immobile = TRUE
turned_on = TRUE
icon_state = "premade" //for the map editor only
faction_group = FACTION_LIST_MARINE
placed = 1
var/first_warning = 9 MINUTES
var/second_warning = 9 MINUTES + 30 SECONDS
var/third_warning = 9 MINUTES + 57 SECONDS

/obj/structure/machinery/defenses/sentry/landing_zone/Initialize()
GLOB.landing_zone_sentryguns += src
. = ..()

/obj/structure/machinery/defenses/sentry/landing_zone/Destroy()
GLOB.landing_zone_sentryguns -= src
. = ..()
/obj/structure/machinery/defenses/sentry/landing_zone/proc/on_landing()
GLOB.landing_zone_sentryguns -= src
addtimer(CALLBACK(src,PROC_REF(time_left), 1), first_warning)
addtimer(CALLBACK(src,PROC_REF(time_left), 2), second_warning)
addtimer(CALLBACK(src,PROC_REF(time_left), 3), third_warning)
QDEL_IN(src, 10 MINUTES)

/obj/structure/machinery/defenses/sentry/landing_zone/proc/time_left(counter)
switch(counter)
if(1)
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 15, 1)
visible_message(SPAN_WARNING("\The [name] beeps steadily as its battery gets low."))
if(2)
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
visible_message(SPAN_WARNING("\The [name] beeps steadily as its battery gets criticly low."))
if(3)
playsound(loc, 'sound/mecha/critdestrsyndi.ogg', 25, 1)
visible_message(SPAN_WARNING("\The [name] deconstructs itself as its battery goes out!"))


/obj/structure/machinery/defenses/sentry/premade
name = "UA-577 Gauss Turret"
immobile = TRUE
Expand Down Expand Up @@ -530,6 +571,8 @@
fire_delay = 4
omni_directional = TRUE



//the turret inside the shuttle sentry deployment system
/obj/structure/machinery/defenses/sentry/premade/dropship
density = TRUE
Expand Down
6 changes: 6 additions & 0 deletions code/modules/shuttle/shuttles/dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@
xeno_announcement(SPAN_XENOANNOUNCE("The dropship has landed."), "everything")
xeno_announce = FALSE

for(var/obj/structure/blocker/landing_zone_fog/fog as anything in GLOB.landing_zone_fog)
fog.clear()

for(var/obj/structure/machinery/defenses/sentry/landing_zone/sentrygun as anything in GLOB.landing_zone_sentryguns)
sentrygun.on_landing()

/obj/docking_port/stationary/marine_dropship/on_dock_ignition(obj/docking_port/mobile/departing_shuttle)
. = ..()
turn_on_landing_lights()
Expand Down
Loading