Skip to content

Commit

Permalink
Обновление коллекционных задач и мелочный рефактор
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Mar 7, 2024
1 parent 2d9dfc1 commit 249a965
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 78 deletions.
6 changes: 6 additions & 0 deletions modular_ss220/antagonists/code/antag_mix/antag_mix.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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(.)
. += ..()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
weight = 1
antag_cap = 1
candidates_required = 1
scaled_times = 5
restricted_roles = list("Cyborg")
protected_roles = list(
"Security Cadet",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
13 changes: 11 additions & 2 deletions modular_ss220/antagonists/code/guns/biogun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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].")
Expand Down Expand Up @@ -60,6 +66,7 @@
desc = "Небольшое биомеханическое проворное существо на высоких ножках, мешающее и изматывающее тех, кому оно не понравилось."
icon_state = "stamina"
icon_living = "stamina"
density = FALSE
obj_damage = 0
speed = 0.25
melee_damage_type = STAMINA
Expand Down Expand Up @@ -95,6 +102,7 @@
desc = "Маленькое биомеханическое существо с острыми клыкам с половину его тела."
icon_state = "kusaka"
icon_living = "kusaka"
density = FALSE
speed = 0.5
obj_damage = 0
melee_damage_lower = 5
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions modular_ss220/antagonists/code/guns/biogun_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions modular_ss220/antagonists/code/guns/spikegun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down
31 changes: 17 additions & 14 deletions modular_ss220/antagonists/code/objectives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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] кикикридитов. Все ценности должны быть приняты Расчичетчикиком."
Expand All @@ -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]. Все ценности должны быть приняты Расчичетчикиком."
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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))
Expand Down
Original file line number Diff line number Diff line change
@@ -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 "Биооружие"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 249a965

Please sign in to comment.