diff --git a/.travis.yml b/.travis.yml index f26102a3b3..da060b19fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,39 @@ #pretending we're C because otherwise ruby will initialize, even with "language: dm". language: c +sudo: false env: - BYOND_MAJOR="508" - BYOND_MINOR="1287" + BYOND_MAJOR="509" + BYOND_MINOR="1318" + MACRO_COUNT=1004 -before_install: - - sudo apt-get update -qq - - sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq - - sudo apt-get install python -qq - - sudo apt-get install python-pip -qq - - sudo pip install PyYaml -q - - sudo pip install beautifulsoup4 -q +cache: + directories: + - $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} + +addons: + apt: + packages: + - libc6-i386 + - libgcc1:i386 + - libstdc++6:i386 + +before_script: + - chmod +x ./install-byond.sh + - ./install-byond.sh install: - - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip - - unzip byond.zip - - cd byond - - sudo make install - - cd .. + - pip install --user PyYaml -q + - pip install --user beautifulsoup4 -q script: - shopt -s globstar - (! grep 'step_[xy]' maps/**/*.dmm) - (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano) - - (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; [ $num -le 1355 ]) + - (! grep -En "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm) + - awk -f tools/indentation.awk **/*.dm + - md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml" + - (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -le ${MACRO_COUNT} ]) + - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup + - python tools/TagMatcher/tag-matcher.py ../.. - DreamMaker polaris.dme diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 437661b7fc..54a922c30d 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -161,7 +161,7 @@ var/syndicate_code_response//Code response for traitors. Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay. Can probably be done through "{ }" but I don't really see the practical benefit. One example of an earlier system is commented below. - /N + -N */ /proc/generate_code_phrase()//Proc is used for phrase and response in master_controller.dm diff --git a/code/controllers/hooks.dm b/code/controllers/hooks.dm index 48f1199ef7..e7888304e5 100644 --- a/code/controllers/hooks.dm +++ b/code/controllers/hooks.dm @@ -9,11 +9,11 @@ * * To add some code to be called by the hook, define a proc under the type, as so: * @code - /hook/foo/proc/bar() - if(1) - return 1 //Sucessful - else - return 0 //Error, or runtime. +/hook/foo/proc/bar() + if(1) + return 1 //Sucessful + else + return 0 //Error, or runtime. * @endcode * All hooks must return nonzero on success, as runtimes will force return null. */ diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index c4f43411fb..7ea4dc52eb 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -609,7 +609,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /obj/item/solar_assembly, /obj/item/solar_assembly, /obj/item/solar_assembly, - /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller + /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller, /obj/item/weapon/circuitboard/solar_control, /obj/item/weapon/tracker_electronics, /obj/item/weapon/paper/solar) @@ -671,8 +671,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/mecha_ripley name = "Circuit Crate (\"Ripley\" APLU)" contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair, - /obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer - /obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer + /obj/item/weapon/circuitboard/mecha/ripley/main, + /obj/item/weapon/circuitboard/mecha/ripley/peripherals) cost = 30 containertype = /obj/structure/closet/crate/secure containername = "APLU \"Ripley\" Circuit Crate" @@ -681,8 +681,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/mecha_odysseus name = "Circuit Crate (\"Odysseus\")" - contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer - /obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer + contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, + /obj/item/weapon/circuitboard/mecha/odysseus/main) cost = 25 containertype = /obj/structure/closet/crate/secure containername = "\"Odysseus\" Circuit Crate" diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 4b9d257a46..18704058d1 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -2757,12 +2757,12 @@ var/list/the_station_areas = list ( /area/rnd, /area/storage, /area/construction, - /area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0 + /area/ai_monitored/storage/eva, /area/ai_monitored/storage/secure, - /area/ai_monitored/storage/emergency, - /area/ai_upload, //do not try to simplify to "/area" --rastaf0 + /area/ai_monitored/storage/emergency, + /area/ai_upload, /area/ai_upload_foyer, - /area/ai, + /area/ai ) diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm index 92b86ce2ee..7ab1cdda3b 100644 --- a/code/game/gamemodes/changeling/powers/armblade.dm +++ b/code/game/gamemodes/changeling/powers/armblade.dm @@ -56,7 +56,7 @@ /obj/item/weapon/melee/arm_blade/dropped(mob/user) visible_message("With a sickening crunch, [creator] reforms their arm blade into an arm!", "We assimilate the weapon back into our body.", - "You hear organic matter ripping and tearing!") playsound(src, 'sound/effects/blobattack.ogg', 30, 1) spawn(1) if(src) diff --git a/code/game/gamemodes/changeling/powers/rapid_regen.dm b/code/game/gamemodes/changeling/powers/rapid_regen.dm index a320c33b96..6f2d43e5da 100644 --- a/code/game/gamemodes/changeling/powers/rapid_regen.dm +++ b/code/game/gamemodes/changeling/powers/rapid_regen.dm @@ -48,7 +48,7 @@ new /obj/effect/gibspawner/human(T) visible_message("With a sickening squish, [src] reforms their whole body, casting their old parts on the floor!", "We reform our body. We are whole once more.", - "You hear organic matter ripping and tearing!") feedback_add_details("changeling_powers","RR") return 1 \ No newline at end of file diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 87cfeea09b..189fe5b40a 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -393,14 +393,14 @@ dat += "
You ran out of food and starved." if(emagged) user.nutrition = 0 //yeah you pretty hongry - user << "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor." + user << "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor." if(fuel <= 0) dat += "
You ran out of fuel, and drift, slowly, into a star." if(emagged) var/mob/living/M = user M.adjust_fire_stacks(5) M.IgniteMob() //flew into a star, so you're on fire - user << "You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames." + user << "You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames." dat += "

OK...

" if(emagged) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 0068473fb7..63a88dadbb 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -407,12 +407,12 @@ * Bosun's whistle */ - /obj/item/toy/bosunwhistle - name = "bosun's whistle" - desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow." - icon = 'icons/obj/toy.dmi' - icon_state = "bosunwhistle" - var/cooldown = 0 +/obj/item/toy/bosunwhistle + name = "bosun's whistle" + desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow." + icon = 'icons/obj/toy.dmi' + icon_state = "bosunwhistle" + var/cooldown = 0 w_class = 1 slot_flags = SLOT_EARS diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 228030f157..a907e73a24 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -1,78 +1,78 @@ //admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless var/list/admin_verbs_default = list( - /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ + /datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags, /client/proc/player_panel, - /client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/ - /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ - /client/proc/hide_verbs, /*hides all our adminverbs*/ - /client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/ - /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ -// /client/proc/check_antagonists, /*shows all antags*/ + /client/proc/toggleadminhelpsound, //toggles whether we hear a sound when adminhelps/PMs are used, + /client/proc/deadmin_self, //destroys our own admin datum so we can play as a regular player, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, +// /client/proc/check_antagonists, //shows all antags, // /client/proc/cmd_mod_say, /client/proc/cmd_mentor_check_new_players -// /client/proc/deadchat /*toggles deadchat on/off*/ +// /client/proc/deadchat //toggles deadchat on/off, ) var/list/admin_verbs_admin = list( - /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, /datum/admins/proc/set_tcrystals, /datum/admins/proc/add_tcrystals, - /client/proc/invisimin, /*allows our mob to go invisible/visible*/ -// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage - /datum/admins/proc/show_game_mode, /*Configuration window for the current game mode.*/ - /datum/admins/proc/force_mode_latespawn, /*Force the mode to try a latespawn proc*/ - /datum/admins/proc/force_antag_latespawn, /*Force a specific template to try a latespawn proc*/ - /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ - /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ - /datum/admins/proc/announce, /*priority announce something to all clients.*/ - /client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/ - /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/ - /client/proc/toggle_view_range, /*changes how far we can see*/ - /datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/ - /datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/ - /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ - /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ - /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ - /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ - /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ - /datum/admins/proc/access_news_network, /*allows access of newscasters*/ - /client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/ - /client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/ - /client/proc/jumptocoord, /*we ghost and jump to a coordinate*/ - /client/proc/Getmob, /*teleports a mob to our location*/ - /client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/ -// /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage + /client/proc/invisimin, //allows our mob to go invisible/visible, +// /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind -Removed due to rare practical use. Moved to debug verbs ~Errorage, + /datum/admins/proc/show_game_mode, //Configuration window for the current game mode., + /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc, + /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc, + /datum/admins/proc/toggleenter, //toggles whether people can join the current game, + /datum/admins/proc/toggleguests, //toggles whether guests can join the current game, + /datum/admins/proc/announce, //priority announce something to all clients., + /client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc, + /client/proc/admin_ghost, //allows us to ghost/reenter body at will, + /client/proc/toggle_view_range, //changes how far we can see, + /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_atk_log, //shows the server combat-log, doesn't do anything presently, + /client/proc/cmd_admin_pm_context, //right-click adminPM interface, + /client/proc/cmd_admin_pm_panel, //admin-pm list, + /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head', + /client/proc/cmd_admin_delete, //delete an instance/object/mob/etc, + /client/proc/cmd_admin_check_contents, //displays the contents of an instance, + /datum/admins/proc/access_news_network, //allows access of newscasters, + /client/proc/giveruntimelog, //allows us to give access to runtime logs to somebody, + /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /client/proc/jumptocoord, //we ghost and jump to a coordinate, + /client/proc/Getmob, //teleports a mob to our location, + /client/proc/Getkey, //teleports a mob with a certain ckey to our location, +// /client/proc/sendmob, //sends a mob somewhere, -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage, /client/proc/Jump, - /client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/ - /client/proc/jumptomob, /*allows us to jump to a specific mob*/ - /client/proc/jumptoturf, /*allows us to jump to a specific turf*/ - /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/ - /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/ - /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ - /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ + /client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey, + /client/proc/jumptomob, //allows us to jump to a specific mob, + /client/proc/jumptoturf, //allows us to jump to a specific turf, + /client/proc/admin_call_shuttle, //allows us to call the emergency shuttle, + /client/proc/admin_cancel_shuttle, //allows us to cancel the emergency shuttle, sending it back to centcomm, + /client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text, + /client/proc/cmd_admin_world_narrate, //sends text to all players with no padding, /client/proc/cmd_admin_create_centcom_report, - /client/proc/check_words, /*displays cult-words*/ - /client/proc/check_ai_laws, /*shows AI and borg laws*/ - /client/proc/rename_silicon, /*properly renames silicons*/ - /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */ + /client/proc/check_words, //displays cult-words, + /client/proc/check_ai_laws, //shows AI and borg laws, + /client/proc/rename_silicon, //properly renames silicons, + /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. , /client/proc/check_antagonists, - /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/ - /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ - /client/proc/toggleprayers, /*toggles prayers on/off*/ -// /client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/ - /client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/ - /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/ + /client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others, + /client/proc/dsay, //talk in deadchat using our ckey/fakekey, + /client/proc/toggleprayers, //toggles prayers on/off, +// /client/proc/toggle_hear_deadcast, //toggles whether we hear deadchat, + /client/proc/toggle_hear_radio, //toggles whether we hear the radio, + /client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log, /client/proc/secrets, - /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/ - /datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/ - /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/ - /datum/admins/proc/togglehubvisibility, /*toggles visibility on the BYOND Hub.*/ - /datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/ - /client/proc/game_panel, /*game panel, allows to change game-mode etc*/ - /client/proc/cmd_admin_say, /*admin-only ooc chat*/ + /datum/admins/proc/toggleooc, //toggles ooc on/off for everyone, + /datum/admins/proc/togglelooc, //toggles looc on/off for everyone, + /datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead, + /datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub., + /datum/admins/proc/toggledsay, //toggles dsay on/off for everyone, + /client/proc/game_panel, //game panel, allows to change game-mode etc, + /client/proc/cmd_admin_say, //admin-only ooc chat, /datum/admins/proc/PlayerNotes, /client/proc/cmd_mod_say, /datum/admins/proc/show_player_info, - /client/proc/free_slot, /*frees slot for chosen job*/ + /client/proc/free_slot, //frees slot for chosen job, /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/toggleattacklogs, @@ -83,16 +83,16 @@ var/list/admin_verbs_admin = list( /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, - /client/proc/response_team, // Response Teams admin verb + /client/proc/response_team, // Response Teams admin verb, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, - /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ + /client/proc/allow_character_respawn, // Allows a ghost to respawn , /client/proc/event_manager_panel, /client/proc/empty_ai_core_toggle_latejoin, /client/proc/empty_ai_core_toggle_latejoin, /client/proc/aooc, - /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ - /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */ + /client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs , + /client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance , /client/proc/change_security_level, /client/proc/view_chemical_reaction_logs, /client/proc/makePAI, @@ -131,7 +131,7 @@ var/list/admin_verbs_spawn = list( /datum/admins/proc/spawn_custom_item, /datum/admins/proc/check_custom_items, /datum/admins/proc/spawn_plant, - /datum/admins/proc/spawn_atom, /*allows us to spawn instances*/ + /datum/admins/proc/spawn_atom, //allows us to spawn instances, /client/proc/respawn_character, /client/proc/virus2_editor, /client/proc/spawn_chemdisp_cartridge @@ -149,7 +149,7 @@ var/list/admin_verbs_server = list( /datum/admins/proc/immreboot, /client/proc/everyone_random, /datum/admins/proc/toggleAI, - /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ + /client/proc/cmd_admin_delete, //delete an instance/object/mob/etc, /client/proc/cmd_debug_del_all, /datum/admins/proc/adrev, /datum/admins/proc/adspawn, @@ -161,7 +161,7 @@ var/list/admin_verbs_server = list( /client/proc/nanomapgen_DumpImage ) var/list/admin_verbs_debug = list( - /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/ + /client/proc/getruntimelog, //allows us to access runtime logs to somebody, /client/proc/cmd_admin_list_open_jobs, /client/proc/Debug2, /client/proc/kill_air, @@ -194,7 +194,7 @@ var/list/admin_verbs_debug = list( /client/proc/jumptomob, /client/proc/jumptocoord, /client/proc/dsay, - /client/proc/admin_ghost /*allows us to ghost/reenter body at will*/ + /client/proc/admin_ghost //allows us to ghost/reenter body at will, ) var/list/admin_verbs_paranoid_debug = list( @@ -288,12 +288,12 @@ var/list/admin_verbs_hideable = list( /datum/admins/proc/set_tcrystals ) 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/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/admin_ghost, //allows us to ghost/reenter body at will, /client/proc/cmd_mod_say, /client/proc/toggleattacklogs, /datum/admins/proc/show_player_info, @@ -304,10 +304,10 @@ var/list/admin_verbs_mod = list( /client/proc/check_antagonists, /client/proc/aooc, /client/proc/jobbans, - /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ + /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head', /datum/admins/proc/paralyze_mob, /client/proc/cmd_admin_direct_narrate, - /client/proc/allow_character_respawn /* Allows a ghost to respawn */ + /client/proc/allow_character_respawn // Allows a ghost to respawn , ) var/list/admin_verbs_mentor = list( diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index 50ddc81f41..51f1fbceb3 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -1,7 +1,7 @@ var/list/forbidden_varedit_object_types = list( - /datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea. - /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering - /datum/feedback_variable //Prevents people messing with feedback gathering + /datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea, + /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering, + /datum/feedback_variable //Prevents people messing with feedback gathering, ) var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0c6a0f1607..5d8db9c072 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -234,9 +234,9 @@ Ccomp's first proc. var/list/mobs = list() var/list/ghosts = list() - var/list/sortmob = sortAtom(mob_list) // get the mob list. - /var/any=0 - for(var/mob/observer/dead/M in sortmob) + var/list/sortmob = sortAtom(mob_list) // get the mob list. + var/any=0 + for(var/mob/observer/dead/M in sortmob) mobs.Add(M) //filter it where it's only ghosts any = 1 //if no ghosts show up, any will just be 0 if(!any) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index b296ac3e0b..0ca50b2611 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -50,7 +50,7 @@ /var/list/economic_species_modifier = list( /datum/species/human = 10, /datum/species/skrell = 12, - /datum/species/teshari = 9, // Skrell sponsored! + /datum/species/teshari = 9, // Skrell sponsored, /datum/species/tajaran = 7, /datum/species/unathi = 7 ) diff --git a/code/modules/maps/swapmaps.dm b/code/modules/maps/swapmaps.dm index 127af2e7a1..6c4909f229 100644 --- a/code/modules/maps/swapmaps.dm +++ b/code/modules/maps/swapmaps.dm @@ -419,8 +419,8 @@ swapmap Build procs: Take 2 turfs as corners, plus an item type. An item may be like: - /turf/wall - /obj/fence{icon_state="iron"} + turf/wall + obj/fence{icon_state="iron"} */ proc/BuildFilledRectangle(turf/T1,turf/T2,item) if(!Contains(T1) || !Contains(T2)) return diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 25edc57728..ebe841a221 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -5,11 +5,11 @@ self-explanatory but the various object types may have their own documentation. ~Z PATHS THAT USE DATUMS - /turf/simulated/wall - /obj/item/weapon/material - /obj/structure/barricade - /obj/item/stack/material - /obj/structure/table + turf/simulated/wall + obj/item/weapon/material + obj/structure/barricade + obj/item/stack/material + obj/structure/table VALID ICONS WALLS diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 0abdc6ef9a..235abffef6 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -48,7 +48,7 @@ else if(gender == FEMALE) use_gender = "a gynoid" - msg += ", [use_gender]!" + msg += ", [use_gender]!" else if(species.name != "Human") msg += ", \a [species.name]!" diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 797b9b1fe6..e8a8304510 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -48,7 +48,7 @@ // Combat vars. var/total_health = 100 // Point at which the mob will enter crit. - var/list/unarmed_types = list( // Possible unarmed attacks that the mob will use in combat. + var/list/unarmed_types = list( // Possible unarmed attacks that the mob will use in combat, /datum/unarmed_attack, /datum/unarmed_attack/bite ) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 761ef5110d..ee45284925 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -20,7 +20,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/proc/toggle_hidden_verbs, ) -var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.com/1172/ +var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.com/1172/, /mob/living/silicon/ai/proc/ai_announcement, /mob/living/silicon/ai/proc/ai_call_shuttle, /mob/living/silicon/ai/proc/ai_camera_track, diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 88f989f15e..cf61a6ddd6 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -63,9 +63,9 @@ /obj/item/device/mmi, /obj/item/robot_parts, /obj/item/borg/upgrade, - /obj/item/device/flash, //to build borgs - /obj/item/organ/internal/brain, //to insert into MMIs. - /obj/item/stack/cable_coil, //again, for borg building + /obj/item/device/flash, //to build borgs, + /obj/item/organ/internal/brain, //to insert into MMIs, + /obj/item/stack/cable_coil, //again, for borg building, /obj/item/weapon/circuitboard, /obj/item/slime_extract, /obj/item/weapon/reagent_containers/glass, diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 06daf72260..2de63692a9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -110,7 +110,7 @@ turns_since_move++ if(turns_since_move >= turns_per_move) if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled - /var/moving_to = 0 // otherwise it always picks 4, fuck if I know. Did I mention fuck BYOND + var/moving_to = 0 // otherwise it always picks 4, fuck if I know. Did I mention fuck BYOND moving_to = pick(cardinal) dir = moving_to //How about we turn them the direction they are moving, yay. Move(get_step(src,moving_to)) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 7d612158b1..7ee79cb923 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -111,8 +111,8 @@ /* * Parapens */ - /obj/item/weapon/pen/reagent/paralysis - origin_tech = "materials=2;syndicate=5" +/obj/item/weapon/pen/reagent/paralysis + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) /obj/item/weapon/pen/reagent/paralysis/New() ..() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index bfcf1aefa3..f467cf4dd5 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -12,7 +12,7 @@ 9 1 5 \ | / - 8 - 0 - 4 + 8 - 0 - 4, / | \ 10 2 6 diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/Chemistry-Readme.dm index 9a49d409e0..2b7e3a832a 100644 --- a/code/modules/reagents/Chemistry-Readme.dm +++ b/code/modules/reagents/Chemistry-Readme.dm @@ -127,7 +127,7 @@ About the Holder: trans_to_obj(var/turf/target, var/amount = 1, var/multiplier = 1, var/copy = 0) If target has reagents, transfers [amount] to it. Otherwise, same as trans_to_turf(). - /atom/proc/create_reagents(var/max_vol) + atom/proc/create_reagents(var/max_vol) Creates a new reagent datum. About Reagents: @@ -285,7 +285,7 @@ About the Tools: By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. system you'll need to add something like this in its new proc: - /atom/proc/create_reagents(var/max_volume) + atom/proc/create_reagents(var/max_volume) Other important stuff: diff --git a/code/modules/reagents/dispenser/supply.dm b/code/modules/reagents/dispenser/supply.dm index f4a12d45d3..0487e8f401 100644 --- a/code/modules/reagents/dispenser/supply.dm +++ b/code/modules/reagents/dispenser/supply.dm @@ -145,7 +145,7 @@ group = "Reagents" #define SEC_PACK(_tname, _type, _name, _cname, _cost, _access)\ - /datum/supply_packs/dispenser_cartridges{\ + datum/supply_packs/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ @@ -157,7 +157,7 @@ }\ } #define PACK(_tname, _type, _name, _cname, _cost)\ - /datum/supply_packs/dispenser_cartridges{\ + datum/supply_packs/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm index b0a31faecc..2f6cc45e75 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm @@ -26,7 +26,7 @@ var/list/valid_primary_effect_types = list(\ /datum/artifact_effect/forcefield,\ /datum/artifact_effect/gasoxy,\ /datum/artifact_effect/gasplasma,\ -/* /datum/artifact_effect/gassleeping,\*/ +// /datum/artifact_effect/gassleeping,\ /datum/artifact_effect/heal,\ /datum/artifact_effect/hurt,\ /datum/artifact_effect/emp,\ @@ -45,7 +45,7 @@ var/list/valid_secondary_effect_types = list(\ /datum/artifact_effect/gasnitro,\ /datum/artifact_effect/gasoxy,\ /datum/artifact_effect/gasphoron,\ -/* /datum/artifact_effect/gassleeping,\*/ +// /datum/artifact_effect/gassleeping,\ /datum/artifact_effect/goodfeeling,\ /datum/artifact_effect/heal,\ /datum/artifact_effect/hurt,\ diff --git a/code/modules/research/xenoarchaeology/finds/finds_misc.dm b/code/modules/research/xenoarchaeology/finds/finds_misc.dm index f494505b63..90afe5a737 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_misc.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_misc.dm @@ -13,8 +13,8 @@ //large finds /* - /obj/machinery/syndicate_beacon - /obj/machinery/wish_granter + obj/machinery/syndicate_beacon + obj/machinery/wish_granter if(18) item_type = "jagged green crystal" additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") diff --git a/maps/RandomZLevels/stationCollision.dm b/maps/RandomZLevels/stationCollision.dm index 3bc32eab3b..6d87f40186 100644 --- a/maps/RandomZLevels/stationCollision.dm +++ b/maps/RandomZLevels/stationCollision.dm @@ -17,24 +17,24 @@ /* * Areas - */ - //Gateroom gets its own APC specifically for the gate - /area/awaymission/gateroom +*/ +//Gateroom gets its own APC specifically for the gate +/area/awaymission/gateroom - //Library, medbay, storage room - /area/awaymission/southblock +//Library, medbay, storage room +/area/awaymission/southblock - //Arrivals, security, hydroponics, shuttles (since they dont move, they dont need specific areas) - /area/awaymission/arrivalblock +//Arrivals, security, hydroponics, shuttles (since they dont move, they dont need specific areas) +/area/awaymission/arrivalblock - //Crew quarters, cafeteria, chapel - /area/awaymission/midblock +//Crew quarters, cafeteria, chapel +/area/awaymission/midblock - //engineering, bridge (not really north but it doesnt really need its own APC) - /area/awaymission/northblock +//engineering, bridge (not really north but it doesnt really need its own APC) +/area/awaymission/northblock - //That massive research room - /area/awaymission/research +//That massive research room +/area/awaymission/research //Syndicate shuttle /area/awaymission/syndishuttle diff --git a/tools/TagMatcher/tag-matcher.py b/tools/TagMatcher/tag-matcher.py index 91ad5efb04..78797a4d93 100644 --- a/tools/TagMatcher/tag-matcher.py +++ b/tools/TagMatcher/tag-matcher.py @@ -18,6 +18,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ''' import argparse, re, sys +from collections import defaultdict from os import path, walk opt = argparse.ArgumentParser() @@ -37,66 +38,83 @@ tag_tuples = [ ('', re.compile('', re.IGNORECASE), re.compile(' ('', re.compile('', re.IGNORECASE), re.compile('', re.IGNORECASE))] # The keys of this dictionary will be the file path of each parsed *.dm file -# The values of this dictionary will be in the format provided by populate_match_list(). -matches = { } +# The values of this dictionary is a another dictionary with the key/value pair: tag/list of unmatched lines +mismatches_by_file = { } -# Support def for setting up a dictionary, populating it with all defined tuple names as key with each being assigned the value 0. -# One such dictionary is created for each parsed file. -def populate_match_list(): - match_list = { } +# Loops over all defined tag tuples and returns a dictionary with the key/value pair: tag/mismatch_count (positive means excess of opening tag, negative means excess of closing tags) +def get_tag_matches(line): + mismatch_count_by_tag = { } for tag_tuple in tag_tuples: - match_list[tag_tuple[0]] = 0 - return match_list + mismatch_count = 0 + mismatch_count += len(tag_tuple[1].findall(line)) + mismatch_count -= len(tag_tuple[2].findall(line)) + if mismatch_count != 0: + mismatch_count_by_tag[tag_tuple[0]] = mismatch_count + return mismatch_count_by_tag -# This def shall be provided by a dictionary in the format given by populate_match_list() and a line of text. -# It loops over all defined tag tuples, adding the number of open tags found and subtracting the number of close tag found to the corresponding tuple name in the match list. -# This def is currently run with the same match_list for a given file and for all lines of that file. -def get_tag_matches(match_list, line): - for tag_tuple in tag_tuples: - match_list[tag_tuple[0]] += len(tag_tuple[1].findall(line)) - match_list[tag_tuple[0]] -= len(tag_tuple[2].findall(line)) - return - -# Support def that simply checks if a given dictionary in the format given by populate_match_list() contains any value that is non-zero. -# That is, a tag which had a non-equal amount of open/closing tags. +# Support def that simply checks if a given dictionary in the format tag/list of unmatched lines has mismatch entries. def has_mismatch(match_list): - for tag, match_number in match_list.iteritems(): - if(match_number != 0): + for tag, list_of_mismatched_lines in match_list.iteritems(): + if(len(list_of_mismatched_lines) > 0): return 1 return 0 + +def arrange_mismatches(mismatches_by_tag, mismatch_line, mismatch_counts): + for tag, mismatch_count in mismatch_counts.iteritems(): + stack_of_existing_mismatches = mismatches_by_tag[tag] + for i in range(0, abs(mismatch_count)): + if len(stack_of_existing_mismatches) == 0: + if(mismatch_count > 0): + stack_of_existing_mismatches.append(mismatch_line) + else: + stack_of_existing_mismatches.append(-mismatch_line) + else: + if stack_of_existing_mismatches[0] > 0: + if mismatch_count > 0: + stack_of_existing_mismatches.append(mismatch_line) + else: + stack_of_existing_mismatches.pop() + else: + if mismatch_count < 0: + stack_of_existing_mismatches.append(-mismatch_line) + else: + stack_of_existing_mismatches.pop() + # This section parses all *.dm files in the given directory, recursively. for root, subdirs, files in walk(args.dir): for filename in files: if filename.endswith('.dm'): file_path = path.join(root, filename) - with open(file_path, 'r') as f: - # For each file, generate the match dictionary. - matches[file_path] = populate_match_list() - for x in f: + with open(file_path, 'r') as file: + mismatches_by_file[file_path] = defaultdict(list) + for line_number, line in enumerate(file, 1): # Then for each line in the file, conduct the tuple open/close matching. - get_tag_matches(matches[file_path], x) + mismatches_by_tag = get_tag_matches(line) + arrange_mismatches(mismatches_by_file[file_path], line_number, mismatches_by_tag) # Pretty printing section. # Loops over all matches and checks if there is a mismatch of tags. # If so, then and only then is the corresponding file path printed along with the number of unmatched open/close tags. -total_mismatch = 0 -for file, match_list in matches.iteritems(): - if(has_mismatch(match_list)): +total_mismatches = 0 +for file, mismatches_by_tag in mismatches_by_file.iteritems(): + if has_mismatch(mismatches_by_tag): print(file) - for tag, match_number in match_list.iteritems(): + for tag, mismatch_list in mismatches_by_tag.iteritems(): # A positive number means an excess of opening tag, a negative number means an excess of closing tags. - if(match_number > 0): - total_mismatch += match_number - print('\t{0} - Excess of {1} opening tag(s)'.format(tag, match_number)) - elif (match_number < 0): - total_mismatch -= match_number - print('\t{0} - Excess of {1} closing tag(s)'.format(tag, -match_number)) + total_mismatches += len(mismatch_list) + if len(mismatch_list) > 0: + if mismatch_list[0] > 0: + print('\t{0} - Excess of {1} opening tag(s)'.format(tag, len(mismatch_list))) + elif mismatch_list[0] < 0: + print('\t{0} - Excess of {1} closing tag(s)'.format(tag, len(mismatch_list))) + for mismatch_line in sorted(set(mismatch_list)): + print('\t\tLine {0}'.format(abs(mismatch_line))) # Simply prints the total number of mismatches found and if so returns 1 to, for example, fail Travis builds. -if(total_mismatch == 0): +if(total_mismatches == 0): print('No mismatches found.') else: print('') - print('Total number of mismatches: {0}'.format(total_mismatch)) + print('Total number of mismatches: {0}'.format(total_mismatches)) sys.exit(1) diff --git a/tools/indentation.awk b/tools/indentation.awk new file mode 100644 index 0000000000..e4742bf2f9 --- /dev/null +++ b/tools/indentation.awk @@ -0,0 +1,32 @@ +#! /usr/bin/awk -f + +# Finds incorrect indentation of absolute path definitions in DM code +# For example, the following fails on the indicated line: + +#/datum/path/foo +# x = "foo" +# /datum/path/bar // FAIL +# x = "bar" + +{ + if ( comma != 1 ) { # No comma/'list('/etc at the end of the previous line + if ( $0 ~ /^[\t ]+\/[^/*]/ ) { # Current line's first non-whitespace character is a slash, followed by something that is not another slash or an asterisk + print FILENAME, ":", $0 + fail = 1 + } + } + + if ($0 ~ /,[\t ]*\\?\r?$/ || # comma at EOL + $0 ~ /list[\t ]*\([\t ]*\\?\r?$/ || # start of a list() + $0 ~ /pick[\t ]*\([\t ]*\\?\r?$/ ) { # start of a pick() + comma = 1 + } else { + comma = 0 + } +} + +END { + if ( fail ) { + exit 1 + } +}