-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Множество мелких улучшений гранат, взрывов и всякого такого прочего. #12254
The head ref may contain hidden characters: "\u043F\u043E\u0440\u043E\u0445-\u0438\u0437-\u043F\u0430\u0442\u0440\u043E\u043D\u043E\u0432"
Changes from all commits
e065f69
cd29c3f
fadefa2
5d07efd
f62d3df
cd2b8bc
cfbe5c0
b586a37
42c6a88
ebb2221
e33f315
0dc3cb2
c89efe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,13 @@ SUBSYSTEM_DEF(explosions) | |
var/cost_low_mov_atom = 0 | ||
var/cost_med_mov_atom = 0 | ||
var/cost_high_mov_atom = 0 | ||
var/cost_throw_turf = 0 | ||
|
||
var/list/lowturf = list() | ||
var/list/medturf = list() | ||
var/list/highturf = list() | ||
var/list/flameturf = list() | ||
var/list/throwturf = list() | ||
|
||
var/list/low_mov_atom = list() | ||
var/list/med_mov_atom = list() | ||
|
@@ -47,6 +49,7 @@ SUBSYSTEM_DEF(explosions) | |
msg += "LO:[round(cost_low_mov_atom, 1)]|" | ||
msg += "MO:[round(cost_med_mov_atom, 1)]|" | ||
msg += "HO:[round(cost_high_mov_atom, 1)]|" | ||
msg += "TO:[round(cost_throw_turf, 1)]|" | ||
|
||
msg += "} " | ||
|
||
|
@@ -55,6 +58,7 @@ SUBSYSTEM_DEF(explosions) | |
msg += "MT:[medturf.len]|" | ||
msg += "HT:[highturf.len]|" | ||
msg += "FT:[flameturf.len]||" | ||
msg += "TT:[throwturf.len]||" | ||
|
||
msg += "LO:[low_mov_atom.len]|" | ||
msg += "MO:[med_mov_atom.len]|" | ||
|
@@ -236,6 +240,8 @@ SUBSYSTEM_DEF(explosions) | |
if(EXPLODE_LIGHT) | ||
SSexplosions.lowturf += explode | ||
|
||
SSexplosions.throwturf += list(list(explode, epicenter, severity)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. есть ли причина опять игнорировать тг? Там, например, предусматривается влияние нескольких взрывов на объект, прежде чем передавать в контроллер There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. У них там кринж, я сделаю лучше. Сейчас сделаю учитывание нескольких взрывов. И оно будет круче! |
||
|
||
if(prob(40) && dist < flame_range && !isspaceturf(explode) && !explode.density) | ||
flameturf += explode | ||
|
||
|
@@ -427,6 +433,7 @@ SUBSYSTEM_DEF(explosions) | |
Master.laggy_byond_map_update_incoming() | ||
|
||
if(currentpart == SSEXPLOSIONS_MOVABLES) | ||
currentpart = SSEXPLOSIONS_THROWS | ||
|
||
timer = TICK_USAGE_REAL | ||
var/list/local_high_mov_atom = high_mov_atom | ||
|
@@ -454,5 +461,55 @@ SUBSYSTEM_DEF(explosions) | |
continue | ||
EX_ACT(movable_thing, EXPLODE_LIGHT) | ||
cost_low_mov_atom = MC_AVERAGE(cost_low_mov_atom, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) | ||
|
||
|
||
if(currentpart == SSEXPLOSIONS_THROWS) | ||
timer = TICK_USAGE_REAL | ||
var/list/local_throwturfs = throwturf | ||
throwturf = list() | ||
|
||
for(var/list/throwlist in local_throwturfs) | ||
var/turf/affected = throwlist[1] | ||
var/turf/epicenter = throwlist[2] | ||
var/severitypower = throwlist[3] | ||
|
||
var/throwpower = 1 | ||
switch(severitypower) | ||
if(EXPLODE_LIGHT) | ||
throwpower = 5 | ||
if(EXPLODE_HEAVY) | ||
throwpower = 15 | ||
if(EXPLODE_DEVASTATE) | ||
throwpower = 30 | ||
|
||
var/opposite_to_epicenter | ||
var/epicentered = FALSE | ||
if((epicenter.x == affected.x) && (epicenter.y == affected.y) && (epicenter.z == affected.z)) | ||
epicentered = TRUE | ||
else | ||
opposite_to_epicenter = locate(clamp(affected.x - (epicenter.x - affected.x) * throwpower, 0, 255), clamp(affected.y - (epicenter.y - affected.y) * throwpower, 0, 255), affected.z) //180 degree to epicenter | ||
|
||
for(var/atom/movable/I in affected.contents) | ||
if(I.anchored || QDELETED(I)) | ||
continue | ||
|
||
if(epicentered) | ||
//Self-sacrifice mechanics | ||
var/covered = FALSE | ||
for(var/atom/movable/Cover in epicenter.contents) | ||
if(ishuman(Cover) && prob(50)) | ||
var/mob/living/carbon/human/H = Cover | ||
if(!H.lying) | ||
continue | ||
opposite_to_epicenter = Cover | ||
covered = TRUE | ||
break | ||
Comment on lines
+495
to
+505
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. это интересная идея, но место плохое - стоит сразу где-то в части самого взрыва |
||
|
||
if(!covered) | ||
var/angle = rand(1, 360) | ||
var/radius = throwpower * 2 | ||
opposite_to_epicenter = locate(affected.x + round(radius * cos(angle), 1), affected.y + round(radius * sin(angle), 1), affected.z) //random direction | ||
|
||
I.throw_at(opposite_to_epicenter, 5*throwpower/I.w_class, throwpower/I.w_class) | ||
cost_throw_turf = MC_AVERAGE(cost_throw_turf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) | ||
|
||
currentpart = SSEXPLOSIONS_TURFS |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
origin_tech = "materials=1" | ||
var/created_window = /obj/structure/window/thin | ||
required_skills = list(/datum/skill/construction = SKILL_LEVEL_NOVICE) | ||
shrapnel_type = /obj/item/weapon/shard | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. можешь еще тайп в закинуть вместо текущего хардкода спавна осколков не знаю, есть ли у других стеков такой механ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Тут не понял. Мне нужен был один механ для всех видов стаков. Чтобы и стекло и фороновое стекло и усиленное стекло и металл и слитки и пласталь и провода и роды и плитки пола и стеклянные плитки пола - давали осколки. |
||
|
||
/obj/item/stack/sheet/glass/cyborg | ||
name = "glass" | ||
|
@@ -172,6 +173,8 @@ | |
origin_tech = "materials=2" | ||
required_skills = list(/datum/skill/construction = SKILL_LEVEL_TRAINED) | ||
|
||
shrapnel_type = /obj/item/weapon/shard | ||
|
||
/obj/item/stack/sheet/rglass/cyborg | ||
name = "reinforced glass" | ||
desc = "Glass which seems to have rods or something stuck in them." | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,16 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( | |
flags = CONDUCT | ||
origin_tech = "materials=1" | ||
|
||
/obj/item/stack/sheet/metal/attackby(obj/item/I, mob/user, params) | ||
if(iscutter(I)) | ||
var/list/resources_to_use = list() | ||
resources_to_use[src] = 1 | ||
if(!use_multi(user, resources_to_use)) | ||
return | ||
new /obj/item/weapon/shard/shrapnel(user.loc) | ||
else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. можно сделать чуточку красивее
|
||
return ..() | ||
|
||
/obj/item/stack/sheet/metal/cyborg | ||
name = "metal" | ||
desc = "Sheets made out off metal. It has been dubbed Metal Sheets." | ||
|
@@ -167,6 +177,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( | |
singular_name = "wood plank" | ||
icon_state = "sheet-wood" | ||
origin_tech = "materials=1;biotech=1" | ||
shrapnel_type = null | ||
|
||
/obj/item/stack/sheet/wood/cyborg | ||
name = "wooden plank" | ||
|
@@ -202,6 +213,7 @@ var/global/list/datum/stack_recipe/old_cloth_recipes = list ( | |
singular_name = "cloth roll" | ||
icon_state = "sheet-cloth" | ||
origin_tech = "materials=2" | ||
shrapnel_type = null | ||
|
||
/obj/item/stack/sheet/cloth/atom_init(mapload, new_amount = null, merge = FALSE, force_old = FALSE, old_chance = 33) | ||
recipes = cloth_recipes | ||
|
@@ -243,6 +255,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ | |
singular_name = "cardboard sheet" | ||
icon_state = "sheet-card" | ||
origin_tech = "materials=1" | ||
shrapnel_type = null | ||
|
||
/obj/item/stack/sheet/cardboard/atom_init() | ||
recipes = cardboard_recipes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
странно ли что отброс не зависит от силы взрыва?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зависит. Сила взрыва это северити.
Разброс зависит от северити разрушения турфа, всё ок.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
меня немного воротит от того что эпицент хранится для кучи разных турфов при том что он всего один. почему нельзя откидывать предметы в ex_act?