Skip to content

Commit

Permalink
Merge pull request #50 from MysticalFaceLesS/scp-cat-add
Browse files Browse the repository at this point in the history
Update: обновление модуля
  • Loading branch information
MysticalFaceLesS authored Apr 27, 2024
2 parents 59198da + a82a16a commit e24a8e2
Show file tree
Hide file tree
Showing 33 changed files with 436 additions and 152 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Открывайте PR только если вы уверены в его работоспособности. Это означает, что вы проверили каждую строчку своих изменений, а также **проверили свои изменения локально**, запустив сервер на своем компьютере. Если что-то невозможно проверить полностью или вы считаете, что на какую-то часть изменений нужно обратить пристальное внимание проверяющих, то укажите это отдельно в описании. Конечно мы также будем проверять ваши изменения, но вы не должны полагаться на то, что ваши баги заметит кто-то другой и исправит за вас.
- **Ваш код соответствует принятым договоренностям по написанию кода.**
Подробнее смотрите раздел "[Договоренности по написанию кода](#договоренности-по-написанию-кода)" ниже.
- **Ваш код - модульный.** Изменения в кода игры вне модов очень не приветствуются и скорее всего будут отклонены. Код обязан соотвествовать [руководству по модуляризации](/mods/README.md).
- **Ваш код - модульный.** Изменения в кода игры вне модов очень не приветствуются и скорее всего будут отклонены. Код обязан соотвествовать [руководству по модуляризации](/mod_celadon/README.md).

# Continuous Integration

Expand All @@ -47,7 +47,7 @@
- Наличие и корректность чейнджлога.
- Наличие ошибок найденные статическим анализатором DreamChecker.
- Наличие нарушений стиля кода.
- Соответствие [руководству по модуляризации](/mods/README.md).
- Соответствие [руководству по модуляризации](/mod_celadon/README.md).

Наличие и корректность чейнджлога проверяется при каждом открытии PR'а, редактировании текста в теле PR'а, добавлении и удаления меток на PR.

Expand Down Expand Up @@ -254,7 +254,7 @@ O.specific_type_funс()

### Предпочитайте `Initialize()` вместо `New()` для atom (объектов, размещаемых на карте).

Контроллеры, используемые в нашей сборке, должны справляться с длительными операциями и лагами, но они не могут контролировать то, что происходит во время загрузки карты, когда для всех объектов вызывается New. Для любых новых объектов, без явной необходимости, используйте `Initialize`, чтобы сделать все, что вы хотели сделать в `New`. Это уменьшает количество функций вызываемых на этапе загрузки карты. Чтобы узнать больше про то, как работает `Initialize`, смотрите [`code/game/atoms.dm`](https://github.com/MysticalFaceLesS/Foundation-19/blob/beta-dev/code/game/atoms.dm)
Контроллеры, используемые в нашей сборке, должны справляться с длительными операциями и лагами, но они не могут контролировать то, что происходит во время загрузки карты, когда для всех объектов вызывается New. Для любых новых объектов, без явной необходимости, используйте `Initialize`, чтобы сделать все, что вы хотели сделать в `New`. Это уменьшает количество функций вызываемых на этапе загрузки карты. Чтобы узнать больше про то, как работает `Initialize`, смотрите [`code/game/atoms.dm`](https://github.com/MysticalFaceLesS/Foundation-19/blob/scp-cat-add/code/game/atoms.dm)

**NB:** Важно понимать то, как работают Initialize и последовательность их выполнения относительно New, иначе можно [словить приколы](https://github.com/ChaoticOnyx/OnyxBay/issues/3817). Initialize вызывается в /atom/New. Соответственно при создании объекта сначала вызывается New последнего типа в иерархии наследования. Дальше через ..() (если они, конечно, есть) последовательно вызываются New более ранних по иерархии типов вплоть до /atom/New, где вызывается /atom/Initialize, который точно также начинает выполняться с последнего переопределения в иерархии наследования объектов.

Expand Down
23 changes: 0 additions & 23 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
<!-- ЗДЕСЬ должно быть **подробное описание** того, что происходит в PR и зачем это нужно. PR не должен содержать изменений, о которых здесь ничего не сказано. -->
ПР делает что-то умное

<!-- ЗДЕСЬ нужно **привязать ишью**, которые относятся к PR'у в формате `close #1234` или `fixes #1234` - тогда они автоматически закроются вместе с PR. Можно написать `Затрагивает #1234, но не фиксит его`, если вы просто хотите упоминуть ишью, но не закрывать его. -->

<!-- ЗДЕСЬ нужно **расписать изменения** которые попадут в **чейнджлог**, формат - `prefix: краткое описание` -->
### Чейнджлог
```yml
🆑ВашНикнейм
bugfix: Пофиксил баг
wip: Добавил что-то, что ещё в процессе
tweak: Подправил что-то
soundadd: Добавил новый звук
sounddel: Удалил старый звук
rscadd: Добавил в игру что-то новое
rscdel: Удалил из игры что-то старое
imageadd: Добавил новые иконки и картинки
imagedel: Удалил старые иконки и картинки
maptweak: Отредактировал карту
spellcheck: Исправил опечатку
experiment: Добавил что-то экспериментальное
balance: Заребалансил что-то
admin: Сделал что-то с админскими тулзами
/🆑
```

<!--
Честно заполняем галочки. Чем больше галочек, тем быстрее проверять Pull Request, соответственно он быстрее будет принят.
Чтобы отметить - ставим `x` (икс) внутри квадратных скобочек вот так: `- [x] ...`.
Expand Down
12 changes: 12 additions & 0 deletions code/_helpers/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@
t = replacetext(t, "\[dealogo\]", "<img src = dea.png>")
t = replacetext(t, "\[intlogo\]", "<img src = int.png>")
t = replacetext(t, "\[triblogo\]", "<img src = trib.png>")
t = replacetext(t, "\[aiadlogo\]", "<img src = aiad.png>")
t = replacetext(t, "\[amdlogo\]", "<img src = amd.png>")
t = replacetext(t, "\[dcdlogo\]", "<img src = dcd.png>")
t = replacetext(t, "\[fsdlogo\]", "<img src = fsd.png>")
t = replacetext(t, "\[misilogo\]", "<img src = misi.png>")
t = replacetext(t, "\[patalogo\]", "<img src = pata.png>")
t = replacetext(t, "\[raisalogo\]", "<img src = raisa.png>")
t = replacetext(t, "\[goclogo\]", "<img src = ungoc.png>")
t = replacetext(t, "\[uiulogo\]", "<img src = uiu.png>")
t = replacetext(t, "\[thilogo\]", "<img src = thi.png>")
Expand All @@ -476,6 +483,11 @@
t = replacetext(t, "\[cilogo\]", "<img src = ci.png>")
t = replacetext(t, "\[shlogo\]", "<img src = sh.png>")
t = replacetext(t, "\[cotbglogo\]", "<img src = cotbg.png>")
t = replacetext(t, "\[coclogo\]", "<img src = coc.png>")
t = replacetext(t, "\[cmaxlogo\]", "<img src = cmax.png>")
t = replacetext(t, "\[mcflogo\]", "<img src = mcf.png>")
t = replacetext(t, "\[wwslogo\]", "<img src = wws.png>")
t = replacetext(t, "\[spclogo\]", "<img src = spc.png>")
return t

//pencode translation to html for tags exclusive to digital files (currently email, nanoword, report editor fields,
Expand Down
16 changes: 8 additions & 8 deletions code/game/machinery/vitals_monitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
var/obj/item/organ/internal/brain/brain = victim.internal_organs_by_name[BP_BRAIN]
if(istype(brain) && victim.stat != DEAD && !(victim.status_flags & FAKEDEATH))
if(user.skill_check(SKILL_MEDICAL, SKILL_BASIC))
switch(brain.get_current_damage_threshold())
if(0 to 2)
switch(round(brain.damage / brain.max_damage, 0.1))
if(0 to 0.2)
brain_activity = "normal"
if(3 to 5)
if(0.3 to 0.5)
brain_activity = "weak"
if(6 to INFINITY)
if(0.6 to INFINITY)
brain_activity = "extremely weak"
else
brain_activity = "some"
Expand Down Expand Up @@ -172,14 +172,14 @@
return
var/obj/item/organ/internal/brain/brain = victim.internal_organs_by_name[BP_BRAIN]
if(istype(brain) && victim.stat != DEAD && !(victim.status_flags & FAKEDEATH))
switch(brain.get_current_damage_threshold())
if(0 to 2)
switch(round(brain.damage / brain.max_damage, 0.1))
if(0 to 0.2)
add_overlay(image(icon, icon_state = "brain_ok"))
if(3 to 5)
if(0.3 to 0.5)
add_overlay(image(icon, icon_state = "brain_bad"))
if(read_alerts)
alerts[BRAIN_ALERT] = "Weak brain activity!"
if(6 to INFINITY)
if(0.6 to INFINITY)
add_overlay(image(icon, icon_state = "brain_verybad"))
add_overlay(image(icon, icon_state = "brain_warning"))
if(read_alerts)
Expand Down
20 changes: 10 additions & 10 deletions code/game/objects/items/devices/scanners/health.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@
if(skill_level < SKILL_BASIC)
brain_result = "there's movement on the graph"
else if(istype(brain))
switch(brain.get_current_damage_threshold())
switch(round(brain.damage / brain.max_damage, 0.1))
if(0)
brain_result = "normal"
if(1 to 2)
brain_result = SPAN_CLASS("scan_notice","minor brain damage")
if(3 to 5)
brain_result = SPAN_CLASS("scan_warning","weak")
if(6 to 8)
brain_result = SPAN_CLASS("scan_danger","extremely weak")
if(9 to INFINITY)
brain_result = SPAN_CLASS("scan_danger","fading")
if(0.1 to 0.2)
brain_result = SPAN_CLASS("scan_notice", "minor brain damage")
if(0.3 to 0.5)
brain_result = SPAN_CLASS("scan_warning", "weak")
if(0.6 to 0.8)
brain_result = SPAN_CLASS("scan_danger", "extremely weak")
if(0.9 to INFINITY)
brain_result = SPAN_CLASS("scan_danger", "fading")
else
brain_result = SPAN_CLASS("scan_danger","ERROR - Hardware fault")
brain_result = SPAN_CLASS("scan_danger", "ERROR - Hardware fault")
else
brain_result = SPAN_CLASS("scan_danger","ERROR - Organ not recognized")
else
Expand Down
12 changes: 12 additions & 0 deletions code/modules/asset_cache/assets/on_join.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@
"trib.png" = 'html/images/trib.png',
"scplogo.png" = 'html/images/scplogo.png',
"ungoc.png" = 'html/images/ungoc.png',
"aiad.png" = 'html/images/aiad.png',
"amd.png" = 'html/images/amd.png',
"dcd.png" = 'html/images/dcd.png',
"fsd.png" = 'html/images/fsd.png',
"misi.png" = 'html/images/misi.png',
"pata.png" = 'html/images/pata.png',
"raisa.png" = 'html/images/raisa.png',
"uiu.png" = 'html/images/uiu.png',
"thi.png" = 'html/images/thi.png',
"mcd.png" = 'html/images/mcd4.png',
"sh.png" = 'html/images/sh.png',
"ci.png" = 'html/images/ci.png',
"cotbg.png" = 'html/images/cotbg.png',
"cmax.png" = 'html/images/cmax.png',
"coc.png" = 'html/images/coc.png',
"mcf.png" = 'html/images/mcf.png',
"ar.png" = 'html/images/ar.png',
"wws.png" = 'html/images/wws.png',
"spc.png" = 'html/images/spc.png',
"scp3349_ekg.png" = 'html/images/scp3349_ekg.png',
"talisman.png" = 'html/images/talisman.png'
)
82 changes: 41 additions & 41 deletions code/modules/organs/internal/brain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

var/can_use_mmi = TRUE
var/mob/living/carbon/brain/brainmob = null
var/const/damage_threshold_count = 10
var/damage_threshold_value
var/healed_threshold = 1
/// Basically, how many Process() calls we have until hardcrit if we run out of oxygen. Maximum value is equal to its starting value.
var/oxygen_reserve = 6
var/insanity = 0 // higher = bad

Expand Down Expand Up @@ -55,10 +54,6 @@
if(brainmob && brainmob.client)
brainmob.client.screen.len = null //clear the hud

/obj/item/organ/internal/brain/set_max_damage(ndamage)
..()
damage_threshold_value = round(max_damage / damage_threshold_count)

/obj/item/organ/internal/brain/Destroy()
QDEL_NULL(brainmob)
. = ..()
Expand Down Expand Up @@ -119,12 +114,6 @@
/obj/item/organ/internal/brain/can_recover()
return ~status & ORGAN_DEAD

/obj/item/organ/internal/brain/proc/get_current_damage_threshold()
return round(damage / damage_threshold_value)

/obj/item/organ/internal/brain/proc/past_damage_threshold(threshold)
return (get_current_damage_threshold() > threshold)

/obj/item/organ/internal/brain/proc/handle_severe_brain_damage()
set waitfor = FALSE
healed_threshold = 0
Expand Down Expand Up @@ -160,47 +149,58 @@
var/blood_volume = owner.get_blood_oxygenation()
if(blood_volume < BLOOD_VOLUME_SURVIVE)
if(!owner.chem_effects[CE_STABLE] || prob(60))
oxygen_reserve = max(0, oxygen_reserve-1)
oxygen_reserve = max(0, oxygen_reserve - 1)
else
oxygen_reserve = min(initial(oxygen_reserve), oxygen_reserve+1)
oxygen_reserve = min(initial(oxygen_reserve), oxygen_reserve + 1)

if(!oxygen_reserve) //(hardcrit)
owner.Paralyse(3)
var/can_heal = damage && damage < max_damage && (damage % damage_threshold_value || owner.chem_effects[CE_BRAIN_REGEN] || (!past_damage_threshold(3) && owner.chem_effects[CE_STABLE]))
var/damprob
//Effects of bloodloss

// If we've got the proper chems, we can heal no matter what
var/healing = owner.chem_effects[CE_BRAIN_REGEN] ? 1.6 : 0
healing += ((damage > 40) && owner.chem_effects[CE_STABLE]) ? 0.5 : 0
// At good oxygenation levels, we passively autoheal as well.
if(blood_volume > (BLOOD_VOLUME_SAFE + 1))
healing += 1.05 * log(12, (blood_volume - BLOOD_VOLUME_SAFE))

var/incoming_damage = ((100 - (1.1 * blood_volume)) / 50) + (((blood_volume - 100) / 120) ** 2)
if(owner.chem_effects[CE_STABLE])
incoming_damage *= 0.5

var/current_max_health = (max_damage + 75) - (3 * blood_volume)

// Can't heal and take damage at the same time, so the smaller one is taken away from the larger
if(healing && incoming_damage)
if(healing > incoming_damage)
healing -= incoming_damage
incoming_damage = 0
else
incoming_damage -= healing
healing = 0

take_internal_damage(min(damage + incoming_damage, current_max_health - damage))

// we can't heal if we're above max damage
if(healing && damage && damage < max_damage)
damage = max(damage - healing, 0)

// Secondary effects of bloodloss
switch(blood_volume)
if(BLOOD_VOLUME_SAFE to INFINITY)
if(can_heal)
damage = max(damage-1, 0)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(1))
to_chat(owner, SPAN_WARNING("You feel [pick("dizzy","woozy","faint")]..."))
damprob = owner.chem_effects[CE_STABLE] ? 30 : 60
if(!past_damage_threshold(2) && prob(damprob))
take_internal_damage(1)
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
owner.eye_blurry = max(owner.eye_blurry,6)
damprob = owner.chem_effects[CE_STABLE] ? 40 : 80
if(!past_damage_threshold(4) && prob(damprob))
take_internal_damage(1)
if(!owner.paralysis && prob(10))
owner.Paralyse(rand(1,3))
owner.eye_blurry = max(owner.eye_blurry, 2)
if(prob(3))
to_chat(owner, SPAN_WARNING("You feel very [pick("dizzy","woozy","faint")]..."))
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
owner.eye_blurry = max(owner.eye_blurry,6)
damprob = owner.chem_effects[CE_STABLE] ? 60 : 100
if(!past_damage_threshold(6) && prob(damprob))
take_internal_damage(1)
if(!owner.paralysis && prob(15))
owner.Paralyse(3,5)
owner.Weaken(2)
owner.eye_blurry = max(owner.eye_blurry, 4)
if(prob(6))
to_chat(owner, SPAN_WARNING("You feel extremely [pick("dizzy","woozy","faint")]..."))
if(-(INFINITY) to BLOOD_VOLUME_SURVIVE) // Also see heart.dm, being below this point puts you into cardiac arrest.
owner.eye_blurry = max(owner.eye_blurry,6)
damprob = owner.chem_effects[CE_STABLE] ? 80 : 100
if(prob(damprob))
take_internal_damage(1)
if(prob(damprob))
take_internal_damage(1)
owner.Weaken(5)
owner.eye_blurry = max(owner.eye_blurry, 6)
..()

/obj/item/organ/internal/brain/proc/take_sanity_damage(damage, silent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name = "Inaprovaline"
description = "Inaprovaline is a multipurpose neurostimulant and cardioregulator. Commonly used to slow bleeding and stabilize patients."
color = "#00bfff"
metabolism = REM * 0.5
metabolism = REM * 0.4
overdose = REAGENTS_OVERDOSE * 2
value = 3.5

Expand Down
26 changes: 26 additions & 0 deletions html/changelogs/archive/2024-04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,29 @@
- balance: The crates near the battery racks in Engineering have 9 high-capacity
cells for each instead of 6 super-capacity cells.
- balance: Upgrading SMESs no longer has a chance to blow up.
2024-04-09:
Saicchi:
- rscadd: keybind 'V' for robot and AI lights
2024-04-10:
cheesePizza2:
- rscadd: Traitor code phrases and responses are automatically re-colored!
chesse20:
- rscadd: Departments can now wear their own armbands
2024-04-24:
chesse20:
- refactor: Space Carp are no longer carp or from space.
quadbium:
- rscadd: Replaced the high vis jacket textures
2024-04-27:
cheesePizza2:
- balance: Inaprovaline metabolizes slower, so you'll have more time to heal a patient.
- balance: Brain healing from Inaprovaline separated from healing from Alkysine.
The former heals 0.5 damage a second, whereas the latter repairs 1.6 damage
a second.
- balance: Brain oxyloss damage/second, maximum brain oxyloss damage, and brain
passive healing is continuous instead of discrete. For details, see graphs attached
to PR.
quadbium:
- rscadd: Added logos for aiad, antimemetics, church of maxwellism, deconmissioning,
FDS, pataphysics, Raisa, SPC, MCF, WWS, and the cogwork orthodoxy.
- rscadd: Replaced the cogwork orthodoxy logo with the CotBG logo.
Binary file added html/images/aiad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/amd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/cmax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/coc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/images/cotbg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/dcd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/fsd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/mcf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/misi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/pata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/raisa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/spc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/wws.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e24a8e2

Please sign in to comment.