From 0da9a4538e69a37c20116712fc1561246e26f649 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 10:02:37 +0200 Subject: [PATCH 01/19] New debug log system. You can as admin toggle debug messages, VERY useful for devs and debugging the main server. --- code/__HELPERS/logging.dm | 11 +++++++++++ code/controllers/configuration.dm | 4 ++++ code/modules/admin/admin_verbs.dm | 14 +++++++++++++- code/setup.dm | 2 ++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 2daf3690d8..0d3112d09b 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -15,6 +15,17 @@ if (config.log_admin) diary << "\[[time_stamp()]]ADMIN: [text]" + +/proc/log_debug(text) + if (config.log_debug) + diary << "\[[time_stamp()]]DEBUG: [text]" + + for(var/client/C in admins) + if(R_ADMIN & C.holder.rights) + if(C.prefs.toggles & CHAT_DEBUGLOGS) + C << "DEBUG: [text]" + + /proc/log_game(text) if (config.log_game) diary << "\[[time_stamp()]]GAME: [text]" diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index f537bbae3e..02f8c521aa 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -8,6 +8,7 @@ var/log_access = 0 // log login/logout var/log_say = 0 // log client say var/log_admin = 0 // log admin actions + var/log_debug = 1 // log debug output var/log_game = 0 // log game events var/log_vote = 0 // log voting var/log_whisper = 0 // log client whisper @@ -193,6 +194,9 @@ if ("log_admin") config.log_admin = 1 + if ("log_debug") + config.log_debug = text2num(value) + if ("log_game") config.log_game = 1 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index abcb3d52b7..51cd88e3db 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -64,6 +64,7 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/toggleattacklogs, + /client/proc/toggledebuglogs, /datum/admins/proc/show_skills, /client/proc/check_customitem_activity ) @@ -721,4 +722,15 @@ var/list/admin_verbs_mod = list( if (prefs.toggles & CHAT_ATTACKLOGS) usr << "You now will get attack log messages" else - usr << "You now won't get attack log messages" + usr << "You now won't get attack log messages" + + +/client/proc/toggledebuglogs() + set name = "Toggle Debug Log Messages" + set category = "Preferences" + + prefs.toggles ^= CHAT_DEBUGLOGS + if (prefs.toggles & CHAT_DEBUGLOGS) + usr << "You now will get debug log messages" + else + usr << "You now won't get debug log messages" \ No newline at end of file diff --git a/code/setup.dm b/code/setup.dm index 35fe8827a4..d4f4941d43 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -620,6 +620,8 @@ var/list/TAGGERLOCATIONS = list("Disposals", #define CHAT_PRAYER 256 #define CHAT_RADIO 512 #define CHAT_ATTACKLOGS 1024 +#define CHAT_DEBUGLOGS 2048 + #define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS) From 48b78ea758dd1bb391443807c10278b65b697e1a Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 11:06:19 +0200 Subject: [PATCH 02/19] Re-added latespawn. Used in autotraitor and RP-revolution. --- code/game/gamemodes/autotraitor/autotraitor.dm | 3 +-- code/game/gamemodes/game_mode.dm | 7 +++++-- .../game/gamemodes/revolution/rp_revolution.dm | 18 ++++++++++++++++-- code/modules/mob/new_player/new_player.dm | 2 ++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index c0368c0ad0..c5b159dd1a 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -142,7 +142,7 @@ traitorcheckloop() -/* + /datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character) ..() if(emergency_shuttle.departed) @@ -192,6 +192,5 @@ //message_admins("New traitor roll failed. No new traitor.") //else //message_admins("Late Joiner does not have Be Syndicate") -*/ diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 10c0c3f631..77d4d73e6b 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -279,6 +279,7 @@ Implants; if(player.client.prefs.be_special & role) if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans candidates += player.mind // Get a list of all the people who want to be the antagonist for this round + log_debug("[player.key] had [roletext] enabled, so drafting them.") if(restricted_jobs) for(var/datum/mind/player in candidates) @@ -306,6 +307,7 @@ Implants; applicant = pick(drafted) if(applicant) candidates += applicant + log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.") drafted.Remove(applicant) else // Not enough scrubs, ABORT ABORT ABORT @@ -331,7 +333,7 @@ Implants; if(applicant) candidates += applicant drafted.Remove(applicant) - message_admins("[applicant.key] drafted into antagonist role against their preferences.") + log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.") else // Not enough scrubs, ABORT ABORT ABORT break @@ -340,9 +342,10 @@ Implants; // recommended_enemies if the number of people with that role set to yes is less than recomended_enemies, // Less if there are not enough valid players in the game entirely to make recommended_enemies. -/* + /datum/game_mode/proc/latespawn(var/mob) +/* /datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player) if(player.preferences.be_special & role) return 1 diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 2159138448..643384554d 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -57,7 +57,7 @@ var/datum/objective/mutiny/rp/rev_obj = new rev_obj.owner = rev_mind rev_obj.target = head_mind - rev_obj.explanation_text = "Assassinate or capture [head_mind.name], the [head_mind.assigned_role]." + rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]." rev_mind.objectives += rev_obj update_rev_icons_added(rev_mind) @@ -210,4 +210,18 @@ message_admins("Unable to add new heads of revolution.") tried_to_add_revheads = world.time + 6000 // wait 10 minutes - return ..() \ No newline at end of file + return ..() + + +/datum/game_mode/revolution/rp_revolution/latespawn(mob/M) + if(M.mind.assigned_role in command_positions) + log_debug("Adding head kill/capture/convert objective for [M.name]") + heads += M + + for(var/datum/mind/rev_mind in head_revolutionaries) + var/datum/objective/mutiny/rp/rev_obj = new + rev_obj.owner = rev_mind + rev_obj.target = M.mind + rev_obj.explanation_text = "Assassinate, convert or capture [M.name], the [M.mind.assigned_role]." + rev_mind.objectives += rev_obj + rev_mind.current << "\red A new Head of Staff, [M.name], the [M.mind.assigned_role] has appeared. Your objectives have been updated." \ No newline at end of file diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 97133deb4c..a5b92bdc40 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -277,6 +277,8 @@ character.loc = pick(latejoin) character.lastarea = get_area(loc) + ticker.mode.latespawn(character) + //ticker.mode.latespawn(character) if(character.mind.assigned_role != "Cyborg") From e4b610207b042c2a2249c492323be585113e4038 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 11:34:00 +0200 Subject: [PATCH 03/19] Make debug log accessible to mods and coders. --- code/__HELPERS/logging.dm | 5 ++--- code/modules/admin/admin_verbs.dm | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 0d3112d09b..8a5b496328 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -21,9 +21,8 @@ diary << "\[[time_stamp()]]DEBUG: [text]" for(var/client/C in admins) - if(R_ADMIN & C.holder.rights) - if(C.prefs.toggles & CHAT_DEBUGLOGS) - C << "DEBUG: [text]" + if(C.prefs.toggles & CHAT_DEBUGLOGS) + C << "DEBUG: [text]" /proc/log_game(text) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 51cd88e3db..25daafc9f4 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -135,7 +135,8 @@ var/list/admin_verbs_debug = list( /client/proc/reload_admins, /client/proc/restart_controller, /client/proc/enable_debug_verbs, - /client/proc/callproc + /client/proc/callproc, + /client/proc/toggledebuglogs ) var/list/admin_verbs_possess = list( /proc/possess, @@ -223,6 +224,7 @@ var/list/admin_verbs_mod = list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/ + /client/proc/toggledebuglogs, /datum/admins/proc/PlayerNotes, /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/ /client/proc/cmd_mod_say, From be197afc7744d037e4fe436b139c533c924372bf Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 13:06:16 +0200 Subject: [PATCH 04/19] Added system for newscaster events. This way people can write stories, separated into several pieces, which will be announced through the newscasters over the course of the round. --- baystation12.dme | 227 ++++++++++++++++++++++++++ code/WorkInProgress/periodic_news.dm | 72 ++++++++ code/controllers/master_controller.dm | 1 + code/game/gamemodes/game_mode.dm | 1 + 4 files changed, 301 insertions(+) create mode 100644 code/WorkInProgress/periodic_news.dm diff --git a/baystation12.dme b/baystation12.dme index 57a993230e..915e5c3d5f 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -6,14 +6,235 @@ // BEGIN_FILE_DIR #define FILE_DIR . #define FILE_DIR "code" +#define FILE_DIR "code/__HELPERS" +#define FILE_DIR "code/ATMOSPHERICS" +#define FILE_DIR "code/ATMOSPHERICS/components" +#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices" +#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices" +#define FILE_DIR "code/ATMOSPHERICS/components/unary" +#define FILE_DIR "code/controllers" +#define FILE_DIR "code/datums" +#define FILE_DIR "code/datums/diseases" +#define FILE_DIR "code/datums/diseases/advance" +#define FILE_DIR "code/datums/diseases/advance/symptoms" +#define FILE_DIR "code/datums/helper_datums" +#define FILE_DIR "code/datums/spells" +#define FILE_DIR "code/defines" +#define FILE_DIR "code/defines/obj" +#define FILE_DIR "code/defines/procs" +#define FILE_DIR "code/FEA" +#define FILE_DIR "code/game" +#define FILE_DIR "code/game/area" +#define FILE_DIR "code/game/gamemodes" +#define FILE_DIR "code/game/gamemodes/autotraitor" +#define FILE_DIR "code/game/gamemodes/blob" +#define FILE_DIR "code/game/gamemodes/blob/blobs" +#define FILE_DIR "code/game/gamemodes/changeling" +#define FILE_DIR "code/game/gamemodes/cult" +#define FILE_DIR "code/game/gamemodes/epidemic" +#define FILE_DIR "code/game/gamemodes/events" +#define FILE_DIR "code/game/gamemodes/events/holidays" +#define FILE_DIR "code/game/gamemodes/extended" +#define FILE_DIR "code/game/gamemodes/malfunction" +#define FILE_DIR "code/game/gamemodes/meme" +#define FILE_DIR "code/game/gamemodes/meteor" +#define FILE_DIR "code/game/gamemodes/nuclear" +#define FILE_DIR "code/game/gamemodes/revolution" +#define FILE_DIR "code/game/gamemodes/sandbox" +#define FILE_DIR "code/game/gamemodes/traitor" +#define FILE_DIR "code/game/gamemodes/wizard" +#define FILE_DIR "code/game/jobs" +#define FILE_DIR "code/game/jobs/job" +#define FILE_DIR "code/game/machinery" +#define FILE_DIR "code/game/machinery/atmoalter" +#define FILE_DIR "code/game/machinery/bots" +#define FILE_DIR "code/game/machinery/camera" +#define FILE_DIR "code/game/machinery/computer" +#define FILE_DIR "code/game/machinery/doors" +#define FILE_DIR "code/game/machinery/embedded_controller" +#define FILE_DIR "code/game/machinery/kitchen" +#define FILE_DIR "code/game/machinery/pipe" +#define FILE_DIR "code/game/machinery/telecomms" +#define FILE_DIR "code/game/magic" +#define FILE_DIR "code/game/mecha" +#define FILE_DIR "code/game/mecha/combat" +#define FILE_DIR "code/game/mecha/equipment" +#define FILE_DIR "code/game/mecha/equipment/tools" +#define FILE_DIR "code/game/mecha/equipment/weapons" +#define FILE_DIR "code/game/mecha/medical" +#define FILE_DIR "code/game/mecha/working" +#define FILE_DIR "code/game/objects" +#define FILE_DIR "code/game/objects/closets" +#define FILE_DIR "code/game/objects/closets/secure" +#define FILE_DIR "code/game/objects/effects" +#define FILE_DIR "code/game/objects/effects/decals" +#define FILE_DIR "code/game/objects/effects/decals/Cleanable" +#define FILE_DIR "code/game/objects/effects/spawners" +#define FILE_DIR "code/game/objects/items" +#define FILE_DIR "code/game/objects/items/devices" +#define FILE_DIR "code/game/objects/items/devices/PDA" +#define FILE_DIR "code/game/objects/items/devices/radio" +#define FILE_DIR "code/game/objects/items/robot" +#define FILE_DIR "code/game/objects/items/stacks" +#define FILE_DIR "code/game/objects/items/stacks/sheets" +#define FILE_DIR "code/game/objects/items/stacks/tiles" +#define FILE_DIR "code/game/objects/items/weapons" +#define FILE_DIR "code/game/objects/items/weapons/grenades" +#define FILE_DIR "code/game/objects/items/weapons/implants" +#define FILE_DIR "code/game/objects/items/weapons/melee" +#define FILE_DIR "code/game/objects/items/weapons/storage" +#define FILE_DIR "code/game/objects/items/weapons/tanks" +#define FILE_DIR "code/game/objects/storage" +#define FILE_DIR "code/game/objects/structures" +#define FILE_DIR "code/game/objects/structures/crates_lockers" +#define FILE_DIR "code/game/objects/structures/crates_lockers/closets" +#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure" +#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest" +#define FILE_DIR "code/game/structure" +#define FILE_DIR "code/game/turfs" +#define FILE_DIR "code/game/turfs/simulated" +#define FILE_DIR "code/game/turfs/space" +#define FILE_DIR "code/game/turfs/unsimulated" +#define FILE_DIR "code/game/vehicles" +#define FILE_DIR "code/game/verbs" +#define FILE_DIR "code/js" +#define FILE_DIR "code/modules" +#define FILE_DIR "code/modules/admin" +#define FILE_DIR "code/modules/admin/DB ban" +#define FILE_DIR "code/modules/admin/permissionverbs" +#define FILE_DIR "code/modules/admin/verbs" +#define FILE_DIR "code/modules/assembly" +#define FILE_DIR "code/modules/awaymissions" +#define FILE_DIR "code/modules/awaymissions/maploader" +#define FILE_DIR "code/modules/client" +#define FILE_DIR "code/modules/clothing" +#define FILE_DIR "code/modules/clothing/glasses" +#define FILE_DIR "code/modules/clothing/gloves" +#define FILE_DIR "code/modules/clothing/head" +#define FILE_DIR "code/modules/clothing/masks" +#define FILE_DIR "code/modules/clothing/shoes" +#define FILE_DIR "code/modules/clothing/spacesuits" +#define FILE_DIR "code/modules/clothing/suits" +#define FILE_DIR "code/modules/clothing/under" +#define FILE_DIR "code/modules/clothing/under/jobs" +#define FILE_DIR "code/modules/customitems" +#define FILE_DIR "code/modules/destilery" +#define FILE_DIR "code/modules/DetectiveWork" +#define FILE_DIR "code/modules/events" +#define FILE_DIR "code/modules/flufftext" +#define FILE_DIR "code/modules/food" +#define FILE_DIR "code/modules/genetics" +#define FILE_DIR "code/modules/icon generation" +#define FILE_DIR "code/modules/library" +#define FILE_DIR "code/modules/liquid" +#define FILE_DIR "code/modules/maps" +#define FILE_DIR "code/modules/mining" +#define FILE_DIR "code/modules/mob" +#define FILE_DIR "code/modules/mob/dead" +#define FILE_DIR "code/modules/mob/dead/observer" +#define FILE_DIR "code/modules/mob/living" +#define FILE_DIR "code/modules/mob/living/blob" +#define FILE_DIR "code/modules/mob/living/carbon" +#define FILE_DIR "code/modules/mob/living/carbon/alien" +#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" +#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" +#define FILE_DIR "code/modules/mob/living/carbon/alien/larva" +#define FILE_DIR "code/modules/mob/living/carbon/alien/special" +#define FILE_DIR "code/modules/mob/living/carbon/brain" +#define FILE_DIR "code/modules/mob/living/carbon/human" +#define FILE_DIR "code/modules/mob/living/carbon/metroid" +#define FILE_DIR "code/modules/mob/living/carbon/monkey" +#define FILE_DIR "code/modules/mob/living/silicon" +#define FILE_DIR "code/modules/mob/living/silicon/ai" +#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook" +#define FILE_DIR "code/modules/mob/living/silicon/decoy" +#define FILE_DIR "code/modules/mob/living/silicon/pai" +#define FILE_DIR "code/modules/mob/living/silicon/robot" +#define FILE_DIR "code/modules/mob/living/simple_animal" +#define FILE_DIR "code/modules/mob/living/simple_animal/friendly" +#define FILE_DIR "code/modules/mob/living/simple_animal/hostile" +#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate" +#define FILE_DIR "code/modules/mob/new_player" +#define FILE_DIR "code/modules/organs" +#define FILE_DIR "code/modules/paperwork" +#define FILE_DIR "code/modules/power" +#define FILE_DIR "code/modules/power/antimatter" +#define FILE_DIR "code/modules/power/singularity" +#define FILE_DIR "code/modules/power/singularity/particle_accelerator" +#define FILE_DIR "code/modules/projectiles" +#define FILE_DIR "code/modules/projectiles/ammunition" +#define FILE_DIR "code/modules/projectiles/guns" +#define FILE_DIR "code/modules/projectiles/guns/energy" +#define FILE_DIR "code/modules/projectiles/guns/projectile" +#define FILE_DIR "code/modules/projectiles/projectile" +#define FILE_DIR "code/modules/reagents" +#define FILE_DIR "code/modules/reagents/reagent_containers" +#define FILE_DIR "code/modules/reagents/reagent_containers/food" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks" +#define FILE_DIR "code/modules/reagents/reagent_containers/glass" +#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle" +#define FILE_DIR "code/modules/recycling" +#define FILE_DIR "code/modules/research" +#define FILE_DIR "code/modules/research/xenoarchaeology" +#define FILE_DIR "code/modules/research/xenoarchaeology/artifact" +#define FILE_DIR "code/modules/research/xenoarchaeology/artifact/effects" +#define FILE_DIR "code/modules/research/xenoarchaeology/finds" +#define FILE_DIR "code/modules/research/xenoarchaeology/machinery" +#define FILE_DIR "code/modules/research/xenoarchaeology/tools" +#define FILE_DIR "code/modules/scripting" +#define FILE_DIR "code/modules/scripting/AST" +#define FILE_DIR "code/modules/scripting/AST/Operators" +#define FILE_DIR "code/modules/scripting/Implementations" +#define FILE_DIR "code/modules/scripting/Interpreter" +#define FILE_DIR "code/modules/scripting/Parser" +#define FILE_DIR "code/modules/scripting/Scanner" +#define FILE_DIR "code/modules/security levels" +#define FILE_DIR "code/modules/surgery" #define FILE_DIR "code/TriDimension" +#define FILE_DIR "code/unused" +#define FILE_DIR "code/unused/beast" +#define FILE_DIR "code/unused/computer2" +#define FILE_DIR "code/unused/disease2" +#define FILE_DIR "code/unused/gamemodes" +#define FILE_DIR "code/unused/hivebot" +#define FILE_DIR "code/unused/mining" +#define FILE_DIR "code/unused/optics" +#define FILE_DIR "code/unused/pda2" +#define FILE_DIR "code/unused/powerarmor" +#define FILE_DIR "code/unused/spacecraft" #define FILE_DIR "code/WorkInProgress" +#define FILE_DIR "code/WorkInProgress/AI_Visibility" +#define FILE_DIR "code/WorkInProgress/animusstation" +#define FILE_DIR "code/WorkInProgress/Apples" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn" +#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Economy" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter" +#define FILE_DIR "code/WorkInProgress/carn" +#define FILE_DIR "code/WorkInProgress/Chinsky" +#define FILE_DIR "code/WorkInProgress/Cib" +#define FILE_DIR "code/WorkInProgress/Cib/amorph" +#define FILE_DIR "code/WorkInProgress/Mini" +#define FILE_DIR "code/WorkInProgress/Mloc" +#define FILE_DIR "code/WorkInProgress/organs" +#define FILE_DIR "code/WorkInProgress/Ported" +#define FILE_DIR "code/WorkInProgress/Ported/Abi79" +#define FILE_DIR "code/WorkInProgress/Ported/Bureaucracy" +#define FILE_DIR "code/WorkInProgress/Ported/Spawners" +#define FILE_DIR "code/WorkInProgress/Sigyn" +#define FILE_DIR "code/WorkInProgress/Sigyn/Department Sec" +#define FILE_DIR "code/WorkInProgress/Sigyn/Softcurity" +#define FILE_DIR "code/WorkInProgress/SkyMarshal" #define FILE_DIR "code/WorkInProgress/Susan" +#define FILE_DIR "code/WorkInProgress/Tastyfish" +#define FILE_DIR "code/WorkInProgress/virus2" +#define FILE_DIR "code/WorkInProgress/virus2/Disease2" +#define FILE_DIR "code/WorkInProgress/Wrongnumber" +#define FILE_DIR "code/ZAS" #define FILE_DIR "html" #define FILE_DIR "icons" #define FILE_DIR "icons/48x48" @@ -36,6 +257,9 @@ #define FILE_DIR "icons/turf" #define FILE_DIR "icons/vending_icons" #define FILE_DIR "icons/xenoarch_icons" +#define FILE_DIR "interface" +#define FILE_DIR "maps" +#define FILE_DIR "maps/RandomZLevels" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" #define FILE_DIR "sound/ambience" @@ -52,6 +276,8 @@ #define FILE_DIR "sound/violin" #define FILE_DIR "sound/voice" #define FILE_DIR "sound/weapons" +#define FILE_DIR "tools" +#define FILE_DIR "tools/Redirector" // END_FILE_DIR // BEGIN_PREFERENCES #define DEBUG @@ -1245,6 +1471,7 @@ #include "code\WorkInProgress\autopsy.dm" #include "code\WorkInProgress\buildmode.dm" #include "code\WorkInProgress\explosion_particles.dm" +#include "code\WorkInProgress\periodic_news.dm" #include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm" #include "code\WorkInProgress\Cael_Aislinn\sculpture.dm" #include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm" diff --git a/code/WorkInProgress/periodic_news.dm b/code/WorkInProgress/periodic_news.dm new file mode 100644 index 0000000000..48ed3bd7b7 --- /dev/null +++ b/code/WorkInProgress/periodic_news.dm @@ -0,0 +1,72 @@ +// This system defines news that will be displayed in the course of a round. +// Uses BYOND's type system to put everything into a nice format + +/datum/news_announcement + var + round_time // time of the round at which this should be announced, in seconds + message // body of the message + author = "NanoTrasen Editor" + channel_name = "Tau Ceti Daily" + can_be_redacted = 0 + + revolution_inciting_event + + paycuts_suspicion + round_time = 60*10 + message = "Reports have leaked that Nanotrasen Inc. is planning to put paycuts into effect on many of its Research Stations in Tau Ceti. Apparently these research stations haven't been able to yield the expected revenue, and thus adjustments have to be made." + author = "Unauthorized" + + paycuts_confirmation + round_time = 60*40 + message = "Earlier rumours about paycuts on Research Stations in the Tau Ceti system have been confirmed. Shockingly, however, the cuts will only affect lower tier personnel. Heads of Staff will, according to our sources, not be affected." + author = "Unauthorized" + + human_experiments + round_time = 60*90 + message = "Unbelievable reports about human experimentation have reached our ears. According to a refugee from one of the Tau Ceti Research Stations, their station, in order to increase revenue, has refactored several of their facilities to perform experiments on live humans, including virology research, genetic manipulation, and \"feeding them to the slimes to see what happens\". Allegedly, these test subjects were neither humanified monkeys nor volunteers, but rather unqualified staff that were forced into the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc." + author = "Unauthorized" + + bluespace_research + + announcement + round_time = 60*20 + message = "The new field of research trying to explain several interesting spacetime oddities, also known as \"Bluespace Research\", has reached new heights. Of the several hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped to experiment with and research Bluespace effects. Rumours have it some of these stations even sport functional \"travel gates\" that can instantly move a whole research team to an alternate reality." + + +proc/process_newscaster() + check_for_newscaster_updates(ticker.mode.newscaster_announcements) + +var/global/tmp/announced_news_types = list() +proc/check_for_newscaster_updates(type) + for(var/subtype in typesof(type)-type) + var/datum/news_announcement/news = new subtype() + if(news.round_time * 10 >= world.time && !(subtype in announced_news_types)) + announced_news_types += subtype + announce_newscaster_news(news) + +proc/announce_newscaster_news(datum/news_announcement/news) + + var/datum/feed_message/newMsg = new /datum/feed_message + newMsg.author = news.author + newMsg.is_admin_message = !news.can_be_redacted + + newMsg.body = news.message + + var/datum/feed_channel/sendto + for(var/datum/feed_channel/FC in news_network.network_channels) + if(FC.channel_name == news.channel_name) + sendto = FC + break + + if(!sendto) + sendto = new /datum/feed_channel + sendto.channel_name = news.channel_name + sendto.author = news.author + sendto.locked = 1 + sendto.is_admin_channel = 1 + news_network.network_channels += sendto + + sendto.messages += newMsg + + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.newsAlert(news.channel_name) diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 25dc9804d9..c618079f68 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -117,6 +117,7 @@ datum/controller/game_controller/proc/process() controller_iteration++ vote.process() + process_newscaster() //AIR diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 77d4d73e6b..03ae5fc3e6 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -27,6 +27,7 @@ var/required_players_secret = 0 //Minimum number of players for that game mode to be chose in Secret var/required_enemies = 0 var/recommended_enemies = 0 + var/newscaster_announcements = /datum/news_announcement/bluespace_research var/uplink_welcome = "Syndicate Uplink Console:" var/uplink_uses = 10 var/uplink_items = {"Highly Visible and Dangerous Weapons; From 335565cba7e310a0080e7a70c700ac3f87f5992c Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 13:10:07 +0200 Subject: [PATCH 05/19] Made RP rev use a different news story. --- code/game/gamemodes/revolution/rp_revolution.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 643384554d..c22181a7e5 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -8,6 +8,8 @@ required_enemies = 3 recommended_enemies = 3 + newscaster_announcements = /datum/news_announcement/revolution_inciting_event + var/list/heads = list() var/tried_to_add_revheads = 0 From 90076f017a049962d15e0c4115f3aa7a6d3fa3f1 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 13:17:19 +0200 Subject: [PATCH 06/19] Added debug logging for events. Something's just not right about events still. --- code/modules/events/event_dynamic.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index dce1fcc0b3..d60f33ae06 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -84,16 +84,19 @@ if(!sent_ninja_to_station && toggle_space_ninja) possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5) + + var/picked_event = pickweight(possibleEvents) + // Debug code below here, very useful for testing so don't delete please. - /*var/debug_message = "Firing random event. " + var/debug_message = "Firing random event. " for(var/V in active_with_role) debug_message += "#[V]:[active_with_role[V]] " debug_message += "||| " for(var/V in possibleEvents) debug_message += "[V]:[possibleEvents[V]]" - message_admins(debug_message)*/ + debug_message += "|||Picked:[picked_event]" + log_debug(debug_message) - var/picked_event = pickweight(possibleEvents) if(!picked_event) return From e2249fa1775d288cf41263a4294d1230d42701e5 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 13:48:57 +0200 Subject: [PATCH 07/19] Added organ damage random medical event. It doesn't make a lot of sense, but who cares about that! --- baystation12.dme | 1 + code/modules/events/event_dynamic.dm | 7 ++++--- code/modules/events/organ_failure.dm | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 code/modules/events/organ_failure.dm diff --git a/baystation12.dme b/baystation12.dme index 915e5c3d5f..7b8c7d1e61 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1030,6 +1030,7 @@ #include "code\modules\events\money_hacker.dm" #include "code\modules\events\money_lotto.dm" #include "code\modules\events\money_spam.dm" +#include "code\modules\events\organ_failure.dm" #include "code\modules\events\prison_break.dm" #include "code\modules\events\radiation_storm.dm" #include "code\modules\events\rogue_drones.dm" diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index d60f33ae06..6af66ced1b 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -69,11 +69,12 @@ possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"] possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"] - possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25 + possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100 if(active_with_role["Medical"] > 0) possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100 - possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75 - possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5 + possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150 + possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50 possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50 if(active_with_role["Security"] > 0) diff --git a/code/modules/events/organ_failure.dm b/code/modules/events/organ_failure.dm new file mode 100644 index 0000000000..2a6b0b6a37 --- /dev/null +++ b/code/modules/events/organ_failure.dm @@ -0,0 +1,28 @@ +datum/event/organ_failure + var/severity = 1 + +datum/event/organ_failure/setup() + announceWhen = rand(0, 3000) + endWhen = announceWhen + 1 + severity = rand(1, 3) + +datum/event/organ_failure/announce() + command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") + world << sound('sound/AI/outbreak5.ogg') + +datum/event/organ_failure/start() + var/list/candidates = list() //list of candidate keys + for(var/mob/living/carbon/human/G in player_list) + if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70)) + candidates += G + if(!candidates.len) return + candidates = shuffle(candidates)//Incorporating Donkie's list shuffle + + while(severity > 0 && candidates.len) + var/mob/living/carbon/human/C = candidates[1] + + // Bruise one of their organs + var/datum/organ/internal/I = pick(C.internal_organs) + I.damage = I.min_bruised_damage + candidates.Remove(C) + severity-- From c1cefa4a80a68c21d708989ffdce8c5d640c7792 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 13:49:45 +0200 Subject: [PATCH 08/19] Added more debug logging to events. --- code/modules/events/event_manager.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 0af33b153b..b2201c7c92 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -30,7 +30,9 @@ var/scheduledEvent = null playercount_modifier = 0.9 if(36 to 100000) playercount_modifier = 0.8 - scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier + var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier + scheduledEvent = world.timeofday + next_event_delay + log_debug("Next event in [next_event_delay/600] minutes.") else if(world.timeofday > scheduledEvent) spawn_dynamic_event() From 22ea35cb8f6b8284b8bcdfd9375b64b8eb6d8c80 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 14:18:11 +0200 Subject: [PATCH 09/19] Added command reports to RP rev. --- code/game/gamemodes/revolution/rp_revolution.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index c22181a7e5..9b14622537 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -10,6 +10,7 @@ newscaster_announcements = /datum/news_announcement/revolution_inciting_event + var/last_command_report = 0 var/list/heads = list() var/tried_to_add_revheads = 0 @@ -185,8 +186,7 @@ active_revs++ if(active_revs == 0) - log_admin("There are zero active head revolutionists, trying to add some..") - message_admins("There are zero active head revolutionists, trying to add some..") + log_debug("There are zero active heads of revolution, trying to add some..") var/added_heads = 0 for(var/mob/living/carbon/human/H in world) if(H.client && H.mind && H.client.inactivity <= 10*60*20 && H.mind in revolutionaries) head_revolutionaries += H.mind @@ -212,6 +212,16 @@ message_admins("Unable to add new heads of revolution.") tried_to_add_revheads = world.time + 6000 // wait 10 minutes + if(last_command_report == 0 && world.time >= 60 * 10) + command_alert("We are regrettably announcing that your performance has been disappointing, and we are thus forced to cut down on financial support to your station. To achieve this, the pay of all personnal, except the Heads of Staff, has been halved.") + last_command_report = 1 + else if(last_command_report == 1 && world.time >= 60 * 30) + command_alert("Statistics hint that a high amount of leisure time, and associated activities, are responsible for the poor performance of many of our stations. You are to bolt and close down any leisure facilities, such as the holodeck, the theatre and the bar. Food can be distributed through vendors and the kitchen.") + last_command_report = 2 + else if(last_command_report == 2 && world.time >= 60 * 60) + command_alert("It is reported that merely closing down leisure facilities has not been successful. You and your Heads of Staff are to ensure that all crew are working hard, and not wasting time or energy. Any crew caught off duty without leave from their Head of Staff are to be warned, and on repeated offence, to be brigged until the next transfer shuttle arrives, which will take them to facilities where they can be of more use.") + last_command_report = 3 + return ..() From 38cdb4d4f53ce3c512dc8ccf6817d4724e415677 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 18:17:28 +0200 Subject: [PATCH 10/19] Most mobs can emote now. Also added CSS to say, so that you can tell apart "say" and "me say" --- baystation12.dme | 1 + code/modules/mob/emote.dm | 8 +--- code/modules/mob/living/carbon/human/emote.dm | 42 +++++-------------- .../mob/living/carbon/metroid/emote.dm | 6 ++- .../modules/mob/living/carbon/monkey/emote.dm | 8 +++- .../modules/mob/living/silicon/robot/emote.dm | 20 +++------ .../mob/living/simple_animal/simple_animal.dm | 10 +---- code/modules/mob/say.dm | 23 +++++----- code/stylesheet.dm | 1 + 9 files changed, 46 insertions(+), 73 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 7b8c7d1e61..cb8bdbd39b 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1061,6 +1061,7 @@ #include "code\modules\mining\ores_coins.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mob\death.dm" +#include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" #include "code\modules\mob\login.dm" #include "code\modules\mob\logout.dm" diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 3c070bdbd2..9225eb0f8b 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -32,19 +32,13 @@ mob/proc/custom_emote(var/m_type=1,var/message = null) continue if(findtext(message," snores.")) //Because we have so many sleeping people. break - if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) + if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) if (m_type & 1) for (var/mob/O in viewers(src, null)) - if(istype(O,/mob/living/carbon/human)) - for(var/mob/living/parasite/P in O:parasites) - P.show_message(message, m_type) O.show_message(message, m_type) else if (m_type & 2) for (var/mob/O in hearers(src.loc, null)) - if(istype(O,/mob/living/carbon/human)) - for(var/mob/living/parasite/P in O:parasites) - P.show_message(message, m_type) O.show_message(message, m_type) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 802841e17a..4029fc4644 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -53,27 +53,17 @@ var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN) if (!input) return - if(copytext(input,1,5) == "says") - src << "\red Invalid emote." - return - else if(copytext(input,1,9) == "exclaims") - src << "\red Invalid emote." - return - else if(copytext(input,1,5) == "asks") - src << "\red Invalid emote." - return - else - var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") - if (input2 == "Visible") - m_type = 1 - else if (input2 == "Hearable") - if (src.miming) - return - m_type = 2 - else - alert("Unable to use this emote, must be either hearable or visible.") + var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") + if (input2 == "Visible") + m_type = 1 + else if (input2 == "Hearable") + if (src.miming) return - message = "[src] [input]" + m_type = 2 + else + alert("Unable to use this emote, must be either hearable or visible.") + return + message = "[src] [input]" if ("me") if(silent) @@ -88,17 +78,7 @@ return if(!(message)) return - if(copytext(message,1,5) == "says") - src << "\red Invalid emote." - return - else if(copytext(message,1,9) == "exclaims") - src << "\red Invalid emote." - return - else if(copytext(message,1,5) == "asks") - src << "\red Invalid emote." - return - else - message = "[src] [message]" + message = "[src] [message]" if ("salute") if (!src.buckled) diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm index 2ee388f7d0..0e6688e69e 100644 --- a/code/modules/mob/living/carbon/metroid/emote.dm +++ b/code/modules/mob/living/carbon/metroid/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/slime/emote(var/act) +/mob/living/carbon/slime/emote(var/act, var/type, var/desc) if (findtext(act, "-", 1, null)) @@ -13,6 +13,10 @@ var/message switch(act) + if ("me") + return custom_emote(m_type, desc) + if ("custom") + return custom_emote(m_type, desc) if("moan") message = "The [src.name] moans." m_type = 2 diff --git a/code/modules/mob/living/carbon/monkey/emote.dm b/code/modules/mob/living/carbon/monkey/emote.dm index eccb365a6f..8e6c281c78 100644 --- a/code/modules/mob/living/carbon/monkey/emote.dm +++ b/code/modules/mob/living/carbon/monkey/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/monkey/emote(var/act) +/mob/living/carbon/monkey/emote(var/act, var/type, var/desc) var/param = null if (findtext(act, "-", 1, null)) @@ -14,6 +14,12 @@ var/message switch(act) + if ("me") + return custom_emote(m_type, desc) + + if ("custom") + return custom_emote(m_type, desc) + if("sign") if (!src.restrained()) message = text("The monkey signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null)) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index dcf08ba0d8..86d4e5d2f4 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -9,6 +9,12 @@ act = copytext(act,1,length(act)) switch(act) + if ("me") + return custom_emote(m_type, message) + + if ("custom") + return custom_emote(m_type, message) + if ("salute") if (!src.buckled) var/M = null @@ -56,20 +62,6 @@ message = "[src] flaps his wings ANGRILY!" m_type = 2 - if ("custom") - var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN) - if (!input) - return - var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") - if (input2 == "Visible") - m_type = 1 - else if (input2 == "Hearable") - m_type = 2 - else - alert("Unable to use this emote, must be either hearable or visible.") - return - message = "[src] [input]" - if ("me") if (src.client) if(client.prefs.muted & MUTE_IC) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index bc25116ae5..f7154694f7 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -226,14 +226,8 @@ /mob/living/simple_animal/emote(var/act, var/type, var/desc) if(act) - if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P - if(act == "me") //Allow me-emotes. - act = desc - if( findtext(act,".",lentext(act)) == 0 && findtext(act,"!",lentext(act)) == 0 && findtext(act,"?",lentext(act)) == 0 ) - act = addtext(act,".") //Makes sure all emotes end with a period. - for (var/mob/O in viewers(src, null)) - O.show_message("[src] [act]") - + if(act == "scream") act = "whimper" //ugly hack to stop animals screaming when crushed :P + ..(act, type, desc) /mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob) if(M.melee_damage_upper == 0) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 5876a874e9..8a28152a23 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -75,31 +75,32 @@ //tcomms code is still runtiming somewhere here var/ending = copytext(text, length(text)) if (is_speaking_soghun) - return "hisses, \"[text]\""; + return "hisses, \"[text]\""; if (is_speaking_skrell) - return "warbles, \"[text]\""; + return "warbles, \"[text]\""; if (is_speaking_tajaran) - return "mrowls, \"[text]\""; + return "mrowls, \"[text]\""; //Needs Virus2 // if (src.disease_symptoms & DISEASE_HOARSE) // return "rasps, \"[text]\""; if (src.stuttering) - return "stammers, \"[text]\""; + return "stammers, \"[text]\""; if (src.slurring) - return "slurrs, \"[text]\""; + return "slurrs, \"[text]\""; if(isliving(src)) var/mob/living/L = src if (L.getBrainLoss() >= 60) - return "gibbers, \"[text]\""; + return "gibbers, \"[text]\""; if (ending == "?") - return "asks, \"[text]\""; + return "asks, \"[text]\""; if (ending == "!") - return "exclaims, \"[text]\""; + return "exclaims, \"[text]\""; - return "says, \"[text]\""; + return "says, \"[text]\""; -/mob/proc/emote(var/act) - return +/mob/proc/emote(var/act, var/type, var/message) + if(act == "me") + return custom_emote(type, message) /mob/proc/get_ear() // returns an atom representing a location on the map from which this diff --git a/code/stylesheet.dm b/code/stylesheet.dm index b838c9c77d..2481e247af 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -55,6 +55,7 @@ h1.alert, h2.alert {color: #000000;} .tajaran {color: #803B56;} .skrell {color: #00CED1;} .soghun {color: #228B22;} +.say_quote {font-family: Georgia, Verdana, sans-serif;} .interface {color: #330033;} "} From d7cc42e588a75a3d72570956240e12570ffadb8d Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 18 May 2013 21:55:02 +0200 Subject: [PATCH 11/19] Added wallrot event. Also some updates to changelog. --- baystation12.dme | 1 + code/__HELPERS/unsorted.dm | 1 + code/game/turfs/simulated/walls.dm | 63 ++++++++++++++++--- code/game/turfs/simulated/walls_reinforced.dm | 20 +++++- code/modules/events/event_dynamic.dm | 5 ++ code/modules/events/wallrot.dm | 37 +++++++++++ code/modules/reagents/Chemistry-Reagents.dm | 11 ++++ .../reagents/reagent_containers/spray.dm | 8 +++ html/changelog.html | 11 +++- 9 files changed, 148 insertions(+), 9 deletions(-) create mode 100644 code/modules/events/wallrot.dm diff --git a/baystation12.dme b/baystation12.dme index cb8bdbd39b..087bc817fa 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1040,6 +1040,7 @@ #include "code\modules\events\spontaneous_appendicitis.dm" #include "code\modules\events\viral_infection.dm" #include "code\modules\events\viral_outbreak.dm" +#include "code\modules\events\wallrot.dm" #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 659948266e..9b2c323e3a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1327,6 +1327,7 @@ proc/is_hot(obj/item/W as obj) //Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. /proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + if(W.sharp) return 1 return ( \ istype(W, /obj/item/weapon/screwdriver) || \ istype(W, /obj/item/weapon/pen) || \ diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 5d055f1a8c..f06eb81ba3 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -3,6 +3,7 @@ desc = "A huge chunk of metal used to seperate rooms." icon = 'icons/turf/walls.dmi' var/mineral = "metal" + var/rotting = 0 opacity = 1 density = 1 blocks_air = 1 @@ -59,9 +60,11 @@ P.roll_and_drop(src) else O.loc = src + ChangeTurf(/turf/simulated/floor/plating) /turf/simulated/wall/ex_act(severity) + if(rotting) severity = 1.0 switch(severity) if(1.0) //SN src = null @@ -84,7 +87,7 @@ return /turf/simulated/wall/blob_act() - if(prob(50)) + if(prob(50) || rotting) dismantle_wall() /turf/simulated/wall/attack_paw(mob/user as mob) @@ -103,11 +106,11 @@ /turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob) if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall)) + if (istype(src, /turf/simulated/wall/r_wall) && !rotting) M << text("\blue This wall is far too strong for you to destroy.") return else - if (prob(40)) + if (prob(40) || rotting) M << text("\blue You smash through the wall.") dismantle_wall(1) return @@ -120,7 +123,7 @@ /turf/simulated/wall/attack_hand(mob/user as mob) if (HULK in user.mutations) - if (prob(40)) + if (prob(40) || rotting) usr << text("\blue You smash through the wall.") usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) @@ -129,6 +132,11 @@ usr << text("\blue You punch the wall.") return + if(rotting) + user << "\blue The wall crumbles under your touch." + dismantle_wall() + return + user << "\blue You push the wall but nothing happens!" playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) src.add_fingerprint(user) @@ -143,6 +151,21 @@ //get the user's location if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such + if(rotting) + if(istype(W, /obj/item/weapon/weldingtool) ) + var/obj/item/weapon/weldingtool/WT = W + if( WT.remove_fuel(0,user) ) + user << "You burn away the fungi with \the [WT]." + playsound(src.loc, 'sound/items/Welder.ogg', 10, 1) + for(var/obj/effect/E in src) if(E.name == "Wallrot") + del E + rotting = 0 + return + else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) + user << "\The [src] crumbles away under the force of your [W.name]." + src.dismantle_wall(1) + return + //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects if( thermite ) if( istype(W, /obj/item/weapon/weldingtool) ) @@ -284,6 +307,24 @@ return attack_hand(user) return +// Wall-rot effect, a nasty fungus that destroys walls. +/turf/simulated/wall/proc/rot() + if(!rotting) + rotting = 1 + + var/number_rots = rand(2,3) + for(var/i=0, iYou burn away the fungi with \the [WT]." + playsound(src.loc, 'sound/items/Welder.ogg', 10, 1) + for(var/obj/effect/E in src) if(E.name == "Wallrot") + del E + rotting = 0 + return + else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) + user << "\The [src] crumbles away under the force of your [W.name]." + src.dismantle_wall() + return //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects if( thermite ) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 6af66ced1b..fa0a6c6efc 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -61,6 +61,7 @@ possibleEvents[/datum/event/ionstorm] = 25 + active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5 possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"] possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/wallrot] = 50 * active_with_role["Engineer"] + 100 * active_with_role["Botanist"] if(!spacevines_spawned) possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"] @@ -180,6 +181,7 @@ active_with_role["AI"] = 0 active_with_role["Cyborg"] = 0 active_with_role["Janitor"] = 0 + active_with_role["Botanist"] = 0 for(var/mob/M in player_list) if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive @@ -212,4 +214,7 @@ if(M.mind.assigned_role == "Janitor") active_with_role["Janitor"]++ + if(M.mind.assigned_role == "Botanist") + active_with_role["Botanist"]++ + return active_with_role diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm new file mode 100644 index 0000000000..02e33c52d7 --- /dev/null +++ b/code/modules/events/wallrot.dm @@ -0,0 +1,37 @@ +/turf/simulated/wall + + +datum/event/wallrot + var/severity = 1 + +datum/event/wallrot/setup() + announceWhen = rand(0, 3000) + endWhen = announceWhen + 1 + severity = rand(5, 10) + +datum/event/wallrot/announce() + command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") + +datum/event/wallrot/start() + spawn() + var/turf/center = null + + // 100 attempts + for(var/i=0, i<100, i++) + var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1) + if(istype(candidate, /turf/simulated/wall)) + center = candidate + + if(center) + // Make sure at least one piece of wall rots! + center:rot() + + // Have a chance to rot lots of other walls. + var/rotcount = 0 + for(var/turf/simulated/wall/W in range(5, center)) if(prob(50)) + W:rot() + rotcount++ + + // Only rot up to severity walls + if(rotcount >= severity) + break \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 0036ca2333..e839cf34a8 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1214,6 +1214,17 @@ datum ..() return + // Clear off wallrot fungi + reaction_turf(var/turf/T, var/volume) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + if(W.rotting) + W.rotting = 0 + for(var/obj/effect/E in W) if(E.name == "Wallrot") del E + + for(var/mob/O in viewers(W, null)) + O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1) + reaction_obj(var/obj/O, var/volume) if(istype(O,/obj/effect/alien/weeds/)) var/obj/effect/alien/weeds/alien_weeds = O diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index da78e252a3..5073564553 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -49,12 +49,20 @@ D.icon += mix_color_from_reagents(D.reagents.reagent_list) + var/A_turf = get_turf(A) + spawn(0) for(var/i=0, i<3, i++) step_towards(D,A) D.reagents.reaction(get_turf(D)) for(var/atom/T in get_turf(D)) D.reagents.reaction(T) + + // When spraying against the wall, also react with the wall, but + // not its contents. + if(get_dist(D, A_turf) == 1 && A_turf.density) + D.reagents.reaction(A_turf) + sleep(2) sleep(3) del(D) diff --git a/html/changelog.html b/html/changelog.html index b18d546282..5b6aa9e5a1 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -58,7 +58,16 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. -->
-

April 24, 2013

+
+

May 18th, 2013

+

CIB updated:

+
    +
  • A new event type: Wallrot. Use welder or plantbgone on infected walls.
  • +
  • Newscasters now can deliver preset news stories over the course of a round. See http://baystation12.net/forums/viewtopic.php?f=14&t=7619 to add your own!
  • +
+
+
+

April 24, 2013

Jediluke69 updated: