Skip to content

Commit

Permalink
Merge branch 'master' into devtest
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrior authored Oct 21, 2023
2 parents 6db971f + 8c24b08 commit 726c397
Show file tree
Hide file tree
Showing 10 changed files with 604 additions and 418 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/auto_translate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ jobs:
- name: Create temporary branch
run: |
git branch -f translate_tmp
git checkout translate_tmp
git branch
git checkout -b translate_tmp
git reset --hard origin/master
- name: Apply existing translation
run: |
git fetch origin translate
Expand All @@ -49,11 +46,12 @@ jobs:
- name: 'Generate Translation'
run: |
python ./tools/translator/converter.py
[ ! -f ./ss220replace.json ] || mv ./ss220replace.json ./tools/translator/ss220replace.json
git add ./tools/translator/ss220replace.json
- name: 'Push Translation'
run: |
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push -u -f origin translate
git push -f origin translate_tmp:translate
58 changes: 35 additions & 23 deletions .github/workflows/translate_branch_update.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
name: Update translate branch
name: Update translation branch

on:
workflow_dispatch:
push:
branches: ['master']

jobs:
add_translation:
update_translation:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: 'Update old translation'

steps:
- name: 'Update Branch'
uses: actions/checkout@v4

- name: Create temporary branch
run: |
git branch -f translate_tmp
git checkout translate_tmp
git reset --hard origin/master
- name: Apply existing translation
run: |
git fetch origin translate
git checkout origin/translate -- ./tools/translator/ss220replace.json
./tools/translator/ss220_replacer_linux --prefix=ss220 --root=./../../ --location=./
- name: 'Push Translation'
run: |
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push -u -f origin translate
- name: 'Update Branch'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Installing Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Installing deps
run: |
python -m pip install --upgrade pip
pip install -r ./tools/translator/requirements.txt
- name: Create temporary branch
run: |
git checkout -b translate_tmp
git reset --hard origin/master
- name: Apply existing translation
run: |
git fetch origin translate
git checkout origin/translate -- ./tools/translator/ss220replace.json
./tools/translator/ss220_replacer_linux --prefix=ss220 --root=./../../ --location=./
- name: 'Push Translation'
run: |
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push -f origin translate_tmp:translate
11 changes: 11 additions & 0 deletions modular_ss220/_signals220/code/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@
whisper_say(message_pieces)
return TRUE
. = ..()

// Да, костыльно, но модульно по другому не вижу как - PIXEL_SHIFT
/mob/living/Process_Spacemove(movement_dir)
if(SEND_SIGNAL(src, COMSIG_LIVING_PROCESS_SPACEMOVE, movement_dir) & COMPONENT_BLOCK_SPACEMOVE)
return FALSE
. = ..()

/mob/living/say(message, verb, sanitize, ignore_speech_problems, ignore_atmospherics, ignore_languages)
SEND_SIGNAL(src, COMSIG_MOB_SAY, args)
. = ..()

1 change: 1 addition & 0 deletions modular_ss220/clothing/_clothing.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "code/shoes.dm"
#include "code/gloves.dm"
#include "code/helmet.dm"
#include "code/mask.dm"
#include "code/under.dm"
#include "code/cloaks.dm"
#include "code/garment_bag.dm"
55 changes: 55 additions & 0 deletions modular_ss220/clothing/code/mask.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/obj/item/clothing/mask
var/modifies_speech = FALSE

/obj/item/clothing/mask/proc/handle_speech(datum/source, list/speech_args)
SIGNAL_HANDLER

/obj/item/clothing/mask/equipped(mob/M, slot)
. = ..()

if ((slot & SLOT_HUD_WEAR_MASK) && modifies_speech)
RegisterSignal(M, COMSIG_MOB_SAY, PROC_REF(handle_speech))
else
UnregisterSignal(M, COMSIG_MOB_SAY)

/obj/item/clothing/mask/dropped(mob/M)
. = ..()
UnregisterSignal(M, COMSIG_MOB_SAY)

/obj/item/clothing/mask/fakemoustache/chef
name = "абсолютно настоящие усы шефа"
desc = "Осторожно: усы накладные."
modifies_speech = TRUE

/obj/item/clothing/mask/fakemoustache/chef/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
var/static/regex/words = new(@"(?<![a-zA-Zа-яёА-ЯЁ])[a-zA-Zа-яёА-ЯЁ]+?(?![a-zA-Zа-яёА-ЯЁ])", "g")
message = replacetext(message, words, TYPE_PROC_REF(/obj/item/clothing/mask/fakemoustache/chef, words_replace))

if(prob(5))
message += pick(" Равиоли, равиоли, подскажи мне формуоли!"," Мамма-мия!"," Мамма-мия! Какая острая фрикаделька!", " Ла ла ла ла ла фуникули+ фуникуля+!", "Вордс Реплаке!")
speech_args[SPEECH_MESSAGE] = trim(message)

/obj/item/clothing/mask/fakemoustache/chef/proc/words_replace(word)
var/static/list/italian_words
if(!italian_words)
italian_words = strings("italian_replacement.json", "italian")

var/match = italian_words[lowertext(word)]
if(!match)
return word

if(islist(match))
match = pick(match)

if(word == uppertext(word))
return uppertext(match)

if(word == capitalize(word))
return capitalize(match)

return match

/datum/outfit/job/chef
mask = /obj/item/clothing/mask/fakemoustache/chef
1 change: 1 addition & 0 deletions modular_ss220/credits/_credits.dme
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "code\SScredits.dm"
#include "code\credits.dm"

#include "_credits.dm"
Loading

0 comments on commit 726c397

Please sign in to comment.