mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
Away Mission Events (#12802)
This commit is contained in:
@@ -237,6 +237,7 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/ghosts_can_possess_animals = 0
|
||||
var/delist_when_no_admins = 0
|
||||
var/observe_restriction = 1 // 0 - no restrictions; 1 - only following is permited on restricted levels; 2 - nothing is permitted on restricted levels
|
||||
|
||||
//Snowflake antag contest boolean
|
||||
//AUG2016
|
||||
@@ -542,6 +543,9 @@ var/list/gamemode_cache = list()
|
||||
if ("ghosts_can_possess_animals")
|
||||
config.ghosts_can_possess_animals = value
|
||||
|
||||
if ("observe_restriction")
|
||||
config.observe_restriction = text2num(value)
|
||||
|
||||
if ("guest_jobban")
|
||||
config.guest_jobban = 1
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/wait_for_launch = 0 //if the shuttle is waiting to launch
|
||||
var/failreturnnumber = 0 // the number of times the shuttle failed to leave the station
|
||||
var/list/current_mobs = list()
|
||||
var/shuttle_launch_countdown = 30 SECONDS
|
||||
|
||||
/datum/controller/subsystem/arrivals/New()
|
||||
NEW_SS_GLOBAL(SSarrivals)
|
||||
@@ -44,7 +45,7 @@
|
||||
wake() // Wake the process.
|
||||
|
||||
if (!wait_for_launch && shuttle.location == 1 && shuttle.moving_status == SHUTTLE_IDLE)
|
||||
set_launch_countdown(30)
|
||||
set_launch_countdown()
|
||||
|
||||
/datum/controller/subsystem/arrivals/proc/on_hotzone_exit(mob/living/M)
|
||||
current_mobs -= SOFTREF(M)
|
||||
@@ -53,7 +54,7 @@
|
||||
|
||||
/datum/controller/subsystem/arrivals/proc/shuttle_arrived()
|
||||
if (!shuttle.location) //at station
|
||||
set_launch_countdown(30) //get ready to return
|
||||
set_launch_countdown() //get ready to return
|
||||
|
||||
/datum/controller/subsystem/arrivals/proc/forbidden_atoms_check(atom/A)
|
||||
if(istype(A,/mob/living))
|
||||
@@ -73,9 +74,9 @@
|
||||
return 1
|
||||
|
||||
//begins the launch countdown and sets the amount of time left until launch
|
||||
/datum/controller/subsystem/arrivals/proc/set_launch_countdown(var/seconds)
|
||||
/datum/controller/subsystem/arrivals/proc/set_launch_countdown()
|
||||
wait_for_launch = 1
|
||||
launch_time = world.time + seconds*10
|
||||
launch_time = world.time + shuttle_launch_countdown
|
||||
wake()
|
||||
|
||||
/datum/controller/subsystem/arrivals/proc/stop_launch_countdown()
|
||||
|
||||
@@ -487,6 +487,29 @@
|
||||
maxhealth = 160
|
||||
smooth = 0
|
||||
|
||||
/obj/structure/window/shuttle/scc_space_ship
|
||||
name = "window"
|
||||
desc = "It looks extremely strong. Might take many good hits to crack it."
|
||||
icon = 'icons/obj/smooth/scc_space_ship.dmi'
|
||||
icon_state = "scc_space_ship"
|
||||
health = 500
|
||||
maxhealth = 500
|
||||
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
|
||||
canSmoothWith = list(
|
||||
/obj/structure/window/shuttle/scc_space_ship
|
||||
)
|
||||
|
||||
/obj/structure/window/shuttle/scc_space_ship/cardinal
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/obj/structure/window/shuttle/scc
|
||||
icon = 'icons/turf/shuttles_unique/scc_shuttle_pieces.dmi'
|
||||
icon_state = "scc_window"
|
||||
basestate = "scc_window"
|
||||
health = 160
|
||||
maxhealth = 160
|
||||
smooth = 0
|
||||
|
||||
/obj/structure/window/shuttle/crescent
|
||||
desc = "It looks rather strong."
|
||||
|
||||
|
||||
@@ -100,6 +100,23 @@
|
||||
underlay_appearance.appearance = T
|
||||
underlays = U
|
||||
|
||||
/turf/simulated/wall/shuttle/scc_space_ship
|
||||
name = "spaceship hull"
|
||||
icon = 'icons/turf/smooth/scc_ship.dmi'
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/simulated/wall/shuttle/scc_space_ship/cardinal
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall/shuttle/scc_space_ship
|
||||
)
|
||||
|
||||
/obj/structure/shuttle_part/scc_space_ship
|
||||
name = "spaceship alloy wall"
|
||||
icon = 'icons/turf/smooth/scc_ship.dmi'
|
||||
icon_state = "map-shuttle"
|
||||
outside_part = FALSE
|
||||
|
||||
/turf/simulated/wall/shuttle/raider
|
||||
icon = 'icons/turf/smooth/composite_metal.dmi'
|
||||
icon_state = "composite_metal"
|
||||
|
||||
@@ -189,18 +189,25 @@ Works together with spawning an observer, noted above.
|
||||
|
||||
//Teleports the observer away from z-levels they shouldnt be on, if needed.
|
||||
/mob/abstract/observer/proc/teleport_if_needed()
|
||||
//If we dont have a observe restriction we dont need to teleport
|
||||
if(!config.observe_restriction)
|
||||
return
|
||||
|
||||
//If we are not on a restricted level we dont need to get rid of them
|
||||
if(!on_restricted_level())
|
||||
return
|
||||
|
||||
//If we have observe restriction 1 and they are following a living non-animal mob we dont need to do anything.
|
||||
if(config.observe_restriction == 1 && following && isliving(following) && !isliving(following))
|
||||
return
|
||||
|
||||
//In case we have observe restriction 2 (or 1 and they are following something, then teleport them back.)
|
||||
if(following)
|
||||
if(!isliving(following) || isanimal(following)) //If they are following something other than a living non-animal mob, teleport them
|
||||
var/message = "You can not follow \the [following] on this level."
|
||||
stop_following()
|
||||
teleport_to_spawn(message)
|
||||
else
|
||||
return
|
||||
//If they are moving around freely, teleport them
|
||||
teleport_to_spawn()
|
||||
stop_following()
|
||||
teleport_to_spawn("You can not follow \the [following] on this level.")
|
||||
else
|
||||
teleport_to_spawn()
|
||||
|
||||
//And update their sight settings
|
||||
updateghostsight()
|
||||
|
||||
@@ -328,7 +335,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
if(ishuman(following))
|
||||
health_scan_mob(following, usr, TRUE, TRUE)
|
||||
else
|
||||
else
|
||||
to_chat(src, SPAN_WARNING("This isn't a scannable target."))
|
||||
|
||||
/mob/abstract/observer/verb/toggle_antagHUD()
|
||||
@@ -976,4 +983,4 @@ mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
|
||||
/mob/abstract/observer/can_hear_radio(speaker_coverage = list())
|
||||
if(client && (client.prefs.toggles & CHAT_GHOSTRADIO))
|
||||
return TRUE
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -6,48 +6,52 @@
|
||||
SSarrivals.shuttle = src
|
||||
|
||||
/datum/shuttle/autodock/ferry/arrival/proc/try_jump()
|
||||
spawn(warmup_time * 10)
|
||||
if(moving_status != SHUTTLE_IDLE) //The shuttle's already been launched.
|
||||
return FALSE
|
||||
if(moving_status != SHUTTLE_IDLE) //The shuttle's already been launched.
|
||||
return FALSE
|
||||
|
||||
if(at_station() && forbidden_atoms_check())
|
||||
//cancel the launch because of forbidden atoms
|
||||
global_announcer.autosay("Unacceptable items or lifeforms detected aboard the arrivals shuttle. Launch attempt aborted. Reattempting launch in one minute.", "Arrivals Shuttle Oversight")
|
||||
SSarrivals.set_launch_countdown(60)
|
||||
SSarrivals.failreturnnumber++
|
||||
if(SSarrivals.failreturnnumber >= 2) // get off my shuttle fool
|
||||
var/list/mobstoyellat = list()
|
||||
for(var/area/subarea in shuttle_area)
|
||||
mobs_in_area(subarea)
|
||||
if (!mobstoyellat || !length(mobstoyellat))
|
||||
return FALSE
|
||||
for(var/mob/living/A in mobstoyellat)
|
||||
to_chat(A, "<span class='danger'>You feel as if you shouldn't be on the shuttle.</span>") // give them an angry text
|
||||
if(!A.client && ishuman(A) && SSarrivals.failreturnnumber >= 3) // well they are SSD and holding up the shuttle so might as well.
|
||||
SSjobs.DespawnMob(A)
|
||||
global_announcer.autosay("[A.real_name], [A.mind.role_alt_title], has entered long-term storage.", "Cryogenic Oversight")
|
||||
mobstoyellat -= A // so they don't get told on
|
||||
else if(A.client && ishuman(A) && SSarrivals.failreturnnumber >= 3) // they aren't SSD and are holding up the shuttle so we are booting them.
|
||||
A.forceMove(pick(kickoffsloc))
|
||||
mobstoyellat -= A
|
||||
else if(!ishuman(A) && SSarrivals.failreturnnumber >= 4 && !A.client) // remove non-player mobs to keep things rolling
|
||||
qdel(A)
|
||||
else if(issilicon(A.loc) && isMMI(A))
|
||||
mobstoyellat -= A
|
||||
else if(A.stat == DEAD)
|
||||
mobstoyellat -= A
|
||||
if (mobstoyellat)
|
||||
global_announcer.autosay("Current life-forms on shuttle: [english_list(mobstoyellat)].", "Arrivals Shuttle Oversight") // tell on them
|
||||
return FALSE
|
||||
if(at_station() && forbidden_atoms_check())
|
||||
//cancel the launch because of forbidden atoms
|
||||
global_announcer.autosay("Unacceptable items or lifeforms detected aboard the arrivals shuttle. Launch attempt aborted. Reattempting launch in [SSarrivals.shuttle_launch_countdown / 10] seconds.", "Arrivals Shuttle Oversight")
|
||||
SSarrivals.set_launch_countdown()
|
||||
SSarrivals.failreturnnumber++
|
||||
if(SSarrivals.failreturnnumber >= 1) // get off my shuttle fool
|
||||
var/list/mobstoyellat = mobs_in_area(shuttle_area)
|
||||
for(var/area/subarea in shuttle_area)
|
||||
mobstoyellat |= mobs_in_area(subarea)
|
||||
if (!mobstoyellat || !length(mobstoyellat))
|
||||
return FALSE
|
||||
for(var/mob/living/A in mobstoyellat)
|
||||
to_chat(A, "<span class='danger'>You feel as if you shouldn't be on the shuttle.</span>") // give them an angry text
|
||||
if(!A.client && ishuman(A) && SSarrivals.failreturnnumber == 2) // well they are SSD and holding up the shuttle so might as well.
|
||||
SSjobs.DespawnMob(A)
|
||||
global_announcer.autosay("[A.real_name], [A.mind.role_alt_title], has entered long-term storage.", "Cryogenic Oversight")
|
||||
mobstoyellat -= A // so they don't get told on
|
||||
continue
|
||||
if(A.client && SSarrivals.failreturnnumber == 2) // they aren't SSD and are holding up the shuttle so we are booting them.
|
||||
if(A.buckled_to)
|
||||
A.buckled_to.unbuckle()
|
||||
A.forceMove(pick(kickoffsloc))
|
||||
mobstoyellat -= A
|
||||
continue
|
||||
if(SSarrivals.failreturnnumber >= 3) // Boot anything else that somehow made it to here
|
||||
if(A.buckled_to)
|
||||
A.buckled_to.unbuckle()
|
||||
A.forceMove(pick(kickoffsloc))
|
||||
mobstoyellat -= A
|
||||
continue
|
||||
|
||||
if (!forbidden_atoms_check() && !at_station())
|
||||
//cancel the launch because of there's no one on the shuttle.
|
||||
return FALSE
|
||||
if (length(mobstoyellat))
|
||||
global_announcer.autosay("Current life-forms on shuttle: [english_list(mobstoyellat)].", "Arrivals Shuttle Oversight") // tell on them
|
||||
return FALSE
|
||||
|
||||
if(!at_station())
|
||||
global_announcer.autosay("Central Command Arrivals shuttle inbound to [station_name()]. ETA: one minute.", "Arrivals Shuttle Oversight")
|
||||
SSarrivals.failreturnnumber = 0
|
||||
launch(SSarrivals)
|
||||
if (!forbidden_atoms_check() && !at_station())
|
||||
//cancel the launch because of there's no one on the shuttle.
|
||||
return FALSE
|
||||
|
||||
if(!at_station())
|
||||
global_announcer.autosay("Central Command Arrivals shuttle inbound to [station_name()]. ETA: one minute.", "Arrivals Shuttle Oversight")
|
||||
SSarrivals.failreturnnumber = 0
|
||||
launch(SSarrivals)
|
||||
|
||||
/datum/shuttle/autodock/ferry/arrival/arrived()
|
||||
SSarrivals.shuttle_arrived()
|
||||
|
||||
Reference in New Issue
Block a user