From 249a965b9ed72eecf868ff701414d47535f0d645 Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Fri, 8 Mar 2024 01:55:38 +1000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BB=D0=BB=D0=B5=D0=BA=D1=86?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B7=D0=B0=D0=B4=D0=B0?= =?UTF-8?q?=D1=87=20=D0=B8=20=D0=BC=D0=B5=D0=BB=D0=BE=D1=87=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../antagonists/code/antag_mix/antag_mix.dm | 6 ++ .../antag_mix/scenarios/minor_scenarios.dm | 4 - modular_ss220/antagonists/code/guns/biogun.dm | 13 ++- .../antagonists/code/guns/biogun_ammo.dm | 7 +- .../antagonists/code/guns/spikegun.dm | 9 +- modular_ss220/antagonists/code/objectives.dm | 31 +++--- .../objects/packs/vox_shop_defines.dm | 22 ++-- .../objects/packs/vox_shop_pack_bio.dm | 10 +- .../code/vox_raider/objects/vox_shop.dm | 2 +- .../code/vox_raider/objects/vox_trade.dm | 70 ++++++++---- .../code/vox_raider/vox_raider_datum.dm | 14 +-- .../code/vox_raider/vox_raider_mode.dm | 100 ++++++++++++++++++ .../code/vox_raider/vox_raider_team.dm | 32 ++++-- 13 files changed, 242 insertions(+), 78 deletions(-) diff --git a/modular_ss220/antagonists/code/antag_mix/antag_mix.dm b/modular_ss220/antagonists/code/antag_mix/antag_mix.dm index f26016c9dc9a..572e0199fd01 100644 --- a/modular_ss220/antagonists/code/antag_mix/antag_mix.dm +++ b/modular_ss220/antagonists/code/antag_mix/antag_mix.dm @@ -174,3 +174,9 @@ /datum/game_mode/antag_mix/proc/log_antag_mix(text) log_debug("\[ANTAG MIX\] [text]") + +/datum/game_mode/antag_mix/get_end_of_round_antagonist_statistics() + . = list() + . += auto_declare_completion_vox_raiders() + listclearnulls(.) + . += ..() diff --git a/modular_ss220/antagonists/code/antag_mix/scenarios/minor_scenarios.dm b/modular_ss220/antagonists/code/antag_mix/scenarios/minor_scenarios.dm index 4a9f161b521b..f0f2c7ae1aad 100644 --- a/modular_ss220/antagonists/code/antag_mix/scenarios/minor_scenarios.dm +++ b/modular_ss220/antagonists/code/antag_mix/scenarios/minor_scenarios.dm @@ -10,7 +10,6 @@ weight = 1 antag_cap = 1 candidates_required = 1 - scaled_times = 5 restricted_roles = list("Cyborg") protected_roles = list( "Security Cadet", @@ -40,7 +39,6 @@ weight = 1 antag_cap = 1 candidates_required = 1 - scaled_times = 3 restricted_roles = list("Cyborg", "AI") protected_roles = list( "Security Cadet", @@ -71,7 +69,6 @@ weight = 1 antag_cap = 1 candidates_required = 1 - scaled_times = 3 restricted_roles = list("Cyborg", "AI", "Chaplain") protected_roles = list( "Security Cadet", @@ -104,7 +101,6 @@ antag_cap = 2 candidates_required = 2 team_size = 2 - scaled_times = 3 restricted_roles = list("Cyborg", "AI") protected_roles = list( "Security Cadet", diff --git a/modular_ss220/antagonists/code/guns/biogun.dm b/modular_ss220/antagonists/code/guns/biogun.dm index 2d4c92182253..40340559fa7f 100644 --- a/modular_ss220/antagonists/code/guns/biogun.dm +++ b/modular_ss220/antagonists/code/guns/biogun.dm @@ -11,24 +11,30 @@ max_capacity = 3 valid_projectile_type = /obj/item/biocore +/obj/item/gun/throw/biogun/Initialize(mapload) + . = ..() + update_icon() + /obj/item/gun/throw/biogun/process_chamber() . = ..() update_icon() /obj/item/gun/throw/biogun/update_icon_state() . = ..() - var/inhand_ratio = CEILING((length(loaded_projectiles) / max_capacity) * inhand_charge_sections, 1) + var/num = length(loaded_projectiles) + (to_launch ? 1 : 0) + var/inhand_ratio = CEILING((num / max_capacity) * inhand_charge_sections, 1) var/new_item_state = "[initial(item_state)][inhand_ratio]" item_state = new_item_state /obj/item/gun/throw/biogun/update_overlays() . = ..() - var/num = length(loaded_projectiles) + var/num = length(loaded_projectiles) + (to_launch ? 1 : 0) if(num) num = min(num, max_capacity) . += "[icon_state]_charge[num]" /obj/item/gun/throw/biogun/notify_ammo_count() + update_icon() var/amount = get_ammocount() if(get_ammocount() >= 1) return span_notice("[src] заряжен [amount]/[max_capacity].") @@ -60,6 +66,7 @@ desc = "Небольшое биомеханическое проворное существо на высоких ножках, мешающее и изматывающее тех, кому оно не понравилось." icon_state = "stamina" icon_living = "stamina" + density = FALSE obj_damage = 0 speed = 0.25 melee_damage_type = STAMINA @@ -95,6 +102,7 @@ desc = "Маленькое биомеханическое существо с острыми клыкам с половину его тела." icon_state = "kusaka" icon_living = "kusaka" + density = FALSE speed = 0.5 obj_damage = 0 melee_damage_lower = 5 @@ -131,6 +139,7 @@ desc = "Маленькое биомеханическое иглоподобное существо." icon_state = "tox" icon_living = "tox" + density = FALSE melee_damage_type = TOX melee_damage_lower = 5 melee_damage_upper = 15 diff --git a/modular_ss220/antagonists/code/guns/biogun_ammo.dm b/modular_ss220/antagonists/code/guns/biogun_ammo.dm index ba7037f9ba31..a590681958ed 100644 --- a/modular_ss220/antagonists/code/guns/biogun_ammo.dm +++ b/modular_ss220/antagonists/code/guns/biogun_ammo.dm @@ -26,12 +26,11 @@ /obj/item/biocore/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) playsound(loc,'sound/weapons/bolathrow.ogg', 50, TRUE) - if(is_spin) - SpinAnimation() - if(!..()) - return + . = ..() /obj/item/biocore/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) + if(!isliving(hit_atom)) + return . = ..() spawn_mobs() hurt_impact(hit_atom) diff --git a/modular_ss220/antagonists/code/guns/spikegun.dm b/modular_ss220/antagonists/code/guns/spikegun.dm index fbca29f41684..cf783f1bfe80 100644 --- a/modular_ss220/antagonists/code/guns/spikegun.dm +++ b/modular_ss220/antagonists/code/guns/spikegun.dm @@ -15,7 +15,7 @@ burst_size = 3 // выстреливает всегда очередью shaded_charge = TRUE can_charge = FALSE - charge_delay = 10 + charge_delay = 4 cell_type = /obj/item/stock_parts/cell/vox_spike ammo_type = list(/obj/item/ammo_casing/energy/vox_spike) var/can_reload = TRUE @@ -53,7 +53,7 @@ charge_sections = 6 inhand_charge_sections = 6 selfcharge = TRUE - charge_delay = 10 + charge_delay = 4 ammo_type = list(/obj/item/ammo_casing/energy/vox_spike/long) /obj/item/gun/energy/spike/long/process() @@ -77,15 +77,16 @@ ammo_type = list(/obj/item/ammo_casing/energy/vox_spike/big) selfcharge = TRUE can_reload = FALSE + charge_delay = 8 var/nutrition_cost = 20 // Сколько нутриентов тратится за 1 тик var/brute_cost = 5 // Цена за то что ты не вокс var/stamine_cost = 20 // Цена за то что ты не вокс /obj/item/gun/energy/spike/bio/process() if(selfcharge) - if(charge_tick < charge_delay) - return ..() if(!ishuman(loc)) + return FALSE + if(charge_tick < charge_delay) return ..() var/mob/living/carbon/human/user = loc if(user.nutrition <= NUTRITION_LEVEL_HYPOGLYCEMIA) diff --git a/modular_ss220/antagonists/code/objectives.dm b/modular_ss220/antagonists/code/objectives.dm index 5312b2ca8c34..abbce7cdfb88 100644 --- a/modular_ss220/antagonists/code/objectives.dm +++ b/modular_ss220/antagonists/code/objectives.dm @@ -6,9 +6,9 @@ /// На сколько ценность должна быть "цена" чтобы её засчитать var/precious_value = 200 /// Сколько нужно украсть дополнительных ценностей в зависимости от количества людей в игре - var/dynamic_amount = 3 + var/dynamic_amount = 5 /// Каждый X игроков добавляем доп. число ценностей - var/dynamic_player = 10 + var/dynamic_player = 15 /datum/objective/raider_steal/update_explanation_text() explanation_text = "Соберите [precious_amount] ценностей, у каждой из которых цена минимум на [precious_value] кикикридитов. Все ценности должны быть приняты Расчичетчикиком." @@ -28,23 +28,23 @@ /datum/objective/raider_steal/check_completion() var/list_count = 0 - for(var/obj/machinery/vox_trader/trader in GLOB.machines) - if(trader.precious_value) - continue - list_count += trader.precious_collected_names_list // !!!!! Вывести в конце гринтекста что собрали !!!!!!!! - + var/obj/machinery/vox_trader/trader = locate() in GLOB.machines + if(!trader) + return + trader.synchronize_traders_stats() + for(var/I in trader.precious_collected_dict) + list_count += trader.precious_collected_dict[I]["count"] if(list_count >= precious_amount) return TRUE return FALSE - /datum/objective/raider_entirety_steal name = "Raider entirety theft" needs_target = FALSE /// Общая сумма ценностей - var/precious_value = 10000 + var/precious_value = 20000 /// Сколько нужно украсть дополнительных ценностей на каждого игрока - var/dynamic_value = 100 + var/dynamic_value = 200 /datum/objective/raider_entirety_steal/update_explanation_text() explanation_text = "Соберите ценностей на сумму [precious_value]. Все ценности должны быть приняты Расчичетчикиком." @@ -66,14 +66,12 @@ /datum/objective/raider_entirety_steal/check_completion() var/value_sum = 0 for(var/obj/machinery/vox_trader/trader in GLOB.machines) - if(precious_value <= trader.precious_collected_value) - value_sum += trader.precious_collected_value - if(precious_value <= value_sum) + value_sum += trader.value_sum + if(value_sum >= precious_value) return TRUE return FALSE - /datum/objective/raider_collection_access name = "Raider access collect" needs_target = FALSE @@ -86,6 +84,7 @@ /datum/objective/raider_collection_access/New(text, datum/team/team_to_join) . = ..() access_amount = length(get_all_accesses()) + update_explanation_text() /datum/objective/raider_collection_access/check_completion() for(var/obj/machinery/vox_trader/trader in GLOB.machines) @@ -103,6 +102,10 @@ /datum/objective/raider_collection_tech/update_explanation_text() explanation_text = "Соберите [tech_amount] уникальных технологий [tech_min_level] или больше уровня. Все технологии должны быть приняты Расчичетчикиком." +/datum/objective/raider_collection_tech/New(text, datum/team/team_to_join) + . = ..() + update_explanation_text() + /datum/objective/raider_collection_tech/check_completion() for(var/obj/machinery/vox_trader/trader in GLOB.machines) if(length(trader.collected_tech_dict)) diff --git a/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_defines.dm b/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_defines.dm index 4361a1da2f9a..bcc05de20eb7 100644 --- a/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_defines.dm +++ b/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_defines.dm @@ -1,14 +1,14 @@ // CATEGORY -#define VOX_PACK_CLOTHES "Одежда" -#define VOX_PACK_EQUIPMENT "Снаряжение" -#define VOX_PACK_RAIDER "Наборы Рейдера" -#define VOX_PACK_MERCENARIES "Наборы Наемника" -#define VOX_PACK_KIT "Полные Наборы" -#define VOX_PACK_CONSUMABLES "Расходники" -#define VOX_PACK_GOODS "Товары" -#define VOX_PACK_MISC "Разное" +#define VOX_PACK_CLOTHES "Одежда" +#define VOX_PACK_EQUIPMENT "Снаряжение" +#define VOX_PACK_RAIDER "Наборы Рейдера" +#define VOX_PACK_MERCENARIES "Наборы Наемника" +#define VOX_PACK_KIT "Полные Наборы" +#define VOX_PACK_CONSUMABLES "Расходники" +#define VOX_PACK_GOODS "Товары" +#define VOX_PACK_MISC "Разное" // Weapons -#define VOX_PACK_SPIKE "Шипометы" -#define VOX_PACK_DART "Дротики" -#define VOX_PACK_BIO "Биооружие" +#define VOX_PACK_SPIKE "Шипометы" +#define VOX_PACK_DART "Дротики" +#define VOX_PACK_BIO "Биооружие" diff --git a/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_pack_bio.dm b/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_pack_bio.dm index d5db49fbec9f..9a8bced541e6 100644 --- a/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_pack_bio.dm +++ b/modular_ss220/antagonists/code/vox_raider/objects/packs/vox_shop_pack_bio.dm @@ -19,35 +19,35 @@ cost = 0 contains = list(/obj/item/biocore/viscerator) -/datum/vox_pack/bio/core/ +/datum/vox_pack/bio/core/stamine name = "Биоядро (Стакикамка х3)" desc = "Биомеханизм изматывающий своих жертв." reference = "B_B_STAM" cost = 0 contains = list(/obj/item/biocore/stamina) -/datum/vox_pack/bio/core/ +/datum/vox_pack/bio/core/acid name = "Биоядро (Асикикид х1)" desc = "Кислотный жгущий биомеханизм." reference = "B_B_ACID" cost = 0 contains = list(/obj/item/biocore/acid) -/datum/vox_pack/bio/core/ +/datum/vox_pack/bio/core/kusaka name = "Биоядро (Кусакика х4)" desc = "Кусачий маленький биомеханизм." reference = "B_B_KUS" cost = 0 contains = list(/obj/item/biocore/kusaka) -/datum/vox_pack/bio/core/ +/datum/vox_pack/bio/core/taran name = "Биоядро (Таракикан х1)" desc = "Броневой биомеханизм, приспособленный для вышибания дверей." reference = "B_B_TAT" cost = 0 contains = list(/obj/item/biocore/taran) -/datum/vox_pack/bio/core/ +/datum/vox_pack/bio/core/tox name = "Биоядро (Токсикикик х3)" desc = "Иглоподобный биомеханизм для впрыскивания токсин." reference = "B_B_TOX" diff --git a/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm b/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm index ed77ed84505a..8878e7be200f 100644 --- a/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm +++ b/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm @@ -132,7 +132,7 @@ data["cart_price"] = calculate_cart_cash() var/list/vox_raider_members = list() - for(var/datum/team/vox_raiders_team/team in subtypesof(/datum/team/vox_raiders_team)) + for(var/datum/team/vox_raiders/team in subtypesof(/datum/team/vox_raiders)) vox_raider_members.Add(team.members) data["vox_members"] = vox_raider_members // data["crewmembers"] = GLOB.crew_repository.health_data(viewing_current_z_level) diff --git a/modular_ss220/antagonists/code/vox_raider/objects/vox_trade.dm b/modular_ss220/antagonists/code/vox_raider/objects/vox_trade.dm index f83b11c11cee..995e4d6ab332 100644 --- a/modular_ss220/antagonists/code/vox_raider/objects/vox_trade.dm +++ b/modular_ss220/antagonists/code/vox_raider/objects/vox_trade.dm @@ -1,8 +1,6 @@ /obj/machinery/vox_trader name = "Расчичетчикик" desc = "Приемная и расчетная связная машина для ценностей. Проста также как еда воксов." - // icon = 'icons/obj/recycling.dmi' - // icon_state = "grinder-o0" icon = 'modular_ss220/antagonists/icons/trader_machine.dmi' icon_state = "trader-idle-off" var/icon_state_on = "trader-idle" @@ -22,8 +20,8 @@ // Данные для подсчета драгоценностей выполнения задачи. // Обновляются при первом взаимодействии если есть воксы-рейдеры. - var/precious_collected_names_list = list() - var/precious_collected_value = 0 + var/precious_collected_dict = list() + var/value_sum = 0 var/precious_value var/collected_access_list = list() var/collected_tech_dict = list() @@ -66,6 +64,8 @@ // дополнительные суммы за ценности var/list/valuable_objects_dict = list( /obj/machinery/nuclearbomb = 5000, + /obj/item/mod/core = 1000, + /obj/item/mod = 300, ) var/list/valuable_guns_dict = list( /obj/item/gun/energy/taser = 300, @@ -396,19 +396,53 @@ values_sum += values_sum_precious // Даем бонус за особые ценности return round(values_sum) -/obj/machinery/vox_trader/proc/precious_grading(mob/user, obj/I, value) +/obj/machinery/vox_trader/proc/precious_grading(mob/user, obj/O, value) if(!user) return - if(!precious_value) - var/list/objectives = user.mind?.get_all_objectives() - if(!length(objectives)) - return - var/datum/objective/raider_steal/objective = locate() in objectives - precious_value = objective.precious_value - if(value >= precious_value) - precious_collected_names_list += I.name - precious_collected_value += value - - // var/datum/antagonist/vox_raider/raider = user.mind?.has_antag_datum(/datum/antagonist/vox_raider) - // if(!raider) - // return + value_sum += value + if(!correct_precious_value(user)) + return + update_precious_collected_dict(O.name, value) + +/obj/machinery/vox_trader/proc/correct_precious_value(mob/user) + if(precious_value) + return TRUE + if(!user) + return FALSE + var/list/objectives = user.mind?.get_all_objectives() + if(!length(objectives)) + return FALSE + var/datum/objective/raider_steal/objective = locate() in objectives + precious_value = objective.precious_value + return TRUE + +/obj/machinery/vox_trader/proc/update_precious_collected_dict(object_name, object_value) + if(!correct_precious_value()) + return + if(object_value >= precious_value) + if(object_name in precious_collected_dict) + precious_collected_dict[object_name]["count"] += 1 + precious_collected_dict[object_name]["value"] += object_value + else + precious_collected_dict += list("[object_name]" = list("count" = 1, "value" = object_value)) + +/obj/machinery/vox_trader/proc/synchronize_traders_stats() + for(var/obj/machinery/vox_trader/trader in GLOB.machines) + if(trader == src) + continue + + value_sum += trader.value_sum + + for(var/access in trader.collected_access_list) + if(access in collected_access_list) + continue + collected_access_list += access + + for(var/tech in trader.collected_tech_dict) + if(tech in collected_tech_dict) + collected_tech_dict[tech][1] = max(collected_tech_dict[tech][1], trader.collected_tech_dict[tech][1]) + continue + collected_tech_dict += tech + + for(var/dict in trader.precious_collected_dict) + update_precious_collected_dict(trader.precious_collected_dict[dict], trader.precious_collected_dict[dict]["value"]) diff --git a/modular_ss220/antagonists/code/vox_raider/vox_raider_datum.dm b/modular_ss220/antagonists/code/vox_raider/vox_raider_datum.dm index 6cc2852eb185..24d697716f8b 100644 --- a/modular_ss220/antagonists/code/vox_raider/vox_raider_datum.dm +++ b/modular_ss220/antagonists/code/vox_raider/vox_raider_datum.dm @@ -1,12 +1,12 @@ /datum/antagonist/vox_raider - name = "vox raider" + name = "Vox Raider" roundend_category = "vox raiders" job_rank = ROLE_VOX_RAIDER special_role = SPECIAL_ROLE_VOX_RAIDER antag_hud_name = "hudvoxraider" antag_hud_type = ANTAG_HUD_VOX_RAIDER wiki_page_name = "vox_raiders" - var/datum/team/vox_raiders_team/raiders_team = null + var/datum/team/vox_raiders/raiders_team = null /datum/antagonist/vox_raider/add_owner_to_gamemode() SSticker.mode.vox_raiders |= owner @@ -33,7 +33,7 @@ . += "Нужно больше ценностей!" -/datum/antagonist/vox_raider/create_team(datum/team/vox_raiders_team/team) +/datum/antagonist/vox_raider/create_team(datum/team/vox_raiders/team) if(!istype(team)) error("Wrong team type passed to [type].") return @@ -46,7 +46,7 @@ /datum/antagonist/vox_raider/proc/get_raider_names_text() PRIVATE_PROC(TRUE) - var/datum/team/vox_raiders_team/team = get_team() + var/datum/team/vox_raiders/team = get_team() if(!istype(team)) return "" @@ -97,7 +97,7 @@ choices.Remove(choice) candidates_list.Add(mind) - var/datum/team/vox_raiders_team/team = new(candidates_list, FALSE) + var/datum/team/vox_raiders/team = new(candidates_list, FALSE) for(var/datum/mind/mind in candidates_list) if(isnull(mind.add_antag_datum(src, team))) error("Antag datum couldn't be granted to new raider [mind.name] in `/datum/antagonist/vox_raider/proc/create_new_vox_raiders_team`") @@ -111,7 +111,7 @@ /datum/antagonist/vox_raider/proc/add_to_existing_vox_raiders_team(admin, datum/mind/raider_to_add) PRIVATE_PROC(TRUE) var/list/choices = list() - for(var/datum/team/vox_raiders_team/team in GLOB.antagonist_teams) + for(var/datum/team/vox_raiders/team in GLOB.antagonist_teams) var/list/member_ckeys = team.get_member_ckeys() choices["[team.name][length(member_ckeys) ? "([member_ckeys.Join(", ")])" : ""]"] = team @@ -124,7 +124,7 @@ if(!choice) return FALSE - var/datum/team/vox_raiders_team/team = choices[choice] + var/datum/team/vox_raiders/team = choices[choice] if(!team) stack_trace("Chosen vox raiders team `[choice]` was `null` for some reason.") diff --git a/modular_ss220/antagonists/code/vox_raider/vox_raider_mode.dm b/modular_ss220/antagonists/code/vox_raider/vox_raider_mode.dm index 43c82ed45707..0a3f8fc20553 100644 --- a/modular_ss220/antagonists/code/vox_raider/vox_raider_mode.dm +++ b/modular_ss220/antagonists/code/vox_raider/vox_raider_mode.dm @@ -19,3 +19,103 @@ to_chat(world, "Воксы - всей стаей падки на блестяшки и ценности, с ними можно выгодно поторговаться. Но больше ценностей они ценят друг друга.") to_chat(world, "Экипаж - следите за воксами внимательно, в том числе и за теми кто на станции, не допустите потерю дорогостоящего оборудования!") +/datum/game_mode/antag_mix/proc/auto_declare_completion_vox_raiders() + if(!length(vox_raiders)) + return + + var/list/text = list("
Прогресс Вокс'ов:") + for(var/datum/team/vox_raiders/team in GLOB.antagonist_teams) + if(!team.objective_holder) + continue + + var/count = 1 + var/teamwin = 1 + text += "
Стая [team.name] (" + for(var/datum/objective/objective in team.objective_holder.objectives) + if(objective.check_completion()) + text += "
Цель #[count]: [objective.explanation_text] Выполнена!" + SSblackbox.record_feedback("nested tally", "vox_objective", 1, list("[objective.type]", "SUCCESS")) + else + text += "
Цель #[count]: [objective.explanation_text] Провалена." + SSblackbox.record_feedback("nested tally", "vox_objective", 1, list("[objective.type]", "FAIL")) + teamwin = 0 + count++ + if(teamwin) + text += "
Стая успешно завершила свои цели!" + SSblackbox.record_feedback("tally", "vox_success", 1, "SUCCESS") + else + text += "
Стая провалилась!" + SSblackbox.record_feedback("tally", "wizard_success", 1, "FAIL") + var/is_survive = FALSE + for(var/datum/mind/mind in vox_raiders) + if(!mind.current || mind.current.stat==DEAD) + break + if(is_survive) + text += "
Вся стая выжила!" + else + text += "
У стаи есть потери!" + + var/obj/machinery/vox_trader/trader = locate() in GLOB.machines + if(!trader) + text += "
" + return text.Join("") + trader.synchronize_traders_stats() + + text += "

Всего заработано Кикикридитов: [trader.value_sum]" + + var/precious_count = 0 + var/precious_biggest_element + for(var/I in trader.precious_collected_dict) + var/value = trader.precious_collected_dict[I]["value"] + var/count = trader.precious_collected_dict[I]["count"] + var/value_average = value / count + var/element = list(I = value_average) + precious_count += count + if(!precious_biggest_element) + precious_biggest_element = element + continue + text += "
Самый дорогой проданный товар: [precious_biggest_element] ([precious_biggest_element[1]]), всего продано [trader.precious_collected_dict[precious_biggest_element]["count"]] штук." + + text += "

Собраны доступы:" + var/list/checked_accesses = list() + var/list/region_code = list( + REGION_GENERAL, REGION_SECURITY, REGION_MEDBAY, REGION_RESEARCH, + REGION_ENGINEERING, REGION_SUPPLY, REGION_COMMAND, REGION_CENTCOMM + ) + for(var/code in region_code) + var/list/region_accesses + if(code != REGION_CENTCOMM) + region_accesses = get_region_accesses(code) + else + region_accesses = list(ACCESS_CENT_GENERAL) + for(var/access in trader.collected_access_list) + if(access in region_accesses) + region_accesses.Remove(access) + checked_accesses += list(code = region_accesses) + for(var/code in region_code) + if(length(checked_accesses[code])) + continue + switch(code) + if(REGION_GENERAL) + text += "Собраны все общественные и сервисные доступы!" + if(REGION_SECURITY) + text += "Собраны все доступы службы безопасности!" + if(REGION_MEDBAY) + text += "Собраны все доступы медицинского отдела!" + if(REGION_RESEARCH) + text += "Собраны все доступы научного отдела!" + if(REGION_ENGINEERING) + text += "Собраны все инженерные доступы!" + if(REGION_SUPPLY) + text += "Собраны все доступы отдела снабжения!" + if(REGION_COMMAND) + text += "Собраны все командные доступы!" + if(REGION_CENTCOMM) + text += "Получен доступ к Центральному Командованию!" + + text += "

Собраны технологии:" + for(var/i in trader.collected_tech_dict) + text += "[i]: [trader.collected_tech_dict[i]]" + + text += "
" + return text.Join("") diff --git a/modular_ss220/antagonists/code/vox_raider/vox_raider_team.dm b/modular_ss220/antagonists/code/vox_raider/vox_raider_team.dm index 7bdc26fa7d87..1f9aee894972 100644 --- a/modular_ss220/antagonists/code/vox_raider/vox_raider_team.dm +++ b/modular_ss220/antagonists/code/vox_raider/vox_raider_team.dm @@ -1,26 +1,42 @@ -/datum/team/vox_raiders_team - name = "vox raiders" +/datum/team/vox_raiders + name = "Vox Raiders" antag_datum_type = /datum/antagonist/vox_raider -/datum/team/vox_raiders_team/New(list/starting_members, add_antag_datum) +/datum/team/vox_raiders/New(list/starting_members, add_antag_datum) . = ..() forge_objectives() -/datum/team/vox_raiders_team/proc/forge_objectives() +/datum/team/vox_raiders/proc/forge_objectives() PRIVATE_PROC(TRUE) + // Основная цель add_team_objective(new /datum/objective/raider_steal()) + //Коллекционная цель + var/list/possible_collect_objective_types = list( + /datum/objective/raider_entirety_steal, + /datum/objective/raider_collection_access, + /datum/objective/raider_collection_tech + ) + var/picked_collect_objective_type = pick(possible_collect_objective_types) + add_team_objective(new picked_collect_objective_type()) + // Конечная цель add_team_objective(new /datum/objective/survive( {"Не допустите гибели вас и остальных ВОКСов из команды."})) -/datum/team/vox_raiders_team/add_member(datum/mind/new_member, add_antag_datum) + + // !!!!!! Тест !!!!!!! + add_team_objective(new /datum/objective/raider_entirety_steal()) + add_team_objective(new /datum/objective/raider_collection_access()) + add_team_objective(new /datum/objective/raider_collection_tech()) + +/datum/team/vox_raiders/add_member(datum/mind/new_member, add_antag_datum) . = ..() update_name() -/datum/team/vox_raiders_team/remove_member(datum/mind/member) +/datum/team/vox_raiders/remove_member(datum/mind/member) . = ..() update_name() -/datum/team/vox_raiders_team/proc/update_name() +/datum/team/vox_raiders/proc/update_name() PRIVATE_PROC(TRUE) var/new_name = get_raider_names_text() if(!new_name) @@ -29,7 +45,7 @@ name = "[initial(name)] of [new_name]" -/datum/team/vox_raiders_team/proc/get_raider_names_text(datum/mind/raider_to_exclude) +/datum/team/vox_raiders/proc/get_raider_names_text(datum/mind/raider_to_exclude) var/list/raider_names = list() for(var/datum/mind/raider as anything in members) if(raider == raider_to_exclude)