From 11ab4a8c780f2648cb7558ecc4c7060d1a44158a Mon Sep 17 00:00:00 2001 From: dageavtobusnick <71216640+dageavtobusnick@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:48:41 +0500 Subject: [PATCH] bugfix/tweak: blob mode&event rework bugfixes and qol tweaks (#5458) * bugfix: fix blob mode rework bugs * bugfix/tweak: blob mode&event rework bugfixes and qol tweaks * borer inside blob_infected fix * fix * Text fix in code/modules/admin/verbs/one_click_antag.dm Co-authored-by: Vladisvell <73733747+Vladisvell@users.noreply.github.com> * Text fix in code/datums/mind.dm Co-authored-by: Vladisvell <73733747+Vladisvell@users.noreply.github.com> * Text fix in code/modules/admin/verbs/one_click_antag.dm Co-authored-by: Vladisvell <73733747+Vladisvell@users.noreply.github.com> * blob talk folow+gt fix+some fixes * add to gamemode fix+actions update fix --------- Co-authored-by: Vladisvell <73733747+Vladisvell@users.noreply.github.com> --- code/__DEFINES/blob.dm | 2 +- code/datums/mind.dm | 21 ++++++-- .../weather/weather_types/blob_storm.dm | 2 + code/game/gamemodes/blob/blob.dm | 28 ++++++++++ code/game/gamemodes/blob/blob_finish.dm | 16 +++--- code/game/gamemodes/blob/blobs/blob_mobs.dm | 12 ++++- code/game/gamemodes/blob/blobs/core.dm | 14 +++-- code/game/gamemodes/blob/overmind.dm | 8 ++- code/game/gamemodes/blob/powers.dm | 4 +- code/modules/admin/verbs/one_click_antag.dm | 11 ++-- code/modules/antagonists/blob/blob_actions.dm | 53 +++++++++++++++++++ .../antagonists/blob/blob_infected_datum.dm | 33 ++++++++---- .../antagonists/blob/blob_overmind_datum.dm | 24 ++++++++- code/modules/antagonists/blob/blob_talk.dm | 30 ----------- code/modules/events/blob.dm | 29 +--------- .../mob/living/living_infected_blob_mobs.dm | 6 ++- .../reagents/chemistry/reagents/blob.dm | 2 +- paradise.dme | 2 +- 18 files changed, 195 insertions(+), 102 deletions(-) create mode 100644 code/modules/antagonists/blob/blob_actions.dm delete mode 100644 code/modules/antagonists/blob/blob_talk.dm diff --git a/code/__DEFINES/blob.dm b/code/__DEFINES/blob.dm index 4ac8d40523d..0f476d71f6d 100644 --- a/code/__DEFINES/blob.dm +++ b/code/__DEFINES/blob.dm @@ -31,7 +31,7 @@ #define TIME_TO_SWITCH_CODE 10 SECONDS #define BURST_BLOB_TICK 1 SECONDS #define BURST_MESSAGE_TICK 10 SECONDS -#define TIME_TO_ADD_OM_DATUM 3 SECONDS +#define TIME_TO_ADD_OM_DATUM 1 SECONDS #define BLOB_BASE_TARGET_POINT 350 #define BLOB_TARGET_POINT_PER_CORE 350 #define BLOB_PLAYERS_PER_CORE 30 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 1e2db8e325e..d69434f3c3a 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -553,9 +553,13 @@ /datum/mind/proc/memory_edit_blob() . = _memory_edit_header("blob") if(isblobinfected(src)) - . += "|BLOB|no" + . += "|BLOB|deblobize" . += "|burst blob" - else + else if(isblobovermind(src)) + var/mob/camera/blob/blob_overmind = current + . += "|BLOB Overmind|" + . += "
Total points: [blob_overmind.blob_points]/[blob_overmind.max_blob_points]" + else if(current.can_be_blob()) . += "blobize|NO" . += _memory_edit_role_enabled(ROLE_BLOB) @@ -765,7 +769,7 @@ sections["eventmisc"] = memory_edit_eventmisc(H) - if(isliving(current) && current.can_be_blob()) + if((isliving(current) && current.can_be_blob()) || isblobovermind(src)) sections["blob"] = memory_edit_blob(current) if(!issilicon(current)) @@ -2526,6 +2530,17 @@ log_admin("[key_name(usr)] has bursted [key_name(current)]") message_admins("[key_name_admin(usr)] has bursted [key_name_admin(current)]") + if("set_points") + if(!isblobovermind(src)) + return + var/mob/camera/blob/blob_overmind = current + var/blob_points = input(usr, "Введите новое число очков в диапазоне от 0 до [blob_overmind.max_blob_points]","Count:", blob_overmind.blob_points) as num|null + if(isnull(blob_points) || QDELETED(current) || current.stat == DEAD) + return + blob_overmind.blob_points = clamp(blob_points, 0, blob_overmind.max_blob_points) + log_admin("[key_name(usr)] set blob points to [key_name(current)] as [blob_overmind.blob_points]") + message_admins("[key_name_admin(usr)] set blob points to [key_name_admin(current)] as [blob_overmind.blob_points]") + else if(href_list["common"]) switch(href_list["common"]) diff --git a/code/datums/weather/weather_types/blob_storm.dm b/code/datums/weather/weather_types/blob_storm.dm index e974403757b..4bb9fd91811 100644 --- a/code/datums/weather/weather_types/blob_storm.dm +++ b/code/datums/weather/weather_types/blob_storm.dm @@ -35,6 +35,8 @@ /datum/weather/blob_storm/can_weather_act(mob/living/mob_to_check) if(prob(50)) return FALSE + if(QDELETED(mob_to_check) || mob_to_check.stat == DEAD) + return FALSE if(!mob_to_check.mind || mob_to_check.mind.special_role == SPECIAL_ROLE_BLOB) return FALSE if(!mob_to_check.can_be_blob()) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 71f10c42244..599a3a8d4bb 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -148,6 +148,33 @@ return count +/datum/game_mode/proc/make_blobized_mouses(count) + var/list/candidates = SSghost_spawns.poll_candidates("Вы хотите сыграть за мышь, зараженную Блобом?", ROLE_BLOB, TRUE, source = /mob/living/simple_animal/mouse/blobinfected) + + if(!length(candidates)) + return FALSE + + var/list/vents = get_valid_vent_spawns(exclude_mobs_nearby = TRUE, exclude_visible_by_mobs = TRUE) + if(!length(vents)) + return FALSE + + for(var/i in 1 to count) + if (length(candidates)) + var/obj/vent = pick(vents) + var/mob/living/simple_animal/mouse/B = new(vent.loc) + var/mob/M = pick(candidates) + candidates.Remove(M) + B.key = M.key + var/datum/antagonist/blob_infected/blob_datum = new + 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) + to_chat(B, span_userdanger("Теперь вы мышь, заражённая спорами Блоба. Найдите какое-нибудь укромное место до того, как вы взорветесь и станете Блобом! Вы можете перемещаться по вентиляции, нажав Alt+ЛКМ на вентиляционном отверстии.")) + log_game("[B.key] has become blob infested mouse.") + notify_ghosts("Заражённая мышь появилась в [get_area(B)].", source = B, action = NOTIFY_FOLLOW) + return TRUE + + /datum/game_mode/proc/process_blob_stages() if(!GLOB.blob_cores.len) return @@ -156,6 +183,7 @@ if(blob_stage == BLOB_STAGE_ZERO && GLOB.blobs.len >= FIRST_STAGE_COEF * blob_win_count) 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) diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm index c8035aa678a..5ef89c11781 100644 --- a/code/game/gamemodes/blob/blob_finish.dm +++ b/code/game/gamemodes/blob/blob_finish.dm @@ -48,10 +48,10 @@ to_chat(world, "Целью блоба было:") if(blob_objective.check_completion()) - to_chat(world, "
[blob_objective.explanation_text] Success!") + to_chat(world, "
[blob_objective.explanation_text] Success!") SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[blob_objective.type]", "SUCCESS")) else - to_chat(world, "
[blob_objective.explanation_text] Fail.") + to_chat(world, "
[blob_objective.explanation_text] Fail.") SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[blob_objective.type]", "FAIL")) return TRUE @@ -62,20 +62,20 @@ var/list/blobernauts = blobs["blobernauts"] if(blob_infected?.len) declare_blob_completion() - var/text = "Блоб[(blob_infected.len > 1 ? "ами были" : "ом был")]:" + var/text = "
Блоб[(blob_infected.len > 1 ? "ами были" : "ом был")]:" for(var/datum/mind/blob in blob_infected) - text += "
[blob.key] был [blob.name]" + text += "
[blob.key] был [blob.name]" if(blob_offsprings?.len) - text += "
Потомк[(blob_offsprings.len > 1 ? "ами блоба были" : "ом блоба был")]:" + text += "

Потомк[(blob_offsprings.len > 1 ? "ами блоба были" : "ом блоба был")]:" for(var/datum/mind/blob in blob_offsprings) - text += "
[blob.key] был [blob.name]" + text += "
[blob.key] был [blob.name]" if(blobernauts?.len) - text += "
Блобернаут[(blobernauts.len > 1 ? "ами были" : "ом был")]:" + text += "

Блобернаут[(blobernauts.len > 1 ? "ами были" : "ом был")]:" for(var/datum/mind/blob in blobernauts) - text += "
[blob.key] был [blob.name]" + text += "
[blob.key] был [blob.name]" to_chat(world, text) return TRUE diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 3ae58f90f90..547462a3317 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -205,6 +205,9 @@ if(!HAS_TRAIT(src, TRAIT_NEGATES_GRAVITY)) return ..() +/mob/living/simple_animal/hostile/blob/blobbernaut/proc/add_to_gamemode() + var/list/blobernauts = SSticker?.mode?.blobs["blobernauts"] + blobernauts |= mind /mob/living/simple_animal/hostile/blob/blobbernaut/Life(seconds, times_fired) if(stat != DEAD && (getBruteLoss() || getFireLoss())) // Heal on blob structures @@ -224,6 +227,7 @@ name = text("blobbernaut ([rand(1, 1000)])") /mob/living/simple_animal/hostile/blob/blobbernaut/death(gibbed) + mind.name = name // Only execute the below if we successfully died . = ..() if(!.) @@ -240,8 +244,12 @@ /mob/living/simple_animal/hostile/blob/blobbernaut/proc/blob_talk() var/message = input(src, "Announce to the overmind", "Blob Telepathy") - var/rendered = "Blob Telepathy, [name]([overmind]) states, \"[message]\"" + var/rendered = "Blob Telepathy, [name]([overmind]) states, \"[message]\"" if(message) for(var/mob/M in GLOB.mob_list) - if(isovermind(M) || isobserver(M) || isblobbernaut(M) || isblobinfected(M.mind)) + if(isovermind(M) || isblobbernaut(M) || isblobinfected(M.mind)) M.show_message(rendered, 2) + else if(isobserver(M) && !isnewplayer(M)) + var/rendered_ghost = "Blob Telepathy, [name]([overmind]) \ + (F) states, \"[message]\"" + M.show_message(rendered_ghost, 2) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index a6a5cd5cb75..686be3de123 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -16,13 +16,11 @@ GLOB.blob_cores += src START_PROCESSING(SSobj, src) GLOB.poi_list |= src + adjustcolors(color) //so it atleast appears if(!overmind) create_overmind(new_overmind) - adjustcolors(color) //so it atleast appears if(offspring) is_offspring = TRUE - if(overmind) - adjustcolors(overmind.blob_reagent_datum.color) point_rate = new_rate ..(loc, h) @@ -73,7 +71,7 @@ obj_integrity = min(max_integrity, obj_integrity + 1) if(overmind) overmind.update_health_hud() - if(overmind) + if(overmind?.blob_reagent_datum?.color) for(var/i = 1; i < 8; i += i) Pulse(0, i, overmind.blob_reagent_datum.color) else @@ -85,7 +83,7 @@ var/obj/structure/blob/normal/B = locate() in get_step(src, b_dir) if(B) B.change_to(/obj/structure/blob/shield/core) - if(B && overmind) + if(B && overmind?.blob_reagent_datum?.color) B.color = overmind.blob_reagent_datum.color else B.color = color @@ -124,8 +122,6 @@ B.key = C.key B.blob_core = src overmind = B - B.select_reagent() - color = overmind.blob_reagent_datum.color B.is_offspring = is_offspring addtimer(CALLBACK(src, PROC_REF(add_datum_if_not_exist)), TIME_TO_ADD_OM_DATUM) log_game("[B.key] has become Blob [is_offspring ? "offspring" : ""]") @@ -146,11 +142,13 @@ return ..() /obj/structure/blob/core/proc/add_datum_if_not_exist() + overmind.select_reagent() if(!overmind.mind.has_antag_datum(/datum/antagonist/blob_overmind)) var/datum/antagonist/blob_overmind/overmind_datum = new overmind_datum.add_to_mode = TRUE overmind_datum.is_offspring = is_offspring if(overmind.blob_reagent_datum) - overmind_datum = overmind.blob_reagent_datum + overmind_datum.reagent = overmind.blob_reagent_datum overmind.mind.add_antag_datum(overmind_datum) + color = overmind.blob_reagent_datum.color diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 5dbd411ead7..cea6a7f885b 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -81,10 +81,14 @@ return var/rendered = "Blob Telepathy, [name]([blob_reagent_datum.name]) states, \"[message]\"" - for(var/mob/M in GLOB.mob_list) - if(isovermind(M) || isobserver(M) || isblobbernaut(M) || isblobinfected(M.mind)) + if(isovermind(M) || isblobbernaut(M) || isblobinfected(M.mind)) M.show_message(rendered, 2) + else if(isobserver(M) && !isnewplayer(M)) + var/rendered_ghost = "Blob Telepathy, \ + [name]([blob_reagent_datum.name]) \ + (F) states, \"[message]\"" + M.show_message(rendered_ghost, 2) /mob/camera/blob/blob_act(obj/structure/blob/B) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 8ead15259e1..f2ec8f7c9ac 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -247,9 +247,6 @@ var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new (get_turf(b_fac)) qdel(b_fac) blobber.key = C.key - if(blobber.mind in SSticker?.mode?.blobs["blobernauts"]) - SSticker?.mode?.blobs["blobernauts"] -= blobber.mind - SSticker?.mode?.blobs["blobernauts"] += blobber.mind log_game("[blobber.key] has spawned as Blobbernaut") to_chat(blobber, "Вы блобернаут! Вы должны помочь всем формам блоба в их миссии по уничтожению всего!") to_chat(blobber, "Вы исцеляетесь, стоя на плитках блоба, однако вы будете медленно разлагаться, если получите урон за пределами блоба.") @@ -259,6 +256,7 @@ blob_mobs.Add(blobber) blobber.AIStatus = AI_OFF blobber.LoseTarget() + addtimer(CALLBACK(blobber, TYPE_PROC_REF(/mob/living/simple_animal/hostile/blob/blobbernaut/, add_to_gamemode)), TIME_TO_ADD_OM_DATUM) return TRUE diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 9b8792f3c09..15cf3a2534d 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -115,10 +115,13 @@ return log_admin("[key_name(owner)] tried making [antnum] blobs with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making [antnum] blobs with One-Click-Antag") - - if(SSticker && SSticker.mode && SSticker.mode.make_blobs(antnum)) - return TRUE - return FALSE + var/result = FALSE + switch(alert(usr, "Вы хотите создать блобов из членов экипажа или же с помощью инфицированных мышек?", "", "Из экипажа", "С помощью мышек")) + if("Из экипажа") + result = SSticker?.mode?.make_blobs(antnum) + if("С помощью мышек") + result = SSticker?.mode?.make_blobized_mouses(antnum) + return result /datum/admins/proc/makeRevs() diff --git a/code/modules/antagonists/blob/blob_actions.dm b/code/modules/antagonists/blob/blob_actions.dm new file mode 100644 index 00000000000..8b183e327ad --- /dev/null +++ b/code/modules/antagonists/blob/blob_actions.dm @@ -0,0 +1,53 @@ +/datum/action/innate/blob + icon_icon = 'icons/mob/actions/actions.dmi' + background_icon_state = "bg_default_on" + +/datum/action/innate/blob/comm + name = "Blob Telepathy" + desc = "Телепатически отправляет сообщение всем блобам, иблобернаутам и зараженным блобом" + button_icon_state = "alien_whisper" + check_flags = AB_CHECK_CONSCIOUS|AB_TRANSFER_MIND + +/datum/action/innate/blob/comm/Activate() + var/input = stripped_input(usr, "Выберите сообщение для отправки другому блобу.", "Blob Telepathy", "") + if(!input || !IsAvailable()) + return + blob_talk(usr, input) + return + +/datum/action/innate/blob/self_burst + icon_icon = 'icons/mob/blob.dmi' + button_icon = 'icons/mob/blob.dmi' + background_icon_state = "block" + button_icon_state = "ui_tocore" + name = "Self burst" + desc = "Позволяет лопнуть носителя и превратиться в блоба досрочно." + check_flags = AB_CHECK_CONSCIOUS|AB_TRANSFER_MIND + +/datum/action/innate/blob/self_burst/Activate() + var/input = alert(usr,"Вы действительно хотите лопнуть себя и превратиться в блоба досрочно? Это действие необратимо.", "", "Да", "Нет") == "Да" + if(!input || !IsAvailable()) + return + var/datum/antagonist/blob_infected/blob = usr?.mind?.has_antag_datum(/datum/antagonist/blob_infected) + if(!blob) + return + blob.burst_blob() + return + +/proc/blob_talk(mob/living/user, message) + add_say_logs(user, message, language = "BLOB") + + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + + if(!message) + return + + var/rendered = "Blob Telepathy, [user.name] states, \"[message]\"" + for(var/mob/M in GLOB.mob_list) + if(isovermind(M) || isblobbernaut(M) || isblobinfected(M.mind)) + M.show_message(rendered, 2) + else if(isobserver(M) && !isnewplayer(M)) + var/rendered_ghost = "Blob Telepathy, [user.name] \ + (F) states, \"[message]\"" + M.show_message(rendered_ghost, 2) + diff --git a/code/modules/antagonists/blob/blob_infected_datum.dm b/code/modules/antagonists/blob/blob_infected_datum.dm index 8d4bc64d3f5..b1f9cebee88 100644 --- a/code/modules/antagonists/blob/blob_infected_datum.dm +++ b/code/modules/antagonists/blob/blob_infected_datum.dm @@ -39,6 +39,8 @@ var/atom/movable/screen/time_to_burst_display //Blob talk ability var/datum/action/innate/blob/comm/blob_talk_action + //Blob burst ability + var/datum/action/innate/blob/self_burst/blob_burst_action //Final time to burst. var/burst_wait_time //Total burst warning text @@ -64,7 +66,7 @@ var/datum/game_mode/mode = SSticker.mode if(add_to_mode && mode && !(owner in mode.blobs["infected"])) mode.blob_win_count += BLOB_TARGET_POINT_PER_CORE - mode.blobs["infected"] += owner + mode.blobs["infected"] |= owner mode.update_blob_objective() @@ -85,7 +87,7 @@ /datum/antagonist/blob_infected/apply_innate_effects(mob/living/mob_override) var/user = ..(mob_override) - add_blob_talk(user) + add_blob_actions(user) add_burst_display(user) is_processing = TRUE return user @@ -93,7 +95,7 @@ /datum/antagonist/blob_infected/remove_innate_effects(mob/living/mob_override) var/user = ..(mob_override) - remove_blob_talk(user) + remove_blob_actions(user) remove_burst_display(user) is_processing = FALSE return user @@ -144,22 +146,27 @@ return -/datum/antagonist/blob_infected/proc/add_blob_talk(mob/living/antag_mob) +/datum/antagonist/blob_infected/proc/add_blob_actions(mob/living/antag_mob) if(!antag_mob) return if(!blob_talk_action) blob_talk_action = new blob_talk_action.Grant(antag_mob) - antag_mob.update_action_buttons(TRUE) + if(!blob_burst_action) + blob_burst_action = new + blob_burst_action.Grant(antag_mob) -/datum/antagonist/blob_infected/proc/remove_blob_talk(mob/living/antag_mob) +/datum/antagonist/blob_infected/proc/remove_blob_actions(mob/living/antag_mob) if(!antag_mob) return if(!blob_talk_action) return blob_talk_action.Remove(antag_mob) - antag_mob.update_action_buttons(TRUE) + if(!blob_burst_action) + return + blob_burst_action.Remove(antag_mob) + /datum/antagonist/blob_infected/proc/add_burst_display(mob/living/antag_mob) if(!antag_mob) @@ -200,6 +207,7 @@ log_admin("[key_name(C)] was in space when attempting to burst as a blob.") message_admins("[key_name_admin(C)] was in space when attempting to burst as a blob.") C.was_bursted = TRUE + kill_borer_inside() C.gib() if(need_new_blob) SSticker?.mode?.make_blobs(1, TRUE) @@ -219,7 +227,7 @@ var/mob/M = C.loc M.gib() if(!is_station_level(location.z) || isspaceturf(location)) - burst_blob_in_space(FALSE) + burst_blob_in_space(!warn_blob) return if(blob_client && location) mode.bursted_blobs_count++ @@ -227,6 +235,7 @@ var/datum/antagonist/blob_overmind/overmind = transform_to_overmind() owner.remove_antag_datum(/datum/antagonist/blob_infected) + kill_borer_inside() C.gib() var/obj/structure/blob/core/core = new(location, 200, blob_client, SSticker.mode.blob_point_rate) if(!(core.overmind && core.overmind.mind)) @@ -244,9 +253,15 @@ overmind.is_tranformed = TRUE return overmind +/datum/antagonist/blob_infected/proc/kill_borer_inside() + var/mob/living/simple_animal/borer/borer = owner?.current?.has_brain_worms() + if(borer) + borer.leave_host() + borer.death() + /** - * Takes any datum `source` and checks it for traitor datum. + * Takes any datum `source` and checks it for blob_infected datum. */ /proc/isblobinfected(datum/source) if(!source) diff --git a/code/modules/antagonists/blob/blob_overmind_datum.dm b/code/modules/antagonists/blob/blob_overmind_datum.dm index 9ba00c0677a..bb4b319c9ef 100644 --- a/code/modules/antagonists/blob/blob_overmind_datum.dm +++ b/code/modules/antagonists/blob/blob_overmind_datum.dm @@ -27,8 +27,8 @@ if(!is_tranformed) mode.blob_win_count += BLOB_TARGET_POINT_PER_CORE if(is_offspring) - mode.blobs["offsprings"] += owner - else mode.blobs["infected"] += owner + mode.blobs["offsprings"] |= owner + else mode.blobs["infected"] |= owner mode.update_blob_objective() @@ -75,3 +75,23 @@ messages += "Сочетания клавиш: ЛКМ = установить простую плитку | CTRL + ЛКМ = Улучшить плитку | СКМ = Указать цель спорам | Alt + ЛКМ = Удалить плитку" messages += "Попытайтесь отправить телепатическое сообщение всем остальным надразумами, что позволит вам координировать свои действия с ними." return messages + +/** + * Takes any datum `source` and checks it for blob_overmind datum. + */ +/proc/isblobovermind(datum/source) + if(!source) + return FALSE + + if(istype(source, /datum/mind)) + var/datum/mind/our_mind = source + return our_mind.has_antag_datum(/datum/antagonist/blob_overmind) && isovermind(our_mind.current) + + if(!ismob(source)) + return FALSE + + var/mob/mind_holder = source + if(!mind_holder.mind) + return FALSE + + return mind_holder.mind.has_antag_datum(/datum/antagonist/blob_overmind) && isovermind(mind_holder) diff --git a/code/modules/antagonists/blob/blob_talk.dm b/code/modules/antagonists/blob/blob_talk.dm deleted file mode 100644 index 1e9eef2e9b8..00000000000 --- a/code/modules/antagonists/blob/blob_talk.dm +++ /dev/null @@ -1,30 +0,0 @@ -/datum/action/innate/blob - icon_icon = 'icons/mob/actions/actions.dmi' - background_icon_state = "bg_default_on" - -/datum/action/innate/blob/comm - name = "Blob Telepathy" - desc = "Телепатически отправляет сообщение всем блобам, иблобернаутам и зараженным блобом" - button_icon_state = "alien_whisper" - check_flags = AB_CHECK_CONSCIOUS|AB_TRANSFER_MIND - -/datum/action/innate/blob/comm/Activate() - var/input = stripped_input(usr, "Выберите сообщение для отправки другому блобу.", "Blob Telepathy", "") - if(!input || !IsAvailable()) - return - blob_talk(usr, input) - return - -/proc/blob_talk(mob/living/user, message) - add_say_logs(user, message, language = "BLOB") - - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) - - if(!message) - return - - var/rendered = "Blob Telepathy, [user.name] states, \"[message]\"" - - for(var/mob/M in GLOB.mob_list) - if(isovermind(M) || isobserver(M) || isblobbernaut(M) || isblobinfected(M.mind)) - M.show_message(rendered, 2) diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 307a6f57a4a..0759a9973aa 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -6,8 +6,6 @@ /datum/event/blob/announce(false_alarm) if(false_alarm) GLOB.event_announcement.Announce("Вспышка биологической угрозы 5-го уровня зафиксирована на борту станции [station_name()]. Всему персоналу надлежит сдержать её распространение любой ценой!", "ВНИМАНИЕ: БИОЛОГИЧЕСКАЯ УГРОЗА.", 'sound/AI/outbreak5.ogg') - if(!false_alarm) - SSshuttle.emergency.cancel() /datum/event/blob/start() processing = FALSE //so it won't fire again in next tick @@ -15,32 +13,9 @@ var/turf/T = pick(GLOB.blobstart) if(!T) return kill() - - var/list/candidates = SSghost_spawns.poll_candidates("Вы хотите сыграть за мышь, зараженную Блобом?", ROLE_BLOB, TRUE, source = /mob/living/simple_animal/mouse/blobinfected) - if(!length(candidates)) + var/num_blobs = round((num_station_players() / BLOB_PLAYERS_PER_CORE)) + 1 + if(!SSticker?.mode?.make_blobized_mouses(num_blobs)) log_and_message_admins("Warning: Could not spawn any mobs for event Blob") return kill() - - var/list/vents = get_valid_vent_spawns(exclude_mobs_nearby = TRUE, exclude_visible_by_mobs = TRUE) - if(!length(vents)) - return - - var/num_blobs = round((num_station_players() / BLOB_PLAYERS_PER_CORE)) + 1 - for(var/i in 1 to num_blobs) - if (length(candidates)) - var/obj/vent = pick(vents) - var/mob/living/simple_animal/mouse/B = new(vent.loc) - var/mob/M = pick(candidates) - candidates.Remove(M) - B.key = M.key - - - var/datum/antagonist/blob_infected/blob_datum = new - 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) - to_chat(B, span_userdanger("Теперь вы мышь, заражённая спорами Блоба. Найдите какое-нибудь укромное место до того, как вы взорветесь и станете Блобом! Вы можете перемещаться по вентиляции, нажав Alt+ЛКМ на вентиляционном отверстии.")) - log_game("[B.key] has become blob infested mouse.") - notify_ghosts("Заражённая мышь появилась в [get_area(B)].", source = B, action = NOTIFY_FOLLOW) successSpawn = TRUE processing = TRUE // Let it naturally end, if it runs successfully diff --git a/code/modules/mob/living/living_infected_blob_mobs.dm b/code/modules/mob/living/living_infected_blob_mobs.dm index e71e3c4a25e..54a55d57bee 100644 --- a/code/modules/mob/living/living_infected_blob_mobs.dm +++ b/code/modules/mob/living/living_infected_blob_mobs.dm @@ -16,6 +16,10 @@ return if(mind.special_role == SPECIAL_ROLE_BLOB && !was_bursted) var/datum/antagonist/blob_infected/blob = mind.has_antag_datum(/datum/antagonist/blob_infected) + var/mob/living/simple_animal/borer/borer = has_brain_worms() + if(borer) + borer.leave_host() + borer.death() blob?.burst_blob(TRUE) /mob/living/simple_animal/can_be_blob() @@ -26,7 +30,7 @@ return FALSE return !(dna.species.name in BLOB_RESTRICTED_SPECIES) -/mob/living/simple_animal/can_be_blob() +/mob/living/simple_animal/imp/can_be_blob() return FALSE /mob/living/simple_animal/borer/can_be_blob() diff --git a/code/modules/reagents/chemistry/reagents/blob.dm b/code/modules/reagents/chemistry/reagents/blob.dm index 98cf7840847..ad3cd405f4a 100644 --- a/code/modules/reagents/chemistry/reagents/blob.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -170,7 +170,7 @@ /datum/reagent/blob/teslium_paste name = "Теслиевая паста" - description = "Наносит средний урон ожогами и вызывает удары током у тех, кого задевает, со временем." + description = "Наносит средний урон ожогами и вызывает удары током у тех, кого задевает, со временем." id = "teslium_paste" color = "#20324D" complementary_color = "#412968" diff --git a/paradise.dme b/paradise.dme index 9d72412d5a7..8d5e7ac8f89 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1519,9 +1519,9 @@ #include "code\modules\antagonists\_common\antag_hud.dm" #include "code\modules\antagonists\_common\antag_spawner.dm" #include "code\modules\antagonists\_common\antag_team.dm" +#include "code\modules\antagonists\blob\blob_actions.dm" #include "code\modules\antagonists\blob\blob_infected_datum.dm" #include "code\modules\antagonists\blob\blob_overmind_datum.dm" -#include "code\modules\antagonists\blob\blob_talk.dm" #include "code\modules\antagonists\changeling\changeling_datum.dm" #include "code\modules\antagonists\changeling\changeling_power.dm" #include "code\modules\antagonists\changeling\evolution_menu.dm"