From 930e8c6e5d303b28a82b182a9cdd7a2dce01a1c3 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 25 Dec 2014 20:09:45 +1030 Subject: [PATCH 1/4] Removes an unused debug var. --- code/modules/mob/living/carbon/human/human.dm | 2 -- code/modules/mob/living/carbon/human/life.dm | 9 --------- 2 files changed, 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7b3341b8178..c61d33cd579 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -38,8 +38,6 @@ if(dna) dna.real_name = real_name - - prev_gender = gender // Debug for plural genders make_blood() /mob/living/carbon/human/Stat() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 64d599ecc59..660614a2247 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -29,7 +29,6 @@ var/co2_alert = 0 var/fire_alert = 0 var/pressure_alert = 0 - var/prev_gender = null // Debug for plural genders var/temperature_alert = 0 var/in_stasis = 0 @@ -44,14 +43,6 @@ ..() - /* - //This code is here to try to determine what causes the gender switch to plural error. Once the error is tracked down and fixed, this code should be deleted - //Also delete var/prev_gender once this is removed. - if(prev_gender != gender) - prev_gender = gender - if(gender in list(PLURAL, NEUTER)) - message_admins("[src] ([ckey]) gender has been changed to plural or neuter. Please record what has happened recently to the person and then notify coders. (?) (VV) (PM) (JMP)") - */ //Apparently, the person who wrote this code designed it so that //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy From 39971293901ec7bcbe00eed7777be3a038a61397 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 25 Dec 2014 20:26:22 +1030 Subject: [PATCH 2/4] Tidies up setup.dm, moves a bunch of vars to global.dm, changes the case of a couple. --- code/game/machinery/camera/camera_assembly.dm | 2 +- code/game/objects/effects/effect_system.dm | 8 +- .../circuitboards/computer/camera_monitor.dm | 4 +- .../game/objects/items/weapons/tanks/tanks.dm | 2 +- code/game/turfs/space/space.dm | 6 +- code/global.dm | 29 +++- code/modules/admin/topic.dm | 22 +-- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../silicon/ai/freelook/update_triggers.dm | 4 +- code/setup.dm | 134 +++--------------- 10 files changed, 72 insertions(+), 141 deletions(-) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 48f0a94faf2..19f2216272d 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -100,7 +100,7 @@ C.auto_turn() C.network = uniquelist(tempnetwork) - tempnetwork = difflist(C.network,RESTRICTED_CAMERA_NETWORKS) + tempnetwork = difflist(C.network,restricted_camera_networks) if(!tempnetwork.len)//Camera isn't on any open network - remove its chunk from AI visibility. cameranet.removeCamera(C) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 03619c1350e..82d27968db3 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -724,15 +724,15 @@ steam.start() -- spawns the effect var/light = -1 var/flash = -1 - // Clamp all values to MAX_EXPLOSION_RANGE + // Clamp all values to max_explosion_range if (round(amount/12) > 0) - devastation = min (MAX_EXPLOSION_RANGE, devastation + round(amount/12)) + devastation = min (max_explosion_range, devastation + round(amount/12)) if (round(amount/6) > 0) - heavy = min (MAX_EXPLOSION_RANGE, heavy + round(amount/6)) + heavy = min (max_explosion_range, heavy + round(amount/6)) if (round(amount/3) > 0) - light = min (MAX_EXPLOSION_RANGE, light + round(amount/3)) + light = min (max_explosion_range, light + round(amount/3)) if (flash && flashing_factor) flash += (round(amount/4) * flashing_factor) diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index f87123422e2..ff33485f726 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/security @@ -57,7 +57,7 @@ usr << "No input found please hang up and try your call again." return var/list/tempnetwork = text2list(input, ",") - tempnetwork = difflist(tempnetwork,RESTRICTED_CAMERA_NETWORKS,1) + tempnetwork = difflist(tempnetwork,restricted_camera_networks,1) if(tempnetwork.len < 1) usr << "No network found please hang up and try your call again." return diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 9d374ad15f0..f6485f0a165 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -251,7 +251,7 @@ air_contents.react() pressure = air_contents.return_pressure() var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE - range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE + range = min(range, max_explosion_range) // was 8 - - - Changed to a configurable define -- TLE var/turf/epicenter = get_turf(loc) //world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]" diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index bdd15b6c734..e1c6f3958c2 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -1,3 +1,7 @@ +//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. +//(Exceptions: extended, sandbox and nuke) -Errorage +var/list/accessible_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60) + /turf/space icon = 'icons/turf/space.dmi' name = "\proper space" @@ -94,7 +98,7 @@ var/safety = 1 while(move_to_z == src.z) - var/move_to_z_str = pickweight(accessable_z_levels) + var/move_to_z_str = pickweight(accessible_z_levels) move_to_z = text2num(move_to_z_str) safety++ if(safety > 10) diff --git a/code/global.dm b/code/global.dm index 2319912b4d5..616d09541e8 100644 --- a/code/global.dm +++ b/code/global.dm @@ -1,16 +1,19 @@ //#define TESTING //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +//items that ask to be called every cycle var/global/obj/effect/datacore/data_core = null - - var/global/list/all_areas = list() var/global/list/machines = list() var/global/list/processing_objects = list() var/global/list/active_diseases = list() var/global/list/med_hud_users = list() //list of all entities using a medical HUD. var/global/list/sec_hud_users = list() //list of all entities using a security HUD. - //items that ask to be called every cycle + +//Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them. +var/list/restricted_camera_networks = list("thunder","ERT","NUKE") + +var/global/list/global_mutations = list() // list of hidden mutation things var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event @@ -24,9 +27,11 @@ var/global/list/global_map = null //4 - Derelict //3 - AI satellite //5 - empty space - - ////////////// + +//Noises made when hit while typing. +var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") + var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \ "big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \ "table","td","th","tr") @@ -256,3 +261,17 @@ var/DBConnection/dbcon_old = new() //Tgstation database (Old database) - See the //added for Xenoarchaeology, might be useful for other stuff var/global/list/alphabet_uppercase = list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z") + +// Chemistry lists. +var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate +var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate +var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") //this stops the heart +var/list/cheartstopper = list("potassium_chloride") //this stops the heart when overdose is met -- c = conditional + +//Used by robots and robot preferences. +var/list/robot_module_types = list("Standard", "Engineering", "Construction", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security") + +var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg') + +// Bomb cap! +var/max_explosion_range = 14 diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 134d0e0c8db..46a36c4678c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2113,18 +2113,18 @@ if("togglebombcap") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","BC") - switch(MAX_EXPLOSION_RANGE) - if(14) MAX_EXPLOSION_RANGE = 16 - if(16) MAX_EXPLOSION_RANGE = 20 - if(20) MAX_EXPLOSION_RANGE = 28 - if(28) MAX_EXPLOSION_RANGE = 56 - if(56) MAX_EXPLOSION_RANGE = 128 - if(128) MAX_EXPLOSION_RANGE = 14 - var/range_dev = MAX_EXPLOSION_RANGE *0.25 - var/range_high = MAX_EXPLOSION_RANGE *0.5 - var/range_low = MAX_EXPLOSION_RANGE + switch(max_explosion_range) + if(14) max_explosion_range = 16 + if(16) max_explosion_range = 20 + if(20) max_explosion_range = 28 + if(28) max_explosion_range = 56 + if(56) max_explosion_range = 128 + if(128) max_explosion_range = 14 + var/range_dev = max_explosion_range *0.25 + var/range_high = max_explosion_range *0.5 + var/range_low = max_explosion_range message_admins("\red [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]", 1) - log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EXPLOSION_RANGE]") + log_admin("[key_name_admin(usr)] changed the bomb cap to [max_explosion_range]") if("flicklights") feedback_inc("admin_secrets_fun_used",1) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 12b6301c4bc..ff948d23870 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -570,7 +570,7 @@ var/list/ai_verbs_default = list( if(!C.can_use()) continue - var/list/tempnetwork = difflist(C.network,RESTRICTED_CAMERA_NETWORKS,1) + var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1) if(tempnetwork.len) for(var/i in tempnetwork) cameralist[i] = i diff --git a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm index 1aaceab6883..813d4f24716 100644 --- a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm +++ b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm @@ -93,13 +93,13 @@ /obj/machinery/camera/New() ..() cameranet.cameras += src //Camera must be added to global list of all cameras no matter what... - var/list/open_networks = difflist(network,RESTRICTED_CAMERA_NETWORKS) //...but if all of camera's networks are restricted, it only works for specific camera consoles. + var/list/open_networks = difflist(network,restricted_camera_networks) //...but if all of camera's networks are restricted, it only works for specific camera consoles. if(open_networks.len) //If there is at least one open network, chunk is available for AI usage. cameranet.addCamera(src) /obj/machinery/camera/Del() cameranet.cameras -= src - var/list/open_networks = difflist(network,RESTRICTED_CAMERA_NETWORKS) + var/list/open_networks = difflist(network,restricted_camera_networks) if(open_networks.len) cameranet.removeCamera(src) ..() diff --git a/code/setup.dm b/code/setup.dm index 7d85a7d0b75..88d647766a9 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -29,10 +29,10 @@ #define BREATH_VOLUME 0.5 //liters in a normal breath #define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME /(T20C*R_IDEAL_GAS_EQUATION)) +//Amount of air to take a from a tile #define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME - //Amount of air to take a from a tile +//Amount of air needed before pass out/suffocation commences #define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 - //Amount of air needed before pass out/suffocation commences #define SOUND_MINIMUM_PRESSURE 10 @@ -87,41 +87,30 @@ #define REAGENTS_EFFECT_MULTIPLIER REAGENTS_METABOLISM / 0.4 +//Minimum ratio of air that must move to/from a tile to suspend group processing #define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 - //Minimum ratio of air that must move to/from a tile to suspend group processing +//Minimum amount of air that has to move before a group processing can be suspended #define MINIMUM_AIR_TO_SUSPEND MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND - //Minimum amount of air that has to move before a group processing can be suspended #define MINIMUM_MOLES_DELTA_TO_MOVE MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND //Either this must be active #define MINIMUM_TEMPERATURE_TO_MOVE T20C+100 //or this (or both, obviously) +//Minimum temperature difference before group processing is suspended #define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012 #define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 - //Minimum temperature difference before group processing is suspended +//Minimum temperature difference before the gas temperatures are just set to be equal #define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 - //Minimum temperature difference before the gas temperatures are just set to be equal - #define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10 #define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200 +//Must be between 0 and 1. Values closer to 1 equalize temperature faster +//Should not exceed 0.4 else strange heat flow occur #define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4 #define WALL_HEAT_TRANSFER_COEFFICIENT 0.0 #define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0 #define SPACE_HEAT_TRANSFER_COEFFICIENT 0.2 //a hack to partly simulate radiative heat #define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4 #define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now - //Must be between 0 and 1. Values closer to 1 equalize temperature faster - //Should not exceed 0.4 else strange heat flow occur - -/* -#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C -#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C -#define FIRE_SPREAD_RADIOSITY_SCALE 0.85 -#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile -#define FIRE_PHORON_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt phoron into the tile -#define FIRE_GROWTH_RATE 40000 //For small fires - -#define WATER_BOIL_TEMP 393 */ // Fire Damage #define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C @@ -144,32 +133,19 @@ #define XGM_GAS_OXIDIZER 2 #define XGM_GAS_CONTAMINANT 4 -//Used to be used by FEA -//var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference when atmos wants to remove excess heat. - #define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking #define TANK_RUPTURE_PRESSURE (40.*ONE_ATMOSPHERE) // Tank spills all contents into atmosphere #define TANK_FRAGMENT_PRESSURE (50.*ONE_ATMOSPHERE) // Boom 3x3 base explosion #define TANK_FRAGMENT_SCALE (10.*ONE_ATMOSPHERE) // +1 for each SCALE kPa aboe threshold // was 2 atm - -//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage -var/MAX_EXPLOSION_RANGE = 14 -//#define MAX_EXPLOSION_RANGE 14 // Defaults to 12 (was 8) -- TLE - #define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone. - #define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien. - #define NORMPIPERATE 30 //pipe-insulation rate divisor #define HEATPIPERATE 8 //heat-exch pipe insulation - #define FLOWFRAC 0.99 // fraction of gas transfered per process - #define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up - //ITEM INVENTORY SLOT BITMASKS #define SLOT_OCLOTHING 1 #define SLOT_ICLOTHING 2 @@ -228,19 +204,20 @@ var/MAX_EXPLOSION_RANGE = 14 #define PASSBLOB 8 //turf-only flags -#define NOJAUNT 1 - +#define NOJAUNT 1 //This is used in literally one place, turf.dm, to block ethereal jaunt. //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDETAIL 16 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEMASK 1 //APPLIES ONLY TO HELMETS/MASKS!! -#define HIDEEARS 2 //APPLIES ONLY TO HELMETS/MASKS!! (ears means headsets and such) -#define HIDEEYES 4 //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses) -#define HIDEFACE 8 //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown. +//APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEGLOVES 1 +#define HIDESUITSTORAGE 2 +#define HIDEJUMPSUIT 4 +#define HIDESHOES 8 +#define HIDETAIL 16 +//APPLIES ONLY TO HELMETS/MASKS!! +#define HIDEMASK 1 +#define HIDEEARS 2 //headsets and such +#define HIDEEYES 4 //glasses +#define HIDEFACE 8 //Dictates whether we appear as unknown. //slots #define slot_back 1 @@ -304,7 +281,6 @@ var/MAX_EXPLOSION_RANGE = 14 #define THERMAL_PROTECTION_HAND_LEFT 0.025 #define THERMAL_PROTECTION_HAND_RIGHT 0.025 - //bitflags for mutations // Extra powers: #define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) @@ -318,11 +294,6 @@ var/MAX_EXPLOSION_RANGE = 14 #define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) #define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) - -// String identifiers for associative list lookup - -// mob/var/list/mutations - #define STRUCDNASIZE 27 #define UNIDNASIZE 13 @@ -336,7 +307,6 @@ var/MAX_EXPLOSION_RANGE = 14 #define HUSK 7 #define NOCLONE 8 - // Extra powers: #define LASER 9 // harm intent - click anywhere to shoot lasers from eyes #define HEAL 10 // healing people with hands @@ -350,8 +320,6 @@ var/MAX_EXPLOSION_RANGE = 14 #define SHIELD 18 // shielding from all projectile attacks (30%) #define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) #define ELECTRICITY 20 // ability to shoot electric attacks (15%) - - //2spooky #define SKELETON 29 #define PLANT 30 @@ -405,8 +373,6 @@ var/MAX_EXPLOSION_RANGE = 14 #define SHOCK 8 #define SAFE 16 -#define ENGINE_EJECT_Z 3 - //metal, glass, rod stacks #define MAX_STACK_AMOUNT_METAL 50 #define MAX_STACK_AMOUNT_GLASS 50 @@ -418,22 +384,8 @@ var/MAX_EXPLOSION_RANGE = 14 #define GAS_CO2 (1 << 3) #define GAS_N2O (1 << 4) - -var/list/accessable_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60) -//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. -//(Exceptions: extended, sandbox and nuke) -Errorage -//Was list("3" = 30, "4" = 70). -//Spacing should be a reliable method of getting rid of a body -- Urist. -//Go away Urist, I'm restoring this to the longer list. ~Errorage - #define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) - -var/list/global_mutations = list() // list of hidden mutation things - -//Bluh shields - - //Damage things //TODO: merge these down to reduce on defines //Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc... #define BRUTE "brute" @@ -470,8 +422,6 @@ var/list/global_mutations = list() // list of hidden mutation things #define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system #define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy. -var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg') - //Grab levels #define GRAB_PASSIVE 1 #define GRAB_AGGRESSIVE 2 @@ -491,28 +441,6 @@ var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons #define TRANSITIONEDGE 7 //Distance from edge to move to another z-level -var/list/liftable_structures = list(\ - - /obj/machinery/autolathe, \ - /obj/machinery/constructable_frame, \ - /obj/machinery/portable_atmospherics/hydroponics, \ - /obj/machinery/computer, \ - /obj/machinery/optable, \ - /obj/structure/dispenser, \ - /obj/machinery/gibber, \ - /obj/machinery/microwave, \ - /obj/machinery/vending, \ - /obj/machinery/seed_extractor, \ - /obj/machinery/space_heater, \ - /obj/machinery/recharge_station, \ - /obj/machinery/flasher, \ - /obj/structure/stool, \ - /obj/structure/closet, \ - /obj/machinery/photocopier, \ - /obj/structure/filingcabinet, \ - /obj/structure/reagent_dispensers, \ - /obj/machinery/portable_atmospherics/canister) - //A set of constants used to determine which type of mute an admin wishes to apply: //Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) //Therefore there needs to be a gap between the flags for the automute flags @@ -564,8 +492,6 @@ var/list/liftable_structures = list(\ #define BORGTHERM 2 #define BORGXRAY 4 -var/list/robot_module_types = list("Standard", "Engineering", "Construction", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security"/*, "Combat"*/) - //some arbitrary defines to be used by self-pruning global lists. (see master_controller) #define PROCESS_KILL 26 //Used to trigger removal from a processing list @@ -673,6 +599,7 @@ var/list/robot_module_types = list("Standard", "Engineering", "Construction", "S #define BE_MUTINEER 8192 #define BE_PAI 16384 +//Not sure if moving this to global.dm would break the defines. var/list/be_special_flags = list( "Traitor" = BE_TRAITOR, "Operative" = BE_OPERATIVE, @@ -725,22 +652,9 @@ var/list/be_special_flags = list( #define PULSE_FAST 3 //90-120 bpm #define PULSE_2FAST 4 //>120 bpm #define PULSE_THREADY 5 //occurs during hypovolemic shock -//feel free to add shit to lists below -var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate -var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate -var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") //this stops the heart -var/list/cheartstopper = list("potassium_chloride") //this stops the heart when overdose is met -- c = conditional - -//proc/get_pulse methods #define GETPULSE_HAND 0 //less accurate (hand) #define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc) -var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them. - "thunder", - "ERT", - "NUKE" - ) - //Species flags. #define NO_BLOOD 1 // Vessel var is not filled with blood, cannot bleed out. #define NO_BREATHE 2 // Cannot suffocate or take oxygen loss. @@ -783,8 +697,6 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define COLOR_ORANGE "#FF9900" #define COLOR_WHITE "#FFFFFF" - - /* Germs and infections */ @@ -796,7 +708,6 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define INFECTION_LEVEL_TWO 500 #define INFECTION_LEVEL_THREE 1000 - /* Shuttles */ @@ -837,7 +748,6 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define MAX_GEAR_COST 5 //Used in chargen for loadout limit. - /* Atmos Machinery */ @@ -859,8 +769,6 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define ATMOS_DEFAULT_VOLUME_MIXER 200 //L #define ATMOS_DEFAULT_VOLUME_PIPE 70 //L -var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") - // Reagent metabolism defines. #define FOOD_METABOLISM 0.4 #define ALCOHOL_METABOLISM 0.1 From 844c795c7a9c5cd5c81b65da368788a068e2d743 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 25 Dec 2014 20:28:03 +1030 Subject: [PATCH 3/4] Removed unused log var (diaryofmeanpeople). --- code/global.dm | 1 - code/world.dm | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/code/global.dm b/code/global.dm index 616d09541e8..71d613a7b83 100644 --- a/code/global.dm +++ b/code/global.dm @@ -79,7 +79,6 @@ var/blobevent = 0 /////////////// var/diary = null -var/diaryofmeanpeople = null var/href_logfile = null var/station_name = "NSS Exodus" var/game_version = "Baystation12" diff --git a/code/world.dm b/code/world.dm index 50bee5f49ff..520aef1bbf0 100644 --- a/code/world.dm +++ b/code/world.dm @@ -26,16 +26,14 @@ var/global/datum/global_init/init = new () var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day") href_logfile = file("data/logs/[date_string] hrefs.htm") diary = file("data/logs/[date_string].log") - diaryofmeanpeople = file("data/logs/[date_string] Attack.log") diary << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]" - diaryofmeanpeople << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]" changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently if(byond_version < RECOMMENDED_VERSION) world.log << "Your server's byond version does not meet the recommended requirements for this server. Please update BYOND" config.post_load() - + if(config && config.server_name != null && config.server_suffix && world.port > 0) // dumb and hardcoded but I don't care~ config.server_name += " #[(world.port % 1000) / 100]" From 8978747e5334cc77f9437e0a4798bfe77acf9ed2 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 25 Dec 2014 21:10:30 +1030 Subject: [PATCH 4/4] Moved several globals into the config controller, updated eample config appropriately. --- code/controllers/configuration.dm | 37 +++++++++- code/controllers/voting.dm | 29 -------- .../game/gamemodes/autotraitor/autotraitor.dm | 1 - code/game/gamemodes/events.dm | 4 +- code/game/gamemodes/events/space_ninja.dm | 5 +- .../game/gamemodes/malfunction/malfunction.dm | 9 ++- code/game/gamemodes/nuclear/nuclearbomb.dm | 2 - code/game/objects/effects/aliens.dm | 2 +- code/game/verbs/ooc.dm | 22 +++--- code/global.dm | 67 ++++--------------- code/modules/admin/IsBanned.dm | 2 +- code/modules/admin/admin.dm | 65 +++++++++--------- code/modules/admin/topic.dm | 4 +- code/modules/admin/verbs/debug.dm | 6 +- code/modules/client/client procs.dm | 2 +- code/modules/events/event.dm | 4 +- code/modules/events/event_dynamic.dm | 4 +- code/modules/mob/emote.dm | 8 +-- code/modules/mob/living/carbon/human/life.dm | 2 +- .../species/xenomorphs/alien_facehugger.dm | 2 +- .../human/species/xenomorphs/alien_powers.dm | 2 +- code/modules/mob/mob.dm | 8 +-- code/modules/mob/new_player/new_player.dm | 11 +-- code/modules/mob/say.dm | 8 +-- code/setup.dm | 26 +++++++ code/world.dm | 11 ++- config/example/config.txt | 24 +++++++ 27 files changed, 187 insertions(+), 180 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 3532bf7bcde..a2d2ed352d1 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -83,6 +83,7 @@ var/limitalienplayers = 0 var/alien_to_human_ratio = 0.5 + var/guests_allowed = 1 var/debugparanoid = 0 var/server @@ -118,6 +119,8 @@ var/use_loyalty_implants = 0 + var/welder_vision = 1 + //Used for modifying movement speed for mobs. //Unversal modifiers var/run_speed = 0 @@ -145,6 +148,8 @@ var/comms_password = "" + var/enter_allowed = 1 + var/use_irc_bot = 0 var/irc_bot_host = "" var/main_irc = "" @@ -170,6 +175,12 @@ // 15, 45, 70 minutes respectively var/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000) + var/aliens_allowed = 0 + var/ninjas_allowed = 0 + var/abandon_allowed = 1 + var/ooc_allowed = 1 + var/dooc_allowed = 1 + var/dsay_allowed = 1 /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode @@ -367,7 +378,22 @@ config.guest_jobban = 1 if ("guest_ban") - guests_allowed = 0 + config.guests_allowed = 0 + + if ("disable_ooc") + config.ooc_allowed = 0 + + if ("disable_entry") + config.enter_allowed = 0 + + if ("disable_dead_ooc") + config.dooc_allowed = 0 + + if ("disable_dsay") + config.dsay_allowed = 0 + + if ("disable_respawn") + config.abandon_allowed = 0 if ("usewhitelist") config.usewhitelist = 1 @@ -381,6 +407,12 @@ if ("traitor_scaling") config.traitor_scaling = 1 + if ("aliens_allowed") + config.aliens_allowed = 1 + + if ("ninjas_allowed") + config.ninjas_allowed = 1 + if ("objectives_disabled") config.objectives_disabled = 1 @@ -544,6 +576,9 @@ if("expected_round_length") config.expected_round_length = MinutesToTicks(text2num(value)) + if("disable_welder_vision") + config.welder_vision = 0 + 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])) diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index d5503890a2f..679c7a09bc8 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -67,14 +67,6 @@ datum/controller/vote current_votes.Cut() additional_text.Cut() - /* if(auto_muted && !ooc_allowed) - auto_muted = 0 - ooc_allowed = !( ooc_allowed ) - world << "The OOC channel has been automatically enabled due to vote end." - log_admin("OOC was toggled automatically due to vote end.") - message_admins("OOC has been toggled on automatically.") - */ - proc/get_result() //get the highest number of votes var/greatest_votes = 0 @@ -262,27 +254,6 @@ datum/controller/vote if(mode == "gamemode" && going) going = 0 world << "Round start has been delayed." - /* if(mode == "crew_transfer" && ooc_allowed) - auto_muted = 1 - ooc_allowed = !( ooc_allowed ) - world << "The OOC channel has been automatically disabled due to a crew transfer vote." - log_admin("OOC was toggled automatically due to crew_transfer vote.") - message_admins("OOC has been toggled off automatically.") - if(mode == "gamemode" && ooc_allowed) - auto_muted = 1 - ooc_allowed = !( ooc_allowed ) - world << "The OOC channel has been automatically disabled due to the gamemode vote." - log_admin("OOC was toggled automatically due to gamemode vote.") - message_admins("OOC has been toggled off automatically.") - if(mode == "custom" && ooc_allowed) - auto_muted = 1 - ooc_allowed = !( ooc_allowed ) - world << "The OOC channel has been automatically disabled due to a custom vote." - log_admin("OOC was toggled automatically due to custom vote.") - message_admins("OOC has been toggled off automatically.") - */ - - time_remaining = round(config.vote_period/10) return 1 diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 534d6d109cc..e2c41fcbb45 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -70,7 +70,6 @@ /datum/game_mode/traitor/autotraitor/post_setup() ..() - abandon_allowed = 1 traitorcheckloop() /datum/game_mode/traitor/autotraitor/proc/traitorcheckloop() diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 59aede3ac99..26e38476b73 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -26,7 +26,7 @@ var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events. - if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round. + if((world.time/10)>=3600 && config.ninjas_allowed && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round. eventNumbersToPickFrom += 3 switch(pick(eventNumbersToPickFrom)) if(1) @@ -74,7 +74,7 @@ del(P) */ if(3) - if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round. + if((world.time/10)>=3600 && config.ninjas_allowed && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round. space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like. if(4) mini_blob_event() diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 59cca0df8b3..d8b22e629ce 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -90,7 +90,6 @@ I decided to scrap round-specific objectives since keeping track of them would r When I already created about 4 new objectives, this doesn't seem terribly important or needed. */ -/var/global/toggle_space_ninja = 0//If ninjas can spawn or not. /var/global/sent_ninja_to_station = 0//If a ninja is already on the station. var/ninja_selection_id = 1 @@ -437,7 +436,7 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(!ticker) alert("Wait until the game starts") return - if(!toggle_space_ninja) + if(!config.ninjas_allowed) alert("Space Ninjas spawning is disabled.") return @@ -467,7 +466,7 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(!ticker.mode) alert("The game hasn't started yet!") return - if(!toggle_space_ninja) + if(!config.ninjas_allowed) alert("Space Ninjas spawning is disabled.") return if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No") diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 1c8f8b9b409..77b6d673578 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -181,7 +181,7 @@ usr << "You are unable to access the self-destruct system as you don't control the station yet." return - if(ticker.mode:explosion_in_progress || ticker.mode:station_was_nuked) + if(ticker.mode.explosion_in_progress || ticker.mode:station_was_nuked) usr << "The self-destruct countdown is already triggered!" return @@ -192,7 +192,7 @@ usr << "\red Self-Destruct sequence initialised!" ticker.mode:to_nuke_or_not_to_nuke = 0 - ticker.mode:explosion_in_progress = 1 + ticker.mode.explosion_in_progress = 1 for(var/mob/M in player_list) M << 'sound/machines/Alarm.ogg' @@ -235,16 +235,15 @@ R.autosay(msg, AN) if(abort) - ticker.mode:explosion_in_progress = 0 + ticker.mode.explosion_in_progress = 0 set_security_level("red") //Delta's over return - enter_allowed = 0 if(ticker) ticker.station_explosion_cinematic(0,null) if(ticker.mode) ticker.mode:station_was_nuked = 1 - ticker.mode:explosion_in_progress = 0 + ticker.mode.explosion_in_progress = 0 return diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index cc57ccd8556..ef78dd4286c 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -389,8 +389,6 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) ticker.mode.explosion_in_progress = 1 sleep(100) - enter_allowed = 0 - var/off_station = 0 var/turf/bomb_location = get_turf(src) if(bomb_location && (bomb_location.z in config.station_levels)) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 56e5327079d..cdc7b26bbfc 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -345,7 +345,7 @@ Alien plants should do something if theres a lot of poison var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive /obj/effect/alien/egg/New() - if(aliens_allowed) + if(config.aliens_allowed) ..() spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME)) Grow() diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 83ec023b897..e1b6428712d 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -20,14 +20,14 @@ return if(!holder) - if(!ooc_allowed) - src << "\red OOC is globally muted" + if(!config.ooc_allowed) + src << "OOC is globally muted." return - if(!dooc_allowed && (mob.stat == DEAD)) - usr << "\red OOC for dead mobs has been turned off." + if(!config.dooc_allowed && (mob.stat == DEAD)) + usr << "OOC for dead mobs has been turned off." return if(prefs.muted & MUTE_OOC) - src << "\red You cannot use OOC (muted)." + src << "You cannot use OOC (muted)." return if(handle_spam_prevention(msg,MUTE_OOC)) return @@ -85,14 +85,14 @@ return if(!holder) - if(!ooc_allowed) - src << "\red OOC is globally muted" + if(!config.ooc_allowed) + src << "OOC is globally muted." return - if(!dooc_allowed && (mob.stat == DEAD)) - usr << "\red OOC for dead mobs has been turned off." + if(!config.dooc_allowed && (mob.stat == DEAD)) + usr << "OOC for dead mobs has been turned off." return if(prefs.muted & MUTE_OOC) - src << "\red You cannot use OOC (muted)." + src << "You cannot use OOC (muted)." return if(handle_spam_prevention(msg,MUTE_OOC)) return @@ -106,7 +106,7 @@ var/mob/source = src.mob var/list/heard = get_mobs_in_view(7, source) - + var/display_name = source.key if(holder && holder.fakekey) display_name = holder.fakekey diff --git a/code/global.dm b/code/global.dm index 71d613a7b83..19ddbbe289d 100644 --- a/code/global.dm +++ b/code/global.dm @@ -39,6 +39,8 @@ var/list/paper_blacklist = list("java","onblur","onchange","onclick","ondblclick "onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \ "onmouseup","onreset","onselect","onsubmit","onunload") +// The way blocks are handled badly needs a rewrite, this is horrible. +// Too much of a project to handle at the moment, TODO for later. var/BLINDBLOCK = 0 var/DEAFBLOCK = 0 var/HULKBLOCK = 0 @@ -85,26 +87,13 @@ var/game_version = "Baystation12" var/changelog_hash = "" var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544) -var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null var/going = 1.0 var/master_mode = "extended"//"extended" var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode -var/datum/engine_eject/engine_eject_control = null var/host = null -var/aliens_allowed = 0 -var/ooc_allowed = 1 -var/dsay_allowed = 1 -var/dooc_allowed = 1 -var/traitor_scaling = 1 -//var/goonsay_allowed = 0 -var/dna_ident = 1 -var/abandon_allowed = 1 -var/enter_allowed = 1 -var/guests_allowed = 1 var/shuttle_frozen = 0 var/shuttle_left = 0 -var/tinted_weldhelh = 1 var/list/jobMax = list() var/list/bombers = list( ) @@ -136,7 +125,7 @@ var/list/latejoin_cyborg = list() var/list/prisonwarp = list() //prisoners go to these var/list/holdingfacility = list() //captured people go here -var/list/xeno_spawn = list()//Aliens spawn at these. +var/list/xeno_spawn = list()//Aliens spawn at ahahthese. // list/mazewarp = list() var/list/tdome1 = list() var/list/tdome2 = list() @@ -184,59 +173,26 @@ var/datum/nanomanager/nanomanager = new() // event manager, the manager for events var/datum/event_manager/event_manager = new() -#define SPEED_OF_LIGHT 3e8 //not exact but hey! -#define SPEED_OF_LIGHT_SQ 9e+16 -#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215) -#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025) -#define INFINITY 1.#INF -#define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary. - // 1 will enable set background. 0 will disable set background. - - //Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam -#define MAX_MESSAGE_LEN 1024 -#define MAX_PAPER_MESSAGE_LEN 3072 -#define MAX_BOOK_MESSAGE_LEN 9216 -#define MAX_NAME_LEN 26 - -#define shuttle_time_in_station 1800 // 3 minutes in the station -#define shuttle_time_to_arrive 6000 // 10 minutes to arrive - -#define EVENT_LEVEL_MUNDANE 1 -#define EVENT_LEVEL_MODERATE 2 -#define EVENT_LEVEL_MAJOR 3 - -// Suit sensor levels -#define SUIT_SENSOR_OFF 0 -#define SUIT_SENSOR_BINARY 1 -#define SUIT_SENSOR_VITAL 2 -#define SUIT_SENSOR_TRACKING 3 - - //away missions +//away missions var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to - // MySQL configuration - +// MySQL configuration var/sqladdress = "localhost" var/sqlport = "3306" var/sqldb = "tgstation" var/sqllogin = "root" var/sqlpass = "" - // Feedback gathering sql connection - +// Feedback gathering sql connection var/sqlfdbkdb = "test" var/sqlfdbklogin = "root" var/sqlfdbkpass = "" - var/sqllogging = 0 // Should we log deaths, population stats, etc? - - - // Forum MySQL configuration (for use with forum account/key authentication) - // These are all default values that will load should the forumdbconfig.txt - // file fail to read for whatever reason. - +// Forum MySQL configuration (for use with forum account/key authentication) +// These are all default values that will load should the forumdbconfig.txt +// file fail to read for whatever reason. var/forumsqladdress = "localhost" var/forumsqlport = "3306" var/forumsqldb = "tgstation" @@ -245,8 +201,8 @@ var/forumsqlpass = "" var/forum_activated_group = "2" var/forum_authenticated_group = "10" - // For FTP requests. (i.e. downloading runtime logs.) - // However it'd be ok to use for accessing attack logs and such too, which are even laggier. +// For FTP requests. (i.e. downloading runtime logs.) +// However it'd be ok to use for accessing attack logs and such too, which are even laggier. var/fileaccess_timer = 0 var/custom_event_msg = null @@ -270,6 +226,7 @@ var/list/cheartstopper = list("potassium_chloride") //this stops the heart when //Used by robots and robot preferences. var/list/robot_module_types = list("Standard", "Engineering", "Construction", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security") +// Some scary sounds. var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg') // Bomb cap! diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 59e4182ac59..f1005b59a52 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -5,7 +5,7 @@ world/IsBanned(key,address,computer_id) return ..() //Guest Checking - if(!guests_allowed && IsGuestKey(key)) + if(!config.guests_allowed && IsGuestKey(key)) log_access("Failed Login: [key] - Guests not allowed") message_admins("\blue Failed Login: [key] - Guests not allowed") return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 07bca599952..9c3acb9c781 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -735,8 +735,8 @@ var/global/floorIsLava = 0 set category = "Server" set desc="Globally Toggles OOC" set name="Toggle OOC" - ooc_allowed = !( ooc_allowed ) - if (ooc_allowed) + config.ooc_allowed = !(config.ooc_allowed) + if (config.ooc_allowed) world << "The OOC channel has been globally enabled!" else world << "The OOC channel has been globally disabled!" @@ -749,8 +749,8 @@ var/global/floorIsLava = 0 set category = "Server" set desc="Globally Toggles DSAY" set name="Toggle DSAY" - dsay_allowed = !( dsay_allowed ) - if (dsay_allowed) + config.dsay_allowed = !(config.dsay_allowed) + if (config.dsay_allowed) world << "Deadchat has been globally enabled!" else world << "Deadchat has been globally disabled!" @@ -760,11 +760,10 @@ var/global/floorIsLava = 0 /datum/admins/proc/toggleoocdead() set category = "Server" - set desc="Toggle dis bitch" + set desc="Toggle Dead OOC." set name="Toggle Dead OOC" - dooc_allowed = !( dooc_allowed ) - - log_admin("[key_name(usr)] toggled OOC.") + config.dooc_allowed = !( config.dooc_allowed ) + log_admin("[key_name(usr)] toggled Dead OOC.") message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1) feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -772,9 +771,9 @@ var/global/floorIsLava = 0 set category = "Server" set desc="Toggle traitor scaling" set name="Toggle Traitor Scaling" - traitor_scaling = !traitor_scaling - log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].") - message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1) + config.traitor_scaling = !config.traitor_scaling + log_admin("[key_name(usr)] toggled Traitor Scaling to [config.traitor_scaling].") + message_admins("[key_name_admin(usr)] toggled Traitor Scaling [config.traitor_scaling ? "on" : "off"].", 1) feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/startnow() @@ -798,8 +797,8 @@ var/global/floorIsLava = 0 set category = "Server" set desc="People can't enter" set name="Toggle Entering" - enter_allowed = !( enter_allowed ) - if (!( enter_allowed )) + config.enter_allowed = !(config.enter_allowed) + if (!(config.enter_allowed)) world << "New players may no longer enter the game." else world << "New players may now enter the game." @@ -825,13 +824,13 @@ var/global/floorIsLava = 0 set category = "Server" set desc="Respawn basically" set name="Toggle Respawn" - abandon_allowed = !( abandon_allowed ) - if (abandon_allowed) + config.abandon_allowed = !(config.abandon_allowed) + if(config.abandon_allowed) world << "You may now respawn." else world << "You may no longer respawn :(" - message_admins("\blue [key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1) - log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].") + message_admins("\blue [key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].", 1) + log_admin("[key_name(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].") world.update_status() feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -839,18 +838,18 @@ var/global/floorIsLava = 0 set category = "Server" set desc="Toggle alien mobs" set name="Toggle Aliens" - aliens_allowed = !aliens_allowed - log_admin("[key_name(usr)] toggled Aliens to [aliens_allowed].") - message_admins("[key_name_admin(usr)] toggled Aliens [aliens_allowed ? "on" : "off"].", 1) + config.aliens_allowed = !config.aliens_allowed + log_admin("[key_name(usr)] toggled Aliens to [config.aliens_allowed].") + message_admins("[key_name_admin(usr)] toggled Aliens [config.aliens_allowed ? "on" : "off"].", 1) feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggle_space_ninja() set category = "Server" set desc="Toggle space ninjas spawning." set name="Toggle Space Ninjas" - toggle_space_ninja = !toggle_space_ninja - log_admin("[key_name(usr)] toggled Space Ninjas to [toggle_space_ninja].") - message_admins("[key_name_admin(usr)] toggled Space Ninjas [toggle_space_ninja ? "on" : "off"].", 1) + config.ninjas_allowed = !config.ninjas_allowed + log_admin("[key_name(usr)] toggled Space Ninjas to [config.ninjas_allowed].") + message_admins("[key_name_admin(usr)] toggled Space Ninjas [config.ninjas_allowed ? "on" : "off"].", 1) feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/delay() @@ -1048,26 +1047,26 @@ var/global/floorIsLava = 0 set category = "Debug" set desc="Reduces view range when wearing welding helmets" set name="Toggle tinted welding helmes" - tinted_weldhelh = !( tinted_weldhelh ) - if (tinted_weldhelh) - world << "The tinted_weldhelh has been enabled!" + config.welder_vision = !( config.welder_vision ) + if (config.welder_vision) + world << "Reduced welder vision has been enabled!" else - world << "The tinted_weldhelh has been disabled!" - log_admin("[key_name(usr)] toggled tinted_weldhelh.") - message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.", 1) + world << "Reduced welder vision has been disabled!" + log_admin("[key_name(usr)] toggled welder vision.") + message_admins("[key_name_admin(usr)] toggled welder vision.", 1) feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggleguests() set category = "Server" set desc="Guests can't enter" set name="Toggle guests" - guests_allowed = !( guests_allowed ) - if (!( guests_allowed )) + config.guests_allowed = !(config.guests_allowed) + if (!(config.guests_allowed)) world << "Guests may no longer enter the game." else world << "Guests may now enter the game." - log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.") - message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1) + log_admin("[key_name(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.") + message_admins("\blue [key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.", 1) feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/output_ai_laws() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 46a36c4678c..8a8ee1b50a9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2228,7 +2228,7 @@ if("aliens") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","AL") - if(aliens_allowed) + if(config.aliens_allowed) new /datum/event/alien_infestation message_admins("[key_name_admin(usr)] has spawned aliens", 1) if("spiders") @@ -2248,7 +2248,7 @@ if("spaceninja") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","SN") - if(toggle_space_ninja) + if(config.ninjas_allowed) if(space_ninja_arrival())//If the ninja is actually spawned. They may not be depending on a few factors. message_admins("[key_name_admin(usr)] has sent in a space ninja", 1) if("carp") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 4a633231151..6d44bae1612 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -367,9 +367,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that set category = "Server" set name = "Toggle Aliens" - aliens_allowed = !aliens_allowed - log_admin("[key_name(src)] has turned aliens [aliens_allowed ? "on" : "off"].") - message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0) + config.aliens_allowed = !config.aliens_allowed + log_admin("[key_name(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].") + message_admins("[key_name_admin(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].", 0) feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 4fa4db8b188..a8efe68418e 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -110,7 +110,7 @@ if(byond_version < MIN_CLIENT_VERSION) //Out of date client. return null - if(!guests_allowed && IsGuestKey(key)) + if(!config.guests_allowed && IsGuestKey(key)) alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK") del(src) return diff --git a/code/modules/events/event.dm b/code/modules/events/event.dm index e9134ea7097..408c85900e6 100644 --- a/code/modules/events/event.dm +++ b/code/modules/events/event.dm @@ -38,12 +38,12 @@ return total_weight /datum/event_meta/alien/get_weight(var/list/active_with_role) - if(aliens_allowed) + if(config.aliens_allowed) return ..(active_with_role) return 0 /datum/event_meta/ninja/get_weight(var/list/active_with_role) - if(toggle_space_ninja) + if(config.ninjas_allowed) return ..(active_with_role) return 0 diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index e24fd00e8ad..07cebea0730 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -89,9 +89,9 @@ var/list/event_last_fired = list() if(active_with_role["Security"] > 0) if(!sent_spiders_to_station) possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5 - if(aliens_allowed && !sent_aliens_to_station) + if(config.aliens_allowed && !sent_aliens_to_station) possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5 - if(!sent_ninja_to_station && toggle_space_ninja) + if(!sent_ninja_to_station && config.ninjas_allowed) possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5) for(var/event_type in event_last_fired) if(possibleEvents[event_type]) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 1d92926f53d..8c16691dc6f 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -93,16 +93,16 @@ /mob/proc/emote_dead(var/message) if(client.prefs.muted & MUTE_DEADCHAT) - src << "\red You cannot send deadchat emotes (muted)." + src << "You cannot send deadchat emotes (muted)." return if(!(client.prefs.toggles & CHAT_DEAD)) - src << "\red You have deadchat muted." + src << "You have deadchat muted." return if(!src.client.holder) - if(!dsay_allowed) - src << "\red Deadchat is globally muted" + if(!config.dsay_allowed) + src << "Deadchat is globally muted." return diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 660614a2247..03dae189d9c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1379,7 +1379,7 @@ if(eye_blurry) client.screen += global_hud.blurry if(druggy) client.screen += global_hud.druggy - if(tinted_weldhelh) + if(config.welder_vision) var/found_welder if(istype(glasses, /obj/item/clothing/glasses/welding)) var/obj/item/clothing/glasses/welding/O = glasses diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm index d7eaf07a0b1..da591f05703 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm @@ -38,7 +38,7 @@ var/const/MAX_ACTIVE_TIME = 400 Attach(M) /obj/item/clothing/mask/facehugger/New() - if(aliens_allowed) + if(config.aliens_allowed) ..() else del(src) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index e23bdfbd8f2..d53343b4c2f 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -83,7 +83,7 @@ set desc = "Lay an egg to produce huggers to impregnate prey with." set category = "Abilities" - if(!aliens_allowed) + if(!config.aliens_allowed) src << "You begin to lay an egg, but hesitate. You suspect it isn't allowed." verbs -= /mob/living/carbon/human/proc/lay_egg return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 356036e1de2..f414fbf915e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -392,14 +392,14 @@ var/list/slot_equipment_priority = list( \ set name = "Respawn" set category = "OOC" - if (!( abandon_allowed )) - usr << "\blue Respawn is disabled." + if (!( config.abandon_allowed )) + usr << "Respawn is disabled." return if ((stat != 2 || !( ticker ))) - usr << "\blue You must be dead to use this!" + usr << "You must be dead to use this!" return if (ticker.mode.name == "meteor" || ticker.mode.name == "epidemic") //BS12 EDIT - usr << "\blue Respawn is disabled for this roundtype." + usr << "Respawn is disabled for this roundtype." return else var/deathtime = world.time - src.timeofdeath diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index c72639a5b0c..a07e538e1e3 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -162,8 +162,11 @@ if(href_list["SelectedJob"]) - if(!enter_allowed) - usr << "\blue There is an administrative lock on entering the game!" + if(!config.enter_allowed) + usr << "There is an administrative lock on entering the game!" + return + else if(ticker && ticker.mode && ticker.mode.explosion_in_progress) + usr << "The station is currently exploding. Joining would go poorly." return if(client.prefs.species != "Human") @@ -293,8 +296,8 @@ if(!ticker || ticker.current_state != GAME_STATE_PLAYING) usr << "\red The round is either not ready, or has already finished..." return 0 - if(!enter_allowed) - usr << "\blue There is an administrative lock on entering the game!" + if(!config.enter_allowed) + usr << "There is an administrative lock on entering the game!" return 0 if(!IsJobAvailable(rank)) src << alert("[rank] is not available. Please try another.") diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 8a7b7aa962c..532ffd4f2d6 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -44,16 +44,16 @@ /mob/proc/say_dead(var/message) if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." + usr << "Speech is currently admin-disabled." return if(!src.client.holder) - if(!dsay_allowed) - src << "\red Deadchat is globally muted" + if(!config.dsay_allowed) + src << "Deadchat is globally muted." return if(client && !(client.prefs.toggles & CHAT_DEAD)) - usr << "\red You have deadchat muted." + usr << "You have deadchat muted." return say_dead_direct("[pick("complains","moans","whines","laments","blubbers")], \"[message]\"", src) diff --git a/code/setup.dm b/code/setup.dm index 88d647766a9..c3ab2739a89 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -776,3 +776,29 @@ var/list/be_special_flags = list( //Chemistry #define CHEM_SYNTH_ENERGY 500 //How much energy does it take to synthesize 1 unit of chemical, in J + + +#define SPEED_OF_LIGHT 3e8 //not exact but hey! +#define SPEED_OF_LIGHT_SQ 9e+16 +#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215) +#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025) +#define INFINITY 1.#INF +#define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary. + // 1 will enable set background. 0 will disable set background. + +//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam +#define MAX_MESSAGE_LEN 1024 +#define MAX_PAPER_MESSAGE_LEN 3072 +#define MAX_BOOK_MESSAGE_LEN 9216 +#define MAX_NAME_LEN 26 + +// Event defines. +#define EVENT_LEVEL_MUNDANE 1 +#define EVENT_LEVEL_MODERATE 2 +#define EVENT_LEVEL_MAJOR 3 + +// Suit sensor levels +#define SUIT_SENSOR_OFF 0 +#define SUIT_SENSOR_BINARY 1 +#define SUIT_SENSOR_VITAL 2 +#define SUIT_SENSOR_TRACKING 3 \ No newline at end of file diff --git a/code/world.dm b/code/world.dm index 520aef1bbf0..f53e039e4f7 100644 --- a/code/world.dm +++ b/code/world.dm @@ -108,8 +108,8 @@ var/world_topic_spam_protect_time = world.timeofday var/list/s = list() s["version"] = game_version s["mode"] = master_mode - s["respawn"] = config ? abandon_allowed : 0 - s["enter"] = enter_allowed + s["respawn"] = config.abandon_allowed + s["enter"] = config.enter_allowed s["vote"] = config.allow_vote_mode s["ai"] = config.allow_ai s["host"] = host ? host : null @@ -264,9 +264,6 @@ var/world_topic_spam_protect_time = world.timeofday config.load("config/game_options.txt","game_options") config.loadsql("config/dbconfig.txt") config.loadforumsql("config/forumdbconfig.txt") - // apply some settings from config.. - abandon_allowed = config.respawn - /hook/startup/proc/loadMods() world.load_mods() @@ -316,10 +313,10 @@ var/world_topic_spam_protect_time = world.timeofday else features += "STARTING" - if (!enter_allowed) + if (!config.enter_allowed) features += "closed" - features += abandon_allowed ? "respawn" : "no respawn" + features += config.abandon_allowed ? "respawn" : "no respawn" if (config && config.allow_vote_mode) features += "vote" diff --git a/config/example/config.txt b/config/example/config.txt index ed2f0c0ae31..eb9ab2195fa 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -297,3 +297,27 @@ EVENT_CUSTOM_START_MAJOR 80;100 ## designed for environments where you have testers but don't want them ## able to use the more powerful debug options. #DEBUG_PARANOID + +## Uncomment to allow aliens to spawn. +#ALIENS_ALLOWED + +## Uncomment to allow xenos to spawn. +#NINJAS_ALLOWED + +## Uncomment to disable the restrictive weldervision overlay. +#DISABLE_WELDER_VISION + +## Uncomment to prevent anyone from joining the round by default. +#DISABLE_ENTRY + +## Uncomment to disable the OOC channel by default. +#DISABLE_OOC + +## Uncomment to disable the dead OOC channel by default. +#DISABLE_DEAD_OOC + +## Uncomment to disable ghost chat by default. +#DISABLE_DSAY + +## Uncomment to disable respawning by default. +#DISABLE_RESPAWN \ No newline at end of file