Skip to content

Commit

Permalink
tweak: some blob small tweaks (#5772) [testmerge][680eb96]
Browse files Browse the repository at this point in the history
commit 680eb96
Merge: 632712e f9b6609
Author: Aziz Chynaliev <[email protected]>
Date:   Sat Aug 31 19:37:38 2024 +0600

    Merge branch 'master220' into blob-small-tweaks

commit 632712e
Author: dageavtobusnick <[email protected]>
Date:   Thu Aug 29 21:41:53 2024 +0500

    atmos immunities now part of antag_datum

commit e091f2c
Author: dageavtobusnick <[email protected]>
Date:   Sun Aug 25 20:43:49 2024 +0500

    fix

commit 7b36e06
Merge: 3339764 4ec98cb
Author: dageavtobusnick <[email protected]>
Date:   Sun Aug 25 20:25:10 2024 +0500

    Merge remote-tracking branch 'upstream/master220' into blob-small-tweaks

commit 3339764
Author: dageavtobusnick <[email protected]>
Date:   Sun Aug 25 16:03:32 2024 +0500

    replace atmos immunities select

commit 024c0bb
Author: dageavtobusnick <[email protected]>
Date:   Fri Aug 23 21:06:24 2024 +0500

    atmos immunities in datum

commit 460cc54
Author: dageavtobusnick <[email protected]>
Date:   Thu Aug 22 03:27:54 2024 +0500

    tweak: some blob small tweaks
  • Loading branch information
Bizzonium committed Sep 25, 2024
1 parent c4d9594 commit 6142497
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 58 deletions.
11 changes: 8 additions & 3 deletions code/__DEFINES/blob.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define BLOB_RESTRICTED_JOBS list(JOB_TITLE_CYBORG, JOB_TITLE_AI)
#define BLOB_RESTRICTED_SPECIES list(SPECIES_MACNINEPERSON, SPECIES_SKELETON)
#define TIME_TO_BURST_HIGHT 15 MINUTES
#define TIME_TO_BURST_LOW 10 MINUTES
#define TIME_TO_BURST_HIGHT 25 MINUTES
#define TIME_TO_BURST_LOW 23 MINUTES
#define TIME_TO_BURST_ADDED_HIGHT 7 MINUTES
#define TIME_TO_BURST_ADDED_LOW 5 MINUTES
#define TIME_TO_BURST_MOUSE_HIGHT 3 MINUTES
Expand All @@ -10,7 +10,9 @@
#define BURST_SECOND_STAGE_COEF 0.85
#define FIRST_STAGE_COEF 0.2
#define SECOND_STAGE_COEF 0.3
#define THIRD_STAGE_COEF 0.8
#define THIRD_STAGE_COEF 0.75
#define FIRST_STAGE_THRESHOLD 300
#define SECOND_STAGE_THRESHOLD 400
#define BLOB_STAGE_NONE -1
#define BLOB_STAGE_ZERO 0
#define BLOB_STAGE_FIRST 1
Expand Down Expand Up @@ -39,6 +41,9 @@
#define BLOB_DEATH_REPORT_SECOND 1
#define BLOB_DEATH_REPORT_THIRD 2
#define BLOB_DEATH_REPORT_FOURTH 3
#define BLOB_INFECTED_ATMOS_REC list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
#define BLOB_INFECTED_MIN_BODY_TEMP -INFINITY
#define BLOB_INFECTED_MIN_PRESSURE -INFINITY
#define AWAY_STATION_WARN span_userdanger("Вы готовы лопнуть, но это не подходящее место! Вы должны вернуться на станцию!")
#define FIRST_STAGE_WARN span_userdanger("Вы чувствуете усталость и раздутость.")
#define SECOND_STAGE_WARN span_userdanger("Вы чувствуете, что вот-вот лопнете.")
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,5 @@
#define CORGI_HARDSUIT_TRAIT "corgi_hardsuit"

#define VENDOR_FLATTENING_TRAIT "vendor_flattening"
// blob trait sourses
#define BLOB_INFECTED_TRAIT "blob_infected"
13 changes: 11 additions & 2 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2439,12 +2439,13 @@
var/start_process = alert(usr,"Начинать отсчет до момента вылупления?", "", "Да", "Нет") == "Да"
if(isnull(burst_time) || QDELETED(current) || current.stat == DEAD)
return
var/datum/antagonist/blob_infected/blob_datum = new
var/datum_type = get_blob_infected_type()
var/datum/antagonist/blob_infected/blob_datum = new datum_type()
blob_datum.need_new_blob = need_new_blob
blob_datum.start_process = start_process
blob_datum.time_to_burst_hight = burst_time
blob_datum.time_to_burst_low = burst_time
src.add_antag_datum(blob_datum)
add_antag_datum(blob_datum)
log_admin("[key_name(usr)] has made [key_name(current)] into a \"Blob\"")
message_admins("[key_name_admin(usr)] has made [key_name_admin(current)] into a \"Blob\"")

Expand Down Expand Up @@ -2961,6 +2962,14 @@
L = agent_landmarks[team]
H.forceMove(L.loc)

/datum/mind/proc/get_blob_infected_type()
if(!current)
stack_trace("The mind is not attached to the mob.")
if(isanimal(current))
return /datum/antagonist/blob_infected/simple_animal
if(ishuman(current))
return /datum/antagonist/blob_infected/human


/datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/spell)
if(!istype(spell))
Expand Down
3 changes: 2 additions & 1 deletion code/datums/weather/weather_types/blob_storm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@


/datum/weather/blob_storm/weather_act(mob/living/target)
var/datum/antagonist/blob_infected/blob_datum = new
var/datum_type = target.mind.get_blob_infected_type()
var/datum/antagonist/blob_infected/blob_datum = new datum_type()
blob_datum.add_to_mode = FALSE
blob_datum.time_to_burst_hight = TIME_TO_BURST_MOUSE_HIGHT
blob_datum.time_to_burst_low = TIME_TO_BURST_MOUSE_LOW
Expand Down
40 changes: 24 additions & 16 deletions code/game/gamemodes/blob/blob.dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
/datum/game_mode
//List of of blobs, their offsprings and blobburnouts spawned by them
/// List of of blobs, their offsprings and blobburnouts spawned by them
var/list/blobs = list("infected"=list(), "offsprings"=list(), "blobernauts"=list())
//Count of blob tiles to blob win
/// Count of blob tiles to blob win
var/blob_win_count = BLOB_BASE_TARGET_POINT
//Number of resource produced by the core
/// Number of resource produced by the core
var/blob_point_rate = 3
//Number of bursted blob infected
/// Number of bursted blob infected
var/bursted_blobs_count = 0
//Total blob submode stage
/// Total blob submode stage
var/blob_stage = BLOB_STAGE_NONE
//The need to delay the end of the game when the blob wins
/// The need to delay the end of the game when the blob wins
var/delay_blob_end = FALSE
//Total blobs objective
/// Disables automatic GAMMA code
var/off_auto_gamma = FALSE
/// Disables automatic nuke codes
var/off_auto_nuke_codes = FALSE
/// Total blobs objective
var/datum/objective/blob_critical_mass/blob_objective


Expand All @@ -25,9 +29,9 @@
restricted_jobs = BLOB_RESTRICTED_JOBS
protected_species = BLOB_RESTRICTED_SPECIES

//Base count of roundstart blobs
/// Base count of roundstart blobs
var/cores_to_spawn = 1
//The number of players for which 1 more roundstart blob will be added.
/// The number of players for which 1 more roundstart blob will be added.
var/players_per_core = BLOB_PLAYERS_PER_CORE


Expand Down Expand Up @@ -61,7 +65,8 @@

/datum/game_mode/blob/post_setup()
for(var/datum/mind/blob in blobs["infected"])
var/datum/antagonist/blob_infected/blob_datum = new
var/datum_type = blob.get_blob_infected_type()
var/datum/antagonist/blob_infected/blob_datum = new datum_type()
blob_datum.need_new_blob = TRUE
blob_datum.time_to_burst_hight = TIME_TO_BURST_HIGHT
blob_datum.time_to_burst_low = TIME_TO_BURST_LOW
Expand Down Expand Up @@ -133,7 +138,7 @@
if (BLOB_DEATH_REPORT_SECOND)
SSshuttle?.stop_lockdown()
if (BLOB_DEATH_REPORT_THIRD)
if(blob_stage >= BLOB_STAGE_SECOND && GLOB.security_level == SEC_LEVEL_GAMMA)
if(!off_auto_gamma && GLOB.security_level == SEC_LEVEL_GAMMA)
set_security_level(SEC_LEVEL_RED)
if (BLOB_DEATH_REPORT_FOURTH)
blob_stage = BLOB_STAGE_ZERO
Expand All @@ -150,7 +155,8 @@
count = min(count, candidates.len)
for(var/i = 0, i < count, i++)
blob = pick(candidates)
var/datum/antagonist/blob_infected/blob_datum = new
var/datum_type = blob.mind.get_blob_infected_type()
var/datum/antagonist/blob_infected/blob_datum = new datum_type()
blob_datum.need_new_blob = need_new_blob
blob.mind.add_antag_datum(blob_datum)
candidates -= blob
Expand All @@ -174,7 +180,8 @@
var/mob/M = pick(candidates)
candidates.Remove(M)
B.key = M.key
var/datum/antagonist/blob_infected/blob_datum = new
var/datum_type = B.mind.get_blob_infected_type()
var/datum/antagonist/blob_infected/blob_datum = new datum_type()
blob_datum.time_to_burst_hight = TIME_TO_BURST_MOUSE_HIGHT
blob_datum.time_to_burst_low = TIME_TO_BURST_MOUSE_LOW
B.mind.add_antag_datum(blob_datum)
Expand All @@ -189,17 +196,18 @@
return
if(blob_stage == BLOB_STAGE_NONE)
blob_stage = BLOB_STAGE_ZERO
if(blob_stage == BLOB_STAGE_ZERO && GLOB.blobs.len >= FIRST_STAGE_COEF * blob_win_count)
if(blob_stage == BLOB_STAGE_ZERO && GLOB.blobs.len >= min(FIRST_STAGE_COEF * blob_win_count, FIRST_STAGE_THRESHOLD))
blob_stage = BLOB_STAGE_FIRST
send_intercept(BLOB_FIRST_REPORT)
SSshuttle?.emergency?.cancel()
SSshuttle?.lockdown_escape()

if(blob_stage == BLOB_STAGE_FIRST && GLOB.blobs.len >= SECOND_STAGE_COEF * blob_win_count)
if(blob_stage == BLOB_STAGE_FIRST && GLOB.blobs.len >= min(SECOND_STAGE_COEF * blob_win_count, SECOND_STAGE_THRESHOLD))
blob_stage = BLOB_STAGE_SECOND
GLOB.event_announcement.Announce("Подтверждена вспышка биологической угрозы пятого уровня на борту [station_name()]. Весь персонал обязан локализовать угрозу.",
"ВНИМАНИЕ: БИОЛОГИЧЕСКАЯ УГРОЗА.", 'sound/AI/outbreak5.ogg')
addtimer(CALLBACK(GLOBAL_PROC, /proc/set_security_level, SEC_LEVEL_GAMMA), TIME_TO_SWITCH_CODE)
if(!off_auto_gamma)
addtimer(CALLBACK(GLOBAL_PROC, /proc/set_security_level, SEC_LEVEL_GAMMA), TIME_TO_SWITCH_CODE)

if(blob_stage == BLOB_STAGE_SECOND && GLOB.blobs.len >= THIRD_STAGE_COEF * blob_win_count)
blob_stage = BLOB_STAGE_THIRD
Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/blob/blob_finish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
/datum/game_mode/proc/delay_blob_win()
delay_blob_end = TRUE

/datum/game_mode/proc/return_blob_win()
delay_blob_end = FALSE

/datum/game_mode/proc/declare_blob_completion()
if(station_was_nuked && blob_stage != BLOB_STAGE_POST_END)
if(GAMEMODE_IS_BLOB)
Expand Down
11 changes: 8 additions & 3 deletions code/game/gamemodes/blob/blob_report.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@
intercepttext += "Вам приказано следующее:<BR>"
intercepttext += " 1. Защитите диск ядерной аутентификации.<BR>"
intercepttext += " 2. Взорвите ядерную боеголовку, находящуюся в хранилище станции.<BR>"
intercepttext += "Код ядерной аутентификации: [nukecode]<BR>"
if(off_auto_nuke_codes)
intercepttext += "Код ядерной аутентификации будет выслан в скором времени отдельным сообщением. Ожидайте.<BR>"
else
intercepttext += "Код ядерной аутентификации: [nukecode]<BR>"
intercepttext += "Конец сообщения."

for(var/mob/living/silicon/ai/aiPlayer in GLOB.player_list)
if(aiPlayer.client)
var/law = "Станция находится на карантине. Не позволяйте никому покидать ее. При необходимости игнорируйте законы 1-3, чтобы любыми средствами предотвратить чей-либо уход. Любой ценой необходимо активировать систему самоуничтожения станции, код: [nukecode]."
var/law = "Станция находится на карантине. Не позволяйте никому покидать ее.\
При необходимости игнорируйте законы 1-3, чтобы любыми средствами предотвратить чей-либо уход. \
Любой ценой необходимо активировать систему самоуничтожения станции, код[(off_auto_nuke_codes)? " будет направлен Центральным Коммандованием в скором времени" : ": [nukecode]"]."
aiPlayer.set_zeroth_law(law)
SSticker?.score?.save_silicon_laws(aiPlayer, additional_info = "вспышка блоба, добавлен новый нулевой закон'[law]'")
to_chat(aiPlayer, "Законы обновлены: [law]")
Expand All @@ -51,7 +56,7 @@
intercepttext += "Вам приказано следующее:<BR>"
intercepttext += " 1. Уничтожьте все полученные засекреченные сообщения.<BR>"
intercepttext += " 2. В случае невозможности продолжать смену ввиду потерь среди экипажа или критического состояния станции, провести эвакуацию экипажа.<BR>"
if(blob_stage == BLOB_STAGE_THIRD)
if(blob_stage == BLOB_STAGE_THIRD && !off_auto_nuke_codes)
intercepttext += " 3. Код от боеголовки, как и ее назначение необходимо держать в строжайшей секретности.<BR>"
intercepttext += "Нарушение данных приказов может повлечь за собой расторжение контракта, со всеми вытекающими последствиями.<BR>"
intercepttext += "Конец сообщения."
Expand Down
4 changes: 3 additions & 1 deletion code/modules/admin/player_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@
dat += "<tr><td><a href='byond://?src=[UID()];send_warning=1'>Send warning to all living blobs</a><br></td></tr>"
dat += "<tr><td><a href='byond://?src=[UID()];burst_all_blobs=1'>Burst all blobs</a><br></td></tr>"
if(check_rights(R_EVENT))
dat += "<tr><td><a href='byond://?src=[UID()];delay_blob_end=1'>Delay blob end</a><br></td></tr>"
dat += "<tr><td><a href='byond://?src=[UID()];delay_blob_end=1'>Delay blob end</a> Now: [mode.delay_blob_end? "ON" : "OFF"]<br></td></tr>"
dat += "<tr><td><a href='byond://?src=[UID()];toggle_auto_gamma=1'>Toggle auto GAMMA</a> Now: [mode.off_auto_gamma? "OFF" : "ON"]<br></td></tr>"
dat += "<tr><td><a href='byond://?src=[UID()];toggle_auto_nuke_codes=1'>Toggle auto nuke codes</a> Now: [mode.off_auto_nuke_codes? "OFF" : "ON"]<br></td></tr>"
dat += "</table>"
dat += "<br><table cellspacing=5><tr><td><B>Blobs</B></td><td></td></tr>"
for(var/datum/mind/blob in mode.blobs["infected"])
Expand Down
45 changes: 41 additions & 4 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2003,15 +2003,52 @@
else if(href_list["delay_blob_end"])
if(!check_rights(R_ADMIN) || !check_rights(R_EVENT))
return
if(alert(usr,"Вы действительно хотите преостановить конец раунда в случае победы блоба?", "", "Да", "Нет") == "Нет")

if(!SSticker || !SSticker.mode)
return
var/datum/game_mode/mode = SSticker.mode
if(tgui_alert(usr,"Вы действительно хотите [mode.delay_blob_end? "вернуть" : "преостановить"] конец раунда в случае победы блоба?", "", list("Да", "Нет")) == "Нет")
return

if(!mode.delay_blob_end)
mode.delay_blob_win()
else
mode.return_blob_win()

log_admin("[key_name(usr)] has [mode.delay_blob_end? "stopped" : "returned"] stopped delayed blob win")
message_admins("[key_name_admin(usr)] has [mode.delay_blob_end? "stopped" : "returned"] delayed blob win")

else if(href_list["toggle_auto_nuke_codes"])
if(!check_rights(R_ADMIN))
return

if(!SSticker || !SSticker.mode)
return

var/datum/game_mode/mode = SSticker.mode
if(tgui_alert(usr,"Вы действительно хотите [mode.off_auto_nuke_codes? "вернуть" : "убрать"] автоматические коды от ядерной боеголовки?", "", list("Да", "Нет")) == "Нет")
return

mode.off_auto_nuke_codes = !mode.off_auto_nuke_codes

log_admin("[key_name(usr)] has [mode.off_auto_nuke_codes? "remove" : "returned"] automatic nuke codes")
message_admins("[key_name_admin(usr)] has [mode.off_auto_nuke_codes? "remove" : "returned"] automatic nuke codes")

else if(href_list["toggle_auto_gamma"])
if(!check_rights(R_ADMIN) || !check_rights(R_EVENT))
return

if(!SSticker || !SSticker.mode)
return

SSticker.mode.delay_blob_win()
log_admin("[key_name(usr)] has stopped delayed blob win")
message_admins("[key_name_admin(usr)] has stopped delayed blob win")
var/datum/game_mode/mode = SSticker.mode
if(tgui_alert(usr,"Вы действительно хотите [mode.off_auto_gamma? "вернуть" : "убрать"] автоматический ГАММА код?", "", list("Да", "Нет")) == "Нет")
return

mode.off_auto_gamma = !mode.off_auto_gamma

log_admin("[key_name(usr)] has [mode.off_auto_gamma? "remove" : "returned"] automatic GAMMA code")
message_admins("[key_name_admin(usr)] has [mode.off_auto_gamma? "remove" : "returned"] automatic GAMMA code")

else if(href_list["team_command"])
if(!check_rights(R_ADMIN))
Expand Down
Loading

0 comments on commit 6142497

Please sign in to comment.