diff --git a/baystation12.dme b/baystation12.dme index d8f9ea384c..9d2be5ed2b 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -134,7 +134,6 @@ #include "code\datums\modules.dm" #include "code\datums\organs.dm" #include "code\datums\recipe.dm" -#include "code\datums\spell.dm" #include "code\datums\sun.dm" #include "code\datums\supplypacks.dm" #include "code\datums\diseases\appendicitis.dm" @@ -178,21 +177,6 @@ #include "code\datums\helper_datums\global_iterator.dm" #include "code\datums\helper_datums\teleport.dm" #include "code\datums\helper_datums\topic_input.dm" -#include "code\datums\spells\area_teleport.dm" -#include "code\datums\spells\conjure.dm" -#include "code\datums\spells\dumbfire.dm" -#include "code\datums\spells\emplosion.dm" -#include "code\datums\spells\ethereal_jaunt.dm" -#include "code\datums\spells\explosion.dm" -#include "code\datums\spells\genetic.dm" -#include "code\datums\spells\horsemask.dm" -#include "code\datums\spells\inflict_handler.dm" -#include "code\datums\spells\knock.dm" -#include "code\datums\spells\mind_transfer.dm" -#include "code\datums\spells\projectile.dm" -#include "code\datums\spells\trigger.dm" -#include "code\datums\spells\turf_teleport.dm" -#include "code\datums\spells\wizard.dm" #include "code\datums\wires\airlock.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc.dm" @@ -229,6 +213,28 @@ #include "code\game\smoothwall.dm" #include "code\game\sound.dm" #include "code\game\supplyshuttle.dm" +#include "code\game\antagonist\antagonist.dm" +#include "code\game\antagonist\antagonist_build.dm" +#include "code\game\antagonist\antagonist_globals.dm" +#include "code\game\antagonist\antagonist_helpers.dm" +#include "code\game\antagonist\antagonist_objectives.dm" +#include "code\game\antagonist\antagonist_spawn.dm" +#include "code\game\antagonist\alien\borer.dm" +#include "code\game\antagonist\alien\xenomorph.dm" +#include "code\game\antagonist\outsider\commando.dm" +#include "code\game\antagonist\outsider\deathsquad.dm" +#include "code\game\antagonist\outsider\ert.dm" +#include "code\game\antagonist\outsider\mercenary.dm" +#include "code\game\antagonist\outsider\ninja.dm" +#include "code\game\antagonist\outsider\raider.dm" +#include "code\game\antagonist\outsider\wizard.dm" +#include "code\game\antagonist\station\changeling.dm" +#include "code\game\antagonist\station\cultist.dm" +#include "code\game\antagonist\station\highlander.dm" +#include "code\game\antagonist\station\renegade.dm" +#include "code\game\antagonist\station\revolutionary.dm" +#include "code\game\antagonist\station\rogue_ai.dm" +#include "code\game\antagonist\station\traitor.dm" #include "code\game\area\ai_monitored.dm" #include "code\game\area\areas.dm" #include "code\game\area\asteroid_areas.dm" @@ -239,16 +245,13 @@ #include "code\game\dna\dna_modifier.dm" #include "code\game\dna\genes\disabilities.dm" #include "code\game\dna\genes\gene.dm" -#include "code\game\dna\genes\monkey.dm" #include "code\game\dna\genes\powers.dm" #include "code\game\gamemodes\events.dm" -#include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" #include "code\game\gamemodes\setupgame.dm" -#include "code\game\gamemodes\autotraitor\autotraitor.dm" #include "code\game\gamemodes\blob\blob.dm" #include "code\game\gamemodes\blob\theblob.dm" #include "code\game\gamemodes\blob\blobs\core.dm" @@ -259,7 +262,6 @@ #include "code\game\gamemodes\changeling\changeling.dm" #include "code\game\gamemodes\changeling\changeling_powers.dm" #include "code\game\gamemodes\changeling\modularchangling.dm" -#include "code\game\gamemodes\changeling\traitor_chan.dm" #include "code\game\gamemodes\cult\cult.dm" #include "code\game\gamemodes\cult\cult_items.dm" #include "code\game\gamemodes\cult\cult_structures.dm" @@ -271,7 +273,6 @@ #include "code\game\gamemodes\events\dust.dm" #include "code\game\gamemodes\events\miniblob.dm" #include "code\game\gamemodes\events\power_failure.dm" -#include "code\game\gamemodes\events\space_ninja.dm" #include "code\game\gamemodes\events\wormholes.dm" #include "code\game\gamemodes\events\holidays\Christmas.dm" #include "code\game\gamemodes\events\holidays\Holidays.dm" @@ -282,32 +283,11 @@ #include "code\game\gamemodes\malfunction\malfunction.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" -#include "code\game\gamemodes\mutiny\auth_key.dm" -#include "code\game\gamemodes\mutiny\directive.dm" -#include "code\game\gamemodes\mutiny\emergency_authentication_device.dm" -#include "code\game\gamemodes\mutiny\key_pinpointer.dm" -#include "code\game\gamemodes\mutiny\mutiny.dm" -#include "code\game\gamemodes\mutiny\mutiny_admin.dm" -#include "code\game\gamemodes\mutiny\mutiny_fluff.dm" -#include "code\game\gamemodes\mutiny\mutiny_hooks.dm" -#include "code\game\gamemodes\mutiny\directives\alien_fraud_directive.dm" -#include "code\game\gamemodes\mutiny\directives\bluespace_contagion_directive.dm" -#include "code\game\gamemodes\mutiny\directives\financial_crisis_directive.dm" -#include "code\game\gamemodes\mutiny\directives\ipc_virus_directive.dm" -#include "code\game\gamemodes\mutiny\directives\research_to_ripleys_directive.dm" -#include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm" -#include "code\game\gamemodes\mutiny\directives\terminations_directive.dm" #include "code\game\gamemodes\ninja\ninja.dm" #include "code\game\gamemodes\nuclear\nuclear.dm" -#include "code\game\gamemodes\nuclear\nuclearbomb.dm" #include "code\game\gamemodes\nuclear\pinpointer.dm" #include "code\game\gamemodes\revolution\revolution.dm" -#include "code\game\gamemodes\revolution\rp_revolution.dm" #include "code\game\gamemodes\traitor\traitor.dm" -#include "code\game\gamemodes\wizard\artifact.dm" -#include "code\game\gamemodes\wizard\rightandwrong.dm" -#include "code\game\gamemodes\wizard\soulstone.dm" -#include "code\game\gamemodes\wizard\spellbook.dm" #include "code\game\gamemodes\wizard\wizard.dm" #include "code\game\jobs\access.dm" #include "code\game\jobs\job_controller.dm" @@ -356,6 +336,7 @@ #include "code\game\machinery\mass_driver.dm" #include "code\game\machinery\navbeacon.dm" #include "code\game\machinery\newscaster.dm" +#include "code\game\machinery\nuclear_bomb.dm" #include "code\game\machinery\OpTable.dm" #include "code\game\machinery\overview.dm" #include "code\game\machinery\portable_tag_turret.dm" @@ -660,6 +641,7 @@ #include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm" +#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\power.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm" @@ -823,8 +805,6 @@ #include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\massmodvar.dm" #include "code\modules\admin\verbs\modifyvariables.dm" -#include "code\modules\admin\verbs\one_click_antag.dm" -#include "code\modules\admin\verbs\onlyone.dm" #include "code\modules\admin\verbs\playsound.dm" #include "code\modules\admin\verbs\possess.dm" #include "code\modules\admin\verbs\pray.dm" @@ -833,10 +813,8 @@ #include "code\modules\admin\verbs\SDQL_2.dm" #include "code\modules\admin\verbs\SDQL_2_parser.dm" #include "code\modules\admin\verbs\striketeam.dm" -#include "code\modules\admin\verbs\striketeam_syndicate.dm" #include "code\modules\admin\verbs\ticklag.dm" #include "code\modules\admin\verbs\tripAI.dm" -#include "code\modules\admin\verbs\vox_raiders.dm" #include "code\modules\alarm\alarm.dm" #include "code\modules\alarm\alarm_handler.dm" #include "code\modules\alarm\atmosphere_alarm.dm" @@ -959,9 +937,7 @@ #include "code\modules\economy\Events.dm" #include "code\modules\economy\Events_Mundane.dm" #include "code\modules\economy\TradeDestinations.dm" -#include "code\modules\events\alien_infestation.dm" #include "code\modules\events\blob.dm" -#include "code\modules\events\borers.dm" #include "code\modules\events\brand_intelligence.dm" #include "code\modules\events\carp_migration.dm" #include "code\modules\events\comms_blackout.dm" @@ -981,6 +957,7 @@ #include "code\modules\events\money_spam.dm" #include "code\modules\events\prison_break.dm" #include "code\modules\events\radiation_storm.dm" +#include "code\modules\events\random_antagonist.dm" #include "code\modules\events\rogue_drones.dm" #include "code\modules\events\space_ninja.dm" #include "code\modules\events\spacevine.dm" @@ -1072,12 +1049,16 @@ #include "code\modules\mob\typing_indicator.dm" #include "code\modules\mob\update_icons.dm" #include "code\modules\mob\dead\death.dm" -#include "code\modules\mob\dead\observer\login.dm" #include "code\modules\mob\dead\observer\logout.dm" #include "code\modules\mob\dead\observer\observer.dm" #include "code\modules\mob\dead\observer\say.dm" +#include "code\modules\mob\freelook\chunk.dm" +#include "code\modules\mob\freelook\eye.dm" +#include "code\modules\mob\freelook\update_triggers.dm" +#include "code\modules\mob\freelook\visualnet.dm" #include "code\modules\mob\language\generic.dm" #include "code\modules\mob\language\language.dm" +#include "code\modules\mob\language\monkey.dm" #include "code\modules\mob\language\outsider.dm" #include "code\modules\mob\language\station.dm" #include "code\modules\mob\language\synthetic.dm" @@ -1143,6 +1124,7 @@ #include "code\modules\mob\living\carbon\human\login.dm" #include "code\modules\mob\living\carbon\human\logout.dm" #include "code\modules\mob\living\carbon\human\MedicalSideEffects.dm" +#include "code\modules\mob\living\carbon\human\npcs.dm" #include "code\modules\mob\living\carbon\human\say.dm" #include "code\modules\mob\living\carbon\human\unarmed_attack.dm" #include "code\modules\mob\living\carbon\human\update_icons.dm" @@ -1153,6 +1135,7 @@ #include "code\modules\mob\living\carbon\human\species\outsider\shadow.dm" #include "code\modules\mob\living\carbon\human\species\outsider\vox.dm" #include "code\modules\mob\living\carbon\human\species\station\golem.dm" +#include "code\modules\mob\living\carbon\human\species\station\monkey.dm" #include "code\modules\mob\living\carbon\human\species\station\slime.dm" #include "code\modules\mob\living\carbon\human\species\station\station.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_embryo.dm" @@ -1172,14 +1155,6 @@ #include "code\modules\mob\living\carbon\metroid\say.dm" #include "code\modules\mob\living\carbon\metroid\subtypes.dm" #include "code\modules\mob\living\carbon\metroid\update_icons.dm" -#include "code\modules\mob\living\carbon\monkey\death.dm" -#include "code\modules\mob\living\carbon\monkey\emote.dm" -#include "code\modules\mob\living\carbon\monkey\examine.dm" -#include "code\modules\mob\living\carbon\monkey\inventory.dm" -#include "code\modules\mob\living\carbon\monkey\life.dm" -#include "code\modules\mob\living\carbon\monkey\login.dm" -#include "code\modules\mob\living\carbon\monkey\monkey.dm" -#include "code\modules\mob\living\carbon\monkey\update_icons.dm" #include "code\modules\mob\living\silicon\death.dm" #include "code\modules\mob\living\silicon\laws.dm" #include "code\modules\mob\living\silicon\login.dm" @@ -1235,7 +1210,6 @@ #include "code\modules\mob\living\silicon\robot\drone\drone_items.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm" #include "code\modules\mob\living\simple_animal\bees.dm" -#include "code\modules\mob\living\simple_animal\constructs.dm" #include "code\modules\mob\living\simple_animal\corpse.dm" #include "code\modules\mob\living\simple_animal\parrot.dm" #include "code\modules\mob\living\simple_animal\shade.dm" @@ -1245,6 +1219,8 @@ #include "code\modules\mob\living\simple_animal\borer\borer_captive.dm" #include "code\modules\mob\living\simple_animal\borer\borer_powers.dm" #include "code\modules\mob\living\simple_animal\borer\say.dm" +#include "code\modules\mob\living\simple_animal\constructs\constructs.dm" +#include "code\modules\mob\living\simple_animal\constructs\soulstone.dm" #include "code\modules\mob\living\simple_animal\friendly\cat.dm" #include "code\modules\mob\living\simple_animal\friendly\corgi.dm" #include "code\modules\mob\living\simple_animal\friendly\crab.dm" @@ -1564,6 +1540,24 @@ #include "code\modules\shuttles\shuttle_specops.dm" #include "code\modules\shuttles\shuttle_supply.dm" #include "code\modules\shuttles\shuttles_multi.dm" +#include "code\modules\spells\area_teleport.dm" +#include "code\modules\spells\conjure.dm" +#include "code\modules\spells\dumbfire.dm" +#include "code\modules\spells\emplosion.dm" +#include "code\modules\spells\ethereal_jaunt.dm" +#include "code\modules\spells\explosion.dm" +#include "code\modules\spells\genetic.dm" +#include "code\modules\spells\horsemask.dm" +#include "code\modules\spells\inflict_handler.dm" +#include "code\modules\spells\knock.dm" +#include "code\modules\spells\mind_transfer.dm" +#include "code\modules\spells\projectile.dm" +#include "code\modules\spells\spell.dm" +#include "code\modules\spells\spellbook.dm" +#include "code\modules\spells\trigger.dm" +#include "code\modules\spells\turf_teleport.dm" +#include "code\modules\spells\wizard_artifacts.dm" +#include "code\modules\spells\wizard_spells.dm" #include "code\modules\supermatter\supermatter.dm" #include "code\modules\surgery\bones.dm" #include "code\modules\surgery\brainrepair.dm" diff --git a/code/ATMOSPHERICS/_atmos_setup.dm b/code/ATMOSPHERICS/_atmos_setup.dm index 14efbb7de1..47903bfdc6 100644 --- a/code/ATMOSPHERICS/_atmos_setup.dm +++ b/code/ATMOSPHERICS/_atmos_setup.dm @@ -17,6 +17,7 @@ #define CONNECT_TYPE_REGULAR 1 #define CONNECT_TYPE_SUPPLY 2 #define CONNECT_TYPE_SCRUBBER 4 +#define CONNECT_TYPE_HE 8 var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 2066a6f9bf..cbaeb3bf9c 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -423,18 +423,3 @@ initial_loc.air_vent_names -= id_tag ..() return - -/* - Alt-click to vent crawl - Monkeys, aliens, slimes and mice. - This is a little buggy but somehow that just seems to plague ventcrawl. - I am sorry, I don't know why. -*/ -// Commenting this out for now, it's not critical, stated to be buggy, and seems like -// a really clumsy way of doing this. ~Z -/*/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/ML) - if(istype(ML)) - var/list/ventcrawl_verbs = list(/mob/living/carbon/monkey/verb/ventcrawl, /mob/living/carbon/alien/verb/ventcrawl, /mob/living/carbon/slime/verb/ventcrawl,/mob/living/simple_animal/mouse/verb/ventcrawl) - if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated - ML.handle_ventcrawl(src) - return - ..()*/ diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm index f9dbef84cf..cb11410f86 100644 --- a/code/ATMOSPHERICS/he_pipes.dm +++ b/code/ATMOSPHERICS/he_pipes.dm @@ -5,6 +5,8 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging pipe_icon = "hepipe" color = "#404040" level = 2 + connect_types = CONNECT_TYPE_HE + layer = 2.41 var/initialize_directions_he var/surface = 2 //surface area in m^2 var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh @@ -106,6 +108,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction icon_state = "intact" pipe_icon = "hejunction" level = 2 + connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE minimum_temperature_difference = 300 thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT diff --git a/code/ZAS/_gas_mixture_xgm.dm b/code/ZAS/_gas_mixture_xgm.dm index 0d2f1a1147..8043be1579 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/ZAS/_gas_mixture_xgm.dm @@ -239,7 +239,7 @@ //Removes a volume of gas from the mixture and returns a gas_mixture containing the removed air with the given volume /datum/gas_mixture/proc/remove_volume(removed_volume) - var/datum/gas_mixture/removed = remove_ratio(removed_volume/volume, 1) + var/datum/gas_mixture/removed = remove_ratio(removed_volume/(volume*group_multiplier), 1) removed.volume = removed_volume return removed diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 75113338f3..b7caf86669 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -592,13 +592,13 @@ datum/proc/dd_SortValue() return "[src]" /obj/machinery/dd_SortValue() - return "[sanitize(name)]" + return "[sanitize_old(name)]" /obj/machinery/camera/dd_SortValue() return "[c_tag]" /datum/alarm/dd_SortValue() - return "[sanitize(last_name)]" + return "[sanitize_old(last_name)]" //creates every subtype of prototype (excluding prototype) and adds it to list L. //if no list/L is provided, one is created. diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 346ffc7c47..54ce601ac7 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -22,46 +22,103 @@ * Text sanitization */ -//Simply removes < and > and limits the length of the message -/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN) - var/list/strip_chars = list("<",">") - t = copytext(t,1,limit) - for(var/char in strip_chars) - var/index = findtext(t, char) - while(index) - t = copytext(t, 1, index) + copytext(t, index+1) - index = findtext(t, char) - return t +//Used for preprocessing entered text +/proc/sanitize(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1) + if(!input) + return -//Removes a few problematic characters -/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#")) - for(var/char in repl_chars) - t = replacetext(t, char, repl_chars[char]) - return t + if(max_length) + input = copytext(input,1,max_length) -/proc/readd_quotes(var/t) - var/list/repl_chars = list(""" = "\"") - for(var/char in repl_chars) - var/index = findtext(t, char) - while(index) - t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5) - index = findtext(t, char) - return t + if(extra) + input = replace_characters(input, list("\n"=" ","\t"=" ")) -//Runs byond's sanitization proc along-side sanitize_simple -/proc/sanitize(var/t,var/list/repl_chars = null) - return html_encode(sanitize_simple(t,repl_chars)) + if(encode) + //In addition to processing html, html_encode removes byond formatting codes like "\red", "\i" and other. + //It is important to avoid double-encode text, it can "break" quotes and some other characters. + //Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.) + input = html_encode(input) + else + //If not need encode text, simply remove < and > + //note: we can also remove here byond formatting codes: 0xFF + next byte + input = replace_characters(input, list("<"=" ", ">"=" ")) -//Runs sanitize and strip_html_simple -//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode() -/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN) - return copytext((sanitize(strip_html_simple(t))),1,limit) + if(trim) + //Maybe, we need trim text twice? Here and before copytext? + input = trim(input) -//Runs byond's sanitization proc along-side strip_html_simple -//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause -/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN) - return copytext((html_encode(strip_html_simple(t))),1,limit) + return input +//Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode(). +//Best used for sanitize object names, window titles. +//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites - +//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()! +/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1) + return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'"), max_length, encode, trim, extra)) + +//Filters out undesirable characters from names +/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0) + if(!input || length(input) > max_length) + return //Rejects the input if it is null or if it is longer then the max length allowed + + var/number_of_alphanumeric = 0 + var/last_char_group = 0 + var/output = "" + + for(var/i=1, i<=length(input), i++) + var/ascii_char = text2ascii(input,i) + switch(ascii_char) + // A .. Z + if(65 to 90) //Uppercase Letters + output += ascii2text(ascii_char) + number_of_alphanumeric++ + last_char_group = 4 + + // a .. z + if(97 to 122) //Lowercase Letters + if(last_char_group<2) output += ascii2text(ascii_char-32) //Force uppercase first character + else output += ascii2text(ascii_char) + number_of_alphanumeric++ + last_char_group = 4 + + // 0 .. 9 + if(48 to 57) //Numbers + if(!last_char_group) continue //suppress at start of string + if(!allow_numbers) continue + output += ascii2text(ascii_char) + number_of_alphanumeric++ + last_char_group = 3 + + // ' - . + if(39,45,46) //Common name punctuation + if(!last_char_group) continue + output += ascii2text(ascii_char) + last_char_group = 2 + + // ~ | @ : # $ % & * + + if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI) + if(!last_char_group) continue //suppress at start of string + if(!allow_numbers) continue + output += ascii2text(ascii_char) + last_char_group = 2 + + //Space + if(32) + if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string + output += ascii2text(ascii_char) + last_char_group = 1 + else + return + + if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '" + + if(last_char_group == 1) + output = copytext(output,1,length(output)) //removes the last character (in this case a space) + + for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names + if(cmptext(output,bad_name)) return //(not case sensitive) + + return output //Returns null if there is any bad text in the string /proc/reject_bad_text(var/text, var/max_length=512) @@ -76,97 +133,11 @@ else non_whitespace = 1 if(non_whitespace) return text //only accepts the text if it has some non-spaces -// Used to get a properly sanitized input, of max_length -/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN) - var/name = input(user, message, title, default) - return strip_html_properly(name, max_length) -// Used to get a trimmed, properly sanitized input, of max_length -/proc/trim_strip_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN) - return trim(stripped_input(user, message, title, default, max_length)) +//Old variant. Haven't dared to replace in some places. +/proc/sanitize_old(var/t,var/list/repl_chars = list("\n"="#","\t"="#")) + return html_encode(replace_characters(t,repl_chars)) -//Filters out undesirable characters from names -/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN) - if(!t_in || length(t_in) > max_length) - return //Rejects the input if it is null or if it is longer then the max length allowed - - var/number_of_alphanumeric = 0 - var/last_char_group = 0 - var/t_out = "" - - for(var/i=1, i<=length(t_in), i++) - var/ascii_char = text2ascii(t_in,i) - switch(ascii_char) - // A .. Z - if(65 to 90) //Uppercase Letters - t_out += ascii2text(ascii_char) - number_of_alphanumeric++ - last_char_group = 4 - - // a .. z - if(97 to 122) //Lowercase Letters - if(last_char_group<2) t_out += ascii2text(ascii_char-32) //Force uppercase first character - else t_out += ascii2text(ascii_char) - number_of_alphanumeric++ - last_char_group = 4 - - // 0 .. 9 - if(48 to 57) //Numbers - if(!last_char_group) continue //suppress at start of string - if(!allow_numbers) continue - t_out += ascii2text(ascii_char) - number_of_alphanumeric++ - last_char_group = 3 - - // ' - . - if(39,45,46) //Common name punctuation - if(!last_char_group) continue - t_out += ascii2text(ascii_char) - last_char_group = 2 - - // ~ | @ : # $ % & * + - if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI) - if(!last_char_group) continue //suppress at start of string - if(!allow_numbers) continue - t_out += ascii2text(ascii_char) - last_char_group = 2 - - //Space - if(32) - if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string - t_out += ascii2text(ascii_char) - last_char_group = 1 - else - return - - if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '" - - if(last_char_group == 1) - t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space) - - for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names - if(cmptext(t_out,bad_name)) return //(not case sensitive) - - return t_out - -//checks text for html tags -//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm) -//relpaces < with < -proc/checkhtml(var/t) - t = sanitize_simple(t, list(""=".")) - var/p = findtext(t,"<",1) - while (p) //going through all the tags - var/start = p++ - var/tag = copytext(t,p, p+1) - if (tag != "/") - while (reject_bad_text(copytext(t, p, p+1), 1)) - tag = copytext(t,start, p) - p++ - tag = copytext(t,start+1, p) - if (!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it - t = copytext(t,1,start-1) + "<" + copytext(t,start+1) - p = findtext(t,"<",p) - return t /* * Text searches */ @@ -203,12 +174,18 @@ proc/checkhtml(var/t) /* * Text modification */ + /proc/replacetext(text, find, replacement) return list2text(text2list(text, find), replacement) /proc/replacetextEx(text, find, replacement) return list2text(text2listEx(text, find), replacement) +/proc/replace_characters(var/t,var/list/repl_chars) + for(var/char in repl_chars) + replacetext(t, char, repl_chars[char]) + return t + //Adds 'u' number of zeros ahead of the text 't' /proc/add_zero(t, u) while (length(t) < u) @@ -239,7 +216,6 @@ proc/checkhtml(var/t) for (var/i = length(text), i > 0, i--) if (text2ascii(text, i) > 32) return copytext(text, 1, i + 1) - return "" //Returns a string with reserved characters and spaces before the first word and after the last word removed. @@ -250,43 +226,18 @@ proc/checkhtml(var/t) /proc/capitalize(var/t as text) return uppertext(copytext(t, 1, 2)) + copytext(t, 2) -//Centers text by adding spaces to either side of the string. -/proc/dd_centertext(message, length) - var/new_message = message - var/size = length(message) - var/delta = length - size - if(size == length) - return new_message - if(size > length) - return copytext(new_message, 1, length + 1) - if(delta == 1) - return new_message + " " - if(delta % 2) - new_message = " " + new_message - delta-- - var/spaces = add_lspace("",delta/2-1) - return spaces + new_message + spaces - -//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose -/proc/dd_limittext(message, length) - var/size = length(message) - if(size <= length) - return message - return copytext(message, 1, length + 1) - - -/proc/stringmerge(var/text,var/compare,replace = "*") //This proc fills in all spaces with the "replace" var (* by default) with whatever //is in the other string at the same spot (assuming it is not a replace char). //This is used for fingerprints +/proc/stringmerge(var/text,var/compare,replace = "*") var/newtext = text if(lentext(text) != lentext(compare)) return 0 for(var/i = 1, i < lentext(text), i++) var/a = copytext(text,i,i+1) var/b = copytext(compare,i,i+1) -//if it isn't both the same letter, or if they are both the replacement character -//(no way to know what it was supposed to be) + //if it isn't both the same letter, or if they are both the replacement character + //(no way to know what it was supposed to be) if(a != b) if(a == replace) //if A is the replacement char newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1) @@ -296,9 +247,9 @@ proc/checkhtml(var/t) return 0 return newtext -/proc/stringpercent(var/text,character = "*") //This proc returns the number of chars of the string that is the character //This is used for detective work to determine fingerprint completion. +/proc/stringpercent(var/text,character = "*") if(!text || !character) return 0 var/count = 0 @@ -325,36 +276,6 @@ proc/TextPreview(var/string,var/len=40) else return "[copytext(string, 1, 37)]..." -//This proc strips html properly, but it's not lazy like the other procs. -//This means that it doesn't just remove < and > and call it a day. -//Also limit the size of the input, if specified. -/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN) - if(!input) - return - var/opentag = 1 //These store the position of < and > respectively. - var/closetag = 1 - while(1) - opentag = findtext(input, "<") - closetag = findtext(input, ">") - if(closetag && opentag) - if(closetag < opentag) - input = copytext(input, (closetag + 1)) - else - input = copytext(input, 1, opentag) + copytext(input, (closetag + 1)) - else if(closetag || opentag) - if(opentag) - input = copytext(input, 1, opentag) - else - input = copytext(input, (closetag + 1)) - else - break - if(max_length) - input = copytext(input,1,max_length) - return sanitize(input) - -/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN) - return trim(strip_html_properly(input, max_length)) - //For generating neat chat tag-images //The icon var could be local in the proc, but it's a waste of resources // to always create it and then throw it out. diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c00bb17b1d..72d85a67b5 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -308,10 +308,10 @@ Turf and target are seperate in case you want to teleport some distance from a t var/newname for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name. - newname = input(src,"You are a [role]. Would you like to change your name to something else?", "Name change",oldname) as text - if((world.time-time_passed)>300) + newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) as text + if((world.time-time_passed)>3000) return //took too long - newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters. + newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters. for(var/mob/living/M in player_list) if(M == src) @@ -460,8 +460,6 @@ Turf and target are seperate in case you want to teleport some distance from a t moblist.Add(M) for(var/mob/new_player/M in sortmob) moblist.Add(M) - for(var/mob/living/carbon/monkey/M in sortmob) - moblist.Add(M) for(var/mob/living/carbon/slime/M in sortmob) moblist.Add(M) for(var/mob/living/simple_animal/M in sortmob) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index e9c5429dd2..c41f9594b3 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -235,7 +235,7 @@ datum/hud/New(mob/owner) if(ishuman(mymob)) human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences - else if(ismonkey(mymob)) + else if(issmall(mymob)) monkey_hud(ui_style) else if(isbrain(mymob)) brain_hud(ui_style) @@ -259,11 +259,11 @@ datum/hud/New(mob/owner) if(!hud_used) usr << "\red This mob type does not use a HUD." return - + if(!ishuman(src)) usr << "\red Inventory hiding is currently only supported for human mobs, sorry." return - + if(!client) return if(client.view != world.view) return @@ -325,7 +325,7 @@ datum/hud/New(mob/owner) return if(client.view != world.view) return - + if(hud_used.hud_shown) hud_used.hud_shown = 0 if(src.hud_used.adding) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 496553558d..e8c868bb72 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -52,45 +52,6 @@ /mob/living/RestrainedClickOn(var/atom/A) return -/* - Monkeys -*/ - - -/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity) - - if(!..()) - return - - A.attack_hand(src) - -/* - Monkey RestrainedClickOn() was apparently the - one and only use of all of the restrained click code - (except to stop you from doing things while handcuffed); - moving it here instead of various hand_p's has simplified - things considerably -*/ -/mob/living/carbon/monkey/RestrainedClickOn(var/atom/A) - if(a_intent != "harm" || !ismob(A)) return - if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) - return - var/mob/living/carbon/ML = A - var/dam_zone = ran_zone(pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")) - var/armor = ML.run_armor_check(dam_zone, "melee") - if(prob(75)) - ML.apply_damage(rand(1,3), BRUTE, dam_zone, armor) - for(var/mob/O in viewers(ML, null)) - O.show_message("\red [name] has bit [ML]!", 1) - if(armor >= 2) return - if(ismonkey(ML)) - for(var/datum/disease/D in viruses) - if(istype(D, /datum/disease/jungle_fever)) - ML.contract_disease(D,1,0) - else - for(var/mob/O in viewers(ML, null)) - O.show_message("\red [src] has attempted to bite [ML]!", 1) - /* Aliens */ diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c3821926b9..b112beaf53 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -1,3 +1,5 @@ +var/list/gamemode_cache = list() + /datum/configuration var/server_name = null // server name (for world name / status) var/server_suffix = 0 // generate numeric suffix based on server port @@ -67,6 +69,9 @@ var/automute_on = 0 //enables automuting/spam prevention var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. + var/rp_rev = 0 // Changes between conversion methods in rev. + var/announce_revheads = 0 // Determines if revheads are announced in revolution mode. + var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds... var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active. @@ -82,7 +87,7 @@ var/usealienwhitelist = 0 var/limitalienplayers = 0 var/alien_to_human_ratio = 0.5 - + var/allow_extra_antags = 0 var/guests_allowed = 1 var/debugparanoid = 0 @@ -120,6 +125,7 @@ var/use_loyalty_implants = 0 var/welder_vision = 1 + var/generate_asteroid = 0 //Used for modifying movement speed for mobs. //Unversal modifiers @@ -194,8 +200,8 @@ // 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.") src.modes += M.config_tag @@ -203,7 +209,6 @@ src.probabilities[M.config_tag] = M.probability if (M.votable) src.votable_modes += M.config_tag - del(M) src.votable_modes += "secret" /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist @@ -305,6 +310,9 @@ if ("mentors") config.mods_are_mentors = 1 + if ("generate_asteroid") + config.generate_asteroid = 1 + if("allow_admin_ooccolor") config.allow_admin_ooccolor = 1 @@ -585,6 +593,15 @@ if("disable_welder_vision") config.welder_vision = 0 + if("rp_rev") + config.rp_rev = 1 + + if("announce_revheads") + config.announce_revheads = 1 + + 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])) @@ -767,23 +784,20 @@ /datum/configuration/proc/pick_mode(mode_name) // I wish I didn't have to instance the game modes in order to look up // their information, but it is the only way (at least that I know of). - for (var/T in (typesof(/datum/game_mode) - /datum/game_mode)) - var/datum/game_mode/M = new T() + 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) + M.create_antagonists() return M - del(M) - return new /datum/game_mode/extended() + return gamemode_cache["extended"] /datum/configuration/proc/get_runnable_modes() var/list/datum/game_mode/runnable_modes = new - for (var/T in (typesof(/datum/game_mode) - /datum/game_mode)) - var/datum/game_mode/M = new T() - //world << "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]" + for (var/game_mode in gamemode_cache) + var/datum/game_mode/M = gamemode_cache[game_mode] if (!(M.config_tag in modes)) - del(M) continue if (probabilities[M.config_tag]<=0) - del(M) continue if (M.can_start()) runnable_modes[M] = probabilities[M.config_tag] diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index aae9cd5829..33dfc36f7f 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -136,9 +136,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle /datum/emergency_shuttle_controller/proc/get_shuttle_prep_time() // During mutiny rounds, the shuttle takes twice as long. - if(ticker && istype(ticker.mode,/datum/game_mode/mutiny)) - return SHUTTLE_PREPTIME * 3 //15 minutes - + if(ticker && ticker.mode) + return SHUTTLE_PREPTIME * ticker.mode.shuttle_delay return SHUTTLE_PREPTIME diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 561d75469c..facae60577 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -26,7 +26,7 @@ datum/controller/game_controller/New() job_master = new /datum/controller/occupations() job_master.SetupOccupations() job_master.LoadJobs("config/jobs.txt") - world << "\red \b Job setup complete" + world << "Job setup complete" if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase() if(!syndicate_code_response) syndicate_code_response = generate_code_phrase() @@ -34,15 +34,11 @@ datum/controller/game_controller/New() datum/controller/game_controller/proc/setup() world.tick_lag = config.Ticklag - //Create the asteroid Z-level. - new /datum/random_map(null,13,32,5,217,223) - spawn(20) createRandomZlevel() setup_objects() setupgenetics() - setupfactions() setup_economy() SetupXenoarch() @@ -50,17 +46,17 @@ datum/controller/game_controller/proc/setup() datum/controller/game_controller/proc/setup_objects() - world << "\red \b Initializing objects" + world << "Initializing objects" sleep(-1) for(var/atom/movable/object in world) object.initialize() - world << "\red \b Initializing pipe networks" + world << "Initializing pipe networks" sleep(-1) for(var/obj/machinery/atmospherics/machine in machines) machine.build_network() - world << "\red \b Initializing atmos machinery." + world << "Initializing atmos machinery." sleep(-1) for(var/obj/machinery/atmospherics/unary/U in machines) if(istype(U, /obj/machinery/atmospherics/unary/vent_pump)) @@ -75,13 +71,11 @@ datum/controller/game_controller/proc/setup_objects() // If you do not use the official Baycode asteroid map, you will need to change them. asteroid_ore_map = new /datum/random_map/ore(null,13,32,5,217,223) - //Shitty hack to fix mining turf overlays, for some reason New() is not being called. - //for(var/turf/simulated/floor/plating/airless/asteroid/T in world) - // T.updateMineralOverlays() - // T.name = "asteroid" + // Set up antagonists. + populate_antag_type_list() //Set up spawn points. populate_spawn_points() - world << "\red \b Initializations complete." + world << "Initializations complete." sleep(-1) diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index 95429c01ea..8b44de3883 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -190,25 +190,25 @@ var/global/datum/shuttle_controller/shuttle_controller shuttles["Special Operations"] = ERT process_shuttles += ERT - //Vox Shuttle. + //Skipjack. var/datum/shuttle/multi_shuttle/VS = new/datum/shuttle/multi_shuttle() - VS.origin = locate(/area/shuttle/vox/station) + VS.origin = locate(/area/shuttle/skipjack/station) VS.destinations = list( - "Fore Starboard Solars" = locate(/area/vox_station/northeast_solars), - "Fore Port Solars" = locate(/area/vox_station/northwest_solars), - "Aft Starboard Solars" = locate(/area/vox_station/southeast_solars), - "Aft Port Solars" = locate(/area/vox_station/southwest_solars), - "Mining asteroid" = locate(/area/vox_station/mining) + "Fore Starboard Solars" = locate(/area/skipjack_station/northeast_solars), + "Fore Port Solars" = locate(/area/skipjack_station/northwest_solars), + "Aft Starboard Solars" = locate(/area/skipjack_station/southeast_solars), + "Aft Port Solars" = locate(/area/skipjack_station/southwest_solars), + "Mining asteroid" = locate(/area/skipjack_station/mining) ) VS.announcer = "NSV Icarus" VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not." VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip." - VS.interim = locate(/area/vox_station/transit) + VS.interim = locate(/area/skipjack_station/transit) VS.warmup_time = 0 - shuttles["Vox Skipjack"] = VS + shuttles["Skipjack"] = VS //Nuke Ops shuttle. var/datum/shuttle/multi_shuttle/MS = new/datum/shuttle/multi_shuttle() diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 07de3d9427..e27eeb1caf 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -52,6 +52,16 @@ message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.") return +/client/proc/debug_antagonist_template(antag_type in all_antag_types) + set category = "Debug" + set name = "Debug Antagonist" + set desc = "Debug an antagonist template." + + var/datum/antagonist/antag = all_antag_types[antag_type] + if(antag) + usr.client.debug_variables(antag) + message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") + /client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano")) set category = "Debug" set name = "Debug Controller" diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 679c7a09bc..7db31c6fa6 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -129,7 +129,7 @@ datum/controller/vote for(var/key in current_votes) if(choices[current_votes[key]] == .) round_voters += key // Keep track of who voted for the winning round. - if((mode == "gamemode" && . == "extended") || ticker.hide_mode == 0) // Announce Extended gamemode, but not other gamemodes + if((mode == "gamemode" && . == "Extended") || ticker.hide_mode == 0) // Announce Extended gamemode, but not other gamemodes text += "Vote Result: [.]" else if(mode != "gamemode") @@ -139,6 +139,8 @@ datum/controller/vote else text += "Vote Result: Inconclusive - No Votes!" + if(mode == "add_antagonist") + antag_add_failed = 1 log_vote(text) world << "[text]" return . @@ -161,6 +163,11 @@ datum/controller/vote if("crew_transfer") if(. == "Initiate Crew Transfer") init_shift_change(null, 1) + if("add_antagonist") + if(isnull(.) || . == "None") + antag_add_failed = 1 + else + additional_antag_types |= antag_names_to_ids[.] if(mode == "gamemode") //fire this even if the vote fails. if(!going) @@ -205,14 +212,12 @@ datum/controller/vote if(ticker.current_state >= 2) return 0 choices.Add(config.votable_modes) - var/list/L = typesof(/datum/game_mode) - /datum/game_mode for (var/F in choices) - for (var/T in L) - var/datum/game_mode/M = new T() - if (M.config_tag == F) - gamemode_names[M.config_tag] = capitalize(M.name) //It's ugly to put this here but it works - additional_text.Add("
- NanoTrasen's reasons for the following directives are classified. -
- "} - - proc/meets_prerequisites() - return 0 - - proc/directives_complete() - return 1 - - proc/initialize() - return 1 - - proc/get_remaining_orders() - return "" - -/proc/get_directive(type) - var/datum/game_mode/mutiny/mode = get_mutiny_mode() - if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]"))) - return null - - return mode.current_directive diff --git a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm deleted file mode 100644 index 580322f8e1..0000000000 --- a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm +++ /dev/null @@ -1,41 +0,0 @@ -datum/directive/terminations/alien_fraud - special_orders = list( - "Suspend financial accounts of all Tajaran and Unathi personnel.", - "Transfer their payrolls to the station account.", - "Terminate their employment.") - - proc/is_alien(mob/M) - var/species = M.get_species() - return species == "Tajara" || species == "Unathi" - -datum/directive/terminations/alien_fraud/get_crew_to_terminate() - var/list/aliens[0] - for(var/mob/M in player_list) - if (M.is_ready() && is_alien(M) && M != mode.head_loyalist.current) - aliens.Add(M) - return aliens - -datum/directive/terminations/alien_fraud/get_description() - return {" -- An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered - operating within [system_name()]. Human personnel are not suspected to be involved. Further information is classified. -
- "} - -datum/directive/terminations/alien_fraud/meets_prerequisites() - // There must be at least one Tajaran and at least one Unathi, but the total - // of the Tajarans and Unathi combined can't be more than 1/3rd of the crew. - var/tajarans = 0 - var/unathi = 0 - for(var/mob/M in player_list) - var/species = M.get_species() - if(species == "Tajara") - tajarans++ - if(species == "Unathi") - unathi++ - - if (!tajarans || !unathi) - return 0 - - return (tajarans + unathi) <= (player_list.len / 3) diff --git a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm deleted file mode 100644 index 1ea28852fd..0000000000 --- a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm +++ /dev/null @@ -1,58 +0,0 @@ -#define INFECTION_COUNT 5 - -datum/directive/bluespace_contagion - var/list/infected = list() - - proc/get_infection_candidates() - var/list/candidates[0] - for(var/mob/M in player_list) - if (M.is_ready() && !M.is_mechanical() && M != mode.head_loyalist.current) - candidates.Add(M) - return candidates - -datum/directive/bluespace_contagion/get_description() - return {" -- A manufactured and near-undetectable virus is spreading on NanoTrasen stations. - The pathogen travels by bluespace after maturing for one day and meets the Sol Health Organisation standards for a class X biological threat, warranting use of lethal force to contain an outbreak. - No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified. -
- "} - -datum/directive/bluespace_contagion/initialize() - var/list/candidates = get_infection_candidates() - var/list/infected_names = list() - for(var/i=0, i < INFECTION_COUNT, i++) - if(!candidates.len) - break - - var/mob/candidate = pick(candidates) - candidates.Remove(candidate) - infected.Add(candidate) - infected_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]") - - special_orders = list( - "Quarantine these personnel: [list2text(infected_names, ", ")].", - "Allow one hour for a cure to be manufactured.", - "If no cure arrives after that time, execute and burn the infected.") - -datum/directive/bluespace_contagion/meets_prerequisites() - var/list/candidates = get_infection_candidates() - return candidates.len >= 7 - -datum/directive/bluespace_contagion/directives_complete() - return infected.len == 0 - -datum/directive/bluespace_contagion/get_remaining_orders() - var/text = "" - for(var/victim in infected) - text += "- [system_name()] system banks in financial crisis. Local emergency situation ongoing. - NT Funds redistributed in accordance with financial regulations covered by employee contracts, impact upon civilian department expected. - Further information is classified. -
- "} - -datum/directive/terminations/financial_crisis/meets_prerequisites() - var/list/civilians = get_crew_to_terminate() - return civilians.len >= 5 diff --git a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm b/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm deleted file mode 100644 index e035b665c9..0000000000 --- a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm +++ /dev/null @@ -1,96 +0,0 @@ -datum/directive/ipc_virus - special_orders = list( - "Terminate employment of all IPC personnel.", - "Extract the Positronic Brains from IPC units.", - "Mount the Positronic Brains into Cyborgs.") - - var/list/roboticist_roles = list( - "Research Director", - "Roboticist" - ) - - var/list/brains_to_enslave = list() - var/list/cyborgs_to_make = list() - var/list/ids_to_terminate = list() - - proc/get_ipcs() - var/list/machines[0] - for(var/mob/M in player_list) - if (M.is_ready() && M.get_species() == "Machine") - machines.Add(M) - return machines - - proc/get_roboticists() - var/list/roboticists[0] - for(var/mob/M in player_list) - if (M.is_ready() && roboticist_roles.Find(M.mind.assigned_role)) - roboticists.Add(M) - return roboticists - -datum/directive/ipc_virus/initialize() - for(var/mob/living/carbon/human/H in get_ipcs()) - brains_to_enslave.Add(H.mind) - cyborgs_to_make.Add(H.mind) - ids_to_terminate.Add(H.wear_id) - -datum/directive/ipc_virus/get_description() - return {" -- IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system. - Risk to [station_name()] IPC units has not been assessed. Further information is classified. -
- "} - -datum/directive/ipc_virus/meets_prerequisites() - var/list/ipcs = get_ipcs() - var/list/roboticists = get_roboticists() - return ipcs.len > 2 && roboticists.len > 1 - -datum/directive/ipc_virus/directives_complete() - return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0 - -datum/directive/ipc_virus/get_remaining_orders() - var/text = "" - for(var/brain in brains_to_enslave) - text += "- The NanoTrasen [system_name()] Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform. - The Research Director is to assist the Head of Personnel in coordinating assets. - Weapons department reports solid sales. Further information is classified. -
- "} - -datum/directive/research_to_ripleys/meets_prerequisites() - var/list/researchers = get_researchers() - return researchers.len > 3 - -datum/directive/research_to_ripleys/initialize() - for(var/mob/living/carbon/human/R in get_researchers()) - ids_to_reassign[R.wear_id] = 0 - - special_orders = list( - "Reassign all research personnel, excluding the Research Director, to Shaft Miner.", - "Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentCom.") - -datum/directive/research_to_ripleys/directives_complete() - if (materials_shipped < MATERIALS_REQUIRED) return 0 - return count_researchers_reassigned() == ids_to_reassign.len - -datum/directive/research_to_ripleys/get_remaining_orders() - var/text = "" - if(MATERIALS_REQUIRED > materials_shipped) - text += "- Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from [system_name()]. - Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified. -
- "} - -datum/directive/tau_ceti_needs_women/initialize() - for(var/mob/living/carbon/human/H in get_target_heads()) - command_targets[H.wear_id] = 0 - - for(var/mob/living/carbon/human/H in get_target_aliens()) - alien_targets.Add(H.wear_id) - - special_orders = list( - "Remove [get_target_gender()] personnel from Command positions.", - "Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.") - -datum/directive/tau_ceti_needs_women/meets_prerequisites() - var/females = 0 - var/males = 0 - for(var/mob/M in player_list) - if(M.is_ready() && !M.is_mechanical() && M.get_species() != "Diona") - var/gender = M.get_gender() - if(gender == MALE) - males++ - else if(gender == FEMALE) - females++ - - return males >= 2 && females >= 2 - -datum/directive/tau_ceti_needs_women/directives_complete() - return command_targets.len == count_heads_reassigned() && alien_targets.len == 0 - -datum/directive/tau_ceti_needs_women/get_remaining_orders() - var/text = "" - for(var/head in command_targets) - if(!command_targets[head]) - text += "- Wow. Much ugly. So painful. - Many terminations. Very classified. -
- "} - -datum/directive/terminations/test/meets_prerequisites() - return 1 diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm deleted file mode 100644 index 028c4113cc..0000000000 --- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm +++ /dev/null @@ -1,104 +0,0 @@ -/obj/machinery/emergency_authentication_device - var/datum/game_mode/mutiny/mode - - name = "\improper Emergency Authentication Device" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "blackbox" - density = 1 - anchored = 1 - - var/captains_key - var/secondary_key - var/activated = 0 - - use_power = 0 - - New(loc, mode) - src.mode = mode - ..(loc) - - proc/check_key_existence() - if(!mode.captains_key) - captains_key = 1 - - if(!mode.secondary_key) - secondary_key = 1 - - proc/get_status() - if(activated) - return "Activated" - if(captains_key && secondary_key) - return "Both Keys Authenticated" - if(captains_key) - return "Captain's Key Authenticated" - if(secondary_key) - return "Secondary Key Authenticated" - else - return "Inactive" - -/obj/machinery/emergency_authentication_device/attack_hand(mob/user) - if(activated) - user << "\blue \The [src] is already active!" - return - - if(!mode.current_directive.directives_complete()) - state("Command aborted. Communication with CentCom is prohibited until Directive X has been completed.") - return - - check_key_existence() - if(captains_key && secondary_key) - activated = 1 - user << "\blue You activate \the [src]!" - state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.") - return - - if(!captains_key && !secondary_key) - state("Command aborted. Please present the authentication keys before proceeding.") - return - - if(!captains_key) - state("Command aborted. Please present the Captain's Authentication Key.") - return - - if(!secondary_key) - state("Command aborted. Please present the Emergency Secondary Authentication Key.") - return - - // Impossible! - state("Command aborted. This unit is defective.") - -/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user) - if(activated) - user << "\blue \The [src] is already active!" - return - - if(!mode.current_directive.directives_complete()) - state({"Command aborted. Communication with CentCom is prohibited until Directive X has been completed."}) - return - - check_key_existence() - if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key) - captains_key = O - user.drop_item() - O.loc = src - - state("Key received. Thank you, Captain [mode.head_loyalist].") - spawn(5) - state(secondary_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Emergency Secondary Authentication Key now.") - return - - if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key) - secondary_key = O - user.drop_item() - O.loc = src - - state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].") - spawn(5) - state(captains_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Captain's Authentication Key now.") - return - ..() - -/obj/machinery/emergency_authentication_device/examine(mob/user) - user << {" -This is a specialized communications device that is able to instantly send a message to NanoTrasen High Command via quantum entanglement with a sister device at CentCom. -The EAD's status is [get_status()]."} diff --git a/code/game/gamemodes/mutiny/key_pinpointer.dm b/code/game/gamemodes/mutiny/key_pinpointer.dm deleted file mode 100644 index 7e8d628d85..0000000000 --- a/code/game/gamemodes/mutiny/key_pinpointer.dm +++ /dev/null @@ -1,49 +0,0 @@ -/obj/item/weapon/pinpointer/advpinpointer/auth_key - name = "\improper Authentication Key Pinpointer" - desc = "Tracks the positions of the emergency authentication keys." - var/datum/game_mode/mutiny/mutiny - - New() - mutiny = ticker.mode - ..() - -/obj/item/weapon/pinpointer/advpinpointer/auth_key/attack_self() - switch(mode) - if (0) - mode = 1 - active = 1 - target = mutiny.captains_key - workobj() - usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key." - if (1) - mode = 2 - target = mutiny.secondary_key - usr << "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key." - else - mode = 0 - active = 0 - icon_state = "pinoff" - usr << "\blue You switch \the [src] off." - -/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user) - switch(mode) - if (1) - user << "Is is calibrated for the Captain's Authentication Key." - if (2) - user << "It is calibrated for the Emergency Secondary Authentication Key." - else - user << "It is switched off." - -/datum/supply_packs/key_pinpointer - name = "Authentication Key Pinpointer crate" - contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key) - cost = 250 - containertype = /obj/structure/closet/crate - containername = "Authentication Key Pinpointer crate" - access = access_heads - group = "Operations" - - New() - // This crate is only accessible during mutiny rounds - if (istype(ticker.mode,/datum/game_mode/mutiny)) - ..() diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm deleted file mode 100644 index 78e16e50a4..0000000000 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ /dev/null @@ -1,384 +0,0 @@ -#define MUTINY_RECRUITMENT_COOLDOWN 5 - -datum/game_mode/mutiny - var/datum/mutiny_fluff/fluff - var/datum/directive/current_directive - var/obj/item/weapon/mutiny/auth_key/captain/captains_key - var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key - var/obj/machinery/emergency_authentication_device/ead - var/datum/mind/head_loyalist - var/datum/mind/head_mutineer - var/recruit_loyalist_cooldown = 0 - var/recruit_mutineer_cooldown = 0 - var/list/loyalists = list() - var/list/mutineers = list() - var/list/body_count = list() - - name = "mutiny" - config_tag = "mutiny" - required_players = 7 - ert_disabled = 1 - - uplink_welcome = "Mutineers Uplink Console:" - uplink_uses = 0 - - New() - fluff = new(src) - - proc/reveal_directives() - spawn(rand(1 MINUTE, 3 MINUTES)) - command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") - spawn(rand(3 MINUTES, 5 MINUTES)) - send_pda_message() - spawn(rand(3 MINUTES, 5 MINUTES)) - fluff.announce_directives() - spawn(rand(2 MINUTES, 3 MINUTE)) - - var/list/reasons = list( - "political instability", - "quantum fluctuations", - "hostile raiders", - "derelict station debris", - "REDACTED", - "ancient alien artillery", - "solar magnetic storms", - "sentient time-travelling killbots", - "gravitational anomalies", - "wormholes to another dimension", - "a telescience mishap", - "radiation flares", - "supermatter dust", - "leaks into a negative reality", - "antiparticle clouds", - "residual bluespace energy", - "suspected criminal operatives", - "malfunctioning von Neumann probe swarms", - "shadowy interlopers", - "a stranded Vox arkship", - "haywire IPC constructs", - "rogue Unathi exiles", - "artifacts of eldritch horror", - "a brain slug infestation", - "killer bugs that lay eggs in the husks of the living", - "a deserted transport carrying xenomorph specimens", - "an emissary for the gestalt requesting a security detail", - "a Tajaran slave rebellion", - "radical Skrellian transevolutionaries", - "classified security operations", - "science-defying raw elemental chaos" - ) - command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") - - // Returns an array in case we want to expand on this later. - proc/get_head_loyalist_candidates() - var/list/candidates[0] - for(var/mob/loyalist in player_list) - if(loyalist.mind && loyalist.mind.assigned_role == "Captain") - candidates.Add(loyalist.mind) - return candidates - - proc/get_head_mutineer_candidates() - var/list/candidates[0] - for(var/mob/mutineer in player_list) - if(mutineer.client.prefs.be_special & BE_MUTINEER) - for(var/job in command_positions - "Captain") - if(mutineer.mind && mutineer.mind.assigned_role == job) - candidates.Add(mutineer.mind) - return candidates - - proc/get_directive_candidates() - var/list/candidates[0] - for(var/T in typesof(/datum/directive) - /datum/directive) - var/datum/directive/D = new T(src) - if (D.meets_prerequisites()) - candidates.Add(D) - return candidates - - proc/send_pda_message() - var/obj/item/device/pda/pda = null - for(var/obj/item/device/pda/P in head_mutineer.current) - pda = P - break - - if (!pda) - return 0 - - if (!pda.message_silent) - playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, pda.loc)) - O.show_message(text("\icon[pda] *[pda.ttone]*")) - - head_mutineer.current << fluff.get_pda_body() - return 1 - - proc/get_equipment_slots() - return list( - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "backpack" = slot_in_backpack, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand) - - proc/equip_head_loyalist() - equip_head(head_loyalist, "loyalist", /mob/living/carbon/human/proc/recruit_loyalist) - - proc/equip_head_mutineer() - equip_head(head_mutineer, "mutineer", /mob/living/carbon/human/proc/recruit_mutineer) - - proc/equip_head(datum/mind/head, faction, proc/recruitment_verb) - var/mob/living/carbon/human/H = head.current - H << "You are the Head [capitalize(faction)]!" - head.special_role = "head_[faction]" - - var/slots = get_equipment_slots() - switch(faction) - if("loyalist") - if(captains_key) del(captains_key) - captains_key = new(H) - H.equip_in_one_of_slots(captains_key, slots) - if("mutineer") - if(secondary_key) del(secondary_key) - secondary_key = new(H) - H.equip_in_one_of_slots(secondary_key, slots) - - H.update_icons() - H.verbs += recruitment_verb - - proc/add_loyalist(datum/mind/M) - add_faction(M, "loyalist", loyalists) - - proc/add_mutineer(datum/mind/M) - add_faction(M, "mutineer", mutineers) - - proc/add_faction(datum/mind/M, faction, list/faction_list) - if(!can_be_recruited(M, faction)) - M.current << "\red Recruitment canceled; your role has already changed." - head_mutineer.current << "\red Could not recruit [M]. Their role has changed." - return - - if(M in loyalists) - loyalists.Remove(M) - - if(M in mutineers) - mutineers.Remove(M) - - M.special_role = faction - faction_list.Add(M) - - if(faction == "mutineer") - M.current << fluff.mutineer_tag("You have joined the mutineers!") - head_mutineer.current << fluff.mutineer_tag("[M] has joined the mutineers!") - else - M.current << fluff.loyalist_tag("You have joined the loyalists!") - head_loyalist.current << fluff.loyalist_tag("[M] has joined the loyalists!") - - update_icon(M) - - proc/was_bloodbath() - var/list/remaining_loyalists = loyalists - body_count - if (!remaining_loyalists.len) - return 1 - - var/list/remaining_mutineers = mutineers - body_count - if (!remaining_mutineers.len) - return 1 - - return 0 - - proc/replace_nuke_with_ead() - for(var/obj/machinery/nuclearbomb/N in world) - ead = new(N.loc, src) - del(N) - - proc/unbolt_vault_door() - var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault) - vault.lock() - - proc/make_secret_transcript() - var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server) - if(!S) return - - var/obj/item/weapon/paper/crumpled/bloody/transcript = new(S.loc) - transcript.name = "secret transcript" - transcript.info = fluff.secret_transcript() - - proc/can_be_recruited(datum/mind/M, role) - if(!M) return 0 - if(!M.special_role) return 1 - switch(role) - if("loyalist") - return M.special_role == "mutineer" - if("mutineer") - return M.special_role == "loyalist" - - proc/round_outcome() - world << "- [current_directive.get_description()] -
-
- TO: Captain [mode.head_loyalist], Commanding Officer, [station_name()]
- FROM: NanoTrasen Emergency Messaging Relay
- DATE: [time2text(world.realtime, "MM/DD")]/[game_year]
- SUBJECT: Directive X
-
- A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.
- This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.
- As Captain, you possess the Captain's Authentication Key.
- The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.
- An Authentication Key Pinpointer can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.
- A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
-
- Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X: -
-\"You must read this! NanoTrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION! - -They don't care about us they only care about WEALTH and POWER... Share this message with people you trust. - -Be safe, friend.\" (Unable to Reply)
"} - - proc/announce() - world << "The current game mode is - Mutiny!" - world << {" -The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.
-The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.
-The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].
-Loyalists - Follow the Head Loyalist in carrying out [loyalist_tag("NanoTrasen's directives")] then activate the EAD.
-Mutineers - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the EAD.
-
NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/loyalist_minor_victory() - return {" -NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -Despite the mutiny, the crew was successful in implementing the directive. Unfortunately, they failed to notify Central Command of their successes due to a breach in the chain of command. -[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration. -NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their mostly successful efforts, at a ceremony this coming Thursday. -[mode.body_count.len] are believed to have died during the coup. -NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/no_victory() - return {" -NanoTrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -No further information has yet emerged from the station or its crew, who are presumed to be in holding with NanoTrasen investigators. -NanoTrasen officials refuse to comment. -Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for terrorist activity, and [mode.loyalists.len] crew are currently providing evidence to investigators, believed to be the 'loyal' station personnel. -[mode.body_count.len] are believed to have died during the coup. -NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/mutineer_minor_victory() - return {" -Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -Information at present indicates that the top-secret directive--which has since been retracted--was invalid due to a broken authentication code. Members of the crew, including an unidentified Head of Staff, prevented the directive from being accomplished. -[mode.mutineers.len] members of the station's personnel were released from interrogations today, following a mutiny investigation. -NanoTrasen has reprimanded [mode.loyalists.len] members of the crew for failing to follow command validation procedures. -[mode.body_count.len] are believed to have died during the coup. -Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "} - - proc/mutineer_major_victory() - return {" -NanoTrasen has praised the efforts of [mode.head_mutineer.assigned_role] [mode.head_mutineer] and several other members of the crew, who recently seized control of a company station in [system_name()]--[station_name()]--amid a local interstellar crisis. -What appears to have been a "legitimate" mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -It has been revealed that the directive was invalid and fraudulent. Company officials have not released a statement about the source of the directive. -Thanks to the efforts of the resistant members of the crew, the directive was not carried out. -[mode.mutineers.len] members of the station's personnel were congratulated and awarded with the [mutineer_tag("Star of Bravery")], for their efforts in preventing the illegal directive's completion. -NanoTrasen has [mode.loyalists.len] members of the crew in holding, while it investigates the circumstances that led to the acceptance and initiation of an invalid directive. -[mode.body_count.len] are believed to have died during the coup. -Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "} - - proc/secret_transcript() - return {" -| Name: [active1.fields["name"]] \
ID: [active1.fields["id"]] \n \ Sex: [active1.fields["sex"]] \n \ @@ -264,7 +264,7 @@ switch(href_list["field"]) if("fingerprint") if (istype(src.active1, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["fingerprint"] = t1 @@ -282,55 +282,55 @@ src.active1.fields["age"] = t1 if("mi_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis"] = t1 if("mi_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis_d"] = t1 if("ma_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis"] = t1 if("ma_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis_d"] = t1 if("alg") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg"] = t1 if("alg_d") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg_d"] = t1 if("cdi") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi"] = t1 if("cdi_d") if (istype(src.active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi_d"] = t1 if("notes") if (istype(src.active2, /datum/data/record)) - var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["notes"] = t1 @@ -345,21 +345,21 @@ src.temp = text("Blood Type: \n\tA- A+ \n\tB- B+ \n\tAB- AB+ \n\tO- O+ ", src, src, src, src, src, src, src, src) if("b_dna") if (istype(src.active2, /datum/data/record)) - var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["b_dna"] = t1 if("vir_name") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) - var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return v.fields["name"] = t1 if("vir_desc") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) - var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return v.fields["description"] = t1 @@ -464,7 +464,7 @@ if (!( istype(src.active2, /datum/data/record) )) return var/a2 = src.active2 - var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return var/counter = 1 diff --git a/code/game/machinery/computer3/computers/prisoner.dm b/code/game/machinery/computer3/computers/prisoner.dm index 7b0c97d4ae..49f1940d75 100644 --- a/code/game/machinery/computer3/computers/prisoner.dm +++ b/code/game/machinery/computer3/computers/prisoner.dm @@ -90,7 +90,7 @@ screen = !screen else if(href_list["warn"]) - var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))) + var/warning = sanitize(input(usr,"Message:","Enter your message here!","")) if(!warning) return var/obj/item/weapon/implant/I = locate(href_list["warn"]) if( istype(I) && I.imp_in) diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index f630b24175..924f32b1b7 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -404,7 +404,7 @@ What a mess.*/ if (!( istype(active2, /datum/data/record) )) return var/a2 = active2 - var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return var/counter = 1 @@ -444,19 +444,19 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) + var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1) return active1.fields["name"] = t1 if("id") if (istype(active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["id"] = t1 if("fingerprint") if (istype(active1, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["fingerprint"] = t1 @@ -474,31 +474,31 @@ What a mess.*/ active1.fields["age"] = t1 if("mi_crim") if (istype(active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim"] = t1 if("mi_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim_d"] = t1 if("ma_crim") if (istype(active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim"] = t1 if("ma_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim_d"] = t1 if("notes") if (istype(active2, /datum/data/record)) - var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN))) + var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["notes"] = t1 @@ -525,7 +525,7 @@ What a mess.*/ alert(usr, "You do not have the required rank to do this!") if("species") if (istype(active1, /datum/data/record)) - var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["species"] = t1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 5915aef5ac..fcece506c3 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -175,7 +175,7 @@ var/on_store_message = "has entered long-term storage." var/on_store_name = "Cryogenic Oversight" var/on_enter_occupant_message = "You feel cool air surround you. You go numb as your senses turn inward." - var/allow_occupant_types = list(/mob/living/carbon/human, /mob/living/carbon/monkey) + var/allow_occupant_types = list(/mob/living/carbon/human) var/disallow_occupant_types = list() var/mob/occupant = null // Person waiting to be despawned. @@ -363,10 +363,10 @@ if(occupant.mind.objectives.len) del(occupant.mind.objectives) occupant.mind.special_role = null - else - if(ticker.mode.name == "AutoTraitor") - var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode - current_mode.possible_traitors.Remove(occupant) + //else + //if(ticker.mode.name == "AutoTraitor") + //var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode + //current_mode.possible_traitors.Remove(occupant) // Delete them from datacore. @@ -396,12 +396,11 @@ control_computer.frozen_crew += "[occupant.real_name]" announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") - visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.", 3) + visible_message("\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.", 3) + set_occupant(null) // Delete the mob. del(occupant) - occupant = null - name = initial(name) /obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob) @@ -448,7 +447,7 @@ M << "[on_enter_occupant_message]" M << "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." - occupant = M + set_occupant(M) time_entered = world.time // Book keeping! @@ -517,7 +516,7 @@ usr.client.perspective = EYE_PERSPECTIVE usr.client.eye = src usr.loc = src - src.occupant = usr + set_occupant(usr) if(orient_right) icon_state = "[occupied_icon_state]-r" @@ -526,11 +525,10 @@ usr << "[on_enter_occupant_message]" usr << "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." - occupant = usr + time_entered = world.time src.add_fingerprint(usr) - name = "[name] ([usr.name])" return @@ -544,7 +542,7 @@ occupant.client.perspective = MOB_PERSPECTIVE occupant.loc = get_turf(src) - occupant = null + set_occupant(null) if(orient_right) icon_state = "[base_icon_state]-r" @@ -553,6 +551,12 @@ return +/obj/machinery/cryopod/proc/set_occupant(var/occupant) + src.occupant = occupant + name = initial(name) + if(occupant) + name = "[name] ([occupant])" + //Attacks/effects. /obj/machinery/cryopod/blob_act() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 41e88ae741..0040ac0e92 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -844,19 +844,20 @@ About the new airlock wires panel: return 0 return ..() -/obj/machinery/door/airlock/can_close(var/forced) +/obj/machinery/door/airlock/can_close(var/forced=0) if(locked || welded) return 0 + if(!forced) //despite the name, this wire is for general door control. - //Bolts are already covered by the check for locked, above if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR)) return 0 + return ..() /obj/machinery/door/airlock/close(var/forced=0) if(!can_close(forced)) - return + return 0 if(safe) for(var/turf/turf in locs) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index f677140cc3..4f480e41ea 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -88,10 +88,10 @@ return 0 return 1 -/obj/machinery/door/proc/can_close(var/forced = 0) - if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER)))) - return 1 - return 0 +/obj/machinery/door/proc/can_close() + if(density || operating || !ticker) + return 0 + return 1 /obj/machinery/door/Bumped(atom/AM) if(p_open || operating) return diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 8799273b93..9ae8751a7a 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -22,7 +22,7 @@ open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed - //These are frequenly used with windows, so make sure zones can pass. + //These are frequenly used with windows, so make sure zones can pass. //Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it. block_air_zones = 0 @@ -149,7 +149,7 @@ "\The [src]", "Yes, [density ? "open" : "close"]", "No") if(answer == "No") return - if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user))) + if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !user.isSilicon()) || (get_dist(src, user) > 1 && !isAI(user))) user << "Sorry, you must remain able bodied and close to \the [src] in order to use it." return if(density && (stat & (BROKEN|NOPOWER))) //can still close without power @@ -169,7 +169,7 @@ if(alarmed) // Accountability! users_to_open |= user.name - needs_to_close = 1 + needs_to_close = !user.isSilicon() spawn() open() else @@ -272,7 +272,7 @@ spawn(0) close() return - + return ..() // CHECK PRESSURE diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 52c1bdc380..74e7de9934 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -194,10 +194,9 @@ if(critter.meat_type) slab_type = critter.meat_type else if(istype(src.occupant,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = occupant slab_name = src.occupant.real_name - slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human - else if(istype(src.occupant, /mob/living/carbon/monkey)) - slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey + slab_type = H.species.meat_type // Small mobs don't give as much nutrition. if(src.occupant.small) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 5a4e6d7255..c573229a10 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -196,7 +196,7 @@ Class Procs: user.set_machine(src) /obj/machinery/CouldNotUseTopic(var/mob/user) - usr.unset_machine() + user.unset_machine() //////////////////////////////////////////////////////////////////////////////////////////// @@ -215,8 +215,7 @@ Class Procs: if(user.lying || user.stat) return 1 if ( ! (istype(usr, /mob/living/carbon/human) || \ - istype(usr, /mob/living/silicon) || \ - istype(usr, /mob/living/carbon/monkey)) ) + istype(usr, /mob/living/silicon))) usr << "\red You don't have the dexterity to do this!" return 1 /* @@ -270,9 +269,9 @@ Class Procs: if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet) temp_apc.terminal.powernet.trigger_warning() - return 1 - else - return 0 + if(user.stunned) + return 1 + return 0 /obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C) if(!istype(C)) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 8569ede3fd..b04e9d1851 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -323,7 +323,7 @@ if(speed <= 0) speed = 1 if("setpath") - var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN)) + var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null) if(newpath && newpath != "") moving = 0 // stop moving path = newpath diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 56fcd1298e..de2a13aab5 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -194,7 +194,7 @@ Transponder Codes:
\nAuth. Disk: [] ", src, (src.auth ? "++++++++++" : "----------")) - if (src.auth) - if (src.yes_code) - dat += text("\nStatus: []-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src) - else - dat += text("\nStatus: Auth. S2-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \n[] Safety: Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - else - if (src.timing) - dat += text("\nStatus: Set-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - else - dat += text("\nStatus: Auth. S1-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - var/message = "AUTH" - if (src.auth) - message = text("[]", src.code) - if (src.yes_code) - message = "*****" - dat += text(" \n>[] \n1-2-3 \n4-5-6 \n7-8-9 \nR-0-E \n", message, src, src, src, src, src, src, src, src, src, src, src, src) - user << browse(dat, "window=nuclearbomb;size=300x400") - onclose(user, "nuclearbomb") - else if (src.deployable) - if(removal_stage < 5) - src.anchored = 1 - visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!") - else - visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") - if(!src.lighthack) - flick("nuclearbombc", src) - src.icon_state = "nuclearbomb1" - src.extended = 1 - return - -obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) - var/dat as text - dat += "Nuclear Fission Explosive \nNuclear Device Wires: " - for(var/wire in src.wires) - dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse ") - dat += text(" The device is [src.timing ? "shaking!" : "still"] ") - dat += text("The device is [src.safety ? "quiet" : "whirring"]. ") - dat += text("The lights are [src.lighthack ? "static" : "functional"]. ") - user << browse(" \nAuth. Disk: [] ", src, (src.auth ? "++++++++++" : "----------")) + if (src.auth) + if (src.yes_code) + dat += text("\nStatus: []-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src) + else + dat += text("\nStatus: Auth. S2-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \n[] Safety: Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + else + if (src.timing) + dat += text("\nStatus: Set-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + else + dat += text("\nStatus: Auth. S1-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + var/message = "AUTH" + if (src.auth) + message = text("[]", src.code) + if (src.yes_code) + message = "*****" + dat += text(" \n>[] \n1-2-3 \n4-5-6 \n7-8-9 \nR-0-E \n", message, src, src, src, src, src, src, src, src, src, src, src, src) + user << browse(dat, "window=nuclearbomb;size=300x400") + onclose(user, "nuclearbomb") + else if (src.deployable) + if(removal_stage < 5) + src.anchored = 1 + visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!") + else + visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") + if(!src.lighthack) + flick("nuclearbombc", src) + src.icon_state = "nuclearbomb1" + src.extended = 1 + return + +obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) + var/dat as text + dat += "Nuclear Fission Explosive \nNuclear Device Wires: " + for(var/wire in src.wires) + dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse ") + dat += text(" The device is [src.timing ? "shaking!" : "still"] ") + dat += text("The device is [src.safety ? "quiet" : "whirring"]. ") + dat += text("The lights are [src.lighthack ? "static" : "functional"]. ") + user << browse(" "} hear(var/msg) var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "") - msg = sanitize_simple(msg, replacechars) + msg = replace_characters(msg, replacechars) if(findtext(msg,phrase)) activate() del(src) @@ -206,7 +206,7 @@ Implant Specifics: "} elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion") phrase = input("Choose activation phrase:") as text var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "") - phrase = sanitize_simple(phrase, replacechars) + phrase = replace_characters(phrase, replacechars) usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate.", 0, 0) usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate." return 1 @@ -336,12 +336,13 @@ the implant may become unstable and either pre-maturely inject the subject or si implanted(mob/M) if(!istype(M, /mob/living/carbon/human)) return 0 var/mob/living/carbon/human/H = M - if(H.mind in ticker.mode.head_revolutionaries) + var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role) + if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE)) H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!") return 0 - else if(H.mind in ticker.mode:revolutionaries) - ticker.mode:remove_revolutionary(H.mind) - H << "\blue You feel a surge of loyalty towards Nanotrasen." + else + clear_antag_roles(H.mind, 1) + H << "You feel a surge of loyalty towards Nanotrasen." return 1 diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 00ce8a7950..ddb76b3656 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -26,7 +26,7 @@ return if((!in_range(src, usr) && src.loc != user)) return - t = sanitize(copytext(t,1,MAX_MESSAGE_LEN)) + t = sanitize(t) if(t) src.name = text("Glass Case - '[]'", t) else diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 082002a5b9..5dda9b89c2 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -26,7 +26,7 @@ //returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of //doing it without the ability to call another proc's parent, really. /obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj) - if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist + if (ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech return 0 @@ -37,12 +37,12 @@ if (!( istype(over_object, /obj/screen) )) return 1 - + //makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away. //there's got to be a better way of doing this... - if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) + if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) return 0 - + if (!( user.restrained() ) && !( user.stat )) switch(over_object.name) if("r_hand") @@ -70,12 +70,12 @@ H.put_in_hands(master_item) H.r_store = null return 0 - + src.add_fingerprint(user) if (master_item.loc == user) src.open(user) return 0 - + for(var/mob/M in range(1, master_item.loc)) if (M.s_active == src) src.close(M) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 912ea4651b..f24ff6bb2c 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -28,7 +28,7 @@ if(!canremove) return - if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist + if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech return diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 2ccd78d361..8a1e35ca98 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -63,12 +63,17 @@ unwield() /obj/item/weapon/twohanded/attack_self(mob/user as mob) - if( istype(user,/mob/living/carbon/monkey) ) - user << "It's too heavy for you to wield fully." - return ..() + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(H.species.is_small) + user << "It's too heavy for you to wield fully." + return + else + return + if(wielded) //Trying to unwield it unwield() user << "You are now carrying the [name] with one hand." diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 02f6642037..295fa0c67d 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -11,7 +11,7 @@ attack_verb = list("banned") suicide_act(mob/user) - viewers(user) << "\red [user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life." + viewers(user) << "[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life." return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) /obj/item/weapon/nullrod @@ -27,7 +27,7 @@ w_class = 2 suicide_act(mob/user) - viewers(user) << "\red [user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." return (BRUTELOSS|FIRELOSS) /obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod. @@ -38,36 +38,34 @@ msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "\red You don't have the dexterity to do this!" + user << "You don't have the dexterity to do this!" return if ((CLUMSY in user.mutations) && prob(50)) - user << "\red The rod slips out of your hand and hits your head." + user << "The rod slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) return if (M.stat !=2) - if((M.mind in ticker.mode.cult) && prob(33)) - M << "\red The power of [src] clears your mind of the cult's influence!" - user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal." - ticker.mode.remove_cultist(M.mind) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1) + if(cult && (M.mind in cult.current_antagonists) && prob(33)) + M << "The power of [src] clears your mind of the cult's influence!" + user << "You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal." + cult.remove_antagonist(M.mind) + M.visible_message("\The [user] waves \the [src] over \the [M]'s head.") else if(prob(10)) - user << "\red The rod slips in your hand." + user << "The rod slips in your hand." ..() else - user << "\red The rod appears to do nothing." - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1) + user << "The rod appears to do nothing." + M.visible_message("\The [user] waves \the [src] over \the [M]'s head.") return /obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return if (istype(A, /turf/simulated/floor)) - user << "\blue You hit the floor with the [src]." + user << "You hit the floor with the [src]." call(/obj/effect/rune/proc/revealrunes)(src) /obj/item/weapon/sord @@ -84,7 +82,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) - viewers(user) << "\red [user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) /obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -109,7 +107,7 @@ return 1 suicide_act(mob/user) - viewers(user) << "\red [user] is falling on the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is falling on the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) /obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -131,7 +129,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) - viewers(user) << "\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku." + viewers(user) << "[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku." return(BRUTELOSS) /obj/item/weapon/katana/IsShield() diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 984da10be6..917d244afa 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -30,7 +30,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - return 2 + if(usr.stunned) + return 2 playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3) for(var/obj/O in src) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index ec55e6549e..1b92926acd 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -135,7 +135,7 @@ /obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) return created_name = t diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c78754c7ed..b6407fd376 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -68,12 +68,12 @@ //Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact var/damage = Proj.damage var/passthrough = 0 - + //20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area. //If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used. switch(Proj.damage_type) if(BRUTE) - //bullets + //bullets if(Proj.original == src || prob(20)) Proj.damage *= between(0, Proj.damage/60, 0.5) if(prob(max((damage-10)/25, 0))*100) @@ -86,11 +86,11 @@ if(!(Proj.original == src || prob(20))) Proj.damage *= 0.5 passthrough = 1 - + if(passthrough) . = -1 damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage - + src.health -= damage*0.2 spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted @@ -139,7 +139,7 @@ if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. user << "There is already a window facing this way there." return - + var/wtype = ST.created_window if (ST.use(1)) var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1) @@ -197,7 +197,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) s.start() - return 1 + if(user.stunned) + return 1 else return 0 return 0 diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index f480cdd977..de2fef2875 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -4,75 +4,57 @@ name = "a meat spike" icon = 'icons/obj/kitchen.dmi' icon_state = "spike" - desc = "A spike for collecting meat from animals" + desc = "A spike for collecting meat from animals." density = 1 anchored = 1 var/meat = 0 - var/occupied = 0 - var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno + var/occupied + var/meat_type + var/victim_name = "corpse" -/obj/structure/kitchenspike - - attackby(obj/item/weapon/grab/G as obj, mob/user as mob) - if(!istype(G, /obj/item/weapon/grab)) - return - if(istype(G.affecting, /mob/living/carbon/monkey)) - if(src.occupied == 0) - src.icon_state = "spikebloody" - src.occupied = 1 - src.meat = 5 - src.meattype = 1 - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) - del(G.affecting) - del(G) - - else - user << "\red The spike already has something on it, finish collecting its meat first!" - else if(istype(G.affecting, /mob/living/carbon/alien)) - if(src.occupied == 0) - src.icon_state = "spikebloodygreen" - src.occupied = 1 - src.meat = 5 - src.meattype = 2 - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) - del(G.affecting) - del(G) - else - user << "\red The spike already has something on it, finish collecting its meat first!" +/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob) + if(!istype(G, /obj/item/weapon/grab) || !G.affecting) + return + if(occupied) + user << "The spike already has something on it, finish collecting its meat first!" + else + if(spike(G.affecting)) + visible_message("[user] has forced [G.affecting] onto the spike, killing them instantly!") + del(G.affecting) + del(G) else - user << "\red They are too big for the spike, try something smaller!" - return + user << "They are too big for the spike, try something smaller!" -// MouseDrop_T(var/atom/movable/C, mob/user) -// if(istype(C, /obj/mob/carbon/monkey) -// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime)) -// else if(istype(C, /obj/livestock/spesscarp +/obj/structure/kitchenspike/proc/spike(var/mob/living/victim) - attack_hand(mob/user as mob) - if(..()) - return - if(src.occupied) - if(src.meattype == 1) - if(src.meat > 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc ) - usr << "You remove some meat from the monkey." - else if(src.meat == 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc) - usr << "You remove the last piece of meat from the monkey!" - src.icon_state = "spike" - src.occupied = 0 - else if(src.meattype == 2) - if(src.meat > 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc ) - usr << "You remove some meat from the alien." - else if(src.meat == 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc) - usr << "You remove the last piece of meat from the alien!" - src.icon_state = "spike" - src.occupied = 0 + if(!istype(victim)) + return + + if(istype(victim, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = victim + if(!H.species.is_small) + return 0 + meat_type = H.species.meat_type + icon_state = "spikebloody" + else if(istype(victim, /mob/living/carbon/alien)) + meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat + icon_state = "spikebloodygreen" + else + return 0 + + victim_name = victim.name + occupied = 1 + meat = 5 + return 1 + +/obj/structure/kitchenspike/attack_hand(mob/user as mob) + if(..() || !occupied) + return + meat-- + new meat_type(get_turf(src)) + if(src.meat > 1) + user << "You remove some meat from \the [victim_name]." + else if(src.meat == 1) + user << "You remove the last piece of meat from \the [victim_name]!" + icon_state = "spike" + occupied = 0 diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 0bb32f53ec..83f295f9ef 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -64,3 +64,32 @@ else user.visible_message("[user] hits [src] and bounces off!") return 1 + +// The following mirror is ~special~. +/obj/structure/mirror/raider + name = "cracked mirror" + desc = "Something seems strange about this old, dirty mirror. Your reflection doesn't look like you remember it." + icon_state = "mirror_broke" + shattered = 1 + +/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user) + if(istype(get_area(src),/area/syndicate_mothership)) + if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species != "Vox" && is_alien_whitelisted(user, "Vox")) + var/choice = input("Do you wish to become a Vox? This is not reversible.") as null|anything in list("No","Yes") + if(choice && choice == "Yes") + var/mob/living/carbon/human/vox/vox = new(get_turf(src),"Vox") + vox.gender = user.gender + raiders.equip(vox) + if(user.mind) + user.mind.transfer_to(vox) + spawn(1) + var/newname = input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text + newname = sanitize(newname) + if(!newname || newname == "") + var/datum/language/L = all_languages[vox.species.default_language] + newname = L.get_random_name() + vox.real_name = newname + vox.name = vox.real_name + raiders.update_access(vox) + del(user) + ..() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 1a87fcede9..1f597b0c96 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -92,7 +92,7 @@ return if ((!in_range(src, usr) && src.loc != user)) return - t = sanitize(copytext(t,1,MAX_MESSAGE_LEN)) + t = sanitize(t) if (t) src.name = text("Morgue- '[]'", t) else @@ -258,7 +258,7 @@ return if ((!in_range(src, usr) > 1 && src.loc != user)) return - t = sanitize(copytext(t,1,MAX_MESSAGE_LEN)) + t = sanitize(t) if (t) src.name = text("Crematorium- '[]'", t) else diff --git a/code/game/response_team.dm b/code/game/response_team.dm index a9dd598374..a64230b1d6 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -1,7 +1,6 @@ //STRIKE TEAMS //Thanks to Kilakk for the admin-button portion of this code. -var/list/response_team_members = list() var/global/send_emergency_team = 0 // Used for automagic response teams // 'admin_emergency_team' for admin-spawned response teams var/ert_base_chance = 10 // Default base chance. Will be incremented by increment ERT chance. @@ -46,40 +45,20 @@ client/verb/JoinResponseTeam() if(!send_emergency_team) usr << "No emergency response team is currently being sent." return - /* if(admin_emergency_team) - usr << "An emergency response team has already been sent." - return */ if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer")) usr << "You are jobbanned from the emergency reponse team!" return - if(response_team_members.len > 5) usr << "The emergency response team is already full!" - + if(ert.current_antagonists.len > 5) usr << "The emergency response team is already full!" for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando") L.name = null//Reserving the place. - var/new_name = input(usr, "Pick a name","Name") as null|text + var/new_name = sanitizeSafe(input(usr, "Pick a name","Name") as null|text, MAX_NAME_LEN) if(!new_name)//Somebody changed his mind, place is available again. L.name = "Commando" return - var/leader_selected = isemptylist(response_team_members) - var/mob/living/carbon/human/new_commando = create_response_team(L.loc, leader_selected, new_name) + create_response_team(L.loc, new_name) del(L) - //Creates mind stuff. - new_commando.mind.key = usr.key - new_commando.key = usr.key - - new_commando << "\blue You are [!leader_selected?"a member":"the LEADER"] of an Emergency Response Team, a type of military division, under CentComm's service. There is a code red alert on [station_name()], you are tasked to go and fix the problem." - new_commando << "You should first gear up and discuss a plan with your team. More members may be joining, don't move out before you're ready." - if(!leader_selected) - new_commando << "As member of the Emergency Response Team, you answer only to your leader and CentComm officials." - else - new_commando << "As leader of the Emergency Response Team, you answer only to CentComm, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." - - // By setting an explicit location the mob cannot wander off and decide change appearance elsewhere - new_commando.change_appearance(APPEARANCE_ALL, new_commando.loc, new_commando, species_whitelist = config.ert_species) - - return else usr << "You need to be an observer or new player to use this." @@ -150,31 +129,14 @@ proc/trigger_armed_response_team(var/force = 0) sleep(600 * 5) send_emergency_team = 0 // Can no longer join the ERT. -/* var/area/security/nuke_storage/nukeloc = locate()//To find the nuke in the vault - var/obj/machinery/nuclearbomb/nuke = locate() in nukeloc - if(!nuke) - nuke = locate() in world - var/obj/item/weapon/paper/P = new - P.info = "Your orders, Commander, are to use all means necessary to return the station to a survivable condition. To this end, you have been provided with the best tools we can give in the three areas of Medicine, Engineering, and Security. The nuclear authorization code is: [ nuke ? nuke.r_code : "AHH, THE NUKE IS GONE!"]. Be warned, if you detonate this without good reason, we will hold you to account for damages. Memorise this code, and then burn this message." - P.name = "Emergency Nuclear Code, and ERT Orders" - for (var/obj/effect/landmark/A in world) - if (A.name == "nukecode") - P.loc = A.loc - del(A) - continue -*/ - -/client/proc/create_response_team(obj/spawn_location, leader_selected = 0, commando_name) - - //usr << "\red ERT has been temporarily disabled. Talk to a coder." - //return +/client/proc/create_response_team(obj/spawn_location, commando_name) var/mob/living/carbon/human/M = new(null) - response_team_members |= M + M.real_name = commando_name M.name = commando_name - M.age = !leader_selected ? rand(23,35) : rand(35,45) + M.age = rand(25,45) M.check_dna(M) M.dna.ready_dna(M)//Creates DNA. @@ -182,64 +144,9 @@ proc/trigger_armed_response_team(var/force = 0) M.mind = new M.mind.current = M M.mind.original = M - M.mind.assigned_role = "MODE" - M.mind.special_role = "Response Team" if(!(M.mind in ticker.minds)) ticker.minds += M.mind//Adds them to regular mind list. M.loc = spawn_location - M.equip_strike_team(leader_selected) + ert.add_antagonist(M.mind) return M - -/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) - - //Special radio setup - equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear) - - //Replaced with new ERT uniform - equip_to_slot_or_del(new /obj/item/clothing/under/ert(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) - equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) -/* - - //Old ERT Uniform - //Basic Uniform - equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/tacticool(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_l_store) - equip_to_slot_or_del(new /obj/item/weapon/clipboard(src), slot_r_store) - equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(src), slot_belt) - equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(src), slot_wear_mask) - - //Glasses - equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(src), slot_glasses) - - //Shoes & gloves - equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) - - //Removed -// equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat(src), slot_wear_suit) -// equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad(src), slot_head) - - //Backpack - equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back) - equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) -*/ - var/obj/item/weapon/card/id/W = new(src) - W.assignment = "Emergency Response Team[leader_selected ? " Leader" : ""]" - W.registered_name = real_name - W.name = "[real_name]'s ID Card ([W.assignment])" - W.icon_state = "centcom" - W.access = get_all_accesses() - W.access += get_all_centcom_access() - equip_to_slot_or_del(W, slot_wear_id) - - return 1 - -//debug verb (That is horribly coded, LEAVE THIS OFF UNLESS PRIVATELY TESTING. Seriously. -/*client/verb/ResponseTeam() - set category = "Admin" - if(!send_emergency_team) - send_emergency_team = 1*/ diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 72107e6649..d32173c267 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -49,6 +49,11 @@ var/list/mechtoys = list( anchored = 1 layer = 4 explosion_resistance = 5 + var/list/mobs_can_pass = list( + /mob/living/carbon/slime, + /mob/living/simple_animal/mouse, + /mob/living/silicon/robot/drone + ) /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) @@ -61,10 +66,19 @@ var/list/mechtoys = list( if(istype(A, /obj/vehicle)) //no vehicles return 0 - if(istype(A, /mob/living)) // You Shall Not Pass! - var/mob/living/M = A - if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/carbon/slime) && !istype(M, /mob/living/simple_animal/mouse) && !istype(M, /mob/living/silicon/robot/drone)) //If your not laying down, or a small creature, no pass. - return 0 + var/mob/living/M = A + if(istype(M)) + if(M.lying) + return ..() + for(var/mob_type in mobs_can_pass) + if(istype(A, mob_type)) + return ..() + if(istype(A, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.is_small) + return ..() + return 0 + return ..() /obj/structure/plasticflaps/ex_act(severity) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 0aabdae3d0..9546bf9ba1 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -118,9 +118,7 @@ // Only adds blood on the floor -- Skie /turf/simulated/proc/add_blood_floor(mob/living/carbon/M as mob) - if(istype(M, /mob/living/carbon/monkey)) - blood_splatter(src,M,1) - else if( istype(M, /mob/living/carbon/alien )) + if( istype(M, /mob/living/carbon/alien )) var/obj/effect/decal/cleanable/blood/xeno/this = new /obj/effect/decal/cleanable/blood/xeno(src) this.blood_DNA["UNKNOWN BLOOD"] = "X*" else if( istype(M, /mob/living/silicon/robot )) diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 367c143c19..4c4682c5c5 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -136,7 +136,7 @@ icon = 'icons/turf/floors.dmi' icon_state = "plating" -/turf/simulated/shuttle/plating/vox //Vox skipjack plating +/turf/simulated/shuttle/plating/vox //Skipjack plating oxygen = 0 nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD @@ -144,7 +144,7 @@ name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle. icon_state = "floor4" -/turf/simulated/shuttle/floor4/vox //Vox skipjack floors +/turf/simulated/shuttle/floor4/vox //skipjack floors name = "skipjack floor" oxygen = 0 nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD @@ -216,4 +216,4 @@ icon_state = "snow" /turf/simulated/floor/plating/snow/ex_act(severity) - return \ No newline at end of file + return diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 93370df502..884c5c5dbe 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -66,9 +66,6 @@ var/list/accessible_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = if(ticker && ticker.mode) - - // Okay, so let's make it so that people can travel z levels but not nuke disks! - // if(ticker.mode.name == "mercenary") return if(A.z > 6 && !config.use_overmap) return if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1)) if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index b8c124dcd8..92b0638b9f 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -12,7 +12,7 @@ src << "Guests may not use OOC." return - msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))) + msg = sanitize(msg) if(!msg) return if(!(prefs.toggles & CHAT_OOC)) @@ -77,7 +77,7 @@ src << "Guests may not use OOC." return - msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))) + msg = sanitize(msg) if(!msg) return if(!(prefs.toggles & CHAT_LOOC)) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index ab3c8dcc80..afc576ed4f 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -110,33 +110,6 @@ death(0) suiciding = 0 -/mob/living/carbon/monkey/verb/suicide() - set hidden = 1 - - if (stat == 2) - src << "You're already dead!" - return - - if (!ticker) - src << "You can't commit suicide before the game starts!" - return - - if (suiciding) - src << "You're already committing suicide! Be patient!" - return - - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") - - if(confirm == "Yes") - if(!canmove || restrained()) - src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))" - return - suiciding = 1 - //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while - viewers(src) << "\red [src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide." - adjustOxyLoss(max(175- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) - updatehealth() - /mob/living/silicon/ai/verb/suicide() set hidden = 1 diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 32e633a200..a361328cac 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -181,7 +181,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) switch(param) if("reason") if(!value) - value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text + value = sanitize(input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text) value = sql_sanitize_text(value) if(!value) usr << "Cancelled" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c51ffbff82..96b7a7c244 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -92,7 +92,7 @@ var/global/floorIsLava = 0 body += " " //Monkey - if(ismonkey(M)) + if(issmall(M)) body += "Monkeyized | " else body += "Monkeyize | " @@ -725,10 +725,10 @@ var/global/floorIsLava = 0 set desc="Announce your desires to the world" if(!check_rights(0)) return - var/message = input("Global message to send:", "Admin Announce", null, null) as message + var/message = input("Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all? if(message) if(!check_rights(R_SERVER,0)) - message = adminscrub(message,500) + message = sanitize(message, 500, extra = 0) world << "\blue [usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:\n \t [message]" log_admin("Announce: [key_name(usr)] : [message]") feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -937,64 +937,22 @@ var/global/floorIsLava = 0 return 0 if (!istype(M)) return 0 - if((M.mind in ticker.mode.head_revolutionaries) || (M.mind in ticker.mode.revolutionaries)) - if (ticker.mode.config_tag == "revolution") - return 2 - return 1 - if(M.mind in ticker.mode.cult) - if (ticker.mode.config_tag == "cult") - return 2 - return 1 - if(M.mind in ticker.mode.malf_ai) - if (ticker.mode.config_tag == "malfunction") - return 2 - return 1 - if(M.mind in ticker.mode.syndicates) - if (ticker.mode.config_tag == "mercenary") - return 2 - return 1 - if(M.mind in ticker.mode.wizards) - if (ticker.mode.config_tag == "wizard") - return 2 - return 1 - if(M.mind in ticker.mode.changelings) - if (ticker.mode.config_tag == "changeling") - return 2 - return 1 - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/jungle_fever)) - if (ticker.mode.config_tag == "monkey") - return 2 + if(M.mind) + if(ticker.mode.antag_templates && ticker.mode.antag_templates.len) + for(var/datum/antagonist/antag in ticker.mode.antag_templates) + if(antag.is_antagonist(M.mind)) + return 2 + else if(M.mind.special_role) return 1 + if(isrobot(M)) var/mob/living/silicon/robot/R = M if(R.emagged) return 1 - if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. - return 1 return 0 -/* -/datum/admins/proc/get_sab_desc(var/target) - switch(target) - if(1) - return "Destroy at least 70% of the phoron canisters on the station" - if(2) - return "Destroy the AI" - if(3) - var/count = 0 - for(var/mob/living/carbon/monkey/Monkey in world) - if(Monkey.z in station_levels) - count++ - return "Kill all [count] of the monkeys on the station" - if(4) - return "Cut power to at least 80% of the station" - else - return "Error: Invalid sabotage target: [target]" -*/ - /datum/admins/proc/spawn_fruit() set category = "Debug" set desc = "Spawn the product of a seed." @@ -1070,11 +1028,87 @@ var/global/floorIsLava = 0 M.mind.edit_memory() feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/datum/admins/proc/show_game_mode() + set category = "Admin" + set desc = "Show the current round configuration." + set name = "Show Game Mode" + + if(!ticker || !ticker.mode) + alert("Not before roundstart!", "Alert") + return + + var/out = "Current mode: [ticker.mode.name] ([ticker.mode.config_tag]) " + out += " " + + if(ticker.mode.ert_disabled) + out += "Emergency Response Teams: disabled" + else + out += "Emergency Response Teams: enabled" + out += " " + + if(ticker.mode.deny_respawn) + out += "Respawning: disallowed" + else + out += "Respawning: allowed" + out += " " + + out += "Shuttle delay multiplier: [ticker.mode.shuttle_delay] " + + if(ticker.mode.auto_recall_shuttle) + out += "Shuttle auto-recall: enabled" + else + out += "Shuttle auto-recall: disabled" + out += " " + + if(ticker.mode.event_delay_mod_moderate) + out += "Moderate event time modifier: [ticker.mode.event_delay_mod_moderate] " + else + out += "Moderate event time modifier: unset " + + if(ticker.mode.event_delay_mod_major) + out += "Major event time modifier: [ticker.mode.event_delay_mod_major] " + else + out += "Major event time modifier: unset " + + out += " " + + if(ticker.mode.antag_tag) + out += "Core antag id: [ticker.mode.antag_tag]." + + if(ticker.mode.round_autoantag) + out += "Autotraitor enabled ([ticker.mode.antag_prob]% spawn chance)" + if(ticker.mode.antag_scaling_coeff) + out += " (scaling with [ticker.mode.antag_scaling_coeff])" + out += " " + else + out += "Autotraitor disabled. " + + out += "All antag ids:" + if(ticker.mode.antag_templates && ticker.mode.antag_templates.len). + var/playercount = ticker.mode.num_players() + for(var/datum/antagonist/antag in ticker.mode.antag_templates) + var/cur_max_antags + if(ticker.mode.antag_tag && antag.id == ticker.mode.antag_tag) + cur_max_antags = antag.max_antags_round + else + cur_max_antags = antag.max_antags + if(ticker.mode.antag_scaling_coeff) + cur_max_antags = Clamp((playercount/ticker.mode.antag_scaling_coeff), 1, cur_max_antags) + out += " [antag.id]" + out += " ([antag.get_antag_count()]/[cur_max_antags]) " + out += " \[-\] " + else + out += " None." + out += " \[+\] " + + usr << browse(out, "window=edit_mode[src]") + feedback_add_details("admin_verb","SGM") + /datum/admins/proc/toggletintedweldhelmets() set category = "Debug" set desc="Reduces view range when wearing welding helmets" - set name="Toggle tinted welding helmes" + set name="Toggle tinted welding helmets." config.welder_vision = !( config.welder_vision ) if (config.welder_vision) world << "Reduced welder vision has been enabled!" diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm index 133f6d10e9..4bcaf10d9c 100644 --- a/code/modules/admin/admin_memo.dm +++ b/code/modules/admin/admin_memo.dm @@ -16,7 +16,7 @@ /client/proc/admin_memo_write() var/savefile/F = new(MEMOFILE) if(F) - var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message + var/memo = sanitize(input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message, extra = 0) switch(memo) if(null) return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index d570083a01..1702fc4dbc 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -15,6 +15,7 @@ var/list/admin_verbs_admin = list( /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/ // /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage + /datum/admins/proc/show_game_mode, /*Configuration window for the current game mode.*/ /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ @@ -101,10 +102,8 @@ var/list/admin_verbs_fun = list( /client/proc/drop_bomb, /client/proc/everyone_random, /client/proc/cinematic, - /client/proc/one_click_antag, /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, - /client/proc/send_space_ninja, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/make_sound, @@ -152,6 +151,7 @@ var/list/admin_verbs_debug = list( /client/proc/cmd_debug_make_powernets, /client/proc/kill_airgroup, /client/proc/debug_controller, + /client/proc/debug_antagonist_template, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_admin_delete, /client/proc/cmd_debug_del_all, @@ -219,7 +219,6 @@ var/list/admin_verbs_hideable = list( /client/proc/cinematic, /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, - /client/proc/send_space_ninja, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/cmd_admin_create_centcom_report, @@ -566,22 +565,6 @@ var/list/admin_verbs_mentor = list( message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].") feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist - set category = "Fun" - set name = "Give Spell" - set desc = "Gives a spell to a mob." - var/list/spell_names = list() - for(var/v in spells) - // "/obj/effect/proc_holder/spell/" 30 symbols ~Intercross21 - spell_names.Add(copytext("[v]", 31, 0)) - var/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_names - if(!S) return - var/path = text2path("/obj/effect/proc_holder/spell/[S]") - T.spell_list += new path - feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].") - message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1) - /client/proc/give_disease(mob/T as mob in mob_list) // -- Giacom set category = "Fun" set name = "Give Disease (old)" @@ -619,9 +602,10 @@ var/list/admin_verbs_mentor = list( var/mob/living/carbon/human/H = T if (H.species) D.affected_species = list(H.species.name) - if(istype(T,/mob/living/carbon/monkey)) - var/mob/living/carbon/monkey/M = T - D.affected_species = list(M.greaterform) + if(H.species.primitive_form) + D.affected_species |= H.species.primitive_form + if(H.species.greater_form) + D.affected_species |= H.species.greater_form infect_virus2(T,D,1) feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -633,7 +617,7 @@ var/list/admin_verbs_mentor = list( set name = "Make Sound" set desc = "Display a message to everyone who can hear the target" if(O) - var/message = input("What do you want the message to be?", "Make Sound") as text|null + var/message = sanitize(input("What do you want the message to be?", "Make Sound") as text|null) if(!message) return for (var/mob/V in hearers(O)) @@ -725,7 +709,7 @@ var/list/admin_verbs_mentor = list( return if(holder) - var/new_name = trim_strip_input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name) + var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name)) if(new_name && new_name != S.real_name) admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'") S.SetName(new_name) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 5de314db4c..828667aa13 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -231,7 +231,7 @@ M_job = M.job else if(isslime(M)) M_job = "slime" - else if(ismonkey(M)) + else if(issmall(M)) M_job = "Monkey" else if(isalien(M)) M_job = "Alien" @@ -342,7 +342,7 @@ dat += " New Player | "
else if(isobserver(M))
dat += "Ghost | "
- else if(ismonkey(M))
+ else if(issmall(M))
dat += "Monkey | "
else if(isalien(M))
dat += "Alien | "
@@ -410,80 +410,8 @@
dat += "Launching now..."
dat += "[ticker.delay_end ? "End Round Normally" : "Delay Round End"]" - if(ticker.mode.syndicates.len) - dat += "
|