diff --git a/archive/maps/old_yw/tether_better/tether_things.dm b/archive/maps/old_yw/tether_better/tether_things.dm
index 94866e2f04..dff31581a2 100644
--- a/archive/maps/old_yw/tether_better/tether_things.dm
+++ b/archive/maps/old_yw/tether_better/tether_things.dm
@@ -259,15 +259,12 @@
newghost.timeofdeath = world.time
despawn_occupant(user)
-// Tram arrival point landmarks and datum
-var/global/list/latejoin_tram = list()
-
/obj/effect/landmark/tram
name = "JoinLateTram"
delete_me = 1
/obj/effect/landmark/tram/Initialize(mapload)
- latejoin_tram += loc // Register this turf as tram latejoin.
+ GLOB.latejoin_tram += loc // Register this turf as tram latejoin.
latejoin += loc // Also register this turf as fallback latejoin, since we won't have any arrivals shuttle landmarks.
. = ..()
@@ -277,7 +274,7 @@ var/global/list/latejoin_tram = list()
/datum/spawnpoint/tram/New()
..()
- turfs = latejoin_tram
+ turfs = GLOB.latejoin_tram
//
// Holodorms
diff --git a/archive/maps/old_yw/yw/cryogaia_things.dm b/archive/maps/old_yw/yw/cryogaia_things.dm
index 30936cba9f..8b2cfdab5b 100644
--- a/archive/maps/old_yw/yw/cryogaia_things.dm
+++ b/archive/maps/old_yw/yw/cryogaia_things.dm
@@ -197,15 +197,12 @@
newghost.timeofdeath = world.time
despawn_occupant(user)
-// Tram arrival point landmarks and datum
-var/global/list/latejoin_tram = list()
-
/obj/effect/landmark/tram
name = "JoinLateTram"
delete_me = 1
/obj/effect/landmark/tram/Initialize(mapload)
- latejoin_tram += loc // Register this turf as tram latejoin.
+ GLOB.latejoin_tram += loc // Register this turf as tram latejoin.
latejoin += loc // Also register this turf as fallback latejoin, since we won't have any arrivals shuttle landmarks.
. = ..()
@@ -215,7 +212,7 @@ var/global/list/latejoin_tram = list()
/datum/spawnpoint/tram/New()
..()
- turfs = latejoin_tram
+ turfs = GLOB.latejoin_tram
//
// Holodorms
diff --git a/archive/maps/old_yw/yw/residential/_residential.dm b/archive/maps/old_yw/yw/residential/_residential.dm
index 557c3e9650..94d9793625 100644
--- a/archive/maps/old_yw/yw/residential/_residential.dm
+++ b/archive/maps/old_yw/yw/residential/_residential.dm
@@ -57,14 +57,13 @@
. = ..()
// Spawn points
-
-var/global/list/latejoin_residential = list()
+GLOBAL_LIST_EMPTY(latejoin_residential)
/obj/effect/landmark/residential
name = "JoinLateResidential"
delete_me = 1
/obj/effect/landmark/residential/Initialize(mapload)
- latejoin_residential += loc // Register this turf as tram latejoin.
+ GLOB.latejoin_residential += loc // Register this turf as tram latejoin.
. = ..()
/datum/spawnpoint/residential
@@ -75,7 +74,7 @@ var/global/list/latejoin_residential = list()
/datum/spawnpoint/residential/New()
..()
- turfs = latejoin_residential
+ turfs = GLOB.latejoin_residential
/obj/machinery/cryopod/robot/door/residential
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
deleted file mode 100644
index 7875dca613..0000000000
--- a/code/controllers/configuration.dm
+++ /dev/null
@@ -1,1212 +0,0 @@
-var/list/gamemode_cache = list()
-
-/datum/configuration
- var/static/server_name = null // server name (for world name / status)
- var/static/server_suffix = 0 // generate numeric suffix based on server port
-
- var/static/nudge_script_path = "nudge.py" // where the nudge.py script is located
-
- var/static/log_ooc = 0 // log OOC channel
- var/static/log_access = 0 // log login/logout
- var/static/log_say = 0 // log client say
- var/static/log_admin = 0 // log admin actions
- var/static/log_debug = 1 // log debug output
- var/static/log_game = 0 // log game events
- var/static/log_vote = 0 // log voting
- var/static/log_whisper = 0 // log client whisper
- var/static/log_emote = 0 // log emotes
- var/static/log_attack = 0 // log attack messages
- var/static/log_adminchat = 0 // log admin chat messages
- var/static/log_adminwarn = 0 // log warnings admins get about bomb construction and such
- var/static/log_pda = 0 // log pda messages
- var/static/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
- var/static/log_runtime = 0 // logs world.log to a file
- var/static/log_world_output = 0 // log to_world_log(messages)
- var/static/log_graffiti = 0 // logs graffiti
- var/static/sql_enabled = 0 // for sql switching
- var/static/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
- var/static/allow_vote_restart = 0 // allow votes to restart
- var/static/ert_admin_call_only = 0
- var/static/allow_vote_mode = 0 // allow votes to change mode
- var/static/allow_admin_jump = 1 // allows admin jumping
- var/static/allow_admin_spawning = 1 // allows admin item spawning
- var/static/allow_admin_rev = 1 // allows admin revives
- var/static/pregame_time = 180 // pregame time in seconds
- var/static/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
- var/static/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
- var/static/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
- var/static/vote_autotransfer_interval = 36000 // length of time before next sequential autotransfer vote
- var/static/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100).
- var/static/vote_autotransfer_amount = 3 //How many autotransfers to have
- var/static/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
- var/static/vote_no_dead = 0 // dead people can't vote (tbi)
-// var/static/enable_authentication = 0 // goon authentication
- var/static/del_new_on_log = 1 // del's new players if they log before they spawn in
- var/static/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
- var/static/traitor_scaling = 0 //if amount of traitors scales based on amount of players
- var/static/objectives_disabled = 0 //if objectives are disabled or not
- var/static/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
- var/static/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
- var/static/allow_Metadata = 0 // Metadata is supported.
- var/static/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
- var/static/fps = 20
- var/static/tick_limit_mc_init = TICK_LIMIT_MC_INIT_DEFAULT //SSinitialization throttling
- var/static/Tickcomp = 0
- var/static/socket_talk = 0 // use socket_talk to communicate with other processes
- var/static/list/resource_urls = null
- var/static/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
- var/static/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
- var/static/list/mode_names = list()
- var/static/list/modes = list() // allowed modes
- var/static/list/votable_modes = list() // votable modes
- var/static/list/probabilities = list() // relative probability of each mode
- var/static/list/player_requirements = list() // Overrides for how many players readied up a gamemode needs to start.
- var/static/list/player_requirements_secret = list() // Same as above, but for the secret gamemode.
- var/static/humans_need_surnames = 0
- var/static/allow_random_events = 0 // enables random events mid-round when set to 1
- var/static/enable_game_master = 0 // enables the 'smart' event system.
- var/static/allow_ai = 1 // allow ai job
- var/static/allow_ai_shells = FALSE // allow AIs to enter and leave special borg shells at will, and for those shells to be buildable.
- var/static/give_free_ai_shell = FALSE // allows a specific spawner object to instantiate a premade AI Shell
- var/static/hostedby = null
-
- var/static/respawn = 1
- var/static/respawn_time = 3000 // time before a dead player is allowed to respawn (in ds, though the config file asks for minutes, and it's converted below)
- var/static/respawn_message = span_boldnotice("Make sure to play a different character, and please roleplay correctly!")
-
- var/static/guest_jobban = 1
- var/static/usewhitelist = 0
- var/static/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
- var/static/show_mods = 0
- var/static/show_devs = 0
- var/static/show_mentors = 0
- var/static/show_event_managers = 0
- var/static/mods_can_tempban = 0
- var/static/mods_can_job_tempban = 0
- var/static/mod_tempban_max = 1440
- var/static/mod_job_tempban_max = 1440
- var/static/load_jobs_from_txt = 0
- var/static/ToRban = 0
- var/static/automute_on = 0 //enables automuting/spam prevention
- var/static/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
-
- var/static/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
- var/static/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
-
- var/static/character_slots = 10 // The number of available character slots
- var/static/loadout_slots = 3 // The number of loadout slots per character
-
- var/static/max_maint_drones = 5 //This many drones can spawn,
- var/static/allow_drone_spawn = 1 //assuming the admin allow them to.
- var/static/drone_build_time = 1200 //A drone will become available every X ticks since last drone spawn. Default is 2 minutes.
-
- var/static/disable_player_mice = 0
- var/static/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech
-
- var/static/usealienwhitelist = 0
- var/static/limitalienplayers = 0
- var/static/alien_to_human_ratio = 0.5
- var/static/allow_extra_antags = 0
- var/static/guests_allowed = 1
- var/static/debugparanoid = 0
- var/static/panic_bunker = 0
- var/static/paranoia_logging = 0
-
- var/static/ip_reputation = FALSE //Should we query IPs to get scores? Generates HTTP traffic to an API service.
- var/static/ipr_email //Left null because you MUST specify one otherwise you're making the internet worse.
- var/static/ipr_block_bad_ips = FALSE //Should we block anyone who meets the minimum score below? Otherwise we just log it (If paranoia logging is on, visibly in chat).
- var/static/ipr_bad_score = 1 //The API returns a value between 0 and 1 (inclusive), with 1 being 'definitely VPN/Tor/Proxy'. Values equal/above this var are considered bad.
- var/static/ipr_allow_existing = FALSE //Should we allow known players to use VPNs/Proxies? If the player is already banned then obviously they still can't connect.
- var/static/ipr_minimum_age = 5 //How many days before a player is considered 'fine' for the purposes of allowing them to use VPNs.
-
- var/static/serverurl
- var/static/server
- var/static/banappeals
- var/static/wikiurl
- var/static/wikisearchurl
- var/static/forumurl
- var/static/githuburl
- var/static/discordurl
- var/static/rulesurl
- var/static/mapurl
- var/static/patreonurl
-
- //Alert level description
- var/static/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
- var/static/alert_desc_yellow_upto = "A minor security emergency has developed. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced."
- var/static/alert_desc_yellow_downto = "Code yellow procedures are now in effect. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced."
- var/static/alert_desc_violet_upto = "A major medical emergency has developed. Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey all relevant instructions from medical staff."
- var/static/alert_desc_violet_downto = "Code violet procedures are now in effect; Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey relevant instructions from medical staff."
- var/static/alert_desc_orange_upto = "A major engineering emergency has developed. Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff."
- var/static/alert_desc_orange_downto = "Code orange procedures are now in effect; Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff."
- var/static/alert_desc_blue_upto = "A major security emergency has developed. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person."
- var/static/alert_desc_blue_downto = "Code blue procedures are now in effect. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person."
- var/static/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/static/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/static/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/static/forbid_singulo_possession = 0
-
- //game_options.txt configs
-
- var/static/health_threshold_softcrit = 0
- var/static/health_threshold_crit = 0
- var/static/health_threshold_dead = -100
-
- var/static/organ_health_multiplier = 1
- var/static/organ_regeneration_multiplier = 1
- var/static/organs_decay
- var/static/default_brain_health = 400
- var/static/allow_headgibs = FALSE
-
- //Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
- //so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
- var/static/organ_damage_spillover_multiplier = 0.5
-
- var/static/bones_can_break = 0
- var/static/limbs_can_break = 0
-
- var/static/revival_pod_plants = 1
- var/static/revival_cloning = 1
- var/static/revival_brain_life = -1
-
- var/static/use_loyalty_implants = 0
-
- var/static/welder_vision = 1
- var/static/generate_map = 0
- var/static/no_click_cooldown = 0
-
- //Used for modifying movement speed for mobs.
- //Unversal modifiers
- var/static/run_speed = 0
- var/static/walk_speed = 0
-
- //Mob specific modifiers. NOTE: These will affect different mob types in different ways
- var/static/human_delay = 0
- var/static/robot_delay = 0
- var/static/monkey_delay = 0
- var/static/alien_delay = 0
- var/static/slime_delay = 0
- var/static/animal_delay = 0
-
- var/static/footstep_volume = 0
-
- var/static/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
- var/static/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
- var/static/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
- var/static/use_age_restriction_for_antags = 0 //Do antags use account age restrictions? --requires database
-
- var/static/simultaneous_pm_warning_timeout = 100
-
- var/static/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
- var/static/multi_z_explosion_scalar = 0.5 //Multiplier for how much weaker explosions are on neighboring z levels.
-
- var/static/assistant_maint = 0 //Do assistants get maint access?
- var/static/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
- var/static/ghost_interaction = 0
-
- var/static/comms_password = ""
-
- var/static/enter_allowed = 1
-
- var/use_irc_bot = 0
- var/use_node_bot = 0
- var/irc_bot_port = 0
- var/irc_bot_host = ""
- var/irc_bot_export = 0 // whether the IRC bot in use is a Bot32 (or similar) instance; Bot32 uses world.Export() instead of nudge.py/libnudge
- var/main_irc = ""
- var/admin_irc = ""
- var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
- var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
- var/use_overmap = 0
-
- var/static/list/engine_map = list("Supermatter Engine", "Edison's Bane") // Comma separated list of engines to choose from. Blank means fully random.
-
- // Event settings
- var/static/expected_round_length = 3 * 60 * 60 * 10 // 3 hours
- // If the first delay has a custom start time
- // No custom time, no custom time, between 80 to 100 minutes respectively.
- var/static/list/event_first_run = list(EVENT_LEVEL_MUNDANE = null, EVENT_LEVEL_MODERATE = null, EVENT_LEVEL_MAJOR = list("lower" = 48000, "upper" = 60000))
- // The lowest delay until next event
- // 10, 30, 50 minutes respectively
- var/static/list/event_delay_lower = list(EVENT_LEVEL_MUNDANE = 6000, EVENT_LEVEL_MODERATE = 18000, EVENT_LEVEL_MAJOR = 30000)
- // The upper delay until next event
- // 15, 45, 70 minutes respectively
- var/static/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000)
-
- var/static/aliens_allowed = 1
- var/static/ninjas_allowed = 0
- var/static/abandon_allowed = 1
- var/static/ooc_allowed = 1
- var/static/looc_allowed = 1
- var/static/dooc_allowed = 1
- var/static/dsay_allowed = 1
-
- var/persistence_disabled = FALSE
- var/persistence_ignore_mapload = FALSE
-
- var/allow_byond_links = 1 //CHOMP Edit turned this on
- var/allow_discord_links = 1 //CHOMP Edit turned this on
- var/allow_url_links = 1 // honestly if I were you i'd leave this one off, only use in dire situations //CHOMP Edit: pussy.
-
- var/starlight = 0 // Whether space turfs have ambient light or not
-
- var/static/list/ert_species = list(SPECIES_HUMAN)
-
- var/static/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010"
-
- var/static/aggressive_changelog = 0
-
- var/static/list/language_prefixes = list(",","#")//Default language prefixes
-
- var/static/show_human_death_message = 1
-
- var/static/radiation_resistance_calc_mode = RAD_RESIST_CALC_SUB // 0:1 subtraction:division for computing effective radiation on a turf
- var/static/radiation_decay_rate = 1 //How much radiation is reduced by each tick
- var/static/radiation_resistance_multiplier = 8.5 //VOREstation edit
- var/static/radiation_material_resistance_divisor = 1
- var/static/radiation_lower_limit = 0.35 //If the radiation level for a turf would be below this, ignore it.
-
- var/static/autostart_solars = FALSE // If true, specifically mapped in solar control computers will set themselves up when the round starts.
-
- // New shiny SQLite stuff.
- // The basics.
- var/static/sqlite_enabled = FALSE // If it should even be active. SQLite can be ran alongside other databases but you should not have them do the same functions.
-
- // In-Game Feedback.
- var/static/sqlite_feedback = FALSE // Feedback cannot be submitted if this is false.
- var/static/list/sqlite_feedback_topics = list("General") // A list of 'topics' that feedback can be catagorized under by the submitter.
- var/static/sqlite_feedback_privacy = FALSE // If true, feedback submitted can have its author name be obfuscated. This is not 100% foolproof (it's md5 ffs) but can stop casual snooping.
- var/static/sqlite_feedback_cooldown = 0 // How long one must wait, in days, to submit another feedback form. Used to help prevent spam, especially with privacy active. 0 = No limit.
- var/static/sqlite_feedback_min_age = 0 // Used to block new people from giving feedback. This metric is very bad but it can help slow down spammers.
-
- var/static/defib_timer = 10 // How long until someone can't be defibbed anymore, in minutes.
- var/static/defib_braindamage_timer = 2 // How long until someone will get brain damage when defibbed, in minutes. The closer to the end of the above timer, the more brain damage they get.
-
- // disables the annoying "You have already logged in this round, disconnect or be banned" popup for multikeying, because it annoys the shit out of me when testing.
- var/static/disable_cid_warn_popup = FALSE
-
- // whether or not to use the nightshift subsystem to perform lighting changes
- var/static/enable_night_shifts = FALSE
-
- // How strictly the loadout enforces object species whitelists
- var/loadout_whitelist = LOADOUT_WHITELIST_LAX
-
- var/static/vgs_access_identifier = null // VOREStation Edit - VGS
- var/static/vgs_server_port = null // VOREStation Edit - VGS
-
- var/disable_webhook_embeds = FALSE
-
-
- var/static/list/jukebox_track_files
-
- var/static/suggested_byond_version
- var/static/suggested_byond_build
-
- var/static/invoke_youtubedl = null
-
- //Enables/Disables the appropriate mob type from obtaining the verb on spawn. Still allows admins to manually give it to them.
- var/static/allow_robot_recolor = FALSE
- var/static/allow_simple_mob_recolor = FALSE
-
- var/static/asset_transport
-
- var/static/cache_assets = FALSE
-
- var/static/save_spritesheets = FALSE
-
- var/static/asset_simple_preload = FALSE
-
- var/static/asset_cdn_webroot
-
- var/static/asset_cdn_url
-
-/datum/configuration/New()
- var/list/L = subtypesof(/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)
- gamemode_cache[M.config_tag] = M // So we don't instantiate them repeatedly.
- if(!(M.config_tag in modes)) // ensure each mode is added only once
- log_misc("Adding game mode [M.name] ([M.config_tag]) to configuration.")
- modes += M.config_tag
- mode_names[M.config_tag] = M.name
- probabilities[M.config_tag] = M.probability
- player_requirements[M.config_tag] = M.required_players
- player_requirements_secret[M.config_tag] = M.required_players_secret
- if (M.votable)
- src.votable_modes += M.config_tag
- 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/list/Lines = file2list(filename)
-
- for(var/t in Lines)
- 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 ("resource_urls")
- config.resource_urls = splittext(value, " ")
-
- if ("admin_legacy_system")
- config.admin_legacy_system = 1
-
- if ("ban_legacy_system")
- config.ban_legacy_system = 1
-
- if ("use_age_restriction_for_jobs")
- config.use_age_restriction_for_jobs = 1
-
- if ("use_age_restriction_for_antags")
- config.use_age_restriction_for_antags = 1
-
- if ("jobs_have_minimal_access")
- config.jobs_have_minimal_access = 1
-
- if ("use_recursive_explosions")
- use_recursive_explosions = 1
-
- if ("multi_z_explosion_scalar")
- multi_z_explosion_scalar = text2num(value)
-
- if ("log_ooc")
- config.log_ooc = 1
-
- if ("log_access")
- config.log_access = 1
-
- if ("sql_enabled")
- config.sql_enabled = 1
-
- if ("log_say")
- config.log_say = 1
-
- if ("debug_paranoid")
- config.debugparanoid = 1
-
- if ("log_admin")
- config.log_admin = 1
-
- if ("log_debug")
- config.log_debug = text2num(value)
-
- 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_world_output")
- config.log_world_output = 1
-
- if ("log_hrefs")
- config.log_hrefs = 1
-
- if ("log_runtime")
- config.log_runtime = 1
-
- if ("log_graffiti")
- config.log_graffiti = 1
-
- if ("generate_map")
- config.generate_map = 1
-
- if ("no_click_cooldown")
- config.no_click_cooldown = 1
-
- if("allow_admin_ooccolor")
- config.allow_admin_ooccolor = 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 ("allow_byond_links")
- allow_byond_links = 1
-
- if ("allow_discord_links")
- allow_discord_links = 1
-
- if ("allow_url_links")
- allow_url_links = 1
-
- if ("no_dead_vote")
- config.vote_no_dead = 1
-
- if ("default_no_vote")
- config.vote_no_default = 1
-
- if ("pregame_time")
- config.pregame_time = text2num(value)
-
- if ("vote_delay")
- config.vote_delay = text2num(value)
-
- if ("vote_period")
- config.vote_period = text2num(value)
-
- if ("vote_autotransfer_initial")
- config.vote_autotransfer_initial = text2num(value)
-
- if ("vote_autotransfer_interval")
- config.vote_autotransfer_interval = text2num(value)
-
- if ("vote_autotransfer_amount")
- config.vote_autotransfer_amount = text2num(value) //YW addition, vote transfer amount
-
- if ("vote_autogamemode_timeleft")
- config.vote_autogamemode_timeleft = text2num(value)
-
- if("ert_admin_only")
- config.ert_admin_call_only = 1
-
- if ("allow_ai")
- config.allow_ai = 1
-
- if ("allow_ai_shells")
- config.allow_ai_shells = TRUE
-
- if("give_free_ai_shell")
- config.give_free_ai_shell = TRUE
-
-// if ("authentication")
-// config.enable_authentication = 1
-
- if ("norespawn")
- config.respawn = 0
-
- if ("respawn_time")
- var/raw_minutes = text2num(value)
- config.respawn_time = raw_minutes MINUTES
-
- if ("respawn_message")
- config.respawn_message = span_boldnotice("[value]")
-
- if ("servername")
- config.server_name = value
-
- if ("serversuffix")
- config.server_suffix = 1
-
- if ("nudge_script_path")
- config.nudge_script_path = value
-
- if ("hostedby")
- config.hostedby = value
-
- if ("serverurl")
- config.serverurl = value
-
- if ("server")
- config.server = value
-
- if ("banappeals")
- config.banappeals = value
-
- if ("wikiurl")
- config.wikiurl = value
-
- if ("wikisearchurl")
- config.wikisearchurl = value
-
- if ("forumurl")
- config.forumurl = value
-
- if ("rulesurl")
- config.rulesurl = value
-
- if ("mapurl")
- config.mapurl = value
-
- if ("githuburl")
- config.githuburl = value
-
- if ("discordurl")
- config.discordurl = value
-
- if ("patreonurl")
- config.patreonurl = value
-
- if ("guest_jobban")
- config.guest_jobban = 1
-
- if ("guest_ban")
- config.guests_allowed = 0
-
- if ("disable_ooc")
- config.ooc_allowed = 0
- config.looc_allowed = 0
-
- if ("disable_entry")
- config.enter_allowed = 0
-
- if ("disable_dead_ooc")
- config.dooc_allowed = 0
-
- if ("disable_dsay")
- config.dsay_allowed = 0
-
- if ("disable_respawn")
- config.abandon_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 ("aliens_allowed")
- config.aliens_allowed = 1
-
- if ("ninjas_allowed")
- config.ninjas_allowed = 1
-
- if ("objectives_disabled")
- config.objectives_disabled = 1
-
- if("protect_roles_from_antagonist")
- config.protect_roles_from_antagonist = 1
-
- if("persistence_disabled")
- config.persistence_disabled = TRUE // Previously this forcibly set persistence enabled in the saves.
-
- if("persistence_ignore_mapload")
- config.persistence_ignore_mapload = TRUE
-
- if("persistence_ignore_mapload")
- config.persistence_ignore_mapload = TRUE
-
- 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
- log_misc("Unknown game mode probability configuration definition: [prob_name].")
- else
- log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].")
-
- if ("required_players", "required_players_secret")
- var/req_pos = findtext(value, " ")
- var/req_name = null
- var/req_value = null
- var/is_secret_override = findtext(name, "required_players_secret") // Being extra sure we're not picking up an override for Secret by accident.
-
- if(req_pos)
- req_name = lowertext(copytext(value, 1, req_pos))
- req_value = copytext(value, req_pos + 1)
- if(req_name in config.modes)
- if(is_secret_override)
- config.player_requirements_secret[req_name] = text2num(req_value)
- else
- config.player_requirements[req_name] = text2num(req_value)
- else
- log_misc("Unknown game mode player requirement configuration definition: [req_name].")
- else
- log_misc("Incorrect player requirement configuration definition: [req_name] [req_value].")
-
- if("allow_random_events")
- config.allow_random_events = 1
-
- if("enable_game_master")
- config.enable_game_master = 1
-
- if("kick_inactive")
- config.kick_inactive = text2num(value)
-
- if("show_mods")
- config.show_mods = 1
-
- if("show_devs")
- config.show_devs = 1
-
- if("show_mentors")
- config.show_mentors = 1
-
- if("show_event_managers")
- config.show_event_managers = 1
-
- if("mods_can_tempban")
- config.mods_can_tempban = 1
-
- if("mods_can_job_tempban")
- config.mods_can_job_tempban = 1
-
- if("mod_tempban_max")
- config.mod_tempban_max = text2num(value)
-
- if("mod_job_tempban_max")
- config.mod_job_tempban_max = text2num(value)
-
- 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("use_irc_bot")
- use_irc_bot = 1
-
- if("use_node_bot")
- use_node_bot = 1
-
- if("irc_bot_port")
- config.irc_bot_port = value
-
- if("irc_bot_export")
- irc_bot_export = 1
-
- if("ticklag")
- var/ticklag = text2num(value)
- if(ticklag > 0)
- fps = 10 / ticklag
- world.fps = fps //CHOMPEdit
-
- if("tick_limit_mc_init")
- tick_limit_mc_init = text2num(value)
-
- if("allow_antag_hud")
- config.antag_hud_allowed = 1
- if("antag_hud_restricted")
- config.antag_hud_restricted = 1
-
- if("socket_talk")
- socket_talk = text2num(value)
-
- if("tickcomp")
- Tickcomp = 1
-
- if("humans_need_surnames")
- humans_need_surnames = 1
-
- if("tor_ban")
- ToRban = 1
-
- if("automute_on")
- automute_on = 1
-
- if("usealienwhitelist")
- usealienwhitelist = 1
-
- if("alien_player_ratio")
- limitalienplayers = 1
- alien_to_human_ratio = text2num(value)
-
- if("assistant_maint")
- config.assistant_maint = 1
-
- if("gateway_delay")
- config.gateway_delay = text2num(value)
-
- if("continuous_rounds")
- config.continous_rounds = 1
-
- if("ghost_interaction")
- config.ghost_interaction = 1
-
- if("disable_player_mice")
- config.disable_player_mice = 1
-
- if("uneducated_mice")
- config.uneducated_mice = 1
-
- if("comms_password")
- config.comms_password = value
-
- if("irc_bot_host")
- config.irc_bot_host = value
-
- if("main_irc")
- config.main_irc = value
-
- if("admin_irc")
- config.admin_irc = value
-
- if("python_path")
- if(value)
- config.python_path = value
-
- if("use_lib_nudge")
- config.use_lib_nudge = 1
-
- if("allow_cult_ghostwriter")
- config.cult_ghostwriter = 1
-
- if("req_cult_ghostwriter")
- config.cult_ghostwriter_req_cultists = text2num(value)
-
- if("character_slots")
- config.character_slots = text2num(value)
-
- if("loadout_slots")
- config.loadout_slots = text2num(value)
-
- if("allow_drone_spawn")
- config.allow_drone_spawn = text2num(value)
-
- if("drone_build_time")
- config.drone_build_time = text2num(value)
-
- if("max_maint_drones")
- config.max_maint_drones = text2num(value)
-
- if("use_overmap")
- config.use_overmap = 1
-
- if("engine_map")
- config.engine_map = splittext(value, ",")
-/*
- if("station_levels")
- using_map.station_levels = text2numlist(value, ";")
-
- if("admin_levels")
- using_map.admin_levels = text2numlist(value, ";")
-
- if("contact_levels")
- using_map.contact_levels = text2numlist(value, ";")
-
- if("player_levels")
- using_map.player_levels = text2numlist(value, ";")
-*/
- if("expected_round_length")
- config.expected_round_length = MinutesToTicks(text2num(value))
-
- if("disable_welder_vision")
- config.welder_vision = 0
-
- if("allow_extra_antags")
- config.allow_extra_antags = 1
-
- if("event_custom_start_mundane")
- var/values = text2numlist(value, ";")
- config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
-
- if("event_custom_start_moderate")
- var/values = text2numlist(value, ";")
- config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
-
- if("event_custom_start_major")
- var/values = text2numlist(value, ";")
- config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
-
- if("event_delay_lower")
- var/values = text2numlist(value, ";")
- config.event_delay_lower[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
- config.event_delay_lower[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
- config.event_delay_lower[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
-
- if("event_delay_upper")
- var/values = text2numlist(value, ";")
- config.event_delay_upper[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
- config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
- config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
-
- if("starlight")
- value = text2num(value)
- config.starlight = value >= 0 ? value : 0
-
- if("ert_species")
- config.ert_species = splittext(value, ";")
- if(!config.ert_species.len)
- config.ert_species += SPECIES_HUMAN
-
- if("law_zero")
- law_zero = value
-
- if("aggressive_changelog")
- config.aggressive_changelog = 1
-
- if("default_language_prefixes")
- var/list/values = splittext(value, " ")
- if(values.len > 0)
- language_prefixes = values
-
- if("radiation_lower_limit")
- radiation_lower_limit = text2num(value)
-
- if("radiation_resistance_calc_divide")
- radiation_resistance_calc_mode = RAD_RESIST_CALC_DIV
-
- if("radiation_resistance_calc_subtract")
- radiation_resistance_calc_mode = RAD_RESIST_CALC_SUB
-
- if("radiation_resistance_multiplier")
- radiation_resistance_multiplier = text2num(value)
-
- if("radiation_material_resistance_divisor")
- radiation_material_resistance_divisor = text2num(value)
-
- if("radiation_decay_rate")
- radiation_decay_rate = text2num(value)
-
- if ("panic_bunker")
- config.panic_bunker = 1
-
- if ("paranoia_logging")
- config.paranoia_logging = 1
-
- if("ip_reputation")
- config.ip_reputation = 1
-
- if("ipr_email")
- config.ipr_email = value
-
- if("ipr_block_bad_ips")
- config.ipr_block_bad_ips = 1
-
- if("ipr_bad_score")
- config.ipr_bad_score = text2num(value)
-
- if("ipr_allow_existing")
- config.ipr_allow_existing = 1
-
- if("ipr_minimum_age")
- config.ipr_minimum_age = text2num(value)
-
- if("autostart_solars")
- config.autostart_solars = TRUE
-
- if("sqlite_enabled")
- config.sqlite_enabled = TRUE
-
- if("sqlite_feedback")
- config.sqlite_feedback = TRUE
-
- if("sqlite_feedback_topics")
- config.sqlite_feedback_topics = splittext(value, ";")
- if(!config.sqlite_feedback_topics.len)
- config.sqlite_feedback_topics += "General"
-
- if("sqlite_feedback_privacy")
- config.sqlite_feedback_privacy = TRUE
-
- if("sqlite_feedback_cooldown")
- config.sqlite_feedback_cooldown = text2num(value)
-
- if("defib_timer")
- config.defib_timer = text2num(value)
-
- if("defib_braindamage_timer")
- config.defib_braindamage_timer = text2num(value)
-
- if("disable_cid_warn_popup")
- config.disable_cid_warn_popup = TRUE
-
- if("enable_night_shifts")
- config.enable_night_shifts = TRUE
-
- if("jukebox_track_files")
- config.jukebox_track_files = splittext(value, ";")
-
- if("suggested_byond_version")
- config.suggested_byond_version = text2num(value)
-
- if("suggested_byond_build")
- config.suggested_byond_build = text2num(value)
-
- // VOREStation Edit Start - Can't be in _vr file because it is loaded too late.
- if("vgs_access_identifier")
- config.vgs_access_identifier = value
- if("vgs_server_port")
- config.vgs_server_port = text2num(value)
- // VOREStation Edit End
-
- if("invoke_youtubedl")
- config.invoke_youtubedl = value
-
- if("asset_transport")
- config.asset_transport = value
-
- if("cache_assets")
- config.cache_assets = TRUE
-
- if("save_spritesheets")
- config.save_spritesheets = TRUE
-
- if("asset_simple_preload")
- config.asset_simple_preload = TRUE
-
- if("asset_cdn_webroot")
- config.asset_cdn_webroot = value
-
- if("asset_cdn_url")
- config.asset_cdn_url = value
-
- if("allow_robot_recolor")
- config.allow_robot_recolor = TRUE
-
- if("allow_simple_mob_recolor")
- config.allow_simple_mob_recolor = TRUE
-
- else
- log_misc("Unknown setting in configuration: '[name]'")
-
- else if(type == "game_options")
- if(!value)
- log_misc("Unknown value for setting [name] in [filename].")
- value = text2num(value)
-
- switch(name)
- if("health_threshold_crit")
- config.health_threshold_crit = value
- if("health_threshold_softcrit")
- config.health_threshold_softcrit = value
- if("health_threshold_dead")
- config.health_threshold_dead = value
- if("show_human_death_message")
- config.show_human_death_message = 1
- 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
- if("organ_health_multiplier")
- config.organ_health_multiplier = value / 100
- if("organ_regeneration_multiplier")
- config.organ_regeneration_multiplier = value / 100
- if("organ_damage_spillover_multiplier")
- config.organ_damage_spillover_multiplier = value / 100
- if("organs_can_decay")
- config.organs_decay = 1
- if("default_brain_health")
- config.default_brain_health = text2num(value)
- if(!config.default_brain_health || config.default_brain_health < 1)
- config.default_brain_health = initial(config.default_brain_health)
- if("bones_can_break")
- config.bones_can_break = value
- if("limbs_can_break")
- config.limbs_can_break = value
- if("allow_headgibs")
- config.allow_headgibs = TRUE
-
- if("run_speed")
- config.run_speed = value
- if("walk_speed")
- config.walk_speed = value
-
- if("human_delay")
- config.human_delay = value
- if("robot_delay")
- config.robot_delay = value
- if("monkey_delay")
- config.monkey_delay = value
- if("alien_delay")
- config.alien_delay = value
- if("slime_delay")
- config.slime_delay = value
- if("animal_delay")
- config.animal_delay = value
-
- if("footstep_volume")
- config.footstep_volume = text2num(value)
-
- if("use_loyalty_implants")
- config.use_loyalty_implants = 1
-
- if("loadout_whitelist")
- config.loadout_whitelist = text2num(value)
-
- else
- log_misc("Unknown setting in configuration: '[name]'")
-
-/datum/configuration/proc/loadsql(filename) // -- TLE
- var/list/Lines = file2list(filename)
- for(var/t in Lines)
- 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
- log_misc("Unknown setting in configuration: '[name]'")
-
-/datum/configuration/proc/loadforumsql(filename) // -- TLE
- var/list/Lines = file2list(filename)
- for(var/t in Lines)
- 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
- log_misc("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/game_mode in gamemode_cache)
- var/datum/game_mode/M = gamemode_cache[game_mode]
- if (M.config_tag && M.config_tag == mode_name)
- return M
- return gamemode_cache["extended"]
-
-/datum/configuration/proc/get_runnable_modes()
- var/list/runnable_modes = list()
- for(var/game_mode in gamemode_cache)
- var/datum/game_mode/M = gamemode_cache[game_mode]
- if(M && M.can_start() && !isnull(config.probabilities[M.config_tag]) && config.probabilities[M.config_tag] > 0)
- runnable_modes |= M
- return runnable_modes
-
-/datum/configuration/proc/post_load()
- SSdbcore.InitializeRound() // CHOMPEdit
-
- //apply a default value to config.python_path, if needed
- if (!CONFIG_GET(string/python_path)) // CHOMPEdit
- if(world.system_type == UNIX)
- CONFIG_SET(string/python_path, "/usr/bin/env python2") // CHOMPEdit
- else //probably windows, if not this should work anyway
- CONFIG_SET(string/python_path, "python") // CHOMPEdit
diff --git a/code/controllers/configuration_yw.dm b/code/controllers/configuration_yw.dm
deleted file mode 100644
index 8c32ab2788..0000000000
--- a/code/controllers/configuration_yw.dm
+++ /dev/null
@@ -1,53 +0,0 @@
-/datum/configuration
- var/shipping_auth = "memes"
- var/list/authedservers = list()
-
-// Example line in the config:
-// 192.168.1.1:1234 ServerName;ServerPW (The PW of that server, ask them for it)
-/datum/configuration/proc/loadshippinglist(filename)
- var/list/Lines = file2list(filename)
- for (var/t in Lines)
- if(!t) continue
- t = trim(t)
- if (length(t) == 0)
- continue
- else if (copytext(t, 1, 2) == "#")
- continue
-
- var/pos = findtext(t, " ")
- var/ip = null
- var/value = null
-
- if (pos)
- ip = lowertext(copytext(t, 1, pos))
- value = copytext(t, pos + 1)
- else
- ip = lowertext(t)
-
- if (!ip)
- continue
-
- var/name
- var/auth
- pos = findtext(value, ";")
- if (pos)
- name = lowertext(copytext(value, 1, pos))
- auth = copytext(value, pos + 1)
-
- authedservers[ip] = new /datum/shippingservers(ip, name, auth)
- world << "Added server: [ip] [name] [auth] to list"
-
-
-/datum/shippingservers
- var/serverip
- var/servername
- var/serverauth
- var/list/allowedshipids
-
-/datum/shippingservers/New(_serverip, _servername, _serverauth)
- if(!_serverip || !_servername || !_serverauth)
- throw EXCEPTION("Invalid arguments sent to shippingservers/New().")
-
- serverip = _serverip
- servername = _servername
- serverauth = _serverauth
diff --git a/code/datums/api.dm b/code/datums/api.dm
deleted file mode 100644
index 98f0fbe27b..0000000000
--- a/code/datums/api.dm
+++ /dev/null
@@ -1,65 +0,0 @@
-var/list/topic_commands = list()
-var/list/topic_commands_names = list()
-
-/hook/startup/proc/setup_api()
- for (var/path in typesof(/datum/topic_command) - /datum/topic_command)
- var/datum/topic_command/A = new path()
- if(A != null)
- topic_commands[A.name] = A
- topic_commands_names.Add(A.name)
- listclearnulls(topic_commands)
- listclearnulls(topic_commands_names)
-
- return 1
-
-//API Boilerplate
-/datum/topic_command
- var/name = null //Name for the command
- var/no_auth = 0 //If the user does NOT need to be authed to use the command
- var/no_throttle = 0 //If this command should NOT be limited by the throtteling
- var/description = null //Description for the command
- var/list/params = list() //Required Parameters for the command
- //Explanation of the parameter options:
- //Required - name -> Name of the parameter - should be the same as the index in the list
- //Required - desc -> Description of the parameter
- //Required - req -> Is this a required parameter: 1 -> Yes, 0 -> No
- //Required - type -> What type is this:
- // str->String,
- // int->Integer,
- // lst->List/array,
- // senderkey->unique identifier of the person sending the request
- // slct -> Select one of multiple specified options
- //Required* - options -> The possible options that can be selected (slct)
- var/statuscode = null
- var/response = null
- var/data = null
-/datum/topic_command/proc/run_command(queryparams)
- // Always returns 1 --> Details status in statuscode, response and data
- return 1
-/datum/topic_command/proc/check_params_missing(queryparams)
- //Check if some of the required params are missing
- // 0 -> if all params are supplied
- // >=1 -> if a param is missing
- var/list/missing_params = list()
- var/errorcount = 0
-
- for(var/key in params)
- var/list/param = params[key]
- if(queryparams[key] == null)
- if(param["req"] == 0)
- log_world("API: The following parameter is OPTIONAL and missing: [param["name"]] - [param["desc"]]")
- else
- log_world("API: The following parameter is REQUIRED but missing: [param["name"]] - [param["desc"]]")
- errorcount ++
- missing_params += param["name"]
- if(errorcount)
- log_world("API: Request aborted. Required parameters missing")
- statuscode = 400
- response = "Required params missing"
- data = missing_params
- return errorcount
- return 0
-
-/client
- var/received_discord_pm
- var/discord_admin
diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm
deleted file mode 100644
index 8728c569b7..0000000000
--- a/code/defines/procs/dbcore.dm
+++ /dev/null
@@ -1,208 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-//cursors
-#define Default_Cursor 0
-#define Client_Cursor 1
-#define Server_Cursor 2
-//conversions
-#define TEXT_CONV 1
-#define RSC_FILE_CONV 2
-#define NUMBER_CONV 3
-//column flag values:
-#define IS_NUMERIC 1
-#define IS_BINARY 2
-#define IS_NOT_NULL 4
-#define IS_PRIMARY_KEY 8
-#define IS_UNSIGNED 16
-//types
-#define TINYINT 1
-#define SMALLINT 2
-#define MEDIUMINT 3
-#define INTEGER 4
-#define BIGINT 5
-#define DECIMAL 6
-#define FLOAT 7
-#define DOUBLE 8
-#define DATE 9
-#define DATETIME 10
-#define TIMESTAMP 11
-#define TIME 12
-#define STRING 13
-#define BLOB 14
-// TODO: Investigate more recent type additions and see if I can handle them. - Nadrew
-
-
-// Deprecated! See global.dm for new configuration vars
-/*
-var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
-var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
-*/
-
-/DBConnection
- var/_db_con // This variable contains a reference to the actual database connection.
- var/dbi // This variable is a string containing the DBI MySQL requires.
- var/user // This variable contains the username data.
- var/password // This variable contains the password data.
- var/default_cursor // This contains the default database cursor data.
- //
- var/server = ""
- var/port = 3306
-
-/DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
- src.dbi = dbi_handler
- src.user = username
- src.password = password_handler
- src.default_cursor = cursor_handler
- _db_con = _dm_db_new_con()
-
-/DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
- if(!CONFIG_GET(flag/sql_enabled))
- return 0
- if(!src) return 0
- cursor_handler = src.default_cursor
- if(!cursor_handler) cursor_handler = Default_Cursor
- return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
-
-/DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
-
-/DBConnection/proc/IsConnected()
- if(!CONFIG_GET(flag/sql_enabled)) return 0
- var/success = _dm_db_is_connected(_db_con)
- return success
-
-/DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
-
-/DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
-/DBConnection/proc/SelectDB(database_name,dbi)
- if(IsConnected()) Disconnect()
- //return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
- return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[CONFIG_GET(string/address)]:[CONFIG_GET(number/port)]"]",user,password)
-/DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
-
-
-/datum/db_query/New(sql_query,DBConnection/connection_handler,cursor_handler)
- if(sql_query) src.sql = sql_query
- if(connection_handler) src.db_connection = connection_handler
- if(cursor_handler) src.default_cursor = cursor_handler
- _db_query = _dm_db_new_query()
- return ..()
-
-
-/datum/db_query
- var/sql // The sql query being executed.
- var/default_cursor
- var/list/columns //list of DB Columns populated by Columns()
- var/list/conversions
- var/list/item[0] //list of data values populated by NextRow()
-
- var/DBConnection/db_connection
- var/_db_query
-
-/datum/db_query/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
-
-/datum/db_query/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
- Close()
- return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
-
-/datum/db_query/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
-
-/datum/db_query/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
-
-/datum/db_query/proc/RowCount() return _dm_db_row_count(_db_query)
-
-/datum/db_query/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
-
-/datum/db_query/proc/Columns()
- if(!columns)
- columns = _dm_db_columns(_db_query,/DBColumn)
- return columns
-
-/datum/db_query/proc/GetRowData()
- var/list/columns = Columns()
- var/list/results
- if(columns.len)
- results = list()
- for(var/C in columns)
- results+=C
- var/DBColumn/cur_col = columns[C]
- results[C] = src.item[(cur_col.position+1)]
- return results
-
-/datum/db_query/proc/Close()
- item.len = 0
- columns = null
- conversions = null
- return _dm_db_close(_db_query)
-
-/datum/db_query/proc/Quote(str)
- return db_connection.Quote(str)
-
-/datum/db_query/proc/SetConversion(column,conversion)
- if(istext(column)) column = columns.Find(column)
- if(!conversions) conversions = new/list(column)
- else if(conversions.len < column) conversions.len = column
- conversions[column] = conversion
-
-
-/DBColumn
- var/name
- var/table
- var/position //1-based index into item data
- var/sql_type
- var/flags
- var/length
- var/max_length
-
-/DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
- src.name = name_handler
- src.table = table_handler
- src.position = position_handler
- src.sql_type = type_handler
- src.flags = flag_handler
- src.length = length_handler
- src.max_length = max_length_handler
- return ..()
-
-
-/DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
- switch(type_handler)
- if(TINYINT) return "TINYINT"
- if(SMALLINT) return "SMALLINT"
- if(MEDIUMINT) return "MEDIUMINT"
- if(INTEGER) return "INTEGER"
- if(BIGINT) return "BIGINT"
- if(FLOAT) return "FLOAT"
- if(DOUBLE) return "DOUBLE"
- if(DATE) return "DATE"
- if(DATETIME) return "DATETIME"
- if(TIMESTAMP) return "TIMESTAMP"
- if(TIME) return "TIME"
- if(STRING) return "STRING"
- if(BLOB) return "BLOB"
-
-
-#undef Default_Cursor
-#undef Client_Cursor
-#undef Server_Cursor
-#undef TEXT_CONV
-#undef RSC_FILE_CONV
-#undef NUMBER_CONV
-#undef IS_NUMERIC
-#undef IS_BINARY
-#undef IS_NOT_NULL
-#undef IS_PRIMARY_KEY
-#undef IS_UNSIGNED
-#undef TINYINT
-#undef SMALLINT
-#undef MEDIUMINT
-#undef INTEGER
-#undef BIGINT
-#undef DECIMAL
-#undef FLOAT
-#undef DOUBLE
-#undef DATE
-#undef DATETIME
-#undef TIMESTAMP
-#undef TIME
-#undef STRING
-#undef BLOB
diff --git a/code/game/jobs/access_datum_yw.dm b/code/game/jobs/access_datum_yw.dm
deleted file mode 100644
index dc3b2d024c..0000000000
--- a/code/game/jobs/access_datum_yw.dm
+++ /dev/null
@@ -1,32 +0,0 @@
-/var/const/access_secpilot = 51
-/datum/access/secpilot
- id = access_secpilot
- desc = JOB_SECURITY_PILOT + " Access"
- region = ACCESS_REGION_SECURITY
-
-/var/const/access_blueshield = 52
-/datum/access/blueshield
- id = access_blueshield
- desc = JOB_BLUESHIELD_GUARD
- region = ACCESS_REGION_COMMAND
-
-//special restricted access level, required for the secret locker and crates
-//downside is you can't add/remove it via ID consoles, but I figure that's an acceptable tradeoff?
-/var/const/access_blueshield_exclusive = 350
-/datum/access/blueshield_exclusive
- id = access_blueshield_exclusive
- desc = "Blueshield Special Reserve"
- access_type = ACCESS_TYPE_CENTCOM
-//that last line is what makes it inaccessible: you can add a region but that only makes it appear in the list, and if it has this access_type not even a CD's ID can add/remove it
-
-var/const/access_fieldmedic = 68
-/datum/access/fieldmedic
- id = access_fieldmedic
- desc = JOB_FIELD_MEDIC
- region = ACCESS_REGION_MEDBAY
-
-var/const/access_pathfinder = 69
-/datum/access/pathfinder
- id = access_pathfinder
- desc = JOB_PATHFINDER
- region = ACCESS_REGION_RESEARCH
diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm
deleted file mode 100644
index 7b124964a0..0000000000
--- a/code/game/machinery/computer3/computers/card.dm
+++ /dev/null
@@ -1,425 +0,0 @@
-var/list/engineering_positions = list(
- JOB_CHIEF_ENGINEER,
- JOB_ENGINEER,
- JOB_ATMOSPHERIC_TECHNICIAN
-)
-
-
-var/list/medical_positions = list(
- JOB_CHIEF_MEDICAL_OFFICER,
- JOB_MEDICAL_DOCTOR,
- JOB_GENETICIST,
- JOB_PSYCHIATRIST,
- JOB_CHEMIST,
- JOB_PARAMEDIC
-)
-
-
-var/list/science_positions = list(
- JOB_RESEARCH_DIRECTOR,
- JOB_SCIENTIST,
- JOB_GENETICIST, //Part of both medical and science
- JOB_ROBOTICIST,
- JOB_XENOBIOLOGIST
-)
-
-//BS12 EDIT
-var/list/cargo_positions = list(
- JOB_QUARTERMASTER,
- JOB_CARGO_TECHNICIAN,
- JOB_SHAFT_MINER
-)
-
-var/list/civilian_positions = list(
- JOB_HEAD_OF_PERSONNEL,
- JOB_BARTENDER,
- JOB_BOTANIST,
- JOB_CHEF,
- JOB_JANITOR,
- JOB_LIBRARIAN,
- JOB_ENTREPRENEUR,
- JOB_CHAPLAIN,
- JOB_ALT_VISITOR, //VOREStation Edit - Visitor not Assistant
- JOB_INTERN //VOREStation Edit - Intern
-)
-
-
-var/list/security_positions = list(
- JOB_HEAD_OF_SECURITY,
- JOB_WARDEN,
- JOB_DETECTIVE,
- JOB_SECURITY_OFFICER
-)
-
-
-var/list/planet_positions = list(
- JOB_PATHFINDER, // VOREStation Edit - Added Pathfinder
- JOB_EXPLORER,
- JOB_PILOT,
- JOB_FIELD_MEDIC // VOREStation Edit - Field Medic
-)
-
-
-var/list/nonhuman_positions = list(
- JOB_AI,
- JOB_CYBORG,
- JOB_PAI
-)
-
-var/list/whitelisted_positions = list(
- JOB_SITE_MANAGER,
- JOB_HEAD_OF_PERSONNEL,
- JOB_HEAD_OF_SECURITY,
- JOB_CHIEF_ENGINEER,
- JOB_RESEARCH_DIRECTOR,
- JOB_CHIEF_MEDICAL_OFFICER,
- JOB_INTERNAL_AFFAIRS_AGENT,
- JOB_AI
-)
-
-/obj/machinery/computer3/card
- default_prog = /datum/file/program/card_comp
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot/dual)
-/obj/machinery/computer3/card/hop
- default_prog = /datum/file/program/card_comp
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot/dual)
- spawn_files = list(/datum/file/program/arcade, /datum/file/program/security, /datum/file/camnet_key/mining, /datum/file/camnet_key/entertainment,/datum/file/camnet_key/prison)
-
-
-/obj/machinery/computer3/card/centcom
- default_prog = /datum/file/program/card_comp/centcom
-
-/datum/file/program/card_comp
- name = "identification card console"
- desc = "Used to modify magnetic strip ID cards."
- image = 'icons/ntos/cardcomp.png'
- active_state = "id"
-
- var/obj/item/card/id/reader = null
- var/obj/item/card/id/writer = null
-
- var/mode = 0
- var/auth = 0
- var/printing = 0
-
-/datum/file/program/card_comp/proc/list_jobs()
- return get_all_jobs() + "Custom"
-
-// creates the block with the script in it
-// cache the result since it's almost constant but not quite
-// the list of jobs won't change after all...
-/datum/file/program/card_comp/proc/scriptblock()
- var/global/dat = null
- var/counter = 0
- var jobs_all = ""
- jobs_all += "
| Command | "
-
- jobs_all += "
| Special | "//Site Manager in special because he is head of heads ~Intercross21
- jobs_all += ""+JOB_SITE_MANAGER+" | "
- jobs_all += "Custom | "
-
- counter = 0
- jobs_all += "
| " + span_red(span_bold("Security")) + " | "//Red
- for(var/job in security_positions)
- counter++
- if(counter >= 6)
- jobs_all += "
| | "
- counter = 0
- jobs_all += "[replacetext(job, " ", " ")] | "
-
- counter = 0
- jobs_all += "
| " + span_orange(span_bold("Engineering")) + " | "//Orange
- for(var/job in engineering_positions)
- counter++
- if(counter >= 6)
- jobs_all += "
| | "
- counter = 0
- jobs_all += "[replacetext(job, " ", " ")] | "
-
- counter = 0
- jobs_all += "
| " + span_green(span_bold("Medical")) + " | "//Green
- for(var/job in medical_positions)
- counter++
- if(counter >= 6)
- jobs_all += "
| | "
- counter = 0
- jobs_all += "[replacetext(job, " ", " ")] | "
-
- counter = 0
- jobs_all += "
| " + span_purple(span_bold("Science")) + " | "//Purple
- for(var/job in science_positions)
- counter++
- if(counter >= 6)
- jobs_all += "
| | "
- counter = 0
- jobs_all += "[replacetext(job, " ", " ")] | "
-
- counter = 0
- jobs_all += "
| " + span_grey(span_bold("Civilian")) + " | "//Grey
- for(var/job in civilian_positions)
- counter++
- if(counter >= 6)
- jobs_all += "
| | "
- counter = 0
- jobs_all += "[replacetext(job, " ", " ")] | "
-
- dat = {""}
- return dat
-
-// creates the list of access rights on the card
-/datum/file/program/card_comp/proc/accessblock()
- var/accesses = "Access
"
- accesses += ""
- accesses += ""
- for(var/i = 1; i <= 7; i++)
- accesses += "| [get_region_accesses_name(i)]: | "
- accesses += "
"
- for(var/i = 1; i <= 7; i++)
- accesses += ""
- for(var/A in get_region_accesses(i))
- if(A in writer.GetAccess())
- accesses += topic_link(src,"access=[A]",span_red("[replacetext(get_access_desc(A), " ", " ")]")) + " "
- else
- accesses += topic_link(src,"access=[A]",replacetext(get_access_desc(A), " ", " ")) + " "
- accesses += " "
- accesses += " | "
- accesses += "
"
- return accesses
-
-/datum/file/program/card_comp/proc/card_modify_menu()
- //assume peripherals and cards, do checks for them in interact
-
- // Header
- var/dat = "
"
- dat += topic_link(src,"remove=writer","Remove [writer.name]") + " || "
- dat += topic_link(src,"remove=reader","Remove [reader.name]") + "
"
- dat += topic_link(src,"mode=1","Access Crew Manifest") + " || "
- dat += topic_link(src,"logout","Log Out") + "
"
- dat += "
" + scriptblock()
-
- // form for renaming the ID
- dat += ""
-
- // form for changing assignment, taken care of by scriptblock() mostly
- var/assign_temp = writer.assignment
- if(!assign_temp || assign_temp == "") assign_temp = "Unassigned"
- dat += span_bold("Assignment:") + " [assign_temp] change"
-
- // list of access rights
- dat += accessblock()
- return dat
-
-/datum/file/program/card_comp/proc/login_menu()
- //assume peripherals and cards, do checks for them in interact
- var/dat = "
Please insert the cards into the slots
"
-
- if(istype(writer))
- dat += "Target: [topic_link(src,"remove=writer",writer.name)]
"
- else
- dat += "Target: [topic_link(src,"insert=writer","--------")]
"
-
- if(istype(reader))
- dat += "Confirm Identity: [topic_link(src,"remove=reader",reader.name)]
"
- else
- dat += "Confirm Identity: [topic_link(src,"insert=reader","--------")]
"
- dat += "[topic_link(src,"auth","{Log in}")]
"
- dat += topic_link(src,"mode=1","Access Crew Manifest")
- return dat
-
-/datum/file/program/card_comp/proc/show_manifest()
- // assume linked_db since called by interact()
- var/crew = ""
- var/list/L = list()
- for (var/datum/data/record/t in GLOB.data_core.general)
- var/R = t.fields["name"] + " - " + t.fields["rank"]
- L += R
- for(var/R in sortList(L))
- crew += "[R]
"
- return "" + span_bold("Crew Manifest:") + "
Please use security record computer to modify entries.
[crew][topic_link(src,"print","Print")]
[topic_link(src,"mode=0","Access ID modification console.")]
"
-
-// These are here partly in order to be overwritten by the centcom card computer code
-/datum/file/program/card_comp/proc/authenticate()
- if(ACCESS_CHANGE_IDS in reader.GetAccess())
- return 1
- if(isAI(usr))
- return 1
- return 0
-
-/datum/file/program/card_comp/proc/set_default_access(var/jobname)
- var/datum/job/jobdatum
- for(var/jobtype in typesof(/datum/job))
- var/datum/job/J = new jobtype
- if(ckey(J.title) == ckey(jobname))
- jobdatum = J
- break
- if(jobdatum)
- writer.access = jobdatum.get_access() // ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1)
-
-
-/datum/file/program/card_comp/interact()
- if(!interactable())
- return
-
- if(!istype(computer.cardslot, /obj/item/part/computer/cardslot/dual))
- computer.Crash(MISSING_PERIPHERAL)
- return
-
- var/obj/item/part/computer/cardslot/dual/D = computer.cardslot
- reader = D.reader
- writer = D.writer
-
- var/dat
-
- switch(mode)
- if(0)
- if( !istype(writer) || !istype(reader) )
- auth = 0
- if( !auth )
- dat = login_menu()
- else
- dat = card_modify_menu()
- if(1)
- dat = show_manifest()
-
-
- popup.width = 940
- popup.height = 520
- popup.set_content(dat)
- popup.open()
- return
-
-
-/datum/file/program/card_comp/Topic(href, list/href_list)
- if(!interactable() || !computer.cardslot || ..(href,href_list))
- return
- // todo distance/disability checks
-
- if("mode" in href_list)
- mode = text2num(href_list["mode"])
- if(mode != 0 && mode != 1)
- mode = 0
-
- auth = 0 // always log out if switching modes just in case
-
- if("remove" in href_list)
- var/which = href_list["remove"]
- if(which == "writer")
- computer.cardslot.remove(usr, 2)
- else
- computer.cardslot.remove(usr, 1)
- auth = 0
-
- if("insert" in href_list)
- var/obj/item/card/card = usr.get_active_hand()
- if(!istype(card)) return
-
- var/which = href_list["insert"]
- if(which == "writer")
- computer.cardslot.insert(card, usr, 2)
- else
- computer.cardslot.insert(card,usr)
-
- if("print" in href_list)
- if (printing)
- return
-
- printing = 1
- sleep(50)
- var/obj/item/paper/P = new /obj/item/paper( computer.loc )
- P.info = span_bold("Crew Manifest:") + "
"
- var/list/L = list()
- for (var/datum/data/record/t in GLOB.data_core.general)
- var/R = t.fields["name"] + " - " + t.fields["rank"]
- L += R
- for(var/R in sortList(L))
- P.info += "[R]
"
- P.name = "paper- 'Crew Manifest'"
- printing = 0
-
- if("auth" in href_list)
- auth = 0
- if(istype(reader) && istype(writer) && authenticate())
- auth = 1
-
- if("logout" in href_list)
- auth = 0
-
- // Actual ID changing
-
- if("access" in href_list)
- if(auth)
- var/access_type = text2num(href_list["access"])
- writer.access ^= list(access_type) //logical xor: remove if present, add if not
-
- if("assign" in href_list)
- if(auth)
- var/t1 = href_list["assign"]
- if(t1 == "Custom")
- var/temp_t = tgui_input_text(usr, "Enter a custom job assignment.","Assignment", "", MAX_MESSAGE_LEN)
- if(temp_t)
- t1 = temp_t
- set_default_access(t1)
-
- writer.assignment = t1
- writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])")
- data_core.manifest_modify(writer.registered_name, writer.assignment, writer.rank)
- SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, writer)
-
- if("reg" in href_list)
- if(auth)
- writer.registered_name = href_list["reg"]
- writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])")
- data_core.manifest_modify(writer.registered_name, writer.assignment, writer.rank)
- SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, writer)
-
- return
-
-/datum/file/program/card_comp/centcom
- name = "CentCom identification console"
- drm = 1
-
-/datum/file/program/card_comp/centcom/list_jobs()
- return get_all_centcom_jobs() + "Custom"
-
-/datum/file/program/card_comp/centcom/accessblock()
- var/accesses = "[using_map.boss_name]:
"
- for(var/A in get_all_centcom_access())
- if(A in writer.GetAccess())
- accesses += topic_link(src,"access=[A]",span_red("[replacetext(get_centcom_access_desc(A), " ", " ")]")) + " "
- else
- accesses += topic_link(src,"access=[A]",replacetext(get_centcom_access_desc(A), " ", " ")) + " "
- return accesses
-
-/datum/file/program/card_comp/centcom/authenticate()
- if(ACCESS_CENT_CAPTAIN in reader.GetAccess())
- return 1
- return 0
diff --git a/code/game/machinery/suit_dispenser.dm b/code/game/machinery/suit_dispenser.dm
deleted file mode 100644
index 4cd7d549ac..0000000000
--- a/code/game/machinery/suit_dispenser.dm
+++ /dev/null
@@ -1,470 +0,0 @@
-//////////////////////////////////////
-// GEAR DISPENSER UNIT ///////////////
-//////////////////////////////////////
-
-#define GD_BUSY 1 // the dispenser is busy.
-#define GD_ONEITEM 2 // only one type of suit comes out of this dispenser.
-#define GD_NOGREED 4 // no-one is allowed more than one item from this TYPE of dispenser unless emagged
-#define GD_UNLIMITED 8 // will not deplete amount when gear is taken
-
-var/list/dispenser_presets = list()
-
-// Standard generic item list
-/datum/gear_disp
- var/name = "gear"
- var/list/to_spawn
- var/amount = 0
- var/list/req_one_access
-
-/datum/gear_disp/proc/allowed(var/mob/living/carbon/human/user)
- if(LAZYLEN(req_one_access))
- var/accesses = user.GetAccess()
- return has_access(null, req_one_access, accesses)
-
- return 1
-
-/datum/gear_disp/proc/spawn_gear(var/turf/T, var/mob/living/carbon/human/user)
- var/list/spawned = list()
- for(var/O in to_spawn)
- spawned += new O(T)
- return spawned
-
-// For fluff/custom items
-/datum/gear_disp/custom
- name = "custom"
- // Can do either/or of these
- var/ckey_allowed
- var/character_allowed
-
-/datum/gear_disp/custom/allowed(var/mob/living/carbon/human/user)
- if(ckey_allowed && user.ckey != ckey_allowed)
- return 0
-
- if(character_allowed && user.real_name != character_allowed)
- return 0
-
- return ..()
-
-/datum/gear_disp/trash
- name = "???"
- to_spawn = list(/obj/random/trash)
- amount = 50
-
-// Voidsuits can have bits jammed onto them
-/datum/gear_disp/voidsuit
- //var/list/to_spawn // Put other stuff that ISN'T one of the below
- var/voidsuit_type
- var/voidhelmet_type
- var/magboots_type
- var/life_support = TRUE // try to spawn a tank or suit cooler
- var/refit = TRUE // should we adapt this to the user's species
-
-/datum/gear_disp/voidsuit/spawn_gear(var/turf/T, var/mob/living/carbon/human/user)
- ASSERT(voidsuit_type)
- . = ..()
- if(voidsuit_type && !ispath(voidsuit_type, /obj/item/clothing/suit/space/void))
- error("[src] can't spawn type [voidsuit_type] as a voidsuit")
- return
- if(voidhelmet_type && !ispath(voidhelmet_type, /obj/item/clothing/head/helmet/space/void))
- error("[src] can't spawn type [voidsuit_type] as a voidhelmet")
- return
- if(magboots_type && !ispath(magboots_type, /obj/item/clothing/shoes/magboots))
- error("[src] can't spawn type [magboots_type] as magboots")
- return
-
- var/obj/item/clothing/suit/space/void/voidsuit
- var/obj/item/clothing/head/helmet/space/void/voidhelmet
- var/obj/item/clothing/shoes/magboots/magboots
-
- var/spawned = list()
-
- voidsuit = new voidsuit_type(T)
- spawned += voidsuit
- // If we're supposed to make a helmet
- if(voidhelmet_type)
- // The coder may not have realized this type spawns its own helmet
- if(voidsuit.helmet)
- error("[src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
- else
- voidhelmet = new voidhelmet_type(voidsuit)
- voidsuit.helmet = voidhelmet
- spawned += voidhelmet
- // If we're supposed to make boots
- if(magboots_type)
- // The coder may not have realized thist ype spawns its own boots
- if(voidsuit.boots)
- error("[src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
- else
- magboots = new magboots_type(voidsuit)
- voidsuit.boots = magboots
- spawned += magboots
-
- if(refit)
- voidsuit.refit_for_species(user.species?.get_bodytype()) // does helmet and boots if they're attached
-
- if(life_support)
- if(user.isSynthetic())
- if(voidsuit.cooler)
- error("[src] created a voidsuit [voidsuit] and wants to add a suit cooler but it already has one")
- else
- var/obj/item/life_support = new /obj/item/suit_cooling_unit(voidsuit)
- voidsuit.cooler = life_support
- spawned += life_support
- else if(user.species?.breath_type)
- if(voidsuit.tank)
- error("[src] created a voidsuit [voidsuit] and wants to add a tank but it already has one")
- else
- //Create a tank (if such a thing exists for this species)
- var/tanktext = "/obj/item/tank/" + "[user.species?.breath_type]"
- var/obj/item/tank/tankpath = text2path(tanktext)
-
- if(tankpath)
- var/obj/item/life_support = new tankpath(voidsuit)
- voidsuit.tank = life_support
- spawned += life_support
- else
- voidsuit.audible_message("Dispenser warning: Unable to locate suitable airtank for user.")
-
- . += spawned
-
-// For fluff/custom voidsuits
-/datum/gear_disp/voidsuit/custom
- name = "custom voidsuit"
- // Can do either/or of these
- var/ckey_allowed
- var/character_allowed
-
-/datum/gear_disp/voidsuit/custom/allowed(var/mob/living/carbon/human/user)
- if(ckey_allowed && user.ckey != ckey_allowed)
- return 0
-
- if(character_allowed && user.real_name != character_allowed)
- return 0
-
- return ..()
-
-// The dispenser itself
-/obj/machinery/gear_dispenser
- name = "gear dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch all kinds of equipment."
- icon = 'icons/obj/suitdispenser.dmi'
- icon_state = "geardispenser"
- anchored = 1
- density = 1
- var/list/dispenses = list(/datum/gear_disp/trash) // put your gear datums here!
- var/datum/gear_disp/one_setting
- var/global/list/gear_distributed_to = list()
- var/dispenser_flags = GD_NOGREED|GD_UNLIMITED
- //req_one_access = list(whatever) // Note that each gear datum can have access, too.
-
-/obj/machinery/gear_dispenser/custom/emag_act(remaining_charges, mob/user, emag_source)
- to_chat(user, span_warning("Your moral standards prevent you from emagging this machine!"))
- return -1 // Letting people emag this one would be bad times
-
-/obj/machinery/gear_dispenser/Initialize(mapload)
- . = ..()
- if(!gear_distributed_to["[type]"] && (dispenser_flags & GD_NOGREED))
- gear_distributed_to["[type]"] = list()
- var/list/real_gear_list = list()
- for(var/gear in dispenses)
- var/datum/gear_disp/S = new gear
- real_gear_list[S.name] = S
- if(one_setting)
- one_setting = new one_setting
- dispenses = real_gear_list
-
-
-/obj/machinery/gear_dispenser/attack_hand(var/mob/living/carbon/human/user)
- if(!can_use(user))
- return
- dispenser_flags |= GD_BUSY
- if(!(dispenser_flags & GD_ONEITEM))
- var/list/gear_list = get_gear_list(user)
-
- if(!LAZYLEN(gear_list))
- to_chat(user, span_warning("\The [src] doesn't have anything to dispense for you!"))
- dispenser_flags &= ~GD_BUSY
- return
-
- var/choice = tgui_input_list(user, "Select equipment to dispense.", "Equipment Dispenser", gear_list)
-
- if(!choice)
- dispenser_flags &= ~GD_BUSY
- return
-
- dispense(gear_list[choice],user)
- else
- dispense(one_setting,user)
-
-
-/obj/machinery/gear_dispenser/proc/can_use(var/mob/living/carbon/human/user)
- var/list/used_by = gear_distributed_to["[type]"]
- if(!istype(user))
- to_chat(user,span_warning("You can't use this!"))
- return 0
- if((dispenser_flags & GD_BUSY))
- to_chat(user,span_warning("Someone else is using this!"))
- return 0
- if((dispenser_flags & GD_ONEITEM) && !(dispenser_flags & GD_UNLIMITED) && !one_setting.amount)
- to_chat(user,span_warning("There's nothing in here!"))
- return 0
- if ((dispenser_flags & GD_NOGREED) && (user in used_by) && !emagged)
- to_chat(user,span_warning("You've already picked up your gear!"))
- playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
- return 0
- if(emagged)
- audible_message("!'^&YouVE alreaDY pIC&$!Ked UP yOU%r Ge^!ar.")
- playsound(src, 'sound/machines/buzz-sigh.ogg', 100, 0)
- return 1
-
- // And finally
- if(allowed(user))
- return 1
- else
- to_chat(user,span_warning("Your access is rejected!"))
- playsound(src, 'sound/machines/buzz-sigh.ogg', 100, 0)
- return 0
-
-
-/obj/machinery/gear_dispenser/proc/get_gear_list(var/mob/living/carbon/human/user)
- if(emagged)
- return dispenses
-
- var/list/choices = list()
- for(var/choice in dispenses)
- var/datum/gear_disp/G = dispenses[choice]
- if(G.allowed(user))
- choices[choice] = G
- return choices
-
-/obj/machinery/gear_dispenser/proc/dispense(var/datum/gear_disp/S,var/mob/living/carbon/human/user,var/greet=TRUE)
- if(!S.amount && !(dispenser_flags & GD_UNLIMITED))
- to_chat(user,span_warning("There are no more [S.name]s left!"))
- dispenser_flags &= ~GD_BUSY
- return 1
- else if(!(dispenser_flags & GD_UNLIMITED))
- S.amount--
- if((dispenser_flags & GD_NOGREED) && !emagged)
- gear_distributed_to["[type]"] |= user
- flick("[icon_state]-scan",src)
- visible_message("\The [src] scans its user.", runemessage = "hums")
- sleep(30)
- flick("[icon_state]-dispense",src)
- dispenser_flags |= GD_BUSY
- sleep(15)
- dispenser_flags &= ~GD_BUSY
-
- var/turf/T = get_turf(src)
- if(!(S && T)) // in case we got destroyed while we slept
- return 1
-
- S.spawn_gear(T, user)
-
- if(emagged)
- emagged = FALSE
- if(greet && user && !user.stat) // in case we got destroyed while we slept
- to_chat(user,span_notice("[S.name] dispensing processed. Have a good day."))
-
-/obj/machinery/gear_dispenser/proc/fit_for(var/obj/item/clothing/C, var/mob/living/carbon/human/H)
- if(!istype(C))
- error("Suit dispenser thought [C] was a clothing item")
- return
- C.refit_for_species(H.species?.get_bodytype())
- if(istype(C, /obj/item/clothing/suit/space/void))
- var/obj/item/clothing/suit/space/void/V = C
- V.helmet?.refit_for_species(H.species?.get_bodytype())
-
-/obj/machinery/gear_dispenser/emag_act(remaining_charges, mob/user, emag_source)
- . = ..()
- if(!emagged)
- emagged = TRUE
- visible_message(span_warning("\The [user] slides a weird looking ID into \the [src]!"),span_warning("You temporarily short the safety mechanisms."))
- return 1
-
-
-// Just a different sprite
-/obj/machinery/gear_dispenser/suit
- name = "suit dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch all kinds of space suits."
- icon_state = "suitdispenser2"
-
-/obj/machinery/gear_dispenser/suit_old
- name = "duit dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch all kinds of space suits. An older model."
- icon_state = "suitdispenser"
-
-// For fluff/custom items
-/obj/machinery/gear_dispenser/custom
- name = "personal gear dispenser"
-
-/obj/machinery/gear_dispenser/custom/Initialize(mapload)
- dispenses = subtypesof(/datum/gear_disp/custom)
- . = ..()
-
-
-////////////////////////////// ERT SUIT DISPENSERS ///////////////////////////
-// Non-sealed armor
-/datum/gear_disp/ert/security_armor
- name = "Security (Armor)"
- to_spawn = list(/obj/item/clothing/suit/armor/vest/ert/security,/obj/item/clothing/head/helmet/ert/security)
-
-/datum/gear_disp/ert/medical_armor
- name = "Medical (Armor)"
- to_spawn = list(/obj/item/clothing/suit/armor/vest/ert/medical,/obj/item/clothing/head/helmet/ert/medical)
-
-/datum/gear_disp/ert/engineer_armor
- name = "Engineering (Armor)"
- to_spawn = list(/obj/item/clothing/suit/armor/vest/ert/engineer,/obj/item/clothing/head/helmet/ert/engineer)
-/*
-/datum/gear_disp/ert/commander_armor
- name = "Commander (Armor)"
- to_spawn = list(/obj/item/clothing/suit/armor/vest/ert/command,/obj/item/clothing/head/helmet/ert/command)
- amount = 1
-*/
-// Voidsuit versions
-/datum/gear_disp/voidsuit/ert/security_void
- name = "Security (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/responseteam/security
- refit = TRUE
- magboots_type = /obj/item/clothing/shoes/magboots/adv
-
-/datum/gear_disp/voidsuit/ert/medical_void
- name = "Medical (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/responseteam/medical
- refit = TRUE
- magboots_type = /obj/item/clothing/shoes/magboots/adv
-
-/datum/gear_disp/voidsuit/ert/engineer_void
- name = "Engineering (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/responseteam/engineer
- refit = TRUE
- magboots_type = /obj/item/clothing/shoes/magboots/adv
-/*
-/datum/gear_disp/ert/commander_void
- name = "Commander (Voidsuit)"
- to_spawn = list(/obj/item/clothing/suit/space/void/responseteam/command)
- refit = TRUE
- amount = 1
-*/
-// Hardsuit versions
-/datum/gear_disp/ert/security_rig
- name = "Security (Hardsuit)"
- to_spawn = list(/obj/item/rig/ert/security)
-
-/datum/gear_disp/ert/medical_rig
- name = "Medical (Hardsuit)"
- to_spawn = list(/obj/item/rig/ert/medical)
-
-/datum/gear_disp/ert/engineer_rig
- name = "Engineering (Hardsuit)"
- to_spawn = list(/obj/item/rig/ert/engineer)
-/*
-/datum/gear_disp/ert/commander_rig
- name = "Commander (Hardsuit)"
- to_spawn = list(/obj/item/rig/ert)
- amount = 1
-*/
-
-
-/obj/machinery/gear_dispenser/suit/ert
- name = "ERT Suit Dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch all kinds of space suits. This one distribributes Emergency Responder space suits."
- icon_state = "suitdispenserERT"
- dispenses = list(
- /datum/gear_disp/ert/security_armor,
- /datum/gear_disp/ert/medical_armor,
- /datum/gear_disp/ert/engineer_armor,
- /datum/gear_disp/voidsuit/ert/security_void,
- /datum/gear_disp/voidsuit/ert/medical_void,
- /datum/gear_disp/voidsuit/ert/engineer_void,
- /datum/gear_disp/ert/security_rig,
- /datum/gear_disp/ert/medical_rig,
- /datum/gear_disp/ert/engineer_rig,
- )
- req_one_access = list(access_cent_specops)
-
-
-////////////////////////////// STATION SUIT DISPENSERS ///////////////////////////
-/datum/gear_disp/station/standard
- name = "Standard (Softsuit)"
- to_spawn = list(/obj/item/clothing/head/helmet/space, /obj/item/clothing/suit/space)
-
-/datum/gear_disp/voidsuit/station/security
- name = "Security (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/security
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/security
- refit = TRUE
- req_one_access = list(access_brig)
-
-/datum/gear_disp/voidsuit/station/engineering
- name = "Engineering (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/engineering
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/engineering
- refit = TRUE
- magboots_type = /obj/item/clothing/shoes/magboots
- req_one_access = list(access_engine)
-
-/datum/gear_disp/voidsuit/station/medical
- name = "Medical (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/medical
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/medical
- refit = TRUE
- req_one_access = list(access_medical)
-
-/datum/gear_disp/voidsuit/station/atmos
- name = "Atmos Technician (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/atmos
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/atmos
- refit = TRUE
- req_one_access = list(access_atmospherics)
-
-/datum/gear_disp/voidsuit/station/paramedic
- name = "Paramedic (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/medical/emt
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/medical/emt
- refit = TRUE
- req_one_access = list(access_medical) // we don't have separate paramedic access
-
-/datum/gear_disp/voidsuit/station/mining
- name = "Mining (Voidsuit)"
- voidsuit_type = /obj/item/clothing/suit/space/void/mining
- voidhelmet_type = /obj/item/clothing/head/helmet/space/void/mining
- refit = TRUE
- req_one_access = list(access_mining)
-
-/obj/machinery/gear_dispenser/suit/station
- name = "Station Suit Dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch all kinds of space suits. This one is specialised towards station workers."
- dispenses = list(
- /datum/gear_disp/station/standard,
- /datum/gear_disp/voidsuit/station/security,
- /datum/gear_disp/voidsuit/station/engineering,
- /datum/gear_disp/voidsuit/station/medical,
- /datum/gear_disp/voidsuit/station/atmos,
- /datum/gear_disp/voidsuit/station/paramedic
- )
-
-////////////////////////////// SOFT SUIT DISPENSERS ///////////////////////////
-/obj/machinery/gear_dispenser/suit/standard
- name = "Soft Suit Dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch a specific mass produced suit."
- dispenser_flags = GD_ONEITEM|GD_NOGREED|GD_UNLIMITED
- one_setting = /datum/gear_disp/station/standard
-
-////////////////////////////// AUTOLOK SUIT DISPENSERS ///////////////////////////
-/datum/gear_disp/voidsuit/autolok
- name = "AutoLok Voidsuit"
- voidsuit_type = /obj/item/clothing/suit/space/void/autolok
- refit = FALSE // it autofits
-
-/obj/machinery/gear_dispenser/suit/autolok
- name = "AutoLok Suit Dispenser"
- desc = "An industrial U-Tak-It Dispenser unit designed to fetch a specific AutoLok mass produced suit."
- icon_state = "suitdispenserAL"
- dispenser_flags = GD_ONEITEM|GD_NOGREED|GD_UNLIMITED
- one_setting = /datum/gear_disp/voidsuit/autolok
-
-#undef GD_BUSY
-#undef GD_ONEITEM
-#undef GD_NOGREED
-#undef GD_UNLIMITED
diff --git a/code/modules/Phorochemistry/Phorochemputer.dm b/code/modules/Phorochemistry/Phorochemputer.dm
deleted file mode 100644
index 185f36987b..0000000000
--- a/code/modules/Phorochemistry/Phorochemputer.dm
+++ /dev/null
@@ -1,330 +0,0 @@
-var/global/datum/phororeactions/phororeactions
-var/global/list/discovered_phororeagents //list of all phororeagents discovered so far
-
-/obj/machinery/computer/phoronics
- icon = 'icons/obj/computer3.dmi'
- icon_state = "frame-rnd"
- icon_keyboard = "kb9"
- icon_screen = "powerold"
- circuit = /obj/item/circuitboard/phoronics
-// var/turf/simulated/floor/phoronics/source
- var/turf/simulated/floor/source
- var/intensity = 1
- var/timeLeft = 0
- var/timeLeftMax = 0
- var/aborting = 0
- var/message = "" //57 character max message size, assuming all characters take same size, probably don't
- var/obj/machinery/telepad_phoronics/source_pad
- var/obj/machinery/telepad_phoronics/dest_pad
- var/turf/source_loc
- var/turf/dest_loc
- var/field
-
-/obj/machinery/computer/phoronics/Initialize(mapload)
- . = ..()
- intensity = 1
- timeLeft = 0
- timeLeftMax = 0
- aborting = 0
-
- message = "Welcome to Phoronics"
- if(!phororeactions)
- phororeactions = new/datum/phororeactions
- phororeactions.set_up_reactions()
-
- if(!discovered_phororeagents)
- discovered_phororeagents = list(REAGENT_ID_BICORDRAZINE)
-
-/obj/machinery/computer/phoronics/attack_hand(var/mob/user as mob)
- return src.ui_interact(user)
-
-
-/obj/machinery/computer/phoronics/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
-
- var/data[0]
- data["intensity"] = intensity
- data["timeLeft"] = timeLeft
- data["timeLeftMax"] = timeLeftMax
- data["message"] = message
- if(source)
- var/datum/gas_mixture/enviro = source.return_air()
- if(enviro.gas[GAS_PHORON])
- data["phoron"] = round(enviro.gas[GAS_PHORON])
- else
- data["phoron"] = 0
- else
- data["phoron"] = 0
-
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
- ui = new(user, src, ui_key, "phorochem.tmpl", "Phorochemputer", 480, 400)
- ui.set_initial_data(data)
- ui.open()
- ui.set_auto_update(1) // auto update every Master Controller tick
-
-
- return
-
-/obj/machinery/computer/phoronics/Topic(href, href_list)
- if(href_list["beginTest"])
- if(timeLeft == 0)
- begin_test()
-
- if(href_list["abortTest"])
- if(timeLeft > 0)
- aborting = 1
-
- if(href_list["recalibrate"])
- if(timeLeft == 0)
- recalibrate()
-
- if(href_list["intensity"])
- intensity = min(max(text2num(href_list["intensity"]), 1), 5)
-
-/obj/machinery/computer/phoronics/proc/recalibrate()
- if(timeLeft > 0)
- message = "ERROR: Cannot recalibrate while test is in progress"
- else
- source = null
- for(var/turf/simulated/floor/phoronics/tile in range(src, 7)) //check for turf before every tile for flooring first
- if(istype(tile.flooring, /decl/flooring/phoronics))
- if(!source)
- source = tile
- else
- var/distCur = sqrt(((source.x - src.x) ** 2) + ((source.y - src.y) ** 2))
- var/distNew = sqrt(((tile.x - src.x) ** 2) + ((tile.y - src.y) ** 2))
- if(distNew < distCur)
- source = tile
-
- //only gets here if they decide to move the phoronics tile location, or build their own phoronics for some reason
- if(!source)
- for(var/turf/simulated/floor/tile in range(src, 7))
- if(istype(tile.flooring, /decl/flooring/phoronics))
- if(!source)
- source = tile
- else
- var/distCur = sqrt(((source.x - src.x) ** 2) + ((source.y - src.y) ** 2))
- var/distNew = sqrt(((tile.x - src.x) ** 2) + ((tile.y - src.y) ** 2))
- if(distNew < distCur)
- source = tile
- if(source)
- message = "Electromagnetic tile located at: [source.x], [source.y]"
- SSnanoui.update_uis(src)
- source_pad = null
- dest_pad = null
- spawn(10)
- var/list/telepads = list()
- for(var/obj/machinery/telepad_phoronics/T in range(src, 7))
- telepads.Add(T)
-
- switch(telepads.len)
- if(0)
- message = "No telepads found"
- return
- if(1)
- message = "ERROR: Insufficient amount of telepads found, refusing link"
- return
- if(3 to INFINITY)
- message = "ERROR: Too many telepads found, refusing link"
- return
-
- var/obj/machinery/telepad_phoronics/temp_pad = telepads[1]
- var/turf/T = locate(temp_pad.x, temp_pad.y, temp_pad.z)
- if(istype(T, /turf/simulated/floor) && istype(T:flooring, /decl/flooring/phoronics))
- dest_pad = telepads[1]
- source_pad = telepads[2]
-
- if(!dest_pad.anchored || !source_pad.anchored)
- message = "ERROR: One or both telepads not anchored to ground"
- dest_pad = null
- source_pad = null
- return
- else
- temp_pad = telepads[2]
- T = locate(temp_pad.x, temp_pad.y, temp_pad.z)
- if(istype(T, /turf/simulated/floor) && istype(T:flooring, /decl/flooring/phoronics))
- dest_pad = telepads[2]
- source_pad = telepads[1]
-
- if(!dest_pad.anchored || !source_pad.anchored)
- message = "ERROR: One or both telepads not anchored to ground"
- dest_pad = null
- source_pad = null
- return
- else
- message = "ERROR: No telepad located on electromagnetic tile"
- return
-
- dest_pad.dest = source_pad
- source_pad.dest = dest_pad
-
- source_loc = source_pad.loc
- dest_loc = dest_pad.loc
- message = "Telepads successfully linked"
- else
- message = "ERROR: No electromagnetic tiles located"
-
-/obj/machinery/computer/phoronics/proc/begin_test()
- if(source && istype(source.flooring, /decl/flooring/phoronics)) //make sure turf is still phoronics tile
- message = "Test in progress"
- else
- return abort("ERROR: Recalibrate to locate electromagnetic tile and or telepads")
-
- var/datum/reagent/reactant
- var/obj/item/reagent_containers/container
-
- //check for beaker, and that beaker contains only one reagent
- var/num_containers = 0
- if(source_pad)
- if(source_pad.loc != source_loc)
- return abort("ERROR: Input telepad not where expected, please recalibrate")
- if(!source_pad.anchored)
- return abort("ERROR: Input telepad not anchored")
- for(var/obj/item/reagent_containers/R in source_pad.loc.contents)
- num_containers++
- container = R
-
- if(container)
- if(!container.is_open_container()) //container not open, insult user
- var/insult = pick("idiot", "failure", "waste of space", "high school dropout", "chucklefuck", \
- "asshat", "dumbass", "fucklechuck", "scrub", "moron", "typical NT worker")
- return abort("ERROR: Open reagent container, you [insult]")
-
- if(istype(container, /obj/item/reagent_containers/glass/beaker/noreact)) //container doesn't react, insult user
- var/insult = pick("idiot", "failure", "ass", "scrub", "chucklefuck", \
- "asshat", "dumbass", "fucklechuck", "scrub", "moron")
- return abort("ERROR: Reactions don't happen in a cryostasis beaker, you [insult]")
-
- if(container.reagents.reagent_list.len > 1)
- return abort("ERROR: Too many reagents detected, aborting test")
-
- if(container.reagents.reagent_list.len == 0)
- return abort("ERROR: No reagents detected, aborting test")
-
- var/datum/gas_mixture/enviro = source.return_air()
- if(!enviro.gas[GAS_PHORON] || enviro.gas[GAS_PHORON] < 40)
- return abort("ERROR: Not enough phoron to initiate reaction")
-
- reactant = container.reagents.reagent_list[1]
-
- if(source_pad && dest_pad)
- if(dest_pad.loc != dest_loc)
- return abort("ERROR: Output telepad not where expected, please recalibrate")
-
- if(num_containers > 1)
- return abort("ERROR: Too many containers detected on telepads")
- else
- sleep(10)
- source_pad.teleport()
- sleep(10) //give some time to see result of teleport
- else
- message = "WARNING: Telepads not detected. Beginning electrical field"
-
- switch(intensity) //time left in seconds
- if(1)
- timeLeft = 1
- if(2)
- timeLeft = 3
- if(3)
- timeLeft = 6
- if(4)
- timeLeft = 10
- if(5)
- timeLeft = 15
-
- timeLeft *= 2 //half seconds to make escape impossible from electrical fields
- timeLeftMax = timeLeft
-
- SSnanoui.update_uis(src) //update progress bar with new timeLeftMax
-
- var/obj/effect/electrical_field/small/field
- var/obj/effect/electrical_field/big/field2
-
- var/intensity2 = intensity //to ensure no shenanigans with changing intensities mid test
- if(!aborting)
- if(intensity != 4)
- field = new/obj/effect/electrical_field/small(source)
-
- if(intensity > 3)
- field2 = new/obj/effect/electrical_field/big(source)
-
- while(timeLeft > 0)
- if(aborting)
- aborting = 0
- timeLeft = 0
- if(stat & NOPOWER)
- message = "ERROR: Test aborted due to power loss"
- else
- message = "Test aborted"
- qdel(field)
- qdel(field2)
- if(dest_pad)
- sleep(10)
- dest_pad.anchored = 1
- dest_pad.teleport()
- return
- if(field)
- field.process_field()
- if(field2)
- field2.process_field()
- timeLeft--
- sleep(5)
-
- if(field2) //add a little extra damage to ensure eventual death on intensity 5 electrical field center
- field2.process_field()
-
- qdel(field)
- qdel(field2)
-
- //reaction time!
- var/reaction_happened = 0
- var/datum/reagent/phororeagent/phororeagent = null
- var/vol = 0
- if(reactant)
- vol = reactant.volume //must store because it gets cleared
- var/datum/phororeaction/process = phororeactions.reactions[reactant.id]
- if(process)
- var/result = process.get_result(intensity2)
- if(result == "Reaction successful")
- container.reagents.clear_reagents()
- container.reagents.add_reagent(process.result_id, min(vol * process.conversion_rate, container.volume))
- reaction_happened = 1
- phororeagent = container.reagents.reagent_list[1]
-
- var/datum/gas_mixture/enviro = source.return_air()
- enviro.adjust_gas(GAS_PHORON, -0.15 * vol) //must fix to use proportion of moles with gas laws
-
- message = result
- else
- message = "No significant reaction detected"
-
- if(dest_pad)
- sleep(10)
- dest_pad.teleport()
- if(reaction_happened && phororeagent) //phororeagent probably unnecessary check
- spawn(rand(25, 50))
- message = phororeagent.initial_reaction(container, container.loc, vol, message)
-
-/obj/machinery/computer/phoronics/proc/abort(var/text)
- message = text
- aborting = 0
- timeLeft = 0
- return
-
-/obj/machinery/computer/phoronics/power_change()
- ..()
- if(timeLeft > 0 && (stat & NOPOWER))
- aborting = 1
-
-//Buildable computers stuff
-/obj/item/circuitboard/phoronics
- name = T_BOARD("phorochemputer")
- build_path = /obj/machinery/computer/phoronics
- origin_tech = "programming=2;bluespace=2"
-/*
-/datum/design/circuit/phoronics
- name = "phorochemputer"
- id = "phorochemputer"
- req_tech = list("programming" = 3, "bluespace" = 2)
- build_path = /obj/item/circuitboard/phoronics
-*/
diff --git a/code/modules/Phorochemistry/computer.dmi b/code/modules/Phorochemistry/computer.dmi
deleted file mode 100644
index 874124bdd2..0000000000
Binary files a/code/modules/Phorochemistry/computer.dmi and /dev/null differ
diff --git a/code/modules/Phorochemistry/electrical_field.dm b/code/modules/Phorochemistry/electrical_field.dm
deleted file mode 100644
index 0a744d04df..0000000000
--- a/code/modules/Phorochemistry/electrical_field.dm
+++ /dev/null
@@ -1,67 +0,0 @@
-/obj/effect/electrical_field
- name = "electric field"
- icon = 'icons/rust.dmi'
- icon_state = "emfield_s1"
- pixel_x = 0
- pixel_y = 0
- var/last_x = -1
- var/last_y = -1
-
-/obj/effect/electrical_field/proc/process_field()
- if(last_x == -1 && last_y == -1)
- last_x = x
- last_y = y
-
- if(last_x != x || last_y != y)
- qdel(src)
-
-/obj/effect/electrical_field/proc/shock(var/mob/living/L, var/damage = 2.5)
- for(var/datum/reagent/phororeagent/R in L.reagents.reagent_list)
- if(R.id == REAGENT_ID_FULGURACIN)
- if(prob(20))
- L << span_notice("Your hairs stand up, but you resist the shock for the most part.")
- return //no shock for you
-
- if(L.stat != DEAD)
- L.jitteriness = 140
- if(!L.is_jittery)
- spawn(0)
- L.jittery_process()
-
- var/isHuman = ishuman(L)
- if(isHuman)
- var/mob/living/carbon/human/H = L
- H.apply_effect(10, STUN, 0)
- H.apply_effect(10, WEAKEN, 0)
- H.apply_effect(10, STUTTER, 0)
- H.take_overall_damage(0, damage) //has to be high or they just heal it away instantly
- else
- L.Stun(10)
- L.apply_damage(3, BURN)
-
-
-
-
-/obj/effect/electrical_field/small
- name = "small electric field"
-
-/obj/effect/electrical_field/small/process_field()
- ..()
- for(var/mob/living/L in loc.contents)
- shock(L, 4) //more damage than big field because it's more condensed or something
-
-/obj/effect/electrical_field/big
- name = "large electric field"
- icon = 'icons/effects/96x96.dmi'
- icon_state = "emfield_s3"
- pixel_x = -32
- pixel_y = -32
-
-/obj/effect/electrical_field/big/process_field()
- ..()
- var/turf/T = null
- for(var/i = src.x - 1 to src.x + 1)
- for(var/j = src.y - 1 to src.y + 1)
- T = locate(i, j, z)
- for(var/mob/living/L in T.contents) //only the middle X 9
- shock(L)
diff --git a/code/modules/Phorochemistry/misc_phoronics.dm b/code/modules/Phorochemistry/misc_phoronics.dm
deleted file mode 100644
index 33638b4df7..0000000000
--- a/code/modules/Phorochemistry/misc_phoronics.dm
+++ /dev/null
@@ -1,66 +0,0 @@
-proc/gaseous_reagent_check(var/mob/living/carbon/human/H) //protective clothing check
- return (istype(H.wear_suit, /obj/item/clothing/suit/space) && istype(H.head, /obj/item/clothing/head/helmet/space)) \
- || (istype(H.wear_suit, /obj/item/clothing/suit/bio_suit) && istype(H.head, /obj/item/clothing/head/bio_hood) && H.gloves) \
- || (H.isSynthetic())
-
-/datum/reagent/nitrate
- id = REAGENT_ID_NITRATE
- name = REAGENT_NITRATE
- description = "Nitrate, not that interesting."
- reagent_state = LIQUID
- color = "#D8DFE3"
-
-/datum/reagent/aluminum_nitrate
- id = REAGENT_ID_ALUMINUMNITRATE
- name = REAGENT_ALUMINUMNITRATE
- description = "Aluminum Nitrate, now that's interesting!"
- reagent_state = LIQUID
- color = "#E1CFE3"
-
-/datum/chemical_reaction/nitrate
- name = REAGENT_NITRATE
- id = REAGENT_ID_NITRATE
- result = REAGENT_ID_NITRATE
- required_reagents = list(REAGENT_ID_NITROGEN = 1, REAGENT_ID_OXYGEN = 3)
- result_amount = 4
-
-/datum/chemical_reaction/aluminum_nitrate
- name = REAGENT_ALUMINUMNITRATE
- id = REAGENT_ID_ALUMINUMNITRATE
- result = REAGENT_ID_ALUMINUMNITRATE
- required_reagents = list(REAGENT_ID_ALUMINIUM = 1, REAGENT_ID_NITRATE = 3)
- result_amount = 4
-
-/datum/chemical_reaction/brownies
- name = "Brownies"
- id = "brownies"
- result = null
- required_reagents = list(REAGENT_ID_ALUMINUMNITRATE = 40, REAGENT_ID_TARTRATE = 20)
- result_amount = 1
- on_reaction(var/datum/reagents/holder, var/created_volume)
- for(var/i = 0; i < 3; i++)
- new /obj/item/reagent_containers/food/snacks/brownies(get_turf(holder.my_atom))
- return
-
-/obj/item/reagent_containers/food/snacks/brownies
- name = "Brownies"
- icon_state = "waffles"
- desc = "Ovenless Brownies!"
- filling_color = "#A79459"
-
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_NUTRIMENT, 6)
-
-/obj/item/induromol
- name = "Hardened Induromol"
- icon = 'icons/obj/mining.dmi'
- icon_state = "ore_platinum"
- desc = "Looks like it would make a great throwing weapon."
- throwforce = 20
-
-/obj/structure/closet/l3closet/scientist/phoronics/Initialize(mapload) //two sets of chemical protection
- . = ..()
-
- new /obj/item/clothing/suit/bio_suit/scientist( src )
- new /obj/item/clothing/head/bio_hood/scientist( src )
diff --git a/code/modules/Phorochemistry/phoroanalyzer.dm b/code/modules/Phorochemistry/phoroanalyzer.dm
deleted file mode 100644
index 1233970eb1..0000000000
--- a/code/modules/Phorochemistry/phoroanalyzer.dm
+++ /dev/null
@@ -1,45 +0,0 @@
-/obj/machinery/phoroanalyzer
- name = "Chemical Analyzer"
- density = 1
- anchored = 1
- icon = 'icons/obj/chemical.dmi'
- icon_state = "mixer0b"
- use_power = 1
- idle_power_usage = 20
- var/obj/item/reagent_containers/stored = null
-
-/obj/machinery/phoroanalyzer/attackby(var/obj/item/B as obj, var/mob/user as mob)
- if(istype(B, /obj/item/reagent_containers))
- stored = B
- if(stored.reagents.reagent_list.len > 1)
- state("Error: Multiple reagents detected")
- return
-
- if(stored.reagents.reagent_list.len == 0)
- state("Error: No reagents detected")
- return
-
- var/datum/reagent/R = stored.reagents.reagent_list[1]
- user.drop_item()
- B.loc = src
- icon_state = "mixer1b"
- //say analyze stuff
- spawn(0)
- analyze(R)
- B.loc = src.loc
- icon_state = "mixer0b"
- else
- return
-
-/obj/machinery/phoroanalyzer/proc/analyze(var/datum/reagent/R)
- if(istype(R, /datum/reagent/phororeagent))
- var/datum/reagent/phororeagent/P = R
- var/description = "Analysis complete - [P.name]: [P.description]"
- var/id = P.id
- sleep(20)
- discovered_phororeagents.Add(id)
- state(description)
- else
- var/description = "Analysis complete - [R.name]: [R.description]"
- sleep(20)
- state(description)
diff --git a/code/modules/Phorochemistry/phorochemheat.dm b/code/modules/Phorochemistry/phorochemheat.dm
deleted file mode 100644
index e8cc912fc9..0000000000
--- a/code/modules/Phorochemistry/phorochemheat.dm
+++ /dev/null
@@ -1,134 +0,0 @@
-//chemistry stuff here so that it can be easily viewed/modified
-
-/obj/item/reagent_containers/glass/solution_tray
- name = "solution tray"
- desc = "A small, open-topped glass container for delicate research samples. It sports a re-useable strip for labelling with a pen."
- icon = 'icons/obj/device.dmi'
- icon_state = "solution_tray"
- matter = list(MAT_GLASS = 5)
- w_class = 2.0
- amount_per_transfer_from_this = 1
- possible_transfer_amounts = list(1, 2)
- volume = 2
- flags = OPENCONTAINER
- unacidable = 1
-
-/obj/item/storage/box/solution_trays
- name = "solution tray box"
- icon_state = "solution_trays"
-
- New()
- ..()
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
- new /obj/item/reagent_containers/glass/solution_tray( src )
-
-/obj/item/reagent_containers/glass/beaker/tungsten
- name = "beaker '" + REAGENT_ID_TUNGSTEN + "'"
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_TUNGSTEN,50)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/oxygen
- name = "beaker '" + REAGENT_ID_OXYGEN + "'"
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_OXYGEN,50)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/sodium
- name = "beaker '" + REAGENT_ID_SODIUM + "'"
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_SODIUM,50)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/lithium
- name = "beaker '" + REAGENT_ID_LITHIUM + "'"
-
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_LITHIUM,50)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/water
- name = "beaker '" + REAGENT_ID_WATER + "'"
-
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_WATER,50)
- update_icon()
-
-/obj/item/reagent_containers/glass/beaker/fuel
- name = "beaker '" + REAGENT_ID_FUEL + "'"
-
- New()
- ..()
- reagents.add_reagent(REAGENT_ID_FUEL,50)
- update_icon()
-
-
-/obj/machinery/bunsen_burner
- name = "bunsen burner"
- desc = "A flat, self-heating device designed for bringing chemical mixtures to boil."
- icon = 'icons/obj/device.dmi'
- icon_state = "bunsen0"
- var/heating = 0 //whether the bunsen is turned on
- var/heated = 0 //whether the bunsen has been on long enough to let stuff react
- var/obj/item/reagent_containers/held_container
- var/heat_time = 50
-
-/obj/machinery/bunsen_burner/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/reagent_containers))
- if(held_container)
- user << span_warning("You must remove the [held_container] first.")
- else
- user.drop_item(src)
- held_container = W
- held_container.loc = src
- user << span_notice("You put the [held_container] onto the [src].")
- var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
- underlays += I
- if(heating)
- spawn(heat_time)
- try_heating()
- else
- user << span_warning("You can't put the [W] onto the [src].")
-
-/obj/machinery/bunsen_burner/attack_ai()
- return
-
-/obj/machinery/bunsen_burner/attack_hand(mob/user as mob)
- if(held_container)
- underlays = null
- user << span_notice("You remove the [held_container] from the [src].")
- held_container.loc = src.loc
- held_container.attack_hand(user)
- held_container = null
- else
- user << span_warning("There is nothing on the [src].")
-
-/obj/machinery/bunsen_burner/proc/try_heating()
- src.visible_message(span_notice(" icon[src] [src] hisses."))
- if(held_container && heating)
- heated = 1
- held_container.reagents.handle_reactions()
- heated = 0
- spawn(heat_time)
- try_heating()
-
-/obj/machinery/bunsen_burner/verb/toggle()
- set src in view(1)
- set name = "Toggle bunsen burner"
- set category = "IC.Game" //CHOMPEdit
-
- heating = !heating
- icon_state = "bunsen[heating]"
- if(heating)
- spawn(heat_time)
- try_heating()
diff --git a/code/modules/Phorochemistry/phoronics_tile.dm b/code/modules/Phorochemistry/phoronics_tile.dm
deleted file mode 100644
index d4b73ec43d..0000000000
--- a/code/modules/Phorochemistry/phoronics_tile.dm
+++ /dev/null
@@ -1,36 +0,0 @@
-//Phoronics code, courtesy of Dr. Brock.
-/turf/simulated/floor/phoronics
- name = "electromagnetic tile"
- icon = 'icons/turf/flooring/circuit.dmi'
- icon_state = "gcircuit_broken"
- initial_flooring = /decl/flooring/phoronics
-
-/datum/decl/flooring/phoronics
- name = "electromagnetic tile"
- desc = "An electromagnetic tile to create an electric field."
- icon = 'icons/turf/flooring/circuit.dmi'
- icon_base = "gcircuit_broken"
- has_damage_range = null
- flags = TURF_REMOVE_CROWBAR
- build_type = /obj/item/stack/tile/phoronics
-
-//phoronics floor tile object
-/obj/item/stack/tile/phoronics
- name = "electromagnetic tile"
- singular_name = "electromagnetic tile"
- desc = "A tile for use in the creation of electromagnetic fields"
- icon_state = "fr_tile"
- w_class = 3.0
- force = 1.0
- throwforce = 1.0
- throw_speed = 5
- throw_range = 20
- max_amount = 1
- origin_tech = "magnets=3"
-/*
-datum/design/item/phoronics_tile
- name = "electromagnetic floor tile"
- id = "phoronics_tile"
- req_tech = list("magnets" = 3, "materials" = 3)
- materials = list(DEFAULT_WALL_MATERIAL = 1000)
- build_path = /obj/item/stack/tile/phoronics */
diff --git a/code/modules/Phorochemistry/phororeactions.dm b/code/modules/Phorochemistry/phororeactions.dm
deleted file mode 100644
index c2580a98a4..0000000000
--- a/code/modules/Phorochemistry/phororeactions.dm
+++ /dev/null
@@ -1,70 +0,0 @@
-#define PHORONICS_TESTING 1
-
-/datum/phororeaction
- var/reactant_id = ""
- var/result_id = ""
- var/conversion_rate = 1
- var/intensity = 1
-
-/datum/phororeaction/New(var/input, var/output, var/rate = 1, var/level = 1)
- #if PHORONICS_TESTING
- testing("[input]: [output], [level]")
- #endif
- reactant_id = input
- result_id = output
- conversion_rate = rate
- intensity = level
-
-/datum/phororeaction/proc/get_result(var/level) //requires that only ONE reagent be tested at at time
- if(level == intensity)
- return "Reaction successful"
-
- var/difference = abs(level - intensity)
- if(difference > 1) //ensure multiple tests required
- return "No significant reaction detected"
-
- if(level < intensity)
- return "Slight reaction detected, it is recommended to raise intensity"
-
- if(level > intensity)
- return "Reaction highly unstable, it is recommended to lower intensity"
-
-/datum/phororeactions
- var/list/random_reagents = list(REAGENT_ID_HYDROGEN,REAGENT_ID_LITHIUM,REAGENT_ID_CARBON,REAGENT_ID_NITROGEN,REAGENT_ID_OXYGEN,REAGENT_ID_FLUORINE, \
- REAGENT_ID_SODIUM,REAGENT_ID_ALUMINIUM,REAGENT_ID_SILICON,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SULFUR,REAGENT_ID_CHLORINE,REAGENT_ID_POTASSIUM,REAGENT_ID_IRON, \
- REAGENT_ID_COPPER,REAGENT_ID_MERCURY,REAGENT_ID_RADIUM,REAGENT_ID_WATER,REAGENT_ID_SUGAR,REAGENT_ID_SACID,REAGENT_ID_TUNGSTEN, REAGENT_ID_LUBE, REAGENT_ID_INAPROVALINE, REAGENT_ID_BLISS, \
- REAGENT_ID_THERMITE, REAGENT_ID_TRAMADOL, REAGENT_ID_CLEANER, REAGENT_ID_KELOTANE, REAGENT_ID_DERMALINE, REAGENT_ID_ANTITOXIN, REAGENT_ID_SYNAPTIZINE, \
- REAGENT_ID_ALKYSINE, REAGENT_ID_IMIDAZOLINE, REAGENT_ID_HYPERZINE, REAGENT_ID_AMMONIA, REAGENT_ID_SODIUMCHLORIDE, REAGENT_ID_STERILIZINE, REAGENT_ID_SILICATE, REAGENT_ID_MINDBREAKER, \
- REAGENT_ID_IMPEDREZENE, REAGENT_ID_LIPOZINE)
- var/list/reactions = list()
-
-/datum/phororeactions/proc/set_up_reactions()
- reactions[REAGENT_ID_TRICORDRAZINE] = new/datum/phororeaction(REAGENT_ID_TRICORDRAZINE, REAGENT_ID_BICORDRAZINE, 1.5, 3)
- reactions[REAGENT_ID_MUTAGEN] = new/datum/phororeaction(REAGENT_ID_MUTAGEN, REAGENT_ID_MUTAGENX, 0.5, 5)
- reactions[REAGENT_ID_ETHYLREDOXRAZINE] = new/datum/phororeaction(REAGENT_ID_ETHYLREDOXRAZINE, REAGENT_ID_EXPULSICOL, 1, 2)
- reactions[REAGENT_ID_HYRONALIN] = new/datum/phororeaction(REAGENT_ID_HYRONALIN, REAGENT_ID_RADX, 1, 3)
- //reactions[REAGENT_ID_PACID] = new/datum/phororeaction(REAGENT_ID_PACID, REAGENT_ID_PHORONICACID, 0.2, 4) removed
- reactions[REAGENT_ID_PHORON] = new/datum/phororeaction(REAGENT_ID_PHORON, REAGENT_ID_ENERGIZEDPHORON, 1, 5)
- reactions[REAGENT_ID_OXYCODONE] = new/datum/phororeaction(REAGENT_ID_OXYCODONE, REAGENT_ID_OXYPHOROMIN, 0.5, 1)
-
- var/list/results = typesof(/datum/reagent/phororeagent) - /datum/reagent/phororeagent - /datum/reagent/phororeagent/gaseous
-
- var/list/reactants = list()
- for(var/R in reactions)
- var/datum/phororeaction/reaction = reactions[R]
- reactants[reaction.result_id] = 1 //reaction found
-
- for(var/path in results)
- var/datum/reagent/phororeagent/P = new path()
- if(reactants[P.id]) //recipe found
- continue
- else
- var/id = pick(random_reagents)
- random_reagents.Remove(id)
- var/intens = rand(1, 5)
- reactions[id] = new/datum/phororeaction(id, P.id, 1, intens)
-
-
- //garbage collection should deal with reagents
-
-#undef PHORONICS_TESTING
diff --git a/code/modules/Phorochemistry/phororeagent.dm b/code/modules/Phorochemistry/phororeagent.dm
deleted file mode 100644
index 96e5f05b1d..0000000000
--- a/code/modules/Phorochemistry/phororeagent.dm
+++ /dev/null
@@ -1,1172 +0,0 @@
-var/induromol_frequency = rand(700, 750) * 2 + 1 //signallers only increase by .2 increments
-var/induromol_code = rand(1, 50)
-
-/datum/reagent/phororeagent
- name = REAGENT_UNKNOWN
- id = REAGENT_ID_UNKNOWN
- description = "Currently unknown"
- reagent_state = LIQUID
-
- //called by phorochemputer.dm, returns special message upon creating reagent
- //mostly dangerous initial reactions, to ensure protective gear is worn
- proc/initial_reaction(var/obj/item/reagent_containers/container, var/turf/T, var/volume, var/message)
- if(reagent_state == GAS)
- return "WARNING: Gaseous reaction detected! Repeating reaction inadvisable."
- return message
-
-/* Genetics is removed now.
-/datum/reagent/phororeagent/extreme_mutagen //this one should work fine, but genetics may still be a little messed up
- id = REAGENT_ID_MUTAGENX
- name = REAGENT_MUTAGENX
- description = "Seems as if it would induce instant, random mutations in a living humanoid"
- color = "#20E7F5"
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/extreme_mutagen/on_mob_life(var/mob/living/M as mob)
- spawn(20) //give time to inject entire syringe if wanted
- var/damage = rand(5 * (src.volume / 30 + 1), 10 * (src.volume / 30 + 1))
- //to deal with blood dialysis of toxin
-
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.dna.check_integrity()
- var/block
- if(prob(91 - (min(src.volume, 60) / 1.5))) //odds are always against you, and high doses are dangerous
- block = pick(FAKEBLOCK, FAKEBLOCK, DEAFBLOCK, DEAFBLOCK, CLUMSYBLOCK, BLINDBLOCK)
- else
- block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK)
-
- var/cur_DNA = H.dna.GetSEState(block)
- do
- H.dna.SetSEState(block, !cur_DNA)
- while(H.dna.GetSEState(block) == cur_DNA)
- //ensure it toggles 100% of the time
- //sometimes needs 3-4 toggles before it takes, not sure why
-
- domutcheck(M,null,MUTCHK_FORCED)
- M.update_mutations()
-
- M.adjustToxLoss(damage)
- M.reagents.add_reagent(REAGENT_ID_TOXIN, src.volume / 4) //add toxin damage over time
- holder.remove_reagent(src.id, src.volume) //instant use
-*/
-/datum/reagent/phororeagent/bicordrazine
- id = REAGENT_ID_BICORDRAZINE
- name = REAGENT_BICORDRAZINE
- description = "Testing indicates potentially a more efficient form of Tricordrazine"
- color = "#C8A5DC"
- metabolism = 2.5 * REM
-
-/datum/reagent/phororeagent/bicordrazine/on_mob_life(var/mob/living/M as mob, var/alien)
- if(M.stat == 2)
- return
- if(!M)
- M = holder.my_atom
- if(!alien || alien != IS_DIONA)
- if(M.getOxyLoss())
- M.adjustOxyLoss(-2*REM)
- if(M.getBruteLoss() && prob(80))
- M.heal_organ_damage(2*REM,0)
- if(M.getFireLoss() && prob(80))
- M.heal_organ_damage(0,2*REM)
- if(M.getToxLoss() && prob(80))
- M.adjustToxLoss(-2*REM)
- ..()
-
-/datum/reagent/phororeagent/genedrazine
- id = REAGENT_ID_GENEDRAZINE
- name = REAGENT_GENEDRAZINE
- description = "Seems as if it would heal very quickly, but at the cost of genetic damage"
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/genedrazine/on_mob_life(var/mob/living/M as mob, var/alien)
- var/healedDamage = 0
-
- if(M.getOxyLoss())
- healedDamage = 1
- M.adjustOxyLoss(-4*REM)
- if(M.getBruteLoss())
- healedDamage = 1
- M.heal_organ_damage(4*REM,0)
- if(M.getFireLoss())
- healedDamage = 1
- M.heal_organ_damage(0,4*REM)
- if(M.getToxLoss())
- healedDamage = 1
- M.adjustToxLoss(-4*REM)
-
- if(healedDamage && prob(50))
- M.adjustCloneLoss(1)
-
- return ..()
-
-/datum/reagent/phororeagent/lacertusol
- id = REAGENT_ID_LACERTUSOL
- name = REAGENT_ID_LACERTUSOL
- description = "Looks as if it turns off certain muscle inhibitors, increasing unarmed strength dramatically"
- color = "#FFFA73"
- //implementation in human_attackhand.dm
-
-/datum/reagent/phororeagent/love_potion
- id = REAGENT_ID_AMORAPOTIO
- name = REAGENT_AMORAPOTIO
- description = "Seems as if it would induce incredibly strong feelings of affection"
- color = "#E3209B"
- metabolism = 0.5 * REM
- var/love_name
-
-/datum/reagent/phororeagent/love_potion/on_mob_life(var/mob/living/M as mob, var/alien)
- if(!istype(holder, /datum/reagents/metabolism/bloodstream))
- if(ishuman(M))
- if(!love_name)
- var/dist = 100
- for(var/mob/living/carbon/human/H in view(M))
- if(H == M)
- continue
- var/distTo = sqrt(((M.x - H.x) ** 2) + ((M.y - H.y) ** 2))
- if(distTo < dist)
- dist = distTo
- love_name = H.name
-
- if(love_name)
- to_chat(M, span_darkpink("You see [love_name]..."))
- spawn(0)
- sleep(10)
- to_chat(M, span_darkpink("They are beautiful"))
-
- if(M.mind) //give protect objective
- var/datum/objective/protection = new/datum/objective()
- protection.explanation_text = span_darkpink("Protect [love_name] at all costs")
- M.mind.objectives.Add(protection)
- var/obj_count = 1
- to_chat(M, span_notice("Your current objectives:"))
- for(var/datum/objective/objective in M.mind.objectives)
- to_chat(M, span_bold("Objective #[obj_count]") + ": [objective.explanation_text]")
- obj_count++
-
- to_chat(M, "
)")
- else
- if(prob(5))
- if(prob(98))
- var/list/love_messages = list("You feel strong affection towards [love_name]",
- "You can't stop thinking about [love_name]", "[love_name] is love, [love_name] is life",
- "[love_name] seems irresistable", "You cannot fathom life without [love_name]",
- "[love_name] seems to be the essence of perfection",
- "[love_name] can never be allowed to leave your side")
-
- to_chat(M, span_darkpink("[pick(love_messages)]"))
-
- else
- to_chat(M, span_darkpink("You begin to build a trouser tent"))
- return ..()
-
-/datum/reagent/phororeagent/love_potion/on_remove(var/atom/A)
- if(!istype(holder, /datum/reagents/metabolism/bloodstream))
- if(istype(A, /mob/living))
- var/mob/living/M = A
- if(M.mind)
- var/message = "Your mind feels a lot more focused"
- var/end_message = ""
- var/list/message2list = list()
- var/i = 1
- var/length = length(message)
- while(i <= length)
- message2list += copytext(message, i, i + 1)
- i++
- var/col_perc = 1 / length
- var/col_inc = 0
- var/red = 0
- var/green = 0
- var/blue = 0
- for(var/char in message2list) //fade from pink to black text
- red = (227 * (1 - col_inc))
- green = (32 * (1 - col_inc))
- blue = (155 * (1 - col_inc))
- end_message += "[char]"
- col_inc += col_perc
-
- to_chat(M, end_message)
-
- for(var/datum/objective/O in M.mind.objectives)
- if(findtext(O.explanation_text, "Protect [love_name] at all costs"))
- M.mind.objectives.Remove(O)
- var/obj_count = 1
- to_chat(M, span_notice("Your current objectives:"))
- for(var/datum/objective/objective in M.mind.objectives)
- to_chat(M, span_bold("Objective #[obj_count]") + ": [objective.explanation_text]")
- obj_count++
-
- to_chat(M, "
")
-
-/datum/reagent/phororeagent/love_potion/on_mob_death(var/mob/M)
- //update objectives
- if(M.mind)
- for(var/datum/objective/O in M.mind.objectives)
- if(findtext(O.explanation_text, "Protect [love_name] at all costs"))
- M.mind.objectives.Remove(O)
- var/obj_count = 1
- to_chat(M, span_notice("Your current objectives:"))
- for(var/datum/objective/objective in M.mind.objectives)
- to_chat(M, span_bold("Objective #[obj_count]") + ": [objective.explanation_text]")
- obj_count++
-
- to_chat(M, "
")
- break
-
-/obj/item/reagent_containers/glass/beaker/lovepotion
- name = "beaker (amorapotio)"
- prefill = list(REAGENT_ID_AMORAPOTIO = 60)
-
-/datum/reagent/phororeagent/nasty
- id = REAGENT_ID_NASTY
- name = REAGENT_NASTY
- description = "Ewwwwwwwwwwwwwww"
- color = "#F5F2F7"
-
-/datum/reagent/phororeagent/nasty/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- H << span_warning("You are so repulsed by the liquid splashed on you that you feel like puking")
- // H.vomit() not fast enough
- src = null
- spawn(0)
- if(!H.lastpuke)
- H.lastpuke = 1
- H << span_warning("You feel nauseous...")
- spawn(10) //1 second until second warning
- H << span_warning("You feel like you are about to throw up!")
- spawn(20) //and you have 2 more to escape
- H.Stun(8)
-
- H.visible_message(span_warning("[H] throws up!"),span_warning("You throw up!"))
- playsound(H.loc, 'sound/effects/splat.ogg', 50, 1)
-
- var/turf/location = H.loc
- if (istype(location, /turf/simulated))
- location.add_vomit_floor(H, 1)
-
- H.nutrition -= 40
- H.adjustToxLoss(-3)
- spawn(350) //wait 35 seconds before next volley
- H.lastpuke = 0
-
-/datum/reagent/phororeagent/nasty/touch_turf(var/turf/T, var/volume)
- var/obj/effect/decal/cleanable/vomit/V = locate(/obj/effect/decal/cleanable/vomit, T)
- if(!V)
- V = new/obj/effect/decal/cleanable/vomit(T)
- V.name = "ewwwwwww"
- V.desc = "That's nasty."
- V.icon_state = "vomittox_2"
-
- var/dist = 100
- var/mob/living/carbon/human/immune
- for(var/mob/living/carbon/human/H in viewers(T, 2))
- var/distTo = sqrt(((T.x - H.x) ** 2) + ((T.y - H.y) ** 2))
- if(distTo < dist && (istype(H.l_hand, /obj/item/reagent_containers) || \
- istype(H.r_hand, /obj/item/reagent_containers)))
- immune = H //so reagent spill does not affect user, they already threw up when it was created
-
- src = null
- for(var/mob/living/carbon/human/H in viewers(T, 7))
- if(H == immune)
- H << span_notice("You are absolutely disgusted, but you hold your stomach contents in.")
- continue
- H << span_warning("You are so disgusted by what looks like spilled vomit you might throw up!")
- // H.vomit() not fast enough
- spawn(0)
- if(!H.lastpuke)
- H.lastpuke = 1
- H << span_warning("You feel nauseous...")
- spawn(50) //5 seconds until second warning
- H << span_warning("You feel like you are about to throw up!")
- spawn(50) //and you have 5 more for mad dash to the bucket
- H.Stun(5)
-
- H.visible_message(span_warning("[H] throws up!"),span_warning("You throw up!"))
- playsound(H.loc, 'sound/effects/splat.ogg', 50, 1)
-
- var/turf/location = H.loc
- if (istype(location, /turf/simulated))
- location.add_vomit_floor(H, 1)
-
- H.nutrition -= 40
- H.adjustToxLoss(-3)
- spawn(350) //wait 35 seconds before next volley
- H.lastpuke = 0
- // return ..()
-
-/datum/reagent/phororeagent/nasty/initial_reaction(var/obj/item/reagent_containers/container, var/turf/T, var/volume, var/message)
- for(var/mob/living/carbon/human/H in viewers(T, 7))
- H << span_warning("There is something about the reagent from the telepad you find absolutely repulsive.")
- H.vomit()
- return ..()
-
-/datum/reagent/phororeagent/babelizine
- id = REAGENT_ID_BABELIZINE
- name = REAGENT_BABELIZINE
- description = "Similar to an enzyme produced by the incredibly rare Babel Fish, might have great linguistic applications"
- color = "#E5F58E"
- metabolism = 0.2 * REM
-
-/datum/reagent/phororeagent/babelizine/on_mob_life(var/mob/living/M as mob, var/alien)
- M.universal_understand = 1
- ..()
-
-/datum/reagent/phororeagent/babelizine/on_remove(var/atom/A)
- if(istype(A, /mob/living))
- var/mob/living/M = A
- M.universal_understand = 0
- to_chat(M, span_warning("You no longer feel attuned to the spoken word."))
-
-/datum/reagent/phororeagent/babelizine/on_mob_death(var/mob/M)
- holder.remove_reagent(src.id, src.volume)
-
-/datum/reagent/phororeagent/calcisol
- id = REAGENT_ID_CALCISOL
- name = REAGENT_CALCISOL
- description = "Looks as though it could have profound effects upon broken limbs"
- color = "#EDE6E1"
-
-/datum/reagent/phororeagent/calcisol/on_mob_life(var/mob/living/M as mob, var/alien) //12 units per bone
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- var/list/broken = list()
- for(var/obj/item/organ/external/E in H.organs)
- if(E && (E.status & ORGAN_BROKEN))
- broken += E
-
- if(broken.len >= 1 && src.volume >= 12)
- var/obj/item/organ/external/bone = broken[rand(1, broken.len)]
- bone.brute_dam = min(25, bone.brute_dam) //ensure bone doesn't break again
- bone.status &= ~ORGAN_BROKEN
- // bone.perma_injury = 0 Not sure what Polaris equivalent is or why this was necessary
- H.visible_message(
- span_notice("You hear a loud crack as [H.name]'s [bone.name] appears to heal miraculously."))
- holder.remove_reagent(src.id, 12)
- ..()
-
-
-/datum/reagent/phororeagent/malaxitol
- id = REAGENT_ID_MALAXITOL
- name = REAGENT_MALAXITOL
- description = "Analysis indicates it could greatly speed up the rate at which other reagents are metabolized"
- color = "#A155ED"
- metabolism = 2 * REM
-
-/datum/reagent/phororeagent/malaxitol/on_mob_life(var/mob/living/M as mob, var/alien)
- for(var/datum/reagent/R in M.reagents.reagent_list)
- if(R.id == src.id)
- continue
- R.on_mob_life(M, alien)
-
- ..()
-
-/datum/reagent/phororeagent/paralitol
- id = REAGENT_ID_PARALITOL
- name = REAGENT_PARALITOL
- description = "Seems as if it could work as an extreme muscle inhibitor"
- color = "#2F85CC"
- metabolism = 3 * REM
-
-/datum/reagent/phororeagent/paralitol/on_mob_life(var/mob/living/M as mob, var/alien)
- M.Weaken(2)
- M.stuttering = 50
- return ..()
-
-/datum/reagent/phororeagent/doloran //I don't like this one, could really use different mechanics, kind of just paralitol with pain -DrBrock
- id = REAGENT_ID_DOLORAN
- name = REAGENT_DOLORAN
- description = "Looks as if it could cause horrifically intense pain"
- color = "#F20A0E"
- metabolism = 2 * REM
-
-/datum/reagent/phororeagent/doloran/on_mob_life(var/mob/living/M as mob, var/alien)
- M.halloss = 100
- M.stuttering = 10
-
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- H.shock_stage = min(H.shock_stage, 100)
-
-
- if(prob(10))
- if(prob(33))
- M.emote("scream")
- else
- if(prob(50))
- M.emote("me", 1, "grits their teeth")
- else
- M.emote("me", 1, "writhes in pain")
- ..()
-
-/datum/reagent/phororeagent/fulguracin
- id = REAGENT_ID_FULGURACIN
- name = REAGENT_FULGURACIN
- description = "Looks as though it could work as an extreme electrical inhibitor"
- color = "#362F31"
-
-/datum/reagent/phororeagent/fulguracin/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living/silicon))
- var/mob/living/silicon/S = M
- S.take_organ_damage(0, volume/2, emp = 1)
- S << span_notice("Some of your systems report damage as a result of the liquid.")
- else
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(H.isSynthetic())
- H.take_overall_damage(0, volume/2)
- H << span_notice("Some of your systems report damage as a result of the liquid.")
-//implementation also in power.dm and electrical_field.dm
-
-/datum/reagent/phororeagent/mortemol
- id = REAGENT_ID_MORTEMOL
- name = REAGENT_MORTEMOL
- description = "Further testing required, could potentially reanimate dead cells if delivered with enough force"
- color = "#000000"
- metabolism = 5 * REM //gotta balance it somehow
- data = list(0) //use data? Might cause problems with blood dialysis
-
-/datum/reagent/phororeagent/mortemol/touch_mob(var/mob/M, var/volume) //requires a splash to start effects because dead humans don't process reagents
- if(!istype(M, /mob/living/carbon))
- return 0
-
- var/mob/living/carbon/C = M
- if(holder)
- if(!istype(holder.my_atom, /obj/effect/effect/smoke/chem))
- if(C.reagents)
- if(C.stat && !(data[1]))
- data[1] = 1
- C.reagents.add_reagent(id, volume, data)
- C.rejuvenate()
- C.rejuvenate() //I like C.rejuvenate()
- C.visible_message(span_notice("[C] seems to wake from the dead!"))
- else
- C.reagents.add_reagent(id, volume)
-
-/datum/reagent/phororeagent/mortemol/on_mob_life(var/mob/living/M as mob, var/alien)
- if(data[1])
- M.halloss = 100
- M.stuttering = 1
-
- return ..()
-
-/datum/reagent/phororeagent/mortemol/on_remove(var/atom/A)
- if(data[1])
- if(istype(A, /mob))
- var/mob/M = A
- to_chat(M, span_notice("You feel the last traces of chemicals leave your body as you return to death once more..."))
- M.death(0)
- //Reagent giveth, and reagent taketh away
-
-/datum/reagent/phororeagent/mortemol/on_mob_death(var/mob/M)
- if(data[1])
- return
- else
- if(istype(M, /mob/living/carbon))
- var/mob/living/carbon/C = M
- data[1] = 1
- C.rejuvenate()
- C.rejuvenate() //Necessary to call twice in testing
- C.visible_message(span_notice("[C] seems to wake from the dead!"))
-
-/datum/reagent/phororeagent/tegoxane
- id = REAGENT_ID_TEGOXANE
- name = REAGENT_TEGOXANE
- description = "Seems like it could render biotic matter incapable of being seen, so long as no large movements are made"
- color = "#7C7D7A"
- var/saved_icon
- var/hair
- var/beard
-
-/datum/reagent/phororeagent/tegoxane/on_mob_life(var/mob/living/M as mob, var/alien)
- if(!saved_icon)
- saved_icon = M.icon //kind of hacky, shouldn't really cause too many problems
-
- M.icon = 'icons/mob/belt.dmi' //belts because I can
-
- if(istype(M, /mob/living/carbon/human)) //hair still shows even though you're invisible...
- var/mob/living/carbon/human/H = M
- if(!hair || ((H.h_style != hair) && (H.h_style != "Bald")))
- hair = H.h_style
- spawn(10)
- H.update_hair()
- if(!beard || ((H.f_style != beard) && (H.f_style != "Shaved")))
- beard = H.f_style
- spawn(10)
- H.update_hair()
-
- H.h_style = "Bald"
- H.f_style = "Shaved"
-
- if(!M.digitalcamo)
- to_chat(M, span_notice("Your skin starts to feel strange"))
- M.digitalcamo = 1
- return ..()
-
-/datum/reagent/phororeagent/tegoxane/on_remove(var/atom/A)
- if(istype(A, /mob))
- var/mob/M = A
- to_chat(M, span_notice("Your skin feels normal again"))
- M.digitalcamo = 0
- M.icon = saved_icon
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(hair)
- H.h_style = hair
- if(beard)
- H.f_style = beard
- H.update_hair()
-
-/datum/reagent/phororeagent/tegoxane/on_mob_death(var/mob/M)
- M.icon = saved_icon
- M.digitalcamo = 0
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(hair)
- H.h_style = hair
- if(beard)
- H.f_style = beard
- H.update_hair()
-
-
-/datum/reagent/phororeagent/expulsicol
- id = REAGENT_ID_EXPULSICOL
- name = REAGENT_EXPULSICOL
- description = "Structure indicates it could purge living cells of non-essential reagents"
- color = "#8C4C3E"
- var/message_given = 0
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/expulsicol/on_mob_life(var/mob/living/M as mob, var/alien)
- if(!message_given)
- to_chat(M, "You don't feel very good...")
- message_given = 1
-
- spawn(20)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
-
- H.visible_message(span_warning("[H] throws up!"),span_warning("You throw up!"))
- playsound(H.loc, 'sound/effects/splat.ogg', 50, 1)
-
- var/turf/location = H.loc
- if (istype(location, /turf/simulated))
- location.add_vomit_floor(src, 1)
-
- H.nutrition -= 40
-
- for(var/datum/reagent/R in M.reagents.reagent_list)
- if(R.id == src.id)
- continue
- M.reagents.remove_reagent(R.id, R.volume)
-
- M.reagents.remove_reagent(src.id, src.volume)
-/////////////////////////////////////////////////////////////////////
-
-/datum/reagent/phororeagent/oculusosone
- id = REAGENT_ID_OCULUSOSONE
- name = REAGENT_OCULUSOSONE
- description = "Might greatly enhance humanoid eye function"
- color = "#FE9144"
- metabolism = 0.5 * REM
-
-/datum/reagent/phororeagent/oculusosone/on_mob_life(var/mob/living/M as mob, var/alien)
- if(M.client)
- if(M.client.view == 7)
- if(ishuman(M) && !(alien == IS_SLIME))
- //check for mechanical eyes
- var/mob/living/carbon/human/H = M
- var/obj/item/organ/eyes = H.internal_organs_by_name["eyes"]
- if(eyes.status & ORGAN_ROBOT)
- return ..()
-
- to_chat(M, span_notice("You blink and your eyes quickly adapt to enhanced function."))
- M.client.view = 10
- return ..()
-
-/datum/reagent/phororeagent/oculusosone/on_remove(var/atom/A) //Either this is not getting called, or some such.Not being removed on leave.
- if(istype(A, /mob))
- var/mob/M = A
- if(ishuman(M))
- //check for mechanical eyes
- var/mob/living/carbon/human/H = M
- if(H.get_species() == SPECIES_PROMETHEAN)
- if(M.client)
- M.client.view = 7
- to_chat(M, span_notice("After a few blinks, you realize the Oculusosone has worn off."))
- return ..()
- var/obj/item/organ/eyes = H.internal_organs_by_name["eyes"]
- if(eyes.status & ORGAN_ROBOT)
- return ..()
-
- if(M.client)
- M.client.view = 7
- to_chat(M, span_notice("After a few blinks, you realize the Oculusosone has worn off."))
- return ..()
-//////////////////////////////////////////////////////////////////////////////////
-
-/datum/reagent/phororeagent/destitutionecam
- id = REAGENT_ID_DESTITUTIONECAM
- name = REAGENT_ID_DESTITUTIONECAM
- description = "Under no circumstances should this substance come into contact with dead bodies"
- color = "#5AD92B"
-
-//doesn't do anything, I just like people trying to procure a corpse to test it -DrBrock
-/datum/reagent/phororeagent/destitutionecam/touch_mob(var/mob/M, var/volume)
- if(M.stat == 2)
- usr << span_notice("Absolutely nothing happens. You feel disappointed.")
- return ..()
-
-/datum/reagent/phororeagent/sapoformator
- id = REAGENT_ID_SAPOFORMATOR
- name = REAGENT_SAPOFORMATOR
- description = "Enough units splashed on the ground would appear to have great cleaning effects"
- color = "#EEE139"
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/sapoformator/reaction_obj(var/obj/O, var/volume)
- if(istype(O,/obj/effect/decal/cleanable))
- del(O)
- else
- if(O)
- O.clean_blood()
-
-/datum/reagent/phororeagent/sapoformator/touch_turf(var/turf/T, var/volume)
- if(src.holder)
- if(istype(src.holder.my_atom, /obj/effect/effect/water/chempuff))
- if(istype(T, /turf/simulated))
- var/turf/simulated/S = T
- S.dirt = 0
- T.clean_blood()
- for(var/obj/effect/decal/cleanable/C in T.contents)
- src.reaction_obj(C, volume)
- del(C)
-
- src = null
- if(volume >= 25)
- usr << span_notice("The solution begins to fizzle.")
- playsound(T, 'sound/effects/bamf.ogg', 50, 1)
- var/datum/reagents/cleaner = new()
- cleaner.my_atom = T
- cleaner.add_reagent(REAGENT_ID_CLEANER, 10)
- var/datum/effect/effect/system/foam_spread/soapfoam = new()
- soapfoam.set_up(12, T, cleaner, 0)
- soapfoam.start()
- sleep(50)
- var/list/soaps = typesof(/obj/item/soap)// - /obj/item/soap/fluff/azare_siraj_1
- var/soap_type = pick(soaps)
- var/obj/item/soap/S = new soap_type()
- S.loc = T
- if(volume >= 50)
- volume -= 50
- var/list/tiles = list()
- if(istype(locate(T.x + 1, T.y, T.z), /turf/simulated/floor))
- tiles.Add(locate(T.x + 1, T.y, T.z))
- if(istype(locate(T.x - 1, T.y, T.z), /turf/simulated/floor))
- tiles.Add(locate(T.x - 1, T.y, T.z))
- if(istype(locate(T.x, T.y + 1, T.z), /turf/simulated/floor))
- tiles.Add(locate(T.x, T.y + 1, T.z))
- if(istype(locate(T.x, T.y - 1, T.z), /turf/simulated/floor))
- tiles.Add(locate(T.x, T.y - 1, T.z))
-
- while(tiles.len > 0 && volume >= 0)
- soap_type = pick(soaps)
- S = new soap_type()
- var/turf/location = pick(tiles)
- tiles.Remove(location)
- S.loc = location
- volume -= 20
-
- else
- usr << span_notice("The solution does not appear to have enough mass to react.")
-
-/datum/reagent/phororeagent/rad_x
- id = REAGENT_ID_RADX
- name = REAGENT_RADX
- description = "Metabolizes slowly until absorbing radiation damage"
- color = "#64110B"
- metabolism = 0.15
- overdose = 45
-
-/datum/reagent/phororeagent/rad_x/on_mob_life(var/mob/living/M as mob, var/alien)
- var/metabolize = max(M.radiation - 25, 0)
- holder.remove_reagent(src.id, metabolize * 0.025)
- return ..()
-
-/datum/reagent/phororeagent/caloran
- id = REAGENT_ID_CALORAN
- name = REAGENT_CALORAN
- description = "Would grant incredible heat resistance to living organisms with some side effects"
- color = "#C64714"
- metabolism = 5 * REM
- overdose = 20
- var/burn = -1
-
-/datum/reagent/phororeagent/caloran/on_mob_life(var/mob/living/M as mob, var/alien)
- if(volume >= 2)
- if(burn == -1)
- to_chat(M, span_notice("You feel your skin painfully harden."))
- M.take_overall_damage(20, 0)
- burn = M.getFireLoss()
- else
- if(M.getFireLoss() < burn)
- burn = M.getFireLoss()
- else
- M.adjustFireLoss(burn - M.getFireLoss())
- return ..()
-
-/datum/reagent/phororeagent/caloran/on_remove(var/atom/A)
- if(istype(A, /mob))
- var/mob/M = A
- to_chat(M, span_notice("Your skin returns to normal, no longer desensitized to extreme heat."))
- return ..()
-
-/datum/reagent/phororeagent/the_stuff
- id = REAGENT_ID_THESTUFF
- name = REAGENT_THESTUFF
- description = "Looks as though it would metabolize into the ultimate hallucinogenic cocktail"
- color = "#1A979D"
- metabolism = 10 * REM
- var/init = 0
-
-/datum/reagent/phororeagent/the_stuff/on_mob_life(var/mob/living/M as mob, var/alien)
- if(!init)
- to_chat(M, span_warning("You start tripping balls."))
- init = 1
- var/drugs = list(REAGENT_ID_BLISS, REAGENT_ID_SEROTROTIUM, REAGENT_ID_PSILOCYBIN, REAGENT_ID_NUKACOLA, REAGENT_ID_ATOMICBOMB, REAGENT_ID_HIPPIESDELIGHT)
- for(var/drug in drugs)
- M.reagents.add_reagent(drug, 1)
- M.reagents.add_reagent(REAGENT_ID_MINDBREAKER, 0.2)
- return ..()
-
-/datum/reagent/phororeagent/frioline
- id = REAGENT_ID_FRIOLINE
- name = REAGENT_FRIOLINE
- description = "Could cause rapid and sustained decrease in body temperature"
- color = "#A0E1F7"
-
-/datum/reagent/phororeagent/frioline/on_mob_life(var/mob/living/M as mob, var/alien)
- if(M.bodytemperature > 310)
- to_chat(M, span_notice("You suddenly feel very cold."))
- M.bodytemperature = max(165, M.bodytemperature - 30)
- return ..()
-
-/datum/reagent/phororeagent/luxitol
- id = REAGENT_ID_LUXITOL
- name = REAGENT_LUXITOL
- description = "Mimics compounds in known connection with bioluminescence"
- color = "#61E34F"
- metabolism = 0.2 * REM
-
-/datum/reagent/phororeagent/luxitol/on_mob_life(var/mob/living/M as mob, var/alien)
- M.set_light(10)
- return ..()
-
-/datum/reagent/phororeagent/luxitol/on_remove(var/atom/A)
- if(istype(A, /mob))
- var/mob/M = A
- M.set_light(0)
- return ..()
-
-/datum/reagent/phororeagent/liquid_skin
- id = REAGENT_ID_LIQUIDSKIN
- name = REAGENT_LIQUIDSKIN
- description = "Fills in microscopic ridges on biotic surfaces and hardens"
- color = "#F7E9BE"
-
-/datum/reagent/phororeagent/liquid_skin/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living))
- var/mob/living/L = M
- var/burned = L.getFireLoss() > 0
- if(burned)
- L << span_notice("In a strange sensation, you feel some burns stop hurting.")
- L.heal_organ_damage(0, min(15, volume / 4))
-
- if (mFingerprints in L.mutations)
- if(!burned)
- L << span_warning("Another application of the substance does nothing weird to your hands.")
- else
- L.mutations.Add(mFingerprints)
- L << span_notice("Your fingers feel strange after the substance splashes on your hands.")
- return ..()
-
-/datum/reagent/phororeagent/energized_phoron
- id = REAGENT_ID_ENERGIZEDPHORON
- name = REAGENT_ENERGIZEDPHORON
- description = "Creates an unstable electrical field between molecules"
- color = "#F5EF38"
-
-/datum/reagent/phororeagent/energized_phoron/initial_reaction(var/obj/item/reagent_containers/container, var/turf/T, var/volume, var/message)
- empulse(T, round(volume / 8), round(volume / 5), 1)
- src = null
- spawn(1)
- container.reagents.clear_reagents()
- return "You shoved extreme electricity into phoron, what did you expect?"
-
-/datum/reagent/phororeagent/energized_phoron/on_transfer(var/volume)
- initial_reaction(src.holder, src.holder.my_atom, volume, null)
- return 0
-
-/datum/reagent/phororeagent/induromol
- id = REAGENT_ID_INDUROMOL
- name = REAGENT_INDUROMOL
- description = "Please inform DrBrock of this description being viewed"
- color = "#C6C6C6"
- reagent_state = LIQUID
- metabolism = 0 //does nothing but wait until the time is ready
-
-/datum/reagent/phororeagent/induromol/New()
- var/freq = "[copytext(num2text(induromol_frequency), 1, 4)].[copytext(num2text(induromol_frequency), 4, 5)]"
- description = "Hardens in response to electromagnetic waves, especially frequency [freq] and code [induromol_code]"
- ..()
-
-/datum/reagent/phororeagent/induromol/on_mob_life(var/mob/living/M as mob)
- if(reagent_state == SOLID)
- var/mob/living/carbon/human/H = M
- for(var/obj/item/organ/O in H.internal_organs)
- var/silent = 1
- if(prob(3)) //needs low percentage or spams chat with pain messages
- silent = 0
- O.take_damage(1, silent)
-
- ..()
-//implementation also in communcations.dm
-
-/datum/reagent/phororeagent/obscuritol
- id = REAGENT_ID_OBSCURITOL
- name = REAGENT_OBSCURITOL
- description = "Exhibits strange electromagnetic properties"
- color = "#5D505E"
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/obscuritol/initial_reaction(var/obj/item/reagent_containers/container, var/turf/T, var/volume, var/message)
- var/obj/machinery/light/L
- for(var/obj/machinery/light/light in orange(3, T))
- if(light.status != 2) //LIGHT_BROKEN
- L = light
- break
-
- if(L)
- L.broken()
-
- for(var/obj/machinery/light/light in orange(6, T))
- light.flicker(rand(5, 10))
- return "Abnormal electromagnetic pulses detected, machinery recalibrated."
-
-/datum/reagent/phororeagent/obscuritol/touch_turf(var/turf/T, var/volume) //-round(-x) = Ceiling(x)
- for(var/obj/machinery/light/light in orange(-round(-1 * (volume / 10)), T))
- light.broken()
-
- for(var/obj/machinery/light/light in orange(-round(-1 * (volume / 6)), T))
- light.flicker()
-
-/datum/reagent/phororeagent/tartrate
- id = REAGENT_ID_TARTRATE
- name = REAGENT_TARTRATE
- description = "Mix with enough Aluminum Nitrate for tasty results!"
- color = "#EA67B1"
- //OVENLESS BROWNIES! Shameless Rick and Morty references!
-
-/datum/reagent/phororeagent/oxyphoromin
- id = REAGENT_ID_OXYPHOROMIN
- name = REAGENT_OXYPHOROMIN
- description = "Extreme painkiller derived of Oxycodone, dangerous in high doses"
- color = "#540E5C"
- metabolism = 5 * REM
- overdose = 15
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
-/datum/reagent/phororeagent/oxyphoromin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
- M.add_chemical_effect(CE_PAINKILLER, 600)
- M.eye_blurry = min(M.eye_blurry + 10, 250)
- M.Confuse(5)
-
-/datum/reagent/phororeagent/oxyphoromin/overdose(var/mob/living/carbon/M, var/alien)
- ..()
- M.druggy = max(M.druggy, 60)
- M.hallucination = max(M.hallucination, 3)
-
-/*
-//Temporarily disabled till map is complete. Need to adjust coordinates to reflect safe and unsafe XYZ.
-/datum/reagent/phororeagent/liquid_bluespace
- id = REAGENT_ID_LIQUIDBLUESPACE
- name = REAGENT_LIQUIDBLUESPACE
- description = "Appears to bend local spacetime around the container"
- color = "#4ECBF5"
- metabolism = 0
- var/initial_time = 0
-
-/datum/reagent/phororeagent/liquid_bluespace/on_mob_life(var/mob/living/M as mob)
- if(!initial_time)
- initial_time = world.time
-
- if(world.time - initial_time >= 30) //three second startup lag
- if(!metabolism)
- metabolism = 1
- to_chat(M, span_notice("You begin to feel transcendental."))
-
- if(M.z > 5 || M.z == 2 || M.z < 1) //no centcomm teleport, also not dealing with other unknown sectors
- to_chat(M, span_warning("You feel the bluespace leave your body on this sector, nothing happens."))
- src = null
- return
-
- var/valid_location = 0
- var/x = 0
- var/y = 0
- var/z = 0
-
- do
- var/list/params //list(x min, x max, y min, y max, sector)
- switch(M.z)
- if(1)
- params = list(95, 209, 76, 246, 1) //main station
- if(3)
- params = list(113, 141, 110, 143, 3) //telecomms station
- if(4)
- params = list(58, 95, 34, 80, 4) //engineering outpost
- if(5)
- if(prob(50))
- params = list(35, 73, 89, 120, 5) //mining station
- else
- params = list(65, 99, 121, 182, 5) //research station
-
- x = rand(params[1], params[2])
- y = rand(params[3], params[4])
- z = params[5]
-
- var/turf/new_loc = locate(x, y, z)
- //ensure they don't land inside rock unless on mining asteroid
- valid_location = (!istype(new_loc, /turf/simulated/mineral) || z == 5 || z == 4)
- while(!valid_location)
-
- M.x = x
- M.y = y
- M.z = z
-
- if(prob(33))
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(3, 1, get_turf(M))
- s.start()
- ..()
-
-/datum/reagent/phororeagent/liquid_bluespace/on_remove(var/atom/A)
- if(istype(A, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = A
- H.vomit()
-*/
-/datum/reagent/phororeagent/gaseous
- reagent_state = GAS
-
-/datum/reagent/phororeagent/gaseous/initial_reaction(var/obj/item/reagent_containers/container, var/turf/T, var/volume, var/message)
- var/datum/effect/effect/system/smoke_spread/chem/effect = new/datum/effect/effect/system/smoke_spread/chem()
- var/datum/reagents/R = new/datum/reagents()
- R.my_atom = container
- R.add_reagent(src.id, volume)
- effect.set_up(R, 17, 0, T, 0)
- effect.start()
- spawn(1)
- container.reagents.clear_reagents()
- return ..()
-
-/datum/reagent/phororeagent/gaseous/on_transfer(var/volume)
- initial_reaction(src.holder, src.holder.my_atom, volume, null)
- return 0
-
-/datum/reagent/phororeagent/gaseous/gaseous_death
- id = REAGENT_ID_GASEOUSDEATH
- name = REAGENT_GASEOUSDEATH
- description = "Full eradication of living matter, lethally toxic!"
- color = "#000000"
-
-/datum/reagent/phororeagent/gaseous/gaseous_death/touch_turf(var/turf/T)
- var/mob_affected = 0
- for(var/mob/living/L in T.contents)
- mob_affected = 1
- if(istype(L, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = L
- if(!gaseous_reagent_check(H) && H.stat != 2) //protective clothing and living check
- H << span_boldwarning("You realize you probably should have worn some safety equipment around dangerous chemicals.")
- H.death(0)
- else if(!istype(L, /mob/living/silicon))
- L.death(0)
-
- if(mob_affected)
- src = null
-/*
-/datum/reagent/phororeagent/gaseous/gaseous_death/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(!gaseous_reagent_check(H) && H.stat != 2) //protective clothing and living check
- H << span_boldwarning("You realize you probably should have worn some safety equipment around dangerous chemicals.")
- H.death(0)
- else if(!istype(M, /mob/living/silicon))
- M.death(0)
- src = null*/
-
-/datum/reagent/phororeagent/gaseous/occaecosone
- id = REAGENT_ID_OCCAECOSONE
- name = REAGENT_OCCAECOSONE
- description = "Would react very negatively with proteins in biotic eyes"
- color = "#213E73"
-
-//chemsmoke no longer affects mobs because reasons, this sort of hacky workaround must be used for the same effect -DrBrock
-/datum/reagent/phororeagent/gaseous/occaecosone/touch_turf(var/turf/T)
- var/mob_affected = 0
- for(var/mob/living/L in T.contents)
- mob_affected = 1
- if(istype(L, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = L
- if(!gaseous_reagent_check(H)) //protective clothing check
- var/obj/item/organ/eyes = H.internal_organs_by_name["eyes"]
- if(!(eyes.status & ORGAN_ROBOT))
- eyes.take_damage(50)
- H << span_boldwarning("The gas stings your eyes like you have never felt before!")
- else if(!istype(L, /mob/living/silicon))
- L.eye_blind = 500
-
- if(mob_affected)
- src = null
-
-/*
-/datum/reagent/phororeagent/gaseous/occaecosone/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(!gaseous_reagent_check(H)) //protective clothing check
- var/obj/item/organ/eyes = H.internal_organs_by_name["eyes"]
- if(!(eyes.status & ORGAN_ROBOT))
- eyes.take_damage(50)
- H << span_boldwarning("The gas stings your eyes like you have never felt before!")
- else if(!istype(M, /mob/living/silicon))
- M.eye_blind = 500
- src = null*/
-
-
-//It is POSSIBLE but very hard to "stop, drop, and roll" out the fire from an unprotected ignisol encounter before going into crit
-//I really just like the idea of scientists running out of a lab on fire to the science shower - DrBrock
-/datum/reagent/phororeagent/gaseous/ignisol
- id = REAGENT_ID_IGNISOL
- name = REAGENT_IGNISOL
- description = "Creates highly flammable reaction with biotic substances"
- color = "#F78431"
-
-//chemsmoke no longer affects mobs because reasons, this sort of hacky workaround must be used for the same effect -DrBrock
-/datum/reagent/phororeagent/gaseous/ignisol/touch_turf(var/turf/T)
- var/mob_affected = 0
- for(var/mob/living/L in T.contents)
- mob_affected = 1
- if(istype(L, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = L
- if(!gaseous_reagent_check(H)) //protective clothing check
- H.on_fire = 1
- H.adjust_fire_stacks(20)
- H.update_fire()
- else
- if(!istype(L, /mob/living/silicon))
- L.on_fire = 1
- L.adjust_fire_stacks(20)
-
- if(mob_affected)
- src = null
-
-/*/datum/reagent/phororeagent/gaseous/ignisol/touch_mob(var/mob/M, var/volume)
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(!gaseous_reagent_check(H)) //protective clothing check
- H.on_fire = 1
- H.adjust_fire_stacks(20)
- H.update_fire()
- else
- if(istype(M, /mob/living) && !istype(M, /mob/living/silicon))
- var/mob/living/L = M
- L.on_fire = 1
- L.adjust_fire_stacks(20)
- src = null*/
-
-/*
-Everything put here is either broken, potentially impossible to implement without major changes to many .dm files,
-not yet finished to a satisfactory degree, or I just don't like it enough to keep it in
-
-/datum/reagent/acid/phoronic_acid //I don't like this one, far too powerful in a smoke grenade
- name = REAGENT_PHORONICACID
- id = REAGENT_ID_PHORONICACID
- description = "Violently corrosive substance, large volumes could potentially breach hull"
- color = "#CDEB0C"
- power = 12
- meltdose = 5
-
- reaction_turf(var/turf/T, var/volume) //can't melt space, centcomm walls, or shuttles
- //maybe make work off explosion resistance?
- if(!istype(T, /turf/space) && !istype(T, /turf/unsimulated/wall) && !istype(T.loc, /area/shuttle) \
- && !istype(T.loc, /area/supply/station)) //TODO: Deal with bluespace tiles
- src = null //ensure sleep proc doesn't return upon completion
- if(volume <= 10)
- return
- for(var/mob/M in viewers(7, T))
- to_chat(M, "You hear sizzling as the solution begins to eat away the [T.name].")
- sleep(30)
- if(volume >= 50)
- for(var/mob/M in viewers(7, T))
- to_chat(M, "The acid melts through the [T.name]!")
-
- if(istype(T, /turf/simulated/wall))
- for(var/obj/O in T.contents) //Shamelessly stolen from walls.dm
- if(istype(O,/obj/structure/sign/poster))
- var/obj/structure/sign/poster/P = O
- P.roll_and_drop(T)
- else
- O.loc = T
- T.ChangeTurf(/turf/simulated/floor/plating)
- else
- T.ChangeTurf(/turf/space)
- //del(src)
- else
- for(var/mob/M in viewers(7, T))
- to_chat(M, "The sizzling stops leaving the floor intact.")
- return
-
- reaction_obj(var/obj/O, var/volume)
- if(istype(O, /obj/machinery) || istype(O, /obj/structure))
- src = null //ensure sleep proc doesn't return upon completion
- if(volume <= 10)
- return
- for(var/mob/M in viewers(7, O))
- to_chat(M, "You hear sizzling as the solution begins to eat away the [O.name].")
- sleep(30)
- if(volume >= 50)
- for(var/mob/M in viewers(7, O))
- to_chat(M, "The acid melts through the [O.name]!")
- del(O)
- else
- for(var/mob/M in viewers(7, O))
- to_chat(M, "The sizzling stops leaving the floor intact.")
- else
- return ..()
-
-nocturnol //Should give night vision, does not seem to work using this method of implementation
- id = REAGENT_ID_NOCTURNOL
- name = REAGENT_NOCTURNOL
- description = "Reagent bears strong resemblance to enzymes found in feline eyes"
- color = "#61E34F"
- supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
- industrial_use = REFINERYEXPORT_REASON_MATSCI
-
- on_mob_life(var/mob/living/M as mob, var/alien)
- M.see_in_dark = 50
- return ..()
-
- on_remove(var/atom/A)
- if(istype(A, /mob/living/carbon))
- var/mob/living/carbon/human/H = A
- H.see_in_dark = H.species.darksight
- else
- if(istype(A, /mob))
- var/mob/M = A
- M.see_in_dark = 2
- return ..()
-*/
diff --git a/code/modules/Phorochemistry/phorotelepad.dm b/code/modules/Phorochemistry/phorotelepad.dm
deleted file mode 100644
index 757107f812..0000000000
--- a/code/modules/Phorochemistry/phorotelepad.dm
+++ /dev/null
@@ -1,62 +0,0 @@
-/obj/machinery/telepad_phoronics
- name = "telepad"
- desc = "A bluespace telepad used for teleporting objects to and from a location."
- icon = 'icons/phoronics.dmi'
- icon_state = "pad-idle"
- anchored = 1
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 500
- var/obj/machinery/telepad_phoronics/dest
-
-/obj/machinery/telepad_phoronics/proc/teleport() //should be guaranteed to only contain one item
- if(dest)
- flick("pad-beam", src)
- playsound(src.loc, 'sound/weapons/flash.ogg', 25, 1)
- flick("pad-beam", dest)
- playsound(dest.loc, 'sound/weapons/flash.ogg', 25, 1)
-
- for(var/obj/O in src.loc.contents)
- if(!O.anchored)
- O.loc = dest.loc
-
- for(var/mob/M in src.loc.contents)
- //if(!M.restrained())
- M.loc = dest.loc
-
-/obj/machinery/telepad_phoronics/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/reagent_containers))
- user.drop_item()
- W.loc = src.loc
- else if(istype(W, /obj/item/tool/wrench))
- var/word = "tighten"
- src.anchored = !src.anchored
- if(!src.anchored)
- word = "undo"
- to_chat(user, span_notice("You [word] the telepad anchor bolts."))
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- else if(istype(W, /obj/item/tool/screwdriver) && !src.anchored)
- to_chat(user, span_notice("You fold the telepad."))
- new /obj/item/phoronics_telepad(src.loc)
- del(src)
- else
- return ..()
-
-/obj/item/phoronics_telepad
- name = "telepad"
- desc = "A bluespace telepad used for teleporting objects to and from a location."
- icon = 'icons/phoronics.dmi'
- icon_state = "pad-folded"
-
- attack_self(mob/user as mob)
- to_chat(user, span_notice("You unfold the pad."))
- var/obj/machinery/telepad_phoronics/T = new /obj/machinery/telepad_phoronics(user.loc)
- T.anchored = 0
- del(src)
-
-/*/datum/design/item/phoronics_telepad
- name = "phoronics telepad"
- id = "phoronics_telepad"
- req_tech = list("bluespace" = 2, "materials" = 3)
- materials = list(DEFAULT_WALL_MATERIAL = 1000)
- build_path = /obj/item/phoronics_telepad */
diff --git a/code/modules/busy_space/air_traffic.dm b/code/modules/busy_space/air_traffic.dm
deleted file mode 100644
index 793e5a6b9e..0000000000
--- a/code/modules/busy_space/air_traffic.dm
+++ /dev/null
@@ -1,475 +0,0 @@
-//Cactus, Speedbird, Dynasty, oh my
-//Also, massive additions/refactors by Killian, because the original incarnation was full of holes
-
-//minimum and maximum message delays, typically tracked in seconds
-#define MIN_MSG_DELAY 3
-#define MAX_MSG_DELAY 6
-
-var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
-
-/datum/lore/atc_controller
- var/delay_min = 45 MINUTES //How long between ATC traffic, minimum
- var/delay_max = 90 MINUTES //Ditto, maximum
- //Shorter delays means more traffic, which gives the impression of a busier system, but also means a lot more radio noise
- var/backoff_delay = 5 MINUTES //How long to back off if we can't talk and want to. Default is 5 mins.
- var/initial_delay = 15 MINUTES //How long to wait before sending the first message of the shift.
- var/next_message = 45 MINUTES //When the next message should happen in world.time
- var/force_chatter_type //Force a specific type of messages
-
- var/squelched = 0 //If ATC is squelched currently
-
- //define a block of frequencies so we can have them be static instead of being random for each call
- var/ertchannel
- var/medchannel
- var/engchannel
- var/secchannel
- var/sdfchannel
-
-/datum/lore/atc_controller/New()
- //generate our static event frequencies for the shift. alternately they can be completely fixed, up in the core block
- ertchannel = "[rand(700,749)].[rand(1,9)]"
- medchannel = "[rand(750,799)].[rand(1,9)]"
- engchannel = "[rand(800,849)].[rand(1,9)]"
- secchannel = "[rand(850,899)].[rand(1,9)]"
- sdfchannel = "[rand(900,999)].[rand(1,9)]"
- spawn(5 SECONDS) //Lots of lag at the start of a shift. Yes, the following lines *have* to be indented or they're not delayed by the spawn properly.
- msg("New shift beginning, resuming traffic control. This shift's Colony Frequencies are as follows: Emergency Responders: [ertchannel]. Medical: [medchannel]. Engineering: [engchannel]. Security: [secchannel]. System Defense: [sdfchannel].")
- next_message = world.time + initial_delay
- process()
-
-/datum/lore/atc_controller/process()
- if(world.time >= next_message)
- if(squelched)
- next_message = world.time + backoff_delay
- else
- next_message = world.time + rand(delay_min,delay_max)
- random_convo()
-
- spawn(1 MINUTE) //We don't really need high-accuracy here.
- process()
-
-/datum/lore/atc_controller/proc/msg(var/message,var/sender)
- ASSERT(message)
- global_announcer.autosay("[message]", sender ? sender : "[using_map.dock_name] Control")
-
-/datum/lore/atc_controller/proc/reroute_traffic(var/yes = 1)
- if(yes)
- if(!squelched)
- msg("Rerouting traffic away from [using_map.station_name].")
- squelched = 1
- else
- if(squelched)
- msg("Resuming normal traffic routing around [using_map.station_name].")
- squelched = 0
-
-/datum/lore/atc_controller/proc/shift_ending(var/evac = 0)
- //CHOMPStation Edit Start TFF 28/12/19 - Shuttle transfer, not Tram.
- msg("Automated Shuttle departing [using_map.station_name] for [using_map.dock_name] on routine transfer route.","NT Automated Shuttle")
- sleep(5 SECONDS)
- msg("Automated Shuttle, cleared to complete routine transfer from [using_map.station_name] to [using_map.dock_name].")
- //CHOMPStation Edit End
-
-/datum/lore/atc_controller/proc/random_convo(var/force_chatter_type)
- var/one = pick(loremaster.organizations) //These will pick an index, not an instance
- var/two = pick(loremaster.organizations)
-
- var/datum/lore/organization/source = loremaster.organizations[one] //Resolve to the instances
- var/datum/lore/organization/secondary = loremaster.organizations[two] //repurposed for new fun stuff
-
- //Let's get some mission parameters, pick our first ship
- var/name = source.name //get the name
- var/owner = source.short_name //Use the short name
- var/prefix = pick(source.ship_prefixes) //Pick a random prefix
- var/firstid = "[rand(0,9)][rand(0,9)][rand(0,9)][rand(0,9)]"
- var/mission = source.ship_prefixes[prefix] //The value of the prefix is the mission type that prefix does
- var/shipname = pick(source.ship_names) //Pick a random ship name
- var/destname = pick(source.destination_names) //destination is where?
- var/slogan = pick(source.slogans) //god help you all
- var/org_type = source.org_type //which group do we belong to?
-
- //pick our second ship
- //var/secondname = secondary.name //not used atm, commented out to suppress errors
- var/secondowner = secondary.short_name
- var/secondprefix = pick(secondary.ship_prefixes) //Pick a random prefix
- var/secondid = "[rand(0,9)][rand(0,9)][rand(0,9)][rand(0,9)]"
- var/secondshipname = pick(secondary.ship_names) //Pick a random ship name
- var/org_type2 = secondary.org_type
-
- //DEBUG BLOCK
- //to_world("DEBUG OUTPUT 1: [name], [owner], [prefix], [firstid], [mission], [shipname], [org_type], [destname]")
- //to_world("DEBUG OUTPUT 2: [secondowner], [secondprefix], [secondid], [secondshipname], [org_type2]")
- //to_world("DEBUG OUTPUT 3: Chose [chatter_type]")
- //DEBUG BLOCK ENDS
-
- var/combined_first_name = "[prefix] [firstid] |[shipname]|" //formal traffic control identifier for use in messages
- var/short_first_name = "[prefix] |[shipname]|" //special variant for certain events
- var/comm_first_name = "[owner] [shipname]" //corpname + shipname for speaker identity in log
- var/combined_second_name = "[secondprefix] [secondid] |[secondshipname]|"
- var/comm_second_name = "[secondowner] [secondshipname]"
- //var/short_second_name = "[secondprefix] |[secondshipname]|" //not actually used for now
-
- var/mission_noun = pick(source.flight_types) //pull from a list of owner-specific flight ops, to allow an extra dash of flavor
- if(source.complex_tasks) //if our source has the complex_tasks flag, regenerate with a two-stage assignment
- mission_noun = "[pick(source.task_types)] [pick(source.flight_types)]"
-
- //First response is 'yes', second is 'no'
- var/requests = list(
- "special flight rules" = list("authorizing special flight rules", "denying special flight rules, not allowed for your traffic class"),
- "current solar weather info" = list("sending you the relevant information via tightbeam", "your request has been queued, stand by"),
- "sector aerospace priority" = list("affirmative, sector aerospace priority is yours", "negative, another vessel in your sector has priority right now"),
- "system traffic info" = list("sending you current traffic info", "request queued, please hold"),
- "refueling information" = list("sending refueling information now", "depots currently experiencing fuel shortages, advise you move on"),
- "a current system time sync" = list("sending time sync ping to you now", "your ship isn't compatible with our time sync, set time manually"),
- "current system starcharts" = list("transmitting current starcharts", "your request is queued, overloaded right now")
- )
-
- //Random chance things for variety
- var/chatter_type = "normal"
- if(force_chatter_type)
- chatter_type = force_chatter_type
- else if((org_type == "government" || org_type == "neutral" || org_type == "military" || org_type == "corporate" || org_type == "system defense" || org_type == "spacer") && org_type2 == "pirate") //this is ugly but when I tried to do it with !='s it fired for pirate-v-pirate, still not sure why. might as well stick it up here so it takes priority over other combos.
- chatter_type = "distress"
- else if(org_type == "corporate") //corporate-specific subset for the slogan event. despite the relatively high weight it was still quite rare in tests.
- chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",180;"dockingrequestgeneric",30;"undockingrequest","normal",30;"undockingdenied",50;"slogan",25;"civvieleaks",25;"report_to_dock")
- else if((org_type == "government" || org_type == "neutral" || org_type == "military"))
- chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",180;"dockingrequestgeneric",30;"undockingrequest","normal",30;"undockingdenied",25;"civvieleaks",25;"report_to_dock")
- else if(org_type == "spacer")
- chatter_type = pick(5;"emerg",15;"policescan",15;"traveladvisory",5;"pathwarning",150;"dockingrequestgeneric",30;"undockingrequest","normal",10;"undockingdenied",25;"civvieleaks",25;"report_to_dock")
-
- //the following filters *always* fire their 'unique' event when they're tripped, simply because the conditions behind them are quite rare to begin with
- else if(org_type == "smuggler" && org_type2 != "system defense") //just straight up funnel smugglers into always being caught, otherwise we get them asking for traffic info and stuff
- chatter_type = "policeflee"
- else if(org_type == "smuggler" && org_type2 == "system defense") //ditto, if an SDF ship catches them
- chatter_type = "policeshipflee"
- else if((org_type == "smuggler" || org_type == "pirate") && (org_type2 == "system defense" || org_type2 == "military")) //if we roll this combo instead, time for the SDF or Mercs to do their fucking jobs
- chatter_type = "policeshipcombat"
- else if((org_type == "smuggler" || org_type == "pirate") && org_type2 != "system defense") //but if we roll THIS combo, time to alert the SDF to get off their asses
- chatter_type = "hostiledetected"
- //SDF-specific events that need to filter based on the second party (basically just the following SDF-unique list with the soft-result ship scan thrown in)
- else if(org_type == "system defense" && (org_type2 == "government" || org_type2 == "neutral" || org_type2 == "military" || org_type2 == "corporate" || org_type2 == "spacer")) //let's see if we can narrow this down, I didn't see many ship-to-ship scans
- chatter_type = pick(75;"policeshipscan","sdfpatrolupdate",75;"sdfendingpatrol",180;"dockingrequestgeneric",20;"undockingrequest",75;"sdfbeginpatrol",50;"normal",10;"civvieleaks",70;"sdfchatter")
- //SDF-specific events that don't require the secondary at all, in the event that we manage to roll SDF + hostile/smuggler or something
- else if(org_type == "system defense")
- chatter_type = pick("sdfpatrolupdate",60;"sdfendingpatrol",120;"dockingrequestgeneric",20;"undockingrequest",80;"sdfbeginpatrol","normal","sdfchatter")
- //if we somehow don't match any of the other existing filters once we've run through all of them
- else
- chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",90;"dockingrequestgeneric",30;"undockingrequest",30;"undockingdenied","normal",25;"civvieleaks")
- //I probably should do some kind of pass here to work through all the possible combinations of major factors and see if the filtering list needs reordering or modifying, but I really can't be arsed
-
- var/yes = prob(90) //Chance for them to say yes vs no
-
- var/request = pick(requests)
- var/callname = "[using_map.dock_name] Control"
- var/response = requests[request][yes ? 1 : 2] //1 is yes, 2 is no
- var/number = rand(1,42)
- var/zone = pick("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
- //fallbacks in case someone sets the dock_type on the map datum to null- it defaults to "station" normally
- var/landing_zone = "LZ [zone]"
- var/landing_type = "landing zone"
- var/landing_move = "landing request"
- var/landing_short = "land"
- switch(using_map.dock_type)
- if("surface") //formal installations with proper facilities
- landing_zone = "landing pad [number]"
- landing_type = "landing pad"
- landing_move = "landing request"
- landing_short = "land"
- callname = "[using_map.dock_name] Tower"
- if("frontier") //for frontier bases - landing spots are literally just open ground, maybe concrete at best
- landing_zone = "LZ [zone]"
- landing_type = "landing zone"
- landing_move = "landing request"
- landing_short = "land"
- callname = "[using_map.dock_name] Tower"
- if("station") //standard station pattern
- landing_zone = "docking bay [number]"
- landing_type = "docking bay"
- landing_move = "docking request"
- landing_short = "dock"
- callname = "[using_map.dock_name] Control"
-
- // what you're about to witness is what feels like an extremely kludgy rework of the system, but it's more 'flexible' and allows events that aren't just ship-stc-ship
- // something more elegant could probably be done, but it won't be done by somebody as half-competent as me
- switch(chatter_type)
- //mayday call
- if("emerg")
- var/problem = pick("We have hull breaches on multiple decks","We have unknown hostile life forms on board","Our primary drive is failing","We have [pick("asteroids","space debris")] impacting the hull","We're experiencing a total loss of engine power","We have hostile ships closing fast","There's smoke [pick("in the cockpit","on the bridge")]","We have unidentified boarders","Our reaction control system is malfunctioning and we're losing stability","Our life support [pick("is failing","has failed")]")
- msg("+[pick("Mayday, mayday, mayday!","Mayday, mayday!","Mayday! Mayday!")]+ [combined_first_name], declaring an emergency! [problem]!","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Switch to emergency responder channel [ertchannel].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[callname], [combined_first_name] switching now.","[comm_first_name]")
- //Control scan event: soft outcome
- if("policescan")
- var/confirm = pick("Understood","Roger that","Affirmative","Very well","Copy that")
- var/complain = pick("I hope this doesn't take too long.","Can we hurry this up?","Make it quick.","This better not take too long.","Is this really necessary?","I'm sure you'll find everything to be in order, Control.")
- var/completed = pick("You're free to proceed.","Everything looks fine, carry on.","You're clear, move along.","Apologies for the delay, you're clear.","Switch to channel [sdfchannel] and await further instruction.")
- msg("[combined_first_name], [callname], your [pick("ship","vessel","starship")] has been flagged for routine inspection. Hold position and prepare to be scanned.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[confirm] [callname], holding position.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Your compliance is appreciated, [combined_first_name]. Scan commencing.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*2 SECONDS)
- msg(complain,"[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*3 SECONDS)
- msg("[combined_first_name], [callname]. Scan complete. [completed]")
- //Control scan event: hard outcome
- if("policeflee")
- var/uhoh = pick("No can do chief, we got places to be.","Sorry but we've got places to be.","Not happening.","Ah fuck, who ratted us out this time?!","You'll never take me alive!","Hey, I have a cloaking device! You can't see me!","I'm going to need to ask for a refund on that stealth drive...","I'm afraid I can't do that, Control.","Ah |hell|.","Fuck!","This isn't the ship you're looking for.","Well. This is awkward.","Uh oh.","I surrender!","Ah f- |ditch the containers!| +Now!+","Unless you have something a little +bigger+ in your torpedo tubes, we're |not| turning around!")
- msg("Unknown [pick("ship","vessel","starship")], [callname], identify yourself and submit to a full inspection. Flying without an active transponder is a violation of interstellar shipping regulations.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[uhoh]","Unknown Vessel")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[using_map.starsys_name] Defense Control to all local assets: vector to interdict and detain [prefix], temporary callsign |[shipname]|. Control out.","[using_map.starsys_name] Defense Control")
- //SDF scan event: soft outcome
- if("policeshipscan")
- var/confirm = pick("Understood","Roger that","Affirmative")
- var/complain = pick("I hope this doesn't take too long.","Can we hurry this up?","Make it quick.","This better not take too long.","Is this really necessary?","I'm sure you'll find everything to be in order, officer.")
- var/completed = pick("You're free to proceed.","Everything looks fine, carry on.","You're clear. Move along.","Apologies for the delay, you're clear.","Switch to channel [sdfchannel] and await further instruction.")
- msg("[combined_second_name], [combined_first_name], your [pick("ship","vessel","starship")] has been flagged for routine inspection. Hold position and prepare to be scanned.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[confirm] [combined_first_name], holding position.","[comm_second_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Your compliance is appreciated, [combined_second_name]. Scan commencing.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*2 SECONDS)
- msg(complain,"[comm_second_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*3 SECONDS)
- msg("[combined_second_name], [combined_first_name]. Scan complete. [completed]","[comm_first_name]")
- //SDF scan event: hard outcome
- if("policeshipflee")
- var/uhoh = pick("No can do chief, we got places to be.","Sorry but we've got places to be.","Not happening.","Ah fuck, who ratted us out this time?!","You'll never take me alive!","Hey, I have a cloaking device! You can't see me!","I'm going to need to ask for a refund on that stealth drive...","I'm afraid I can't do that, |[shipname]|.","Ah |hell|.","Fuck!","This isn't the ship you're looking for.","Well. This is awkward.","Uh oh.","I surrender!","Ah f- |ditch the containers!| +Now!+","Unless you have something a little +bigger+ in your torpedo tubes, we're |not| turning around!")
- msg("Unknown [pick("ship","vessel","starship")], [combined_second_name], identify yourself and submit to a full inspection. Flying without an active transponder is a violation of interstellar shipping regulations.","[comm_second_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[uhoh]","Unknown Vessel")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[using_map.starsys_name] Defense Control, [combined_second_name]. We have a [prefix] here, please advise.","[comm_second_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Defense Control copies, [combined_second_name], reinforcements are en route. Switch further communications to encrypted band [sdfchannel].","[using_map.starsys_name] Defense Control")
- //SDF scan event: engage primary in combat! fairly rare since it needs a pirate/vox + SDF roll
- if("policeshipcombat")
- var/battlestatus = pick("requesting reinforcements.","we need backup! Now!","holding steady.","we're holding our own for now.","we have them on the run.","they're trying to make a run for it!","we have them right where we want them.","we're badly outgunned!","we have them outgunned.","we're outnumbered here!","we have them outnumbered.","this'll be a cakewalk.",10;"notify their next of kin.")
- msg("[using_map.starsys_name] Defense Control, [combined_second_name], engaging [combined_first_name] [pick("near route","in sector")] [rand(1,100)], [battlestatus]","[comm_second_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[using_map.starsys_name] Defense Control copies, [combined_second_name]. Keep us updated.","[using_map.starsys_name] Defense Control")
- //SDF event: patrol update
- if("sdfpatrolupdate")
- var/statusupdate = pick("nothing unusual so far","nothing of note","everything looks clear so far","ran off some [pick("pirates","scavengers")] near route [pick(1,100)], [pick("no","minor")] damage sustained, continuing patrol","situation normal, no suspicious activity yet","minor incident on route [pick(1,100)]","Code 7-X [pick("on route","in sector")] [pick(1,100)], situation is under control","seeing a lot of traffic on route [pick(1,100)]","caught a couple of smugglers [pick("on route","in sector")] [pick(1,100)]","sustained some damage in a skirmish just now, we're heading back for repairs")
- msg("[using_map.starsys_name] Defense Control, [combined_first_name] reporting in, [statusupdate], over.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[using_map.starsys_name] Defense Control copies, [combined_first_name]. Keep us updated, out.","[using_map.starsys_name] Defense Control")
- //SDF event: end patrol
- if("sdfendingpatrol")
- var/appreciation = pick("Copy","Understood","Affirmative","10-4","Roger that")
- var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
- msg("[callname], [combined_first_name], returning from our system patrol route, requesting permission to [landing_short].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[appreciation], [callname]. [dockingplan]","[comm_first_name]")
- //SDF event: general chatter
- if("sdfchatter")
- var/chain = pick("codecheck","commscheck")
- switch(chain)
- if("codecheck")
- msg("Check. Check. |Check|. Uhhh... check? Wait. Wait! Hold on. Yeah, okay, I gotta call this one in.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[callname], confirm auth-code... [rand(1,9)][rand(1,9)][rand(1,9)]-[pick("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")]?","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("One moment...")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*2 SECONDS)
- msg("Yeah, that code checks out [combined_first_name].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("|(sigh)| Copy that Control. You! Move along!","[comm_first_name]")
- if("commscheck")
- msg("Control this is [combined_first_name], we're getting some interference in our area. [pick("How's our line?","Do you read?","How copy, over?")]","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Control reads you loud and clear [combined_first_name].","[using_map.starsys_name] Defense Control")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[pick("Copy that","Thanks,","Roger that")] Control. [combined_first_name] out.","[comm_first_name]")
- //Civil event: leaky chatter
- if("civvieleaks")
- var/commleak = pick("thatsmywife","missingkit","pipeleaks","weirdsmell","weirdsmell2","scug","teppi")
- switch(commleak)
- if("thatsmywife")
- msg("-so then I says to him, |that's no [pick("space carp","space shark","vox","garbage scow","freight liner","cargo hauler","superlifter")], that's my +wife!+| And he-","[comm_first_name]")
- if("missingkit")
- msg("-did you get the kit from down on deck [rand(1,4)]? I need th-","[comm_first_name]")
- if("pipeleaks")
- msg("I swear if these pipes keep leaking I'm going to-","[comm_first_name]")
- if("weirdsmell")
- msg("-and where the hell is that smell coming fr-","[comm_first_name]")
- if("weirdsmell2")
- msg("-hat in the [pick("three","five","seven","nine")] hells did you |eat| [pick("ensign","crewman")]? This compartment reeks of-","[comm_first_name]")
- if("scug")
- msg("-and if that weird cat of yours keeps crawling into the pipes we-","[comm_first_name]")
- if("teppi")
- msg("-at are we supposed to do with this damn cow?","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("I don't think it's a cow, sir, it looks more like a-","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], your internal comms are leaking[pick("."," again.",", again.",". |Again|.")]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Sorry Control, won't happen again.","[comm_first_name]")
- //DefCon event: hostile found
- if("hostiledetected")
- var/orders = pick("Engage on sight","Engage with caution","Engage with extreme prejudice","Engage at will","Search and destroy","Bring them in alive, if possible","Interdict and detain","Keep your eyes peeled","Bring them in, dead or alive","Stay alert")
- msg("This is [using_map.starsys_name] Defense Control to all SDF assets. Priority update follows.","[using_map.starsys_name] Defense Control")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Be on the lookout for [short_first_name], last sighted [pick("near route","in sector","near sector")] [rand(1,100)]. [orders]. DefCon, out.","[using_map.starsys_name] Defense Control")
- //Ship event: distress call, under attack
- if("distress")
- var/state = pick(66;"calm",34;"panic")
- switch(state)
- if("calm")
- msg("[using_map.starsys_name] Defense Control, [combined_first_name].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [using_map.starsys_name] Defense Control.","[using_map.starsys_name] Defense Control")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Another vessel in our area is moving [pick("aggressively","suspiciously","erratically","unpredictably","with clear hostile intent")], please advise? Forwarding sensor data now.","[comm_first_name]","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [using_map.starsys_name] Defense Control copies. Sensor data matches logged profile for [secondprefix] |[secondshipname]|. SDF units are en route to your location.","[using_map.starsys_name] Defense Control")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[pick("Appreciated","Copy that","Understood")], Control. Switching to [sdfchannel] to coordinate.","[comm_first_name]")
- if("panic")
- msg("+Mayday, mayday, mayday!+ This is [combined_first_name] declaring an emergency! We are under attack! Requesting immediate assistance!","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [using_map.starsys_name] Defense Control. SDF is en route, contact on [sdfchannel].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[pick("Copy that","Understood")] [using_map.starsys_name] Defense Control, switching now!","[comm_first_name]")
- //Control event: travel advisory
- if("traveladvisory")
- var/flightwarning = pick("Solar flare activity is spiking and expected to cause issues along main flight lanes [rand(1,33)], [rand(34,67)], and [rand(68,100)]","Pirate activity is on the rise, stay close to System Defense vessels","We're seeing a rise in illegal salvage operations, please report any unusual activity to the nearest SDF vessel via channel [sdfchannel]","A quarantined [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","A prison [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","Traffic volume is higher than normal, expect processing delays","Anomalous bluespace activity detected [pick("along route [rand(1,100)]","in sector [rand(1,100)]")], exercise caution","Smugglers have been particularly active lately, expect increased security scans","Depots are currently experiencing a fuel shortage, expect delays and higher rates","Asteroid mining has displaced debris dangerously close to main flight lanes on route [rand(1,100)], watch for potential impactors","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship","mining barge","salvage trawler")] has collided with [pick("a fuel tanker","a cargo liner","a passenger liner","a freighter","a transport ship","a mining barge","a salvage trawler","a meteoroid","a cluster of space debris","an asteroid","an ice-rich comet")] near route [rand(1,100)], watch for debris and do not impede emergency service vessels","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship","mining barge","salvage trawler")] on route [rand(1,100)] has experienced total engine failure. Emergency response teams are en route, please observe minimum safe distances and do not impede emergency service vessels","Transit routes have been recalculated to adjust for planetary drift. Please synch your astronav computers as soon as possible to avoid delays and difficulties","[pick("Bounty hunters","System Defense officers","Mercenaries")] are currently searching for a wanted fugitive, report any sightings of suspicious activity to System Defense via channel [sdfchannel]",10;"It's space [pick("carp","shark")] breeding season. [pick("Stars","Skies","Gods","God","Goddess","Fates")] have mercy on you all","We're reading [pick("void","drive","sensor")] echoes that are consistent with illegal cloaking devices, be alert for suspicious activity in your sector")
- msg("[callname], all vessels in the [using_map.starsys_name] system. Priority travel advisory follows.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[flightwarning]. Control out.")
- //Control event: warning to a specific vessel
- if("pathwarning")
- var/navhazard = pick("a pocket of intense radiation","a pocket of unstable gas","a debris field","a secure installation","an active combat zone","a quarantined ship","a quarantined installation","a quarantined sector","a live-fire SDF training exercise","an ongoing Search & Rescue operation","a hazardous derelict","an intense electrical storm","an intense ion storm","a shoal of space carp","a pack of space sharks","an asteroid infested with gnat hives","a protected space ray habitat","a region with anomalous bluespace activity","a rogue comet")
- var/confirm = pick("Understood","Roger that","Affirmative","Our bad","Thanks for the heads up")
- msg("[combined_first_name], [callname]. Your [pick("ship","vessel","starship")] is approaching [navhazard], observe minimum safe distance and adjust your heading appropriately.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[confirm] [callname], adjusting course.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Your compliance is appreciated, [combined_first_name].")
- //Control event: personnel report to dock
- if("report_to_dock")
- var/situation_type = pick("medical","security","engineering","animal control","hazmat")
- msg("This is [using_map.dock_name] Tower. Would a free [situation_type] team please report to [landing_zone] immediately. This is not a drill.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*10 SECONDS)
- msg("Repeat, any free [situation_type] team, report to [landing_zone] immediately. This is +not+ a drill.")
- //Ship event: docking request (generic)
- if("dockingrequestgeneric")
- var/request_type = pick(100;"generic",50;"delayed",80;"supply",30;"repair",30;"medical",30;"security")
- var/appreciation = pick("Much appreciated","Many thanks","Understood","Perfect, thank you","Excellent, thanks","Great","Copy that")
- var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
- switch(request_type)
- if("generic")
- msg("[callname], [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
- if("delayed")
- var/reason = pick(
- "we don't have any free [landing_type]s right now, please [pick("stand by for a couple of minutes","hold for a few minutes")]",
- "you're too far away, please close to ten thousand meters","we're seeing heavy traffic around the [landing_type]s right now, please [pick("stand by for a couple of minutes","hold for a few minutes")]","ground crews are currently clearing up [pick("loose containers","a fuel spill")] to free up one of our [landing_type]s, please [pick("stand by for a couple of minutes","hold for a few minutes")]","another vessel has aerospace priority right now, please [pick("stand by for a couple of minutes","hold for a few minutes")]")
- msg("[callname], [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Request denied, [reason] and resubmit your request.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Understood, [callname].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*60 SECONDS)
- msg("[callname], [combined_first_name], resubmitting [landing_move].","[comm_first_name]")
- sleep (5 SECONDS)
- msg("[combined_first_name], [callname]. Everything appears to be in order now, permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
- if("supply")
- var/preintensifier = pick(75;"getting ",75;"running ","",15;"like, ") //whitespace hack, sometimes they'll add a preintensifier, but not always
- var/intensifier = pick("very","pretty","critically","extremely","dangerously","desperately","kinda","a little","a bit","rather","sorta")
- var/low_thing = pick("ammunition","munitions","clean water","food","spare parts","medical supplies","reaction mass","gas","hydrogen fuel","phoron fuel","fuel",10;"tea",10;"coffee",10;"soda",10;"pizza",10;"beer",10;"booze",10;"vodka",10;"snacks") //low chance of a less serious shortage
- appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
- msg("[callname], [combined_first_name]. We're [preintensifier][intensifier] low on [low_thing]. Requesting permission to [landing_short] for resupply.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
- if("repair")
- var/damagestate = pick("We've experienced some hull damage","We're suffering minor system malfunctions","We're having some [pick("weird","strange","odd","unusual")] technical issues","We're overdue maintenance","We have several minor space debris impacts","We've got some battle damage here","Our reactor output is fluctuating","We're hearing some weird noises from the [pick("engines","pipes","ducting","HVAC")]","We just got caught in a solar flare","We had a close call with an asteroid","We have a [pick("minor","mild","major","serious")] [pick("fuel","water","oxygen","gas")] leak","We have depressurized compartments","We have a hull breach","One of our [pick("hydraulic","pneumatic")] systems has depressurized","Our [pick("life support","water recycling system","navcomp","shield generator","reaction control system","auto-repair system","repair drone controller","artificial gravity generator","environmental control system","master control system")] is [pick("failing","acting up","on the fritz","shorting out","glitching out","freaking out","malfunctioning")]")
- appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
- msg("[callname], [combined_first_name]. [damagestate]. Requesting permission to [landing_short] for repairs and maintenance.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Repair crews are standing by, contact them on channel [engchannel].")
- if("medical")
- var/species = pick("human","humanoid","unathi","lizard","tajaran","feline","skrell","akula","promethean","sergal","synthetic","robotic","teshari","avian","vulpkanin","canine","vox","zorren","hybrid","mixed-species","vox","grey","alien",5;"catslug")
- var/medicalstate = pick("multiple casualties","several cases of radiation sickness","an unknown virus","an unknown infection","a critically injured VIP","sick refugees","multiple cases of food poisoning","injured [pick("","[species] ")]passengers","sick [pick("","[species] ")]passengers","injured engineers","wounded marines","a delicate situation","a pregnant passenger","injured [pick("","[species] ")]castaways","recovered escape pods","unknown escape pods")
- appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
- msg("[callname], [combined_first_name]. We have [medicalstate] on board. Requesting permission to [landing_short] for medical assistance.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Medtechs are standing by, contact them on channel [medchannel].")
- if("security")
- var/species = pick("human","humanoid","unathi","lizard","tajaran","feline","skrell","akula","promethean","sergal","synthetic","robotic","teshari","avian","vulpkanin","canine","vox","zorren","hybrid","mixed-species","vox","grey","alien",5;"catslug")
- var/securitystate = pick("several [species] convicts","a captured pirate","a wanted criminal","[species] stowaways","incompetent [species] shipjackers","a delicate situation","a disorderly passenger","disorderly [species] passengers","ex-mutineers","stolen goods","[pick("a container","containers")] full of [pick("confiscated contraband","stolen goods")]",5;"a very lost shadekin",10;"some kinda big wooly critter",15;"a buncha lost-looking uh... cat... slug... |things?|",10;"a raging case of [pick("spiders","crabs","geese","gnats","sharks","carp")]") //gotta have a little something to lighten the mood now and then
- appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","Perfect, thank you")
- msg("[callname], [combined_first_name]. We have [securitystate] on board and require security assistance. Requesting permission to [landing_short].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Security teams are standing by, contact them on channel [secchannel].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[appreciation], [callname]. [dockingplan]","[comm_first_name]")
- //Ship event: undocking request
- if("undockingrequest")
- var/request_type = pick(150;"generic",50;"delayed")
- var/takeoff = pick("depart","launch")
- var/safetravels = pick("Fly safe out there","Good luck","Safe travels","See you next week","Godspeed","Stars guide you")
- var/thanks = pick("Appreciated","Thanks","Don't worry about us","We'll be fine","You too","So long")
- msg("[callname], [combined_first_name], requesting permission to [takeoff] from [landing_zone].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- switch(request_type)
- if("generic")
- msg("[combined_first_name], [callname]. Permission granted. Docking clamps released. [safetravels].")
- if("delayed")
- var/denialreason = pick("Docking clamp malfunction, please hold","Fuel lines have not been secured","Ground crew are still on the pad","Loose containers are on the pad","Exhaust deflectors are not yet in position, please hold","There's heavy traffic right now, it's not safe for your vessel to launch","Another vessel has aerospace priority at this moment","Port officials are still aboard")
- msg("Negative [combined_first_name], request denied. [denialreason]. Try again in a few minutes.")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY)*60 SECONDS)
- msg("[callname], [combined_first_name], re-requesting permission to depart from [landing_zone].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Everything appears to be in order now, permission granted. Docking clamps released. [safetravels].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[thanks], [callname]. This is [combined_first_name] setting course for [destname], out.","[comm_first_name]")
- //SDF event: starting patrol
- if("sdfbeginpatrol")
- var/safetravels = pick("Fly safe out there","Good luck","Good hunting","Safe travels","Godspeed","Stars guide you")
- var/thanks = pick("Appreciated","Thanks","Don't worry about us","We'll be fine","You too")
- var/takeoff = pick("depart","launch","take off","dust off")
- msg("[callname], [combined_first_name], requesting permission to [takeoff] from [landing_zone] to begin system patrol.","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname]. Permission granted. Docking clamps released. [safetravels].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[thanks], [callname]. This is [combined_first_name] beginning system patrol, out.","[comm_first_name]")
- //Ship event: undocking request (denied)
- if("undockingdenied")
- var/takeoff = pick("depart","launch")
- var/denialreason = pick("Security is requesting a full cargo inspection","Your ship has been impounded for multiple [pick("security","safety")] violations","Your ship is currently under quarantine lockdown","We have reason to believe there's an issue with your papers","Security personnel are currently searching for a fugitive and have ordered all outbound ships remain grounded until further notice")
- msg("[callname], [combined_first_name], requesting permission to [takeoff] from [landing_zone].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("Negative [combined_first_name], request denied. [denialreason].")
- if("slogan")
- msg("The following is a sponsored message from [name].","Facility PA")
- sleep(5 SECONDS)
- msg("[slogan]","Facility PA")
- else //time for generic message
- msg("[callname], [combined_first_name] on [mission] [pick(mission_noun)] to [destname], requesting [request].","[comm_first_name]")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[combined_first_name], [callname], [response].")
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- msg("[callname], [yes ? "thank you" : "understood"], out.","[comm_first_name]")
- return //oops, forgot to restore this
-
-/* //OLD BLOCK, for reference
- //Ship sends request to ATC
- msg(full_request,"[comm_first_name]"
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- //ATC sends response to ship
- msg(full_response)
- sleep(rand(MIN_MSG_DELAY,MAX_MSG_DELAY) SECONDS)
- //Ship sends response to ATC
- msg(full_closure,"[comm_first_name]")
- return
-*/
-
-#undef MIN_MSG_DELAY
-#undef MAX_MSG_DELAY
diff --git a/code/modules/interserver shipping/_shipping_globals.dm b/code/modules/interserver shipping/_shipping_globals.dm
deleted file mode 100644
index 16b394d0e1..0000000000
--- a/code/modules/interserver shipping/_shipping_globals.dm
+++ /dev/null
@@ -1,11 +0,0 @@
-// The location where we spawn shipping stuff that's returned or arrived.
-var/turf/shippping_return = null
-
-// The global list of IDs and pathnames we accept from other places.
-var/list/global_shipping_ids = list()
-
-// The reverse of the dictionary above. path -> id.
-var/list/global_shipping_paths = list()
-
-// The global list of received requests, sorted by their IP of origin.
-var/list/shipping_contacts = list("origin" = list())
diff --git a/code/modules/interserver shipping/computer_yw.dm b/code/modules/interserver shipping/computer_yw.dm
deleted file mode 100644
index b95c49616d..0000000000
--- a/code/modules/interserver shipping/computer_yw.dm
+++ /dev/null
@@ -1,183 +0,0 @@
-#define SERVERS 0
-#define OPTIONS 1
-#define RECEIVE 2
-#define REC_CONF 3
-#define SENDING 4
-#define CHAT 5
-
-/obj/machinery/computer/interservershipping
- name = "Shipping Computer"
- desc = "Used to send illicit goods to other stations with real humans."
- icon_keyboard = "med_key"
- icon_screen = "crew"
- light_color = "#315ab4"
- use_power = 1
-
- var/screen = SERVERS
- var/datum/shippingservers/server = null
- var/datum/shipping_request/request = null
-
-/obj/machinery/computer/interservershipping/Destroy()
- request = null
- server = null
- return ..()
-
-/obj/machinery/computer/interservershipping/attack_ai(mob/user)
- return attack_hand(user)
-
-/obj/machinery/computer/interservershipping/attack_hand(mob/user)
- ui_interact(user)
-
-/obj/machinery/computer/interservershipping/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- user.set_machine(src)
-
- var/data[0]
- data["screen"] = screen
- data["error"] = 0
- switch (screen)
- if (SERVERS)
- if (!config.authedservers.len)
- data["error"] = 1
- data["error_msg"] = "We could not establish communication with any other stations."
- else
- var/list/temp = list()
- for (var/A in config.authedservers)
- var/datum/shippingservers/serv = config.authedservers[A]
- if (serv)
- temp += list(list("name" = serv.servername, "ref" = "\ref[serv]"))
- data["servers"] = temp
- if (OPTIONS)
- if (!server)
- data["error"] = 1
- data["error_msg"] = "Connection to the station lost. Resetting."
- else
- data["server"] = server.servername
- data["requests"] = 0
- if (shipping_contacts[server.serverip])
- var/list/A = shipping_contacts[server.serverip]
- data["requests"] = A.len
- if (RECEIVE)
- if (!server)
- data["error"] = 1
- data["error_msg"] = "Connection to the station lost. Resetting."
- else
- data["server"] = server.servername
- var/list/requests = shipping_contacts[server.serverip]
- var/list/temp = list()
- if (requests && requests.len)
- for (var/A in requests)
- var/datum/shipping_request/req = A
- temp += list(list("id" = req.request_id, "item_count" = req.items.len, "ref" = "\ref[req]"))
- data["requests"] = temp
- if (REC_CONF)
- if (!request || !server)
- data["error"] = 1
- data["error_msg"] = "Shipping request expired."
- else
- data["id"] = request.request_id
- data["server"] = server.servername
- var/list/temp = list()
- for (var/A in request.items)
- temp += list(list("id" = A, "count" = request.items[A]))
- data["items"] = temp
- if (SENDING)
- // TODO: Implement SENDING
- if (CHAT)
- // TODO: Implement CHAT
- else
- data["error"] = 1
- data["error_msg"] = "u wot m8"
-
- ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
- ui = new(user, src, ui_key, "server_shipping.tmpl", src.name, 400, 500)
- ui.set_initial_data(data)
- ui.open()
-
-/obj/machinery/computer/interservershipping/Topic(href, href_list)
- if (..())
- return 1
-
- if (href_list["switch_menu"])
- var/new_menu = text2num(href_list["switch_menu"])
- screen = sanitize_integer(new_menu, 0, 5, 0)
-
- if (screen == REC_CONF)
- if (href_list["shipment"])
- var/datum/shipping_request/req = locate(href_list["shipment"])
- if (!req || !istype(req))
- screen = SERVERS
- else
- request = req
- else if (href_list["select_station"])
- var/datum/shippingservers/serv = locate(href_list["select_station"])
- if (!serv || !istype(serv))
- screen = SERVERS
- else
- server = serv
- screen = OPTIONS
- else if (href_list["confirm"])
- // Confirmation == TRUE or FALSE
- var/confirmation = text2num(href_list["confirm"])
- do_confirm(confirmation, usr)
-
- src.add_fingerprint(usr)
- src.updateUsrDialog(usr)
- return
-
-/obj/machinery/computer/interservershipping/proc/do_confirm(var/confirmation, var/mob/user)
- if (!user || !istype(user) || !user.client)
- return
-
- if (!request)
- return
-
- if (confirmation)
- request.inbound_accepted(user.ckey)
- else
- request.inbound_denied(user.ckey)
-
- request = null
- screen = RECEIVE
-
-
-
-
-/obj/machinery/intershipreceiver
- name = "Bluespace package receiver"
- desc = "Push crate in, be amaze."
- var/list/inserted = list()
-
-/obj/machinery/intershipreceiver/Bumped(atom/movable/bumper)
- if(istype(bumper, /obj/structure/closet/crate))
- inserted += bumper
- bumper.forceMove(src)
-
-/obj/machinery/intershipreceiver/proc/GetItems(var/index)
- if(!isnull(inserted) && inserted.len > index)
- var/obj/structure/closet/crate/O = inserted[index]
- return O.contents
-
-/obj/machinery/intershipreceiver/proc/PackageSent(var/index)
- if(!isnull(inserted) && inserted.len > index)
- var/obj/structure/closet/crate/O = inserted[index]
- inserted.Remove(O)
- qdel(O)
-
-
-
-/obj/machinery/intershipdeployer
- name = "Bluespace package deployer"
- desc = "Press button, watch crate appear, be amaze."
-
-/obj/machinery/intershipdeployer/proc/SpawnPackage(var/list/objs)
- var/obj/structure/closet/crate/C = new/obj/structure/closet/crate
- C.contents = objs
- C.loc = src.loc
-
-#undef SERVERS
-#undef OPTIONS
-#undef RECEIVE
-#undef REC_CONF
-#undef SENDING
-#undef CHAT
diff --git a/code/modules/interserver shipping/shipping_api.dm b/code/modules/interserver shipping/shipping_api.dm
deleted file mode 100644
index 0c3556cdca..0000000000
--- a/code/modules/interserver shipping/shipping_api.dm
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Here lie the topic_command datums for the interserver shipping project.
- * In addition to the parameters specified, every request also requires the following two parameters:
- * @param str query The name of the command you wish to invoke.
- * @param str auth Your server's unique authorization key.
- *
- * All data is to be communicated as JSON.
- *
- * All replies will contain the following keys:
- * @param int statuscode The HTTP standard response code selected as appropriate for the query. 200 == OK.
- * @param str response The response string describing the response. Can be freeform.
- * @param mix data The data object put into the reply itself. Currently only implemented in the response to ship_ping.
- */
-
-/**
- * @name ship_send
- * @desc Command used to notify the server that another server wishes to send items to it.
- * Contains information for logging, coupled with the list of items to send.
- * @param int rid The unique ID of the shipping request from the origin server.
- * @param str ckey The ckey, canonical version, of the person who sent the request. For logging.
- * @param lst items The associated list of items to be sent. Format is: {"shipID" : count, "shipID2" : count}.
- * The list should contain only unique keys.
- */
-/datum/topic_command/shipping_send
- name = "ship_send"
- description = "API command used by other servers to initiate a trade deal."
- params = list(
- "rid" = list("name"="rid","desc"="The unique request ID of that shipping request.","req"=1,"type"="int"),
- "ckey" = list("name"="ckey","desc"="The ckey of the person sending the shipping request. For logging.","req"=1,"type"="str"),
- "items" = list("name"="items","desc"="The list of items, tied to their quantity, to be shipped.","req"=1,"type"="lst")
- )
-
-/datum/topic_command/shipping_send/run_command(queryparams)
- var/list/items = queryparams["items"]
-
- // Istype check is done upon parameter verification.
- // Now we just need to check if there's actually shit in that list.
- if (!items.len)
- statuscode = 500
- response = "No items to be sent received."
- return 1
-
- // Too many items. Nothx.
- if (items.len > 100)
- statuscode = 500
- response = "Too many items specified."
-
- // Check if someone is trying to send too many individual items.
- for (var/path in items)
- // Malformed list, no associated count.
- if (isnull(items[path]))
- statuscode = 500
- response = "Malformed list sent."
- return 1
- else if (!isnum(items[path]))
- statuscode = 500
- response = "Malformed list sent."
- return 1
- // 0 or less of any item, or more than a reasonable amouunt.
- else if (items[path] < 1 || items[path] > 100)
- statuscode = 500
- response = "Too many or too few of one item specified."
- return 1
- // Unsupported shipping ID. :ree:
- else if (isnull(global_shipping_ids[path]))
- statuscode = 500
- response = "Shipping ID [path] is not supported by the server."
- return 1
-
- // List management actions, ahoy.
- if (isnull(shipping_contacts[queryparams["addr"]]))
- shipping_contacts[queryparams["addr"]] = list()
- // Catch a duplicate RID from the same point of origin.
- else if (!isnull(shipping_contacts[queryparams["addr"]]["[queryparams["rid"]]"]))
- statuscode = 500
- response = "Shipping request of the same RID already exists."
- return 1
-
- var/datum/shipping_request/ship
- // shipping_request/New() will cough up an exception if it finds stuff not in the whitelist, or something like that.
- try
- ship = new(queryparams["rid"], queryparams["ckey"], items, FALSE, queryparams["addr"])
- catch(var/e)
- statuscode = 500
- response = e
- return 1
-
- // File it away.
- shipping_contacts[queryparams["addr"]]["[queryparams["rid"]]"] = ship
-
- // Response time.
- statuscode = 200
- response = "Request received and added to processing."
- return 1
-
-/**
- * @name ship_reply
- * @desc Command used to notify us that one of our shipments has been accepted or denied.
- * Accepted shipments will be removed and their items shitcanned, denied shipments reimbursed.
- * @param int rid The unique ID of the shipping request from our server.
- * @param str ckey The ckey, canonical version, of the person who accepted/denied the request. For logging.
- * @param int accept 1 - Request was accepted.
- * 0 - Request was denied.
- */
-/datum/topic_command/shipping_reply
- name = "ship_reply"
- description = "Command used to confirm or deny a trade deal."
- params = list(
- "rid" = list("name"="rid","desc"="The unique request ID of that shipping request.","req"=1,"type"="int"),
- "ckey" = list("name"="ckey","desc"="The ckey of the person replying to the shipping request. For logging.","req"=1,"type"="str"),
- "accept" = list("name"="accept","desc"="Boolean on whether or not the shipping request was accepted.","req"=1,"type"="int")
- )
-
-/datum/topic_command/shipping_reply/run_command(queryparams)
- // "origin" is the key where we save requests that /we/ have sent out.
- var/list/contacts = shipping_contacts["origin"]
-
- // We haven't sent out anything this round. What gives?!
- if (isnull(contacts) || !contacts.len)
- statuscode = 500
- response = "No shipping requests logged as having been sent."
- return 1
-
- var/datum/shipping_request/ship = contacts["[queryparams["rid"]]"]
-
- // We haven't sent this request. RIP.
- if (isnull(ship))
- statuscode = 500
- response = "No shipping requests logged as having been sent with this RID."
- return 1
-
- // Do the deed.
- if (queryparams["accept"])
- if (!ship.outbound_accepted())
- statuscode = 500
- response = ship.error_msg
- else
- statuscode = 200
- response = "Shipment items successfully logged as delivered."
- else
- if (!ship.outbound_denied())
- // This should never really happen. But fine.
- statuscode = 500
- response = ship.error_msg
- else
- statuscode = 200
- response = "Shipment items successfully reimbursed."
-
- // Clean it up!
- contacts -= ship
- qdel(ship)
- return 1
-
-/**
- * @name ship_msg
- * @desc Command used to send a message to the station's QM from abroad.
- * @param str ckey The ckey, canonical version, of the person who sent the message. For logging.
- * @param str msg The message to be sent.
- */
-/datum/topic_command/ship_message
- name = "ship_msg"
- description = "Sends a message to the station's QM."
- params = list(
- "ckey" = list("name"="ckey","desc"="The ckey of the person replying to the shipping request. For logging.","req"=1,"type"="str"),
- "msg" = list("name"="msg","desc"="The message you wish to send.","req"=1,"type"="str")
- )
-
-/datum/topic_command/ship_message/run_command(queryparams)
- // Gotcha.
- if (length(queryparams["msg"]) > 1000)
- statuscode = 500
- response = "Message too long."
- return 1
-
- // PLACE HOLDER EFFECT.
- world << "Message from shipping port: [queryparams["msg"]]"
- statuscode = 200
- response = "Message delivered."
- return 1
-
-/**
- * @name ship_ping
- * @desc Command used to ping the station to see if it's up and accepting requests.
- * Will also return the ship IDs of all the items it accepts.
- */
-/datum/topic_command/ship_ping
- name = "ship_ping"
- description = "Get a status and a list of accepted shiping IDs."
- no_throttle = 1
-
-/datum/topic_command/ship_ping/run_command(queryparams)
- statuscode = 200
- response = "Pong."
- data = global_shipping_ids
- return 1
diff --git a/code/modules/interserver shipping/shipping_hooks.dm b/code/modules/interserver shipping/shipping_hooks.dm
deleted file mode 100644
index 3f8b098665..0000000000
--- a/code/modules/interserver shipping/shipping_hooks.dm
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Hooks to set up the shipping system for the round.
- */
-
-// Snowflake marker for now. Because easy modularity.
-/obj/effect/landmark/shipping_marker/Initialize(mapload)
- switch (name)
- if ("return")
- shippping_return = loc
-
- delete_me = TRUE
- . = ..()
-
-/**
- * Does all of the shipping ID init at round start.
- */
-/hook/startup/proc/initialize_shipping()
- if (!shippping_return)
- error("Global shipping return point is not marked.")
-
- load_shipping_ids()
-
- return 1
-
-/**
- * @name load_shipping_ids
- * @desc Will load the shipping_ids.txt and save it into the global_shipping_ids list.
- * Expects a format of "shippingID /path/to/item" per every line.
- * Will ignore all bad lines and log them as debug info.
- */
-/proc/load_shipping_ids()
- var/list/lines = file2list("config/shipping_ids.txt")
-
- for (var/line in lines)
- var/list/tuple = splittext(line, " ")
- if (!tuple || tuple.len != 2)
- log_debug("Invalid data when reading shipping_ids. '[line]'")
- continue
-
- global_shipping_ids[tuple[1]] = tuple[2]
- global_shipping_paths[tuple[2]] = tuple[1]
diff --git a/code/modules/interserver shipping/shipping_requests.dm b/code/modules/interserver shipping/shipping_requests.dm
deleted file mode 100644
index 388ba6badd..0000000000
--- a/code/modules/interserver shipping/shipping_requests.dm
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * The shipping request datum object.
- * Should be created one per every inbound or outbound request.
- */
-
-/datum/shipping_request
- var/request_id // The numeric ID of the request. Note! These can and will overlap!
- var/static/last_rid = 0 // Static to iterate the outbound RID.
- var/origin = "origin" // The IP of the originating server. "origin" if it's us.
- var/outbound = FALSE // Showcases whether or not the request is an outbound or an incoming one.
- var/author_ckey = "" // Original creator of the request, primarily for logging purposes.
- var/list/items // List of items to be sent or received. Specific format depends on circumstance.
- var/time_created // The time at which this request was created.
- var/error_msg = "Unknown error" // The error message we had appear.
-
-/**
- * Constructor
- *
- * @param int _rid The unique ID of the inbound shipping request.
- * Send null if the request is outbound.
- * @param str _ckey The canonincal ckey of the person who made the request.
- * @param lst _items If outbound is true, a list of item references to be sent.
- * If outbound is false, a list of pathnames -> count to be spawned.
- * @param bool _outbound True if request is outbound.
- * @param str _origin The IP of the orginating server. "origin" if request is outbound.
- *
- * Will raise @exception if insane arguments are sent.
- */
-/datum/shipping_request/New(_rid, _ckey, _items, _outbound, _origin)
- // Sanity check.
- if (!_ckey || !_items)
- throw EXCEPTION("Invalid arguments sent to shipping_request/New().")
-
- // For days.
- if ((!_outbound && _origin == "origin") || (_outbound && _origin != "origin"))
- throw EXCEPTION("Attempted to create a shipping_request with a bad origin.")
-
- if (_outbound)
- request_id = last_rid++
- else if (!_rid)
- throw EXCEPTION("No request ID sent when creating a new shipping_request.")
- else
- request_id = text2num(_rid)
-
- // Assignment.
- origin = _origin
- outbound = _outbound
- author_ckey = _ckey
-
- if (!islist(_items))
- throw EXCEPTION("_items was not a list when creating a new shipping_request.")
-
- items = _items
-
- time_created = world.time
-
-/**
- * Deconstructor
- */
-/datum/shipping_request/Destroy()
- items = null
- return ..()
-
-/**
- * @name outbound_accepted
- *
- * @desc Only possible for outbound requests.
- * Will destroy the items from the game world, and mark an outbound request as having been accepted.
- * @return bool TRUE if everything goes well.
- * FALSE if something fails.
- */
-/datum/shipping_request/proc/outbound_accepted()
- // Cannot accept an inbound request with this proc.
- if (!outbound)
- error_msg = "outbound_accepted called on an inbound request."
- return FALSE
-
- // Handle the deletion.
- for (var/item in items)
- if (item)
- qdel(item)
-
- items -= item
-
- return TRUE
-
-
-/**
- * @name outbound_denied
- *
- * @desc Only possible for outbound requests.
- * Will return the items to a reasonable location.
- * @return bool TRUE if everything goes well.
- * FALSE if something fails.
- */
-/datum/shipping_request/proc/outbound_denied()
- // Doesn't apply for inbound requests.
- if (!outbound)
- error_msg = "outbound_denied called on an inbound request."
- return FALSE
-
- // Teleport shit back.
- for (var/obj/I in items)
- if (I)
- I.forceMove(shippping_return)
-
- items -= I
-
- return TRUE
-
-/**
- * @name inbound_accepted
- *
- * @desc Only possible for inbound requests.
- * Will attempt to spawn the items
- * @return bool TRUE if everything goes well.
- * FALSE if something fails.
- */
-/datum/shipping_request/proc/inbound_accepted(var/accepting_ckey)
- if (outbound)
- error_msg = "inbound_accepted called on an outbound request."
- return FALSE
-
- var/out_data = json_encode(list("query" = "ship_reply", "auth" = config.shipping_auth, ckey = accepting_ckey ? accepting_ckey : "server", "accept" = 1 , "rid" = request_id))
- var/list/data = json_decode(world.Export("byond://[origin]?[out_data]"))
-
- if (!data)
- error_msg = "inbound_accepted did not receive any data."
- return FALSE
-
- if (!data["statuscode"] || data["statuscode"] != 200)
- error_msg = "Bad statuscode received. Response: [data["response"]]"
- return FALSE
-
- for (var/id in items)
- var/path = text2path(global_shipping_ids[id])
- for (var/i = 0; i < items[id]; i++)
- // Attempt to spawn and move it to the proper place.
- try
- var/obj/I = new path
- I.forceMove(shippping_return)
- catch (var/exception/e)
- error_msg = "Exception while spawning item: [e.desc]"
- return FALSE
-
- return TRUE
-
-/**
- * @name inbound_denied
- *
- * @desc Only possible for inbound requests.
- * Will discard the request.
- * @return bool TRUE if everything goes well.
- * FALSE if something fails.
- */
-/datum/shipping_request/proc/inbound_denied(var/accepting_ckey, var/port)
- if (outbound)
- error_msg = "inbound_denied called on an outbound request."
- return FALSE
-
- var/out_data = json_encode(list("query" = "ship_reply", "auth" = config.shipping_auth, ckey = accepting_ckey ? accepting_ckey : "server", "accept" = 0, "rid" = request_id))
- var/list/data = json_decode(world.Export("byond://[origin]?[out_data]"))
-
- if (!data)
- error_msg = "inbound_denied did not receive any data."
- return FALSE
-
- if (!data["statuscode"] || data["statuscode"] != 200)
- error_msg = "Bad statuscode received. Response: [data["response"]]"
- return FALSE
-
- // This shit may seem empty. But since it's a framework, people may want to handle this differently.
- // So yes, it's a placeholder. items = null is already handled in Destroy(), which should be called after this.
- return TRUE
diff --git a/code/modules/interserver shipping/testing_shenanigans.dm b/code/modules/interserver shipping/testing_shenanigans.dm
deleted file mode 100644
index aa09981455..0000000000
--- a/code/modules/interserver shipping/testing_shenanigans.dm
+++ /dev/null
@@ -1,109 +0,0 @@
-/client/verb/accept_request(var/port as text)
- set name = "Accept an inbound request"
- set category = "Shipping"
-
- if (shipping_contacts.len < 2)
- usr << "Not enough people have talked to you!"
- return
-
- var/choice = tgui_input_list(usr, "Choose the origin to review.", "Origin?", shipping_contacts)
- if (!choice || choice == "origin")
- usr << "No selection sent, or origin selected."
- return
-
- var/list/rids = shipping_contacts[choice]
-
- if (!rids || !rids.len)
- usr << "No requests pending."
- return
-
- choice = null
- choice = tgui_input_list(usr, "Choose the RID to accept or deny.", "RID?", rids)
- if (!choice)
- usr << "Cancelled."
- return
-
- var/datum/shipping_request/ship = rids[choice]
-
- if (!ship)
- usr << "Cannot find the ship! REE!"
- return
-
- choice = tgui_alert(usr, "Accept or deny?", "HRRRM?", list("Accept", "Deny")) == "Accept" ? TRUE : FALSE
-
- if (choice)
- ship.inbound_accepted()
- else
- ship.inbound_denied()
-
- rids -= ship
- qdel(ship)
-
-/client/verb/finalize_outbound(var/target as text, var/port as text)
- set name = "Finalize outbound shipping"
- set category = "Shipping"
-
- var/list/rids = shipping_contacts["origin"]
-
- if (!rids || !rids.len)
- usr << "No requests to be finalized."
- return
-
- var/choice = tgui_input_list(usr, "Choose a RID to finalize and send off!", "RID?", rids)
- if (!choice)
- usr << "Cancelled."
- return
-
- var/datum/shipping_request/ship = rids[choice]
-
- if (!ship)
- usr << "Cannot find the ship! REEE!"
- return
-
- var/list/out = list()
- for (var/obj/I in ship.items)
- if (isnull(global_shipping_paths["[I.type]"]))
- I.forceMove(shippping_return)
- else
- var/id = global_shipping_paths["[I.type]"]
- if (isnull(out[id]))
- out[id] = 1
- else
- out[id]++
-
- var/data_out = json_encode(list("query" = "ship_send", "rid" = ship.request_id, "ckey" = usr.ckey, "items" = out, "auth" = config.shipping_auth))
- var/data = json_decode(world.Export("byond://[target]?[data_out]"))
-
- if (!data)
- usr << "Failed!"
- qdel(ship)
- return
-
- if (data["statuscode"] != 200)
- usr << "Failed with [data["response"]]"
- qdel(ship)
- return
-
- usr << "Fucking done!"
-
-/client/verb/create_shipping(var/count as num)
- set name = "Create a shipment"
- set category = "Shipping"
-
- if (!count || count < 0)
- usr << "Bad count"
- return
-
- var/list/shit_to_send = list()
- for (var/i = 0; i < count; i++)
- var/obj/item/beach_ball/A = new(usr.loc)
- shit_to_send += A
-
- var/datum/shipping_request/ship
- try
- ship = new(null, usr.ckey, shit_to_send, TRUE, "origin")
- catch (var/e)
- usr << ":REE: [e]"
-
- shipping_contacts["origin"]["[ship.request_id]"] = ship
- usr << "Created"
diff --git a/code/modules/paperwork/faxmachine_vr.dm b/code/modules/paperwork/faxmachine_vr.dm
deleted file mode 100644
index 16086a6c96..0000000000
--- a/code/modules/paperwork/faxmachine_vr.dm
+++ /dev/null
@@ -1,201 +0,0 @@
-var/global/last_fax_role_request
-
-/obj/machinery/photocopier/faxmachine
- req_one_access = list()
-
-/**
- * Write the fax to disk as (potentially multiple) HTML files.
- * If the fax is a paper_bundle, do so recursively for each page.
- * returns a random unique faxid.
- */
-/obj/machinery/photocopier/faxmachine/proc/export_fax(fax) //CHOMPEdit Begin
- var faxid = "[num2text(world.realtime,12)]_[rand(9999)+1]"
- if (istype(fax, /obj/item/paper))
- var/obj/item/paper/P = fax
- var/text = "[P.name][P.info][P.stamps]";
- rustg_file_write(text, "[config.fax_export_dir]/fax_[faxid].html")
- else if (istype(fax, /obj/item/photo))
- var/obj/item/photo/H = fax
- fcopy(H.img, "[config.fax_export_dir]/photo_[faxid].png")
- var/text = "[H.name]" \
- + "" \
- + "
" \
- + "[H.scribble ? "
Written on the back:
[H.scribble]" : ""]"\
- + ""
- rustg_file_write(text, "[config.fax_export_dir]/fax_[faxid].html")
- else if (istype(fax, /obj/item/paper_bundle))
- var/def_faxid = faxid
- faxid += "_0"
- var/obj/item/paper_bundle/B = fax
- var/data = ""
- for (var/page = 1, page <= B.pages.len, page++)
- var/obj/pageobj = B.pages[page]
- var/page_faxid = export_fax_id(pageobj,def_faxid + "_[page]")
- data += "Page [page] - [pageobj.name]
"
- var/text = "[B.name][data]"
- rustg_file_write(text, "[config.fax_export_dir]/fax_[faxid].html")
- return faxid
-
-/obj/machinery/photocopier/faxmachine/proc/export_fax_id(fax,faxid)
- if (istype(fax, /obj/item/paper))
- var/obj/item/paper/P = fax
- var/text = "[P.name][P.info][P.stamps]";
- rustg_file_write(text, "[config.fax_export_dir]/fax_[faxid].html")
- else if (istype(fax, /obj/item/photo))
- var/obj/item/photo/H = fax
- fcopy(H.img, "[config.fax_export_dir]/photo_[faxid].png")
- var/text = "[H.name]" \
- + "" \
- + "
" \
- + "[H.scribble ? "
Written on the back:
[H.scribble]" : ""]"\
- + ""
- rustg_file_write(text, "[config.fax_export_dir]/fax_[faxid].html")
- return faxid
-//CHOMPEdit End
-/**
- * Call the chat webhook to transmit a notification of an admin fax to the admin chat.
- */
-/obj/machinery/photocopier/faxmachine/proc/message_chat_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/faxid, font_colour="#006100")
- if(CONFIG_GET(flag/discord_faxes_disabled)) //CHOMPEdit
- return
- if (CONFIG_GET(string/chat_webhook_url)) // CHOMPEdit
- spawn(0)
- var/query_string = "type=fax"
- query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
- query_string += "&faxid=[url_encode(faxid)]"
- query_string += "&color=[url_encode(font_colour)]"
- query_string += "&faxname=[url_encode(faxname)]"
- query_string += "&sendername=[url_encode(sender.name)]"
- query_string += "&sentname=[url_encode(sent.name)]"
- world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
- //YW EDIT //CHOMPEdit also
- var/idlen = length(faxid) + 1
- if (istype(sent, /obj/item/paper_bundle))
- var/obj/item/paper_bundle/B = sent
- faxid = copytext(faxid,1,idlen-2)
- var/faxids = "FAXMULTIID: [faxid]_0"
- var/contents = ""
-
- if((!config.nodebot_enabled) && CONFIG_GET(flag/discord_faxes_autoprint)) // CHOMPEdit
- var/faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid]_0.html") // CHOMPEdit
- contents += "\nFAX: ```[strip_html_properly(faxmsg)]```"
-
- for(var/page = 1, page <= B.pages.len, page++)
- var/curid = "[faxid]_[page]"
- faxids+= "|[curid]"
- if((!config.nodebot_enabled) && CONFIG_GET(flag/discord_faxes_autoprint)) // CHOMPEdit
- var/faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[curid].html") // CHOMPEdit
- contents += "\nFAX PAGE [page]: ```[strip_html_properly(faxmsg)]```"
-
- world.TgsTargetedChatBroadcast("MULTIFAX: [sanitize(faxname)] / [sanitize(sent.name)] - SENT BY: [sanitize(sender.name)] - [faxids] [contents]", TRUE)
- else
- var/contents = ""
- if((!config.nodebot_enabled) && CONFIG_GET(flag/discord_faxes_autoprint)) // CHOMPEdit
- var/faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") // CHOMPEdit
- contents += "\nFAX: ```[strip_html_properly(faxmsg)]```"
- world.TgsTargetedChatBroadcast("FAX: [sanitize(faxname)] / [sanitize(sent.name)] - SENT BY: [sanitize(sender.name)] - FAXID: **[sanitize(faxid)]** [contents]", TRUE)
- //YW EDIT END
-
-/**
- * Call the chat webhook to transmit a notification of a job request
- */
-/obj/machinery/photocopier/faxmachine/proc/message_chat_rolerequest(var/font_colour="#006100", var/role_to_ping, var/reason, var/jobname)
- if(CONFIG_GET(string/chat_webhook_url)) // CHOMPEdit
- spawn(0)
- var/query_string = "type=rolerequest"
- query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
- query_string += "&ping=[url_encode(role_to_ping)]"
- query_string += "&color=[url_encode(font_colour)]"
- query_string += "&reason=[url_encode(reason)]"
- query_string += "&job=[url_encode(jobname)]"
- world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
-
-//
-// Overrides/additions to stock defines go here, as well as hooks. Sort them by
-// the object they are overriding. So all /mob/living together, etc.
-//
-/datum/configuration
- var/chat_webhook_url = "" // URL of the webhook for sending announcements/faxes to discord chat.
- var/chat_webhook_key = "" // Shared secret for authenticating to the chat webhook
- var/fax_export_dir = "data/faxes" // Directory in which to write exported fax HTML files.
-
-
-/obj/machinery/photocopier/faxmachine/verb/request_roles()
- set name = "Staff Request Form"
- set category = "Object"
- set src in oview(1)
-
- var/mob/living/L = usr
-
- if(!L || !isturf(L.loc) || !isliving(L))
- return
- if(!ishuman(L) && !issilicon(L))
- return
- if(L.stat || L.restrained())
- return
- if(last_fax_role_request && (world.time - last_fax_role_request < 5 MINUTES))
- to_chat(L, span_warning("The global automated relays are still recalibrating. Try again later or relay your request in written form for processing."))
- return
-
- var/confirmation = tgui_alert(L, "Are you sure you want to send automated crew request?", "Confirmation", list("Yes", "No", "Cancel"))
- if(confirmation != "Yes")
- return
-
- var/list/jobs = list()
- for(var/datum/department/dept as anything in SSjob.get_all_department_datums())
- if(!dept.assignable || dept.centcom_only)
- continue
- for(var/job in SSjob.get_job_titles_in_department(dept.name))
- var/datum/job/J = SSjob.get_job(job)
- if(J.requestable)
- jobs |= job
-
- var/role = tgui_input_list(L, "Pick the job to request.", "Job Request", jobs)
- if(!role)
- return
-
- var/datum/job/job_to_request = SSjob.get_job(role)
- var/reason = "Unspecified"
- var/list/possible_reasons = list("Unspecified", "General duties", "Emergency situation")
- possible_reasons += job_to_request.get_request_reasons()
- reason = tgui_input_list(L, "Pick request reason.", "Request reason", possible_reasons)
-
- var/final_conf = tgui_alert(L, "You are about to request [role]. Are you sure?", "Confirmation", list("Yes", "No", "Cancel"))
- if(final_conf != "Yes")
- return
-
- var/datum/department/ping_dept = SSjob.get_ping_role(role)
- if(!ping_dept)
- to_chat(L, span_warning("Selected job cannot be requested for \[ERRORDEPTNOTFOUND] reason. Please report this to system administrator."))
- return
- var/message_color = "#FFFFFF"
- var/ping_name = null
- switch(ping_dept.name)
- if(DEPARTMENT_COMMAND)
- ping_name = "Command"
- if(DEPARTMENT_SECURITY)
- ping_name = "Security"
- if(DEPARTMENT_ENGINEERING)
- ping_name = "Engineering"
- if(DEPARTMENT_MEDICAL)
- ping_name = "Medical"
- if(DEPARTMENT_RESEARCH)
- ping_name = "Research"
- if(DEPARTMENT_CARGO)
- ping_name = "Supply"
- if(DEPARTMENT_CIVILIAN)
- ping_name = "Service"
- if(DEPARTMENT_PLANET)
- ping_name = "Expedition"
- if(DEPARTMENT_SYNTHETIC)
- ping_name = "Silicon"
- //if(DEPARTMENT_TALON)
- // ping_name = "Offmap"
- if(!ping_name)
- to_chat(L, span_warning("Selected job cannot be requested for \[ERRORUNKNOWNDEPT] reason. Please report this to system administrator."))
- return
- message_color = ping_dept.color
-
- message_chat_rolerequest(message_color, ping_name, reason, role)
- last_fax_role_request = world.time
- to_chat(L, span_notice("Your request was transmitted."))
diff --git a/code/modules/planet/borealismajoris.dm b/code/modules/planet/borealismajoris.dm
index e2a575e4eb..80068d34de 100644
--- a/code/modules/planet/borealismajoris.dm
+++ b/code/modules/planet/borealismajoris.dm
@@ -1,4 +1,4 @@
-var/datum/planet/borealis2/planet_borealis2 = null
+GLOBAL_DATUM(planet_borealis2, /datum/planet/borealis2)
//Dev note: This entire file handles weather and planetary effects. File name subject to change pending planet name finalization.
/datum/time/borealis2
seconds_in_day = 3 HOURS
@@ -19,7 +19,7 @@ var/datum/planet/borealis2/planet_borealis2 = null
/datum/planet/borealis2/New()
..()
- planet_borealis2 = src
+ GLOB.planet_borealis2 = src
weather_holder = new /datum/weather_holder/borealis2(src)
/datum/planet/borealis2/update_sun()
diff --git a/code/modules/planet/thor.dm b/code/modules/planet/thor.dm
index ad362d0d60..7d5bc99d91 100644
--- a/code/modules/planet/thor.dm
+++ b/code/modules/planet/thor.dm
@@ -1,4 +1,4 @@
-var/datum/planet/thor/planet_thor = null
+GLOBAL_DATUM(planet_thor, /datum/planet/thor)
/datum/time/thor
seconds_in_day = 24 HOURS
@@ -12,7 +12,7 @@ var/datum/planet/thor/planet_thor = null
/datum/planet/thor/New()
..()
- planet_thor = src
+ GLOB.planet_thor = src
weather_holder = new /datum/weather_holder/thor(src)
/datum/planet/thor/update_sun()
diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm
deleted file mode 100644
index 58c6a32526..0000000000
--- a/code/modules/virus2/centrifuge.dm
+++ /dev/null
@@ -1,208 +0,0 @@
-/obj/machinery/computer/centrifuge
- name = "isolation centrifuge"
- desc = "Used to separate things with different weight. Spin 'em round, round, right round."
- icon = 'icons/obj/virology_vr.dmi' //VOREStation Edit
- icon_state = "centrifuge"
- var/curing
- var/isolating
-
- var/obj/item/reagent_containers/glass/beaker/vial/sample = null
- var/datum/disease2/disease/virus2 = null
-
-/obj/machinery/computer/centrifuge/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(O.has_tool_quality(TOOL_SCREWDRIVER))
- return ..(O,user)
-
- if(default_unfasten_wrench(user, O, 20))
- return
-
- if(istype(O,/obj/item/reagent_containers/glass/beaker/vial))
- if(sample)
- to_chat(user, "\The [src] is already loaded.")
- return
-
- sample = O
- user.drop_item()
- O.loc = src
-
- user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
- SStgui.update_uis(src)
-
- src.attack_hand(user)
-
-/obj/machinery/computer/centrifuge/update_icon()
- ..()
- if(! (stat & (BROKEN|NOPOWER)) && (isolating || curing))
- icon_state = "centrifuge_moving"
-
-/obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob)
- if(..())
- return
- tgui_interact(user)
-
-/obj/machinery/computer/centrifuge/tgui_interact(mob/user, datum/tgui/ui)
- ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "IsolationCentrifuge", name)
- ui.open()
-
-/obj/machinery/computer/centrifuge/tgui_data(mob/user)
- var/list/data = list()
- data["antibodies"] = null
- data["pathogens"] = list()
- data["is_antibody_sample"] = null
- data["busy"] = null
- data["sample_inserted"] = !!sample
-
- if(curing)
- data["busy"] = "Isolating antibodies..."
- else if(isolating)
- data["busy"] = "Isolating pathogens..."
- else
- if(sample)
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(B)
- data["antibodies"] = antigens2string(B.data["antibodies"], none=null)
-
- var/list/pathogens[0]
- var/list/virus = B.data["virus2"]
- for (var/ID in virus)
- var/datum/disease2/disease/V = virus[ID]
- pathogens.Add(list(list("name" = V.name(), "spread_type" = V.spreadtype, "reference" = "\ref[V]")))
-
- data["pathogens"] = pathogens
-
- else
- var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
- if(A)
- data["antibodies"] = antigens2string(A.data["antibodies"], none=null)
- data["is_antibody_sample"] = 1
-
- return data
-
-/obj/machinery/computer/centrifuge/process()
- ..()
- if(stat & (NOPOWER|BROKEN)) return
-
- if(curing)
- curing -= 1
- if(curing == 0)
- cure()
-
- if(isolating)
- isolating -= 1
- if(isolating == 0)
- isolate()
-
-/obj/machinery/computer/centrifuge/tgui_act(action, params)
- if(..())
- return TRUE
-
- var/mob/user = usr
- add_fingerprint(user)
-
-
- switch(action)
- if("print")
- print(user)
- . = TRUE
- if("isolate")
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(B)
- var/datum/disease2/disease/virus = locate(params["isolate"])
- virus2 = virus.getcopy()
- isolating = 40
- update_icon()
- . = TRUE
- if("antibody")
- var/delay = 20
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(!B)
- state("\The [src] buzzes, \"No antibody carrier detected.\"", "blue")
- return TRUE
-
- var/has_toxins = locate(/datum/reagent/toxin) in sample.reagents.reagent_list
- var/has_radium = sample.reagents.has_reagent(REAGENT_ID_RADIUM)
- if(has_toxins || has_radium)
- state("\The [src] beeps, \"Pathogen purging speed above nominal.\"", "blue")
- if(has_toxins)
- delay = delay/2
- if(has_radium)
- delay = delay/2
-
- curing = round(delay)
- playsound(src, 'sound/machines/juicer.ogg', 50, 1)
- update_icon()
- . = TRUE
- if("sample")
- if(sample)
- sample.loc = src.loc
- sample = null
- . = TRUE
-
-
-/obj/machinery/computer/centrifuge/proc/cure()
- if(!sample) return
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(!B) return
-
- var/list/data = list("antibodies" = B.data["antibodies"])
- var/amt= sample.reagents.get_reagent_amount(REAGENT_ID_BLOOD)
- sample.reagents.remove_reagent(REAGENT_ID_BLOOD, amt)
- sample.reagents.add_reagent(REAGENT_ID_ANTIBODIES, amt, data)
-
- SStgui.update_uis(src)
- update_icon()
- ping("\The [src] pings, \"Antibody isolated.\"")
-
-/obj/machinery/computer/centrifuge/proc/isolate()
- if(!sample) return
- var/obj/item/virusdish/dish = new/obj/item/virusdish(loc)
- dish.virus2 = virus2
- virus2 = null
-
- SStgui.update_uis(src)
- update_icon()
- ping("\The [src] pings, \"Pathogen isolated.\"")
-
-/obj/machinery/computer/centrifuge/proc/print(var/mob/user)
- var/obj/item/paper/P = new /obj/item/paper(loc)
- P.name = "paper - Pathology Report"
- P.info = {"
- [virology_letterhead("Pathology Report")]
- Sample: [sample.name]
-"}
-
- if(user)
- P.info += "Generated By: [user.name]
"
-
- P.info += "
"
-
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(B)
- P.info += "Antibodies: "
- P.info += antigens2string(B.data["antibodies"])
- P.info += "
"
-
- var/list/virus = B.data["virus2"]
- P.info += "Pathogens:
"
- if(virus.len > 0)
- for (var/ID in virus)
- var/datum/disease2/disease/V = virus[ID]
- P.info += "stamm #[add_zero("[V.uniqueID]", 4)]
" // CHOMPEdit - Making sure to not show the name at first!
- else
- P.info += "None
"
-
- else
- var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
- if(A)
- P.info += "The following antibodies have been isolated from the blood sample: "
- P.info += antigens2string(A.data["antibodies"])
- P.info += "
"
-
- P.info += {"
-
- Additional Notes:
-"}
-
- state("The nearby computer prints out a pathology report.")
diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm
deleted file mode 100644
index 6ad0bf57b8..0000000000
--- a/code/modules/virus2/disease2.dm
+++ /dev/null
@@ -1,326 +0,0 @@
-/datum/disease2/disease
- var/infectionchance = 70
- var/speed = 1
- var/spreadtype = "Blood" // Can also be "Contact" or "Airborne"
- var/stage = 1
- var/stageprob = 10
- var/dead = 0
- var/clicks = 0
- var/uniqueID = 0
- var/list/datum/disease2/effectholder/effects = list()
- var/antigen = list() // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
- var/max_stage = 4
- var/list/affected_species = list(SPECIES_HUMAN,SPECIES_UNATHI,SPECIES_SKRELL,SPECIES_TAJARAN)
- var/resistance = 10 // % chance a disease will resist cure, up to 100
- var/name // CHOMPEdit - For custom built diseases.
-
-/datum/disease2/disease/New()
- uniqueID = rand(0,10000)
- ..()
-
-/datum/disease2/disease/proc/makerandom(var/severity=1)
- var/list/excludetypes = list()
- for(var/i=1 ; i <= max_stage ; i++ )
- var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
- holder.stage = i
- holder.getrandomeffect(severity, excludetypes)
- excludetypes += holder.effect.type
- effects += holder
- uniqueID = rand(0,10000)
- switch(severity)
- if(1)
- infectionchance = 1
- if(2)
- infectionchance = rand(10,20)
- else
- infectionchance = rand(60,90)
-
- antigen = list(pick(ALL_ANTIGENS))
- antigen |= pick(ALL_ANTIGENS)
- spreadtype = prob(70) ? "Airborne" : "Contact"
- resistance = rand(15,70)
-
- if(severity >= 2 && prob(33))
- resistance += 10
-
- if(GLOB.all_species.len)
- affected_species = get_all_infectable_species() // CHOMPEdit
-
-/proc/get_infectable_species()
- var/list/meat = list()
- var/list/res = list()
- for (var/specie in GLOB.all_species)
- var/datum/species/S = GLOB.all_species[specie]
- if(!S.get_virus_immune())
- meat += S
- if(meat.len)
- var/num = rand(1,meat.len)
- for(var/i=0,i 50)
- if(prob(1))
- majormutate()
-
- //Space antibiotics have a good chance to stop disease completely
- if(mob.chem_effects[CE_ANTIBIOTIC])
- if(stage == 1 && prob(70-resistance))
- src.cure(mob)
- else
- resistance += rand(1,9)
-
- //VOREStation Add Start - Corophazine can treat higher stages
- var/antibiotics = mob.chem_effects[CE_ANTIBIOTIC]
- if(antibiotics == ANTIBIO_SUPER)
- if(prob(70))
- src.cure(mob)
- //VOREStation Add End
-
- //Resistance is capped at 90 without being manually set to 100
- if(resistance > 90 && resistance < 100)
- resistance = 90
-
-
- //Virus food speeds up disease progress
- if(mob.reagents.has_reagent("virusfood"))
- mob.reagents.remove_reagent("virusfood",0.1)
- clicks += 10
-
- if(prob(1) && prob(stage)) // Increasing chance of curing as the virus progresses
- src.cure(mob)
- mob.antibodies |= src.antigen
-
- //Moving to the next stage
- if(clicks > max(stage*100, 200) && prob(10))
- if((stage <= max_stage) && prob(5)) // ~20% of viruses will be cured by the end of S4 with this
- src.cure(mob)
- mob.antibodies |= src.antigen
- stage++
- clicks = 0
-
- //Do nasty effects
- for(var/datum/disease2/effectholder/e in effects)
- if(prob(33))
- e.runeffect(mob,stage)
-
- //Short airborne spread
- if(src.spreadtype == "Airborne")
- for(var/mob/living/carbon/M in oview(1,mob))
- if(airborne_can_reach(get_turf(mob), get_turf(M)))
- infect_virus2(M,src)
-
- //fever
- mob.bodytemperature = max(mob.bodytemperature, min(310+5*min(stage,max_stage) ,mob.bodytemperature+5*min(stage,max_stage)))
- clicks+=speed
-
-/datum/disease2/disease/proc/cure(var/mob/living/carbon/mob)
- for(var/datum/disease2/effectholder/e in effects)
- e.effect.deactivate(mob)
- mob.virus2.Remove("[uniqueID]")
- BITSET(mob.hud_updateflag, STATUS_HUD)
-
-/datum/disease2/disease/proc/minormutate()
- //uniqueID = rand(0,10000)
- var/datum/disease2/effectholder/holder = pick(effects)
- holder.minormutate()
- //infectionchance = min(50,infectionchance + rand(0,10))
-
-/datum/disease2/disease/proc/majormutate()
- uniqueID = rand(0,10000)
- name = null // CHOMPEdit - Not the same one anymore.
- var/datum/disease2/effectholder/holder = pick(effects)
- var/list/exclude = list()
- for(var/datum/disease2/effectholder/D in effects)
- if(D != holder)
- exclude += D.effect.type
- holder.majormutate(exclude)
- if (prob(5) && prob(100-resistance)) // The more resistant the disease,the lower the chance of randomly developing the antibodies
- antigen = list(pick(ALL_ANTIGENS))
- antigen |= pick(ALL_ANTIGENS)
- if (prob(5) && GLOB.all_species.len)
- affected_species = get_infectable_species()
- if (prob(10))
- resistance += rand(1,9)
- if(resistance > 90 && resistance < 100)
- resistance = 90
-
-/datum/disease2/disease/proc/getcopy()
- var/datum/disease2/disease/disease = new /datum/disease2/disease
- disease.infectionchance = infectionchance
- disease.spreadtype = spreadtype
- disease.stageprob = stageprob
- disease.antigen = antigen
- disease.uniqueID = uniqueID
- disease.name = name // CHOMPEdit - Copy our name as well.
- disease.resistance = resistance
- disease.affected_species = affected_species.Copy()
- for(var/datum/disease2/effectholder/holder in effects)
- var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
- newholder.effect = new holder.effect.type
- newholder.effect.generate(holder.effect.data)
- newholder.chance = holder.chance
- newholder.cure = holder.cure
- newholder.multiplier = holder.multiplier
- newholder.happensonce = holder.happensonce
- newholder.stage = holder.stage
- disease.effects += newholder
- return disease
-
-/datum/disease2/disease/proc/issame(var/datum/disease2/disease/disease)
- var/list/types = list()
- var/list/types2 = list()
- for(var/datum/disease2/effectholder/d in effects)
- types += d.effect.type
- var/equal = 1
-
- for(var/datum/disease2/effectholder/d in disease.effects)
- types2 += d.effect.type
-
- for(var/type in types)
- if(!(type in types2))
- equal = 0
-
- if (antigen != disease.antigen)
- equal = 0
- return equal
-
-/proc/virus_copylist(var/list/datum/disease2/disease/viruses)
- var/list/res = list()
- for (var/ID in viruses)
- var/datum/disease2/disease/V = viruses[ID]
- res["[V.uniqueID]"] = V.getcopy()
- return res
-
-
-var/global/list/virusDB = list()
-
-/datum/disease2/disease/proc/name()
- if(name) // CHOMPEdit - Lets use our name
- .= "[name]"
- else // CHOMPEdit - ...unless we're an undiscovered disease.
- .= "stamm #[add_zero("[uniqueID]", 4)]"
- if ("[uniqueID]" in virusDB)
- var/datum/data/record/V = virusDB["[uniqueID]"]
- .= V.fields["name"]
-
-/datum/disease2/disease/proc/get_basic_info()
- var/t = ""
- for(var/datum/disease2/effectholder/E in effects)
- t += ", [E.effect.name]"
- return "[name()] ([copytext(t,3)])"
-
-/datum/disease2/disease/proc/get_info()
- var/r = {"
- Analysis determined the existence of a GNAv2-based viral lifeform.
- Designation: [name()]
- Antigen: [antigens2string(antigen)]
- Transmitted By: [spreadtype]
- Rate of Progression: [stageprob * 10]
- Antibiotic Resistance [resistance]%
- Species Affected: [jointext(affected_species, ", ")]
-"}
-
- r += "Symptoms:
"
- for(var/datum/disease2/effectholder/E in effects)
- r += "([E.stage]) [E.effect.name] "
- r += "Strength: [E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"] "
- r += "Aggressiveness: [E.chance * 15]
"
-
- return r
-
-/datum/disease2/disease/proc/get_tgui_info()
- . = list(
- "name" = name(),
- "spreadtype" = spreadtype,
- "antigen" = antigens2string(antigen),
- "rate" = stageprob * 10,
- "resistance" = resistance,
- "species" = jointext(affected_species, ", "),
- "ref" = "\ref[src]",
- )
-
- var/list/symptoms = list()
- for(var/datum/disease2/effectholder/E in effects)
- symptoms.Add(list(list(
- "stage" = E.stage,
- "name" = E.effect.name,
- "strength" = "[E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"]",
- "aggressiveness" = E.chance * 15,
- )))
- .["symptoms"] = symptoms
-
-/datum/disease2/disease/proc/addToDB()
- if ("[uniqueID]" in virusDB)
- return 0
- var/datum/data/record/v = new()
- v.fields["id"] = uniqueID
- v.fields["name"] = name()
- v.fields["description"] = get_info()
- v.fields["tgui_description"] = get_tgui_info()
- v.fields["tgui_description"]["record"] = "\ref[v]"
- v.fields["antigen"] = antigens2string(antigen)
- v.fields["spread type"] = spreadtype
- virusDB["[uniqueID]"] = v
- return 1
-
-/proc/virus2_lesser_infection()
- var/list/candidates = list() //list of candidate keys
-
- for(var/mob/living/carbon/human/G in player_list)
- if(G.client && G.stat != DEAD && !isbelly(G.loc))
- candidates += G
-
- if(!candidates.len) return
-
- candidates = shuffle(candidates)
-
- infect_mob_random_lesser(candidates[1])
-
-/proc/virus2_greater_infection()
- var/list/candidates = list() //list of candidate keys
-
- for(var/mob/living/carbon/human/G in player_list)
- if(G.client && G.stat != DEAD && !isbelly(G.loc))
- candidates += G
- if(!candidates.len) return
-
- candidates = shuffle(candidates)
-
- infect_mob_random_greater(candidates[1])
-
-/proc/virology_letterhead(var/report_name)
- return {"
- [report_name]
- [station_name()] Virology Lab
-
-"}
-
-/datum/disease2/disease/proc/can_add_symptom(type)
- for(var/datum/disease2/effectholder/H in effects)
- if(H.effect.type == type)
- return 0
-
- return 1
diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm
deleted file mode 100644
index 80a03f4366..0000000000
--- a/code/modules/virus2/effect.dm
+++ /dev/null
@@ -1,522 +0,0 @@
-/datum/disease2/effectholder
- var/name = "Holder"
- var/datum/disease2/effect/effect
- var/chance = 0 //Chance in percentage each tick
- var/cure = "" //Type of cure it requires
- var/happensonce = 0
- var/multiplier = 1 //The chance the effects are WORSE
- var/stage = 0
-
-/datum/disease2/effectholder/proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
- if(happensonce > -1 && effect.stage <= stage && prob(chance))
- effect.activate(mob, multiplier)
- if(happensonce == 1)
- happensonce = -1
-
-/datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1, exclude_types=list())
- var/list/datum/disease2/effect/list = list()
- for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect))
- if(f in exclude_types)
- continue
- if(initial(f.badness) > badness) //we don't want such strong effects
- continue
- if(initial(f.stage) <= src.stage)
- list += f
- var/type = pick(list)
- effect = new type()
- effect.generate()
- chance = rand(0,effect.chance_maxm)
- multiplier = rand(1,effect.maxm)
-
-/datum/disease2/effectholder/proc/minormutate()
- switch(pick(1,2,3,4,5))
- if(1)
- chance = rand(0,effect.chance_maxm)
- if(2)
- multiplier = rand(1,effect.maxm)
-
-/datum/disease2/effectholder/proc/majormutate(exclude_types=list())
- getrandomeffect(3, exclude_types)
-
-////////////////////////////////////////////////////////////////
-////////////////////////EFFECTS/////////////////////////////////
-////////////////////////////////////////////////////////////////
-
-/datum/disease2/effect
- var/chance_maxm = 50 //note that disease effects only proc once every 3 ticks for humans
- var/name = "Blanking effect"
- var/stage = 4
- var/maxm = 1
- var/badness = 1
- var/data = null // For semi-procedural effects; this should be generated in generate() if used
-
-/datum/disease2/effect/proc/activate(var/mob/living/carbon/mob,var/multiplier)
-/datum/disease2/effect/proc/deactivate(var/mob/living/carbon/mob)
-/datum/disease2/effect/proc/generate(copy_data) // copy_data will be non-null if this is a copy; it should be used to initialise the data for this effect if present
-
-/datum/disease2/effect/invisible
- name = "Waiting Syndrome"
- stage = 1
- badness = 3
-
-/datum/disease2/effect/invisible/activate(var/mob/living/carbon/mob,var/multiplier)
- return
-
-////////////////////////STAGE 4/////////////////////////////////
-
-/datum/disease2/effect/nothing
- name = "Nil Syndrome"
- stage = 4
- badness = 1
- chance_maxm = 0
-
-/datum/disease2/effect/gibbingtons
- name = "Gibbington's Syndrome"
- stage = 4
- badness = 3
-
-/datum/disease2/effect/gibbingtons/activate(var/mob/living/carbon/mob,var/multiplier)
- // Probabilities have been tweaked to kill in ~2-3 minutes, giving 5-10 messages.
- // Probably needs more balancing, but it's better than LOL U GIBBED NOW, especially now that viruses can potentially have no signs up until Gibbingtons.
- mob.adjustBruteLoss(10*multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/obj/item/organ/external/O = pick(H.organs)
- if(prob(25))
- to_chat(mob, span_warning("Your [O.name] feels as if it might burst!"))
- if(prob(10))
- spawn(50)
- if(O)
- O.droplimb(0,DROPLIMB_BLUNT)
- else
- if(prob(75))
- to_chat(mob, span_warning("Your whole body feels like it might fall apart!"))
- if(prob(10))
- mob.adjustBruteLoss(25*multiplier)
-
-/datum/disease2/effect/radian
- name = "Radian's Syndrome"
- stage = 4
- maxm = 3
- badness = 2
-
-/datum/disease2/effect/radian/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.apply_effect(2*multiplier, IRRADIATE, check_protection = 0)
-
-/datum/disease2/effect/deaf
- name = "Deafness"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/deaf/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.ear_deaf += 20
- mob.deaf_loop.start(skip_start_sound = TRUE) // CHOMPStation Add: Ear Ringing/Deafness
-
-/datum/disease2/effect/monkey
- name = "Genome Regression"
- stage = 4
- badness = 3
-
-/datum/disease2/effect/monkey/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob,/mob/living/carbon/human))
- var/mob/living/carbon/human/h = mob
- h.monkeyize()
-
-/datum/disease2/effect/killertoxins
- name = "Autoimmune Response"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/killertoxins/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjustToxLoss(15*multiplier)
-
-/datum/disease2/effect/dna
- name = "Catastrophic DNA Degeneration"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/dna/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.bodytemperature = max(mob.bodytemperature, 350)
- scramble(0,mob,10)
- mob.apply_damage(10, CLONE)
-
-/datum/disease2/effect/organs
- name = "Limb Paralysis"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/organs/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/organ = pick(list("r_arm","l_arm","r_leg","l_leg"))
- var/obj/item/organ/external/E = H.organs_by_name[organ]
- if (!(E.status & ORGAN_DEAD))
- E.status |= ORGAN_DEAD
- to_chat(H, span_notice("You can't feel your [E.name] anymore..."))
- for (var/obj/item/organ/external/C in E.children)
- C.status |= ORGAN_DEAD
- H.update_icons_body()
- mob.adjustToxLoss(15*multiplier)
-
-/datum/disease2/effect/organs/deactivate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- for (var/obj/item/organ/external/E in H.organs)
- E.status &= ~ORGAN_DEAD
- for (var/obj/item/organ/external/C in E.children)
- C.status &= ~ORGAN_DEAD
- H.update_icons_body()
-
-/datum/disease2/effect/internalorgan
- name = "Organ Shutdown"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/internalorgan/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/organ = pick(list("heart","kidney","liver", "lungs"))
- var/obj/item/organ/internal/O = H.organs_by_name[organ]
- if (O.robotic != ORGAN_ROBOT)
- O.damage += (5*multiplier)
- to_chat(H, span_notice("You feel a cramp in your guts."))
-
-/datum/disease2/effect/immortal
- name = "Hyperaccelerated Aging"
- stage = 4
- badness = 2
-
-/datum/disease2/effect/immortal/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- for (var/obj/item/organ/external/E in H.organs)
- if (E.status & ORGAN_BROKEN && prob(30))
- E.status ^= ORGAN_BROKEN
- var/heal_amt = -5*multiplier
- mob.apply_damages(heal_amt,heal_amt,heal_amt,heal_amt)
-
-/datum/disease2/effect/immortal/deactivate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- to_chat(H, span_notice("You suddenly feel hurt and old..."))
- H.age += 8
- var/backlash_amt = 5*multiplier
- mob.apply_damages(backlash_amt,backlash_amt,backlash_amt,backlash_amt)
-
-/datum/disease2/effect/bones
- name = "Brittle Bones"
- stage = 4
- badness = 2
-/datum/disease2/effect/bones/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- for (var/obj/item/organ/external/E in H.organs)
- E.min_broken_damage = max(5, E.min_broken_damage - 30)
-
-/datum/disease2/effect/bones/deactivate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- for (var/obj/item/organ/external/E in H.organs)
- E.min_broken_damage = initial(E.min_broken_damage)
-
-/datum/disease2/effect/combustion
- name = "Organic Ignition"
- stage = 4
- badness = 3
-
-/datum/disease2/effect/combustion/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/obj/item/organ/external/O = pick(H.organs)
- if(prob(25))
- to_chat(mob, span_warning("It feels like your [O.name] is on fire and your blood is boiling!"))
- H.adjust_fire_stacks(1)
- if(prob(10))
- to_chat(mob, span_warning("Flames erupt from your skin, your entire body is burning!"))
- H.adjust_fire_stacks(2)
- H.IgniteMob()
-
-
-////////////////////////STAGE 3/////////////////////////////////
-
-/datum/disease2/effect/toxins
- name = "Hyperacidity"
- stage = 3
- maxm = 3
-
-/datum/disease2/effect/toxins/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjustToxLoss((2*multiplier))
-
-/datum/disease2/effect/shakey
- name = "Nervous Motor Instability"
- stage = 3
- maxm = 3
-
-/datum/disease2/effect/shakey/activate(var/mob/living/carbon/mob,var/multiplier)
- shake_camera(mob,5*multiplier)
-
-/datum/disease2/effect/telepathic
- name = "Pineal Gland Decalcification"
- stage = 3
-
-/datum/disease2/effect/telepathic/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.dna.SetSEState(REMOTETALKBLOCK,1)
- domutcheck(mob, null, MUTCHK_FORCED)
-
-/datum/disease2/effect/mind
- name = "Neurodegeneration"
- stage = 3
-
-/datum/disease2/effect/mind/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/obj/item/organ/internal/brain/B = H.internal_organs_by_name["brain"]
- if (B && B.damage < B.min_broken_damage)
- B.take_damage(5)
- else
- mob.setBrainLoss(10)
-
-/datum/disease2/effect/hallucinations
- name = "Hallucination"
- stage = 3
-
-/datum/disease2/effect/hallucinations/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.hallucination += 25
-
-/datum/disease2/effect/minordeaf
- name = "Hearing Loss"
- stage = 3
-
-/datum/disease2/effect/minordeaf/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.ear_deaf = 5
- mob.deaf_loop.start(skip_start_sound = TRUE) // CHOMPStation Add: Ear Ringing/Deafness
-
-/datum/disease2/effect/giggle
- name = "Uncontrolled Laughter"
- stage = 3
- chance_maxm = 20
-
-/datum/disease2/effect/giggle/activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(66))
- mob.say("*giggle")
- else
- to_chat(mob, span_notice("What's so funny?"))
-
-/datum/disease2/effect/confusion
- name = "Topographical Cretinism"
- stage = 3
-
-/datum/disease2/effect/confusion/activate(var/mob/living/carbon/mob,var/multiplier)
- to_chat(mob, span_notice("You have trouble telling right and left apart all of a sudden."))
- mob.Confuse(10)
-
-/datum/disease2/effect/mutation
- name = "DNA Degradation"
- stage = 3
-
-/datum/disease2/effect/mutation/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.apply_damage(2, CLONE)
-
-/datum/disease2/effect/groan
- name = "Phantom Aches"
- stage = 3
- chance_maxm = 20
-
-/datum/disease2/effect/groan/activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(66))
- mob.say("*groan")
- else if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/obj/item/organ/external/E = pick(H.organs)
- to_chat(mob, span_warning("Your [E] aches."))
-
-/datum/disease2/effect/chem_synthesis
- name = "Chemical Synthesis"
- stage = 3
- chance_maxm = 25
-
-/datum/disease2/effect/chem_synthesis/generate(c_data)
- if(c_data)
- data = c_data
- else
- data = pick(REAGENT_ID_BICARIDINE, REAGENT_ID_KELOTANE, REAGENT_ID_ANTITOXIN, REAGENT_ID_INAPROVALINE, REAGENT_ID_BINMANBLISS, REAGENT_ID_SUGAR,
- REAGENT_ID_TRAMADOL, REAGENT_ID_DEXALIN, REAGENT_ID_CRYPTOBIOLIN, REAGENT_ID_IMPEDREZENE, REAGENT_ID_HYPERZINE, REAGENT_ID_ETHYLREDOXRAZINE,
- REAGENT_ID_MINDBREAKER, REAGENT_ID_GLUCOSE)
- var/datum/reagent/R = SSchemistry.chemical_reagents[data]
- name = "[initial(name)] ([initial(R.name)])"
-
-/datum/disease2/effect/chem_synthesis/activate(var/mob/living/carbon/mob,var/multiplier)
- if (mob.reagents.get_reagent_amount(data) < 5)
- mob.reagents.add_reagent(data, 2)
-
-/datum/disease2/effect/nonrejection
- name = "Genetic Chameleonism"
- stage = 3
-
-/datum/disease2/effect/nonrejection/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- var/obj/item/organ/internal/O = H.organs_by_name
- for (var/organ in H.organs_by_name)
- if (O.robotic != ORGAN_ROBOT)
- O.rejecting = 0
-
-
-////////////////////////STAGE 2/////////////////////////////////
-
-/datum/disease2/effect/scream
- name = "Involuntary Vocalization"
- stage = 2
- chance_maxm = 10
-
-/datum/disease2/effect/scream/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*scream")
-
-/datum/disease2/effect/drowsness
- name = "Excessive Sleepiness"
- stage = 2
-
-/datum/disease2/effect/drowsness/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.drowsyness += 10
-
-/datum/disease2/effect/sleepy
- name = "Narcolepsy"
- stage = 2
- chance_maxm = 15
-
-/datum/disease2/effect/sleepy/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*collapse")
-
-/datum/disease2/effect/blind
- name = "Vision Loss"
- stage = 2
-
-/datum/disease2/effect/blind/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.SetBlinded(4)
-
-/datum/disease2/effect/cough
- name = "Severe Cough"
- stage = 2
- chance_maxm = 20
-
-/datum/disease2/effect/cough/activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(60))
- mob.say("*cough")
- for(var/mob/living/carbon/M in oview(2,mob))
- mob.spread_disease_to(M)
- else
- to_chat(mob, span_warning("Something gets caught in your throat."))
-
-/datum/disease2/effect/hungry
- name = "Digestive Inefficiency"
- stage = 2
-
-/datum/disease2/effect/hungry/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjust_nutrition(-200)
-
-/datum/disease2/effect/fridge
- name = "Reduced Circulation"
- stage = 2
- chance_maxm = 25
-
-/datum/disease2/effect/fridge/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*shiver")
-
-/datum/disease2/effect/hair
- name = "Hair Loss"
- stage = 2
-
-/datum/disease2/effect/hair/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- if(H.species.name == SPECIES_HUMAN && !(H.h_style == "Bald") && !(H.h_style == "Balding Hair"))
- to_chat(H, span_danger("Your hair starts to fall out in clumps..."))
- spawn(50)
- H.h_style = "Balding Hair"
- H.update_hair()
-
-/datum/disease2/effect/stimulant
- name = "Overactive Adrenal Gland"
- stage = 2
-
-/datum/disease2/effect/stimulant/activate(var/mob/living/carbon/mob,var/multiplier)
- to_chat(mob, span_notice("You feel a rush of energy inside you!"))
- if (mob.reagents.get_reagent_amount(REAGENT_ID_HYPERZINE) < 10)
- mob.reagents.add_reagent(REAGENT_ID_HYPERZINE, 4)
- if (prob(30))
- mob.jitteriness += 10
-
-/datum/disease2/effect/ringing
- name = "Tinnitus"
- stage = 2
- chance_maxm = 25
-
-/datum/disease2/effect/ringing/activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = mob
- to_chat(H, span_notice("You hear an awful ringing in your ears."))
- H << 'sound/weapons/flash.ogg'
-
-/datum/disease2/effect/vomiting
- name = "Vomiting"
- stage = 2
- chance_maxm = 15
-
-/datum/disease2/effect/vomiting/activate(var/mob/living/carbon/mob,var/multiplier)
- to_chat(mob, span_notice("Your stomach churns!"))
- if (prob(50))
- mob.say("*vomit")
-
-////////////////////////STAGE 1/////////////////////////////////
-
-/datum/disease2/effect/sneeze
- name = "Sneezing"
- stage = 1
- chance_maxm = 20
-
-/datum/disease2/effect/sneeze/activate(var/mob/living/carbon/mob,var/multiplier)
- if(prob(20))
- to_chat(mob, span_warning("You go to sneeze, but it gets caught in your sinuses!"))
- else if(prob(80))
- if(prob(30))
- to_chat(mob, span_warning("You feel like you are about to sneeze!"))
- spawn(5) //Sleep may have been hanging Mob controller.
- mob.say("*sneeze")
- for(var/mob/living/carbon/M in get_step(mob,mob.dir))
- mob.spread_disease_to(M)
- if (prob(50))
- var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
- M.virus2 = virus_copylist(mob.virus2)
-
-/datum/disease2/effect/gunck
- name = "Mucus Buildup"
- stage = 1
-
-/datum/disease2/effect/gunck/activate(var/mob/living/carbon/mob,var/multiplier)
- to_chat(mob, span_warning("Mucous runs down the back of your throat."))
-
-/datum/disease2/effect/drool
- name = "Salivary Gland Stimulation"
- stage = 1
- chance_maxm = 15
-
-/datum/disease2/effect/drool/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*drool")
- if (prob(30))
- var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
- M.virus2 = virus_copylist(mob.virus2)
-
-/datum/disease2/effect/twitch
- name = "Involuntary Twitching"
- stage = 1
- chance_maxm = 15
-
-/datum/disease2/effect/twitch/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*twitch")
-
-/datum/disease2/effect/headache
- name = "Headache"
- stage = 1
-
-/datum/disease2/effect/headache/activate(var/mob/living/carbon/mob,var/multiplier)
- to_chat(mob, span_warning("Your head hurts a bit."))
diff --git a/code/modules/virus2/effect_vr.dm b/code/modules/virus2/effect_vr.dm
deleted file mode 100644
index ca68b199eb..0000000000
--- a/code/modules/virus2/effect_vr.dm
+++ /dev/null
@@ -1,63 +0,0 @@
-///////////////////////////////////////////////
-/////////////////// Stage 1 ///////////////////
-
-/datum/disease2/effect/mlem
- name = "Mlemington's Syndrome"
- stage = 1
- chance_maxm = 25
-
-/datum/disease2/effect/mlem/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("[pick("Mlem.","MLEM!","Mlem?")]")
-
-/datum/disease2/effect/spin
- name = "Spyndrome"
- stage = 1
- chance_maxm = 7
- var/list/directions = list(2,4,1,8,2,4,1,8,2,4,1,8,2,4,1,8,2,4,1,8)
-
-/datum/disease2/effect/spin/activate(var/mob/living/carbon/mob,var/multiplier)
- if(mob.buckled())
- to_chat(viewers(mob),span_warning("[mob.name] struggles violently against their restraints!"))
- else
- to_chat(viewers(mob),span_warning("[mob.name] spins around violently!"))
- for(var/D in directions)
- mob.dir = D
- sleep(1)
- mob.dir = pick(2,4,1,8) //For that added annoyance
-
-///////////////////////////////////////////////
-/////////////////// Stage 2 ///////////////////
-
-/datum/disease2/effect/lang
- name = "Lingual Dissocation"
- stage = 2
- chance_maxm = 2
-
-/datum/disease2/effect/lang/activate(var/mob/living/carbon/mob,var/multiplier)
- mob.apply_default_language(pick(mob.languages)) //CHOMPEdit
-
-///////////////////////////////////////////////
-/////////////////// Stage 3 ///////////////////
-
-/datum/disease2/effect/size
- name = "Mass Revectoring"
- stage = 3
- chance_maxm = 1
-
-/datum/disease2/effect/size/activate(var/mob/living/carbon/mob,var/multiplier)
- var/newsize = rand (25, 200)
- mob.resize(newsize/100)
- to_chat(viewers(mob),span_warning("[mob.name] suddenly changes size!"))
-
-/datum/disease2/effect/flip
- name = "Flipponov's Disease"
- stage = 3
- chance_maxm = 5
-
-/datum/disease2/effect/flip/activate(var/mob/living/carbon/mob,var/multiplier) //Remind me why mob is carbon...?
- if(ishuman(mob))
- var/mob/living/carbon/human/H = mob
- H.emote("flip")
- else
- to_chat(viewers(mob),span_warning("[mob.name] does a backflip!"))
- mob.SpinAnimation(7,1)
diff --git a/modular_chomp/code/modules/organs/robolimbs.dm b/modular_chomp/code/modules/organs/robolimbs.dm
index 5014252961..12b5c1ac27 100644
--- a/modular_chomp/code/modules/organs/robolimbs.dm
+++ b/modular_chomp/code/modules/organs/robolimbs.dm
@@ -1,4 +1,4 @@
-var/const/YR3_monitor_styles = "blank=YR3_blank;\
+#define YR3_MONITOR_STYLES "blank=YR3_blank;\
eyes=YR3_eyes;\
foureyes=YR3_foureyes;\
slanteyes=YR3_evileyes;\
@@ -44,7 +44,7 @@ var/const/YR3_monitor_styles = "blank=YR3_blank;\
desc = "A limb with oddly high internal pressure tolerance."
icon = 'modular_chomp/icons/mob/human_races/cyberlimbs/YR3/YR3_enviroshell.dmi'
monitor_icon = 'modular_chomp/icons/mob/monitor_icons.dmi'
- monitor_styles = YR3_monitor_styles
+ monitor_styles = YR3_MONITOR_STYLES
/datum/robolimb/enviroshell/original
company = "YR3 Enviroshell- Original Xenochimera Model"
@@ -72,3 +72,5 @@ var/const/YR3_monitor_styles = "blank=YR3_blank;\
blood_color = "#0e1213"
icon = 'modular_chomp/icons/mob/human_races/cyberlimbs/YR3/YR3_sleek.dmi'
lifelike = TRUE
+
+#undef YR3_MONITOR_STYLES
diff --git a/modular_chomp/code/modules/planet/tyr.dm b/modular_chomp/code/modules/planet/tyr.dm
index ed52264a86..9a4f51beb7 100644
--- a/modular_chomp/code/modules/planet/tyr.dm
+++ b/modular_chomp/code/modules/planet/tyr.dm
@@ -1,4 +1,4 @@
-var/datum/planet/tyr/planet_tyr = null
+GLOBAL_DATUM(planet_tyr, /datum/planet/sif)
/datum/time/tyr
seconds_in_day = 12 HOURS
@@ -12,7 +12,7 @@ var/datum/planet/tyr/planet_tyr = null
/datum/planet/tyr/New()
..()
- planet_tyr = src
+ GLOB.planet_tyr = src
weather_holder = new /datum/weather_holder/tyr(src)
/datum/planet/tyr/update_sun()
diff --git a/modular_chomp/code/modules/projectiles/ammo_refactor/ammo_magazine_override.dm b/modular_chomp/code/modules/projectiles/ammo_refactor/ammo_magazine_override.dm
deleted file mode 100644
index 0e9e8a6c99..0000000000
--- a/modular_chomp/code/modules/projectiles/ammo_refactor/ammo_magazine_override.dm
+++ /dev/null
@@ -1,284 +0,0 @@
-//Replace old magazine with new
-/obj/item/ammo_magazine/Initialize(mapload)
- . = ..()
- var/replacement_type = magazine_overrides[type]
- if(replacement_type)
- new replacement_type(loc)
- return INITIALIZE_HINT_QDEL
- . = ..()
-
-
-//Override attackby to allow magazine to magazine transfer
-/obj/item/ammo_magazine/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/ammo_casing))
- var/obj/item/ammo_casing/C = W
- if(C.caliber != caliber)
- to_chat(user, span_warning("[C] does not fit into [src]."))
- return
- if(stored_ammo.len >= max_ammo)
- to_chat(user, span_warning("[src] is full!"))
- return
- user.remove_from_mob(C)
- C.forceMove(src)
- stored_ammo.Add(C)
- update_icon()
- if(istype(W, /obj/item/ammo_magazine))
- var/obj/item/ammo_magazine/L = W
- if(L.caliber != caliber)
- to_chat(user, span_warning("The ammo in [L] does not fit into [src]."))
- return
- if(!L.stored_ammo.len)
- to_chat(user, span_warning("There's no more ammo [L]!"))
- return
- if(stored_ammo.len >= max_ammo)
- to_chat(user, span_warning("[src] is full!"))
- return
- while(L.stored_ammo.len && stored_ammo.len < max_ammo)
- var/obj/item/ammo_casing/AC = L.stored_ammo[1] //select the next casing.
- L.stored_ammo -= AC //Remove this casing from loaded list of the clip.
- AC.forceMove(src)
- stored_ammo.Insert(1, AC) //add it to the head of our magazine's list
- L.update_icon()
- else
- return //Don't play sound if nothing actually happens xD
- playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
- update_icon()
-
-//big boy list
-var/global/list/magazine_overrides = list(
- /obj/item/ammo_magazine/m9mmt = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/m9mm/compact = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m9mm = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m762 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m9mmAdvanced = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/m545 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m545saw = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/m45uzi = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/m45tommy = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/m45tommydrum = /obj/item/ammo_magazine/smg_drum,
- /obj/item/ammo_magazine/m762/ext = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m10mm = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/m95 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/mtg = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/mg42 = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/mp5mag = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/asval = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/akm = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/ak74 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m762svd = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m16 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/ar10 = /obj/item/ammo_magazine/medium_small,
- /obj/item/ammo_magazine/m41 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/t12 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/fal = /obj/item/ammo_magazine/medium_small,
- /obj/item/ammo_magazine/type901 = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/awp = /obj/item/ammo_magazine/large,
- /obj/item/ammo_magazine/hectate = /obj/item/ammo_magazine/large,
- /obj/item/ammo_magazine/plamya = /obj/item/ammo_magazine/medium_drum,
- /obj/item/ammo_magazine/ppsh = /obj/item/ammo_magazine/smg_drum,
- /obj/item/ammo_magazine/pitchmag = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/molniya = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/pkm = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/rpd = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/kord = /obj/item/ammo_magazine/large_box,
- /obj/item/ammo_magazine/ssp4 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/sam48 = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/m5mmcaseless = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m45 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m44 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m9mm/luger = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m38 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m10mm/pistol = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m44/rubber = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m2024 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m762enbloc = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/makarov = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/tp23s = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/tp23 = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m9mm/compact/flash = /obj/item/ammo_magazine/pistol/flash,
- /obj/item/ammo_magazine/m9mmt/rubber = /obj/item/ammo_magazine/smg/rubber,
- /obj/item/ammo_magazine/m10mm/rubber = /obj/item/ammo_magazine/smg/rubber,
- /obj/item/ammo_magazine/ak74/plum = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m16/patriot = /obj/item/ammo_magazine/medium_drum,
- /obj/item/ammo_magazine/akm/drum = /obj/item/ammo_magazine/medium_drum,
- /obj/item/ammo_magazine/m45/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m45/flash = /obj/item/ammo_magazine/pistol/flash,
- /obj/item/ammo_magazine/m9mm/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m9mm/large = /obj/item/ammo_magazine/pistol_large,
- /obj/item/ammo_magazine/m9mm/large/preban = /obj/item/ammo_magazine/pistol_large,
- /obj/item/ammo_magazine/m9mm/large/preban/hp = /obj/item/ammo_magazine/pistol_large/hp,
- /obj/item/ammo_magazine/m9mm/vp70 = /obj/item/ammo_magazine/smg,
- /obj/item/ammo_magazine/tp23/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/ammo_box/b357 = /obj/item/ammo_magazine/ammo_box/small,
- /obj/item/ammo_magazine/ammo_box/b38 = /obj/item/ammo_magazine/ammo_box/small,
- /obj/item/ammo_magazine/ammo_box/b10mm = /obj/item/ammo_magazine/ammo_box/small,
- /obj/item/ammo_magazine/ammo_box/b44 = /obj/item/ammo_magazine/ammo_box/small,
- /obj/item/ammo_magazine/ammo_box/b45 = /obj/item/ammo_magazine/ammo_box/small,
- ///obj/item/ammo_magazine/ammo_box/b145 = /obj/item/ammo_magazine/ammo_box/large, Seperation of 14.5
- ///obj/item/ammo_magazine/ammo_box/b145/highvel = /obj/item/ammo_magazine/ammo_box/large/ap,
- /obj/item/ammo_magazine/ammo_box/b762 = /obj/item/ammo_magazine/ammo_box/medium,
- /obj/item/ammo_magazine/ammo_box/b545 = /obj/item/ammo_magazine/ammo_box/medium,
- /obj/item/ammo_magazine/ammo_box/b545/large = /obj/item/ammo_magazine/ammo_box/medium/large,
- /obj/item/ammo_magazine/s357 = /obj/item/ammo_magazine/speedloader_six,
- /obj/item/ammo_magazine/s38 = /obj/item/ammo_magazine/speedloader_eight,
- /obj/item/ammo_magazine/clip/sks = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/clip/mosin = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/clip/c762 = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/clip/c545 = /obj/item/ammo_magazine/clip/medium,
- /obj/item/ammo_magazine/s44 = /obj/item/ammo_magazine/speedloader_six,
- /obj/item/ammo_magazine/s45 = /obj/item/ammo_magazine/speedloader_six,
- /obj/item/ammo_magazine/s45lc = /obj/item/ammo_magazine/speedloader_six,
- /obj/item/ammo_magazine/m545/small = /obj/item/ammo_magazine/medium_small,
- /obj/item/ammo_magazine/mglock9mm = /obj/item/ammo_magazine/pistol_large,
- /obj/item/ammo_magazine/ammo_box/b357/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
- /obj/item/ammo_magazine/ammo_box/b38/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
- /obj/item/ammo_magazine/ammo_box/b10mm/practice = /obj/item/ammo_magazine/ammo_box/small/practice,
- /obj/item/ammo_magazine/ammo_box/b10mm/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
- /obj/item/ammo_magazine/ammo_box/b10mm/emp = /obj/item/ammo_magazine/ammo_box/small/emp,
- /obj/item/ammo_magazine/ammo_box/b44/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
- /obj/item/ammo_magazine/ammo_box/b45/practice = /obj/item/ammo_magazine/ammo_box/small/practice,
- /obj/item/ammo_magazine/ammo_box/b45/ap = /obj/item/ammo_magazine/ammo_box/small/ap,
- /obj/item/ammo_magazine/ammo_box/b45/hp = /obj/item/ammo_magazine/ammo_box/small/hp,
- /obj/item/ammo_magazine/ammo_box/b45/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
- /obj/item/ammo_magazine/ammo_box/b45/emp = /obj/item/ammo_magazine/ammo_box/small/emp,
- /obj/item/ammo_magazine/ammo_box/b762/hp = /obj/item/ammo_magazine/ammo_box/medium/hp,
- /obj/item/ammo_magazine/ammo_box/b762/ap = /obj/item/ammo_magazine/ammo_box/medium/ap,
- /obj/item/ammo_magazine/ammo_box/b762/practice = /obj/item/ammo_magazine/ammo_box/medium/practice,
- /obj/item/ammo_magazine/ammo_box/b762/hunter = /obj/item/ammo_magazine/ammo_box/medium/hunter,
- /obj/item/ammo_magazine/ammo_box/b545/ap = /obj/item/ammo_magazine/ammo_box/medium/ap,
- /obj/item/ammo_magazine/ammo_box/b545/hp = /obj/item/ammo_magazine/ammo_box/medium/hp,
- /obj/item/ammo_magazine/ammo_box/b545/practice = /obj/item/ammo_magazine/ammo_box/medium/practice,
- /obj/item/ammo_magazine/ammo_box/b545/hunter = /obj/item/ammo_magazine/ammo_box/medium/hunter,
- /obj/item/ammo_magazine/ammo_box/b545/large/ap = /obj/item/ammo_magazine/ammo_box/medium/large/ap,
- /obj/item/ammo_magazine/ammo_box/b545/large/hp = /obj/item/ammo_magazine/ammo_box/medium/large/hp,
- /obj/item/ammo_magazine/ammo_box/b545/large/practice = /obj/item/ammo_magazine/ammo_box/medium/large/practice,
- /obj/item/ammo_magazine/ammo_box/b545/large/hunter = /obj/item/ammo_magazine/ammo_box/medium/large/hunter,
- /obj/item/ammo_magazine/s357/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
- /obj/item/ammo_magazine/s357/flash = /obj/item/ammo_magazine/speedloader_six/flash,
- /obj/item/ammo_magazine/s38/rubber = /obj/item/ammo_magazine/speedloader_eight/rubber,
- /obj/item/ammo_magazine/s38/emp = /obj/item/ammo_magazine/speedloader_eight/emp,
- /obj/item/ammo_magazine/m38/makarov = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m38/giskard = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/m45/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m45/practice = /obj/item/ammo_magazine/pistol/practice,
- /obj/item/ammo_magazine/m45/ap = /obj/item/ammo_magazine/pistol/ap,
- /obj/item/ammo_magazine/m45/hp = /obj/item/ammo_magazine/pistol/hp,
- /obj/item/ammo_magazine/m45uzi/empty = /obj/item/ammo_magazine/smg/empty,
- /obj/item/ammo_magazine/m45tommy/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/m45tommy/empty = /obj/item/ammo_magazine/smg/empty,
- /obj/item/ammo_magazine/m45tommydrum/empty = /obj/item/ammo_magazine/smg_drum/empty,
- /obj/item/ammo_magazine/m45tommydrum/ap = /obj/item/ammo_magazine/smg_drum/ap,
- /obj/item/ammo_magazine/clip/c545/ap = /obj/item/ammo_magazine/clip/medium/ap,
- /obj/item/ammo_magazine/clip/c545/hunter = /obj/item/ammo_magazine/clip/medium/hunter,
- /obj/item/ammo_magazine/clip/c545/practice = /obj/item/ammo_magazine/clip/medium/practice,
- /obj/item/ammo_magazine/clip/c762/ap = /obj/item/ammo_magazine/clip/medium/ap,
- /obj/item/ammo_magazine/clip/c762/practice = /obj/item/ammo_magazine/clip/medium/practice,
- /obj/item/ammo_magazine/clip/c762/hunter = /obj/item/ammo_magazine/clip/medium/hunter,
- /obj/item/ammo_magazine/clip/sks/ap = /obj/item/ammo_magazine/clip/medium/ap,
- /obj/item/ammo_magazine/clip/mosin/ap = /obj/item/ammo_magazine/clip/medium/ap,
- /obj/item/ammo_magazine/s45/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
- /obj/item/ammo_magazine/s45/practice = /obj/item/ammo_magazine/speedloader_six/practice,
- /obj/item/ammo_magazine/s45/flash = /obj/item/ammo_magazine/speedloader_six/flash,
- /obj/item/ammo_magazine/s45/ap = /obj/item/ammo_magazine/speedloader_six/ap,
- /obj/item/ammo_magazine/m5mmcaseless/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m9mm/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m9mm/flash = /obj/item/ammo_magazine/pistol/flash,
- /obj/item/ammo_magazine/m9mm/practice = /obj/item/ammo_magazine/pistol/practice,
- /obj/item/ammo_magazine/m9mm/large/empty = /obj/item/ammo_magazine/pistol_large/empty,
- /obj/item/ammo_magazine/m9mm/compact/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m9mm/compact/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m9mm/compact/practice = /obj/item/ammo_magazine/pistol/practice,
- /obj/item/ammo_magazine/m9mm/luger/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m9mm/luger/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m9mm/vp70/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/m9mm/vp70/hp = /obj/item/ammo_magazine/smg/hp,
- /obj/item/ammo_magazine/m9mm/vp70/rubber = /obj/item/ammo_magazine/smg/rubber,
- /obj/item/ammo_magazine/m9mm/vp70/flash = /obj/item/ammo_magazine/smg/flash,
- /obj/item/ammo_magazine/m9mmt/empty = /obj/item/ammo_magazine/smg/empty,
- /obj/item/ammo_magazine/m9mmt/flash = /obj/item/ammo_magazine/smg/flash,
- /obj/item/ammo_magazine/m9mmt/practice = /obj/item/ammo_magazine/smg/practice,
- /obj/item/ammo_magazine/m9mmt/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/m9mmAdvanced/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/m9mmAdvanced/empty = /obj/item/ammo_magazine/smg/empty,
- /obj/item/ammo_magazine/m10mm/empty = /obj/item/ammo_magazine/smg/empty,
- /obj/item/ammo_magazine/m10mm/practice = /obj/item/ammo_magazine/smg/practice,
- /obj/item/ammo_magazine/m10mm/emp = /obj/item/ammo_magazine/smg/emp,
- /obj/item/ammo_magazine/m10mm/pistol/practice = /obj/item/ammo_magazine/pistol/practice,
- /obj/item/ammo_magazine/m10mm/pistol/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m10mm/pistol/emp = /obj/item/ammo_magazine/pistol/emp,
- /obj/item/ammo_magazine/m10mm/pistol/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m10mm/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/m10mm/hp = /obj/item/ammo_magazine/smg/hp,
- /obj/item/ammo_magazine/m545/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m545/practice = /obj/item/ammo_magazine/medium/practice,
- /obj/item/ammo_magazine/m545/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/m545/hunter = /obj/item/ammo_magazine/medium/hunter,
- /obj/item/ammo_magazine/m545/ext = /obj/item/ammo_magazine/medium,
- /obj/item/ammo_magazine/m545/small/empty = /obj/item/ammo_magazine/medium_small/empty,
- /obj/item/ammo_magazine/m545/small/practice = /obj/item/ammo_magazine/medium_small/practice,
- /obj/item/ammo_magazine/m545/small/ap = /obj/item/ammo_magazine/medium_small/ap,
- /obj/item/ammo_magazine/m545/small/hunter = /obj/item/ammo_magazine/medium_small/hunter,
- /obj/item/ammo_magazine/m545saw/empty = /obj/item/ammo_magazine/medium_box/empty,
- /obj/item/ammo_magazine/m545saw/ap = /obj/item/ammo_magazine/medium_box/ap,
- /obj/item/ammo_magazine/m545saw/hunter = /obj/item/ammo_magazine/medium_box,
- /obj/item/ammo_magazine/m44/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/s44/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
- /obj/item/ammo_magazine/m762/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m762/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/m762/ext/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m762/ext/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/m762enbloc/ap = /obj/item/ammo_magazine/clip/medium/ap,
- /obj/item/ammo_magazine/m762enbloc/empty = /obj/item/ammo_magazine/clip/medium/empty,
- /obj/item/ammo_magazine/m762svd/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m762svd/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/m2024/empty = /obj/item/ammo_magazine/pistol/empty,
- /obj/item/ammo_magazine/m2024/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/m2024/practice = /obj/item/ammo_magazine/pistol/practice,
- /obj/item/ammo_magazine/m2024/flash = /obj/item/ammo_magazine/pistol/flash,
- /obj/item/ammo_magazine/m2024/ap = /obj/item/ammo_magazine/pistol/ap,
- /obj/item/ammo_magazine/mglock9mm/empty = /obj/item/ammo_magazine/pistol_large/empty,
- /obj/item/ammo_magazine/mglock9mm/flash = /obj/item/ammo_magazine/pistol_large/flash,
- /obj/item/ammo_magazine/mglock9mm/rubber = /obj/item/ammo_magazine/pistol_large/rubber,
- /obj/item/ammo_magazine/mglock9mm/practice = /obj/item/ammo_magazine/pistol_large/practice,
- /obj/item/ammo_magazine/mg42/empty = /obj/item/ammo_magazine/medium_box/empty,
- /obj/item/ammo_magazine/mp5mag/ap = /obj/item/ammo_magazine/smg/ap,
- /obj/item/ammo_magazine/mp5mag/hp = /obj/item/ammo_magazine/smg/hp,
- /obj/item/ammo_magazine/mp5mag/rubber = /obj/item/ammo_magazine/smg/rubber,
- /obj/item/ammo_magazine/pitchmag/rubber = /obj/item/ammo_magazine/smg/rubber,
- /obj/item/ammo_magazine/asval/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/asval/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/akm/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/akm/hp = /obj/item/ammo_magazine/medium/hp,
- /obj/item/ammo_magazine/akm/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/akm/drum/ap = /obj/item/ammo_magazine/medium_drum/ap,
- /obj/item/ammo_magazine/ak74/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/ak74/hp = /obj/item/ammo_magazine/medium/hp,
- /obj/item/ammo_magazine/ak74/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/ak74/plum/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/m16/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/m16/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/m16/hp = /obj/item/ammo_magazine/medium/hp,
- /obj/item/ammo_magazine/m41/rubber = /obj/item/ammo_magazine/medium/rubber,
- /obj/item/ammo_magazine/type901/ap = /obj/item/ammo_magazine/medium/ap,
- /obj/item/ammo_magazine/ar10/ap = /obj/item/ammo_magazine/medium_small/ap,
- /obj/item/ammo_magazine/fal/ap = /obj/item/ammo_magazine/medium_small/ap,
- /obj/item/ammo_magazine/awp/ap = /obj/item/ammo_magazine/large/ap,
- /obj/item/ammo_magazine/hectate/ap = /obj/item/ammo_magazine/large/ap,
- /obj/item/ammo_magazine/plamya/ap = /obj/item/ammo_magazine/medium_drum/ap,
- /obj/item/ammo_magazine/plamya/rubber = /obj/item/ammo_magazine/medium_drum/rubber,
- /obj/item/ammo_magazine/molniya/ap = /obj/item/ammo_magazine/medium_box/ap,
- /obj/item/ammo_magazine/pkm/ap = /obj/item/ammo_magazine/medium_box/ap,
- /obj/item/ammo_magazine/rpd/ap = /obj/item/ammo_magazine/medium_box/ap,
- /obj/item/ammo_magazine/ssp4/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/makarov/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/tp23s/rubber = /obj/item/ammo_magazine/pistol/rubber,
- /obj/item/ammo_magazine/tp23s/highpower = /obj/item/ammo_magazine/pistol,
- /obj/item/ammo_magazine/tp23/flash = /obj/item/ammo_magazine/pistol/flash,
- /obj/item/ammo_magazine/tp23/hp = /obj/item/ammo_magazine/pistol/hp,
- /obj/item/ammo_magazine/tp23/ap = /obj/item/ammo_magazine/pistol/ap,
- /obj/item/ammo_magazine/tp23/emp = /obj/item/ammo_magazine/pistol/emp,
- /obj/item/ammo_magazine/s45lc/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
- /obj/item/ammo_magazine/s45lc/rifle = /obj/item/ammo_magazine/speedloader_six,
- /obj/item/ammo_magazine/mtg/empty = /obj/item/ammo_magazine/medium/empty,
- /obj/item/ammo_magazine/m95/empty = /obj/item/ammo_magazine/medium/empty,
-)
diff --git a/modular_chomp/maps/common_submaps/overmap/planets/thor/thor.dm b/modular_chomp/maps/common_submaps/overmap/planets/thor/thor.dm
index 468b1bb0aa..3b9339cf46 100644
--- a/modular_chomp/maps/common_submaps/overmap/planets/thor/thor.dm
+++ b/modular_chomp/maps/common_submaps/overmap/planets/thor/thor.dm
@@ -357,7 +357,7 @@
return
/obj/effect/step_trigger/teleporter/planetary_fall/thor/find_planet()
- planet = planet_thor
+ planet = GLOB.planet_thor
// Space mineral tiles are now not the default, so they get demoted to subtype status.
/turf/simulated/mineral/thor/vacuum
diff --git a/modular_chomp/maps/relic_base/relicbase_jobs.dm b/modular_chomp/maps/relic_base/relicbase_jobs.dm
deleted file mode 100644
index 586193a715..0000000000
--- a/modular_chomp/maps/relic_base/relicbase_jobs.dm
+++ /dev/null
@@ -1,101 +0,0 @@
-// Pilots
-
-var/const/SAR =(1<<11)
-var/const/PILOT =(1<<13)
-var/const/EXPLORER =(1<<14)
-
-var/const/access_pilot = 67
-var/const/access_explorer = 43
-
-/datum/access/pilot
- id = access_pilot
- desc = "Pilot"
- region = ACCESS_REGION_SUPPLY
-
-/datum/access/explorer
- id = access_explorer
- desc = "Explorer"
- region = ACCESS_REGION_GENERAL
-
-//SC Jobs
-
-/*
-
-//Will see about getting working later.
-
-/datum/job/captain
- title = "Station Director"
- flag = CAPTAIN
- department = "Command"
- head_position = 1
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 1
- spawn_positions = 1
- supervisors = "company officials and Corporate Regulations"
- selection_color = "#1D1D4F"
- req_admin_notify = 1
- access = list() //See get_access()
- minimal_access = list() //See get_access()
- minimal_player_age = 14
- economic_modifier = 20
-
- minimum_character_age = 25
- ideal_character_age = 50 // Because 70 is a tad on the old side
-
- outfit_type = /decl/hierarchy/outfit/job/captain
- alt_titles = list("Site Manager", "Overseer")
-
-/datum/job/captain/get_access()
- return get_all_station_access()
-*/
-
-/datum/job/pilot
- title = "Pilot"
- flag = PILOT
- department = "Civilian"
- department_flag = CIVILIAN
- faction = "Station"
- total_positions = 2
- spawn_positions = 2
- supervisors = "the head of personnel"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_pilot, access_cargo, access_mining, access_mining_station)
- minimal_access = list(access_pilot, access_cargo, access_mining, access_mining_station)
- outfit_type = /decl/hierarchy/outfit/job/pilot
-
-/datum/job/explorer
- title = "Explorer"
- flag = EXPLORER
- department = "Civilian"
- department_flag = CIVILIAN
- faction = "Station"
- total_positions = 4
- spawn_positions = 4
- supervisors = "the explorer leader and the head of personnel"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_explorer)
- minimal_access = list(access_explorer)
- outfit_type = /decl/hierarchy/outfit/job/explorer2
-/*
- alt_titles = list(
- "Explorer Technician" = /decl/hierarchy/outfit/job/explorer2/technician,
- "Explorer Medic" = /decl/hierarchy/outfit/job/explorer2/medic)
-*/
-
-/datum/job/sar
- title = "Search and Rescue"
- flag = SAR
- department = "Medical"
- department_flag = MEDSCI
- faction = "Station"
- total_positions = 2
- spawn_positions = 2
- supervisors = "the chief medical officer"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist, access_explorer)
- minimal_access = list(access_medical, access_medical_equip, access_morgue, access_explorer)
- outfit_type = /decl/hierarchy/outfit/job/medical/sar
diff --git a/modular_chomp/maps/southern_cross/southern_cross_jobs.dm b/modular_chomp/maps/southern_cross/southern_cross_jobs.dm
deleted file mode 100644
index 573a535672..0000000000
--- a/modular_chomp/maps/southern_cross/southern_cross_jobs.dm
+++ /dev/null
@@ -1,106 +0,0 @@
-// Pilots
-
-var/const/SAR =(1<<11)
-var/const/PILOT =(1<<13)
-var/const/EXPLORER =(1<<14)
-
-var/const/access_pilot = 67
-var/const/access_explorer = 43
-
-/datum/access/pilot
- id = access_pilot
- desc = JOB_PILOT
- region = ACCESS_REGION_SUPPLY
-
-/datum/access/explorer
- id = access_explorer
- desc = JOB_EXPLORER
- region = ACCESS_REGION_GENERAL
-
-//SC Jobs
-
-/*
-
-//Will see about getting working later. //CHOMPNote, do not use this
-
-/datum/job/captain
- title = "Station Director"
- flag = CAPTAIN
- department = "Command"
- head_position = 1
- department_flag = ENGSEC
- faction = FACTION_STATION
- total_positions = 1
- spawn_positions = 1
- supervisors = "company officials and Corporate Regulations"
- selection_color = "#1D1D4F"
- req_admin_notify = 1
- access = list() //See get_access()
- minimal_access = list() //See get_access()
- minimal_player_age = 14
- economic_modifier = 20
-
- minimum_character_age = 25
- ideal_character_age = 50 // Because 70 is a tad on the old side
-
- outfit_type = /decl/hierarchy/outfit/job/captain
- alt_titles = list("Site Manager", "Overseer")
-
-/datum/job/captain/get_access()
- return get_all_station_access()
-*/
-
-/datum/job/pilot
- title = JOB_PILOT
- flag = PILOT
- department = DEPARTMENT_CIVILIAN
- department_flag = CIVILIAN
- faction = FACTION_STATION
- total_positions = 2
- spawn_positions = 2
- supervisors = "the head of personnel"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_cargo, access_mining, access_mining_station)
- minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_cargo, access_mining, access_mining_station)
- outfit_type = /decl/hierarchy/outfit/job/pilot
-
-/datum/job/explorer
- title = JOB_EXPLORER
- flag = EXPLORER
- department = DEPARTMENT_CIVILIAN
- department_flag = CIVILIAN
- faction = FACTION_STATION
- total_positions = 4
- spawn_positions = 4
- supervisors = "the explorer leader and the head of personnel"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_explorer, access_research)
- minimal_access = list(access_explorer, access_research)
- banned_job_species = list(SPECIES_ZADDAT)
-
- outfit_type = /decl/hierarchy/outfit/job/explorer2
-/*
- alt_titles = list(
- JOB_ALT_EXPLORERE_TECHNICIAN = /decl/hierarchy/outfit/job/explorer2/technician,
- JOB_ALT_EXPLORER_MEDIC = /decl/hierarchy/outfit/job/explorer2/medic)
-*/
-
-/datum/job/sar
- title = JOB_SEARCH_AND_RESCUE
- flag = SAR
- department = DEPARTMENT_MEDICAL
- department_flag = MEDSCI
- faction = FACTION_STATION
- total_positions = 2
- spawn_positions = 2
- supervisors = "the chief medical officer"
- selection_color = "#515151"
- economic_modifier = 4
- access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist, access_explorer)
- minimal_access = list(access_medical, access_medical_equip, access_morgue, access_explorer)
- min_age_by_species = list(SPECIES_PROMETHEAN = 2)
-
- outfit_type = /decl/hierarchy/outfit/job/medical/sar
- job_description = "A " + JOB_SEARCH_AND_RESCUE + " operative recovers individuals who are injured or dead on the surface of Sif."
diff --git a/modular_chomp/maps/~map_system/maps.dm b/modular_chomp/maps/~map_system/maps.dm
index 8000a859bb..5d7efef3dc 100644
--- a/modular_chomp/maps/~map_system/maps.dm
+++ b/modular_chomp/maps/~map_system/maps.dm
@@ -1,5 +1,5 @@
var/datum/map/using_map = new USING_MAP_DATUM
-var/list/all_maps = list()
+GLOBAL_LIST_EMPTY(all_maps)
/hook/startup/proc/initialise_map_list()
for(var/type in subtypesof(/datum/map))
@@ -12,7 +12,7 @@ var/list/all_maps = list()
if(!M.path)
log_mapping("Map '[M]' does not have a defined path, not adding to map list!")
else
- all_maps[M.path] = M
+ GLOB.all_maps[M.path] = M
return 1
@@ -36,7 +36,7 @@ var/list/all_maps = list()
var/static/list/secret_levels = list() // Z-levels that (non-admin) ghosts can't get to
var/static/list/hidden_levels = list() // Z-levels who's contents are hidden, but not forbidden (gateways)
var/static/list/empty_levels = list() // Empty Z-levels that may be used for various things
- var/static/list/vorespawn_levels = list() //Z-levels where players are allowed to vore latejoin to. //CHOMPedit: the number of missing chompedits is giving me an aneurysm
+ var/static/list/vorespawn_levels = list() //Z-levels where players are allowed to vore latejoin to.
var/static/list/mappable_levels = list()// List of levels where mapping or other similar devices might work fully
var/static/list/below_blocked_levels = list()// List of levels where mapping or other similar devices might work fully
// End Static Lists
@@ -59,11 +59,11 @@ var/list/all_maps = list()
var/list/lateload_redgate = list() //VOREStation Add - The same thing as gateway, but safe-ish
var/list/allowed_jobs = list() //Job datums to use.
- //Works a lot better so if we get to a point where three-ish maps are used
- //We don't have to C&P ones that are only common between two of them
- //That doesn't mean we have to include them with the rest of the jobs though, especially for map specific ones.
- //Also including them lets us override already created jobs, letting us keep the datums to a minimum mostly.
- //This is probably a lot longer explanation than it needs to be.
+ //Works a lot better so if we get to a point where three-ish maps are used
+ //We don't have to C&P ones that are only common between two of them
+ //That doesn't mean we have to include them with the rest of the jobs though, especially for map specific ones.
+ //Also including them lets us override already created jobs, letting us keep the datums to a minimum mostly.
+ //This is probably a lot longer explanation than it needs to be.
var/list/holomap_smoosh // List of lists of zlevels to smoosh into single icons
var/list/holomap_offset_x = list()
@@ -214,7 +214,7 @@ var/list/all_maps = list()
// Try to free up a z level from existing temp sectors
if(!empty_levels.len)
for(var/Z in GLOB.map_sectors)
- var/obj/effect/overmap/visitable/sector/temporary/T = GLOB.map_sectors[Z]
+ var/obj/effect/overmap/visitable/sector/temporary/T = GLOB.map_sectors["[Z]"]
T.cleanup() // If we can release some of these, do that.
// Else, we need to buy a new one.
@@ -331,7 +331,7 @@ var/list/all_maps = list()
if(flags & MAP_LEVEL_PLAYER) map.player_levels += z
if(flags & MAP_LEVEL_SEALED) map.sealed_levels += z
if(flags & MAP_LEVEL_XENOARCH_EXEMPT) map.xenoarch_exempt_levels += z
- if(flags & MAP_LEVEL_VORESPAWN) map.vorespawn_levels += z //CHOMPedit: I stg stop forgetting CHOMPedit comments
+ if(flags & MAP_LEVEL_VORESPAWN) map.vorespawn_levels += z
if(flags & MAP_LEVEL_PERSIST) map.persist_levels += z
if(flags & MAP_LEVEL_EMPTY)
if(!map.empty_levels) map.empty_levels = list()
diff --git a/vorestation.dme b/vorestation.dme
index b19dcd99bd..0b4ac06847 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -658,7 +658,6 @@
#include "code\datums\ai_law_sets.dm"
#include "code\datums\ai_law_sets_vr.dm"
#include "code\datums\ai_laws.dm"
-#include "code\datums\api.dm"
#include "code\datums\beam.dm"
#include "code\datums\browser.dm"
#include "code\datums\callback.dm"