mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 10:04:30 +01:00
Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
This commit is contained in:
@@ -32,24 +32,30 @@
|
||||
return
|
||||
|
||||
update_mob()
|
||||
var/flashbang_turf = get_turf(src)
|
||||
var/turf/flashbang_turf = get_turf(src)
|
||||
if(!flashbang_turf)
|
||||
return
|
||||
|
||||
//Check that there's enough pressure on the detonation turf for the 'bang' part of the flashbang to work.
|
||||
var/datum/gas_mixture/environment = flashbang_turf.return_air()
|
||||
var/pressure = environment?.return_pressure()
|
||||
var/soundbang = pressure >= SOUND_MINIMUM_PRESSURE
|
||||
|
||||
do_sparks(rand(5, 9), FALSE, src)
|
||||
playsound(flashbang_turf, 'sound/items/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
|
||||
new /obj/effect/dummy/lighting_obj (flashbang_turf, flashbang_range + 2, 4, COLOR_WHITE, 2)
|
||||
for(var/mob/living/living_mob in get_hearers_in_view(flashbang_range, flashbang_turf))
|
||||
bang(get_turf(living_mob), living_mob)
|
||||
bang(get_turf(living_mob), living_mob, soundbang)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/flashbang/proc/bang(turf/turf, mob/living/living_mob)
|
||||
/obj/item/grenade/flashbang/proc/bang(turf/turf, mob/living/living_mob, soundbang = TRUE)
|
||||
if(living_mob.stat == DEAD) //They're dead!
|
||||
return
|
||||
living_mob.show_message(span_warning("BANG"), MSG_AUDIBLE)
|
||||
var/distance = get_dist(get_turf(src), turf)
|
||||
var/sweetspot_range = clamp(CEILING(flashbang_range/sweetspot_divider, 1), 0, flashbang_range)
|
||||
|
||||
//Flash
|
||||
//Flash
|
||||
var/attempt_flash = living_mob.flash_act(affect_silicon = 1)
|
||||
if(attempt_flash == FLASH_COMPLETED)
|
||||
if(distance <= sweetspot_range || issilicon(living_mob))
|
||||
@@ -60,7 +66,10 @@
|
||||
living_mob.dropItemToGround(living_mob.get_active_held_item())
|
||||
living_mob.dropItemToGround(living_mob.get_inactive_held_item())
|
||||
|
||||
//Bang
|
||||
//Bang
|
||||
if(!soundbang && distance)
|
||||
return
|
||||
|
||||
if(!distance)
|
||||
living_mob.soundbang_act(SOUNDBANG_OVERWHELMING, 20 SECONDS, 10, 15)
|
||||
return
|
||||
|
||||
@@ -73,6 +73,6 @@
|
||||
for (var/turf/open/floor/floor in view(freeze_range, loc))
|
||||
floor.MakeSlippery(TURF_WET_PERMAFROST, 6 MINUTES)
|
||||
for(var/mob/living/carbon/victim in floor)
|
||||
victim.adjustStaminaLoss(stamina_damage)
|
||||
victim.adjust_stamina_loss(stamina_damage)
|
||||
victim.adjust_bodytemperature(temp_adjust)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user