mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 19:42:42 +00:00
New lighting, it's essentially just the old DAL system with a queue.
Comments for lighting: Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas by using the var/tag variable and moving turfs into the contents list of the correct sub-area. Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity (through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then turning it back on with lighting_controller.processing = 1. Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity at runtime) Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset costs. Known Issues/TODO: admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity Shuttles still do not have support for dynamic lighting (I hope to fix this at some point) No directional lighting support. Fairly easy to add this and the code is ready. When opening airlocks etc, lighting does not always update to account for the change in opacity. Explosions now cause lighting to cease processing temporarily. Moved controller datums to the code/controllers directory. I plan on standardising them. "Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI" controller datums can be accessed via the debug controller verb (used to be the debug master controller verb) Supply shuttle now uses a controller datum. Shuttles tend to arrive up to 30 seconds late, this is not a bug. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4537 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,475 +0,0 @@
|
||||
/datum/configuration
|
||||
var/server_name = null // server name (for world name / status)
|
||||
var/server_suffix = 0 // generate numeric suffix based on server port
|
||||
|
||||
var/log_ooc = 0 // log OOC channel
|
||||
var/log_access = 0 // log login/logout
|
||||
var/log_say = 0 // log client say
|
||||
var/log_admin = 0 // log admin actions
|
||||
var/log_game = 0 // log game events
|
||||
var/log_vote = 0 // log voting
|
||||
var/log_whisper = 0 // log client whisper
|
||||
var/log_emote = 0 // log emotes
|
||||
var/log_attack = 0 // log attack messages
|
||||
var/log_adminchat = 0 // log admin chat messages
|
||||
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/sql_enabled = 1 // for sql switching
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
var/allow_vote_mode = 0 // allow votes to change mode
|
||||
var/allow_admin_jump = 1 // allows admin jumping
|
||||
var/allow_admin_spawning = 1 // allows admin item spawning
|
||||
var/allow_admin_rev = 1 // allows admin revives
|
||||
var/vote_delay = 600 // minimum time between voting sessions (seconds, 10 minute default)
|
||||
var/vote_period = 60 // length of voting period (seconds, default 1 minute)
|
||||
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
|
||||
var/vote_no_dead = 0 // dead people can't vote (tbi)
|
||||
// var/enable_authentication = 0 // goon authentication
|
||||
var/del_new_on_log = 1 // del's new players if they log before they spawn in
|
||||
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
|
||||
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
|
||||
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
|
||||
var/allow_Metadata = 0 // Metadata is supported.
|
||||
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
|
||||
var/Ticklag = 0.9
|
||||
var/Tickcomp = 0
|
||||
|
||||
var/list/mode_names = list()
|
||||
var/list/modes = list() // allowed modes
|
||||
var/list/votable_modes = list() // votable modes
|
||||
var/list/probabilities = list() // relative probability of each mode
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/allow_ai = 1 // allow ai job
|
||||
var/hostedby = null
|
||||
var/respawn = 1
|
||||
var/guest_jobban = 1
|
||||
var/usewhitelist = 0
|
||||
var/kick_inactive = 0 //force disconnect for inactive players
|
||||
var/load_jobs_from_txt = 0
|
||||
var/ToRban = 0
|
||||
|
||||
var/server
|
||||
var/banappeals
|
||||
var/wikiurl
|
||||
var/forumurl
|
||||
|
||||
//Alert level description
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
|
||||
var/alert_desc_blue_downto = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed."
|
||||
var/alert_desc_red_upto = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised."
|
||||
var/alert_desc_red_downto = "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised."
|
||||
var/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
|
||||
|
||||
var/forbid_singulo_possession = 0
|
||||
var/useircbot = 0
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
var/revival_cloning = 1
|
||||
var/revival_brain_life = -1
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
for (var/T in L)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
var/datum/game_mode/M = new T()
|
||||
|
||||
if (M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
src.modes += M.config_tag
|
||||
src.mode_names[M.config_tag] = M.name
|
||||
src.probabilities[M.config_tag] = M.probability
|
||||
if (M.votable)
|
||||
src.votable_modes += M.config_tag
|
||||
del(M)
|
||||
src.votable_modes += "secret"
|
||||
|
||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No [filename] file found, setting defaults"
|
||||
src = new /datum/configuration()
|
||||
return
|
||||
|
||||
diary << "Reading configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
var/value = null
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
if(type == "config")
|
||||
switch (name)
|
||||
if ("log_ooc")
|
||||
config.log_ooc = 1
|
||||
|
||||
if ("log_access")
|
||||
config.log_access = 1
|
||||
|
||||
if ("sql_enabled")
|
||||
config.sql_enabled = text2num(value)
|
||||
|
||||
if ("log_say")
|
||||
config.log_say = 1
|
||||
|
||||
if ("log_admin")
|
||||
config.log_admin = 1
|
||||
|
||||
if ("log_game")
|
||||
config.log_game = 1
|
||||
|
||||
if ("log_vote")
|
||||
config.log_vote = 1
|
||||
|
||||
if ("log_whisper")
|
||||
config.log_whisper = 1
|
||||
|
||||
if ("log_attack")
|
||||
config.log_attack = 1
|
||||
|
||||
if ("log_emote")
|
||||
config.log_emote = 1
|
||||
|
||||
if ("log_adminchat")
|
||||
config.log_adminchat = 1
|
||||
|
||||
if ("log_adminwarn")
|
||||
config.log_adminwarn = 1
|
||||
|
||||
if ("log_pda")
|
||||
config.log_pda = 1
|
||||
|
||||
if ("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
|
||||
if ("allow_vote_restart")
|
||||
config.allow_vote_restart = 1
|
||||
|
||||
if ("allow_vote_mode")
|
||||
config.allow_vote_mode = 1
|
||||
|
||||
if ("allow_admin_jump")
|
||||
config.allow_admin_jump = 1
|
||||
|
||||
if("allow_admin_rev")
|
||||
config.allow_admin_rev = 1
|
||||
|
||||
if ("allow_admin_spawning")
|
||||
config.allow_admin_spawning = 1
|
||||
|
||||
if ("no_dead_vote")
|
||||
config.vote_no_dead = 1
|
||||
|
||||
if ("default_no_vote")
|
||||
config.vote_no_default = 1
|
||||
|
||||
if ("vote_delay")
|
||||
config.vote_delay = text2num(value)
|
||||
|
||||
if ("vote_period")
|
||||
config.vote_period = text2num(value)
|
||||
|
||||
if ("allow_ai")
|
||||
config.allow_ai = 1
|
||||
|
||||
// if ("authentication")
|
||||
// config.enable_authentication = 1
|
||||
|
||||
if ("norespawn")
|
||||
config.respawn = 0
|
||||
|
||||
if ("servername")
|
||||
config.server_name = value
|
||||
|
||||
if ("serversuffix")
|
||||
config.server_suffix = 1
|
||||
|
||||
if ("hostedby")
|
||||
config.hostedby = value
|
||||
|
||||
if ("server")
|
||||
config.server = value
|
||||
|
||||
if ("banappeals")
|
||||
config.banappeals = value
|
||||
|
||||
if ("wikiurl")
|
||||
config.wikiurl = value
|
||||
|
||||
if ("forumurl")
|
||||
config.forumurl = value
|
||||
|
||||
if ("guest_jobban")
|
||||
config.guest_jobban = 1
|
||||
|
||||
if ("guest_ban")
|
||||
guests_allowed = 0
|
||||
|
||||
if ("usewhitelist")
|
||||
config.usewhitelist = 1
|
||||
|
||||
if ("feature_object_spell_system")
|
||||
config.feature_object_spell_system = 1
|
||||
|
||||
if ("allow_metadata")
|
||||
config.allow_Metadata = 1
|
||||
|
||||
if ("traitor_scaling")
|
||||
config.traitor_scaling = 1
|
||||
|
||||
if("protect_roles_from_antagonist")
|
||||
config.protect_roles_from_antagonist = 1
|
||||
|
||||
if ("probability")
|
||||
var/prob_pos = findtext(value, " ")
|
||||
var/prob_name = null
|
||||
var/prob_value = null
|
||||
|
||||
if (prob_pos)
|
||||
prob_name = lowertext(copytext(value, 1, prob_pos))
|
||||
prob_value = copytext(value, prob_pos + 1)
|
||||
if (prob_name in config.modes)
|
||||
config.probabilities[prob_name] = text2num(prob_value)
|
||||
else
|
||||
diary << "Unknown game mode probability configuration definition: [prob_name]."
|
||||
else
|
||||
diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||
|
||||
if("allow_random_events")
|
||||
config.allow_random_events = 1
|
||||
|
||||
if("kick_inactive")
|
||||
config.kick_inactive = 1
|
||||
|
||||
if("load_jobs_from_txt")
|
||||
load_jobs_from_txt = 1
|
||||
|
||||
if("alert_red_upto")
|
||||
config.alert_desc_red_upto = value
|
||||
|
||||
if("alert_red_downto")
|
||||
config.alert_desc_red_downto = value
|
||||
|
||||
if("alert_blue_downto")
|
||||
config.alert_desc_blue_downto = value
|
||||
|
||||
if("alert_blue_upto")
|
||||
config.alert_desc_blue_upto = value
|
||||
|
||||
if("alert_green")
|
||||
config.alert_desc_green = value
|
||||
|
||||
if("alert_delta")
|
||||
config.alert_desc_delta = value
|
||||
|
||||
if("forbid_singulo_possession")
|
||||
forbid_singulo_possession = 1
|
||||
|
||||
if("popup_admin_pm")
|
||||
config.popup_admin_pm = 1
|
||||
|
||||
if("allow_holidays")
|
||||
Holiday = 1
|
||||
|
||||
if("useircbot")
|
||||
useircbot = 1
|
||||
|
||||
if("ticklag")
|
||||
Ticklag = text2num(value)
|
||||
|
||||
if("tickcomp")
|
||||
Tickcomp = 1
|
||||
|
||||
if("humans_need_surnames")
|
||||
humans_need_surnames = 1
|
||||
|
||||
if("tor_ban")
|
||||
ToRban = 1
|
||||
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
else if(type == "game_options")
|
||||
if(!value)
|
||||
diary << "Unknown value for setting [name] in [filename]."
|
||||
value = text2num(value)
|
||||
|
||||
switch(name)
|
||||
if("health_threshold_crit")
|
||||
config.health_threshold_crit = value
|
||||
if("health_threshold_dead")
|
||||
config.health_threshold_dead = value
|
||||
if("revival_pod_plants")
|
||||
config.revival_pod_plants = value
|
||||
if("revival_cloning")
|
||||
config.revival_cloning = value
|
||||
if("revival_brain_life")
|
||||
config.revival_brain_life = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/loadsql(filename) // -- TLE
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No dbconfig.txt file found, retaining defaults"
|
||||
world << "No dbconfig.txt file found, retaining defaults"
|
||||
return
|
||||
|
||||
diary << "Reading database configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
var/value = null
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
switch (name)
|
||||
if ("address")
|
||||
sqladdress = value
|
||||
if ("port")
|
||||
sqlport = value
|
||||
if ("database")
|
||||
sqldb = value
|
||||
if ("login")
|
||||
sqllogin = value
|
||||
if ("password")
|
||||
sqlpass = value
|
||||
if ("feedback_database")
|
||||
sqlfdbkdb = value
|
||||
if ("feedback_login")
|
||||
sqlfdbklogin = value
|
||||
if ("feedback_password")
|
||||
sqlfdbkpass = value
|
||||
if ("enable_stat_tracking")
|
||||
sqllogging = 1
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/loadforumsql(filename) // -- TLE
|
||||
var/text = file2text(filename)
|
||||
|
||||
if (!text)
|
||||
diary << "No forumdbconfig.txt file found, retaining defaults"
|
||||
world << "No forumdbconfig.txt file found, retaining defaults"
|
||||
return
|
||||
|
||||
diary << "Reading forum database configuration file [filename]"
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
var/value = null
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
switch (name)
|
||||
if ("address")
|
||||
forumsqladdress = value
|
||||
if ("port")
|
||||
forumsqlport = value
|
||||
if ("database")
|
||||
forumsqldb = value
|
||||
if ("login")
|
||||
forumsqllogin = value
|
||||
if ("password")
|
||||
forumsqlpass = value
|
||||
if ("activatedgroup")
|
||||
forum_activated_group = value
|
||||
if ("authenticatedgroup")
|
||||
forum_authenticated_group = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
/datum/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
for (var/T in (typesof(/datum/game_mode) - /datum/game_mode))
|
||||
var/datum/game_mode/M = new T()
|
||||
if (M.config_tag && M.config_tag == mode_name)
|
||||
return M
|
||||
del(M)
|
||||
return null
|
||||
|
||||
/datum/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
for (var/T in (typesof(/datum/game_mode) - /datum/game_mode))
|
||||
var/datum/game_mode/M = new T()
|
||||
//world << "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]"
|
||||
if (!(M.config_tag in modes))
|
||||
del(M)
|
||||
continue
|
||||
if (probabilities[M.config_tag]<=0)
|
||||
del(M)
|
||||
continue
|
||||
if (M.can_start())
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
//world << "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]"
|
||||
return runnable_modes
|
||||
@@ -108,10 +108,6 @@
|
||||
|
||||
playSpecials(curturf,effectin,soundin)
|
||||
|
||||
// Remove any luminosity etc.
|
||||
var/prevlum = teleatom.luminosity
|
||||
teleatom.luminosity = 0
|
||||
|
||||
if(force_teleport)
|
||||
teleatom.forceMove(destturf)
|
||||
playSpecials(destturf,effectout,soundout)
|
||||
@@ -119,9 +115,6 @@
|
||||
if(teleatom.Move(destturf))
|
||||
playSpecials(destturf,effectout,soundout)
|
||||
|
||||
// Re-Apply lum
|
||||
teleatom.sd_SetLuminosity(prevlum)
|
||||
|
||||
destarea.Entered(teleatom)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1,876 +0,0 @@
|
||||
#define PLAYER_WEIGHT 5
|
||||
#define HUMAN_DEATH -5000
|
||||
#define OTHER_DEATH -5000
|
||||
#define EXPLO_SCORE -10000 //boum
|
||||
|
||||
#define COOLDOWN_TIME 12000 // Twenty minutes
|
||||
#define MIN_ROUND_TIME 18000
|
||||
|
||||
|
||||
#define FLAT_PERCENT 0
|
||||
|
||||
//estimated stats
|
||||
//80 minute round
|
||||
//60 player server
|
||||
//48k player-ticks
|
||||
|
||||
//60 deaths (ideally)
|
||||
//20 explosions
|
||||
|
||||
|
||||
var/global/datum/tension/tension_master
|
||||
|
||||
/datum/tension
|
||||
var/score
|
||||
|
||||
var/deaths
|
||||
var/human_deaths
|
||||
var/explosions
|
||||
var/adminhelps
|
||||
var/air_alarms
|
||||
|
||||
var/nuketeam = 0
|
||||
var/malfAI = 0
|
||||
var/wizard = 0
|
||||
|
||||
var/forcenexttick = 0
|
||||
var/supress = 0
|
||||
var/eversupressed = 0
|
||||
var/cooldown = 0
|
||||
|
||||
var/round1 = 0
|
||||
var/round2 = 0
|
||||
var/round3 = 0
|
||||
var/round4 = 0
|
||||
|
||||
var/list/antagonistmodes = null
|
||||
|
||||
|
||||
|
||||
var/list/potentialgames = list()
|
||||
|
||||
New()
|
||||
score = 0
|
||||
deaths=0
|
||||
human_deaths=0
|
||||
explosions=0
|
||||
adminhelps=0
|
||||
air_alarms=0
|
||||
|
||||
if(FLAT_PERCENT) // I cannot into balance
|
||||
antagonistmodes = list (
|
||||
"POINTS_FOR_TRATIOR" = 6,
|
||||
"POINTS_FOR_CHANGLING" = 6,
|
||||
"POINTS_FOR_REVS" = 3,
|
||||
"POINTS_FOR_MALF" = 1,
|
||||
"POINTS_FOR_WIZARD" = 2,
|
||||
"POINTS_FOR_CULT" = 3,
|
||||
"POINTS_FOR_NUKETEAM" = 2,
|
||||
"POINTS_FOR_ALIEN" = 5,
|
||||
"POINTS_FOR_NINJA" = 3,
|
||||
"POINTS_FOR_DEATHSQUAD" = 2,
|
||||
"POINTS_FOR_BORGDEATHSQUAD" = 2
|
||||
)
|
||||
|
||||
else
|
||||
antagonistmodes = list (
|
||||
"POINTS_FOR_TRATIOR" = 100000,
|
||||
"POINTS_FOR_CHANGLING" = 120000,
|
||||
"POINTS_FOR_REVS" = 150000,
|
||||
"POINTS_FOR_MALF" = 250000,
|
||||
"POINTS_FOR_WIZARD" = 150000,
|
||||
"POINTS_FOR_CULT" = 150000,
|
||||
"POINTS_FOR_NUKETEAM" = 250000,
|
||||
"POINTS_FOR_ALIEN" = 200000,
|
||||
"POINTS_FOR_NINJA" = 200000,
|
||||
"POINTS_FOR_DEATHSQUAD" = 500000,
|
||||
"POINTS_FOR_BORGDEATHSQUAD" = 500000
|
||||
)
|
||||
|
||||
proc/process()
|
||||
score += get_num_players()*PLAYER_WEIGHT
|
||||
|
||||
if(config.Tensioner_Active)
|
||||
if(world.time > MIN_ROUND_TIME)
|
||||
round1++
|
||||
if(!supress && !cooldown)
|
||||
if(prob(1) || forcenexttick)
|
||||
round2++
|
||||
if(prob(10) || forcenexttick)
|
||||
round3++
|
||||
if(forcenexttick)
|
||||
forcenexttick = 0
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
C << "<font color='red' size='3'><b> The tensioner wishes to create additional antagonists! Press (<a href='?src=\ref[tension_master];Supress=1'>this</a>) in 60 seconds to abort!</b></font>"
|
||||
|
||||
spawn(600)
|
||||
if(!supress)
|
||||
cooldown = 1
|
||||
spawn(COOLDOWN_TIME)
|
||||
cooldown = 0
|
||||
round4++
|
||||
|
||||
if(!antagonistmodes.len)
|
||||
return
|
||||
|
||||
var/thegame = null
|
||||
|
||||
if(FLAT_PERCENT)
|
||||
thegame = pickweight(antagonistmodes)
|
||||
antagonistmodes.Remove(thegame)
|
||||
|
||||
else
|
||||
for(var/V in antagonistmodes) // OH SHIT SOMETHING IS GOING TO HAPPEN NOW
|
||||
if(antagonistmodes[V] < score)
|
||||
potentialgames.Add(V)
|
||||
antagonistmodes.Remove(V)
|
||||
if(potentialgames.len)
|
||||
thegame = pick(potentialgames)
|
||||
|
||||
|
||||
if(thegame)
|
||||
|
||||
|
||||
log_admin("The tensioner fired, and decided on [thegame]")
|
||||
|
||||
switch(thegame)
|
||||
if("POINTS_FOR_TRATIOR")
|
||||
if(!makeTratiors())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
if("POINTS_FOR_CHANGLING")
|
||||
if(!makeChanglings())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
if("POINTS_FOR_REVS")
|
||||
if(!makeRevs())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
if("POINTS_FOR_MALF")
|
||||
if(!makeMalfAImode())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
if("POINTS_FOR_WIZARD")
|
||||
if(!makeWizard())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_CULT")
|
||||
if(!makeCult())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_NUKETEAM")
|
||||
if(!makeNukeTeam())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_ALIEN")
|
||||
if(!makeAliens())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_NINJA")
|
||||
if(!makeSpaceNinja())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_DEATHSQUAD")
|
||||
if(!makeDeathsquad())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
if("POINTS_FOR_BORG_DEATHSQUAD")
|
||||
if(!makeBorgDeathsquad())
|
||||
forcenexttick = 1
|
||||
else
|
||||
potentialgames.Remove(thegame)
|
||||
|
||||
|
||||
proc/get_num_players()
|
||||
var/peeps = 0
|
||||
for (var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue
|
||||
peeps += 1
|
||||
|
||||
return peeps
|
||||
|
||||
proc/death(var/mob/M)
|
||||
if (!M) return
|
||||
deaths++
|
||||
|
||||
if (istype(M,/mob/living/carbon/human))
|
||||
score += HUMAN_DEATH
|
||||
human_deaths++
|
||||
else
|
||||
score += OTHER_DEATH
|
||||
|
||||
|
||||
proc/explosion()
|
||||
score += EXPLO_SCORE
|
||||
explosions++
|
||||
|
||||
proc/new_adminhelp()
|
||||
adminhelps++
|
||||
|
||||
proc/new_air_alarm()
|
||||
air_alarms++
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
|
||||
if(!usr || !usr.client)
|
||||
return //This shouldnt happen
|
||||
|
||||
if(!usr.client.holder)
|
||||
message_admins("\red [key_name(usr)] tried to use the tensioner without authorization.")
|
||||
log_admin("[key_name(usr)] tried to use the tensioner without authorization.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] used a tensioner override. The override was [href]")
|
||||
message_admins("[key_name(usr)] used a tensioner override. The override was [href]")
|
||||
|
||||
|
||||
if(href_list["addScore"])
|
||||
score += 50000
|
||||
|
||||
if (href_list["makeTratior"])
|
||||
makeTratiors()
|
||||
|
||||
else if (href_list["makeChanglings"])
|
||||
makeChanglings()
|
||||
|
||||
else if (href_list["makeRevs"])
|
||||
makeRevs()
|
||||
|
||||
else if (href_list["makeWizard"])
|
||||
makeWizard()
|
||||
|
||||
else if (href_list["makeCult"])
|
||||
makeCult()
|
||||
|
||||
else if (href_list["makeMalf"])
|
||||
makeMalfAImode()
|
||||
|
||||
else if (href_list["makeNukeTeam"])
|
||||
makeNukeTeam()
|
||||
|
||||
else if (href_list["makeAliens"])
|
||||
makeAliens()
|
||||
|
||||
else if (href_list["makeSpaceNinja"])
|
||||
makeSpaceNinja()
|
||||
|
||||
else if (href_list["makeDeathsquad"])
|
||||
makeDeathsquad()
|
||||
|
||||
else if (href_list["makeBorgDeathsquad"])
|
||||
makeBorgDeathsquad()
|
||||
|
||||
else if (href_list["Supress"])
|
||||
supress = 1
|
||||
eversupressed++
|
||||
spawn(6000)
|
||||
supress = 0
|
||||
|
||||
else if (href_list["ToggleStatus"])
|
||||
config.Tensioner_Active = !config.Tensioner_Active
|
||||
|
||||
|
||||
proc/makeMalfAImode()
|
||||
|
||||
var/list/mob/living/silicon/AIs = list()
|
||||
var/mob/living/silicon/malfAI = null
|
||||
var/datum/mind/themind = null
|
||||
|
||||
for(var/mob/living/silicon/ai/ai in player_list)
|
||||
if(ai.client)
|
||||
AIs += ai
|
||||
|
||||
if(AIs.len)
|
||||
malfAI = pick(AIs)
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
if(malfAI)
|
||||
themind = malfAI.mind
|
||||
themind.make_AI_Malf()
|
||||
return 1
|
||||
|
||||
/*
|
||||
if(BE_CHANGELING) roletext="changeling"
|
||||
if(BE_TRAITOR) roletext="traitor"
|
||||
if(BE_OPERATIVE) roletext="operative"
|
||||
if(BE_WIZARD) roletext="wizard"
|
||||
if(BE_REV) roletext="revolutionary"
|
||||
if(BE_CULTIST) roletext="cultist"
|
||||
|
||||
|
||||
for(var/mob/new_player/player in world)
|
||||
if(player.client && player.ready)
|
||||
if(player.preferences.be_special & role)
|
||||
*/
|
||||
|
||||
|
||||
proc/makeTratiors()
|
||||
|
||||
var/datum/game_mode/traitor/temp = new
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(applicant.stat < 2)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_TRAITOR)
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numTratiors = min(candidates.len, 3)
|
||||
|
||||
for(var/i = 0, i<numTratiors, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Tratior()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
proc/makeChanglings()
|
||||
|
||||
var/datum/game_mode/changeling/temp = new
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(applicant.stat < 2)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_CHANGELING)
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numChanglings = min(candidates.len, 3)
|
||||
|
||||
for(var/i = 0, i<numChanglings, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Changling()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/makeRevs()
|
||||
|
||||
var/datum/game_mode/revolution/temp = new
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(applicant.stat < 2)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_REV)
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numRevs = min(candidates.len, 3)
|
||||
|
||||
for(var/i = 0, i<numRevs, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Rev()
|
||||
candidates.Remove(H)
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/makeWizard()
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
if(!G.client)
|
||||
candidates.Remove(G)
|
||||
|
||||
spawn(0)
|
||||
if(candidates.len)
|
||||
while((!theghost || !theghost.client) && candidates.len)
|
||||
theghost = pick(candidates)
|
||||
candidates.Remove(theghost)
|
||||
if(!theghost)
|
||||
return 0
|
||||
var/mob/living/carbon/human/new_character=makeBody(theghost)
|
||||
new_character.mind.make_Wizard()
|
||||
|
||||
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
|
||||
|
||||
|
||||
proc/makeCult()
|
||||
|
||||
var/datum/game_mode/cult/temp = new
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(applicant.stat < 2)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_CULTIST)
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numCultists = min(candidates.len, 4)
|
||||
// var/list/runeWords = list()
|
||||
|
||||
for(var/i = 0, i<numCultists, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Cultist()
|
||||
candidates.Remove(H)
|
||||
temp.grant_runeword(H)
|
||||
// runeWords.Add(H)
|
||||
|
||||
// for(var/i = 0, i < 4, i++) // Four rune words
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
proc/makeNukeTeam()
|
||||
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
if(!G.client)
|
||||
candidates.Remove(G)
|
||||
|
||||
spawn(0)
|
||||
if(candidates.len)
|
||||
var/numagents = 5
|
||||
syndicate_begin()
|
||||
|
||||
for(var/i = 0, i<numagents,i++)
|
||||
while((!theghost || !theghost.client) && candidates.len)
|
||||
theghost = pick(candidates)
|
||||
candidates.Remove(theghost)
|
||||
if(!theghost)
|
||||
break
|
||||
var/mob/living/carbon/human/new_character=makeBody(theghost)
|
||||
new_character.mind.make_Nuke()
|
||||
|
||||
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
|
||||
if(nuke_spawn)
|
||||
var/obj/item/weapon/paper/P = new
|
||||
P.info = "Sadly, the Syndicate could not get you a nuclear bomb. We have, however, acquired the arming code for the station's onboard nuke. The nuclear authorization code is: <b>[nuke_code]</b>"
|
||||
P.name = "nuclear bomb code and instructions"
|
||||
P.loc = nuke_spawn.loc
|
||||
|
||||
if(closet_spawn)
|
||||
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
|
||||
|
||||
for (var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
new /obj/structure/closet/syndicate/personal(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if (A.name == "Syndicate-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
|
||||
spawn(0)
|
||||
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
|
||||
if(synd_mind.current)
|
||||
if(synd_mind.current.client)
|
||||
for(var/image/I in synd_mind.current.client.images)
|
||||
if(I.icon_state == "synd")
|
||||
del(I)
|
||||
|
||||
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
|
||||
if(synd_mind.current)
|
||||
if(synd_mind.current.client)
|
||||
for(var/datum/mind/synd_mind_1 in ticker.mode.syndicates)
|
||||
if(synd_mind_1.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
|
||||
synd_mind.current.client.images += I
|
||||
|
||||
for (var/obj/machinery/nuclearbomb/bomb in world)
|
||||
bomb.r_code = nuke_code // All the nukes are set to this code.
|
||||
|
||||
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
proc/makeAliens()
|
||||
alien_infestation(3)
|
||||
return 1
|
||||
|
||||
proc/makeSpaceNinja()
|
||||
space_ninja_arrival()
|
||||
return 1
|
||||
|
||||
proc/makeDeathsquad()
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/time_passed = world.time
|
||||
var/input = "Purify the station."
|
||||
if(prob(10))
|
||||
input = "Save Runtime and any other cute things on the station."
|
||||
/*
|
||||
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
|
||||
emergency_shuttle.recall()
|
||||
world << "\blue <B>Alert: The shuttle is going back!</B>"
|
||||
|
||||
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
|
||||
|
||||
*/
|
||||
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
sleep(300)
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
if(!G.key)
|
||||
candidates.Remove(G)
|
||||
|
||||
if(candidates.len)
|
||||
var/numagents = 6
|
||||
//Spawns commandos and equips them.
|
||||
for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad)
|
||||
if(numagents<=0)
|
||||
break
|
||||
if (L.name == "Syndicate-Commando")
|
||||
syndicate_leader_selected = numagents == 1?1:0
|
||||
|
||||
var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
|
||||
|
||||
|
||||
while((!theghost || !theghost.client) && candidates.len)
|
||||
theghost = pick(candidates)
|
||||
candidates.Remove(theghost)
|
||||
|
||||
if(!theghost)
|
||||
del(new_syndicate_commando)
|
||||
break
|
||||
|
||||
new_syndicate_commando.key = theghost.key
|
||||
new_syndicate_commando.internal = new_syndicate_commando.s_store
|
||||
new_syndicate_commando.internals.icon_state = "internal1"
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
|
||||
|
||||
new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"<B>LEADER</B>"] in the service of the Syndicate. \nYour current mission is: \red<B> [input]</B>"
|
||||
|
||||
numagents--
|
||||
|
||||
//Spawns the rest of the commando gear.
|
||||
// for (var/obj/effect/landmark/L)
|
||||
// if (L.name == "Commando_Manual")
|
||||
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
|
||||
// var/obj/item/weapon/paper/P = new(L.loc)
|
||||
// P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
|
||||
// P.name = "Spec. Ops. Manual"
|
||||
|
||||
for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite)
|
||||
if (L.name == "Syndicate-Commando-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
|
||||
// del(L)
|
||||
|
||||
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
|
||||
|
||||
|
||||
proc/makeBorgDeathsquad()
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/time_passed = world.time
|
||||
var/list/namelist = list("Tyr","Fenrir","Lachesis","Clotho","Atropos","Nyx")
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
sleep(300)
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
if(!G.client || !G.key)
|
||||
candidates.Remove(G)
|
||||
|
||||
if(candidates.len)
|
||||
var/numagents = 3
|
||||
|
||||
//Spawns commandos and equips them.
|
||||
for (var/obj/effect/landmark/L in /area/borg_deathsquad)
|
||||
if(numagents<=0)
|
||||
break
|
||||
if (L.name == "Borg-Deathsquad")
|
||||
|
||||
var/name = pick(namelist)
|
||||
namelist.Remove(name)
|
||||
|
||||
var/mob/living/silicon/robot/new_borg_deathsquad = create_borg_death_commando(L, name)
|
||||
|
||||
|
||||
|
||||
while((!theghost || !theghost.client) && candidates.len)
|
||||
theghost = pick(candidates)
|
||||
candidates.Remove(theghost)
|
||||
|
||||
if(!theghost)
|
||||
del(new_borg_deathsquad)
|
||||
break
|
||||
|
||||
new_borg_deathsquad.key = theghost.key
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
|
||||
|
||||
new_borg_deathsquad << "You are a borg deathsquad operative. Follow your laws."
|
||||
numagents--
|
||||
|
||||
//Spawns the rest of the commando gear.
|
||||
// for (var/obj/effect/landmark/L)
|
||||
// if (L.name == "Commando_Manual")
|
||||
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
|
||||
// var/obj/item/weapon/paper/P = new(L.loc)
|
||||
// P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
|
||||
// P.name = "Spec. Ops. Manual"
|
||||
|
||||
|
||||
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
|
||||
|
||||
|
||||
proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
|
||||
if(!G_found || !G_found.key) return
|
||||
|
||||
//First we spawn a dude.
|
||||
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
||||
|
||||
new_character.gender = pick(MALE,FEMALE)
|
||||
|
||||
var/datum/preferences/A = new()
|
||||
A.randomize_appearance_for(new_character)
|
||||
if(new_character.gender == MALE)
|
||||
new_character.real_name = "[pick(first_names_male)] [pick(last_names)]"
|
||||
else
|
||||
new_character.real_name = "[pick(first_names_female)] [pick(last_names)]"
|
||||
new_character.name = new_character.real_name
|
||||
new_character.age = rand(17,45)
|
||||
|
||||
new_character.dna.ready_dna(new_character)
|
||||
new_character.key = G_found.key
|
||||
|
||||
return new_character
|
||||
|
||||
/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0)
|
||||
var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc)
|
||||
var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/syndicate_commando_name = pick(last_names)
|
||||
|
||||
new_syndicate_commando.gender = pick(MALE, FEMALE)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
A.randomize_appearance_for(new_syndicate_commando)
|
||||
|
||||
new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]"
|
||||
new_syndicate_commando.name = new_syndicate_commando.real_name
|
||||
new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45)
|
||||
|
||||
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
|
||||
|
||||
//Creates mind stuff.
|
||||
new_syndicate_commando.mind_initialize()
|
||||
new_syndicate_commando.mind.assigned_role = "MODE"
|
||||
new_syndicate_commando.mind.special_role = "Syndicate Commando"
|
||||
|
||||
//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
ticker.mode.traitors += new_syndicate_commando.mind
|
||||
new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
|
||||
|
||||
return new_syndicate_commando
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/create_borg_death_commando(obj/spawn_location, name)
|
||||
|
||||
var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1)
|
||||
|
||||
new_borg_deathsquad.real_name = name
|
||||
new_borg_deathsquad.name = name
|
||||
|
||||
//Creates mind stuff.
|
||||
new_borg_deathsquad.mind_initialize()
|
||||
new_borg_deathsquad.mind.assigned_role = "MODE"
|
||||
new_borg_deathsquad.mind.special_role = "Borg Commando"
|
||||
|
||||
//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
ticker.mode.traitors += new_borg_deathsquad.mind
|
||||
//del(spawn_location) // Commenting this out for multiple commando teams.
|
||||
return new_borg_deathsquad
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/Borg_station
|
||||
name = "Cyborg Station Terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list()
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/jumpcomplete = 0
|
||||
|
||||
/obj/machinery/computer/Borg_station/attack_hand()
|
||||
if(jumpcomplete)
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to send a cyborg deathsquad?", "Confirmation", "Yes", "No") == "Yes")
|
||||
var/area/start_location = locate(/area/borg_deathsquad/start)
|
||||
var/area/end_location = locate(/area/borg_deathsquad/station)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P in end_location)
|
||||
P.open()
|
||||
jumpcomplete = 1
|
||||
command_alert("DRADIS contact! Set condition one throughout the station!")
|
||||
@@ -1,437 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
// Controls the emergency shuttle
|
||||
|
||||
|
||||
// these define the time taken for the shuttle to get to SS13
|
||||
// and the time before it leaves again
|
||||
#define SHUTTLEARRIVETIME 600 // 10 minutes = 600 seconds
|
||||
#define SHUTTLELEAVETIME 180 // 3 minutes = 180 seconds
|
||||
#define SHUTTLETRANSITTIME 120 // 2 minutes = 120 seconds
|
||||
|
||||
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
||||
|
||||
datum/shuttle_controller
|
||||
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
|
||||
var/online = 0
|
||||
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
|
||||
|
||||
var/endtime // timeofday that shuttle arrives
|
||||
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
|
||||
//timeleft = 360 //600
|
||||
var/fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
|
||||
|
||||
|
||||
// call the shuttle
|
||||
// if not called before, set the endtime to T+600 seconds
|
||||
// otherwise if outgoing, switch to incoming
|
||||
proc/incall(coeff = 1)
|
||||
if(endtime)
|
||||
if(direction == -1)
|
||||
setdirection(1)
|
||||
else
|
||||
settimeleft(SHUTTLEARRIVETIME*coeff)
|
||||
online = 1
|
||||
|
||||
proc/recall()
|
||||
if(direction == 1)
|
||||
var/timeleft = timeleft()
|
||||
if(timeleft >= 600)
|
||||
return
|
||||
captain_announce("The emergency shuttle has been recalled.")
|
||||
world << sound('sound/AI/shuttlerecalled.ogg')
|
||||
setdirection(-1)
|
||||
online = 1
|
||||
|
||||
|
||||
// returns the time (in seconds) before shuttle arrival
|
||||
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
|
||||
proc/timeleft()
|
||||
if(online)
|
||||
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
||||
if(direction == 1 || direction == 2)
|
||||
return timeleft
|
||||
else
|
||||
return SHUTTLEARRIVETIME-timeleft
|
||||
else
|
||||
return SHUTTLEARRIVETIME
|
||||
|
||||
// sets the time left to a given delay (in seconds)
|
||||
proc/settimeleft(var/delay)
|
||||
endtime = world.timeofday + delay * 10
|
||||
timelimit = delay
|
||||
|
||||
// sets the shuttle direction
|
||||
// 1 = towards SS13, -1 = back to centcom
|
||||
proc/setdirection(var/dirn)
|
||||
if(direction == dirn)
|
||||
return
|
||||
direction = dirn
|
||||
// if changing direction, flip the timeleft by SHUTTLEARRIVETIME
|
||||
var/ticksleft = endtime - world.timeofday
|
||||
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
|
||||
return
|
||||
|
||||
proc/process()
|
||||
|
||||
emergency_shuttle
|
||||
process()
|
||||
if(!online)
|
||||
return
|
||||
var/timeleft = timeleft()
|
||||
if(timeleft > 1e5) // midnight rollover protection
|
||||
timeleft = 0
|
||||
switch(location)
|
||||
if(0)
|
||||
|
||||
/* --- Shuttle is in transit to Central Command from SS13 --- */
|
||||
if(direction == 2)
|
||||
if(timeleft>0)
|
||||
return 0
|
||||
|
||||
/* --- Shuttle has arrived at Centrcal Command --- */
|
||||
else
|
||||
// turn off the star spawners
|
||||
/*
|
||||
for(var/obj/effect/starspawner/S in world)
|
||||
S.spawning = 0
|
||||
*/
|
||||
|
||||
location = 2
|
||||
|
||||
//main shuttle
|
||||
var/area/start_location = locate(/area/shuttle/escape/transit)
|
||||
var/area/end_location = locate(/area/shuttle/escape/centcom)
|
||||
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
//pods
|
||||
start_location = locate(/area/shuttle/escape_pod1/transit)
|
||||
end_location = locate(/area/shuttle/escape_pod1/centcom)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod2/transit)
|
||||
end_location = locate(/area/shuttle/escape_pod2/centcom)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod3/transit)
|
||||
end_location = locate(/area/shuttle/escape_pod3/centcom)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod5/transit)
|
||||
end_location = locate(/area/shuttle/escape_pod5/centcom)
|
||||
start_location.move_contents_to(end_location, null, EAST)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
online = 0
|
||||
|
||||
return 1
|
||||
|
||||
/* --- Shuttle has docked centcom after being recalled --- */
|
||||
if(timeleft>timelimit)
|
||||
online = 0
|
||||
direction = 1
|
||||
endtime = null
|
||||
|
||||
return 0
|
||||
|
||||
else if((fake_recall != 0) && (timeleft <= fake_recall))
|
||||
recall()
|
||||
|
||||
return 0
|
||||
|
||||
/* --- Shuttle has docked with the station - begin countdown to transit --- */
|
||||
else if(timeleft <= 0)
|
||||
location = 1
|
||||
var/area/start_location = locate(/area/shuttle/escape/centcom)
|
||||
var/area/end_location = locate(/area/shuttle/escape/station)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
// NOTE: Commenting this out to avoid recreating mass driver glitch
|
||||
/*
|
||||
spawn(0)
|
||||
AM.throw_at(E, 1, 1)
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
|
||||
bug.gib()
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
settimeleft(SHUTTLELEAVETIME)
|
||||
send2irc("Server", "The Emergency Shuttle has docked with the station.")
|
||||
captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
|
||||
world << sound('sound/AI/shuttledock.ogg')
|
||||
|
||||
return 1
|
||||
|
||||
if(1)
|
||||
|
||||
if(timeleft>0)
|
||||
return 0
|
||||
|
||||
/* --- Shuttle leaves the station, enters transit --- */
|
||||
else
|
||||
|
||||
// Turn on the star effects
|
||||
|
||||
/* // kinda buggy atm, i'll fix this later
|
||||
for(var/obj/effect/starspawner/S in world)
|
||||
if(!S.spawning)
|
||||
spawn() S.startspawn()
|
||||
*/
|
||||
|
||||
location = 0 // in deep space
|
||||
direction = 2 // heading to centcom
|
||||
|
||||
//main shuttle
|
||||
var/area/start_location = locate(/area/shuttle/escape/station)
|
||||
var/area/end_location = locate(/area/shuttle/escape/transit)
|
||||
|
||||
settimeleft(SHUTTLETRANSITTIME)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
// Some aesthetic turbulance shaking
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
//pods
|
||||
start_location = locate(/area/shuttle/escape_pod1/station)
|
||||
end_location = locate(/area/shuttle/escape_pod1/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod2/station)
|
||||
end_location = locate(/area/shuttle/escape_pod2/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod3/station)
|
||||
end_location = locate(/area/shuttle/escape_pod3/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
start_location = locate(/area/shuttle/escape_pod5/station)
|
||||
end_location = locate(/area/shuttle/escape_pod5/transit)
|
||||
start_location.move_contents_to(end_location, null, EAST)
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 4, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(5)
|
||||
|
||||
captain_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
|
||||
spawner, an ender, and bgstar. Spawners create bgstars, bgstars shoot off into a direction
|
||||
until they reach a starender.
|
||||
*/
|
||||
|
||||
/obj/effect/bgstar
|
||||
name = "star"
|
||||
var/speed = 10
|
||||
var/direction = SOUTH
|
||||
layer = 2 // TURF_LAYER
|
||||
|
||||
New()
|
||||
..()
|
||||
pixel_x += rand(-2,30)
|
||||
pixel_y += rand(-2,30)
|
||||
var/starnum = pick("1", "1", "1", "2", "3", "4")
|
||||
|
||||
icon_state = "star"+starnum
|
||||
|
||||
speed = rand(2, 5)
|
||||
|
||||
proc/startmove()
|
||||
|
||||
while(src)
|
||||
sleep(speed)
|
||||
step(src, direction)
|
||||
for(var/obj/effect/starender/E in loc)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/effect/starender
|
||||
invisibility = 101
|
||||
|
||||
/obj/effect/starspawner
|
||||
invisibility = 101
|
||||
var/spawndir = SOUTH
|
||||
var/spawning = 0
|
||||
|
||||
West
|
||||
spawndir = WEST
|
||||
|
||||
proc/startspawn()
|
||||
spawning = 1
|
||||
while(spawning)
|
||||
sleep(rand(2, 30))
|
||||
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
|
||||
S.direction = spawndir
|
||||
spawn()
|
||||
S.startmove()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user