Skip to content
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

ре♂fuck♂тор ♂gay♂вспышки #13833

Merged
merged 4 commits into from
Feb 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions code/modules/reagents/Chemistry-Recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -407,30 +407,27 @@
id = "flash_powder"
result = null
required_reagents = list("aluminum" = 1, "potassium" = 1, "sulfur" = 1 )
result_amount = null
result_amount = 3

/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, location)
s.start()

var/range = created_volume / 3
if(isatom(holder.my_atom))
var/atom/A = holder.my_atom
A.flash_lighting_fx(_range = (range + 2), _reset_lighting = FALSE)
A.flash_lighting_fx(_range = (created_volume / 3 + 2), _reset_lighting = FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это очень странная формула была
ренжа света в 100+ тайлов (или в чем это измеряется) звучит странно, при условии что у нас значение 3.8 по дефолту стоит

#define FLASH_LIGHT_RANGE 3.8

попробуй покрутить формулу, чтобы какой-нибудь коэффициент высчитывался и на дефайн умножался, чтобы далеко не убегало

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

короче формулка такая: дефайн * x / (x + 10)
x / (x + 10) никогда больше единицы не будет


for(var/mob/living/carbon/M in viewers(world.view, location))
if(M.eyecheck() > 0)
var/dist = get_dist(M, location)
if(M.eyecheck() > 0 && dist > 0)
continue
M.flash_eyes()
switch(get_dist(M, location))
if(0 to 3)
M.Stun(7)
M.Weaken(15)

if(4 to 5)
M.Stun(5)
if(dist <= 6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

проверка эта здесь нужна?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну как бы дааа, чтобы на границе экрана не станило. граница у нас это седьмая клетка

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тогда

Suggested change
if(dist <= 6)
if(dist <= world.view - 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я dist < world.view сделал, без -1

var/duration = floor(sqrt(created_volume) / 2) / sqrt(dist + 1)
M.Stun(duration)
M.Weaken(duration * 1.2)

/datum/chemical_reaction/napalm
name = "Napalm"
Expand Down
Loading