Skip to content

Commit

Permalink
Merge pull request #110 from Artemchik542/fix-most-repo-errors
Browse files Browse the repository at this point in the history
Чинит многого ошибок в репозитории (но пока ещё не все)
  • Loading branch information
homexp13 authored Jun 20, 2024
2 parents a73297f + f1e1f8e commit ff62412
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
- name: Ticked File Enforcement
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
bash tools/massmeta_check_grep.sh # MASSMETA EDIT ADDITION - checking modular_meta code
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/tgstation_dme.json
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/unit_tests.json
- name: Check Define Sanity
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/sprite_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
/// Uses the species's mutant color for the hair color
#define USE_MUTANT_COLOR "use_mutant_color"
/// Uses the species's fixed mutant color for the hair color
#define USE_FIXED_MUTANT_COLOR "use_fixed_mutant_color"
#define USE_FIXED_MUTANT_COLOR "use_fixed_mutant_color"
1 change: 1 addition & 0 deletions code/__DEFINES/~meta_defines_include.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "..\..\massmeta\~meta_defines\meta_defines_all.dm"
12 changes: 6 additions & 6 deletions code/__HELPERS/chat_filter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// Given a text, will return what word is on the IC filter, with the reason.
/// Returns null if the message is OK.
/proc/is_ic_filtered(message)
if (config.ic_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.ic_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.ic_filter_regex)
return list(
matched_group,
Expand All @@ -17,7 +17,7 @@
/// Given a text, will return what word is on the soft IC filter, with the reason.
/// Returns null if the message is OK.
/proc/is_soft_ic_filtered(message)
if (config.soft_ic_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.soft_ic_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.soft_ic_filter_regex)
return list(
matched_group,
Expand All @@ -29,7 +29,7 @@
/// Given a text, will return what word is on the OOC filter, with the reason.
/// Returns null if the message is OK.
/proc/is_ooc_filtered(message)
if (config.ooc_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.ooc_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.ooc_filter_regex)
return list(matched_group, config.shared_filter_reasons[matched_group])

Expand All @@ -38,7 +38,7 @@
/// Given a text, will return that word is on the soft OOC filter, with the reason.
/// Returns null if the message is OK.
/proc/is_soft_ooc_filtered(message)
if (config.soft_ooc_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.soft_ooc_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.soft_ooc_filter_regex)
return list(matched_group, config.soft_shared_filter_reasons[matched_group])

Expand All @@ -64,7 +64,7 @@
/// Given a text, will return what word is on the IC filter, ignoring words allowed on the PDA, with the reason.
/// Returns null if the message is OK.
/proc/is_ic_filtered_for_pdas(message)
if (config.ic_outside_pda_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.ic_outside_pda_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.ic_outside_pda_filter_regex)
return list(
matched_group,
Expand All @@ -76,7 +76,7 @@
/// Given a text, will return what word is on the soft IC filter, ignoring words allowed on the PDA, with the reason.
/// Returns null if the message is OK.
/proc/is_soft_ic_filtered_for_pdas(message)
if (config.soft_ic_outside_pda_filter_regex?.Find_char(lowertext(message))) //MASSMETA EDIT
if (config.soft_ic_outside_pda_filter_regex?.Find_char(LOWER_TEXT(message))) //MASSMETA EDIT CHANGE - ORIGINAL: .Find(message)
var/matched_group = GET_MATCHED_GROUP(config.soft_ic_outside_pda_filter_regex)
return list(
matched_group,
Expand Down
2 changes: 1 addition & 1 deletion code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
#endif

#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 1 // 0 to allow using external resources or on-demand behaviour;
#define PRELOAD_RSC 0 // 0 to allow using external resources or on-demand behaviour; MASSMETA EDIT - Original: 1
#endif // 1 to use the default behaviour;
// 2 for preloading absolutely everything;

Expand Down
7 changes: 4 additions & 3 deletions code/modules/projectiles/ammunition/ballistic/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
caliber = CALIBER_STRILKA310
projectile_type = /obj/projectile/bullet/strilka310

// massmeta edit
// MASSMETA EDIT REMOVAL BEGIN - mosin return
/*
/obj/item/ammo_casing/strilka310/Initialize(mapload)
. = ..()
/obj/item/ammo_casing/strilka310/Initialize(mapload)
. = ..()
AddElement(/datum/element/caseless)
*/
// MASSMETA EDIT REMOVAL END

/obj/item/ammo_casing/strilka310/surplus
name = ".310 Strilka surplus bullet casing"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/external/tails.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@
/datum/bodypart_overlay/mutant/tail_spines/can_draw_on_bodypart(mob/living/carbon/human/human)
. = ..()
if(human.wear_suit && (human.wear_suit.flags_inv & HIDEJUMPSUIT))
return FALSE
return FALSE
17 changes: 15 additions & 2 deletions massmeta/includes.dm → massmeta/modular_meta.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
//master files
/*
*
* Это основной файл куда будут складываться все наши модульные добавления.
* Добавлять только:
* Модули (.dm файлами)
* Сам этот файл добавлен в tgstation.dme
*
*Все Defines файлы лежат в папке "~meta_defines\", однако там идет переопределение пути для того чтобы не ругались тесты.
*
*/

//modular files


//master files (unsorted, TODO: need modularization)
#include "code\_globalvars\lists\names.dm"
#include "code\__HELPERS\names.dm"
#include "interface\interface.dm"
Expand Down Expand Up @@ -92,7 +106,6 @@
#include "code\modules\client\preferences\pride_pin.dm"
#include "code\datums\quirks\neutral_quirks\pride_pin.dm"


//oguzok in kitchen, huh?
#include "code\modules\clothing\under\undersuit.dm"
#include "code\modules\clothing\masks\moustache_ru.dm"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GLOBAL_LIST_INIT(advanced_hardsuit_allowed, typecacheof(list(
/obj/item/melee/baton,
/obj/item/reagent_containers/spray/pepper,
/obj/item/restraints/handcuffs,
/obj/item/tank/internals,
/obj/item/tank/internals
)))

GLOBAL_LIST_INIT(security_hardsuit_allowed, typecacheof(list(
Expand All @@ -20,5 +20,5 @@ GLOBAL_LIST_INIT(security_hardsuit_allowed, typecacheof(list(
/obj/item/melee/baton,
/obj/item/reagent_containers/spray/pepper,
/obj/item/restraints/handcuffs,
/obj/item/tank/internals,
/obj/item/tank/internals
)))
File renamed without changes.
1 change: 1 addition & 0 deletions massmeta/~meta_defines/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
На этот файл идёт переадресация из code/__DEFINES/~meta_defines_include.dm
2 changes: 1 addition & 1 deletion strings/massmeta/italian_replacement_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"хуйня": "дерьмо",
"чил": "дерьмо",
"щитсек": "инвалид",
"щитсеки": "инвалиды",
"щитсеки": "инвалиды"
}


Expand Down
4 changes: 2 additions & 2 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
#include "code\__DEFINES\wounds.dm"
#include "code\__DEFINES\xenobiology.dm"
#include "code\__DEFINES\zoom.dm"
#include "code\__DEFINES\~meta_defines_include.dm"
#include "code\__DEFINES\ai\ai.dm"
#include "code\__DEFINES\ai\ai_blackboard.dm"
#include "code\__DEFINES\ai\bot_keys.dm"
Expand Down Expand Up @@ -392,7 +393,6 @@
#include "code\__DEFINES\traits\declarations.dm"
#include "code\__DEFINES\traits\macros.dm"
#include "code\__DEFINES\traits\sources.dm"
#include "code\__DEFINES\~massmeta_defines\_defines_include.dm"
#include "code\__HELPERS\_auxtools_api.dm"
#include "code\__HELPERS\_lists.dm"
#include "code\__HELPERS\_planes.dm"
Expand Down Expand Up @@ -6240,5 +6240,5 @@
#include "interface\fonts\spess_font.dm"
#include "interface\fonts\tiny_unicode.dm"
#include "interface\fonts\vcr_osd_mono.dm"
#include "massmeta\includes.dm"
#include "massmeta\modular_meta.dm"
// END_INCLUDE
2 changes: 1 addition & 1 deletion tools/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const DmTarget = new Juke.Target({
'html/**',
'icons/**',
'interface/**',
'massmeta/**',
'massmeta/**', // MASSMETA EDIT ADDITION - Making the CBT work
`${DME_NAME}.dme`,
NamedVersionFile,
],
Expand Down
12 changes: 12 additions & 0 deletions tools/massmeta_check_grep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

#ANSI Escape Codes for colors to increase contrast of errors
RED="\033[0;31m"
GREEN="\033[0;32m"
BLUE="\033[0;34m"
NC="\033[0m" # No Color

echo -e "${BLUE}Re-running grep checks, but looking in modular_meta...${NC}"

# Run the linters again, but modular massmeta code.
sed "s|code/\*\*/\*\.dm|massmeta/\*\*/\*\.dm|g" <tools/ci/check_grep.sh | bash

0 comments on commit ff62412

Please sign in to comment.